diff --git a/etc/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json b/etc/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json index 0d82ac8430..5fccb21399 100644 --- a/etc/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json +++ b/etc/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json @@ -1,67 +1,163 @@ { - "id": "acceleratedmobilepageurl:v1", - "description": "This API contains a single method, batchGet. Call this method to retrieve the AMP URL (and equivalent AMP Cache URL) for given public URL(s).\n", - "protocol": "rest", - "title": "Accelerated Mobile Pages (AMP) URL API", "resources": { "ampUrls": { "methods": { "batchGet": { - "id": "acceleratedmobilepageurl.ampUrls.batchGet", - "response": { - "$ref": "BatchGetAmpUrlsResponse" - }, - "parameterOrder": [], - "description": "Returns AMP URL(s) and equivalent\n[AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).", "request": { "$ref": "BatchGetAmpUrlsRequest" }, - "flatPath": "v1/ampUrls:batchGet", + "description": "Returns AMP URL(s) and equivalent\n[AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).", "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "BatchGetAmpUrlsResponse" + }, "parameters": {}, + "flatPath": "v1/ampUrls:batchGet", + "id": "acceleratedmobilepageurl.ampUrls.batchGet", "path": "v1/ampUrls:batchGet" } } } }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format." + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response." + }, + "key": { + "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", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + } + }, "schemas": { - "AmpUrl": { - "description": "AMP URL response for a requested URL.", + "BatchGetAmpUrlsResponse": { + "description": "Batch AMP URL response.", "type": "object", "properties": { - "ampUrl": { - "description": "The AMP URL pointing to the publisher's web server.", + "ampUrls": { + "description": "For each URL in BatchAmpUrlsRequest, the URL response. The response might\nnot be in the same order as URLs in the batch request.\nIf BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated\nonly once.", + "type": "array", + "items": { + "$ref": "AmpUrl" + } + }, + "urlErrors": { + "description": "The errors for requested URLs that have no AMP URL.", + "type": "array", + "items": { + "$ref": "AmpUrlError" + } + } + }, + "id": "BatchGetAmpUrlsResponse" + }, + "AmpUrl": { + "type": "object", + "properties": { + "cdnAmpUrl": { + "description": "The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to\nthe cached document in the Google AMP Cache.", "type": "string" }, "originalUrl": { "description": "The original non-AMP URL.", "type": "string" }, - "cdnAmpUrl": { - "description": "The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to\nthe cached document in the Google AMP Cache.", + "ampUrl": { + "description": "The AMP URL pointing to the publisher's web server.", "type": "string" } }, - "id": "AmpUrl" + "id": "AmpUrl", + "description": "AMP URL response for a requested URL." }, "AmpUrlError": { "description": "AMP URL Error resource for a requested URL that couldn't be found.", "type": "object", "properties": { - "originalUrl": { - "description": "The original non-AMP URL.", - "type": "string" + "errorMessage": { + "type": "string", + "description": "An optional descriptive error message." }, "errorCode": { - "description": "The error code of an API call.", - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "INPUT_URL_NOT_FOUND", - "NO_AMP_URL", - "APPLICATION_ERROR", - "URL_IS_VALID_AMP", - "URL_IS_INVALID_AMP" - ], "enumDescriptions": [ "Not specified error.", "Indicates the requested URL is not found in the index, possibly because\nit's unable to be found, not able to be accessed by Googlebot, or some\nother error.", @@ -70,167 +166,71 @@ "DEPRECATED: Indicates the requested URL is a valid AMP URL. This is a\nnon-error state, should not be relied upon as a sign of success or\nfailure. It will be removed in future versions of the API.", "Indicates that an AMP URL has been found that corresponds to the request\nURL, but it is not valid AMP HTML." ], + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "INPUT_URL_NOT_FOUND", + "NO_AMP_URL", + "APPLICATION_ERROR", + "URL_IS_VALID_AMP", + "URL_IS_INVALID_AMP" + ], + "description": "The error code of an API call.", "type": "string" }, - "errorMessage": { - "description": "An optional descriptive error message.", + "originalUrl": { + "description": "The original non-AMP URL.", "type": "string" } }, "id": "AmpUrlError" }, "BatchGetAmpUrlsRequest": { - "description": "AMP URL request for a batch of URLs.", - "type": "object", "properties": { - "lookupStrategy": { - "description": "The lookup_strategy being requested.", - "enum": [ - "FETCH_LIVE_DOC", - "IN_INDEX_DOC" - ], - "enumDescriptions": [ - "FETCH_LIVE_DOC strategy involves live document fetch of URLs not found in\nthe index. Any request URL not found in the index is crawled in realtime\nto validate if there is a corresponding AMP URL. This strategy has higher\ncoverage but with extra latency introduced by realtime crawling. This is\nthe default strategy. Applications using this strategy should set higher\nHTTP timeouts of the API calls.", - "IN_INDEX_DOC strategy skips fetching live documents of URL(s) not found\nin index. For applications which need low latency use of IN_INDEX_DOC\nstrategy is recommended." - ], - "type": "string" - }, "urls": { "description": "List of URLs to look up for the paired AMP URLs.\nThe URLs are case-sensitive. Up to 50 URLs per lookup\n(see [Usage Limits](/amp/cache/reference/limits)).", "type": "array", "items": { "type": "string" } - } - }, - "id": "BatchGetAmpUrlsRequest" - }, - "BatchGetAmpUrlsResponse": { - "description": "Batch AMP URL response.", - "type": "object", - "properties": { - "urlErrors": { - "description": "The errors for requested URLs that have no AMP URL.", - "type": "array", - "items": { - "$ref": "AmpUrlError" - } }, - "ampUrls": { - "description": "For each URL in BatchAmpUrlsRequest, the URL response. The response might\nnot be in the same order as URLs in the batch request.\nIf BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated\nonly once.", - "type": "array", - "items": { - "$ref": "AmpUrl" - } + "lookupStrategy": { + "enum": [ + "FETCH_LIVE_DOC", + "IN_INDEX_DOC" + ], + "description": "The lookup_strategy being requested.", + "type": "string", + "enumDescriptions": [ + "FETCH_LIVE_DOC strategy involves live document fetch of URLs not found in\nthe index. Any request URL not found in the index is crawled in realtime\nto validate if there is a corresponding AMP URL. This strategy has higher\ncoverage but with extra latency introduced by realtime crawling. This is\nthe default strategy. Applications using this strategy should set higher\nHTTP timeouts of the API calls.", + "IN_INDEX_DOC strategy skips fetching live documents of URL(s) not found\nin index. For applications which need low latency use of IN_INDEX_DOC\nstrategy is recommended." + ] } }, - "id": "BatchGetAmpUrlsResponse" + "id": "BatchGetAmpUrlsRequest", + "description": "AMP URL request for a batch of URLs.", + "type": "object" } }, - "revision": "20161213", - "basePath": "", + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version_module": "True", - "discoveryVersion": "v1", - "baseUrl": "https://acceleratedmobilepageurl.googleapis.com/", - "name": "acceleratedmobilepageurl", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - } - }, - "documentationLink": "https://developers.google.com/amp/cache/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v1", + "baseUrl": "https://acceleratedmobilepageurl.googleapis.com/", + "servicePath": "", + "description": "Retrieves the list of AMP URL (and equivalent AMP Cache URL) for a given list of public URL(s).\n", + "kind": "discovery#restDescription", "rootUrl": "https://acceleratedmobilepageurl.googleapis.com/", - "kind": "discovery#restDescription" + "basePath": "", + "ownerDomain": "google.com", + "name": "acceleratedmobilepageurl", + "batchPath": "batch", + "revision": "20170504", + "documentationLink": "https://developers.google.com/amp/cache/", + "id": "acceleratedmobilepageurl:v1", + "title": "Accelerated Mobile Pages (AMP) URL API", + "discoveryVersion": "v1", + "ownerName": "Google", + "version_module": "True" } diff --git a/etc/api/adexchangebuyer/v1.2/adexchangebuyer-api.json b/etc/api/adexchangebuyer/v1.2/adexchangebuyer-api.json index 5fa2064a9d..77b7e86529 100644 --- a/etc/api/adexchangebuyer/v1.2/adexchangebuyer-api.json +++ b/etc/api/adexchangebuyer/v1.2/adexchangebuyer-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/0kwihhvVMiMrsDgm6RBckyUuCfE\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/0_pkDGZUigw6P9-q8PUQy4V9Lvo\"", "discoveryVersion": "v1", "id": "adexchangebuyer:v1.2", "name": "adexchangebuyer", "canonicalName": "Ad Exchange Buyer", "version": "v1.2", - "revision": "20161020", + "revision": "20170504", "title": "Ad Exchange Buyer API", "description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.", "ownerDomain": "google.com", diff --git a/etc/api/adexchangebuyer/v1.3/adexchangebuyer-api.json b/etc/api/adexchangebuyer/v1.3/adexchangebuyer-api.json index c79c4b1dbe..a9f3eaa2d3 100644 --- a/etc/api/adexchangebuyer/v1.3/adexchangebuyer-api.json +++ b/etc/api/adexchangebuyer/v1.3/adexchangebuyer-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/mo0qLr7wMmlAX-U4DWVexdxTH80\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/AyER-m-NeyHqidJeSDw3qhKYlvg\"", "discoveryVersion": "v1", "id": "adexchangebuyer:v1.3", "name": "adexchangebuyer", "canonicalName": "Ad Exchange Buyer", "version": "v1.3", - "revision": "20161020", + "revision": "20170504", "title": "Ad Exchange Buyer API", "description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.", "ownerDomain": "google.com", diff --git a/etc/api/adexchangebuyer/v1.4/adexchangebuyer-api.json b/etc/api/adexchangebuyer/v1.4/adexchangebuyer-api.json index 78bf5cb2a8..723786341b 100644 --- a/etc/api/adexchangebuyer/v1.4/adexchangebuyer-api.json +++ b/etc/api/adexchangebuyer/v1.4/adexchangebuyer-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/EvKs3Hkvcx40X69CkSu-499XWyU\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/XvWFbU-Khae3KqVnoqt96DoRPGo\"", "discoveryVersion": "v1", "id": "adexchangebuyer:v1.4", "name": "adexchangebuyer", "canonicalName": "Ad Exchange Buyer", "version": "v1.4", - "revision": "20161020", + "revision": "20170504", "title": "Ad Exchange Buyer API", "description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.", "ownerDomain": "google.com", @@ -90,7 +90,7 @@ "properties": { "bidProtocol": { "type": "string", - "description": "The protocol that the bidder endpoint is using. By default, OpenRTB protocols use JSON, except PROTOCOL_OPENRTB_PROTOBUF. PROTOCOL_OPENRTB_PROTOBUF uses protobuf encoding over the latest OpenRTB protocol version, which is 2.4 right now. Allowed values: \n- PROTOCOL_ADX \n- PROTOCOL_OPENRTB_2_2 \n- PROTOCOL_OPENRTB_2_3 \n- PROTOCOL_OPENRTB_2_4 \n- PROTOCOL_OPENRTB_PROTOBUF" + "description": "The protocol that the bidder endpoint is using. OpenRTB protocols with prefix PROTOCOL_OPENRTB_PROTOBUF use proto buffer, otherwise use JSON. Allowed values: \n- PROTOCOL_ADX \n- PROTOCOL_OPENRTB_2_2 \n- PROTOCOL_OPENRTB_2_3 \n- PROTOCOL_OPENRTB_2_4 \n- PROTOCOL_OPENRTB_2_5 \n- PROTOCOL_OPENRTB_PROTOBUF_2_3 \n- PROTOCOL_OPENRTB_PROTOBUF_2_4 \n- PROTOCOL_OPENRTB_PROTOBUF_2_5" }, "maximumQps": { "type": "integer", @@ -396,7 +396,7 @@ }, "advertiserName": { "type": "string", - "description": "The name of the company being advertised in the creative.", + "description": "The name of the company being advertised in the creative. The value provided must exist in the advertisers.txt file.", "annotations": { "required": [ "adexchangebuyer.creatives.insert" @@ -415,7 +415,7 @@ }, "attribute": { "type": "array", - "description": "All attributes for the ads that may be shown from this snippet.", + "description": "List of buyer selectable attributes for the ads that may be shown from this snippet. Each attribute is represented by an integer as defined in buyer-declarable-creative-attributes.txt.", "items": { "type": "integer", "format": "int32" @@ -529,7 +529,7 @@ }, "filteringStatus": { "type": "integer", - "description": "The filtering status code. Please refer to the creative-status-codes.txt file for different statuses.", + "description": "The filtering status code as defined in creative-status-codes.txt.", "format": "int32" } } @@ -676,7 +676,7 @@ }, "productCategories": { "type": "array", - "description": "Detected product categories, if any. Read-only. This field should not be set in requests.", + "description": "Detected product categories, if any. Each category is represented by an integer as defined in ad-product-categories.txt. Read-only. This field should not be set in requests.", "items": { "type": "integer", "format": "int32" @@ -684,7 +684,7 @@ }, "restrictedCategories": { "type": "array", - "description": "All restricted categories for the ads that may be shown from this snippet.", + "description": "All restricted categories for the ads that may be shown from this snippet. Each category is represented by an integer as defined in the ad-restricted-categories.txt.", "items": { "type": "integer", "format": "int32" @@ -692,7 +692,7 @@ }, "sensitiveCategories": { "type": "array", - "description": "Detected sensitive categories, if any. Read-only. This field should not be set in requests.", + "description": "Detected sensitive categories, if any. Each category is represented by an integer as defined in ad-sensitive-categories.txt. Read-only. This field should not be set in requests.", "items": { "type": "integer", "format": "int32" @@ -700,7 +700,7 @@ }, "servingRestrictions": { "type": "array", - "description": "The granular status of this ad in specific contexts. A context here relates to where something ultimately serves (for example, a physical location, a platform, an HTTPS vs HTTP request, or the type of auction). Read-only. This field should not be set in requests.", + "description": "The granular status of this ad in specific contexts. A context here relates to where something ultimately serves (for example, a physical location, a platform, an HTTPS vs HTTP request, or the type of auction). Read-only. This field should not be set in requests. See the examples in the Creatives guide for more details.", "items": { "type": "object", "properties": { @@ -723,7 +723,7 @@ }, "geoCriteriaId": { "type": "array", - "description": "Only set when contextType=LOCATION. Represents the geo criterias this restriction applies to.", + "description": "Only set when contextType=LOCATION. Represents the geo criterias this restriction applies to. Impressions are considered to match a context if either the user location or publisher location matches a given geoCriteriaId.", "items": { "type": "integer", "format": "int32" @@ -768,7 +768,7 @@ }, "vendorType": { "type": "array", - "description": "All vendor types for the ads that may be shown from this snippet.", + "description": "List of vendor types for the ads that may be shown from this snippet. Each vendor type is represented by an integer as defined in vendors.txt.", "items": { "type": "integer", "format": "int32" @@ -857,6 +857,10 @@ "id": "DealServingMetadata", "type": "object", "properties": { + "alcoholAdsAllowed": { + "type": "boolean", + "description": "True if alcohol ads are allowed for this deal (read-only). This field is only populated when querying for finalized orders using the method GetFinalizedOrderDeals" + }, "dealPauseStatus": { "$ref": "DealServingMetadataDealPauseStatus", "description": "Tracks which parties (if any) have paused a deal. (readonly, except via PauseResumeOrderDeals action)" @@ -971,7 +975,7 @@ "properties": { "currencyConversionTimeMs": { "type": "string", - "description": "The timestamp (in ms since epoch) when the original reservation price for the deal was first converted to DFP currency. This is used to convert the contracted price into advertiser's currency without discrepancy.", + "description": "The timestamp (in ms since epoch) when the original reservation price for the deal was first converted to DFP currency. This is used to convert the contracted price into buyer's currency without discrepancy.", "format": "int64" }, "dfpLineItemId": { @@ -1305,12 +1309,16 @@ }, "inventoryDescription": { "type": "string", - "description": "Description for the deal terms. (updatable)" + "description": "Description for the deal terms. (buyer-readonly)" }, "isRfpTemplate": { "type": "boolean", "description": "Indicates whether the current deal is a RFP template. RFP template is created by buyer and not based on seller created products." }, + "isSetupComplete": { + "type": "boolean", + "description": "True, if the buyside inventory setup is complete for this deal. (readonly, except via OrderSetupCompleted action)" + }, "kind": { "type": "string", "description": "Identifies what kind of resource this is. Value: the fixed string \"adexchangebuyer#marketplaceDeal\".", @@ -1707,6 +1715,11 @@ "type": "string" } }, + "minimumViewabilityDecile": { + "type": "integer", + "description": "Requests where the predicted viewability is below the specified decile will not match. E.g. if the buyer sets this value to 5, requests from slots where the predicted viewability is below 50% will not match. If the predicted viewability is unknown this field will be ignored.", + "format": "int32" + }, "mobileCarriers": { "type": "array", "description": "Requests containing any of these mobile carrier ids will match. Values are from mobile-carriers.csv in the downloadable files section.", @@ -1864,12 +1877,16 @@ "PricePerBuyer": { "id": "PricePerBuyer", "type": "object", - "description": "Used to specify pricing rules for buyers/advertisers. Each PricePerBuyer in an product can become [0,1] deals. To check if there is a PricePerBuyer for a particular buyer or buyer/advertiser pair, we look for the most specific matching rule - we first look for a rule matching the buyer and advertiser, next a rule with the buyer but an empty advertiser list, and otherwise look for a matching rule where no buyer is set.", + "description": "Used to specify pricing rules for buyers. Each PricePerBuyer in a product can become [0,1] deals. To check if there is a PricePerBuyer for a particular buyer we look for the most specific matching rule - we first look for a rule matching the buyer and otherwise look for a matching rule where no buyer is set.", "properties": { "auctionTier": { "type": "string", "description": "Optional access type for this buyer." }, + "billedBuyer": { + "$ref": "Buyer", + "description": "Reference to the buyer that will get billed." + }, "buyer": { "$ref": "Buyer", "description": "The buyer who will pay this price. If unset, all buyers can pay this price (if the advertisers match, and there's no more specific rule matching the buyer)." @@ -1898,6 +1915,14 @@ "type": "object", "description": "A product is segment of inventory that a seller wishes to sell. It is associated with certain terms and targeting information which helps buyer know more about the inventory. Each field in a product can have one of the following setting:\n\n(readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.", "properties": { + "billedBuyer": { + "$ref": "Buyer", + "description": "The billed buyer corresponding to the buyer that created the offer. (readonly, except on create)" + }, + "buyer": { + "$ref": "Buyer", + "description": "The buyer that created the offer if this is a buyer initiated offer (readonly, except on create)" + }, "creationTimeMs": { "type": "string", "description": "Creation time in ms. since epoch (readonly)", @@ -1910,6 +1935,10 @@ "$ref": "ContactInformation" } }, + "creatorRole": { + "type": "string", + "description": "The role that created the offer. Set to BUYER for buyer initiated offers." + }, "deliveryControl": { "$ref": "DeliveryControl", "description": "The set of fields around delivery control that are interesting for a buyer to see but are non-negotiable. These are set by the publisher. This message is assigned an id of 100 since some day we would want to model this as a protobuf extension." @@ -1953,6 +1982,10 @@ "type": "string", "description": "Optional legacy offer id if this offer is a preferred deal offer." }, + "marketplacePublisherProfileId": { + "type": "string", + "description": "Marketplace publisher profile Id. This Id differs from the regular publisher_profile_id in that 1. This is a new id, the old Id will be deprecated in 2017. 2. This id uniquely identifies a publisher profile by itself." + }, "name": { "type": "string", "description": "The name for this product as set by the seller. (buyer-readonly)" @@ -2056,7 +2089,7 @@ }, "isSetupComplete": { "type": "boolean", - "description": "True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action)" + "description": "True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag." }, "kind": { "type": "string", @@ -2326,6 +2359,10 @@ "type": "string", "description": "The Creative size type." }, + "nativeTemplate": { + "type": "string", + "description": "The native template for native ad." + }, "size": { "$ref": "TargetingValueSize", "description": "For regular or video creative size type, specifies the size of the creative." @@ -3445,7 +3482,7 @@ "propose", "proposeAndAccept", "unknownAction", - "updateFinalized" + "updateNonTerms" ], "enumDescriptions": [ "", @@ -3541,7 +3578,7 @@ "propose", "proposeAndAccept", "unknownAction", - "updateFinalized" + "updateNonTerms" ], "enumDescriptions": [ "", diff --git a/etc/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json b/etc/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json index 31240b3d58..bb4d050ab5 100644 --- a/etc/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json +++ b/etc/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json @@ -1,235 +1,528 @@ { - "id": "adexchangebuyer2:v2beta1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/adexchange.buyer": { - "description": "Manage your Ad Exchange buyer account configuration" - } - } - } - }, - "description": "Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.", - "protocol": "rest", + "ownerDomain": "google.com", + "name": "adexchangebuyer2", + "batchPath": "batch", "title": "Ad Exchange Buyer API II", + "ownerName": "Google", "resources": { "accounts": { "resources": { - "clients": { + "creatives": { + "methods": { + "create": { + "response": { + "$ref": "Creative" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "duplicateIdMode": { + "description": "Indicates if multiple creatives can share an ID or not. Default is\nNO_DUPLICATES (one ID per creative).", + "type": "string", + "location": "query", + "enum": [ + "NO_DUPLICATES", + "FORCE_ENABLE_DUPLICATE_IDS" + ] + }, + "accountId": { + "location": "path", + "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "required": true, + "type": "string" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/creatives", + "path": "v2beta1/accounts/{accountId}/creatives", + "id": "adexchangebuyer2.accounts.creatives.create", + "description": "Creates a creative.", + "request": { + "$ref": "Creative" + } + }, + "stopWatching": { + "httpMethod": "POST", + "parameterOrder": [ + "accountId", + "creativeId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "accountId": { + "required": true, + "type": "string", + "location": "path", + "description": "The account of the creative to stop notifications for." + }, + "creativeId": { + "required": true, + "type": "string", + "location": "path", + "description": "The creative ID of the creative to stop notifications for.\nSpecify \"-\" to specify stopping account level notifications." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", + "id": "adexchangebuyer2.accounts.creatives.stopWatching", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", + "request": { + "$ref": "StopWatchingCreativeRequest" + }, + "description": "Stops watching a creative. Will stop push notifications being sent to the\ntopics when the creative changes status." + }, + "get": { + "description": "Gets a creative.", + "parameterOrder": [ + "accountId", + "creativeId" + ], + "response": { + "$ref": "Creative" + }, + "httpMethod": "GET", + "parameters": { + "accountId": { + "location": "path", + "description": "The account the creative belongs to.", + "required": true, + "type": "string" + }, + "creativeId": { + "description": "The ID of the creative to retrieve.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "id": "adexchangebuyer2.accounts.creatives.get" + }, + "watch": { + "httpMethod": "POST", + "parameterOrder": [ + "accountId", + "creativeId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "accountId": { + "description": "The account of the creative to watch.", + "required": true, + "type": "string", + "location": "path" + }, + "creativeId": { + "location": "path", + "description": "The creative ID to watch for status changes.\nSpecify \"-\" to watch all creatives under the above account.\nIf both creative-level and account-level notifications are\nsent, only a single notification will be sent to the\ncreative-level notification topic.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", + "id": "adexchangebuyer2.accounts.creatives.watch", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", + "request": { + "$ref": "WatchCreativeRequest" + }, + "description": "Watches a creative. Will result in push notifications being sent to the\ntopic when the creative changes status." + }, + "update": { + "response": { + "$ref": "Creative" + }, + "parameterOrder": [ + "accountId", + "creativeId" + ], + "httpMethod": "PUT", + "parameters": { + "accountId": { + "location": "path", + "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "required": true, + "type": "string" + }, + "creativeId": { + "required": true, + "type": "string", + "location": "path", + "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "id": "adexchangebuyer2.accounts.creatives.update", + "request": { + "$ref": "Creative" + }, + "description": "Updates a creative." + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "accountId" + ], + "response": { + "$ref": "ListCreativesResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativesResponse.next_page_token\nreturned from the previous call to 'ListCreatives' method.", + "type": "string" + }, + "accountId": { + "location": "path", + "description": "The account to list the creatives from.\nSpecify \"-\" to list all creatives the current user has access to.", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server may return fewer creatives than requested\n(due to timeout constraint) even if more are available via another call.\nIf unspecified, server will pick an appropriate default.\nAcceptable values are 1 to 1000, inclusive.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "query": { + "description": "An optional query string to filter creatives. If no filter is specified,\nall active creatives will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eattribute: {a numeric attribute from the list of attributes}\n\u003cli\u003edisapprovalReason: {a reason from DisapprovalReason\n\u003c/ul\u003e\nExample: 'accountId=12345 AND (dealsStatus:disapproved AND disapprovalReason:unacceptable_content) OR attribute:47'", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives", + "id": "adexchangebuyer2.accounts.creatives.list", + "path": "v2beta1/accounts/{accountId}/creatives", + "description": "Lists creatives." + } + }, "resources": { - "users": { + "dealAssociations": { "methods": { - "update": { - "id": "adexchangebuyer2.accounts.clients.users.update", - "response": { - "$ref": "ClientUser" - }, - "parameterOrder": [ - "accountId", - "clientAccountId", - "userId" - ], - "description": "Updates an existing client user.\nOnly the user status can be changed on update.", - "request": { - "$ref": "ClientUser" - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "httpMethod": "PUT", - "parameters": { - "clientAccountId": { - "description": "Numerical account ID of the client buyer that the user to be retrieved\nis associated with. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - }, - "userId": { - "description": "Numerical identifier of the user to retrieve. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - }, - "accountId": { - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - } - }, - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] - }, - "get": { - "id": "adexchangebuyer2.accounts.clients.users.get", - "response": { - "$ref": "ClientUser" - }, - "parameterOrder": [ - "accountId", - "clientAccountId", - "userId" - ], - "description": "Retrieves an existing client user.", - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "httpMethod": "GET", - "parameters": { - "clientAccountId": { - "description": "Numerical account ID of the client buyer\nthat the user to be retrieved is associated with. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - }, - "userId": { - "description": "Numerical identifier of the user to retrieve. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - }, - "accountId": { - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - } - }, - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] - }, "list": { - "id": "adexchangebuyer2.accounts.clients.users.list", - "response": { - "$ref": "ListClientUsersResponse" - }, "parameterOrder": [ "accountId", - "clientAccountId" + "creativeId" ], - "description": "Lists all the known client users for a specified\nsponsor buyer account ID.", - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", "httpMethod": "GET", + "response": { + "$ref": "ListDealAssociationsResponse" + }, "parameters": { - "clientAccountId": { - "description": "The account ID of the client buyer to list users for. (required)\nYou must specify either a string representation of a\nnumerical account identifier or the `-` character\nto list all the client users for all the clients\nof a given sponsor buyer.", - "required": true, + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListDealAssociationsResponse.next_page_token\nreturned from the previous call to 'ListDealAssociations' method.", + "type": "string" + }, + "accountId": { "location": "path", + "description": "The account to list the associations from.\nSpecify \"-\" to list all creatives the current user has access to.", + "required": true, "type": "string" }, "pageSize": { - "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", "location": "query", - "type": "integer", - "format": "int32" + "description": "Requested page size. Server may return fewer associations than requested.\nIf unspecified, server will pick an appropriate default.", + "format": "int32", + "type": "integer" }, - "accountId": { - "description": "Numerical account ID of the sponsor buyer of the client to list users for.\n(required)", - "required": true, - "location": "path", + "query": { + "description": "An optional query string to filter deal associations. If no filter is\nspecified, all associations will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsId=\u003ci\u003edeals_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003c/ul\u003e\nExample: 'dealsId=12345 AND dealsStatus:disapproved'", "type": "string", - "format": "int64" + "location": "query" }, - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUsersResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.users.list method.", - "location": "query", + "creativeId": { + "required": true, + "type": "string", + "location": "path", + "description": "The creative ID to list the associations from.\nSpecify \"-\" to list all creatives under the above account." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", + "id": "adexchangebuyer2.accounts.creatives.dealAssociations.list", + "description": "List all creative-deal associations." + }, + "add": { + "httpMethod": "POST", + "parameterOrder": [ + "accountId", + "creativeId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "accountId": { + "description": "The account the creative belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "creativeId": { + "location": "path", + "description": "The ID of the creative associated with the deal.", + "required": true, "type": "string" } }, - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", "scopes": [ "https://www.googleapis.com/auth/adexchange.buyer" - ] - } - } - }, - "invitations": { - "methods": { - "create": { - "id": "adexchangebuyer2.accounts.clients.invitations.create", + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", + "id": "adexchangebuyer2.accounts.creatives.dealAssociations.add", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", + "request": { + "$ref": "AddDealAssociationRequest" + }, + "description": "Associate an existing deal with a creative." + }, + "remove": { "response": { - "$ref": "ClientUserInvitation" + "$ref": "Empty" }, "parameterOrder": [ "accountId", - "clientAccountId" + "creativeId" ], - "description": "Creates and sends out an email invitation to access\nan Ad Exchange client buyer account.", - "request": { - "$ref": "ClientUserInvitation" - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", "httpMethod": "POST", - "parameters": { - "clientAccountId": { - "description": "Numerical account ID of the client buyer that the user\nshould be associated with. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - }, - "accountId": { - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - } - }, - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", "scopes": [ "https://www.googleapis.com/auth/adexchange.buyer" - ] - }, - "get": { - "id": "adexchangebuyer2.accounts.clients.invitations.get", - "response": { - "$ref": "ClientUserInvitation" + ], + "parameters": { + "creativeId": { + "location": "path", + "description": "The ID of the creative associated with the deal.", + "required": true, + "type": "string" + }, + "accountId": { + "description": "The account the creative belongs to.", + "required": true, + "type": "string", + "location": "path" + } }, + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", + "id": "adexchangebuyer2.accounts.creatives.dealAssociations.remove", + "description": "Remove the association between a deal and a creative.", + "request": { + "$ref": "RemoveDealAssociationRequest" + } + } + } + } + } + }, + "clients": { + "methods": { + "update": { + "description": "Updates an existing client buyer.", + "request": { + "$ref": "Client" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "response": { + "$ref": "Client" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "clientAccountId": { + "location": "path", + "description": "Unique numerical account ID of the client to update. (required)", + "format": "int64", + "required": true, + "type": "string" + }, + "accountId": { + "location": "path", + "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to update a client for. (required)", + "format": "int64", + "required": true, + "type": "string" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", + "id": "adexchangebuyer2.accounts.clients.update", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}" + }, + "create": { + "flatPath": "v2beta1/accounts/{accountId}/clients", + "path": "v2beta1/accounts/{accountId}/clients", + "id": "adexchangebuyer2.accounts.clients.create", + "description": "Creates a new client buyer.", + "request": { + "$ref": "Client" + }, + "response": { + "$ref": "Client" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "accountId": { + "required": true, + "type": "string", + "location": "path", + "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to create a client for. (required)", + "format": "int64" + } + } + }, + "get": { + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", + "id": "adexchangebuyer2.accounts.clients.get", + "description": "Gets a client buyer with a given client account ID.", + "response": { + "$ref": "Client" + }, + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "accountId": { + "required": true, + "type": "string", + "location": "path", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "format": "int64" + }, + "clientAccountId": { + "required": true, + "type": "string", + "location": "path", + "description": "Numerical account ID of the client buyer to retrieve. (required)", + "format": "int64" + } + } + }, + "list": { + "description": "Lists all the clients for the current sponsor buyer.", + "httpMethod": "GET", + "parameterOrder": [ + "accountId" + ], + "response": { + "$ref": "ListClientsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientsResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.list method.", + "type": "string", + "location": "query" + }, + "accountId": { + "description": "Unique numerical account ID of the sponsor buyer to list the clients for.", + "format": "int64", + "required": true, + "type": "string", + "location": "path" + }, + "pageSize": { + "location": "query", + "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/clients", + "id": "adexchangebuyer2.accounts.clients.list", + "path": "v2beta1/accounts/{accountId}/clients" + } + }, + "resources": { + "invitations": { + "methods": { + "get": { + "description": "Retrieves an existing client user invitation.", + "httpMethod": "GET", "parameterOrder": [ "accountId", "clientAccountId", "invitationId" ], - "description": "Retrieves an existing client user invitation.", - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", - "httpMethod": "GET", + "response": { + "$ref": "ClientUserInvitation" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], "parameters": { - "clientAccountId": { - "description": "Numerical account ID of the client buyer that the user invitation\nto be retrieved is associated with. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - }, "invitationId": { - "description": "Numerical identifier of the user invitation to retrieve. (required)", - "required": true, "location": "path", - "type": "string", - "format": "int64" + "description": "Numerical identifier of the user invitation to retrieve. (required)", + "format": "int64", + "required": true, + "type": "string" }, "accountId": { - "description": "Numerical account ID of the client's sponsor buyer. (required)", "required": true, - "location": "path", "type": "string", + "location": "path", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "format": "int64" + }, + "clientAccountId": { + "required": true, + "type": "string", + "location": "path", + "description": "Numerical account ID of the client buyer that the user invitation\nto be retrieved is associated with. (required)", "format": "int64" } }, - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", + "id": "adexchangebuyer2.accounts.clients.invitations.get", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}" }, "list": { - "id": "adexchangebuyer2.accounts.clients.invitations.list", + "httpMethod": "GET", "response": { "$ref": "ListClientUserInvitationsResponse" }, @@ -237,349 +530,1261 @@ "accountId", "clientAccountId" ], - "description": "Lists all the client users invitations for a client\nwith a given account ID.", - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", - "httpMethod": "GET", "parameters": { - "clientAccountId": { - "description": "Numerical account ID of the client buyer to list invitations for.\n(required)\nYou must either specify a string representation of a\nnumerical account identifier or the `-` character\nto list all the invitations for all the clients\nof a given sponsor buyer.", - "required": true, - "location": "path", - "type": "string" - }, - "pageSize": { - "description": "Requested page size. Server may return fewer clients than requested.\nIf unspecified, server will pick an appropriate default.", + "pageToken": { "location": "query", - "type": "integer", - "format": "int32" + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUserInvitationsResponse.nextPageToken\nreturned from the previous call to the\nclients.invitations.list\nmethod.", + "type": "string" }, "accountId": { "description": "Numerical account ID of the client's sponsor buyer. (required)", + "format": "int64", "required": true, - "location": "path", "type": "string", - "format": "int64" + "location": "path" }, - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUserInvitationsResponse.nextPageToken\nreturned from the previous call to the\nclients.invitations.list\nmethod.", + "pageSize": { "location": "query", + "description": "Requested page size. Server may return fewer clients than requested.\nIf unspecified, server will pick an appropriate default.", + "format": "int32", + "type": "integer" + }, + "clientAccountId": { + "location": "path", + "description": "Numerical account ID of the client buyer to list invitations for.\n(required)\nYou must either specify a string representation of a\nnumerical account identifier or the `-` character\nto list all the invitations for all the clients\nof a given sponsor buyer.", + "required": true, "type": "string" } }, - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", "scopes": [ "https://www.googleapis.com/auth/adexchange.buyer" - ] + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "id": "adexchangebuyer2.accounts.clients.invitations.list", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "description": "Lists all the client users invitations for a client\nwith a given account ID." + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "response": { + "$ref": "ClientUserInvitation" + }, + "parameters": { + "accountId": { + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "format": "int64", + "required": true, + "type": "string", + "location": "path" + }, + "clientAccountId": { + "description": "Numerical account ID of the client buyer that the user\nshould be associated with. (required)", + "format": "int64", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "id": "adexchangebuyer2.accounts.clients.invitations.create", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "request": { + "$ref": "ClientUserInvitation" + }, + "description": "Creates and sends out an email invitation to access\nan Ad Exchange client buyer account." } } - } - }, - "methods": { - "update": { - "id": "adexchangebuyer2.accounts.clients.update", - "response": { - "$ref": "Client" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "description": "Updates an existing client buyer.", - "request": { - "$ref": "Client" - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", - "httpMethod": "PUT", - "parameters": { - "clientAccountId": { - "description": "Unique numerical account ID of the client to update. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - }, - "accountId": { - "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to update a client for. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - } - }, - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] }, - "get": { - "id": "adexchangebuyer2.accounts.clients.get", - "response": { - "$ref": "Client" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "description": "Gets a client buyer with a given client account ID.", - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", - "httpMethod": "GET", - "parameters": { - "clientAccountId": { - "description": "Numerical account ID of the client buyer to retrieve. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" + "users": { + "methods": { + "list": { + "response": { + "$ref": "ListClientUsersResponse" + }, + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUsersResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.users.list method." + }, + "accountId": { + "description": "Numerical account ID of the sponsor buyer of the client to list users for.\n(required)", + "format": "int64", + "required": true, + "type": "string", + "location": "path" + }, + "pageSize": { + "location": "query", + "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", + "format": "int32", + "type": "integer" + }, + "clientAccountId": { + "location": "path", + "description": "The account ID of the client buyer to list users for. (required)\nYou must specify either a string representation of a\nnumerical account identifier or the `-` character\nto list all the client users for all the clients\nof a given sponsor buyer.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", + "id": "adexchangebuyer2.accounts.clients.users.list", + "description": "Lists all the known client users for a specified\nsponsor buyer account ID." }, - "accountId": { - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - } - }, - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] - }, - "create": { - "id": "adexchangebuyer2.accounts.clients.create", - "response": { - "$ref": "Client" - }, - "parameterOrder": [ - "accountId" - ], - "description": "Creates a new client buyer.", - "request": { - "$ref": "Client" - }, - "flatPath": "v2beta1/accounts/{accountId}/clients", - "httpMethod": "POST", - "parameters": { - "accountId": { - "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to create a client for. (required)", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - } - }, - "path": "v2beta1/accounts/{accountId}/clients", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] - }, - "list": { - "id": "adexchangebuyer2.accounts.clients.list", - "response": { - "$ref": "ListClientsResponse" - }, - "parameterOrder": [ - "accountId" - ], - "description": "Lists all the clients for the current sponsor buyer.", - "flatPath": "v2beta1/accounts/{accountId}/clients", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", - "location": "query", - "type": "integer", - "format": "int32" + "get": { + "response": { + "$ref": "ClientUser" + }, + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "clientAccountId", + "userId" + ], + "parameters": { + "userId": { + "location": "path", + "description": "Numerical identifier of the user to retrieve. (required)", + "format": "int64", + "required": true, + "type": "string" + }, + "accountId": { + "required": true, + "type": "string", + "location": "path", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "format": "int64" + }, + "clientAccountId": { + "required": true, + "type": "string", + "location": "path", + "description": "Numerical account ID of the client buyer\nthat the user to be retrieved is associated with. (required)", + "format": "int64" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "id": "adexchangebuyer2.accounts.clients.users.get", + "description": "Retrieves an existing client user." }, - "accountId": { - "description": "Unique numerical account ID of the sponsor buyer to list the clients for.", - "required": true, - "location": "path", - "type": "string", - "format": "int64" - }, - "pageToken": { - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientsResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.list method.", - "location": "query", - "type": "string" + "update": { + "request": { + "$ref": "ClientUser" + }, + "description": "Updates an existing client user.\nOnly the user status can be changed on update.", + "httpMethod": "PUT", + "parameterOrder": [ + "accountId", + "clientAccountId", + "userId" + ], + "response": { + "$ref": "ClientUser" + }, + "parameters": { + "accountId": { + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "format": "int64", + "required": true, + "type": "string", + "location": "path" + }, + "clientAccountId": { + "location": "path", + "description": "Numerical account ID of the client buyer that the user to be retrieved\nis associated with. (required)", + "format": "int64", + "required": true, + "type": "string" + }, + "userId": { + "location": "path", + "description": "Numerical identifier of the user to retrieve. (required)", + "format": "int64", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "id": "adexchangebuyer2.accounts.clients.users.update", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}" } - }, - "path": "v2beta1/accounts/{accountId}/clients", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] + } } } } } } }, - "schemas": { - "ClientUser": { - "description": "A client user is created under a client buyer and has restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the associated client buyer.\n\nThe only way a new client user can be created is via accepting an\nemail invitation\n(see the\naccounts.clients.invitations.create\nmethod).\n\nAll fields are required unless otherwise specified.", - "type": "object", - "properties": { - "email": { - "description": "User's email address. The value of this field\nis ignored in an update operation.", - "type": "string" - }, - "clientAccountId": { - "description": "Numerical account ID of the client buyer\nwith which the user is associated; the\nbuyer must be a client of the current sponsor buyer.\nThe value of this field is ignored in an update operation.", - "type": "string", - "format": "int64" - }, - "status": { - "description": "The status of the client user.", - "enum": [ - "USER_STATUS_UNSPECIFIED", - "PENDING", - "ACTIVE", - "DISABLED" - ], - "enumDescriptions": [ - "A placeholder for an undefined user status.", - "A user who was already created but hasn't accepted the invitation yet.", - "A user that is currently active.", - "A user that is currently disabled." - ], - "type": "string" - }, - "userId": { - "description": "The unique numerical ID of the client user\nthat has accepted an invitation.\nThe value of this field is ignored in an update operation.", - "type": "string", - "format": "int64" - } - }, - "id": "ClientUser" + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" }, - "ClientUserInvitation": { - "description": "An invitation for a new client user to get access to the Ad Exchange\nBuyer UI.\nAll fields are required unless otherwise specified.", + "prettyPrint": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Returns response with indentations and line breaks." + }, + "uploadType": { + "type": "string", + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "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" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + } + }, + "version": "v2beta1", + "baseUrl": "https://adexchangebuyer.googleapis.com/", + "servicePath": "", + "description": "Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.", + "kind": "discovery#restDescription", + "basePath": "", + "documentationLink": "https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/", + "revision": "20170519", + "id": "adexchangebuyer2:v2beta1", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { + "AuctionContext": { + "description": "@OutputOnly The auction type the restriction applies to.", "type": "object", "properties": { - "email": { - "description": "The email address to which the invitation is sent. Email\naddresses should be unique among all client users under each sponsor\nbuyer.", - "type": "string" - }, - "clientAccountId": { - "description": "Numerical account ID of the client buyer\nthat the invited user is associated with.\nThe value of this field is ignored in create operations.", - "type": "string", - "format": "int64" - }, - "invitationId": { - "description": "The unique numerical ID of the invitation that is sent to the user.\nThe value of this field is ignored in create operations.", - "type": "string", - "format": "int64" + "auctionTypes": { + "description": "The auction types this restriction applies to.", + "type": "array", + "items": { + "enum": [ + "OPEN_AUCTION", + "DIRECT_DEALS" + ], + "type": "string" + }, + "enumDescriptions": [ + "The restriction applies to open auction.", + "The restriction applies to direct deals." + ] } }, - "id": "ClientUserInvitation" + "id": "AuctionContext" }, "ListClientUserInvitationsResponse": { - "type": "object", "properties": { "nextPageToken": { "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientUserInvitationsRequest.pageToken\nfield in the subsequent call to the\nclients.invitations.list\nmethod to retrieve the next\npage of results.", "type": "string" }, "invitations": { - "description": "The returned list of client users.", "type": "array", "items": { "$ref": "ClientUserInvitation" - } + }, + "description": "The returned list of client users." } }, - "id": "ListClientUserInvitationsResponse" + "id": "ListClientUserInvitationsResponse", + "type": "object" }, "ListClientUsersResponse": { + "id": "ListClientUsersResponse", "type": "object", "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientUsersRequest.pageToken\nfield in the subsequent call to the\nclients.invitations.list\nmethod to retrieve the next\npage of results.", + "type": "string" + }, "users": { "description": "The returned list of client users.", "type": "array", "items": { "$ref": "ClientUser" } + } + } + }, + "LocationContext": { + "type": "object", + "properties": { + "geoCriteriaIds": { + "description": "IDs representing the geo location for this context.\nPlease refer to the\n[geo-table.csv](https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv)\nfile for different geo criteria IDs.", + "type": "array", + "items": { + "format": "int32", + "type": "integer" + } + } + }, + "id": "LocationContext", + "description": "@OutputOnly The Geo criteria the restriction applies to." + }, + "PlatformContext": { + "description": "@OutputOnly The type of platform the restriction applies to.", + "type": "object", + "properties": { + "platforms": { + "description": "The platforms this restriction applies to.", + "type": "array", + "items": { + "enum": [ + "DESKTOP", + "ANDROID", + "IOS" + ], + "type": "string" + }, + "enumDescriptions": [ + "Desktop platform.", + "Android platform.", + "iOS platform." + ] + } + }, + "id": "PlatformContext" + }, + "ClientUser": { + "type": "object", + "properties": { + "userId": { + "description": "The unique numerical ID of the client user\nthat has accepted an invitation.\nThe value of this field is ignored in an update operation.", + "format": "int64", + "type": "string" }, - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientUsersRequest.pageToken\nfield in the subsequent call to the\nclients.invitations.list\nmethod to retrieve the next\npage of results.", + "email": { + "description": "User's email address. The value of this field\nis ignored in an update operation.", + "type": "string" + }, + "clientAccountId": { + "description": "Numerical account ID of the client buyer\nwith which the user is associated; the\nbuyer must be a client of the current sponsor buyer.\nThe value of this field is ignored in an update operation.", + "format": "int64", + "type": "string" + }, + "status": { + "enum": [ + "USER_STATUS_UNSPECIFIED", + "PENDING", + "ACTIVE", + "DISABLED" + ], + "description": "The status of the client user.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined user status.", + "A user who was already created but hasn't accepted the invitation yet.", + "A user that is currently active.", + "A user that is currently disabled." + ] + } + }, + "id": "ClientUser", + "description": "A client user is created under a client buyer and has restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the associated client buyer.\n\nThe only way a new client user can be created is via accepting an\nemail invitation\n(see the\naccounts.clients.invitations.create\nmethod).\n\nAll fields are required unless otherwise specified." + }, + "CreativeDealAssociation": { + "description": "The association between a creative and a deal.", + "type": "object", + "properties": { + "dealsId": { + "description": "The externalDealId for the deal associated with the creative.", + "type": "string" + }, + "accountId": { + "description": "The account the creative belongs to.", + "type": "string" + }, + "creativeId": { + "description": "The ID of the creative associated with the deal.", "type": "string" } }, - "id": "ListClientUsersResponse" + "id": "CreativeDealAssociation" }, - "Client": { - "description": "A client resource represents a client buyer—an agency,\na brand, or an advertiser customer of the sponsor buyer.\nUsers associated with the client buyer have restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the client buyer.\nAll fields are required unless otherwise specified.", + "Creative": { + "description": "A creative and its classification data.", "type": "object", "properties": { - "visibleToSeller": { - "description": "Whether the client buyer will be visible to sellers.", - "type": "boolean" - }, - "status": { - "description": "The status of the client buyer.", - "enum": [ - "CLIENT_STATUS_UNSPECIFIED", - "DISABLED", - "ACTIVE" - ], - "enumDescriptions": [ - "A placeholder for an undefined client status.", - "A client that is currently disabled.", - "A client that is currently active." - ], + "accountId": { + "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", "type": "string" }, - "entityType": { - "description": "The type of the client entity: `ADVERTISER`, `BRAND`, or `AGENCY`.", - "enum": [ - "ENTITY_TYPE_UNSPECIFIED", - "ADVERTISER", - "BRAND", - "AGENCY" - ], + "native": { + "description": "A native creative.", + "$ref": "NativeContent" + }, + "servingRestrictions": { + "description": "@OutputOnly The granular status of this ad in specific contexts.\nA context here relates to where something ultimately serves (for example,\na physical location, a platform, an HTTPS vs HTTP request, or the type\nof auction).", + "type": "array", + "items": { + "$ref": "ServingRestriction" + } + }, + "video": { + "$ref": "VideoContent", + "description": "A video creative." + }, + "agencyId": { + "description": "The agency ID for this creative.", + "format": "int64", + "type": "string" + }, + "clickThroughUrls": { + "description": "The set of destination URLs for the creative.", + "type": "array", + "items": { + "type": "string" + } + }, + "detectedSensitiveCategories": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "@OutputOnly Detected sensitive categories, if any.\nSee the ad-sensitive-categories.txt file in the technical documentation for\na list of IDs. You should use these IDs along with the\nexcluded-sensitive-category field in the bid request to filter your bids." + }, + "adChoicesDestinationUrl": { + "description": "The link to AdChoices destination page.", + "type": "string" + }, + "restrictedCategories": { + "description": "All restricted categories for the ads that may be shown from this creative.", + "type": "array", + "items": { + "enum": [ + "NO_RESTRICTED_CATEGORIES", + "ALCOHOL" + ], + "type": "string" + }, "enumDescriptions": [ - "A placeholder for an undefined client entity type. Should not be used.", - "An advertiser.", - "A brand.", - "An advertising agency." + "The ad has no restricted categories", + "The alcohol restricted category." + ] + }, + "corrections": { + "description": "@OutputOnly Shows any corrections that were applied to this creative.", + "type": "array", + "items": { + "$ref": "Correction" + } + }, + "version": { + "type": "integer", + "description": "@OutputOnly The version of this creative.", + "format": "int32" + }, + "vendorIds": { + "description": "All vendor IDs for the ads that may be shown from this creative.\nSee https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt\nfor possible values.", + "type": "array", + "items": { + "format": "int32", + "type": "integer" + } + }, + "impressionTrackingUrls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The set of URLs to be called to record an impression." + }, + "html": { + "$ref": "HtmlContent", + "description": "An HTML creative." + }, + "dealsStatus": { + "description": "@OutputOnly The top-level deals status of this creative.\nIf disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in\nserving_restrictions will also exist. Note\nthat this may be nuanced with other contextual restrictions, in which case,\nit may be preferable to read from serving_restrictions directly.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", + "enumDescriptions": [ + "The status is unknown.", + "The creative has not been checked.", + "The creative has been conditionally approved.\nSee serving_restrictions for details.", + "The creative has been approved.", + "The creative has been disapproved." ], + "enum": [ + "STATUS_UNSPECIFIED", + "NOT_CHECKED", + "CONDITIONALLY_APPROVED", + "APPROVED", + "DISAPPROVED" + ] + }, + "detectedProductCategories": { + "type": "array", + "items": { + "format": "int32", + "type": "integer" + }, + "description": "@OutputOnly Detected product categories, if any.\nSee the ad-product-categories.txt file in the technical documentation\nfor a list of IDs." + }, + "openAuctionStatus": { + "description": "@OutputOnly The top-level open auction status of this creative.\nIf disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in\nserving_restrictions will also exist. Note\nthat this may be nuanced with other contextual restrictions, in which case,\nit may be preferable to read from serving_restrictions directly.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", + "enumDescriptions": [ + "The status is unknown.", + "The creative has not been checked.", + "The creative has been conditionally approved.\nSee serving_restrictions for details.", + "The creative has been approved.", + "The creative has been disapproved." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "NOT_CHECKED", + "CONDITIONALLY_APPROVED", + "APPROVED", + "DISAPPROVED" + ] + }, + "advertiserName": { + "description": "The name of the company being advertised in the creative.", + "type": "string" + }, + "detectedAdvertiserIds": { + "description": "@OutputOnly Detected advertiser IDs, if any.", + "type": "array", + "items": { + "format": "int64", + "type": "string" + } + }, + "detectedDomains": { + "description": "@OutputOnly\nThe detected domains for this creative.", + "type": "array", + "items": { + "type": "string" + } + }, + "filteringStats": { + "$ref": "FilteringStats", + "description": "@OutputOnly The filtering stats for this creative." + }, + "attributes": { + "description": "All attributes for the ads that may be shown from this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "array", + "items": { + "enum": [ + "ATTRIBUTE_UNSPECIFIED", + "IS_TAGGED", + "IS_COOKIE_TARGETED", + "IS_USER_INTEREST_TARGETED", + "EXPANDING_DIRECTION_NONE", + "EXPANDING_DIRECTION_UP", + "EXPANDING_DIRECTION_DOWN", + "EXPANDING_DIRECTION_LEFT", + "EXPANDING_DIRECTION_RIGHT", + "EXPANDING_DIRECTION_UP_LEFT", + "EXPANDING_DIRECTION_UP_RIGHT", + "EXPANDING_DIRECTION_DOWN_LEFT", + "EXPANDING_DIRECTION_DOWN_RIGHT", + "EXPANDING_DIRECTION_UP_OR_DOWN", + "EXPANDING_DIRECTION_LEFT_OR_RIGHT", + "EXPANDING_DIRECTION_ANY_DIAGONAL", + "EXPANDING_ACTION_ROLLOVER_TO_EXPAND", + "INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH", + "RICH_MEDIA_CAPABILITY_TYPE_MRAID", + "RICH_MEDIA_CAPABILITY_TYPE_SSL", + "RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL", + "NATIVE_ELIGIBILITY_ELIGIBLE", + "NATIVE_ELIGIBILITY_NOT_ELIGIBLE", + "RENDERING_SIZELESS_ADX" + ], + "type": "string" + }, + "enumDescriptions": [ + "Do not use. This is a placeholder value only.", + "The creative is tagged.", + "The creative is cookie targeted.", + "The creative is user interest targeted.", + "The creative does not expand.", + "The creative expands up.", + "The creative expands down.", + "The creative expands left.", + "The creative expands right.", + "The creative expands up and left.", + "The creative expands up and right.", + "The creative expands down and left.", + "The creative expands down and right.", + "The creative expands up or down.", + "The creative expands left or right.", + "The creative expands on any diagonal.", + "The creative expands when rolled over.", + "The instream vast video type is vpaid flash.", + "The creative is MRAID", + "The creative is SSL.", + "The creative is an interstitial.", + "The creative is eligible for native.", + "The creative is not eligible for native.", + "The creative can dynamically resize to fill a variety of slot sizes." + ] + }, + "apiUpdateTime": { + "description": "@OutputOnly The last update timestamp of the creative via API.", + "format": "google-datetime", + "type": "string" + }, + "detectedLanguages": { + "description": "@OutputOnly\nThe detected languages for this creative. The order is arbitrary. The codes\nare 2 or 5 characters and are documented at\nhttps://developers.google.com/adwords/api/docs/appendix/languagecodes.", + "type": "array", + "items": { + "type": "string" + } + }, + "creativeId": { + "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string" + } + }, + "id": "Creative" + }, + "FilteringStats": { + "id": "FilteringStats", + "description": "@OutputOnly Filtering reasons for this creative during a period of a single\nday (from midnight to midnight Pacific).", + "type": "object", + "properties": { + "reasons": { + "description": "The set of filtering reasons for this date.", + "type": "array", + "items": { + "$ref": "Reason" + } + }, + "date": { + "$ref": "Date", + "description": "The day during which the data was collected.\nThe data is collected from 00:00:00 to 23:59:59 PT.\nDuring switches from PST to PDT and back, the day may\ncontain 23 or 25 hours of data instead of the usual 24." + } + } + }, + "RemoveDealAssociationRequest": { + "description": "A request for removing the association between a deal and a creative.", + "type": "object", + "properties": { + "association": { + "description": "The association between a creative and a deal that should be removed.", + "$ref": "CreativeDealAssociation" + } + }, + "id": "RemoveDealAssociationRequest" + }, + "Client": { + "properties": { + "clientName": { + "description": "Name used to represent this client to publishers.\nYou may have multiple clients that map to the same entity,\nbut for each client the combination of `clientName` and entity\nmust be unique.\nYou can specify this field as empty.", "type": "string" }, "role": { - "description": "The role which is assigned to the client buyer. Each role implies a set of\npermissions granted to the client. Must be one of `CLIENT_DEAL_VIEWER`,\n`CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`.", "enum": [ "CLIENT_ROLE_UNSPECIFIED", "CLIENT_DEAL_VIEWER", "CLIENT_DEAL_NEGOTIATOR", "CLIENT_DEAL_APPROVER" ], + "description": "The role which is assigned to the client buyer. Each role implies a set of\npermissions granted to the client. Must be one of `CLIENT_DEAL_VIEWER`,\n`CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`.", + "type": "string", "enumDescriptions": [ "A placeholder for an undefined client role.", "Users associated with this client can see publisher deal offers\nin the Marketplace.\nThey can neither negotiate proposals nor approve deals.\nIf this client is visible to publishers, they can send deal proposals\nto this client.", "Users associated with this client can respond to deal proposals\nsent to them by publishers. They can also initiate deal proposals\nof their own.", "Users associated with this client can approve eligible deals\non your behalf. Some deals may still explicitly require publisher\nfinalization. If this role is not selected, the sponsor buyer\nwill need to manually approve each of their deals." - ], - "type": "string" + ] }, - "clientName": { - "description": "Name used to represent this client to publishers.\nYou may have multiple clients that map to the same entity,\nbut for each client the combination of `clientName` and entity\nmust be unique.\nYou can specify this field as empty.", + "visibleToSeller": { + "description": "Whether the client buyer will be visible to sellers.", + "type": "boolean" + }, + "entityId": { + "description": "Numerical identifier of the client entity.\nThe entity can be an advertiser, a brand, or an agency.\nThis identifier is unique among all the entities with the same type.\n\nA list of all known advertisers with their identifiers is available in the\n[advertisers.txt](https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt)\nfile.\n\nA list of all known brands with their identifiers is available in the\n[brands.txt](https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt)\nfile.\n\nA list of all known agencies with their identifiers is available in the\n[agencies.txt](https://storage.googleapis.com/adx-rtb-dictionaries/agencies.txt)\nfile.", + "format": "int64", "type": "string" }, "clientAccountId": { "description": "The globally-unique numerical ID of the client.\nThe value of this field is ignored in create and update operations.", - "type": "string", - "format": "int64" - }, - "entityId": { - "description": "Numerical identifier of the client entity.\nThe entity can be an advertiser, a brand, or an agency.\nThis identifier is unique among all the entities with the same type.\n\nA list of all known advertisers with their identifiers is available in the\n[advertisers.txt](https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt)\nfile.\n\nA list of all known brands with their identifiers is available in the\n[brands.txt](https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt)\nfile.\n\nA list of all known agencies with their identifiers is available in the\n[agencies.txt](https://storage.googleapis.com/adx-rtb-dictionaries/agencies.txt)\nfile.", - "type": "string", - "format": "int64" + "format": "int64", + "type": "string" }, "entityName": { "description": "The name of the entity. This field is automatically fetched based on\nthe type and ID.\nThe value of this field is ignored in create and update operations.", "type": "string" + }, + "status": { + "enum": [ + "CLIENT_STATUS_UNSPECIFIED", + "DISABLED", + "ACTIVE" + ], + "description": "The status of the client buyer.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined client status.", + "A client that is currently disabled.", + "A client that is currently active." + ] + }, + "entityType": { + "description": "The type of the client entity: `ADVERTISER`, `BRAND`, or `AGENCY`.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined client entity type. Should not be used.", + "An advertiser.", + "A brand.", + "An advertising agency." + ], + "enum": [ + "ENTITY_TYPE_UNSPECIFIED", + "ADVERTISER", + "BRAND", + "AGENCY" + ] } }, - "id": "Client" + "id": "Client", + "description": "A client resource represents a client buyer—an agency,\na brand, or an advertiser customer of the sponsor buyer.\nUsers associated with the client buyer have restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the client buyer.\nAll fields are required unless otherwise specified.", + "type": "object" + }, + "Correction": { + "description": "@OutputOnly Shows any corrections that were applied to this creative.", + "type": "object", + "properties": { + "details": { + "description": "Additional details about what was corrected.", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "enumDescriptions": [ + "The correction type is unknown. Refer to the details for more information.", + "The ad's declared vendors did not match the vendors that were detected.\nThe detected vendors were added.", + "The ad had the SSL attribute declared but was not SSL-compliant.\nThe SSL attribute was removed.", + "The ad was declared as Flash-free but contained Flash, so the Flash-free\nattribute was removed.", + "The ad was not declared as Flash-free but it did not reference any flash\ncontent, so the Flash-free attribute was added.", + "The ad did not declare a required creative attribute.\nThe attribute was added.", + "The ad did not declare a required technology vendor.\nThe technology vendor was added.", + "The ad did not declare the SSL attribute but was SSL-compliant, so the\nSSL attribute was added.", + "Properties consistent with In-banner video were found, so an\nIn-Banner Video attribute was added.", + "The ad makes calls to the MRAID API so the MRAID attribute was added.", + "The ad unnecessarily declared the Flash attribute, so the Flash attribute\nwas removed.", + "The ad contains video content." + ], + "enum": [ + "CORRECTION_TYPE_UNSPECIFIED", + "VENDOR_IDS_ADDED", + "SSL_ATTRIBUTE_REMOVED", + "FLASH_FREE_ATTRIBUTE_REMOVED", + "FLASH_FREE_ATTRIBUTE_ADDED", + "REQUIRED_ATTRIBUTE_ADDED", + "REQUIRED_VENDOR_ADDED", + "SSL_ATTRIBUTE_ADDED", + "IN_BANNER_VIDEO_ATTRIBUTE_ADDED", + "MRAID_ATTRIBUTE_ADDED", + "FLASH_ATTRIBUTE_REMOVED", + "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" + ], + "description": "The type of correction that was applied to the creative.", + "type": "string" + }, + "contexts": { + "description": "The contexts for the correction.", + "type": "array", + "items": { + "$ref": "ServingContext" + } + } + }, + "id": "Correction" + }, + "AddDealAssociationRequest": { + "description": "A request for associating a deal and a creative.", + "type": "object", + "properties": { + "association": { + "$ref": "CreativeDealAssociation", + "description": "The association between a creative and a deal that should be added." + } + }, + "id": "AddDealAssociationRequest" + }, + "ListDealAssociationsResponse": { + "description": "A response for listing creative and deal associations", + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "A token to retrieve the next page of results.\nPass this value in the\nListDealAssociationsRequest.page_token\nfield in the subsequent call to 'ListDealAssociation' method to retrieve\nthe next page of results." + }, + "associations": { + "description": "The list of associations.", + "type": "array", + "items": { + "$ref": "CreativeDealAssociation" + } + } + }, + "id": "ListDealAssociationsResponse" + }, + "StopWatchingCreativeRequest": { + "description": "A request for stopping notifications for changes to creative Status.", + "type": "object", + "properties": {}, + "id": "StopWatchingCreativeRequest" + }, + "Disapproval": { + "id": "Disapproval", + "description": "@OutputOnly The reason and details for a disapproval.", + "type": "object", + "properties": { + "details": { + "description": "Additional details about the reason for disapproval.", + "type": "array", + "items": { + "type": "string" + } + }, + "reason": { + "enumDescriptions": [ + "The length of the image animation is longer than allowed.", + "The click through URL doesn't work properly.", + "Something is wrong with the creative itself.", + "The ad makes a fourth party call to an unapproved vendor.", + "The ad targets consumers using remarketing lists and/or collects\ndata for subsequent use in retargeting, but does not correctly declare\nthat use.", + "Clicking on the ad leads to an error page.", + "The ad size when rendered does not match the declaration.", + "Ads with a white background require a border, which was missing.", + "The creative attempts to set cookies from a fourth party that is not\ncertified.", + "The creative sets an LSO object.", + "The ad serves a blank.", + "The ad uses rotation, but not all destination URLs were declared.", + "There is a problem with the way the click macro is used.", + "The ad technology declaration is not accurate.", + "The actual destination URL does not match the declared destination URL.", + "The declared expanding direction does not match the actual direction.", + "The ad does not expand in a supported direction.", + "The ad uses an expandable vendor that is not supported.", + "There was an issue with the expandable ad.", + "The ad uses a video vendor that is not supported.", + "The length of the video ad is not supported.", + "The format of the video ad is not supported.", + "There was an issue with the video ad.", + "The landing page does not conform to Ad Exchange policy.", + "The ad or the landing page may contain malware.", + "The ad contains adult images or video content.", + "The ad contains text that is unclear or inaccurate.", + "The ad promotes counterfeit designer goods.", + "The ad causes a popup window to appear.", + "The creative does not follow policies set for the RTB protocol.", + "The ad contains a URL that uses a numeric IP address for the domain.", + "The ad or landing page contains unacceptable content because it initiated\na software or executable download.", + "The ad set an unauthorized cookie on a Google domain.", + "Flash content found when no flash was declared.", + "SSL support declared but not working correctly.", + "Rich Media - Direct Download in Ad (ex. PDF download).", + "Maximum download size exceeded.", + "Bad Destination URL: Site Not Crawlable.", + "Bad URL: Legal disapproval.", + "Pharmaceuticals, Gambling, Alcohol not allowed and at least one was\ndetected.", + "Dynamic DNS at Destination URL.", + "Poor Image / Video Quality.", + "For example, Image Trick to Click.", + "Incorrect Image Layout.", + "Irrelevant Image / Video.", + "Broken back button.", + "Misleading/Inaccurate claims in ads.", + "Restricted Products.", + "Unacceptable content. For example, malware.", + "The ad automatically redirects to the destination site without a click,\nor reports a click when none were made.", + "The ad uses URL protocols that do not exist or are not allowed on AdX.", + "Restricted content (for example, alcohol) was found in the ad but not\ndeclared.", + "Violation of the remarketing list policy.", + "The destination site's robot.txt file prevents it from being crawled.", + "Click to download must link to an app.", + "A review extension must be an accurate review.", + "Sexually explicit content.", + "The ad tries to gain an unfair traffic advantage.", + "The ad tries to circumvent Google's advertising systems.", + "The ad promotes dangerous knives.", + "The ad promotes explosives.", + "The ad promotes guns & parts.", + "The ad promotes recreational drugs/services & related equipment.", + "The ad promotes tobacco products/services & related equipment.", + "The ad promotes weapons.", + "The ad is unclear or irrelevant to the destination site.", + "The ad does not meet professional standards.", + "The promotion is unnecessarily difficult to navigate.", + "Violation of Google's policy for interest-based ads.", + "Misuse of personal information.", + "Omission of relevant information.", + "Unavailable promotions.", + "Misleading or unrealistic promotions.", + "Offensive or inappropriate content.", + "Capitalizing on sensitive events.", + "Shocking content.", + "Products & Services that enable dishonest behavior.", + "The ad does not meet technical requirements.", + "Restricted political content.", + "Unsupported content.", + "Invalid bidding method.", + "Video length exceeds limits.", + "Unacceptable content: Japanese healthcare.", + "Online pharmacy ID required.", + "Unacceptable content: Abortion.", + "Unacceptable content: Birth control.", + "Restricted in China.", + "Unacceptable content: Korean healthcare.", + "Non-family safe or adult content.", + "Clinical trial recruitment.", + "Maximum number of HTTP calls exceeded.", + "Maximum number of cookies exceeded.", + "Financial service ad does not adhere to specifications.", + "Flash content was found in an unsupported context." + ], + "enum": [ + "LENGTH_OF_IMAGE_ANIMATION", + "BROKEN_URL", + "MEDIA_NOT_FUNCTIONAL", + "INVALID_FOURTH_PARTY_CALL", + "INCORRECT_REMARKETING_DECLARATION", + "LANDING_PAGE_ERROR", + "AD_SIZE_DOES_NOT_MATCH_AD_SLOT", + "NO_BORDER", + "FOURTH_PARTY_BROWSER_COOKIES", + "LSO_OBJECTS", + "BLANK_CREATIVE", + "DESTINATION_URLS_UNDECLARED", + "PROBLEM_WITH_CLICK_MACRO", + "INCORRECT_AD_TECHNOLOGY_DECLARATION", + "INCORRECT_DESTINATION_URL_DECLARATION", + "EXPANDABLE_INCORRECT_DIRECTION", + "EXPANDABLE_DIRECTION_NOT_SUPPORTED", + "EXPANDABLE_INVALID_VENDOR", + "EXPANDABLE_FUNCTIONALITY", + "VIDEO_INVALID_VENDOR", + "VIDEO_UNSUPPORTED_LENGTH", + "VIDEO_UNSUPPORTED_FORMAT", + "VIDEO_FUNCTIONALITY", + "LANDING_PAGE_DISABLED", + "MALWARE_SUSPECTED", + "ADULT_IMAGE_OR_VIDEO", + "INACCURATE_AD_TEXT", + "COUNTERFEIT_DESIGNER_GOODS", + "POP_UP", + "INVALID_RTB_PROTOCOL_USAGE", + "RAW_IP_ADDRESS_IN_SNIPPET", + "UNACCEPTABLE_CONTENT_SOFTWARE", + "UNAUTHORIZED_COOKIE_ON_GOOGLE_DOMAIN", + "UNDECLARED_FLASH_OBJECTS", + "INVALID_SSL_DECLARATION", + "DIRECT_DOWNLOAD_IN_AD", + "MAXIMUM_DOWNLOAD_SIZE_EXCEEDED", + "DESTINATION_URL_SITE_NOT_CRAWLABLE", + "BAD_URL_LEGAL_DISAPPROVAL", + "PHARMA_GAMBLING_ALCOHOL_NOT_ALLOWED", + "DYNAMIC_DNS_AT_DESTINATION_URL", + "POOR_IMAGE_OR_VIDEO_QUALITY", + "UNACCEPTABLE_IMAGE_CONTENT", + "INCORRECT_IMAGE_LAYOUT", + "IRRELEVANT_IMAGE_OR_VIDEO", + "DESTINATION_SITE_DOES_NOT_ALLOW_GOING_BACK", + "MISLEADING_CLAIMS_IN_AD", + "RESTRICTED_PRODUCTS", + "UNACCEPTABLE_CONTENT", + "AUTOMATED_AD_CLICKING", + "INVALID_URL_PROTOCOL", + "UNDECLARED_RESTRICTED_CONTENT", + "INVALID_REMARKETING_LIST_USAGE", + "DESTINATION_SITE_NOT_CRAWLABLE_ROBOTS_TXT", + "CLICK_TO_DOWNLOAD_NOT_AN_APP", + "INACCURATE_REVIEW_EXTENSION", + "SEXUALLY_EXPLICIT_CONTENT", + "GAINING_AN_UNFAIR_ADVANTAGE", + "GAMING_THE_GOOGLE_NETWORK", + "DANGEROUS_PRODUCTS_KNIVES", + "DANGEROUS_PRODUCTS_EXPLOSIVES", + "DANGEROUS_PRODUCTS_GUNS", + "DANGEROUS_PRODUCTS_DRUGS", + "DANGEROUS_PRODUCTS_TOBACCO", + "DANGEROUS_PRODUCTS_WEAPONS", + "UNCLEAR_OR_IRRELEVANT_AD", + "PROFESSIONAL_STANDARDS", + "DYSFUNCTIONAL_PROMOTION", + "INVALID_INTEREST_BASED_AD", + "MISUSE_OF_PERSONAL_INFORMATION", + "OMISSION_OF_RELEVANT_INFORMATION", + "UNAVAILABLE_PROMOTIONS", + "MISLEADING_PROMOTIONS", + "INAPPROPRIATE_CONTENT", + "SENSITIVE_EVENTS", + "SHOCKING_CONTENT", + "ENABLING_DISHONEST_BEHAVIOR", + "TECHNICAL_REQUIREMENTS", + "RESTRICTED_POLITICAL_CONTENT", + "UNSUPPORTED_CONTENT", + "INVALID_BIDDING_METHOD", + "VIDEO_TOO_LONG", + "VIOLATES_JAPANESE_PHARMACY_LAW", + "UNACCREDITED_PET_PHARMACY", + "ABORTION", + "CONTRACEPTIVES", + "NEED_CERTIFICATES_TO_ADVERTISE_IN_CHINA", + "KCDSP_REGISTRATION", + "NOT_FAMILY_SAFE", + "CLINICAL_TRIAL_RECRUITMENT", + "MAXIMUM_NUMBER_OF_HTTP_CALLS_EXCEEDED", + "MAXIMUM_NUMBER_OF_COOKIES_EXCEEDED", + "PERSONAL_LOANS", + "UNSUPPORTED_FLASH_CONTENT" + ], + "description": "The categorized reason for disapproval.", + "type": "string" + } + } + }, + "ServingRestriction": { + "description": "@OutputOnly A representation of the status of an ad in a\nspecific context. A context here relates to where something ultimately serves\n(for example, a user or publisher geo, a platform, an HTTPS vs HTTP request,\nor the type of auction).", + "type": "object", + "properties": { + "disapprovalReasons": { + "description": "Any disapprovals bound to this restriction.\nOnly present if status=DISAPPROVED.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "array", + "items": { + "$ref": "Disapproval" + } + }, + "contexts": { + "description": "The contexts for the restriction.", + "type": "array", + "items": { + "$ref": "ServingContext" + } + }, + "status": { + "enumDescriptions": [ + "The status is not known.", + "The ad was disapproved in this context.", + "The ad is pending review in this context." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "DISAPPROVAL", + "PENDING_REVIEW" + ], + "description": "The status of the creative in this context (for example, it has been\nexplicitly disapproved or is pending review).", + "type": "string" + } + }, + "id": "ServingRestriction" + }, + "Date": { + "type": "object", + "properties": { + "year": { + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "format": "int32", + "type": "integer" + }, + "day": { + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of year. Must be from 1 to 12.", + "format": "int32", + "type": "integer" + } + }, + "id": "Date", + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`." + }, + "Empty": { + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {} + }, + "WatchCreativeRequest": { + "description": "A request for watching changes to creative Status.", + "type": "object", + "properties": { + "topic": { + "description": "The Pub/Sub topic to publish notifications to.\nThis topic must already exist and must give permission to\nad-exchange-buyside-reports@google.com to write to the topic.\nThis should be the full resource name in\n\"projects/{project_id}/topics/{topic_id}\" format.", + "type": "string" + } + }, + "id": "WatchCreativeRequest" + }, + "AppContext": { + "description": "@OutputOnly The app type the restriction applies to for mobile device.", + "type": "object", + "properties": { + "appTypes": { + "description": "The app types this restriction applies to.", + "type": "array", + "items": { + "enum": [ + "NATIVE", + "WEB" + ], + "type": "string" + }, + "enumDescriptions": [ + "Native app context.", + "Mobile web app context." + ] + } + }, + "id": "AppContext" + }, + "NativeContent": { + "description": "Native content for a creative.", + "type": "object", + "properties": { + "storeUrl": { + "description": "The URL to the app store to purchase/download the promoted app.", + "type": "string" + }, + "headline": { + "description": "A short title for the ad.", + "type": "string" + }, + "appIcon": { + "$ref": "Image", + "description": "The app icon, for app download ads." + }, + "callToAction": { + "description": "A label for the button that the user is supposed to click.", + "type": "string" + }, + "body": { + "description": "A long description of the ad.", + "type": "string" + }, + "starRating": { + "description": "The app rating in the app store. Must be in the range [0-5].", + "format": "double", + "type": "number" + }, + "videoUrl": { + "description": "The URL to fetch a native video ad.", + "type": "string" + }, + "clickLinkUrl": { + "description": "The URL that the browser/SDK will load when the user clicks the ad.", + "type": "string" + }, + "logo": { + "description": "A smaller image, for the advertiser's logo.", + "$ref": "Image" + }, + "priceDisplayText": { + "description": "The price of the promoted app including currency info.", + "type": "string" + }, + "clickTrackingUrl": { + "type": "string", + "description": "The URL to use for click tracking." + }, + "image": { + "$ref": "Image", + "description": "A large image." + }, + "advertiserName": { + "description": "The name of the advertiser or sponsor, to be displayed in the ad creative.", + "type": "string" + } + }, + "id": "NativeContent" }, "ListClientsResponse": { "type": "object", @@ -597,113 +1802,190 @@ } }, "id": "ListClientsResponse" + }, + "SecurityContext": { + "id": "SecurityContext", + "description": "@OutputOnly A security context.", + "type": "object", + "properties": { + "securities": { + "description": "The security types in this context.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "INSECURE", + "SSL" + ] + }, + "enumDescriptions": [ + "Matches impressions that require insecure compatibility.", + "Matches impressions that require SSL compatibility." + ] + } + } + }, + "HtmlContent": { + "properties": { + "height": { + "description": "The height of the HTML snippet in pixels.", + "format": "int32", + "type": "integer" + }, + "width": { + "description": "The width of the HTML snippet in pixels.", + "format": "int32", + "type": "integer" + }, + "snippet": { + "description": "The HTML snippet that displays the ad when inserted in the web page.", + "type": "string" + } + }, + "id": "HtmlContent", + "description": "HTML content for a creative.", + "type": "object" + }, + "ListCreativesResponse": { + "description": "A response for listing creatives.", + "type": "object", + "properties": { + "creatives": { + "description": "The list of creatives.", + "type": "array", + "items": { + "$ref": "Creative" + } + }, + "nextPageToken": { + "type": "string", + "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativesRequest.page_token\nfield in the subsequent call to `ListCreatives` method to retrieve the next\npage of results." + } + }, + "id": "ListCreativesResponse" + }, + "ServingContext": { + "description": "The serving context for this restriction.", + "type": "object", + "properties": { + "location": { + "description": "Matches impressions coming from users *or* publishers in a specific\nlocation.", + "$ref": "LocationContext" + }, + "auctionType": { + "description": "Matches impressions for a particular auction type.", + "$ref": "AuctionContext" + }, + "all": { + "enumDescriptions": [ + "A simple context." + ], + "enum": [ + "SIMPLE_CONTEXT" + ], + "description": "Matches all contexts.", + "type": "string" + }, + "appType": { + "description": "Matches impressions for a particular app type.", + "$ref": "AppContext" + }, + "securityType": { + "description": "Matches impressions for a particular security type.", + "$ref": "SecurityContext" + }, + "platform": { + "description": "Matches impressions coming from a particular platform.", + "$ref": "PlatformContext" + } + }, + "id": "ServingContext" + }, + "Image": { + "id": "Image", + "description": "An image resource. You may provide a larger image than was requested,\nso long as the aspect ratio is preserved.", + "type": "object", + "properties": { + "width": { + "description": "Image width in pixels.", + "format": "int32", + "type": "integer" + }, + "url": { + "type": "string", + "description": "The URL of the image." + }, + "height": { + "description": "Image height in pixels.", + "format": "int32", + "type": "integer" + } + } + }, + "Reason": { + "description": "A specific filtering status and how many times it occurred.", + "type": "object", + "properties": { + "count": { + "description": "The number of times the creative was filtered for the status. The\ncount is aggregated across all publishers on the exchange.", + "format": "int64", + "type": "string" + }, + "status": { + "type": "integer", + "description": "The filtering status code. Please refer to the\n[creative-status-codes.txt](https://storage.googleapis.com/adx-rtb-dictionaries/creative-status-codes.txt)\nfile for different statuses.", + "format": "int32" + } + }, + "id": "Reason" + }, + "VideoContent": { + "description": "Video content for a creative.", + "type": "object", + "properties": { + "videoUrl": { + "description": "The URL to fetch a video ad.", + "type": "string" + } + }, + "id": "VideoContent" + }, + "ClientUserInvitation": { + "description": "An invitation for a new client user to get access to the Ad Exchange\nBuyer UI.\nAll fields are required unless otherwise specified.", + "type": "object", + "properties": { + "clientAccountId": { + "description": "Numerical account ID of the client buyer\nthat the invited user is associated with.\nThe value of this field is ignored in create operations.", + "format": "int64", + "type": "string" + }, + "invitationId": { + "description": "The unique numerical ID of the invitation that is sent to the user.\nThe value of this field is ignored in create operations.", + "format": "int64", + "type": "string" + }, + "email": { + "description": "The email address to which the invitation is sent. Email\naddresses should be unique among all client users under each sponsor\nbuyer.", + "type": "string" + } + }, + "id": "ClientUserInvitation" } }, - "revision": "20161208", - "basePath": "", + "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", "canonicalName": "AdExchangeBuyerII", - "discoveryVersion": "v1", - "baseUrl": "https://adexchangebuyer.googleapis.com/", - "name": "adexchangebuyer2", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/adexchange.buyer": { + "description": "Manage your Ad Exchange buyer account configuration" + } + } } }, - "documentationLink": "https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v2beta1", - "rootUrl": "https://adexchangebuyer.googleapis.com/", - "kind": "discovery#restDescription" + "rootUrl": "https://adexchangebuyer.googleapis.com/" } diff --git a/etc/api/adexchangeseller/v1.1/adexchangeseller-api.json b/etc/api/adexchangeseller/v1.1/adexchangeseller-api.json index f8fb3a7ec3..e2032b9caf 100644 --- a/etc/api/adexchangeseller/v1.1/adexchangeseller-api.json +++ b/etc/api/adexchangeseller/v1.1/adexchangeseller-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/Dz_LMqDcbtnyBd4CwnrsbswCFU4\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Dz_LMqDcbtnyBd4CwnrsbswCFU4\"", "discoveryVersion": "v1", "id": "adexchangeseller:v1.1", "name": "adexchangeseller", diff --git a/etc/api/adexchangeseller/v1/adexchangeseller-api.json b/etc/api/adexchangeseller/v1/adexchangeseller-api.json index 1756f6b130..bed2ec9cef 100644 --- a/etc/api/adexchangeseller/v1/adexchangeseller-api.json +++ b/etc/api/adexchangeseller/v1/adexchangeseller-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/EberIAMM9RntL16aqUh0FmyQxWY\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/EberIAMM9RntL16aqUh0FmyQxWY\"", "discoveryVersion": "v1", "id": "adexchangeseller:v1", "name": "adexchangeseller", diff --git a/etc/api/adexchangeseller/v2.0/adexchangeseller-api.json b/etc/api/adexchangeseller/v2.0/adexchangeseller-api.json index 495e492bc8..cc30a1ea58 100644 --- a/etc/api/adexchangeseller/v2.0/adexchangeseller-api.json +++ b/etc/api/adexchangeseller/v2.0/adexchangeseller-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/1XDufO4826VKTkrV2WU9EmKApiQ\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/1XDufO4826VKTkrV2WU9EmKApiQ\"", "discoveryVersion": "v1", "id": "adexchangeseller:v2.0", "name": "adexchangeseller", diff --git a/etc/api/admin/datatransfer_v1/admin-api.json b/etc/api/admin/datatransfer_v1/admin-api.json index cf4d5f0d62..085b196376 100644 --- a/etc/api/admin/datatransfer_v1/admin-api.json +++ b/etc/api/admin/datatransfer_v1/admin-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/69RNEuIs-2cMvhRHgpkaoTAmcFU\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/69RNEuIs-2cMvhRHgpkaoTAmcFU\"", "discoveryVersion": "v1", "id": "admin:datatransfer_v1", "name": "admin", diff --git a/etc/api/admin/directory_v1/admin-api.json b/etc/api/admin/directory_v1/admin-api.json index 5bc2dea77c..ad22207d51 100644 --- a/etc/api/admin/directory_v1/admin-api.json +++ b/etc/api/admin/directory_v1/admin-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/MJXmm78_R4W8L6tex9cqkPyvKmM\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Hgzlsu38y56tOKi_wO3_mjV37MM\"", "discoveryVersion": "v1", "id": "admin:directory_v1", "name": "admin", "canonicalName": "directory", "version": "directory_v1", - "revision": "20161124", + "revision": "20170419", "title": "Admin Directory API", "description": "The Admin SDK Directory API lets you view and manage enterprise resources such as users and groups, administrative notifications, security features, and more.", "ownerDomain": "google.com", @@ -462,7 +462,7 @@ }, "lastSync": { "type": "string", - "description": "Date and time the device was last synchronized with the policy settings in the Google Apps administrator control panel (Read-only)", + "description": "Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only)", "format": "date-time" }, "macAddress": { @@ -603,7 +603,7 @@ }, "id": { "type": "string", - "description": "The unique ID for the customer's Google account. (Readonly)" + "description": "The unique ID for the customer's G Suite account. (Readonly)" }, "kind": { "type": "string", @@ -1041,7 +1041,7 @@ }, "firstSync": { "type": "string", - "description": "Date and time the device was first synchronized with the policy settings in the Google Apps administrator control panel (Read-only)", + "description": "Date and time the device was first synchronized with the policy settings in the G Suite administrator control panel (Read-only)", "format": "date-time" }, "hardware": { @@ -1067,7 +1067,7 @@ }, "lastSync": { "type": "string", - "description": "Date and time the device was last synchronized with the policy settings in the Google Apps administrator control panel (Read-only)", + "description": "Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only)", "format": "date-time" }, "managedAccountIsOnOwnerProfile": { @@ -1792,7 +1792,7 @@ }, "creationTime": { "type": "string", - "description": "User's Google account creation time. (Read-only)", + "description": "User's G Suite account creation time. (Read-only)", "format": "date-time", "readOnly": true }, @@ -1853,6 +1853,16 @@ "description": "Boolean indicating if the user is delegated admin (Read-only)", "readOnly": true }, + "isEnforcedIn2Sv": { + "type": "boolean", + "description": "Is 2-step verification enforced (Read-only)", + "readOnly": true + }, + "isEnrolledIn2Sv": { + "type": "boolean", + "description": "Is enrolled in 2-step verification (Read-only)", + "readOnly": true + }, "isMailboxSetup": { "type": "boolean", "description": "Is mailbox setup (Read-only)", @@ -1870,6 +1880,9 @@ "format": "date-time", "readOnly": true }, + "locations": { + "type": "any" + }, "name": { "$ref": "UserName", "description": "User's name", @@ -1909,6 +1922,9 @@ "phones": { "type": "any" }, + "posixAccounts": { + "type": "any" + }, "primaryEmail": { "type": "string", "description": "username of User", @@ -1921,6 +1937,9 @@ "relations": { "type": "any" }, + "sshPublicKeys": { + "type": "any" + }, "suspended": { "type": "boolean", "description": "Indicates if user is suspended" @@ -2100,6 +2119,41 @@ } } }, + "UserLocation": { + "id": "UserLocation", + "type": "object", + "description": "JSON template for a location entry.", + "properties": { + "area": { + "type": "string", + "description": "Textual location. This is most useful for display purposes to concisely describe the location. E.g. \"Mountain View, CA\", \"Near Seattle\", \"US-NYC-9TH 9A209A\"." + }, + "buildingId": { + "type": "string", + "description": "Building Identifier." + }, + "customType": { + "type": "string", + "description": "Custom Type." + }, + "deskCode": { + "type": "string", + "description": "Most specific textual code of individual desk location." + }, + "floorName": { + "type": "string", + "description": "Floor name/number." + }, + "floorSection": { + "type": "string", + "description": "Floor Section. More specific location within the floor. E.g. if a floor is divided into sections \"A\", \"B\", and \"C\", this field would identify one of those values." + }, + "type": { + "type": "string", + "description": "Each entry can have a type which indicates standard types of that entry. For example location could be of types default and desk. In addition to standard type, an entry can have a custom type and can give it any name. Such types should have \"custom\" as type and also have a customType value." + } + } + }, "UserMakeAdmin": { "id": "UserMakeAdmin", "type": "object", @@ -2267,6 +2321,47 @@ } } }, + "UserPosixAccount": { + "id": "UserPosixAccount", + "type": "object", + "description": "JSON template for a POSIX account entry. Description of the field family: go/fbs-posix.", + "properties": { + "gecos": { + "type": "string", + "description": "The GECOS (user information) for this account." + }, + "gid": { + "type": "integer", + "description": "The default group ID.", + "format": "int32" + }, + "homeDirectory": { + "type": "string", + "description": "The path to the home directory for this account." + }, + "primary": { + "type": "boolean", + "description": "If this is user's primary account within the SystemId." + }, + "shell": { + "type": "string", + "description": "The path to the login shell for this account." + }, + "systemId": { + "type": "string", + "description": "System identifier for which account Username or Uid apply to." + }, + "uid": { + "type": "integer", + "description": "The POSIX compliant user ID.", + "format": "int32" + }, + "username": { + "type": "string", + "description": "The username of the account." + } + } + }, "UserRelation": { "id": "UserRelation", "type": "object", @@ -2286,6 +2381,27 @@ } } }, + "UserSshPublicKey": { + "id": "UserSshPublicKey", + "type": "object", + "description": "JSON template for a POSIX account entry.", + "properties": { + "expirationTimeUsec": { + "type": "string", + "description": "An expiration time in microseconds since epoch.", + "format": "int64" + }, + "fingerprint": { + "type": "string", + "description": "A SHA-256 fingerprint of the SSH public key. (Read-only)", + "readOnly": true + }, + "key": { + "type": "string", + "description": "An SSH public key." + } + } + }, "UserUndelete": { "id": "UserUndelete", "type": "object", @@ -2516,13 +2632,13 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, "resourceId": { "type": "string", - "description": "Immutable id of Chrome OS Device", + "description": "Immutable ID of Chrome OS Device", "required": true, "location": "path" } @@ -2546,13 +2662,13 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, "deviceId": { "type": "string", - "description": "Immutable id of Chrome OS Device", + "description": "Immutable ID of Chrome OS Device", "required": true, "location": "path" }, @@ -2590,7 +2706,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -2680,13 +2796,13 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, "deviceId": { "type": "string", - "description": "Immutable id of Chrome OS Device", + "description": "Immutable ID of Chrome OS Device", "required": true, "location": "path" }, @@ -2726,13 +2842,13 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, "deviceId": { "type": "string", - "description": "Immutable id of Chrome OS Device", + "description": "Immutable ID of Chrome OS Device", "required": true, "location": "path" }, @@ -2856,7 +2972,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -2883,7 +2999,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -2914,7 +3030,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" } @@ -2940,7 +3056,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -2973,7 +3089,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -3000,7 +3116,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -3031,7 +3147,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" } @@ -3057,7 +3173,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" } @@ -3144,7 +3260,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain.", + "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain.", "location": "query" }, "domain": { @@ -3529,13 +3645,13 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, "resourceId": { "type": "string", - "description": "Immutable id of Mobile Device", + "description": "Immutable ID of Mobile Device", "required": true, "location": "path" } @@ -3560,13 +3676,13 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, "resourceId": { "type": "string", - "description": "Immutable id of Mobile Device", + "description": "Immutable ID of Mobile Device", "required": true, "location": "path" } @@ -3587,7 +3703,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -3606,7 +3722,7 @@ }, "resourceId": { "type": "string", - "description": "Immutable id of Mobile Device", + "description": "Immutable ID of Mobile Device", "required": true, "location": "path" } @@ -3632,7 +3748,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -3729,7 +3845,7 @@ "parameters": { "customer": { "type": "string", - "description": "The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource.", + "description": "The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.", "required": true, "location": "path" }, @@ -3756,7 +3872,7 @@ "parameters": { "customer": { "type": "string", - "description": "The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource.", + "description": "The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.", "required": true, "location": "path" }, @@ -3786,7 +3902,7 @@ "parameters": { "customer": { "type": "string", - "description": "The unique ID for the customer's Google account.", + "description": "The unique ID for the customer's G Suite account.", "required": true, "location": "path" }, @@ -3825,7 +3941,7 @@ "parameters": { "customer": { "type": "string", - "description": "The unique ID for the customer's Google account.", + "description": "The unique ID for the customer's G Suite account.", "required": true, "location": "path" }, @@ -3858,7 +3974,7 @@ "parameters": { "customer": { "type": "string", - "description": "The unique ID for the customer's Google account.", + "description": "The unique ID for the customer's G Suite account.", "required": true, "location": "path" }, @@ -3895,7 +4011,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -3923,7 +4039,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -3955,7 +4071,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" } @@ -3981,7 +4097,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -4024,7 +4140,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -4058,7 +4174,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -4096,7 +4212,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" } @@ -4132,7 +4248,7 @@ }, "customer": { "type": "string", - "description": "The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", "required": true, "location": "path" } @@ -4159,7 +4275,7 @@ }, "customer": { "type": "string", - "description": "The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", "required": true, "location": "path" } @@ -4184,7 +4300,7 @@ "parameters": { "customer": { "type": "string", - "description": "The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", "required": true, "location": "path" } @@ -4210,7 +4326,7 @@ "parameters": { "customer": { "type": "string", - "description": "The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", "required": true, "location": "path" }, @@ -4253,7 +4369,7 @@ }, "customer": { "type": "string", - "description": "The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", "required": true, "location": "path" } @@ -4286,7 +4402,7 @@ }, "customer": { "type": "string", - "description": "The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", + "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.", "required": true, "location": "path" } @@ -4319,7 +4435,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -4346,7 +4462,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -4377,7 +4493,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" } @@ -4403,7 +4519,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -4454,7 +4570,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -4481,7 +4597,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -4512,7 +4628,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" } @@ -4538,7 +4654,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable id of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -4575,7 +4691,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -4608,7 +4724,7 @@ "parameters": { "customer": { "type": "string", - "description": "Immutable ID of the Google Apps account.", + "description": "Immutable ID of the G Suite account.", "required": true, "location": "path" }, @@ -4645,7 +4761,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -4672,7 +4788,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -4703,7 +4819,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" } @@ -4729,7 +4845,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" } @@ -4753,7 +4869,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -4786,7 +4902,7 @@ "parameters": { "customerId": { "type": "string", - "description": "Immutable id of the Google Apps account", + "description": "Immutable ID of the G Suite account", "required": true, "location": "path" }, @@ -5006,7 +5122,7 @@ }, "customer": { "type": "string", - "description": "Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.", + "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.", "location": "query" }, "domain": { @@ -5235,7 +5351,7 @@ }, "customer": { "type": "string", - "description": "Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.", + "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.", "location": "query" }, "domain": { diff --git a/etc/api/admin/reports_v1/admin-api.json b/etc/api/admin/reports_v1/admin-api.json index 343d128410..6d41b826d6 100644 --- a/etc/api/admin/reports_v1/admin-api.json +++ b/etc/api/admin/reports_v1/admin-api.json @@ -1,14 +1,14 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/QGy4Wv90L7XHcKxA0VDj0fNkDc0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/-tkaOVzArVVhbxGreMOY21mRaV8\"", "discoveryVersion": "v1", "id": "admin:reports_v1", "name": "admin", "canonicalName": "reports", "version": "reports_v1", - "revision": "20160704", + "revision": "20170320", "title": "Admin Reports API", - "description": "Fetches reports for the administrators of Google Apps customers about the usage, collaboration, security, and risk for their users.", + "description": "Fetches reports for the administrators of G Suite customers about the usage, collaboration, security, and risk for their users.", "ownerDomain": "google.com", "ownerName": "Google", "packagePath": "admin", @@ -72,10 +72,10 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/admin.reports.audit.readonly": { - "description": "View audit reports of Google Apps for your domain" + "description": "View audit reports for your G Suite domain" }, "https://www.googleapis.com/auth/admin.reports.usage.readonly": { - "description": "View usage reports of Google Apps for your domain" + "description": "View usage reports for your G Suite domain" } } } @@ -464,7 +464,7 @@ "type": "string", "description": "Application name for which the events are to be retrieved.", "required": true, - "pattern": "(admin)|(calendar)|(drive)|(login)|(mobile)|(token)|(groups)|(saml)", + "pattern": "(admin)|(calendar)|(drive)|(login)|(mobile)|(token)|(groups)|(saml)|(chat)", "location": "path" }, "customerId": { @@ -475,7 +475,7 @@ }, "endTime": { "type": "string", - "description": "Return events which occured at or before this time.", + "description": "Return events which occurred at or before this time.", "pattern": "(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d):(\\d\\d)(?:\\.(\\d+))?(?:(Z)|([-+])(\\d\\d):(\\d\\d))", "location": "query" }, @@ -505,7 +505,7 @@ }, "startTime": { "type": "string", - "description": "Return events which occured at or after this time.", + "description": "Return events which occurred at or after this time.", "pattern": "(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d):(\\d\\d)(?:\\.(\\d+))?(?:(Z)|([-+])(\\d\\d):(\\d\\d))", "location": "query" }, @@ -543,7 +543,7 @@ "type": "string", "description": "Application name for which the events are to be retrieved.", "required": true, - "pattern": "(admin)|(calendar)|(drive)|(login)|(mobile)|(token)|(groups)|(saml)", + "pattern": "(admin)|(calendar)|(drive)|(login)|(mobile)|(token)|(groups)|(saml)|(chat)", "location": "path" }, "customerId": { @@ -554,7 +554,7 @@ }, "endTime": { "type": "string", - "description": "Return events which occured at or before this time.", + "description": "Return events which occurred at or before this time.", "pattern": "(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d):(\\d\\d)(?:\\.(\\d+))?(?:(Z)|([-+])(\\d\\d):(\\d\\d))", "location": "query" }, @@ -584,7 +584,7 @@ }, "startTime": { "type": "string", - "description": "Return events which occured at or after this time.", + "description": "Return events which occurred at or after this time.", "pattern": "(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d):(\\d\\d)(?:\\.(\\d+))?(?:(Z)|([-+])(\\d\\d):(\\d\\d))", "location": "query" }, @@ -659,7 +659,7 @@ "parameters": { "type": "string", "description": "Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.", - "pattern": "(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)):[^,]+,)*(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)):[^,]+)", + "pattern": "(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[^,]+,)*(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[^,]+)", "location": "query" } }, @@ -699,7 +699,7 @@ "filters": { "type": "string", "description": "Represents the set of filters including parameter operator value.", - "pattern": "(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)):[a-z0-9_]+[\u003c,\u003c=,==,\u003e=,\u003e,!=][^,]+,)*(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)):[a-z0-9_]+[\u003c,\u003c=,==,\u003e=,\u003e,!=][^,]+)", + "pattern": "(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[a-z0-9_]+[\u003c,\u003c=,==,\u003e=,\u003e,!=][^,]+,)*(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[a-z0-9_]+[\u003c,\u003c=,==,\u003e=,\u003e,!=][^,]+)", "location": "query" }, "maxResults": { @@ -717,7 +717,7 @@ "parameters": { "type": "string", "description": "Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.", - "pattern": "(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)):[^,]+,)*(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)):[^,]+)", + "pattern": "(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[^,]+,)*(((accounts)|(classroom)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_management)|(drive)):[^,]+)", "location": "query" }, "userKey": { diff --git a/etc/api/adsense/v1.3/adsense-api.json b/etc/api/adsense/v1.3/adsense-api.json index 4abdb58a01..690783b0de 100644 --- a/etc/api/adsense/v1.3/adsense-api.json +++ b/etc/api/adsense/v1.3/adsense-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/O4Gi4w2H5lck6YfTHArV5gfcJY8\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/uanKyTAp4QKf6HpPDtBARDuiHPc\"", "discoveryVersion": "v1", "id": "adsense:v1.3", "name": "adsense", "canonicalName": "AdSense", "version": "v1.3", - "revision": "20161206", + "revision": "20170517", "title": "AdSense Management API", "description": "Accesses AdSense publishers' inventory and generates performance reports.", "ownerDomain": "google.com", diff --git a/etc/api/adsense/v1.4/adsense-api.json b/etc/api/adsense/v1.4/adsense-api.json index 4ad3d43c98..f4c29a8d11 100644 --- a/etc/api/adsense/v1.4/adsense-api.json +++ b/etc/api/adsense/v1.4/adsense-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/9rW_iSYGkNTcKHQcRbE8edxeIL0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/SYLcZPFITtF3qnr7oH0sREd1ZNs\"", "discoveryVersion": "v1", "id": "adsense:v1.4", "name": "adsense", "canonicalName": "AdSense", "version": "v1.4", - "revision": "20161206", + "revision": "20170517", "title": "AdSense Management API", "description": "Accesses AdSense publishers' inventory and generates performance reports.", "ownerDomain": "google.com", diff --git a/etc/api/adsensehost/v4.1/adsensehost-api.json b/etc/api/adsensehost/v4.1/adsensehost-api.json index a18646ba11..bf60e26cb1 100644 --- a/etc/api/adsensehost/v4.1/adsensehost-api.json +++ b/etc/api/adsensehost/v4.1/adsensehost-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/Lu4otnxJaoGqp6ZeALzdWUnJjmk\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/7o6hFUe6SUm7cHL7vB3J6QdI-Uw\"", "discoveryVersion": "v1", "id": "adsensehost:v4.1", "name": "adsensehost", "canonicalName": "AdSense Host", "version": "v4.1", - "revision": "20161206", + "revision": "20170517", "title": "AdSense Host API", "description": "Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.", "ownerDomain": "google.com", diff --git a/etc/api/analytics/v2.4/analytics-api.json b/etc/api/analytics/v2.4/analytics-api.json index 30c0ec74e2..0e35423a9e 100644 --- a/etc/api/analytics/v2.4/analytics-api.json +++ b/etc/api/analytics/v2.4/analytics-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/cmdroRcoxpGmDDzSn3LW27FM6Ag\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/uF7o_i10s0Ir7WGM7zLi8NwSHXI\"", "discoveryVersion": "v1", "id": "analytics:v2.4", "name": "analytics", "version": "v2.4", - "revision": "20161004", + "revision": "20170321", "title": "Google Analytics API", "description": "Views and manages your Google Analytics data.", "ownerDomain": "google.com", diff --git a/etc/api/analytics/v3/analytics-api.json b/etc/api/analytics/v3/analytics-api.json index 887024ca6b..4bf0619ff5 100644 --- a/etc/api/analytics/v3/analytics-api.json +++ b/etc/api/analytics/v3/analytics-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/CEwIV9fdNgUw9Oy31M8HLJeTPyQ\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/kNCxeHzf8zHSdahaoD4fNF__mRA\"", "discoveryVersion": "v1", "id": "analytics:v3", "name": "analytics", "version": "v3", - "revision": "20161004", + "revision": "20170321", "title": "Google Analytics API", "description": "Views and manages your Google Analytics data.", "ownerDomain": "google.com", @@ -5944,6 +5944,40 @@ }, "remarketingAudience": { "methods": { + "delete": { + "id": "analytics.management.remarketingAudience.delete", + "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}", + "httpMethod": "DELETE", + "description": "Delete a remarketing audience.", + "parameters": { + "accountId": { + "type": "string", + "description": "Account ID to which the remarketing audience belongs.", + "required": true, + "location": "path" + }, + "remarketingAudienceId": { + "type": "string", + "description": "The ID of the remarketing audience to delete.", + "required": true, + "location": "path" + }, + "webPropertyId": { + "type": "string", + "description": "Web property ID to which the remarketing audience belongs.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "accountId", + "webPropertyId", + "remarketingAudienceId" + ], + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, "get": { "id": "analytics.management.remarketingAudience.get", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}", diff --git a/etc/api/analyticsreporting/v4/analyticsreporting-api.json b/etc/api/analyticsreporting/v4/analyticsreporting-api.json index 3cfc263123..08dba54e05 100644 --- a/etc/api/analyticsreporting/v4/analyticsreporting-api.json +++ b/etc/api/analyticsreporting/v4/analyticsreporting-api.json @@ -1,99 +1,264 @@ { + "basePath": "", "id": "analyticsreporting:v4", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/analytics.readonly": { - "description": "View your Google Analytics data" - }, - "https://www.googleapis.com/auth/analytics": { - "description": "View and manage your Google Analytics data" - } - } - } - }, - "description": "Accesses Analytics report data.", - "protocol": "rest", - "title": "Google Analytics Reporting API", - "resources": { - "reports": { - "methods": { - "batchGet": { - "id": "analyticsreporting.reports.batchGet", - "response": { - "$ref": "GetReportsResponse" - }, - "parameterOrder": [], - "description": "Returns the Analytics data.", - "request": { - "$ref": "GetReportsRequest" - }, - "flatPath": "v4/reports:batchGet", - "httpMethod": "POST", - "parameters": {}, - "path": "v4/reports:batchGet", - "scopes": [ - "https://www.googleapis.com/auth/analytics", - "https://www.googleapis.com/auth/analytics.readonly" - ] - } - } - } - }, + "revision": "20170427", + "documentationLink": "https://developers.google.com/analytics/devguides/reporting/core/v4/", + "discoveryVersion": "v1", + "version_module": "True", "schemas": { + "Report": { + "description": "The data response corresponding to the request.", + "type": "object", + "properties": { + "columnHeader": { + "$ref": "ColumnHeader", + "description": "The column headers." + }, + "data": { + "$ref": "ReportData", + "description": "Response data." + }, + "nextPageToken": { + "description": "Page token to retrieve the next page of results in the list.", + "type": "string" + } + }, + "id": "Report" + }, "PivotHeader": { "description": "The headers for each of the pivot sections defined in the request.", "type": "object", "properties": { - "totalPivotGroupsCount": { - "description": "The total number of groups for this pivot.", - "type": "integer", - "format": "int32" - }, "pivotHeaderEntries": { "description": "A single pivot section header.", "type": "array", "items": { "$ref": "PivotHeaderEntry" } + }, + "totalPivotGroupsCount": { + "description": "The total number of groups for this pivot.", + "format": "int32", + "type": "integer" } }, "id": "PivotHeader" }, - "Metric": { - "description": "[Metrics](https://support.google.com/analytics/answer/1033861)\nare the quantitative measurements. For example, the metric `ga:users`\nindicates the total number of users for the requested time period.", + "DateRange": { + "description": "A contiguous set of days: startDate, startDate + 1 day, ..., endDate.\nThe start and end dates are specified in\n[ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.", "type": "object", "properties": { - "alias": { - "description": "An alias for the metric expression is an alternate name for the\nexpression. The alias can be used for filtering and sorting. This field\nis optional and is useful if the expression is not a single metric but\na complex expression which cannot be used in filtering and sorting.\nThe alias is also used in the response column header.", + "startDate": { + "description": "The start date for the query in the format `YYYY-MM-DD`.", "type": "string" }, - "formattingType": { - "description": "Specifies how the metric expression should be formatted, for example\n`INTEGER`.", - "enum": [ - "METRIC_TYPE_UNSPECIFIED", - "INTEGER", - "FLOAT", - "CURRENCY", - "PERCENT", - "TIME" - ], - "enumDescriptions": [ - "Metric type is unspecified.", - "Integer metric.", - "Float metric.", - "Currency metric.", - "Percentage metric.", - "Time metric in `HH:MM:SS` format." - ], - "type": "string" - }, - "expression": { - "description": "A metric expression in the request. An expression is constructed from one\nor more metrics and numbers. Accepted operators include: Plus (+), Minus\n(-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,\nPositive cardinal numbers (0-9), can include decimals and is limited to\n1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the\nmetric expression is just a single metric name like `ga:users`.\nAdding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics\nwill result in unexpected results.", + "endDate": { + "description": "The end date for the query in the format `YYYY-MM-DD`.", "type": "string" } }, - "id": "Metric" + "id": "DateRange" + }, + "ReportRequest": { + "description": "The main request class which specifies the Reporting API request.", + "type": "object", + "properties": { + "pivots": { + "description": "The pivot definitions. Requests can have a maximum of 2 pivots.", + "type": "array", + "items": { + "$ref": "Pivot" + } + }, + "includeEmptyRows": { + "description": "If set to false, the response does not include rows if all the retrieved\nmetrics are equal to zero. The default is false which will exclude these\nrows.", + "type": "boolean" + }, + "metricFilterClauses": { + "description": "The metric filter clauses. They are logically combined with the `AND`\noperator. Metric filters look at only the first date range and not the\ncomparing date range. Note that filtering on metrics occurs after the\nmetrics are aggregated.", + "type": "array", + "items": { + "$ref": "MetricFilterClause" + } + }, + "pageSize": { + "description": "Page size is for paging and specifies the maximum number of returned rows.\nPage size should be \u003e= 0. A query returns the default of 1,000 rows.\nThe Analytics Core Reporting API returns a maximum of 10,000 rows per\nrequest, no matter how many you ask for. It can also return fewer rows\nthan requested, if there aren't as many dimension segments as you expect.\nFor instance, there are fewer than 300 possible values for `ga:country`,\nso when segmenting only by country, you can't get more than 300 rows,\neven if you set `pageSize` to a higher value.", + "format": "int32", + "type": "integer" + }, + "hideTotals": { + "description": "If set to true, hides the total of all metrics for all the matching rows,\nfor every date range. The default false and will return the totals.", + "type": "boolean" + }, + "hideValueRanges": { + "description": "If set to true, hides the minimum and maximum across all matching rows.\nThe default is false and the value ranges are returned.", + "type": "boolean" + }, + "cohortGroup": { + "description": "Cohort group associated with this request. If there is a cohort group\nin the request the `ga:cohort` dimension must be present.\nEvery [ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `cohortGroup` definition.", + "$ref": "CohortGroup" + }, + "filtersExpression": { + "description": "Dimension or metric filters that restrict the data returned for your\nrequest. To use the `filtersExpression`, supply a dimension or metric on\nwhich to filter, followed by the filter expression. For example, the\nfollowing expression selects `ga:browser` dimension which starts with\nFirefox; `ga:browser=~^Firefox`. For more information on dimensions\nand metric filters, see\n[Filters reference](https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters).", + "type": "string" + }, + "viewId": { + "description": "The Analytics\n[view ID](https://support.google.com/analytics/answer/1009618)\nfrom which to retrieve data. Every [ReportRequest](#ReportRequest)\nwithin a `batchGet` method must contain the same `viewId`.", + "type": "string" + }, + "metrics": { + "description": "The metrics requested.\nRequests must specify at least one metric. Requests can have a\ntotal of 10 metrics.", + "type": "array", + "items": { + "$ref": "Metric" + } + }, + "dimensionFilterClauses": { + "description": "The dimension filter clauses for filtering Dimension Values. They are\nlogically combined with the `AND` operator. Note that filtering occurs\nbefore any dimensions are aggregated, so that the returned metrics\nrepresent the total for only the relevant dimensions.", + "type": "array", + "items": { + "$ref": "DimensionFilterClause" + } + }, + "orderBys": { + "description": "Sort order on output rows. To compare two rows, the elements of the\nfollowing are applied in order until a difference is found. All date\nranges in the output get the same row order.", + "type": "array", + "items": { + "$ref": "OrderBy" + } + }, + "segments": { + "description": "Segment the data returned for the request. A segment definition helps look\nat a subset of the segment request. A request can contain up to four\nsegments. Every [ReportRequest](#ReportRequest) within a\n`batchGet` method must contain the same `segments` definition. Requests\nwith segments must have the `ga:segment` dimension.", + "type": "array", + "items": { + "$ref": "Segment" + } + }, + "samplingLevel": { + "description": "The desired report\n[sample](https://support.google.com/analytics/answer/2637192) size.\nIf the the `samplingLevel` field is unspecified the `DEFAULT` sampling\nlevel is used. Every [ReportRequest](#ReportRequest) within a\n`batchGet` method must contain the same `samplingLevel` definition. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\n for details.", + "type": "string", + "enumDescriptions": [ + "If the `samplingLevel` field is unspecified the `DEFAULT` sampling level\nis used.", + "Returns response with a sample size that balances speed and\naccuracy.", + "It returns a fast response with a smaller sampling size.", + "Returns a more accurate response using a large sampling size. But this\nmay result in response being slower." + ], + "enum": [ + "SAMPLING_UNSPECIFIED", + "DEFAULT", + "SMALL", + "LARGE" + ] + }, + "dimensions": { + "description": "The dimensions requested.\nRequests can have a total of 7 dimensions.", + "type": "array", + "items": { + "$ref": "Dimension" + } + }, + "dateRanges": { + "description": "Date ranges in the request. The request can have a maximum of 2 date\nranges. The response will contain a set of metric values for each\ncombination of the dimensions for each date range in the request. So, if\nthere are two date ranges, there will be two set of metric values, one for\nthe original date range and one for the second date range.\nThe `reportRequest.dateRanges` field should not be specified for cohorts\nor Lifetime value requests.\nIf a date range is not provided, the default date range is (startDate:\ncurrent date - 7 days, endDate: current date - 1 day). Every\n[ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `dateRanges` definition.", + "type": "array", + "items": { + "$ref": "DateRange" + } + }, + "pageToken": { + "description": "A continuation token to get the next page of the results. Adding this to\nthe request will return the rows after the pageToken. The pageToken should\nbe the value returned in the nextPageToken parameter in the response to\nthe GetReports request.", + "type": "string" + } + }, + "id": "ReportRequest" + }, + "MetricFilter": { + "description": "MetricFilter specifies the filter on a metric.", + "type": "object", + "properties": { + "metricName": { + "description": "The metric that will be filtered on. A metricFilter must contain a metric\nname. A metric name can be an alias earlier defined as a metric or it can\nalso be a metric expression.", + "type": "string" + }, + "comparisonValue": { + "description": "The value to compare against.", + "type": "string" + }, + "operator": { + "description": "Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the\ncomparisonValue, the default is `EQUAL`. If the operator is\n`IS_MISSING`, checks if the metric is missing and would ignore the\ncomparisonValue.", + "type": "string", + "enumDescriptions": [ + "If the operator is not specified, it is treated as `EQUAL`.", + "Should the value of the metric be exactly equal to the comparison value.", + "Should the value of the metric be less than to the comparison value.", + "Should the value of the metric be greater than to the comparison value.", + "Validates if the metric is missing.\nDoesn't take comparisonValue into account." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "EQUAL", + "LESS_THAN", + "GREATER_THAN", + "IS_MISSING" + ] + }, + "not": { + "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\nmetric values will be excluded in the report. The default is false.", + "type": "boolean" + } + }, + "id": "MetricFilter" + }, + "Dimension": { + "description": "[Dimensions](https://support.google.com/analytics/answer/1033861)\nare attributes of your data. For example, the dimension `ga:city`\nindicates the city, for example, \"Paris\" or \"New York\", from which\na session originates.", + "type": "object", + "properties": { + "histogramBuckets": { + "description": "If non-empty, we place dimension values into buckets after string to\nint64. Dimension values that are not the string representation of an\nintegral value will be converted to zero. The bucket values have to be in\nincreasing order. Each bucket is closed on the lower end, and open on the\nupper end. The \"first\" bucket includes all values less than the first\nboundary, the \"last\" bucket includes all values up to infinity. Dimension\nvalues that fall in a bucket get transformed to a new dimension value. For\nexample, if one gives a list of \"0, 1, 3, 4, 7\", then we return the\nfollowing buckets:\n\n- bucket #1: values \u003c 0, dimension value \"\u003c0\"\n- bucket #2: values in [0,1), dimension value \"0\"\n- bucket #3: values in [1,3), dimension value \"1-2\"\n- bucket #4: values in [3,4), dimension value \"3\"\n- bucket #5: values in [4,7), dimension value \"4-6\"\n- bucket #6: values \u003e= 7, dimension value \"7+\"\n\nNOTE: If you are applying histogram mutation on any dimension, and using\nthat dimension in sort, you will want to use the sort type\n`HISTOGRAM_BUCKET` for that purpose. Without that the dimension values\nwill be sorted according to dictionary\n(lexicographic) order. For example the ascending dictionary order is:\n\n \"\u003c50\", \"1001+\", \"121-1000\", \"50-120\"\n\nAnd the ascending `HISTOGRAM_BUCKET` order is:\n\n \"\u003c50\", \"50-120\", \"121-1000\", \"1001+\"\n\nThe client has to explicitly request `\"orderType\": \"HISTOGRAM_BUCKET\"`\nfor a histogram-mutated dimension.", + "type": "array", + "items": { + "format": "int64", + "type": "string" + } + }, + "name": { + "description": "Name of the dimension to fetch, for example `ga:browser`.", + "type": "string" + } + }, + "id": "Dimension" + }, + "SimpleSegment": { + "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined.", + "type": "object", + "properties": { + "orFiltersForSegment": { + "description": "A list of segment filters groups which are combined with logical `AND`\noperator.", + "type": "array", + "items": { + "$ref": "OrFiltersForSegment" + } + } + }, + "id": "SimpleSegment" + }, + "DynamicSegment": { + "description": "Dynamic segment definition for defining the segment within the request.\nA segment can select users, sessions or both.", + "type": "object", + "properties": { + "sessionSegment": { + "$ref": "SegmentDefinition", + "description": "Session Segment to select sessions to include in the segment." + }, + "name": { + "description": "The name of the dynamic segment.", + "type": "string" + }, + "userSegment": { + "description": "User Segment to select users to include in the segment.", + "$ref": "SegmentDefinition" + } + }, + "id": "DynamicSegment" }, "ColumnHeader": { "description": "Column headers.", @@ -107,30 +272,120 @@ } }, "metricHeader": { - "description": "Metric headers for the metrics in the response.", - "$ref": "MetricHeader" + "$ref": "MetricHeader", + "description": "Metric headers for the metrics in the response." } }, "id": "ColumnHeader" }, - "DynamicSegment": { - "description": "Dynamic segment definition for defining the segment within the request.\nA segment can select users, sessions or both.", + "SegmentFilterClause": { + "description": "Filter Clause to be used in a segment definition, can be wither a metric or\na dimension filter.", "type": "object", "properties": { - "sessionSegment": { - "description": "Session Segment to select sessions to include in the segment.", - "$ref": "SegmentDefinition" + "dimensionFilter": { + "$ref": "SegmentDimensionFilter", + "description": "Dimension Filter for the segment definition." }, - "name": { - "description": "The name of the dynamic segment.", - "type": "string" + "metricFilter": { + "$ref": "SegmentMetricFilter", + "description": "Metric Filter for the segment definition." }, - "userSegment": { - "description": "User Segment to select users to include in the segment.", - "$ref": "SegmentDefinition" + "not": { + "description": "Matches the complement (`!`) of the filter.", + "type": "boolean" } }, - "id": "DynamicSegment" + "id": "SegmentFilterClause" + }, + "MetricFilterClause": { + "description": "Represents a group of metric filters.\nSet the operator value to specify how the filters are logically combined.", + "type": "object", + "properties": { + "operator": { + "enumDescriptions": [ + "Unspecified operator. It is treated as an `OR`.", + "The logical `OR` operator.", + "The logical `AND` operator." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "OR", + "AND" + ], + "description": "The operator for combining multiple metric filters. If unspecified, it is\ntreated as an `OR`.", + "type": "string" + }, + "filters": { + "description": "The repeated set of filters. They are logically combined based on the\noperator specified.", + "type": "array", + "items": { + "$ref": "MetricFilter" + } + } + }, + "id": "MetricFilterClause" + }, + "Cohort": { + "description": "Defines a cohort. A cohort is a group of users who share a common\ncharacteristic. For example, all users with the same acquisition date\nbelong to the same cohort.", + "type": "object", + "properties": { + "type": { + "description": "Type of the cohort. The only supported type as of now is\n`FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated\nas `FIRST_VISIT_DATE` type cohort.", + "type": "string", + "enumDescriptions": [ + "If unspecified it's treated as `FIRST_VISIT_DATE`.", + "Cohorts that are selected based on first visit date." + ], + "enum": [ + "UNSPECIFIED_COHORT_TYPE", + "FIRST_VISIT_DATE" + ] + }, + "name": { + "description": "A unique name for the cohort. If not defined name will be auto-generated\nwith values cohort_[1234...].", + "type": "string" + }, + "dateRange": { + "description": "This is used for `FIRST_VISIT_DATE` cohort, the cohort selects users\nwhose first visit date is between start date and end date defined in the\nDateRange. The date ranges should be aligned for cohort requests. If the\nrequest contains `ga:cohortNthDay` it should be exactly one day long,\nif `ga:cohortNthWeek` it should be aligned to the week boundary (starting\nat Sunday and ending Saturday), and for `ga:cohortNthMonth` the date range\nshould be aligned to the month (starting at the first and ending on the\nlast day of the month).\nFor LTV requests there are no such restrictions.\nYou do not need to supply a date range for the\n`reportsRequest.dateRanges` field.", + "$ref": "DateRange" + } + }, + "id": "Cohort" + }, + "ReportRow": { + "description": "A row in the report.", + "type": "object", + "properties": { + "metrics": { + "description": "List of metrics for each requested DateRange.", + "type": "array", + "items": { + "$ref": "DateRangeValues" + } + }, + "dimensions": { + "description": "List of requested dimensions.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ReportRow" + }, + "OrFiltersForSegment": { + "description": "A list of segment filters in the `OR` group are combined with the logical OR\noperator.", + "type": "object", + "properties": { + "segmentFilterClauses": { + "description": "List of segment filters to be combined with a `OR` operator.", + "type": "array", + "items": { + "$ref": "SegmentFilterClause" + } + } + }, + "id": "OrFiltersForSegment" }, "MetricHeader": { "description": "The headers for the metrics.", @@ -153,594 +408,22 @@ }, "id": "MetricHeader" }, - "Report": { - "description": "The data response corresponding to the request.", - "type": "object", - "properties": { - "columnHeader": { - "description": "The column headers.", - "$ref": "ColumnHeader" - }, - "data": { - "description": "Response data.", - "$ref": "ReportData" - }, - "nextPageToken": { - "description": "Page token to retrieve the next page of results in the list.", - "type": "string" - } - }, - "id": "Report" - }, - "SegmentFilterClause": { - "description": "Filter Clause to be used in a segment definition, can be wither a metric or\na dimension filter.", - "type": "object", - "properties": { - "dimensionFilter": { - "description": "Dimension Filter for the segment definition.", - "$ref": "SegmentDimensionFilter" - }, - "metricFilter": { - "description": "Metric Filter for the segment definition.", - "$ref": "SegmentMetricFilter" - }, - "not": { - "description": "Matches the complement (`!`) of the filter.", - "type": "boolean" - } - }, - "id": "SegmentFilterClause" - }, - "DimensionFilter": { - "description": "Dimension filter specifies the filtering options on a dimension.", - "type": "object", - "properties": { - "dimensionName": { - "description": "The dimension to filter on. A DimensionFilter must contain a dimension.", - "type": "string" - }, - "operator": { - "description": "How to match the dimension to the expression. The default is REGEXP.", - "enum": [ - "OPERATOR_UNSPECIFIED", - "REGEXP", - "BEGINS_WITH", - "ENDS_WITH", - "PARTIAL", - "EXACT", - "NUMERIC_EQUAL", - "NUMERIC_GREATER_THAN", - "NUMERIC_LESS_THAN", - "IN_LIST" - ], - "enumDescriptions": [ - "If the match type is unspecified, it is treated as a `REGEXP`.", - "The match expression is treated as a regular expression. All match types\nare not treated as regular expressions.", - "Matches the value which begin with the match expression provided.", - "Matches the values which end with the match expression provided.", - "Substring match.", - "The value should match the match expression entirely.", - "Integer comparison filters.\ncase sensitivity is ignored for these and the expression\nis assumed to be a string representing an integer.\nFailure conditions:\n\n- If expression is not a valid int64, the client should expect\n an error.\n- Input dimensions that are not valid int64 values will never match the\n filter.", - "Checks if the dimension is numerically greater than the match\nexpression. Read the description for `NUMERIC_EQUALS` for restrictions.", - "Checks if the dimension is numerically less than the match expression.\nRead the description for `NUMERIC_EQUALS` for restrictions.", - "This option is used to specify a dimension filter whose expression can\ntake any value from a selected list of values. This helps avoiding\nevaluating multiple exact match dimension filters which are OR'ed for\nevery single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\nAny response row whose dimension has it is value as A, B or C, matches\nthis DimensionFilter." - ], - "type": "string" - }, - "caseSensitive": { - "description": "Should the match be case sensitive? Default is false.", - "type": "boolean" - }, - "expressions": { - "description": "Strings or regular expression to match against. Only the first value of\nthe list is used for comparison unless the operator is `IN_LIST`.\nIf `IN_LIST` operator, then the entire list is used to filter the\ndimensions as explained in the description of the `IN_LIST` operator.", - "type": "array", - "items": { - "type": "string" - } - }, - "not": { - "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\ndimension values will be excluded in the report. The default is false.", - "type": "boolean" - } - }, - "id": "DimensionFilter" - }, - "SegmentDimensionFilter": { - "description": "Dimension filter specifies the filtering options on a dimension.", - "type": "object", - "properties": { - "maxComparisonValue": { - "description": "Maximum comparison values for `BETWEEN` match type.", - "type": "string" - }, - "dimensionName": { - "description": "Name of the dimension for which the filter is being applied.", - "type": "string" - }, - "caseSensitive": { - "description": "Should the match be case sensitive, ignored for `IN_LIST` operator.", - "type": "boolean" - }, - "operator": { - "description": "The operator to use to match the dimension with the expressions.", - "enum": [ - "OPERATOR_UNSPECIFIED", - "REGEXP", - "BEGINS_WITH", - "ENDS_WITH", - "PARTIAL", - "EXACT", - "IN_LIST", - "NUMERIC_LESS_THAN", - "NUMERIC_GREATER_THAN", - "NUMERIC_BETWEEN" - ], - "enumDescriptions": [ - "If the match type is unspecified, it is treated as a REGEXP.", - "The match expression is treated as a regular expression. All other match\ntypes are not treated as regular expressions.", - "Matches the values which begin with the match expression provided.", - "Matches the values which end with the match expression provided.", - "Substring match.", - "The value should match the match expression entirely.", - "This option is used to specify a dimension filter whose expression can\ntake any value from a selected list of values. This helps avoiding\nevaluating multiple exact match dimension filters which are OR'ed for\nevery single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\nAny response row whose dimension has it is value as A, B or C, matches\nthis DimensionFilter.", - "Integer comparison filters.\ncase sensitivity is ignored for these and the expression\nis assumed to be a string representing an integer.\nFailure conditions:\n\n- if expression is not a valid int64, the client should expect\n an error.\n- input dimensions that are not valid int64 values will never match the\n filter.\n\nChecks if the dimension is numerically less than the match expression.", - "Checks if the dimension is numerically greater than the match\nexpression.", - "Checks if the dimension is numerically between the minimum and maximum\nof the match expression, boundaries excluded." - ], - "type": "string" - }, - "expressions": { - "description": "The list of expressions, only the first element is used for all operators", - "type": "array", - "items": { - "type": "string" - } - }, - "minComparisonValue": { - "description": "Minimum comparison values for `BETWEEN` match type.", - "type": "string" - } - }, - "id": "SegmentDimensionFilter" - }, - "ReportRequest": { - "description": "The main request class which specifies the Reporting API request.", - "type": "object", - "properties": { - "cohortGroup": { - "description": "Cohort group associated with this request. If there is a cohort group\nin the request the `ga:cohort` dimension must be present.\nEvery [ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `cohortGroup` definition.", - "$ref": "CohortGroup" - }, - "dimensions": { - "description": "The dimensions requested.\nRequests can have a total of 7 dimensions.", - "type": "array", - "items": { - "$ref": "Dimension" - } - }, - "metricFilterClauses": { - "description": "The metric filter clauses. They are logically combined with the `AND`\noperator. Metric filters look at only the first date range and not the\ncomparing date range. Note that filtering on metrics occurs after the\nmetrics are aggregated.", - "type": "array", - "items": { - "$ref": "MetricFilterClause" - } - }, - "hideTotals": { - "description": "If set to true, hides the total of all metrics for all the matching rows,\nfor every date range. The default false and will return the totals.", - "type": "boolean" - }, - "includeEmptyRows": { - "description": "If set to false, the response does not include rows if all the retrieved\nmetrics are equal to zero. The default is false which will exclude these\nrows.", - "type": "boolean" - }, - "dimensionFilterClauses": { - "description": "The dimension filter clauses for filtering Dimension Values. They are\nlogically combined with the `AND` operator. Note that filtering occurs\nbefore any dimensions are aggregated, so that the returned metrics\nrepresent the total for only the relevant dimensions.", - "type": "array", - "items": { - "$ref": "DimensionFilterClause" - } - }, - "pivots": { - "description": "The pivot definitions. Requests can have a maximum of 2 pivots.", - "type": "array", - "items": { - "$ref": "Pivot" - } - }, - "dateRanges": { - "description": "Date ranges in the request. The request can have a maximum of 2 date\nranges. The response will contain a set of metric values for each\ncombination of the dimensions for each date range in the request. So, if\nthere are two date ranges, there will be two set of metric values, one for\nthe original date range and one for the second date range.\nThe `reportRequest.dateRanges` field should not be specified for cohorts\nor Lifetime value requests.\nIf a date range is not provided, the default date range is (startDate:\ncurrent date - 7 days, endDate: current date - 1 day). Every\n[ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `dateRanges` definition.", - "type": "array", - "items": { - "$ref": "DateRange" - } - }, - "segments": { - "description": "Segment the data returned for the request. A segment definition helps look\nat a subset of the segment request. A request can contain up to four\nsegments. Every [ReportRequest](#ReportRequest) within a\n`batchGet` method must contain the same `segments` definition. Requests\nwith segments must have the `ga:segment` dimension.", - "type": "array", - "items": { - "$ref": "Segment" - } - }, - "samplingLevel": { - "description": "The desired report\n[sample](https://support.google.com/analytics/answer/2637192) size.\nIf the the `samplingLevel` field is unspecified the `DEFAULT` sampling\nlevel is used. Every [ReportRequest](#ReportRequest) within a\n`batchGet` method must contain the same `samplingLevel` definition. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\n for details.", - "enum": [ - "SAMPLING_UNSPECIFIED", - "DEFAULT", - "SMALL", - "LARGE" - ], - "enumDescriptions": [ - "If the `samplingLevel` field is unspecified the `DEFAULT` sampling level\nis used.", - "Returns response with a sample size that balances speed and\naccuracy.", - "It returns a fast response with a smaller sampling size.", - "Returns a more accurate response using a large sampling size. But this\nmay result in response being slower." - ], - "type": "string" - }, - "metrics": { - "description": "The metrics requested.\nRequests must specify at least one metric. Requests can have a\ntotal of 10 metrics.", - "type": "array", - "items": { - "$ref": "Metric" - } - }, - "pageSize": { - "description": "Page size is for paging and specifies the maximum number of returned rows.\nPage size should be \u003e= 0. A query returns the default of 1,000 rows.\nThe Analytics Core Reporting API returns a maximum of 10,000 rows per\nrequest, no matter how many you ask for. It can also return fewer rows\nthan requested, if there aren't as many dimension segments as you expect.\nFor instance, there are fewer than 300 possible values for `ga:country`,\nso when segmenting only by country, you can't get more than 300 rows,\neven if you set `pageSize` to a higher value.", - "type": "integer", - "format": "int32" - }, - "orderBys": { - "description": "Sort order on output rows. To compare two rows, the elements of the\nfollowing are applied in order until a difference is found. All date\nranges in the output get the same row order.", - "type": "array", - "items": { - "$ref": "OrderBy" - } - }, - "filtersExpression": { - "description": "Dimension or metric filters that restrict the data returned for your\nrequest. To use the `filtersExpression`, supply a dimension or metric on\nwhich to filter, followed by the filter expression. For example, the\nfollowing expression selects `ga:browser` dimension which starts with\nFirefox; `ga:browser=~^Firefox`. For more information on dimensions\nand metric filters, see\n[Filters reference](https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters).", - "type": "string" - }, - "hideValueRanges": { - "description": "If set to true, hides the minimum and maximum across all matching rows.\nThe default is false and the value ranges are returned.", - "type": "boolean" - }, - "viewId": { - "description": "The Analytics\n[view ID](https://support.google.com/analytics/answer/1009618)\nfrom which to retrieve data. Every [ReportRequest](#ReportRequest)\nwithin a `batchGet` method must contain the same `viewId`.", - "type": "string" - }, - "pageToken": { - "description": "A continuation token to get the next page of the results. Adding this to\nthe request will return the rows after the pageToken. The pageToken should\nbe the value returned in the nextPageToken parameter in the response to\nthe GetReports request.", - "type": "string" - } - }, - "id": "ReportRequest" - }, - "SimpleSegment": { - "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined.", - "type": "object", - "properties": { - "orFiltersForSegment": { - "description": "A list of segment filters groups which are combined with logical `AND`\noperator.", - "type": "array", - "items": { - "$ref": "OrFiltersForSegment" - } - } - }, - "id": "SimpleSegment" - }, - "SegmentDefinition": { - "description": "SegmentDefinition defines the segment to be a set of SegmentFilters which\nare combined together with a logical `AND` operation.", - "type": "object", - "properties": { - "segmentFilters": { - "description": "A segment is defined by a set of segment filters which are combined\ntogether with a logical `AND` operation.", - "type": "array", - "items": { - "$ref": "SegmentFilter" - } - } - }, - "id": "SegmentDefinition" - }, - "SegmentMetricFilter": { - "description": "Metric filter to be used in a segment filter clause.", - "type": "object", - "properties": { - "metricName": { - "description": "The metric that will be filtered on. A `metricFilter` must contain a\nmetric name.", - "type": "string" - }, - "operator": { - "description": "Specifies is the operation to perform to compare the metric. The default\nis `EQUAL`.", - "enum": [ - "UNSPECIFIED_OPERATOR", - "LESS_THAN", - "GREATER_THAN", - "EQUAL", - "BETWEEN" - ], - "enumDescriptions": [ - "Unspecified operator is treated as `LESS_THAN` operator.", - "Checks if the metric value is less than comparison value.", - "Checks if the metric value is greater than comparison value.", - "Equals operator.", - "For between operator, both the minimum and maximum are exclusive.\nWe will use `LT` and `GT` for comparison." - ], - "type": "string" - }, - "comparisonValue": { - "description": "The value to compare against. If the operator is `BETWEEN`, this value is\ntreated as minimum comparison value.", - "type": "string" - }, - "scope": { - "description": "Scope for a metric defines the level at which that metric is defined. The\nspecified metric scope must be equal to or greater than its primary scope\nas defined in the data model. The primary scope is defined by if the\nsegment is selecting users or sessions.", - "enum": [ - "UNSPECIFIED_SCOPE", - "PRODUCT", - "HIT", - "SESSION", - "USER" - ], - "enumDescriptions": [ - "If the scope is unspecified, it defaults to the condition scope,\n`USER` or `SESSION` depending on if the segment is trying to choose\nusers or sessions.", - "Product scope.", - "Hit scope.", - "Session scope.", - "User scope." - ], - "type": "string" - }, - "maxComparisonValue": { - "description": "Max comparison value is only used for `BETWEEN` operator.", - "type": "string" - } - }, - "id": "SegmentMetricFilter" - }, - "ReportData": { - "description": "The data part of the report.", - "type": "object", - "properties": { - "rowCount": { - "description": "Total number of matching rows for this query.", - "type": "integer", - "format": "int32" - }, - "samplingSpaceSizes": { - "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of\nsamples present, one entry per date range. If the results are not sampled\nthis field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details.", - "type": "array", - "items": { - "type": "string", - "format": "int64" - } - }, - "maximums": { - "description": "Minimum and maximum values seen over all matching rows. These are both\nempty when `hideValueRanges` in the request is false, or when\nrowCount is zero.", - "type": "array", - "items": { - "$ref": "DateRangeValues" - } - }, - "samplesReadCounts": { - "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of samples read, one entry per date range.\nIf the results are not sampled this field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details.", - "type": "array", - "items": { - "type": "string", - "format": "int64" - } - }, - "minimums": { - "description": "Minimum and maximum values seen over all matching rows. These are both\nempty when `hideValueRanges` in the request is false, or when\nrowCount is zero.", - "type": "array", - "items": { - "$ref": "DateRangeValues" - } - }, - "rows": { - "description": "There's one ReportRow for every unique combination of dimensions.", - "type": "array", - "items": { - "$ref": "ReportRow" - } - }, - "dataLastRefreshed": { - "description": "The last time the data in the report was refreshed. All the hits received\nbefore this timestamp are included in the calculation of the report.", - "type": "string", - "format": "google-datetime" - }, - "totals": { - "description": "For each requested date range, for the set of all rows that match\nthe query, every requested value format gets a total. The total\nfor a value format is computed by first totaling the metrics\nmentioned in the value format and then evaluating the value\nformat as a scalar expression. E.g., The \"totals\" for\n`3 / (ga:sessions + 2)` we compute\n`3 / ((sum of all relevant ga:sessions) + 2)`.\nTotals are computed before pagination.", - "type": "array", - "items": { - "$ref": "DateRangeValues" - } - }, - "isDataGolden": { - "description": "Indicates if response to this request is golden or not. Data is\ngolden when the exact same request will not produce any new results if\nasked at a later point in time.", - "type": "boolean" - } - }, - "id": "ReportData" - }, - "GetReportsRequest": { - "description": "The batch request containing multiple report request.", - "type": "object", - "properties": { - "reportRequests": { - "description": "Requests, each request will have a separate response.\nThere can be a maximum of 5 requests. All requests should have the same\n`dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.", - "type": "array", - "items": { - "$ref": "ReportRequest" - } - } - }, - "id": "GetReportsRequest" - }, - "OrderBy": { - "description": "Specifies the sorting options.", - "type": "object", - "properties": { - "sortOrder": { - "description": "The sorting order for the field.", - "enum": [ - "SORT_ORDER_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], - "enumDescriptions": [ - "If the sort order is unspecified, the default is ascending.", - "Ascending sort. The field will be sorted in an ascending manner.", - "Descending sort. The field will be sorted in a descending manner." - ], - "type": "string" - }, - "orderType": { - "description": "The order type. The default orderType is `VALUE`.", - "enum": [ - "ORDER_TYPE_UNSPECIFIED", - "VALUE", - "DELTA", - "SMART", - "HISTOGRAM_BUCKET", - "DIMENSION_AS_INTEGER" - ], - "enumDescriptions": [ - "Unspecified order type will be treated as sort based on value.", - "The sort order is based on the value of the chosen column; looks only at\nthe first date range.", - "The sort order is based on the difference of the values of the chosen\ncolumn between the first two date ranges. Usable only if there are\nexactly two date ranges.", - "The sort order is based on weighted value of the chosen column. If\ncolumn has n/d format, then weighted value of this ratio will\nbe `(n + totals.n)/(d + totals.d)` Usable only for metrics that\nrepresent ratios.", - "Histogram order type is applicable only to dimension columns with\nnon-empty histogram-buckets.", - "If the dimensions are fixed length numbers, ordinary sort would just\nwork fine. `DIMENSION_AS_INTEGER` can be used if the dimensions are\nvariable length numbers." - ], - "type": "string" - }, - "fieldName": { - "description": "The field which to sort by. The default sort order is ascending. Example:\n`ga:browser`.\nNote, that you can only specify one field for sort here. For example,\n`ga:browser, ga:city` is not valid.", - "type": "string" - } - }, - "id": "OrderBy" - }, - "Cohort": { - "description": "Defines a cohort. A cohort is a group of users who share a common\ncharacteristic. For example, all users with the same acquisition date\nbelong to the same cohort.", - "type": "object", - "properties": { - "type": { - "description": "Type of the cohort. The only supported type as of now is\n`FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated\nas `FIRST_VISIT_DATE` type cohort.", - "enum": [ - "UNSPECIFIED_COHORT_TYPE", - "FIRST_VISIT_DATE" - ], - "enumDescriptions": [ - "If unspecified it's treated as `FIRST_VISIT_DATE`.", - "Cohorts that are selected based on first visit date." - ], - "type": "string" - }, - "dateRange": { - "description": "This is used for `FIRST_VISIT_DATE` cohort, the cohort selects users\nwhose first visit date is between start date and end date defined in the\nDateRange. The date ranges should be aligned for cohort requests. If the\nrequest contains `ga:cohortNthDay` it should be exactly one day long,\nif `ga:cohortNthWeek` it should be aligned to the week boundary (starting\nat Sunday and ending Saturday), and for `ga:cohortNthMonth` the date range\nshould be aligned to the month (starting at the first and ending on the\nlast day of the month).\nFor LTV requests there are no such restrictions.\nYou do not need to supply a date range for the\n`reportsRequest.dateRanges` field.", - "$ref": "DateRange" - }, - "name": { - "description": "A unique name for the cohort. If not defined name will be auto-generated\nwith values cohort_[1234...].", - "type": "string" - } - }, - "id": "Cohort" - }, - "OrFiltersForSegment": { - "description": "A list of segment filters in the `OR` group are combined with the logical OR\noperator.", - "type": "object", - "properties": { - "segmentFilterClauses": { - "description": "List of segment filters to be combined with a `OR` operator.", - "type": "array", - "items": { - "$ref": "SegmentFilterClause" - } - } - }, - "id": "OrFiltersForSegment" - }, - "SequenceSegment": { - "description": "Sequence conditions consist of one or more steps, where each step is defined\nby one or more dimension/metric conditions. Multiple steps can be combined\nwith special sequence operators.", - "type": "object", - "properties": { - "firstStepShouldMatchFirstHit": { - "description": "If set, first step condition must match the first hit of the visitor (in\nthe date range).", - "type": "boolean" - }, - "segmentSequenceSteps": { - "description": "The list of steps in the sequence.", - "type": "array", - "items": { - "$ref": "SegmentSequenceStep" - } - } - }, - "id": "SequenceSegment" - }, - "SegmentFilter": { - "description": "SegmentFilter defines the segment to be either a simple or a sequence\nsegment. A simple segment condition contains dimension and metric conditions\nto select the sessions or users. A sequence segment condition can be used to\nselect users or sessions based on sequential conditions.", - "type": "object", - "properties": { - "sequenceSegment": { - "description": "Sequence conditions consist of one or more steps, where each step is\ndefined by one or more dimension/metric conditions. Multiple steps can\nbe combined with special sequence operators.", - "$ref": "SequenceSegment" - }, - "not": { - "description": "If true, match the complement of simple or sequence segment.\nFor example, to match all visits not from \"New York\", we can define the\nsegment as follows:\n\n \"sessionSegment\": {\n \"segmentFilters\": [{\n \"simpleSegment\" :{\n \"orFiltersForSegment\": [{\n \"segmentFilterClauses\":[{\n \"dimensionFilter\": {\n \"dimensionName\": \"ga:city\",\n \"expressions\": [\"New York\"]\n }\n }]\n }]\n },\n \"not\": \"True\"\n }]\n },", - "type": "boolean" - }, - "simpleSegment": { - "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined", - "$ref": "SimpleSegment" - } - }, - "id": "SegmentFilter" - }, - "PivotHeaderEntry": { - "description": "The headers for the each of the metric column corresponding to the metrics\nrequested in the pivots section of the response.", - "type": "object", - "properties": { - "dimensionNames": { - "description": "The name of the dimensions in the pivot response.", - "type": "array", - "items": { - "type": "string" - } - }, - "dimensionValues": { - "description": "The values for the dimensions in the pivot.", - "type": "array", - "items": { - "type": "string" - } - }, - "metric": { - "description": "The metric header for the metric in the pivot.", - "$ref": "MetricHeaderEntry" - } - }, - "id": "PivotHeaderEntry" - }, "DimensionFilterClause": { "description": "A group of dimension filters. Set the operator value to specify how\nthe filters are logically combined.", "type": "object", "properties": { "operator": { - "description": "The operator for combining multiple dimension filters. If unspecified, it\nis treated as an `OR`.", - "enum": [ - "OPERATOR_UNSPECIFIED", - "OR", - "AND" - ], "enumDescriptions": [ "Unspecified operator. It is treated as an `OR`.", "The logical `OR` operator.", "The logical `AND` operator." ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "OR", + "AND" + ], + "description": "The operator for combining multiple dimension filters. If unspecified, it\nis treated as an `OR`.", "type": "string" }, "filters": { @@ -753,71 +436,92 @@ }, "id": "DimensionFilterClause" }, - "SegmentSequenceStep": { - "description": "A segment sequence definition.", + "GetReportsResponse": { + "description": "The main response class which holds the reports from the Reporting API\n`batchGet` call.", "type": "object", "properties": { - "matchType": { - "description": "Specifies if the step immediately precedes or can be any time before the\nnext step.", - "enum": [ - "UNSPECIFIED_MATCH_TYPE", - "PRECEDES", - "IMMEDIATELY_PRECEDES" - ], - "enumDescriptions": [ - "Unspecified match type is treated as precedes.", - "Operator indicates that the previous step precedes the next step.", - "Operator indicates that the previous step immediately precedes the next\nstep." - ], + "reports": { + "description": "Responses corresponding to each of the request.", + "type": "array", + "items": { + "$ref": "Report" + } + } + }, + "id": "GetReportsResponse" + }, + "SequenceSegment": { + "description": "Sequence conditions consist of one or more steps, where each step is defined\nby one or more dimension/metric conditions. Multiple steps can be combined\nwith special sequence operators.", + "type": "object", + "properties": { + "segmentSequenceSteps": { + "description": "The list of steps in the sequence.", + "type": "array", + "items": { + "$ref": "SegmentSequenceStep" + } + }, + "firstStepShouldMatchFirstHit": { + "description": "If set, first step condition must match the first hit of the visitor (in\nthe date range).", + "type": "boolean" + } + }, + "id": "SequenceSegment" + }, + "SegmentMetricFilter": { + "description": "Metric filter to be used in a segment filter clause.", + "type": "object", + "properties": { + "maxComparisonValue": { + "description": "Max comparison value is only used for `BETWEEN` operator.", "type": "string" }, - "orFiltersForSegment": { - "description": "A sequence is specified with a list of Or grouped filters which are\ncombined with `AND` operator.", - "type": "array", - "items": { - "$ref": "OrFiltersForSegment" - } + "comparisonValue": { + "description": "The value to compare against. If the operator is `BETWEEN`, this value is\ntreated as minimum comparison value.", + "type": "string" + }, + "operator": { + "enumDescriptions": [ + "Unspecified operator is treated as `LESS_THAN` operator.", + "Checks if the metric value is less than comparison value.", + "Checks if the metric value is greater than comparison value.", + "Equals operator.", + "For between operator, both the minimum and maximum are exclusive.\nWe will use `LT` and `GT` for comparison." + ], + "enum": [ + "UNSPECIFIED_OPERATOR", + "LESS_THAN", + "GREATER_THAN", + "EQUAL", + "BETWEEN" + ], + "description": "Specifies is the operation to perform to compare the metric. The default\nis `EQUAL`.", + "type": "string" + }, + "metricName": { + "description": "The metric that will be filtered on. A `metricFilter` must contain a\nmetric name.", + "type": "string" + }, + "scope": { + "description": "Scope for a metric defines the level at which that metric is defined. The\nspecified metric scope must be equal to or greater than its primary scope\nas defined in the data model. The primary scope is defined by if the\nsegment is selecting users or sessions.", + "type": "string", + "enumDescriptions": [ + "If the scope is unspecified, it defaults to the condition scope,\n`USER` or `SESSION` depending on if the segment is trying to choose\nusers or sessions.", + "Product scope.", + "Hit scope.", + "Session scope.", + "User scope." + ], + "enum": [ + "UNSPECIFIED_SCOPE", + "PRODUCT", + "HIT", + "SESSION", + "USER" + ] } }, - "id": "SegmentSequenceStep" - }, - "Pivot": { - "description": "The Pivot describes the pivot section in the request.\nThe Pivot helps rearrange the information in the table for certain reports\nby pivoting your data on a second dimension.", - "type": "object", - "properties": { - "dimensions": { - "description": "A list of dimensions to show as pivot columns. A Pivot can have a maximum\nof 4 dimensions. Pivot dimensions are part of the restriction on the\ntotal number of dimensions allowed in the request.", - "type": "array", - "items": { - "$ref": "Dimension" - } - }, - "metrics": { - "description": "The pivot metrics. Pivot metrics are part of the\nrestriction on total number of metrics allowed in the request.", - "type": "array", - "items": { - "$ref": "Metric" - } - }, - "maxGroupCount": { - "description": "Specifies the maximum number of groups to return.\nThe default value is 10, also the maximum value is 1,000.", - "type": "integer", - "format": "int32" - }, - "dimensionFilterClauses": { - "description": "DimensionFilterClauses are logically combined with an `AND` operator: only\ndata that is included by all these DimensionFilterClauses contributes to\nthe values in this pivot region. Dimension filters can be used to restrict\nthe columns shown in the pivot region. For example if you have\n`ga:browser` as the requested dimension in the pivot region, and you\nspecify key filters to restrict `ga:browser` to only \"IE\" or \"Firefox\",\nthen only those two browsers would show up as columns.", - "type": "array", - "items": { - "$ref": "DimensionFilterClause" - } - }, - "startGroup": { - "description": "If k metrics were requested, then the response will contain some\ndata-dependent multiple of k columns in the report. E.g., if you pivoted\non the dimension `ga:browser` then you'd get k columns for \"Firefox\", k\ncolumns for \"IE\", k columns for \"Chrome\", etc. The ordering of the groups\nof columns is determined by descending order of \"total\" for the first of\nthe k values. Ties are broken by lexicographic ordering of the first\npivot dimension, then lexicographic ordering of the second pivot\ndimension, and so on. E.g., if the totals for the first value for\nFirefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns\nwould be Chrome, Firefox, IE.\n\nThe following let you choose which of the groups of k columns are\nincluded in the response.", - "type": "integer", - "format": "int32" - } - }, - "id": "Pivot" + "id": "SegmentMetricFilter" }, "DateRangeValues": { "description": "Used to return a list of metrics for a single DateRange / dimension\ncombination", @@ -840,116 +544,133 @@ }, "id": "DateRangeValues" }, - "MetricFilterClause": { - "description": "Represents a group of metric filters.\nSet the operator value to specify how the filters are logically combined.", - "type": "object", - "properties": { - "operator": { - "description": "The operator for combining multiple metric filters. If unspecified, it is\ntreated as an `OR`.", - "enum": [ - "OPERATOR_UNSPECIFIED", - "OR", - "AND" - ], - "enumDescriptions": [ - "Unspecified operator. It is treated as an `OR`.", - "The logical `OR` operator.", - "The logical `AND` operator." - ], - "type": "string" - }, - "filters": { - "description": "The repeated set of filters. They are logically combined based on the\noperator specified.", - "type": "array", - "items": { - "$ref": "MetricFilter" - } - } - }, - "id": "MetricFilterClause" - }, - "Segment": { - "description": "The segment definition, if the report needs to be segmented.\nA Segment is a subset of the Analytics data. For example, of the entire\nset of users, one Segment might be users from a particular country or city.", - "type": "object", - "properties": { - "dynamicSegment": { - "description": "A dynamic segment definition in the request.", - "$ref": "DynamicSegment" - }, - "segmentId": { - "description": "The segment ID of a built-in or custom segment, for example `gaid::-3`.", - "type": "string" - } - }, - "id": "Segment" - }, - "DateRange": { - "description": "A contiguous set of days: startDate, startDate + 1 day, ..., endDate.\nThe start and end dates are specified in\n[ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.", - "type": "object", - "properties": { - "startDate": { - "description": "The start date for the query in the format `YYYY-MM-DD`.", - "type": "string" - }, - "endDate": { - "description": "The end date for the query in the format `YYYY-MM-DD`.", - "type": "string" - } - }, - "id": "DateRange" - }, - "ReportRow": { - "description": "A row in the report.", - "type": "object", - "properties": { - "dimensions": { - "description": "List of requested dimensions.", - "type": "array", - "items": { - "type": "string" - } - }, - "metrics": { - "description": "List of metrics for each requested DateRange.", - "type": "array", - "items": { - "$ref": "DateRangeValues" - } - } - }, - "id": "ReportRow" - }, "CohortGroup": { "description": "Defines a cohort group.\nFor example:\n\n \"cohortGroup\": {\n \"cohorts\": [{\n \"name\": \"cohort 1\",\n \"type\": \"FIRST_VISIT_DATE\",\n \"dateRange\": { \"startDate\": \"2015-08-01\", \"endDate\": \"2015-08-01\" }\n },{\n \"name\": \"cohort 2\"\n \"type\": \"FIRST_VISIT_DATE\"\n \"dateRange\": { \"startDate\": \"2015-07-01\", \"endDate\": \"2015-07-01\" }\n }]\n }", "type": "object", "properties": { - "lifetimeValue": { - "description": "Enable Life Time Value (LTV). LTV measures lifetime value for users\nacquired through different channels.\nPlease see:\n[Cohort Analysis](https://support.google.com/analytics/answer/6074676) and\n[Lifetime Value](https://support.google.com/analytics/answer/6182550)\nIf the value of lifetimeValue is false:\n\n- The metric values are similar to the values in the web interface cohort\n report.\n- The cohort definition date ranges must be aligned to the calendar week\n and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in\n the cohort definition should be a Sunday and the `endDate` should be the\n following Saturday, and for `ga:cohortNthMonth`, the `startDate`\n should be the 1st of the month and `endDate` should be the last day\n of the month.\n\nWhen the lifetimeValue is true:\n\n- The metric values will correspond to the values in the web interface\n LifeTime value report.\n- The Lifetime Value report shows you how user value (Revenue) and\n engagement (Appviews, Goal Completions, Sessions, and Session Duration)\n grow during the 90 days after a user is acquired.\n- The metrics are calculated as a cumulative average per user per the time\n increment.\n- The cohort definition date ranges need not be aligned to the calendar\n week and month boundaries.\n- The `viewId` must be an\n [app view ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews)", - "type": "boolean" - }, "cohorts": { "description": "The definition for the cohort.", "type": "array", "items": { "$ref": "Cohort" } + }, + "lifetimeValue": { + "description": "Enable Life Time Value (LTV). LTV measures lifetime value for users\nacquired through different channels.\nPlease see:\n[Cohort Analysis](https://support.google.com/analytics/answer/6074676) and\n[Lifetime Value](https://support.google.com/analytics/answer/6182550)\nIf the value of lifetimeValue is false:\n\n- The metric values are similar to the values in the web interface cohort\n report.\n- The cohort definition date ranges must be aligned to the calendar week\n and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in\n the cohort definition should be a Sunday and the `endDate` should be the\n following Saturday, and for `ga:cohortNthMonth`, the `startDate`\n should be the 1st of the month and `endDate` should be the last day\n of the month.\n\nWhen the lifetimeValue is true:\n\n- The metric values will correspond to the values in the web interface\n LifeTime value report.\n- The Lifetime Value report shows you how user value (Revenue) and\n engagement (Appviews, Goal Completions, Sessions, and Session Duration)\n grow during the 90 days after a user is acquired.\n- The metrics are calculated as a cumulative average per user per the time\n increment.\n- The cohort definition date ranges need not be aligned to the calendar\n week and month boundaries.\n- The `viewId` must be an\n [app view ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews)", + "type": "boolean" } }, "id": "CohortGroup" }, - "GetReportsResponse": { - "description": "The main response class which holds the reports from the Reporting API\n`batchGet` call.", + "GetReportsRequest": { + "description": "The batch request containing multiple report request.", "type": "object", "properties": { - "reports": { - "description": "Responses corresponding to each of the request.", + "reportRequests": { + "description": "Requests, each request will have a separate response.\nThere can be a maximum of 5 requests. All requests should have the same\n`dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.", "type": "array", "items": { - "$ref": "Report" + "$ref": "ReportRequest" } } }, - "id": "GetReportsResponse" + "id": "GetReportsRequest" + }, + "Pivot": { + "description": "The Pivot describes the pivot section in the request.\nThe Pivot helps rearrange the information in the table for certain reports\nby pivoting your data on a second dimension.", + "type": "object", + "properties": { + "metrics": { + "description": "The pivot metrics. Pivot metrics are part of the\nrestriction on total number of metrics allowed in the request.", + "type": "array", + "items": { + "$ref": "Metric" + } + }, + "dimensions": { + "description": "A list of dimensions to show as pivot columns. A Pivot can have a maximum\nof 4 dimensions. Pivot dimensions are part of the restriction on the\ntotal number of dimensions allowed in the request.", + "type": "array", + "items": { + "$ref": "Dimension" + } + }, + "dimensionFilterClauses": { + "description": "DimensionFilterClauses are logically combined with an `AND` operator: only\ndata that is included by all these DimensionFilterClauses contributes to\nthe values in this pivot region. Dimension filters can be used to restrict\nthe columns shown in the pivot region. For example if you have\n`ga:browser` as the requested dimension in the pivot region, and you\nspecify key filters to restrict `ga:browser` to only \"IE\" or \"Firefox\",\nthen only those two browsers would show up as columns.", + "type": "array", + "items": { + "$ref": "DimensionFilterClause" + } + }, + "maxGroupCount": { + "description": "Specifies the maximum number of groups to return.\nThe default value is 10, also the maximum value is 1,000.", + "format": "int32", + "type": "integer" + }, + "startGroup": { + "description": "If k metrics were requested, then the response will contain some\ndata-dependent multiple of k columns in the report. E.g., if you pivoted\non the dimension `ga:browser` then you'd get k columns for \"Firefox\", k\ncolumns for \"IE\", k columns for \"Chrome\", etc. The ordering of the groups\nof columns is determined by descending order of \"total\" for the first of\nthe k values. Ties are broken by lexicographic ordering of the first\npivot dimension, then lexicographic ordering of the second pivot\ndimension, and so on. E.g., if the totals for the first value for\nFirefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns\nwould be Chrome, Firefox, IE.\n\nThe following let you choose which of the groups of k columns are\nincluded in the response.", + "format": "int32", + "type": "integer" + } + }, + "id": "Pivot" + }, + "PivotHeaderEntry": { + "description": "The headers for the each of the metric column corresponding to the metrics\nrequested in the pivots section of the response.", + "type": "object", + "properties": { + "dimensionNames": { + "description": "The name of the dimensions in the pivot response.", + "type": "array", + "items": { + "type": "string" + } + }, + "metric": { + "description": "The metric header for the metric in the pivot.", + "$ref": "MetricHeaderEntry" + }, + "dimensionValues": { + "description": "The values for the dimensions in the pivot.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "PivotHeaderEntry" + }, + "SegmentFilter": { + "description": "SegmentFilter defines the segment to be either a simple or a sequence\nsegment. A simple segment condition contains dimension and metric conditions\nto select the sessions or users. A sequence segment condition can be used to\nselect users or sessions based on sequential conditions.", + "type": "object", + "properties": { + "sequenceSegment": { + "$ref": "SequenceSegment", + "description": "Sequence conditions consist of one or more steps, where each step is\ndefined by one or more dimension/metric conditions. Multiple steps can\nbe combined with special sequence operators." + }, + "not": { + "description": "If true, match the complement of simple or sequence segment.\nFor example, to match all visits not from \"New York\", we can define the\nsegment as follows:\n\n \"sessionSegment\": {\n \"segmentFilters\": [{\n \"simpleSegment\" :{\n \"orFiltersForSegment\": [{\n \"segmentFilterClauses\":[{\n \"dimensionFilter\": {\n \"dimensionName\": \"ga:city\",\n \"expressions\": [\"New York\"]\n }\n }]\n }]\n },\n \"not\": \"True\"\n }]\n },", + "type": "boolean" + }, + "simpleSegment": { + "$ref": "SimpleSegment", + "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined" + } + }, + "id": "SegmentFilter" + }, + "SegmentDefinition": { + "description": "SegmentDefinition defines the segment to be a set of SegmentFilters which\nare combined together with a logical `AND` operation.", + "type": "object", + "properties": { + "segmentFilters": { + "description": "A segment is defined by a set of segment filters which are combined\ntogether with a logical `AND` operation.", + "type": "array", + "items": { + "$ref": "SegmentFilter" + } + } + }, + "id": "SegmentDefinition" }, "MetricHeaderEntry": { "description": "Header for the metrics.", @@ -957,14 +678,7 @@ "properties": { "type": { "description": "The type of the metric, for example `INTEGER`.", - "enum": [ - "METRIC_TYPE_UNSPECIFIED", - "INTEGER", - "FLOAT", - "CURRENCY", - "PERCENT", - "TIME" - ], + "type": "string", "enumDescriptions": [ "Metric type is unspecified.", "Integer metric.", @@ -973,7 +687,14 @@ "Percentage metric.", "Time metric in `HH:MM:SS` format." ], - "type": "string" + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "INTEGER", + "FLOAT", + "CURRENCY", + "PERCENT", + "TIME" + ] }, "name": { "description": "The name of the header.", @@ -982,61 +703,305 @@ }, "id": "MetricHeaderEntry" }, - "MetricFilter": { - "description": "MetricFilter specifies the filter on a metric.", + "ReportData": { + "description": "The data part of the report.", "type": "object", "properties": { - "metricName": { - "description": "The metric that will be filtered on. A metricFilter must contain a metric\nname. A metric name can be an alias earlier defined as a metric or it can\nalso be a metric expression.", + "totals": { + "description": "For each requested date range, for the set of all rows that match\nthe query, every requested value format gets a total. The total\nfor a value format is computed by first totaling the metrics\nmentioned in the value format and then evaluating the value\nformat as a scalar expression. E.g., The \"totals\" for\n`3 / (ga:sessions + 2)` we compute\n`3 / ((sum of all relevant ga:sessions) + 2)`.\nTotals are computed before pagination.", + "type": "array", + "items": { + "$ref": "DateRangeValues" + } + }, + "samplesReadCounts": { + "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of samples read, one entry per date range.\nIf the results are not sampled this field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details.", + "type": "array", + "items": { + "format": "int64", + "type": "string" + } + }, + "rowCount": { + "description": "Total number of matching rows for this query.", + "format": "int32", + "type": "integer" + }, + "rows": { + "description": "There's one ReportRow for every unique combination of dimensions.", + "type": "array", + "items": { + "$ref": "ReportRow" + } + }, + "isDataGolden": { + "description": "Indicates if response to this request is golden or not. Data is\ngolden when the exact same request will not produce any new results if\nasked at a later point in time.", + "type": "boolean" + }, + "dataLastRefreshed": { + "description": "The last time the data in the report was refreshed. All the hits received\nbefore this timestamp are included in the calculation of the report.", + "format": "google-datetime", + "type": "string" + }, + "maximums": { + "description": "Minimum and maximum values seen over all matching rows. These are both\nempty when `hideValueRanges` in the request is false, or when\nrowCount is zero.", + "type": "array", + "items": { + "$ref": "DateRangeValues" + } + }, + "samplingSpaceSizes": { + "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of\nsamples present, one entry per date range. If the results are not sampled\nthis field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details.", + "type": "array", + "items": { + "format": "int64", + "type": "string" + } + }, + "minimums": { + "description": "Minimum and maximum values seen over all matching rows. These are both\nempty when `hideValueRanges` in the request is false, or when\nrowCount is zero.", + "type": "array", + "items": { + "$ref": "DateRangeValues" + } + } + }, + "id": "ReportData" + }, + "DimensionFilter": { + "description": "Dimension filter specifies the filtering options on a dimension.", + "type": "object", + "properties": { + "caseSensitive": { + "description": "Should the match be case sensitive? Default is false.", + "type": "boolean" + }, + "dimensionName": { + "description": "The dimension to filter on. A DimensionFilter must contain a dimension.", "type": "string" }, "operator": { - "description": "Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the\ncomparisonValue, the default is `EQUAL`. If the operator is\n`IS_MISSING`, checks if the metric is missing and would ignore the\ncomparisonValue.", + "enumDescriptions": [ + "If the match type is unspecified, it is treated as a `REGEXP`.", + "The match expression is treated as a regular expression. All match types\nare not treated as regular expressions.", + "Matches the value which begin with the match expression provided.", + "Matches the values which end with the match expression provided.", + "Substring match.", + "The value should match the match expression entirely.", + "Integer comparison filters.\ncase sensitivity is ignored for these and the expression\nis assumed to be a string representing an integer.\nFailure conditions:\n\n- If expression is not a valid int64, the client should expect\n an error.\n- Input dimensions that are not valid int64 values will never match the\n filter.", + "Checks if the dimension is numerically greater than the match\nexpression. Read the description for `NUMERIC_EQUALS` for restrictions.", + "Checks if the dimension is numerically less than the match expression.\nRead the description for `NUMERIC_EQUALS` for restrictions.", + "This option is used to specify a dimension filter whose expression can\ntake any value from a selected list of values. This helps avoiding\nevaluating multiple exact match dimension filters which are OR'ed for\nevery single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\nAny response row whose dimension has it is value as A, B or C, matches\nthis DimensionFilter." + ], "enum": [ "OPERATOR_UNSPECIFIED", - "EQUAL", - "LESS_THAN", - "GREATER_THAN", - "IS_MISSING" + "REGEXP", + "BEGINS_WITH", + "ENDS_WITH", + "PARTIAL", + "EXACT", + "NUMERIC_EQUAL", + "NUMERIC_GREATER_THAN", + "NUMERIC_LESS_THAN", + "IN_LIST" ], - "enumDescriptions": [ - "If the operator is not specified, it is treated as `EQUAL`.", - "Should the value of the metric be exactly equal to the comparison value.", - "Should the value of the metric be less than to the comparison value.", - "Should the value of the metric be greater than to the comparison value.", - "Validates if the metric is missing.\nDoesn't take comparisonValue into account." - ], - "type": "string" - }, - "comparisonValue": { - "description": "The value to compare against.", + "description": "How to match the dimension to the expression. The default is REGEXP.", "type": "string" }, "not": { - "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\nmetric values will be excluded in the report. The default is false.", + "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\ndimension values will be excluded in the report. The default is false.", "type": "boolean" - } - }, - "id": "MetricFilter" - }, - "Dimension": { - "description": "[Dimensions](https://support.google.com/analytics/answer/1033861)\nare attributes of your data. For example, the dimension `ga:city`\nindicates the city, for example, \"Paris\" or \"New York\", from which\na session originates.", - "type": "object", - "properties": { - "histogramBuckets": { - "description": "If non-empty, we place dimension values into buckets after string to\nint64. Dimension values that are not the string representation of an\nintegral value will be converted to zero. The bucket values have to be in\nincreasing order. Each bucket is closed on the lower end, and open on the\nupper end. The \"first\" bucket includes all values less than the first\nboundary, the \"last\" bucket includes all values up to infinity. Dimension\nvalues that fall in a bucket get transformed to a new dimension value. For\nexample, if one gives a list of \"0, 1, 3, 4, 7\", then we return the\nfollowing buckets:\n\n- bucket #1: values \u003c 0, dimension value \"\u003c0\"\n- bucket #2: values in [0,1), dimension value \"0\"\n- bucket #3: values in [1,3), dimension value \"1-2\"\n- bucket #4: values in [3,4), dimension value \"3\"\n- bucket #5: values in [4,7), dimension value \"4-6\"\n- bucket #6: values \u003e= 7, dimension value \"7+\"\n\nNOTE: If you are applying histogram mutation on any dimension, and using\nthat dimension in sort, you will want to use the sort type\n`HISTOGRAM_BUCKET` for that purpose. Without that the dimension values\nwill be sorted according to dictionary\n(lexicographic) order. For example the ascending dictionary order is:\n\n \"\u003c50\", \"1001+\", \"121-1000\", \"50-120\"\n\nAnd the ascending `HISTOGRAM_BUCKET` order is:\n\n \"\u003c50\", \"50-120\", \"121-1000\", \"1001+\"\n\nThe client has to explicitly request `\"orderType\": \"HISTOGRAM_BUCKET\"`\nfor a histogram-mutated dimension.", + }, + "expressions": { + "description": "Strings or regular expression to match against. Only the first value of\nthe list is used for comparison unless the operator is `IN_LIST`.\nIf `IN_LIST` operator, then the entire list is used to filter the\ndimensions as explained in the description of the `IN_LIST` operator.", "type": "array", "items": { - "type": "string", - "format": "int64" + "type": "string" } + } + }, + "id": "DimensionFilter" + }, + "SegmentDimensionFilter": { + "description": "Dimension filter specifies the filtering options on a dimension.", + "type": "object", + "properties": { + "caseSensitive": { + "description": "Should the match be case sensitive, ignored for `IN_LIST` operator.", + "type": "boolean" }, - "name": { - "description": "Name of the dimension to fetch, for example `ga:browser`.", + "minComparisonValue": { + "description": "Minimum comparison values for `BETWEEN` match type.", + "type": "string" + }, + "maxComparisonValue": { + "description": "Maximum comparison values for `BETWEEN` match type.", + "type": "string" + }, + "dimensionName": { + "description": "Name of the dimension for which the filter is being applied.", + "type": "string" + }, + "operator": { + "description": "The operator to use to match the dimension with the expressions.", + "type": "string", + "enumDescriptions": [ + "If the match type is unspecified, it is treated as a REGEXP.", + "The match expression is treated as a regular expression. All other match\ntypes are not treated as regular expressions.", + "Matches the values which begin with the match expression provided.", + "Matches the values which end with the match expression provided.", + "Substring match.", + "The value should match the match expression entirely.", + "This option is used to specify a dimension filter whose expression can\ntake any value from a selected list of values. This helps avoiding\nevaluating multiple exact match dimension filters which are OR'ed for\nevery single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\nAny response row whose dimension has it is value as A, B or C, matches\nthis DimensionFilter.", + "Integer comparison filters.\ncase sensitivity is ignored for these and the expression\nis assumed to be a string representing an integer.\nFailure conditions:\n\n- if expression is not a valid int64, the client should expect\n an error.\n- input dimensions that are not valid int64 values will never match the\n filter.\n\nChecks if the dimension is numerically less than the match expression.", + "Checks if the dimension is numerically greater than the match\nexpression.", + "Checks if the dimension is numerically between the minimum and maximum\nof the match expression, boundaries excluded." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "REGEXP", + "BEGINS_WITH", + "ENDS_WITH", + "PARTIAL", + "EXACT", + "IN_LIST", + "NUMERIC_LESS_THAN", + "NUMERIC_GREATER_THAN", + "NUMERIC_BETWEEN" + ] + }, + "expressions": { + "description": "The list of expressions, only the first element is used for all operators", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "SegmentDimensionFilter" + }, + "OrderBy": { + "description": "Specifies the sorting options.", + "type": "object", + "properties": { + "fieldName": { + "description": "The field which to sort by. The default sort order is ascending. Example:\n`ga:browser`.\nNote, that you can only specify one field for sort here. For example,\n`ga:browser, ga:city` is not valid.", + "type": "string" + }, + "orderType": { + "description": "The order type. The default orderType is `VALUE`.", + "type": "string", + "enumDescriptions": [ + "Unspecified order type will be treated as sort based on value.", + "The sort order is based on the value of the chosen column; looks only at\nthe first date range.", + "The sort order is based on the difference of the values of the chosen\ncolumn between the first two date ranges. Usable only if there are\nexactly two date ranges.", + "The sort order is based on weighted value of the chosen column. If\ncolumn has n/d format, then weighted value of this ratio will\nbe `(n + totals.n)/(d + totals.d)` Usable only for metrics that\nrepresent ratios.", + "Histogram order type is applicable only to dimension columns with\nnon-empty histogram-buckets.", + "If the dimensions are fixed length numbers, ordinary sort would just\nwork fine. `DIMENSION_AS_INTEGER` can be used if the dimensions are\nvariable length numbers." + ], + "enum": [ + "ORDER_TYPE_UNSPECIFIED", + "VALUE", + "DELTA", + "SMART", + "HISTOGRAM_BUCKET", + "DIMENSION_AS_INTEGER" + ] + }, + "sortOrder": { + "enumDescriptions": [ + "If the sort order is unspecified, the default is ascending.", + "Ascending sort. The field will be sorted in an ascending manner.", + "Descending sort. The field will be sorted in a descending manner." + ], + "enum": [ + "SORT_ORDER_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ], + "description": "The sorting order for the field.", "type": "string" } }, - "id": "Dimension" + "id": "OrderBy" + }, + "Segment": { + "description": "The segment definition, if the report needs to be segmented.\nA Segment is a subset of the Analytics data. For example, of the entire\nset of users, one Segment might be users from a particular country or city.", + "type": "object", + "properties": { + "segmentId": { + "description": "The segment ID of a built-in or custom segment, for example `gaid::-3`.", + "type": "string" + }, + "dynamicSegment": { + "description": "A dynamic segment definition in the request.", + "$ref": "DynamicSegment" + } + }, + "id": "Segment" + }, + "SegmentSequenceStep": { + "description": "A segment sequence definition.", + "type": "object", + "properties": { + "orFiltersForSegment": { + "description": "A sequence is specified with a list of Or grouped filters which are\ncombined with `AND` operator.", + "type": "array", + "items": { + "$ref": "OrFiltersForSegment" + } + }, + "matchType": { + "description": "Specifies if the step immediately precedes or can be any time before the\nnext step.", + "type": "string", + "enumDescriptions": [ + "Unspecified match type is treated as precedes.", + "Operator indicates that the previous step precedes the next step.", + "Operator indicates that the previous step immediately precedes the next\nstep." + ], + "enum": [ + "UNSPECIFIED_MATCH_TYPE", + "PRECEDES", + "IMMEDIATELY_PRECEDES" + ] + } + }, + "id": "SegmentSequenceStep" + }, + "Metric": { + "description": "[Metrics](https://support.google.com/analytics/answer/1033861)\nare the quantitative measurements. For example, the metric `ga:users`\nindicates the total number of users for the requested time period.", + "type": "object", + "properties": { + "expression": { + "description": "A metric expression in the request. An expression is constructed from one\nor more metrics and numbers. Accepted operators include: Plus (+), Minus\n(-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,\nPositive cardinal numbers (0-9), can include decimals and is limited to\n1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the\nmetric expression is just a single metric name like `ga:users`.\nAdding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics\nwill result in unexpected results.", + "type": "string" + }, + "formattingType": { + "description": "Specifies how the metric expression should be formatted, for example\n`INTEGER`.", + "type": "string", + "enumDescriptions": [ + "Metric type is unspecified.", + "Integer metric.", + "Float metric.", + "Currency metric.", + "Percentage metric.", + "Time metric in `HH:MM:SS` format." + ], + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "INTEGER", + "FLOAT", + "CURRENCY", + "PERCENT", + "TIME" + ] + }, + "alias": { + "description": "An alias for the metric expression is an alternate name for the\nexpression. The alias can be used for filtering and sorting. This field\nis optional and is useful if the expression is not a single metric but\na complex expression which cannot be used in filtering and sorting.\nThe alias is also used in the response column header.", + "type": "string" + } + }, + "id": "Metric" }, "PivotValueRegion": { "description": "The metric values in the pivot region.", @@ -1053,111 +1018,146 @@ "id": "PivotValueRegion" } }, - "revision": "20161129", - "basePath": "", + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version_module": "True", "canonicalName": "AnalyticsReporting", - "discoveryVersion": "v1", - "baseUrl": "https://analyticsreporting.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/analytics": { + "description": "View and manage your Google Analytics data" + }, + "https://www.googleapis.com/auth/analytics.readonly": { + "description": "View your Google Analytics data" + } + } + } + }, + "rootUrl": "https://analyticsreporting.googleapis.com/", + "ownerDomain": "google.com", "name": "analyticsreporting", + "batchPath": "batch", + "title": "Google Analytics Reporting API", + "ownerName": "Google", + "resources": { + "reports": { + "methods": { + "batchGet": { + "flatPath": "v4/reports:batchGet", + "id": "analyticsreporting.reports.batchGet", + "path": "v4/reports:batchGet", + "request": { + "$ref": "GetReportsRequest" + }, + "description": "Returns the Analytics data.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "GetReportsResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + } + } + } + }, "parameters": { - "access_token": { - "description": "OAuth access token.", + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", - "default": "true", "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" + "default": "true" }, "fields": { "description": "Selector specifying which fields to include in a partial response.", "type": "string", "location": "query" }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, - "bearer_token": { - "description": "OAuth bearer token.", + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "key": { + "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", "location": "query" }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" } }, - "documentationLink": "https://developers.google.com/analytics/devguides/reporting/core/v4/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v4", - "rootUrl": "https://analyticsreporting.googleapis.com/", - "kind": "discovery#restDescription" + "baseUrl": "https://analyticsreporting.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Accesses Analytics report data.", + "servicePath": "" } diff --git a/etc/api/androidenterprise/v1/androidenterprise-api.json b/etc/api/androidenterprise/v1/androidenterprise-api.json index 3104fc8069..d1aab1e11f 100644 --- a/etc/api/androidenterprise/v1/androidenterprise-api.json +++ b/etc/api/androidenterprise/v1/androidenterprise-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/C94wtsy8mrHkcQY94KxE1tVMlOU\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/yataDr640bpajGP_lh8edeYDi-w\"", "discoveryVersion": "v1", "id": "androidenterprise:v1", "name": "androidenterprise", "canonicalName": "Android Enterprise", "version": "v1", - "revision": "20161207", + "revision": "20170516", "title": "Google Play EMM API", "description": "Manages the deployment of apps to Android for Work users.", "ownerDomain": "google.com", @@ -80,18 +80,18 @@ "Administrator": { "id": "Administrator", "type": "object", - "description": "This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.", + "description": "This represents an enterprise admin who can manage the enterprise in the managed Google Play store.", "properties": { "email": { "type": "string", - "description": "The administrator's email address." + "description": "The admin's email address." } } }, "AdministratorWebToken": { "id": "AdministratorWebToken", "type": "object", - "description": "A token authorizing an administrator to access an iframe.", + "description": "A token authorizing an admin to access an iframe.", "properties": { "kind": { "type": "string", @@ -259,7 +259,7 @@ }, "versionString": { "type": "string", - "description": "The string used in the Play Store by the app developer to identify the version. The string is not necessarily unique or localized (for example, the string could be \"1.4\")." + "description": "The string used in the Play store by the app developer to identify the version. The string is not necessarily unique or localized (for example, the string could be \"1.4\")." } } }, @@ -295,95 +295,14 @@ } } }, - "Collection": { - "id": "Collection", - "type": "object", - "description": "A collection resource defines a named set of apps that is visible to a set of users in the Google Play Store app running on those users' managed devices. Those users can then install any of those apps if they wish (which will trigger creation of install and entitlement resources). A user cannot install an app on a managed device unless the app is listed in at least one collection that is visible to that user.\n\nNote that the API can be used to directly install an app regardless of whether it is in any collection - so an enterprise has a choice of either directly pushing apps to users, or allowing users to install apps if they want. Which is appropriate will depend on the enterprise's policies and the purpose of the apps concerned.", - "properties": { - "collectionId": { - "type": "string", - "description": "Arbitrary unique ID, allocated by the API on creation." - }, - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#collection\".", - "default": "androidenterprise#collection" - }, - "name": { - "type": "string", - "description": "A user-friendly name for the collection (should be unique), e.g. \"Accounting apps\".", - "annotations": { - "required": [ - "androidenterprise.collections.insert", - "androidenterprise.collections.update" - ] - } - }, - "productId": { - "type": "array", - "description": "The IDs of the products in the collection, in the order in which they should be displayed.", - "items": { - "type": "string" - }, - "annotations": { - "required": [ - "androidenterprise.collections.insert", - "androidenterprise.collections.update" - ] - } - }, - "visibility": { - "type": "string", - "description": "Whether this collection is visible to all users, or only to the users that have been granted access through the \"Collectionviewers\" API. With the launch of the \"setAvailableProductSet\" API, this property should always be set to \"viewersOnly\", as the \"allUsers\" option will bypass the \"availableProductSet\" for all users within a domain.\n\nThe \"allUsers\" setting is deprecated, and will be removed." - } - } - }, - "CollectionViewersListResponse": { - "id": "CollectionViewersListResponse", - "type": "object", - "description": "The user resources for the collection.", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#collectionViewersListResponse\".", - "default": "androidenterprise#collectionViewersListResponse" - }, - "user": { - "type": "array", - "description": "A user of an enterprise.", - "items": { - "$ref": "User" - } - } - } - }, - "CollectionsListResponse": { - "id": "CollectionsListResponse", - "type": "object", - "description": "The collection resources for the enterprise.", - "properties": { - "collection": { - "type": "array", - "description": "An ordered collection of products which can be made visible on the Google Play Store to a selected group of users.", - "items": { - "$ref": "Collection" - } - }, - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#collectionsListResponse\".", - "default": "androidenterprise#collectionsListResponse" - } - } - }, "Device": { "id": "Device", "type": "object", - "description": "A device resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.\n\nThis collection cannot be modified via the API; it is automatically populated as devices are set up to be managed.", + "description": "A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.\n\nThis collection cannot be modified via the API. It is automatically populated as devices are set up to be managed.", "properties": { "androidId": { "type": "string", - "description": "The Google Play Services Android ID for the device encoded as a lowercase hex string, e.g. \"123456789abcdef0\"." + "description": "The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, \"123456789abcdef0\"." }, "kind": { "type": "string", @@ -392,7 +311,7 @@ }, "managementType": { "type": "string", - "description": "Identifies the extent to which the device is controlled by an Android for Work EMM in various deployment configurations.\n\nPossible values include: \n- \"managedDevice\", a device that has the EMM's device policy controller (DPC) as the device owner, \n- \"managedProfile\", a device that has a work profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC, \n- \"containerApp\", a device running the Android for Work App. The Android for Work App is managed by the DPC, \n- \"unmanagedProfile\", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use Android for Work apps or Google Apps for Work, but the profile is itself not owned by a DPC." + "description": "Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations.\n\nPossible values include: \n- \"managedDevice\", a device that has the EMM's device policy controller (DPC) as the device owner. \n- \"managedProfile\", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC. \n- \"containerApp\", no longer used (deprecated). \n- \"unmanagedProfile\", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC." } } }, @@ -434,11 +353,11 @@ "Enterprise": { "id": "Enterprise", "type": "object", - "description": "An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows: \n- For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process. \n- For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.", + "description": "An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows: \n- For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process. \n- For managed Google Play Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the managed Google Play sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.", "properties": { "administrator": { "type": "array", - "description": "Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.", + "description": "Admins of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.", "items": { "$ref": "Administrator" } @@ -519,7 +438,7 @@ "Entitlement": { "id": "Entitlement", "type": "object", - "description": "The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise.\n\nIt should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the EMM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails.\n\nNote that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices.\n\nThe API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted.\n\nEntitlements for paid apps that are due to purchases by the user on a non-managed profile will have \"userPurchase\" as entitlement reason; those entitlements cannot be removed via the API.", + "description": "The presence of an Entitlements resource indicates that a user has the right to use a particular app. Entitlements are user specific, not device specific. This allows a user with an entitlement to an app to install the app on all their devices. It's also possible for a user to hold an entitlement to an app without installing the app on any device.\n\nThe API can be used to create an entitlement. As an option, you can also use the API to trigger the installation of an app on all a user's managed devices at the same time the entitlement is created.\n\nIf the app is free, creating the entitlement also creates a group license for that app. For paid apps, creating the entitlement consumes one license, and that license remains consumed until the entitlement is removed. If the enterprise hasn't purchased enough licenses, then no entitlement is created and the installation fails. An entitlement is also not created for an app if the app requires permissions that the enterprise hasn't accepted.\n\nIf an entitlement is deleted, the app may be uninstalled from a user's device. As a best practice, uninstall the app by calling Installs.delete() before deleting the entitlement.\n\nEntitlements for apps that a user pays for on an unmanaged profile have \"userPurchase\" as the entitlement reason. These entitlements cannot be removed via the API.", "properties": { "kind": { "type": "string", @@ -528,11 +447,11 @@ }, "productId": { "type": "string", - "description": "The ID of the product that the entitlement is for, e.g. \"app:com.google.android.gm\"." + "description": "The ID of the product that the entitlement is for. For example, \"app:com.google.android.gm\"." }, "reason": { "type": "string", - "description": "The reason for the entitlement, e.g. \"free\" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses." + "description": "The reason for the entitlement. For example, \"free\" for free apps. This property is temporary: it will be replaced by the acquisition kind field of group licenses." } } }, @@ -562,11 +481,11 @@ "properties": { "acquisitionKind": { "type": "string", - "description": "How this group license was acquired. \"bulkPurchase\" means that this group license object was created because the enterprise purchased licenses for this product; this is \"free\" otherwise (for free products)." + "description": "How this group license was acquired. \"bulkPurchase\" means that this Grouplicenses resource was created because the enterprise purchased licenses for this product; otherwise, the value is \"free\" (for free products)." }, "approval": { "type": "string", - "description": "Whether the product to which this group license relates is currently approved by the enterprise, as either \"approved\" or \"unapproved\". Products are approved when a group license is first created, but this approval may be revoked by an enterprise admin via Google Play. Unapproved products will not be visible to end users in collections and new entitlements to them should not normally be created." + "description": "Whether the product to which this group license relates is currently approved by the enterprise. Products are approved when a group license is first created, but this approval may be revoked by an enterprise admin via Google Play. Unapproved products will not be visible to end users in collections, and new entitlements to them should not normally be created." }, "kind": { "type": "string", @@ -580,12 +499,16 @@ }, "numPurchased": { "type": "integer", - "description": "The number of purchased licenses (possibly in multiple purchases). If this field is omitted then there is no limit on the number of licenses that can be provisioned (e.g. if the acquisition kind is \"free\").", + "description": "The number of purchased licenses (possibly in multiple purchases). If this field is omitted, then there is no limit on the number of licenses that can be provisioned (for example, if the acquisition kind is \"free\").", "format": "int32" }, + "permissions": { + "type": "string", + "description": "The permission approval status of the product. This field is only set if the product is approved. Possible states are: \n- \"currentApproved\", the current set of permissions is approved, but additional permissions will require the administrator to reapprove the product (If the product was approved without specifying the approved permissions setting, then this is the default behavior.), \n- \"needsReapproval\", the product has unapproved permissions. No additional product licenses can be assigned until the product is reapproved, \n- \"allCurrentAndFutureApproved\", the current permissions are approved and any future permission updates will be automatically approved without administrator review." + }, "productId": { "type": "string", - "description": "The ID of the product that the license is for, e.g. \"app:com.google.android.gm\"." + "description": "The ID of the product that the license is for. For example, \"app:com.google.android.gm\"." } } }, @@ -630,7 +553,7 @@ "Install": { "id": "Install", "type": "object", - "description": "The existence of an install resource indicates that an app is installed on a particular device (or that an install is pending).\n\nThe API can be used to create an install resource using the update method. This triggers the actual install of the app on the device. If the user does not already have an entitlement for the app then an attempt is made to create one. If this fails (e.g. because the app is not free and there is no available license) then the creation of the install fails.\n\nThe API can also be used to update an installed app. If the update method is used on an existing install then the app will be updated to the latest available version.\n\nNote that it is not possible to force the installation of a specific version of an app; the version code is read-only.\n\nIf a user installs an app themselves (as permitted by the enterprise), then again an install resource and possibly an entitlement resource are automatically created.\n\nThe API can also be used to delete an install resource, which triggers the removal of the app from the device. Note that deleting an install does not automatically remove the corresponding entitlement, even if there are no remaining installs. The install resource will also be deleted if the user uninstalls the app themselves.", + "description": "The existence of an Installs resource indicates that an app is installed on a particular device (or that an install is pending).\n\nThe API can be used to create an install resource using the update method. This triggers the actual install of the app on the device. If the user does not already have an entitlement for the app, then an attempt is made to create one. If this fails (for example, because the app is not free and there is no available license), then the creation of the install fails.\n\nThe API can also be used to update an installed app. If the update method is used on an existing install, then the app will be updated to the latest available version.\n\nNote that it is not possible to force the installation of a specific version of an app: the version code is read-only.\n\nIf a user installs an app themselves (as permitted by the enterprise), then again an install resource and possibly an entitlement resource are automatically created.\n\nThe API can also be used to delete an install resource, which triggers the removal of the app from the device. Note that deleting an install does not automatically remove the corresponding entitlement, even if there are no remaining installs. The install resource will also be deleted if the user uninstalls the app themselves.", "properties": { "installState": { "type": "string", @@ -643,7 +566,7 @@ }, "productId": { "type": "string", - "description": "The ID of the product that the install is for, e.g. \"app:com.google.android.gm\"." + "description": "The ID of the product that the install is for. For example, \"app:com.google.android.gm\"." }, "versionCode": { "type": "integer", @@ -830,6 +753,25 @@ } } }, + "NewDeviceEvent": { + "id": "NewDeviceEvent", + "type": "object", + "description": "An event generated when a new device is ready to be managed.", + "properties": { + "deviceId": { + "type": "string", + "description": "The Android ID of the device. This field will always be present." + }, + "managementType": { + "type": "string", + "description": "Identifies the extent to which the device is controlled by an Android EMM in various deployment configurations.\n\nPossible values include: \n- \"managedDevice\", a device where the DPC is set as device owner, \n- \"managedProfile\", a device where the DPC is set as profile owner." + }, + "userId": { + "type": "string", + "description": "The ID of the user. This field will always be present." + } + } + }, "NewPermissionsEvent": { "id": "NewPermissionsEvent", "type": "object", @@ -876,10 +818,18 @@ "$ref": "InstallFailureEvent", "description": "Notifications about an app installation failure." }, + "newDeviceEvent": { + "$ref": "NewDeviceEvent", + "description": "Notifications about new devices." + }, "newPermissionsEvent": { "$ref": "NewPermissionsEvent", "description": "Notifications about new app permissions." }, + "notificationType": { + "type": "string", + "description": "Type of the notification." + }, "productApprovalEvent": { "$ref": "ProductApprovalEvent", "description": "Notifications about changes to a product's approval status." @@ -939,11 +889,11 @@ "Permission": { "id": "Permission", "type": "object", - "description": "A permission represents some extra capability, to be granted to an Android app, which requires explicit consent. An enterprise admin must consent to these permissions on behalf of their users before an entitlement for the app can be created.\n\nThe permissions collection is read-only. The information provided for each permission (localized name and description) is intended to be used in the EMM user interface when obtaining consent from the enterprise.", + "description": "A Permissions resource represents some extra capability, to be granted to an Android app, which requires explicit consent. An enterprise admin must consent to these permissions on behalf of their users before an entitlement for the app can be created.\n\nThe permissions collection is read-only. The information provided for each permission (localized name and description) is intended to be used in the MDM user interface when obtaining consent from the enterprise.", "properties": { "description": { "type": "string", - "description": "A longer description of the permissions giving more details of what it affects." + "description": "A longer description of the Permissions resource, giving more details of what it affects." }, "kind": { "type": "string", @@ -963,7 +913,7 @@ "Product": { "id": "Product", "type": "object", - "description": "A Products resource represents an app in the Google Play Store that is available to at least some users in the enterprise. (Some apps are restricted to a single enterprise, and no information about them is made available outside that enterprise.)\n\nThe information provided for each product (localized name, icon, link to the full Google Play details page) is intended to allow a basic representation of the product within an EMM user interface.", + "description": "A Products resource represents an app in the Google Play store that is available to at least some users in the enterprise. (Some apps are restricted to a single enterprise, and no information about them is made available outside that enterprise.)\n\nThe information provided for each product (localized name, icon, link to the full Google Play details page) is intended to allow a basic representation of the product within an EMM user interface.", "properties": { "appVersion": { "type": "array", @@ -974,7 +924,7 @@ }, "authorName": { "type": "string", - "description": "The name of the author of the product (e.g. the app developer)." + "description": "The name of the author of the product (for example, the app developer)." }, "detailsUrl": { "type": "string", @@ -982,7 +932,7 @@ }, "distributionChannel": { "type": "string", - "description": "How and to whom the package is made available. The value publicGoogleHosted means that the package is available through the Play Store and not restricted to a specific enterprise. The value privateGoogleHosted means that the package is a private app (restricted to an enterprise) but hosted by Google. The value privateSelfHosted means that the package is a private app (restricted to an enterprise) and is privately hosted." + "description": "How and to whom the package is made available. The value publicGoogleHosted means that the package is available through the Play store and not restricted to a specific enterprise. The value privateGoogleHosted means that the package is a private app (restricted to an enterprise) but hosted by Google. The value privateSelfHosted means that the package is a private app (restricted to an enterprise) and is privately hosted." }, "iconUrl": { "type": "string", @@ -1003,7 +953,7 @@ }, "requiresContainerApp": { "type": "boolean", - "description": "Whether this app can only be installed on devices using the Android for Work container app." + "description": "Deprecated." }, "smallIconUrl": { "type": "string", @@ -1015,7 +965,7 @@ }, "workDetailsUrl": { "type": "string", - "description": "A link to the Google Play for Work details page for the product, for use by an Enterprise administrator." + "description": "A link to the managed Google Play details page for the product, for use by an Enterprise admin." } } }, @@ -1079,11 +1029,6 @@ "description": "The permissions required by the app.", "items": { "$ref": "ProductPermission" - }, - "annotations": { - "required": [ - "androidenterprise.products.updatePermissions" - ] } }, "productId": { @@ -1111,7 +1056,7 @@ }, "productSetBehavior": { "type": "string", - "description": "The interpretation of this product set. \"unknown\" should never be sent and ignored if received. \"whitelist\" means that this product set constitutes a whitelist. \"includeAll\" means that all products are accessible, including products that are approved, not approved, and even products where approval has been revoked. If the value is \"includeAll\", the value of the productId field is therefore ignored. If a value is not supplied, it is interpreted to be \"whitelist\" for backwards compatibility." + "description": "The interpretation of this product set. \"unknown\" should never be sent and is ignored if received. \"whitelist\" means that the user is entitled to access the product set. \"includeAll\" means that all products are accessible, including products that are approved, products with revoked approval, and products that have never been approved. \"allApproved\" means that the user is entitled to access all products that are approved for the enterprise. If the value is \"allApproved\" or \"includeAll\", the productId field is ignored. If no value is provided, it is interpreted as \"whitelist\" for backwards compatibility." } } }, @@ -1122,6 +1067,10 @@ "approvalUrlInfo": { "$ref": "ApprovalUrlInfo", "description": "The approval URL that was shown to the user. Only the permissions shown to the user with that URL will be accepted, which may not be the product's entire set of permissions. For example, the URL may only display new permissions from an update after the product was approved, or not include new permissions if the product was updated since the URL was generated." + }, + "approvedPermissions": { + "type": "string", + "description": "Sets how new permission requests for the product are handled. \"allPermissions\" automatically approves all current and future permissions for the product. \"currentPermissionsOnly\" approves the current set of permissions for the product, but any future permissions added through updates will require manual reapproval. If not specified, only the current set of permissions will be approved." } } }, @@ -1151,7 +1100,7 @@ }, "product": { "type": "array", - "description": "Information about a product (e.g. an app) in the Google Play Store, for display to an enterprise admin.", + "description": "Information about a product (e.g. an app) in the Google Play store, for display to an enterprise admin.", "items": { "$ref": "Product" } @@ -1251,7 +1200,7 @@ "StoreCluster": { "id": "StoreCluster", "type": "object", - "description": "Definition of a Google Play for Work store cluster, a list of products displayed as part of a store page.", + "description": "Definition of a managed Google Play store cluster, a list of products displayed as part of a store page.", "properties": { "id": { "type": "string", @@ -1285,11 +1234,11 @@ "StoreLayout": { "id": "StoreLayout", "type": "object", - "description": "General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened.", + "description": "General setting for the managed Google Play store layout, currently only specifying the page to display the first time the store is opened.", "properties": { "homepageId": { "type": "string", - "description": "The ID of the store page to be used as the homepage. The homepage will be used as the first page shown in the Google Play for Work store.\n\nIf a homepage has not been set, the Play store shown on devices will be empty. Not specifying a homepage on a store layout effectively empties the store.\n\nIf there exists at least one page, this field must be set to the ID of a valid page." + "description": "The ID of the store page to be used as the homepage. The homepage is the first page shown in the managed Google Play Store.\n\nNot specifying a homepage is equivalent to setting the store layout type to \"basic\"." }, "kind": { "type": "string", @@ -1298,7 +1247,7 @@ }, "storeLayoutType": { "type": "string", - "description": "The store layout type. By default, this value is set to \"basic\". If set to \"custom\", \"homepageId\" must be specified. If set to \"basic\", the layout will consist of all approved apps accessible by the user, split in pages of 100 each; in this case, \"homepageId\" must not be specified. The \"basic\" setting takes precedence over any existing collections setup for this enterprise (if any). Should the enterprise use collectionViewers for controlling access rights, these will still be respected." + "description": "The store layout type. By default, this value is set to \"basic\" if the homepageId field is not set, and to \"custom\" otherwise. If set to \"basic\", the layout will consist of all approved apps that have been whitelisted for the user." } } }, @@ -1343,7 +1292,7 @@ "StorePage": { "id": "StorePage", "type": "object", - "description": "Definition of a Google Play for Work store page, made of a localized name and links to other pages. A page also contains clusters defined as a subcollection.", + "description": "Definition of a managed Google Play store page, made of a localized name and links to other pages. A page also contains clusters defined as a subcollection.", "properties": { "id": { "type": "string", @@ -1385,7 +1334,7 @@ "User": { "id": "User", "type": "object", - "description": "A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to Google Play for Work only, or to other Google services, depending on the identity model: \n- Google managed domain identity model requires synchronization to Google account sources (via primaryEmail). \n- Android for Work Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to Google Play for Work only.", + "description": "A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to managed Google Play only, or to other Google services, depending on the identity model: \n- The Google managed domain identity model requires synchronization to Google account sources (via primaryEmail). \n- The managed Google Play Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to managed Google Play.", "properties": { "accountIdentifier": { "type": "string", @@ -1431,7 +1380,7 @@ "UserToken": { "id": "UserToken", "type": "object", - "description": "A UserToken is used by a user when setting up a managed device or profile with their work account on a device. When the user enters their email address and token (activation code) the appropriate EMM app can be automatically downloaded.", + "description": "A UserToken is used by a user when setting up a managed device or profile with their managed Google Play account on a device. When the user enters their email address and token (activation code) the appropriate EMM app can be automatically downloaded.", "properties": { "kind": { "type": "string", @@ -1469,367 +1418,6 @@ } }, "resources": { - "collections": { - "methods": { - "delete": { - "id": "androidenterprise.collections.delete", - "path": "enterprises/{enterpriseId}/collections/{collectionId}", - "httpMethod": "DELETE", - "description": "Deletes a collection.", - "parameters": { - "collectionId": { - "type": "string", - "description": "The ID of the collection.", - "required": true, - "location": "path" - }, - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "collectionId" - ], - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - }, - "get": { - "id": "androidenterprise.collections.get", - "path": "enterprises/{enterpriseId}/collections/{collectionId}", - "httpMethod": "GET", - "description": "Retrieves the details of a collection.", - "parameters": { - "collectionId": { - "type": "string", - "description": "The ID of the collection.", - "required": true, - "location": "path" - }, - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "collectionId" - ], - "response": { - "$ref": "Collection" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - }, - "insert": { - "id": "androidenterprise.collections.insert", - "path": "enterprises/{enterpriseId}/collections", - "httpMethod": "POST", - "description": "Creates a new collection.", - "parameters": { - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId" - ], - "request": { - "$ref": "Collection" - }, - "response": { - "$ref": "Collection" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - }, - "list": { - "id": "androidenterprise.collections.list", - "path": "enterprises/{enterpriseId}/collections", - "httpMethod": "GET", - "description": "Retrieves the IDs of all the collections for an enterprise.", - "parameters": { - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId" - ], - "response": { - "$ref": "CollectionsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - }, - "patch": { - "id": "androidenterprise.collections.patch", - "path": "enterprises/{enterpriseId}/collections/{collectionId}", - "httpMethod": "PATCH", - "description": "Updates a collection. This method supports patch semantics.", - "parameters": { - "collectionId": { - "type": "string", - "description": "The ID of the collection.", - "required": true, - "location": "path" - }, - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "collectionId" - ], - "request": { - "$ref": "Collection" - }, - "response": { - "$ref": "Collection" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - }, - "update": { - "id": "androidenterprise.collections.update", - "path": "enterprises/{enterpriseId}/collections/{collectionId}", - "httpMethod": "PUT", - "description": "Updates a collection.", - "parameters": { - "collectionId": { - "type": "string", - "description": "The ID of the collection.", - "required": true, - "location": "path" - }, - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "collectionId" - ], - "request": { - "$ref": "Collection" - }, - "response": { - "$ref": "Collection" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - } - } - }, - "collectionviewers": { - "methods": { - "delete": { - "id": "androidenterprise.collectionviewers.delete", - "path": "enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}", - "httpMethod": "DELETE", - "description": "Removes the user from the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection.", - "parameters": { - "collectionId": { - "type": "string", - "description": "The ID of the collection.", - "required": true, - "location": "path" - }, - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - }, - "userId": { - "type": "string", - "description": "The ID of the user.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "collectionId", - "userId" - ], - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - }, - "get": { - "id": "androidenterprise.collectionviewers.get", - "path": "enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}", - "httpMethod": "GET", - "description": "Retrieves the ID of the user if they have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection.", - "parameters": { - "collectionId": { - "type": "string", - "description": "The ID of the collection.", - "required": true, - "location": "path" - }, - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - }, - "userId": { - "type": "string", - "description": "The ID of the user.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "collectionId", - "userId" - ], - "response": { - "$ref": "User" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - }, - "list": { - "id": "androidenterprise.collectionviewers.list", - "path": "enterprises/{enterpriseId}/collections/{collectionId}/users", - "httpMethod": "GET", - "description": "Retrieves the IDs of the users who have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection.", - "parameters": { - "collectionId": { - "type": "string", - "description": "The ID of the collection.", - "required": true, - "location": "path" - }, - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "collectionId" - ], - "response": { - "$ref": "CollectionViewersListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - }, - "patch": { - "id": "androidenterprise.collectionviewers.patch", - "path": "enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}", - "httpMethod": "PATCH", - "description": "Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. This method supports patch semantics.", - "parameters": { - "collectionId": { - "type": "string", - "description": "The ID of the collection.", - "required": true, - "location": "path" - }, - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - }, - "userId": { - "type": "string", - "description": "The ID of the user.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "collectionId", - "userId" - ], - "request": { - "$ref": "User" - }, - "response": { - "$ref": "User" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - }, - "update": { - "id": "androidenterprise.collectionviewers.update", - "path": "enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}", - "httpMethod": "PUT", - "description": "Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection.", - "parameters": { - "collectionId": { - "type": "string", - "description": "The ID of the collection.", - "required": true, - "location": "path" - }, - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - }, - "userId": { - "type": "string", - "description": "The ID of the user.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "collectionId", - "userId" - ], - "request": { - "$ref": "User" - }, - "response": { - "$ref": "User" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] - } - } - }, "devices": { "methods": { "get": { @@ -2024,7 +1612,7 @@ "id": "androidenterprise.enterprises.createWebToken", "path": "enterprises/{enterpriseId}/createWebToken", "httpMethod": "POST", - "description": "Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the Play for Work javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information.", + "description": "Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the managed Google Play javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information.", "parameters": { "enterpriseId": { "type": "string", @@ -2050,7 +1638,7 @@ "id": "androidenterprise.enterprises.delete", "path": "enterprises/{enterpriseId}", "httpMethod": "DELETE", - "description": "Deletes the binding between the EMM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call.", + "description": "Deletes the binding between the EMM and enterprise. This is now deprecated. Use this method only to unenroll customers that were previously enrolled with the insert call, then enroll them again with the enroll call.", "parameters": { "enterpriseId": { "type": "string", @@ -2174,7 +1762,7 @@ "id": "androidenterprise.enterprises.getStoreLayout", "path": "enterprises/{enterpriseId}/storeLayout", "httpMethod": "GET", - "description": "Returns the store layout for the enterprise. If the store layout has not been set, or if the store layout has no homepageId set, returns a NOT_FOUND error.", + "description": "Returns the store layout for the enterprise. If the store layout has not been set, returns \"basic\" as the store layout type and no homepage.", "parameters": { "enterpriseId": { "type": "string", @@ -2246,7 +1834,7 @@ "id": "androidenterprise.enterprises.pullNotificationSet", "path": "enterprises/pullNotificationSet", "httpMethod": "POST", - "description": "Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending.\nA notification set returned needs to be acknowledged within 20 seconds by calling Enterprises\u200b.AcknowledgeNotificationSet, unless the notification set is empty.\nNotifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy.\nMultiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending.\nIf no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available.", + "description": "Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending.\nA notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set is empty.\nNotifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy.\nMultiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending.\nIf no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available.", "parameters": { "requestMode": { "type": "string", @@ -2296,7 +1884,7 @@ "id": "androidenterprise.enterprises.setAccount", "path": "enterprises/{enterpriseId}/account", "httpMethod": "PUT", - "description": "Set the account that will be used to authenticate to the API as the enterprise.", + "description": "Sets the account that will be used to authenticate to the API as the enterprise.", "parameters": { "enterpriseId": { "type": "string", @@ -2322,7 +1910,7 @@ "id": "androidenterprise.enterprises.setStoreLayout", "path": "enterprises/{enterpriseId}/storeLayout", "httpMethod": "PUT", - "description": "Sets the store layout for the enterprise. By default, storeLayoutType is set to \"basic\" and the basic store layout is enabled. The basic layout only contains apps approved by the administrator, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = \"custom\"), the basic store layout is disabled.", + "description": "Sets the store layout for the enterprise. By default, storeLayoutType is set to \"basic\" and the basic store layout is enabled. The basic layout only contains apps approved by the admin, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = \"custom\" and setting a homepage), the basic store layout is disabled.", "parameters": { "enterpriseId": { "type": "string", @@ -2372,7 +1960,7 @@ "id": "androidenterprise.entitlements.delete", "path": "enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}", "httpMethod": "DELETE", - "description": "Removes an entitlement to an app for a user and uninstalls it.", + "description": "Removes an entitlement to an app for a user.", "parameters": { "enterpriseId": { "type": "string", @@ -2443,7 +2031,7 @@ "id": "androidenterprise.entitlements.list", "path": "enterprises/{enterpriseId}/users/{userId}/entitlements", "httpMethod": "GET", - "description": "List of all entitlements for the specified user. Only the ID is set.", + "description": "Lists all entitlements for the specified user. Only the ID is set.", "parameters": { "enterpriseId": { "type": "string", @@ -2780,7 +2368,7 @@ "id": "androidenterprise.installs.patch", "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}", "httpMethod": "PATCH", - "description": "Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics.", + "description": "Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. This method supports patch semantics.", "parameters": { "deviceId": { "type": "string", @@ -2827,7 +2415,7 @@ "id": "androidenterprise.installs.update", "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}", "httpMethod": "PUT", - "description": "Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary.", + "description": "Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary.", "parameters": { "deviceId": { "type": "string", @@ -3315,7 +2903,7 @@ "id": "androidenterprise.products.approve", "path": "enterprises/{enterpriseId}/products/{productId}/approve", "httpMethod": "POST", - "description": "Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000.\n\nTo learn how to use Google Play for Work to design and create a store layout to display approved products to your users, see Store Layout Design.", + "description": "Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000.\n\nTo learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design.", "parameters": { "enterpriseId": { "type": "string", @@ -3415,7 +3003,7 @@ "id": "androidenterprise.products.getAppRestrictionsSchema", "path": "enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema", "httpMethod": "GET", - "description": "Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an administrator to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play.", + "description": "Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play.", "parameters": { "enterpriseId": { "type": "string", @@ -3506,12 +3094,12 @@ }, "query": { "type": "string", - "description": "The search query as typed in the Google Play Store search box. If omitted, all approved apps will be returned (using the pagination parameters), including apps that are not available in the store (e.g. unpublished apps).", + "description": "The search query as typed in the Google Play store search box. If omitted, all approved apps will be returned (using the pagination parameters), including apps that are not available in the store (e.g. unpublished apps).", "location": "query" }, "token": { "type": "string", - "description": "A pagination token is contained in a request\u0092s response when there are more products. The token can be used in a subsequent request to obtain more products, and so forth. This parameter cannot be used in the initial request.", + "description": "A pagination token is contained in a request''s response when there are more products. The token can be used in a subsequent request to obtain more products, and so forth. This parameter cannot be used in the initial request.", "location": "query" } }, @@ -3551,39 +3139,6 @@ "scopes": [ "https://www.googleapis.com/auth/androidenterprise" ] - }, - "updatePermissions": { - "id": "androidenterprise.products.updatePermissions", - "path": "enterprises/{enterpriseId}/products/{productId}/permissions", - "httpMethod": "PUT", - "description": "This method has been deprecated. To programmatically approve applications, you must use the iframe mechanism via the generateApprovalUrl and approve methods of the Products resource. For more information, see the Play EMM API usage requirements.\n\nThe updatePermissions method (deprecated) updates the set of Android app permissions for this app that have been accepted by the enterprise.", - "parameters": { - "enterpriseId": { - "type": "string", - "description": "The ID of the enterprise.", - "required": true, - "location": "path" - }, - "productId": { - "type": "string", - "description": "The ID of the product.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "enterpriseId", - "productId" - ], - "request": { - "$ref": "ProductPermissions" - }, - "response": { - "$ref": "ProductPermissions" - }, - "scopes": [ - "https://www.googleapis.com/auth/androidenterprise" - ] } } }, @@ -4124,7 +3679,7 @@ "id": "androidenterprise.users.generateToken", "path": "enterprises/{enterpriseId}/users/{userId}/token", "httpMethod": "POST", - "description": "Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token.\n\nThis call only works with Google managed accounts.", + "description": "Generates a token (activation code) to allow this user to configure their managed account in the Android Setup Wizard. Revokes any previously generated token.\n\nThis call only works with Google managed accounts.", "parameters": { "enterpriseId": { "type": "string", @@ -4330,7 +3885,7 @@ "id": "androidenterprise.users.setAvailableProductSet", "path": "enterprises/{enterpriseId}/users/{userId}/availableProductSet", "httpMethod": "PUT", - "description": "Modifies the set of products a user is entitled to access.", + "description": "Modifies the set of products that a user is entitled to access (referred to as whitelisted products). Only products that are approved or products that were previously approved (products with revoked approval) can be whitelisted.", "parameters": { "enterpriseId": { "type": "string", diff --git a/etc/api/androidpublisher/v1.1/androidpublisher-api.json b/etc/api/androidpublisher/v1.1/androidpublisher-api.json index 4d84c2f4be..30d5c2a560 100644 --- a/etc/api/androidpublisher/v1.1/androidpublisher-api.json +++ b/etc/api/androidpublisher/v1.1/androidpublisher-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/uePHydzmUhZLWLtyPJ_GHjROU1A\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/BgmM1OT-KHhvjiDWu7WvxnqRVeE\"", "discoveryVersion": "v1", "id": "androidpublisher:v1.1", "name": "androidpublisher", "canonicalName": "Android Publisher", "version": "v1.1", - "revision": "20161212", + "revision": "20170425", "title": "Google Play Developer API", "description": "Lets Android application developers access their Google Play accounts.", "ownerDomain": "google.com", diff --git a/etc/api/androidpublisher/v1/androidpublisher-api.json b/etc/api/androidpublisher/v1/androidpublisher-api.json index 5dbf10509b..3268d20c94 100644 --- a/etc/api/androidpublisher/v1/androidpublisher-api.json +++ b/etc/api/androidpublisher/v1/androidpublisher-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/u6dk5tV6sEWmibYvR51NT009Z2c\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/EHPUFMgwVHTdOk4cp40HksrOITo\"", "discoveryVersion": "v1", "id": "androidpublisher:v1", "name": "androidpublisher", "canonicalName": "Android Publisher", "version": "v1", - "revision": "20161212", + "revision": "20170425", "title": "Google Play Developer API", "description": "Lets Android application developers access their Google Play accounts.", "ownerDomain": "google.com", diff --git a/etc/api/androidpublisher/v2/androidpublisher-api.json b/etc/api/androidpublisher/v2/androidpublisher-api.json index afd903ae5e..9e6fd04684 100644 --- a/etc/api/androidpublisher/v2/androidpublisher-api.json +++ b/etc/api/androidpublisher/v2/androidpublisher-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/PcoD2XCBeKQPYDG0dclnfJ5T-Ho\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/dYMiE8hKqa-VooV0hGawF9oUXnw\"", "discoveryVersion": "v1", "id": "androidpublisher:v2", "name": "androidpublisher", "canonicalName": "Android Publisher", "version": "v2", - "revision": "20161212", + "revision": "20170425", "title": "Google Play Developer API", "description": "Lets Android application developers access their Google Play accounts.", "ownerDomain": "google.com", @@ -1016,6 +1016,11 @@ "type": "string", "description": "Time at which the subscription was granted, in milliseconds since the Epoch.", "format": "int64" + }, + "userCancellationTimeMillis": { + "type": "string", + "description": "The time at which the subscription was canceled by the user, in milliseconds since the epoch. Only present if cancelReason is 0.", + "format": "int64" } } }, @@ -1183,7 +1188,7 @@ "VoidedPurchase": { "id": "VoidedPurchase", "type": "object", - "description": "A VoidedPurchase resource indicates the purchase was either cancelled/refunded/charged-back.", + "description": "A VoidedPurchase resource indicates a purchase that was either cancelled/refunded/charged-back.", "properties": { "kind": { "type": "string", @@ -1192,16 +1197,16 @@ }, "purchaseTimeMillis": { "type": "string", - "description": "The time the purchase was made, in milliseconds since the epoch (Jan 1, 1970).", + "description": "The time at which the purchase was made, in milliseconds since the epoch (Jan 1, 1970).", "format": "int64" }, "purchaseToken": { "type": "string", - "description": "The token that was generated when a purchase was made and uniquely identifies a purchase." + "description": "The token that was generated when a purchase was made. This uniquely identifies a purchase." }, "voidedTimeMillis": { "type": "string", - "description": "The time when the purchase was cancelled/refunded/chargeback, in milliseconds since the epoch (Jan 1, 1970).", + "description": "The time at which the purchase was cancelled/refunded/charged-back, in milliseconds since the epoch (Jan 1, 1970).", "format": "int64" } } @@ -3486,7 +3491,7 @@ "parameters": { "endTime": { "type": "string", - "description": "The end time of list window, in milliseconds since the epoch (Jan 1, 1970). If not specified, default to current time, which is also the latest accepted end time. This parameter will be ignored if pagination token is set.", + "description": "The time, in milliseconds since the Epoch, of the newest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time.", "format": "int64", "location": "query" }, @@ -3508,7 +3513,7 @@ }, "startTime": { "type": "string", - "description": "The start time of list window, in milliseconds since the epoch (Jan 1, 1970). If not specified, default to current time - 30 days, which is also the earlies accepted start time. This parameter will be ignored if pagination token is set.", + "description": "The time, in milliseconds since the Epoch, of the oldest voided in-app product purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days.", "format": "int64", "location": "query" }, @@ -3570,7 +3575,7 @@ "id": "androidpublisher.reviews.list", "path": "{packageName}/reviews", "httpMethod": "GET", - "description": "Returns a list of reviews.", + "description": "Returns a list of reviews. Only reviews from last week will be returned.", "parameters": { "maxResults": { "type": "integer", diff --git a/etc/api/api-list.yaml b/etc/api/api-list.yaml index d8dbc8412a..560605c22c 100644 --- a/etc/api/api-list.yaml +++ b/etc/api/api-list.yaml @@ -59,6 +59,8 @@ api: - v2 clouderrorreporting: - v1beta1 + cloudkms: + - v1beta1 cloudlatencytest: - v2 cloudmonitoring: @@ -206,6 +208,8 @@ api: - v4 script: - v1 + searchconsole: + - v1 servicecontrol: - v1 servicemanagement: diff --git a/etc/api/appengine/v1/appengine-api.json b/etc/api/appengine/v1/appengine-api.json index 738a81d13d..db7ffedfc6 100644 --- a/etc/api/appengine/v1/appengine-api.json +++ b/etc/api/appengine/v1/appengine-api.json @@ -1,2214 +1,2505 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/CydBYfZ8LICDy6eugptbrOxuOz0\"", - "discoveryVersion": "v1", - "id": "appengine:v1", - "name": "appengine", - "version": "v1", - "revision": "20161208", - "title": "Google App Engine Admin API", - "description": "Provisions and manages App Engine applications.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/appengine/docs/admin-api/", - "protocol": "rest", - "baseUrl": "https://appengine.googleapis.com/", - "basePath": "", - "rootUrl": "https://appengine.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "version_module": true, - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/appengine.admin": { - "description": "View and manage your applications deployed on Google App Engine" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - } - } - } - }, - "schemas": { - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "The response message for Operations.ListOperations.", - "properties": { - "operations": { - "type": "array", - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "properties": { - "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name." - }, - "metadata": { - "type": "object", - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "done": { - "type": "boolean", - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available." - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "response": { - "type": "object", - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: Simple to use and understand for most users Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc which can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting purpose. Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - } - }, - "Application": { - "id": "Application", - "type": "object", - "description": "An Application resource contains the top-level configuration of an App Engine application.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp." - }, - "dispatchRules": { - "type": "array", - "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent.@OutputOnly", - "items": { - "$ref": "UrlDispatchRule" - } - }, - "authDomain": { - "type": "string", - "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account." - }, - "locationId": { - "type": "string", - "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US" - }, - "codeBucket": { - "type": "string", - "description": "Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly" - }, - "defaultCookieExpiration": { - "type": "string", - "description": "Cookie expiration policy for this application." - }, - "defaultHostname": { - "type": "string", - "description": "Hostname used to reach this application, as resolved by App Engine.@OutputOnly" - }, - "defaultBucket": { - "type": "string", - "description": "Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly" - } - } - }, - "UrlDispatchRule": { - "id": "UrlDispatchRule", - "type": "object", - "description": "Rules to match an HTTP request and dispatch that request to a service.", - "properties": { - "domain": { - "type": "string", - "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\"." - }, - "path": { - "type": "string", - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters." - }, - "service": { - "type": "string", - "description": "Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default." - } - } - }, - "RepairApplicationRequest": { - "id": "RepairApplicationRequest", - "type": "object", - "description": "Request message for 'Applications.RepairApplication'." - }, - "ListServicesResponse": { - "id": "ListServicesResponse", - "type": "object", - "description": "Response message for Services.ListServices.", - "properties": { - "services": { - "type": "array", - "description": "The services belonging to the requested application.", - "items": { - "$ref": "Service" - } - }, - "nextPageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results." - } - } - }, - "Service": { - "id": "Service", - "type": "object", - "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Relative name of the service within the application. Example: default.@OutputOnly" - }, - "split": { - "$ref": "TrafficSplit", - "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service." - } - } - }, - "TrafficSplit": { - "id": "TrafficSplit", - "type": "object", - "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", - "properties": { - "shardBy": { - "type": "string", - "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", - "enum": [ - "UNSPECIFIED", - "COOKIE", - "IP" - ] - }, - "allocations": { - "type": "object", - "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", - "additionalProperties": { - "type": "number", - "format": "double" - } - } - } - }, - "ListVersionsResponse": { - "id": "ListVersionsResponse", - "type": "object", - "description": "Response message for Versions.ListVersions.", - "properties": { - "versions": { - "type": "array", - "description": "The versions belonging to the requested service.", - "items": { - "$ref": "Version" - } - }, - "nextPageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results." - } - } - }, - "Version": { - "id": "Version", - "type": "object", - "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\"." - }, - "automaticScaling": { - "$ref": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." - }, - "basicScaling": { - "$ref": "BasicScaling", - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." - }, - "manualScaling": { - "$ref": "ManualScaling", - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." - }, - "inboundServices": { - "type": "array", - "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", - "enumDescriptions": [ - "Not specified.", - "Allows an application to receive mail.", - "Allows an application to receive email-bound notifications.", - "Allows an application to receive error stanzas.", - "Allows an application to receive instant messages.", - "Allows an application to receive user subscription POSTs.", - "Allows an application to receive a user's chat presence.", - "Registers an application for notifications when a client connects or disconnects from a channel.", - "Enables warmup requests." - ], - "items": { - "type": "string", - "enum": [ - "INBOUND_SERVICE_UNSPECIFIED", - "INBOUND_SERVICE_MAIL", - "INBOUND_SERVICE_MAIL_BOUNCE", - "INBOUND_SERVICE_XMPP_ERROR", - "INBOUND_SERVICE_XMPP_MESSAGE", - "INBOUND_SERVICE_XMPP_SUBSCRIBE", - "INBOUND_SERVICE_XMPP_PRESENCE", - "INBOUND_SERVICE_CHANNEL_PRESENCE", - "INBOUND_SERVICE_WARMUP" - ] - } - }, - "instanceClass": { - "type": "string", - "description": "Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling." - }, - "network": { - "$ref": "Network", - "description": "Extra network settings. Only applicable for VM runtimes." - }, - "resources": { - "$ref": "Resources", - "description": "Machine resources for this version. Only applicable for VM runtimes." - }, - "runtime": { - "type": "string", - "description": "Desired runtime. Example: python27." - }, - "threadsafe": { - "type": "boolean", - "description": "Whether multiple requests can be dispatched to this version at once." - }, - "vm": { - "type": "boolean", - "description": "Whether to deploy this version in a container on a virtual machine." - }, - "betaSettings": { - "type": "object", - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "additionalProperties": { - "type": "string" - } - }, - "env": { - "type": "string", - "description": "App Engine execution environment for this version.Defaults to standard." - }, - "servingStatus": { - "type": "string", - "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", - "enum": [ - "SERVING_STATUS_UNSPECIFIED", - "SERVING", - "STOPPED" - ] - }, - "createdBy": { - "type": "string", - "description": "Email address of the user who created this version.@OutputOnly" - }, - "createTime": { - "type": "string", - "description": "Time that this version was created.@OutputOnly" - }, - "diskUsageBytes": { - "type": "string", - "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", - "format": "int64" - }, - "handlers": { - "type": "array", - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - } - }, - "errorHandlers": { - "type": "array", - "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "ErrorHandler" - } - }, - "libraries": { - "type": "array", - "description": "Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "Library" - } - }, - "apiConfig": { - "$ref": "ApiConfigHandler", - "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." - }, - "envVariables": { - "type": "object", - "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", - "additionalProperties": { - "type": "string" - } - }, - "defaultExpiration": { - "type": "string", - "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set." - }, - "healthCheck": { - "$ref": "HealthCheck", - "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." - }, - "nobuildFilesRegex": { - "type": "string", - "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set." - }, - "deployment": { - "$ref": "Deployment", - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." - }, - "versionUrl": { - "type": "string", - "description": "Serving URL for this version. Example: \"https://myversion-dot-myservice-dot-myapp.appspot.com\"@OutputOnly" - }, - "endpointsApiService": { - "$ref": "EndpointsApiService", - "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app." - } - } - }, - "AutomaticScaling": { - "id": "AutomaticScaling", - "type": "object", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "properties": { - "coolDownPeriod": { - "type": "string", - "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes." - }, - "cpuUtilization": { - "$ref": "CpuUtilization", - "description": "Target scaling by CPU usage." - }, - "maxConcurrentRequests": { - "type": "integer", - "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", - "format": "int32" - }, - "maxIdleInstances": { - "type": "integer", - "description": "Maximum number of idle instances that should be maintained for this version.", - "format": "int32" - }, - "maxTotalInstances": { - "type": "integer", - "description": "Maximum number of instances that should be started to handle requests.", - "format": "int32" - }, - "maxPendingLatency": { - "type": "string", - "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it." - }, - "minIdleInstances": { - "type": "integer", - "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.", - "format": "int32" - }, - "minTotalInstances": { - "type": "integer", - "description": "Minimum number of instances that should be maintained for this version.", - "format": "int32" - }, - "minPendingLatency": { - "type": "string", - "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it." - }, - "requestUtilization": { - "$ref": "RequestUtilization", - "description": "Target scaling by request utilization." - }, - "diskUtilization": { - "$ref": "DiskUtilization", - "description": "Target scaling by disk usage." - }, - "networkUtilization": { - "$ref": "NetworkUtilization", - "description": "Target scaling by network usage." - } - } - }, - "CpuUtilization": { - "id": "CpuUtilization", - "type": "object", - "description": "Target scaling by CPU usage.", - "properties": { - "aggregationWindowLength": { - "type": "string", - "description": "Period of time over which CPU utilization is calculated." - }, - "targetUtilization": { - "type": "number", - "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", - "format": "double" - } - } - }, - "RequestUtilization": { - "id": "RequestUtilization", - "type": "object", - "description": "Target scaling by request utilization. Only applicable for VM runtimes.", - "properties": { - "targetRequestCountPerSecond": { - "type": "integer", - "description": "Target requests per second.", - "format": "int32" - }, - "targetConcurrentRequests": { - "type": "integer", - "description": "Target number of concurrent requests.", - "format": "int32" - } - } - }, - "DiskUtilization": { - "id": "DiskUtilization", - "type": "object", - "description": "Target scaling by disk usage. Only applicable for VM runtimes.", - "properties": { - "targetWriteBytesPerSecond": { - "type": "integer", - "description": "Target bytes written per second.", - "format": "int32" - }, - "targetWriteOpsPerSecond": { - "type": "integer", - "description": "Target ops written per second.", - "format": "int32" - }, - "targetReadBytesPerSecond": { - "type": "integer", - "description": "Target bytes read per second.", - "format": "int32" - }, - "targetReadOpsPerSecond": { - "type": "integer", - "description": "Target ops read per seconds.", - "format": "int32" - } - } - }, - "NetworkUtilization": { - "id": "NetworkUtilization", - "type": "object", - "description": "Target scaling by network usage. Only applicable for VM runtimes.", - "properties": { - "targetSentBytesPerSecond": { - "type": "integer", - "description": "Target bytes sent per second.", - "format": "int32" - }, - "targetSentPacketsPerSecond": { - "type": "integer", - "description": "Target packets sent per second.", - "format": "int32" - }, - "targetReceivedBytesPerSecond": { - "type": "integer", - "description": "Target bytes received per second.", - "format": "int32" - }, - "targetReceivedPacketsPerSecond": { - "type": "integer", - "description": "Target packets received per second.", - "format": "int32" - } - } - }, - "BasicScaling": { - "id": "BasicScaling", - "type": "object", - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "properties": { - "idleTimeout": { - "type": "string", - "description": "Duration of time after the last request that an instance must wait before the instance is shut down." - }, - "maxInstances": { - "type": "integer", - "description": "Maximum number of instances to create for this version.", - "format": "int32" - } - } - }, - "ManualScaling": { - "id": "ManualScaling", - "type": "object", - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "properties": { - "instances": { - "type": "integer", - "description": "Number of instances to assign to the service at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", - "format": "int32" - } - } - }, - "Network": { - "id": "Network", - "type": "object", - "description": "Extra network settings. Only applicable for VM runtimes.", - "properties": { - "forwardedPorts": { - "type": "array", - "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", - "items": { - "type": "string" - } - }, - "instanceTag": { - "type": "string", - "description": "Tag to apply to the VM instance during creation." - }, - "name": { - "type": "string", - "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default." - }, - "subnetworkName": { - "type": "string", - "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network. If the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range. If the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network. If the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app." - } - } - }, - "Resources": { - "id": "Resources", - "type": "object", - "description": "Machine resources for a version.", - "properties": { - "cpu": { - "type": "number", - "description": "Number of CPU cores needed.", - "format": "double" - }, - "diskGb": { - "type": "number", - "description": "Disk size (GB) needed.", - "format": "double" - }, - "memoryGb": { - "type": "number", - "description": "Memory (GB) needed.", - "format": "double" - }, - "volumes": { - "type": "array", - "description": "User specified volumes.", - "items": { - "$ref": "Volume" - } - } - } - }, - "Volume": { - "id": "Volume", - "type": "object", - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "properties": { - "name": { - "type": "string", - "description": "Unique name for the volume." - }, - "volumeType": { - "type": "string", - "description": "Underlying volume type, e.g. 'tmpfs'." - }, - "sizeGb": { - "type": "number", - "description": "Volume size in gigabytes.", - "format": "double" - } - } - }, - "UrlMap": { - "id": "UrlMap", - "type": "object", - "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", - "properties": { - "urlRegex": { - "type": "string", - "description": "URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path." - }, - "staticFiles": { - "$ref": "StaticFilesHandler", - "description": "Returns the contents of a file, such as an image, as the response." - }, - "script": { - "$ref": "ScriptHandler", - "description": "Executes a script to handle the request that matches this URL pattern." - }, - "apiEndpoint": { - "$ref": "ApiEndpointHandler", - "description": "Uses API Endpoints to handle requests." - }, - "securityLevel": { - "type": "string", - "description": "Security (HTTPS) enforcement for this URL.", - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ] - }, - "login": { - "type": "string", - "description": "Level of login required to access this resource.", - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ] - }, - "authFailAction": { - "type": "string", - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ] - }, - "redirectHttpResponseCode": { - "type": "string", - "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", - "enum": [ - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", - "REDIRECT_HTTP_RESPONSE_CODE_301", - "REDIRECT_HTTP_RESPONSE_CODE_302", - "REDIRECT_HTTP_RESPONSE_CODE_303", - "REDIRECT_HTTP_RESPONSE_CODE_307" - ] - } - } - }, - "StaticFilesHandler": { - "id": "StaticFilesHandler", - "type": "object", - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", - "properties": { - "path": { - "type": "string", - "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern." - }, - "uploadPathRegex": { - "type": "string", - "description": "Regular expression that matches the file paths for all files that should be referenced by this handler." - }, - "httpHeaders": { - "type": "object", - "description": "HTTP headers to use for all responses from these URLs.", - "additionalProperties": { - "type": "string" - } - }, - "mimeType": { - "type": "string", - "description": "MIME type used to serve all files served by this handler.Defaults to file-specific MIME types, which are derived from each file's filename extension." - }, - "expiration": { - "type": "string", - "description": "Time a static file served by this handler should be cached by web proxies and browsers." - }, - "requireMatchingFile": { - "type": "boolean", - "description": "Whether this handler should match the request if the file referenced by the handler does not exist." - }, - "applicationReadable": { - "type": "boolean", - "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas." - } - } - }, - "ScriptHandler": { - "id": "ScriptHandler", - "type": "object", - "description": "Executes a script to handle the request that matches the URL pattern.", - "properties": { - "scriptPath": { - "type": "string", - "description": "Path to the script from the application root directory." - } - } - }, - "ApiEndpointHandler": { - "id": "ApiEndpointHandler", - "type": "object", - "description": "Uses Google Cloud Endpoints to handle requests.", - "properties": { - "scriptPath": { - "type": "string", - "description": "Path to the script from the application root directory." - } - } - }, - "ErrorHandler": { - "id": "ErrorHandler", - "type": "object", - "description": "Custom static error page to be served when an error occurs.", - "properties": { - "errorCode": { - "type": "string", - "description": "Error condition this handler applies to.", - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "ERROR_CODE_DEFAULT", - "ERROR_CODE_OVER_QUOTA", - "ERROR_CODE_DOS_API_DENIAL", - "ERROR_CODE_TIMEOUT" - ] - }, - "staticFile": { - "type": "string", - "description": "Static file content to be served for this error." - }, - "mimeType": { - "type": "string", - "description": "MIME type of file. Defaults to text/html." - } - } - }, - "Library": { - "id": "Library", - "type": "object", - "description": "Third-party Python runtime library that is required by the application.", - "properties": { - "name": { - "type": "string", - "description": "Name of the library. Example: \"django\"." - }, - "version": { - "type": "string", - "description": "Version of the library to select, or \"latest\"." - } - } - }, - "ApiConfigHandler": { - "id": "ApiConfigHandler", - "type": "object", - "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", - "properties": { - "authFailAction": { - "type": "string", - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ] - }, - "login": { - "type": "string", - "description": "Level of login required to access this resource. Defaults to optional.", - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ] - }, - "script": { - "type": "string", - "description": "Path to the script from the application root directory." - }, - "securityLevel": { - "type": "string", - "description": "Security (HTTPS) enforcement for this URL.", - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ] - }, - "url": { - "type": "string", - "description": "URL to serve the endpoint at." - } - } - }, - "HealthCheck": { - "id": "HealthCheck", - "type": "object", - "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", - "properties": { - "disableHealthCheck": { - "type": "boolean", - "description": "Whether to explicitly disable health checks for this instance." - }, - "host": { - "type": "string", - "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"" - }, - "healthyThreshold": { - "type": "integer", - "description": "Number of consecutive successful health checks required before receiving traffic.", - "format": "uint32" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "Number of consecutive failed health checks required before removing traffic.", - "format": "uint32" - }, - "restartThreshold": { - "type": "integer", - "description": "Number of consecutive failed health checks required before an instance is restarted.", - "format": "uint32" - }, - "checkInterval": { - "type": "string", - "description": "Interval between health checks." - }, - "timeout": { - "type": "string", - "description": "Time before the health check is considered failed." - } - } - }, - "Deployment": { - "id": "Deployment", - "type": "object", - "description": "Code and application artifacts used to deploy a version to App Engine.", - "properties": { - "files": { - "type": "object", - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "additionalProperties": { - "$ref": "FileInfo" - } - }, - "container": { - "$ref": "ContainerInfo", - "description": "A Docker image that App Engine uses to run the version. Only applicable for instances in App Engine flexible environment." - }, - "zip": { - "$ref": "ZipInfo", - "description": "The zip file for this deployment, if this is a zip deployment." - } - } - }, - "FileInfo": { - "id": "FileInfo", - "type": "object", - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", - "properties": { - "sourceUrl": { - "type": "string", - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'." - }, - "sha1Sum": { - "type": "string", - "description": "The SHA1 hash of the file, in hex." - }, - "mimeType": { - "type": "string", - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage." - } - } - }, - "ContainerInfo": { - "id": "ContainerInfo", - "type": "object", - "description": "Docker image that is used to start a VM container for the version you deploy.", - "properties": { - "image": { - "type": "string", - "description": "URI to the hosted container image in a Docker repository. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"" - } - } - }, - "ZipInfo": { - "id": "ZipInfo", - "type": "object", - "description": "The zip file information for a zip deployment.", - "properties": { - "sourceUrl": { - "type": "string", - "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'." - }, - "filesCount": { - "type": "integer", - "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.", - "format": "int32" - } - } - }, - "EndpointsApiService": { - "id": "EndpointsApiService", - "type": "object", - "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", - "properties": { - "name": { - "type": "string", - "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"" - }, - "configId": { - "type": "string", - "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"" - } - } - }, - "ListInstancesResponse": { - "id": "ListInstancesResponse", - "type": "object", - "description": "Response message for Instances.ListInstances.", - "properties": { - "instances": { - "type": "array", - "description": "The instances belonging to the requested version.", - "items": { - "$ref": "Instance" - } - }, - "nextPageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results." - } - } - }, - "Instance": { - "id": "Instance", - "type": "object", - "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly" - }, - "appEngineRelease": { - "type": "string", - "description": "App Engine release this instance is running on.@OutputOnly" - }, - "availability": { - "type": "string", - "description": "Availability of the instance.@OutputOnly", - "enum": [ - "UNSPECIFIED", - "RESIDENT", - "DYNAMIC" - ] - }, - "vmName": { - "type": "string", - "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmZoneName": { - "type": "string", - "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmId": { - "type": "string", - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "startTime": { - "type": "string", - "description": "Time that this instance was started.@OutputOnly" - }, - "requests": { - "type": "integer", - "description": "Number of requests since this instance was started.@OutputOnly", - "format": "int32" - }, - "errors": { - "type": "integer", - "description": "Number of errors since this instance was started.@OutputOnly", - "format": "int32" - }, - "qps": { - "type": "number", - "description": "Average queries per second (QPS) over the last minute.@OutputOnly", - "format": "float" - }, - "averageLatency": { - "type": "integer", - "description": "Average latency (ms) over the last minute.@OutputOnly", - "format": "int32" - }, - "memoryUsage": { - "type": "string", - "description": "Total memory in use (bytes).@OutputOnly", - "format": "int64" - }, - "vmStatus": { - "type": "string", - "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmDebugEnabled": { - "type": "boolean", - "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmIp": { - "type": "string", - "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly" - } - } - }, - "DebugInstanceRequest": { - "id": "DebugInstanceRequest", - "type": "object", - "description": "Request message for Instances.DebugInstance.", - "properties": { - "sshKey": { - "type": "string", - "description": "Public SSH key to add to the instance. Examples: [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys)." - } - } - }, - "ListLocationsResponse": { - "id": "ListLocationsResponse", - "type": "object", - "description": "The response message for LocationService.ListLocations.", - "properties": { - "locations": { - "type": "array", - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "Location": { - "id": "Location", - "type": "object", - "description": "A resource that represents Google Cloud Platform location.", - "properties": { - "name": { - "type": "string", - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"" - }, - "locationId": { - "type": "string", - "description": "The canonical id for this location. For example: \"us-east1\"." - }, - "labels": { - "type": "object", - "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", - "additionalProperties": { - "type": "string" - } - }, - "metadata": { - "type": "object", - "description": "Service-specific metadata. For example the available capacity at the given location.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "OperationMetadataExperimental": { - "id": "OperationMetadataExperimental", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "method": { - "type": "string", - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Time that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Time that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly" - } - } - }, - "OperationMetadata": { - "id": "OperationMetadata", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "operationType": { - "type": "string", - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Timestamp that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Timestamp that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly" - }, - "method": { - "type": "string", - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly" - } - } - }, - "OperationMetadataV1Beta5": { - "id": "OperationMetadataV1Beta5", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "method": { - "type": "string", - "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Timestamp that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Timestamp that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly" - } - } - }, - "OperationMetadataV1": { - "id": "OperationMetadataV1", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "method": { - "type": "string", - "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Time that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Time that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly" - }, - "ephemeralMessage": { - "type": "string", - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly" - }, - "warning": { - "type": "array", - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - } - } - } - }, - "LocationMetadata": { - "id": "LocationMetadata", - "type": "object", - "description": "Metadata for the given google.cloud.location.Location.", - "properties": { - "standardEnvironmentAvailable": { - "type": "boolean", - "description": "App Engine Standard Environment is available in the given location.@OutputOnly" - }, - "flexibleEnvironmentAvailable": { - "type": "boolean", - "description": "App Engine Flexible Environment is available in the given location.@OutputOnly" - } - } - } - }, - "resources": { - "apps": { - "methods": { - "get": { - "id": "appengine.apps.get", - "path": "v1/apps/{appsId}", - "httpMethod": "GET", - "description": "Gets information about an application.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Application" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "create": { - "id": "appengine.apps.create", - "path": "v1/apps", - "httpMethod": "POST", - "description": "Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project).", - "request": { - "$ref": "Application" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "id": "appengine.apps.patch", - "path": "v1/apps/{appsId}", - "httpMethod": "PATCH", - "description": "Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.default_cookie_expiration)", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", - "required": true, - "location": "path" - }, - "updateMask": { - "type": "string", - "description": "Standard field mask for the set of fields to be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "request": { - "$ref": "Application" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "repair": { - "id": "appengine.apps.repair", - "path": "v1/apps/{appsId}:repair", - "httpMethod": "POST", - "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId" - ], - "request": { - "$ref": "RepairApplicationRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "operations": { - "methods": { - "list": { - "id": "appengine.apps.operations.list", - "path": "v1/apps/{appsId}/operations", - "httpMethod": "GET", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. The name of the operation collection.", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "description": "The standard list filter.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard list page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "get": { - "id": "appengine.apps.operations.get", - "path": "v1/apps/{appsId}/operations/{operationsId}", - "httpMethod": "GET", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. The name of the operation resource.", - "required": true, - "location": "path" - }, - "operationsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "operationsId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - } - } - }, - "services": { - "methods": { - "list": { - "id": "appengine.apps.services.list", - "path": "v1/apps/{appsId}/services", - "httpMethod": "GET", - "description": "Lists all the services in the application.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum results to return per page.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListServicesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "get": { - "id": "appengine.apps.services.get", - "path": "v1/apps/{appsId}/services/{servicesId}", - "httpMethod": "GET", - "description": "Gets the current configuration of the specified service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "Service" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "patch": { - "id": "appengine.apps.services.patch", - "path": "v1/apps/{appsId}/services/{servicesId}", - "httpMethod": "PATCH", - "description": "Updates the configuration of the specified service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "updateMask": { - "type": "string", - "description": "Standard field mask for the set of fields to be updated.", - "location": "query" - }, - "migrateTraffic": { - "type": "boolean", - "description": "Set to true to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "request": { - "$ref": "Service" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "appengine.apps.services.delete", - "path": "v1/apps/{appsId}/services/{servicesId}", - "httpMethod": "DELETE", - "description": "Deletes the specified service and all enclosed versions.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "versions": { - "methods": { - "list": { - "id": "appengine.apps.services.versions.list", - "path": "v1/apps/{appsId}/services/{servicesId}/versions", - "httpMethod": "GET", - "description": "Lists the versions of a service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", - "required": true, - "location": "path" + "discoveryVersion": "v1", + "ownerName": "Google", + "version_module": "True", + "resources": { + "apps": { + "methods": { + "repair": { + "response": { + "$ref": "Operation" }, - "servicesId": { - "type": "string", - "description": "Part of `parent`. See documentation of `appsId`.", - "required": true, - "location": "path" + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", + "required": true, + "type": "string" + } }, - "view": { - "type": "string", - "description": "Controls the set of fields returned in the List response.", - "enum": [ - "BASIC", - "FULL" - ], - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Maximum results to return per page.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results.", - "location": "query" + "flatPath": "v1/apps/{appsId}:repair", + "path": "v1/apps/{appsId}:repair", + "id": "appengine.apps.repair", + "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", + "request": { + "$ref": "RepairApplicationRequest" } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "ListVersionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] }, "get": { - "id": "appengine.apps.services.versions.get", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "httpMethod": "GET", - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "required": true, - "location": "path" + "description": "Gets information about an application.", + "response": { + "$ref": "Application" }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", + "required": true, + "type": "string", + "location": "path" + } }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "view": { - "type": "string", - "description": "Controls the set of fields returned in the Get response.", - "enum": [ - "BASIC", - "FULL" - ], - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "Version" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "create": { - "id": "appengine.apps.services.versions.create", - "path": "v1/apps/{appsId}/services/{servicesId}/versions", - "httpMethod": "POST", - "description": "Deploys code and resource files to a new version.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `parent`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "request": { - "$ref": "Version" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}", + "path": "v1/apps/{appsId}", + "id": "appengine.apps.get" }, "patch": { - "id": "appengine.apps.services.versions.patch", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "httpMethod": "PATCH", - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "updateMask": { - "type": "string", - "description": "Standard field mask for the set of fields to be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "request": { - "$ref": "Version" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "appengine.apps.services.versions.delete", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "httpMethod": "DELETE", - "description": "Deletes an existing Version resource.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "instances": { - "methods": { - "list": { - "id": "appengine.apps.services.versions.instances.list", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "httpMethod": "GET", - "description": "Lists the instances of a version.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `parent`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `parent`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum results to return per page.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "ListInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "get": { - "id": "appengine.apps.services.versions.instances.get", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "httpMethod": "GET", - "description": "Gets instance information.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "instancesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "response": { - "$ref": "Instance" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "delete": { - "id": "appengine.apps.services.versions.instances.delete", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "httpMethod": "DELETE", - "description": "Stops a running instance.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "instancesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "response": { + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId" + ], + "response": { "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "debug": { - "id": "appengine.apps.services.versions.instances.debug", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "httpMethod": "POST", - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "instancesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "request": { - "$ref": "DebugInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ + "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ] + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", + "required": true, + "type": "string", + "location": "path" + }, + "updateMask": { + "description": "Standard field mask for the set of fields to be updated.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1/apps/{appsId}", + "id": "appengine.apps.patch", + "path": "v1/apps/{appsId}", + "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain - Google authentication domain for controlling user access to the application.\ndefault_cookie_expiration - Cookie expiration policy for the application.", + "request": { + "$ref": "Application" } - } + }, + "create": { + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps", + "path": "v1/apps", + "id": "appengine.apps.create", + "request": { + "$ref": "Application" + }, + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST" } - } - } - } - }, - "locations": { - "methods": { - "list": { - "id": "appengine.apps.locations.list", - "path": "v1/apps/{appsId}/locations", - "httpMethod": "GET", - "description": "Lists information about the supported locations for this service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. The resource that owns the locations collection, if applicable.", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "description": "The standard list filter.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard list page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListLocationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] }, - "get": { - "id": "appengine.apps.locations.get", - "path": "v1/apps/{appsId}/locations/{locationsId}", - "httpMethod": "GET", - "description": "Get information about a location.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Resource name for the location.", - "required": true, - "location": "path" + "resources": { + "services": { + "methods": { + "delete": { + "description": "Deletes the specified service and all enclosed versions.", + "response": { + "$ref": "Operation" + }, + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "required": true, + "type": "string", + "location": "path" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}", + "path": "v1/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.delete" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "pageSize": { + "description": "Maximum results to return per page.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1/apps/{appsId}/services", + "id": "appengine.apps.services.list", + "path": "v1/apps/{appsId}/services", + "description": "Lists all the services in the application." + }, + "get": { + "description": "Gets the current configuration of the specified service.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "response": { + "$ref": "Service" + }, + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.get", + "path": "v1/apps/{appsId}/services/{servicesId}" + }, + "patch": { + "request": { + "$ref": "Service" + }, + "description": "Updates the configuration of the specified service.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "PATCH", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", + "required": true, + "type": "string" + }, + "migrateTraffic": { + "location": "query", + "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", + "type": "boolean" + }, + "updateMask": { + "description": "Standard field mask for the set of fields to be updated.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}", + "path": "v1/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.patch" + } + }, + "resources": { + "versions": { + "methods": { + "delete": { + "description": "Deletes an existing Version resource.", + "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.delete", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}" + }, + "list": { + "id": "appengine.apps.services.versions.list", + "path": "v1/apps/{appsId}/services/{servicesId}/versions", + "description": "Lists the versions of a service.", + "httpMethod": "GET", + "response": { + "$ref": "ListVersionsResponse" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "description": "Part of `parent`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "pageSize": { + "description": "Maximum results to return per page.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "view": { + "description": "Controls the set of fields returned in the List response.", + "type": "string", + "location": "query", + "enum": [ + "BASIC", + "FULL" + ] + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions" + }, + "get": { + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.get", + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "httpMethod": "GET", + "response": { + "$ref": "Version" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the Get response.", + "type": "string" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}" + }, + "patch": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "updateMask": { + "location": "query", + "description": "Standard field mask for the set of fields to be updated.", + "format": "google-fieldmask", + "type": "string" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.patch", + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", + "request": { + "$ref": "Version" + } + }, + "create": { + "path": "v1/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.create", + "request": { + "$ref": "Version" + }, + "description": "Deploys code and resource files to a new version.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "POST", + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions" + } + }, + "resources": { + "instances": { + "methods": { + "delete": { + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "required": true, + "type": "string", + "location": "path" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.delete", + "description": "Stops a running instance.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "DELETE" + }, + "list": { + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Maximum results to return per page.", + "format": "int32", + "type": "integer" + }, + "versionsId": { + "description": "Part of `parent`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "id": "appengine.apps.services.versions.instances.list", + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "httpMethod": "GET", + "response": { + "$ref": "ListInstancesResponse" + } + }, + "get": { + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "response": { + "$ref": "Instance" + }, + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "required": true, + "type": "string", + "location": "path" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.get", + "description": "Gets instance information." + }, + "debug": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "POST", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "required": true, + "type": "string" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "id": "appengine.apps.services.versions.instances.debug", + "request": { + "$ref": "DebugInstanceRequest" + }, + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment." + } + } + } + } + } + } }, - "locationsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" + "operations": { + "methods": { + "list": { + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `name`. The name of the operation collection.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/operations", + "path": "v1/apps/{appsId}/operations", + "id": "appengine.apps.operations.list", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.", + "response": { + "$ref": "ListOperationsResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ] + }, + "get": { + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. The name of the operation resource.", + "required": true, + "type": "string" + }, + "operationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/operations/{operationsId}", + "id": "appengine.apps.operations.get", + "path": "v1/apps/{appsId}/operations/{operationsId}", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "operationsId" + ], + "response": { + "$ref": "Operation" + } + } + } + }, + "locations": { + "methods": { + "list": { + "id": "appengine.apps.locations.list", + "path": "v1/apps/{appsId}/locations", + "description": "Lists information about the supported locations for this service.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "appsId": { + "description": "Part of `name`. The resource that owns the locations collection, if applicable.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "The standard list page size.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v1/apps/{appsId}/locations" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "locationsId" + ], + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Resource name for the location.", + "required": true, + "type": "string" + }, + "locationsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/locations/{locationsId}", + "id": "appengine.apps.locations.get", + "path": "v1/apps/{appsId}/locations/{locationsId}", + "description": "Get information about a location." + } + } } - }, - "parameterOrder": [ - "appsId", - "locationsId" - ], - "response": { - "$ref": "Location" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] } - } } - } - } - } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "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" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + } + }, + "schemas": { + "ScriptHandler": { + "description": "Executes a script to handle the request that matches the URL pattern.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ScriptHandler" + }, + "FileInfo": { + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", + "type": "object", + "properties": { + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "type": "string" + }, + "sourceUrl": { + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "type": "string" + } + }, + "id": "FileInfo" + }, + "OperationMetadataExperimental": { + "id": "OperationMetadataExperimental", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", + "type": "string" + }, + "insertTime": { + "description": "Time that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "Time that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + } + } + }, + "TrafficSplit": { + "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", + "type": "object", + "properties": { + "shardBy": { + "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", + "type": "string", + "enumDescriptions": [ + "Diversion method unspecified.", + "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or no diversion will occur.", + "Diversion based on applying the modulus operation to a fingerprint of the IP address.", + "Diversion based on weighted random assignment. An incoming request is randomly routed to a version in the traffic split, with probability proportional to the version's traffic share." + ], + "enum": [ + "UNSPECIFIED", + "COOKIE", + "IP", + "RANDOM" + ] + }, + "allocations": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", + "type": "object" + } + }, + "id": "TrafficSplit" + }, + "OperationMetadataV1Beta": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "type": "array", + "items": { + "type": "string" + } + }, + "insertTime": { + "description": "Time that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "description": "Time that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta" + }, + "ListServicesResponse": { + "id": "ListServicesResponse", + "description": "Response message for Services.ListServices.", + "type": "object", + "properties": { + "services": { + "description": "The services belonging to the requested application.", + "type": "array", + "items": { + "$ref": "Service" + } + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + } + }, + "Resources": { + "id": "Resources", + "description": "Machine resources for a version.", + "type": "object", + "properties": { + "diskGb": { + "description": "Disk size (GB) needed.", + "format": "double", + "type": "number" + }, + "cpu": { + "description": "Number of CPU cores needed.", + "format": "double", + "type": "number" + }, + "memoryGb": { + "description": "Memory (GB) needed.", + "format": "double", + "type": "number" + }, + "volumes": { + "description": "User specified volumes.", + "type": "array", + "items": { + "$ref": "Volume" + } + } + } + }, + "Deployment": { + "id": "Deployment", + "description": "Code and application artifacts used to deploy a version to App Engine.", + "type": "object", + "properties": { + "zip": { + "description": "The zip file for this deployment, if this is a zip deployment.", + "$ref": "ZipInfo" + }, + "container": { + "$ref": "ContainerInfo", + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." + }, + "files": { + "additionalProperties": { + "$ref": "FileInfo" + }, + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", + "type": "object" + } + } + }, + "Volume": { + "id": "Volume", + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "volumeType": { + "description": "Underlying volume type, e.g. 'tmpfs'.", + "type": "string" + }, + "sizeGb": { + "description": "Volume size in gigabytes.", + "format": "double", + "type": "number" + }, + "name": { + "description": "Unique name for the volume.", + "type": "string" + } + } + }, + "ListInstancesResponse": { + "description": "Response message for Instances.ListInstances.", + "type": "object", + "properties": { + "instances": { + "description": "The instances belonging to the requested version.", + "type": "array", + "items": { + "$ref": "Instance" + } + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + }, + "id": "ListInstancesResponse" + }, + "UrlDispatchRule": { + "id": "UrlDispatchRule", + "description": "Rules to match an HTTP request and dispatch that request to a service.", + "type": "object", + "properties": { + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + }, + "domain": { + "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", + "type": "string" + }, + "service": { + "description": "Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default.", + "type": "string" + } + } + }, + "ListVersionsResponse": { + "id": "ListVersionsResponse", + "description": "Response message for Versions.ListVersions.", + "type": "object", + "properties": { + "versions": { + "description": "The versions belonging to the requested service.", + "type": "array", + "items": { + "$ref": "Version" + } + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + } + }, + "ApiEndpointHandler": { + "description": "Uses Google Cloud Endpoints to handle requests.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ApiEndpointHandler" + }, + "ZipInfo": { + "id": "ZipInfo", + "description": "The zip file information for a zip deployment.", + "type": "object", + "properties": { + "sourceUrl": { + "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "type": "string" + }, + "filesCount": { + "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.", + "format": "int32", + "type": "integer" + } + } + }, + "AutomaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "type": "object", + "properties": { + "minTotalInstances": { + "description": "Minimum number of instances that should be maintained for this version.", + "format": "int32", + "type": "integer" + }, + "networkUtilization": { + "description": "Target scaling by network usage.", + "$ref": "NetworkUtilization" + }, + "maxConcurrentRequests": { + "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", + "format": "int32", + "type": "integer" + }, + "coolDownPeriod": { + "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", + "format": "google-duration", + "type": "string" + }, + "maxPendingLatency": { + "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", + "format": "google-duration", + "type": "string" + }, + "cpuUtilization": { + "description": "Target scaling by CPU usage.", + "$ref": "CpuUtilization" + }, + "diskUtilization": { + "$ref": "DiskUtilization", + "description": "Target scaling by disk usage." + }, + "minPendingLatency": { + "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", + "format": "google-duration", + "type": "string" + }, + "requestUtilization": { + "$ref": "RequestUtilization", + "description": "Target scaling by request utilization." + }, + "maxIdleInstances": { + "description": "Maximum number of idle instances that should be maintained for this version.", + "format": "int32", + "type": "integer" + }, + "minIdleInstances": { + "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.", + "format": "int32", + "type": "integer" + }, + "maxTotalInstances": { + "description": "Maximum number of instances that should be started to handle requests.", + "format": "int32", + "type": "integer" + } + }, + "id": "AutomaticScaling" + }, + "Library": { + "description": "Third-party Python runtime library that is required by the application.", + "type": "object", + "properties": { + "version": { + "description": "Version of the library to select, or \"latest\".", + "type": "string" + }, + "name": { + "description": "Name of the library. Example: \"django\".", + "type": "string" + } + }, + "id": "Library" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Location" + } + } + }, + "id": "ListLocationsResponse" + }, + "ContainerInfo": { + "id": "ContainerInfo", + "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", + "type": "object", + "properties": { + "image": { + "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", + "type": "string" + } + } + }, + "RequestUtilization": { + "description": "Target scaling by request utilization. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetRequestCountPerSecond": { + "description": "Target requests per second.", + "format": "int32", + "type": "integer" + }, + "targetConcurrentRequests": { + "description": "Target number of concurrent requests.", + "format": "int32", + "type": "integer" + } + }, + "id": "RequestUtilization" + }, + "UrlMap": { + "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", + "type": "object", + "properties": { + "securityLevel": { + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string" + }, + "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + }, + "script": { + "description": "Executes a script to handle the request that matches this URL pattern.", + "$ref": "ScriptHandler" + }, + "urlRegex": { + "description": "URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", + "type": "string" + }, + "login": { + "description": "Level of login required to access this resource.", + "type": "string", + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ], + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ] + }, + "apiEndpoint": { + "description": "Uses API Endpoints to handle requests.", + "$ref": "ApiEndpointHandler" + }, + "staticFiles": { + "description": "Returns the contents of a file, such as an image, as the response.", + "$ref": "StaticFilesHandler" + }, + "redirectHttpResponseCode": { + "enumDescriptions": [ + "Not specified. 302 is assumed.", + "301 Moved Permanently code.", + "302 Moved Temporarily code.", + "303 See Other code.", + "307 Temporary Redirect code." + ], + "enum": [ + "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", + "REDIRECT_HTTP_RESPONSE_CODE_301", + "REDIRECT_HTTP_RESPONSE_CODE_302", + "REDIRECT_HTTP_RESPONSE_CODE_303", + "REDIRECT_HTTP_RESPONSE_CODE_307" + ], + "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", + "type": "string" + } + }, + "id": "UrlMap" + }, + "EndpointsApiService": { + "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", + "type": "object", + "properties": { + "name": { + "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"", + "type": "string" + }, + "configId": { + "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", + "type": "string" + } + }, + "id": "EndpointsApiService" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + } + }, + "id": "Operation" + }, + "ApiConfigHandler": { + "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", + "type": "object", + "properties": { + "url": { + "description": "URL to serve the endpoint at.", + "type": "string" + }, + "securityLevel": { + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ] + }, + "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + }, + "script": { + "description": "Path to the script from the application root directory.", + "type": "string" + }, + "login": { + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ], + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ], + "description": "Level of login required to access this resource. Defaults to optional.", + "type": "string" + } + }, + "id": "ApiConfigHandler" + }, + "StaticFilesHandler": { + "id": "StaticFilesHandler", + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", + "type": "object", + "properties": { + "expiration": { + "description": "Time a static file served by this handler should be cached by web proxies and browsers.", + "format": "google-duration", + "type": "string" + }, + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, + "httpHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object" + }, + "uploadPathRegex": { + "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", + "type": "string" + }, + "path": { + "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.", + "type": "string" + }, + "mimeType": { + "description": "MIME type used to serve all files served by this handler.Defaults to file-specific MIME types, which are derived from each file's filename extension.", + "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" + } + } + }, + "DiskUtilization": { + "id": "DiskUtilization", + "description": "Target scaling by disk usage. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetWriteBytesPerSecond": { + "description": "Target bytes written per second.", + "format": "int32", + "type": "integer" + }, + "targetReadBytesPerSecond": { + "description": "Target bytes read per second.", + "format": "int32", + "type": "integer" + }, + "targetReadOpsPerSecond": { + "description": "Target ops read per seconds.", + "format": "int32", + "type": "integer" + }, + "targetWriteOpsPerSecond": { + "description": "Target ops written per second.", + "format": "int32", + "type": "integer" + } + } + }, + "BasicScaling": { + "id": "BasicScaling", + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "type": "object", + "properties": { + "maxInstances": { + "description": "Maximum number of instances to create for this version.", + "format": "int32", + "type": "integer" + }, + "idleTimeout": { + "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", + "format": "google-duration", + "type": "string" + } + } + }, + "CpuUtilization": { + "id": "CpuUtilization", + "description": "Target scaling by CPU usage.", + "type": "object", + "properties": { + "aggregationWindowLength": { + "description": "Period of time over which CPU utilization is calculated.", + "format": "google-duration", + "type": "string" + }, + "targetUtilization": { + "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", + "format": "double", + "type": "number" + } + } + }, + "IdentityAwareProxy": { + "description": "Identity-Aware Proxy", + "type": "object", + "properties": { + "enabled": { + "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", + "type": "boolean" + }, + "oauth2ClientSecret": { + "description": "OAuth2 client secret to use for the authentication flow.For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", + "type": "string" + }, + "oauth2ClientId": { + "description": "OAuth2 client ID to use for the authentication flow.", + "type": "string" + }, + "oauth2ClientSecretSha256": { + "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", + "type": "string" + } + }, + "id": "IdentityAwareProxy" + }, + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + } + }, + "id": "Status" + }, + "ManualScaling": { + "id": "ManualScaling", + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "type": "object", + "properties": { + "instances": { + "description": "Number of instances to assign to the service at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", + "format": "int32", + "type": "integer" + } + } + }, + "LocationMetadata": { + "id": "LocationMetadata", + "description": "Metadata for the given google.cloud.location.Location.", + "type": "object", + "properties": { + "flexibleEnvironmentAvailable": { + "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", + "type": "boolean" + }, + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" + } + } + }, + "Service": { + "id": "Service", + "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", + "type": "object", + "properties": { + "name": { + "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "split": { + "$ref": "TrafficSplit", + "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service." + }, + "id": { + "description": "Relative name of the service within the application. Example: default.@OutputOnly", + "type": "string" + } + } + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } + } + }, + "id": "ListOperationsResponse" + }, + "OperationMetadata": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "insertTime": { + "description": "Timestamp that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "description": "Timestamp that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadata" + }, + "ErrorHandler": { + "description": "Custom static error page to be served when an error occurs.", + "type": "object", + "properties": { + "errorCode": { + "description": "Error condition this handler applies to.", + "type": "string", + "enumDescriptions": [ + "Not specified. ERROR_CODE_DEFAULT is assumed.", + "All other error types.", + "Application has exceeded a resource quota.", + "Client blocked by the application's Denial of Service protection configuration.", + "Deadline reached before the application responds." + ], + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "ERROR_CODE_DEFAULT", + "ERROR_CODE_OVER_QUOTA", + "ERROR_CODE_DOS_API_DENIAL", + "ERROR_CODE_TIMEOUT" + ] + }, + "mimeType": { + "description": "MIME type of file. Defaults to text/html.", + "type": "string" + }, + "staticFile": { + "description": "Static file content to be served for this error.", + "type": "string" + } + }, + "id": "ErrorHandler" + }, + "OperationMetadataV1": { + "id": "OperationMetadataV1", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "insertTime": { + "description": "Time that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "description": "Time that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + } + }, + "Network": { + "id": "Network", + "description": "Extra network settings. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "forwardedPorts": { + "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", + "type": "array", + "items": { + "type": "string" + } + }, + "instanceTag": { + "description": "Tag to apply to the VM instance during creation.", + "type": "string" + }, + "subnetworkName": { + "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app.", + "type": "string" + }, + "name": { + "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", + "type": "string" + } + } + }, + "Application": { + "description": "An Application resource contains the top-level configuration of an App Engine application.", + "type": "object", + "properties": { + "codeBucket": { + "description": "Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly", + "type": "string" + }, + "defaultBucket": { + "description": "Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly", + "type": "string" + }, + "dispatchRules": { + "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent. Up to 20 dispatch rules can be supported.@OutputOnly", + "type": "array", + "items": { + "$ref": "UrlDispatchRule" + } + }, + "gcrDomain": { + "description": "The Google Container Registry domain used for storing managed build docker images for this application.", + "type": "string" + }, + "name": { + "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", + "type": "string" + }, + "defaultCookieExpiration": { + "description": "Cookie expiration policy for this application.", + "format": "google-duration", + "type": "string" + }, + "id": { + "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", + "type": "string" + }, + "locationId": { + "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", + "type": "string" + }, + "servingStatus": { + "enumDescriptions": [ + "Serving status is unspecified.", + "Application is serving.", + "Application has been disabled by the user.", + "Application has been disabled by the system." + ], + "enum": [ + "UNSPECIFIED", + "SERVING", + "USER_DISABLED", + "SYSTEM_DISABLED" + ], + "description": "Serving status of this application.", + "type": "string" + }, + "defaultHostname": { + "description": "Hostname used to reach this application, as resolved by App Engine.@OutputOnly", + "type": "string" + }, + "authDomain": { + "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.", + "type": "string" + }, + "iap": { + "$ref": "IdentityAwareProxy" + } + }, + "id": "Application" + }, + "Instance": { + "id": "Instance", + "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", + "type": "object", + "properties": { + "vmDebugEnabled": { + "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "boolean" + }, + "requests": { + "description": "Number of requests since this instance was started.@OutputOnly", + "format": "int32", + "type": "integer" + }, + "appEngineRelease": { + "description": "App Engine release this instance is running on.@OutputOnly", + "type": "string" + }, + "vmName": { + "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "qps": { + "description": "Average queries per second (QPS) over the last minute.@OutputOnly", + "format": "float", + "type": "number" + }, + "name": { + "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", + "type": "string" + }, + "vmZoneName": { + "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "averageLatency": { + "description": "Average latency (ms) over the last minute.@OutputOnly", + "format": "int32", + "type": "integer" + }, + "id": { + "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", + "type": "string" + }, + "memoryUsage": { + "description": "Total memory in use (bytes).@OutputOnly", + "format": "int64", + "type": "string" + }, + "vmIp": { + "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "vmStatus": { + "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "errors": { + "description": "Number of errors since this instance was started.@OutputOnly", + "format": "int32", + "type": "integer" + }, + "availability": { + "description": "Availability of the instance.@OutputOnly", + "type": "string", + "enumDescriptions": [ + "", + "", + "" + ], + "enum": [ + "UNSPECIFIED", + "RESIDENT", + "DYNAMIC" + ] + }, + "startTime": { + "description": "Time that this instance was started.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + } + }, + "LivenessCheck": { + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.", + "type": "object", + "properties": { + "timeout": { + "description": "Time before the check is considered failed.", + "format": "google-duration", + "type": "string" + }, + "failureThreshold": { + "description": "Number of consecutive failed checks required before considering the VM unhealthy.", + "format": "uint32", + "type": "integer" + }, + "initialDelay": { + "description": "The initial delay before starting to execute the checks.", + "format": "google-duration", + "type": "string" + }, + "path": { + "description": "The request path.", + "type": "string" + }, + "successThreshold": { + "description": "Number of consecutive successful checks required before considering the VM healthy.", + "format": "uint32", + "type": "integer" + }, + "host": { + "description": "Host header to send when performing a HTTP Liveness check. Example: \"myapp.appspot.com\"", + "type": "string" + }, + "checkInterval": { + "description": "Interval between health checks.", + "format": "google-duration", + "type": "string" + } + }, + "id": "LivenessCheck" + }, + "NetworkUtilization": { + "id": "NetworkUtilization", + "description": "Target scaling by network usage. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetSentBytesPerSecond": { + "description": "Target bytes sent per second.", + "format": "int32", + "type": "integer" + }, + "targetSentPacketsPerSecond": { + "description": "Target packets sent per second.", + "format": "int32", + "type": "integer" + }, + "targetReceivedBytesPerSecond": { + "description": "Target bytes received per second.", + "format": "int32", + "type": "integer" + }, + "targetReceivedPacketsPerSecond": { + "description": "Target packets received per second.", + "format": "int32", + "type": "integer" + } + } + }, + "Location": { + "id": "Location", + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object" + } + } + }, + "HealthCheck": { + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", + "type": "object", + "properties": { + "unhealthyThreshold": { + "description": "Number of consecutive failed health checks required before removing traffic.", + "format": "uint32", + "type": "integer" + }, + "disableHealthCheck": { + "description": "Whether to explicitly disable health checks for this instance.", + "type": "boolean" + }, + "host": { + "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", + "type": "string" + }, + "healthyThreshold": { + "description": "Number of consecutive successful health checks required before receiving traffic.", + "format": "uint32", + "type": "integer" + }, + "restartThreshold": { + "description": "Number of consecutive failed health checks required before an instance is restarted.", + "format": "uint32", + "type": "integer" + }, + "checkInterval": { + "description": "Interval between health checks.", + "format": "google-duration", + "type": "string" + }, + "timeout": { + "description": "Time before the health check is considered failed.", + "format": "google-duration", + "type": "string" + } + }, + "id": "HealthCheck" + }, + "ReadinessCheck": { + "id": "ReadinessCheck", + "description": "Readiness checking configuration for VM instances. Unhealthy instances are removed from traffic rotation.", + "type": "object", + "properties": { + "timeout": { + "description": "Time before the check is considered failed.", + "format": "google-duration", + "type": "string" + }, + "failureThreshold": { + "description": "Number of consecutive failed checks required before removing traffic.", + "format": "uint32", + "type": "integer" + }, + "path": { + "description": "The request path.", + "type": "string" + }, + "successThreshold": { + "description": "Number of consecutive successful checks required before receiving traffic.", + "format": "uint32", + "type": "integer" + }, + "host": { + "description": "Host header to send when performing a HTTP Readiness check. Example: \"myapp.appspot.com\"", + "type": "string" + }, + "checkInterval": { + "description": "Interval between health checks.", + "format": "google-duration", + "type": "string" + } + } + }, + "DebugInstanceRequest": { + "id": "DebugInstanceRequest", + "description": "Request message for Instances.DebugInstance.", + "type": "object", + "properties": { + "sshKey": { + "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", + "type": "string" + } + } + }, + "OperationMetadataV1Beta5": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "insertTime": { + "description": "Timestamp that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "Timestamp that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta5" + }, + "Version": { + "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", + "type": "object", + "properties": { + "deployment": { + "$ref": "Deployment", + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." + }, + "createTime": { + "description": "Time that this version was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "resources": { + "$ref": "Resources", + "description": "Machine resources for this version. Only applicable for VM runtimes." + }, + "inboundServices": { + "enumDescriptions": [ + "Not specified.", + "Allows an application to receive mail.", + "Allows an application to receive email-bound notifications.", + "Allows an application to receive error stanzas.", + "Allows an application to receive instant messages.", + "Allows an application to receive user subscription POSTs.", + "Allows an application to receive a user's chat presence.", + "Registers an application for notifications when a client connects or disconnects from a channel.", + "Enables warmup requests." + ], + "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", + "type": "array", + "items": { + "enum": [ + "INBOUND_SERVICE_UNSPECIFIED", + "INBOUND_SERVICE_MAIL", + "INBOUND_SERVICE_MAIL_BOUNCE", + "INBOUND_SERVICE_XMPP_ERROR", + "INBOUND_SERVICE_XMPP_MESSAGE", + "INBOUND_SERVICE_XMPP_SUBSCRIBE", + "INBOUND_SERVICE_XMPP_PRESENCE", + "INBOUND_SERVICE_CHANNEL_PRESENCE", + "INBOUND_SERVICE_WARMUP" + ], + "type": "string" + } + }, + "errorHandlers": { + "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", + "type": "array", + "items": { + "$ref": "ErrorHandler" + } + }, + "defaultExpiration": { + "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.", + "format": "google-duration", + "type": "string" + }, + "libraries": { + "description": "Configuration for third-party Python runtime libraries that are required by the application.Only returned in GET requests if view=FULL is set.", + "type": "array", + "items": { + "$ref": "Library" + } + }, + "nobuildFilesRegex": { + "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", + "type": "string" + }, + "basicScaling": { + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "$ref": "BasicScaling" + }, + "runtime": { + "description": "Desired runtime. Example: python27.", + "type": "string" + }, + "createdBy": { + "description": "Email address of the user who created this version.@OutputOnly", + "type": "string" + }, + "id": { + "description": "Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", + "type": "string" + }, + "envVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object" + }, + "livenessCheck": { + "$ref": "LivenessCheck", + "description": "Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set." + }, + "network": { + "description": "Extra network settings. Only applicable for VM runtimes.", + "$ref": "Network" + }, + "betaSettings": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata settings that are supplied to this version to enable beta runtime features.", + "type": "object" + }, + "env": { + "description": "App Engine execution environment for this version.Defaults to standard.", + "type": "string" + }, + "handlers": { + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", + "type": "array", + "items": { + "$ref": "UrlMap" + } + }, + "automaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "$ref": "AutomaticScaling" + }, + "diskUsageBytes": { + "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", + "format": "int64", + "type": "string" + }, + "healthCheck": { + "$ref": "HealthCheck", + "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." + }, + "threadsafe": { + "description": "Whether multiple requests can be dispatched to this version at once.", + "type": "boolean" + }, + "readinessCheck": { + "description": "Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set.", + "$ref": "ReadinessCheck" + }, + "manualScaling": { + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "$ref": "ManualScaling" + }, + "name": { + "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", + "type": "string" + }, + "apiConfig": { + "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.", + "$ref": "ApiConfigHandler" + }, + "endpointsApiService": { + "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.", + "$ref": "EndpointsApiService" + }, + "vm": { + "description": "Whether to deploy this version in a container on a virtual machine.", + "type": "boolean" + }, + "versionUrl": { + "description": "Serving URL for this version. Example: \"https://myversion-dot-myservice-dot-myapp.appspot.com\"@OutputOnly", + "type": "string" + }, + "instanceClass": { + "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", + "type": "string" + }, + "servingStatus": { + "enumDescriptions": [ + "Not specified.", + "Currently serving. Instances are created according to the scaling settings of the version.", + "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." + ], + "enum": [ + "SERVING_STATUS_UNSPECIFIED", + "SERVING", + "STOPPED" + ], + "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", + "type": "string" + } + }, + "id": "Version" + }, + "RepairApplicationRequest": { + "description": "Request message for 'Applications.RepairApplication'.", + "type": "object", + "properties": {}, + "id": "RepairApplicationRequest" + } + }, + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "version": "v1", + "baseUrl": "https://appengine.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/appengine.admin": { + "description": "View and manage your applications deployed on Google App Engine" + }, + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "kind": "discovery#restDescription", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "servicePath": "", + "rootUrl": "https://appengine.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "appengine", + "batchPath": "batch", + "revision": "20170522", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "id": "appengine:v1", + "title": "Google App Engine Admin API" } diff --git a/etc/api/appengine/v1beta4/appengine-api.json b/etc/api/appengine/v1beta4/appengine-api.json index d30690bccd..74539d0574 100644 --- a/etc/api/appengine/v1beta4/appengine-api.json +++ b/etc/api/appengine/v1beta4/appengine-api.json @@ -1,2193 +1,2378 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/WPOHGBs1fdHtwU9urrOWmhzm9OM\"", - "discoveryVersion": "v1", - "id": "appengine:v1beta4", - "name": "appengine", - "version": "v1beta4", - "revision": "20161208", - "title": "Google App Engine Admin API", - "description": "Provisions and manages App Engine applications.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/appengine/docs/admin-api/", - "protocol": "rest", - "baseUrl": "https://appengine.googleapis.com/", - "basePath": "", - "rootUrl": "https://appengine.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/appengine.admin": { - "description": "View and manage your applications deployed on Google App Engine" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - } - } - } - }, - "schemas": { - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "The response message for Operations.ListOperations.", - "properties": { - "operations": { - "type": "array", - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "properties": { - "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name." - }, - "metadata": { - "type": "object", - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "done": { - "type": "boolean", - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available." - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "response": { - "type": "object", - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: Simple to use and understand for most users Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc which can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting purpose. Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - } - }, - "Application": { - "id": "Application", - "type": "object", - "description": "An Application resource contains the top-level configuration of an App Engine application.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp." - }, - "dispatchRules": { - "type": "array", - "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a module or version. Rules are order-dependent.@OutputOnly", - "items": { - "$ref": "UrlDispatchRule" - } - }, - "authDomain": { - "type": "string", - "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account." - }, - "location": { - "type": "string", - "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US" - }, - "codeBucket": { - "type": "string", - "description": "Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly" - }, - "defaultCookieExpiration": { - "type": "string", - "description": "Cookie expiration policy for this application." - }, - "defaultHostname": { - "type": "string", - "description": "Hostname used to reach the application, as resolved by App Engine.@OutputOnly" - }, - "defaultBucket": { - "type": "string", - "description": "Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly" - } - } - }, - "UrlDispatchRule": { - "id": "UrlDispatchRule", - "type": "object", - "description": "Rules to match an HTTP request and dispatch that request to a module.", - "properties": { - "domain": { - "type": "string", - "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\"." - }, - "path": { - "type": "string", - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters." - }, - "module": { - "type": "string", - "description": "Resource ID of a module in this application that should serve the matched request. The module must already exist. Example: default." - } - } - }, - "Version": { - "id": "Version", - "type": "object", - "description": "A Version resource is a specific set of source code and configuration files that are deployed into a module.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Version resource in the API. Example: apps/myapp/modules/default/versions/v1.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\"." - }, - "automaticScaling": { - "$ref": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." - }, - "basicScaling": { - "$ref": "BasicScaling", - "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." - }, - "manualScaling": { - "$ref": "ManualScaling", - "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." - }, - "inboundServices": { - "type": "array", - "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", - "enumDescriptions": [ - "Not specified.", - "Allows an application to receive mail.", - "Allows an application to receive email-bound notifications.", - "Allows an application to receive error stanzas.", - "Allows an application to receive instant messages.", - "Allows an application to receive user subscription POSTs.", - "Allows an application to receive a user's chat presence.", - "Registers an application for notifications when a client connects or disconnects from a channel.", - "Enables warmup requests." - ], - "items": { - "type": "string", - "enum": [ - "INBOUND_SERVICE_UNSPECIFIED", - "INBOUND_SERVICE_MAIL", - "INBOUND_SERVICE_MAIL_BOUNCE", - "INBOUND_SERVICE_XMPP_ERROR", - "INBOUND_SERVICE_XMPP_MESSAGE", - "INBOUND_SERVICE_XMPP_SUBSCRIBE", - "INBOUND_SERVICE_XMPP_PRESENCE", - "INBOUND_SERVICE_CHANNEL_PRESENCE", - "INBOUND_SERVICE_WARMUP" - ] - } - }, - "instanceClass": { - "type": "string", - "description": "Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling." - }, - "network": { - "$ref": "Network", - "description": "Extra network settings. Only applicable for VM runtimes." - }, - "resources": { - "$ref": "Resources", - "description": "Machine resources for this version. Only applicable for VM runtimes." - }, - "runtime": { - "type": "string", - "description": "Desired runtime. Example: python27." - }, - "threadsafe": { - "type": "boolean", - "description": "Whether multiple requests can be dispatched to this version at once." - }, - "vm": { - "type": "boolean", - "description": "Whether to deploy this version in a container on a virtual machine." - }, - "betaSettings": { - "type": "object", - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "additionalProperties": { - "type": "string" - } - }, - "env": { - "type": "string", - "description": "App Engine execution environment to use for this version.Defaults to 1." - }, - "servingStatus": { - "type": "string", - "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", - "enum": [ - "SERVING_STATUS_UNSPECIFIED", - "SERVING", - "STOPPED" - ] - }, - "deployer": { - "type": "string", - "description": "Email address of the user who created this version.@OutputOnly" - }, - "creationTime": { - "type": "string", - "description": "Time that this version was created.@OutputOnly" - }, - "handlers": { - "type": "array", - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - } - }, - "errorHandlers": { - "type": "array", - "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "ErrorHandler" - } - }, - "libraries": { - "type": "array", - "description": "Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "Library" - } - }, - "apiConfig": { - "$ref": "ApiConfigHandler", - "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." - }, - "envVariables": { - "type": "object", - "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", - "additionalProperties": { - "type": "string" - } - }, - "defaultExpiration": { - "type": "string", - "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set." - }, - "healthCheck": { - "$ref": "HealthCheck", - "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." - }, - "nobuildFilesRegex": { - "type": "string", - "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set." - }, - "deployment": { - "$ref": "Deployment", - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." - } - } - }, - "AutomaticScaling": { - "id": "AutomaticScaling", - "type": "object", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "properties": { - "coolDownPeriod": { - "type": "string", - "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes." - }, - "cpuUtilization": { - "$ref": "CpuUtilization", - "description": "Target scaling by CPU usage." - }, - "maxConcurrentRequests": { - "type": "integer", - "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", - "format": "int32" - }, - "maxIdleInstances": { - "type": "integer", - "description": "Maximum number of idle instances that should be maintained for this version.", - "format": "int32" - }, - "maxTotalInstances": { - "type": "integer", - "description": "Maximum number of instances that should be started to handle requests.", - "format": "int32" - }, - "maxPendingLatency": { - "type": "string", - "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it." - }, - "minIdleInstances": { - "type": "integer", - "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", - "format": "int32" - }, - "minTotalInstances": { - "type": "integer", - "description": "Minimum number of instances that should be maintained for this version.", - "format": "int32" - }, - "minPendingLatency": { - "type": "string", - "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it." - }, - "requestUtilization": { - "$ref": "RequestUtilization", - "description": "Target scaling by request utilization." - }, - "diskUtilization": { - "$ref": "DiskUtilization", - "description": "Target scaling by disk usage." - }, - "networkUtilization": { - "$ref": "NetworkUtilization", - "description": "Target scaling by network usage." - } - } - }, - "CpuUtilization": { - "id": "CpuUtilization", - "type": "object", - "description": "Target scaling by CPU usage.", - "properties": { - "aggregationWindowLength": { - "type": "string", - "description": "Period of time over which CPU utilization is calculated." - }, - "targetUtilization": { - "type": "number", - "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", - "format": "double" - } - } - }, - "RequestUtilization": { - "id": "RequestUtilization", - "type": "object", - "description": "Target scaling by request utilization. Only applicable for VM runtimes.", - "properties": { - "targetRequestCountPerSec": { - "type": "integer", - "description": "Target requests per second.", - "format": "int32" - }, - "targetConcurrentRequests": { - "type": "integer", - "description": "Target number of concurrent requests.", - "format": "int32" - } - } - }, - "DiskUtilization": { - "id": "DiskUtilization", - "type": "object", - "description": "Target scaling by disk usage. Only applicable for VM runtimes.", - "properties": { - "targetWriteBytesPerSec": { - "type": "integer", - "description": "Target bytes written per second.", - "format": "int32" - }, - "targetWriteOpsPerSec": { - "type": "integer", - "description": "Target ops written per second.", - "format": "int32" - }, - "targetReadBytesPerSec": { - "type": "integer", - "description": "Target bytes read per second.", - "format": "int32" - }, - "targetReadOpsPerSec": { - "type": "integer", - "description": "Target ops read per second.", - "format": "int32" - } - } - }, - "NetworkUtilization": { - "id": "NetworkUtilization", - "type": "object", - "description": "Target scaling by network usage. Only applicable for VM runtimes.", - "properties": { - "targetSentBytesPerSec": { - "type": "integer", - "description": "Target bytes sent per second.", - "format": "int32" - }, - "targetSentPacketsPerSec": { - "type": "integer", - "description": "Target packets sent per second.", - "format": "int32" - }, - "targetReceivedBytesPerSec": { - "type": "integer", - "description": "Target bytes received per second.", - "format": "int32" - }, - "targetReceivedPacketsPerSec": { - "type": "integer", - "description": "Target packets received per second.", - "format": "int32" - } - } - }, - "BasicScaling": { - "id": "BasicScaling", - "type": "object", - "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "properties": { - "idleTimeout": { - "type": "string", - "description": "Duration of time after the last request that an instance must wait before the instance is shut down." - }, - "maxInstances": { - "type": "integer", - "description": "Maximum number of instances to create for this version.", - "format": "int32" - } - } - }, - "ManualScaling": { - "id": "ManualScaling", - "type": "object", - "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "properties": { - "instances": { - "type": "integer", - "description": "Number of instances to assign to the module at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", - "format": "int32" - } - } - }, - "Network": { - "id": "Network", - "type": "object", - "description": "Extra network settings. Only applicable for VM runtimes.", - "properties": { - "forwardedPorts": { - "type": "array", - "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", - "items": { - "type": "string" - } - }, - "instanceTag": { - "type": "string", - "description": "Tag to apply to the VM instance during creation." - }, - "name": { - "type": "string", - "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default." - } - } - }, - "Resources": { - "id": "Resources", - "type": "object", - "description": "Machine resources for a version.", - "properties": { - "cpu": { - "type": "number", - "description": "Number of CPU cores needed.", - "format": "double" - }, - "diskGb": { - "type": "number", - "description": "Disk size (GB) needed.", - "format": "double" - }, - "memoryGb": { - "type": "number", - "description": "Memory (GB) needed.", - "format": "double" - }, - "volumes": { - "type": "array", - "description": "User specified volumes.", - "items": { - "$ref": "Volume" - } - } - } - }, - "Volume": { - "id": "Volume", - "type": "object", - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "properties": { - "name": { - "type": "string", - "description": "Unique name for the volume." - }, - "volumeType": { - "type": "string", - "description": "Underlying volume type, e.g. 'tmpfs'." - }, - "sizeGb": { - "type": "number", - "description": "Volume size in gigabytes.", - "format": "double" - } - } - }, - "UrlMap": { - "id": "UrlMap", - "type": "object", - "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", - "properties": { - "urlRegex": { - "type": "string", - "description": "A URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path." - }, - "staticFiles": { - "$ref": "StaticFilesHandler", - "description": "Returns the contents of a file, such as an image, as the response." - }, - "staticDirectory": { - "$ref": "StaticDirectoryHandler", - "description": "Serves the entire contents of a directory as static files.This attribute is deprecated. You can mimic the behavior of static directories using static files." - }, - "script": { - "$ref": "ScriptHandler", - "description": "Executes a script to handle the request that matches this URL pattern." - }, - "apiEndpoint": { - "$ref": "ApiEndpointHandler", - "description": "Uses API Endpoints to handle requests." - }, - "securityLevel": { - "type": "string", - "description": "Security (HTTPS) enforcement for this URL.", - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ] - }, - "login": { - "type": "string", - "description": "Level of login required to access this resource.", - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ] - }, - "authFailAction": { - "type": "string", - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ] - }, - "redirectHttpResponseCode": { - "type": "string", - "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", - "enum": [ - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", - "REDIRECT_HTTP_RESPONSE_CODE_301", - "REDIRECT_HTTP_RESPONSE_CODE_302", - "REDIRECT_HTTP_RESPONSE_CODE_303", - "REDIRECT_HTTP_RESPONSE_CODE_307" - ] - } - } - }, - "StaticFilesHandler": { - "id": "StaticFilesHandler", - "type": "object", - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", - "properties": { - "path": { - "type": "string", - "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern." - }, - "uploadPathRegex": { - "type": "string", - "description": "Regular expression that matches the file paths for all files that should be referenced by this handler." - }, - "httpHeaders": { - "type": "object", - "description": "HTTP headers to use for all responses from these URLs.", - "additionalProperties": { - "type": "string" - } - }, - "mimeType": { - "type": "string", - "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension." - }, - "expiration": { - "type": "string", - "description": "Time a static file served by this handler should be cached." - }, - "requireMatchingFile": { - "type": "boolean", - "description": "Whether this handler should match the request if the file referenced by the handler does not exist." - }, - "applicationReadable": { - "type": "boolean", - "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas." - } - } - }, - "StaticDirectoryHandler": { - "id": "StaticDirectoryHandler", - "type": "object", - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static directory handlers make it easy to serve the entire contents of a directory as static files.", - "properties": { - "directory": { - "type": "string", - "description": "Path to the directory containing the static files from the application root directory. Everything after the end of the matched URL pattern is appended to static_dir to form the full path to the requested file." - }, - "httpHeaders": { - "type": "object", - "description": "HTTP headers to use for all responses from these URLs.", - "additionalProperties": { - "type": "string" - } - }, - "mimeType": { - "type": "string", - "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are direved from each file's filename extension." - }, - "expiration": { - "type": "string", - "description": "Time a static file served by this handler should be cached." - }, - "requireMatchingFile": { - "type": "boolean", - "description": "Whether this handler should match the request if the file referenced by the handler does not exist." - }, - "applicationReadable": { - "type": "boolean", - "description": "Whether files should also be uploaded as code data. By default, files declared in static directory handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas." - } - } - }, - "ScriptHandler": { - "id": "ScriptHandler", - "type": "object", - "description": "Executes a script to handle the request that matches the URL pattern.", - "properties": { - "scriptPath": { - "type": "string", - "description": "Path to the script from the application root directory." - } - } - }, - "ApiEndpointHandler": { - "id": "ApiEndpointHandler", - "type": "object", - "description": "Uses Google Cloud Endpoints to handle requests.", - "properties": { - "scriptPath": { - "type": "string", - "description": "Path to the script from the application root directory." - } - } - }, - "ErrorHandler": { - "id": "ErrorHandler", - "type": "object", - "description": "Custom static error page to be served when an error occurs.", - "properties": { - "errorCode": { - "type": "string", - "description": "Error condition this handler applies to.", - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "ERROR_CODE_DEFAULT", - "ERROR_CODE_OVER_QUOTA", - "ERROR_CODE_DOS_API_DENIAL", - "ERROR_CODE_TIMEOUT" - ] - }, - "staticFile": { - "type": "string", - "description": "Static file content to be served for this error." - }, - "mimeType": { - "type": "string", - "description": "MIME type of file. Defaults to text/html." - } - } - }, - "Library": { - "id": "Library", - "type": "object", - "description": "Third-party Python runtime library that is required by the application.", - "properties": { - "name": { - "type": "string", - "description": "Name of the library. Example: \"django\"." - }, - "version": { - "type": "string", - "description": "Version of the library to select, or \"latest\"." - } - } - }, - "ApiConfigHandler": { - "id": "ApiConfigHandler", - "type": "object", - "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", - "properties": { - "authFailAction": { - "type": "string", - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ] - }, - "login": { - "type": "string", - "description": "Level of login required to access this resource. Defaults to optional.", - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ] - }, - "script": { - "type": "string", - "description": "Path to the script from the application root directory." - }, - "securityLevel": { - "type": "string", - "description": "Security (HTTPS) enforcement for this URL.", - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ] - }, - "url": { - "type": "string", - "description": "URL to serve the endpoint at." - } - } - }, - "HealthCheck": { - "id": "HealthCheck", - "type": "object", - "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", - "properties": { - "disableHealthCheck": { - "type": "boolean", - "description": "Whether to explicitly disable health checks for this instance." - }, - "host": { - "type": "string", - "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"" - }, - "healthyThreshold": { - "type": "integer", - "description": "Number of consecutive successful health checks required before receiving traffic.", - "format": "uint32" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "Number of consecutive failed health checks required before removing traffic.", - "format": "uint32" - }, - "restartThreshold": { - "type": "integer", - "description": "Number of consecutive failed health checks required before an instance is restarted.", - "format": "uint32" - }, - "checkInterval": { - "type": "string", - "description": "Interval between health checks." - }, - "timeout": { - "type": "string", - "description": "Time before the health check is considered failed." - } - } - }, - "Deployment": { - "id": "Deployment", - "type": "object", - "description": "Code and application artifacts used to deploy a version to App Engine.", - "properties": { - "files": { - "type": "object", - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "additionalProperties": { - "$ref": "FileInfo" - } - }, - "container": { - "$ref": "ContainerInfo", - "description": "A Docker image that App Engine uses the run the version. Only applicable for instances in App Engine flexible environment." - }, - "sourceReferences": { - "type": "array", - "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", - "items": { - "$ref": "SourceReference" - } - } - } - }, - "FileInfo": { - "id": "FileInfo", - "type": "object", - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", - "properties": { - "sourceUrl": { - "type": "string", - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'." - }, - "sha1Sum": { - "type": "string", - "description": "The SHA1 hash of the file, in hex." - }, - "mimeType": { - "type": "string", - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage." - } - } - }, - "ContainerInfo": { - "id": "ContainerInfo", - "type": "object", - "description": "Docker image that is used to start a VM container for the version you deploy.", - "properties": { - "image": { - "type": "string", - "description": "URI to the hosted container image in a Docker repository. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"" - } - } - }, - "SourceReference": { - "id": "SourceReference", - "type": "object", - "description": "Reference to a particular snapshot of the source tree used to build and deploy the application.", - "properties": { - "repository": { - "type": "string", - "description": "URI string identifying the repository. Example: \"https://source.developers.google.com/p/app-123/r/default\"" - }, - "revisionId": { - "type": "string", - "description": "The canonical, persistent identifier of the deployed revision. Aliases that include tags or branch names are not allowed. Example (git): \"2198322f89e0bb2e25021667c2ed489d1fd34e6b\"" - } - } - }, - "ListVersionsResponse": { - "id": "ListVersionsResponse", - "type": "object", - "description": "Response message for Versions.ListVersions.", - "properties": { - "versions": { - "type": "array", - "description": "The versions belonging to the requested module.", - "items": { - "$ref": "Version" - } - }, - "nextPageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results." - } - } - }, - "Module": { - "id": "Module", - "type": "object", - "description": "A Module resource is a logical component of an application that can share state and communicate in a secure fashion with other modules. For example, an application that handles customer requests might include separate modules to handle tasks such as backend data analysis or API requests from mobile devices. Each module has a collection of versions that define a specific set of code used to implement the functionality of that module.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Module resource in the API. Example: apps/myapp/modules/default.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Relative name of the module within the application. Example: default.@OutputOnly" - }, - "split": { - "$ref": "TrafficSplit", - "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the module." - } - } - }, - "TrafficSplit": { - "id": "TrafficSplit", - "type": "object", - "description": "Traffic routing configuration for versions within a single module. Traffic splits define how traffic directed to the module is assigned to versions.", - "properties": { - "shardBy": { - "type": "string", - "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", - "enum": [ - "UNSPECIFIED", - "COOKIE", - "IP" - ] - }, - "allocations": { - "type": "object", - "description": "Mapping from version IDs within the module to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the module may not have any traffic allocation. Modules that have traffic allocated cannot be deleted until either the module is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", - "additionalProperties": { - "type": "number", - "format": "double" - } - } - } - }, - "ListModulesResponse": { - "id": "ListModulesResponse", - "type": "object", - "description": "Response message for Modules.ListModules.", - "properties": { - "modules": { - "type": "array", - "description": "The modules belonging to the requested application.", - "items": { - "$ref": "Module" - } - }, - "nextPageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results." - } - } - }, - "Instance": { - "id": "Instance", - "type": "object", - "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Instance resource in the API. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly" - }, - "appEngineRelease": { - "type": "string", - "description": "App Engine release this instance is running on.@OutputOnly" - }, - "availability": { - "type": "string", - "description": "Availability of the instance.@OutputOnly", - "enum": [ - "UNSPECIFIED", - "RESIDENT", - "DYNAMIC" - ] - }, - "vmName": { - "type": "string", - "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmZoneName": { - "type": "string", - "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmId": { - "type": "string", - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "startTimestamp": { - "type": "string", - "description": "Time that this instance was started.@OutputOnly" - }, - "requests": { - "type": "integer", - "description": "Number of requests since this instance was started.@OutputOnly", - "format": "int32" - }, - "errors": { - "type": "integer", - "description": "Number of errors since this instance was started.@OutputOnly", - "format": "uint32" - }, - "qps": { - "type": "number", - "description": "Average queries per second (QPS) over the last minute.@OutputOnly", - "format": "float" - }, - "averageLatency": { - "type": "integer", - "description": "Average latency (ms) over the last minute.@OutputOnly", - "format": "int32" - }, - "memoryUsage": { - "type": "string", - "description": "Total memory in use (bytes).@OutputOnly", - "format": "int64" - }, - "vmStatus": { - "type": "string", - "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmUnlocked": { - "type": "boolean", - "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmIp": { - "type": "string", - "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly" - } - } - }, - "ListInstancesResponse": { - "id": "ListInstancesResponse", - "type": "object", - "description": "Response message for Instances.ListInstances.", - "properties": { - "instances": { - "type": "array", - "description": "The instances belonging to the requested version.", - "items": { - "$ref": "Instance" - } - }, - "nextPageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results." - } - } - }, - "DebugInstanceRequest": { - "id": "DebugInstanceRequest", - "type": "object", - "description": "Request message for Instances.DebugInstance.", - "properties": { - "sshKey": { - "type": "string", - "description": "Public SSH key to add to the instance. Examples: [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys)." - } - } - }, - "ListLocationsResponse": { - "id": "ListLocationsResponse", - "type": "object", - "description": "The response message for LocationService.ListLocations.", - "properties": { - "locations": { - "type": "array", - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "Location": { - "id": "Location", - "type": "object", - "description": "A resource that represents Google Cloud Platform location.", - "properties": { - "name": { - "type": "string", - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"" - }, - "locationId": { - "type": "string", - "description": "The canonical id for this location. For example: \"us-east1\"." - }, - "labels": { - "type": "object", - "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", - "additionalProperties": { - "type": "string" - } - }, - "metadata": { - "type": "object", - "description": "Service-specific metadata. For example the available capacity at the given location.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "OperationMetadataExperimental": { - "id": "OperationMetadataExperimental", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "method": { - "type": "string", - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Time that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Time that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly" - } - } - }, - "OperationMetadata": { - "id": "OperationMetadata", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "operationType": { - "type": "string", - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Timestamp that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Timestamp that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly" - }, - "method": { - "type": "string", - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly" - } - } - }, - "OperationMetadataV1Beta5": { - "id": "OperationMetadataV1Beta5", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "method": { - "type": "string", - "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Timestamp that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Timestamp that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly" - } - } - }, - "OperationMetadataV1": { - "id": "OperationMetadataV1", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "method": { - "type": "string", - "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Time that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Time that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly" - }, - "ephemeralMessage": { - "type": "string", - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly" - }, - "warning": { - "type": "array", - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - } - } - } - }, - "LocationMetadata": { - "id": "LocationMetadata", - "type": "object", - "description": "Metadata for the given google.cloud.location.Location.", - "properties": { - "standardEnvironmentAvailable": { - "type": "boolean", - "description": "App Engine Standard Environment is available in the given location.@OutputOnly" - }, - "flexibleEnvironmentAvailable": { - "type": "boolean", - "description": "App Engine Flexible Environment is available in the given location.@OutputOnly" - } - } - } - }, - "resources": { - "apps": { - "methods": { - "create": { - "id": "appengine.apps.create", - "path": "v1beta4/apps", - "httpMethod": "POST", - "description": "Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project).", - "request": { - "$ref": "Application" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "appengine.apps.get", - "path": "v1beta4/apps/{appsId}", - "httpMethod": "GET", - "description": "Gets information about an application.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the application to get. Example: apps/myapp.", - "required": true, - "location": "path" - }, - "ensureResourcesExist": { - "type": "boolean", - "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Application" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "id": "appengine.apps.patch", - "path": "v1beta4/apps/{appsId}", - "httpMethod": "PATCH", - "description": "Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", - "required": true, - "location": "path" - }, - "mask": { - "type": "string", - "description": "Standard field mask for the set of fields to be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "request": { - "$ref": "Application" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "operations": { - "methods": { - "list": { - "id": "appengine.apps.operations.list", - "path": "v1beta4/apps/{appsId}/operations", - "httpMethod": "GET", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. The name of the operation collection.", - "required": true, - "location": "path" + "rootUrl": "https://appengine.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "appengine", + "batchPath": "batch", + "revision": "20170522", + "id": "appengine:v1beta4", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "title": "Google App Engine Admin API", + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { + "apps": { + "resources": { + "modules": { + "resources": { + "versions": { + "resources": { + "instances": { + "methods": { + "debug": { + "httpMethod": "POST", + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId", + "instancesId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", + "required": true, + "type": "string" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", + "id": "appengine.apps.modules.versions.instances.debug", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", + "request": { + "$ref": "DebugInstanceRequest" + }, + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment." + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId", + "instancesId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", + "required": true, + "type": "string" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.modules.versions.instances.delete", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", + "description": "Stops a running instance." + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Instance" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId", + "instancesId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", + "required": true, + "type": "string", + "location": "path" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.modules.versions.instances.get", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", + "description": "Gets instance information." + }, + "list": { + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances", + "id": "appengine.apps.modules.versions.instances.list", + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", + "response": { + "$ref": "ListInstancesResponse" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "Maximum results to return per page.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances" + } + } + } + }, + "methods": { + "delete": { + "description": "Deletes an existing version.", + "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", + "required": true, + "type": "string", + "location": "path" + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "id": "appengine.apps.modules.versions.delete", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}" + }, + "get": { + "response": { + "$ref": "Version" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", + "required": true, + "type": "string" + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the Get response.", + "type": "string" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "id": "appengine.apps.modules.versions.get", + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource." + }, + "list": { + "description": "Lists the versions of a module.", + "response": { + "$ref": "ListVersionsResponse" + }, + "parameterOrder": [ + "appsId", + "modulesId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "pageSize": { + "description": "Maximum results to return per page.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the List response.", + "type": "string" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", + "id": "appengine.apps.modules.versions.list" + }, + "patch": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default/versions/1.", + "required": true, + "type": "string" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "mask": { + "location": "query", + "description": "Standard field mask for the set of fields to be updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "id": "appengine.apps.modules.versions.patch", + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", + "request": { + "$ref": "Version" + } + }, + "create": { + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", + "id": "appengine.apps.modules.versions.create", + "description": "Deploys code and resource files to a new version.", + "request": { + "$ref": "Version" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "modulesId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.", + "required": true, + "type": "string", + "location": "path" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions" + } + } + } + }, + "methods": { + "delete": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "modulesId" + ], + "httpMethod": "DELETE", + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", + "required": true, + "type": "string", + "location": "path" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}", + "id": "appengine.apps.modules.delete", + "description": "Deletes the specified module and all enclosed versions." + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Module" + }, + "parameterOrder": [ + "appsId", + "modulesId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", + "required": true, + "type": "string" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}", + "id": "appengine.apps.modules.get", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}", + "description": "Gets the current configuration of the specified module." + }, + "list": { + "path": "v1beta4/apps/{appsId}/modules", + "id": "appengine.apps.modules.list", + "description": "Lists all the modules in the application.", + "response": { + "$ref": "ListModulesResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Maximum results to return per page.", + "format": "int32", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta4/apps/{appsId}/modules" + }, + "patch": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "modulesId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.", + "required": true, + "type": "string" + }, + "migrateTraffic": { + "location": "query", + "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules#shardby) field in the Module resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", + "type": "boolean" + }, + "modulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "mask": { + "location": "query", + "description": "Standard field mask for the set of fields to be updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}", + "id": "appengine.apps.modules.patch", + "description": "Updates the configuration of the specified module.", + "request": { + "$ref": "Module" + } + } + } }, - "filter": { - "type": "string", - "description": "The standard list filter.", - "location": "query" + "operations": { + "methods": { + "list": { + "id": "appengine.apps.operations.list", + "path": "v1beta4/apps/{appsId}/operations", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.", + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `name`. The name of the operation collection.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The standard list page size.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v1beta4/apps/{appsId}/operations" + }, + "get": { + "id": "appengine.apps.operations.get", + "path": "v1beta4/apps/{appsId}/operations/{operationsId}", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "operationsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. The name of the operation resource.", + "required": true, + "type": "string" + }, + "operationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta4/apps/{appsId}/operations/{operationsId}" + } + } }, - "pageSize": { - "type": "integer", - "description": "The standard list page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" + "locations": { + "methods": { + "list": { + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `name`. The resource that owns the locations collection, if applicable.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The standard list page size.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v1beta4/apps/{appsId}/locations", + "path": "v1beta4/apps/{appsId}/locations", + "id": "appengine.apps.locations.list", + "description": "Lists information about the supported locations for this service." + }, + "get": { + "response": { + "$ref": "Location" + }, + "parameterOrder": [ + "appsId", + "locationsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "locationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Resource name for the location.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta4/apps/{appsId}/locations/{locationsId}", + "path": "v1beta4/apps/{appsId}/locations/{locationsId}", + "id": "appengine.apps.locations.get", + "description": "Get information about a location." + } + } } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] }, - "get": { - "id": "appengine.apps.operations.get", - "path": "v1beta4/apps/{appsId}/operations/{operationsId}", - "httpMethod": "GET", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. The name of the operation resource.", - "required": true, - "location": "path" - }, - "operationsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "operationsId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - } - } - }, - "modules": { - "methods": { - "delete": { - "id": "appengine.apps.modules.delete", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}", - "httpMethod": "DELETE", - "description": "Deletes the specified module and all enclosed versions.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", - "required": true, - "location": "path" - }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "modulesId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "appengine.apps.modules.get", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}", - "httpMethod": "GET", - "description": "Gets the current configuration of the specified module.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", - "required": true, - "location": "path" - }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "modulesId" - ], - "response": { - "$ref": "Module" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "list": { - "id": "appengine.apps.modules.list", - "path": "v1beta4/apps/{appsId}/modules", - "httpMethod": "GET", - "description": "Lists all the modules in the application.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum results to return per page.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListModulesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "patch": { - "id": "appengine.apps.modules.patch", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}", - "httpMethod": "PATCH", - "description": "Updates the configuration of the specified module.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.", - "required": true, - "location": "path" - }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "mask": { - "type": "string", - "description": "Standard field mask for the set of fields to be updated.", - "location": "query" - }, - "migrateTraffic": { - "type": "boolean", - "description": "Set to true to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules#shardby) field in the Module resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "modulesId" - ], - "request": { - "$ref": "Module" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "versions": { - "methods": { + "methods": { "create": { - "id": "appengine.apps.modules.versions.create", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", - "httpMethod": "POST", - "description": "Deploys code and resource files to a new version.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.", - "required": true, - "location": "path" + "id": "appengine.apps.create", + "path": "v1beta4/apps", + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", + "request": { + "$ref": "Application" }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "modulesId" - ], - "request": { - "$ref": "Version" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "appengine.apps.modules.versions.delete", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "httpMethod": "DELETE", - "description": "Deletes an existing version.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", - "required": true, - "location": "path" + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1beta4/apps" }, "get": { - "id": "appengine.apps.modules.versions.get", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "httpMethod": "GET", - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", - "required": true, - "location": "path" + "httpMethod": "GET", + "response": { + "$ref": "Application" }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" + "parameterOrder": [ + "appsId" + ], + "parameters": { + "ensureResourcesExist": { + "location": "query", + "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete.", + "type": "boolean" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the application to get. Example: apps/myapp.", + "required": true, + "type": "string" + } }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "view": { - "type": "string", - "description": "Controls the set of fields returned in the Get response.", - "enum": [ - "BASIC", - "FULL" - ], - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId" - ], - "response": { - "$ref": "Version" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "list": { - "id": "appengine.apps.modules.versions.list", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", - "httpMethod": "GET", - "description": "Lists the versions of a module.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", - "required": true, - "location": "path" - }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "view": { - "type": "string", - "description": "Controls the set of fields returned in the List response.", - "enum": [ - "BASIC", - "FULL" - ], - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Maximum results to return per page.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "modulesId" - ], - "response": { - "$ref": "ListVersionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta4/apps/{appsId}", + "id": "appengine.apps.get", + "path": "v1beta4/apps/{appsId}", + "description": "Gets information about an application." }, "patch": { - "id": "appengine.apps.modules.versions.patch", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "httpMethod": "PATCH", - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default/versions/1.", - "required": true, - "location": "path" + "id": "appengine.apps.patch", + "path": "v1beta4/apps/{appsId}", + "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)", + "request": { + "$ref": "Application" }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "mask": { - "type": "string", - "description": "Standard field mask for the set of fields to be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId" - ], - "request": { - "$ref": "Version" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "instances": { - "methods": { - "delete": { - "id": "appengine.apps.modules.versions.instances.delete", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", - "httpMethod": "DELETE", - "description": "Stops a running instance.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", - "required": true, - "location": "path" - }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "instancesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId", - "instancesId" - ], - "response": { + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId" + ], + "response": { "$ref": "Operation" - }, - "scopes": [ + }, + "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "appengine.apps.modules.versions.instances.get", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", - "httpMethod": "GET", - "description": "Gets instance information.", - "parameters": { + ], + "parameters": { "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", - "required": true, - "location": "path" + "location": "path", + "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", + "required": true, + "type": "string" }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "instancesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" + "mask": { + "description": "Standard field mask for the set of fields to be updated.", + "format": "google-fieldmask", + "type": "string", + "location": "query" } - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId", - "instancesId" - ], - "response": { - "$ref": "Instance" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] }, - "list": { - "id": "appengine.apps.modules.versions.instances.list", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances", - "httpMethod": "GET", - "description": "Lists the instances of a version.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", - "required": true, - "location": "path" - }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum results to return per page.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId" - ], - "response": { - "$ref": "ListInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "debug": { - "id": "appengine.apps.modules.versions.instances.debug", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", - "httpMethod": "POST", - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", - "required": true, - "location": "path" - }, - "modulesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "instancesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId", - "instancesId" - ], - "request": { - "$ref": "DebugInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } + "flatPath": "v1beta4/apps/{appsId}" } - } } - } - }, - "locations": { - "methods": { - "list": { - "id": "appengine.apps.locations.list", - "path": "v1beta4/apps/{appsId}/locations", - "httpMethod": "GET", - "description": "Lists information about the supported locations for this service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. The resource that owns the locations collection, if applicable.", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "description": "The standard list filter.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard list page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListLocationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "get": { - "id": "appengine.apps.locations.get", - "path": "v1beta4/apps/{appsId}/locations/{locationsId}", - "httpMethod": "GET", - "description": "Get information about a location.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Resource name for the location.", - "required": true, - "location": "path" - }, - "locationsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "locationsId" - ], - "response": { - "$ref": "Location" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - } - } } - } - } - } + }, + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "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", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + } + }, + "schemas": { + "ListInstancesResponse": { + "description": "Response message for Instances.ListInstances.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "instances": { + "description": "The instances belonging to the requested version.", + "type": "array", + "items": { + "$ref": "Instance" + } + } + }, + "id": "ListInstancesResponse" + }, + "ErrorHandler": { + "description": "Custom static error page to be served when an error occurs.", + "type": "object", + "properties": { + "errorCode": { + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "ERROR_CODE_DEFAULT", + "ERROR_CODE_OVER_QUOTA", + "ERROR_CODE_DOS_API_DENIAL", + "ERROR_CODE_TIMEOUT" + ], + "description": "Error condition this handler applies to.", + "type": "string", + "enumDescriptions": [ + "Not specified. ERROR_CODE_DEFAULT is assumed.", + "All other error types.", + "Application has exceeded a resource quota.", + "Client blocked by the application's Denial of Service protection configuration.", + "Deadline reached before the application responds." + ] + }, + "mimeType": { + "description": "MIME type of file. Defaults to text/html.", + "type": "string" + }, + "staticFile": { + "description": "Static file content to be served for this error.", + "type": "string" + } + }, + "id": "ErrorHandler" + }, + "OperationMetadataV1": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "insertTime": { + "description": "Time that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "description": "Time that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OperationMetadataV1" + }, + "Application": { + "description": "An Application resource contains the top-level configuration of an App Engine application.", + "type": "object", + "properties": { + "iap": { + "$ref": "IdentityAwareProxy" + }, + "authDomain": { + "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.", + "type": "string" + }, + "id": { + "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", + "type": "string" + }, + "defaultCookieExpiration": { + "description": "Cookie expiration policy for this application.", + "format": "google-duration", + "type": "string" + }, + "codeBucket": { + "description": "Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly", + "type": "string" + }, + "location": { + "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", + "type": "string" + }, + "defaultBucket": { + "description": "Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly", + "type": "string" + }, + "dispatchRules": { + "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a module or version. Rules are order-dependent.@OutputOnly", + "type": "array", + "items": { + "$ref": "UrlDispatchRule" + } + }, + "defaultHostname": { + "description": "Hostname used to reach the application, as resolved by App Engine.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", + "type": "string" + } + }, + "id": "Application" + }, + "Network": { + "properties": { + "forwardedPorts": { + "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", + "type": "array", + "items": { + "type": "string" + } + }, + "instanceTag": { + "description": "Tag to apply to the VM instance during creation.", + "type": "string" + }, + "name": { + "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", + "type": "string" + } + }, + "id": "Network", + "description": "Extra network settings. Only applicable for VM runtimes.", + "type": "object" + }, + "UrlDispatchRule": { + "properties": { + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + }, + "domain": { + "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", + "type": "string" + }, + "module": { + "description": "Resource ID of a module in this application that should serve the matched request. The module must already exist. Example: default.", + "type": "string" + } + }, + "id": "UrlDispatchRule", + "description": "Rules to match an HTTP request and dispatch that request to a module.", + "type": "object" + }, + "Instance": { + "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", + "type": "object", + "properties": { + "appEngineRelease": { + "description": "App Engine release this instance is running on.@OutputOnly", + "type": "string" + }, + "startTimestamp": { + "description": "Time that this instance was started.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "vmName": { + "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "qps": { + "description": "Average queries per second (QPS) over the last minute.@OutputOnly", + "format": "float", + "type": "number" + }, + "vmZoneName": { + "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the Instance resource in the API. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.@OutputOnly", + "type": "string" + }, + "vmUnlocked": { + "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "boolean" + }, + "averageLatency": { + "description": "Average latency (ms) over the last minute.@OutputOnly", + "format": "int32", + "type": "integer" + }, + "vmIp": { + "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "id": { + "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", + "type": "string" + }, + "memoryUsage": { + "description": "Total memory in use (bytes).@OutputOnly", + "format": "int64", + "type": "string" + }, + "errors": { + "description": "Number of errors since this instance was started.@OutputOnly", + "format": "uint32", + "type": "integer" + }, + "availability": { + "enumDescriptions": [ + "", + "", + "" + ], + "enum": [ + "UNSPECIFIED", + "RESIDENT", + "DYNAMIC" + ], + "description": "Availability of the instance.@OutputOnly", + "type": "string" + }, + "vmStatus": { + "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "requests": { + "description": "Number of requests since this instance was started.@OutputOnly", + "format": "int32", + "type": "integer" + } + }, + "id": "Instance" + }, + "Module": { + "properties": { + "id": { + "description": "Relative name of the module within the application. Example: default.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the Module resource in the API. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "split": { + "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the module.", + "$ref": "TrafficSplit" + } + }, + "id": "Module", + "description": "A Module resource is a logical component of an application that can share state and communicate in a secure fashion with other modules. For example, an application that handles customer requests might include separate modules to handle tasks such as backend data analysis or API requests from mobile devices. Each module has a collection of versions that define a specific set of code used to implement the functionality of that module.", + "type": "object" + }, + "ListVersionsResponse": { + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "versions": { + "description": "The versions belonging to the requested module.", + "type": "array", + "items": { + "$ref": "Version" + } + } + }, + "id": "ListVersionsResponse", + "description": "Response message for Versions.ListVersions.", + "type": "object" + }, + "ApiEndpointHandler": { + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ApiEndpointHandler", + "description": "Uses Google Cloud Endpoints to handle requests.", + "type": "object" + }, + "StaticDirectoryHandler": { + "properties": { + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static directory handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, + "httpHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object" + }, + "directory": { + "description": "Path to the directory containing the static files from the application root directory. Everything after the end of the matched URL pattern is appended to static_dir to form the full path to the requested file.", + "type": "string" + }, + "mimeType": { + "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are direved from each file's filename extension.", + "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" + }, + "expiration": { + "description": "Time a static file served by this handler should be cached.", + "format": "google-duration", + "type": "string" + } + }, + "id": "StaticDirectoryHandler", + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static directory handlers make it easy to serve the entire contents of a directory as static files.", + "type": "object" + }, + "AutomaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "type": "object", + "properties": { + "minIdleInstances": { + "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", + "format": "int32", + "type": "integer" + }, + "maxTotalInstances": { + "description": "Maximum number of instances that should be started to handle requests.", + "format": "int32", + "type": "integer" + }, + "minTotalInstances": { + "description": "Minimum number of instances that should be maintained for this version.", + "format": "int32", + "type": "integer" + }, + "networkUtilization": { + "$ref": "NetworkUtilization", + "description": "Target scaling by network usage." + }, + "maxConcurrentRequests": { + "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", + "format": "int32", + "type": "integer" + }, + "coolDownPeriod": { + "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", + "format": "google-duration", + "type": "string" + }, + "maxPendingLatency": { + "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", + "format": "google-duration", + "type": "string" + }, + "cpuUtilization": { + "$ref": "CpuUtilization", + "description": "Target scaling by CPU usage." + }, + "diskUtilization": { + "$ref": "DiskUtilization", + "description": "Target scaling by disk usage." + }, + "minPendingLatency": { + "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", + "format": "google-duration", + "type": "string" + }, + "requestUtilization": { + "$ref": "RequestUtilization", + "description": "Target scaling by request utilization." + }, + "maxIdleInstances": { + "description": "Maximum number of idle instances that should be maintained for this version.", + "format": "int32", + "type": "integer" + } + }, + "id": "AutomaticScaling" + }, + "NetworkUtilization": { + "properties": { + "targetSentBytesPerSec": { + "description": "Target bytes sent per second.", + "format": "int32", + "type": "integer" + }, + "targetReceivedPacketsPerSec": { + "description": "Target packets received per second.", + "format": "int32", + "type": "integer" + }, + "targetReceivedBytesPerSec": { + "description": "Target bytes received per second.", + "format": "int32", + "type": "integer" + }, + "targetSentPacketsPerSec": { + "description": "Target packets sent per second.", + "format": "int32", + "type": "integer" + } + }, + "id": "NetworkUtilization", + "description": "Target scaling by network usage. Only applicable for VM runtimes.", + "type": "object" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + } + }, + "id": "Location" + }, + "HealthCheck": { + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", + "type": "object", + "properties": { + "restartThreshold": { + "description": "Number of consecutive failed health checks required before an instance is restarted.", + "format": "uint32", + "type": "integer" + }, + "healthyThreshold": { + "description": "Number of consecutive successful health checks required before receiving traffic.", + "format": "uint32", + "type": "integer" + }, + "checkInterval": { + "description": "Interval between health checks.", + "format": "google-duration", + "type": "string" + }, + "timeout": { + "description": "Time before the health check is considered failed.", + "format": "google-duration", + "type": "string" + }, + "unhealthyThreshold": { + "description": "Number of consecutive failed health checks required before removing traffic.", + "format": "uint32", + "type": "integer" + }, + "disableHealthCheck": { + "description": "Whether to explicitly disable health checks for this instance.", + "type": "boolean" + }, + "host": { + "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", + "type": "string" + } + }, + "id": "HealthCheck" + }, + "SourceReference": { + "properties": { + "revisionId": { + "description": "The canonical, persistent identifier of the deployed revision. Aliases that include tags or branch names are not allowed. Example (git): \"2198322f89e0bb2e25021667c2ed489d1fd34e6b\"", + "type": "string" + }, + "repository": { + "description": "URI string identifying the repository. Example: \"https://source.developers.google.com/p/app-123/r/default\"", + "type": "string" + } + }, + "id": "SourceReference", + "description": "Reference to a particular snapshot of the source tree used to build and deploy the application.", + "type": "object" + }, + "DebugInstanceRequest": { + "properties": { + "sshKey": { + "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", + "type": "string" + } + }, + "id": "DebugInstanceRequest", + "description": "Request message for Instances.DebugInstance.", + "type": "object" + }, + "OperationMetadataV1Beta5": { + "properties": { + "method": { + "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "insertTime": { + "description": "Timestamp that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "Timestamp that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta5", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" + }, + "Library": { + "properties": { + "version": { + "description": "Version of the library to select, or \"latest\".", + "type": "string" + }, + "name": { + "description": "Name of the library. Example: \"django\".", + "type": "string" + } + }, + "id": "Library", + "description": "Third-party Python runtime library that is required by the application.", + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Location" + } + } + }, + "id": "ListLocationsResponse" + }, + "Version": { + "properties": { + "servingStatus": { + "enumDescriptions": [ + "Not specified.", + "Currently serving. Instances are created according to the scaling settings of the version.", + "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." + ], + "enum": [ + "SERVING_STATUS_UNSPECIFIED", + "SERVING", + "STOPPED" + ], + "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", + "type": "string" + }, + "deployment": { + "$ref": "Deployment", + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." + }, + "resources": { + "description": "Machine resources for this version. Only applicable for VM runtimes.", + "$ref": "Resources" + }, + "inboundServices": { + "enumDescriptions": [ + "Not specified.", + "Allows an application to receive mail.", + "Allows an application to receive email-bound notifications.", + "Allows an application to receive error stanzas.", + "Allows an application to receive instant messages.", + "Allows an application to receive user subscription POSTs.", + "Allows an application to receive a user's chat presence.", + "Registers an application for notifications when a client connects or disconnects from a channel.", + "Enables warmup requests." + ], + "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", + "type": "array", + "items": { + "enum": [ + "INBOUND_SERVICE_UNSPECIFIED", + "INBOUND_SERVICE_MAIL", + "INBOUND_SERVICE_MAIL_BOUNCE", + "INBOUND_SERVICE_XMPP_ERROR", + "INBOUND_SERVICE_XMPP_MESSAGE", + "INBOUND_SERVICE_XMPP_SUBSCRIBE", + "INBOUND_SERVICE_XMPP_PRESENCE", + "INBOUND_SERVICE_CHANNEL_PRESENCE", + "INBOUND_SERVICE_WARMUP" + ], + "type": "string" + } + }, + "errorHandlers": { + "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", + "type": "array", + "items": { + "$ref": "ErrorHandler" + } + }, + "defaultExpiration": { + "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.", + "format": "google-duration", + "type": "string" + }, + "libraries": { + "description": "Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set.", + "type": "array", + "items": { + "$ref": "Library" + } + }, + "nobuildFilesRegex": { + "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", + "type": "string" + }, + "creationTime": { + "description": "Time that this version was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "basicScaling": { + "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "$ref": "BasicScaling" + }, + "runtime": { + "description": "Desired runtime. Example: python27.", + "type": "string" + }, + "id": { + "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", + "type": "string" + }, + "envVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object" + }, + "network": { + "description": "Extra network settings. Only applicable for VM runtimes.", + "$ref": "Network" + }, + "betaSettings": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata settings that are supplied to this version to enable beta runtime features.", + "type": "object" + }, + "env": { + "description": "App Engine execution environment to use for this version.Defaults to 1.", + "type": "string" + }, + "handlers": { + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", + "type": "array", + "items": { + "$ref": "UrlMap" + } + }, + "deployer": { + "description": "Email address of the user who created this version.@OutputOnly", + "type": "string" + }, + "automaticScaling": { + "$ref": "AutomaticScaling", + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." + }, + "healthCheck": { + "$ref": "HealthCheck", + "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." + }, + "threadsafe": { + "description": "Whether multiple requests can be dispatched to this version at once.", + "type": "boolean" + }, + "manualScaling": { + "$ref": "ManualScaling", + "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." + }, + "name": { + "description": "Full path to the Version resource in the API. Example: apps/myapp/modules/default/versions/v1.@OutputOnly", + "type": "string" + }, + "apiConfig": { + "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.", + "$ref": "ApiConfigHandler" + }, + "vm": { + "description": "Whether to deploy this version in a container on a virtual machine.", + "type": "boolean" + }, + "instanceClass": { + "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", + "type": "string" + } + }, + "id": "Version", + "description": "A Version resource is a specific set of source code and configuration files that are deployed into a module.", + "type": "object" + }, + "ContainerInfo": { + "properties": { + "image": { + "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", + "type": "string" + } + }, + "id": "ContainerInfo", + "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", + "type": "object" + }, + "RequestUtilization": { + "properties": { + "targetRequestCountPerSec": { + "description": "Target requests per second.", + "format": "int32", + "type": "integer" + }, + "targetConcurrentRequests": { + "description": "Target number of concurrent requests.", + "format": "int32", + "type": "integer" + } + }, + "id": "RequestUtilization", + "description": "Target scaling by request utilization. Only applicable for VM runtimes.", + "type": "object" + }, + "UrlMap": { + "properties": { + "script": { + "description": "Executes a script to handle the request that matches this URL pattern.", + "$ref": "ScriptHandler" + }, + "urlRegex": { + "description": "A URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", + "type": "string" + }, + "login": { + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ], + "description": "Level of login required to access this resource.", + "type": "string", + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ] + }, + "apiEndpoint": { + "$ref": "ApiEndpointHandler", + "description": "Uses API Endpoints to handle requests." + }, + "staticDirectory": { + "description": "Serves the entire contents of a directory as static files.This attribute is deprecated. You can mimic the behavior of static directories using static files.", + "$ref": "StaticDirectoryHandler" + }, + "staticFiles": { + "description": "Returns the contents of a file, such as an image, as the response.", + "$ref": "StaticFilesHandler" + }, + "redirectHttpResponseCode": { + "enumDescriptions": [ + "Not specified. 302 is assumed.", + "301 Moved Permanently code.", + "302 Moved Temporarily code.", + "303 See Other code.", + "307 Temporary Redirect code." + ], + "enum": [ + "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", + "REDIRECT_HTTP_RESPONSE_CODE_301", + "REDIRECT_HTTP_RESPONSE_CODE_302", + "REDIRECT_HTTP_RESPONSE_CODE_303", + "REDIRECT_HTTP_RESPONSE_CODE_307" + ], + "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", + "type": "string" + }, + "securityLevel": { + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string" + }, + "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + } + }, + "id": "UrlMap", + "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", + "type": "object" + }, + "Operation": { + "properties": { + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object" + }, + "ApiConfigHandler": { + "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", + "type": "object", + "properties": { + "script": { + "description": "Path to the script from the application root directory.", + "type": "string" + }, + "login": { + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ], + "description": "Level of login required to access this resource. Defaults to optional.", + "type": "string", + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ] + }, + "url": { + "description": "URL to serve the endpoint at.", + "type": "string" + }, + "securityLevel": { + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string" + }, + "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + } + }, + "id": "ApiConfigHandler" + }, + "FileInfo": { + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", + "type": "object", + "properties": { + "sourceUrl": { + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "type": "string" + }, + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "type": "string" + } + }, + "id": "FileInfo" + }, + "StaticFilesHandler": { + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", + "type": "object", + "properties": { + "uploadPathRegex": { + "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", + "type": "string" + }, + "path": { + "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.", + "type": "string" + }, + "mimeType": { + "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.", + "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" + }, + "expiration": { + "description": "Time a static file served by this handler should be cached.", + "format": "google-duration", + "type": "string" + }, + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, + "httpHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object" + } + }, + "id": "StaticFilesHandler" + }, + "ScriptHandler": { + "description": "Executes a script to handle the request that matches the URL pattern.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ScriptHandler" + }, + "DiskUtilization": { + "properties": { + "targetReadOpsPerSec": { + "description": "Target ops read per second.", + "format": "int32", + "type": "integer" + }, + "targetReadBytesPerSec": { + "description": "Target bytes read per second.", + "format": "int32", + "type": "integer" + }, + "targetWriteOpsPerSec": { + "description": "Target ops written per second.", + "format": "int32", + "type": "integer" + }, + "targetWriteBytesPerSec": { + "description": "Target bytes written per second.", + "format": "int32", + "type": "integer" + } + }, + "id": "DiskUtilization", + "description": "Target scaling by disk usage. Only applicable for VM runtimes.", + "type": "object" + }, + "BasicScaling": { + "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "type": "object", + "properties": { + "maxInstances": { + "description": "Maximum number of instances to create for this version.", + "format": "int32", + "type": "integer" + }, + "idleTimeout": { + "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", + "format": "google-duration", + "type": "string" + } + }, + "id": "BasicScaling" + }, + "OperationMetadataExperimental": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", + "type": "string" + }, + "insertTime": { + "description": "Time that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "Time that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OperationMetadataExperimental" + }, + "CpuUtilization": { + "description": "Target scaling by CPU usage.", + "type": "object", + "properties": { + "aggregationWindowLength": { + "description": "Period of time over which CPU utilization is calculated.", + "format": "google-duration", + "type": "string" + }, + "targetUtilization": { + "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", + "format": "double", + "type": "number" + } + }, + "id": "CpuUtilization" + }, + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "IdentityAwareProxy": { + "description": "Identity-Aware Proxy", + "type": "object", + "properties": { + "oauth2ClientSecret": { + "description": "For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", + "type": "string" + }, + "oauth2ClientId": { + "description": "OAuth2 client ID to use for the authentication flow.", + "type": "string" + }, + "oauth2ClientSecretSha256": { + "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", + "type": "string" + }, + "enabled": { + "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", + "type": "boolean" + } + }, + "id": "IdentityAwareProxy" + }, + "ManualScaling": { + "properties": { + "instances": { + "description": "Number of instances to assign to the module at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", + "format": "int32", + "type": "integer" + } + }, + "id": "ManualScaling", + "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "type": "object" + }, + "TrafficSplit": { + "properties": { + "shardBy": { + "enumDescriptions": [ + "Diversion method unspecified.", + "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or else no diversion will occur.", + "Diversion based on applying the modulus operation to a fingerprint of the IP address." + ], + "enum": [ + "UNSPECIFIED", + "COOKIE", + "IP" + ], + "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", + "type": "string" + }, + "allocations": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "Mapping from version IDs within the module to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the module may not have any traffic allocation. Modules that have traffic allocated cannot be deleted until either the module is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", + "type": "object" + } + }, + "id": "TrafficSplit", + "description": "Traffic routing configuration for versions within a single module. Traffic splits define how traffic directed to the module is assigned to versions.", + "type": "object" + }, + "LocationMetadata": { + "description": "Metadata for the given google.cloud.location.Location.", + "type": "object", + "properties": { + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" + }, + "flexibleEnvironmentAvailable": { + "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", + "type": "boolean" + } + }, + "id": "LocationMetadata" + }, + "OperationMetadataV1Beta": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "description": "Time that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "type": "array", + "items": { + "type": "string" + } + }, + "insertTime": { + "description": "Time that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta" + }, + "ListModulesResponse": { + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "modules": { + "description": "The modules belonging to the requested application.", + "type": "array", + "items": { + "$ref": "Module" + } + } + }, + "id": "ListModulesResponse", + "description": "Response message for Modules.ListModules.", + "type": "object" + }, + "Deployment": { + "description": "Code and application artifacts used to deploy a version to App Engine.", + "type": "object", + "properties": { + "files": { + "additionalProperties": { + "$ref": "FileInfo" + }, + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", + "type": "object" + }, + "container": { + "$ref": "ContainerInfo", + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." + }, + "sourceReferences": { + "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", + "type": "array", + "items": { + "$ref": "SourceReference" + } + } + }, + "id": "Deployment" + }, + "Resources": { + "description": "Machine resources for a version.", + "type": "object", + "properties": { + "volumes": { + "description": "User specified volumes.", + "type": "array", + "items": { + "$ref": "Volume" + } + }, + "diskGb": { + "description": "Disk size (GB) needed.", + "format": "double", + "type": "number" + }, + "cpu": { + "description": "Number of CPU cores needed.", + "format": "double", + "type": "number" + }, + "memoryGb": { + "description": "Memory (GB) needed.", + "format": "double", + "type": "number" + } + }, + "id": "Resources" + }, + "Volume": { + "properties": { + "volumeType": { + "description": "Underlying volume type, e.g. 'tmpfs'.", + "type": "string" + }, + "sizeGb": { + "description": "Volume size in gigabytes.", + "format": "double", + "type": "number" + }, + "name": { + "description": "Unique name for the volume.", + "type": "string" + } + }, + "id": "Volume", + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } + } + }, + "id": "ListOperationsResponse" + }, + "OperationMetadata": { + "properties": { + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "description": "Timestamp that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + }, + "insertTime": { + "description": "Timestamp that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OperationMetadata", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" + } + }, + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "version": "v1beta4", + "baseUrl": "https://appengine.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/appengine.admin": { + "description": "View and manage your applications deployed on Google App Engine" + }, + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "servicePath": "", + "kind": "discovery#restDescription", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications." } diff --git a/etc/api/appengine/v1beta5/appengine-api.json b/etc/api/appengine/v1beta5/appengine-api.json index a4f2bfae30..b87e5e3b37 100644 --- a/etc/api/appengine/v1beta5/appengine-api.json +++ b/etc/api/appengine/v1beta5/appengine-api.json @@ -1,2183 +1,2367 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/UEz2jJACNpYPzXjVH7xBeGPwZAM\"", - "discoveryVersion": "v1", - "id": "appengine:v1beta5", - "name": "appengine", - "version": "v1beta5", - "revision": "20161208", - "title": "Google App Engine Admin API", - "description": "Provisions and manages App Engine applications.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/appengine/docs/admin-api/", - "protocol": "rest", - "baseUrl": "https://appengine.googleapis.com/", - "basePath": "", - "rootUrl": "https://appengine.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/appengine.admin": { - "description": "View and manage your applications deployed on Google App Engine" + "parameters": { + "quotaUser": { + "location": "query", + "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" }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - } - } - } - }, - "schemas": { - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "The response message for Operations.ListOperations.", - "properties": { - "operations": { - "type": "array", - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - } + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "properties": { - "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name." + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" }, - "metadata": { - "type": "object", - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "done": { - "type": "boolean", - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available." - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "response": { - "type": "object", - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: Simple to use and understand for most users Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc which can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting purpose. Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - } - }, - "Application": { - "id": "Application", - "type": "object", - "description": "An Application resource contains the top-level configuration of an App Engine application.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp." - }, - "dispatchRules": { - "type": "array", - "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent.@OutputOnly", - "items": { - "$ref": "UrlDispatchRule" - } - }, - "authDomain": { - "type": "string", - "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account." - }, - "location": { - "type": "string", - "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US" - }, - "codeBucket": { - "type": "string", - "description": "A Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly" - }, - "defaultCookieExpiration": { - "type": "string", - "description": "Cookie expiration policy for this application." - }, - "defaultHostname": { - "type": "string", - "description": "Hostname used to reach the application, as resolved by App Engine.@OutputOnly" - }, - "defaultBucket": { - "type": "string", - "description": "A Google Cloud Storage bucket that can be used by the application to store content.@OutputOnly" - } - } - }, - "UrlDispatchRule": { - "id": "UrlDispatchRule", - "type": "object", - "description": "Rules to match an HTTP request and dispatch that request to a service.", - "properties": { - "domain": { - "type": "string", - "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\"." - }, - "path": { - "type": "string", - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters." - }, - "service": { - "type": "string", - "description": "Resource id of a service in this application that should serve the matched request. The service must already exist. Example: default." - } - } - }, - "Version": { - "id": "Version", - "type": "object", - "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\"." - }, - "automaticScaling": { - "$ref": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." - }, - "basicScaling": { - "$ref": "BasicScaling", - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." - }, - "manualScaling": { - "$ref": "ManualScaling", - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." - }, - "inboundServices": { - "type": "array", - "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", - "enumDescriptions": [ - "Not specified.", - "Allows an application to receive mail.", - "Allows an application to receive email-bound notifications.", - "Allows an application to receive error stanzas.", - "Allows an application to receive instant messages.", - "Allows an application to receive user subscription POSTs.", - "Allows an application to receive a user's chat presence.", - "Registers an application for notifications when a client connects or disconnects from a channel.", - "Enables warmup requests." - ], - "items": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", "enum": [ - "INBOUND_SERVICE_UNSPECIFIED", - "INBOUND_SERVICE_MAIL", - "INBOUND_SERVICE_MAIL_BOUNCE", - "INBOUND_SERVICE_XMPP_ERROR", - "INBOUND_SERVICE_XMPP_MESSAGE", - "INBOUND_SERVICE_XMPP_SUBSCRIBE", - "INBOUND_SERVICE_XMPP_PRESENCE", - "INBOUND_SERVICE_CHANNEL_PRESENCE", - "INBOUND_SERVICE_WARMUP" - ] - } - }, - "instanceClass": { - "type": "string", - "description": "Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling." - }, - "network": { - "$ref": "Network", - "description": "Extra network settings. Only applicable for VM runtimes." - }, - "resources": { - "$ref": "Resources", - "description": "Machine resources for this version. Only applicable for VM runtimes." - }, - "runtime": { - "type": "string", - "description": "Desired runtime. Example: python27." - }, - "threadsafe": { - "type": "boolean", - "description": "Whether multiple requests can be dispatched to this version at once." - }, - "vm": { - "type": "boolean", - "description": "Whether to deploy this version in a container on a virtual machine." - }, - "betaSettings": { - "type": "object", - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "additionalProperties": { + "1", + "2" + ], + "description": "V1 error format.", "type": "string" - } }, - "env": { - "type": "string", - "description": "App Engine execution environment to use for this version.Defaults to 1." - }, - "servingStatus": { - "type": "string", - "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", - "enum": [ - "SERVING_STATUS_UNSPECIFIED", - "SERVING", - "STOPPED" - ] - }, - "deployer": { - "type": "string", - "description": "Email address of the user who created this version.@OutputOnly" - }, - "creationTime": { - "type": "string", - "description": "Time that this version was created.@OutputOnly" - }, - "diskUsageBytes": { - "type": "string", - "description": "Total size of version files hosted on App Engine disk in bytes.@OutputOnly", - "format": "int64" - }, - "handlers": { - "type": "array", - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - } - }, - "errorHandlers": { - "type": "array", - "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "ErrorHandler" - } - }, - "libraries": { - "type": "array", - "description": "Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "Library" - } - }, - "apiConfig": { - "$ref": "ApiConfigHandler", - "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." - }, - "envVariables": { - "type": "object", - "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", - "additionalProperties": { + "callback": { + "location": "query", + "description": "JSONP", "type": "string" - } }, - "defaultExpiration": { - "type": "string", - "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set." - }, - "healthCheck": { - "$ref": "HealthCheck", - "description": "Configures health checking for VM instances. Unhealthy instances are be stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." - }, - "nobuildFilesRegex": { - "type": "string", - "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set." - }, - "deployment": { - "$ref": "Deployment", - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." - }, - "endpointsApiService": { - "$ref": "EndpointsApiService", - "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app." - } - } - }, - "AutomaticScaling": { - "id": "AutomaticScaling", - "type": "object", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "properties": { - "coolDownPeriod": { - "type": "string", - "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes." - }, - "cpuUtilization": { - "$ref": "CpuUtilization", - "description": "Target scaling by CPU usage." - }, - "maxConcurrentRequests": { - "type": "integer", - "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", - "format": "int32" - }, - "maxIdleInstances": { - "type": "integer", - "description": "Maximum number of idle instances that should be maintained for this version.", - "format": "int32" - }, - "maxTotalInstances": { - "type": "integer", - "description": "Maximum number of instances that should be started to handle requests.", - "format": "int32" - }, - "maxPendingLatency": { - "type": "string", - "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it." - }, - "minIdleInstances": { - "type": "integer", - "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", - "format": "int32" - }, - "minTotalInstances": { - "type": "integer", - "description": "Minimum number of instances that should be maintained for this version.", - "format": "int32" - }, - "minPendingLatency": { - "type": "string", - "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it." - }, - "requestUtilization": { - "$ref": "RequestUtilization", - "description": "Target scaling by request utilization." - }, - "diskUtilization": { - "$ref": "DiskUtilization", - "description": "Target scaling by disk usage." - }, - "networkUtilization": { - "$ref": "NetworkUtilization", - "description": "Target scaling by network usage." - } - } - }, - "CpuUtilization": { - "id": "CpuUtilization", - "type": "object", - "description": "Target scaling by CPU usage.", - "properties": { - "aggregationWindowLength": { - "type": "string", - "description": "Period of time over which CPU utilization is calculated." - }, - "targetUtilization": { - "type": "number", - "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", - "format": "double" - } - } - }, - "RequestUtilization": { - "id": "RequestUtilization", - "type": "object", - "description": "Target scaling by request utilization. Only applicable for VM runtimes.", - "properties": { - "targetRequestCountPerSec": { - "type": "integer", - "description": "Target requests per second.", - "format": "int32" - }, - "targetConcurrentRequests": { - "type": "integer", - "description": "Target number of concurrent requests.", - "format": "int32" - } - } - }, - "DiskUtilization": { - "id": "DiskUtilization", - "type": "object", - "description": "Target scaling by disk usage. Only applicable for VM runtimes.", - "properties": { - "targetWriteBytesPerSec": { - "type": "integer", - "description": "Target bytes written per second.", - "format": "int32" - }, - "targetWriteOpsPerSec": { - "type": "integer", - "description": "Target ops written per second.", - "format": "int32" - }, - "targetReadBytesPerSec": { - "type": "integer", - "description": "Target bytes read per second.", - "format": "int32" - }, - "targetReadOpsPerSec": { - "type": "integer", - "description": "Target ops read per second.", - "format": "int32" - } - } - }, - "NetworkUtilization": { - "id": "NetworkUtilization", - "type": "object", - "description": "Target scaling by network usage. Only applicable for VM runtimes.", - "properties": { - "targetSentBytesPerSec": { - "type": "integer", - "description": "Target bytes sent per second.", - "format": "int32" - }, - "targetSentPacketsPerSec": { - "type": "integer", - "description": "Target packets sent per second.", - "format": "int32" - }, - "targetReceivedBytesPerSec": { - "type": "integer", - "description": "Target bytes received per second.", - "format": "int32" - }, - "targetReceivedPacketsPerSec": { - "type": "integer", - "description": "Target packets received per second.", - "format": "int32" - } - } - }, - "BasicScaling": { - "id": "BasicScaling", - "type": "object", - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "properties": { - "idleTimeout": { - "type": "string", - "description": "Duration of time after the last request that an instance must wait before the instance is shut down." - }, - "maxInstances": { - "type": "integer", - "description": "Maximum number of instances to create for this version.", - "format": "int32" - } - } - }, - "ManualScaling": { - "id": "ManualScaling", - "type": "object", - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "properties": { - "instances": { - "type": "integer", - "description": "Number of instances to assign to the service at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", - "format": "int32" - } - } - }, - "Network": { - "id": "Network", - "type": "object", - "description": "Extra network settings. Only applicable for VM runtimes.", - "properties": { - "forwardedPorts": { - "type": "array", - "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", - "items": { + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], "type": "string" - } }, - "instanceTag": { - "type": "string", - "description": "Tag to apply to the VM instance during creation." + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" }, - "name": { - "type": "string", - "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default." - }, - "subnetworkName": { - "type": "string", - "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network. If the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range. If the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network. If the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app." - } - } - }, - "Resources": { - "id": "Resources", - "type": "object", - "description": "Machine resources for a version.", - "properties": { - "cpu": { - "type": "number", - "description": "Number of CPU cores needed.", - "format": "double" - }, - "diskGb": { - "type": "number", - "description": "Disk size (GB) needed.", - "format": "double" - }, - "memoryGb": { - "type": "number", - "description": "Memory (GB) needed.", - "format": "double" - }, - "volumes": { - "type": "array", - "description": "Volumes mounted within the app container.", - "items": { - "$ref": "Volume" - } - } - } - }, - "Volume": { - "id": "Volume", - "type": "object", - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "properties": { - "name": { - "type": "string", - "description": "Unique name for the volume." - }, - "volumeType": { - "type": "string", - "description": "Underlying volume type, e.g. 'tmpfs'." - }, - "sizeGb": { - "type": "number", - "description": "Volume size in gigabytes.", - "format": "double" - } - } - }, - "UrlMap": { - "id": "UrlMap", - "type": "object", - "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", - "properties": { - "urlRegex": { - "type": "string", - "description": "A URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path." - }, - "staticFiles": { - "$ref": "StaticFilesHandler", - "description": "Returns the contents of a file, such as an image, as the response." - }, - "script": { - "$ref": "ScriptHandler", - "description": "Executes a script to handle the request that matches this URL pattern." - }, - "apiEndpoint": { - "$ref": "ApiEndpointHandler", - "description": "Uses API Endpoints to handle requests." - }, - "securityLevel": { - "type": "string", - "description": "Security (HTTPS) enforcement for this URL.", - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ] - }, - "login": { - "type": "string", - "description": "Level of login required to access this resource.", - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ] - }, - "authFailAction": { - "type": "string", - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ] - }, - "redirectHttpResponseCode": { - "type": "string", - "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", - "enum": [ - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", - "REDIRECT_HTTP_RESPONSE_CODE_301", - "REDIRECT_HTTP_RESPONSE_CODE_302", - "REDIRECT_HTTP_RESPONSE_CODE_303", - "REDIRECT_HTTP_RESPONSE_CODE_307" - ] - } - } - }, - "StaticFilesHandler": { - "id": "StaticFilesHandler", - "type": "object", - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", - "properties": { - "path": { - "type": "string", - "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern." - }, - "uploadPathRegex": { - "type": "string", - "description": "Regular expression that matches the file paths for all files that should be referenced by this handler." - }, - "httpHeaders": { - "type": "object", - "description": "HTTP headers to use for all responses from these URLs.", - "additionalProperties": { + "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" - } - }, - "mimeType": { - "type": "string", - "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension." - }, - "expiration": { - "type": "string", - "description": "Time a static file served by this handler should be cached." - }, - "requireMatchingFile": { - "type": "boolean", - "description": "Whether this handler should match the request if the file referenced by the handler does not exist." - }, - "applicationReadable": { - "type": "boolean", - "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas." } - } }, - "ScriptHandler": { - "id": "ScriptHandler", - "type": "object", - "description": "Executes a script to handle the request that matches the URL pattern.", - "properties": { - "scriptPath": { - "type": "string", - "description": "Path to the script from the application root directory." - } - } - }, - "ApiEndpointHandler": { - "id": "ApiEndpointHandler", - "type": "object", - "description": "Uses Google Cloud Endpoints to handle requests.", - "properties": { - "scriptPath": { - "type": "string", - "description": "Path to the script from the application root directory." - } - } - }, - "ErrorHandler": { - "id": "ErrorHandler", - "type": "object", - "description": "Custom static error page to be served when an error occurs.", - "properties": { - "errorCode": { - "type": "string", - "description": "Error condition this handler applies to.", - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "ERROR_CODE_DEFAULT", - "ERROR_CODE_OVER_QUOTA", - "ERROR_CODE_DOS_API_DENIAL", - "ERROR_CODE_TIMEOUT" - ] - }, - "staticFile": { - "type": "string", - "description": "Static file content to be served for this error." - }, - "mimeType": { - "type": "string", - "description": "MIME type of file. Defaults to text/html." - } - } - }, - "Library": { - "id": "Library", - "type": "object", - "description": "Third-party Python runtime library that is required by the application.", - "properties": { - "name": { - "type": "string", - "description": "Name of the library. Example: \"django\"." - }, - "version": { - "type": "string", - "description": "Version of the library to select, or \"latest\"." - } - } - }, - "ApiConfigHandler": { - "id": "ApiConfigHandler", - "type": "object", - "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", - "properties": { - "authFailAction": { - "type": "string", - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ] - }, - "login": { - "type": "string", - "description": "Level of login required to access this resource. Defaults to optional.", - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ] - }, - "script": { - "type": "string", - "description": "Path to the script from the application root directory." - }, - "securityLevel": { - "type": "string", - "description": "Security (HTTPS) enforcement for this URL.", - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ] - }, - "url": { - "type": "string", - "description": "URL to serve the endpoint at." - } - } - }, - "HealthCheck": { - "id": "HealthCheck", - "type": "object", - "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", - "properties": { - "disableHealthCheck": { - "type": "boolean", - "description": "Whether to explicitly disable health checks for this instance." - }, - "host": { - "type": "string", - "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"" - }, - "healthyThreshold": { - "type": "integer", - "description": "Number of consecutive successful health checks required before receiving traffic.", - "format": "uint32" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "Number of consecutive failed health checks required before removing traffic.", - "format": "uint32" - }, - "restartThreshold": { - "type": "integer", - "description": "Number of consecutive failed health checks required before an instance is restarted.", - "format": "uint32" - }, - "checkInterval": { - "type": "string", - "description": "Interval between health checks." - }, - "timeout": { - "type": "string", - "description": "Time before the health check is considered failed." - } - } - }, - "Deployment": { - "id": "Deployment", - "type": "object", - "description": "Code and application artifacts used to deploy a version to App Engine.", - "properties": { - "files": { - "type": "object", - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "additionalProperties": { - "$ref": "FileInfo" - } - }, - "container": { - "$ref": "ContainerInfo", - "description": "A Docker image that App Engine uses the run the version. Only applicable for instances in App Engine flexible environment." - }, - "sourceReferences": { - "type": "array", - "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", - "items": { - "$ref": "SourceReference" - } - } - } - }, - "FileInfo": { - "id": "FileInfo", - "type": "object", - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", - "properties": { - "sourceUrl": { - "type": "string", - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'." - }, - "sha1Sum": { - "type": "string", - "description": "The SHA1 hash of the file, in hex." - }, - "mimeType": { - "type": "string", - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage." - } - } - }, - "ContainerInfo": { - "id": "ContainerInfo", - "type": "object", - "description": "Docker image that is used to start a VM container for the version you deploy.", - "properties": { - "image": { - "type": "string", - "description": "URI to the hosted container image in a Docker repository. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"" - } - } - }, - "SourceReference": { - "id": "SourceReference", - "type": "object", - "description": "Reference to a particular snapshot of the source tree used to build and deploy the application.", - "properties": { - "repository": { - "type": "string", - "description": "URI string identifying the repository. Example: \"https://source.developers.google.com/p/app-123/r/default\"" - }, - "revisionId": { - "type": "string", - "description": "The canonical, persistent identifier of the deployed revision. Aliases that include tags or branch names are not allowed. Example (git): \"2198322f89e0bb2e25021667c2ed489d1fd34e6b\"" - } - } - }, - "EndpointsApiService": { - "id": "EndpointsApiService", - "type": "object", - "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", - "properties": { - "name": { - "type": "string", - "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"" - }, - "configId": { - "type": "string", - "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"" - } - } - }, - "ListVersionsResponse": { - "id": "ListVersionsResponse", - "type": "object", - "description": "Response message for Versions.ListVersions.", - "properties": { - "versions": { - "type": "array", - "description": "The versions belonging to the requested service.", - "items": { - "$ref": "Version" - } - }, - "nextPageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results." - } - } - }, - "Service": { - "id": "Service", - "type": "object", - "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle other tasks such as API requests from mobile devices or backend data analysis. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Relative name of the service within the application. Example: default.@OutputOnly" - }, - "split": { - "$ref": "TrafficSplit", - "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service." - } - } - }, - "TrafficSplit": { - "id": "TrafficSplit", - "type": "object", - "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", - "properties": { - "shardBy": { - "type": "string", - "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", - "enum": [ - "UNSPECIFIED", - "COOKIE", - "IP" - ] - }, - "allocations": { - "type": "object", - "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", - "additionalProperties": { - "type": "number", - "format": "double" - } - } - } - }, - "ListServicesResponse": { - "id": "ListServicesResponse", - "type": "object", - "description": "Response message for Services.ListServices.", - "properties": { - "services": { - "type": "array", - "description": "The services belonging to the requested application.", - "items": { - "$ref": "Service" - } - }, - "nextPageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results." - } - } - }, - "Instance": { - "id": "Instance", - "type": "object", - "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", - "properties": { - "name": { - "type": "string", - "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly" - }, - "id": { - "type": "string", - "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly" - }, - "appEngineRelease": { - "type": "string", - "description": "App Engine release this instance is running on.@OutputOnly" - }, - "availability": { - "type": "string", - "description": "Availability of the instance.@OutputOnly", - "enum": [ - "UNSPECIFIED", - "RESIDENT", - "DYNAMIC" - ] - }, - "vmName": { - "type": "string", - "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmZoneName": { - "type": "string", - "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmId": { - "type": "string", - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "startTimestamp": { - "type": "string", - "description": "Time that this instance was started.@OutputOnly" - }, - "requests": { - "type": "integer", - "description": "Number of requests since this instance was started.@OutputOnly", - "format": "int32" - }, - "errors": { - "type": "integer", - "description": "Number of errors since this instance was started.@OutputOnly", - "format": "uint32" - }, - "qps": { - "type": "number", - "description": "Average queries per second (QPS) over the last minute.@OutputOnly", - "format": "float" - }, - "averageLatency": { - "type": "integer", - "description": "Average latency (ms) over the last minute.@OutputOnly", - "format": "int32" - }, - "memoryUsage": { - "type": "string", - "description": "Total memory in use (bytes).@OutputOnly", - "format": "int64" - }, - "vmStatus": { - "type": "string", - "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmUnlocked": { - "type": "boolean", - "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly" - }, - "vmIp": { - "type": "string", - "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly" - } - } - }, - "ListInstancesResponse": { - "id": "ListInstancesResponse", - "type": "object", - "description": "Response message for Instances.ListInstances.", - "properties": { - "instances": { - "type": "array", - "description": "The instances belonging to the requested version.", - "items": { - "$ref": "Instance" - } - }, - "nextPageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results." - } - } - }, - "DebugInstanceRequest": { - "id": "DebugInstanceRequest", - "type": "object", - "description": "Request message for Instances.DebugInstance.", - "properties": { - "sshKey": { - "type": "string", - "description": "Public SSH key to add to the instance. Examples: [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys)." - } - } - }, - "ListLocationsResponse": { - "id": "ListLocationsResponse", - "type": "object", - "description": "The response message for LocationService.ListLocations.", - "properties": { - "locations": { - "type": "array", - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "Location": { - "id": "Location", - "type": "object", - "description": "A resource that represents Google Cloud Platform location.", - "properties": { - "name": { - "type": "string", - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"" - }, - "locationId": { - "type": "string", - "description": "The canonical id for this location. For example: \"us-east1\"." - }, - "labels": { - "type": "object", - "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", - "additionalProperties": { - "type": "string" - } - }, - "metadata": { - "type": "object", - "description": "Service-specific metadata. For example the available capacity at the given location.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "OperationMetadataExperimental": { - "id": "OperationMetadataExperimental", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "method": { - "type": "string", - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Time that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Time that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly" - } - } - }, - "OperationMetadata": { - "id": "OperationMetadata", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "operationType": { - "type": "string", - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Timestamp that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Timestamp that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly" - }, - "method": { - "type": "string", - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly" - } - } - }, - "OperationMetadataV1Beta5": { - "id": "OperationMetadataV1Beta5", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "method": { - "type": "string", - "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Timestamp that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Timestamp that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly" - } - } - }, - "OperationMetadataV1": { - "id": "OperationMetadataV1", - "type": "object", - "description": "Metadata for the given google.longrunning.Operation.", - "properties": { - "method": { - "type": "string", - "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly" - }, - "insertTime": { - "type": "string", - "description": "Time that this operation was created.@OutputOnly" - }, - "endTime": { - "type": "string", - "description": "Time that this operation completed.@OutputOnly" - }, - "user": { - "type": "string", - "description": "User who requested this operation.@OutputOnly" - }, - "target": { - "type": "string", - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly" - }, - "ephemeralMessage": { - "type": "string", - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly" - }, - "warning": { - "type": "array", - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - } - } - } - }, - "LocationMetadata": { - "id": "LocationMetadata", - "type": "object", - "description": "Metadata for the given google.cloud.location.Location.", - "properties": { - "standardEnvironmentAvailable": { - "type": "boolean", - "description": "App Engine Standard Environment is available in the given location.@OutputOnly" - }, - "flexibleEnvironmentAvailable": { - "type": "boolean", - "description": "App Engine Flexible Environment is available in the given location.@OutputOnly" - } - } - } - }, - "resources": { - "apps": { - "methods": { - "create": { - "id": "appengine.apps.create", - "path": "v1beta5/apps", - "httpMethod": "POST", - "description": "Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project).", - "request": { - "$ref": "Application" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "appengine.apps.get", - "path": "v1beta5/apps/{appsId}", - "httpMethod": "GET", - "description": "Gets information about an application.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the application to get. Example: apps/myapp.", - "required": true, - "location": "path" - }, - "ensureResourcesExist": { - "type": "boolean", - "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. Note: This parameter will be deprecated in a future version of the API.", - "location": "query" + "schemas": { + "CpuUtilization": { + "id": "CpuUtilization", + "description": "Target scaling by CPU usage.", + "type": "object", + "properties": { + "aggregationWindowLength": { + "description": "Period of time over which CPU utilization is calculated.", + "format": "google-duration", + "type": "string" + }, + "targetUtilization": { + "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", + "format": "double", + "type": "number" + } } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Application" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "patch": { - "id": "appengine.apps.patch", - "path": "v1beta5/apps/{appsId}", - "httpMethod": "PATCH", - "description": "Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", - "required": true, - "location": "path" + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + } }, - "mask": { - "type": "string", - "description": "Standard field mask for the set of fields to be updated.", - "location": "query" + "id": "Status" + }, + "IdentityAwareProxy": { + "id": "IdentityAwareProxy", + "description": "Identity-Aware Proxy", + "type": "object", + "properties": { + "enabled": { + "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", + "type": "boolean" + }, + "oauth2ClientSecret": { + "description": "For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", + "type": "string" + }, + "oauth2ClientId": { + "description": "OAuth2 client ID to use for the authentication flow.", + "type": "string" + }, + "oauth2ClientSecretSha256": { + "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", + "type": "string" + } + } + }, + "TrafficSplit": { + "id": "TrafficSplit", + "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", + "type": "object", + "properties": { + "shardBy": { + "enumDescriptions": [ + "Diversion method unspecified.", + "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or else no diversion will occur.", + "Diversion based on applying the modulus operation to a fingerprint of the IP address." + ], + "enum": [ + "UNSPECIFIED", + "COOKIE", + "IP" + ], + "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", + "type": "string" + }, + "allocations": { + "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", + "type": "object", + "additionalProperties": { + "format": "double", + "type": "number" + } + } + } + }, + "ManualScaling": { + "id": "ManualScaling", + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "type": "object", + "properties": { + "instances": { + "description": "Number of instances to assign to the service at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", + "format": "int32", + "type": "integer" + } + } + }, + "LocationMetadata": { + "id": "LocationMetadata", + "description": "Metadata for the given google.cloud.location.Location.", + "type": "object", + "properties": { + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" + }, + "flexibleEnvironmentAvailable": { + "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", + "type": "boolean" + } + } + }, + "OperationMetadataV1Beta": { + "id": "OperationMetadataV1Beta", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "type": "array", + "items": { + "type": "string" + } + }, + "insertTime": { + "description": "Time that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "description": "Time that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + } + }, + "ListServicesResponse": { + "id": "ListServicesResponse", + "description": "Response message for Services.ListServices.", + "type": "object", + "properties": { + "services": { + "description": "The services belonging to the requested application.", + "type": "array", + "items": { + "$ref": "Service" + } + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + } + }, + "Deployment": { + "description": "Code and application artifacts used to deploy a version to App Engine.", + "type": "object", + "properties": { + "container": { + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment.", + "$ref": "ContainerInfo" + }, + "sourceReferences": { + "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", + "type": "array", + "items": { + "$ref": "SourceReference" + } + }, + "files": { + "additionalProperties": { + "$ref": "FileInfo" + }, + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", + "type": "object" + } + }, + "id": "Deployment" + }, + "Resources": { + "id": "Resources", + "description": "Machine resources for a version.", + "type": "object", + "properties": { + "volumes": { + "description": "Volumes mounted within the app container.", + "type": "array", + "items": { + "$ref": "Volume" + } + }, + "diskGb": { + "description": "Disk size (GB) needed.", + "format": "double", + "type": "number" + }, + "cpu": { + "description": "Number of CPU cores needed.", + "format": "double", + "type": "number" + }, + "memoryGb": { + "description": "Memory (GB) needed.", + "format": "double", + "type": "number" + } + } + }, + "Volume": { + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "volumeType": { + "description": "Underlying volume type, e.g. 'tmpfs'.", + "type": "string" + }, + "sizeGb": { + "description": "Volume size in gigabytes.", + "format": "double", + "type": "number" + }, + "name": { + "description": "Unique name for the volume.", + "type": "string" + } + }, + "id": "Volume" + }, + "Service": { + "id": "Service", + "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle other tasks such as API requests from mobile devices or backend data analysis. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", + "type": "object", + "properties": { + "id": { + "description": "Relative name of the service within the application. Example: default.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "split": { + "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service.", + "$ref": "TrafficSplit" + } + } + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } + } + }, + "id": "ListOperationsResponse" + }, + "OperationMetadata": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "description": "Timestamp that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + }, + "insertTime": { + "description": "Timestamp that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OperationMetadata" + }, + "ListInstancesResponse": { + "description": "Response message for Instances.ListInstances.", + "type": "object", + "properties": { + "instances": { + "description": "The instances belonging to the requested version.", + "type": "array", + "items": { + "$ref": "Instance" + } + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + }, + "id": "ListInstancesResponse" + }, + "ErrorHandler": { + "description": "Custom static error page to be served when an error occurs.", + "type": "object", + "properties": { + "errorCode": { + "enumDescriptions": [ + "Not specified. ERROR_CODE_DEFAULT is assumed.", + "All other error types.", + "Application has exceeded a resource quota.", + "Client blocked by the application's Denial of Service protection configuration.", + "Deadline reached before the application responds." + ], + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "ERROR_CODE_DEFAULT", + "ERROR_CODE_OVER_QUOTA", + "ERROR_CODE_DOS_API_DENIAL", + "ERROR_CODE_TIMEOUT" + ], + "description": "Error condition this handler applies to.", + "type": "string" + }, + "mimeType": { + "description": "MIME type of file. Defaults to text/html.", + "type": "string" + }, + "staticFile": { + "description": "Static file content to be served for this error.", + "type": "string" + } + }, + "id": "ErrorHandler" + }, + "OperationMetadataV1": { + "id": "OperationMetadataV1", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "insertTime": { + "description": "Time that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "description": "Time that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + } + }, + "Application": { + "description": "An Application resource contains the top-level configuration of an App Engine application.", + "type": "object", + "properties": { + "dispatchRules": { + "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent.@OutputOnly", + "type": "array", + "items": { + "$ref": "UrlDispatchRule" + } + }, + "defaultHostname": { + "description": "Hostname used to reach the application, as resolved by App Engine.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", + "type": "string" + }, + "iap": { + "$ref": "IdentityAwareProxy" + }, + "authDomain": { + "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.", + "type": "string" + }, + "id": { + "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", + "type": "string" + }, + "defaultCookieExpiration": { + "description": "Cookie expiration policy for this application.", + "format": "google-duration", + "type": "string" + }, + "codeBucket": { + "description": "A Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly", + "type": "string" + }, + "location": { + "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", + "type": "string" + }, + "defaultBucket": { + "description": "A Google Cloud Storage bucket that can be used by the application to store content.@OutputOnly", + "type": "string" + } + }, + "id": "Application" + }, + "Network": { + "id": "Network", + "description": "Extra network settings. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "name": { + "description": "Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", + "type": "string" + }, + "forwardedPorts": { + "description": "List of ports, or port pairs, to forward from the virtual machine to the application container.", + "type": "array", + "items": { + "type": "string" + } + }, + "instanceTag": { + "description": "Tag to apply to the VM instance during creation.", + "type": "string" + }, + "subnetworkName": { + "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app.", + "type": "string" + } + } + }, + "Instance": { + "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", + "type": "object", + "properties": { + "requests": { + "description": "Number of requests since this instance was started.@OutputOnly", + "format": "int32", + "type": "integer" + }, + "appEngineRelease": { + "description": "App Engine release this instance is running on.@OutputOnly", + "type": "string" + }, + "startTimestamp": { + "description": "Time that this instance was started.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "vmName": { + "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "qps": { + "description": "Average queries per second (QPS) over the last minute.@OutputOnly", + "format": "float", + "type": "number" + }, + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "vmZoneName": { + "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "vmUnlocked": { + "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "boolean" + }, + "name": { + "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", + "type": "string" + }, + "averageLatency": { + "description": "Average latency (ms) over the last minute.@OutputOnly", + "format": "int32", + "type": "integer" + }, + "vmIp": { + "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "memoryUsage": { + "description": "Total memory in use (bytes).@OutputOnly", + "format": "int64", + "type": "string" + }, + "id": { + "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", + "type": "string" + }, + "availability": { + "enumDescriptions": [ + "", + "", + "" + ], + "enum": [ + "UNSPECIFIED", + "RESIDENT", + "DYNAMIC" + ], + "description": "Availability of the instance.@OutputOnly", + "type": "string" + }, + "errors": { + "description": "Number of errors since this instance was started.@OutputOnly", + "format": "uint32", + "type": "integer" + }, + "vmStatus": { + "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + } + }, + "id": "Instance" + }, + "UrlDispatchRule": { + "id": "UrlDispatchRule", + "description": "Rules to match an HTTP request and dispatch that request to a service.", + "type": "object", + "properties": { + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + }, + "domain": { + "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", + "type": "string" + }, + "service": { + "description": "Resource id of a service in this application that should serve the matched request. The service must already exist. Example: default.", + "type": "string" + } + } + }, + "ListVersionsResponse": { + "description": "Response message for Versions.ListVersions.", + "type": "object", + "properties": { + "versions": { + "description": "The versions belonging to the requested service.", + "type": "array", + "items": { + "$ref": "Version" + } + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + }, + "id": "ListVersionsResponse" + }, + "ApiEndpointHandler": { + "description": "Uses Google Cloud Endpoints to handle requests.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ApiEndpointHandler" + }, + "AutomaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "type": "object", + "properties": { + "minTotalInstances": { + "description": "Minimum number of instances that should be maintained for this version.", + "format": "int32", + "type": "integer" + }, + "networkUtilization": { + "description": "Target scaling by network usage.", + "$ref": "NetworkUtilization" + }, + "maxConcurrentRequests": { + "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", + "format": "int32", + "type": "integer" + }, + "coolDownPeriod": { + "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", + "format": "google-duration", + "type": "string" + }, + "maxPendingLatency": { + "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", + "format": "google-duration", + "type": "string" + }, + "cpuUtilization": { + "description": "Target scaling by CPU usage.", + "$ref": "CpuUtilization" + }, + "diskUtilization": { + "$ref": "DiskUtilization", + "description": "Target scaling by disk usage." + }, + "minPendingLatency": { + "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", + "format": "google-duration", + "type": "string" + }, + "requestUtilization": { + "$ref": "RequestUtilization", + "description": "Target scaling by request utilization." + }, + "maxIdleInstances": { + "description": "Maximum number of idle instances that should be maintained for this version.", + "format": "int32", + "type": "integer" + }, + "minIdleInstances": { + "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", + "format": "int32", + "type": "integer" + }, + "maxTotalInstances": { + "description": "Maximum number of instances that should be started to handle requests.", + "format": "int32", + "type": "integer" + } + }, + "id": "AutomaticScaling" + }, + "NetworkUtilization": { + "id": "NetworkUtilization", + "description": "Target scaling by network usage. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetSentBytesPerSec": { + "description": "Target bytes sent per second.", + "format": "int32", + "type": "integer" + }, + "targetReceivedPacketsPerSec": { + "description": "Target packets received per second.", + "format": "int32", + "type": "integer" + }, + "targetReceivedBytesPerSec": { + "description": "Target bytes received per second.", + "format": "int32", + "type": "integer" + }, + "targetSentPacketsPerSec": { + "description": "Target packets sent per second.", + "format": "int32", + "type": "integer" + } + } + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "Location" + }, + "HealthCheck": { + "id": "HealthCheck", + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", + "type": "object", + "properties": { + "restartThreshold": { + "description": "Number of consecutive failed health checks required before an instance is restarted.", + "format": "uint32", + "type": "integer" + }, + "healthyThreshold": { + "description": "Number of consecutive successful health checks required before receiving traffic.", + "format": "uint32", + "type": "integer" + }, + "checkInterval": { + "description": "Interval between health checks.", + "format": "google-duration", + "type": "string" + }, + "timeout": { + "description": "Time before the health check is considered failed.", + "format": "google-duration", + "type": "string" + }, + "unhealthyThreshold": { + "description": "Number of consecutive failed health checks required before removing traffic.", + "format": "uint32", + "type": "integer" + }, + "disableHealthCheck": { + "description": "Whether to explicitly disable health checks for this instance.", + "type": "boolean" + }, + "host": { + "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", + "type": "string" + } + } + }, + "DebugInstanceRequest": { + "id": "DebugInstanceRequest", + "description": "Request message for Instances.DebugInstance.", + "type": "object", + "properties": { + "sshKey": { + "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", + "type": "string" + } + } + }, + "SourceReference": { + "description": "Reference to a particular snapshot of the source tree used to build and deploy the application.", + "type": "object", + "properties": { + "repository": { + "description": "URI string identifying the repository. Example: \"https://source.developers.google.com/p/app-123/r/default\"", + "type": "string" + }, + "revisionId": { + "description": "The canonical, persistent identifier of the deployed revision. Aliases that include tags or branch names are not allowed. Example (git): \"2198322f89e0bb2e25021667c2ed489d1fd34e6b\"", + "type": "string" + } + }, + "id": "SourceReference" + }, + "OperationMetadataV1Beta5": { + "id": "OperationMetadataV1Beta5", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "insertTime": { + "description": "Timestamp that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "Timestamp that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + } + } + }, + "Library": { + "description": "Third-party Python runtime library that is required by the application.", + "type": "object", + "properties": { + "version": { + "description": "Version of the library to select, or \"latest\".", + "type": "string" + }, + "name": { + "description": "Name of the library. Example: \"django\".", + "type": "string" + } + }, + "id": "Library" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Location" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListLocationsResponse" + }, + "Version": { + "id": "Version", + "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", + "type": "object", + "properties": { + "apiConfig": { + "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.", + "$ref": "ApiConfigHandler" + }, + "endpointsApiService": { + "$ref": "EndpointsApiService", + "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app." + }, + "vm": { + "description": "Whether to deploy this version in a container on a virtual machine.", + "type": "boolean" + }, + "instanceClass": { + "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", + "type": "string" + }, + "servingStatus": { + "enumDescriptions": [ + "Not specified.", + "Currently serving. Instances are created according to the scaling settings of the version.", + "Disabled from serving. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." + ], + "enum": [ + "SERVING_STATUS_UNSPECIFIED", + "SERVING", + "STOPPED" + ], + "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", + "type": "string" + }, + "deployment": { + "$ref": "Deployment", + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." + }, + "resources": { + "$ref": "Resources", + "description": "Machine resources for this version. Only applicable for VM runtimes." + }, + "inboundServices": { + "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", + "type": "array", + "items": { + "enum": [ + "INBOUND_SERVICE_UNSPECIFIED", + "INBOUND_SERVICE_MAIL", + "INBOUND_SERVICE_MAIL_BOUNCE", + "INBOUND_SERVICE_XMPP_ERROR", + "INBOUND_SERVICE_XMPP_MESSAGE", + "INBOUND_SERVICE_XMPP_SUBSCRIBE", + "INBOUND_SERVICE_XMPP_PRESENCE", + "INBOUND_SERVICE_CHANNEL_PRESENCE", + "INBOUND_SERVICE_WARMUP" + ], + "type": "string" + }, + "enumDescriptions": [ + "Not specified.", + "Allows an application to receive mail.", + "Allows an application to receive email-bound notifications.", + "Allows an application to receive error stanzas.", + "Allows an application to receive instant messages.", + "Allows an application to receive user subscription POSTs.", + "Allows an application to receive a user's chat presence.", + "Registers an application for notifications when a client connects or disconnects from a channel.", + "Enables warmup requests." + ] + }, + "errorHandlers": { + "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", + "type": "array", + "items": { + "$ref": "ErrorHandler" + } + }, + "defaultExpiration": { + "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.", + "format": "google-duration", + "type": "string" + }, + "libraries": { + "description": "Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set.", + "type": "array", + "items": { + "$ref": "Library" + } + }, + "creationTime": { + "description": "Time that this version was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "nobuildFilesRegex": { + "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", + "type": "string" + }, + "basicScaling": { + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "$ref": "BasicScaling" + }, + "runtime": { + "description": "Desired runtime. Example: python27.", + "type": "string" + }, + "id": { + "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", + "type": "string" + }, + "envVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object" + }, + "network": { + "$ref": "Network", + "description": "Extra network settings. Only applicable for VM runtimes." + }, + "betaSettings": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata settings that are supplied to this version to enable beta runtime features.", + "type": "object" + }, + "env": { + "description": "App Engine execution environment to use for this version.Defaults to 1.", + "type": "string" + }, + "handlers": { + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", + "type": "array", + "items": { + "$ref": "UrlMap" + } + }, + "deployer": { + "description": "Email address of the user who created this version.@OutputOnly", + "type": "string" + }, + "automaticScaling": { + "$ref": "AutomaticScaling", + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." + }, + "diskUsageBytes": { + "description": "Total size of version files hosted on App Engine disk in bytes.@OutputOnly", + "format": "int64", + "type": "string" + }, + "healthCheck": { + "$ref": "HealthCheck", + "description": "Configures health checking for VM instances. Unhealthy instances are be stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." + }, + "threadsafe": { + "description": "Whether multiple requests can be dispatched to this version at once.", + "type": "boolean" + }, + "manualScaling": { + "$ref": "ManualScaling", + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." + }, + "name": { + "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", + "type": "string" + } + } + }, + "ContainerInfo": { + "id": "ContainerInfo", + "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", + "type": "object", + "properties": { + "image": { + "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", + "type": "string" + } + } + }, + "RequestUtilization": { + "description": "Target scaling by request utilization. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetRequestCountPerSec": { + "description": "Target requests per second.", + "format": "int32", + "type": "integer" + }, + "targetConcurrentRequests": { + "description": "Target number of concurrent requests.", + "format": "int32", + "type": "integer" + } + }, + "id": "RequestUtilization" + }, + "UrlMap": { + "id": "UrlMap", + "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", + "type": "object", + "properties": { + "urlRegex": { + "description": "A URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", + "type": "string" + }, + "login": { + "description": "Level of login required to access this resource.", + "type": "string", + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken." + ], + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ] + }, + "apiEndpoint": { + "$ref": "ApiEndpointHandler", + "description": "Uses API Endpoints to handle requests." + }, + "staticFiles": { + "description": "Returns the contents of a file, such as an image, as the response.", + "$ref": "StaticFilesHandler" + }, + "redirectHttpResponseCode": { + "enumDescriptions": [ + "Not specified. 302 is assumed.", + "301 Moved Permanently code.", + "302 Moved Temporarily code.", + "303 See Other code.", + "307 Temporary Redirect code." + ], + "enum": [ + "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", + "REDIRECT_HTTP_RESPONSE_CODE_301", + "REDIRECT_HTTP_RESPONSE_CODE_302", + "REDIRECT_HTTP_RESPONSE_CODE_303", + "REDIRECT_HTTP_RESPONSE_CODE_307" + ], + "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", + "type": "string" + }, + "securityLevel": { + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ] + }, + "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with an401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + }, + "script": { + "description": "Executes a script to handle the request that matches this URL pattern.", + "$ref": "ScriptHandler" + } + } + }, + "EndpointsApiService": { + "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", + "type": "object", + "properties": { + "name": { + "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"", + "type": "string" + }, + "configId": { + "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", + "type": "string" + } + }, + "id": "EndpointsApiService" + }, + "ApiConfigHandler": { + "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", + "type": "object", + "properties": { + "url": { + "description": "URL to serve the endpoint at.", + "type": "string" + }, + "securityLevel": { + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ] + }, + "authFailAction": { + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string", + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with an401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ] + }, + "script": { + "description": "Path to the script from the application root directory.", + "type": "string" + }, + "login": { + "description": "Level of login required to access this resource. Defaults to optional.", + "type": "string", + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken." + ], + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ] + } + }, + "id": "ApiConfigHandler" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "Operation" + }, + "ScriptHandler": { + "description": "Executes a script to handle the request that matches the URL pattern.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ScriptHandler" + }, + "StaticFilesHandler": { + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", + "type": "object", + "properties": { + "expiration": { + "description": "Time a static file served by this handler should be cached.", + "format": "google-duration", + "type": "string" + }, + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, + "httpHeaders": { + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uploadPathRegex": { + "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", + "type": "string" + }, + "path": { + "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.", + "type": "string" + }, + "mimeType": { + "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.", + "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" + } + }, + "id": "StaticFilesHandler" + }, + "FileInfo": { + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", + "type": "object", + "properties": { + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "type": "string" + }, + "sourceUrl": { + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "type": "string" + } + }, + "id": "FileInfo" + }, + "BasicScaling": { + "id": "BasicScaling", + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "type": "object", + "properties": { + "maxInstances": { + "description": "Maximum number of instances to create for this version.", + "format": "int32", + "type": "integer" + }, + "idleTimeout": { + "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", + "format": "google-duration", + "type": "string" + } + } + }, + "DiskUtilization": { + "description": "Target scaling by disk usage. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetWriteOpsPerSec": { + "description": "Target ops written per second.", + "format": "int32", + "type": "integer" + }, + "targetWriteBytesPerSec": { + "description": "Target bytes written per second.", + "format": "int32", + "type": "integer" + }, + "targetReadOpsPerSec": { + "description": "Target ops read per second.", + "format": "int32", + "type": "integer" + }, + "targetReadBytesPerSec": { + "description": "Target bytes read per second.", + "format": "int32", + "type": "integer" + } + }, + "id": "DiskUtilization" + }, + "OperationMetadataExperimental": { + "id": "OperationMetadataExperimental", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", + "type": "string" + }, + "insertTime": { + "description": "Time that this operation was created.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "Time that this operation completed.@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + } } - }, - "parameterOrder": [ - "appsId" - ], - "request": { - "$ref": "Application" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } - }, - "resources": { - "operations": { - "methods": { - "list": { - "id": "appengine.apps.operations.list", - "path": "v1beta5/apps/{appsId}/operations", - "httpMethod": "GET", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. The name of the operation collection.", - "required": true, - "location": "path" + }, + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "version": "v1beta5", + "baseUrl": "https://appengine.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/appengine.admin": { + "description": "View and manage your applications deployed on Google App Engine" }, - "filter": { - "type": "string", - "description": "The standard list filter.", - "location": "query" + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" }, - "pageSize": { - "type": "integer", - "description": "The standard list page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "get": { - "id": "appengine.apps.operations.get", - "path": "v1beta5/apps/{appsId}/operations/{operationsId}", - "httpMethod": "GET", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. The name of the operation resource.", - "required": true, - "location": "path" - }, - "operationsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "operationsId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] } - } - }, - "services": { - "methods": { - "delete": { - "id": "appengine.apps.services.delete", - "path": "v1beta5/apps/{appsId}/services/{servicesId}", - "httpMethod": "DELETE", - "description": "Deletes the specified service and all enclosed versions.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "appengine.apps.services.get", - "path": "v1beta5/apps/{appsId}/services/{servicesId}", - "httpMethod": "GET", - "description": "Gets the current configuration of the specified service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "Service" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "list": { - "id": "appengine.apps.services.list", - "path": "v1beta5/apps/{appsId}/services", - "httpMethod": "GET", - "description": "Lists all the services in the application.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum results to return per page.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListServicesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "patch": { - "id": "appengine.apps.services.patch", - "path": "v1beta5/apps/{appsId}/services/{servicesId}", - "httpMethod": "PATCH", - "description": "Updates the configuration of the specified service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "mask": { - "type": "string", - "description": "Standard field mask for the set of fields to be updated.", - "location": "query" - }, - "migrateTraffic": { - "type": "boolean", - "description": "Set to true to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "request": { - "$ref": "Service" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "versions": { - "methods": { + } + }, + "kind": "discovery#restDescription", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "servicePath": "", + "rootUrl": "https://appengine.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "appengine", + "batchPath": "batch", + "revision": "20170522", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "id": "appengine:v1beta5", + "title": "Google App Engine Admin API", + "discoveryVersion": "v1", + "ownerName": "Google", + "resources": { + "apps": { + "methods": { "create": { - "id": "appengine.apps.services.versions.create", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions", - "httpMethod": "POST", - "description": "Deploys new code and resource files to a new version.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource to update. For example: \"apps/myapp/services/default\".", - "required": true, - "location": "path" + "request": { + "$ref": "Application" }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "request": { - "$ref": "Version" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "appengine.apps.services.versions.delete", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "httpMethod": "DELETE", - "description": "Deletes an existing version.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "required": true, - "location": "path" + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", + "response": { + "$ref": "Operation" }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps", + "path": "v1beta5/apps", + "id": "appengine.apps.create" }, "get": { - "id": "appengine.apps.services.versions.get", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "httpMethod": "GET", - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "required": true, - "location": "path" + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "Application" }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" + "httpMethod": "GET", + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the application to get. Example: apps/myapp.", + "required": true, + "type": "string", + "location": "path" + }, + "ensureResourcesExist": { + "location": "query", + "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. Note: This parameter will be deprecated in a future version of the API.", + "type": "boolean" + } }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "view": { - "type": "string", - "description": "Controls the set of fields returned in the Get response.", - "enum": [ - "BASIC", - "FULL" - ], - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "Version" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "list": { - "id": "appengine.apps.services.versions.list", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions", - "httpMethod": "GET", - "description": "Lists the versions of a service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "view": { - "type": "string", - "description": "Controls the set of fields returned in the List response.", - "enum": [ - "BASIC", - "FULL" - ], - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Maximum results to return per page.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "ListVersionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps/{appsId}", + "path": "v1beta5/apps/{appsId}", + "id": "appengine.apps.get", + "description": "Gets information about an application." }, "patch": { - "id": "appengine.apps.services.versions.patch", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "httpMethod": "PATCH", - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", - "required": true, - "location": "path" + "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)", + "request": { + "$ref": "Application" }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "mask": { - "type": "string", - "description": "Standard field mask for the set of fields to be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "request": { - "$ref": "Version" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "instances": { - "methods": { - "delete": { - "id": "appengine.apps.services.versions.instances.delete", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "httpMethod": "DELETE", - "description": "Stops a running instance.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/services/default/versions/v1/instances/instance-1\".", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "instancesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "response": { + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId" + ], + "response": { "$ref": "Operation" - }, - "scopes": [ + }, + "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "appengine.apps.services.versions.instances.get", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "httpMethod": "GET", - "description": "Gets instance information.", - "parameters": { + ], + "parameters": { "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "required": true, - "location": "path" + "location": "path", + "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", + "required": true, + "type": "string" }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "instancesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" + "mask": { + "location": "query", + "description": "Standard field mask for the set of fields to be updated.", + "format": "google-fieldmask", + "type": "string" } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "response": { - "$ref": "Instance" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] }, - "list": { - "id": "appengine.apps.services.versions.instances.list", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "httpMethod": "GET", - "description": "Lists the instances of a version.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum results to return per page.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Continuation token for fetching the next page of results.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "ListInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "debug": { - "id": "appengine.apps.services.versions.instances.debug", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "httpMethod": "POST", - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "required": true, - "location": "path" - }, - "servicesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "versionsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - }, - "instancesId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "request": { - "$ref": "DebugInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } + "flatPath": "v1beta5/apps/{appsId}", + "id": "appengine.apps.patch", + "path": "v1beta5/apps/{appsId}" } - } - } - } - }, - "locations": { - "methods": { - "list": { - "id": "appengine.apps.locations.list", - "path": "v1beta5/apps/{appsId}/locations", - "httpMethod": "GET", - "description": "Lists information about the supported locations for this service.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. The resource that owns the locations collection, if applicable.", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "description": "The standard list filter.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard list page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" - } - }, - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListLocationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] }, - "get": { - "id": "appengine.apps.locations.get", - "path": "v1beta5/apps/{appsId}/locations/{locationsId}", - "httpMethod": "GET", - "description": "Get information about a location.", - "parameters": { - "appsId": { - "type": "string", - "description": "Part of `name`. Resource name for the location.", - "required": true, - "location": "path" + "resources": { + "services": { + "methods": { + "delete": { + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.delete", + "path": "v1beta5/apps/{appsId}/services/{servicesId}", + "description": "Deletes the specified service and all enclosed versions.", + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "response": { + "$ref": "Operation" + } + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "response": { + "$ref": "Service" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "required": true, + "type": "string", + "location": "path" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.get", + "path": "v1beta5/apps/{appsId}/services/{servicesId}", + "description": "Gets the current configuration of the specified service." + }, + "list": { + "description": "Lists all the services in the application.", + "httpMethod": "GET", + "response": { + "$ref": "ListServicesResponse" + }, + "parameterOrder": [ + "appsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Maximum results to return per page.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v1beta5/apps/{appsId}/services", + "id": "appengine.apps.services.list", + "path": "v1beta5/apps/{appsId}/services" + }, + "patch": { + "request": { + "$ref": "Service" + }, + "description": "Updates the configuration of the specified service.", + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", + "required": true, + "type": "string", + "location": "path" + }, + "migrateTraffic": { + "location": "query", + "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", + "type": "boolean" + }, + "mask": { + "location": "query", + "description": "Standard field mask for the set of fields to be updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.patch", + "path": "v1beta5/apps/{appsId}/services/{servicesId}" + } + }, + "resources": { + "versions": { + "methods": { + "create": { + "description": "Deploys new code and resource files to a new version.", + "request": { + "$ref": "Version" + }, + "httpMethod": "POST", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. For example: \"apps/myapp/services/default\".", + "required": true, + "type": "string" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.create", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions" + }, + "delete": { + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.delete", + "description": "Deletes an existing version." + }, + "get": { + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "required": true, + "type": "string" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the Get response.", + "type": "string" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.get", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", + "httpMethod": "GET", + "response": { + "$ref": "Version" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ] + }, + "list": { + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.list", + "description": "Lists the versions of a service.", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "GET", + "response": { + "$ref": "ListVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "required": true, + "type": "string" + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "Maximum results to return per page.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "view": { + "description": "Controls the set of fields returned in the List response.", + "type": "string", + "location": "query", + "enum": [ + "BASIC", + "FULL" + ] + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions" + }, + "patch": { + "id": "appengine.apps.services.versions.patch", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", + "request": { + "$ref": "Version" + }, + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", + "required": true, + "type": "string" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "mask": { + "description": "Standard field mask for the set of fields to be updated.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}" + } + }, + "resources": { + "instances": { + "methods": { + "delete": { + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/services/default/versions/v1/instances/instance-1\".", + "required": true, + "type": "string" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.delete", + "description": "Stops a running instance.", + "response": { + "$ref": "Operation" + }, + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ] + }, + "get": { + "response": { + "$ref": "Instance" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "required": true, + "type": "string", + "location": "path" + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.get", + "description": "Gets instance information." + }, + "list": { + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "pageSize": { + "description": "Maximum results to return per page.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "id": "appengine.apps.services.versions.instances.list", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", + "httpMethod": "GET", + "response": { + "$ref": "ListInstancesResponse" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ] + }, + "debug": { + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "required": true, + "type": "string", + "location": "path" + }, + "instancesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "id": "appengine.apps.services.versions.instances.debug", + "request": { + "$ref": "DebugInstanceRequest" + }, + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "POST" + } + } + } + } + } + } }, - "locationsId": { - "type": "string", - "description": "Part of `name`. See documentation of `appsId`.", - "required": true, - "location": "path" + "operations": { + "methods": { + "list": { + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. The name of the operation collection.", + "required": true, + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1beta5/apps/{appsId}/operations", + "path": "v1beta5/apps/{appsId}/operations", + "id": "appengine.apps.operations.list", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.", + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + } + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "operationsId" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. The name of the operation resource.", + "required": true, + "type": "string" + }, + "operationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta5/apps/{appsId}/operations/{operationsId}", + "id": "appengine.apps.operations.get", + "path": "v1beta5/apps/{appsId}/operations/{operationsId}", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + } + } + }, + "locations": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. The resource that owns the locations collection, if applicable.", + "required": true, + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The standard list page size.", + "format": "int32", + "type": "integer" + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta5/apps/{appsId}/locations", + "id": "appengine.apps.locations.list", + "path": "v1beta5/apps/{appsId}/locations", + "description": "Lists information about the supported locations for this service." + }, + "get": { + "path": "v1beta5/apps/{appsId}/locations/{locationsId}", + "id": "appengine.apps.locations.get", + "description": "Get information about a location.", + "response": { + "$ref": "Location" + }, + "parameterOrder": [ + "appsId", + "locationsId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Resource name for the location.", + "required": true, + "type": "string" + }, + "locationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta5/apps/{appsId}/locations/{locationsId}" + } + } } - }, - "parameterOrder": [ - "appsId", - "locationsId" - ], - "response": { - "$ref": "Location" - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] } - } } - } } - } } diff --git a/etc/api/appsactivity/v1/appsactivity-api.json b/etc/api/appsactivity/v1/appsactivity-api.json index 6588e9d5e5..d475776b34 100644 --- a/etc/api/appsactivity/v1/appsactivity-api.json +++ b/etc/api/appsactivity/v1/appsactivity-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/JeTIzxCSn99gVwop4eTRu5wI2HY\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/y29Ei9gfsS6BekrALyS-uw4tzTU\"", "discoveryVersion": "v1", "id": "appsactivity:v1", "name": "appsactivity", "version": "v1", - "revision": "20161202", - "title": "Google Apps Activity API", + "revision": "20170215", + "title": "G Suite Activity API", "description": "Provides a historical view of activity.", "ownerDomain": "google.com", "ownerName": "Google", @@ -70,7 +70,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/activity": { - "description": "View the activity history of your Google Apps" + "description": "View the activity history of your Google apps" }, "https://www.googleapis.com/auth/drive": { "description": "View and manage the files in your Google Drive" diff --git a/etc/api/appstate/v1/appstate-api.json b/etc/api/appstate/v1/appstate-api.json index f8527d0c05..e80b5a7ab8 100644 --- a/etc/api/appstate/v1/appstate-api.json +++ b/etc/api/appstate/v1/appstate-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/zCuutgfn2bO8U3OEBc5yUB2So-0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/FdkanktExV3oAOPPZT7FjY9Da58\"", "discoveryVersion": "v1", "id": "appstate:v1", "name": "appstate", "canonicalName": "App State", "version": "v1", - "revision": "20161207", + "revision": "20170511", "title": "Google App State API", "description": "The Google App State API.", "ownerDomain": "google.com", diff --git a/etc/api/bigquery/v2/bigquery-api.json b/etc/api/bigquery/v2/bigquery-api.json index c9f63e38c6..d2a6488771 100644 --- a/etc/api/bigquery/v2/bigquery-api.json +++ b/etc/api/bigquery/v2/bigquery-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/wyP_l3wPjLK3LUrJqeSGHNESSW0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/g_G3eD_OgD8-ScdUNw6NbiklXmE\"", "discoveryVersion": "v1", "id": "bigquery:v2", "name": "bigquery", "version": "v2", - "revision": "20161130", + "revision": "20170511", "title": "BigQuery API", "description": "A data platform for customers to create, manage, share and query data.", "ownerDomain": "google.com", @@ -281,7 +281,7 @@ }, "labels": { "type": "object", - "description": "[Experimental] The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Labeling Datasets for more information.", + "description": "The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Labeling Datasets for more information.", "additionalProperties": { "type": "string" } @@ -293,7 +293,7 @@ }, "location": { "type": "string", - "description": "[Experimental] The geographic location where the dataset should reside. Possible values include EU and US. The default value is US." + "description": "The geographic location where the dataset should reside. Possible values include EU and US. The default value is US." }, "selfLink": { "type": "string", @@ -330,7 +330,7 @@ }, "labels": { "type": "object", - "description": "[Experimental] The labels associated with this dataset. You can use these to organize and group your datasets.", + "description": "The labels associated with this dataset. You can use these to organize and group your datasets.", "additionalProperties": { "type": "string" } @@ -442,6 +442,10 @@ "description": "Number of records written by the stage.", "format": "int64" }, + "status": { + "type": "string", + "description": "Current status for the stage." + }, "steps": { "type": "array", "description": "List of operations within the stage in dependency order (approximately chronological).", @@ -494,7 +498,7 @@ "properties": { "autodetect": { "type": "boolean", - "description": "[Experimental] Try to detect schema and format options automatically. Any option specified explicitly will be honored." + "description": "Try to detect schema and format options automatically. Any option specified explicitly will be honored." }, "bigtableOptions": { "$ref": "BigtableOptions", @@ -527,7 +531,7 @@ }, "sourceFormat": { "type": "string", - "description": "[Required] The data format. For CSV files, specify \"CSV\". For Google sheets, specify \"GOOGLE_SHEETS\". For newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". For Avro files, specify \"AVRO\". For Google Cloud Datastore backups, specify \"DATASTORE_BACKUP\". [Experimental] For Google Cloud Bigtable, specify \"BIGTABLE\". Please note that reading from Google Cloud Bigtable is experimental and has to be enabled for your project. Please contact Google Cloud Support to enable this for your project." + "description": "[Required] The data format. For CSV files, specify \"CSV\". For Google sheets, specify \"GOOGLE_SHEETS\". For newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". For Avro files, specify \"AVRO\". For Google Cloud Datastore backups, specify \"DATASTORE_BACKUP\". [Beta] For Google Cloud Bigtable, specify \"BIGTABLE\"." }, "sourceUris": { "type": "array", @@ -572,7 +576,7 @@ }, "numDmlAffectedRows": { "type": "string", - "description": "[Output-only, Experimental] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.", + "description": "[Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.", "format": "int64" }, "pageToken": { @@ -689,7 +693,7 @@ }, "labels": { "type": "object", - "description": "[Experimental] The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and must be unique within a dataset. Both keys and values are additionally constrained to be \u003c= 128 bytes in size.", + "description": "[Experimental] The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.", "additionalProperties": { "type": "string" } @@ -756,7 +760,7 @@ }, "autodetect": { "type": "boolean", - "description": "[Experimental] Indicates if we should automatically infer the options and schema for CSV and JSON sources." + "description": "Indicates if we should automatically infer the options and schema for CSV and JSON sources." }, "createDisposition": { "type": "string", @@ -785,11 +789,11 @@ }, "nullMarker": { "type": "string", - "description": "[Optional] This string will be interpreted as a null value when it appears in a CSV file. The default value is the empty string. Please refer to the documentation for further information." + "description": "[Optional] Specifies a string that represents a null value in a CSV file. For example, if you specify \"\\N\", BigQuery interprets \"\\N\" as a null value when loading a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value." }, "projectionFields": { "type": "array", - "description": "[Experimental] If sourceFormat is set to \"DATASTORE_BACKUP\", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.", + "description": "If sourceFormat is set to \"DATASTORE_BACKUP\", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.", "items": { "type": "string" } @@ -847,7 +851,8 @@ "properties": { "allowLargeResults": { "type": "boolean", - "description": "If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set." + "description": "[Optional] If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. For standard SQL queries, this flag is ignored and large results are always allowed.", + "default": "false" }, "createDisposition": { "type": "string", @@ -863,7 +868,7 @@ }, "flattenResults": { "type": "boolean", - "description": "[Optional] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false.", + "description": "[Optional] If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if this is set to false. For standard SQL queries, this flag is ignored and results are never flattened.", "default": "true" }, "maximumBillingTier": { @@ -879,7 +884,7 @@ }, "parameterMode": { "type": "string", - "description": "[Experimental] Standard SQL only. Whether to use positional (?) or named (@myparam) query parameters in this query." + "description": "Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query." }, "preserveNulls": { "type": "boolean", @@ -891,7 +896,7 @@ }, "query": { "type": "string", - "description": "[Required] BigQuery SQL query to execute." + "description": "[Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL." }, "queryParameters": { "type": "array", @@ -925,7 +930,7 @@ }, "userDefinedFunctionResources": { "type": "array", - "description": "[Experimental] Describes user-defined function resources used in the query.", + "description": "Describes user-defined function resources used in the query.", "items": { "$ref": "UserDefinedFunctionResource" } @@ -1107,12 +1112,12 @@ }, "numDmlAffectedRows": { "type": "string", - "description": "[Output-only, Experimental] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.", + "description": "[Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.", "format": "int64" }, "queryPlan": { "type": "array", - "description": "[Output-only, Experimental] Describes execution plan for the query.", + "description": "[Output-only] Describes execution plan for the query.", "items": { "$ref": "ExplainQueryStage" } @@ -1390,7 +1395,7 @@ }, "parameterMode": { "type": "string", - "description": "[Experimental] Standard SQL only. Whether to use positional (?) or named (@myparam) query parameters in this query." + "description": "Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query." }, "preserveNulls": { "type": "boolean", @@ -1407,7 +1412,7 @@ }, "queryParameters": { "type": "array", - "description": "[Experimental] Query parameters for Standard SQL queries.", + "description": "Query parameters for Standard SQL queries.", "items": { "$ref": "QueryParameter" } @@ -1459,7 +1464,7 @@ }, "numDmlAffectedRows": { "type": "string", - "description": "[Output-only, Experimental] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.", + "description": "[Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.", "format": "int64" }, "pageToken": { @@ -1551,7 +1556,7 @@ }, "labels": { "type": "object", - "description": "[Experimental] The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than 63 characters, can only contain letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and must be unique within a dataset. Both keys and values are additionally constrained to be \u003c= 128 bytes in size.", + "description": "[Experimental] The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.", "additionalProperties": { "type": "string" } @@ -1728,7 +1733,7 @@ "properties": { "description": { "type": "string", - "description": "[Optional] The field description. The maximum length is 16K characters." + "description": "[Optional] The field description. The maximum length is 512 characters." }, "fields": { "type": "array", @@ -1801,6 +1806,16 @@ "type": { "type": "string", "description": "The type of table. Possible values are: TABLE, VIEW." + }, + "view": { + "type": "object", + "description": "Additional details for a view.", + "properties": { + "useLegacySql": { + "type": "boolean", + "description": "True if view is defined in legacy SQL dialect, false if in standard SQL." + } + } } } } @@ -1914,7 +1929,7 @@ }, "userDefinedFunctionResources": { "type": "array", - "description": "[Experimental] Describes user-defined function resources used in the query.", + "description": "Describes user-defined function resources used in the query.", "items": { "$ref": "UserDefinedFunctionResource" } @@ -2503,6 +2518,11 @@ "required": true, "location": "path" }, + "selectedFields": { + "type": "string", + "description": "List of fields to return (comma-separated). If unspecified, all fields are returned", + "location": "query" + }, "startIndex": { "type": "string", "description": "Zero-based index of the starting row to read", @@ -2587,6 +2607,11 @@ "required": true, "location": "path" }, + "selectedFields": { + "type": "string", + "description": "List of fields to return (comma-separated). If unspecified, all fields are returned", + "location": "query" + }, "tableId": { "type": "string", "description": "Table ID of the requested table", diff --git a/etc/api/blogger/v2/blogger-api.json b/etc/api/blogger/v2/blogger-api.json index 228e1480fd..a6a47ae0a5 100644 --- a/etc/api/blogger/v2/blogger-api.json +++ b/etc/api/blogger/v2/blogger-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/Mm4a0u3lPNBqEzKCYhfhIpC2Mw4\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Mm4a0u3lPNBqEzKCYhfhIpC2Mw4\"", "discoveryVersion": "v1", "id": "blogger:v2", "name": "blogger", diff --git a/etc/api/blogger/v3/blogger-api.json b/etc/api/blogger/v3/blogger-api.json index 72c9d78170..427da6e659 100644 --- a/etc/api/blogger/v3/blogger-api.json +++ b/etc/api/blogger/v3/blogger-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/Goh5bsNuqq7lTY-yMf_QcKSL760\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Goh5bsNuqq7lTY-yMf_QcKSL760\"", "discoveryVersion": "v1", "id": "blogger:v3", "name": "blogger", diff --git a/etc/api/books/v1/books-api.json b/etc/api/books/v1/books-api.json index 25215fd002..1e043022d5 100644 --- a/etc/api/books/v1/books-api.json +++ b/etc/api/books/v1/books-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/jiS-k8EAx6v4TcA5Qg2LzgfBvoI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/q1aPzEOdugLS9_Y8FK61EmJhEHg\"", "discoveryVersion": "v1", "id": "books:v1", "name": "books", "version": "v1", - "revision": "20161206", + "revision": "20170313", "title": "Books API", "description": "Searches for books and manages your Google Books library.", "ownerDomain": "google.com", @@ -1459,6 +1459,14 @@ "type": "string" } } + }, + "rewardExpirations": { + "type": "object", + "properties": { + "opted_state": { + "type": "string" + } + } } } } @@ -3160,6 +3168,11 @@ "httpMethod": "POST", "description": "Inserts a new annotation.", "parameters": { + "annotationId": { + "type": "string", + "description": "The ID for the annotation to insert.", + "location": "query" + }, "country": { "type": "string", "description": "ISO-3166-1 code to override the IP-based location.", diff --git a/etc/api/calendar/v3/calendar-api.json b/etc/api/calendar/v3/calendar-api.json index 7b72548fc4..474238ba9b 100644 --- a/etc/api/calendar/v3/calendar-api.json +++ b/etc/api/calendar/v3/calendar-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/Cbqw6SyhEKakWSF49vX9PZlU5es\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/9T19oRJaub8kQ0DM1Id4nnnZ16I\"", "discoveryVersion": "v1", "id": "calendar:v3", "name": "calendar", "version": "v3", - "revision": "20161211", + "revision": "20170514", "title": "Calendar API", "description": "Manipulates events and other calendar data.", "ownerDomain": "google.com", @@ -337,7 +337,7 @@ "properties": { "method": { "type": "string", - "description": "The method used to deliver the notification. Possible values are: \n- \"email\" - Reminders are sent via email. \n- \"sms\" - Reminders are sent via SMS. This value is read-only and is ignored on inserts and updates. SMS reminders are only available for Google Apps for Work, Education, and Government customers.", + "description": "The method used to deliver the notification. Possible values are: \n- \"email\" - Reminders are sent via email. \n- \"sms\" - Reminders are sent via SMS. This value is read-only and is ignored on inserts and updates. SMS reminders are only available for G Suite customers.", "annotations": { "required": [ "calendar.calendarList.insert", @@ -455,6 +455,42 @@ } } }, + "DeepLinkData": { + "id": "DeepLinkData", + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "$ref": "Link" + } + }, + "url": { + "type": "string" + } + } + }, + "DisplayInfo": { + "id": "DisplayInfo", + "type": "object", + "properties": { + "appIconUrl": { + "type": "string" + }, + "appShortTitle": { + "type": "string" + }, + "appTitle": { + "type": "string" + }, + "linkShortTitle": { + "type": "string" + }, + "linkTitle": { + "type": "string" + } + } + }, "Error": { "id": "Error", "type": "object", @@ -895,13 +931,27 @@ } } }, + "EventHabitInstance": { + "id": "EventHabitInstance", + "type": "object", + "properties": { + "data": { + "$ref": "HabitInstanceData", + "description": "Metadata specific to this instance." + }, + "parentId": { + "type": "string", + "description": "Id of the habit this instance belongs to." + } + } + }, "EventReminder": { "id": "EventReminder", "type": "object", "properties": { "method": { "type": "string", - "description": "The method used by this reminder. Possible values are: \n- \"email\" - Reminders are sent via email. \n- \"sms\" - Reminders are sent via SMS. These are only available for Google Apps for Work, Education, and Government customers. Requests to set SMS reminders for other account types are ignored. \n- \"popup\" - Reminders are sent via a UI popup.", + "description": "The method used by this reminder. Possible values are: \n- \"email\" - Reminders are sent via email. \n- \"sms\" - Reminders are sent via SMS. These are only available for G Suite customers. Requests to set SMS reminders for other account types are ignored. \n- \"popup\" - Reminders are sent via a UI popup.", "annotations": { "required": [ "calendar.calendarList.insert", @@ -1111,6 +1161,60 @@ } } }, + "HabitInstanceData": { + "id": "HabitInstanceData", + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "statusInferred": { + "type": "boolean" + }, + "type": { + "type": "string" + } + } + }, + "LaunchInfo": { + "id": "LaunchInfo", + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "installUrl": { + "type": "string" + }, + "intentAction": { + "type": "string" + }, + "uri": { + "type": "string" + } + } + }, + "Link": { + "id": "Link", + "type": "object", + "properties": { + "applinkingSource": { + "type": "string" + }, + "displayInfo": { + "$ref": "DisplayInfo" + }, + "launchInfo": { + "$ref": "LaunchInfo" + }, + "platform": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, "Setting": { "id": "Setting", "type": "object", diff --git a/etc/api/civicinfo/v2/civicinfo-api.json b/etc/api/civicinfo/v2/civicinfo-api.json index ec4d1ab736..a77032073c 100644 --- a/etc/api/civicinfo/v2/civicinfo-api.json +++ b/etc/api/civicinfo/v2/civicinfo-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/sNrwy4GBJh0JDl02KcW1-1MdJOM\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/sNrwy4GBJh0JDl02KcW1-1MdJOM\"", "discoveryVersion": "v1", "id": "civicinfo:v2", "name": "civicinfo", diff --git a/etc/api/classroom/v1/classroom-api.json b/etc/api/classroom/v1/classroom-api.json index 9c01429752..9d5f9f15a7 100644 --- a/etc/api/classroom/v1/classroom-api.json +++ b/etc/api/classroom/v1/classroom-api.json @@ -1,2515 +1,2710 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/mk_oLjlaBwJ1BcBJ5yykCFb6u3w\"", - "discoveryVersion": "v1", - "id": "classroom:v1", - "name": "classroom", - "version": "v1", - "revision": "20161006", - "title": "Google Classroom API", - "description": "Manages classes, rosters, and invitations in Google Classroom.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/classroom/", - "protocol": "rest", - "baseUrl": "https://classroom.googleapis.com/", - "basePath": "", - "rootUrl": "https://classroom.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/classroom.course-work.readonly": { - "description": "View instructions for teacher-assigned work in your Google Classroom classes" - }, - "https://www.googleapis.com/auth/classroom.courses": { - "description": "Manage your Google Classroom classes" - }, - "https://www.googleapis.com/auth/classroom.courses.readonly": { - "description": "View your Google Classroom classes" - }, - "https://www.googleapis.com/auth/classroom.coursework.me": { - "description": "Manage your course work and view your grades in Google Classroom" - }, - "https://www.googleapis.com/auth/classroom.coursework.me.readonly": { - "description": "View your course work and grades in Google Classroom" - }, - "https://www.googleapis.com/auth/classroom.coursework.students": { - "description": "Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer" - }, - "https://www.googleapis.com/auth/classroom.coursework.students.readonly": { - "description": "View course work and grades for students in the Google Classroom classes you teach or administer" - }, - "https://www.googleapis.com/auth/classroom.profile.emails": { - "description": "View the email addresses of people in your classes" - }, - "https://www.googleapis.com/auth/classroom.profile.photos": { - "description": "View the profile photos of people in your classes" - }, - "https://www.googleapis.com/auth/classroom.rosters": { - "description": "Manage your Google Classroom class rosters" - }, - "https://www.googleapis.com/auth/classroom.rosters.readonly": { - "description": "View your Google Classroom class rosters" - }, - "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly": { - "description": "View your course work and grades in Google Classroom" - }, - "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly": { - "description": "View course work and grades for students in the Google Classroom classes you teach or administer" - } - } - } - }, - "schemas": { - "Course": { - "id": "Course", - "type": "object", - "description": "A Course in Classroom.", - "properties": { - "id": { - "type": "string", - "description": "Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask results in an error." - }, - "name": { - "type": "string", - "description": "Name of the course. For example, \"10th Grade Biology\". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string." - }, - "section": { - "type": "string", - "description": "Section of the course. For example, \"Period 2\". If set, this field must be a valid UTF-8 string and no longer than 2800 characters." - }, - "descriptionHeading": { - "type": "string", - "description": "Optional heading for the description. For example, \"Welcome to 10th Grade Biology.\" If set, this field must be a valid UTF-8 string and no longer than 3600 characters." - }, - "description": { - "type": "string", - "description": "Optional description. For example, \"We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!\" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters." - }, - "room": { - "type": "string", - "description": "Optional room location. For example, \"301\". If set, this field must be a valid UTF-8 string and no longer than 650 characters." - }, - "ownerId": { - "type": "string", - "description": "The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask results in an `INVALID_ARGUMENT` error." - }, - "creationTime": { - "type": "string", - "description": "Creation time of the course. Specifying this field in a course update mask results in an error. Read-only." - }, - "updateTime": { - "type": "string", - "description": "Time of the most recent update to this course. Specifying this field in a course update mask results in an error. Read-only." - }, - "enrollmentCode": { - "type": "string", - "description": "Enrollment code to use when joining this course. Specifying this field in a course update mask results in an error. Read-only." - }, - "courseState": { - "type": "string", - "description": "State of the course. If unspecified, the default state is `PROVISIONED`.", - "enum": [ - "COURSE_STATE_UNSPECIFIED", - "ACTIVE", - "ARCHIVED", - "PROVISIONED", - "DECLINED" - ] - }, - "alternateLink": { - "type": "string", - "description": "Absolute link to this course in the Classroom web UI. Read-only." - }, - "teacherGroupEmail": { - "type": "string", - "description": "The email address of a Google group containing all teachers of the course. This group does not accept email and can only be used for permissions. Read-only." - }, - "courseGroupEmail": { - "type": "string", - "description": "The email address of a Google group containing all members of the course. This group does not accept email and can only be used for permissions. Read-only." - }, - "teacherFolder": { - "$ref": "DriveFolder", - "description": "Information about a Drive Folder that is shared with all teachers of the course. This field will only be set for teachers of the course and domain administrators. Read-only." - }, - "courseMaterialSets": { - "type": "array", - "description": "Sets of materials that appear on the \"about\" page of this course. Read-only.", - "items": { - "$ref": "CourseMaterialSet" - } - }, - "guardiansEnabled": { - "type": "boolean", - "description": "Whether or not guardian notifications are enabled for this course. Read-only." - } - } - }, - "DriveFolder": { - "id": "DriveFolder", - "type": "object", - "description": "Representation of a Google Drive folder.", - "properties": { - "id": { - "type": "string", - "description": "Drive API resource ID." - }, - "title": { - "type": "string", - "description": "Title of the Drive folder. Read-only." - }, - "alternateLink": { - "type": "string", - "description": "URL that can be used to access the Drive folder. Read-only." - } - } - }, - "CourseMaterialSet": { - "id": "CourseMaterialSet", - "type": "object", - "description": "A set of materials that appears on the \"About\" page of the course. These materials might include a syllabus, schedule, or other background information relating to the course as a whole.", - "properties": { - "title": { - "type": "string", - "description": "Title for this set." - }, - "materials": { - "type": "array", - "description": "Materials attached to this set.", - "items": { - "$ref": "CourseMaterial" - } - } - } - }, - "CourseMaterial": { - "id": "CourseMaterial", - "type": "object", - "description": "A material attached to a course as part of a material set.", - "properties": { - "driveFile": { - "$ref": "DriveFile", - "description": "Google Drive file attachment." - }, - "youTubeVideo": { - "$ref": "YouTubeVideo", - "description": "Youtube video attachment." - }, - "link": { - "$ref": "Link", - "description": "Link atatchment." - }, - "form": { - "$ref": "Form", - "description": "Google Forms attachment." - } - } - }, - "DriveFile": { - "id": "DriveFile", - "type": "object", - "description": "Representation of a Google Drive file.", - "properties": { - "id": { - "type": "string", - "description": "Drive API resource ID." - }, - "title": { - "type": "string", - "description": "Title of the Drive item. Read-only." - }, - "alternateLink": { - "type": "string", - "description": "URL that can be used to access the Drive item. Read-only." - }, - "thumbnailUrl": { - "type": "string", - "description": "URL of a thumbnail image of the Drive item. Read-only." - } - } - }, - "YouTubeVideo": { - "id": "YouTubeVideo", - "type": "object", - "description": "YouTube video item.", - "properties": { - "id": { - "type": "string", - "description": "YouTube API resource ID." - }, - "title": { - "type": "string", - "description": "Title of the YouTube video. Read-only." - }, - "alternateLink": { - "type": "string", - "description": "URL that can be used to view the YouTube video. Read-only." - }, - "thumbnailUrl": { - "type": "string", - "description": "URL of a thumbnail image of the YouTube video. Read-only." - } - } - }, - "Link": { - "id": "Link", - "type": "object", - "description": "URL item.", - "properties": { - "url": { - "type": "string", - "description": "URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters." - }, - "title": { - "type": "string", - "description": "Title of the target of the URL. Read-only." - }, - "thumbnailUrl": { - "type": "string", - "description": "URL of a thumbnail image of the target URL. Read-only." - } - } - }, - "Form": { - "id": "Form", - "type": "object", - "description": "Google Forms item.", - "properties": { - "formUrl": { - "type": "string", - "description": "URL of the form." - }, - "responseUrl": { - "type": "string", - "description": "URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only." - }, - "title": { - "type": "string", - "description": "Title of the Form. Read-only." - }, - "thumbnailUrl": { - "type": "string", - "description": "URL of a thumbnail image of the Form. Read-only." - } - } - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "ListCoursesResponse": { - "id": "ListCoursesResponse", - "type": "object", - "description": "Response when listing courses.", - "properties": { - "courses": { - "type": "array", - "description": "Courses that match the list request.", - "items": { - "$ref": "Course" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further results are available." - } - } - }, - "CourseAlias": { - "id": "CourseAlias", - "type": "object", - "description": "Alternative identifier for a course. An alias uniquely identifies a course. It must be unique within one of the following scopes: * domain: A domain-scoped alias is visible to all users within the alias creator's domain and can be created only by a domain admin. A domain-scoped alias is often used when a course has an identifier external to Classroom. * project: A project-scoped alias is visible to any request from an application using the Developer Console project ID that created the alias and can be created by any project. A project-scoped alias is often used when an application has alternative identifiers. A random value can also be used to avoid duplicate courses in the event of transmission failures, as retrying a request will return `ALREADY_EXISTS` if a previous one has succeeded.", - "properties": { - "alias": { - "type": "string", - "description": "Alias string. The format of the string indicates the desired alias scoping. * `d:` indicates a domain-scoped alias. Example: `d:math_101` * `p:` indicates a project-scoped alias. Example: `p:abc123` This field has a maximum length of 256 characters." - } - } - }, - "ListCourseAliasesResponse": { - "id": "ListCourseAliasesResponse", - "type": "object", - "description": "Response when listing course aliases.", - "properties": { - "aliases": { - "type": "array", - "description": "The course aliases.", - "items": { - "$ref": "CourseAlias" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further results are available." - } - } - }, - "ListGuardianInvitationsResponse": { - "id": "ListGuardianInvitationsResponse", - "type": "object", - "description": "Response when listing guardian invitations.", - "properties": { - "guardianInvitations": { - "type": "array", - "description": "Guardian invitations that matched the list request.", - "items": { - "$ref": "GuardianInvitation" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further results are available." - } - } - }, - "GuardianInvitation": { - "id": "GuardianInvitation", - "type": "object", - "description": "An invitation to become the guardian of a specified user, sent to a specified email address.", - "properties": { - "studentId": { - "type": "string", - "description": "ID of the student (in standard format)" - }, - "invitationId": { - "type": "string", - "description": "Unique identifier for this invitation. Read-only." - }, - "invitedEmailAddress": { - "type": "string", - "description": "Email address that the invitation was sent to. This field is only visible to domain administrators." - }, - "state": { - "type": "string", - "description": "The state that this invitation is in.", - "enum": [ - "GUARDIAN_INVITATION_STATE_UNSPECIFIED", - "PENDING", - "COMPLETE" - ] - }, - "creationTime": { - "type": "string", - "description": "The time that this invitation was created. Read-only." - } - } - }, - "ListGuardiansResponse": { - "id": "ListGuardiansResponse", - "type": "object", - "description": "Response when listing guardians.", - "properties": { - "guardians": { - "type": "array", - "description": "Guardians on this page of results that met the criteria specified in the request.", - "items": { - "$ref": "Guardian" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further results are available." - } - } - }, - "Guardian": { - "id": "Guardian", - "type": "object", - "description": "Association between a student and a guardian of that student. The guardian may receive information about the student's course work.", - "properties": { - "studentId": { - "type": "string", - "description": "Identifier for the student to whom the guardian relationship applies." - }, - "guardianId": { - "type": "string", - "description": "Identifier for the guardian." - }, - "guardianProfile": { - "$ref": "UserProfile", - "description": "User profile for the guardian." - }, - "invitedEmailAddress": { - "type": "string", - "description": "The email address to which the initial guardian invitation was sent. This field is only visible to domain administrators." - } - } - }, - "UserProfile": { - "id": "UserProfile", - "type": "object", - "description": "Global information for a user.", - "properties": { - "id": { - "type": "string", - "description": "Identifier of the user. Read-only." - }, - "name": { - "$ref": "Name", - "description": "Name of the user. Read-only." - }, - "emailAddress": { - "type": "string", - "description": "Email address of the user. Read-only." - }, - "photoUrl": { - "type": "string", - "description": "URL of user's profile photo. Read-only." - }, - "permissions": { - "type": "array", - "description": "Global permissions of the user. Read-only.", - "items": { - "$ref": "GlobalPermission" - } - } - } - }, - "Name": { - "id": "Name", - "type": "object", - "description": "Details of the user's name.", - "properties": { - "givenName": { - "type": "string", - "description": "The user's first name. Read-only." - }, - "familyName": { - "type": "string", - "description": "The user's last name. Read-only." - }, - "fullName": { - "type": "string", - "description": "The user's full name formed by concatenating the first and last name values. Read-only." - } - } - }, - "GlobalPermission": { - "id": "GlobalPermission", - "type": "object", - "description": "Global user permission description.", - "properties": { - "permission": { - "type": "string", - "description": "Permission value.", - "enum": [ - "PERMISSION_UNSPECIFIED", - "CREATE_COURSE" - ] - } - } - }, - "Teacher": { - "id": "Teacher", - "type": "object", - "description": "Teacher of a course.", - "properties": { - "courseId": { - "type": "string", - "description": "Identifier of the course. Read-only." - }, - "userId": { - "type": "string", - "description": "Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user" - }, - "profile": { - "$ref": "UserProfile", - "description": "Global user information for the teacher. Read-only." - } - } - }, - "ListTeachersResponse": { - "id": "ListTeachersResponse", - "type": "object", - "description": "Response when listing teachers.", - "properties": { - "teachers": { - "type": "array", - "description": "Teachers who match the list request.", - "items": { - "$ref": "Teacher" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further results are available." - } - } - }, - "Student": { - "id": "Student", - "type": "object", - "description": "Student in a course.", - "properties": { - "courseId": { - "type": "string", - "description": "Identifier of the course. Read-only." - }, - "userId": { - "type": "string", - "description": "Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user" - }, - "profile": { - "$ref": "UserProfile", - "description": "Global user information for the student. Read-only." - }, - "studentWorkFolder": { - "$ref": "DriveFolder", - "description": "Information about a Drive Folder for this student's work in this course. Only visible to the student and domain administrators. Read-only." - } - } - }, - "ListStudentsResponse": { - "id": "ListStudentsResponse", - "type": "object", - "description": "Response when listing students.", - "properties": { - "students": { - "type": "array", - "description": "Students who match the list request.", - "items": { - "$ref": "Student" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further results are available." - } - } - }, - "Invitation": { - "id": "Invitation", - "type": "object", - "description": "An invitation to join a course.", - "properties": { - "id": { - "type": "string", - "description": "Identifier assigned by Classroom. Read-only." - }, - "userId": { - "type": "string", - "description": "Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user" - }, - "courseId": { - "type": "string", - "description": "Identifier of the course to invite the user to." - }, - "role": { - "type": "string", - "description": "Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`.", - "enum": [ - "COURSE_ROLE_UNSPECIFIED", - "STUDENT", - "TEACHER" - ] - } - } - }, - "ListInvitationsResponse": { - "id": "ListInvitationsResponse", - "type": "object", - "description": "Response when listing invitations.", - "properties": { + "kind": "discovery#restDescription", + "description": "Manages classes, rosters, and invitations in Google Classroom.", + "servicePath": "", + "rootUrl": "https://classroom.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "classroom", + "batchPath": "batch", + "id": "classroom:v1", + "documentationLink": "https://developers.google.com/classroom/", + "revision": "20170510", + "title": "Google Classroom API", + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { "invitations": { - "type": "array", - "description": "Invitations that match the list request.", - "items": { - "$ref": "Invitation" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further results are available." - } - } - }, - "CourseWork": { - "id": "CourseWork", - "type": "object", - "description": "Course work created by a teacher for students of the course.", - "properties": { - "courseId": { - "type": "string", - "description": "Identifier of the course. Read-only." - }, - "id": { - "type": "string", - "description": "Classroom-assigned identifier of this course work, unique per course. Read-only." - }, - "title": { - "type": "string", - "description": "Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters." - }, - "description": { - "type": "string", - "description": "Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters." - }, - "materials": { - "type": "array", - "description": "Additional materials. CourseWork must have no more than 20 material items.", - "items": { - "$ref": "Material" - } - }, - "state": { - "type": "string", - "description": "Status of this course work. If unspecified, the default state is `DRAFT`.", - "enum": [ - "COURSE_WORK_STATE_UNSPECIFIED", - "PUBLISHED", - "DRAFT", - "DELETED" - ] - }, - "alternateLink": { - "type": "string", - "description": "Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only." - }, - "creationTime": { - "type": "string", - "description": "Timestamp when this course work was created. Read-only." - }, - "updateTime": { - "type": "string", - "description": "Timestamp of the most recent change to this course work. Read-only." - }, - "dueDate": { - "$ref": "Date", - "description": "Optional date, in UTC, that submissions for this this course work are due. This must be specified if `due_time` is specified." - }, - "dueTime": { - "$ref": "TimeOfDay", - "description": "Optional time of day, in UTC, that submissions for this this course work are due. This must be specified if `due_date` is specified." - }, - "maxPoints": { - "type": "number", - "description": "Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.", - "format": "double" - }, - "workType": { - "type": "string", - "description": "Type of this course work. The type is set when the course work is created and cannot be changed. When creating course work, this must be `ASSIGNMENT`.", - "enum": [ - "COURSE_WORK_TYPE_UNSPECIFIED", - "ASSIGNMENT", - "SHORT_ANSWER_QUESTION", - "MULTIPLE_CHOICE_QUESTION" - ] - }, - "associatedWithDeveloper": { - "type": "boolean", - "description": "Whether this course work item is associated with the Developer Console project making the request. See google.classroom.Work.CreateCourseWork for more details. Read-only." - }, - "submissionModificationMode": { - "type": "string", - "description": "Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.", - "enum": [ - "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED", - "MODIFIABLE_UNTIL_TURNED_IN", - "MODIFIABLE" - ] - }, - "assignment": { - "$ref": "Assignment", - "description": "Assignment details. This is populated only when `work_type` is `ASSIGNMENT`." - }, - "multipleChoiceQuestion": { - "$ref": "MultipleChoiceQuestion", - "description": "Multiple choice question details. This is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`." - } - } - }, - "Material": { - "id": "Material", - "type": "object", - "description": "Material attached to course work. When creating attachments, only the Link field may be specified.", - "properties": { - "driveFile": { - "$ref": "SharedDriveFile", - "description": "Google Drive file material." - }, - "youtubeVideo": { - "$ref": "YouTubeVideo", - "description": "YouTube video material." - }, - "link": { - "$ref": "Link", - "description": "Link material." - }, - "form": { - "$ref": "Form", - "description": "Google Forms material." - } - } - }, - "SharedDriveFile": { - "id": "SharedDriveFile", - "type": "object", - "description": "Drive file that is used as material for course work.", - "properties": { - "driveFile": { - "$ref": "DriveFile", - "description": "Drive file details." - }, - "shareMode": { - "type": "string", - "description": "Mechanism by which students access the Drive item.", - "enum": [ - "UNKNOWN_SHARE_MODE", - "VIEW", - "EDIT", - "STUDENT_COPY" - ] - } - } - }, - "Date": { - "id": "Date", - "type": "object", - "description": "Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.", - "properties": { - "year": { - "type": "integer", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.", - "format": "int32" - }, - "month": { - "type": "integer", - "description": "Month of year. Must be from 1 to 12.", - "format": "int32" - }, - "day": { - "type": "integer", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant.", - "format": "int32" - } - } - }, - "TimeOfDay": { - "id": "TimeOfDay", - "type": "object", - "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may chose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", - "properties": { - "hours": { - "type": "integer", - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", - "format": "int32" - }, - "minutes": { - "type": "integer", - "description": "Minutes of hour of day. Must be from 0 to 59.", - "format": "int32" - }, - "seconds": { - "type": "integer", - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", - "format": "int32" - }, - "nanos": { - "type": "integer", - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", - "format": "int32" - } - } - }, - "Assignment": { - "id": "Assignment", - "type": "object", - "description": "Additional details for assignments.", - "properties": { - "studentWorkFolder": { - "$ref": "DriveFolder", - "description": "Drive folder where attachments from student submissions are placed. This is only populated for course teachers." - } - } - }, - "MultipleChoiceQuestion": { - "id": "MultipleChoiceQuestion", - "type": "object", - "description": "Additional details for multiple-choice questions.", - "properties": { - "choices": { - "type": "array", - "description": "Possible choices.", - "items": { - "type": "string" - } - } - } - }, - "ListCourseWorkResponse": { - "id": "ListCourseWorkResponse", - "type": "object", - "description": "Response when listing course work.", - "properties": { - "courseWork": { - "type": "array", - "description": "Course work items that match the request.", - "items": { - "$ref": "CourseWork" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further results are available." - } - } - }, - "StudentSubmission": { - "id": "StudentSubmission", - "type": "object", - "description": "Student submission for course work. StudentSubmission items are generated when a CourseWork item is created. StudentSubmissions that have never been accessed (i.e. with `state` = NEW) may not have a creation time or update time.", - "properties": { - "courseId": { - "type": "string", - "description": "Identifier of the course. Read-only." - }, - "courseWorkId": { - "type": "string", - "description": "Identifier for the course work this corresponds to. Read-only." - }, - "id": { - "type": "string", - "description": "Classroom-assigned Identifier for the student submission. This is unique among submissions for the relevant course work. Read-only." - }, - "userId": { - "type": "string", - "description": "Identifier for the student that owns this submission. Read-only." - }, - "creationTime": { - "type": "string", - "description": "Creation time of this submission. This may be unset if the student has not accessed this item. Read-only." - }, - "updateTime": { - "type": "string", - "description": "Last update time of this submission. This may be unset if the student has not accessed this item. Read-only." - }, - "state": { - "type": "string", - "description": "State of this submission. Read-only.", - "enum": [ - "SUBMISSION_STATE_UNSPECIFIED", - "NEW", - "CREATED", - "TURNED_IN", - "RETURNED", - "RECLAIMED_BY_STUDENT" - ] - }, - "late": { - "type": "boolean", - "description": "Whether this submission is late. Read-only." - }, - "draftGrade": { - "type": "number", - "description": "Optional pending grade. If unset, no grade was set. This must be a non-negative integer value. This is only visible to and modifiable by course teachers.", - "format": "double" - }, - "assignedGrade": { - "type": "number", - "description": "Optional grade. If unset, no grade was set. This must be a non-negative integer value. This may be modified only by course teachers.", - "format": "double" - }, - "alternateLink": { - "type": "string", - "description": "Absolute link to the submission in the Classroom web UI. Read-only." - }, - "courseWorkType": { - "type": "string", - "description": "Type of course work this submission is for. Read-only.", - "enum": [ - "COURSE_WORK_TYPE_UNSPECIFIED", - "ASSIGNMENT", - "SHORT_ANSWER_QUESTION", - "MULTIPLE_CHOICE_QUESTION" - ] - }, - "associatedWithDeveloper": { - "type": "boolean", - "description": "Whether this student submission is associated with the Developer Console project making the request. See google.classroom.Work.CreateCourseWork for more details. Read-only." - }, - "assignmentSubmission": { - "$ref": "AssignmentSubmission", - "description": "Submission content when course_work_type is ASSIGNMENT ." - }, - "shortAnswerSubmission": { - "$ref": "ShortAnswerSubmission", - "description": "Submission content when course_work_type is SHORT_ANSWER_QUESTION." - }, - "multipleChoiceSubmission": { - "$ref": "MultipleChoiceSubmission", - "description": "Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION." - } - } - }, - "AssignmentSubmission": { - "id": "AssignmentSubmission", - "type": "object", - "description": "Student work for an assignment.", - "properties": { - "attachments": { - "type": "array", - "description": "Attachments added by the student. Drive files that correspond to materials with a share mode of SUBMISSION_COPY may not exist yet if the student has not accessed the assignment in Classroom. Some attachment metadata is only populated if the requesting user has permission to access it. Identifier and alternate_link fields are available, but others (e.g. title) may not be.", - "items": { - "$ref": "Attachment" - } - } - } - }, - "Attachment": { - "id": "Attachment", - "type": "object", - "description": "Attachment added to student assignment work. When creating attachments, only the Link field may be specified.", - "properties": { - "driveFile": { - "$ref": "DriveFile", - "description": "Google Drive file attachment." - }, - "youTubeVideo": { - "$ref": "YouTubeVideo", - "description": "Youtube video attachment." - }, - "link": { - "$ref": "Link", - "description": "Link attachment." - }, - "form": { - "$ref": "Form", - "description": "Google Forms attachment." - } - } - }, - "ShortAnswerSubmission": { - "id": "ShortAnswerSubmission", - "type": "object", - "description": "Student work for a short answer question.", - "properties": { - "answer": { - "type": "string", - "description": "Student response to a short-answer question." - } - } - }, - "MultipleChoiceSubmission": { - "id": "MultipleChoiceSubmission", - "type": "object", - "description": "Student work for a multiple-choice question.", - "properties": { - "answer": { - "type": "string", - "description": "Student's select choice." - } - } - }, - "ListStudentSubmissionsResponse": { - "id": "ListStudentSubmissionsResponse", - "type": "object", - "description": "Response when listing student submissions.", - "properties": { - "studentSubmissions": { - "type": "array", - "description": "Student work that matches the request.", - "items": { - "$ref": "StudentSubmission" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further results are available." - } - } - }, - "TurnInStudentSubmissionRequest": { - "id": "TurnInStudentSubmissionRequest", - "type": "object", - "description": "Request to turn in a student submission." - }, - "ReclaimStudentSubmissionRequest": { - "id": "ReclaimStudentSubmissionRequest", - "type": "object", - "description": "Request to reclaim a student submission." - }, - "ReturnStudentSubmissionRequest": { - "id": "ReturnStudentSubmissionRequest", - "type": "object", - "description": "Request to return a student submission." - }, - "ModifyAttachmentsRequest": { - "id": "ModifyAttachmentsRequest", - "type": "object", - "description": "Request to modify the attachments of a student submission.", - "properties": { - "addAttachments": { - "type": "array", - "description": "Attachments to add. A student submission may not have more than 20 attachments. This may only contain link attachments.", - "items": { - "$ref": "Attachment" - } - } - } - } - }, - "resources": { - "courses": { - "methods": { - "create": { - "id": "classroom.courses.create", - "path": "v1/courses", - "httpMethod": "POST", - "description": "Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.", - "request": { - "$ref": "Course" - }, - "response": { - "$ref": "Course" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ] - }, - "get": { - "id": "classroom.courses.get", - "path": "v1/courses/{id}", - "httpMethod": "GET", - "description": "Returns a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID.", - "parameters": { - "id": { - "type": "string", - "description": "Identifier of the course to return. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "id" - ], - "response": { - "$ref": "Course" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses", - "https://www.googleapis.com/auth/classroom.courses.readonly" - ] - }, - "update": { - "id": "classroom.courses.update", - "path": "v1/courses/{id}", - "httpMethod": "PUT", - "description": "Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable", - "parameters": { - "id": { - "type": "string", - "description": "Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "id" - ], - "request": { - "$ref": "Course" - }, - "response": { - "$ref": "Course" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ] - }, - "patch": { - "id": "classroom.courses.patch", - "path": "v1/courses/{id}", - "httpMethod": "PATCH", - "description": "Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable", - "parameters": { - "id": { - "type": "string", - "description": "Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "updateMask": { - "type": "string", - "description": "Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `name` * `section` * `descriptionHeading` * `description` * `room` * `courseState` When set in a query parameter, this field should be specified as `updateMask=,,...`", - "location": "query" - } - }, - "parameterOrder": [ - "id" - ], - "request": { - "$ref": "Course" - }, - "response": { - "$ref": "Course" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ] - }, - "delete": { - "id": "classroom.courses.delete", - "path": "v1/courses/{id}", - "httpMethod": "DELETE", - "description": "Deletes a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID.", - "parameters": { - "id": { - "type": "string", - "description": "Identifier of the course to delete. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "id" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ] - }, - "list": { - "id": "classroom.courses.list", - "path": "v1/courses", - "httpMethod": "GET", - "description": "Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist.", - "parameters": { - "studentId": { - "type": "string", - "description": "Restricts returned courses to those having a student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "location": "query" - }, - "teacherId": { - "type": "string", - "description": "Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "location": "query" - }, - "courseStates": { - "type": "string", - "description": "Restricts returned courses to those in one of the specified states", - "enum": [ - "COURSE_STATE_UNSPECIFIED", - "ACTIVE", - "ARCHIVED", - "PROVISIONED", - "DECLINED" - ], - "repeated": true, - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.", - "location": "query" - } - }, - "response": { - "$ref": "ListCoursesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses", - "https://www.googleapis.com/auth/classroom.courses.readonly" - ] - } - }, - "resources": { - "aliases": { - "methods": { - "create": { - "id": "classroom.courses.aliases.create", - "path": "v1/courses/{courseId}/aliases", - "httpMethod": "POST", - "description": "Creates an alias for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors. * `NOT_FOUND` if the course does not exist. * `ALREADY_EXISTS` if the alias already exists.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId" - ], - "request": { - "$ref": "CourseAlias" - }, - "response": { - "$ref": "CourseAlias" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ] - }, - "delete": { - "id": "classroom.courses.aliases.delete", - "path": "v1/courses/{courseId}/aliases/{alias}", - "httpMethod": "DELETE", - "description": "Deletes an alias of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to remove the alias or for access errors. * `NOT_FOUND` if the alias does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course whose alias should be deleted. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" + "methods": { + "create": { + "request": { + "$ref": "Invitation" + }, + "description": "Creates an invitation. Only one invitation for a user and course may exist\nat a time. Delete and re-create an invitation to make changes.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ninvitations for this course or for access errors.\n* `NOT_FOUND` if the course or the user does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled or if\nthe user already has this role or a role with greater permissions.\n* `ALREADY_EXISTS` if an invitation for the specified user and course\nalready exists.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Invitation" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "flatPath": "v1/invitations", + "id": "classroom.invitations.create", + "path": "v1/invitations" }, - "alias": { - "type": "string", - "description": "Alias to delete. This may not be the Classroom-assigned identifier.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "alias" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ] - }, - "list": { - "id": "classroom.courses.aliases.list", - "path": "v1/courses/{courseId}/aliases", - "httpMethod": "GET", - "description": "Returns a list of aliases for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the course or for access errors. * `NOT_FOUND` if the course does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "The identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" + "accept": { + "description": "Accepts an invitation, removing it and adding the invited user to the\nteachers or students (as appropriate) of the specified course. Only the\ninvited user may accept an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to accept the\nrequested invitation or for access errors.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * CourseTeacherLimitReached\n * UserGroupsMembershipLimitReached\n* `NOT_FOUND` if no invitation exists with the requested ID.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "id" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": { + "id": { + "description": "Identifier of the invitation to accept.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/invitations/{id}:accept", + "path": "v1/invitations/{id}:accept", + "id": "classroom.invitations.accept" }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.", - "format": "int32", - "location": "query" + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "id" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the invitation to delete.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/invitations/{id}", + "path": "v1/invitations/{id}", + "id": "classroom.invitations.delete", + "description": "Deletes an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID." }, - "pageToken": { - "type": "string", - "description": "nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.", - "location": "query" - } - }, - "parameterOrder": [ - "courseId" - ], - "response": { - "$ref": "ListCourseAliasesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses", - "https://www.googleapis.com/auth/classroom.courses.readonly" - ] - } - } - }, - "teachers": { - "methods": { - "create": { - "id": "classroom.courses.teachers.create", - "path": "v1/courses/{courseId}/teachers", - "httpMethod": "POST", - "description": "Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId" - ], - "request": { - "$ref": "Teacher" - }, - "response": { - "$ref": "Teacher" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters" - ] - }, - "get": { - "id": "classroom.courses.teachers.get", - "path": "v1/courses/{courseId}/teachers/{userId}", - "httpMethod": "GET", - "description": "Returns a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "userId": { - "type": "string", - "description": "Identifier of the teacher to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "userId" - ], - "response": { - "$ref": "Teacher" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ] - }, - "delete": { - "id": "classroom.courses.teachers.delete", - "path": "v1/courses/{courseId}/teachers/{userId}", - "httpMethod": "DELETE", - "description": "Deletes a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "userId": { - "type": "string", - "description": "Identifier of the teacher to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "userId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ] - }, - "list": { - "id": "classroom.courses.teachers.list", - "path": "v1/courses/{courseId}/teachers", - "httpMethod": "GET", - "description": "Returns a list of teachers of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. * `PERMISSION_DENIED` for access errors.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.", - "location": "query" - } - }, - "parameterOrder": [ - "courseId" - ], - "response": { - "$ref": "ListTeachersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ] - } - } - }, - "students": { - "methods": { - "create": { - "id": "classroom.courses.students.create", - "path": "v1/courses/{courseId}/students", - "httpMethod": "POST", - "description": "Adds a user as a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course to create the student in. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "enrollmentCode": { - "type": "string", - "description": "Enrollment code of the course to create the student in. This code is required if userId corresponds to the requesting user; it may be omitted if the requesting user has administrative permissions to create students for any user.", - "location": "query" - } - }, - "parameterOrder": [ - "courseId" - ], - "request": { - "$ref": "Student" - }, - "response": { - "$ref": "Student" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters" - ] - }, - "get": { - "id": "classroom.courses.students.get", - "path": "v1/courses/{courseId}/students/{userId}", - "httpMethod": "GET", - "description": "Returns a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "userId": { - "type": "string", - "description": "Identifier of the student to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "userId" - ], - "response": { - "$ref": "Student" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ] - }, - "delete": { - "id": "classroom.courses.students.delete", - "path": "v1/courses/{courseId}/students/{userId}", - "httpMethod": "DELETE", - "description": "Deletes a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "userId": { - "type": "string", - "description": "Identifier of the student to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "userId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ] - }, - "list": { - "id": "classroom.courses.students.list", - "path": "v1/courses/{courseId}/students", - "httpMethod": "GET", - "description": "Returns a list of students of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. * `PERMISSION_DENIED` for access errors.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.", - "location": "query" - } - }, - "parameterOrder": [ - "courseId" - ], - "response": { - "$ref": "ListStudentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ] - } - } - }, - "courseWork": { - "methods": { - "create": { - "id": "classroom.courses.courseWork.create", - "path": "v1/courses/{courseId}/courseWork", - "httpMethod": "POST", - "description": "Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId" - ], - "request": { - "$ref": "CourseWork" - }, - "response": { - "$ref": "CourseWork" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.students" - ] - }, - "get": { - "id": "classroom.courses.courseWork.get", - "path": "v1/courses/{courseId}/courseWork/{id}", - "httpMethod": "GET", - "description": "Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "id": { - "type": "string", - "description": "Identifier of the course work.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "id" - ], - "response": { - "$ref": "CourseWork" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.course-work.readonly", - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.me.readonly", - "https://www.googleapis.com/auth/classroom.coursework.students", - "https://www.googleapis.com/auth/classroom.coursework.students.readonly" - ] - }, - "list": { - "id": "classroom.courses.courseWork.list", - "path": "v1/courses/{courseId}/courseWork", - "httpMethod": "GET", - "description": "Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "courseWorkStates": { - "type": "string", - "description": "Restriction on the work status to return. Only courseWork that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned.", - "enum": [ - "COURSE_WORK_STATE_UNSPECIFIED", - "PUBLISHED", - "DRAFT", - "DELETED" - ], - "repeated": true, - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported fields are `updateTime` and `dueDate`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.", - "location": "query" - } - }, - "parameterOrder": [ - "courseId" - ], - "response": { - "$ref": "ListCourseWorkResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.course-work.readonly", - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.me.readonly", - "https://www.googleapis.com/auth/classroom.coursework.students", - "https://www.googleapis.com/auth/classroom.coursework.students.readonly" - ] - } - }, - "resources": { - "studentSubmissions": { - "methods": { "get": { - "id": "classroom.courses.courseWork.studentSubmissions.get", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", - "httpMethod": "GET", - "description": "Returns a student submission. * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" + "parameters": { + "id": { + "description": "Identifier of the invitation to return.", + "required": true, + "type": "string", + "location": "path" + } }, - "courseWorkId": { - "type": "string", - "description": "Identifier of the course work.", - "required": true, - "location": "path" + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "flatPath": "v1/invitations/{id}", + "path": "v1/invitations/{id}", + "id": "classroom.invitations.get", + "description": "Returns an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID.", + "response": { + "$ref": "Invitation" }, - "id": { - "type": "string", - "description": "Identifier of the student submission.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "response": { - "$ref": "StudentSubmission" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.me.readonly", - "https://www.googleapis.com/auth/classroom.coursework.students", - "https://www.googleapis.com/auth/classroom.coursework.students.readonly", - "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly", - "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly" - ] - }, - "patch": { - "id": "classroom.courses.courseWork.studentSubmissions.patch", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", - "httpMethod": "PATCH", - "description": "Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "courseWorkId": { - "type": "string", - "description": "Identifier of the course work.", - "required": true, - "location": "path" - }, - "id": { - "type": "string", - "description": "Identifier of the student submission.", - "required": true, - "location": "path" - }, - "updateMask": { - "type": "string", - "description": "Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields may be specified by teachers: * `draft_grade` * `assigned_grade`", - "location": "query" - } - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "request": { - "$ref": "StudentSubmission" - }, - "response": { - "$ref": "StudentSubmission" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.students" - ] + "httpMethod": "GET", + "parameterOrder": [ + "id" + ] }, "list": { - "id": "classroom.courses.courseWork.studentSubmissions.list", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions", - "httpMethod": "GET", - "description": "Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" + "response": { + "$ref": "ListInvitationsResponse" }, - "courseWorkId": { - "type": "string", - "description": "Identifer of the student work to request. This may be set to the string literal `\"-\"` to request student work for all course work in the specified course.", - "required": true, - "location": "path" + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", + "format": "int32", + "type": "integer" + }, + "courseId": { + "location": "query", + "description": "Restricts returned invitations to those for a course with the specified\nidentifier.", + "type": "string" + }, + "userId": { + "description": "Restricts returned invitations to those for a specific user. The identifier\ncan be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating\nthat the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", + "type": "string", + "location": "query" + } }, - "userId": { - "type": "string", - "description": "Optional argument to restrict returned student work to those owned by the student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "location": "query" + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "flatPath": "v1/invitations", + "path": "v1/invitations", + "id": "classroom.invitations.list", + "description": "Returns a list of invitations that the requesting user is permitted to\nview, restricted to those that match the list request.\n\n*Note:* At least one of `user_id` or `course_id` must be supplied. Both\nfields can be supplied.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors." + } + } + }, + "courses": { + "methods": { + "get": { + "response": { + "$ref": "Course" }, - "states": { - "type": "string", - "description": "Requested submission states. If specified, returned student submissions match one of the specified submission states.", - "enum": [ + "httpMethod": "GET", + "parameterOrder": [ + "id" + ], + "parameters": { + "id": { + "description": "Identifier of the course to return.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses", + "https://www.googleapis.com/auth/classroom.courses.readonly" + ], + "flatPath": "v1/courses/{id}", + "path": "v1/courses/{id}", + "id": "classroom.courses.get", + "description": "Returns a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID." + }, + "patch": { + "description": "Updates one or more fields in a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to modify the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.\n* `INVALID_ARGUMENT` if invalid fields are specified in the update mask or\nif no update mask is supplied.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseNotModifiable", + "request": { + "$ref": "Course" + }, + "response": { + "$ref": "Course" + }, + "parameterOrder": [ + "id" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the course to update.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + }, + "updateMask": { + "location": "query", + "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `name`\n* `section`\n* `descriptionHeading`\n* `description`\n* `room`\n* `courseState`\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`", + "format": "google-fieldmask", + "type": "string" + } + }, + "flatPath": "v1/courses/{id}", + "path": "v1/courses/{id}", + "id": "classroom.courses.patch" + }, + "update": { + "path": "v1/courses/{id}", + "id": "classroom.courses.update", + "description": "Updates a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to modify the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseNotModifiable", + "request": { + "$ref": "Course" + }, + "response": { + "$ref": "Course" + }, + "parameterOrder": [ + "id" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], + "parameters": { + "id": { + "description": "Identifier of the course to update.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/courses/{id}" + }, + "delete": { + "description": "Deletes a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "id" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], + "parameters": { + "id": { + "description": "Identifier of the course to delete.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/courses/{id}", + "path": "v1/courses/{id}", + "id": "classroom.courses.delete" + }, + "list": { + "flatPath": "v1/courses", + "path": "v1/courses", + "id": "classroom.courses.list", + "description": "Returns a list of courses that the requesting user is permitted to view,\nrestricted to those that match the request.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors.\n* `INVALID_ARGUMENT` if the query argument is malformed.\n* `NOT_FOUND` if any users specified in the query arguments do not exist.", + "response": { + "$ref": "ListCoursesResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses", + "https://www.googleapis.com/auth/classroom.courses.readonly" + ], + "parameters": { + "studentId": { + "location": "query", + "description": "Restricts returned courses to those having a student with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "format": "int32", + "type": "integer" + }, + "teacherId": { + "description": "Restricts returned courses to those having a teacher with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string", + "location": "query" + }, + "courseStates": { + "repeated": true, + "location": "query", + "enum": [ + "COURSE_STATE_UNSPECIFIED", + "ACTIVE", + "ARCHIVED", + "PROVISIONED", + "DECLINED", + "SUSPENDED" + ], + "description": "Restricts returned courses to those in one of the specified states\nThe default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.", + "type": "string" + } + } + }, + "create": { + "response": { + "$ref": "Course" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], + "flatPath": "v1/courses", + "path": "v1/courses", + "id": "classroom.courses.create", + "request": { + "$ref": "Course" + }, + "description": "Creates a course.\n\nThe user specified in `ownerId` is the owner of the created course\nand added as a teacher.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ncourses or for access errors.\n* `NOT_FOUND` if the primary teacher is not a valid user.\n* `FAILED_PRECONDITION` if the course owner's account is disabled or for\nthe following request errors:\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if an alias was specified in the `id` and\nalready exists." + } + }, + "resources": { + "aliases": { + "methods": { + "delete": { + "description": "Deletes an alias of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to remove the\nalias or for access errors.\n* `NOT_FOUND` if the alias does not exist.\n* `FAILED_PRECONDITION` if the alias requested does not make sense for the\n requesting user or course (for example, if a user not in a domain\n attempts to delete a domain-scoped alias).", + "httpMethod": "DELETE", + "parameterOrder": [ + "courseId", + "alias" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], + "parameters": { + "alias": { + "description": "Alias to delete.\nThis may not be the Classroom-assigned identifier.", + "required": true, + "type": "string", + "location": "path" + }, + "courseId": { + "location": "path", + "description": "Identifier of the course whose alias should be deleted.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/courses/{courseId}/aliases/{alias}", + "id": "classroom.courses.aliases.delete", + "path": "v1/courses/{courseId}/aliases/{alias}" + }, + "list": { + "description": "Returns a list of aliases for a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\ncourse or for access errors.\n* `NOT_FOUND` if the course does not exist.", + "httpMethod": "GET", + "response": { + "$ref": "ListCourseAliasesResponse" + }, + "parameterOrder": [ + "courseId" + ], + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses", + "https://www.googleapis.com/auth/classroom.courses.readonly" + ], + "parameters": { + "pageToken": { + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "format": "int32", + "type": "integer" + }, + "courseId": { + "location": "path", + "description": "The identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/courses/{courseId}/aliases", + "id": "classroom.courses.aliases.list", + "path": "v1/courses/{courseId}/aliases" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "courseId" + ], + "response": { + "$ref": "CourseAlias" + }, + "parameters": { + "courseId": { + "required": true, + "type": "string", + "location": "path", + "description": "Identifier of the course to alias.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], + "flatPath": "v1/courses/{courseId}/aliases", + "id": "classroom.courses.aliases.create", + "path": "v1/courses/{courseId}/aliases", + "request": { + "$ref": "CourseAlias" + }, + "description": "Creates an alias for a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create the\nalias or for access errors.\n* `NOT_FOUND` if the course does not exist.\n* `ALREADY_EXISTS` if the alias already exists.\n* `FAILED_PRECONDITION` if the alias requested does not make sense for the\n requesting user or course (for example, if a user not in a domain\n attempts to access a domain-scoped alias)." + } + } + }, + "students": { + "methods": { + "delete": { + "parameters": { + "userId": { + "location": "path", + "description": "Identifier of the student to delete. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "required": true, + "type": "string" + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "flatPath": "v1/courses/{courseId}/students/{userId}", + "path": "v1/courses/{courseId}/students/{userId}", + "id": "classroom.courses.students.delete", + "description": "Deletes a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "userId" + ], + "httpMethod": "DELETE" + }, + "get": { + "path": "v1/courses/{courseId}/students/{userId}", + "id": "classroom.courses.students.get", + "description": "Returns a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist.", + "response": { + "$ref": "Student" + }, + "parameterOrder": [ + "courseId", + "userId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + }, + "userId": { + "description": "Identifier of the student to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/courses/{courseId}/students/{userId}" + }, + "list": { + "description": "Returns a list of students of this course that the requester\nis permitted to view.\n\nThis method returns the following error codes:\n\n* `NOT_FOUND` if the course does not exist.\n* `PERMISSION_DENIED` for access errors.", + "response": { + "$ref": "ListStudentsResponse" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "parameters": { + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating that\nthe subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1/courses/{courseId}/students", + "path": "v1/courses/{courseId}/students", + "id": "classroom.courses.students.list" + }, + "create": { + "response": { + "$ref": "Student" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "POST", + "parameters": { + "courseId": { + "description": "Identifier of the course to create the student in.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + }, + "enrollmentCode": { + "location": "query", + "description": "Enrollment code of the course to create the student in.\nThis code is required if userId\ncorresponds to the requesting user; it may be omitted if the requesting\nuser has administrative permissions to create students for any user.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters" + ], + "flatPath": "v1/courses/{courseId}/students", + "path": "v1/courses/{courseId}/students", + "id": "classroom.courses.students.create", + "request": { + "$ref": "Student" + }, + "description": "Adds a user as a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nstudents in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a student or teacher in the\ncourse." + } + } + }, + "courseWork": { + "resources": { + "studentSubmissions": { + "methods": { + "patch": { + "request": { + "$ref": "StudentSubmission" + }, + "description": "Updates one or more fields of a student submission.\n\nSee google.classroom.v1.StudentSubmission for details\nof which fields may be updated and who may change them.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the user is not permitted to make the\nrequested modification to the student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "response": { + "$ref": "StudentSubmission" + }, + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "httpMethod": "PATCH", + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the student submission.", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Mask that identifies which fields on the student submission to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified.\n\nThe following fields may be specified by teachers:\n* `draft_grade`\n* `assigned_grade`", + "format": "google-fieldmask", + "type": "string", + "location": "query" + }, + "courseWorkId": { + "required": true, + "type": "string", + "location": "path", + "description": "Identifier of the course work." + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", + "id": "classroom.courses.courseWork.studentSubmissions.patch" + }, + "get": { + "description": "Returns a student submission.\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, course work, or student submission or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "httpMethod": "GET", + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "response": { + "$ref": "StudentSubmission" + }, + "parameters": { + "courseWorkId": { + "location": "path", + "description": "Identifier of the course work.", + "required": true, + "type": "string" + }, + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + }, + "id": { + "location": "path", + "description": "Identifier of the student submission.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.me.readonly", + "https://www.googleapis.com/auth/classroom.coursework.students", + "https://www.googleapis.com/auth/classroom.coursework.students.readonly", + "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly", + "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly" + ], + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", + "id": "classroom.courses.courseWork.studentSubmissions.get", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}" + }, + "return": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "httpMethod": "POST", + "parameters": { + "courseWorkId": { + "location": "path", + "description": "Identifier of the course work.", + "required": true, + "type": "string" + }, + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + }, + "id": { + "description": "Identifier of the student submission.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return", + "id": "classroom.courses.courseWork.studentSubmissions.return", + "request": { + "$ref": "ReturnStudentSubmissionRequest" + }, + "description": "Returns a student submission.\n\nReturning a student submission transfers ownership of attached Drive\nfiles to the student and may also update the submission state.\nUnlike the Classroom application, returning a student submission does not\nset assignedGrade to the draftGrade value.\n\nOnly a teacher of the course that contains the requested student submission\nmay call this method.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, return the requested student submission,\nor for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist." + }, + "reclaim": { + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", + "id": "classroom.courses.courseWork.studentSubmissions.reclaim", + "request": { + "$ref": "ReclaimStudentSubmissionRequest" + }, + "description": "Reclaims a student submission on behalf of the student that owns it.\n\nReclaiming a student submission transfers ownership of attached Drive\nfiles to the student and update the submission state.\n\nOnly the student that owns the requested student submission may call this\nmethod, and only for a student submission that has been turned in.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, unsubmit the requested student submission,\nor for access errors.\n* `FAILED_PRECONDITION` if the student submission has not been turned in.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "httpMethod": "POST", + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the student submission.", + "required": true, + "type": "string" + }, + "courseWorkId": { + "description": "Identifier of the course work.", + "required": true, + "type": "string", + "location": "path" + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me" + ] + }, + "turnIn": { + "httpMethod": "POST", + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "courseWorkId": { + "required": true, + "type": "string", + "location": "path", + "description": "Identifier of the course work." + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + }, + "id": { + "description": "Identifier of the student submission.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me" + ], + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn", + "id": "classroom.courses.courseWork.studentSubmissions.turnIn", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn", + "request": { + "$ref": "TurnInStudentSubmissionRequest" + }, + "description": "Turns in a student submission.\n\nTurning in a student submission transfers ownership of attached Drive\nfiles to the teacher and may also update the submission state.\n\nThis may only be called by the student that owns the specified student\nsubmission.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, turn in the requested student submission,\nor for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist." + }, + "modifyAttachments": { + "httpMethod": "POST", + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "response": { + "$ref": "StudentSubmission" + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "parameters": { + "courseWorkId": { + "location": "path", + "description": "Identifier of the course work.", + "required": true, + "type": "string" + }, + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + }, + "id": { + "description": "Identifier of the student submission.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments", + "id": "classroom.courses.courseWork.studentSubmissions.modifyAttachments", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments", + "description": "Modifies attachments of student submission.\n\nAttachments may only be added to student submissions belonging to course\nwork objects with a `workType` of `ASSIGNMENT`.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, if the user is not permitted to modify\nattachments on the requested student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "request": { + "$ref": "ModifyAttachmentsRequest" + } + }, + "list": { + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions", + "id": "classroom.courses.courseWork.studentSubmissions.list", + "description": "Returns a list of student submissions that the requester is permitted to\nview, factoring in the OAuth scopes of the request.\n`-` may be specified as the `course_work_id` to include student\nsubmissions for multiple course work items.\n\nCourse students may only view their own work. Course teachers\nand domain administrators may view all student submissions.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.", + "parameterOrder": [ + "courseId", + "courseWorkId" + ], + "httpMethod": "GET", + "response": { + "$ref": "ListStudentSubmissionsResponse" + }, + "parameters": { + "states": { + "location": "query", + "enum": [ + "SUBMISSION_STATE_UNSPECIFIED", + "NEW", + "CREATED", + "TURNED_IN", + "RETURNED", + "RECLAIMED_BY_STUDENT" + ], + "description": "Requested submission states. If specified, returned student submissions\nmatch one of the specified submission states.", + "type": "string", + "repeated": true + }, + "pageSize": { + "location": "query", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "format": "int32", + "type": "integer" + }, + "userId": { + "location": "query", + "description": "Optional argument to restrict returned student work to those owned by the\nstudent with the specified identifier. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + }, + "courseWorkId": { + "location": "path", + "description": "Identifer of the student work to request.\nThis may be set to the string literal `\"-\"` to request student work for\nall course work in the specified course.", + "required": true, + "type": "string" + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + }, + "late": { + "location": "query", + "enum": [ + "LATE_VALUES_UNSPECIFIED", + "LATE_ONLY", + "NOT_LATE_ONLY" + ], + "description": "Requested lateness value. If specified, returned student submissions are\nrestricted by the requested value.\nIf unspecified, submissions are returned regardless of `late` value.", + "type": "string" + }, + "pageToken": { + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.me.readonly", + "https://www.googleapis.com/auth/classroom.coursework.students", + "https://www.googleapis.com/auth/classroom.coursework.students.readonly", + "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly", + "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly" + ], + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions" + } + } + } + }, + "methods": { + "delete": { + "description": "Deletes a course work.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the requesting user is not permitted\nto delete the requested course or for access errors.\n* `FAILED_PRECONDITION` if the requested course work has already been\ndeleted.\n* `NOT_FOUND` if no course exists with the requested ID.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "id" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "parameters": { + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + }, + "id": { + "location": "path", + "description": "Identifier of the course work to delete.\nThis identifier is a Classroom-assigned identifier.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{id}", + "path": "v1/courses/{courseId}/courseWork/{id}", + "id": "classroom.courses.courseWork.delete" + }, + "patch": { + "description": "Updates one or more fields of a course work.\n\nSee google.classroom.v1.CourseWork for details\nof which fields may be updated and who may change them.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the user is not permitted to make the\nrequested modification to the student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `FAILED_PRECONDITION` if the requested course work has already been\ndeleted.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "request": { + "$ref": "CourseWork" + }, + "response": { + "$ref": "CourseWork" + }, + "parameterOrder": [ + "courseId", + "id" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "parameters": { + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + }, + "id": { + "required": true, + "type": "string", + "location": "path", + "description": "Identifier of the course work." + }, + "updateMask": { + "type": "string", + "location": "query", + "description": "Mask that identifies which fields on the course work to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified. If a field supports empty values, it can be cleared\nby specifying it in the update mask and not in the CourseWork object. If a\nfield that does not support empty values is included in the update mask and\nnot set in the CourseWork object, an `INVALID_ARGUMENT` error will be\nreturned.\n\nThe following fields may be specified by teachers:\n* `title`\n* `description`\n* `state`\n* `due_date`\n* `due_time`\n* `max_points`\n* `submission_modification_mode`", + "format": "google-fieldmask" + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{id}", + "path": "v1/courses/{courseId}/courseWork/{id}", + "id": "classroom.courses.courseWork.patch" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "courseId", + "id" + ], + "response": { + "$ref": "CourseWork" + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.me.readonly", + "https://www.googleapis.com/auth/classroom.coursework.students", + "https://www.googleapis.com/auth/classroom.coursework.students.readonly" + ], + "parameters": { + "courseId": { + "required": true, + "type": "string", + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + }, + "id": { + "location": "path", + "description": "Identifier of the course work.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{id}", + "id": "classroom.courses.courseWork.get", + "path": "v1/courses/{courseId}/courseWork/{id}", + "description": "Returns course work.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or course work does not exist." + }, + "list": { + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.me.readonly", + "https://www.googleapis.com/auth/classroom.coursework.students", + "https://www.googleapis.com/auth/classroom.coursework.students.readonly" + ], + "parameters": { + "orderBy": { + "description": "Optional sort ordering for results. A comma-separated list of fields with\nan optional sort direction keyword. Supported fields are `updateTime`\nand `dueDate`. Supported direction keywords are `asc` and `desc`.\nIf not specified, `updateTime desc` is the default behavior.\nExamples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`", + "type": "string", + "location": "query" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token." + }, + "pageSize": { + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "courseWorkStates": { + "location": "query", + "enum": [ + "COURSE_WORK_STATE_UNSPECIFIED", + "PUBLISHED", + "DRAFT", + "DELETED" + ], + "description": "Restriction on the work status to return. Only courseWork that matches\nis returned. If unspecified, items with a work status of `PUBLISHED`\nis returned.", + "type": "string", + "repeated": true + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/courses/{courseId}/courseWork", + "path": "v1/courses/{courseId}/courseWork", + "id": "classroom.courses.courseWork.list", + "description": "Returns a list of course work that the requester is permitted to view.\n\nCourse students may only view `PUBLISHED` course work. Course teachers\nand domain administrators may view all course work.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access\nthe requested course or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.", + "response": { + "$ref": "ListCourseWorkResponse" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "GET" + }, + "create": { + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/courses/{courseId}/courseWork", + "id": "classroom.courses.courseWork.create", + "path": "v1/courses/{courseId}/courseWork", + "description": "Creates course work.\n\nThe resulting course work (and corresponding student submissions) are\nassociated with the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\nmake the request. Classroom API requests to modify course work and student\nsubmissions must be made with an OAuth client ID from the associated\nDeveloper Console project.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, create course work in the requested course, share a\nDrive attachment, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.\n* `FAILED_PRECONDITION` for the following request error:\n * AttachmentNotVisible", + "request": { + "$ref": "CourseWork" + }, + "httpMethod": "POST", + "parameterOrder": [ + "courseId" + ], + "response": { + "$ref": "CourseWork" + } + } + } + }, + "teachers": { + "methods": { + "create": { + "request": { + "$ref": "Teacher" + }, + "description": "Creates a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nteachers in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * CourseTeacherLimitReached\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a teacher or student in the\ncourse.", + "response": { + "$ref": "Teacher" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "POST", + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters" + ], + "flatPath": "v1/courses/{courseId}/teachers", + "path": "v1/courses/{courseId}/teachers", + "id": "classroom.courses.teachers.create" + }, + "delete": { + "parameterOrder": [ + "courseId", + "userId" + ], + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameters": { + "userId": { + "description": "Identifier of the teacher to delete. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "required": true, + "type": "string", + "location": "path" + }, + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "flatPath": "v1/courses/{courseId}/teachers/{userId}", + "path": "v1/courses/{courseId}/teachers/{userId}", + "id": "classroom.courses.teachers.delete", + "description": "Deletes a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete\nteachers of this course or for access errors.\n* `NOT_FOUND` if no teacher of this course has the requested ID or if the\ncourse does not exist.\n* `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher\nof this course." + }, + "get": { + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "parameters": { + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "required": true, + "type": "string", + "location": "path" + }, + "userId": { + "description": "Identifier of the teacher to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/courses/{courseId}/teachers/{userId}", + "id": "classroom.courses.teachers.get", + "path": "v1/courses/{courseId}/teachers/{userId}", + "description": "Returns a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nteachers of this course or for access errors.\n* `NOT_FOUND` if no teacher of this course has the requested ID or if the\ncourse does not exist.", + "httpMethod": "GET", + "parameterOrder": [ + "courseId", + "userId" + ], + "response": { + "$ref": "Teacher" + } + }, + "list": { + "description": "Returns a list of teachers of this course that the requester\nis permitted to view.\n\nThis method returns the following error codes:\n\n* `NOT_FOUND` if the course does not exist.\n* `PERMISSION_DENIED` for access errors.", + "response": { + "$ref": "ListTeachersResponse" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "parameters": { + "pageToken": { + "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating that\nthe subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "courseId": { + "required": true, + "type": "string", + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + } + }, + "flatPath": "v1/courses/{courseId}/teachers", + "path": "v1/courses/{courseId}/teachers", + "id": "classroom.courses.teachers.list" + } + } + } + } + }, + "userProfiles": { + "methods": { + "get": { + "httpMethod": "GET", + "response": { + "$ref": "UserProfile" + }, + "parameterOrder": [ + "userId" + ], + "parameters": { + "userId": { + "description": "Identifier of the profile to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "flatPath": "v1/userProfiles/{userId}", + "id": "classroom.userProfiles.get", + "path": "v1/userProfiles/{userId}", + "description": "Returns a user profile.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access\nthis user profile, if no profile exists with the requested ID, or for\naccess errors." + } + }, + "resources": { + "guardianInvitations": { + "methods": { + "list": { + "path": "v1/userProfiles/{studentId}/guardianInvitations", + "id": "classroom.userProfiles.guardianInvitations.list", + "description": "Returns a list of guardian invitations that the requesting user is\npermitted to view, filtered by the parameters provided.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting\n user is not permitted to view guardian invitations for that student, if\n `\"-\"` is specified as the `student_id` and the user is not a domain\n administrator, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`). May also be returned if an invalid\n `page_token` or `state` is provided.\n* `NOT_FOUND` if a `student_id` is specified, and its format can be\n recognized, but Classroom has no record of that student.", + "response": { + "$ref": "ListGuardianInvitationsResponse" + }, + "parameterOrder": [ + "studentId" + ], + "httpMethod": "GET", + "parameters": { + "studentId": { + "description": "The ID of the student whose guardian invitations are to be returned.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n* the string literal `\"-\"`, indicating that results should be returned for\n all students that the requesting user is permitted to view guardian\n invitations.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", + "type": "string" + }, + "invitedEmailAddress": { + "location": "query", + "description": "If specified, only results with the specified `invited_email_address`\nwill be returned.", + "type": "string" + }, + "states": { + "enum": [ + "GUARDIAN_INVITATION_STATE_UNSPECIFIED", + "PENDING", + "COMPLETE" + ], + "description": "If specified, only results with the specified `state` values will be\nreturned. Otherwise, results with a `state` of `PENDING` will be returned.", + "type": "string", + "repeated": true, + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardianInvitations" + }, + "get": { + "response": { + "$ref": "GuardianInvitation" + }, + "parameterOrder": [ + "studentId", + "invitationId" + ], + "httpMethod": "GET", + "parameters": { + "studentId": { + "description": "The ID of the student whose guardian invitation is being requested.", + "required": true, + "type": "string", + "location": "path" + }, + "invitationId": { + "location": "path", + "description": "The `id` field of the `GuardianInvitation` being requested.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", + "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", + "id": "classroom.userProfiles.guardianInvitations.get", + "description": "Returns a specific guardian invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\n guardian invitations for the student identified by the `student_id`, if\n guardians are not enabled for the domain in question, or for other\n access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`).\n* `NOT_FOUND` if Classroom cannot find any record of the given student or\n `invitation_id`. May also be returned if the student exists, but the\n requesting user does not have access to see that student." + }, + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "studentId", + "invitationId" + ], + "response": { + "$ref": "GuardianInvitation" + }, + "parameters": { + "invitationId": { + "description": "The `id` field of the `GuardianInvitation` to be modified.", + "required": true, + "type": "string", + "location": "path" + }, + "updateMask": { + "location": "query", + "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `state`\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`", + "format": "google-fieldmask", + "type": "string" + }, + "studentId": { + "description": "The ID of the student whose guardian invitation is to be modified.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", + "id": "classroom.userProfiles.guardianInvitations.patch", + "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", + "request": { + "$ref": "GuardianInvitation" + }, + "description": "Modifies a guardian invitation.\n\nCurrently, the only valid modification is to change the `state` from\n`PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if guardians are not enabled for the domain in question\n or for other access errors.\n* `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.\n* `INVALID_ARGUMENT` if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API), or if the passed `GuardianInvitation` has a `state` other than\n `COMPLETE`, or if it modifies fields other than `state`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student, or if the `id` field does not\n refer to a guardian invitation known to Classroom." + }, + "create": { + "request": { + "$ref": "GuardianInvitation" + }, + "description": "Creates a guardian invitation, and sends an email to the guardian asking\nthem to confirm that they are the student's guardian.\n\nOnce the guardian accepts the invitation, their `state` will change to\n`COMPLETED` and they will start receiving guardian notifications. A\n`Guardian` resource will also be created to represent the active guardian.\n\nThe request object must have the `student_id` and\n`invited_email_address` fields set. Failing to set these fields, or\nsetting any other fields in the request, will result in an error.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if the guardian in question has already rejected\n too many requests for that student, if guardians are not enabled for the\n domain in question, or for other access errors.\n* `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian\n link limit.\n* `INVALID_ARGUMENT` if the guardian email address is not valid (for\n example, if it is too long), or if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API). This error will also be returned if read-only fields are set,\n or if the `state` field is set to to a value other than `PENDING`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student.\n* `ALREADY_EXISTS` if there is already a pending guardian invitation for\n the student and `invited_email_address` provided, or if the provided\n `invited_email_address` matches the Google account of an existing\n `Guardian` for this user.", + "response": { + "$ref": "GuardianInvitation" + }, + "parameterOrder": [ + "studentId" + ], + "httpMethod": "POST", + "parameters": { + "studentId": { + "location": "path", + "description": "ID of the student (in standard format)", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardianInvitations", + "path": "v1/userProfiles/{studentId}/guardianInvitations", + "id": "classroom.userProfiles.guardianInvitations.create" + } + } + }, + "guardians": { + "methods": { + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "studentId", + "guardianId" + ], + "httpMethod": "DELETE", + "parameters": { + "studentId": { + "description": "The student whose guardian is to be deleted. One of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "required": true, + "type": "string", + "location": "path" + }, + "guardianId": { + "description": "The `id` field from a `Guardian`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardians/{guardianId}", + "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", + "id": "classroom.userProfiles.guardians.delete", + "description": "Deletes a guardian.\n\nThe guardian will no longer receive guardian notifications and the guardian\nwill no longer be accessible via the API.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if no user that matches the provided `student_id`\n is visible to the requesting user, if the requesting user is not\n permitted to manage guardians for the student identified by the\n `student_id`, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API).\n* `NOT_FOUND` if the requesting user is permitted to modify guardians for\n the requested `student_id`, but no `Guardian` record exists for that\n student with the provided `guardian_id`." + }, + "list": { + "response": { + "$ref": "ListGuardiansResponse" + }, + "parameterOrder": [ + "studentId" + ], + "httpMethod": "GET", + "parameters": { + "studentId": { + "description": "Filter results by the student who the guardian is linked to.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n* the string literal `\"-\"`, indicating that results should be returned for\n all students that the requesting user has access to view.", + "required": true, + "type": "string", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", + "type": "string" + }, + "invitedEmailAddress": { + "location": "query", + "description": "Filter results by the email address that the original invitation was sent\nto, resulting in this guardian link.\nThis filter can only be used by domain administrators.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardians", + "path": "v1/userProfiles/{studentId}/guardians", + "id": "classroom.userProfiles.guardians.list", + "description": "Returns a list of guardians that the requesting user is permitted to\nview, restricted to those that match the request.\n\nTo list guardians for any student that the requesting user may view\nguardians for, use the literal character `-` for the student ID.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting\n user is not permitted to view guardian information for that student, if\n `\"-\"` is specified as the `student_id` and the user is not a domain\n administrator, if guardians are not enabled for the domain in question,\n if the `invited_email_address` filter is set by a user who is not a\n domain administrator, or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`). May also be returned if an invalid\n `page_token` is provided.\n* `NOT_FOUND` if a `student_id` is specified, and its format can be\n recognized, but Classroom has no record of that student." + }, + "get": { + "response": { + "$ref": "Guardian" + }, + "parameterOrder": [ + "studentId", + "guardianId" + ], + "httpMethod": "GET", + "parameters": { + "guardianId": { + "location": "path", + "description": "The `id` field from a `Guardian`.", + "required": true, + "type": "string" + }, + "studentId": { + "description": "The student whose guardian is being requested. One of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardians/{guardianId}", + "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", + "id": "classroom.userProfiles.guardians.get", + "description": "Returns a specific guardian.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if no user that matches the provided `student_id`\n is visible to the requesting user, if the requesting user is not\n permitted to view guardian information for the student identified by the\n `student_id`, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`).\n* `NOT_FOUND` if the requesting user is permitted to view guardians for\n the requested `student_id`, but no `Guardian` record exists for that\n student that matches the provided `guardian_id`." + } + } + } + } + } + }, + "parameters": { + "upload_protocol": { + "type": "string", + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "key": { + "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", + "location": "query" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "quotaUser": { + "type": "string", + "location": "query", + "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." + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + } + }, + "schemas": { + "Course": { + "id": "Course", + "description": "A Course in Classroom.", + "type": "object", + "properties": { + "description": { + "description": "Optional description.\nFor example, \"We'll be learning about the structure of living\ncreatures from a combination of textbooks, guest lectures, and lab work.\nExpect to be excited!\"\nIf set, this field must be a valid UTF-8 string and no longer than 30,000\ncharacters.", + "type": "string" + }, + "teacherGroupEmail": { + "description": "The email address of a Google group containing all teachers of the course.\nThis group does not accept email and can only be used for permissions.\n\nRead-only.", + "type": "string" + }, + "creationTime": { + "description": "Creation time of the course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Name of the course.\nFor example, \"10th Grade Biology\".\nThe name is required. It must be between 1 and 750 characters and a valid\nUTF-8 string.", + "type": "string" + }, + "teacherFolder": { + "$ref": "DriveFolder", + "description": "Information about a Drive Folder that is shared with all teachers of the\ncourse.\n\nThis field will only be set for teachers of the course and domain administrators.\n\nRead-only." + }, + "section": { + "description": "Section of the course.\nFor example, \"Period 2\".\nIf set, this field must be a valid UTF-8 string and no longer than 2800\ncharacters.", + "type": "string" + }, + "id": { + "type": "string", + "description": "Identifier for this course assigned by Classroom.\n\nWhen\ncreating a course,\nyou may optionally set this identifier to an\nalias string in the\nrequest to create a corresponding alias. The `id` is still assigned by\nClassroom and cannot be updated after the course is created.\n\nSpecifying this field in a course update mask results in an error." + }, + "room": { + "description": "Optional room location.\nFor example, \"301\".\nIf set, this field must be a valid UTF-8 string and no longer than 650\ncharacters.", + "type": "string" + }, + "courseGroupEmail": { + "description": "The email address of a Google group containing all members of the course.\nThis group does not accept email and can only be used for permissions.\n\nRead-only.", + "type": "string" + }, + "enrollmentCode": { + "type": "string", + "description": "Enrollment code to use when joining this course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only." + }, + "courseMaterialSets": { + "description": "Sets of materials that appear on the \"about\" page of this course.\n\nRead-only.", + "type": "array", + "items": { + "$ref": "CourseMaterialSet" + } + }, + "descriptionHeading": { + "description": "Optional heading for the description.\nFor example, \"Welcome to 10th Grade Biology.\"\nIf set, this field must be a valid UTF-8 string and no longer than 3600\ncharacters.", + "type": "string" + }, + "updateTime": { + "description": "Time of the most recent update to this course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only.", + "format": "google-datetime", + "type": "string" + }, + "alternateLink": { + "description": "Absolute link to this course in the Classroom web UI.\n\nRead-only.", + "type": "string" + }, + "guardiansEnabled": { + "description": "Whether or not guardian notifications are enabled for this course.\n\nRead-only.", + "type": "boolean" + }, + "courseState": { + "enumDescriptions": [ + "No course state. No returned Course message will use this value.", + "The course is active.", + "The course has been archived. You cannot modify it except to change it\nto a different state.", + "The course has been created, but not yet activated. It is accessible by\nthe primary teacher and domain administrators, who may modify it or\nchange it to the `ACTIVE` or `DECLINED` states.\nA course may only be changed to `PROVISIONED` if it is in the `DECLINED`\nstate.", + "The course has been created, but declined. It is accessible by the\ncourse owner and domain administrators, though it will not be\ndisplayed in the web UI. You cannot modify the course except to change it\nto the `PROVISIONED` state.\nA course may only be changed to `DECLINED` if it is in the `PROVISIONED`\nstate.", + "The course has been suspended. You cannot modify the course, and only the\nuser identified by the `owner_id` can view the course.\nA course may be placed in this state if it potentially violates the\nTerms of Service." + ], + "enum": [ + "COURSE_STATE_UNSPECIFIED", + "ACTIVE", + "ARCHIVED", + "PROVISIONED", + "DECLINED", + "SUSPENDED" + ], + "description": "State of the course.\nIf unspecified, the default state is `PROVISIONED`.", + "type": "string" + }, + "ownerId": { + "description": "The identifier of the owner of a course.\n\nWhen specified as a parameter of a\ncreate course request, this\nfield is required.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n\nThis must be set in a create request. Specifying this field in a course\nupdate mask results in an `INVALID_ARGUMENT` error.", + "type": "string" + } + } + }, + "DriveFile": { + "description": "Representation of a Google Drive file.", + "type": "object", + "properties": { + "id": { + "description": "Drive API resource ID.", + "type": "string" + }, + "title": { + "description": "Title of the Drive item.\n\nRead-only.", + "type": "string" + }, + "alternateLink": { + "description": "URL that can be used to access the Drive item.\n\nRead-only.", + "type": "string" + }, + "thumbnailUrl": { + "description": "URL of a thumbnail image of the Drive item.\n\nRead-only.", + "type": "string" + } + }, + "id": "DriveFile" + }, + "ReturnStudentSubmissionRequest": { + "description": "Request to return a student submission.", + "type": "object", + "properties": {}, + "id": "ReturnStudentSubmissionRequest" + }, + "GlobalPermission": { + "description": "Global user permission description.", + "type": "object", + "properties": { + "permission": { + "enumDescriptions": [ + "No permission is specified. This is not returned and is not a\nvalid value.", + "User is permitted to create a course." + ], + "enum": [ + "PERMISSION_UNSPECIFIED", + "CREATE_COURSE" + ], + "description": "Permission value.", + "type": "string" + } + }, + "id": "GlobalPermission" + }, + "Teacher": { + "description": "Teacher of a course.", + "type": "object", + "properties": { + "userId": { + "description": "Identifier of the user.\n\nWhen specified as a parameter of a request, this identifier can be one of\nthe following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + }, + "courseId": { + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" + }, + "profile": { + "$ref": "UserProfile", + "description": "Global user information for the teacher.\n\nRead-only." + } + }, + "id": "Teacher" + }, + "ReclaimStudentSubmissionRequest": { + "description": "Request to reclaim a student submission.", + "type": "object", + "properties": {}, + "id": "ReclaimStudentSubmissionRequest" + }, + "AssignmentSubmission": { + "description": "Student work for an assignment.", + "type": "object", + "properties": { + "attachments": { + "description": "Attachments added by the student.\nDrive files that correspond to materials with a share mode of\nSTUDENT_COPY may not exist yet if the student has not accessed the\nassignment in Classroom.\n\nSome attachment metadata is only populated if the requesting user has\npermission to access it. Identifier and alternate_link fields are always\navailable, but others (e.g. title) may not be.", + "type": "array", + "items": { + "$ref": "Attachment" + } + } + }, + "id": "AssignmentSubmission" + }, + "Material": { + "description": "Material attached to course work.\n\nWhen creating attachments, setting the `form` field is not supported.", + "type": "object", + "properties": { + "link": { + "$ref": "Link", + "description": "Link material. On creation, will be upgraded to a more appropriate type\nif possible, and this will be reflected in the response." + }, + "youtubeVideo": { + "description": "YouTube video material.", + "$ref": "YouTubeVideo" + }, + "driveFile": { + "$ref": "SharedDriveFile", + "description": "Google Drive file material." + }, + "form": { + "description": "Google Forms material.", + "$ref": "Form" + } + }, + "id": "Material" + }, + "CourseWork": { + "description": "Course work created by a teacher for students of the course.", + "type": "object", + "properties": { + "updateTime": { + "description": "Timestamp of the most recent change to this course work.\n\nRead-only.", + "format": "google-datetime", + "type": "string" + }, + "alternateLink": { + "description": "Absolute link to this course work in the Classroom web UI.\nThis is only populated if `state` is `PUBLISHED`.\n\nRead-only.", + "type": "string" + }, + "maxPoints": { + "description": "Maximum grade for this course work.\nIf zero or unspecified, this assignment is considered ungraded.\nThis must be a non-negative integer value.", + "format": "double", + "type": "number" + }, + "workType": { + "description": "Type of this course work.\n\nThe type is set when the course work is created and cannot be changed.", + "type": "string", + "enumDescriptions": [ + "No work type specified. This is never returned.", + "An assignment.", + "A short answer question.", + "A multiple-choice question." + ], + "enum": [ + "COURSE_WORK_TYPE_UNSPECIFIED", + "ASSIGNMENT", + "SHORT_ANSWER_QUESTION", + "MULTIPLE_CHOICE_QUESTION" + ] + }, + "multipleChoiceQuestion": { + "$ref": "MultipleChoiceQuestion", + "description": "Multiple choice question details.\nFor read operations, this field is populated only when `work_type` is\n`MULTIPLE_CHOICE_QUESTION`.\nFor write operations, this field must be specified when creating course\nwork with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be\nset otherwise." + }, + "assignment": { + "description": "Assignment details.\nThis is populated only when `work_type` is `ASSIGNMENT`.\n\nRead-only.", + "$ref": "Assignment" + }, + "description": { + "type": "string", + "description": "Optional description of this course work.\nIf set, the description must be a valid UTF-8 string containing no more\nthan 30,000 characters." + }, + "creationTime": { + "description": "Timestamp when this course work was created.\n\nRead-only.", + "format": "google-datetime", + "type": "string" + }, + "dueDate": { + "description": "Optional date, in UTC, that submissions for this this course work are due.\nThis must be specified if `due_time` is specified.", + "$ref": "Date" + }, + "state": { + "enumDescriptions": [ + "No state specified. This is never returned.", + "Status for work that has been published.\nThis is the default state.", + "Status for work that is not yet published.\nWork in this state is visible only to course teachers and domain\nadministrators.", + "Status for work that was published but is now deleted.\nWork in this state is visible only to course teachers and domain\nadministrators.\nWork in this state is deleted after some time." + ], + "enum": [ + "COURSE_WORK_STATE_UNSPECIFIED", + "PUBLISHED", + "DRAFT", + "DELETED" + ], + "description": "Status of this course work.\nIf unspecified, the default state is `DRAFT`.", + "type": "string" + }, + "submissionModificationMode": { + "enumDescriptions": [ + "No modification mode specified. This is never returned.", + "Submisisons can be modified before being turned in.", + "Submisisons can be modified at any time." + ], + "enum": [ + "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED", + "MODIFIABLE_UNTIL_TURNED_IN", + "MODIFIABLE" + ], + "description": "Setting to determine when students are allowed to modify submissions.\nIf unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.", + "type": "string" + }, + "courseId": { + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" + }, + "id": { + "description": "Classroom-assigned identifier of this course work, unique per course.\n\nRead-only.", + "type": "string" + }, + "dueTime": { + "description": "Optional time of day, in UTC, that submissions for this this course work\nare due.\nThis must be specified if `due_date` is specified.", + "$ref": "TimeOfDay" + }, + "title": { + "type": "string", + "description": "Title of this course work.\nThe title must be a valid UTF-8 string containing between 1 and 3000\ncharacters." + }, + "associatedWithDeveloper": { + "description": "Whether this course work item is associated with the Developer Console\nproject making the request.\n\nSee google.classroom.Work.CreateCourseWork for more\ndetails.\n\nRead-only.", + "type": "boolean" + }, + "materials": { + "description": "Additional materials.\n\nCourseWork must have no more than 20 material items.", + "type": "array", + "items": { + "$ref": "Material" + } + } + }, + "id": "CourseWork" + }, + "Guardian": { + "description": "Association between a student and a guardian of that student. The guardian\nmay receive information about the student's course work.", + "type": "object", + "properties": { + "guardianProfile": { + "$ref": "UserProfile", + "description": "User profile for the guardian." + }, + "studentId": { + "description": "Identifier for the student to whom the guardian relationship applies.", + "type": "string" + }, + "guardianId": { + "type": "string", + "description": "Identifier for the guardian." + }, + "invitedEmailAddress": { + "description": "The email address to which the initial guardian invitation was sent.\nThis field is only visible to domain administrators.", + "type": "string" + } + }, + "id": "Guardian" + }, + "UserProfile": { + "type": "object", + "properties": { + "photoUrl": { + "description": "URL of user's profile photo.\n\nRead-only.", + "type": "string" + }, + "permissions": { + "description": "Global permissions of the user.\n\nRead-only.", + "type": "array", + "items": { + "$ref": "GlobalPermission" + } + }, + "name": { + "description": "Name of the user.\n\nRead-only.", + "$ref": "Name" + }, + "id": { + "type": "string", + "description": "Identifier of the user.\n\nRead-only." + }, + "emailAddress": { + "description": "Email address of the user.\n\nRead-only.", + "type": "string" + } + }, + "id": "UserProfile", + "description": "Global information for a user." + }, + "ListStudentsResponse": { + "id": "ListStudentsResponse", + "description": "Response when listing students.", + "type": "object", + "properties": { + "students": { + "description": "Students who match the list request.", + "type": "array", + "items": { + "$ref": "Student" + } + }, + "nextPageToken": { + "type": "string", + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available." + } + } + }, + "Student": { + "description": "Student in a course.", + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Identifier of the user.\n\nWhen specified as a parameter of a request, this identifier can be one of\nthe following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user" + }, + "courseId": { + "type": "string", + "description": "Identifier of the course.\n\nRead-only." + }, + "profile": { + "description": "Global user information for the student.\n\nRead-only.", + "$ref": "UserProfile" + }, + "studentWorkFolder": { + "description": "Information about a Drive Folder for this student's work in this course.\nOnly visible to the student and domain administrators.\n\nRead-only.", + "$ref": "DriveFolder" + } + }, + "id": "Student" + }, + "Invitation": { + "description": "An invitation to join a course.", + "type": "object", + "properties": { + "id": { + "description": "Identifier assigned by Classroom.\n\nRead-only.", + "type": "string" + }, + "role": { + "description": "Role to invite the user to have.\nMust not be `COURSE_ROLE_UNSPECIFIED`.", + "type": "string", + "enumDescriptions": [ + "No course role.", + "Student in the course.", + "Teacher of the course." + ], + "enum": [ + "COURSE_ROLE_UNSPECIFIED", + "STUDENT", + "TEACHER" + ] + }, + "userId": { + "description": "Identifier of the invited user.\n\nWhen specified as a parameter of a request, this identifier can be set to\none of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + }, + "courseId": { + "description": "Identifier of the course to invite the user to.", + "type": "string" + } + }, + "id": "Invitation" + }, + "DriveFolder": { + "properties": { + "title": { + "description": "Title of the Drive folder.\n\nRead-only.", + "type": "string" + }, + "alternateLink": { + "description": "URL that can be used to access the Drive folder.\n\nRead-only.", + "type": "string" + }, + "id": { + "description": "Drive API resource ID.", + "type": "string" + } + }, + "id": "DriveFolder", + "description": "Representation of a Google Drive folder.", + "type": "object" + }, + "ShortAnswerSubmission": { + "type": "object", + "properties": { + "answer": { + "description": "Student response to a short-answer question.", + "type": "string" + } + }, + "id": "ShortAnswerSubmission", + "description": "Student work for a short answer question." + }, + "ListStudentSubmissionsResponse": { + "id": "ListStudentSubmissionsResponse", + "description": "Response when listing student submissions.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "studentSubmissions": { + "description": "Student work that matches the request.", + "type": "array", + "items": { + "$ref": "StudentSubmission" + } + } + } + }, + "StudentSubmission": { + "description": "Student submission for course work.\n\nStudentSubmission items are generated when a CourseWork item is created.\n\nStudentSubmissions that have never been accessed (i.e. with `state` = NEW)\nmay not have a creation time or update time.", + "type": "object", + "properties": { + "late": { + "description": "Whether this submission is late.\n\nRead-only.", + "type": "boolean" + }, + "draftGrade": { + "description": "Optional pending grade. If unset, no grade was set.\nThis must be a non-negative integer value.\n\nThis is only visible to and modifiable by course teachers.", + "format": "double", + "type": "number" + }, + "courseWorkType": { + "description": "Type of course work this submission is for.\n\nRead-only.", + "type": "string", + "enumDescriptions": [ + "No work type specified. This is never returned.", + "An assignment.", + "A short answer question.", + "A multiple-choice question." + ], + "enum": [ + "COURSE_WORK_TYPE_UNSPECIFIED", + "ASSIGNMENT", + "SHORT_ANSWER_QUESTION", + "MULTIPLE_CHOICE_QUESTION" + ] + }, + "creationTime": { + "description": "Creation time of this submission.\nThis may be unset if the student has not accessed this item.\n\nRead-only.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "type": "string", + "enumDescriptions": [ + "No state specified. This should never be returned.", + "The student has never accessed this submission. Attachments are not\nreturned and timestamps is not set.", + "Has been created.", + "Has been turned in to the teacher.", + "Has been returned to the student.", + "Student chose to \"unsubmit\" the assignment." + ], + "enum": [ "SUBMISSION_STATE_UNSPECIFIED", "NEW", "CREATED", "TURNED_IN", "RETURNED", "RECLAIMED_BY_STUDENT" - ], - "repeated": true, - "location": "query" - }, - "late": { - "type": "string", - "description": "Requested lateness value. If specified, returned student submissions are restricted by the requested value. If unspecified, submissions are returned regardless of `late` value.", - "enum": [ - "LATE_VALUES_UNSPECIFIED", - "LATE_ONLY", - "NOT_LATE_ONLY" - ], - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.", - "location": "query" - } - }, - "parameterOrder": [ - "courseId", - "courseWorkId" - ], - "response": { - "$ref": "ListStudentSubmissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.me.readonly", - "https://www.googleapis.com/auth/classroom.coursework.students", - "https://www.googleapis.com/auth/classroom.coursework.students.readonly", - "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly", - "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly" - ] + ], + "description": "State of this submission.\n\nRead-only." }, - "turnIn": { - "id": "classroom.courses.courseWork.studentSubmissions.turnIn", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn", - "httpMethod": "POST", - "description": "Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "courseWorkId": { - "type": "string", - "description": "Identifier of the course work.", - "required": true, - "location": "path" - }, - "id": { - "type": "string", - "description": "Identifier of the student submission.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "request": { - "$ref": "TurnInStudentSubmissionRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me" - ] + "userId": { + "description": "Identifier for the student that owns this submission.\n\nRead-only.", + "type": "string" }, - "reclaim": { - "id": "classroom.courses.courseWork.studentSubmissions.reclaim", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", - "httpMethod": "POST", - "description": "Reclaims a student submission on behalf of the student that owns it. Reclaiming a student submission transfers ownership of attached Drive files to the student and update the submission state. Only the student that ownes the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. * `FAILED_PRECONDITION` if the student submission has not been turned in. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "courseWorkId": { - "type": "string", - "description": "Identifier of the course work.", - "required": true, - "location": "path" - }, - "id": { - "type": "string", - "description": "Identifier of the student submission.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "request": { - "$ref": "ReclaimStudentSubmissionRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me" - ] + "courseWorkId": { + "description": "Identifier for the course work this corresponds to.\n\nRead-only.", + "type": "string" }, - "return": { - "id": "classroom.courses.courseWork.studentSubmissions.return", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return", - "httpMethod": "POST", - "description": "Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "courseWorkId": { - "type": "string", - "description": "Identifier of the course work.", - "required": true, - "location": "path" - }, - "id": { - "type": "string", - "description": "Identifier of the student submission.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "request": { - "$ref": "ReturnStudentSubmissionRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.students" - ] + "courseId": { + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" }, - "modifyAttachments": { - "id": "classroom.courses.courseWork.studentSubmissions.modifyAttachments", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments", - "httpMethod": "POST", - "description": "Modifies attachments of student submission. Attachments may only be added to student submissions whose type is `ASSIGNMENT`. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.", - "parameters": { - "courseId": { - "type": "string", - "description": "Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.", - "required": true, - "location": "path" - }, - "courseWorkId": { - "type": "string", - "description": "Identifier of the course work.", - "required": true, - "location": "path" - }, - "id": { - "type": "string", - "description": "Identifier of the student submission.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "request": { - "$ref": "ModifyAttachmentsRequest" - }, - "response": { - "$ref": "StudentSubmission" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.students" - ] + "id": { + "description": "Classroom-assigned Identifier for the student submission.\nThis is unique among submissions for the relevant course work.\n\nRead-only.", + "type": "string" + }, + "assignedGrade": { + "description": "Optional grade. If unset, no grade was set.\nThis must be a non-negative integer value.\n\nThis may be modified only by course teachers.", + "format": "double", + "type": "number" + }, + "multipleChoiceSubmission": { + "description": "Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION.", + "$ref": "MultipleChoiceSubmission" + }, + "assignmentSubmission": { + "$ref": "AssignmentSubmission", + "description": "Submission content when course_work_type is ASSIGNMENT ." + }, + "associatedWithDeveloper": { + "description": "Whether this student submission is associated with the Developer Console\nproject making the request.\n\nSee google.classroom.Work.CreateCourseWork for more\ndetails.\n\nRead-only.", + "type": "boolean" + }, + "shortAnswerSubmission": { + "$ref": "ShortAnswerSubmission", + "description": "Submission content when course_work_type is SHORT_ANSWER_QUESTION." + }, + "updateTime": { + "description": "Last update time of this submission.\nThis may be unset if the student has not accessed this item.\n\nRead-only.", + "format": "google-datetime", + "type": "string" + }, + "alternateLink": { + "description": "Absolute link to the submission in the Classroom web UI.\n\nRead-only.", + "type": "string" } - } - } - } - } - } - }, - "userProfiles": { - "methods": { - "get": { - "id": "classroom.userProfiles.get", - "path": "v1/userProfiles/{userId}", - "httpMethod": "GET", - "description": "Returns a user profile. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access this user profile or if no profile exists with the requested ID or for access errors.", - "parameters": { - "userId": { - "type": "string", - "description": "Identifier of the profile to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "userId" - ], - "response": { - "$ref": "UserProfile" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ] - } - }, - "resources": { - "guardianInvitations": { - "methods": { - "list": { - "id": "classroom.userProfiles.guardianInvitations.list", - "path": "v1/userProfiles/{studentId}/guardianInvitations", - "httpMethod": "GET", - "description": "Returns a list of guardian invitations that the requesting user is permitted to view, filtered by the parameters provided. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian invitations for that student, if `\"-\"` is specified as the `student_id` and the user is not a domain administrator, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` or `state` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student.", - "parameters": { + }, + "id": "StudentSubmission" + }, + "TurnInStudentSubmissionRequest": { + "description": "Request to turn in a student submission.", + "type": "object", + "properties": {}, + "id": "TurnInStudentSubmissionRequest" + }, + "ListCourseWorkResponse": { + "properties": { + "courseWork": { + "description": "Course work items that match the request.", + "type": "array", + "items": { + "$ref": "CourseWork" + } + }, + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + } + }, + "id": "ListCourseWorkResponse", + "description": "Response when listing course work.", + "type": "object" + }, + "ModifyAttachmentsRequest": { + "description": "Request to modify the attachments of a student submission.", + "type": "object", + "properties": { + "addAttachments": { + "description": "Attachments to add.\nA student submission may not have more than 20 attachments.\n\nForm attachments are not supported.", + "type": "array", + "items": { + "$ref": "Attachment" + } + } + }, + "id": "ModifyAttachmentsRequest" + }, + "YouTubeVideo": { + "description": "YouTube video item.", + "type": "object", + "properties": { + "alternateLink": { + "description": "URL that can be used to view the YouTube video.\n\nRead-only.", + "type": "string" + }, + "thumbnailUrl": { + "description": "URL of a thumbnail image of the YouTube video.\n\nRead-only.", + "type": "string" + }, + "id": { + "description": "YouTube API resource ID.", + "type": "string" + }, + "title": { + "description": "Title of the YouTube video.\n\nRead-only.", + "type": "string" + } + }, + "id": "YouTubeVideo" + }, + "ListInvitationsResponse": { + "description": "Response when listing invitations.", + "type": "object", + "properties": { + "invitations": { + "description": "Invitations that match the list request.", + "type": "array", + "items": { + "$ref": "Invitation" + } + }, + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + } + }, + "id": "ListInvitationsResponse" + }, + "GuardianInvitation": { + "description": "An invitation to become the guardian of a specified user, sent to a specified\nemail address.", + "type": "object", + "properties": { "studentId": { - "type": "string", - "description": "The ID of the student whose guardian invitations are to be returned. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user * the string literal `\"-\"`, indicating that results should be returned for all students that the requesting user is permitted to view guardian invitations.", - "required": true, - "location": "path" + "description": "ID of the student (in standard format)", + "type": "string" + }, + "state": { + "description": "The state that this invitation is in.", + "type": "string", + "enumDescriptions": [ + "Should never be returned.", + "The invitation is active and awaiting a response.", + "The invitation is no longer active. It may have been accepted, declined,\nwithdrawn or it may have expired." + ], + "enum": [ + "GUARDIAN_INVITATION_STATE_UNSPECIFIED", + "PENDING", + "COMPLETE" + ] }, "invitedEmailAddress": { - "type": "string", - "description": "If specified, only results with the specified `invited_email_address` will be returned.", - "location": "query" + "description": "Email address that the invitation was sent to.\nThis field is only visible to domain administrators.", + "type": "string" }, - "states": { - "type": "string", - "description": "If specified, only results with the specified `state` values will be returned. Otherwise, results with a `state` of `PENDING` will be returned.", - "enum": [ - "GUARDIAN_INVITATION_STATE_UNSPECIFIED", - "PENDING", - "COMPLETE" - ], - "repeated": true, - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.", - "format": "int32", - "location": "query" - } - }, - "parameterOrder": [ - "studentId" - ], - "response": { - "$ref": "ListGuardianInvitationsResponse" - } - }, - "get": { - "id": "classroom.userProfiles.guardianInvitations.get", - "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", - "httpMethod": "GET", - "description": "Returns a specific guardian invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian invitations for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of the given student or `invitation_id`. May also be returned if the student exists, but the requesting user does not have access to see that student.", - "parameters": { - "studentId": { - "type": "string", - "description": "The ID of the student whose guardian invitation is being requested.", - "required": true, - "location": "path" + "creationTime": { + "type": "string", + "description": "The time that this invitation was created.\n\nRead-only.", + "format": "google-datetime" }, "invitationId": { - "type": "string", - "description": "The `id` field of the `GuardianInvitation` being requested.", - "required": true, - "location": "path" + "description": "Unique identifier for this invitation.\n\nRead-only.", + "type": "string" } - }, - "parameterOrder": [ - "studentId", - "invitationId" - ], - "response": { - "$ref": "GuardianInvitation" - } }, - "create": { - "id": "classroom.userProfiles.guardianInvitations.create", - "path": "v1/userProfiles/{studentId}/guardianInvitations", - "httpMethod": "POST", - "description": "Creates a guardian invitation, and sends an email to the guardian asking them to confirm that they are the student's guardian. Once the guardian accepts the invitation, their `state` will change to `COMPLETED` and they will start receiving guardian notifications. A `Guardian` resource will also be created to represent the active guardian. The request object must have the `student_id` and `invited_email_address` fields set. Failing to set these fields, or setting any other fields in the request, will result in an error. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if the guardian in question has already rejected too many requests for that student, if guardians are not enabled for the domain in question, or for other access errors. * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link limit. * `INVALID_ARGUMENT` if the guardian email address is not valid (for example, if it is too long), or if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API). This error will also be returned if read-only fields are set, or if the `state` field is set to to a value other than `PENDING`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student. * `ALREADY_EXISTS` if there is already a pending guardian invitation for the student and `invited_email_address` provided, or if the provided `invited_email_address` matches the Google account of an existing `Guardian` for this user.", - "parameters": { - "studentId": { - "type": "string", - "description": "ID of the student (in standard format)", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "studentId" - ], - "request": { - "$ref": "GuardianInvitation" - }, - "response": { - "$ref": "GuardianInvitation" - } - }, - "patch": { - "id": "classroom.userProfiles.guardianInvitations.patch", - "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", - "httpMethod": "PATCH", - "description": "Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other access errors. * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom.", - "parameters": { - "studentId": { - "type": "string", - "description": "The ID of the student whose guardian invitation is to be modified.", - "required": true, - "location": "path" - }, - "invitationId": { - "type": "string", - "description": "The `id` field of the `GuardianInvitation` to be modified.", - "required": true, - "location": "path" - }, - "updateMask": { - "type": "string", - "description": "Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `state` When set in a query parameter, this field should be specified as `updateMask=,,...`", - "location": "query" - } - }, - "parameterOrder": [ - "studentId", - "invitationId" - ], - "request": { - "$ref": "GuardianInvitation" - }, - "response": { - "$ref": "GuardianInvitation" - } - } - } + "id": "GuardianInvitation" }, - "guardians": { - "methods": { - "list": { - "id": "classroom.userProfiles.guardians.list", - "path": "v1/userProfiles/{studentId}/guardians", - "httpMethod": "GET", - "description": "Returns a list of guardians that the requesting user is permitted to view, restricted to those that match the request. To list guardians for any student that the requesting user may view guardians for, use the literal character `-` for the student ID. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian information for that student, if `\"-\"` is specified as the `student_id` and the user is not a domain administrator, if guardians are not enabled for the domain in question, if the `invited_email_address` filter is set by a user who is not a domain administrator, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student.", - "parameters": { - "studentId": { - "type": "string", - "description": "Filter results by the student who the guardian is linked to. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user * the string literal `\"-\"`, indicating that results should be returned for all students that the requesting user has access to view.", - "required": true, - "location": "path" + "Attachment": { + "description": "Attachment added to student assignment work.\n\nWhen creating attachments, setting the `form` field is not supported.", + "type": "object", + "properties": { + "driveFile": { + "$ref": "DriveFile", + "description": "Google Drive file attachment." }, - "invitedEmailAddress": { - "type": "string", - "description": "Filter results by the email address that the original invitation was sent to, resulting in this guardian link. This filter can only be used by domain administrators.", - "location": "query" + "youTubeVideo": { + "description": "Youtube video attachment.", + "$ref": "YouTubeVideo" }, - "pageToken": { - "type": "string", - "description": "nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.", - "location": "query" + "form": { + "description": "Google Forms attachment.", + "$ref": "Form" }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.", - "format": "int32", - "location": "query" + "link": { + "$ref": "Link", + "description": "Link attachment." } - }, - "parameterOrder": [ - "studentId" - ], - "response": { - "$ref": "ListGuardiansResponse" - } }, - "get": { - "id": "classroom.userProfiles.guardians.get", - "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", - "httpMethod": "GET", - "description": "Returns a specific guardian. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian information for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of the given student or `guardian_id`, or if the guardian has been disabled.", - "parameters": { - "studentId": { - "type": "string", - "description": "The student whose guardian is being requested. One of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "required": true, - "location": "path" + "id": "Attachment" + }, + "CourseMaterialSet": { + "description": "A set of materials that appears on the \"About\" page of the course.\nThese materials might include a syllabus, schedule, or other background\ninformation relating to the course as a whole.", + "type": "object", + "properties": { + "title": { + "description": "Title for this set.", + "type": "string" }, - "guardianId": { - "type": "string", - "description": "The `id` field from a `Guardian`.", - "required": true, - "location": "path" + "materials": { + "description": "Materials attached to this set.", + "type": "array", + "items": { + "$ref": "CourseMaterial" + } } - }, - "parameterOrder": [ - "studentId", - "guardianId" - ], - "response": { - "$ref": "Guardian" - } }, - "delete": { - "id": "classroom.userProfiles.guardians.delete", - "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", - "httpMethod": "DELETE", - "description": "Deletes a guardian. The guardian will no longer receive guardian notifications and the guardian will no longer be accessible via the API. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to manage guardians for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API). * `NOT_FOUND` if Classroom cannot find any record of the given `student_id` or `guardian_id`, or if the guardian has already been disabled.", - "parameters": { - "studentId": { - "type": "string", - "description": "The student whose guardian is to be deleted. One of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "required": true, - "location": "path" + "id": "CourseMaterialSet" + }, + "TimeOfDay": { + "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "hours": { + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" }, - "guardianId": { - "type": "string", - "description": "The `id` field from a `Guardian`.", - "required": true, - "location": "path" + "nanos": { + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + } + }, + "id": "TimeOfDay" + }, + "ListCoursesResponse": { + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "courses": { + "description": "Courses that match the list request.", + "type": "array", + "items": { + "$ref": "Course" + } + } + }, + "id": "ListCoursesResponse", + "description": "Response when listing courses.", + "type": "object" + }, + "Form": { + "type": "object", + "properties": { + "title": { + "description": "Title of the Form.\n\nRead-only.", + "type": "string" + }, + "thumbnailUrl": { + "description": "URL of a thumbnail image of the Form.\n\nRead-only.", + "type": "string" + }, + "responseUrl": { + "description": "URL of the form responses document.\nOnly set if respsonses have been recorded and only when the\nrequesting user is an editor of the form.\n\nRead-only.", + "type": "string" + }, + "formUrl": { + "description": "URL of the form.", + "type": "string" + } + }, + "id": "Form", + "description": "Google Forms item." + }, + "ListTeachersResponse": { + "id": "ListTeachersResponse", + "description": "Response when listing teachers.", + "type": "object", + "properties": { + "teachers": { + "description": "Teachers who match the list request.", + "type": "array", + "items": { + "$ref": "Teacher" + } + }, + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" } - }, - "parameterOrder": [ - "studentId", - "guardianId" - ], - "response": { - "$ref": "Empty" - } } - } + }, + "Link": { + "description": "URL item.", + "type": "object", + "properties": { + "url": { + "description": "URL to link to.\nThis must be a valid UTF-8 string containing between 1 and 2024 characters.", + "type": "string" + }, + "title": { + "description": "Title of the target of the URL.\n\nRead-only.", + "type": "string" + }, + "thumbnailUrl": { + "description": "URL of a thumbnail image of the target URL.\n\nRead-only.", + "type": "string" + } + }, + "id": "Link" + }, + "ListGuardiansResponse": { + "description": "Response when listing guardians.", + "type": "object", + "properties": { + "guardians": { + "description": "Guardians on this page of results that met the criteria specified in\nthe request.", + "type": "array", + "items": { + "$ref": "Guardian" + } + }, + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + } + }, + "id": "ListGuardiansResponse" + }, + "CourseAlias": { + "description": "Alternative identifier for a course.\n\nAn alias uniquely identifies a course. It must be unique within one of the\nfollowing scopes:\n\n* domain: A domain-scoped alias is visible to all users within the alias\ncreator's domain and can be created only by a domain admin. A domain-scoped\nalias is often used when a course has an identifier external to Classroom.\n\n* project: A project-scoped alias is visible to any request from an\napplication using the Developer Console project ID that created the alias\nand can be created by any project. A project-scoped alias is often used when\nan application has alternative identifiers. A random value can also be used\nto avoid duplicate courses in the event of transmission failures, as retrying\na request will return `ALREADY_EXISTS` if a previous one has succeeded.", + "type": "object", + "properties": { + "alias": { + "description": "Alias string. The format of the string indicates the desired alias scoping.\n\n* `d:\u003cname\u003e` indicates a domain-scoped alias.\n Example: `d:math_101`\n* `p:\u003cname\u003e` indicates a project-scoped alias.\n Example: `p:abc123`\n\nThis field has a maximum length of 256 characters.", + "type": "string" + } + }, + "id": "CourseAlias" + }, + "ListCourseAliasesResponse": { + "description": "Response when listing course aliases.", + "type": "object", + "properties": { + "aliases": { + "description": "The course aliases.", + "type": "array", + "items": { + "$ref": "CourseAlias" + } + }, + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + } + }, + "id": "ListCourseAliasesResponse" + }, + "ListGuardianInvitationsResponse": { + "description": "Response when listing guardian invitations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "guardianInvitations": { + "description": "Guardian invitations that matched the list request.", + "type": "array", + "items": { + "$ref": "GuardianInvitation" + } + } + }, + "id": "ListGuardianInvitationsResponse" + }, + "Date": { + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "year": { + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "format": "int32", + "type": "integer" + }, + "day": { + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of year. Must be from 1 to 12.", + "format": "int32", + "type": "integer" + } + }, + "id": "Date" + }, + "MultipleChoiceSubmission": { + "description": "Student work for a multiple-choice question.", + "type": "object", + "properties": { + "answer": { + "type": "string", + "description": "Student's select choice." + } + }, + "id": "MultipleChoiceSubmission" + }, + "CourseMaterial": { + "type": "object", + "properties": { + "driveFile": { + "$ref": "DriveFile", + "description": "Google Drive file attachment." + }, + "youTubeVideo": { + "$ref": "YouTubeVideo", + "description": "Youtube video attachment." + }, + "form": { + "description": "Google Forms attachment.", + "$ref": "Form" + }, + "link": { + "$ref": "Link", + "description": "Link atatchment." + } + }, + "id": "CourseMaterial", + "description": "A material attached to a course as part of a material set." + }, + "Name": { + "id": "Name", + "description": "Details of the user's name.", + "type": "object", + "properties": { + "givenName": { + "description": "The user's first name.\n\nRead-only.", + "type": "string" + }, + "familyName": { + "description": "The user's last name.\n\nRead-only.", + "type": "string" + }, + "fullName": { + "description": "The user's full name formed by concatenating the first and last name\nvalues.\n\nRead-only.", + "type": "string" + } + } + }, + "Assignment": { + "type": "object", + "properties": { + "studentWorkFolder": { + "$ref": "DriveFolder", + "description": "Drive folder where attachments from student submissions are placed.\nThis is only populated for course teachers." + } + }, + "id": "Assignment", + "description": "Additional details for assignments." + }, + "SharedDriveFile": { + "description": "Drive file that is used as material for course work.", + "type": "object", + "properties": { + "driveFile": { + "$ref": "DriveFile", + "description": "Drive file details." + }, + "shareMode": { + "description": "Mechanism by which students access the Drive item.", + "type": "string", + "enumDescriptions": [ + "No sharing mode specified. This should never be returned.", + "Students can view the shared file.", + "Students can edit the shared file.", + "Students have a personal copy of the shared file." + ], + "enum": [ + "UNKNOWN_SHARE_MODE", + "VIEW", + "EDIT", + "STUDENT_COPY" + ] + } + }, + "id": "SharedDriveFile" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "MultipleChoiceQuestion": { + "description": "Additional details for multiple-choice questions.", + "type": "object", + "properties": { + "choices": { + "description": "Possible choices.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "MultipleChoiceQuestion" } - } }, - "invitations": { - "methods": { - "create": { - "id": "classroom.invitations.create", - "path": "v1/invitations", - "httpMethod": "POST", - "description": "Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create invitations for this course or for access errors. * `NOT_FOUND` if the course or the user does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled or if the user already has this role or a role with greater permissions. * `ALREADY_EXISTS` if an invitation for the specified user and course already exists.", - "request": { - "$ref": "Invitation" - }, - "response": { - "$ref": "Invitation" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ] - }, - "get": { - "id": "classroom.invitations.get", - "path": "v1/invitations/{id}", - "httpMethod": "GET", - "description": "Returns an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view the requested invitation or for access errors. * `NOT_FOUND` if no invitation exists with the requested ID.", - "parameters": { - "id": { - "type": "string", - "description": "Identifier of the invitation to return.", - "required": true, - "location": "path" + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "version": "v1", + "baseUrl": "https://classroom.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly": { + "description": "View your course work and grades in Google Classroom" + }, + "https://www.googleapis.com/auth/classroom.coursework.students": { + "description": "Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer" + }, + "https://www.googleapis.com/auth/classroom.coursework.students.readonly": { + "description": "View course work and grades for students in the Google Classroom classes you teach or administer" + }, + "https://www.googleapis.com/auth/classroom.coursework.me.readonly": { + "description": "View your course work and grades in Google Classroom" + }, + "https://www.googleapis.com/auth/classroom.profile.emails": { + "description": "View the email addresses of people in your classes" + }, + "https://www.googleapis.com/auth/classroom.coursework.me": { + "description": "Manage your course work and view your grades in Google Classroom" + }, + "https://www.googleapis.com/auth/classroom.rosters": { + "description": "Manage your Google Classroom class rosters" + }, + "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly": { + "description": "View course work and grades for students in the Google Classroom classes you teach or administer" + }, + "https://www.googleapis.com/auth/classroom.courses": { + "description": "Manage your Google Classroom classes" + }, + "https://www.googleapis.com/auth/classroom.courses.readonly": { + "description": "View your Google Classroom classes" + }, + "https://www.googleapis.com/auth/classroom.rosters.readonly": { + "description": "View your Google Classroom class rosters" + }, + "https://www.googleapis.com/auth/classroom.profile.photos": { + "description": "View the profile photos of people in your classes" + } } - }, - "parameterOrder": [ - "id" - ], - "response": { - "$ref": "Invitation" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ] - }, - "delete": { - "id": "classroom.invitations.delete", - "path": "v1/invitations/{id}", - "httpMethod": "DELETE", - "description": "Deletes an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested invitation or for access errors. * `NOT_FOUND` if no invitation exists with the requested ID.", - "parameters": { - "id": { - "type": "string", - "description": "Identifier of the invitation to delete.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "id" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ] - }, - "list": { - "id": "classroom.invitations.list", - "path": "v1/invitations", - "httpMethod": "GET", - "description": "Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request. *Note:* At least one of `user_id` or `course_id` must be supplied. Both fields can be supplied. This method returns the following error codes: * `PERMISSION_DENIED` for access errors.", - "parameters": { - "userId": { - "type": "string", - "description": "Restricts returned invitations to those for a specific user. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `\"me\"`, indicating the requesting user", - "location": "query" - }, - "courseId": { - "type": "string", - "description": "Restricts returned invitations to those for a course with the specified identifier.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.", - "location": "query" - } - }, - "response": { - "$ref": "ListInvitationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ] - }, - "accept": { - "id": "classroom.invitations.accept", - "path": "v1/invitations/{id}:accept", - "httpMethod": "POST", - "description": "Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to accept the requested invitation or for access errors. * `FAILED_PRECONDITION` for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `NOT_FOUND` if no invitation exists with the requested ID.", - "parameters": { - "id": { - "type": "string", - "description": "Identifier of the invitation to accept.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "id" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ] } - } } - } } diff --git a/etc/api/cloudbilling/v1/cloudbilling-api.json b/etc/api/cloudbilling/v1/cloudbilling-api.json index 91cb0eb321..ee9670772f 100644 --- a/etc/api/cloudbilling/v1/cloudbilling-api.json +++ b/etc/api/cloudbilling/v1/cloudbilling-api.json @@ -1,343 +1,357 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/M2VzqGfwqR0FviWkPggfCzE5zZU\"", - "discoveryVersion": "v1", - "id": "cloudbilling:v1", - "name": "cloudbilling", - "version": "v1", - "revision": "20151222", - "title": "Google Cloud Billing API", - "description": "Retrieves Google Developers Console billing accounts and associates them with projects.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/billing/", - "protocol": "rest", - "baseUrl": "https://cloudbilling.googleapis.com/", - "basePath": "", - "rootUrl": "https://cloudbilling.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "schemas": { - "BillingAccount": { - "id": "BillingAccount", - "type": "object", - "description": "A billing account in [Google Developers Console](https://console.developers.google.com/). You can assign a billing account to one or more projects.", - "properties": { - "name": { - "type": "string", - "description": "The resource name of the billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF` would be the resource name for billing account `012345-567890-ABCDEF`." - }, - "open": { - "type": "boolean", - "description": "True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services." - }, - "displayName": { - "type": "string", - "description": "The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Developers Console." - } - } - }, - "ListBillingAccountsResponse": { - "id": "ListBillingAccountsResponse", - "type": "object", - "description": "Response message for `ListBillingAccounts`.", - "properties": { - "billingAccounts": { - "type": "array", - "description": "A list of billing accounts.", - "items": { - "$ref": "BillingAccount" - } - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results. To retrieve the next page, call `ListBillingAccounts` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve." - } - } - }, - "ListProjectBillingInfoResponse": { - "id": "ListProjectBillingInfoResponse", - "type": "object", - "description": "Request message for `ListProjectBillingInfoResponse`.", - "properties": { - "projectBillingInfo": { - "type": "array", - "description": "A list of `ProjectBillingInfo` resources representing the projects associated with the billing account.", - "items": { - "$ref": "ProjectBillingInfo" - } - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results. To retrieve the next page, call `ListProjectBillingInfo` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve." - } - } - }, - "ProjectBillingInfo": { - "id": "ProjectBillingInfo", - "type": "object", - "description": "Encapsulation of billing information for a Developers Console project. A project has at most one associated billing account at a time (but a billing account can be assigned to multiple projects).", - "properties": { - "name": { - "type": "string", - "description": "The resource name for the `ProjectBillingInfo`; has the form `projects/{project_id}/billingInfo`. For example, the resource name for the billing information for project `tokyo-rain-123` would be `projects/tokyo-rain-123/billingInfo`. This field is read-only." - }, - "projectId": { - "type": "string", - "description": "The ID of the project that this `ProjectBillingInfo` represents, such as `tokyo-rain-123`. This is a convenience field so that you don't need to parse the `name` field to obtain a project ID. This field is read-only." - }, - "billingAccountName": { - "type": "string", - "description": "The resource name of the billing account associated with the project, if any. For example, `billingAccounts/012345-567890-ABCDEF`." - }, - "billingEnabled": { - "type": "boolean", - "description": "True if the project is associated with an open billing account, to which usage on the project is charged. False if the project is associated with a closed billing account, or no billing account at all, and therefore cannot use paid services. This field is read-only." - } - } - } - }, - "resources": { - "billingAccounts": { - "methods": { - "get": { - "id": "cloudbilling.billingAccounts.get", - "path": "v1/{+name}", - "httpMethod": "GET", - "description": "Gets information about a billing account. The current authenticated user must be an [owner of the billing account](https://support.google.com/cloud/answer/4430947).", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the billing account to retrieve. For example, `billingAccounts/012345-567890-ABCDEF`.", - "required": true, - "pattern": "^billingAccounts/[^/]*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "BillingAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "cloudbilling.billingAccounts.list", - "path": "v1/billingAccounts", - "httpMethod": "GET", - "description": "Lists the billing accounts that the current authenticated user [owns](https://support.google.com/cloud/answer/4430947).", - "parameters": { - "pageSize": { - "type": "integer", - "description": "Requested page size. The maximum page size is 100; this is also the default.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListBillingAccounts` call. If unspecified, the first page of results is returned.", - "location": "query" - } - }, - "response": { - "$ref": "ListBillingAccountsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "projects": { - "methods": { - "list": { - "id": "cloudbilling.billingAccounts.projects.list", - "path": "v1/{+name}/projects", - "httpMethod": "GET", - "description": "Lists the projects associated with a billing account. The current authenticated user must be an [owner of the billing account](https://support.google.com/cloud/answer/4430947).", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the billing account associated with the projects that you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.", - "required": true, - "pattern": "^billingAccounts/[^/]*$", - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Requested page size. The maximum page size is 100; this is also the default.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous `ListProjectBillingInfo` call. If unspecified, the first page of results is returned.", - "location": "query" + "id": "cloudbilling:v1", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListProjectBillingInfoResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } - } } - } }, - "projects": { - "methods": { - "getBillingInfo": { - "id": "cloudbilling.projects.getBillingInfo", - "path": "v1/{+name}/billingInfo", - "httpMethod": "GET", - "description": "Gets the billing information for a project. The current authenticated user must have [permission to view the project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ).", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the project for which billing information is retrieved. For example, `projects/tokyo-rain-123`.", - "required": true, - "pattern": "^projects/[^/]*$", - "location": "path" + "description": "Allows developers to manage billing for their Google Cloud Platform projects\n programmatically.", + "protocol": "rest", + "title": "Google Cloud Billing API", + "resources": { + "projects": { + "methods": { + "updateBillingInfo": { + "id": "cloudbilling.projects.updateBillingInfo", + "response": { + "$ref": "ProjectBillingInfo" + }, + "parameterOrder": [ + "name" + ], + "description": "Sets or updates the billing account associated with a project. You specify\nthe new billing account by setting the `billing_account_name` in the\n`ProjectBillingInfo` resource to the resource name of a billing account.\nAssociating a project with an open billing account enables billing on the\nproject and allows charges for resource usage. If the project already had a\nbilling account, this method changes the billing account used for resource\nusage charges.\n\n*Note:* Incurred charges that have not yet been reported in the transaction\nhistory of the Google Cloud Console may be billed to the new billing\naccount, even if the charge occurred before the new billing account was\nassigned to the project.\n\nThe current authenticated user must have ownership privileges for both the\n[project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo\n) and the [billing\naccount](https://support.google.com/cloud/answer/4430947).\n\nYou can disable billing on the project by setting the\n`billing_account_name` field to empty. This action disassociates the\ncurrent billing account from the project. Any billable activity of your\nin-use services will stop, and your application could stop functioning as\nexpected. Any unbilled charges to date will be billed to the previously\nassociated account. The current authenticated user must be either an owner\nof the project or an owner of the billing account for the project.\n\nNote that associating a project with a *closed* billing account will have\nmuch the same effect as disabling billing on the project: any paid\nresources used by the project will be shut down. Thus, unless you wish to\ndisable billing, you should always call this method with the name of an\n*open* billing account.", + "request": { + "$ref": "ProjectBillingInfo" + }, + "flatPath": "v1/projects/{projectsId}/billingInfo", + "httpMethod": "PUT", + "parameters": { + "name": { + "description": "The resource name of the project associated with the billing information\nthat you want to update. For example, `projects/tokyo-rain-123`.", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path", + "type": "string" + } + }, + "path": "v1/{+name}/billingInfo", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getBillingInfo": { + "id": "cloudbilling.projects.getBillingInfo", + "response": { + "$ref": "ProjectBillingInfo" + }, + "parameterOrder": [ + "name" + ], + "description": "Gets the billing information for a project. The current authenticated user\nmust have [permission to view the\nproject](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo\n).", + "flatPath": "v1/projects/{projectsId}/billingInfo", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The resource name of the project for which billing information is\nretrieved. For example, `projects/tokyo-rain-123`.", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path", + "type": "string" + } + }, + "path": "v1/{+name}/billingInfo", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ProjectBillingInfo" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "updateBillingInfo": { - "id": "cloudbilling.projects.updateBillingInfo", - "path": "v1/{+name}/billingInfo", - "httpMethod": "PUT", - "description": "Sets or updates the billing account associated with a project. You specify the new billing account by setting the `billing_account_name` in the `ProjectBillingInfo` resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges. *Note:* Incurred charges that have not yet been reported in the transaction history of the Google Developers Console may be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project. The current authenticated user must have ownership privileges for both the [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing account](https://support.google.com/cloud/answer/4430947). You can disable billing on the project by setting the `billing_account_name` field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project. Note that associating a project with a *closed* billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an *open* billing account.", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the project associated with the billing information that you want to update. For example, `projects/tokyo-rain-123`.", - "required": true, - "pattern": "^projects/[^/]*$", - "location": "path" + "billingAccounts": { + "resources": { + "projects": { + "methods": { + "list": { + "id": "cloudbilling.billingAccounts.projects.list", + "response": { + "$ref": "ListProjectBillingInfoResponse" + }, + "parameterOrder": [ + "name" + ], + "description": "Lists the projects associated with a billing account. The current\nauthenticated user must be an [owner of the billing\naccount](https://support.google.com/cloud/answer/4430947).", + "flatPath": "v1/billingAccounts/{billingAccountsId}/projects", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Requested page size. The maximum page size is 100; this is also the\ndefault.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "name": { + "description": "The resource name of the billing account associated with the projects that\nyou want to list. For example, `billingAccounts/012345-567890-ABCDEF`.", + "required": true, + "pattern": "^billingAccounts/[^/]+$", + "location": "path", + "type": "string" + }, + "pageToken": { + "description": "A token identifying a page of results to be returned. This should be a\n`next_page_token` value returned from a previous `ListProjectBillingInfo`\ncall. If unspecified, the first page of results is returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/projects", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + }, + "methods": { + "get": { + "id": "cloudbilling.billingAccounts.get", + "response": { + "$ref": "BillingAccount" + }, + "parameterOrder": [ + "name" + ], + "description": "Gets information about a billing account. The current authenticated user\nmust be an [owner of the billing\naccount](https://support.google.com/cloud/answer/4430947).", + "flatPath": "v1/billingAccounts/{billingAccountsId}", + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The resource name of the billing account to retrieve. For example,\n`billingAccounts/012345-567890-ABCDEF`.", + "required": true, + "pattern": "^billingAccounts/[^/]+$", + "location": "path", + "type": "string" + } + }, + "path": "v1/{+name}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "id": "cloudbilling.billingAccounts.list", + "response": { + "$ref": "ListBillingAccountsResponse" + }, + "parameterOrder": [], + "description": "Lists the billing accounts that the current authenticated user\n[owns](https://support.google.com/cloud/answer/4430947).", + "flatPath": "v1/billingAccounts", + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Requested page size. The maximum page size is 100; this is also the\ndefault.", + "location": "query", + "type": "integer", + "format": "int32" + }, + "pageToken": { + "description": "A token identifying a page of results to return. This should be a\n`next_page_token` value returned from a previous `ListBillingAccounts`\ncall. If unspecified, the first page of results is returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1/billingAccounts", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "ProjectBillingInfo" - }, - "response": { - "$ref": "ProjectBillingInfo" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } - } - } - } + }, + "schemas": { + "ProjectBillingInfo": { + "description": "Encapsulation of billing information for a Cloud Console project. A project\nhas at most one associated billing account at a time (but a billing account\ncan be assigned to multiple projects).", + "type": "object", + "properties": { + "billingEnabled": { + "description": "True if the project is associated with an open billing account, to which\nusage on the project is charged. False if the project is associated with a\nclosed billing account, or no billing account at all, and therefore cannot\nuse paid services. This field is read-only.", + "type": "boolean" + }, + "name": { + "description": "The resource name for the `ProjectBillingInfo`; has the form\n`projects/{project_id}/billingInfo`. For example, the resource name for the\nbilling information for project `tokyo-rain-123` would be\n`projects/tokyo-rain-123/billingInfo`. This field is read-only.", + "type": "string" + }, + "projectId": { + "description": "The ID of the project that this `ProjectBillingInfo` represents, such as\n`tokyo-rain-123`. This is a convenience field so that you don't need to\nparse the `name` field to obtain a project ID. This field is read-only.", + "type": "string" + }, + "billingAccountName": { + "description": "The resource name of the billing account associated with the project, if\nany. For example, `billingAccounts/012345-567890-ABCDEF`.", + "type": "string" + } + }, + "id": "ProjectBillingInfo" + }, + "ListProjectBillingInfoResponse": { + "description": "Request message for `ListProjectBillingInfoResponse`.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListProjectBillingInfo` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.", + "type": "string" + }, + "projectBillingInfo": { + "description": "A list of `ProjectBillingInfo` resources representing the projects\nassociated with the billing account.", + "type": "array", + "items": { + "$ref": "ProjectBillingInfo" + } + } + }, + "id": "ListProjectBillingInfoResponse" + }, + "ListBillingAccountsResponse": { + "description": "Response message for `ListBillingAccounts`.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListBillingAccounts` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.", + "type": "string" + }, + "billingAccounts": { + "description": "A list of billing accounts.", + "type": "array", + "items": { + "$ref": "BillingAccount" + } + } + }, + "id": "ListBillingAccountsResponse" + }, + "BillingAccount": { + "description": "A billing account in [Google Cloud\nConsole](https://console.cloud.google.com/). You can assign a billing account\nto one or more projects.", + "type": "object", + "properties": { + "displayName": { + "description": "The display name given to the billing account, such as `My Billing\nAccount`. This name is displayed in the Google Cloud Console.", + "type": "string" + }, + "open": { + "description": "True if the billing account is open, and will therefore be charged for any\nusage on associated projects. False if the billing account is closed, and\ntherefore projects associated with it will be unable to use paid services.", + "type": "boolean" + }, + "name": { + "description": "The resource name of the billing account. The resource name has the form\n`billingAccounts/{billing_account_id}`. For example,\n`billingAccounts/012345-567890-ABCDEF` would be the resource name for\nbilling account `012345-567890-ABCDEF`.", + "type": "string" + } + }, + "id": "BillingAccount" + } + }, + "revision": "20170504", + "basePath": "", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "discoveryVersion": "v1", + "baseUrl": "https://cloudbilling.googleapis.com/", + "name": "cloudbilling", + "parameters": { + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "key": { + "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", + "location": "query" + }, + "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" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "alt": { + "description": "Data format for response.", + "location": "query", + "enum": [ + "json", + "media", + "proto" + ], + "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" + ], + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "type": "string", + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + } + }, + "documentationLink": "https://cloud.google.com/billing/", + "ownerDomain": "google.com", + "batchPath": "batch", + "servicePath": "", + "ownerName": "Google", + "version": "v1", + "rootUrl": "https://cloudbilling.googleapis.com/", + "kind": "discovery#restDescription" } diff --git a/etc/api/cloudbuild/v1/cloudbuild-api.json b/etc/api/cloudbuild/v1/cloudbuild-api.json index 92a04aa4ff..fff0ef57f0 100644 --- a/etc/api/cloudbuild/v1/cloudbuild-api.json +++ b/etc/api/cloudbuild/v1/cloudbuild-api.json @@ -1,436 +1,496 @@ { - "id": "cloudbuild:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "description": "Builds container images in the cloud.", - "protocol": "rest", - "title": "Google Cloud Container Builder API", + "ownerName": "Google", "resources": { - "projects": { - "resources": { - "triggers": { - "methods": { - "create": { - "id": "cloudbuild.projects.triggers.create", - "response": { - "$ref": "BuildTrigger" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Creates a new BuildTrigger.\n\nThis API is experimental.", - "request": { - "$ref": "BuildTrigger" - }, - "flatPath": "v1/projects/{projectId}/triggers", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "ID of the project for which to configure automatic builds.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}/triggers", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "cloudbuild.projects.triggers.get", - "response": { - "$ref": "BuildTrigger" - }, - "parameterOrder": [ - "projectId", - "triggerId" - ], - "description": "Gets information about a BuildTrigger.\n\nThis API is experimental.", - "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", - "httpMethod": "GET", - "parameters": { - "projectId": { - "description": "ID of the project that owns the trigger.", - "required": true, - "location": "path", - "type": "string" - }, - "triggerId": { - "description": "ID of the BuildTrigger to get.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}/triggers/{triggerId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "cloudbuild.projects.triggers.list", - "response": { - "$ref": "ListBuildTriggersResponse" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Lists existing BuildTrigger.\n\nThis API is experimental.", - "flatPath": "v1/projects/{projectId}/triggers", - "httpMethod": "GET", - "parameters": { - "projectId": { - "description": "ID of the project for which to list BuildTriggers.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}/triggers", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "cloudbuild.projects.triggers.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId", - "triggerId" - ], - "description": "Deletes an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental.", - "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", - "httpMethod": "DELETE", - "parameters": { - "projectId": { - "description": "ID of the project that owns the trigger.", - "required": true, - "location": "path", - "type": "string" - }, - "triggerId": { - "description": "ID of the BuildTrigger to delete.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}/triggers/{triggerId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "id": "cloudbuild.projects.triggers.patch", - "response": { - "$ref": "BuildTrigger" - }, - "parameterOrder": [ - "projectId", - "triggerId" - ], - "description": "Updates an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental.", - "request": { - "$ref": "BuildTrigger" - }, - "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", - "httpMethod": "PATCH", - "parameters": { - "projectId": { - "description": "ID of the project that owns the trigger.", - "required": true, - "location": "path", - "type": "string" - }, - "triggerId": { - "description": "ID of the BuildTrigger to update.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}/triggers/{triggerId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "builds": { - "methods": { - "create": { - "id": "cloudbuild.projects.builds.create", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Starts a build with the specified configuration.\n\nThe long-running Operation returned by this method will include the ID of\nthe build, which can be passed to GetBuild to determine its status (e.g.,\nsuccess or failure).", - "request": { - "$ref": "Build" - }, - "flatPath": "v1/projects/{projectId}/builds", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "ID of the project.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}/builds", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "cloudbuild.projects.builds.get", - "response": { - "$ref": "Build" - }, - "parameterOrder": [ - "projectId", - "id" - ], - "description": "Returns information about a previously requested build.\n\nThe Build that is returned includes its status (e.g., success or failure,\nor in-progress), and timing information.", - "flatPath": "v1/projects/{projectId}/builds/{id}", - "httpMethod": "GET", - "parameters": { - "projectId": { - "description": "ID of the project.", - "required": true, - "location": "path", - "type": "string" - }, - "id": { - "description": "ID of the build.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}/builds/{id}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "cloudbuild.projects.builds.list", - "response": { - "$ref": "ListBuildsResponse" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Lists previously requested builds.\n\nPreviously requested builds may still be in-progress, or may have finished\nsuccessfully or unsuccessfully.", - "flatPath": "v1/projects/{projectId}/builds", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Number of results to return in the list.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "The raw filter text to constrain the results.", - "location": "query", - "type": "string" - }, - "projectId": { - "description": "ID of the project.", - "required": true, - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Token to provide to skip to a particular spot in the list.", - "location": "query", - "type": "string" - } - }, - "path": "v1/projects/{projectId}/builds", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "cancel": { - "id": "cloudbuild.projects.builds.cancel", - "response": { - "$ref": "Build" - }, - "parameterOrder": [ - "projectId", - "id" - ], - "description": "Cancels a requested build in progress.", - "request": { - "$ref": "CancelBuildRequest" - }, - "flatPath": "v1/projects/{projectId}/builds/{id}:cancel", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "ID of the project.", - "required": true, - "location": "path", - "type": "string" - }, - "id": { - "description": "ID of the build.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}/builds/{id}:cancel", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, "operations": { "methods": { + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "name": { + "required": true, + "type": "string", + "pattern": "^operations$", + "location": "path", + "description": "The name of the operation collection." + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "The standard list page token." + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1/operations", + "id": "cloudbuild.operations.list", + "path": "v1/{+name}", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`." + }, "get": { + "path": "v1/{+name}", "id": "cloudbuild.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", "response": { "$ref": "Operation" }, "parameterOrder": [ "name" ], - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "flatPath": "v1/operations/{operationsId}", "httpMethod": "GET", "parameters": { "name": { + "location": "path", "description": "The name of the operation resource.", "required": true, - "pattern": "^operations/.+$", - "location": "path", - "type": "string" + "type": "string", + "pattern": "^operations/.+$" } }, - "path": "v1/{+name}", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "cloudbuild.operations.list", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "name" ], - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`.", - "flatPath": "v1/operations", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "The standard list page size.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation collection.", - "required": true, - "pattern": "^operations$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "flatPath": "v1/operations/{operationsId}" }, "cancel": { + "flatPath": "v1/operations/{operationsId}:cancel", "id": "cloudbuild.operations.cancel", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "path": "v1/{+name}:cancel", "request": { "$ref": "CancelOperationRequest" }, - "flatPath": "v1/operations/{operationsId}:cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, "parameters": { "name": { - "description": "The name of the operation resource to be cancelled.", - "required": true, "pattern": "^operations/.+$", "location": "path", + "description": "The name of the operation resource to be cancelled.", + "required": true, "type": "string" } }, - "path": "v1/{+name}:cancel", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] } } - } - }, - "schemas": { - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" + }, + "projects": { + "resources": { + "builds": { + "methods": { + "cancel": { + "request": { + "$ref": "CancelBuildRequest" + }, + "description": "Cancels a requested build in progress.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "id" + ], + "response": { + "$ref": "Build" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "ID of the project.", + "required": true, + "type": "string" + }, + "id": { + "description": "ID of the build.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/builds/{id}:cancel", + "id": "cloudbuild.projects.builds.cancel", + "path": "v1/projects/{projectId}/builds/{id}:cancel" }, - "type": "object" + "get": { + "response": { + "$ref": "Build" + }, + "parameterOrder": [ + "projectId", + "id" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "location": "path", + "description": "ID of the project.", + "required": true, + "type": "string" + }, + "id": { + "location": "path", + "description": "ID of the build.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/builds/{id}", + "path": "v1/projects/{projectId}/builds/{id}", + "id": "cloudbuild.projects.builds.get", + "description": "Returns information about a previously requested build.\n\nThe Build that is returned includes its status (e.g., success or failure,\nor in-progress), and timing information." + }, + "list": { + "response": { + "$ref": "ListBuildsResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "description": "The raw filter text to constrain the results.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "Token to provide to skip to a particular spot in the list.", + "type": "string" + }, + "pageSize": { + "description": "Number of results to return in the list.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "ID of the project.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/builds", + "path": "v1/projects/{projectId}/builds", + "id": "cloudbuild.projects.builds.list", + "description": "Lists previously requested builds.\n\nPreviously requested builds may still be in-progress, or may have finished\nsuccessfully or unsuccessfully." + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "ID of the project.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/builds", + "path": "v1/projects/{projectId}/builds", + "id": "cloudbuild.projects.builds.create", + "description": "Starts a build with the specified configuration.\n\nThe long-running Operation returned by this method will include the ID of\nthe build, which can be passed to GetBuild to determine its status (e.g.,\nsuccess or failure).", + "request": { + "$ref": "Build" + } + } } }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" + "triggers": { + "methods": { + "create": { + "flatPath": "v1/projects/{projectId}/triggers", + "path": "v1/projects/{projectId}/triggers", + "id": "cloudbuild.projects.triggers.create", + "description": "Creates a new BuildTrigger.\n\nThis API is experimental.", + "request": { + "$ref": "BuildTrigger" + }, + "response": { + "$ref": "BuildTrigger" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "ID of the project for which to configure automatic builds.", + "required": true, + "type": "string" + } + } + }, + "delete": { + "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", + "path": "v1/projects/{projectId}/triggers/{triggerId}", + "id": "cloudbuild.projects.triggers.delete", + "description": "Deletes an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental.", + "response": { + "$ref": "Empty" + }, + "httpMethod": "DELETE", + "parameterOrder": [ + "projectId", + "triggerId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "triggerId": { + "location": "path", + "description": "ID of the BuildTrigger to delete.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "ID of the project that owns the trigger.", + "required": true, + "type": "string", + "location": "path" + } + } + }, + "get": { + "description": "Gets information about a BuildTrigger.\n\nThis API is experimental.", + "response": { + "$ref": "BuildTrigger" + }, + "parameterOrder": [ + "projectId", + "triggerId" + ], + "httpMethod": "GET", + "parameters": { + "triggerId": { + "location": "path", + "description": "ID of the BuildTrigger to get.", + "required": true, + "type": "string" + }, + "projectId": { + "required": true, + "type": "string", + "location": "path", + "description": "ID of the project that owns the trigger." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", + "path": "v1/projects/{projectId}/triggers/{triggerId}", + "id": "cloudbuild.projects.triggers.get" + }, + "list": { + "description": "Lists existing BuildTrigger.\n\nThis API is experimental.", + "response": { + "$ref": "ListBuildTriggersResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "ID of the project for which to list BuildTriggers.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/triggers", + "path": "v1/projects/{projectId}/triggers", + "id": "cloudbuild.projects.triggers.list" + }, + "patch": { + "request": { + "$ref": "BuildTrigger" + }, + "description": "Updates an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental.", + "response": { + "$ref": "BuildTrigger" + }, + "parameterOrder": [ + "projectId", + "triggerId" + ], + "httpMethod": "PATCH", + "parameters": { + "triggerId": { + "description": "ID of the BuildTrigger to update.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "ID of the project that owns the trigger.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", + "path": "v1/projects/{projectId}/triggers/{triggerId}", + "id": "cloudbuild.projects.triggers.patch" + } + } } - }, - "id": "Status" + } + } + }, + "parameters": { + "quotaUser": { + "location": "query", + "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" }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "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", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://cloudbuild.googleapis.com/", + "description": "Builds container images in the cloud.", + "kind": "discovery#restDescription", + "servicePath": "", + "basePath": "", + "revision": "20170522", + "documentationLink": "https://cloud.google.com/container-builder/docs/", + "id": "cloudbuild:v1", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { "BuildOperationMetadata": { "description": "Metadata for build operations.", "type": "object", @@ -442,159 +502,493 @@ }, "id": "BuildOperationMetadata" }, - "Source": { - "description": "Source describes the location of the source in a supported storage\nservice.", - "type": "object", - "properties": { - "storageSource": { - "description": "If provided, get the source from this location in in Google Cloud\nStorage.", - "$ref": "StorageSource" - }, - "repoSource": { - "description": "If provided, get source from this location in a Cloud Repo.", - "$ref": "RepoSource" - } - }, - "id": "Source" - }, "SourceProvenance": { "description": "Provenance of the source. Ways to find the original source, or verify that\nsome source was used for this build.", "type": "object", "properties": { "resolvedRepoSource": { - "description": "A copy of the build's source.repo_source, if exists, with any\nrevisions resolved.", - "$ref": "RepoSource" + "$ref": "RepoSource", + "description": "A copy of the build's source.repo_source, if exists, with any\nrevisions resolved." }, "resolvedStorageSource": { - "description": "A copy of the build's source.storage_source, if exists, with any\ngenerations resolved.", - "$ref": "StorageSource" + "$ref": "StorageSource", + "description": "A copy of the build's source.storage_source, if exists, with any\ngenerations resolved." }, "fileHashes": { - "description": "Hash(es) of the build source, which can be used to verify that the original\nsource integrity was maintained in the build. Note that FileHashes will\nonly be populated if BuildOptions has requested a SourceProvenanceHash.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(.tar.gz), the FileHash will be for the single path to that file.\n@OutputOnly", "additionalProperties": { "$ref": "FileHashes" }, + "description": "Hash(es) of the build source, which can be used to verify that the original\nsource integrity was maintained in the build. Note that FileHashes will\nonly be populated if BuildOptions has requested a SourceProvenanceHash.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(.tar.gz), the FileHash will be for the single path to that file.\n@OutputOnly", "type": "object" } }, "id": "SourceProvenance" }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - } - }, - "id": "Operation" - }, - "BuildTrigger": { - "description": "Configuration for an automated build in response to source repository\nchanges.", - "type": "object", - "properties": { - "id": { - "description": "Unique identifier of the trigger.\n\n@OutputOnly", - "type": "string" - }, - "description": { - "description": "Human-readable description of this trigger.", - "type": "string" - }, - "triggerTemplate": { - "description": "Template describing the types of source changes to trigger a build.\n\nBranch and tag names in trigger templates are interpreted as regular\nexpressions. Any branch or tag change that matches that regular expression\nwill trigger a build.", - "$ref": "RepoSource" - }, - "disabled": { - "description": "If true, the trigger will never result in a build.", - "type": "boolean" - }, - "createTime": { - "description": "Time when the trigger was created.\n\n@OutputOnly", - "type": "string", - "format": "google-datetime" - }, - "filename": { - "description": "Path, from the source root, to a file whose contents is used for the\ntemplate.", - "type": "string" - }, - "build": { - "description": "Contents of the build template.", - "$ref": "Build" - } - }, - "id": "BuildTrigger" - }, - "BuiltImage": { - "description": "BuiltImage describes an image built by the pipeline.", - "type": "object", - "properties": { - "digest": { - "description": "Docker Registry 2.0 digest.", - "type": "string" - }, - "name": { - "description": "Name used to push the container image to Google Container Registry, as\npresented to `docker push`.", - "type": "string" - } - }, - "id": "BuiltImage" - }, - "Hash": { - "description": "Container message for hash values.", - "type": "object", - "properties": { - "value": { - "description": "The hash value.", - "type": "string", - "format": "byte" - }, - "type": { - "description": "The type of hash that was performed.", - "enum": [ - "NONE", - "SHA256" - ], - "enumDescriptions": [ - "No hash requested.", - "Use a sha256 hash." - ], - "type": "string" - } - }, - "id": "Hash" - }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "type": "object", "properties": {}, "id": "CancelOperationRequest" }, + "ListBuildTriggersResponse": { + "id": "ListBuildTriggersResponse", + "description": "Response containing existing BuildTriggers.", + "type": "object", + "properties": { + "triggers": { + "description": "BuildTriggers for the project, sorted by create_time descending.", + "type": "array", + "items": { + "$ref": "BuildTrigger" + } + } + } + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`." + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any." + } + }, + "id": "Operation" + }, + "BuiltImage": { + "description": "BuiltImage describes an image built by the pipeline.", + "type": "object", + "properties": { + "name": { + "description": "Name used to push the container image to Google Container Registry, as\npresented to `docker push`.", + "type": "string" + }, + "digest": { + "description": "Docker Registry 2.0 digest.", + "type": "string" + } + }, + "id": "BuiltImage" + }, + "BuildStep": { + "description": "BuildStep describes a step to perform in the build pipeline.", + "type": "object", + "properties": { + "entrypoint": { + "description": "Optional entrypoint to be used instead of the build step image's default\nIf unset, the image's default will be used.", + "type": "string" + }, + "id": { + "description": "Optional unique identifier for this build step, used in wait_for to\nreference this build step as a dependency.", + "type": "string" + }, + "dir": { + "description": "Working directory (relative to project source root) to use when running\nthis operation's container.", + "type": "string" + }, + "waitFor": { + "description": "The ID(s) of the step(s) that this build step depends on.\nThis build step will not start until all the build steps in wait_for\nhave completed successfully. If wait_for is empty, this build step will\nstart when all previous build steps in the Build.Steps list have completed\nsuccessfully.", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of environment variable definitions to be used when running a step.\n\nThe elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\"\nbeing given the value \"VALUE\"." + }, + "args": { + "description": "A list of arguments that will be presented to the step when it is started.\n\nIf the image used to run the step's container has an entrypoint, these args\nwill be used as arguments to that entrypoint. If the image does not define\nan entrypoint, the first element in args will be used as the entrypoint,\nand the remainder will be used as arguments.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "The name of the container image that will run this particular build step.\n\nIf the image is already available in the host's Docker daemon's cache, it\nwill be run directly. If not, the host will attempt to pull the image\nfirst, using the builder service account's credentials if necessary.\n\nThe Docker daemon's cache will already have the latest versions of all of\nthe officially supported build steps\n([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).\nThe Docker daemon will also have cached many of the layers for some popular\nimages, like \"ubuntu\", \"debian\", but they will be refreshed at the time you\nattempt to use them.\n\nIf you built an image in a previous build step, it will be stored in the\nhost's Docker daemon's cache and is available to use as the name for a\nlater build step.", + "type": "string" + } + }, + "id": "BuildStep" + }, + "RepoSource": { + "id": "RepoSource", + "description": "RepoSource describes the location of the source in a Google Cloud Source\nRepository.", + "type": "object", + "properties": { + "projectId": { + "description": "ID of the project that owns the repo. If omitted, the project ID requesting\nthe build is assumed.", + "type": "string" + }, + "repoName": { + "type": "string", + "description": "Name of the repo. If omitted, the name \"default\" is assumed." + }, + "branchName": { + "description": "Name of the branch to build.", + "type": "string" + }, + "tagName": { + "description": "Name of the tag to build.", + "type": "string" + }, + "commitSha": { + "description": "Explicit commit SHA to build.", + "type": "string" + } + } + }, + "Hash": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enumDescriptions": [ + "No hash requested.", + "Use a sha256 hash." + ], + "enum": [ + "NONE", + "SHA256" + ], + "description": "The type of hash that was performed." + }, + "value": { + "description": "The hash value.", + "format": "byte", + "type": "string" + } + }, + "id": "Hash", + "description": "Container message for hash values." + }, + "FileHashes": { + "properties": { + "fileHash": { + "type": "array", + "items": { + "$ref": "Hash" + }, + "description": "Collection of file hashes." + } + }, + "id": "FileHashes", + "description": "Container message for hashes of byte content of files, used in\nSourceProvenance messages to verify integrity of source input to the build.", + "type": "object" + }, + "Status": { + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + }, + "details": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use." + } + }, + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "BuildTrigger": { + "description": "Configuration for an automated build in response to source repository\nchanges.", + "type": "object", + "properties": { + "substitutions": { + "additionalProperties": { + "type": "string" + }, + "description": "Substitutions data for Build resource.", + "type": "object" + }, + "description": { + "description": "Human-readable description of this trigger.", + "type": "string" + }, + "disabled": { + "description": "If true, the trigger will never result in a build.", + "type": "boolean" + }, + "createTime": { + "type": "string", + "description": "Time when the trigger was created.\n\n@OutputOnly", + "format": "google-datetime" + }, + "triggerTemplate": { + "$ref": "RepoSource", + "description": "Template describing the types of source changes to trigger a build.\n\nBranch and tag names in trigger templates are interpreted as regular\nexpressions. Any branch or tag change that matches that regular expression\nwill trigger a build." + }, + "filename": { + "description": "Path, from the source root, to a file whose contents is used for the\ntemplate.", + "type": "string" + }, + "id": { + "description": "Unique identifier of the trigger.\n\n@OutputOnly", + "type": "string" + }, + "build": { + "$ref": "Build", + "description": "Contents of the build template." + } + }, + "id": "BuildTrigger" + }, + "Build": { + "description": "A build resource in the Container Builder API.\n\nAt a high level, a Build describes where to find source code, how to build\nit (for example, the builder image to run on the source), and what tag to\napply to the built image when it is pushed to Google Container Registry.\n\nFields can include the following variables which will be expanded when the\nbuild is created:\n\n- $PROJECT_ID: the project ID of the build.\n- $BUILD_ID: the autogenerated ID of the build.\n- $REPO_NAME: the source repository name specified by RepoSource.\n- $BRANCH_NAME: the branch name specified by RepoSource.\n- $TAG_NAME: the tag name specified by RepoSource.\n- $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or\n resolved from the specified branch or tag.", + "type": "object", + "properties": { + "logsBucket": { + "description": "Google Cloud Storage bucket where logs should be written (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nLogs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.", + "type": "string" + }, + "results": { + "$ref": "Results", + "description": "Results of the build.\n@OutputOnly" + }, + "steps": { + "description": "Describes the operations to be performed on the workspace.", + "type": "array", + "items": { + "$ref": "BuildStep" + } + }, + "buildTriggerId": { + "description": "The ID of the BuildTrigger that triggered this build, if it was\ntriggered automatically.\n@OutputOnly", + "type": "string" + }, + "id": { + "description": "Unique identifier of the build.\n@OutputOnly", + "type": "string" + }, + "tags": { + "description": "Tags for annotation of a Build. These are not docker tags.", + "type": "array", + "items": { + "type": "string" + } + }, + "startTime": { + "description": "Time at which execution of the build was started.\n@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "substitutions": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Substitutions data for Build resource." + }, + "createTime": { + "description": "Time at which the request to create the build was received.\n@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "sourceProvenance": { + "$ref": "SourceProvenance", + "description": "A permanent fixed identifier for source.\n@OutputOnly" + }, + "images": { + "description": "A list of images to be pushed upon the successful completion of all build\nsteps.\n\nThe images will be pushed using the builder service account's credentials.\n\nThe digests of the pushed images will be stored in the Build resource's\nresults field.\n\nIf any of the images fail to be pushed, the build is marked FAILURE.", + "type": "array", + "items": { + "type": "string" + } + }, + "projectId": { + "description": "ID of the project.\n@OutputOnly.", + "type": "string" + }, + "finishTime": { + "description": "Time at which execution of the build was finished.\n\nThe difference between finish_time and start_time is the duration of the\nbuild's execution.\n@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "logUrl": { + "description": "URL to logs for this build in Google Cloud Logging.\n@OutputOnly", + "type": "string" + }, + "source": { + "$ref": "Source", + "description": "Describes where to find the source files to build." + }, + "options": { + "description": "Special options for this build.", + "$ref": "BuildOptions" + }, + "statusDetail": { + "description": "Customer-readable message about the current status.\n@OutputOnly", + "type": "string" + }, + "status": { + "type": "string", + "enumDescriptions": [ + "Status of the build is unknown.", + "Build is queued; work has not yet begun.", + "Build is being executed.", + "Build finished successfully.", + "Build failed to complete successfully.", + "Build failed due to an internal cause.", + "Build took longer than was allowed.", + "Build was canceled by a user." + ], + "enum": [ + "STATUS_UNKNOWN", + "QUEUED", + "WORKING", + "SUCCESS", + "FAILURE", + "INTERNAL_ERROR", + "TIMEOUT", + "CANCELLED" + ], + "description": "Status of the build.\n@OutputOnly" + }, + "timeout": { + "description": "Amount of time that this build should be allowed to run, to second\ngranularity. If this amount of time elapses, work on the build will cease\nand the build status will be TIMEOUT.\n\nDefault time is ten minutes.", + "format": "google-duration", + "type": "string" + } + }, + "id": "Build" + }, + "CancelBuildRequest": { + "description": "Request to cancel an ongoing build.", + "type": "object", + "properties": {}, + "id": "CancelBuildRequest" + }, + "ListBuildsResponse": { + "id": "ListBuildsResponse", + "description": "Response including listed builds.", + "type": "object", + "properties": { + "builds": { + "description": "Builds will be sorted by create_time, descending.", + "type": "array", + "items": { + "$ref": "Build" + } + }, + "nextPageToken": { + "description": "Token to receive the next page of results.", + "type": "string" + } + } + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } + } + }, + "id": "ListOperationsResponse" + }, + "Source": { + "description": "Source describes the location of the source in a supported storage\nservice.", + "type": "object", + "properties": { + "repoSource": { + "$ref": "RepoSource", + "description": "If provided, get source from this location in a Cloud Repo." + }, + "storageSource": { + "description": "If provided, get the source from this location in in Google Cloud\nStorage.", + "$ref": "StorageSource" + } + }, + "id": "Source" + }, + "BuildOptions": { + "description": "Optional arguments to enable specific features of builds.", + "type": "object", + "properties": { + "requestedVerifyOption": { + "type": "string", + "enumDescriptions": [ + "Not a verifiable build. (default)", + "Verified build." + ], + "enum": [ + "NOT_VERIFIED", + "VERIFIED" + ], + "description": "Requested verifiability options." + }, + "sourceProvenanceHash": { + "enumDescriptions": [ + "No hash requested.", + "Use a sha256 hash." + ], + "description": "Requested hash for SourceProvenance.", + "type": "array", + "items": { + "enum": [ + "NONE", + "SHA256" + ], + "type": "string" + } + } + }, + "id": "BuildOptions" + }, "StorageSource": { "description": "StorageSource describes the location of the source in an archive file in\nGoogle Cloud Storage.", "type": "object", @@ -603,14 +997,14 @@ "description": "Google Cloud Storage bucket containing source (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", "type": "string" }, - "generation": { - "description": "Google Cloud Storage generation for the object. If the generation is\nomitted, the latest generation will be used.", - "type": "string", - "format": "int64" - }, "object": { "description": "Google Cloud Storage object containing source.\n\nThis object must be a gzipped archive file (.tar.gz) containing source to\nbuild.", "type": "string" + }, + "generation": { + "description": "Google Cloud Storage generation for the object. If the generation is\nomitted, the latest generation will be used.", + "format": "int64", + "type": "string" } }, "id": "StorageSource" @@ -635,395 +1029,26 @@ } }, "id": "Results" - }, - "Build": { - "description": "A build resource in the Container Builder API.\n\nAt a high level, a Build describes where to find source code, how to build\nit (for example, the builder image to run on the source), and what tag to\napply to the built image when it is pushed to Google Container Registry.\n\nFields can include the following variables which will be expanded when the\nbuild is created:\n\n- $PROJECT_ID: the project ID of the build.\n- $BUILD_ID: the autogenerated ID of the build.\n- $REPO_NAME: the source repository name specified by RepoSource.\n- $BRANCH_NAME: the branch name specified by RepoSource.\n- $TAG_NAME: the tag name specified by RepoSource.\n- $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or\n resolved from the specified branch or tag.", - "type": "object", - "properties": { - "id": { - "description": "Unique identifier of the build.\n@OutputOnly", - "type": "string" - }, - "sourceProvenance": { - "description": "A permanent fixed identifier for source.\n@OutputOnly", - "$ref": "SourceProvenance" - }, - "results": { - "description": "Results of the build.\n@OutputOnly", - "$ref": "Results" - }, - "status": { - "description": "Status of the build.\n@OutputOnly", - "enum": [ - "STATUS_UNKNOWN", - "QUEUED", - "WORKING", - "SUCCESS", - "FAILURE", - "INTERNAL_ERROR", - "TIMEOUT", - "CANCELLED" - ], - "enumDescriptions": [ - "Status of the build is unknown.", - "Build is queued; work has not yet begun.", - "Build is being executed.", - "Build finished successfully.", - "Build failed to complete successfully.", - "Build failed due to an internal cause.", - "Build took longer than was allowed.", - "Build was canceled by a user." - ], - "type": "string" - }, - "options": { - "description": "Special options for this build.", - "$ref": "BuildOptions" - }, - "finishTime": { - "description": "Time at which execution of the build was finished.\n\nThe difference between finish_time and start_time is the duration of the\nbuild's execution.\n@OutputOnly", - "type": "string", - "format": "google-datetime" - }, - "timeout": { - "description": "Amount of time that this build should be allowed to run, to second\ngranularity. If this amount of time elapses, work on the build will cease\nand the build status will be TIMEOUT.\n\nDefault time is ten minutes.", - "type": "string", - "format": "google-duration" - }, - "steps": { - "description": "Describes the operations to be performed on the workspace.", - "type": "array", - "items": { - "$ref": "BuildStep" - } - }, - "source": { - "description": "Describes where to find the source files to build.", - "$ref": "Source" - }, - "createTime": { - "description": "Time at which the request to create the build was received.\n@OutputOnly", - "type": "string", - "format": "google-datetime" - }, - "logUrl": { - "description": "URL to logs for this build in Google Cloud Logging.\n@OutputOnly", - "type": "string" - }, - "statusDetail": { - "description": "Customer-readable message about the current status.\n@OutputOnly", - "type": "string" - }, - "images": { - "description": "A list of images to be pushed upon the successful completion of all build\nsteps.\n\nThe images will be pushed using the builder service account's credentials.\n\nThe digests of the pushed images will be stored in the Build resource's\nresults field.\n\nIf any of the images fail to be pushed, the build is marked FAILURE.", - "type": "array", - "items": { - "type": "string" - } - }, - "startTime": { - "description": "Time at which execution of the build was started.\n@OutputOnly", - "type": "string", - "format": "google-datetime" - }, - "buildTriggerId": { - "description": "The ID of the BuildTrigger that triggered this build, if it was\ntriggered automatically.\n@OutputOnly", - "type": "string" - }, - "logsBucket": { - "description": "Google Cloud Storage bucket where logs should be written (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nLogs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.", - "type": "string" - }, - "projectId": { - "description": "ID of the project.\n@OutputOnly.", - "type": "string" - } - }, - "id": "Build" - }, - "ListBuildTriggersResponse": { - "description": "Response containing existing BuildTriggers.", - "type": "object", - "properties": { - "triggers": { - "description": "BuildTriggers for the project, sorted by create_time descending.", - "type": "array", - "items": { - "$ref": "BuildTrigger" - } - } - }, - "id": "ListBuildTriggersResponse" - }, - "CancelBuildRequest": { - "description": "Request to cancel an ongoing build.", - "type": "object", - "properties": {}, - "id": "CancelBuildRequest" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "type": "array", - "items": { - "$ref": "Operation" - } - } - }, - "id": "ListOperationsResponse" - }, - "FileHashes": { - "description": "Container message for hashes of byte content of files, used in\nSourceProvenance messages to verify integrity of source input to the build.", - "type": "object", - "properties": { - "fileHash": { - "description": "Collection of file hashes.", - "type": "array", - "items": { - "$ref": "Hash" - } - } - }, - "id": "FileHashes" - }, - "RepoSource": { - "description": "RepoSource describes the location of the source in a Google Cloud Source\nRepository.", - "type": "object", - "properties": { - "repoName": { - "description": "Name of the repo. If omitted, the name \"default\" is assumed.", - "type": "string" - }, - "tagName": { - "description": "Name of the tag to build.", - "type": "string" - }, - "projectId": { - "description": "ID of the project that owns the repo. If omitted, the project ID requesting\nthe build is assumed.", - "type": "string" - }, - "branchName": { - "description": "Name of the branch to build.", - "type": "string" - }, - "commitSha": { - "description": "Explicit commit SHA to build.", - "type": "string" - } - }, - "id": "RepoSource" - }, - "BuildStep": { - "description": "BuildStep describes a step to perform in the build pipeline.", - "type": "object", - "properties": { - "id": { - "description": "Optional unique identifier for this build step, used in wait_for to\nreference this build step as a dependency.", - "type": "string" - }, - "env": { - "description": "A list of environment variable definitions to be used when running a step.\n\nThe elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\"\nbeing given the value \"VALUE\".", - "type": "array", - "items": { - "type": "string" - } - }, - "waitFor": { - "description": "The ID(s) of the step(s) that this build step depends on.\nThis build step will not start until all the build steps in wait_for\nhave completed successfully. If wait_for is empty, this build step will\nstart when all previous build steps in the Build.Steps list have completed\nsuccessfully.", - "type": "array", - "items": { - "type": "string" - } - }, - "args": { - "description": "A list of arguments that will be presented to the step when it is started.\n\nIf the image used to run the step's container has an entrypoint, these args\nwill be used as arguments to that entrypoint. If the image does not define\nan entrypoint, the first element in args will be used as the entrypoint,\nand the remainder will be used as arguments.", - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "description": "The name of the container image that will run this particular build step.\n\nIf the image is already available in the host's Docker daemon's cache, it\nwill be run directly. If not, the host will attempt to pull the image\nfirst, using the builder service account's credentials if necessary.\n\nThe Docker daemon's cache will already have the latest versions of all of\nthe officially supported build steps\n(https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon\nwill also have cached many of the layers for some popular images, like\n\"ubuntu\", \"debian\", but they will be refreshed at the time you attempt to\nuse them.\n\nIf you built an image in a previous build step, it will be stored in the\nhost's Docker daemon's cache and is available to use as the name for a\nlater build step.", - "type": "string" - }, - "dir": { - "description": "Working directory (relative to project source root) to use when running\nthis operation's container.", - "type": "string" - } - }, - "id": "BuildStep" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "BuildOptions": { - "description": "Optional arguments to enable specific features of builds.", - "type": "object", - "properties": { - "sourceProvenanceHash": { - "description": "Requested hash for SourceProvenance.", - "enumDescriptions": [ - "No hash requested.", - "Use a sha256 hash." - ], - "type": "array", - "items": { - "enum": [ - "NONE", - "SHA256" - ], - "type": "string" - } - }, - "requestedVerifyOption": { - "description": "Requested verifiability options.", - "enum": [ - "NOT_VERIFIED", - "VERIFIED" - ], - "enumDescriptions": [ - "Not a verifiable build. (default)", - "Verified build." - ], - "type": "string" - } - }, - "id": "BuildOptions" - }, - "ListBuildsResponse": { - "description": "Response including listed builds.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Token to receive the next page of results.", - "type": "string" - }, - "builds": { - "description": "Builds will be sorted by create_time, descending.", - "type": "array", - "items": { - "$ref": "Build" - } - } - }, - "id": "ListBuildsResponse" } }, - "revision": "20161213", - "basePath": "", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", + "protocol": "rest", "canonicalName": "Cloud Build", - "discoveryVersion": "v1", - "baseUrl": "https://cloudbuild.googleapis.com/", - "name": "cloudbuild", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } } }, - "documentationLink": "https://cloud.google.com/container-builder/docs/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v1", "rootUrl": "https://cloudbuild.googleapis.com/", - "kind": "discovery#restDescription" + "ownerDomain": "google.com", + "name": "cloudbuild", + "batchPath": "batch", + "title": "Google Cloud Container Builder API" } diff --git a/etc/api/clouddebugger/v2/clouddebugger-api.json b/etc/api/clouddebugger/v2/clouddebugger-api.json index 20f0a3d01e..b3d1326122 100644 --- a/etc/api/clouddebugger/v2/clouddebugger-api.json +++ b/etc/api/clouddebugger/v2/clouddebugger-api.json @@ -1,1011 +1,1059 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/QjifI48X3fgI9mRgli3ziT84a8U\"", - "discoveryVersion": "v1", - "id": "clouddebugger:v2", - "name": "clouddebugger", - "canonicalName": "Cloud Debugger", - "version": "v2", - "revision": "20160810", - "title": "Stackdriver Debugger API", - "description": "Examines the call stack and variables of a running application without stopping or slowing it down.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "documentationLink": "http://cloud.google.com/debugger", - "protocol": "rest", - "baseUrl": "https://clouddebugger.googleapis.com/", - "basePath": "", - "rootUrl": "https://clouddebugger.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "version_module": true, - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud_debugger": { - "description": "Manage cloud debugger" - } - } - } - }, - "schemas": { - "RegisterDebuggeeRequest": { - "id": "RegisterDebuggeeRequest", - "type": "object", - "description": "Request to register a debuggee.", - "properties": { - "debuggee": { - "$ref": "Debuggee", - "description": "Debuggee information to register. The fields `project`, `uniquifier`, `description` and `agent_version` of the debuggee must be set." - } - } - }, - "Debuggee": { - "id": "Debuggee", - "type": "object", - "description": "Represents the application to debug. The application may include one or more replicated processes executing the same code. Each of these processes is attached with a debugger agent, carrying out the debugging commands. The agents attached to the same debuggee are identified by using exactly the same field values when registering.", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the debuggee generated by the controller service." - }, - "project": { - "type": "string", - "description": "Project the debuggee is associated with. Use the project number when registering a Google Cloud Platform project." - }, - "uniquifier": { - "type": "string", - "description": "Debuggee uniquifier within the project. Any string that identifies the application within the project can be used. Including environment and version or build IDs is recommended." - }, - "description": { - "type": "string", - "description": "Human readable description of the debuggee. Including a human-readable project name, environment name and version information is recommended." - }, - "isInactive": { - "type": "boolean", - "description": "If set to `true`, indicates that the debuggee is considered as inactive by the Controller service." - }, - "agentVersion": { - "type": "string", - "description": "Version ID of the agent release. The version ID is structured as following: `domain/type/vmajor.minor` (for example `google.com/gcp-java/v1.1`)." - }, - "isDisabled": { - "type": "boolean", - "description": "If set to `true`, indicates that the agent should disable itself and detach from the debuggee." - }, - "status": { - "$ref": "StatusMessage", - "description": "Human readable message to be displayed to the user about this debuggee. Absence of this field indicates no status. The message can be either informational or an error status." - }, - "sourceContexts": { - "type": "array", - "description": "References to the locations and revisions of the source code used in the deployed application. NOTE: This field is deprecated. Consumers should use `ext_source_contexts` if it is not empty. Debug agents should populate both this field and `ext_source_contexts`.", - "items": { - "$ref": "SourceContext" - } - }, - "extSourceContexts": { - "type": "array", - "description": "References to the locations and revisions of the source code used in the deployed application. Contexts describing a remote repo related to the source code have a `category` label of `remote_repo`. Source snapshot source contexts have a `category` of `snapshot`.", - "items": { - "$ref": "ExtendedSourceContext" - } - }, - "labels": { - "type": "object", - "description": "A set of custom debuggee properties, populated by the agent, to be displayed to the user.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "StatusMessage": { - "id": "StatusMessage", - "type": "object", - "description": "Represents a contextual status message. The message can indicate an error or informational status, and refer to specific parts of the containing object. For example, the `Breakpoint.status` field can indicate an error referring to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`.", - "properties": { - "isError": { - "type": "boolean", - "description": "Distinguishes errors from informational messages." - }, - "refersTo": { - "type": "string", - "description": "Reference to which the message applies.", - "enum": [ - "UNSPECIFIED", - "BREAKPOINT_SOURCE_LOCATION", - "BREAKPOINT_CONDITION", - "BREAKPOINT_EXPRESSION", - "VARIABLE_NAME", - "VARIABLE_VALUE" - ] - }, - "description": { - "$ref": "FormatMessage", - "description": "Status message text." - } - } - }, - "FormatMessage": { - "id": "FormatMessage", - "type": "object", - "description": "Represents a message with parameters.", - "properties": { - "format": { - "type": "string", - "description": "Format template for the message. The `format` uses placeholders `$0`, `$1`, etc. to reference parameters. `$$` can be used to denote the `$` character. Examples: * `Failed to load '$0' which helps debug $1 the first time it is loaded. Again, $0 is very important.` * `Please pay $$10 to use $0 instead of $1.`" - }, - "parameters": { - "type": "array", - "description": "Optional parameters to be embedded into the message.", - "items": { - "type": "string" - } - } - } - }, - "SourceContext": { - "id": "SourceContext", - "type": "object", - "description": "A SourceContext is a reference to a tree of files. A SourceContext together with a path point to a unique revision of a single file or directory.", - "properties": { - "cloudRepo": { - "$ref": "CloudRepoSourceContext", - "description": "A SourceContext referring to a revision in a cloud repo." - }, - "cloudWorkspace": { - "$ref": "CloudWorkspaceSourceContext", - "description": "A SourceContext referring to a snapshot in a cloud workspace." - }, - "gerrit": { - "$ref": "GerritSourceContext", - "description": "A SourceContext referring to a Gerrit project." - }, - "git": { - "$ref": "GitSourceContext", - "description": "A SourceContext referring to any third party Git repo (e.g. GitHub)." - } - } - }, - "CloudRepoSourceContext": { - "id": "CloudRepoSourceContext", - "type": "object", - "description": "A CloudRepoSourceContext denotes a particular revision in a cloud repo (a repo hosted by the Google Cloud Platform).", - "properties": { - "repoId": { - "$ref": "RepoId", - "description": "The ID of the repo." - }, - "revisionId": { - "type": "string", - "description": "A revision ID." - }, - "aliasName": { - "type": "string", - "description": "The name of an alias (branch, tag, etc.)." - }, - "aliasContext": { - "$ref": "AliasContext", - "description": "An alias, which may be a branch or tag." - } - } - }, - "RepoId": { - "id": "RepoId", - "type": "object", - "description": "A unique identifier for a cloud repo.", - "properties": { - "projectRepoId": { - "$ref": "ProjectRepoId", - "description": "A combination of a project ID and a repo name." - }, - "uid": { - "type": "string", - "description": "A server-assigned, globally unique identifier." - } - } - }, - "ProjectRepoId": { - "id": "ProjectRepoId", - "type": "object", - "description": "Selects a repo using a Google Cloud Platform project ID (e.g. winged-cargo-31) and a repo name within that project.", - "properties": { - "projectId": { - "type": "string", - "description": "The ID of the project." - }, - "repoName": { - "type": "string", - "description": "The name of the repo. Leave empty for the default repo." - } - } - }, - "AliasContext": { - "id": "AliasContext", - "type": "object", - "description": "An alias to a repo revision.", - "properties": { - "kind": { - "type": "string", - "description": "The alias kind.", - "enum": [ - "ANY", - "FIXED", - "MOVABLE", - "OTHER" - ] - }, - "name": { - "type": "string", - "description": "The alias name." - } - } - }, - "CloudWorkspaceSourceContext": { - "id": "CloudWorkspaceSourceContext", - "type": "object", - "description": "A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.", - "properties": { - "workspaceId": { - "$ref": "CloudWorkspaceId", - "description": "The ID of the workspace." - }, - "snapshotId": { - "type": "string", - "description": "The ID of the snapshot. An empty snapshot_id refers to the most recent snapshot." - } - } - }, - "CloudWorkspaceId": { - "id": "CloudWorkspaceId", - "type": "object", - "description": "A CloudWorkspaceId is a unique identifier for a cloud workspace. A cloud workspace is a place associated with a repo where modified files can be stored before they are committed.", - "properties": { - "repoId": { - "$ref": "RepoId", - "description": "The ID of the repo containing the workspace." - }, - "name": { - "type": "string", - "description": "The unique name of the workspace within the repo. This is the name chosen by the client in the Source API's CreateWorkspace method." - } - } - }, - "GerritSourceContext": { - "id": "GerritSourceContext", - "type": "object", - "description": "A SourceContext referring to a Gerrit project.", - "properties": { - "hostUri": { - "type": "string", - "description": "The URI of a running Gerrit instance." - }, - "gerritProject": { - "type": "string", - "description": "The full project name within the host. Projects may be nested, so \"project/subproject\" is a valid project name. The \"repo name\" is hostURI/project." - }, - "revisionId": { - "type": "string", - "description": "A revision (commit) ID." - }, - "aliasName": { - "type": "string", - "description": "The name of an alias (branch, tag, etc.)." - }, - "aliasContext": { - "$ref": "AliasContext", - "description": "An alias, which may be a branch or tag." - } - } - }, - "GitSourceContext": { - "id": "GitSourceContext", - "type": "object", - "description": "A GitSourceContext denotes a particular revision in a third party Git repository (e.g. GitHub).", - "properties": { - "url": { - "type": "string", - "description": "Git repository URL." - }, - "revisionId": { - "type": "string", - "description": "Git commit hash. required." - } - } - }, - "ExtendedSourceContext": { - "id": "ExtendedSourceContext", - "type": "object", - "description": "An ExtendedSourceContext is a SourceContext combined with additional details describing the context.", - "properties": { - "context": { - "$ref": "SourceContext", - "description": "Any source context." - }, - "labels": { - "type": "object", - "description": "Labels with user defined metadata.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "RegisterDebuggeeResponse": { - "id": "RegisterDebuggeeResponse", - "type": "object", - "description": "Response for registering a debuggee.", - "properties": { - "debuggee": { - "$ref": "Debuggee", - "description": "Debuggee resource. The field `id` is guranteed to be set (in addition to the echoed fields)." - } - } - }, - "ListActiveBreakpointsResponse": { - "id": "ListActiveBreakpointsResponse", - "type": "object", - "description": "Response for listing active breakpoints.", - "properties": { - "breakpoints": { - "type": "array", - "description": "List of all active breakpoints. The fields `id` and `location` are guaranteed to be set on each breakpoint.", - "items": { - "$ref": "Breakpoint" - } - }, - "nextWaitToken": { - "type": "string", - "description": "A wait token that can be used in the next method call to block until the list of breakpoints changes." - }, - "waitExpired": { - "type": "boolean", - "description": "The `wait_expired` field is set to true by the server when the request times out and the field `success_on_timeout` is set to true." - } - } - }, - "Breakpoint": { - "id": "Breakpoint", - "type": "object", - "description": "Represents the breakpoint specification, status and results.", - "properties": { - "id": { - "type": "string", - "description": "Breakpoint identifier, unique in the scope of the debuggee." - }, - "action": { - "type": "string", - "description": "Action that the agent should perform when the code at the breakpoint location is hit.", - "enum": [ - "CAPTURE", - "LOG" - ] - }, - "location": { - "$ref": "SourceLocation", - "description": "Breakpoint source location." - }, - "condition": { - "type": "string", - "description": "Condition that triggers the breakpoint. The condition is a compound boolean expression composed using expressions in a programming language at the source location." - }, - "expressions": { - "type": "array", - "description": "List of read-only expressions to evaluate at the breakpoint location. The expressions are composed using expressions in the programming language at the source location. If the breakpoint action is `LOG`, the evaluated expressions are included in log statements.", - "items": { - "type": "string" - } - }, - "logMessageFormat": { - "type": "string", - "description": "Only relevant when action is `LOG`. Defines the message to log when the breakpoint hits. The message may include parameter placeholders `$0`, `$1`, etc. These placeholders are replaced with the evaluated value of the appropriate expression. Expressions not referenced in `log_message_format` are not logged. Example: `Message received, id = $0, count = $1` with `expressions` = `[ message.id, message.count ]`." - }, - "logLevel": { - "type": "string", - "description": "Indicates the severity of the log. Only relevant when action is `LOG`.", - "enum": [ - "INFO", - "WARNING", - "ERROR" - ] - }, - "isFinalState": { - "type": "boolean", - "description": "When true, indicates that this is a final result and the breakpoint state will not change from here on." - }, - "createTime": { - "type": "string", - "description": "Time this breakpoint was created by the server in seconds resolution." - }, - "finalTime": { - "type": "string", - "description": "Time this breakpoint was finalized as seen by the server in seconds resolution." - }, - "userEmail": { - "type": "string", - "description": "E-mail address of the user that created this breakpoint" - }, - "status": { - "$ref": "StatusMessage", - "description": "Breakpoint status. The status includes an error flag and a human readable message. This field is usually unset. The message can be either informational or an error message. Regardless, clients should always display the text message back to the user. Error status indicates complete failure of the breakpoint. Example (non-final state): `Still loading symbols...` Examples (final state): * `Invalid line number` referring to location * `Field f not found in class C` referring to condition" - }, - "stackFrames": { - "type": "array", - "description": "The stack at breakpoint time.", - "items": { - "$ref": "StackFrame" - } - }, - "evaluatedExpressions": { - "type": "array", - "description": "Values of evaluated expressions at breakpoint time. The evaluated expressions appear in exactly the same order they are listed in the `expressions` field. The `name` field holds the original expression text, the `value` or `members` field holds the result of the evaluated expression. If the expression cannot be evaluated, the `status` inside the `Variable` will indicate an error and contain the error text.", - "items": { - "$ref": "Variable" - } - }, - "variableTable": { - "type": "array", - "description": "The `variable_table` exists to aid with computation, memory and network traffic optimization. It enables storing a variable once and reference it from multiple variables, including variables stored in the `variable_table` itself. For example, the same `this` object, which may appear at many levels of the stack, can have all of its data stored once in this table. The stack frame variables then would hold only a reference to it. The variable `var_table_index` field is an index into this repeated field. The stored objects are nameless and get their name from the referencing variable. The effective variable is a merge of the referencing variable and the referenced variable.", - "items": { - "$ref": "Variable" - } - }, - "labels": { - "type": "object", - "description": "A set of custom breakpoint properties, populated by the agent, to be displayed to the user.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "SourceLocation": { - "id": "SourceLocation", - "type": "object", - "description": "Represents a location in the source code.", - "properties": { - "path": { - "type": "string", - "description": "Path to the source file within the source context of the target binary." - }, - "line": { - "type": "integer", - "description": "Line inside the file. The first line in the file has the value `1`.", - "format": "int32" - } - } - }, - "StackFrame": { - "id": "StackFrame", - "type": "object", - "description": "Represents a stack frame context.", - "properties": { - "function": { - "type": "string", - "description": "Demangled function name at the call site." - }, - "location": { - "$ref": "SourceLocation", - "description": "Source location of the call site." - }, - "arguments": { - "type": "array", - "description": "Set of arguments passed to this function. Note that this might not be populated for all stack frames.", - "items": { - "$ref": "Variable" - } - }, - "locals": { - "type": "array", - "description": "Set of local variables at the stack frame location. Note that this might not be populated for all stack frames.", - "items": { - "$ref": "Variable" - } - } - } - }, - "Variable": { - "id": "Variable", - "type": "object", - "description": "Represents a variable or an argument possibly of a compound object type. Note how the following variables are represented: 1) A simple variable: int x = 5 { name: \"x\", value: \"5\", type: \"int\" } // Captured variable 2) A compound object: struct T { int m1; int m2; }; T x = { 3, 7 }; { // Captured variable name: \"x\", type: \"T\", members { name: \"m1\", value: \"3\", type: \"int\" }, members { name: \"m2\", value: \"7\", type: \"int\" } } 3) A pointer where the pointee was captured: T x = { 3, 7 }; T* p = &x; { // Captured variable name: \"p\", type: \"T*\", value: \"0x00500500\", members { name: \"m1\", value: \"3\", type: \"int\" }, members { name: \"m2\", value: \"7\", type: \"int\" } } 4) A pointer where the pointee was not captured: T* p = new T; { // Captured variable name: \"p\", type: \"T*\", value: \"0x00400400\" status { is_error: true, description { format: \"unavailable\" } } } The status should describe the reason for the missing value, such as ``, ``, `\n`. Note that a null pointer should not have members. 5) An unnamed value: int* p = new int(7); { // Captured variable name: \"p\", value: \"0x00500500\", type: \"int*\", members { value: \"7\", type: \"int\" } } 6) An unnamed pointer where the pointee was not captured: int* p = new int(7); int** pp = &p; { // Captured variable name: \"pp\", value: \"0x00500500\", type: \"int**\", members { value: \"0x00400400\", type: \"int*\" status { is_error: true, description: { format: \"unavailable\" } } } } } To optimize computation, memory and network traffic, variables that repeat in the output multiple times can be stored once in a shared variable table and be referenced using the `var_table_index` field. The variables stored in the shared table are nameless and are essentially a partition of the complete variable. To reconstruct the complete variable, merge the referencing variable with the referenced variable. When using the shared variable table, the following variables: T x = { 3, 7 }; T* p = &x; T& r = x; { name: \"x\", var_table_index: 3, type: \"T\" } // Captured variables { name: \"p\", value \"0x00500500\", type=\"T*\", var_table_index: 3 } { name: \"r\", type=\"T&\", var_table_index: 3 } { // Shared variable table entry #3: members { name: \"m1\", value: \"3\", type: \"int\" }, members { name: \"m2\", value: \"7\", type: \"int\" } } Note that the pointer address is stored with the referencing variable and not with the referenced variable. This allows the referenced variable to be shared between pointers and references. The type field is optional. The debugger agent may or may not support it.", - "properties": { - "name": { - "type": "string", - "description": "Name of the variable, if any." - }, - "value": { - "type": "string", - "description": "Simple value of the variable." - }, - "type": { - "type": "string", - "description": "Variable type (e.g. `MyClass`). If the variable is split with `var_table_index`, `type` goes next to `value`. The interpretation of a type is agent specific. It is recommended to include the dynamic type rather than a static type of an object." - }, - "members": { - "type": "array", - "description": "Members contained or pointed to by the variable.", - "items": { - "$ref": "Variable" - } - }, - "varTableIndex": { - "type": "integer", - "description": "Reference to a variable in the shared variable table. More than one variable can reference the same variable in the table. The `var_table_index` field is an index into `variable_table` in Breakpoint.", - "format": "int32" - }, - "status": { - "$ref": "StatusMessage", - "description": "Status associated with the variable. This field will usually stay unset. A status of a single variable only applies to that variable or expression. The rest of breakpoint data still remains valid. Variables might be reported in error state even when breakpoint is not in final state. The message may refer to variable name with `refers_to` set to `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. In either case variable value and members will be unset. Example of error message applied to name: `Invalid expression syntax`. Example of information message applied to value: `Not captured`. Examples of error message applied to value: * `Malformed string`, * `Field f not found in class C` * `Null pointer dereference`" - } - } - }, - "UpdateActiveBreakpointRequest": { - "id": "UpdateActiveBreakpointRequest", - "type": "object", - "description": "Request to update an active breakpoint.", - "properties": { - "breakpoint": { - "$ref": "Breakpoint", - "description": "Updated breakpoint information. The field 'id' must be set." - } - } - }, - "UpdateActiveBreakpointResponse": { - "id": "UpdateActiveBreakpointResponse", - "type": "object", - "description": "Response for updating an active breakpoint. The message is defined to allow future extensions." - }, - "SetBreakpointResponse": { - "id": "SetBreakpointResponse", - "type": "object", - "description": "Response for setting a breakpoint.", - "properties": { - "breakpoint": { - "$ref": "Breakpoint", - "description": "Breakpoint resource. The field `id` is guaranteed to be set (in addition to the echoed fileds)." - } - } - }, - "GetBreakpointResponse": { - "id": "GetBreakpointResponse", - "type": "object", - "description": "Response for getting breakpoint information.", - "properties": { - "breakpoint": { - "$ref": "Breakpoint", - "description": "Complete breakpoint state. The fields `id` and `location` are guaranteed to be set." - } - } - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "ListBreakpointsResponse": { - "id": "ListBreakpointsResponse", - "type": "object", - "description": "Response for listing breakpoints.", - "properties": { - "breakpoints": { - "type": "array", - "description": "List of all breakpoints with complete state. The fields `id` and `location` are guaranteed to be set on each breakpoint.", - "items": { - "$ref": "Breakpoint" - } - }, - "nextWaitToken": { - "type": "string", - "description": "A wait token that can be used in the next call to `list` (REST) or `ListBreakpoints` (RPC) to block until the list of breakpoints has changes." - } - } - }, - "ListDebuggeesResponse": { - "id": "ListDebuggeesResponse", - "type": "object", - "description": "Response for listing debuggees.", - "properties": { - "debuggees": { - "type": "array", - "description": "List of debuggees accessible to the calling user. Note that the `description` field is the only human readable field that should be displayed to the user. The fields `debuggee.id` and `description` fields are guaranteed to be set on each debuggee.", - "items": { - "$ref": "Debuggee" - } - } - } - } - }, - "resources": { - "controller": { - "resources": { - "debuggees": { - "methods": { - "register": { - "id": "clouddebugger.controller.debuggees.register", - "path": "v2/controller/debuggees/register", - "httpMethod": "POST", - "description": "Registers the debuggee with the controller service. All agents attached to the same application should call this method with the same request content to get back the same stable `debuggee_id`. Agents should call this method again whenever `google.rpc.Code.NOT_FOUND` is returned from any controller method. This allows the controller service to disable the agent or recover from any data loss. If the debuggee is disabled by the server, the response will have `is_disabled` set to `true`.", - "request": { - "$ref": "RegisterDebuggeeRequest" - }, - "response": { - "$ref": "RegisterDebuggeeResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ] - } - }, - "resources": { - "breakpoints": { - "methods": { - "list": { - "id": "clouddebugger.controller.debuggees.breakpoints.list", - "path": "v2/controller/debuggees/{debuggeeId}/breakpoints", - "httpMethod": "GET", - "description": "Returns the list of all active breakpoints for the debuggee. The breakpoint specification (location, condition, and expression fields) is semantically immutable, although the field values may change. For example, an agent may update the location line number to reflect the actual line where the breakpoint was set, but this doesn't change the breakpoint semantics. This means that an agent does not need to check if a breakpoint has changed when it encounters the same breakpoint on a successive call. Moreover, an agent should remember the breakpoints that are completed until the controller removes them from the active list to avoid setting those breakpoints again.", - "parameters": { - "debuggeeId": { - "type": "string", - "description": "Identifies the debuggee.", - "required": true, - "location": "path" + "resources": { + "debugger": { + "resources": { + "debuggees": { + "methods": { + "list": { + "description": "Lists all the debuggees that the user can set breakpoints to.", + "response": { + "$ref": "ListDebuggeesResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "includeInactive": { + "description": "When set to `true`, the result includes all debuggees. Otherwise, the\nresult includes only debuggees that are active.", + "type": "boolean", + "location": "query" + }, + "project": { + "location": "query", + "description": "Project number of a Google Cloud project whose debuggees to list.", + "type": "string" + }, + "clientVersion": { + "location": "query", + "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/debugger/debuggees", + "path": "v2/debugger/debuggees", + "id": "clouddebugger.debugger.debuggees.list" + } }, - "waitToken": { - "type": "string", - "description": "A wait token that, if specified, blocks the method call until the list of active breakpoints has changed, or a server selected timeout has expired. The value should be set from the last returned response.", - "location": "query" - }, - "successOnTimeout": { - "type": "boolean", - "description": "If set to `true`, returns `google.rpc.Code.OK` status and sets the `wait_expired` response field to `true` when the server-selected timeout has expired (recommended). If set to `false`, returns `google.rpc.Code.ABORTED` status when the server-selected timeout has expired (deprecated).", - "location": "query" + "resources": { + "breakpoints": { + "methods": { + "set": { + "response": { + "$ref": "SetBreakpointResponse" + }, + "parameterOrder": [ + "debuggeeId" + ], + "httpMethod": "POST", + "parameters": { + "clientVersion": { + "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string", + "location": "query" + }, + "debuggeeId": { + "description": "ID of the debuggee where the breakpoint is to be set.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set", + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set", + "id": "clouddebugger.debugger.debuggees.breakpoints.set", + "request": { + "$ref": "Breakpoint" + }, + "description": "Sets the breakpoint to the debuggee." + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "debuggeeId", + "breakpointId" + ], + "parameters": { + "breakpointId": { + "description": "ID of the breakpoint to delete.", + "required": true, + "type": "string", + "location": "path" + }, + "debuggeeId": { + "location": "path", + "description": "ID of the debuggee whose breakpoint to delete.", + "required": true, + "type": "string" + }, + "clientVersion": { + "location": "query", + "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", + "id": "clouddebugger.debugger.debuggees.breakpoints.delete", + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", + "description": "Deletes the breakpoint from the debuggee." + }, + "get": { + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", + "id": "clouddebugger.debugger.debuggees.breakpoints.get", + "description": "Gets breakpoint information.", + "response": { + "$ref": "GetBreakpointResponse" + }, + "parameterOrder": [ + "debuggeeId", + "breakpointId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": { + "breakpointId": { + "description": "ID of the breakpoint to get.", + "required": true, + "type": "string", + "location": "path" + }, + "debuggeeId": { + "location": "path", + "description": "ID of the debuggee whose breakpoint to get.", + "required": true, + "type": "string" + }, + "clientVersion": { + "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}" + }, + "list": { + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints", + "id": "clouddebugger.debugger.debuggees.breakpoints.list", + "description": "Lists all breakpoints for the debuggee.", + "response": { + "$ref": "ListBreakpointsResponse" + }, + "parameterOrder": [ + "debuggeeId" + ], + "httpMethod": "GET", + "parameters": { + "debuggeeId": { + "description": "ID of the debuggee whose breakpoints to list.", + "required": true, + "type": "string", + "location": "path" + }, + "waitToken": { + "description": "A wait token that, if specified, blocks the call until the breakpoints\nlist has changed, or a server selected timeout has expired. The value\nshould be set from the last response. The error code\n`google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which\nshould be called again with the same `wait_token`.", + "type": "string", + "location": "query" + }, + "clientVersion": { + "location": "query", + "description": "The client version making the call.\nFollowing: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string" + }, + "action.value": { + "location": "query", + "enum": [ + "CAPTURE", + "LOG" + ], + "description": "Only breakpoints with the specified action will pass the filter.", + "type": "string" + }, + "includeAllUsers": { + "description": "When set to `true`, the response includes the list of breakpoints set by\nany user. Otherwise, it includes only breakpoints set by the caller.", + "type": "boolean", + "location": "query" + }, + "includeInactive": { + "description": "When set to `true`, the response includes active and inactive\nbreakpoints. Otherwise, it includes only active breakpoints.", + "type": "boolean", + "location": "query" + }, + "stripResults": { + "location": "query", + "description": "This field is deprecated. The following fields are always stripped out of\nthe result: `stack_frames`, `evaluated_expressions` and `variable_table`.", + "type": "boolean" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints" + } + } + } + } + } + } + }, + "controller": { + "resources": { + "debuggees": { + "methods": { + "register": { + "response": { + "$ref": "RegisterDebuggeeResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": {}, + "flatPath": "v2/controller/debuggees/register", + "path": "v2/controller/debuggees/register", + "id": "clouddebugger.controller.debuggees.register", + "description": "Registers the debuggee with the controller service.\n\nAll agents attached to the same application should call this method with\nthe same request content to get back the same stable `debuggee_id`. Agents\nshould call this method again whenever `google.rpc.Code.NOT_FOUND` is\nreturned from any controller method.\n\nThis allows the controller service to disable the agent or recover from any\ndata loss. If the debuggee is disabled by the server, the response will\nhave `is_disabled` set to `true`.", + "request": { + "$ref": "RegisterDebuggeeRequest" + } + } + }, + "resources": { + "breakpoints": { + "methods": { + "update": { + "description": "Updates the breakpoint state or mutable fields.\nThe entire Breakpoint message must be sent back to the controller\nservice.\n\nUpdates to active breakpoint fields are only allowed if the new value\ndoes not change the breakpoint specification. Updates to the `location`,\n`condition` and `expression` fields should not alter the breakpoint\nsemantics. These may only make changes such as canonicalizing a value\nor snapping the location to the correct line of code.", + "request": { + "$ref": "UpdateActiveBreakpointRequest" + }, + "response": { + "$ref": "UpdateActiveBreakpointResponse" + }, + "parameterOrder": [ + "debuggeeId", + "id" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": { + "debuggeeId": { + "location": "path", + "description": "Identifies the debuggee being debugged.", + "required": true, + "type": "string" + }, + "id": { + "location": "path", + "description": "Breakpoint identifier, unique in the scope of the debuggee.", + "required": true, + "type": "string" + } + }, + "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", + "path": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", + "id": "clouddebugger.controller.debuggees.breakpoints.update" + }, + "list": { + "description": "Returns the list of all active breakpoints for the debuggee.\n\nThe breakpoint specification (location, condition, and expression\nfields) is semantically immutable, although the field values may\nchange. For example, an agent may update the location line number\nto reflect the actual line where the breakpoint was set, but this\ndoesn't change the breakpoint semantics.\n\nThis means that an agent does not need to check if a breakpoint has changed\nwhen it encounters the same breakpoint on a successive call.\nMoreover, an agent should remember the breakpoints that are completed\nuntil the controller removes them from the active list to avoid\nsetting those breakpoints again.", + "response": { + "$ref": "ListActiveBreakpointsResponse" + }, + "parameterOrder": [ + "debuggeeId" + ], + "httpMethod": "GET", + "parameters": { + "waitToken": { + "location": "query", + "description": "A wait token that, if specified, blocks the method call until the list\nof active breakpoints has changed, or a server selected timeout has\nexpired. The value should be set from the last returned response.", + "type": "string" + }, + "debuggeeId": { + "description": "Identifies the debuggee.", + "required": true, + "type": "string", + "location": "path" + }, + "successOnTimeout": { + "description": "If set to `true`, returns `google.rpc.Code.OK` status and sets the\n`wait_expired` response field to `true` when the server-selected timeout\nhas expired (recommended).\n\nIf set to `false`, returns `google.rpc.Code.ABORTED` status when the\nserver-selected timeout has expired (deprecated).", + "type": "boolean", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints", + "path": "v2/controller/debuggees/{debuggeeId}/breakpoints", + "id": "clouddebugger.controller.debuggees.breakpoints.list" + } + } + } } - }, - "parameterOrder": [ - "debuggeeId" - ], - "response": { - "$ref": "ListActiveBreakpointsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ] - }, - "update": { - "id": "clouddebugger.controller.debuggees.breakpoints.update", - "path": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", - "httpMethod": "PUT", - "description": "Updates the breakpoint state or mutable fields. The entire Breakpoint message must be sent back to the controller service. Updates to active breakpoint fields are only allowed if the new value does not change the breakpoint specification. Updates to the `location`, `condition` and `expression` fields should not alter the breakpoint semantics. These may only make changes such as canonicalizing a value or snapping the location to the correct line of code.", - "parameters": { - "debuggeeId": { - "type": "string", - "description": "Identifies the debuggee being debugged.", - "required": true, - "location": "path" - }, - "id": { - "type": "string", - "description": "Breakpoint identifier, unique in the scope of the debuggee.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "debuggeeId", - "id" - ], - "request": { - "$ref": "UpdateActiveBreakpointRequest" - }, - "response": { - "$ref": "UpdateActiveBreakpointResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ] } - } } - } } - } }, - "debugger": { - "resources": { - "debuggees": { - "methods": { - "list": { - "id": "clouddebugger.debugger.debuggees.list", - "path": "v2/debugger/debuggees", - "httpMethod": "GET", - "description": "Lists all the debuggees that the user can set breakpoints to.", - "parameters": { + "parameters": { + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "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", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + } + }, + "version": "v2", + "baseUrl": "https://clouddebugger.googleapis.com/", + "servicePath": "", + "description": "Examines the call stack and variables of a running application without stopping or slowing it down.\n", + "kind": "discovery#restDescription", + "basePath": "", + "id": "clouddebugger:v2", + "documentationLink": "http://cloud.google.com/debugger", + "revision": "20170413", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { + "SourceContext": { + "properties": { + "git": { + "description": "A SourceContext referring to any third party Git repo (e.g. GitHub).", + "$ref": "GitSourceContext" + }, + "gerrit": { + "$ref": "GerritSourceContext", + "description": "A SourceContext referring to a Gerrit project." + }, + "cloudRepo": { + "$ref": "CloudRepoSourceContext", + "description": "A SourceContext referring to a revision in a cloud repo." + }, + "cloudWorkspace": { + "$ref": "CloudWorkspaceSourceContext", + "description": "A SourceContext referring to a snapshot in a cloud workspace." + } + }, + "id": "SourceContext", + "description": "A SourceContext is a reference to a tree of files. A SourceContext together\nwith a path point to a unique revision of a single file or directory.", + "type": "object" + }, + "CloudRepoSourceContext": { + "properties": { + "aliasContext": { + "description": "An alias, which may be a branch or tag.", + "$ref": "AliasContext" + }, + "revisionId": { + "description": "A revision ID.", + "type": "string" + }, + "aliasName": { + "description": "The name of an alias (branch, tag, etc.).", + "type": "string" + }, + "repoId": { + "description": "The ID of the repo.", + "$ref": "RepoId" + } + }, + "id": "CloudRepoSourceContext", + "description": "A CloudRepoSourceContext denotes a particular revision in a cloud\nrepo (a repo hosted by the Google Cloud Platform).", + "type": "object" + }, + "RegisterDebuggeeResponse": { + "description": "Response for registering a debuggee.", + "type": "object", + "properties": { + "debuggee": { + "$ref": "Debuggee", + "description": "Debuggee resource.\nThe field `id` is guranteed to be set (in addition to the echoed fields)." + } + }, + "id": "RegisterDebuggeeResponse" + }, + "RegisterDebuggeeRequest": { + "description": "Request to register a debuggee.", + "type": "object", + "properties": { + "debuggee": { + "$ref": "Debuggee", + "description": "Debuggee information to register.\nThe fields `project`, `uniquifier`, `description` and `agent_version`\nof the debuggee must be set." + } + }, + "id": "RegisterDebuggeeRequest" + }, + "GetBreakpointResponse": { + "properties": { + "breakpoint": { + "$ref": "Breakpoint", + "description": "Complete breakpoint state.\nThe fields `id` and `location` are guaranteed to be set." + } + }, + "id": "GetBreakpointResponse", + "description": "Response for getting breakpoint information.", + "type": "object" + }, + "StatusMessage": { + "properties": { + "isError": { + "description": "Distinguishes errors from informational messages.", + "type": "boolean" + }, + "description": { + "$ref": "FormatMessage", + "description": "Status message text." + }, + "refersTo": { + "enum": [ + "UNSPECIFIED", + "BREAKPOINT_SOURCE_LOCATION", + "BREAKPOINT_CONDITION", + "BREAKPOINT_EXPRESSION", + "BREAKPOINT_AGE", + "VARIABLE_NAME", + "VARIABLE_VALUE" + ], + "description": "Reference to which the message applies.", + "type": "string", + "enumDescriptions": [ + "Status doesn't refer to any particular input.", + "Status applies to the breakpoint and is related to its location.", + "Status applies to the breakpoint and is related to its condition.", + "Status applies to the breakpoint and is related to its expressions.", + "Status applies to the breakpoint and is related to its age.", + "Status applies to the entire variable.", + "Status applies to variable value (variable name is valid)." + ] + } + }, + "id": "StatusMessage", + "description": "Represents a contextual status message.\nThe message can indicate an error or informational status, and refer to\nspecific parts of the containing object.\nFor example, the `Breakpoint.status` field can indicate an error referring\nto the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`.", + "type": "object" + }, + "GitSourceContext": { + "description": "A GitSourceContext denotes a particular revision in a third party Git\nrepository (e.g. GitHub).", + "type": "object", + "properties": { + "revisionId": { + "description": "Git commit hash.\nrequired.", + "type": "string" + }, + "url": { + "description": "Git repository URL.", + "type": "string" + } + }, + "id": "GitSourceContext" + }, + "Variable": { + "description": "Represents a variable or an argument possibly of a compound object type.\nNote how the following variables are represented:\n\n1) A simple variable:\n\n int x = 5\n\n { name: \"x\", value: \"5\", type: \"int\" } // Captured variable\n\n2) A compound object:\n\n struct T {\n int m1;\n int m2;\n };\n T x = { 3, 7 };\n\n { // Captured variable\n name: \"x\",\n type: \"T\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n3) A pointer where the pointee was captured:\n\n T x = { 3, 7 };\n T* p = &x;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00500500\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n4) A pointer where the pointee was not captured:\n\n T* p = new T;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00400400\"\n status { is_error: true, description { format: \"unavailable\" } }\n }\n\nThe status should describe the reason for the missing value,\nsuch as `\u003coptimized out\u003e`, `\u003cinaccessible\u003e`, `\u003cpointers limit reached\u003e`.\n\nNote that a null pointer should not have members.\n\n5) An unnamed value:\n\n int* p = new int(7);\n\n { // Captured variable\n name: \"p\",\n value: \"0x00500500\",\n type: \"int*\",\n members { value: \"7\", type: \"int\" } }\n\n6) An unnamed pointer where the pointee was not captured:\n\n int* p = new int(7);\n int** pp = &p;\n\n { // Captured variable\n name: \"pp\",\n value: \"0x00500500\",\n type: \"int**\",\n members {\n value: \"0x00400400\",\n type: \"int*\"\n status {\n is_error: true,\n description: { format: \"unavailable\" } }\n }\n }\n }\n\nTo optimize computation, memory and network traffic, variables that\nrepeat in the output multiple times can be stored once in a shared\nvariable table and be referenced using the `var_table_index` field. The\nvariables stored in the shared table are nameless and are essentially\na partition of the complete variable. To reconstruct the complete\nvariable, merge the referencing variable with the referenced variable.\n\nWhen using the shared variable table, the following variables:\n\n T x = { 3, 7 };\n T* p = &x;\n T& r = x;\n\n { name: \"x\", var_table_index: 3, type: \"T\" } // Captured variables\n { name: \"p\", value \"0x00500500\", type=\"T*\", var_table_index: 3 }\n { name: \"r\", type=\"T&\", var_table_index: 3 }\n\n { // Shared variable table entry #3:\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\nNote that the pointer address is stored with the referencing variable\nand not with the referenced variable. This allows the referenced variable\nto be shared between pointers and references.\n\nThe type field is optional. The debugger agent may or may not support it.", + "type": "object", + "properties": { + "name": { + "description": "Name of the variable, if any.", + "type": "string" + }, + "type": { + "description": "Variable type (e.g. `MyClass`). If the variable is split with\n`var_table_index`, `type` goes next to `value`. The interpretation of\na type is agent specific. It is recommended to include the dynamic type\nrather than a static type of an object.", + "type": "string" + }, + "varTableIndex": { + "description": "Reference to a variable in the shared variable table. More than\none variable can reference the same variable in the table. The\n`var_table_index` field is an index into `variable_table` in Breakpoint.", + "format": "int32", + "type": "integer" + }, + "value": { + "description": "Simple value of the variable.", + "type": "string" + }, + "members": { + "description": "Members contained or pointed to by the variable.", + "type": "array", + "items": { + "$ref": "Variable" + } + }, + "status": { + "$ref": "StatusMessage", + "description": "Status associated with the variable. This field will usually stay\nunset. A status of a single variable only applies to that variable or\nexpression. The rest of breakpoint data still remains valid. Variables\nmight be reported in error state even when breakpoint is not in final\nstate.\n\nThe message may refer to variable name with `refers_to` set to\n`VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`.\nIn either case variable value and members will be unset.\n\nExample of error message applied to name: `Invalid expression syntax`.\n\nExample of information message applied to value: `Not captured`.\n\nExamples of error message applied to value:\n\n* `Malformed string`,\n* `Field f not found in class C`\n* `Null pointer dereference`" + } + }, + "id": "Variable" + }, + "StackFrame": { + "properties": { + "function": { + "description": "Demangled function name at the call site.", + "type": "string" + }, + "arguments": { + "description": "Set of arguments passed to this function.\nNote that this might not be populated for all stack frames.", + "type": "array", + "items": { + "$ref": "Variable" + } + }, + "locals": { + "description": "Set of local variables at the stack frame location.\nNote that this might not be populated for all stack frames.", + "type": "array", + "items": { + "$ref": "Variable" + } + }, + "location": { + "description": "Source location of the call site.", + "$ref": "SourceLocation" + } + }, + "id": "StackFrame", + "description": "Represents a stack frame context.", + "type": "object" + }, + "RepoId": { + "description": "A unique identifier for a cloud repo.", + "type": "object", + "properties": { + "projectRepoId": { + "$ref": "ProjectRepoId", + "description": "A combination of a project ID and a repo name." + }, + "uid": { + "description": "A server-assigned, globally unique identifier.", + "type": "string" + } + }, + "id": "RepoId" + }, + "FormatMessage": { + "description": "Represents a message with parameters.", + "type": "object", + "properties": { + "parameters": { + "description": "Optional parameters to be embedded into the message.", + "type": "array", + "items": { + "type": "string" + } + }, + "format": { + "description": "Format template for the message. The `format` uses placeholders `$0`,\n`$1`, etc. to reference parameters. `$$` can be used to denote the `$`\ncharacter.\n\nExamples:\n\n* `Failed to load '$0' which helps debug $1 the first time it\n is loaded. Again, $0 is very important.`\n* `Please pay $$10 to use $0 instead of $1.`", + "type": "string" + } + }, + "id": "FormatMessage" + }, + "ExtendedSourceContext": { + "properties": { + "context": { + "description": "Any source context.", + "$ref": "SourceContext" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels with user defined metadata.", + "type": "object" + } + }, + "id": "ExtendedSourceContext", + "description": "An ExtendedSourceContext is a SourceContext combined with additional\ndetails describing the context.", + "type": "object" + }, + "AliasContext": { + "properties": { + "name": { + "description": "The alias name.", + "type": "string" + }, + "kind": { + "enumDescriptions": [ + "Do not use.", + "Git tag", + "Git branch", + "OTHER is used to specify non-standard aliases, those not of the kinds\nabove. For example, if a Git repo has a ref named \"refs/foo/bar\", it\nis considered to be of kind OTHER." + ], + "enum": [ + "ANY", + "FIXED", + "MOVABLE", + "OTHER" + ], + "description": "The alias kind.", + "type": "string" + } + }, + "id": "AliasContext", + "description": "An alias to a repo revision.", + "type": "object" + }, + "ListDebuggeesResponse": { + "properties": { + "debuggees": { + "description": "List of debuggees accessible to the calling user.\nNote that the `description` field is the only human readable field\nthat should be displayed to the user.\nThe fields `debuggee.id` and `description` fields are guaranteed to be\nset on each debuggee.", + "type": "array", + "items": { + "$ref": "Debuggee" + } + } + }, + "id": "ListDebuggeesResponse", + "description": "Response for listing debuggees.", + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "SourceLocation": { + "description": "Represents a location in the source code.", + "type": "object", + "properties": { + "path": { + "description": "Path to the source file within the source context of the target binary.", + "type": "string" + }, + "line": { + "description": "Line inside the file. The first line in the file has the value `1`.", + "format": "int32", + "type": "integer" + } + }, + "id": "SourceLocation" + }, + "Debuggee": { + "properties": { + "extSourceContexts": { + "description": "References to the locations and revisions of the source code used in the\ndeployed application.\n\nContexts describing a remote repo related to the source code\nhave a `category` label of `remote_repo`. Source snapshot source\ncontexts have a `category` of `snapshot`.", + "type": "array", + "items": { + "$ref": "ExtendedSourceContext" + } + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "A set of custom debuggee properties, populated by the agent, to be\ndisplayed to the user.", + "type": "object" + }, + "status": { + "$ref": "StatusMessage", + "description": "Human readable message to be displayed to the user about this debuggee.\nAbsence of this field indicates no status. The message can be either\ninformational or an error status." + }, + "isInactive": { + "description": "If set to `true`, indicates that the debuggee is considered as inactive by\nthe Controller service.", + "type": "boolean" + }, "project": { - "type": "string", - "description": "Project number of a Google Cloud project whose debuggees to list.", - "location": "query" + "description": "Project the debuggee is associated with.\nUse the project number when registering a Google Cloud Platform project.", + "type": "string" }, - "includeInactive": { - "type": "boolean", - "description": "When set to `true`, the result includes all debuggees. Otherwise, the result includes only debuggees that are active.", - "location": "query" + "agentVersion": { + "description": "Version ID of the agent release. The version ID is structured as\nfollowing: `domain/type/vmajor.minor` (for example\n`google.com/gcp-java/v1.1`).", + "type": "string" }, - "clientVersion": { - "type": "string", - "description": "The client version making the call. Following: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "location": "query" + "isDisabled": { + "description": "If set to `true`, indicates that the agent should disable itself and\ndetach from the debuggee.", + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the debuggee generated by the controller service.", + "type": "string" + }, + "uniquifier": { + "description": "Debuggee uniquifier within the project.\nAny string that identifies the application within the project can be used.\nIncluding environment and version or build IDs is recommended.", + "type": "string" + }, + "description": { + "description": "Human readable description of the debuggee.\nIncluding a human-readable project name, environment name and version\ninformation is recommended.", + "type": "string" + }, + "sourceContexts": { + "description": "References to the locations and revisions of the source code used in the\ndeployed application.\n\nNOTE: This field is deprecated. Consumers should use\n`ext_source_contexts` if it is not empty. Debug agents should populate\nboth this field and `ext_source_contexts`.", + "type": "array", + "items": { + "$ref": "SourceContext" + } } - }, - "response": { - "$ref": "ListDebuggeesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ] - } - }, - "resources": { - "breakpoints": { - "methods": { - "set": { - "id": "clouddebugger.debugger.debuggees.breakpoints.set", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set", - "httpMethod": "POST", - "description": "Sets the breakpoint to the debuggee.", - "parameters": { - "debuggeeId": { - "type": "string", - "description": "ID of the debuggee where the breakpoint is to be set.", - "required": true, - "location": "path" - }, - "clientVersion": { - "type": "string", - "description": "The client version making the call. Following: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "location": "query" - } - }, - "parameterOrder": [ - "debuggeeId" - ], - "request": { - "$ref": "Breakpoint" - }, - "response": { - "$ref": "SetBreakpointResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ] + }, + "id": "Debuggee", + "description": "Represents the application to debug. The application may include one or more\nreplicated processes executing the same code. Each of these processes is\nattached with a debugger agent, carrying out the debugging commands.\nThe agents attached to the same debuggee are identified by using exactly the\nsame field values when registering.", + "type": "object" + }, + "ProjectRepoId": { + "properties": { + "projectId": { + "description": "The ID of the project.", + "type": "string" }, - "get": { - "id": "clouddebugger.debugger.debuggees.breakpoints.get", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", - "httpMethod": "GET", - "description": "Gets breakpoint information.", - "parameters": { - "debuggeeId": { - "type": "string", - "description": "ID of the debuggee whose breakpoint to get.", - "required": true, - "location": "path" - }, - "breakpointId": { - "type": "string", - "description": "ID of the breakpoint to get.", - "required": true, - "location": "path" - }, - "clientVersion": { - "type": "string", - "description": "The client version making the call. Following: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "location": "query" + "repoName": { + "description": "The name of the repo. Leave empty for the default repo.", + "type": "string" + } + }, + "id": "ProjectRepoId", + "description": "Selects a repo using a Google Cloud Platform project ID\n(e.g. winged-cargo-31) and a repo name within that project.", + "type": "object" + }, + "ListActiveBreakpointsResponse": { + "properties": { + "breakpoints": { + "description": "List of all active breakpoints.\nThe fields `id` and `location` are guaranteed to be set on each breakpoint.", + "type": "array", + "items": { + "$ref": "Breakpoint" } - }, - "parameterOrder": [ - "debuggeeId", - "breakpointId" - ], - "response": { - "$ref": "GetBreakpointResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ] }, - "delete": { - "id": "clouddebugger.debugger.debuggees.breakpoints.delete", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", - "httpMethod": "DELETE", - "description": "Deletes the breakpoint from the debuggee.", - "parameters": { - "debuggeeId": { - "type": "string", - "description": "ID of the debuggee whose breakpoint to delete.", - "required": true, - "location": "path" - }, - "breakpointId": { - "type": "string", - "description": "ID of the breakpoint to delete.", - "required": true, - "location": "path" - }, - "clientVersion": { - "type": "string", - "description": "The client version making the call. Following: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "location": "query" + "waitExpired": { + "description": "The `wait_expired` field is set to true by the server when the\nrequest times out and the field `success_on_timeout` is set to true.", + "type": "boolean" + }, + "nextWaitToken": { + "description": "A wait token that can be used in the next method call to block until\nthe list of breakpoints changes.", + "type": "string" + } + }, + "id": "ListActiveBreakpointsResponse", + "description": "Response for listing active breakpoints.", + "type": "object" + }, + "CloudWorkspaceSourceContext": { + "description": "A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.", + "type": "object", + "properties": { + "snapshotId": { + "description": "The ID of the snapshot.\nAn empty snapshot_id refers to the most recent snapshot.", + "type": "string" + }, + "workspaceId": { + "description": "The ID of the workspace.", + "$ref": "CloudWorkspaceId" + } + }, + "id": "CloudWorkspaceSourceContext" + }, + "UpdateActiveBreakpointResponse": { + "description": "Response for updating an active breakpoint.\nThe message is defined to allow future extensions.", + "type": "object", + "properties": {}, + "id": "UpdateActiveBreakpointResponse" + }, + "GerritSourceContext": { + "properties": { + "gerritProject": { + "description": "The full project name within the host. Projects may be nested, so\n\"project/subproject\" is a valid project name.\nThe \"repo name\" is hostURI/project.", + "type": "string" + }, + "aliasContext": { + "$ref": "AliasContext", + "description": "An alias, which may be a branch or tag." + }, + "hostUri": { + "description": "The URI of a running Gerrit instance.", + "type": "string" + }, + "revisionId": { + "description": "A revision (commit) ID.", + "type": "string" + }, + "aliasName": { + "description": "The name of an alias (branch, tag, etc.).", + "type": "string" + } + }, + "id": "GerritSourceContext", + "description": "A SourceContext referring to a Gerrit project.", + "type": "object" + }, + "CloudWorkspaceId": { + "description": "A CloudWorkspaceId is a unique identifier for a cloud workspace.\nA cloud workspace is a place associated with a repo where modified files\ncan be stored before they are committed.", + "type": "object", + "properties": { + "repoId": { + "description": "The ID of the repo containing the workspace.", + "$ref": "RepoId" + }, + "name": { + "description": "The unique name of the workspace within the repo. This is the name\nchosen by the client in the Source API's CreateWorkspace method.", + "type": "string" + } + }, + "id": "CloudWorkspaceId" + }, + "ListBreakpointsResponse": { + "description": "Response for listing breakpoints.", + "type": "object", + "properties": { + "breakpoints": { + "description": "List of breakpoints matching the request.\nThe fields `id` and `location` are guaranteed to be set on each breakpoint.\nThe fields: `stack_frames`, `evaluated_expressions` and `variable_table`\nare cleared on each breakpoint regardless of it's status.", + "type": "array", + "items": { + "$ref": "Breakpoint" } - }, - "parameterOrder": [ - "debuggeeId", - "breakpointId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ] }, - "list": { - "id": "clouddebugger.debugger.debuggees.breakpoints.list", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints", - "httpMethod": "GET", - "description": "Lists all breakpoints for the debuggee.", - "parameters": { - "debuggeeId": { - "type": "string", - "description": "ID of the debuggee whose breakpoints to list.", - "required": true, - "location": "path" - }, - "includeAllUsers": { - "type": "boolean", - "description": "When set to `true`, the response includes the list of breakpoints set by any user. Otherwise, it includes only breakpoints set by the caller.", - "location": "query" - }, - "includeInactive": { - "type": "boolean", - "description": "When set to `true`, the response includes active and inactive breakpoints. Otherwise, it includes only active breakpoints.", - "location": "query" - }, - "action.value": { - "type": "string", - "description": "Only breakpoints with the specified action will pass the filter.", - "enum": [ + "nextWaitToken": { + "description": "A wait token that can be used in the next call to `list` (REST) or\n`ListBreakpoints` (RPC) to block until the list of breakpoints has changes.", + "type": "string" + } + }, + "id": "ListBreakpointsResponse" + }, + "Breakpoint": { + "properties": { + "userEmail": { + "description": "E-mail address of the user that created this breakpoint", + "type": "string" + }, + "action": { + "enumDescriptions": [ + "Capture stack frame and variables and update the breakpoint.\nThe data is only captured once. After that the breakpoint is set\nin a final state.", + "Log each breakpoint hit. The breakpoint remains active until\ndeleted or expired." + ], + "enum": [ "CAPTURE", "LOG" - ], - "location": "query" - }, - "stripResults": { - "type": "boolean", - "description": "When set to `true`, the response breakpoints are stripped of the results fields: `stack_frames`, `evaluated_expressions` and `variable_table`.", - "location": "query" - }, - "waitToken": { - "type": "string", - "description": "A wait token that, if specified, blocks the call until the breakpoints list has changed, or a server selected timeout has expired. The value should be set from the last response. The error code `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which should be called again with the same `wait_token`.", - "location": "query" - }, - "clientVersion": { - "type": "string", - "description": "The client version making the call. Following: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "location": "query" + ], + "description": "Action that the agent should perform when the code at the\nbreakpoint location is hit.", + "type": "string" + }, + "logLevel": { + "enumDescriptions": [ + "Information log message.", + "Warning log message.", + "Error log message." + ], + "enum": [ + "INFO", + "WARNING", + "ERROR" + ], + "description": "Indicates the severity of the log. Only relevant when action is `LOG`.", + "type": "string" + }, + "id": { + "description": "Breakpoint identifier, unique in the scope of the debuggee.", + "type": "string" + }, + "location": { + "description": "Breakpoint source location.", + "$ref": "SourceLocation" + }, + "finalTime": { + "description": "Time this breakpoint was finalized as seen by the server in seconds\nresolution.", + "format": "google-datetime", + "type": "string" + }, + "variableTable": { + "description": "The `variable_table` exists to aid with computation, memory and network\ntraffic optimization. It enables storing a variable once and reference\nit from multiple variables, including variables stored in the\n`variable_table` itself.\nFor example, the same `this` object, which may appear at many levels of\nthe stack, can have all of its data stored once in this table. The\nstack frame variables then would hold only a reference to it.\n\nThe variable `var_table_index` field is an index into this repeated field.\nThe stored objects are nameless and get their name from the referencing\nvariable. The effective variable is a merge of the referencing variable\nand the referenced variable.", + "type": "array", + "items": { + "$ref": "Variable" } - }, - "parameterOrder": [ - "debuggeeId" - ], - "response": { - "$ref": "ListBreakpointsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ] + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "A set of custom breakpoint properties, populated by the agent, to be\ndisplayed to the user.", + "type": "object" + }, + "createTime": { + "description": "Time this breakpoint was created by the server in seconds resolution.", + "format": "google-datetime", + "type": "string" + }, + "logMessageFormat": { + "description": "Only relevant when action is `LOG`. Defines the message to log when\nthe breakpoint hits. The message may include parameter placeholders `$0`,\n`$1`, etc. These placeholders are replaced with the evaluated value\nof the appropriate expression. Expressions not referenced in\n`log_message_format` are not logged.\n\nExample: `Message received, id = $0, count = $1` with\n`expressions` = `[ message.id, message.count ]`.", + "type": "string" + }, + "expressions": { + "description": "List of read-only expressions to evaluate at the breakpoint location.\nThe expressions are composed using expressions in the programming language\nat the source location. If the breakpoint action is `LOG`, the evaluated\nexpressions are included in log statements.", + "type": "array", + "items": { + "type": "string" + } + }, + "evaluatedExpressions": { + "description": "Values of evaluated expressions at breakpoint time.\nThe evaluated expressions appear in exactly the same order they\nare listed in the `expressions` field.\nThe `name` field holds the original expression text, the `value` or\n`members` field holds the result of the evaluated expression.\nIf the expression cannot be evaluated, the `status` inside the `Variable`\nwill indicate an error and contain the error text.", + "type": "array", + "items": { + "$ref": "Variable" + } + }, + "isFinalState": { + "description": "When true, indicates that this is a final result and the\nbreakpoint state will not change from here on.", + "type": "boolean" + }, + "stackFrames": { + "description": "The stack at breakpoint time.", + "type": "array", + "items": { + "$ref": "StackFrame" + } + }, + "condition": { + "description": "Condition that triggers the breakpoint.\nThe condition is a compound boolean expression composed using expressions\nin a programming language at the source location.", + "type": "string" + }, + "status": { + "$ref": "StatusMessage", + "description": "Breakpoint status.\n\nThe status includes an error flag and a human readable message.\nThis field is usually unset. The message can be either\ninformational or an error message. Regardless, clients should always\ndisplay the text message back to the user.\n\nError status indicates complete failure of the breakpoint.\n\nExample (non-final state): `Still loading symbols...`\n\nExamples (final state):\n\n* `Invalid line number` referring to location\n* `Field f not found in class C` referring to condition" } - } - } - } + }, + "id": "Breakpoint", + "description": "Represents the breakpoint specification, status and results.", + "type": "object" + }, + "SetBreakpointResponse": { + "properties": { + "breakpoint": { + "$ref": "Breakpoint", + "description": "Breakpoint resource.\nThe field `id` is guaranteed to be set (in addition to the echoed fileds)." + } + }, + "id": "SetBreakpointResponse", + "description": "Response for setting a breakpoint.", + "type": "object" + }, + "UpdateActiveBreakpointRequest": { + "description": "Request to update an active breakpoint.", + "type": "object", + "properties": { + "breakpoint": { + "description": "Updated breakpoint information.\nThe field 'id' must be set.", + "$ref": "Breakpoint" + } + }, + "id": "UpdateActiveBreakpointRequest" } - } - } - } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "canonicalName": "Cloud Debugger", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud_debugger": { + "description": "Manage cloud debugger" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://clouddebugger.googleapis.com/", + "ownerDomain": "google.com", + "name": "clouddebugger", + "batchPath": "batch", + "title": "Stackdriver Debugger API", + "ownerName": "Google" } diff --git a/etc/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json b/etc/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json index 3186f8a3ee..8db9cdb2f1 100644 --- a/etc/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json +++ b/etc/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json @@ -1,5 +1,5 @@ { - "id": "clouderrorreporting:v1beta1", + "canonicalName": "Clouderrorreporting", "auth": { "oauth2": { "scopes": { @@ -9,389 +9,486 @@ } } }, - "description": "Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors.\n", - "protocol": "rest", + "rootUrl": "https://clouderrorreporting.googleapis.com/", + "ownerDomain": "google.com", + "name": "clouderrorreporting", + "batchPath": "batch", "title": "Stackdriver Error Reporting API", + "ownerName": "Google", "resources": { "projects": { - "resources": { - "events": { - "methods": { - "list": { - "id": "clouderrorreporting.projects.events.list", - "response": { - "$ref": "ListEventsResponse" - }, - "parameterOrder": [ - "projectName" - ], - "description": "Lists the specified events.", - "flatPath": "v1beta1/projects/{projectsId}/events", - "httpMethod": "GET", - "parameters": { - "timeRange.period": { - "description": "Restricts the query to the specified time range.", - "enum": [ - "PERIOD_UNSPECIFIED", - "PERIOD_1_HOUR", - "PERIOD_6_HOURS", - "PERIOD_1_DAY", - "PERIOD_1_WEEK", - "PERIOD_30_DAYS" - ], - "location": "query", - "type": "string" - }, - "serviceFilter.resourceType": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", - "location": "query", - "type": "string" - }, - "projectName": { - "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "serviceFilter.service": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", - "location": "query", - "type": "string" - }, - "groupId": { - "description": "[Required] The group for which events shall be returned.", - "location": "query", - "type": "string" - }, - "serviceFilter.version": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "[Optional] The maximum number of results to return per response.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "pageToken": { - "description": "[Optional] A `next_page_token` provided by a previous response.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+projectName}/events", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "report": { - "id": "clouderrorreporting.projects.events.report", - "response": { - "$ref": "ReportErrorEventResponse" - }, - "parameterOrder": [ - "projectName" - ], - "description": "Report an individual error event.\n\nThis endpoint accepts \u003cstrong\u003eeither\u003c/strong\u003e an OAuth token,\n\u003cstrong\u003eor\u003c/strong\u003e an\n\u003ca href=\"https://support.google.com/cloud/answer/6158862\"\u003eAPI key\u003c/a\u003e\nfor authentication. To use an API key, append it to the URL as the value of\na `key` parameter. For example:\n\u003cpre\u003ePOST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456\u003c/pre\u003e", - "request": { - "$ref": "ReportedErrorEvent" - }, - "flatPath": "v1beta1/projects/{projectsId}/events:report", - "httpMethod": "POST", - "parameters": { - "projectName": { - "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+projectName}/events:report", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "groups": { - "methods": { - "update": { - "id": "clouderrorreporting.projects.groups.update", - "response": { - "$ref": "ErrorGroup" - }, - "parameterOrder": [ - "name" - ], - "description": "Replace the data for the specified group.\nFails if the group does not exist.", - "request": { - "$ref": "ErrorGroup" - }, - "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "The group resource name.\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-groupid\u003c/code\u003e", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "clouderrorreporting.projects.groups.get", - "response": { - "$ref": "ErrorGroup" - }, - "parameterOrder": [ - "groupName" - ], - "description": "Get the specified group.", - "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", - "httpMethod": "GET", - "parameters": { - "groupName": { - "description": "[Required] The group resource name. Written as\n\u003ccode\u003eprojects/\u003cvar\u003eprojectID\u003c/var\u003e/groups/\u003cvar\u003egroup_name\u003c/var\u003e\u003c/code\u003e.\nCall\n\u003ca href=\"/error-reporting/reference/rest/v1beta1/projects.groupStats/list\"\u003e\n\u003ccode\u003egroupStats.list\u003c/code\u003e\u003c/a\u003e to return a list of groups belonging to\nthis project.\n\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-group\u003c/code\u003e", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+groupName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "groupStats": { - "methods": { - "list": { - "id": "clouderrorreporting.projects.groupStats.list", - "response": { - "$ref": "ListGroupStatsResponse" - }, - "parameterOrder": [ - "projectName" - ], - "description": "Lists the specified groups.", - "flatPath": "v1beta1/projects/{projectsId}/groupStats", - "httpMethod": "GET", - "parameters": { - "alignment": { - "description": "[Optional] The alignment of the timed counts to be returned.\nDefault is `ALIGNMENT_EQUAL_AT_END`.", - "enum": [ - "ERROR_COUNT_ALIGNMENT_UNSPECIFIED", - "ALIGNMENT_EQUAL_ROUNDED", - "ALIGNMENT_EQUAL_AT_END" - ], - "location": "query", - "type": "string" - }, - "timeRange.period": { - "description": "Restricts the query to the specified time range.", - "enum": [ - "PERIOD_UNSPECIFIED", - "PERIOD_1_HOUR", - "PERIOD_6_HOURS", - "PERIOD_1_DAY", - "PERIOD_1_WEEK", - "PERIOD_30_DAYS" - ], - "location": "query", - "type": "string" - }, - "serviceFilter.resourceType": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", - "location": "query", - "type": "string" - }, - "projectName": { - "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas \u003ccode\u003eprojects/\u003c/code\u003e plus the\n\u003ca href=\"https://support.google.com/cloud/answer/6158840\"\u003eGoogle Cloud\nPlatform project ID\u003c/a\u003e.\n\nExample: \u003ccode\u003eprojects/my-project-123\u003c/code\u003e.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "order": { - "description": "[Optional] The sort order in which the results are returned.\nDefault is `COUNT_DESC`.", - "enum": [ - "GROUP_ORDER_UNSPECIFIED", - "COUNT_DESC", - "LAST_SEEN_DESC", - "CREATED_DESC", - "AFFECTED_USERS_DESC" - ], - "location": "query", - "type": "string" - }, - "groupId": { - "description": "[Optional] List all \u003ccode\u003eErrorGroupStats\u003c/code\u003e with these IDs.", - "repeated": true, - "location": "query", - "type": "string" - }, - "serviceFilter.service": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", - "location": "query", - "type": "string" - }, - "alignmentTime": { - "description": "[Optional] Time where the timed counts shall be aligned if rounded\nalignment is chosen. Default is 00:00 UTC.", - "location": "query", - "type": "string", - "format": "google-datetime" - }, - "serviceFilter.version": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "[Optional] The maximum number of results to return per response.\nDefault is 20.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "timedCountDuration": { - "description": "[Optional] The preferred duration for a single returned `TimedCount`.\nIf not set, no timed counts are returned.", - "location": "query", - "type": "string", - "format": "google-duration" - }, - "pageToken": { - "description": "[Optional] A `next_page_token` provided by a previous response. To view\nadditional results, pass this token along with the identical query\nparameters as the first request.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+projectName}/groupStats", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - }, "methods": { "deleteEvents": { + "flatPath": "v1beta1/projects/{projectsId}/events", "id": "clouderrorreporting.projects.deleteEvents", + "path": "v1beta1/{+projectName}/events", + "description": "Deletes all error events of a given project.", + "httpMethod": "DELETE", "response": { "$ref": "DeleteEventsResponse" }, "parameterOrder": [ "projectName" ], - "description": "Deletes all error events of a given project.", - "flatPath": "v1beta1/projects/{projectsId}/events", - "httpMethod": "DELETE", "parameters": { "projectName": { - "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", + "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project\nID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", "required": true, + "type": "string", "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" + "location": "path" } }, - "path": "v1beta1/{+projectName}/events", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "groups": { + "methods": { + "update": { + "description": "Replace the data for the specified group.\nFails if the group does not exist.", + "request": { + "$ref": "ErrorGroup" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ErrorGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The group resource name.\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-groupid\u003c/code\u003e", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/groups/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", + "id": "clouderrorreporting.projects.groups.update", + "path": "v1beta1/{+name}" + }, + "get": { + "description": "Get the specified group.", + "response": { + "$ref": "ErrorGroup" + }, + "parameterOrder": [ + "groupName" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "groupName": { + "location": "path", + "description": "[Required] The group resource name. Written as\n\u003ccode\u003eprojects/\u003cvar\u003eprojectID\u003c/var\u003e/groups/\u003cvar\u003egroup_name\u003c/var\u003e\u003c/code\u003e.\nCall\n\u003ca href=\"/error-reporting/reference/rest/v1beta1/projects.groupStats/list\"\u003e\n\u003ccode\u003egroupStats.list\u003c/code\u003e\u003c/a\u003e to return a list of groups belonging to\nthis project.\n\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-group\u003c/code\u003e", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/groups/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", + "path": "v1beta1/{+groupName}", + "id": "clouderrorreporting.projects.groups.get" + } + } + }, + "groupStats": { + "methods": { + "list": { + "description": "Lists the specified groups.", + "parameterOrder": [ + "projectName" + ], + "response": { + "$ref": "ListGroupStatsResponse" + }, + "httpMethod": "GET", + "parameters": { + "projectName": { + "location": "path", + "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas \u003ccode\u003eprojects/\u003c/code\u003e plus the\n\u003ca href=\"https://support.google.com/cloud/answer/6158840\"\u003eGoogle Cloud\nPlatform project ID\u003c/a\u003e.\n\nExample: \u003ccode\u003eprojects/my-project-123\u003c/code\u003e.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + }, + "timedCountDuration": { + "description": "[Optional] The preferred duration for a single returned `TimedCount`.\nIf not set, no timed counts are returned.", + "format": "google-duration", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "[Optional] A `next_page_token` provided by a previous response. To view\nadditional results, pass this token along with the identical query\nparameters as the first request.", + "type": "string" + }, + "timeRange.period": { + "enum": [ + "PERIOD_UNSPECIFIED", + "PERIOD_1_HOUR", + "PERIOD_6_HOURS", + "PERIOD_1_DAY", + "PERIOD_1_WEEK", + "PERIOD_30_DAYS" + ], + "description": "Restricts the query to the specified time range.", + "type": "string", + "location": "query" + }, + "alignment": { + "type": "string", + "location": "query", + "enum": [ + "ERROR_COUNT_ALIGNMENT_UNSPECIFIED", + "ALIGNMENT_EQUAL_ROUNDED", + "ALIGNMENT_EQUAL_AT_END" + ], + "description": "[Optional] The alignment of the timed counts to be returned.\nDefault is `ALIGNMENT_EQUAL_AT_END`." + }, + "groupId": { + "description": "[Optional] List all \u003ccode\u003eErrorGroupStats\u003c/code\u003e with these IDs.", + "type": "string", + "repeated": true, + "location": "query" + }, + "serviceFilter.service": { + "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "[Optional] The maximum number of results to return per response.\nDefault is 20.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "order": { + "description": "[Optional] The sort order in which the results are returned.\nDefault is `COUNT_DESC`.", + "type": "string", + "location": "query", + "enum": [ + "GROUP_ORDER_UNSPECIFIED", + "COUNT_DESC", + "LAST_SEEN_DESC", + "CREATED_DESC", + "AFFECTED_USERS_DESC" + ] + }, + "serviceFilter.version": { + "location": "query", + "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).", + "type": "string" + }, + "serviceFilter.resourceType": { + "location": "query", + "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", + "type": "string" + }, + "alignmentTime": { + "location": "query", + "description": "[Optional] Time where the timed counts shall be aligned if rounded\nalignment is chosen. Default is 00:00 UTC.", + "format": "google-datetime", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/groupStats", + "path": "v1beta1/{+projectName}/groupStats", + "id": "clouderrorreporting.projects.groupStats.list" + } + } + }, + "events": { + "methods": { + "list": { + "response": { + "$ref": "ListEventsResponse" + }, + "parameterOrder": [ + "projectName" + ], + "httpMethod": "GET", + "parameters": { + "serviceFilter.service": { + "location": "query", + "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "[Optional] A `next_page_token` provided by a previous response.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "[Optional] The maximum number of results to return per response.", + "format": "int32", + "type": "integer" + }, + "serviceFilter.version": { + "type": "string", + "location": "query", + "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version)." + }, + "serviceFilter.resourceType": { + "location": "query", + "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", + "type": "string" + }, + "timeRange.period": { + "enum": [ + "PERIOD_UNSPECIFIED", + "PERIOD_1_HOUR", + "PERIOD_6_HOURS", + "PERIOD_1_DAY", + "PERIOD_1_WEEK", + "PERIOD_30_DAYS" + ], + "description": "Restricts the query to the specified time range.", + "type": "string", + "location": "query" + }, + "projectName": { + "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project\nID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "groupId": { + "location": "query", + "description": "[Required] The group for which events shall be returned.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/events", + "path": "v1beta1/{+projectName}/events", + "id": "clouderrorreporting.projects.events.list", + "description": "Lists the specified events." + }, + "report": { + "httpMethod": "POST", + "parameterOrder": [ + "projectName" + ], + "response": { + "$ref": "ReportErrorEventResponse" + }, + "parameters": { + "projectName": { + "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/events:report", + "id": "clouderrorreporting.projects.events.report", + "path": "v1beta1/{+projectName}/events:report", + "request": { + "$ref": "ReportedErrorEvent" + }, + "description": "Report an individual error event.\n\nThis endpoint accepts \u003cstrong\u003eeither\u003c/strong\u003e an OAuth token,\n\u003cstrong\u003eor\u003c/strong\u003e an\n\u003ca href=\"https://support.google.com/cloud/answer/6158862\"\u003eAPI key\u003c/a\u003e\nfor authentication. To use an API key, append it to the URL as the value of\na `key` parameter. For example:\n\u003cpre\u003ePOST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456\u003c/pre\u003e" + } + } + } } } }, - "schemas": { - "ReportedErrorEvent": { - "description": "An error event which is reported to the Error Reporting system.", - "type": "object", - "properties": { - "serviceContext": { - "description": "[Required] The service context in which this error has occurred.", - "$ref": "ServiceContext" - }, - "context": { - "description": "[Optional] A description of the context in which the error occurred.", - "$ref": "ErrorContext" - }, - "eventTime": { - "description": "[Optional] Time when the event occurred.\nIf not provided, the time when the event was received by the\nError Reporting system will be used.", - "type": "string", - "format": "google-datetime" - }, - "message": { - "description": "[Required] A message describing the error. The message can contain an\nexception stack in one of the supported programming languages and formats.\nIn that case, the message is parsed and detailed exception information\nis returned when retrieving the error event again.", - "type": "string" - } - }, - "id": "ReportedErrorEvent" + "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" }, - "SourceLocation": { - "description": "Indicates a location in the source code of the service for which\nerrors are reported.\nThis data should be provided by the application when reporting an error,\nunless the error report has been generated automatically from Google App\nEngine logs. All fields are optional.", + "pp": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Pretty-print response." + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "key": { + "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", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + } + }, + "version": "v1beta1", + "baseUrl": "https://clouderrorreporting.googleapis.com/", + "servicePath": "", + "description": "Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors.\n", + "kind": "discovery#restDescription", + "basePath": "", + "id": "clouderrorreporting:v1beta1", + "revision": "20170517", + "documentationLink": "https://cloud.google.com/error-reporting/", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { + "ErrorContext": { "type": "object", "properties": { - "filePath": { - "description": "The source code filename, which can include a truncated relative\npath, or a full path from a production machine.", - "type": "string" + "reportLocation": { + "description": "The location in the source code where the decision was made to\nreport the error, usually the place where it was logged.\nFor a logged exception this would be the source line where the\nexception is logged, usually close to the place where it was\ncaught. This value is in contrast to `Exception.cause_location`,\nwhich describes the source line where the exception was thrown.", + "$ref": "SourceLocation" }, - "functionName": { - "description": "Human-readable name of a function or method.\nThe value can include optional context like the class or package name.\nFor example, `my.package.MyClass.method` in case of Java.", - "type": "string" + "sourceReferences": { + "description": "Source code that was used to build the executable which has\ncaused the given error message.", + "type": "array", + "items": { + "$ref": "SourceReference" + } }, - "lineNumber": { - "description": "1-based. 0 indicates that the line number is unknown.", - "type": "integer", - "format": "int32" + "httpRequest": { + "description": "The HTTP request which was processed when the error was\ntriggered.", + "$ref": "HttpRequestContext" + }, + "user": { + "description": "The user who caused or was affected by the crash.\nThis can be a user ID, an email address, or an arbitrary token that\nuniquely identifies the user.\nWhen sending an error report, leave this field empty if the user was not\nlogged in. In this case the\nError Reporting system will use other data, such as remote IP address, to\ndistinguish affected users. See `affected_users_count` in\n`ErrorGroupStats`.", + "type": "string" } }, - "id": "SourceLocation" + "id": "ErrorContext", + "description": "A description of the context in which an error occurred.\nThis data should be provided by the application when reporting an error,\nunless the\nerror report has been generated automatically from Google App Engine logs." + }, + "TrackingIssue": { + "properties": { + "url": { + "type": "string", + "description": "A URL pointing to a related entry in an issue tracking system.\nExample: https://github.com/user/project/issues/4" + } + }, + "id": "TrackingIssue", + "description": "Information related to tracking the progress on resolving the error.", + "type": "object" }, "ErrorGroupStats": { "description": "Data extracted for a specific group based on certain filter criteria,\nsuch as a given time period and/or service filter.", "type": "object", "properties": { "representative": { - "description": "An arbitrary event that is chosen as representative for the whole group.\nThe representative event is intended to be used as a quick preview for\nthe whole group. Events in the group are usually sufficiently similar\nto each other such that showing an arbitrary representative provides\ninsight into the characteristics of the group as a whole.", - "$ref": "ErrorEvent" + "$ref": "ErrorEvent", + "description": "An arbitrary event that is chosen as representative for the whole group.\nThe representative event is intended to be used as a quick preview for\nthe whole group. Events in the group are usually sufficiently similar\nto each other such that showing an arbitrary representative provides\ninsight into the characteristics of the group as a whole." }, - "numAffectedServices": { - "description": "The total number of services with a non-zero error count for the given\nfilter criteria.", - "type": "integer", - "format": "int32" + "timedCounts": { + "description": "Approximate number of occurrences over time.\nTimed counts returned by ListGroups are guaranteed to be:\n\n- Inside the requested time interval\n- Non-overlapping, and\n- Ordered by ascending time.", + "type": "array", + "items": { + "$ref": "TimedCount" + } }, - "affectedUsersCount": { - "description": "Approximate number of affected users in the given group that\nmatch the filter criteria.\nUsers are distinguished by data in the `ErrorContext` of the\nindividual error events, such as their login name or their remote\nIP address in case of HTTP requests.\nThe number of affected users can be zero even if the number of\nerrors is non-zero if no data was provided from which the\naffected user could be deduced.\nUsers are counted based on data in the request\ncontext that was provided in the error report. If more users are\nimplicitly affected, such as due to a crash of the whole service,\nthis is not reflected here.", - "type": "string", - "format": "int64" - }, - "count": { - "description": "Approximate total number of events in the given group that match\nthe filter criteria.", - "type": "string", - "format": "int64" + "group": { + "$ref": "ErrorGroup", + "description": "Group data that is independent of the filter criteria." }, "firstSeenTime": { "description": "Approximate first occurrence that was ever seen for this group\nand which matches the given filter criteria, ignoring the\ntime_range that was specified in the request.", - "type": "string", - "format": "google-datetime" + "format": "google-datetime", + "type": "string" + }, + "count": { + "description": "Approximate total number of events in the given group that match\nthe filter criteria.", + "format": "int64", + "type": "string" + }, + "affectedUsersCount": { + "description": "Approximate number of affected users in the given group that\nmatch the filter criteria.\nUsers are distinguished by data in the `ErrorContext` of the\nindividual error events, such as their login name or their remote\nIP address in case of HTTP requests.\nThe number of affected users can be zero even if the number of\nerrors is non-zero if no data was provided from which the\naffected user could be deduced.\nUsers are counted based on data in the request\ncontext that was provided in the error report. If more users are\nimplicitly affected, such as due to a crash of the whole service,\nthis is not reflected here.", + "format": "int64", + "type": "string" }, "lastSeenTime": { "description": "Approximate last occurrence that was ever seen for this group and\nwhich matches the given filter criteria, ignoring the time_range\nthat was specified in the request.", - "type": "string", - "format": "google-datetime" - }, - "group": { - "description": "Group data that is independent of the filter criteria.", - "$ref": "ErrorGroup" + "format": "google-datetime", + "type": "string" }, "affectedServices": { "description": "Service contexts with a non-zero error count for the given filter\ncriteria. This list can be truncated if multiple services are affected.\nRefer to `num_affected_services` for the total count.", @@ -400,34 +497,80 @@ "$ref": "ServiceContext" } }, - "timedCounts": { - "description": "Approximate number of occurrences over time.\nTimed counts returned by ListGroups are guaranteed to be:\n\n- Inside the requested time interval\n- Non-overlapping, and\n- Ordered by ascending time.", - "type": "array", - "items": { - "$ref": "TimedCount" - } + "numAffectedServices": { + "description": "The total number of services with a non-zero error count for the given\nfilter criteria.", + "format": "int32", + "type": "integer" } }, "id": "ErrorGroupStats" }, - "ErrorContext": { - "description": "A description of the context in which an error occurred.\nThis data should be provided by the application when reporting an error,\nunless the\nerror report has been generated automatically from Google App Engine logs.", + "ListEventsResponse": { + "description": "Contains a set of requested error events.", "type": "object", "properties": { - "httpRequest": { - "description": "The HTTP request which was processed when the error was\ntriggered.", - "$ref": "HttpRequestContext" + "errorEvents": { + "description": "The error events which match the given request.", + "type": "array", + "items": { + "$ref": "ErrorEvent" + } }, - "reportLocation": { - "description": "The location in the source code where the decision was made to\nreport the error, usually the place where it was logged.\nFor a logged exception this would be the source line where the\nexception is logged, usually close to the place where it was\ncaught. This value is in contrast to `Exception.cause_location`,\nwhich describes the source line where the exception was thrown.", - "$ref": "SourceLocation" + "nextPageToken": { + "description": "If non-empty, more results are available.\nPass this token, along with the same query parameters as the first\nrequest, to view the next page of results.", + "type": "string" }, - "user": { - "description": "The user who caused or was affected by the crash.\nThis can be a user ID, an email address, or an arbitrary token that\nuniquely identifies the user.\nWhen sending an error report, leave this field empty if the user was not\nlogged in. In this case the\nError Reporting system will use other data, such as remote IP address, to\ndistinguish affected users. See `affected_users_count` in\n`ErrorGroupStats`.", + "timeRangeBegin": { + "description": "The timestamp specifies the start time to which the request was restricted.", + "format": "google-datetime", "type": "string" } }, - "id": "ErrorContext" + "id": "ListEventsResponse" + }, + "TimedCount": { + "description": "The number of errors in a given time period.\nAll numbers are approximate since the error events are sampled\nbefore counting them.", + "type": "object", + "properties": { + "endTime": { + "description": "End of the time period to which `count` refers (excluded).", + "format": "google-datetime", + "type": "string" + }, + "count": { + "description": "Approximate number of occurrences in the given time period.", + "format": "int64", + "type": "string" + }, + "startTime": { + "description": "Start of the time period to which `count` refers (included).", + "format": "google-datetime", + "type": "string" + } + }, + "id": "TimedCount" + }, + "ErrorGroup": { + "type": "object", + "properties": { + "groupId": { + "description": "Group IDs are unique for a given project. If the same kind of error\noccurs in different service contexts, it will receive the same group ID.", + "type": "string" + }, + "trackingIssues": { + "description": "Associated tracking issues.", + "type": "array", + "items": { + "$ref": "TrackingIssue" + } + }, + "name": { + "description": "The group resource name.\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-groupid\u003c/code\u003e", + "type": "string" + } + }, + "id": "ErrorGroup", + "description": "Description of a group of similar error events." }, "ServiceContext": { "description": "Describes a running service that sends errors.\nIts version changes over time and multiple versions can run in parallel.", @@ -437,38 +580,36 @@ "description": "Type of the MonitoredResource. List of possible values:\nhttps://cloud.google.com/monitoring/api/resources\n\nValue is set automatically for incoming errors and must not be set when\nreporting errors.", "type": "string" }, - "service": { - "description": "An identifier of the service, such as the name of the\nexecutable, job, or Google App Engine service name. This field is expected\nto have a low number of values that are relatively stable over time, as\nopposed to `version`, which can be changed whenever new code is deployed.\n\nContains the service name for error reports extracted from Google\nApp Engine logs or `default` if the App Engine default service is used.", + "version": { + "description": "Represents the source code version that the developer provided,\nwhich could represent a version label or a Git SHA-1 hash, for example.\nFor App Engine standard environment, the version is set to the version of\nthe app.", "type": "string" }, - "version": { - "description": "Represents the source code version that the developer provided,\nwhich could represent a version label or a Git SHA-1 hash, for example.", + "service": { + "description": "An identifier of the service, such as the name of the\nexecutable, job, or Google App Engine service name. This field is expected\nto have a low number of values that are relatively stable over time, as\nopposed to `version`, which can be changed whenever new code is deployed.\n\nContains the service name for error reports extracted from Google\nApp Engine logs or `default` if the App Engine default service is used.", "type": "string" } }, "id": "ServiceContext" }, - "ErrorGroup": { - "description": "Description of a group of similar error events.", + "SourceLocation": { + "description": "Indicates a location in the source code of the service for which errors are\nreported. `functionName` must be provided by the application when reporting\nan error, unless the error report contains a `message` with a supported\nexception stack trace. All fields are optional for the later case.", "type": "object", "properties": { - "groupId": { - "description": "Group IDs are unique for a given project. If the same kind of error\noccurs in different service contexts, it will receive the same group ID.", + "lineNumber": { + "type": "integer", + "description": "1-based. 0 indicates that the line number is unknown.", + "format": "int32" + }, + "functionName": { + "description": "Human-readable name of a function or method.\nThe value can include optional context like the class or package name.\nFor example, `my.package.MyClass.method` in case of Java.", "type": "string" }, - "name": { - "description": "The group resource name.\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-groupid\u003c/code\u003e", + "filePath": { + "description": "The source code filename, which can include a truncated relative\npath, or a full path from a production machine.", "type": "string" - }, - "trackingIssues": { - "description": "Associated tracking issues.", - "type": "array", - "items": { - "$ref": "TrackingIssue" - } } }, - "id": "ErrorGroup" + "id": "SourceLocation" }, "ReportErrorEventResponse": { "description": "Response for reporting an individual error event.\nData may be added to this message in the future.", @@ -476,113 +617,23 @@ "properties": {}, "id": "ReportErrorEventResponse" }, - "TrackingIssue": { - "description": "Information related to tracking the progress on resolving the error.", - "type": "object", - "properties": { - "url": { - "description": "A URL pointing to a related entry in an issue tracking system.\nExample: https://github.com/user/project/issues/4", - "type": "string" - } - }, - "id": "TrackingIssue" - }, - "DeleteEventsResponse": { - "description": "Response message for deleting error events.", - "type": "object", - "properties": {}, - "id": "DeleteEventsResponse" - }, - "ErrorEvent": { - "description": "An error event which is returned by the Error Reporting system.", - "type": "object", - "properties": { - "serviceContext": { - "description": "The `ServiceContext` for which this error was reported.", - "$ref": "ServiceContext" - }, - "context": { - "description": "Data about the context in which the error occurred.", - "$ref": "ErrorContext" - }, - "eventTime": { - "description": "Time when the event occurred as provided in the error report.\nIf the report did not contain a timestamp, the time the error was received\nby the Error Reporting system is used.", - "type": "string", - "format": "google-datetime" - }, - "message": { - "description": "The stack trace that was reported or logged by the service.", - "type": "string" - } - }, - "id": "ErrorEvent" - }, - "ListEventsResponse": { - "description": "Contains a set of requested error events.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "If non-empty, more results are available.\nPass this token, along with the same query parameters as the first\nrequest, to view the next page of results.", - "type": "string" - }, - "timeRangeBegin": { - "description": "The timestamp specifies the start time to which the request was restricted.", - "type": "string", - "format": "google-datetime" - }, - "errorEvents": { - "description": "The error events which match the given request.", - "type": "array", - "items": { - "$ref": "ErrorEvent" - } - } - }, - "id": "ListEventsResponse" - }, - "TimedCount": { - "description": "The number of errors in a given time period.\nAll numbers are approximate since the error events are sampled\nbefore counting them.", - "type": "object", - "properties": { - "startTime": { - "description": "Start of the time period to which `count` refers (included).", - "type": "string", - "format": "google-datetime" - }, - "endTime": { - "description": "End of the time period to which `count` refers (excluded).", - "type": "string", - "format": "google-datetime" - }, - "count": { - "description": "Approximate number of occurrences in the given time period.", - "type": "string", - "format": "int64" - } - }, - "id": "TimedCount" - }, "HttpRequestContext": { "description": "HTTP request data that is related to a reported error.\nThis data should be provided by the application when reporting an error,\nunless the\nerror report has been generated automatically from Google App Engine logs.", "type": "object", "properties": { + "responseStatusCode": { + "description": "The HTTP response status code for the request.", + "format": "int32", + "type": "integer" + }, "method": { "description": "The type of HTTP request, such as `GET`, `POST`, etc.", "type": "string" }, - "responseStatusCode": { - "description": "The HTTP response status code for the request.", - "type": "integer", - "format": "int32" - }, "remoteIp": { "description": "The IP address from which the request originated.\nThis can be IPv4, IPv6, or a token which is derived from the\nIP address, depending on the data that has been provided\nin the error report.", "type": "string" }, - "url": { - "description": "The URL of the request.", - "type": "string" - }, "referrer": { "description": "The referrer information that is provided with the request.", "type": "string" @@ -590,6 +641,10 @@ "userAgent": { "description": "The user agent information that is provided with the request.", "type": "string" + }, + "url": { + "type": "string", + "description": "The URL of the request." } }, "id": "HttpRequestContext" @@ -604,8 +659,8 @@ }, "timeRangeBegin": { "description": "The timestamp specifies the start time to which the request was restricted.\nThe start time is set based on the requested time range. It may be adjusted\nto a later time if a project has exceeded the storage quota and older data\nhas been deleted.", - "type": "string", - "format": "google-datetime" + "format": "google-datetime", + "type": "string" }, "errorGroupStats": { "description": "The error group stats which match the given request.", @@ -616,113 +671,80 @@ } }, "id": "ListGroupStatsResponse" + }, + "SourceReference": { + "description": "A reference to a particular snapshot of the source tree used to build and\ndeploy an application.", + "type": "object", + "properties": { + "revisionId": { + "description": "The canonical and persistent identifier of the deployed revision.\nExample (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", + "type": "string" + }, + "repository": { + "description": "Optional. A URI string identifying the repository.\nExample: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", + "type": "string" + } + }, + "id": "SourceReference" + }, + "DeleteEventsResponse": { + "description": "Response message for deleting error events.", + "type": "object", + "properties": {}, + "id": "DeleteEventsResponse" + }, + "ErrorEvent": { + "description": "An error event which is returned by the Error Reporting system.", + "type": "object", + "properties": { + "serviceContext": { + "$ref": "ServiceContext", + "description": "The `ServiceContext` for which this error was reported." + }, + "eventTime": { + "description": "Time when the event occurred as provided in the error report.\nIf the report did not contain a timestamp, the time the error was received\nby the Error Reporting system is used.", + "format": "google-datetime", + "type": "string" + }, + "context": { + "$ref": "ErrorContext", + "description": "Data about the context in which the error occurred." + }, + "message": { + "description": "The stack trace that was reported or logged by the service.", + "type": "string" + } + }, + "id": "ErrorEvent" + }, + "ReportedErrorEvent": { + "description": "An error event which is reported to the Error Reporting system.", + "type": "object", + "properties": { + "context": { + "$ref": "ErrorContext", + "description": "[Optional] A description of the context in which the error occurred." + }, + "message": { + "description": "[Required] The error message.\nIf no `context.reportLocation` is provided, the message must contain a\nheader (typically consisting of the exception type name and an error\nmessage) and an exception stack trace in one of the supported programming\nlanguages and formats.\nSupported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.\nSupported stack trace formats are:\n\n* **Java**: Must be the return value of [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29).\n* **Python**: Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc).\n* **JavaScript**: Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API)\nas returned by V8.\n* **Ruby**: Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace).\n* **C#**: Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx).\n* **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)`\nand contain the result of [`(string)$exception`](http://php.net/manual/en/exception.tostring.php).\n* **Go**: Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack).", + "type": "string" + }, + "serviceContext": { + "$ref": "ServiceContext", + "description": "[Required] The service context in which this error has occurred." + }, + "eventTime": { + "description": "[Optional] Time when the event occurred.\nIf not provided, the time when the event was received by the\nError Reporting system will be used.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "ReportedErrorEvent" } }, - "revision": "20161114", - "basePath": "", + "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "version_module": "True", - "canonicalName": "Clouderrorreporting", - "discoveryVersion": "v1", - "baseUrl": "https://clouderrorreporting.googleapis.com/", - "name": "clouderrorreporting", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - } - }, - "documentationLink": "https://cloud.google.com/error-reporting/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v1beta1", - "rootUrl": "https://clouderrorreporting.googleapis.com/", - "kind": "discovery#restDescription" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + } } diff --git a/etc/api/cloudkms/v1beta1/cloudkms-api.json b/etc/api/cloudkms/v1beta1/cloudkms-api.json new file mode 100644 index 0000000000..0ee182f76e --- /dev/null +++ b/etc/api/cloudkms/v1beta1/cloudkms-api.json @@ -0,0 +1,1531 @@ +{ + "description": "Manages encryption for your cloud services the same way you do on-premise. You can generate, use, rotate, and destroy AES256 encryption keys.", + "kind": "discovery#restDescription", + "servicePath": "", + "basePath": "", + "id": "cloudkms:v1beta1", + "documentationLink": "https://cloud.google.com/kms/", + "revision": "20170515", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsRequest" + }, + "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "iamOwned": { + "type": "boolean" + }, + "rules": { + "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", + "type": "array", + "items": { + "$ref": "Rule" + } + }, + "version": { + "description": "Version of the `Policy`. The default version is 0.", + "format": "int32", + "type": "integer" + }, + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "type": "array", + "items": { + "$ref": "AuditConfig" + } + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", + "type": "array", + "items": { + "$ref": "Binding" + } + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "format": "byte", + "type": "string" + } + }, + "id": "Policy" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Location" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListLocationsResponse" + }, + "KeyRing": { + "description": "A KeyRing is a toplevel logical grouping of CryptoKeys.", + "type": "object", + "properties": { + "createTime": { + "description": "Output only. The time at which this KeyRing was created.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Output only. The resource name for the KeyRing in the format\n`projects/*/locations/*/keyRings/*`.", + "type": "string" + } + }, + "id": "KeyRing" + }, + "EncryptResponse": { + "description": "Response message for KeyManagementService.Encrypt.", + "type": "object", + "properties": { + "name": { + "description": "The resource name of the CryptoKeyVersion used in encryption.", + "type": "string" + }, + "ciphertext": { + "description": "The encrypted data.", + "format": "byte", + "type": "string" + } + }, + "id": "EncryptResponse" + }, + "UpdateCryptoKeyPrimaryVersionRequest": { + "description": "Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.", + "type": "object", + "properties": { + "cryptoKeyVersionId": { + "description": "The id of the child CryptoKeyVersion to use as primary.", + "type": "string" + } + }, + "id": "UpdateCryptoKeyPrimaryVersionRequest" + }, + "RestoreCryptoKeyVersionRequest": { + "description": "Request message for KeyManagementService.RestoreCryptoKeyVersion.", + "type": "object", + "properties": {}, + "id": "RestoreCryptoKeyVersionRequest" + }, + "ListKeyRingsResponse": { + "description": "Response message for KeyManagementService.ListKeyRings.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass this value in\nListKeyRingsRequest.page_token to retrieve the next page of results.", + "type": "string" + }, + "totalSize": { + "description": "The total number of KeyRings that matched the query.", + "format": "int32", + "type": "integer" + }, + "keyRings": { + "description": "The list of KeyRings.", + "type": "array", + "items": { + "$ref": "KeyRing" + } + } + }, + "id": "ListKeyRingsResponse" + }, + "DataAccessOptions": { + "description": "Write a Data Access (Gin) log", + "type": "object", + "properties": {}, + "id": "DataAccessOptions" + }, + "AuditConfig": { + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", + "type": "object", + "properties": { + "service": { + "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", + "type": "string" + }, + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "type": "array", + "items": { + "$ref": "AuditLogConfig" + } + }, + "exemptedMembers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "AuditConfig" + }, + "CryptoKeyVersion": { + "description": "A CryptoKeyVersion represents an individual cryptographic key, and the\nassociated key material.\n\nIt can be used for cryptographic operations either directly, or via its\nparent CryptoKey, in which case the server will choose the appropriate\nversion for the operation.", + "type": "object", + "properties": { + "createTime": { + "description": "Output only. The time at which this CryptoKeyVersion was created.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "Not specified.", + "This version may be used in Encrypt and\nDecrypt requests.", + "This version may not be used, but the key material is still available,\nand the version can be placed back into the ENABLED state.", + "This version is destroyed, and the key material is no longer stored.\nA version may not leave this state once entered.", + "This version is scheduled for destruction, and will be destroyed soon.\nCall\nRestoreCryptoKeyVersion\nto put it back into the DISABLED state." + ], + "enum": [ + "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED", + "ENABLED", + "DISABLED", + "DESTROYED", + "DESTROY_SCHEDULED" + ], + "description": "The current state of the CryptoKeyVersion.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", + "type": "string" + }, + "destroyEventTime": { + "description": "Output only. The time this CryptoKeyVersion's key material was\ndestroyed. Only present if state is\nDESTROYED.", + "format": "google-datetime", + "type": "string" + }, + "destroyTime": { + "description": "Output only. The time this CryptoKeyVersion's key material is scheduled\nfor destruction. Only present if state is\nDESTROY_SCHEDULED.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "CryptoKeyVersion" + }, + "CloudAuditOptions": { + "description": "Write a Cloud Audit log", + "type": "object", + "properties": { + "logName": { + "enumDescriptions": [ + "Default. Should not be used.", + "Corresponds to \"cloudaudit.googleapis.com/activity\"", + "Corresponds to \"cloudaudit.googleapis.com/data_access\"" + ], + "enum": [ + "UNSPECIFIED_LOG_NAME", + "ADMIN_ACTIVITY", + "DATA_ACCESS" + ], + "description": "The log_name to populate in the Cloud Audit Record.", + "type": "string" + } + }, + "id": "CloudAuditOptions" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "type": "array", + "items": { + "type": "string" + } + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + } + }, + "id": "Binding" + }, + "EncryptRequest": { + "description": "Request message for KeyManagementService.Encrypt.", + "type": "object", + "properties": { + "additionalAuthenticatedData": { + "description": "Optional data that, if specified, must also be provided during decryption\nthrough DecryptRequest.additional_authenticated_data. Must be no\nlarger than 64KiB.", + "format": "byte", + "type": "string" + }, + "plaintext": { + "description": "Required. The data to encrypt. Must be no larger than 64KiB.", + "format": "byte", + "type": "string" + } + }, + "id": "EncryptRequest" + }, + "ListCryptoKeyVersionsResponse": { + "description": "Response message for KeyManagementService.ListCryptoKeyVersions.", + "type": "object", + "properties": { + "cryptoKeyVersions": { + "description": "The list of CryptoKeyVersions.", + "type": "array", + "items": { + "$ref": "CryptoKeyVersion" + } + }, + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeyVersionsRequest.page_token to retrieve the next page of\nresults.", + "type": "string" + }, + "totalSize": { + "description": "The total number of CryptoKeyVersions that matched the\nquery.", + "format": "int32", + "type": "integer" + } + }, + "id": "ListCryptoKeyVersionsResponse" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsResponse" + }, + "DestroyCryptoKeyVersionRequest": { + "description": "Request message for KeyManagementService.DestroyCryptoKeyVersion.", + "type": "object", + "properties": {}, + "id": "DestroyCryptoKeyVersionRequest" + }, + "CryptoKey": { + "description": "A CryptoKey represents a logical key that can be used for cryptographic\noperations.\n\nA CryptoKey is made up of one or more versions, which\nrepresent the actual key material used in cryptographic operations.", + "type": "object", + "properties": { + "createTime": { + "description": "Output only. The time at which this CryptoKey was created.", + "format": "google-datetime", + "type": "string" + }, + "rotationPeriod": { + "description": "next_rotation_time will be advanced by this period when the service\nautomatically rotates a key. Must be at least one day.\n\nIf rotation_period is set, next_rotation_time must also be set.", + "format": "google-duration", + "type": "string" + }, + "primary": { + "description": "Output only. A copy of the \"primary\" CryptoKeyVersion that will be used\nby Encrypt when this CryptoKey is given\nin EncryptRequest.name.\n\nThe CryptoKey's primary version can be updated via\nUpdateCryptoKeyPrimaryVersion.", + "$ref": "CryptoKeyVersion" + }, + "name": { + "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string" + }, + "purpose": { + "enumDescriptions": [ + "Not specified.", + "CryptoKeys with this purpose may be used with\nEncrypt and\nDecrypt." + ], + "enum": [ + "CRYPTO_KEY_PURPOSE_UNSPECIFIED", + "ENCRYPT_DECRYPT" + ], + "description": "The immutable purpose of this CryptoKey. Currently, the only acceptable\npurpose is ENCRYPT_DECRYPT.", + "type": "string" + }, + "nextRotationTime": { + "description": "At next_rotation_time, the Key Management Service will automatically:\n\n1. Create a new version of this CryptoKey.\n2. Mark the new version as primary.\n\nKey rotations performed manually via\nCreateCryptoKeyVersion and\nUpdateCryptoKeyPrimaryVersion\ndo not affect next_rotation_time.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "CryptoKey" + }, + "Rule": { + "description": "A rule to be applied in a Policy.", + "type": "object", + "properties": { + "description": { + "description": "Human-readable description of the rule.", + "type": "string" + }, + "conditions": { + "description": "Additional restrictions that must be met", + "type": "array", + "items": { + "$ref": "Condition" + } + }, + "logConfig": { + "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action.", + "type": "array", + "items": { + "$ref": "LogConfig" + } + }, + "in": { + "description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", + "type": "array", + "items": { + "type": "string" + } + }, + "permissions": { + "description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", + "type": "array", + "items": { + "type": "string" + } + }, + "action": { + "description": "Required", + "type": "string", + "enumDescriptions": [ + "Default no action.", + "Matching 'Entries' grant access.", + "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", + "Matching 'Entries' deny access.", + "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", + "Matching 'Entries' tell IAM.Check callers to generate logs." + ], + "enum": [ + "NO_ACTION", + "ALLOW", + "ALLOW_WITH_LOG", + "DENY", + "DENY_WITH_LOG", + "LOG" + ] + }, + "notIn": { + "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "Rule" + }, + "LogConfig": { + "description": "Specifies what kind of log the caller must write", + "type": "object", + "properties": { + "counter": { + "description": "Counter options.", + "$ref": "CounterOptions" + }, + "dataAccess": { + "$ref": "DataAccessOptions", + "description": "Data access options." + }, + "cloudAudit": { + "description": "Cloud audit options.", + "$ref": "CloudAuditOptions" + } + }, + "id": "LogConfig" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "format": "google-fieldmask", + "type": "string" + }, + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + } + }, + "id": "SetIamPolicyRequest" + }, + "DecryptRequest": { + "description": "Request message for KeyManagementService.Decrypt.", + "type": "object", + "properties": { + "ciphertext": { + "description": "Required. The encrypted data originally returned in\nEncryptResponse.ciphertext.", + "format": "byte", + "type": "string" + }, + "additionalAuthenticatedData": { + "description": "Optional data that must match the data originally supplied in\nEncryptRequest.additional_authenticated_data.", + "format": "byte", + "type": "string" + } + }, + "id": "DecryptRequest" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "labels": { + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "id": "Location" + }, + "ListCryptoKeysResponse": { + "description": "Response message for KeyManagementService.ListCryptoKeys.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeysRequest.page_token to retrieve the next page of results.", + "type": "string" + }, + "cryptoKeys": { + "description": "The list of CryptoKeys.", + "type": "array", + "items": { + "$ref": "CryptoKey" + } + }, + "totalSize": { + "description": "The total number of CryptoKeys that matched the query.", + "format": "int32", + "type": "integer" + } + }, + "id": "ListCryptoKeysResponse" + }, + "Condition": { + "description": "A condition to be met.", + "type": "object", + "properties": { + "op": { + "enumDescriptions": [ + "Default no-op.", + "DEPRECATED. Use IN instead.", + "DEPRECATED. Use NOT_IN instead.", + "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", + "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", + "Subject is discharged" + ], + "enum": [ + "NO_OP", + "EQUALS", + "NOT_EQUALS", + "IN", + "NOT_IN", + "DISCHARGED" + ], + "description": "An operator to apply the subject with.", + "type": "string" + }, + "svc": { + "description": "Trusted attributes discharged by the service.", + "type": "string" + }, + "sys": { + "enumDescriptions": [ + "Default non-attribute type", + "Region of the resource", + "Service name", + "Resource name", + "IP address of the caller" + ], + "enum": [ + "NO_ATTR", + "REGION", + "SERVICE", + "NAME", + "IP" + ], + "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", + "type": "string" + }, + "value": { + "description": "DEPRECATED. Use 'values' instead.", + "type": "string" + }, + "iam": { + "description": "Trusted attributes supplied by the IAM system.", + "type": "string", + "enumDescriptions": [ + "Default non-attribute.", + "Either principal or (if present) authority selector.", + "The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization.", + "An approver (distinct from the requester) that has authorized this\nrequest.\nWhen used with IN, the condition indicates that one of the approvers\nassociated with the request matches the specified principal, or is a\nmember of the specified group. Approvers can only grant additional\naccess, and are thus only used in a strictly positive context\n(e.g. ALLOW/IN or DENY/NOT_IN).\nSee: go/rpc-security-policy-dynamicauth.", + "What types of justifications have been supplied with this request.\nString values should match enum names from tech.iam.JustificationType,\ne.g. \"MANUAL_STRING\". It is not permitted to grant access based on\nthe *absence* of a justification, so justification conditions can only\nbe used in a \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).\n\nMultiple justifications, e.g., a Buganizer ID and a manually-entered\nreason, are normal and supported." + ], + "enum": [ + "NO_ATTR", + "AUTHORITY", + "ATTRIBUTION", + "APPROVER", + "JUSTIFICATION_TYPE" + ] + }, + "values": { + "description": "The objects of the condition. This is mutually exclusive with 'value'.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "Condition" + }, + "CounterOptions": { + "description": "Options for counters", + "type": "object", + "properties": { + "metric": { + "description": "The metric to update.", + "type": "string" + }, + "field": { + "description": "The field value to attribute.", + "type": "string" + } + }, + "id": "CounterOptions" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", + "type": "object", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", + "type": "array", + "items": { + "type": "string" + } + }, + "logType": { + "description": "The log type that this config enables.", + "type": "string", + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ] + } + }, + "id": "AuditLogConfig" + }, + "DecryptResponse": { + "description": "Response message for KeyManagementService.Decrypt.", + "type": "object", + "properties": { + "plaintext": { + "description": "The decrypted data originally supplied in EncryptRequest.plaintext.", + "format": "byte", + "type": "string" + } + }, + "id": "DecryptResponse" + } + }, + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "canonicalName": "Cloud KMS", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://cloudkms.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudkms", + "batchPath": "batch", + "title": "Google Cloud Key Management Service (KMS) API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "list": { + "flatPath": "v1beta1/projects/{projectsId}/locations", + "path": "v1beta1/{+name}/locations", + "id": "cloudkms.projects.locations.list", + "description": "Lists information about the supported locations for this service.", + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageSize": { + "location": "query", + "description": "The standard list page size.", + "format": "int32", + "type": "integer" + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + } + } + }, + "get": { + "response": { + "$ref": "Location" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "Resource name for the location.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", + "path": "v1beta1/{+name}", + "id": "cloudkms.projects.locations.get", + "description": "Get information about a location." + } + }, + "resources": { + "keyRings": { + "methods": { + "getIamPolicy": { + "httpMethod": "GET", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:getIamPolicy", + "id": "cloudkms.projects.locations.keyRings.getIamPolicy", + "path": "v1beta1/{+resource}:getIamPolicy", + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset." + }, + "get": { + "response": { + "$ref": "KeyRing" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "location": "path", + "description": "The name of the KeyRing to get.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}", + "path": "v1beta1/{+name}", + "id": "cloudkms.projects.locations.keyRings.get", + "description": "Returns metadata for a given KeyRing." + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:testIamPermissions", + "id": "cloudkms.projects.locations.keyRings.testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions" + }, + "list": { + "response": { + "$ref": "ListKeyRingsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageToken": { + "description": "Optional pagination token, returned earlier via\nListKeyRingsResponse.next_page_token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "Optional limit on the number of KeyRings to include in the\nresponse. Further KeyRings can subsequently be obtained by\nincluding the ListKeyRingsResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "parent": { + "location": "path", + "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings", + "path": "v1beta1/{+parent}/keyRings", + "id": "cloudkms.projects.locations.keyRings.list", + "description": "Lists KeyRings." + }, + "setIamPolicy": { + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:setIamPolicy", + "path": "v1beta1/{+resource}:setIamPolicy", + "id": "cloudkms.projects.locations.keyRings.setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$" + } + } + }, + "create": { + "response": { + "$ref": "KeyRing" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + }, + "keyRingId": { + "location": "query", + "description": "Required. It must be unique within a location and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings", + "path": "v1beta1/{+parent}/keyRings", + "id": "cloudkms.projects.locations.keyRings.create", + "request": { + "$ref": "KeyRing" + }, + "description": "Create a new KeyRing in a given Project and Location." + } + }, + "resources": { + "cryptoKeys": { + "methods": { + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CryptoKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "location": "query", + "description": "Required list of fields to be updated in this request.", + "format": "google-fieldmask", + "type": "string" + }, + "name": { + "location": "path", + "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.patch", + "path": "v1beta1/{+name}", + "description": "Update a CryptoKey.", + "request": { + "$ref": "CryptoKey" + } + }, + "get": { + "description": "Returns metadata for a given CryptoKey, as well as its\nprimary CryptoKeyVersion.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CryptoKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the CryptoKey to get.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.get", + "path": "v1beta1/{+name}" + }, + "testIamPermissions": { + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:testIamPermissions", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions" + }, + "decrypt": { + "description": "Decrypt data that was protected by Encrypt.", + "request": { + "$ref": "DecryptRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "DecryptResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "Required. The resource name of the CryptoKey to use for decryption.\nThe server will choose the appropriate version.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:decrypt", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.decrypt", + "path": "v1beta1/{+name}:decrypt" + }, + "list": { + "description": "Lists CryptoKeys.", + "response": { + "$ref": "ListCryptoKeysResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional pagination token, returned earlier via\nListCryptoKeysResponse.next_page_token.", + "type": "string" + }, + "pageSize": { + "description": "Optional limit on the number of CryptoKeys to include in the\nresponse. Further CryptoKeys can subsequently be obtained by\nincluding the ListCryptoKeysResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "parent": { + "description": "Required. The resource name of the KeyRing to list, in the format\n`projects/*/locations/*/keyRings/*`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", + "path": "v1beta1/{+parent}/cryptoKeys", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.list" + }, + "encrypt": { + "response": { + "$ref": "EncryptResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "Required. The resource name of the CryptoKey or CryptoKeyVersion\nto use for encryption.\n\nIf a CryptoKey is specified, the server will use its\nprimary version.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:encrypt", + "path": "v1beta1/{+name}:encrypt", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.encrypt", + "request": { + "$ref": "EncryptRequest" + }, + "description": "Encrypt data, so that it can only be recovered by a call to Decrypt." + }, + "create": { + "response": { + "$ref": "CryptoKey" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "location": "path", + "description": "Required. The name of the KeyRing associated with the\nCryptoKeys.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$" + }, + "cryptoKeyId": { + "location": "query", + "description": "Required. It must be unique within a KeyRing and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", + "type": "string" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", + "path": "v1beta1/{+parent}/cryptoKeys", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.create", + "description": "Create a new CryptoKey within a KeyRing.\n\nCryptoKey.purpose is required.", + "request": { + "$ref": "CryptoKey" + } + }, + "setIamPolicy": { + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:setIamPolicy", + "path": "v1beta1/{+resource}:setIamPolicy", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" + } + } + }, + "updatePrimaryVersion": { + "description": "Update the version of a CryptoKey that will be used in Encrypt", + "request": { + "$ref": "UpdateCryptoKeyPrimaryVersionRequest" + }, + "response": { + "$ref": "CryptoKey" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The resource name of the CryptoKey to update.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:updatePrimaryVersion", + "path": "v1beta1/{+name}:updatePrimaryVersion", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion" + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:getIamPolicy", + "path": "v1beta1/{+resource}:getIamPolicy", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy" + } + }, + "resources": { + "cryptoKeyVersions": { + "methods": { + "list": { + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", + "path": "v1beta1/{+parent}/cryptoKeyVersions", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list", + "description": "Lists CryptoKeyVersions.", + "response": { + "$ref": "ListCryptoKeyVersionsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageSize": { + "location": "query", + "description": "Optional limit on the number of CryptoKeyVersions to\ninclude in the response. Further CryptoKeyVersions can\nsubsequently be obtained by including the\nListCryptoKeyVersionsResponse.next_page_token in a subsequent request.\nIf unspecified, the server will pick an appropriate default.", + "format": "int32", + "type": "integer" + }, + "parent": { + "location": "path", + "description": "Required. The resource name of the CryptoKey to list, in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" + }, + "pageToken": { + "location": "query", + "description": "Optional pagination token, returned earlier via\nListCryptoKeyVersionsResponse.next_page_token.", + "type": "string" + } + } + }, + "create": { + "description": "Create a new CryptoKeyVersion in a CryptoKey.\n\nThe server will assign the next sequential id. If unset,\nstate will be set to\nENABLED.", + "request": { + "$ref": "CryptoKeyVersion" + }, + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "CryptoKeyVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "location": "path", + "description": "Required. The name of the CryptoKey associated with\nthe CryptoKeyVersions.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create", + "path": "v1beta1/{+parent}/cryptoKeyVersions" + }, + "destroy": { + "request": { + "$ref": "DestroyCryptoKeyVersionRequest" + }, + "description": "Schedule a CryptoKeyVersion for destruction.\n\nUpon calling this method, CryptoKeyVersion.state will be set to\nDESTROY_SCHEDULED\nand destroy_time will be set to a time 24\nhours in the future, at which point the state\nwill be changed to\nDESTROYED, and the key\nmaterial will be irrevocably destroyed.\n\nBefore the destroy_time is reached,\nRestoreCryptoKeyVersion may be called to reverse the process.", + "response": { + "$ref": "CryptoKeyVersion" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The resource name of the CryptoKeyVersion to destroy.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:destroy", + "path": "v1beta1/{+name}:destroy", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy" + }, + "restore": { + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:restore", + "path": "v1beta1/{+name}:restore", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore", + "description": "Restore a CryptoKeyVersion in the\nDESTROY_SCHEDULED,\nstate.\n\nUpon restoration of the CryptoKeyVersion, state\nwill be set to DISABLED,\nand destroy_time will be cleared.", + "request": { + "$ref": "RestoreCryptoKeyVersionRequest" + }, + "response": { + "$ref": "CryptoKeyVersion" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The resource name of the CryptoKeyVersion to restore.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", + "location": "path" + } + } + }, + "patch": { + "request": { + "$ref": "CryptoKeyVersion" + }, + "description": "Update a CryptoKeyVersion's metadata.\n\nstate may be changed between\nENABLED and\nDISABLED using this\nmethod. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to\nmove between other states.", + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CryptoKeyVersion" + }, + "parameters": { + "updateMask": { + "location": "query", + "description": "Required list of fields to be updated in this request.", + "format": "google-fieldmask", + "type": "string" + }, + "name": { + "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch", + "path": "v1beta1/{+name}" + }, + "get": { + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get", + "path": "v1beta1/{+name}", + "description": "Returns metadata for a given CryptoKeyVersion.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CryptoKeyVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the CryptoKeyVersion to get.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", + "location": "path" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "parameters": { + "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" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + } + }, + "version": "v1beta1", + "baseUrl": "https://cloudkms.googleapis.com/" +} diff --git a/etc/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json b/etc/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json index de89983988..8910233454 100644 --- a/etc/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json +++ b/etc/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/mLggzdz9EvP0lVEQoxoRvdSJShg\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/NOsFjtPY9zRzc3K9F8mQGuDeSj0\"", "discoveryVersion": "v1", "id": "cloudmonitoring:v2beta2", "name": "cloudmonitoring", "canonicalName": "Cloud Monitoring", "version": "v2beta2", - "revision": "20161031", + "revision": "20170501", "title": "Cloud Monitoring API", "description": "Accesses Google Cloud Monitoring data.", "ownerDomain": "google.com", diff --git a/etc/api/cloudresourcemanager/v1/cloudresourcemanager-api.json b/etc/api/cloudresourcemanager/v1/cloudresourcemanager-api.json index 241fc5ed8d..915d414a31 100644 --- a/etc/api/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/etc/api/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -1,498 +1,1142 @@ { "id": "cloudresourcemanager:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - } - } - } - }, - "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", - "protocol": "rest", + "documentationLink": "https://cloud.google.com/resource-manager", + "revision": "20170517", "title": "Google Cloud Resource Manager API", + "discoveryVersion": "v1", + "ownerName": "Google", "resources": { - "organizations": { + "liens": { "methods": { - "get": { - "id": "cloudresourcemanager.organizations.get", + "create": { + "flatPath": "v1/liens", + "path": "v1/liens", + "id": "cloudresourcemanager.liens.create", + "description": "Create a Lien which applies to the resource denoted by the `parent` field.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, applying to `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`.\n\nNOTE: Some resources may limit the number of Liens which may be applied.", + "request": { + "$ref": "Lien" + }, "response": { - "$ref": "Organization" + "$ref": "Lien" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": {} + }, + "delete": { + "response": { + "$ref": "Empty" }, "parameterOrder": [ "name" ], - "description": "Fetches an Organization resource identified by the specified resource name.", - "flatPath": "v1/organizations/{organizationsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "testIamPermissions": { - "id": "cloudresourcemanager.organizations.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\".", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "flatPath": "v1/organizations/{organizationsId}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "search": { - "id": "cloudresourcemanager.organizations.search", - "response": { - "$ref": "SearchOrganizationsResponse" - }, - "parameterOrder": [], - "description": "Searches Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the\nresults.", - "request": { - "$ref": "SearchOrganizationsRequest" - }, - "flatPath": "v1/organizations:search", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/organizations:search", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "setIamPolicy": { - "id": "cloudresourcemanager.organizations.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1/organizations/{organizationsId}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getIamPolicy": { - "id": "cloudresourcemanager.organizations.getIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\".", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "flatPath": "v1/organizations/{organizationsId}:getIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - } - } - }, - "projects": { - "methods": { - "getAncestry": { - "id": "cloudresourcemanager.projects.getAncestry", - "response": { - "$ref": "GetAncestryResponse" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", - "request": { - "$ref": "GetAncestryRequest" - }, - "flatPath": "v1/projects/{projectId}:getAncestry", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}:getAncestry", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "getIamPolicy": { - "id": "cloudresourcemanager.projects.getIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "flatPath": "v1/projects/{resource}:getIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "undelete": { - "id": "cloudresourcemanager.projects.undelete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", - "request": { - "$ref": "UndeleteProjectRequest" - }, - "flatPath": "v1/projects/{projectId}:undelete", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}:undelete", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "cloudresourcemanager.projects.list", - "response": { - "$ref": "ListProjectsResponse" - }, - "parameterOrder": [], - "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list.", - "flatPath": "v1/projects", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "The maximum number of Projects to return in the response.\nThe server can return fewer Projects than requested.\nIf unspecified, server picks an appropriate default.\n\nOptional.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:*|The project has a name.|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red label.size:big|The project's label `color` has the\nvalue `red` and its label `size` has the value `big`.\n\nOptional.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional.", - "location": "query", - "type": "string" - } - }, - "path": "v1/projects", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "get": { - "id": "cloudresourcemanager.projects.get", - "response": { - "$ref": "Project" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", - "flatPath": "v1/projects/{projectId}", - "httpMethod": "GET", - "parameters": { - "projectId": { - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "update": { - "id": "cloudresourcemanager.projects.update", - "response": { - "$ref": "Project" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project.", - "request": { - "$ref": "Project" - }, - "flatPath": "v1/projects/{projectId}", - "httpMethod": "PUT", - "parameters": { - "projectId": { - "description": "The project ID (for example, `my-project-123`).\n\nRequired.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "id": "cloudresourcemanager.projects.create", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "description": "Request that a new Project be created. The result is an Operation which\ncan be used to track the creation process. It is automatically deleted\nafter a few hours, so there is no need to call DeleteOperation.\n\nOur SLO permits Project creation to take up to 30 seconds at the 90th\npercentile. As of 2016-08-29, we are observing 6 seconds 50th percentile\nlatency. 95th percentile latency is around 11 seconds. We recommend\npolling at the 5th second with an exponential backoff.", - "request": { - "$ref": "Project" - }, - "flatPath": "v1/projects", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/projects", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "id": "cloudresourcemanager.projects.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using\n`setIamPolicy()`;\nthey must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ There must be at least one owner who has accepted the Terms of\nService (ToS) agreement in the policy. Calling `setIamPolicy()` to\nto remove the last ToS-accepted owner from the policy will fail. This\nrestriction also applies to legacy projects that no longer have owners\nwho have accepted the ToS. Edits to IAM policies will be rejected until\nthe lack of a ToS-accepting owner is rectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1/projects/{resource}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "cloudresourcemanager.projects.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time,\nat which point the Project is no longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project.", - "flatPath": "v1/projects/{projectId}", "httpMethod": "DELETE", "parameters": { - "projectId": { - "description": "The Project ID (for example, `foo-bar-123`).\n\nRequired.", + "name": { "required": true, + "type": "string", + "pattern": "^liens/.+$", "location": "path", - "type": "string" + "description": "The name/identifier of the Lien to delete." } }, - "path": "v1/projects/{projectId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "id": "cloudresourcemanager.projects.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified Project.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "flatPath": "v1/projects/{resource}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{resource}:testIamPermissions", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" - ] + ], + "flatPath": "v1/liens/{liensId}", + "path": "v1/{+name}", + "id": "cloudresourcemanager.liens.delete", + "description": "Delete a Lien by `name`.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`." + }, + "list": { + "description": "List all Liens applied to the `parent` resource.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.get`.", + "httpMethod": "GET", + "response": { + "$ref": "ListLiensResponse" + }, + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageToken": { + "description": "The `next_page_token` value returned from a previous List request, if any.", + "type": "string", + "location": "query" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "The maximum number of items to return. This is a suggestion for the server.", + "format": "int32" + }, + "parent": { + "type": "string", + "location": "query", + "description": "The name of the resource to list all attached Liens.\nFor example, `projects/1234`." + } + }, + "flatPath": "v1/liens", + "id": "cloudresourcemanager.liens.list", + "path": "v1/liens" } } }, "operations": { "methods": { "get": { - "id": "cloudresourcemanager.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], "response": { "$ref": "Operation" }, + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^operations/.+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/operations/{operationsId}", + "id": "cloudresourcemanager.operations.get", + "path": "v1/{+name}" + } + } + }, + "folders": { + "methods": { + "listAvailableOrgPolicyConstraints": { + "description": "Lists `Constraints` that could be applied on the specified resource.", + "request": { + "$ref": "ListAvailableOrgPolicyConstraintsRequest" + }, + "response": { + "$ref": "ListAvailableOrgPolicyConstraintsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "Name of the resource to list `Constraints` for.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/folders/{foldersId}:listAvailableOrgPolicyConstraints", + "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", + "id": "cloudresourcemanager.folders.listAvailableOrgPolicyConstraints" + }, + "listOrgPolicies": { + "description": "Lists all the `Policies` set for a particular resource.", + "request": { + "$ref": "ListOrgPoliciesRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "ListOrgPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "required": true, + "type": "string", + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "Name of the resource to list Policies for." + } + }, + "flatPath": "v1/folders/{foldersId}:listOrgPolicies", + "id": "cloudresourcemanager.folders.listOrgPolicies", + "path": "v1/{+resource}:listOrgPolicies" + }, + "getOrgPolicy": { + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "location": "path", + "description": "Name of the resource the `Policy` is set on.", + "required": true, + "type": "string", + "pattern": "^folders/[^/]+$" + } + }, + "flatPath": "v1/folders/{foldersId}:getOrgPolicy", + "path": "v1/{+resource}:getOrgPolicy", + "id": "cloudresourcemanager.folders.getOrgPolicy", + "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", + "request": { + "$ref": "GetOrgPolicyRequest" + } + }, + "getEffectiveOrgPolicy": { + "request": { + "$ref": "GetEffectiveOrgPolicyRequest" + }, + "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "OrgPolicy" + }, + "parameters": { + "resource": { + "location": "path", + "description": "The name of the resource to start computing the effective `Policy`.", + "required": true, + "type": "string", + "pattern": "^folders/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/folders/{foldersId}:getEffectiveOrgPolicy", + "id": "cloudresourcemanager.folders.getEffectiveOrgPolicy", + "path": "v1/{+resource}:getEffectiveOrgPolicy" + }, + "clearOrgPolicy": { + "description": "Clears a `Policy` from a resource.", + "request": { + "$ref": "ClearOrgPolicyRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "Name of the resource for the `Policy` to clear.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/folders/{foldersId}:clearOrgPolicy", + "path": "v1/{+resource}:clearOrgPolicy", + "id": "cloudresourcemanager.folders.clearOrgPolicy" + }, + "setOrgPolicy": { + "request": { + "$ref": "SetOrgPolicyRequest" + }, + "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "OrgPolicy" + }, + "parameters": { + "resource": { + "location": "path", + "description": "Resource name of the resource to attach the `Policy`.", + "required": true, + "type": "string", + "pattern": "^folders/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/folders/{foldersId}:setOrgPolicy", + "id": "cloudresourcemanager.folders.setOrgPolicy", + "path": "v1/{+resource}:setOrgPolicy" + } + } + }, + "projects": { + "methods": { + "listOrgPolicies": { + "request": { + "$ref": "ListOrgPoliciesRequest" + }, + "description": "Lists all the `Policies` set for a particular resource.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "ListOrgPoliciesResponse" + }, + "parameters": { + "resource": { + "description": "Name of the resource to list Policies for.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}:listOrgPolicies", + "id": "cloudresourcemanager.projects.listOrgPolicies", + "path": "v1/{+resource}:listOrgPolicies" + }, + "get": { + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "response": { + "$ref": "Project" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "projectId": { + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}", + "path": "v1/projects/{projectId}", + "id": "cloudresourcemanager.projects.get", + "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project." + }, + "getAncestry": { + "path": "v1/projects/{projectId}:getAncestry", + "id": "cloudresourcemanager.projects.getAncestry", + "request": { + "$ref": "GetAncestryRequest" + }, + "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "response": { + "$ref": "GetAncestryResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectId}:getAncestry" + }, + "testIamPermissions": { + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified Project.", + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{resource}:testIamPermissions", + "path": "v1/projects/{resource}:testIamPermissions", + "id": "cloudresourcemanager.projects.testIamPermissions" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "DELETE", + "parameters": { + "projectId": { + "description": "The Project ID (for example, `foo-bar-123`).\n\nRequired.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}", + "path": "v1/projects/{projectId}", + "id": "cloudresourcemanager.projects.delete", + "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time,\nat which point the Project is no longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project." + }, + "clearOrgPolicy": { + "request": { + "$ref": "ClearOrgPolicyRequest" + }, + "description": "Clears a `Policy` from a resource.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "resource": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Name of the resource for the `Policy` to clear." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}:clearOrgPolicy", + "id": "cloudresourcemanager.projects.clearOrgPolicy", + "path": "v1/{+resource}:clearOrgPolicy" + }, + "setIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{resource}:setIamPolicy", + "id": "cloudresourcemanager.projects.setIamPolicy", + "path": "v1/projects/{resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using\n`setIamPolicy()`;\nthey must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ There must be at least one owner who has accepted the Terms of\nService (ToS) agreement in the policy. Calling `setIamPolicy()` to\nremove the last ToS-accepted owner from the policy will fail. This\nrestriction also applies to legacy projects that no longer have owners\nwho have accepted the ToS. Edits to IAM policies will be rejected until\nthe lack of a ToS-accepting owner is rectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles." + }, + "listAvailableOrgPolicyConstraints": { + "request": { + "$ref": "ListAvailableOrgPolicyConstraintsRequest" + }, + "description": "Lists `Constraints` that could be applied on the specified resource.", + "response": { + "$ref": "ListAvailableOrgPolicyConstraintsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Name of the resource to list `Constraints` for." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}:listAvailableOrgPolicyConstraints", + "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", + "id": "cloudresourcemanager.projects.listAvailableOrgPolicyConstraints" + }, + "getIamPolicy": { + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "required": true, + "type": "string", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{resource}:getIamPolicy", + "id": "cloudresourcemanager.projects.getIamPolicy", + "path": "v1/projects/{resource}:getIamPolicy" + }, + "getOrgPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "OrgPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "description": "Name of the resource the `Policy` is set on.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}:getOrgPolicy", + "id": "cloudresourcemanager.projects.getOrgPolicy", + "path": "v1/{+resource}:getOrgPolicy", + "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", + "request": { + "$ref": "GetOrgPolicyRequest" + } + }, + "getEffectiveOrgPolicy": { + "request": { + "$ref": "GetEffectiveOrgPolicyRequest" + }, + "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "The name of the resource to start computing the effective `Policy`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}:getEffectiveOrgPolicy", + "path": "v1/{+resource}:getEffectiveOrgPolicy", + "id": "cloudresourcemanager.projects.getEffectiveOrgPolicy" + }, + "undelete": { + "flatPath": "v1/projects/{projectId}:undelete", + "path": "v1/projects/{projectId}:undelete", + "id": "cloudresourcemanager.projects.undelete", + "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", + "request": { + "$ref": "UndeleteProjectRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", + "required": true, + "type": "string" + } + } + }, + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "Project" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The project ID (for example, `my-project-123`).\n\nRequired.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}", + "id": "cloudresourcemanager.projects.update", + "path": "v1/projects/{projectId}", + "request": { + "$ref": "Project" + }, + "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project." + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListProjectsResponse" + }, + "parameters": { + "filter": { + "location": "query", + "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red labels.size:big|The project's label `color` has the\nvalue `red` and its label `size` has the value `big`.\n\nOptional.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional.", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of Projects to return in the response.\nThe server can return fewer Projects than requested.\nIf unspecified, server picks an appropriate default.\n\nOptional.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects", + "id": "cloudresourcemanager.projects.list", + "path": "v1/projects", + "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list." + }, + "setOrgPolicy": { + "flatPath": "v1/projects/{projectsId}:setOrgPolicy", + "id": "cloudresourcemanager.projects.setOrgPolicy", + "path": "v1/{+resource}:setOrgPolicy", + "request": { + "$ref": "SetOrgPolicyRequest" + }, + "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "OrgPolicy" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Resource name of the resource to attach the `Policy`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "path": "v1/projects", + "id": "cloudresourcemanager.projects.create", + "request": { + "$ref": "Project" + }, + "description": "Request that a new Project be created. The result is an Operation which\ncan be used to track the creation process. It is automatically deleted\nafter a few hours, so there is no need to call DeleteOperation.\n\nOur SLO permits Project creation to take up to 30 seconds at the 90th\npercentile. As of 2016-08-29, we are observing 6 seconds 50th percentile\nlatency. 95th percentile latency is around 11 seconds. We recommend\npolling at the 5th second with an exponential backoff.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects" + } + } + }, + "organizations": { + "methods": { + "listAvailableOrgPolicyConstraints": { + "request": { + "$ref": "ListAvailableOrgPolicyConstraintsRequest" + }, + "description": "Lists `Constraints` that could be applied on the specified resource.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "ListAvailableOrgPolicyConstraintsResponse" + }, + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Name of the resource to list `Constraints` for.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/organizations/{organizationsId}:listAvailableOrgPolicyConstraints", + "id": "cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints", + "path": "v1/{+resource}:listAvailableOrgPolicyConstraints" + }, + "listOrgPolicies": { + "request": { + "$ref": "ListOrgPoliciesRequest" + }, + "description": "Lists all the `Policies` set for a particular resource.", + "response": { + "$ref": "ListOrgPoliciesResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Name of the resource to list Policies for.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/organizations/{organizationsId}:listOrgPolicies", + "path": "v1/{+resource}:listOrgPolicies", + "id": "cloudresourcemanager.organizations.listOrgPolicies" + }, + "getIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/organizations/{organizationsId}:getIamPolicy", + "id": "cloudresourcemanager.organizations.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\"." + }, + "getOrgPolicy": { + "flatPath": "v1/organizations/{organizationsId}:getOrgPolicy", + "path": "v1/{+resource}:getOrgPolicy", + "id": "cloudresourcemanager.organizations.getOrgPolicy", + "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", + "request": { + "$ref": "GetOrgPolicyRequest" + }, + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "location": "path", + "description": "Name of the resource the `Policy` is set on.", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$" + } + } + }, + "search": { + "description": "Searches Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the\nresults.", + "request": { + "$ref": "SearchOrganizationsRequest" + }, + "response": { + "$ref": "SearchOrganizationsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": {}, + "flatPath": "v1/organizations:search", + "path": "v1/organizations:search", + "id": "cloudresourcemanager.organizations.search" + }, + "getEffectiveOrgPolicy": { + "request": { + "$ref": "GetEffectiveOrgPolicyRequest" + }, + "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "OrgPolicy" + }, + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "The name of the resource to start computing the effective `Policy`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/organizations/{organizationsId}:getEffectiveOrgPolicy", + "id": "cloudresourcemanager.organizations.getEffectiveOrgPolicy", + "path": "v1/{+resource}:getEffectiveOrgPolicy" + }, + "get": { + "id": "cloudresourcemanager.organizations.get", + "path": "v1/{+name}", + "description": "Fetches an Organization resource identified by the specified resource name.", + "httpMethod": "GET", + "response": { + "$ref": "Organization" + }, "parameterOrder": [ "name" ], - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "flatPath": "v1/operations/{operationsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "required": true, - "pattern": "^operations/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" - ] + ], + "parameters": { + "name": { + "location": "path", + "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$" + } + }, + "flatPath": "v1/organizations/{organizationsId}" + }, + "testIamPermissions": { + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/organizations/{organizationsId}:testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "id": "cloudresourcemanager.organizations.testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\"." + }, + "clearOrgPolicy": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "Name of the resource for the `Policy` to clear.", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/organizations/{organizationsId}:clearOrgPolicy", + "path": "v1/{+resource}:clearOrgPolicy", + "id": "cloudresourcemanager.organizations.clearOrgPolicy", + "description": "Clears a `Policy` from a resource.", + "request": { + "$ref": "ClearOrgPolicyRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST" + }, + "setOrgPolicy": { + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "Resource name of the resource to attach the `Policy`.", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/organizations/{organizationsId}:setOrgPolicy", + "path": "v1/{+resource}:setOrgPolicy", + "id": "cloudresourcemanager.organizations.setOrgPolicy", + "request": { + "$ref": "SetOrgPolicyRequest" + }, + "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`." + }, + "setIamPolicy": { + "path": "v1/{+resource}:setIamPolicy", + "id": "cloudresourcemanager.organizations.setIamPolicy", + "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/organizations/{organizationsId}:setIamPolicy" } } } }, - "schemas": { - "FolderOperationError": { - "description": "A classification of the Folder Operation error.", - "type": "object", - "properties": { - "errorMessageId": { - "description": "The type of operation error experienced.", - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "FOLDER_HEIGHT_VIOLATION", - "MAX_CHILD_FOLDERS_VIOLATION", - "FOLDER_NAME_UNIQUENESS_VIOLATION", - "RESOURCE_DELETED", - "PARENT_DELETED", - "CYCLE_INTRODUCED_ERROR", - "FOLDER_ALREADY_BEING_MOVED", - "FOLDER_TO_DELETE_NON_EMPTY" - ], - "enumDescriptions": [ - "The error type was unrecognized or unspecified.", - "The attempted action would violate the max folder depth constraint.", - "The attempted action would violate the max child folders constraint.", - "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", - "The resource being moved has been deleted.", - "The resource a folder was being added to has been deleted.", - "The attempted action would introduce cycle in resource path.", - "The attempted action would move a folder that is already being moved.", - "The folder the caller is trying to delete contains active resources." - ], - "type": "string" - } - }, - "id": "FolderOperationError" + "parameters": { + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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" + }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + } + }, + "schemas": { "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" }, "details": { "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", @@ -505,30 +1149,114 @@ "type": "object" } }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" } }, - "id": "Status" + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object" }, - "ListProjectsResponse": { - "description": "A page of the response received from the\nListProjects\nmethod.\n\nA paginated response where more pages are available has\n`next_page_token` set. This token can be used in a subsequent request to\nretrieve the next request page.", + "ListLiensResponse": { + "description": "The response message for Liens.ListLiens.", "type": "object", "properties": { - "projects": { - "description": "The list of Projects that matched the list filter. This list can\nbe paginated.", + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more\nresults in the list.", + "type": "string" + }, + "liens": { + "description": "A list of Liens.", "type": "array", "items": { - "$ref": "Project" + "$ref": "Lien" + } + } + }, + "id": "ListLiensResponse" + }, + "Constraint": { + "id": "Constraint", + "description": "A `Constraint` describes a way in which a resource's configuration can be\nrestricted. For example, it controls which cloud services can be activated\nacross an organization, or whether a Compute Engine instance can have\nserial port connections established. `Constraints` can be configured by the\norganization's policy adminstrator to fit the needs of the organzation by\nsetting Policies for `Constraints` at different locations in the\norganization's resource hierarchy. Policies are inherited down the resource\nhierarchy from higher levels, but can also be overridden. For details about\nthe inheritance rules please read about\nPolicies.\n\n`Constraints` have a default behavior determined by the `constraint_default`\nfield, which is the enforcement behavior that is used in the absence of a\n`Policy` being defined or inherited for the resource in question.", + "type": "object", + "properties": { + "description": { + "description": "Detailed description of what this `Constraint` controls as well as how and\nwhere it is enforced.\n\nMutable.", + "type": "string" + }, + "displayName": { + "description": "The human readable name.\n\nMutable.", + "type": "string" + }, + "booleanConstraint": { + "$ref": "BooleanConstraint", + "description": "Defines this constraint as being a BooleanConstraint." + }, + "constraintDefault": { + "enumDescriptions": [ + "This is only used for distinguishing unset values and should never be\nused.", + "Indicate that all values are allowed for list constraints.\nIndicate that enforcement is off for boolean constraints.", + "Indicate that all values are denied for list constraints.\nIndicate that enforcement is on for boolean constraints." + ], + "enum": [ + "CONSTRAINT_DEFAULT_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "description": "The evaluation behavior of this constraint in the absense of 'Policy'.", + "type": "string" + }, + "name": { + "type": "string", + "description": "Immutable value, required to globally be unique. For example,\n`constraints/serviceuser.services`" + }, + "listConstraint": { + "$ref": "ListConstraint", + "description": "Defines this constraint as being a ListConstraint." + }, + "version": { + "description": "Version of the `Constraint`. Default version is 0;", + "format": "int32", + "type": "integer" + } + } + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "type": "array", + "items": { + "type": "string" } }, - "nextPageToken": { - "description": "Pagination token.\n\nIf the result set is too large to fit in a single response, this token\nis returned. It encodes the position of the current result cursor.\nFeeding this value into a new list request with the `page_token` parameter\ngives the next page of the results.\n\nWhen `next_page_token` is not filled in, there is no next page and\nthe list returned is the last page in the result set.\n\nPagination tokens have a limited lifetime.", + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", "type": "string" } }, - "id": "ListProjectsResponse" + "id": "Binding" + }, + "RestoreDefault": { + "description": "Ignores policies set above this resource and restores the\n`constraint_default` enforcement behavior of the specific `Constraint` at\nthis resource.\n\nSuppose that `constraint_default` is set to `ALLOW` for the\n`Constraint` `constraints/serviceuser.services`. Suppose that organization\nfoo.com sets a `Policy` at their Organization resource node that restricts\nthe allowed service activations to deny all service activations. They\ncould then set a `Policy` with the `policy_type` `restore_default` on\nseveral experimental projects, restoring the `constraint_default`\nenforcement of the `Constraint` for only those projects, allowing those\nprojects to have all services activated.", + "type": "object", + "properties": {}, + "id": "RestoreDefault" + }, + "GetOrgPolicyRequest": { + "type": "object", + "properties": { + "constraint": { + "type": "string", + "description": "Name of the `Constraint` to get the `Policy`." + } + }, + "id": "GetOrgPolicyRequest", + "description": "The request sent to the GetOrgPolicy method." }, "UndeleteProjectRequest": { "description": "The request sent to the UndeleteProject\nmethod.", @@ -536,73 +1264,47 @@ "properties": {}, "id": "UndeleteProjectRequest" }, - "FolderOperation": { - "description": "Metadata describing a long running folder operation", + "ClearOrgPolicyRequest": { + "description": "The request sent to the ClearOrgPolicy method.", "type": "object", "properties": { - "displayName": { - "description": "The display name of the folder.", + "etag": { + "description": "The current version, for concurrency control. Not sending an `etag`\nwill cause the `Policy` to be cleared blindly.", + "format": "byte", "type": "string" }, - "sourceParent": { - "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE.", - "type": "string" - }, - "destinationParent": { - "description": "The resource name of the folder or organization we are either creating\nthe folder under or moving the folder to.", - "type": "string" - }, - "operationType": { - "description": "The type of this operation.", - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE", - "MOVE" - ], - "enumDescriptions": [ - "Operation type not specified.", - "A create folder operation.", - "A move folder operation." - ], + "constraint": { + "description": "Name of the `Constraint` of the `Policy` to clear.", "type": "string" } }, - "id": "FolderOperation" + "id": "ClearOrgPolicyRequest" }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "ProjectCreationStatus": { "type": "object", "properties": { - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" + "createTime": { + "description": "Creation time of the project creation workflow.", + "format": "google-datetime", + "type": "string" }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "gettable": { + "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", "type": "boolean" }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" } }, - "id": "Operation" + "id": "ProjectCreationStatus", + "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed." + }, + "BooleanConstraint": { + "description": "A `Constraint` that is either enforced or not.\n\nFor example a constraint `constraints/compute.disableSerialPortAccess`.\nIf it is enforced on a VM instance, serial port connections will not be\nopened to that instance.", + "type": "object", + "properties": {}, + "id": "BooleanConstraint" }, "GetIamPolicyRequest": { "description": "Request message for `GetIamPolicy` method.", @@ -610,17 +1312,6 @@ "properties": {}, "id": "GetIamPolicyRequest" }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "policy": { - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", - "$ref": "Policy" - } - }, - "id": "SetIamPolicyRequest" - }, "TestIamPermissionsResponse": { "description": "Response message for `TestIamPermissions` method.", "type": "object", @@ -635,121 +1326,104 @@ }, "id": "TestIamPermissionsResponse" }, - "Organization": { - "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", + "OrganizationOwner": { + "properties": { + "directoryCustomerId": { + "description": "The Google for Work customer id used in the Directory API.", + "type": "string" + } + }, + "id": "OrganizationOwner", + "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted.", + "type": "object" + }, + "ListProjectsResponse": { + "description": "A page of the response received from the\nListProjects\nmethod.\n\nA paginated response where more pages are available has\n`next_page_token` set. This token can be used in a subsequent request to\nretrieve the next request page.", "type": "object", "properties": { - "displayName": { - "description": "A friendly string to be used to refer to the Organization in the UI.\nAssigned by the server, set to the firm name of the Google For Work\ncustomer that owns this organization.\n@OutputOnly", + "projects": { + "description": "The list of Projects that matched the list filter. This list can\nbe paginated.", + "type": "array", + "items": { + "$ref": "Project" + } + }, + "nextPageToken": { + "type": "string", + "description": "Pagination token.\n\nIf the result set is too large to fit in a single response, this token\nis returned. It encodes the position of the current result cursor.\nFeeding this value into a new list request with the `page_token` parameter\ngives the next page of the results.\n\nWhen `next_page_token` is not filled in, there is no next page and\nthe list returned is the last page in the result set.\n\nPagination tokens have a limited lifetime." + } + }, + "id": "ListProjectsResponse" + }, + "Project": { + "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, App Engine Apps, VMs, and other\nGoogle Cloud Platform resources.", + "type": "object", + "properties": { + "projectNumber": { + "description": "The number uniquely identifying the project.\n\nExample: \u003ccode\u003e415104041262\u003c/code\u003e\nRead-only.", + "format": "int64", "type": "string" }, - "creationTime": { - "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly", + "parent": { + "$ref": "ResourceId", + "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write." + }, + "createTime": { "type": "string", + "description": "Creation time.\n\nRead-only.", "format": "google-datetime" }, - "owner": { - "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required.", - "$ref": "OrganizationOwner" + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\nRead-write." + }, + "name": { + "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", + "type": "string" + }, + "projectId": { + "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\nRead-only after creation.", + "type": "string" }, "lifecycleState": { - "description": "The organization's current lifecycle state. Assigned by the server.\n@OutputOnly", + "description": "The Project lifecycle state.\n\nRead-only.", + "type": "string", + "enumDescriptions": [ + "Unspecified state. This is only used/useful for distinguishing\nunset values.", + "The normal and active state.", + "The project has been marked for deletion by the user\n(by invoking\nDeleteProject)\nor by the system (Google Cloud Platform).\nThis can generally be reversed by invoking UndeleteProject.", + "This lifecycle state is no longer used and not returned by the API." + ], "enum": [ "LIFECYCLE_STATE_UNSPECIFIED", "ACTIVE", - "DELETE_REQUESTED" - ], - "enumDescriptions": [ - "Unspecified state. This is only useful for distinguishing unset values.", - "The normal and active state.", - "The organization has been marked for deletion by the user." - ], + "DELETE_REQUESTED", + "DELETE_IN_PROGRESS" + ] + } + }, + "id": "Project" + }, + "ListOrgPoliciesResponse": { + "description": "The response returned from the ListOrgPolicies method. It will be empty\nif no `Policies` are set on the resource.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Page token used to retrieve the next page. This is currently not used, but\nthe server may at any point start supplying a valid token.", "type": "string" }, - "name": { - "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", - "type": "string" - } - }, - "id": "Organization" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "bindings": { - "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", + "policies": { + "description": "The `Policies` that are set on the resource. It will be empty if no\n`Policies` are set.", "type": "array", "items": { - "$ref": "Binding" - } - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string", - "format": "byte" - }, - "version": { - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer", - "format": "int32" - } - }, - "id": "Policy" - }, - "ProjectCreationStatus": { - "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", - "type": "object", - "properties": { - "ready": { - "description": "True if the project creation process is complete.", - "type": "boolean" - }, - "gettable": { - "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", - "type": "boolean" - }, - "createTime": { - "description": "Creation time of the project creation workflow.", - "type": "string", - "format": "google-datetime" - } - }, - "id": "ProjectCreationStatus" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "type": "array", - "items": { - "type": "string" + "$ref": "OrgPolicy" } } }, - "id": "TestIamPermissionsRequest" - }, - "GetAncestryRequest": { - "description": "The request sent to the\nGetAncestry\nmethod.", - "type": "object", - "properties": {}, - "id": "GetAncestryRequest" - }, - "GetAncestryResponse": { - "description": "Response from the GetAncestry method.", - "type": "object", - "properties": { - "ancestor": { - "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", - "type": "array", - "items": { - "$ref": "Ancestor" - } - } - }, - "id": "GetAncestryResponse" + "id": "ListOrgPoliciesResponse" }, "SearchOrganizationsResponse": { "description": "The response returned from the `SearchOrganizations` method.", @@ -769,31 +1443,124 @@ }, "id": "SearchOrganizationsResponse" }, - "SearchOrganizationsRequest": { - "description": "The request sent to the `SearchOrganizations` method.", + "FolderOperationError": { + "description": "A classification of the Folder Operation error.", "type": "object", "properties": { - "pageSize": { - "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with\n`owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", - "type": "string" - }, - "pageToken": { - "description": "A pagination token returned from a previous call to `SearchOrganizations`\nthat indicates from where listing should continue.\nThis field is optional.", + "errorMessageId": { + "enumDescriptions": [ + "The error type was unrecognized or unspecified.", + "The attempted action would violate the max folder depth constraint.", + "The attempted action would violate the max child folders constraint.", + "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", + "The resource being moved has been deleted.", + "The resource a folder was being added to has been deleted.", + "The attempted action would introduce cycle in resource path.", + "The attempted action would move a folder that is already being moved.", + "The folder the caller is trying to delete contains active resources.", + "The attempted action would violate the max deleted folder depth\nconstraint." + ], + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "ACTIVE_FOLDER_HEIGHT_VIOLATION", + "MAX_CHILD_FOLDERS_VIOLATION", + "FOLDER_NAME_UNIQUENESS_VIOLATION", + "RESOURCE_DELETED_VIOLATION", + "PARENT_DELETED_VIOLATION", + "CYCLE_INTRODUCED_VIOLATION", + "FOLDER_BEING_MOVED_VIOLATION", + "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", + "DELETED_FOLDER_HEIGHT_VIOLATION" + ], + "description": "The type of operation error experienced.", "type": "string" } }, - "id": "SearchOrganizationsRequest" + "id": "FolderOperationError" }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "OrgPolicy": { + "description": "Defines a Cloud Organization `Policy` which is used to specify `Constraints`\nfor configurations of Cloud Platform resources.", "type": "object", - "properties": {}, - "id": "Empty" + "properties": { + "version": { + "description": "Version of the `Policy`. Default version is 0;", + "format": "int32", + "type": "integer" + }, + "restoreDefault": { + "description": "Restores the default behavior of the constraint; independent of\n`Constraint` type.", + "$ref": "RestoreDefault" + }, + "listPolicy": { + "$ref": "ListPolicy", + "description": "List of values either allowed or disallowed." + }, + "etag": { + "description": "An opaque tag indicating the current version of the `Policy`, used for\nconcurrency control.\n\nWhen the `Policy` is returned from either a `GetPolicy` or a\n`ListOrgPolicy` request, this `etag` indicates the version of the current\n`Policy` to use when executing a read-modify-write loop.\n\nWhen the `Policy` is returned from a `GetEffectivePolicy` request, the\n`etag` will be unset.\n\nWhen the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value\nthat was returned from a `GetOrgPolicy` request as part of a\nread-modify-write loop for concurrency control. Not setting the `etag`in a\n`SetOrgPolicy` request will result in an unconditional write of the\n`Policy`.", + "format": "byte", + "type": "string" + }, + "constraint": { + "description": "The name of the `Constraint` the `Policy` is configuring, for example,\n`constraints/serviceuser.services`.\n\nImmutable after creation.", + "type": "string" + }, + "booleanPolicy": { + "$ref": "BooleanPolicy", + "description": "For boolean `Constraints`, whether to enforce the `Constraint` or not." + }, + "updateTime": { + "description": "The time stamp the `Policy` was previously updated. This is set by the\nserver, not specified by the caller, and represents the last time a call to\n`SetOrgPolicy` was made for that `Policy`. Any value set by the client will\nbe ignored.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OrgPolicy" + }, + "BooleanPolicy": { + "description": "Used in `policy_type` to specify how `boolean_policy` will behave at this\nresource.", + "type": "object", + "properties": { + "enforced": { + "description": "If `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\n\nSuppose you have a `Constraint` `constraints/compute.disableSerialPortAccess`\nwith `constraint_default` set to `ALLOW`. A `Policy` for that\n`Constraint` exhibits the following behavior:\n - If the `Policy` at this resource has enforced set to `false`, serial\n port connection attempts will be allowed.\n - If the `Policy` at this resource has enforced set to `true`, serial\n port connection attempts will be refused.\n - If the `Policy` at this resource is `RestoreDefault`, serial port\n connection attempts will be allowed.\n - If no `Policy` is set at this resource or anywhere higher in the\n resource hierarchy, serial port connection attempts will be allowed.\n - If no `Policy` is set at this resource, but one exists higher in the\n resource hierarchy, the behavior is as if the`Policy` were set at\n this resource.\n\nThe following examples demonstrate the different possible layerings:\n\nExample 1 (nearest `Constraint` wins):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has no `Policy` set.\nThe constraint at `projects/bar` and `organizations/foo` will not be\nenforced.\n\nExample 2 (enforcement gets replaced):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has a `Policy` with:\n {enforced: true}\nThe constraint at `organizations/foo` is not enforced.\nThe constraint at `projects/bar` is enforced.\n\nExample 3 (RestoreDefault):\n `organizations/foo` has a `Policy` with:\n {enforced: true}\n `projects/bar` has a `Policy` with:\n {RestoreDefault: {}}\nThe constraint at `organizations/foo` is enforced.\nThe constraint at `projects/bar` is not enforced, because\n`constraint_default` for the `Constraint` is `ALLOW`.", + "type": "boolean" + } + }, + "id": "BooleanPolicy" + }, + "Lien": { + "description": "A Lien represents an encumbrance on the actions that can be performed on a\nresource.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A system-generated unique identifier for this Lien.\n\nExample: `liens/1234abcd`" + }, + "reason": { + "description": "Concise user-visible strings indicating why an action cannot be performed\non a resource. Maximum lenth of 200 characters.\n\nExample: 'Holds production API key'", + "type": "string" + }, + "origin": { + "description": "A stable, user-visible/meaningful string identifying the origin of the\nLien, intended to be inspected programmatically. Maximum length of 200\ncharacters.\n\nExample: 'compute.googleapis.com'", + "type": "string" + }, + "restrictions": { + "description": "The types of operations which should be blocked as a result of this Lien.\nEach value should correspond to an IAM permission. The server will\nvalidate the permissions against those for which Liens are supported.\n\nAn empty list is meaningless and will be rejected.\n\nExample: ['resourcemanager.projects.delete']", + "type": "array", + "items": { + "type": "string" + } + }, + "parent": { + "description": "A reference to the resource this Lien is attached to. The server will\nvalidate the parent against those for which Liens are supported.\n\nExample: `projects/1234`", + "type": "string" + }, + "createTime": { + "description": "The creation time of this Lien.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "Lien" }, "Ancestor": { "description": "Identifying information for a single ancestor of a project.", @@ -806,12 +1573,317 @@ }, "id": "Ancestor" }, - "ResourceId": { - "description": "A container to reference an id for any resource type. A `resource` in Google\nCloud Platform is a generic term for something you (a developer) may want to\ninteract with through one of our API's. Some examples are an AppEngine app,\na Compute Engine instance, a Cloud SQL database, and so on.", + "ListConstraint": { + "description": "A `Constraint` that allows or disallows a list of string values, which are\nconfigured by an Organization's policy administrator with a `Policy`.", "type": "object", + "properties": { + "suggestedValue": { + "type": "string", + "description": "Optional. The Google Cloud Console will try to default to a configuration\nthat matches the value specified in this `Constraint`." + } + }, + "id": "ListConstraint" + }, + "SetOrgPolicyRequest": { + "description": "The request sent to the SetOrgPolicyRequest method.", + "type": "object", + "properties": { + "policy": { + "$ref": "OrgPolicy", + "description": "`Policy` to set on the resource." + } + }, + "id": "SetOrgPolicyRequest" + }, + "SetIamPolicyRequest": { + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + }, + "updateMask": { + "type": "string", + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "format": "google-fieldmask" + } + }, + "id": "SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method.", + "type": "object" + }, + "Empty": { + "type": "object", + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." + }, + "Organization": { + "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", + "type": "object", + "properties": { + "owner": { + "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required.", + "$ref": "OrganizationOwner" + }, + "lifecycleState": { + "description": "The organization's current lifecycle state. Assigned by the server.\n@OutputOnly", + "type": "string", + "enumDescriptions": [ + "Unspecified state. This is only useful for distinguishing unset values.", + "The normal and active state.", + "The organization has been marked for deletion by the user." + ], + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ] + }, + "name": { + "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", + "type": "string" + }, + "displayName": { + "type": "string", + "description": "A friendly string to be used to refer to the Organization in the UI.\nAssigned by the server, set to the primary domain of the G Suite\ncustomer that owns the organization.\n@OutputOnly" + }, + "creationTime": { + "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly", + "format": "google-datetime", + "type": "string" + } + }, + "id": "Organization" + }, + "ListAvailableOrgPolicyConstraintsResponse": { + "description": "The response returned from the ListAvailableOrgPolicyConstraints method.\nReturns all `Constraints` that could be set at this level of the hierarchy\n(contrast with the response from `ListPolicies`, which returns all policies\nwhich are set).", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Page token used to retrieve the next page. This is currently not used.", + "type": "string" + }, + "constraints": { + "description": "The collection of constraints that are settable on the request resource.", + "type": "array", + "items": { + "$ref": "Constraint" + } + } + }, + "id": "ListAvailableOrgPolicyConstraintsResponse" + }, + "ListPolicy": { + "description": "Used in `policy_type` to specify how `list_policy` behaves at this\nresource.\n\nA `ListPolicy` can define specific values that are allowed or denied by\nsetting either the `allowed_values` or `denied_values` fields. It can also\nbe used to allow or deny all values, by setting the `all_values` field. If\n`all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values`\nor `denied_values` must be set (attempting to set both or neither will\nresult in a failed request). If `all_values` is set to either `ALLOW` or\n`DENY`, `allowed_values` and `denied_values` must be unset.", + "type": "object", + "properties": { + "allValues": { + "enumDescriptions": [ + "Indicates that either allowed_values or denied_values must be set.", + "A policy with this set allows all values.", + "A policy with this set denies all values." + ], + "enum": [ + "ALL_VALUES_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "description": "The policy all_values state.", + "type": "string" + }, + "allowedValues": { + "description": "List of values allowed at this resource. an only be set if no values are\nset for `denied_values` and `all_values` is set to\n`ALL_VALUES_UNSPECIFIED`.", + "type": "array", + "items": { + "type": "string" + } + }, + "suggestedValue": { + "type": "string", + "description": "Optional. The Google Cloud Console will try to default to a configuration\nthat matches the value specified in this `Policy`. If `suggested_value`\nis not set, it will inherit the value specified higher in the hierarchy,\nunless `inherit_from_parent` is `false`." + }, + "inheritFromParent": { + "description": "Determines the inheritance behavior for this `Policy`.\n\nBy default, a `ListPolicy` set at a resource supercedes any `Policy` set\nanywhere up the resource hierarchy. However, if `inherit_from_parent` is\nset to `true`, then the values from the effective `Policy` of the parent\nresource are inherited, meaning the values set in this `Policy` are\nadded to the values inherited up the hierarchy.\n\nSetting `Policy` hierarchies that inherit both allowed values and denied\nvalues isn't recommended in most circumstances to keep the configuration\nsimple and understandable. However, it is possible to set a `Policy` with\n`allowed_values` set that inherits a `Policy` with `denied_values` set.\nIn this case, the values that are allowed must be in `allowed_values` and\nnot present in `denied_values`.\n\nFor example, suppose you have a `Constraint`\n`constraints/serviceuser.services`, which has a `constraint_type` of\n`list_constraint`, and with `constraint_default` set to `ALLOW`.\nSuppose that at the Organization level, a `Policy` is applied that\nrestricts the allowed API activations to {`E1`, `E2`}. Then, if a\n`Policy` is applied to a project below the Organization that has\n`inherit_from_parent` set to `false` and field all_values set to DENY,\nthen an attempt to activate any API will be denied.\n\nThe following examples demonstrate different possible layerings:\n\nExample 1 (no inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values:”E2”}\n ``projects/bar`` has `inherit_from_parent` `false` and values:\n {allowed_values: \"E3\" allowed_values: \"E4\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E3`, and `E4`.\n\nExample 2 (inherited values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values:”E2”}\n `projects/bar` has a `Policy` with values:\n {value: “E3” value: ”E4” inherit_from_parent: true}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.\n\nExample 3 (inheriting both allowed and denied values):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: \"E1\" allowed_values: \"E2\"}\n `projects/bar` has a `Policy` with:\n {denied_values: \"E1\"}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe value accepted at `projects/bar` is `E2`.\n\nExample 4 (RestoreDefault):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values:”E2”}\n `projects/bar` has a `Policy` with values:\n {RestoreDefault: {}}\nThe accepted values at `organizations/foo` are `E1`, `E2`.\nThe accepted values at `projects/bar` are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 5 (no policy inherits parent policy):\n `organizations/foo` has no `Policy` set.\n `projects/bar` has no `Policy` set.\nThe accepted values at both levels are either all or none depending on\nthe value of `constraint_default` (if `ALLOW`, all; if\n`DENY`, none).\n\nExample 6 (ListConstraint allowing all):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values: ”E2”}\n `projects/bar` has a `Policy` with:\n {all: ALLOW}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nAny value is accepted at `projects/bar`.\n\nExample 7 (ListConstraint allowing none):\n `organizations/foo` has a `Policy` with values:\n {allowed_values: “E1” allowed_values: ”E2”}\n `projects/bar` has a `Policy` with:\n {all: DENY}\nThe accepted values at `organizations/foo` are `E1`, E2`.\nNo value is accepted at `projects/bar`.", + "type": "boolean" + }, + "deniedValues": { + "description": "List of values denied at this resource. Can only be set if no values are\nset for `allowed_values` and `all_values` is set to\n`ALL_VALUES_UNSPECIFIED`.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ListPolicy" + }, + "GetAncestryResponse": { + "description": "Response from the GetAncestry method.", + "type": "object", + "properties": { + "ancestor": { + "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", + "type": "array", + "items": { + "$ref": "Ancestor" + } + } + }, + "id": "GetAncestryResponse" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", + "type": "object", + "properties": { + "exemptedMembers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members." + }, + "logType": { + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "description": "The log type that this config enables.", + "type": "string" + } + }, + "id": "AuditLogConfig" + }, + "SearchOrganizationsRequest": { + "id": "SearchOrganizationsRequest", + "description": "The request sent to the `SearchOrganizations` method.", + "type": "object", + "properties": { + "pageToken": { + "description": "A pagination token returned from a previous call to `SearchOrganizations`\nthat indicates from where listing should continue.\nThis field is optional.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", + "format": "int32" + }, + "filter": { + "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with\n`owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", + "type": "string" + } + } + }, + "GetAncestryRequest": { + "type": "object", + "properties": {}, + "id": "GetAncestryRequest", + "description": "The request sent to the\nGetAncestry\nmethod." + }, + "TestIamPermissionsRequest": { + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsRequest", + "description": "Request message for `TestIamPermissions` method.", + "type": "object" + }, + "ListAvailableOrgPolicyConstraintsRequest": { + "description": "The request sent to the [ListAvailableOrgPolicyConstraints]\ngoogle.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method.", + "type": "object", + "properties": { + "pageToken": { + "type": "string", + "description": "Page token used to retrieve the next page. This is currently unsupported\nand will be ignored. The server may at any point start using this field." + }, + "pageSize": { + "description": "Size of the pages to be returned. This is currently unsupported and will\nbe ignored. The server may at any point start using this field to limit\npage size.", + "format": "int32", + "type": "integer" + } + }, + "id": "ListAvailableOrgPolicyConstraintsRequest" + }, + "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Version of the `Policy`. The default version is 0.", + "format": "int32", + "type": "integer" + }, + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "type": "array", + "items": { + "$ref": "AuditConfig" + } + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", + "type": "array", + "items": { + "$ref": "Binding" + } + } + }, + "id": "Policy" + }, + "FolderOperation": { + "description": "Metadata describing a long running folder operation", + "type": "object", + "properties": { + "operationType": { + "type": "string", + "enumDescriptions": [ + "Operation type not specified.", + "A create folder operation.", + "A move folder operation." + ], + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "CREATE", + "MOVE" + ], + "description": "The type of this operation." + }, + "displayName": { + "type": "string", + "description": "The display name of the folder." + }, + "sourceParent": { + "type": "string", + "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE." + }, + "destinationParent": { + "description": "The resource name of the folder or organization we are either creating\nthe folder under or moving the folder to.", + "type": "string" + } + }, + "id": "FolderOperation" + }, + "ResourceId": { "properties": { "type": { - "description": "Required field representing the resource type this id is for.\nAt present, the only valid type is \"organization\".", + "description": "Required field representing the resource type this id is for.\nAt present, the valid types are: \"organization\"", "type": "string" }, "id": { @@ -819,194 +1891,117 @@ "type": "string" } }, - "id": "ResourceId" + "id": "ResourceId", + "description": "A container to reference an id for any resource type. A `resource` in Google\nCloud Platform is a generic term for something you (a developer) may want to\ninteract with through one of our API's. Some examples are an App Engine app,\na Compute Engine instance, a Cloud SQL database, and so on.", + "type": "object" }, - "Binding": { - "description": "Associates `members` with a `role`.", + "GetEffectiveOrgPolicyRequest": { + "description": "The request sent to the GetEffectiveOrgPolicy method.", "type": "object", "properties": { - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", - "type": "array", - "items": { - "type": "string" - } - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "constraint": { + "description": "The name of the `Constraint` to compute the effective `Policy`.", "type": "string" } }, - "id": "Binding" + "id": "GetEffectiveOrgPolicyRequest" }, - "Project": { - "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, AppEngine Apps, VMs, and other\nGoogle Cloud Platform resources.", + "ListOrgPoliciesRequest": { + "description": "The request sent to the ListOrgPolicies method.", "type": "object", "properties": { - "parent": { - "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write.", - "$ref": "ResourceId" + "pageToken": { + "type": "string", + "description": "Page token used to retrieve the next page. This is currently unsupported\nand will be ignored. The server may at any point start using this field." }, - "labels": { - "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\n\nRead-write.", + "pageSize": { + "description": "Size of the pages to be returned. This is currently unsupported and will\nbe ignored. The server may at any point start using this field to limit\npage size.", + "format": "int32", + "type": "integer" + } + }, + "id": "ListOrgPoliciesRequest" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { "additionalProperties": { - "type": "string" + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", "type": "object" }, - "lifecycleState": { - "description": "The Project lifecycle state.\n\nRead-only.", - "enum": [ - "LIFECYCLE_STATE_UNSPECIFIED", - "ACTIVE", - "DELETE_REQUESTED", - "DELETE_IN_PROGRESS" - ], - "enumDescriptions": [ - "Unspecified state. This is only used/useful for distinguishing\nunset values.", - "The normal and active state.", - "The project has been marked for deletion by the user\n(by invoking\nDeleteProject)\nor by the system (Google Cloud Platform).\nThis can generally be reversed by invoking UndeleteProject.", - "This lifecycle state is no longer used and not returned by the API." - ], - "type": "string" - }, - "createTime": { - "description": "Creation time.\n\nRead-only.", - "type": "string", - "format": "google-datetime" - }, "name": { - "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\n\nRead-write.", + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", "type": "string" }, - "projectNumber": { - "description": "The number uniquely identifying the project.\n\nExample: \u003ccode\u003e415104041262\u003c/code\u003e\n\nRead-only.", - "type": "string", - "format": "int64" + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" }, - "projectId": { - "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\n\nRead-only after creation.", - "type": "string" + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" } }, - "id": "Project" + "id": "Operation" }, - "OrganizationOwner": { - "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted.", + "AuditConfig": { + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", "type": "object", "properties": { - "directoryCustomerId": { - "description": "The Google for Work customer id used in the Directory API.", - "type": "string" + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "type": "array", + "items": { + "$ref": "AuditLogConfig" + } + }, + "service": { + "type": "string", + "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services." } }, - "id": "OrganizationOwner" + "id": "AuditConfig" } }, - "revision": "20161212", - "basePath": "", + "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "canonicalName": "Cloud Resource Manager", - "discoveryVersion": "v1", + "version": "v1", "baseUrl": "https://cloudresourcemanager.googleapis.com/", - "name": "cloudresourcemanager", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "canonicalName": "Cloud Resource Manager", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } } }, - "documentationLink": "https://cloud.google.com/resource-manager", - "ownerDomain": "google.com", - "batchPath": "batch", + "kind": "discovery#restDescription", + "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", "servicePath": "", - "ownerName": "Google", - "version": "v1", "rootUrl": "https://cloudresourcemanager.googleapis.com/", - "kind": "discovery#restDescription" + "basePath": "", + "ownerDomain": "google.com", + "name": "cloudresourcemanager", + "batchPath": "batch" } diff --git a/etc/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json b/etc/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json index 4cd1f6e127..e1d3809c58 100644 --- a/etc/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json +++ b/etc/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json @@ -1,512 +1,216 @@ { - "id": "cloudresourcemanager:v1beta1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - } - } - } - }, - "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", - "protocol": "rest", - "title": "Google Cloud Resource Manager API", - "resources": { - "projects": { - "methods": { - "getAncestry": { - "id": "cloudresourcemanager.projects.getAncestry", - "response": { - "$ref": "GetAncestryResponse" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", - "request": { - "$ref": "GetAncestryRequest" - }, - "flatPath": "v1beta1/projects/{projectId}:getAncestry", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/projects/{projectId}:getAncestry", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "getIamPolicy": { - "id": "cloudresourcemanager.projects.getIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "flatPath": "v1beta1/projects/{resource}:getIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/projects/{resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "undelete": { - "id": "cloudresourcemanager.projects.undelete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", - "request": { - "$ref": "UndeleteProjectRequest" - }, - "flatPath": "v1beta1/projects/{projectId}:undelete", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/projects/{projectId}:undelete", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "cloudresourcemanager.projects.list", - "response": { - "$ref": "ListProjectsResponse" - }, - "parameterOrder": [], - "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list.", - "flatPath": "v1beta1/projects", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "The maximum number of Projects to return in the response.\nThe server can return fewer Projects than requested.\nIf unspecified, server picks an appropriate default.\n\nOptional.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:*|The project has a name.|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red label.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`.\n\nOptional.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/projects", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "get": { - "id": "cloudresourcemanager.projects.get", - "response": { - "$ref": "Project" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", - "flatPath": "v1beta1/projects/{projectId}", - "httpMethod": "GET", - "parameters": { - "projectId": { - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/projects/{projectId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "update": { - "id": "cloudresourcemanager.projects.update", - "response": { - "$ref": "Project" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project.", - "request": { - "$ref": "Project" - }, - "flatPath": "v1beta1/projects/{projectId}", - "httpMethod": "PUT", - "parameters": { - "projectId": { - "description": "The project ID (for example, `my-project-123`).\n\nRequired.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/projects/{projectId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "id": "cloudresourcemanager.projects.create", - "response": { - "$ref": "Project" - }, - "parameterOrder": [], - "description": "Creates a Project resource.\n\nInitially, the Project resource is owned by its creator exclusively.\nThe creator can later grant permission to others to read or update the\nProject.\n\nSeveral APIs are activated automatically for the Project, including\nGoogle Cloud Storage.", - "request": { - "$ref": "Project" - }, - "flatPath": "v1beta1/projects", - "httpMethod": "POST", - "parameters": { - "useLegacyStack": { - "description": "A safety hatch to opt out of the new reliable project creation process.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1beta1/projects", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "id": "cloudresourcemanager.projects.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using `setIamPolicy()`;\nthey must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ There must be at least one owner who has accepted the Terms of\nService (ToS) agreement in the policy. Calling `setIamPolicy()` to\nto remove the last ToS-accepted owner from the policy will fail. This\nrestriction also applies to legacy projects that no longer have owners\nwho have accepted the ToS. Edits to IAM policies will be rejected until\nthe lack of a ToS-accepting owner is rectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its roles.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1beta1/projects/{resource}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/projects/{resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "cloudresourcemanager.projects.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time, at which point the project is\nno longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project.", - "flatPath": "v1beta1/projects/{projectId}", - "httpMethod": "DELETE", - "parameters": { - "projectId": { - "description": "The Project ID (for example, `foo-bar-123`).\n\nRequired.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/projects/{projectId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "id": "cloudresourcemanager.projects.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified Project.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "flatPath": "v1beta1/projects/{resource}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/projects/{resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - } - } - }, - "organizations": { - "methods": { - "getIamPolicy": { - "id": "cloudresourcemanager.organizations.getIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\".", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "flatPath": "v1beta1/organizations/{organizationsId}:getIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "list": { - "id": "cloudresourcemanager.organizations.list", - "response": { - "$ref": "ListOrganizationsResponse" - }, - "parameterOrder": [], - "description": "Lists Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the list.", - "flatPath": "v1beta1/organizations", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with `owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "A pagination token returned from a previous call to `ListOrganizations`\nthat indicates from where listing should continue.\nThis field is optional.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/organizations", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "get": { - "id": "cloudresourcemanager.organizations.get", - "response": { - "$ref": "Organization" - }, - "parameterOrder": [ - "name" - ], - "description": "Fetches an Organization resource identified by the specified resource name.", - "flatPath": "v1beta1/organizations/{organizationsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - }, - "organizationId": { - "description": "The id of the Organization resource to fetch.\nThis field is deprecated and will be removed in v1. Use name instead.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "update": { - "id": "cloudresourcemanager.organizations.update", - "response": { - "$ref": "Organization" - }, - "parameterOrder": [ - "name" - ], - "description": "Updates an Organization resource identified by the specified resource name.", - "request": { - "$ref": "Organization" - }, - "flatPath": "v1beta1/organizations/{organizationsId}", - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "id": "cloudresourcemanager.organizations.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1beta1/organizations/{organizationsId}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "id": "cloudresourcemanager.organizations.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\".", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "flatPath": "v1beta1/organizations/{organizationsId}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - } - } - } - }, "schemas": { - "FolderOperationError": { - "description": "A classification of the Folder Operation error.", + "Ancestor": { + "description": "Identifying information for a single ancestor of a project.", "type": "object", "properties": { - "errorMessageId": { - "description": "The type of operation error experienced.", - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "FOLDER_HEIGHT_VIOLATION", - "MAX_CHILD_FOLDERS_VIOLATION", - "FOLDER_NAME_UNIQUENESS_VIOLATION", - "RESOURCE_DELETED", - "PARENT_DELETED", - "CYCLE_INTRODUCED_ERROR", - "FOLDER_ALREADY_BEING_MOVED", - "FOLDER_TO_DELETE_NON_EMPTY" - ], - "enumDescriptions": [ - "The error type was unrecognized or unspecified.", - "The attempted action would violate the max folder depth constraint.", - "The attempted action would violate the max child folders constraint.", - "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", - "The resource being moved has been deleted.", - "The resource a folder was being added to has been deleted.", - "The attempted action would introduce cycle in resource path.", - "The attempted action would move a folder that is already being moved.", - "The folder the caller is trying to delete contains active resources." - ], + "resourceId": { + "$ref": "ResourceId", + "description": "Resource id of the ancestor." + } + }, + "id": "Ancestor" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "format": "google-fieldmask", "type": "string" } }, - "id": "FolderOperationError" + "id": "SetIamPolicyRequest" + }, + "ListOrganizationsResponse": { + "description": "The response returned from the `ListOrganizations` method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A pagination token to be used to retrieve the next page of results. If the\nresult is too large to fit within the page size specified in the request,\nthis field will be set with a token that can be used to fetch the next page\nof results. If this field is empty, it indicates that this response\ncontains the last page of results.", + "type": "string" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "Organization" + }, + "description": "The list of Organizations that matched the list query, possibly paginated." + } + }, + "id": "ListOrganizationsResponse" + }, + "Binding": { + "properties": { + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "type": "array", + "items": { + "type": "string" + } + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + } + }, + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "UndeleteProjectRequest": { + "description": "The request sent to the UndeleteProject\nmethod.", + "type": "object", + "properties": {}, + "id": "UndeleteProjectRequest" + }, + "Organization": { + "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", + "type": "object", + "properties": { + "creationTime": { + "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "owner": { + "$ref": "OrganizationOwner", + "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required." + }, + "name": { + "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", + "type": "string" + }, + "organizationId": { + "description": "An immutable id for the Organization that is assigned on creation. This\nshould be omitted when creating a new Organization.\nThis field is read-only.\nThis field is deprecated and will be removed in v1. Use name instead.", + "type": "string" + }, + "lifecycleState": { + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ], + "description": "The organization's current lifecycle state. Assigned by the server.\n@OutputOnly", + "type": "string", + "enumDescriptions": [ + "Unspecified state. This is only useful for distinguishing unset values.", + "The normal and active state.", + "The organization has been marked for deletion by the user." + ] + }, + "displayName": { + "description": "A friendly string to be used to refer to the Organization in the UI.\nAssigned by the server, set to the primary domain of the G Suite\ncustomer that owns the organization.\n@OutputOnly", + "type": "string" + } + }, + "id": "Organization" + }, + "ProjectCreationStatus": { + "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", + "type": "object", + "properties": { + "ready": { + "type": "boolean", + "description": "True if the project creation process is complete." + }, + "createTime": { + "description": "Creation time of the project creation workflow.", + "format": "google-datetime", + "type": "string" + }, + "gettable": { + "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", + "type": "boolean" + } + }, + "id": "ProjectCreationStatus" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsResponse" + }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, + "GetAncestryResponse": { + "description": "Response from the GetAncestry method.", + "type": "object", + "properties": { + "ancestor": { + "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", + "type": "array", + "items": { + "$ref": "Ancestor" + } + } + }, + "id": "GetAncestryResponse" + }, + "OrganizationOwner": { + "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted.", + "type": "object", + "properties": { + "directoryCustomerId": { + "description": "The Google for Work customer id used in the Directory API.", + "type": "string" + } + }, + "id": "OrganizationOwner" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", + "type": "object", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", + "type": "array", + "items": { + "type": "string" + } + }, + "logType": { + "description": "The log type that this config enables.", + "type": "string", + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ] + } + }, + "id": "AuditLogConfig" }, "ListProjectsResponse": { "description": "A page of the response received from the\nListProjects\nmethod.\n\nA paginated response where more pages are available has\n`next_page_token` set. This token can be used in a subsequent request to\nretrieve the next request page.", @@ -526,11 +230,108 @@ }, "id": "ListProjectsResponse" }, - "UndeleteProjectRequest": { - "description": "The request sent to the UndeleteProject\nmethod.", - "type": "object", + "GetAncestryRequest": { "properties": {}, - "id": "UndeleteProjectRequest" + "id": "GetAncestryRequest", + "description": "The request sent to the\nGetAncestry\nmethod.", + "type": "object" + }, + "Project": { + "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, App Engine Apps, VMs, and other\nGoogle Cloud Platform resources.", + "type": "object", + "properties": { + "lifecycleState": { + "type": "string", + "enumDescriptions": [ + "Unspecified state. This is only used/useful for distinguishing\nunset values.", + "The normal and active state.", + "The project has been marked for deletion by the user\n(by invoking DeleteProject)\nor by the system (Google Cloud Platform).\nThis can generally be reversed by invoking UndeleteProject.", + "This lifecycle state is no longer used and is not returned by the API." + ], + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED", + "DELETE_IN_PROGRESS" + ], + "description": "The Project lifecycle state.\n\nRead-only." + }, + "projectNumber": { + "type": "string", + "description": "The number uniquely identifying the project.\n\nExample: \u003ccode\u003e415104041262\u003c/code\u003e\nRead-only.", + "format": "int64" + }, + "parent": { + "$ref": "ResourceId", + "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write." + }, + "labels": { + "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\nRead-write.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "createTime": { + "description": "Creation time.\n\nRead-only.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", + "type": "string" + }, + "projectId": { + "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\nRead-only after creation.", + "type": "string" + } + }, + "id": "Project" + }, + "TestIamPermissionsRequest": { + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsRequest", + "description": "Request message for `TestIamPermissions` method.", + "type": "object" + }, + "Policy": { + "type": "object", + "properties": { + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Version of the `Policy`. The default version is 0.", + "format": "int32", + "type": "integer" + }, + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "type": "array", + "items": { + "$ref": "AuditConfig" + } + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", + "type": "array", + "items": { + "$ref": "Binding" + } + } + }, + "id": "Policy", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam)." }, "FolderOperation": { "description": "Metadata describing a long running folder operation", @@ -549,326 +350,605 @@ "type": "string" }, "operationType": { - "description": "The type of this operation.", - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE", - "MOVE" - ], "enumDescriptions": [ "Operation type not specified.", "A create folder operation.", "A move folder operation." ], + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "CREATE", + "MOVE" + ], + "description": "The type of this operation.", "type": "string" } }, "id": "FolderOperation" }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", - "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", + "FolderOperationError": { + "description": "A classification of the Folder Operation error.", "type": "object", "properties": { - "policy": { - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", - "$ref": "Policy" - } - }, - "id": "SetIamPolicyRequest" - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "TestIamPermissionsResponse" - }, - "Organization": { - "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", - "type": "object", - "properties": { - "lifecycleState": { - "description": "The organization's current lifecycle state. Assigned by the server.\n@OutputOnly", - "enum": [ - "LIFECYCLE_STATE_UNSPECIFIED", - "ACTIVE", - "DELETE_REQUESTED" - ], + "errorMessageId": { + "type": "string", "enumDescriptions": [ - "Unspecified state. This is only useful for distinguishing unset values.", - "The normal and active state.", - "The organization has been marked for deletion by the user." + "The error type was unrecognized or unspecified.", + "The attempted action would violate the max folder depth constraint.", + "The attempted action would violate the max child folders constraint.", + "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", + "The resource being moved has been deleted.", + "The resource a folder was being added to has been deleted.", + "The attempted action would introduce cycle in resource path.", + "The attempted action would move a folder that is already being moved.", + "The folder the caller is trying to delete contains active resources.", + "The attempted action would violate the max deleted folder depth\nconstraint." ], - "type": "string" - }, - "displayName": { - "description": "A friendly string to be used to refer to the Organization in the UI.\nAssigned by the server, set to the firm name of the Google For Work\ncustomer that owns this organization.\n@OutputOnly", - "type": "string" - }, - "organizationId": { - "description": "An immutable id for the Organization that is assigned on creation. This\nshould be omitted when creating a new Organization.\nThis field is read-only.\nThis field is deprecated and will be removed in v1. Use name instead.", - "type": "string" - }, - "name": { - "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", - "type": "string" - }, - "creationTime": { - "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly", - "type": "string", - "format": "google-datetime" - }, - "owner": { - "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required.", - "$ref": "OrganizationOwner" + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "ACTIVE_FOLDER_HEIGHT_VIOLATION", + "MAX_CHILD_FOLDERS_VIOLATION", + "FOLDER_NAME_UNIQUENESS_VIOLATION", + "RESOURCE_DELETED_VIOLATION", + "PARENT_DELETED_VIOLATION", + "CYCLE_INTRODUCED_VIOLATION", + "FOLDER_BEING_MOVED_VIOLATION", + "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", + "DELETED_FOLDER_HEIGHT_VIOLATION" + ], + "description": "The type of operation error experienced." } }, - "id": "Organization" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "bindings": { - "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", - "type": "array", - "items": { - "$ref": "Binding" - } - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string", - "format": "byte" - }, - "version": { - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer", - "format": "int32" - } - }, - "id": "Policy" - }, - "ProjectCreationStatus": { - "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", - "type": "object", - "properties": { - "ready": { - "description": "True if the project creation process is complete.", - "type": "boolean" - }, - "gettable": { - "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", - "type": "boolean" - }, - "createTime": { - "description": "Creation time of the project creation workflow.", - "type": "string", - "format": "google-datetime" - } - }, - "id": "ProjectCreationStatus" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "TestIamPermissionsRequest" - }, - "ListOrganizationsResponse": { - "description": "The response returned from the `ListOrganizations` method.", - "type": "object", - "properties": { - "organizations": { - "description": "The list of Organizations that matched the list query, possibly paginated.", - "type": "array", - "items": { - "$ref": "Organization" - } - }, - "nextPageToken": { - "description": "A pagination token to be used to retrieve the next page of results. If the\nresult is too large to fit within the page size specified in the request,\nthis field will be set with a token that can be used to fetch the next page\nof results. If this field is empty, it indicates that this response\ncontains the last page of results.", - "type": "string" - } - }, - "id": "ListOrganizationsResponse" - }, - "GetAncestryRequest": { - "description": "The request sent to the\nGetAncestry\nmethod.", - "type": "object", - "properties": {}, - "id": "GetAncestryRequest" - }, - "GetAncestryResponse": { - "description": "Response from the GetAncestry method.", - "type": "object", - "properties": { - "ancestor": { - "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", - "type": "array", - "items": { - "$ref": "Ancestor" - } - } - }, - "id": "GetAncestryResponse" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "Ancestor": { - "description": "Identifying information for a single ancestor of a project.", - "type": "object", - "properties": { - "resourceId": { - "description": "Resource id of the ancestor.", - "$ref": "ResourceId" - } - }, - "id": "Ancestor" + "id": "FolderOperationError" }, "ResourceId": { - "description": "A container to reference an id for any resource type. A `resource` in Google\nCloud Platform is a generic term for something you (a developer) may want to\ninteract with through one of our API's. Some examples are an AppEngine app,\na Compute Engine instance, a Cloud SQL database, and so on.", - "type": "object", "properties": { - "type": { - "description": "Required field representing the resource type this id is for.\nAt present, the valid types are \"project\" and \"organization\".", - "type": "string" - }, "id": { "description": "Required field for the type-specific id. This should correspond to the id\nused in the type-specific API's.", "type": "string" + }, + "type": { + "type": "string", + "description": "Required field representing the resource type this id is for.\nAt present, the valid types are \"project\" and \"organization\"." } }, - "id": "ResourceId" + "id": "ResourceId", + "description": "A container to reference an id for any resource type. A `resource` in Google\nCloud Platform is a generic term for something you (a developer) may want to\ninteract with through one of our API's. Some examples are an App Engine app,\na Compute Engine instance, a Cloud SQL database, and so on.", + "type": "object" }, - "Project": { - "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, AppEngine Apps, VMs, and other\nGoogle Cloud Platform resources.", - "type": "object", + "AuditConfig": { "properties": { - "parent": { - "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write.", - "$ref": "ResourceId" - }, - "labels": { - "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\n\nRead-write.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "lifecycleState": { - "description": "The Project lifecycle state.\n\nRead-only.", - "enum": [ - "LIFECYCLE_STATE_UNSPECIFIED", - "ACTIVE", - "DELETE_REQUESTED", - "DELETE_IN_PROGRESS" - ], - "enumDescriptions": [ - "Unspecified state. This is only used/useful for distinguishing\nunset values.", - "The normal and active state.", - "The project has been marked for deletion by the user\n(by invoking DeleteProject)\nor by the system (Google Cloud Platform).\nThis can generally be reversed by invoking UndeleteProject.", - "This lifecycle state is no longer used and is not returned by the API." - ], + "service": { + "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", "type": "string" }, - "createTime": { - "description": "Creation time.\n\nRead-only.", - "type": "string", - "format": "google-datetime" - }, - "name": { - "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\n\nRead-write.", - "type": "string" - }, - "projectNumber": { - "description": "The number uniquely identifying the project.\n\nExample: \u003ccode\u003e415104041262\u003c/code\u003e\n\nRead-only.", - "type": "string", - "format": "int64" - }, - "projectId": { - "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\n\nRead-only after creation.", - "type": "string" - } - }, - "id": "Project" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", "type": "array", "items": { - "type": "string" + "$ref": "AuditLogConfig" } - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" } }, - "id": "Binding" - }, - "OrganizationOwner": { - "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted.", - "type": "object", - "properties": { - "directoryCustomerId": { - "description": "The Google for Work customer id used in the Directory API.", - "type": "string" - } - }, - "id": "OrganizationOwner" + "id": "AuditConfig", + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", + "type": "object" } }, - "revision": "20161212", - "basePath": "", + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "canonicalName": "Cloud Resource Manager", - "discoveryVersion": "v1", + "version": "v1beta1", "baseUrl": "https://cloudresourcemanager.googleapis.com/", + "canonicalName": "Cloud Resource Manager", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "servicePath": "", + "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", + "kind": "discovery#restDescription", + "rootUrl": "https://cloudresourcemanager.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", "name": "cloudresourcemanager", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" + "batchPath": "batch", + "revision": "20170517", + "documentationLink": "https://cloud.google.com/resource-manager", + "id": "cloudresourcemanager:v1beta1", + "title": "Google Cloud Resource Manager API", + "discoveryVersion": "v1", + "ownerName": "Google", + "resources": { + "organizations": { + "methods": { + "list": { + "response": { + "$ref": "ListOrganizationsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "filter": { + "location": "query", + "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with `owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", + "type": "string" + }, + "pageToken": { + "description": "A pagination token returned from a previous call to `ListOrganizations`\nthat indicates from where listing should continue.\nThis field is optional.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v1beta1/organizations", + "path": "v1beta1/organizations", + "id": "cloudresourcemanager.organizations.list", + "description": "Lists Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the list." + }, + "setIamPolicy": { + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/organizations/{organizationsId}:setIamPolicy", + "id": "cloudresourcemanager.organizations.setIamPolicy", + "path": "v1beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + } + }, + "getIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta1/organizations/{organizationsId}:getIamPolicy", + "id": "cloudresourcemanager.organizations.getIamPolicy", + "path": "v1beta1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\"." + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Organization" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "name": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", + "required": true, + "type": "string" + }, + "organizationId": { + "location": "query", + "description": "The id of the Organization resource to fetch.\nThis field is deprecated and will be removed in v1. Use name instead.", + "type": "string" + } + }, + "flatPath": "v1beta1/organizations/{organizationsId}", + "id": "cloudresourcemanager.organizations.get", + "path": "v1beta1/{+name}", + "description": "Fetches an Organization resource identified by the specified resource name." + }, + "update": { + "id": "cloudresourcemanager.organizations.update", + "path": "v1beta1/{+name}", + "request": { + "$ref": "Organization" + }, + "description": "Updates an Organization resource identified by the specified resource name.", + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Organization" + }, + "parameters": { + "name": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/organizations/{organizationsId}" + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\".", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta1/organizations/{organizationsId}:testIamPermissions", + "id": "cloudresourcemanager.organizations.testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions" + } + } }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" + "projects": { + "methods": { + "delete": { + "path": "v1beta1/projects/{projectId}", + "id": "cloudresourcemanager.projects.delete", + "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time, at which point the project is\nno longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project.", + "response": { + "$ref": "Empty" + }, + "httpMethod": "DELETE", + "parameterOrder": [ + "projectId" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Project ID (for example, `foo-bar-123`).\n\nRequired.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}" + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListProjectsResponse" + }, + "parameterOrder": [], + "parameters": { + "filter": { + "location": "query", + "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red labels.size:big|The project's label `color` has the\nvalue `red` and its label `size` has the value `big`.\n\nOptional.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "The maximum number of Projects to return in the response.\nThe server can return fewer Projects than requested.\nIf unspecified, server picks an appropriate default.\n\nOptional.", + "format": "int32", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta1/projects", + "id": "cloudresourcemanager.projects.list", + "path": "v1beta1/projects", + "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list." + }, + "create": { + "path": "v1beta1/projects", + "id": "cloudresourcemanager.projects.create", + "request": { + "$ref": "Project" + }, + "description": "Creates a Project resource.\n\nInitially, the Project resource is owned by its creator exclusively.\nThe creator can later grant permission to others to read or update the\nProject.\n\nSeveral APIs are activated automatically for the Project, including\nGoogle Cloud Storage.", + "response": { + "$ref": "Project" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": { + "useLegacyStack": { + "location": "query", + "description": "A safety hatch to opt out of the new reliable project creation process.", + "type": "boolean" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects" + }, + "setIamPolicy": { + "flatPath": "v1beta1/projects/{resource}:setIamPolicy", + "id": "cloudresourcemanager.projects.setIamPolicy", + "path": "v1beta1/projects/{resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using\n`setIamPolicy()`; they must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ There must be at least one owner who has accepted the Terms of\nService (ToS) agreement in the policy. Calling `setIamPolicy()` to\nremove the last ToS-accepted owner from the policy will fail. This\nrestriction also applies to legacy projects that no longer have owners\nwho have accepted the ToS. Edits to IAM policies will be rejected until\nthe lack of a ToS-accepting owner is rectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta1/projects/{resource}:getIamPolicy", + "id": "cloudresourcemanager.projects.getIamPolicy", + "path": "v1beta1/projects/{resource}:getIamPolicy" + }, + "undelete": { + "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", + "request": { + "$ref": "UndeleteProjectRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta1/projects/{projectId}:undelete", + "id": "cloudresourcemanager.projects.undelete", + "path": "v1beta1/projects/{projectId}:undelete" + }, + "get": { + "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "response": { + "$ref": "Project" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "projectId": { + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectId}", + "path": "v1beta1/projects/{projectId}", + "id": "cloudresourcemanager.projects.get" + }, + "getAncestry": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta1/projects/{projectId}:getAncestry", + "id": "cloudresourcemanager.projects.getAncestry", + "path": "v1beta1/projects/{projectId}:getAncestry", + "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "request": { + "$ref": "GetAncestryRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "GetAncestryResponse" + } + }, + "update": { + "response": { + "$ref": "Project" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "PUT", + "parameters": { + "projectId": { + "location": "path", + "description": "The project ID (for example, `my-project-123`).\n\nRequired.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}", + "path": "v1beta1/projects/{projectId}", + "id": "cloudresourcemanager.projects.update", + "request": { + "$ref": "Project" + }, + "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project." + }, + "testIamPermissions": { + "id": "cloudresourcemanager.projects.testIamPermissions", + "path": "v1beta1/projects/{resource}:testIamPermissions", + "description": "Returns permissions that a caller has on the specified Project.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{resource}:testIamPermissions" + } + } + } + }, + "parameters": { + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" }, "key": { "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.", @@ -882,76 +962,58 @@ }, "pp": { "description": "Pretty-print response.", - "default": "true", "type": "boolean", + "default": "true", "location": "query" }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", + "bearer_token": { "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + "description": "OAuth bearer token." }, "oauth_token": { "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "type": "string", + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" } - }, - "documentationLink": "https://cloud.google.com/resource-manager", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v1beta1", - "rootUrl": "https://cloudresourcemanager.googleapis.com/", - "kind": "discovery#restDescription" + } } diff --git a/etc/api/cloudtrace/v1/cloudtrace-api.json b/etc/api/cloudtrace/v1/cloudtrace-api.json index 3d84328020..4f835da3bf 100644 --- a/etc/api/cloudtrace/v1/cloudtrace-api.json +++ b/etc/api/cloudtrace/v1/cloudtrace-api.json @@ -1,362 +1,383 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/avS4leRd3oaImhwLi14P2pt74p0\"", - "discoveryVersion": "v1", - "id": "cloudtrace:v1", - "name": "cloudtrace", - "canonicalName": "Cloud Trace", - "version": "v1", - "revision": "20160518", - "title": "Google Cloud Trace API", - "description": "Send and retrieve trace data from Google Cloud Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Cloud Trace for display, reporting, and analysis.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/tools/cloud-trace", - "protocol": "rest", - "baseUrl": "https://cloudtrace.googleapis.com/", - "basePath": "", - "rootUrl": "https://cloudtrace.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "version_module": true, - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "basePath": "", + "revision": "20170516", + "documentationLink": "https://cloud.google.com/trace", + "id": "cloudtrace:v1", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { + "Traces": { + "description": "List of new or updated traces.", + "type": "object", + "properties": { + "traces": { + "description": "List of traces.", + "type": "array", + "items": { + "$ref": "Trace" + } + } + }, + "id": "Traces" }, - "https://www.googleapis.com/auth/trace.append": { - "description": "Write Trace data for a project or application" - }, - "https://www.googleapis.com/auth/trace.readonly": { - "description": "Read Trace data for a project or application" - } - } - } - }, - "schemas": { - "ListTracesResponse": { - "id": "ListTracesResponse", - "type": "object", - "description": "The response message for the `ListTraces` method.", - "properties": { - "traces": { - "type": "array", - "description": "List of trace records returned.", - "items": { - "$ref": "Trace" - } - }, - "nextPageToken": { - "type": "string", - "description": "If defined, indicates that there are more traces that match the request and that this value should be passed to the next request to continue retrieving additional traces." - } - } - }, - "Trace": { - "id": "Trace", - "type": "object", - "description": "A trace describes how long it takes for an application to perform an operation. It consists of a set of spans, each of which represent a single timed event within the operation.", - "properties": { - "projectId": { - "type": "string", - "description": "Project ID of the Cloud project where the trace data is stored." - }, - "traceId": { - "type": "string", - "description": "Globally unique identifier for the trace. This identifier is a 128-bit numeric value formatted as a 32-byte hex string." - }, - "spans": { - "type": "array", - "description": "Collection of spans in the trace.", - "items": { - "$ref": "TraceSpan" - } - } - } - }, - "TraceSpan": { - "id": "TraceSpan", - "type": "object", - "description": "A span represents a single timed event within a trace. Spans can be nested and form a trace tree. Often, a trace contains a root span that describes the end-to-end latency of an operation and, optionally, one or more subspans for its suboperations. Spans do not need to be contiguous. There may be gaps between spans in a trace.", - "properties": { - "spanId": { - "type": "string", - "description": "Identifier for the span. This identifier must be unique within a trace.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `RPC_CLIENT` and `RPC_SERVER` to identify queueing latency associated with the span.", - "enum": [ - "SPAN_KIND_UNSPECIFIED", - "RPC_SERVER", - "RPC_CLIENT" - ] - }, - "name": { - "type": "string", - "description": "Name of the trace. The trace name is sanitized and displayed in the Stackdriver Trace tool in the {% dynamic print site_values.console_name %}. The name may be a method name or some other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans." - }, - "startTime": { - "type": "string", - "description": "Start time of the span in nanoseconds from the UNIX epoch." - }, - "endTime": { - "type": "string", - "description": "End time of the span in nanoseconds from the UNIX epoch." - }, - "parentSpanId": { - "type": "string", - "description": "ID of the parent span, if any. Optional.", - "format": "uint64" - }, - "labels": { - "type": "object", - "description": "Collection of labels associated with the span.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "Traces": { - "id": "Traces", - "type": "object", - "description": "List of new or updated traces.", - "properties": { - "traces": { - "type": "array", - "description": "List of traces.", - "items": { - "$ref": "Trace" - } - } - } - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - } - }, - "resources": { - "projects": { - "methods": { - "patchTraces": { - "id": "cloudtrace.projects.patchTraces", - "path": "v1/projects/{projectId}/traces", - "httpMethod": "PATCH", - "description": "Sends new traces to Stackdriver Trace or updates existing traces. If the ID of a trace that you send matches that of an existing trace, any fields in the existing trace and its spans are overwritten by the provided values, and any new fields provided are merged with the existing trace data. If the ID does not match, a new trace is created.", - "parameters": { - "projectId": { - "type": "string", - "description": "ID of the Cloud project where the trace data is stored.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId" - ], - "request": { - "$ref": "Traces" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.append" - ] - } - }, - "resources": { - "traces": { - "methods": { - "list": { - "id": "cloudtrace.projects.traces.list", - "path": "v1/projects/{projectId}/traces", - "httpMethod": "GET", - "description": "Returns of a list of traces that match the specified filter conditions.", - "parameters": { - "projectId": { - "type": "string", - "description": "ID of the Cloud project where the trace data is stored.", - "required": true, - "location": "path" + "TraceSpan": { + "description": "A span represents a single timed event within a trace. Spans can be nested\nand form a trace tree. Often, a trace contains a root span that describes the\nend-to-end latency of an operation and, optionally, one or more subspans for\nits suboperations. Spans do not need to be contiguous. There may be gaps\nbetween spans in a trace.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Collection of labels associated with the span. Label keys must be less than\n128 bytes. Label values must be less than 16 kilobytes (10MB for\n`/stacktrace` values).\n\nSome predefined label keys exist, or you may create your own. When creating\nyour own, we recommend the following formats:\n\n* `/category/product/key` for agents of well-known products (e.g.\n `/db/mongodb/read_size`).\n* `short_host/path/key` for domain-specific keys (e.g.\n `foo.com/myproduct/bar`)\n\nPredefined labels include:\n\n* `/agent`\n* `/component`\n* `/error/message`\n* `/error/name`\n* `/http/client_city`\n* `/http/client_country`\n* `/http/client_protocol`\n* `/http/client_region`\n* `/http/host`\n* `/http/method`\n* `/http/redirected_url`\n* `/http/request/size`\n* `/http/response/size`\n* `/http/status_code`\n* `/http/url`\n* `/http/user_agent`\n* `/pid`\n* `/stacktrace`\n* `/tid`", + "type": "object" }, - "view": { - "type": "string", - "description": "Type of data returned for traces in the list. Optional. Default is `MINIMAL`.", - "enum": [ - "VIEW_TYPE_UNSPECIFIED", - "MINIMAL", - "ROOTSPAN", - "COMPLETE" - ], - "location": "query" + "name": { + "description": "Name of the span. Must be less than 128 bytes. The span name is sanitized\nand displayed in the Stackdriver Trace tool in the\n{% dynamic print site_values.console_name %}.\nThe name may be a method name or some other per-call site name.\nFor the same executable and the same call point, a best practice is\nto use a consistent name, which makes it easier to correlate\ncross-trace spans.", + "type": "string" }, - "pageSize": { - "type": "integer", - "description": "Maximum number of traces to return. If not specified or \u003c= 0, the implementation selects a reasonable value. The implementation may return fewer traces than the requested page size. Optional.", - "format": "int32", - "location": "query" + "spanId": { + "description": "Identifier for the span. Must be a 64-bit integer other than 0 and\nunique within a trace.", + "format": "uint64", + "type": "string" }, - "pageToken": { - "type": "string", - "description": "Token identifying the page of results to return. If provided, use the value of the `next_page_token` field from a previous request. Optional.", - "location": "query" - }, - "startTime": { - "type": "string", - "description": "End of the time interval (inclusive) during which the trace data was collected from the application.", - "location": "query" + "parentSpanId": { + "description": "ID of the parent span, if any. Optional.", + "format": "uint64", + "type": "string" }, "endTime": { - "type": "string", - "description": "Start of the time interval (inclusive) during which the trace data was collected from the application.", - "location": "query" + "description": "End time of the span in nanoseconds from the UNIX epoch.", + "format": "google-datetime", + "type": "string" }, - "filter": { - "type": "string", - "description": "An optional filter for the request.", - "location": "query" + "startTime": { + "description": "Start time of the span in nanoseconds from the UNIX epoch.", + "format": "google-datetime", + "type": "string" }, - "orderBy": { - "type": "string", - "description": "Field used to sort the returned traces. Optional. Can be one of the following: * `trace_id` * `name` (`name` field of root span in the trace) * `duration` (difference between `end_time` and `start_time` fields of the root span) * `start` (`start_time` field of the root span) Descending order can be specified by appending `desc` to the sort field (for example, `name desc`). Only one sort field is permitted.", - "location": "query" + "kind": { + "description": "Distinguishes between spans generated in a particular context. For example,\ntwo spans with the same name may be distinguished using `RPC_CLIENT`\nand `RPC_SERVER` to identify queueing latency associated with the span.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Indicates that the span covers server-side handling of an RPC or other\nremote network request.", + "Indicates that the span covers the client-side wrapper around an RPC or\nother remote request." + ], + "enum": [ + "SPAN_KIND_UNSPECIFIED", + "RPC_SERVER", + "RPC_CLIENT" + ] } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ListTracesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.readonly" - ] }, - "get": { - "id": "cloudtrace.projects.traces.get", - "path": "v1/projects/{projectId}/traces/{traceId}", - "httpMethod": "GET", - "description": "Gets a single trace by its ID.", - "parameters": { + "id": "TraceSpan" + }, + "ListTracesResponse": { + "description": "The response message for the `ListTraces` method.", + "type": "object", + "properties": { + "traces": { + "description": "List of trace records returned.", + "type": "array", + "items": { + "$ref": "Trace" + } + }, + "nextPageToken": { + "description": "If defined, indicates that there are more traces that match the request\nand that this value should be passed to the next request to continue\nretrieving additional traces.", + "type": "string" + } + }, + "id": "ListTracesResponse" + }, + "Empty": { + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object" + }, + "Trace": { + "id": "Trace", + "description": "A trace describes how long it takes for an application to perform an\noperation. It consists of a set of spans, each of which represent a single\ntimed event within the operation.", + "type": "object", + "properties": { "projectId": { - "type": "string", - "description": "ID of the Cloud project where the trace data is stored.", - "required": true, - "location": "path" + "description": "Project ID of the Cloud project where the trace data is stored.", + "type": "string" + }, + "spans": { + "description": "Collection of spans in the trace.", + "type": "array", + "items": { + "$ref": "TraceSpan" + } }, "traceId": { - "type": "string", - "description": "ID of the trace to return.", - "required": true, - "location": "path" + "description": "Globally unique identifier for the trace. This identifier is a 128-bit\nnumeric value formatted as a 32-byte hex string.", + "type": "string" } - }, - "parameterOrder": [ - "projectId", - "traceId" - ], - "response": { - "$ref": "Trace" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.readonly" - ] } - } } - } - } - } + }, + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "canonicalName": "Cloud Trace", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/trace.append": { + "description": "Write Trace data for a project or application" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/trace.readonly": { + "description": "Read Trace data for a project or application" + } + } + } + }, + "rootUrl": "https://cloudtrace.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudtrace", + "batchPath": "batch", + "title": "Stackdriver Trace API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "traces": { + "methods": { + "list": { + "description": "Returns of a list of traces that match the specified filter conditions.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ListTracesResponse" + }, + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "Token identifying the page of results to return. If provided, use the\nvalue of the `next_page_token` field from a previous request. Optional." + }, + "startTime": { + "location": "query", + "description": "Start of the time interval (inclusive) during which the trace data was\ncollected from the application.", + "format": "google-datetime", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "Maximum number of traces to return. If not specified or \u003c= 0, the\nimplementation selects a reasonable value. The implementation may\nreturn fewer traces than the requested page size. Optional.", + "format": "int32" + }, + "view": { + "location": "query", + "enum": [ + "VIEW_TYPE_UNSPECIFIED", + "MINIMAL", + "ROOTSPAN", + "COMPLETE" + ], + "description": "Type of data returned for traces in the list. Optional. Default is\n`MINIMAL`.", + "type": "string" + }, + "orderBy": { + "description": "Field used to sort the returned traces. Optional.\nCan be one of the following:\n\n* `trace_id`\n* `name` (`name` field of root span in the trace)\n* `duration` (difference between `end_time` and `start_time` fields of\n the root span)\n* `start` (`start_time` field of the root span)\n\nDescending order can be specified by appending `desc` to the sort field\n(for example, `name desc`).\n\nOnly one sort field is permitted.", + "type": "string", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "ID of the Cloud project where the trace data is stored.", + "required": true, + "type": "string" + }, + "filter": { + "description": "An optional filter against labels for the request.\n\nBy default, searches use prefix matching. To specify exact match, prepend\na plus symbol (`+`) to the search term.\nMultiple terms are ANDed. Syntax:\n\n* `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root\n span starts with `NAME_PREFIX`.\n* `+root:NAME` or `+NAME`: Return traces where any root span's name is\n exactly `NAME`.\n* `span:NAME_PREFIX`: Return traces where any span starts with\n `NAME_PREFIX`.\n* `+span:NAME`: Return traces where any span's name is exactly\n `NAME`.\n* `latency:DURATION`: Return traces whose overall latency is\n greater or equal to than `DURATION`. Accepted units are nanoseconds\n (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For\n example, `latency:24ms` returns traces whose overall latency\n is greater than or equal to 24 milliseconds.\n* `label:LABEL_KEY`: Return all traces containing the specified\n label key (exact match, case-sensitive) regardless of the key:value\n pair's value (including empty values).\n* `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified\n label key (exact match, case-sensitive) whose value starts with\n `VALUE_PREFIX`. Both a key and a value must be specified.\n* `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair\n exactly matching the specified text. Both a key and a value must be\n specified.\n* `method:VALUE`: Equivalent to `/http/method:VALUE`.\n* `url:VALUE`: Equivalent to `/http/url:VALUE`.", + "type": "string", + "location": "query" + }, + "endTime": { + "location": "query", + "description": "End of the time interval (inclusive) during which the trace data was\ncollected from the application.", + "format": "google-datetime", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.readonly" + ], + "flatPath": "v1/projects/{projectId}/traces", + "id": "cloudtrace.projects.traces.list", + "path": "v1/projects/{projectId}/traces" + }, + "get": { + "description": "Gets a single trace by its ID.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "traceId" + ], + "response": { + "$ref": "Trace" + }, + "parameters": { + "projectId": { + "required": true, + "type": "string", + "location": "path", + "description": "ID of the Cloud project where the trace data is stored." + }, + "traceId": { + "location": "path", + "description": "ID of the trace to return.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.readonly" + ], + "flatPath": "v1/projects/{projectId}/traces/{traceId}", + "id": "cloudtrace.projects.traces.get", + "path": "v1/projects/{projectId}/traces/{traceId}" + } + } + } + }, + "methods": { + "patchTraces": { + "description": "Sends new traces to Stackdriver Trace or updates existing traces. If the ID\nof a trace that you send matches that of an existing trace, any fields\nin the existing trace and its spans are overwritten by the provided values,\nand any new fields provided are merged with the existing trace data. If the\nID does not match, a new trace is created.", + "request": { + "$ref": "Traces" + }, + "httpMethod": "PATCH", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.append" + ], + "parameters": { + "projectId": { + "description": "ID of the Cloud project where the trace data is stored.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/traces", + "id": "cloudtrace.projects.patchTraces", + "path": "v1/projects/{projectId}/traces" + } + } + } + }, + "parameters": { + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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" + }, + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "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", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ] + } + }, + "version": "v1", + "baseUrl": "https://cloudtrace.googleapis.com/", + "description": "Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.\n", + "kind": "discovery#restDescription", + "servicePath": "" } diff --git a/etc/api/clouduseraccounts/alpha/clouduseraccounts-api.json b/etc/api/clouduseraccounts/alpha/clouduseraccounts-api.json index 8dc8f7c9b5..2ef43ad9a4 100644 --- a/etc/api/clouduseraccounts/alpha/clouduseraccounts-api.json +++ b/etc/api/clouduseraccounts/alpha/clouduseraccounts-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/lOQeocShB0dxGwrtxzB56jZ95Xk\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/lOQeocShB0dxGwrtxzB56jZ95Xk\"", "discoveryVersion": "v1", "id": "clouduseraccounts:alpha", "name": "clouduseraccounts", diff --git a/etc/api/clouduseraccounts/beta/clouduseraccounts-api.json b/etc/api/clouduseraccounts/beta/clouduseraccounts-api.json index d12b9ca88a..97da319582 100644 --- a/etc/api/clouduseraccounts/beta/clouduseraccounts-api.json +++ b/etc/api/clouduseraccounts/beta/clouduseraccounts-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/-BiORd5nMN3AbHTR5Pi2H1JslEk\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/-BiORd5nMN3AbHTR5Pi2H1JslEk\"", "discoveryVersion": "v1", "id": "clouduseraccounts:beta", "name": "clouduseraccounts", diff --git a/etc/api/clouduseraccounts/vm_alpha/clouduseraccounts-api.json b/etc/api/clouduseraccounts/vm_alpha/clouduseraccounts-api.json index c6acddcea0..141978bbac 100644 --- a/etc/api/clouduseraccounts/vm_alpha/clouduseraccounts-api.json +++ b/etc/api/clouduseraccounts/vm_alpha/clouduseraccounts-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/DmNFUFGhSh7oLg7RNX5k36KX4oA\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/DmNFUFGhSh7oLg7RNX5k36KX4oA\"", "discoveryVersion": "v1", "id": "clouduseraccounts:vm_alpha", "name": "clouduseraccounts", diff --git a/etc/api/clouduseraccounts/vm_beta/clouduseraccounts-api.json b/etc/api/clouduseraccounts/vm_beta/clouduseraccounts-api.json index ec17945bb3..ce19b70270 100644 --- a/etc/api/clouduseraccounts/vm_beta/clouduseraccounts-api.json +++ b/etc/api/clouduseraccounts/vm_beta/clouduseraccounts-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/NOgAExjYfIWiV_BL3FlcslmjncY\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/NOgAExjYfIWiV_BL3FlcslmjncY\"", "discoveryVersion": "v1", "id": "clouduseraccounts:vm_beta", "name": "clouduseraccounts", diff --git a/etc/api/compute/alpha/compute-api.json b/etc/api/compute/alpha/compute-api.json index 88bc55a65b..db94a6199e 100644 --- a/etc/api/compute/alpha/compute-api.json +++ b/etc/api/compute/alpha/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/PUmw8QSO_Lc3hgCFrHiAOjjNG38\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/5iPMQ7gb_sNP9BqL2s00rhnUDOY\"", "discoveryVersion": "v1", "id": "compute:alpha", "name": "compute", "version": "alpha", - "revision": "20161123", + "revision": "20170426", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -91,15 +91,218 @@ } }, "schemas": { + "AcceleratorConfig": { + "id": "AcceleratorConfig", + "type": "object", + "description": "A specification of the type and number of accelerator cards attached to the instance.", + "properties": { + "acceleratorCount": { + "type": "integer", + "description": "The number of the guest accelerator cards exposed to this instance.", + "format": "int32" + }, + "acceleratorType": { + "type": "string", + "description": "Full or partial URL of the accelerator type resource to expose to this instance." + } + } + }, + "AcceleratorType": { + "id": "AcceleratorType", + "type": "object", + "description": "An Accelerator Type resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "deprecated": { + "$ref": "DeprecationStatus", + "description": "[Output Only] The deprecation status associated with this accelerator type." + }, + "description": { + "type": "string", + "description": "[Output Only] An optional textual description of the resource." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] The type of the resource. Always compute#acceleratorType for accelerator types.", + "default": "compute#acceleratorType" + }, + "maximumCardsPerInstance": { + "type": "integer", + "description": "[Output Only] Maximum accelerator cards allowed per instance.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "[Output Only] Name of the resource.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined fully-qualified URL for this resource." + }, + "zone": { + "type": "string", + "description": "[Output Only] The name of the zone where the accelerator type resides, such as us-central1-a." + } + } + }, + "AcceleratorTypeAggregatedList": { + "id": "AcceleratorTypeAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "object", + "description": "[Output Only] A map of scoped accelerator type lists.", + "additionalProperties": { + "$ref": "AcceleratorTypesScopedList", + "description": "[Output Only] Name of the scope containing this set of accelerator types." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#acceleratorTypeAggregatedList for aggregated lists of accelerator types.", + "default": "compute#acceleratorTypeAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "AcceleratorTypeList": { + "id": "AcceleratorTypeList", + "type": "object", + "description": "Contains a list of accelerator types.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of AcceleratorType resources.", + "items": { + "$ref": "AcceleratorType" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#acceleratorTypeList for lists of accelerator types.", + "default": "compute#acceleratorTypeList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] A token used to continue a truncated list request." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "AcceleratorTypesScopedList": { + "id": "AcceleratorTypesScopedList", + "type": "object", + "properties": { + "acceleratorTypes": { + "type": "array", + "description": "[Output Only] List of accelerator types contained in this scope.", + "items": { + "$ref": "AcceleratorType" + } + }, + "warning": { + "type": "object", + "description": "[Output Only] An informational warning that appears when the accelerator types list is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, "AccessConfig": { "id": "AccessConfig", "type": "object", "description": "An access configuration attached to an instance's network interface. Only one access config per instance is supported.", "properties": { - "dnsName": { - "type": "string", - "description": "[Output Only] The public DNS domain name for the instance." - }, "kind": { "type": "string", "description": "[Output Only] Type of the resource. Always compute#accessConfig for access configs.", @@ -107,7 +310,7 @@ }, "name": { "type": "string", - "description": "Name of this access configuration." + "description": "The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access." }, "natIP": { "type": "string", @@ -115,28 +318,34 @@ }, "networkTier": { "type": "string", - "description": "This signifies the networking tier used for configuring this access configuration and can only take the following values: CLOUD_NETWORK_PREMIUM , CLOUD_NETWORK_STANDARD. If this field is not specified, it is assumed to be CLOUD_NETWORK_PREMIUM.", + "description": "This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM , SELECT. If this field is not specified, it is assumed to be PREMIUM.", "enum": [ - "CLOUD_NETWORK_PREMIUM", - "CLOUD_NETWORK_STANDARD" + "PREMIUM", + "SELECT", + "STANDARD" ], "enumDescriptions": [ + "", "", "" ] }, - "ptrDomainName": { + "publicDnsName": { "type": "string", - "description": "The DNS domain name for the public PTR record. This field can only be set when the set_ptr field is enabled." + "description": "[Output Only] The public DNS domain name for the instance." }, - "setPtr": { - "type": "boolean", - "description": "Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name." + "publicPtrDomainName": { + "type": "string", + "description": "The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled." }, "setPublicDns": { "type": "boolean", "description": "Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration." }, + "setPublicPtr": { + "type": "boolean", + "description": "Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name." + }, "type": { "type": "string", "description": "The type of configuration. The default and only option is ONE_TO_ONE_NAT.", @@ -159,6 +368,20 @@ "type": "string", "description": "The static external IP address represented by this resource." }, + "addressType": { + "type": "string", + "description": "The type of address to reserve. If unspecified, defaults to EXTERNAL.", + "enum": [ + "EXTERNAL", + "INTERNAL", + "UNSPECIFIED_TYPE" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, "creationTimestamp": { "type": "string", "description": "[Output Only] Creation timestamp in RFC3339 text format." @@ -172,6 +395,20 @@ "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64" }, + "ipVersion": { + "type": "string", + "description": "The IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", + "enum": [ + "IPV4", + "IPV6", + "UNSPECIFIED_VERSION" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, "kind": { "type": "string", "description": "[Output Only] Type of the resource. Always compute#address for addresses.", @@ -201,12 +438,14 @@ }, "networkTier": { "type": "string", - "description": "This signifies the networking tier used for configuring this Address and can only take the following values: CLOUD_NETWORK_PREMIUM , CLOUD_NETWORK_STANDARD. If this field is not specified, it is assumed to be CLOUD_NETWORK_PREMIUM.", + "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM , SELECT. If this field is not specified, it is assumed to be PREMIUM.", "enum": [ - "CLOUD_NETWORK_PREMIUM", - "CLOUD_NETWORK_STANDARD" + "PREMIUM", + "SELECT", + "STANDARD" ], "enumDescriptions": [ + "", "", "" ] @@ -231,6 +470,10 @@ "" ] }, + "subnetwork": { + "type": "string", + "description": "For external addresses, this field should not be used.\n\nThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range." + }, "users": { "type": "array", "description": "[Output Only] The URLs of the resources that are using this address.", @@ -334,6 +577,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -354,6 +598,7 @@ "", "", "", + "", "" ] }, @@ -482,12 +727,7 @@ "enumDescriptions": [ "", "" - ], - "annotations": { - "required": [ - "compute.instances.insert" - ] - } + ] } } }, @@ -534,36 +774,36 @@ "AuditConfig": { "id": "AuditConfig", "type": "object", - "description": "Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types.", + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:bar@gmail.com\" ] } ] } ] }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.", "properties": { "auditLogConfigs": { "type": "array", - "description": "The configuration for each type of logging", + "description": "The configuration for logging of each type of permission.", "items": { "$ref": "AuditLogConfig" } }, "exemptedMembers": { "type": "array", - "description": "Specifies the identities that are exempted from \"data access\" audit logging for the `service` specified above. Follows the same format of Binding.members.", + "description": "", "items": { "type": "string" } }, "service": { "type": "string", - "description": "Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services." + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services." } } }, "AuditLogConfig": { "id": "AuditLogConfig", "type": "object", - "description": "Provides the configuration for a sub-type of logging.", + "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.", "properties": { "exemptedMembers": { "type": "array", - "description": "Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members.", + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].", "items": { "type": "string" } @@ -802,6 +1042,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -822,6 +1063,7 @@ "", "", "", + "", "" ] }, @@ -910,11 +1152,11 @@ "properties": { "metric": { "type": "string", - "description": "The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.\n\nFor example, the following is a valid metric:\ncompute.googleapis.com/instance/network/received_bytes_count\nThe following is not a valid metric because it does not increase or decrease based on usage:\ncompute.googleapis.com/instance/cpu/reserved_cores" + "description": "The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.\n\nThe metric must have a value type of INT64 or DOUBLE." }, "utilizationTarget": { "type": "number", - "description": "Target value of the metric which autoscaler should maintain. Must be a positive value.", + "description": "The target value of the metric that autoscaler should maintain. This must be a positive value.\n\nFor example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.", "format": "double" }, "utilizationTargetType": { @@ -1034,7 +1276,7 @@ }, "maxRatePerInstance": { "type": "number", - "description": "The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", "format": "float" }, "maxUtilization": { @@ -1053,6 +1295,10 @@ "type": "string", "description": "Cloud Storage bucket name." }, + "cdnPolicy": { + "$ref": "BackendBucketCdnPolicy", + "description": "Cloud CDN Coniguration for this BackendBucket." + }, "creationTimestamp": { "type": "string", "description": "[Output Only] Creation timestamp in RFC3339 text format." @@ -1086,6 +1332,25 @@ } } }, + "BackendBucketCdnPolicy": { + "id": "BackendBucketCdnPolicy", + "type": "object", + "description": "Message containing Cloud CDN configuration for a backend bucket.", + "properties": { + "signedUrlCacheMaxAgeSec": { + "type": "string", + "description": "Number of seconds up to which the response to a signed URL request will be cached in the CDN. After this time period, the Signed URL will be revalidated before being served. Defaults to 1hr (3600s). If this field is set, Cloud CDN will internally act as though all responses from this bucket had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.", + "format": "int64" + }, + "signedUrlKeyNames": { + "type": "array", + "description": "[Output Only] Names of the keys currently configured for Cloud CDN Signed URL on this backend bucket.", + "items": { + "type": "string" + } + } + } + }, "BackendBucketList": { "id": "BackendBucketList", "type": "object", @@ -1117,20 +1382,6 @@ } } }, - "BackendSSLPolicy": { - "id": "BackendSSLPolicy", - "type": "object", - "description": "Message containing backend SSL policies.", - "properties": { - "pinnedPeerCertificates": { - "type": "array", - "description": "List of PEM-encoded peer certificates, from which the public keys are extracted for authenticating the backend service.", - "items": { - "type": "string" - } - } - } - }, "BackendService": { "id": "BackendService", "type": "object", @@ -1141,10 +1392,6 @@ "description": "Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", "format": "int32" }, - "backendSslPolicy": { - "$ref": "BackendSSLPolicy", - "description": "Backend SSL policies to enforce." - }, "backends": { "type": "array", "description": "The list of backends that serve this BackendService.", @@ -1178,6 +1425,11 @@ "type": "boolean", "description": "If true, enable Cloud CDN for this BackendService.\n\nWhen the load balancing scheme is INTERNAL, this field is not used." }, + "failoverRatio": { + "type": "number", + "description": "The value of the field must be in [0, 1]. If set, 'backends[].failover' must be set. They together define the fallback behavior of the primary backend: if the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend.\n\nIn case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the \"force\" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy.\n\nThis field is only used with l4 load balancing.", + "format": "float" + }, "fingerprint": { "type": "string", "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.", @@ -1232,7 +1484,7 @@ }, "protocol": { "type": "string", - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", + "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", "enum": [ "HTTP", "HTTP2", @@ -1254,6 +1506,10 @@ "type": "string", "description": "[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services." }, + "securityPolicy": { + "type": "string", + "description": "[Output Only] The resource URL for the security policy associated with this backend service." + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -1323,6 +1579,18 @@ "cacheKeyPolicy": { "$ref": "CacheKeyPolicy", "description": "The CacheKeyPolicy for this CdnPolicy." + }, + "signedUrlCacheMaxAgeSec": { + "type": "string", + "description": "Number of seconds up to which the response to a signed URL request will be cached in the CDN. After this time period, the Signed URL will be revalidated before being served. Defaults to 1hr (3600s). If this field is set, Cloud CDN will internally act as though all responses from this backend had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.", + "format": "int64" + }, + "signedUrlKeyNames": { + "type": "array", + "description": "[Output Only] Names of the keys currently configured for Cloud CDN Signed URL on this backend service.", + "items": { + "type": "string" + } } } }, @@ -1346,7 +1614,7 @@ "BackendServiceIAP": { "id": "BackendServiceIAP", "type": "object", - "description": "Identity-Aware Proxy (Cloud Gatekeeper)", + "description": "Identity-Aware Proxy", "properties": { "enabled": { "type": "boolean" @@ -1358,7 +1626,8 @@ "type": "string" }, "oauth2ClientSecretSha256": { - "type": "string" + "type": "string", + "description": "[Output Only] SHA256 hash value for the field oauth2_client_secret above." } } }, @@ -1385,7 +1654,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] A token used to continue a truncated list request." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -1425,6 +1694,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -1445,6 +1715,7 @@ "", "", "", + "", "" ] }, @@ -1567,12 +1838,7 @@ "name": { "type": "string", "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.commitments.insert" - ] - } + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" }, "plan": { "type": "string", @@ -1588,6 +1854,10 @@ "" ] }, + "region": { + "type": "string", + "description": "[Output Only] URL of the region where this commitment may be used." + }, "resources": { "type": "array", "description": "List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.", @@ -1622,10 +1892,6 @@ "statusMessage": { "type": "string", "description": "[Output Only] An optional, human-readable explanation of the status." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where this commitment may be used." } } }, @@ -1723,6 +1989,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -1743,6 +2010,7 @@ "", "", "", + "", "" ] }, @@ -1780,12 +2048,16 @@ "type": "string", "description": "Trusted attributes supplied by the IAM system.", "enum": [ + "APPROVER", "ATTRIBUTION", "AUTHORITY", + "JUSTIFICATION_TYPE", "NO_ATTR", "SECURITY_REALM" ], "enumDescriptions": [ + "", + "", "", "", "", @@ -1864,6 +2136,10 @@ "type": "object", "description": "Represents a customer-supplied encryption key", "properties": { + "kmsKeyName": { + "type": "string", + "description": "The name of the encryption key that is stored in Google Cloud KMS." + }, "rawKey": { "type": "string", "description": "Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource." @@ -1963,7 +2239,7 @@ }, "labels": { "type": "object", - "description": "Labels to apply to this disk. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to this disk. These can be later modified by the setLabels method.", "additionalProperties": { "type": "string" } @@ -2109,7 +2385,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. Acceptable values are 0 to 500, inclusive. (Default: 500)" }, "selfLink": { "type": "string", @@ -2124,11 +2400,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of persistent disks.", + "description": "A list of Disk resources.", "items": { "$ref": "Disk" } @@ -2140,7 +2416,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + "description": "This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -2307,6 +2583,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -2327,6 +2604,7 @@ "", "", "", + "", "" ] }, @@ -2398,6 +2676,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -2418,6 +2697,7 @@ "", "", "", + "", "" ] }, @@ -2446,6 +2726,28 @@ } } }, + "DistributionPolicy": { + "id": "DistributionPolicy", + "type": "object", + "properties": { + "zones": { + "type": "array", + "items": { + "$ref": "DistributionPolicyZoneConfiguration" + } + } + } + }, + "DistributionPolicyZoneConfiguration": { + "id": "DistributionPolicyZoneConfiguration", + "type": "object", + "properties": { + "zone": { + "type": "string", + "description": "URL of the zone where managed instance group is spawning instances (for regional resources). Zone has to belong to the region where managed instance group is located." + } + } + }, "Firewall": { "id": "Firewall", "type": "object", @@ -2501,7 +2803,7 @@ }, "destinationRanges": { "type": "array", - "description": "If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format.", + "description": "If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", "items": { "type": "string" } @@ -2525,7 +2827,7 @@ }, "kind": { "type": "string", - "description": "[Output Ony] Type of the resource. Always compute#firewall for firewall rules.", + "description": "[Output Only] Type of the resource. Always compute#firewall for firewall rules.", "default": "compute#firewall" }, "name": { @@ -2554,7 +2856,14 @@ }, "sourceRanges": { "type": "array", - "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", + "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.", + "items": { + "type": "string" + } + }, + "sourceServiceAccounts": { + "type": "array", + "description": "If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.", "items": { "type": "string" } @@ -2566,6 +2875,13 @@ "type": "string" } }, + "targetServiceAccounts": { + "type": "array", + "description": "A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.", + "items": { + "type": "string" + } + }, "targetTags": { "type": "array", "description": "A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.", @@ -2631,15 +2947,15 @@ "ForwardingRule": { "id": "ForwardingRule", "type": "object", - "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, portRange] tuple.", + "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple.", "properties": { "IPAddress": { "type": "string", - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nFor global forwarding rules, the address must be a global IP; for regional forwarding rules, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IP from the same scope (global or regional) will be assigned.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule." + "description": "The IP address that this forwarding rule is serving on behalf of.\n\nFor global forwarding rules, the address must be a global IP. For regional forwarding rules, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IP from the same scope (global or regional) will be assigned.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule. Only IPv4 is supported." }, "IPProtocol": { "type": "string", - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL\u003c/code, only TCP and UDP are valid.", + "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL, only TCP and UDP are valid.", "enum": [ "AH", "ESP", @@ -2674,6 +2990,20 @@ "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64" }, + "ipVersion": { + "type": "string", + "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule.", + "enum": [ + "IPV4", + "IPV6", + "UNSPECIFIED_VERSION" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, "kind": { "type": "string", "description": "[Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.", @@ -2693,7 +3023,7 @@ }, "loadBalancingScheme": { "type": "string", - "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", + "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", "enum": [ "EXTERNAL", "INTERNAL", @@ -2716,23 +3046,25 @@ }, "networkTier": { "type": "string", - "description": "This signifies the networking tier used for configuring this load balancer and can only take the following values: CLOUD_NETWORK_PREMIUM , CLOUD_NETWORK_STANDARD. If this field is not specified, it is assumed to be CLOUD_NETWORK_PREMIUM.", + "description": "This signifies the networking tier used for configuring this load balancer and can only take the following values: PREMIUM , SELECT. If this field is not specified, it is assumed to be PREMIUM.", "enum": [ - "CLOUD_NETWORK_PREMIUM", - "CLOUD_NETWORK_STANDARD" + "PREMIUM", + "SELECT", + "STANDARD" ], "enumDescriptions": [ + "", "", "" ] }, "portRange": { "type": "string", - "description": "Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nThis field is not used for internal load balancing." + "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetSslProxy: 443 \n- TargetVpnGateway: 500, 4500\n-" }, "ports": { "type": "array", - "description": "This field is not used for external load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. If the port list is not provided then all ports are allowed to pass through.\n\nYou may specify a maximum of up to 5 ports.", + "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.", "items": { "type": "string" } @@ -2760,7 +3092,7 @@ }, "target": { "type": "string", - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global TargetHttpProxy or TargetHttpsProxy resource. The forwarded traffic must be of a type appropriate to the target object. For example, TargetHttpProxy requires HTTP traffic, and TargetHttpsProxy requires HTTPS traffic.\n\nThis field is not used for internal load balancing." + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object.\n\nThis field is not used for internal load balancing." } } }, @@ -2858,6 +3190,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -2878,6 +3211,7 @@ "", "", "", + "", "" ] }, @@ -2957,7 +3291,7 @@ }, "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443.", + "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -2996,7 +3330,7 @@ }, "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80.", + "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -3035,7 +3369,7 @@ }, "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443.", + "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -3244,7 +3578,7 @@ }, "hostType": { "type": "string", - "description": "Full or partial URL of the host type resource to use for this host, in the format: zones/zone/hostTypes/host-type. This is provided by the client when the host is created. For example, the following is a valid partial url to a predefined host type:\n\nzones/us-central1-f/hostTypes/n1-host-64-416" + "description": "Full or partial URL of the host type resource to use for this host, in the format: zones/zone/hostTypes/host-type. This is provided by the client when the host is created. For example, the following is a valid partial url to a predefined host type:\n\nzones/us-central1-b/hostTypes/n1-host-64-416" }, "id": { "type": "string", @@ -3263,6 +3597,18 @@ "description": "[Output Only] The type of the resource. Always compute#host for host.", "default": "compute#host" }, + "labelFingerprint": { + "type": "string", + "description": "A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the host.", + "format": "byte" + }, + "labels": { + "type": "object", + "description": "Labels to apply to this host.", + "additionalProperties": { + "type": "string" + } + }, "name": { "type": "string", "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." @@ -3383,6 +3729,211 @@ } } }, + "HostType": { + "id": "HostType", + "type": "object", + "description": "A Host Type resource.", + "properties": { + "cpuPlatform": { + "type": "string", + "description": "[Output Only] The CPU platform used by this host type." + }, + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "deprecated": { + "$ref": "DeprecationStatus", + "description": "[Output Only] The deprecation status associated with this host type." + }, + "description": { + "type": "string", + "description": "[Output Only] An optional textual description of the resource." + }, + "guestCpus": { + "type": "integer", + "description": "[Output Only] The number of virtual CPUs that are available to the host type.", + "format": "int32" + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] The type of the resource. Always compute#hostType for host types.", + "default": "compute#hostType" + }, + "localSsdGb": { + "type": "integer", + "description": "[Output Only] Local SSD available to the host type, defined in GB.", + "format": "int32" + }, + "memoryMb": { + "type": "integer", + "description": "[Output Only] The amount of physical memory available to the host type, defined in MB.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "[Output Only] Name of the resource.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + }, + "zone": { + "type": "string", + "description": "[Output Only] The name of the zone where the host type resides, such as us-central1-a." + } + } + }, + "HostTypeAggregatedList": { + "id": "HostTypeAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "object", + "description": "[Output Only] A map of scoped host type lists.", + "additionalProperties": { + "$ref": "HostTypesScopedList", + "description": "[Output Only] Name of the scope containing this set of host types." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource.Always compute#hostTypeAggregatedList for aggregated lists of host types.", + "default": "compute#hostTypeAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "HostTypeList": { + "id": "HostTypeList", + "type": "object", + "description": "Contains a list of host types.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of Host Type resources.", + "items": { + "$ref": "HostType" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource.Always compute#hostTypeList for lists of host types.", + "default": "compute#hostTypeList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "HostTypesScopedList": { + "id": "HostTypesScopedList", + "type": "object", + "properties": { + "hostTypes": { + "type": "array", + "description": "[Output Only] List of host types contained in this scope.", + "items": { + "$ref": "HostType" + } + }, + "warning": { + "type": "object", + "description": "[Output Only] An informational warning that appears when the host types list is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, "HostsScopedList": { "id": "HostsScopedList", "type": "object", @@ -3415,6 +3966,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -3435,6 +3987,7 @@ "", "", "", + "", "" ] }, @@ -3692,7 +4245,7 @@ }, "guestOsFeatures": { "type": "array", - "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSCI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSCI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSCI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", "items": { "$ref": "GuestOsFeature" } @@ -3718,7 +4271,7 @@ }, "labels": { "type": "object", - "description": "Labels to apply to this image. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to this image. These can be later modified by the setLabels method.", "additionalProperties": { "type": "string" } @@ -3786,6 +4339,18 @@ "type": "string", "description": "The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name." }, + "sourceImage": { + "type": "string", + "description": "URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of: \n- this property, or \n- the rawDisk.source property, or \n- the sourceDisk property in order to create an image." + }, + "sourceImageEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key." + }, + "sourceImageId": { + "type": "string", + "description": "[Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name." + }, "sourceType": { "type": "string", "description": "The type of the image used to create this disk. The default and only value is RAW", @@ -3872,6 +4437,13 @@ "$ref": "AttachedDisk" } }, + "guestAccelerators": { + "type": "array", + "description": "List of the type and count of accelerator cards attached to the instance.", + "items": { + "$ref": "AcceleratorConfig" + } + }, "host": { "type": "string", "description": "Full or partial URL of the host resource that the instance should be placed on, in the format: zones/zone/hosts/host.\n\nOptional, Private Host (physical machine) that the instance will be placed on when it's created. The instance is guaranteed to be placed on the same machine as other instances with the same private host.\n\nThe request will be rejected if the private host has run out of resources." @@ -3897,7 +4469,7 @@ }, "labels": { "type": "object", - "description": "Labels to apply to this instance. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to this instance. These can be later modified by the setLabels method.", "additionalProperties": { "type": "string" } @@ -3915,9 +4487,19 @@ "$ref": "Metadata", "description": "The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys." }, + "minCpuPlatform": { + "type": "string", + "description": "Minimum cpu/platform to be used by this instance. We may schedule on the specified or later cpu/platform." + }, "name": { "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." + "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.instances.insert" + ] + } }, "networkInterfaces": { "type": "array", @@ -3928,7 +4510,7 @@ }, "scheduling": { "$ref": "Scheduling", - "description": "Scheduling options for this instance." + "description": "Sets the scheduling options for this instance." }, "selfLink": { "type": "string", @@ -3936,11 +4518,15 @@ }, "serviceAccounts": { "type": "array", - "description": "A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.", + "description": "A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.\n\nService accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.", "items": { "$ref": "ServiceAccount" } }, + "startRestricted": { + "type": "boolean", + "description": "[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity." + }, "status": { "type": "string", "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.", @@ -4177,6 +4763,10 @@ "type": "string", "description": "An optional description of this resource. Provide this property when you create the resource." }, + "distributionPolicy": { + "$ref": "DistributionPolicy", + "description": "Policy valid only for regional managed instance groups." + }, "failoverAction": { "type": "string", "description": "The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.", @@ -4245,6 +4835,10 @@ "type": "string", "description": "Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used." }, + "statefulPolicy": { + "$ref": "InstanceGroupManagerStatefulPolicy", + "description": "Stateful configuration for this Instanced Group Manager" + }, "targetPools": { "type": "array", "description": "The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.", @@ -4325,7 +4919,7 @@ }, "verifying": { "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are being verified.", + "description": "[Output Only] The number of instances in the managed instance group that are being verified. More details regarding verification process are covered in the documentation of ManagedInstance.InstanceAction.VERIFYING enum field.", "format": "int32" } } @@ -4376,7 +4970,7 @@ }, "maxUnavailable": { "$ref": "FixedOrPercent", - "description": "Maximum number of instances that can be unavailable when auto-healing. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a percent value of 100% is used." + "description": "Maximum number of instances that can be unavailable when autohealing. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's liveness health check result was observed to be HEALTHY at least once. By default, a percent value of 100% is used." } } }, @@ -4437,6 +5031,29 @@ } } }, + "InstanceGroupManagerStatefulPolicy": { + "id": "InstanceGroupManagerStatefulPolicy", + "type": "object", + "properties": { + "preservedDisks": { + "type": "array", + "description": "Disks created on the instances that will be preserved on instance delete, resize down, etc.", + "items": { + "$ref": "InstanceGroupManagerStatefulPolicyDiskPolicy" + } + } + } + }, + "InstanceGroupManagerStatefulPolicyDiskPolicy": { + "id": "InstanceGroupManagerStatefulPolicyDiskPolicy", + "type": "object", + "properties": { + "deviceName": { + "type": "string", + "description": "Device name of the disk to be preserved" + } + } + }, "InstanceGroupManagerUpdatePolicy": { "id": "InstanceGroupManagerUpdatePolicy", "type": "object", @@ -4447,7 +5064,7 @@ }, "maxUnavailable": { "$ref": "FixedOrPercent", - "description": "Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. instance's status is RUNNING 2. instance's liveness health check result was observed to be HEALTHY at least once By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0." + "description": "Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's liveness health check result was observed to be HEALTHY at least once. By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0." }, "minReadySec": { "type": "integer", @@ -4486,9 +5103,13 @@ "instanceTemplate": { "type": "string" }, + "name": { + "type": "string", + "description": "Name of the version. Unique among all versions in the scope of this managed instance group." + }, "tag": { "type": "string", - "description": "Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged." + "description": "Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of 'name'." }, "targetSize": { "$ref": "FixedOrPercent", @@ -4502,7 +5123,7 @@ "properties": { "instances": { "type": "array", - "description": "The URL for one or more instances to abandon from the managed instance group.", + "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -4515,7 +5136,7 @@ "properties": { "instances": { "type": "array", - "description": "The list of instances to delete from this managed instance group. Specify one or more instance URLs.", + "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -4532,6 +5153,10 @@ "items": { "$ref": "ManagedInstance" } + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." } } }, @@ -4541,7 +5166,7 @@ "properties": { "instances": { "type": "array", - "description": "The URL for one or more instances to recreate.", + "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -4595,6 +5220,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -4615,6 +5241,7 @@ "", "", "", + "", "" ] }, @@ -4789,6 +5416,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -4809,6 +5437,7 @@ "", "", "", + "", "" ] }, @@ -4886,6 +5515,37 @@ } } }, + "InstanceListReferrers": { + "id": "InstanceListReferrers", + "type": "object", + "description": "Contains a list of instance referrers.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of referrers.", + "items": { + "$ref": "Reference" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.", + "default": "compute#instanceListReferrers" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, "InstanceMoveRequest": { "id": "InstanceMoveRequest", "type": "object", @@ -4920,9 +5580,16 @@ "$ref": "AttachedDisk" } }, + "guestAccelerators": { + "type": "array", + "description": "A list of guest accelerator cards' type and count to use for instances created from the instance template.", + "items": { + "$ref": "AcceleratorConfig" + } + }, "labels": { "type": "object", - "description": "Labels to apply to instances that are created from this template. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to instances that are created from this template.", "additionalProperties": { "type": "string" } @@ -4940,6 +5607,10 @@ "$ref": "Metadata", "description": "The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information." }, + "minCpuPlatform": { + "type": "string", + "description": "Minimum cpu/platform to be used by this instance. The instance may be scheduled on the specified or later cpu/platform." + }, "networkInterfaces": { "type": "array", "description": "An array of network access configurations for this interface.", @@ -5125,6 +5796,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -5145,6 +5817,7 @@ "", "", "", + "", "" ] }, @@ -5184,13 +5857,25 @@ }, "labels": { "type": "object", - "description": "A list of labels to apply for this instance. Changing instance labels will also change the instance tags.\n\nEach label key & value must comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", "additionalProperties": { "type": "string" } } } }, + "InstancesSetMachineResourcesRequest": { + "id": "InstancesSetMachineResourcesRequest", + "type": "object", + "properties": { + "guestAccelerators": { + "type": "array", + "description": "List of the type and count of accelerator cards attached to the instance.", + "items": { + "$ref": "AcceleratorConfig" + } + } + } + }, "InstancesSetMachineTypeRequest": { "id": "InstancesSetMachineTypeRequest", "type": "object", @@ -5201,6 +5886,16 @@ } } }, + "InstancesSetMinCpuPlatformRequest": { + "id": "InstancesSetMinCpuPlatformRequest", + "type": "object", + "properties": { + "minCpuPlatform": { + "type": "string", + "description": "Minimum cpu/platform this instance should be started at." + } + } + }, "InstancesSetServiceAccountRequest": { "id": "InstancesSetServiceAccountRequest", "type": "object", @@ -5235,6 +5930,498 @@ } } }, + "Interconnect": { + "id": "Interconnect", + "type": "object", + "description": "Protocol definitions for Mixer API to support Interconnect. Next available tag: 20", + "properties": { + "adminEnabled": { + "type": "boolean", + "description": "Administrative status of the interconnect. When this is set to ?true?, the Interconnect is functional and may carry traffic (assuming there are functional InterconnectAttachments and other requirements are satisfied). When set to ?false?, no packets will be carried over this Interconnect and no BGP routes will be exchanged over it. By default, it is set to ?true?." + }, + "connectionAuthorization": { + "type": "string", + "description": "[Output Only] URL to retrieve the Letter Of Authority and Customer Facility Assignment (LOA-CFA) documentation relating to this Interconnect. This documentation authorizes the facility provider to connect to the specified crossconnect ports." + }, + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "googleIpAddress": { + "type": "string", + "description": "[Output Only] IP address configured on the Google side of the Interconnect link. This can be used only for ping tests." + }, + "googleReferenceId": { + "type": "string", + "description": "[Output Only] Google reference ID; to be used when raising support tickets with Google or otherwise to debug backend connectivity issues." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "interconnectAttachments": { + "type": "array", + "description": "[Output Only] A list of the URLs of all InterconnectAttachments configured to use this Interconnect.", + "items": { + "type": "string" + } + }, + "interconnectType": { + "type": "string", + "enum": [ + "IT_PRIVATE" + ], + "enumDescriptions": [ + "" + ] + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#interconnect for interconnects.", + "default": "compute#interconnect" + }, + "linkType": { + "type": "string", + "enum": [ + "LINK_TYPE_ETHERNET_10G_LR" + ], + "enumDescriptions": [ + "" + ] + }, + "location": { + "type": "string", + "description": "URL of the InterconnectLocation object that represents where this connection is to be provisioned." + }, + "name": { + "type": "string", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.interconnects.insert" + ] + } + }, + "nocContactEmail": { + "type": "string", + "description": "Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Stackdriver logs alerting and Cloud Notifications." + }, + "operationalStatus": { + "type": "string", + "description": "[Output Only] The current status of whether or not this Interconnect is functional.", + "enum": [ + "OS_ACTIVE", + "OS_UNPROVISIONED", + "OS_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, + "peerIpAddress": { + "type": "string", + "description": "[Output Only] IP address configured on the customer side of the Interconnect link. The customer should configure this IP address during turnup when prompted by Google NOC. This can be used only for ping tests." + }, + "provisionedLinkCount": { + "type": "integer", + "description": "[Output Only] Number of links actually provisioned in this interconnect.", + "format": "int32" + }, + "requestedLinkCount": { + "type": "integer", + "description": "Target number of physical links in the link bundle, as requested by the customer.", + "format": "int32" + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "InterconnectAttachment": { + "id": "InterconnectAttachment", + "type": "object", + "description": "Protocol definitions for Mixer API to support InterconnectAttachment. Next available tag: 14", + "properties": { + "cloudRouterIpAddress": { + "type": "string", + "description": "[Output Only] IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment." + }, + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "customerRouterIpAddress": { + "type": "string", + "description": "[Output Only] IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "googleReferenceId": { + "type": "string", + "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "interconnect": { + "type": "string", + "description": "URL of the underlying Interconnect object that this attachment's traffic will traverse through." + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#interconnectAttachment for interconnect attachments.", + "default": "compute#interconnectAttachment" + }, + "name": { + "type": "string", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "operationalStatus": { + "type": "string", + "description": "[Output Only] The current status of whether or not this interconnect attachment is functional.", + "enum": [ + "OS_ACTIVE", + "OS_UNPROVISIONED" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "privateInterconnectInfo": { + "$ref": "InterconnectAttachmentPrivateInfo", + "description": "[Output Only] Information specific to a Private InterconnectAttachment. Only populated if the interconnect that this is attached is of type IT_PRIVATE." + }, + "region": { + "type": "string", + "description": "[Output Only] URL of the region where the regional interconnect attachment resides." + }, + "router": { + "type": "string", + "description": "URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "InterconnectAttachmentAggregatedList": { + "id": "InterconnectAttachmentAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "object", + "description": "[Output Only] A map of scoped InterconnectAttachment lists.", + "additionalProperties": { + "$ref": "InterconnectAttachmentsScopedList", + "description": "Name of the scope containing this set of interconnect attachments." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#interconnectAttachmentAggregatedList for aggregated lists of interconnect attachments.", + "default": "compute#interconnectAttachmentAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "InterconnectAttachmentList": { + "id": "InterconnectAttachmentList", + "type": "object", + "description": "Response to the list request, and contains a list of interconnect attachments.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of InterconnectAttachment resources.", + "items": { + "$ref": "InterconnectAttachment" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#interconnectAttachmentList for lists of interconnect attachments.", + "default": "compute#interconnectAttachmentList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "InterconnectAttachmentPrivateInfo": { + "id": "InterconnectAttachmentPrivateInfo", + "type": "object", + "description": "Private information for an interconnect attachment when this belongs to an interconnect of type IT_PRIVATE.", + "properties": { + "tag8021q": { + "type": "integer", + "description": "[Output Only] 802.1q encapsulation tag to be used for traffic between Google and the customer, going to and from this network and region.", + "format": "uint32" + } + } + }, + "InterconnectAttachmentsScopedList": { + "id": "InterconnectAttachmentsScopedList", + "type": "object", + "properties": { + "interconnectAttachments": { + "type": "array", + "description": "List of interconnect attachments contained in this scope.", + "items": { + "$ref": "InterconnectAttachment" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of addresses when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, + "InterconnectList": { + "id": "InterconnectList", + "type": "object", + "description": "Response to the list request, and contains a list of interconnects.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of Interconnect resources.", + "items": { + "$ref": "Interconnect" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#interconnectList for lists of interconnects.", + "default": "compute#interconnectList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "InterconnectLocation": { + "id": "InterconnectLocation", + "type": "object", + "description": "Protocol definitions for Mixer API to support InterconnectLocation.", + "properties": { + "address": { + "type": "string", + "description": "[Output Only] The postal address of the Point of Presence, each line in the address is separated by a newline character." + }, + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "[Output Only] An optional description of the resource." + }, + "facilityProvider": { + "type": "string", + "description": "[Output Only] The name of the provider for this facility (e.g., EQUINIX)." + }, + "facilityProviderFacilityId": { + "type": "string", + "description": "[Output Only] A provider-assigned Identifier for this facility (e.g., Ashburn-DC1)." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#interconnectLocation for interconnect locations.", + "default": "compute#interconnectLocation" + }, + "name": { + "type": "string", + "description": "[Output Only] Name of the resource." + }, + "peeringdbFacilityId": { + "type": "string", + "description": "[Output Only] The peeringdb identifier for this facility (corresponding with a netfac type in peeringdb)." + }, + "regionInfos": { + "type": "array", + "description": "[Output Only] A list of InterconnectLocation.RegionInfo objects, that describe parameters pertaining to the relation between this InterconnectLocation and various Google Cloud regions.", + "items": { + "$ref": "InterconnectLocationRegionInfo" + } + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "InterconnectLocationList": { + "id": "InterconnectLocationList", + "type": "object", + "description": "Response to the list request, and contains a list of interconnect locations.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of InterconnectLocation resources.", + "items": { + "$ref": "InterconnectLocation" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#interconnectLocationList for lists of interconnect locations.", + "default": "compute#interconnectLocationList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "InterconnectLocationRegionInfo": { + "id": "InterconnectLocationRegionInfo", + "type": "object", + "description": "Information about any potential InterconnectAttachments between an Interconnect at a specific InterconnectLocation, and a specific Cloud Region.", + "properties": { + "expectedRttMs": { + "type": "string", + "description": "Expected round-trip time in milliseconds, from this InterconnectLocation to a VM in this region.", + "format": "int64" + }, + "locationPresence": { + "type": "string", + "description": "Identifies the network presence of this location.", + "enum": [ + "LP_GLOBAL", + "LP_LOCAL_REGION" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "regionKey": { + "type": "string", + "description": "Scope key for the region of this location." + } + } + }, "License": { "id": "License", "type": "object", @@ -5244,6 +6431,19 @@ "type": "boolean", "description": "[Output Only] If true, the customer will be charged license fee for running software that contains this license on an instance." }, + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, "kind": { "type": "string", "description": "[Output Only] Type of resource. Always compute#license for licenses.", @@ -5264,6 +6464,9 @@ ] } }, + "resourceRequirements": { + "$ref": "LicenseResourceRequirements" + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -5274,6 +6477,47 @@ } } }, + "LicenseResourceRequirements": { + "id": "LicenseResourceRequirements", + "type": "object", + "properties": { + "minGuestCpuCount": { + "type": "integer", + "description": "Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start.", + "format": "int32" + }, + "minMemoryMb": { + "type": "integer", + "description": "Minimum memory required to use the Instance. Enforced at Instance creation and Instance start.", + "format": "int32" + } + } + }, + "LicensesListResponse": { + "id": "LicensesListResponse", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of License resources.", + "items": { + "$ref": "License" + } + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, "LogConfig": { "id": "LogConfig", "type": "object", @@ -5460,6 +6704,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -5480,6 +6725,7 @@ "", "", "", + "", "" ] }, @@ -5592,6 +6838,10 @@ "tag": { "type": "string", "description": "[Output Only] Tag describing the version." + }, + "version": { + "$ref": "ManagedInstanceVersion", + "description": "[Output Only] Intended version of this instance." } } }, @@ -5628,6 +6878,20 @@ } } }, + "ManagedInstanceVersion": { + "id": "ManagedInstanceVersion", + "type": "object", + "properties": { + "instanceTemplate": { + "type": "string", + "description": "[Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }." + }, + "name": { + "type": "string", + "description": "[Output Only] Name of the version." + } + } + }, "Metadata": { "id": "Metadata", "type": "object", @@ -5769,6 +7033,10 @@ "$ref": "NetworkPeering" } }, + "routingConfig": { + "$ref": "NetworkRoutingConfig", + "description": "The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce." + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -5801,18 +7069,23 @@ "$ref": "AliasIpRange" } }, + "fingerprint": { + "type": "string", + "description": "Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface.", + "format": "byte" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", + "default": "compute#networkInterface" + }, "name": { "type": "string", "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc." }, "network": { "type": "string", - "description": "URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:\n\nglobal/networks/default \n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } + "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nThis field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default" }, "networkIP": { "type": "string", @@ -5890,6 +7163,25 @@ } } }, + "NetworkRoutingConfig": { + "id": "NetworkRoutingConfig", + "type": "object", + "description": "A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.", + "properties": { + "routingMode": { + "type": "string", + "description": "The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnetworks of this network, across regions.", + "enum": [ + "GLOBAL", + "REGIONAL" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, "NetworksAddPeeringRequest": { "id": "NetworksAddPeeringRequest", "type": "object", @@ -5929,7 +7221,7 @@ }, "creationTimestamp": { "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." + "description": "[Deprecated] This field is deprecated." }, "description": { "type": "string", @@ -6068,6 +7360,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -6088,6 +7381,7 @@ "", "", "", + "", "" ] }, @@ -6215,6 +7509,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -6235,6 +7530,7 @@ "", "", "", + "", "" ] }, @@ -6314,7 +7610,7 @@ "properties": { "auditConfigs": { "type": "array", - "description": "Specifies audit logging configs for \"data access\". \"data access\": generally refers to data reads/writes and admin reads. \"admin activity\": generally refers to admin writes.\n\nNote: `AuditConfig` doesn't apply to \"admin activity\", which always enables audit logging.", + "description": "Specifies cloud audit logging configuration for this policy.", "items": { "$ref": "AuditConfig" } @@ -6449,6 +7745,10 @@ "description": "[Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of XPN resources.", "default": "compute#projectsGetXpnResources" }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, "resources": { "type": "array", "description": "XPN resources attached to this project as their XPN host.", @@ -6495,11 +7795,12 @@ "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", + "COMMITMENTS", "CPUS", + "CPUS_ALL_REGIONS", "DISKS_TOTAL_GB", "FIREWALLS", "FORWARDING_RULES", - "GPUS", "HEALTH_CHECKS", "IMAGES", "INSTANCES", @@ -6509,6 +7810,7 @@ "IN_USE_ADDRESSES", "LOCAL_SSD_TOTAL_GB", "NETWORKS", + "NVIDIA_K80_GPUS", "PREEMPTIBLE_CPUS", "REGIONAL_AUTOSCALERS", "REGIONAL_INSTANCE_GROUP_MANAGERS", @@ -6526,7 +7828,6 @@ "TARGET_SSL_PROXIES", "TARGET_TCP_PROXIES", "TARGET_VPN_GATEWAYS", - "TOTAL_CPUS", "URL_MAPS", "VPN_TUNNELS" ], @@ -6567,6 +7868,7 @@ "", "", "", + "", "" ] }, @@ -6577,6 +7879,30 @@ } } }, + "Reference": { + "id": "Reference", + "type": "object", + "description": "Represents a reference to a resource.", + "properties": { + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#reference for references.", + "default": "compute#reference" + }, + "referenceType": { + "type": "string", + "description": "A description of the reference type with no implied semantics. Possible values include: \n- MEMBER_OF" + }, + "referrer": { + "type": "string", + "description": "URL of the resource which refers to the target." + }, + "target": { + "type": "string", + "description": "URL of the resource to which this reference points." + } + } + }, "Region": { "id": "Region", "type": "object", @@ -6780,7 +8106,7 @@ "properties": { "instances": { "type": "array", - "description": "The names of one or more instances to abandon.", + "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -6793,7 +8119,7 @@ "properties": { "instances": { "type": "array", - "description": "The names of one or more instances to delete.", + "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -6810,6 +8136,10 @@ "items": { "$ref": "ManagedInstance" } + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." } } }, @@ -6819,7 +8149,7 @@ "properties": { "instances": { "type": "array", - "description": "The URL for one or more instances to recreate.", + "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -7027,7 +8357,7 @@ "Route": { "id": "Route", "type": "object", - "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving a instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, a instance gateway or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", + "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving a instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", "properties": { "creationTimestamp": { "type": "string", @@ -7039,7 +8369,7 @@ }, "destRange": { "type": "string", - "description": "The destination range of outgoing packets that this route applies to.", + "description": "The destination range of outgoing packets that this route applies to. Only IPv4 is supported.", "annotations": { "required": [ "compute.routes.insert" @@ -7085,7 +8415,7 @@ }, "nextHopIp": { "type": "string", - "description": "The network IP address of an instance that should handle matching packets." + "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported." }, "nextHopNetwork": { "type": "string", @@ -7148,6 +8478,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -7168,6 +8499,7 @@ "", "", "", + "", "" ] }, @@ -7298,6 +8630,21 @@ } } }, + "RouterAdvertisedPrefix": { + "id": "RouterAdvertisedPrefix", + "type": "object", + "description": "Description-tagged prefixes for the router to advertise.", + "properties": { + "description": { + "type": "string", + "description": "User-specified description for the prefix." + }, + "prefix": { + "type": "string", + "description": "The prefix to advertise. The value must be a CIDR-formatted string." + } + } + }, "RouterAggregatedList": { "id": "RouterAggregatedList", "type": "object", @@ -7334,6 +8681,38 @@ "id": "RouterBgp", "type": "object", "properties": { + "advertiseMode": { + "type": "string", + "description": "User-specified flag to indicate which mode to use for advertisement.", + "enum": [ + "CUSTOM", + "DEFAULT" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "advertisedGroups": { + "type": "array", + "description": "User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", + "items": { + "type": "string", + "enum": [ + "ALL_SUBNETS" + ], + "enumDescriptions": [ + "" + ] + } + }, + "advertisedPrefixs": { + "type": "array", + "description": "User-specified list of individual prefixes to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These prefixes will be advertised in addition to any specified groups. Leave this field blank to advertise no custom prefixes.", + "items": { + "$ref": "RouterAdvertisedPrefix" + } + }, "asn": { "type": "integer", "description": "Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.", @@ -7345,6 +8724,38 @@ "id": "RouterBgpPeer", "type": "object", "properties": { + "advertiseMode": { + "type": "string", + "description": "User-specified flag to indicate which mode to use for advertisement.", + "enum": [ + "CUSTOM", + "DEFAULT" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "advertisedGroups": { + "type": "array", + "description": "User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in Bgp message). These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", + "items": { + "type": "string", + "enum": [ + "ALL_SUBNETS" + ], + "enumDescriptions": [ + "" + ] + } + }, + "advertisedPrefixs": { + "type": "array", + "description": "User-specified list of individual prefixes to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in Bgp message). These prefixes will be advertised in addition to any specified groups. Leave this field blank to advertise no custom prefixes.", + "items": { + "$ref": "RouterAdvertisedPrefix" + } + }, "advertisedRoutePriority": { "type": "integer", "description": "The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.", @@ -7356,7 +8767,7 @@ }, "ipAddress": { "type": "string", - "description": "IP address of the interface inside Google Cloud Platform." + "description": "IP address of the interface inside Google Cloud Platform. Only IPv4 is supported." }, "name": { "type": "string", @@ -7370,7 +8781,7 @@ }, "peerIpAddress": { "type": "string", - "description": "IP address of the BGP interface outside Google cloud." + "description": "IP address of the BGP interface outside Google cloud. Only IPv4 is supported." } } }, @@ -7382,9 +8793,13 @@ "type": "string", "description": "IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface." }, + "linkedInterconnectAttachment": { + "type": "string", + "description": "URI of the linked interconnect attachment. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." + }, "linkedVpnTunnel": { "type": "string", - "description": "URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource." + "description": "URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." }, "name": { "type": "string", @@ -7435,6 +8850,13 @@ "$ref": "Route" } }, + "bestRoutesForRouter": { + "type": "array", + "description": "Best routes learned by this router.", + "items": { + "$ref": "Route" + } + }, "bgpPeerStatus": { "type": "array", "items": { @@ -7563,6 +8985,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -7583,6 +9006,7 @@ "", "", "", + "", "" ] }, @@ -7683,7 +9107,7 @@ "properties": { "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443.", + "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -7719,7 +9143,7 @@ "properties": { "automaticRestart": { "type": "boolean", - "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted." + "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.\n\nBy default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine." }, "onHostMaintenance": { "type": "string", @@ -7735,7 +9159,135 @@ }, "preemptible": { "type": "boolean", - "description": "Whether the instance is preemptible." + "description": "Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created." + } + } + }, + "SecurityPoliciesList": { + "id": "SecurityPoliciesList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of SecurityPolicy resources.", + "items": { + "$ref": "SecurityPolicy" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#securityPoliciesList for listsof securityPolicies", + "default": "compute#securityPoliciesList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + } + } + }, + "SecurityPolicy": { + "id": "SecurityPolicy", + "type": "object", + "description": "A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "fingerprint": { + "type": "string", + "description": "Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the security policy.", + "format": "byte" + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output only] Type of the resource. Always compute#securityPolicyfor security policies", + "default": "compute#securityPolicy" + }, + "name": { + "type": "string", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "rules": { + "type": "array", + "description": "List of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match \"*\"). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", + "items": { + "$ref": "SecurityPolicyRule" + } + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "SecurityPolicyReference": { + "id": "SecurityPolicyReference", + "type": "object", + "properties": { + "securityPolicy": { + "type": "string" + } + } + }, + "SecurityPolicyRule": { + "id": "SecurityPolicyRule", + "type": "object", + "description": "Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny)", + "properties": { + "action": { + "type": "string", + "description": "The Action to preform when the client connection triggers the rule. Can currently be either \"allow\" or \"deny()\" where valid values for status are 403, 404, and 502." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "kind": { + "type": "string", + "description": "[Output only] Type of the resource. Always compute#rulefor security policies", + "default": "compute#securityPolicyRule" + }, + "match": { + "$ref": "SecurityPolicyRuleMatcher", + "description": "A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding ?action? is enforced." + }, + "preview": { + "type": "boolean", + "description": "If set to true, the specified action is not enforced." + }, + "priority": { + "type": "integer", + "description": "An integer indicating the priority of a rule in the list. Rules are evaluated in the increasing order of priority.", + "format": "uint32" + } + } + }, + "SecurityPolicyRuleMatcher": { + "id": "SecurityPolicyRuleMatcher", + "type": "object", + "description": "Represents a match condition that incoming traffic is evaluated against. Exactly one of the fields must be set.", + "properties": { + "srcIpRanges": { + "type": "array", + "description": "CIDR IP address range. Only IPv4 is supported.", + "items": { + "type": "string" + } } } }, @@ -7764,7 +9316,7 @@ }, "start": { "type": "string", - "description": "[Output Only] The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.", + "description": "The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.", "format": "int64" } } @@ -7787,6 +9339,22 @@ } } }, + "SignedUrlKey": { + "id": "SignedUrlKey", + "type": "object", + "description": "Represents a customer-supplied Signing Key used by Cloud CDN Signed URLs", + "properties": { + "keyName": { + "type": "string", + "description": "Name of the key. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "keyValue": { + "type": "string", + "description": "128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string." + } + } + }, "Snapshot": { "id": "Snapshot", "type": "object", @@ -7822,7 +9390,7 @@ }, "labels": { "type": "object", - "description": "Labels to apply to this snapshot. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.", "additionalProperties": { "type": "string" } @@ -8024,7 +9592,7 @@ }, "ipCidrRange": { "type": "string", - "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network." + "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported." }, "kind": { "type": "string", @@ -8130,7 +9698,7 @@ "properties": { "ipCidrRange": { "type": "string", - "description": "The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network." + "description": "The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported." }, "rangeName": { "type": "string", @@ -8180,6 +9748,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -8200,6 +9769,7 @@ "", "", "", + "", "" ] }, @@ -8243,7 +9813,7 @@ "properties": { "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80.", + "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -8599,6 +10169,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -8619,6 +10190,7 @@ "", "", "", + "", "" ] }, @@ -8650,7 +10222,7 @@ "TargetPool": { "id": "TargetPool", "type": "object", - "description": "A TargetPool resource. This resource defines a pool of instances, associated HttpHealthCheck resources, and the fallback target pool.", + "description": "A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool.", "properties": { "backupPool": { "type": "string", @@ -8671,7 +10243,7 @@ }, "healthChecks": { "type": "array", - "description": "A list of URLs to the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if all specified health checks pass. An empty list means all member instances will be considered healthy at all times.", + "description": "The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.", "items": { "type": "string" } @@ -8811,7 +10383,7 @@ "properties": { "healthChecks": { "type": "array", - "description": "A list of HttpHealthCheck resources to add to the target pool.", + "description": "The HttpHealthCheck to add to the target pool.", "items": { "$ref": "HealthCheckReference" } @@ -8889,6 +10461,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -8909,6 +10482,7 @@ "", "", "", + "", "" ] }, @@ -9364,6 +10938,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -9384,6 +10959,7 @@ "", "", "", + "", "" ] }, @@ -9462,7 +11038,7 @@ "properties": { "port": { "type": "integer", - "description": "The UDP port number for the health check request.", + "description": "The UDP port number for the health check request. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -9712,7 +11288,7 @@ }, "localTrafficSelector": { "type": "array", - "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint.", + "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", "items": { "type": "string" } @@ -9729,7 +11305,7 @@ }, "peerIp": { "type": "string", - "description": "IP address of the peer VPN gateway." + "description": "IP address of the peer VPN gateway. Only IPv4 is supported." }, "region": { "type": "string", @@ -9737,7 +11313,7 @@ }, "remoteTrafficSelector": { "type": "array", - "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint.", + "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", "items": { "type": "string" } @@ -9895,6 +11471,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -9915,6 +11492,7 @@ "", "", "", + "", "" ] }, @@ -10001,6 +11579,13 @@ "type": "object", "description": "A Zone resource.", "properties": { + "availableCpuPlatforms": { + "type": "array", + "description": "[Output Only] Available cpu/platform selections for the zone.", + "items": { + "type": "string" + } + }, "creationTimestamp": { "type": "string", "description": "[Output Only] Creation timestamp in RFC3339 text format." @@ -10100,6 +11685,158 @@ } }, "resources": { + "acceleratorTypes": { + "methods": { + "aggregatedList": { + "id": "compute.acceleratorTypes.aggregatedList", + "path": "{project}/aggregated/acceleratorTypes", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of accelerator types.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "AcceleratorTypeAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "get": { + "id": "compute.acceleratorTypes.get", + "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + "httpMethod": "GET", + "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", + "parameters": { + "acceleratorType": { + "type": "string", + "description": "Name of the accelerator type to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "acceleratorType" + ], + "response": { + "$ref": "AcceleratorType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.acceleratorTypes.list", + "path": "{project}/zones/{zone}/acceleratorTypes", + "httpMethod": "GET", + "description": "Retrieves a list of accelerator types available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "AcceleratorTypeList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "addresses": { "methods": { "aggregatedList": { @@ -10115,11 +11852,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10178,6 +11914,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -10254,6 +11995,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -10284,11 +12030,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10329,6 +12074,55 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "setLabels": { + "id": "compute.addresses.setLabels", + "path": "{project}/regions/{region}/addresses/{resource}/setLabels", + "httpMethod": "POST", + "description": "Sets the labels on an Address. To learn more about labels, read the Labeling or Tagging Resources documentation.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "resource" + ], + "request": { + "$ref": "RegionSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "testIamPermissions": { "id": "compute.addresses.testIamPermissions", "path": "{project}/regions/{region}/addresses/{resource}/testIamPermissions", @@ -10391,11 +12185,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10448,6 +12241,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "Name of the zone for this request.", @@ -10524,6 +12322,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "Name of the zone for this request.", @@ -10560,11 +12363,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10613,8 +12415,7 @@ "parameters": { "autoscaler": { "type": "string", - "description": "Name of the autoscaler to update.", - "required": true, + "description": "Name of the autoscaler to patch.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "query" }, @@ -10625,6 +12426,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "Name of the zone for this request.", @@ -10635,8 +12441,7 @@ }, "parameterOrder": [ "project", - "zone", - "autoscaler" + "zone" ], "request": { "$ref": "Autoscaler" @@ -10646,7 +12451,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -10713,6 +12519,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "Name of the zone for this request.", @@ -10740,6 +12551,46 @@ }, "backendBuckets": { "methods": { + "addSignedUrlKey": { + "id": "compute.backendBuckets.addSignedUrlKey", + "path": "{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", + "httpMethod": "POST", + "description": "Adds the given Signed URL Key to the backend bucket.", + "parameters": { + "backendBucket": { + "type": "string", + "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "backendBucket" + ], + "request": { + "$ref": "SignedUrlKey" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "delete": { "id": "compute.backendBuckets.delete", "path": "{project}/global/backendBuckets/{backendBucket}", @@ -10759,6 +12610,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -10773,6 +12629,50 @@ "https://www.googleapis.com/auth/compute" ] }, + "deleteSignedUrlKey": { + "id": "compute.backendBuckets.deleteSignedUrlKey", + "path": "{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", + "httpMethod": "POST", + "description": "Deletes the given Signed URL Key from the backend bucket.", + "parameters": { + "backendBucket": { + "type": "string", + "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + "required": true, + "location": "path" + }, + "keyName": { + "type": "string", + "description": "The name of the Signed URL Key to delete.", + "required": true, + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "backendBucket", + "keyName" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "get": { "id": "compute.backendBuckets.get", "path": "{project}/global/backendBuckets/{backendBucket}", @@ -10853,6 +12753,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -10882,11 +12787,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10927,7 +12831,7 @@ "parameters": { "backendBucket": { "type": "string", - "description": "Name of the BackendBucket resource to update.", + "description": "Name of the BackendBucket resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -10938,6 +12842,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -10952,7 +12861,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "setIamPolicy": { @@ -10988,8 +12898,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -11048,6 +12957,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -11069,6 +12983,46 @@ }, "backendServices": { "methods": { + "addSignedUrlKey": { + "id": "compute.backendServices.addSignedUrlKey", + "path": "{project}/global/backendServices/{backendService}/addSignedUrlKey", + "httpMethod": "POST", + "description": "Adds the given Signed URL Key to the specified backend service.", + "parameters": { + "backendService": { + "type": "string", + "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "backendService" + ], + "request": { + "$ref": "SignedUrlKey" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "aggregatedList": { "id": "compute.backendServices.aggregatedList", "path": "{project}/aggregated/backendServices", @@ -11082,11 +13036,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11138,6 +13091,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -11152,6 +13110,50 @@ "https://www.googleapis.com/auth/compute" ] }, + "deleteSignedUrlKey": { + "id": "compute.backendServices.deleteSignedUrlKey", + "path": "{project}/global/backendServices/{backendService}/deleteSignedUrlKey", + "httpMethod": "POST", + "description": "Deletes the given Signed URL Key from the specified backend service.", + "parameters": { + "backendService": { + "type": "string", + "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + "required": true, + "location": "path" + }, + "keyName": { + "type": "string", + "description": "The name of the Signed URL Key to delete.", + "required": true, + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "backendService", + "keyName" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "get": { "id": "compute.backendServices.get", "path": "{project}/global/backendServices/{backendService}", @@ -11234,6 +13236,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -11263,11 +13270,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11304,11 +13310,11 @@ "id": "compute.backendServices.patch", "path": "{project}/global/backendServices/{backendService}", "httpMethod": "PATCH", - "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", + "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", "parameters": { "backendService": { "type": "string", - "description": "Name of the BackendService resource to update.", + "description": "Name of the BackendService resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11319,6 +13325,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -11331,6 +13342,47 @@ "response": { "$ref": "Operation" }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setSecurityPolicy": { + "id": "compute.backendServices.setSecurityPolicy", + "path": "{project}/global/backendServices/{backendService}/setSecurityPolicy", + "httpMethod": "POST", + "description": "Sets the security policy for the specified backend service.", + "parameters": { + "backendService": { + "type": "string", + "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "backendService" + ], + "request": { + "$ref": "SecurityPolicyReference" + }, + "response": { + "$ref": "Operation" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" @@ -11392,6 +13444,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -11452,328 +13509,6 @@ } } }, - "commitments": { - "methods": { - "aggregatedList": { - "id": "compute.commitments.aggregatedList", - "path": "{project}/aggregated/commitments", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of commitments.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "default": "500", - "format": "uint32", - "minimum": "0", - "maximum": "500", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "CommitmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.commitments.get", - "path": "{project}/zones/{zone}/commitments/{commitment}", - "httpMethod": "GET", - "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", - "parameters": { - "commitment": { - "type": "string", - "description": "Name of the commitment to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "commitment" - ], - "response": { - "$ref": "Commitment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.commitments.getIamPolicy", - "path": "{project}/zones/{zone}/commitments/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.commitments.insert", - "path": "{project}/zones/{zone}/commitments", - "httpMethod": "POST", - "description": "Creates an commitment in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Commitment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.commitments.list", - "path": "{project}/zones/{zone}/commitments", - "httpMethod": "GET", - "description": "Retrieves a list of commitments contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", - "default": "500", - "format": "uint32", - "minimum": "0", - "maximum": "500", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "CommitmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "id": "compute.commitments.setIamPolicy", - "path": "{project}/zones/{zone}/commitments/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.commitments.testIamPermissions", - "path": "{project}/zones/{zone}/commitments/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, "diskTypes": { "methods": { "aggregatedList": { @@ -11789,11 +13524,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11881,11 +13615,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11943,11 +13676,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12004,6 +13736,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -12047,6 +13784,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -12110,6 +13852,48 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "id": "compute.disks.getIamPolicy", + "path": "{project}/zones/{zone}/disks/{resource}/getIamPolicy", + "httpMethod": "GET", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "id": "compute.disks.insert", "path": "{project}/zones/{zone}/disks", @@ -12123,6 +13907,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "sourceImage": { "type": "string", "description": "Optional. Source image to restore onto a disk.", @@ -12164,11 +13953,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12229,6 +14017,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -12253,6 +14046,50 @@ "https://www.googleapis.com/auth/compute" ] }, + "setIamPolicy": { + "id": "compute.disks.setIamPolicy", + "path": "{project}/zones/{zone}/disks/{resource}/setIamPolicy", + "httpMethod": "POST", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setLabels": { "id": "compute.disks.setLabels", "path": "{project}/zones/{zone}/disks/{resource}/setLabels", @@ -12266,6 +14103,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "resource": { "type": "string", "description": "Name of the resource for this request.", @@ -12365,6 +14207,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -12425,6 +14272,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -12454,11 +14306,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12499,7 +14350,7 @@ "parameters": { "firewall": { "type": "string", - "description": "Name of the firewall rule to update.", + "description": "Name of the firewall rule to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -12510,6 +14361,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -12524,7 +14380,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -12568,7 +14425,7 @@ "id": "compute.firewalls.update", "path": "{project}/global/firewalls/{firewall}", "httpMethod": "PUT", - "description": "Updates the specified firewall rule with the data included in the request.", + "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", "parameters": { "firewall": { "type": "string", @@ -12583,6 +14440,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -12617,11 +14479,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12680,6 +14541,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -12756,6 +14622,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -12786,11 +14657,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12831,6 +14701,105 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "patch": { + "id": "compute.forwardingRules.patch", + "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", + "httpMethod": "PATCH", + "description": "Updates the specified forwarding rule with the data included in the request. This method supports patch semantics. Currently it only allow to patch network_tier field.", + "parameters": { + "forwardingRule": { + "type": "string", + "description": "Name of the ForwardingRule resource to patch.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "region", + "forwardingRule" + ], + "request": { + "$ref": "ForwardingRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setLabels": { + "id": "compute.forwardingRules.setLabels", + "path": "{project}/regions/{region}/forwardingRules/{resource}/setLabels", + "httpMethod": "POST", + "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling or Tagging Resources documentation.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "resource" + ], + "request": { + "$ref": "RegionSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setTarget": { "id": "compute.forwardingRules.setTarget", "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", @@ -12857,6 +14826,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -12943,6 +14917,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -13003,6 +14982,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -13032,11 +15016,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13069,6 +15052,42 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "setLabels": { + "id": "compute.globalAddresses.setLabels", + "path": "{project}/global/addresses/{resource}/setLabels", + "httpMethod": "POST", + "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling or Tagging Resources documentation.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "GlobalSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "testIamPermissions": { "id": "compute.globalAddresses.testIamPermissions", "path": "{project}/global/addresses/{resource}/testIamPermissions", @@ -13114,7 +15133,7 @@ "id": "compute.globalForwardingRules.delete", "path": "{project}/global/forwardingRules/{forwardingRule}", "httpMethod": "DELETE", - "description": "Deletes the specified ForwardingRule resource.", + "description": "Deletes the specified GlobalForwardingRule resource.", "parameters": { "forwardingRule": { "type": "string", @@ -13129,6 +15148,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -13147,7 +15171,7 @@ "id": "compute.globalForwardingRules.get", "path": "{project}/global/forwardingRules/{forwardingRule}", "httpMethod": "GET", - "description": "Returns the specified ForwardingRule resource. Get a list of available forwarding rules by making a list() request.", + "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.", "parameters": { "forwardingRule": { "type": "string", @@ -13181,7 +15205,7 @@ "id": "compute.globalForwardingRules.insert", "path": "{project}/global/forwardingRules", "httpMethod": "POST", - "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", "parameters": { "project": { "type": "string", @@ -13189,6 +15213,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -13209,7 +15238,7 @@ "id": "compute.globalForwardingRules.list", "path": "{project}/global/forwardingRules", "httpMethod": "GET", - "description": "Retrieves a list of ForwardingRule resources available to the specified project.", + "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", "parameters": { "filter": { "type": "string", @@ -13218,11 +15247,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13255,11 +15283,89 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "patch": { + "id": "compute.globalForwardingRules.patch", + "path": "{project}/global/forwardingRules/{forwardingRule}", + "httpMethod": "PATCH", + "description": "Updates the specified forwarding rule with the data included in the request. This method supports patch semantics. Currently it only allow to patch network_tier field.", + "parameters": { + "forwardingRule": { + "type": "string", + "description": "Name of the ForwardingRule resource to patch.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "forwardingRule" + ], + "request": { + "$ref": "ForwardingRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setLabels": { + "id": "compute.globalForwardingRules.setLabels", + "path": "{project}/global/forwardingRules/{resource}/setLabels", + "httpMethod": "POST", + "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling or Tagging Resources documentation.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "GlobalSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setTarget": { "id": "compute.globalForwardingRules.setTarget", "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", "httpMethod": "POST", - "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", "parameters": { "forwardingRule": { "type": "string", @@ -13274,6 +15380,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -13345,11 +15456,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13459,11 +15569,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13519,6 +15628,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -13579,6 +15693,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -13608,11 +15727,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13653,7 +15771,7 @@ "parameters": { "healthCheck": { "type": "string", - "description": "Name of the HealthCheck resource to update.", + "description": "Name of the HealthCheck resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13664,6 +15782,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -13678,7 +15801,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -13737,6 +15861,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -13756,6 +15885,158 @@ } } }, + "hostTypes": { + "methods": { + "aggregatedList": { + "id": "compute.hostTypes.aggregatedList", + "path": "{project}/aggregated/hostTypes", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of host types.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "HostTypeAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "get": { + "id": "compute.hostTypes.get", + "path": "{project}/zones/{zone}/hostTypes/{hostType}", + "httpMethod": "GET", + "description": "Returns the specified host type. Get a list of available host types by making a list() request.", + "parameters": { + "hostType": { + "type": "string", + "description": "Name of the host type to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "hostType" + ], + "response": { + "$ref": "HostType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.hostTypes.list", + "path": "{project}/zones/{zone}/hostTypes", + "httpMethod": "GET", + "description": "Retrieves a list of host types available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "HostTypeList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "hosts": { "methods": { "aggregatedList": { @@ -13771,11 +16052,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13828,6 +16108,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -13946,6 +16231,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -13982,11 +16272,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14068,8 +16357,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -14140,6 +16428,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14200,6 +16493,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14229,11 +16527,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14274,7 +16571,7 @@ "parameters": { "httpHealthCheck": { "type": "string", - "description": "Name of the HttpHealthCheck resource to update.", + "description": "Name of the HttpHealthCheck resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -14285,6 +16582,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14299,7 +16601,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -14358,6 +16661,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14398,6 +16706,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14458,6 +16771,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14487,11 +16805,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14532,7 +16849,7 @@ "parameters": { "httpsHealthCheck": { "type": "string", - "description": "Name of the HttpsHealthCheck resource to update.", + "description": "Name of the HttpsHealthCheck resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -14543,6 +16860,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14557,7 +16879,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -14616,6 +16939,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14656,6 +16984,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14689,6 +17022,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14774,11 +17112,11 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "insert": { - "id": "compute.images.insert", - "path": "{project}/global/images", - "httpMethod": "POST", - "description": "Creates an image in the specified project using the data included in the request.", + "getIamPolicy": { + "id": "compute.images.getIamPolicy", + "path": "{project}/global/images/{resource}/getIamPolicy", + "httpMethod": "GET", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", "parameters": { "project": { "type": "string", @@ -14786,6 +17124,50 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.images.insert", + "path": "{project}/global/images", + "httpMethod": "POST", + "description": "Creates an image in the specified project using the data included in the request.", + "parameters": { + "forceCreate": { + "type": "boolean", + "description": "Force image creation if true.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -14818,11 +17200,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14855,6 +17236,42 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "setIamPolicy": { + "id": "compute.images.setIamPolicy", + "path": "{project}/global/images/{resource}/setIamPolicy", + "httpMethod": "POST", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setLabels": { "id": "compute.images.setLabels", "path": "{project}/global/images/{resource}/setLabels", @@ -14936,7 +17353,7 @@ "id": "compute.instanceGroupManagers.abandonInstances", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.", + "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -14951,6 +17368,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -14987,11 +17409,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15043,6 +17464,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -15067,7 +17493,7 @@ "id": "compute.instanceGroupManagers.deleteInstances", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.", + "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -15082,6 +17508,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -15149,7 +17580,7 @@ "id": "compute.instanceGroupManagers.insert", "path": "{project}/zones/{zone}/instanceGroupManagers", "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group.", "parameters": { "project": { "type": "string", @@ -15158,6 +17589,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where you want to create the managed instance group.", @@ -15193,11 +17629,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15258,7 +17693,6 @@ "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "order_by": { @@ -15301,7 +17735,7 @@ "id": "compute.instanceGroupManagers.patch", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", "httpMethod": "PATCH", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports patch semantics.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports patch semantics.", "parameters": { "instanceGroupManager": { "type": "string", @@ -15316,6 +17750,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where you want to create the managed instance group.", @@ -15336,14 +17775,15 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "recreateInstances": { "id": "compute.instanceGroupManagers.recreateInstances", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.", + "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -15358,6 +17798,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -15400,6 +17845,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "size": { "type": "integer", "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", @@ -15447,6 +17897,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -15489,6 +17944,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -15531,6 +17991,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -15573,6 +18038,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the managed instance group is located.", @@ -15645,7 +18115,7 @@ "id": "compute.instanceGroupManagers.update", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", "httpMethod": "PUT", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", "parameters": { "instanceGroupManager": { "type": "string", @@ -15660,6 +18130,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where you want to create the managed instance group.", @@ -15706,6 +18181,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the instance group is located.", @@ -15742,11 +18222,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15798,6 +18277,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the instance group is located.", @@ -15871,6 +18355,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where you want to create the instance group.", @@ -15906,11 +18395,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15969,11 +18457,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16036,6 +18523,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the instance group is located.", @@ -16078,6 +18570,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone where the instance group is located.", @@ -16169,6 +18666,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -16229,6 +18731,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -16258,11 +18765,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16362,6 +18868,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -16400,11 +18911,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16441,7 +18951,7 @@ "id": "compute.instances.attachDisk", "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", "httpMethod": "POST", - "description": "Attaches a Disk resource to an instance.", + "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", "parameters": { "forceAttach": { "type": "boolean", @@ -16462,6 +18972,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -16506,6 +19021,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -16559,6 +19079,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -16608,6 +19133,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -16745,7 +19275,7 @@ }, "start": { "type": "string", - "description": "For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value that was returned in the previous call.", + "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.", "format": "int64", "location": "query" }, @@ -16784,6 +19314,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -16820,11 +19355,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16865,11 +19399,76 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "listReferrers": { + "id": "compute.instances.listReferrers", + "path": "{project}/zones/{zone}/instances/{instance}/referrers", + "httpMethod": "GET", + "description": "Retrieves the list of referrers to instances contained within the specified zone.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "instance": { + "type": "string", + "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.", + "required": true, + "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "response": { + "$ref": "InstanceListReferrers" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "reset": { "id": "compute.instances.reset", "path": "{project}/zones/{zone}/instances/{instance}/reset", "httpMethod": "POST", - "description": "Performs a hard reset on the instance.", + "description": "Performs a reset on the instance. For more information, see Resetting an instance.", "parameters": { "instance": { "type": "string", @@ -16885,6 +19484,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -16939,6 +19543,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17003,8 +19612,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "setLabels": { @@ -17027,6 +19635,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17051,6 +19664,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "setMachineResources": { + "id": "compute.instances.setMachineResources", + "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", + "httpMethod": "POST", + "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "InstancesSetMachineResourcesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setMachineType": { "id": "compute.instances.setMachineType", "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", @@ -17071,6 +19733,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17115,6 +19782,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17139,6 +19811,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "setMinCpuPlatform": { + "id": "compute.instances.setMinCpuPlatform", + "path": "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", + "httpMethod": "POST", + "description": "Changes the minimum cpu/platform that this instance should be started as. This is called on a stopped instance.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "InstancesSetMinCpuPlatformRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setScheduling": { "id": "compute.instances.setScheduling", "path": "{project}/zones/{zone}/instances/{instance}/setScheduling", @@ -17159,6 +19880,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17187,7 +19913,7 @@ "id": "compute.instances.setServiceAccount", "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount", "httpMethod": "POST", - "description": "Sets the service account on the instance.", + "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", "parameters": { "instance": { "type": "string", @@ -17203,6 +19929,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17247,6 +19978,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17271,6 +20007,47 @@ "https://www.googleapis.com/auth/compute" ] }, + "simulateMaintenanceEvent": { + "id": "compute.instances.simulateMaintenanceEvent", + "path": "{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", + "httpMethod": "POST", + "description": "Simulates a maintenance event on the instance.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "start": { "id": "compute.instances.start", "path": "{project}/zones/{zone}/instances/{instance}/start", @@ -17291,6 +20068,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17332,6 +20114,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17364,7 +20151,7 @@ "parameters": { "discardLocalSsd": { "type": "boolean", - "description": "If true, discard the contents of any attached localSSD partitions. Default value is false.", + "description": "If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).", "location": "query" }, "instance": { @@ -17381,6 +20168,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17410,7 +20202,7 @@ "parameters": { "discardLocalSsd": { "type": "boolean", - "description": "If true, discard the contents of any attached localSSD partitions. Default value is false.", + "description": "If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).", "location": "query" }, "instance": { @@ -17427,6 +20219,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17519,6 +20316,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "The name of the zone for this request.", @@ -17543,6 +20345,749 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "updateNetworkInterface": { + "id": "compute.instances.updateNetworkInterface", + "path": "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", + "httpMethod": "PATCH", + "description": "Updates an instance's network interface. This method follows PATCH semantics.", + "parameters": { + "instance": { + "type": "string", + "description": "The instance name for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "networkInterface": { + "type": "string", + "description": "The name of the network interface to update.", + "required": true, + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance", + "networkInterface" + ], + "request": { + "$ref": "NetworkInterface" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "interconnectAttachments": { + "methods": { + "aggregatedList": { + "id": "compute.interconnectAttachments.aggregatedList", + "path": "{project}/aggregated/interconnectAttachments", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of interconnect attachments.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "InterconnectAttachmentAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "id": "compute.interconnectAttachments.delete", + "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + "httpMethod": "DELETE", + "description": "Deletes the specified interconnect attachment.", + "parameters": { + "interconnectAttachment": { + "type": "string", + "description": "Name of the interconnect attachment to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "region", + "interconnectAttachment" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.interconnectAttachments.get", + "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + "httpMethod": "GET", + "description": "Returns the specified interconnect attachment.", + "parameters": { + "interconnectAttachment": { + "type": "string", + "description": "Name of the interconnect attachment to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "interconnectAttachment" + ], + "response": { + "$ref": "InterconnectAttachment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getIamPolicy": { + "id": "compute.interconnectAttachments.getIamPolicy", + "path": "{project}/regions/{region}/interconnectAttachments/{resource}/getIamPolicy", + "httpMethod": "GET", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.interconnectAttachments.insert", + "path": "{project}/regions/{region}/interconnectAttachments", + "httpMethod": "POST", + "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "InterconnectAttachment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.interconnectAttachments.list", + "path": "{project}/regions/{region}/interconnectAttachments", + "httpMethod": "GET", + "description": "Retrieves the list of interconnect attachments contained within the specified region.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "InterconnectAttachmentList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "testIamPermissions": { + "id": "compute.interconnectAttachments.testIamPermissions", + "path": "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "interconnectLocations": { + "methods": { + "get": { + "id": "compute.interconnectLocations.get", + "path": "{project}/global/interconnectLocations/{interconnectLocation}", + "httpMethod": "GET", + "description": "Returns the details for the specified interconnect location. Get a list of available interconnect locations by making a list() request.", + "parameters": { + "interconnectLocation": { + "type": "string", + "description": "Name of the interconnect location to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "interconnectLocation" + ], + "response": { + "$ref": "InterconnectLocation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.interconnectLocations.list", + "path": "{project}/global/interconnectLocations", + "httpMethod": "GET", + "description": "Retrieves the list of interconnect locations available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "InterconnectLocationList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "testIamPermissions": { + "id": "compute.interconnectLocations.testIamPermissions", + "path": "{project}/global/interconnectLocations/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "interconnects": { + "methods": { + "delete": { + "id": "compute.interconnects.delete", + "path": "{project}/global/interconnects/{interconnect}", + "httpMethod": "DELETE", + "description": "Deletes the specified interconnect.", + "parameters": { + "interconnect": { + "type": "string", + "description": "Name of the interconnect to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "interconnect" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.interconnects.get", + "path": "{project}/global/interconnects/{interconnect}", + "httpMethod": "GET", + "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", + "parameters": { + "interconnect": { + "type": "string", + "description": "Name of the interconnect to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "interconnect" + ], + "response": { + "$ref": "Interconnect" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.interconnects.insert", + "path": "{project}/global/interconnects", + "httpMethod": "POST", + "description": "Creates a Interconnect in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "Interconnect" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.interconnects.list", + "path": "{project}/global/interconnects", + "httpMethod": "GET", + "description": "Retrieves the list of interconnect available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "InterconnectList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "id": "compute.interconnects.patch", + "path": "{project}/global/interconnects/{interconnect}", + "httpMethod": "PATCH", + "description": "Updates the specified interconnect with the data included in the request using patch semantics.", + "parameters": { + "interconnect": { + "type": "string", + "description": "Name of the interconnect to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "interconnect" + ], + "request": { + "$ref": "Interconnect" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "testIamPermissions": { + "id": "compute.interconnects.testIamPermissions", + "path": "{project}/global/interconnects/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -17581,6 +21126,91 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "insert": { + "id": "compute.licenses.insert", + "path": "{project}/global/licenses", + "httpMethod": "POST", + "description": "Create a License resource in the specified project.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "License" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "list": { + "id": "compute.licenses.list", + "path": "{project}/global/licenses", + "httpMethod": "GET", + "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 8. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "LicensesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -17599,11 +21229,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17691,11 +21320,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17759,6 +21387,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -17795,6 +21428,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -17855,6 +21493,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -17884,11 +21527,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17940,6 +21582,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -17976,6 +21623,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18043,6 +21695,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18068,6 +21725,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18096,6 +21758,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18121,6 +21788,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18195,6 +21867,25 @@ "httpMethod": "GET", "description": "Get XPN resources associated with this host project.", "parameters": { + "filter": { + "type": "string", + "location": "query" + }, + "maxResults": { + "type": "integer", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "order_by": { + "type": "string", + "location": "query" + }, + "pageToken": { + "type": "string", + "location": "query" + }, "project": { "type": "string", "description": "Project ID for this request.", @@ -18221,6 +21912,25 @@ "httpMethod": "POST", "description": "List all XPN host projects visible to the user in an organization.", "parameters": { + "filter": { + "type": "string", + "location": "query" + }, + "maxResults": { + "type": "integer", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "order_by": { + "type": "string", + "location": "query" + }, + "pageToken": { + "type": "string", + "location": "query" + }, "project": { "type": "string", "description": "Project ID for this request.", @@ -18256,6 +21966,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18284,6 +21999,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18312,6 +22032,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18340,6 +22065,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18368,6 +22098,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18417,6 +22152,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18493,6 +22233,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18523,11 +22268,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18576,8 +22320,7 @@ "parameters": { "autoscaler": { "type": "string", - "description": "Name of the autoscaler to update.", - "required": true, + "description": "Name of the autoscaler to patch.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "query" }, @@ -18594,12 +22337,16 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ "project", - "region", - "autoscaler" + "region" ], "request": { "$ref": "Autoscaler" @@ -18609,7 +22356,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -18682,6 +22430,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18729,6 +22482,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18849,6 +22607,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18879,11 +22642,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18932,7 +22694,7 @@ "parameters": { "backendService": { "type": "string", - "description": "Name of the BackendService resource to update.", + "description": "Name of the BackendService resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -18950,6 +22712,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -18965,7 +22732,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -19039,6 +22807,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19059,6 +22832,244 @@ } } }, + "regionCommitments": { + "methods": { + "aggregatedList": { + "id": "compute.regionCommitments.aggregatedList", + "path": "{project}/aggregated/commitments", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of commitments.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "CommitmentAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "get": { + "id": "compute.regionCommitments.get", + "path": "{project}/regions/{region}/commitments/{commitment}", + "httpMethod": "GET", + "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", + "parameters": { + "commitment": { + "type": "string", + "description": "Name of the commitment to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "commitment" + ], + "response": { + "$ref": "Commitment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.regionCommitments.insert", + "path": "{project}/regions/{region}/commitments", + "httpMethod": "POST", + "description": "Creates an commitment in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "Commitment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.regionCommitments.list", + "path": "{project}/regions/{region}/commitments", + "httpMethod": "GET", + "description": "Retrieves a list of commitments contained within the specified region.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "CommitmentList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "testIamPermissions": { + "id": "compute.regionCommitments.testIamPermissions", + "path": "{project}/regions/{region}/commitments/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "regionDiskTypes": { "methods": { "get": { @@ -19116,11 +23127,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -19195,6 +23205,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19238,6 +23253,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19315,6 +23335,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "sourceImage": { "type": "string", "description": "Optional. Source image to restore onto a disk.", @@ -19349,11 +23374,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -19420,6 +23444,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19458,6 +23487,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "resource": { "type": "string", "description": "Name of the resource for this request.", @@ -19535,7 +23569,7 @@ "id": "compute.regionInstanceGroupManagers.abandonInstances", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.", + "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -19555,6 +23589,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19597,6 +23636,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19616,7 +23660,7 @@ "id": "compute.regionInstanceGroupManagers.deleteInstances", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.", + "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -19636,6 +23680,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19698,7 +23747,7 @@ "id": "compute.regionInstanceGroupManagers.insert", "path": "{project}/regions/{region}/instanceGroupManagers", "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", "parameters": { "project": { "type": "string", @@ -19712,6 +23761,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19742,11 +23796,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -19807,7 +23860,6 @@ "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "order_by": { @@ -19850,7 +23902,7 @@ "id": "compute.regionInstanceGroupManagers.patch", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", "httpMethod": "PATCH", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports patch semantics.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports patch semantics.", "parameters": { "instanceGroupManager": { "type": "string", @@ -19870,6 +23922,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19885,14 +23942,15 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "recreateInstances": { "id": "compute.regionInstanceGroupManagers.recreateInstances", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.", + "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -19912,6 +23970,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -19955,6 +24018,11 @@ "required": true, "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "size": { "type": "integer", "description": "Number of instances that should exist in this instance group manager.", @@ -20002,6 +24070,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -20044,6 +24117,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -20086,6 +24164,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -20173,6 +24256,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -20248,11 +24336,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20311,11 +24398,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20383,6 +24469,11 @@ "description": "Name of the region scoping this request.", "required": true, "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -20543,11 +24634,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20639,11 +24729,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20693,11 +24782,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20750,6 +24838,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "router": { "type": "string", "description": "Name of the Router resource to delete.", @@ -20874,6 +24967,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -20904,11 +25002,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20953,7 +25050,7 @@ "id": "compute.routers.patch", "path": "{project}/regions/{region}/routers/{router}", "httpMethod": "PATCH", - "description": "Updates the specified Router resource with the data included in the request. This method supports patch semantics.", + "description": "Patches the specified Router resource with the data included in the request. This method supports patch semantics.", "parameters": { "project": { "type": "string", @@ -20969,9 +25066,14 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "router": { "type": "string", - "description": "Name of the Router resource to update.", + "description": "Name of the Router resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -20990,7 +25092,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "preview": { @@ -21103,6 +25206,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "router": { "type": "string", "description": "Name of the Router resource to update.", @@ -21144,6 +25252,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "route": { "type": "string", "description": "Name of the Route resource to delete.", @@ -21210,6 +25323,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -21239,11 +25357,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -21315,6 +25432,243 @@ } } }, + "securityPolicies": { + "methods": { + "delete": { + "id": "compute.securityPolicies.delete", + "path": "{project}/global/securityPolicies/{securityPolicy}", + "httpMethod": "DELETE", + "description": "Deletes the specified policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, + "securityPolicy": { + "type": "string", + "description": "Name of the security policy to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "securityPolicy" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.securityPolicies.get", + "path": "{project}/global/securityPolicies/{securityPolicy}", + "httpMethod": "GET", + "description": "List all of the ordered rules present in a single specified policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "securityPolicy": { + "type": "string", + "description": "Name of the security policy to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "securityPolicy" + ], + "response": { + "$ref": "SecurityPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.securityPolicies.insert", + "path": "{project}/global/securityPolicies", + "httpMethod": "POST", + "description": "Creates a new policy in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "SecurityPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.securityPolicies.list", + "path": "{project}/global/securityPolicies", + "httpMethod": "GET", + "description": "List all the policies that have been configured for the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "SecurityPoliciesList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "id": "compute.securityPolicies.patch", + "path": "{project}/global/securityPolicies/{securityPolicy}", + "httpMethod": "PATCH", + "description": "Patches the specified policy with the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, + "securityPolicy": { + "type": "string", + "description": "Name of the security policy to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "securityPolicy" + ], + "request": { + "$ref": "SecurityPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "testIamPermissions": { + "id": "compute.securityPolicies.testIamPermissions", + "path": "{project}/global/securityPolicies/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "snapshots": { "methods": { "delete": { @@ -21330,6 +25684,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "snapshot": { "type": "string", "description": "Name of the Snapshot resource to delete.", @@ -21384,6 +25743,40 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "id": "compute.snapshots.getIamPolicy", + "path": "{project}/global/snapshots/{resource}/getIamPolicy", + "httpMethod": "GET", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "list": { "id": "compute.snapshots.list", "path": "{project}/global/snapshots", @@ -21397,11 +25790,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -21434,6 +25826,42 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "setIamPolicy": { + "id": "compute.snapshots.setIamPolicy", + "path": "{project}/global/snapshots/{resource}/setIamPolicy", + "httpMethod": "POST", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setLabels": { "id": "compute.snapshots.setLabels", "path": "{project}/global/snapshots/{resource}/setLabels", @@ -21524,6 +25952,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "sslCertificate": { "type": "string", "description": "Name of the SslCertificate resource to delete.", @@ -21590,6 +26023,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -21619,11 +26057,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -21710,11 +26147,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -21767,6 +26203,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "subnetwork": { "type": "string", "description": "Name of the Subnetwork resource to delete.", @@ -21808,6 +26249,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "subnetwork": { "type": "string", "description": "Name of the Subnetwork resource to update.", @@ -21935,6 +26381,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -21965,11 +26416,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -22051,15 +26501,14 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "setPrivateIpGoogleAccess": { "id": "compute.subnetworks.setPrivateIpGoogleAccess", "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", "httpMethod": "POST", - "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Cloudpath.", + "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", "parameters": { "project": { "type": "string", @@ -22075,6 +26524,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "subnetwork": { "type": "string", "description": "Name of the Subnetwork resource.", @@ -22161,6 +26615,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetHttpProxy": { "type": "string", "description": "Name of the TargetHttpProxy resource to delete.", @@ -22227,6 +26686,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -22256,11 +26720,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -22306,6 +26769,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetHttpProxy": { "type": "string", "description": "Name of the TargetHttpProxy to set a URL map for.", @@ -22383,6 +26851,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetHttpsProxy": { "type": "string", "description": "Name of the TargetHttpsProxy resource to delete.", @@ -22449,6 +26922,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -22478,11 +26956,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -22528,6 +27005,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetHttpsProxy": { "type": "string", "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", @@ -22564,6 +27046,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetHttpsProxy": { "type": "string", "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", @@ -22641,11 +27128,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -22691,6 +27177,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetInstance": { "type": "string", "description": "Name of the TargetInstance resource to delete.", @@ -22774,6 +27265,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "zone": { "type": "string", "description": "Name of the zone scoping this request.", @@ -22810,11 +27306,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -22924,6 +27419,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetPool": { "type": "string", "description": "Name of the target pool to add a health check to.", @@ -22968,6 +27468,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetPool": { "type": "string", "description": "Name of the TargetPool resource to add instances to.", @@ -23005,11 +27510,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -23062,6 +27566,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetPool": { "type": "string", "description": "Name of the TargetPool resource to delete.", @@ -23189,6 +27698,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -23219,11 +27733,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -23284,6 +27797,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetPool": { "type": "string", "description": "Name of the target pool to remove health checks from.", @@ -23328,6 +27846,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetPool": { "type": "string", "description": "Name of the TargetPool resource to remove instances from.", @@ -23378,6 +27901,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetPool": { "type": "string", "description": "Name of the TargetPool resource to set a backup pool for.", @@ -23464,6 +27992,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetSslProxy": { "type": "string", "description": "Name of the TargetSslProxy resource to delete.", @@ -23530,6 +28063,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -23559,11 +28097,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -23609,6 +28146,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetSslProxy": { "type": "string", "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", @@ -23645,6 +28187,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetSslProxy": { "type": "string", "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", @@ -23681,6 +28228,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetSslProxy": { "type": "string", "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", @@ -23758,6 +28310,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetTcpProxy": { "type": "string", "description": "Name of the TargetTcpProxy resource to delete.", @@ -23824,6 +28381,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -23853,11 +28415,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -23903,6 +28464,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetTcpProxy": { "type": "string", "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", @@ -23939,6 +28505,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetTcpProxy": { "type": "string", "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", @@ -24016,11 +28587,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -24073,6 +28643,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "targetVpnGateway": { "type": "string", "description": "Name of the target VPN gateway to delete.", @@ -24155,6 +28730,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -24185,11 +28765,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -24292,6 +28871,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "urlMap": { "type": "string", "description": "Name of the UrlMap resource to delete.", @@ -24358,6 +28942,11 @@ "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -24387,6 +28976,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "urlMap": { "type": "string", "description": "Name of the UrlMap scoping this request.", @@ -24423,11 +29017,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -24464,7 +29057,7 @@ "id": "compute.urlMaps.patch", "path": "{project}/global/urlMaps/{urlMap}", "httpMethod": "PATCH", - "description": "Updates the specified UrlMap resource with the data included in the request. This method supports patch semantics.", + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports patch semantics.", "parameters": { "project": { "type": "string", @@ -24473,9 +29066,14 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "urlMap": { "type": "string", - "description": "Name of the UrlMap resource to update.", + "description": "Name of the UrlMap resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -24493,7 +29091,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -24546,6 +29145,11 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "urlMap": { "type": "string", "description": "Name of the UrlMap resource to update.", @@ -24622,11 +29226,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -24679,6 +29282,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, "vpnTunnel": { "type": "string", "description": "Name of the VpnTunnel resource to delete.", @@ -24761,6 +29369,11 @@ "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" } }, "parameterOrder": [ @@ -24791,11 +29404,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -24836,6 +29448,55 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "setLabels": { + "id": "compute.vpnTunnels.setLabels", + "path": "{project}/regions/{region}/vpnTunnels/{resource}/setLabels", + "httpMethod": "POST", + "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling or Tagging Resources documentation.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "resource" + ], + "request": { + "$ref": "RegionSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "testIamPermissions": { "id": "compute.vpnTunnels.testIamPermissions", "path": "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions", @@ -24978,11 +29639,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -25074,11 +29734,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { diff --git a/etc/api/compute/beta/compute-api.json b/etc/api/compute/beta/compute-api.json index cb83728e12..fd0fe034c1 100644 --- a/etc/api/compute/beta/compute-api.json +++ b/etc/api/compute/beta/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/W53MDz4wFFhI7YEGcKxK5fiKMY8\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/HQXgZmEmQzzaH47rZdB_hEzs91Q\"", "discoveryVersion": "v1", "id": "compute:beta", "name": "compute", "version": "beta", - "revision": "20161123", + "revision": "20170426", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -91,6 +91,213 @@ } }, "schemas": { + "AcceleratorConfig": { + "id": "AcceleratorConfig", + "type": "object", + "description": "A specification of the type and number of accelerator cards attached to the instance.", + "properties": { + "acceleratorCount": { + "type": "integer", + "description": "The number of the guest accelerator cards exposed to this instance.", + "format": "int32" + }, + "acceleratorType": { + "type": "string", + "description": "Full or partial URL of the accelerator type resource to expose to this instance." + } + } + }, + "AcceleratorType": { + "id": "AcceleratorType", + "type": "object", + "description": "An Accelerator Type resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "deprecated": { + "$ref": "DeprecationStatus", + "description": "[Output Only] The deprecation status associated with this accelerator type." + }, + "description": { + "type": "string", + "description": "[Output Only] An optional textual description of the resource." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] The type of the resource. Always compute#acceleratorType for accelerator types.", + "default": "compute#acceleratorType" + }, + "maximumCardsPerInstance": { + "type": "integer", + "description": "[Output Only] Maximum accelerator cards allowed per instance.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "[Output Only] Name of the resource.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined fully-qualified URL for this resource." + }, + "zone": { + "type": "string", + "description": "[Output Only] The name of the zone where the accelerator type resides, such as us-central1-a." + } + } + }, + "AcceleratorTypeAggregatedList": { + "id": "AcceleratorTypeAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "object", + "description": "[Output Only] A map of scoped accelerator type lists.", + "additionalProperties": { + "$ref": "AcceleratorTypesScopedList", + "description": "[Output Only] Name of the scope containing this set of accelerator types." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#acceleratorTypeAggregatedList for aggregated lists of accelerator types.", + "default": "compute#acceleratorTypeAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "AcceleratorTypeList": { + "id": "AcceleratorTypeList", + "type": "object", + "description": "Contains a list of accelerator types.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of AcceleratorType resources.", + "items": { + "$ref": "AcceleratorType" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#acceleratorTypeList for lists of accelerator types.", + "default": "compute#acceleratorTypeList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] A token used to continue a truncated list request." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "AcceleratorTypesScopedList": { + "id": "AcceleratorTypesScopedList", + "type": "object", + "properties": { + "acceleratorTypes": { + "type": "array", + "description": "[Output Only] List of accelerator types contained in this scope.", + "items": { + "$ref": "AcceleratorType" + } + }, + "warning": { + "type": "object", + "description": "[Output Only] An informational warning that appears when the accelerator types list is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, "AccessConfig": { "id": "AccessConfig", "type": "object", @@ -103,7 +310,7 @@ }, "name": { "type": "string", - "description": "Name of this access configuration." + "description": "The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access." }, "natIP": { "type": "string", @@ -144,6 +351,20 @@ "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64" }, + "ipVersion": { + "type": "string", + "description": "The IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", + "enum": [ + "IPV4", + "IPV6", + "UNSPECIFIED_VERSION" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, "kind": { "type": "string", "description": "[Output Only] Type of the resource. Always compute#address for addresses.", @@ -282,6 +503,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -302,6 +524,7 @@ "", "", "", + "", "" ] }, @@ -330,6 +553,21 @@ } } }, + "AliasIpRange": { + "id": "AliasIpRange", + "type": "object", + "description": "An alias IP range attached to an instance's network interface.", + "properties": { + "ipCidrRange": { + "type": "string", + "description": "The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24)." + }, + "subnetworkRangeName": { + "type": "string", + "description": "Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used." + } + } + }, "AttachedDisk": { "id": "AttachedDisk", "type": "object", @@ -410,12 +648,7 @@ "enumDescriptions": [ "", "" - ], - "annotations": { - "required": [ - "compute.instances.insert" - ] - } + ] } } }, @@ -462,36 +695,36 @@ "AuditConfig": { "id": "AuditConfig", "type": "object", - "description": "Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types.", + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:bar@gmail.com\" ] } ] } ] }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.", "properties": { "auditLogConfigs": { "type": "array", - "description": "The configuration for each type of logging", + "description": "The configuration for logging of each type of permission.", "items": { "$ref": "AuditLogConfig" } }, "exemptedMembers": { "type": "array", - "description": "Specifies the identities that are exempted from \"data access\" audit logging for the `service` specified above. Follows the same format of Binding.members.", + "description": "", "items": { "type": "string" } }, "service": { "type": "string", - "description": "Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services." + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services." } } }, "AuditLogConfig": { "id": "AuditLogConfig", "type": "object", - "description": "Provides the configuration for a sub-type of logging.", + "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.", "properties": { "exemptedMembers": { "type": "array", - "description": "Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members.", + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].", "items": { "type": "string" } @@ -730,6 +963,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -750,6 +984,7 @@ "", "", "", + "", "" ] }, @@ -834,11 +1069,11 @@ "properties": { "metric": { "type": "string", - "description": "The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.\n\nFor example, the following is a valid metric:\ncompute.googleapis.com/instance/network/received_bytes_count\nThe following is not a valid metric because it does not increase or decrease based on usage:\ncompute.googleapis.com/instance/cpu/reserved_cores" + "description": "The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.\n\nThe metric must have a value type of INT64 or DOUBLE." }, "utilizationTarget": { "type": "number", - "description": "Target value of the metric which autoscaler should maintain. Must be a positive value.", + "description": "The target value of the metric that autoscaler should maintain. This must be a positive value.\n\nFor example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.", "format": "double" }, "utilizationTargetType": { @@ -918,7 +1153,7 @@ }, "maxRatePerInstance": { "type": "number", - "description": "The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", "format": "float" }, "maxUtilization": { @@ -1018,6 +1253,10 @@ "$ref": "Backend" } }, + "cdnPolicy": { + "$ref": "BackendServiceCdnPolicy", + "description": "Cloud CDN configuration for this BackendService." + }, "connectionDraining": { "$ref": "ConnectionDraining" }, @@ -1087,7 +1326,7 @@ }, "protocol": { "type": "string", - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", + "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", "enum": [ "HTTP", "HTTPS", @@ -1168,6 +1407,17 @@ } } }, + "BackendServiceCdnPolicy": { + "id": "BackendServiceCdnPolicy", + "type": "object", + "description": "Message containing Cloud CDN configuration for a backend service.", + "properties": { + "cacheKeyPolicy": { + "$ref": "CacheKeyPolicy", + "description": "The CacheKeyPolicy for this CdnPolicy." + } + } + }, "BackendServiceGroupHealth": { "id": "BackendServiceGroupHealth", "type": "object", @@ -1188,7 +1438,7 @@ "BackendServiceIAP": { "id": "BackendServiceIAP", "type": "object", - "description": "Identity-Aware Proxy (Cloud Gatekeeper)", + "description": "Identity-Aware Proxy", "properties": { "enabled": { "type": "boolean" @@ -1200,7 +1450,8 @@ "type": "string" }, "oauth2ClientSecretSha256": { - "type": "string" + "type": "string", + "description": "[Output Only] SHA256 hash value for the field oauth2_client_secret above." } } }, @@ -1227,7 +1478,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] A token used to continue a truncated list request." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -1267,6 +1518,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -1287,6 +1539,7 @@ "", "", "", + "", "" ] }, @@ -1346,6 +1599,270 @@ } } }, + "CacheKeyPolicy": { + "id": "CacheKeyPolicy", + "type": "object", + "description": "Message containing what to include in the cache key for a request for Cloud CDN.", + "properties": { + "includeHost": { + "type": "boolean", + "description": "If true, requests to different hosts will be cached separately." + }, + "includeProtocol": { + "type": "boolean", + "description": "If true, http and https requests will be cached separately." + }, + "includeQueryString": { + "type": "boolean", + "description": "If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely." + }, + "queryStringBlacklist": { + "type": "array", + "description": "Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", + "items": { + "type": "string" + } + }, + "queryStringWhitelist": { + "type": "array", + "description": "Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", + "items": { + "type": "string" + } + } + } + }, + "Commitment": { + "id": "Commitment", + "type": "object", + "description": "A usage-commitment with a start / end time. Users create commitments for particular resources (e.g. memory). Actual usage is first deducted from available commitments made prior, perhaps at a reduced price (as laid out in the commitment).", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "endTimestamp": { + "type": "string", + "description": "[Output Only] Commitment end time in RFC3339 text format." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#commitment for commitments.", + "default": "compute#commitment" + }, + "name": { + "type": "string", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "plan": { + "type": "string", + "description": "The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).", + "enum": [ + "INVALID", + "THIRTY_SIX_MONTH", + "TWELVE_MONTH" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, + "region": { + "type": "string", + "description": "[Output Only] URL of the region where this commitment may be used." + }, + "resources": { + "type": "array", + "description": "List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.", + "items": { + "$ref": "ResourceCommitment" + } + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + }, + "startTimestamp": { + "type": "string", + "description": "[Output Only] Commitment start time in RFC3339 text format." + }, + "status": { + "type": "string", + "description": "[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end-date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.", + "enum": [ + "ACTIVE", + "CREATING", + "EXPIRED", + "NOT_YET_ACTIVE" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, + "statusMessage": { + "type": "string", + "description": "[Output Only] An optional, human-readable explanation of the status." + } + } + }, + "CommitmentAggregatedList": { + "id": "CommitmentAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "object", + "description": "Commitments by scope.", + "additionalProperties": { + "$ref": "CommitmentsScopedList", + "description": "[Output Only] Name of the scope containing this set of commitments." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#commitmentAggregatedList for aggregated lists of commitments.", + "default": "compute#commitmentAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "CommitmentList": { + "id": "CommitmentList", + "type": "object", + "description": "Contains a list of Commitment resources.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "A list of Commitment resources.", + "items": { + "$ref": "Commitment" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#commitmentList for lists of commitments.", + "default": "compute#commitmentList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "CommitmentsScopedList": { + "id": "CommitmentsScopedList", + "type": "object", + "properties": { + "commitments": { + "type": "array", + "description": "[Output Only] List of commitments contained in this scope.", + "items": { + "$ref": "Commitment" + } + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning which replaces the list of commitments when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, "Condition": { "id": "Condition", "type": "object", @@ -1355,12 +1872,16 @@ "type": "string", "description": "Trusted attributes supplied by the IAM system.", "enum": [ + "APPROVER", "ATTRIBUTION", "AUTHORITY", + "JUSTIFICATION_TYPE", "NO_ATTR", "SECURITY_REALM" ], "enumDescriptions": [ + "", + "", "", "", "", @@ -1538,7 +2059,7 @@ }, "labels": { "type": "object", - "description": "Labels to apply to this disk. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to this disk. These can be later modified by the setLabels method.", "additionalProperties": { "type": "string" } @@ -1673,7 +2194,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. Acceptable values are 0 to 500, inclusive. (Default: 500)" }, "selfLink": { "type": "string", @@ -1688,11 +2209,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of persistent disks.", + "description": "A list of Disk resources.", "items": { "$ref": "Disk" } @@ -1704,7 +2225,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + "description": "This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -1871,6 +2392,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -1891,6 +2413,7 @@ "", "", "", + "", "" ] }, @@ -1962,6 +2485,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -1982,6 +2506,7 @@ "", "", "", + "", "" ] }, @@ -2039,10 +2564,49 @@ "type": "string", "description": "[Output Only] Creation timestamp in RFC3339 text format." }, + "denied": { + "type": "array", + "description": "The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.", + "items": { + "type": "object", + "properties": { + "IPProtocol": { + "type": "string", + "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number." + }, + "ports": { + "type": "array", + "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", + "items": { + "type": "string" + } + } + } + } + }, "description": { "type": "string", "description": "An optional description of this resource. Provide this property when you create the resource." }, + "destinationRanges": { + "type": "array", + "description": "If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", + "items": { + "type": "string" + } + }, + "direction": { + "type": "string", + "description": "Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.", + "enum": [ + "EGRESS", + "INGRESS" + ], + "enumDescriptions": [ + "", + "" + ] + }, "id": { "type": "string", "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", @@ -2050,7 +2614,7 @@ }, "kind": { "type": "string", - "description": "[Output Ony] Type of the resource. Always compute#firewall for firewall rules.", + "description": "[Output Only] Type of the resource. Always compute#firewall for firewall rules.", "default": "compute#firewall" }, "name": { @@ -2068,13 +2632,18 @@ "type": "string", "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default" }, + "priority": { + "type": "integer", + "description": "Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.", + "format": "int32" + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." }, "sourceRanges": { "type": "array", - "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", + "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.", "items": { "type": "string" } @@ -2129,15 +2698,15 @@ "ForwardingRule": { "id": "ForwardingRule", "type": "object", - "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, portRange] tuple.", + "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple.", "properties": { "IPAddress": { "type": "string", - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nFor global forwarding rules, the address must be a global IP; for regional forwarding rules, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IP from the same scope (global or regional) will be assigned.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule." + "description": "The IP address that this forwarding rule is serving on behalf of.\n\nFor global forwarding rules, the address must be a global IP. For regional forwarding rules, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IP from the same scope (global or regional) will be assigned.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule. Only IPv4 is supported." }, "IPProtocol": { "type": "string", - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL\u003c/code, only TCP and UDP are valid.", + "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL, only TCP and UDP are valid.", "enum": [ "AH", "ESP", @@ -2172,6 +2741,20 @@ "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64" }, + "ipVersion": { + "type": "string", + "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule.", + "enum": [ + "IPV4", + "IPV6", + "UNSPECIFIED_VERSION" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, "kind": { "type": "string", "description": "[Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.", @@ -2179,7 +2762,7 @@ }, "loadBalancingScheme": { "type": "string", - "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", + "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", "enum": [ "EXTERNAL", "INTERNAL", @@ -2202,11 +2785,11 @@ }, "portRange": { "type": "string", - "description": "Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nThis field is not used for internal load balancing." + "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetSslProxy: 443 \n- TargetVpnGateway: 500, 4500\n-" }, "ports": { "type": "array", - "description": "This field is not used for external load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. If the port list is not provided then all ports are allowed to pass through.\n\nYou may specify a maximum of up to 5 ports.", + "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.", "items": { "type": "string" } @@ -2219,13 +2802,22 @@ "type": "string", "description": "[Output Only] Server-defined URL for the resource." }, + "serviceLabel": { + "type": "string", + "description": "An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "serviceName": { + "type": "string", + "description": "[Output Only] The internal fully qualified service name for this Forwarding Rule.\n\nThis field is only used for internal load balancing." + }, "subnetwork": { "type": "string", "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule.\n\nIf the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified." }, "target": { "type": "string", - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global TargetHttpProxy or TargetHttpsProxy resource. The forwarded traffic must be of a type appropriate to the target object. For example, TargetHttpProxy requires HTTP traffic, and TargetHttpsProxy requires HTTPS traffic.\n\nThis field is not used for internal load balancing." + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object.\n\nThis field is not used for internal load balancing." } } }, @@ -2323,6 +2915,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -2343,6 +2936,7 @@ "", "", "", + "", "" ] }, @@ -2399,10 +2993,12 @@ "description": "The type of supported feature. Currenty only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", "enum": [ "FEATURE_TYPE_UNSPECIFIED", + "MULTI_IP_SUBNET", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS" ], "enumDescriptions": [ + "", "", "", "" @@ -2420,7 +3016,7 @@ }, "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80.", + "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -2455,7 +3051,7 @@ }, "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443.", + "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -2892,7 +3488,7 @@ }, "guestOsFeatures": { "type": "array", - "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSCI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSCI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSCI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", "items": { "$ref": "GuestOsFeature" } @@ -2918,7 +3514,7 @@ }, "labels": { "type": "object", - "description": "Labels to apply to this image. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to this image. These can be later modified by the setLabels method.", "additionalProperties": { "type": "string" } @@ -3072,6 +3668,13 @@ "$ref": "AttachedDisk" } }, + "guestAccelerators": { + "type": "array", + "description": "List of the type and count of accelerator cards attached to the instance.", + "items": { + "$ref": "AcceleratorConfig" + } + }, "id": { "type": "string", "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", @@ -3089,7 +3692,7 @@ }, "labels": { "type": "object", - "description": "Labels to apply to this instance. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to this instance. These can be later modified by the setLabels method.", "additionalProperties": { "type": "string" } @@ -3109,7 +3712,13 @@ }, "name": { "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." + "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.instances.insert" + ] + } }, "networkInterfaces": { "type": "array", @@ -3120,7 +3729,7 @@ }, "scheduling": { "$ref": "Scheduling", - "description": "Scheduling options for this instance." + "description": "Sets the scheduling options for this instance." }, "selfLink": { "type": "string", @@ -3128,7 +3737,7 @@ }, "serviceAccounts": { "type": "array", - "description": "A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.", + "description": "A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.\n\nService accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.", "items": { "$ref": "ServiceAccount" } @@ -3585,7 +4194,7 @@ "properties": { "instances": { "type": "array", - "description": "The URL for one or more instances to abandon from the managed instance group.", + "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -3598,7 +4207,7 @@ "properties": { "instances": { "type": "array", - "description": "The list of instances to delete from this managed instance group. Specify one or more instance URLs.", + "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -3615,6 +4224,10 @@ "items": { "$ref": "ManagedInstance" } + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." } } }, @@ -3624,7 +4237,7 @@ "properties": { "instances": { "type": "array", - "description": "The URL for one or more instances to recreate.", + "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -3678,6 +4291,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -3698,6 +4312,7 @@ "", "", "", + "", "" ] }, @@ -3872,6 +4487,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -3892,6 +4508,7 @@ "", "", "", + "", "" ] }, @@ -3969,6 +4586,37 @@ } } }, + "InstanceListReferrers": { + "id": "InstanceListReferrers", + "type": "object", + "description": "Contains a list of instance referrers.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of referrers.", + "items": { + "$ref": "Reference" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.", + "default": "compute#instanceListReferrers" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, "InstanceMoveRequest": { "id": "InstanceMoveRequest", "type": "object", @@ -4003,9 +4651,16 @@ "$ref": "AttachedDisk" } }, + "guestAccelerators": { + "type": "array", + "description": "A list of guest accelerator cards' type and count to use for instances created from the instance template.", + "items": { + "$ref": "AcceleratorConfig" + } + }, "labels": { "type": "object", - "description": "Labels to apply to instances that are created from this template. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to instances that are created from this template.", "additionalProperties": { "type": "string" } @@ -4204,6 +4859,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -4224,6 +4880,7 @@ "", "", "", + "", "" ] }, @@ -4263,13 +4920,25 @@ }, "labels": { "type": "object", - "description": "A list of labels to apply for this instance. Changing instance labels will also change the instance tags.\n\nEach label key & value must comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", "additionalProperties": { "type": "string" } } } }, + "InstancesSetMachineResourcesRequest": { + "id": "InstancesSetMachineResourcesRequest", + "type": "object", + "properties": { + "guestAccelerators": { + "type": "array", + "description": "List of the type and count of accelerator cards attached to the instance.", + "items": { + "$ref": "AcceleratorConfig" + } + } + } + }, "InstancesSetMachineTypeRequest": { "id": "InstancesSetMachineTypeRequest", "type": "object", @@ -4526,6 +5195,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -4546,6 +5216,7 @@ "", "", "", + "", "" ] }, @@ -4638,6 +5309,10 @@ "lastAttempt": { "$ref": "ManagedInstanceLastAttempt", "description": "[Output Only] Information about the last attempt to create or delete the instance." + }, + "version": { + "$ref": "ManagedInstanceVersion", + "description": "[Output Only] Intended version of this instance." } } }, @@ -4674,6 +5349,20 @@ } } }, + "ManagedInstanceVersion": { + "id": "ManagedInstanceVersion", + "type": "object", + "properties": { + "instanceTemplate": { + "type": "string", + "description": "[Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }." + }, + "name": { + "type": "string", + "description": "[Output Only] Name of the version." + } + } + }, "Metadata": { "id": "Metadata", "type": "object", @@ -4784,6 +5473,13 @@ ] } }, + "peerings": { + "type": "array", + "description": "[Output Only] List of network peerings for the resource.", + "items": { + "$ref": "NetworkPeering" + } + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -4809,18 +5505,25 @@ "$ref": "AccessConfig" } }, + "aliasIpRanges": { + "type": "array", + "description": "An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.", + "items": { + "$ref": "AliasIpRange" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", + "default": "compute#networkInterface" + }, "name": { "type": "string", "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc." }, "network": { "type": "string", - "description": "URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:\n\nglobal/networks/default \n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } + "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nThis field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default" }, "networkIP": { "type": "string", @@ -4863,6 +5566,69 @@ } } }, + "NetworkPeering": { + "id": "NetworkPeering", + "type": "object", + "description": "A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.", + "properties": { + "autoCreateRoutes": { + "type": "boolean", + "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network." + }, + "name": { + "type": "string", + "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." + }, + "network": { + "type": "string", + "description": "The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network." + }, + "state": { + "type": "string", + "description": "[Output Only] State for the peering.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "stateDetails": { + "type": "string", + "description": "[Output Only] Details about the current state of the peering." + } + } + }, + "NetworksAddPeeringRequest": { + "id": "NetworksAddPeeringRequest", + "type": "object", + "properties": { + "autoCreateRoutes": { + "type": "boolean", + "description": "Whether Google Compute Engine manages the routes automatically." + }, + "name": { + "type": "string", + "description": "Name of the peering, which should conform to RFC1035." + }, + "peerNetwork": { + "type": "string", + "description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network." + } + } + }, + "NetworksRemovePeeringRequest": { + "id": "NetworksRemovePeeringRequest", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the peering, which should conform to RFC1035." + } + } + }, "Operation": { "id": "Operation", "type": "object", @@ -4874,7 +5640,7 @@ }, "creationTimestamp": { "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." + "description": "[Deprecated] This field is deprecated." }, "description": { "type": "string", @@ -5013,6 +5779,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -5033,6 +5800,7 @@ "", "", "", + "", "" ] }, @@ -5160,6 +5928,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -5180,6 +5949,7 @@ "", "", "", + "", "" ] }, @@ -5259,7 +6029,7 @@ "properties": { "auditConfigs": { "type": "array", - "description": "Specifies audit logging configs for \"data access\". \"data access\": generally refers to data reads/writes and admin reads. \"admin activity\": generally refers to admin writes.\n\nNote: `AuditConfig` doesn't apply to \"admin activity\", which always enables audit logging.", + "description": "Specifies cloud audit logging configuration for this policy.", "items": { "$ref": "AuditConfig" } @@ -5365,6 +6135,48 @@ } } }, + "ProjectsDisableXpnResourceRequest": { + "id": "ProjectsDisableXpnResourceRequest", + "type": "object", + "properties": { + "xpnResource": { + "$ref": "XpnResourceId", + "description": "XPN resource ID." + } + } + }, + "ProjectsEnableXpnResourceRequest": { + "id": "ProjectsEnableXpnResourceRequest", + "type": "object", + "properties": { + "xpnResource": { + "$ref": "XpnResourceId", + "description": "XPN resource ID." + } + } + }, + "ProjectsGetXpnResources": { + "id": "ProjectsGetXpnResources", + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of XPN resources.", + "default": "compute#projectsGetXpnResources" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "resources": { + "type": "array", + "description": "XPN resources attached to this project as their XPN host.", + "items": { + "$ref": "XpnResourceId" + } + } + } + }, "ProjectsListXpnHostsRequest": { "id": "ProjectsListXpnHostsRequest", "type": "object", @@ -5392,7 +6204,9 @@ "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", + "COMMITMENTS", "CPUS", + "CPUS_ALL_REGIONS", "DISKS_TOTAL_GB", "FIREWALLS", "FORWARDING_RULES", @@ -5405,6 +6219,7 @@ "IN_USE_ADDRESSES", "LOCAL_SSD_TOTAL_GB", "NETWORKS", + "NVIDIA_K80_GPUS", "PREEMPTIBLE_CPUS", "REGIONAL_AUTOSCALERS", "REGIONAL_INSTANCE_GROUP_MANAGERS", @@ -5421,7 +6236,6 @@ "TARGET_POOLS", "TARGET_SSL_PROXIES", "TARGET_VPN_GATEWAYS", - "TOTAL_CPUS", "URL_MAPS", "VPN_TUNNELS" ], @@ -5460,6 +6274,8 @@ "", "", "", + "", + "", "" ] }, @@ -5470,6 +6286,30 @@ } } }, + "Reference": { + "id": "Reference", + "type": "object", + "description": "Represents a reference to a resource.", + "properties": { + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#reference for references.", + "default": "compute#reference" + }, + "referenceType": { + "type": "string", + "description": "A description of the reference type with no implied semantics. Possible values include: \n- MEMBER_OF" + }, + "referrer": { + "type": "string", + "description": "URL of the resource which refers to the target." + }, + "target": { + "type": "string", + "description": "URL of the resource to which this reference points." + } + } + }, "Region": { "id": "Region", "type": "object", @@ -5632,7 +6472,7 @@ "properties": { "instances": { "type": "array", - "description": "The names of one or more instances to abandon.", + "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -5645,7 +6485,7 @@ "properties": { "instances": { "type": "array", - "description": "The names of one or more instances to delete.", + "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -5662,6 +6502,10 @@ "items": { "$ref": "ManagedInstance" } + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." } } }, @@ -5671,7 +6515,7 @@ "properties": { "instances": { "type": "array", - "description": "The URL for one or more instances to recreate.", + "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -5820,6 +6664,32 @@ } } }, + "ResourceCommitment": { + "id": "ResourceCommitment", + "type": "object", + "description": "Commitment for a particular resource (a Commitment is composed of one or more of these).", + "properties": { + "amount": { + "type": "string", + "description": "The amount of the resource purchased (in a type-dependent unit, such as bytes).", + "format": "int64" + }, + "type": { + "type": "string", + "description": "Type of resource for which this commitment applies.", + "enum": [ + "MEMORY", + "UNSPECIFIED", + "VCPU" + ], + "enumDescriptions": [ + "", + "", + "" + ] + } + } + }, "ResourceGroupReference": { "id": "ResourceGroupReference", "type": "object", @@ -5833,7 +6703,7 @@ "Route": { "id": "Route", "type": "object", - "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving a instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, a instance gateway or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", + "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving a instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", "properties": { "creationTimestamp": { "type": "string", @@ -5845,7 +6715,7 @@ }, "destRange": { "type": "string", - "description": "The destination range of outgoing packets that this route applies to.", + "description": "The destination range of outgoing packets that this route applies to. Only IPv4 is supported.", "annotations": { "required": [ "compute.routes.insert" @@ -5891,12 +6761,16 @@ }, "nextHopIp": { "type": "string", - "description": "The network IP address of an instance that should handle matching packets." + "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported." }, "nextHopNetwork": { "type": "string", "description": "The URL of the local network if it should handle matching packets." }, + "nextHopPeering": { + "type": "string", + "description": "[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035." + }, "nextHopVpnTunnel": { "type": "string", "description": "The URL to a VpnTunnel that should handle matching packets." @@ -5950,6 +6824,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -5970,6 +6845,7 @@ "", "", "", + "", "" ] }, @@ -6158,7 +7034,7 @@ }, "ipAddress": { "type": "string", - "description": "IP address of the interface inside Google Cloud Platform." + "description": "IP address of the interface inside Google Cloud Platform. Only IPv4 is supported." }, "name": { "type": "string", @@ -6172,7 +7048,7 @@ }, "peerIpAddress": { "type": "string", - "description": "IP address of the BGP interface outside Google cloud." + "description": "IP address of the BGP interface outside Google cloud. Only IPv4 is supported." } } }, @@ -6186,7 +7062,7 @@ }, "linkedVpnTunnel": { "type": "string", - "description": "URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource." + "description": "URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." }, "name": { "type": "string", @@ -6237,6 +7113,13 @@ "$ref": "Route" } }, + "bestRoutesForRouter": { + "type": "array", + "description": "Best routes learned by this router.", + "items": { + "$ref": "Route" + } + }, "bgpPeerStatus": { "type": "array", "items": { @@ -6365,6 +7248,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -6385,6 +7269,7 @@ "", "", "", + "", "" ] }, @@ -6485,7 +7370,7 @@ "properties": { "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443.", + "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -6521,7 +7406,7 @@ "properties": { "automaticRestart": { "type": "boolean", - "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted." + "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.\n\nBy default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine." }, "onHostMaintenance": { "type": "string", @@ -6537,7 +7422,7 @@ }, "preemptible": { "type": "boolean", - "description": "Whether the instance is preemptible." + "description": "Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created." } } }, @@ -6566,7 +7451,7 @@ }, "start": { "type": "string", - "description": "[Output Only] The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.", + "description": "The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.", "format": "int64" } } @@ -6624,7 +7509,7 @@ }, "labels": { "type": "object", - "description": "Labels to apply to this snapshot. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", + "description": "Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.", "additionalProperties": { "type": "string" } @@ -6826,7 +7711,7 @@ }, "ipCidrRange": { "type": "string", - "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network." + "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported." }, "kind": { "type": "string", @@ -6842,10 +7727,21 @@ "type": "string", "description": "The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks." }, + "privateIpGoogleAccess": { + "type": "boolean", + "description": "Whether the VMs in this subnet can access Google services without assigned external IP addresses." + }, "region": { "type": "string", "description": "URL of the region where the Subnetwork resides." }, + "secondaryIpRanges": { + "type": "array", + "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges.", + "items": { + "$ref": "SubnetworkSecondaryRange" + } + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -6914,6 +7810,21 @@ } } }, + "SubnetworkSecondaryRange": { + "id": "SubnetworkSecondaryRange", + "type": "object", + "description": "Represents a secondary IP range of a subnetwork.", + "properties": { + "ipCidrRange": { + "type": "string", + "description": "The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported." + }, + "rangeName": { + "type": "string", + "description": "The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork." + } + } + }, "SubnetworksExpandIpCidrRangeRequest": { "id": "SubnetworksExpandIpCidrRangeRequest", "type": "object", @@ -6956,6 +7867,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -6976,6 +7888,7 @@ "", "", "", + "", "" ] }, @@ -7004,13 +7917,22 @@ } } }, + "SubnetworksSetPrivateIpGoogleAccessRequest": { + "id": "SubnetworksSetPrivateIpGoogleAccessRequest", + "type": "object", + "properties": { + "privateIpGoogleAccess": { + "type": "boolean" + } + } + }, "TCPHealthCheck": { "id": "TCPHealthCheck", "type": "object", "properties": { "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80.", + "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -7362,6 +8284,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -7382,6 +8305,7 @@ "", "", "", + "", "" ] }, @@ -7413,7 +8337,7 @@ "TargetPool": { "id": "TargetPool", "type": "object", - "description": "A TargetPool resource. This resource defines a pool of instances, associated HttpHealthCheck resources, and the fallback target pool.", + "description": "A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool.", "properties": { "backupPool": { "type": "string", @@ -7434,7 +8358,7 @@ }, "healthChecks": { "type": "array", - "description": "A list of URLs to the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if all specified health checks pass. An empty list means all member instances will be considered healthy at all times.", + "description": "The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.", "items": { "type": "string" } @@ -7574,7 +8498,7 @@ "properties": { "healthChecks": { "type": "array", - "description": "A list of HttpHealthCheck resources to add to the target pool.", + "description": "The HttpHealthCheck to add to the target pool.", "items": { "$ref": "HealthCheckReference" } @@ -7652,6 +8576,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -7672,6 +8597,7 @@ "", "", "", + "", "" ] }, @@ -7838,6 +8764,115 @@ } } }, + "TargetTcpProxiesSetBackendServiceRequest": { + "id": "TargetTcpProxiesSetBackendServiceRequest", + "type": "object", + "properties": { + "service": { + "type": "string", + "description": "The URL of the new BackendService resource for the targetTcpProxy." + } + } + }, + "TargetTcpProxiesSetProxyHeaderRequest": { + "id": "TargetTcpProxiesSetProxyHeaderRequest", + "type": "object", + "properties": { + "proxyHeader": { + "type": "string", + "description": "The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed.", + "enum": [ + "NONE", + "PROXY_V1" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, + "TargetTcpProxy": { + "id": "TargetTcpProxy", + "type": "object", + "description": "A TargetTcpProxy resource. This resource defines a TCP proxy.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#targetTcpProxy for target TCP proxies.", + "default": "compute#targetTcpProxy" + }, + "name": { + "type": "string", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "proxyHeader": { + "type": "string", + "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", + "enum": [ + "NONE", + "PROXY_V1" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + }, + "service": { + "type": "string", + "description": "URL to the BackendService resource." + } + } + }, + "TargetTcpProxyList": { + "id": "TargetTcpProxyList", + "type": "object", + "description": "Contains a list of TargetTcpProxy resources.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "A list of TargetTcpProxy resources.", + "items": { + "$ref": "TargetTcpProxy" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#targetTcpProxyList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, "TargetVpnGateway": { "id": "TargetVpnGateway", "type": "object", @@ -8014,6 +9049,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -8034,6 +9070,7 @@ "", "", "", + "", "" ] }, @@ -8112,7 +9149,7 @@ "properties": { "port": { "type": "integer", - "description": "The UDP port number for the health check request.", + "description": "The UDP port number for the health check request. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -8350,7 +9387,7 @@ }, "localTrafficSelector": { "type": "array", - "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint.", + "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", "items": { "type": "string" } @@ -8367,7 +9404,7 @@ }, "peerIp": { "type": "string", - "description": "IP address of the peer VPN gateway." + "description": "IP address of the peer VPN gateway. Only IPv4 is supported." }, "region": { "type": "string", @@ -8375,7 +9412,7 @@ }, "remoteTrafficSelector": { "type": "array", - "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint.", + "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", "items": { "type": "string" } @@ -8533,6 +9570,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -8553,6 +9591,7 @@ "", "", "", + "", "" ] }, @@ -8611,6 +9650,29 @@ } } }, + "XpnResourceId": { + "id": "XpnResourceId", + "type": "object", + "description": "XpnResourceId", + "properties": { + "id": { + "type": "string", + "description": "The ID of the XPN resource. In the case of projects, this field matches the project's name, not the canonical ID." + }, + "type": { + "type": "string", + "description": "The type of the XPN resource.", + "enum": [ + "PROJECT", + "XPN_RESOURCE_TYPE_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, "Zone": { "id": "Zone", "type": "object", @@ -8715,6 +9777,158 @@ } }, "resources": { + "acceleratorTypes": { + "methods": { + "aggregatedList": { + "id": "compute.acceleratorTypes.aggregatedList", + "path": "{project}/aggregated/acceleratorTypes", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of accelerator types.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "AcceleratorTypeAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "get": { + "id": "compute.acceleratorTypes.get", + "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + "httpMethod": "GET", + "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", + "parameters": { + "acceleratorType": { + "type": "string", + "description": "Name of the accelerator type to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "acceleratorType" + ], + "response": { + "$ref": "AcceleratorType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.acceleratorTypes.list", + "path": "{project}/zones/{zone}/acceleratorTypes", + "httpMethod": "GET", + "description": "Retrieves a list of accelerator types available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "AcceleratorTypeList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "addresses": { "methods": { "aggregatedList": { @@ -8730,11 +9944,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -8899,11 +10112,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9006,11 +10218,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9175,11 +10386,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9228,8 +10438,7 @@ "parameters": { "autoscaler": { "type": "string", - "description": "Name of the autoscaler to update.", - "required": true, + "description": "Name of the autoscaler to patch.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "query" }, @@ -9250,8 +10459,7 @@ }, "parameterOrder": [ "project", - "zone", - "autoscaler" + "zone" ], "request": { "$ref": "Autoscaler" @@ -9261,7 +10469,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -9463,11 +10672,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9508,7 +10716,7 @@ "parameters": { "backendBucket": { "type": "string", - "description": "Name of the BackendBucket resource to update.", + "description": "Name of the BackendBucket resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -9533,7 +10741,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "update": { @@ -9589,11 +10798,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9770,11 +10978,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9811,11 +11018,11 @@ "id": "compute.backendServices.patch", "path": "{project}/global/backendServices/{backendService}", "httpMethod": "PATCH", - "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", + "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", "parameters": { "backendService": { "type": "string", - "description": "Name of the BackendService resource to update.", + "description": "Name of the BackendService resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -9840,7 +11047,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -9933,11 +11141,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10025,11 +11232,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10087,11 +11293,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10308,11 +11513,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10598,11 +11802,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10643,7 +11846,7 @@ "parameters": { "firewall": { "type": "string", - "description": "Name of the firewall rule to update.", + "description": "Name of the firewall rule to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -10668,7 +11871,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -10712,7 +11916,7 @@ "id": "compute.firewalls.update", "path": "{project}/global/firewalls/{firewall}", "httpMethod": "PUT", - "description": "Updates the specified firewall rule with the data included in the request.", + "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", "parameters": { "firewall": { "type": "string", @@ -10761,11 +11965,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10930,11 +12133,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11176,11 +12378,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11258,7 +12459,7 @@ "id": "compute.globalForwardingRules.delete", "path": "{project}/global/forwardingRules/{forwardingRule}", "httpMethod": "DELETE", - "description": "Deletes the specified ForwardingRule resource.", + "description": "Deletes the specified GlobalForwardingRule resource.", "parameters": { "forwardingRule": { "type": "string", @@ -11291,7 +12492,7 @@ "id": "compute.globalForwardingRules.get", "path": "{project}/global/forwardingRules/{forwardingRule}", "httpMethod": "GET", - "description": "Returns the specified ForwardingRule resource. Get a list of available forwarding rules by making a list() request.", + "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.", "parameters": { "forwardingRule": { "type": "string", @@ -11325,7 +12526,7 @@ "id": "compute.globalForwardingRules.insert", "path": "{project}/global/forwardingRules", "httpMethod": "POST", - "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", "parameters": { "project": { "type": "string", @@ -11353,7 +12554,7 @@ "id": "compute.globalForwardingRules.list", "path": "{project}/global/forwardingRules", "httpMethod": "GET", - "description": "Retrieves a list of ForwardingRule resources available to the specified project.", + "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", "parameters": { "filter": { "type": "string", @@ -11362,11 +12563,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11403,7 +12603,7 @@ "id": "compute.globalForwardingRules.setTarget", "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", "httpMethod": "POST", - "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", "parameters": { "forwardingRule": { "type": "string", @@ -11489,11 +12689,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11603,11 +12802,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11752,11 +12950,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11797,7 +12994,7 @@ "parameters": { "healthCheck": { "type": "string", - "description": "Name of the HealthCheck resource to update.", + "description": "Name of the HealthCheck resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11822,7 +13019,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -12010,11 +13208,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12055,7 +13252,7 @@ "parameters": { "httpHealthCheck": { "type": "string", - "description": "Name of the HttpHealthCheck resource to update.", + "description": "Name of the HttpHealthCheck resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -12080,7 +13277,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -12268,11 +13466,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12313,7 +13510,7 @@ "parameters": { "httpsHealthCheck": { "type": "string", - "description": "Name of the HttpsHealthCheck resource to update.", + "description": "Name of the HttpsHealthCheck resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -12338,7 +13535,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -12599,11 +13797,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12717,7 +13914,7 @@ "id": "compute.instanceGroupManagers.abandonInstances", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.", + "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -12768,11 +13965,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12848,7 +14044,7 @@ "id": "compute.instanceGroupManagers.deleteInstances", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.", + "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -12930,7 +14126,7 @@ "id": "compute.instanceGroupManagers.insert", "path": "{project}/zones/{zone}/instanceGroupManagers", "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group.", "parameters": { "project": { "type": "string", @@ -12974,11 +14170,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13039,7 +14234,6 @@ "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "order_by": { @@ -13078,11 +14272,54 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "patch": { + "id": "compute.instanceGroupManagers.patch", + "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + "httpMethod": "PATCH", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports patch semantics.", + "parameters": { + "instanceGroupManager": { + "type": "string", + "description": "The name of the instance group manager.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone where you want to create the managed instance group.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instanceGroupManager" + ], + "request": { + "$ref": "InstanceGroupManager" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "recreateInstances": { "id": "compute.instanceGroupManagers.recreateInstances", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.", + "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -13379,6 +14616,48 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "update": { + "id": "compute.instanceGroupManagers.update", + "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + "httpMethod": "PUT", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", + "parameters": { + "instanceGroupManager": { + "type": "string", + "description": "The name of the instance group manager.", + "required": true, + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone where you want to create the managed instance group.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instanceGroupManager" + ], + "request": { + "$ref": "InstanceGroupManager" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -13439,11 +14718,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13603,11 +14881,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13666,11 +14943,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13955,11 +15231,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14097,11 +15372,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14138,7 +15412,7 @@ "id": "compute.instances.attachDisk", "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", "httpMethod": "POST", - "description": "Attaches a Disk resource to an instance.", + "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", "parameters": { "instance": { "type": "string", @@ -14395,7 +15669,7 @@ }, "start": { "type": "string", - "description": "For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value that was returned in the previous call.", + "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.", "format": "int64", "location": "query" }, @@ -14470,11 +15744,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14515,11 +15788,76 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "listReferrers": { + "id": "compute.instances.listReferrers", + "path": "{project}/zones/{zone}/instances/{instance}/referrers", + "httpMethod": "GET", + "description": "Retrieves the list of referrers to instances contained within the specified zone.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "instance": { + "type": "string", + "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.", + "required": true, + "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "response": { + "$ref": "InstanceListReferrers" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "reset": { "id": "compute.instances.reset", "path": "{project}/zones/{zone}/instances/{instance}/reset", "httpMethod": "POST", - "description": "Performs a hard reset on the instance.", + "description": "Performs a reset on the instance. For more information, see Resetting an instance.", "parameters": { "instance": { "type": "string", @@ -14656,6 +15994,50 @@ "https://www.googleapis.com/auth/compute" ] }, + "setMachineResources": { + "id": "compute.instances.setMachineResources", + "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", + "httpMethod": "POST", + "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "InstancesSetMachineResourcesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setMachineType": { "id": "compute.instances.setMachineType", "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", @@ -14792,7 +16174,7 @@ "id": "compute.instances.setServiceAccount", "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount", "httpMethod": "POST", - "description": "Sets the service account on the instance.", + "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", "parameters": { "instance": { "type": "string", @@ -15102,11 +16484,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15194,11 +16575,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15243,6 +16623,42 @@ }, "networks": { "methods": { + "addPeering": { + "id": "compute.networks.addPeering", + "path": "{project}/global/networks/{network}/addPeering", + "httpMethod": "POST", + "description": "Adds a peering to the specified network.", + "parameters": { + "network": { + "type": "string", + "description": "Name of the network resource to add peering to.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "network" + ], + "request": { + "$ref": "NetworksAddPeeringRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "delete": { "id": "compute.networks.delete", "path": "{project}/global/networks/{network}", @@ -15351,11 +16767,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15388,6 +16803,42 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "removePeering": { + "id": "compute.networks.removePeering", + "path": "{project}/global/networks/{network}/removePeering", + "httpMethod": "POST", + "description": "Removes a peering from the specified network.", + "parameters": { + "network": { + "type": "string", + "description": "Name of the network resource to remove peering from.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "network" + ], + "request": { + "$ref": "NetworksRemovePeeringRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "switchToCustomMode": { "id": "compute.networks.switchToCustomMode", "path": "{project}/global/networks/{network}/switchToCustomMode", @@ -15462,6 +16913,112 @@ }, "projects": { "methods": { + "disableXpnHost": { + "id": "compute.projects.disableXpnHost", + "path": "{project}/disableXpnHost", + "httpMethod": "POST", + "description": "Disable this project as an XPN host project.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "disableXpnResource": { + "id": "compute.projects.disableXpnResource", + "path": "{project}/disableXpnResource", + "httpMethod": "POST", + "description": "Disable an XPN resource associated with this host project.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "ProjectsDisableXpnResourceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "enableXpnHost": { + "id": "compute.projects.enableXpnHost", + "path": "{project}/enableXpnHost", + "httpMethod": "POST", + "description": "Enable this project as an XPN host project.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "enableXpnResource": { + "id": "compute.projects.enableXpnResource", + "path": "{project}/enableXpnResource", + "httpMethod": "POST", + "description": "Enable XPN resource (a.k.a service project or service folder in the future) for a host project, so that subnetworks in the host project can be used by instances in the service project or folder.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "ProjectsEnableXpnResourceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "get": { "id": "compute.projects.get", "path": "{project}", @@ -15514,12 +17071,76 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getXpnResources": { + "id": "compute.projects.getXpnResources", + "path": "{project}/getXpnResources", + "httpMethod": "GET", + "description": "Get XPN resources associated with this host project.", + "parameters": { + "filter": { + "type": "string", + "location": "query" + }, + "maxResults": { + "type": "integer", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "order_by": { + "type": "string", + "location": "query" + }, + "pageToken": { + "type": "string", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "ProjectsGetXpnResources" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "listXpnHosts": { "id": "compute.projects.listXpnHosts", "path": "{project}/listXpnHosts", "httpMethod": "POST", "description": "List all XPN host projects visible to the user in an organization.", "parameters": { + "filter": { + "type": "string", + "location": "query" + }, + "maxResults": { + "type": "integer", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "order_by": { + "type": "string", + "location": "query" + }, + "pageToken": { + "type": "string", + "location": "query" + }, "project": { "type": "string", "description": "Project ID for this request.", @@ -15794,11 +17415,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15847,8 +17467,7 @@ "parameters": { "autoscaler": { "type": "string", - "description": "Name of the autoscaler to update.", - "required": true, + "description": "Name of the autoscaler to patch.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "query" }, @@ -15869,8 +17488,7 @@ }, "parameterOrder": [ "project", - "region", - "autoscaler" + "region" ], "request": { "$ref": "Autoscaler" @@ -15880,7 +17498,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -16150,11 +17769,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16203,7 +17821,7 @@ "parameters": { "backendService": { "type": "string", - "description": "Name of the BackendService resource to update.", + "description": "Name of the BackendService resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -16236,7 +17854,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -16330,13 +17949,201 @@ } } }, + "regionCommitments": { + "methods": { + "aggregatedList": { + "id": "compute.regionCommitments.aggregatedList", + "path": "{project}/aggregated/commitments", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of commitments.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "CommitmentAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "get": { + "id": "compute.regionCommitments.get", + "path": "{project}/regions/{region}/commitments/{commitment}", + "httpMethod": "GET", + "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", + "parameters": { + "commitment": { + "type": "string", + "description": "Name of the commitment to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "commitment" + ], + "response": { + "$ref": "Commitment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.regionCommitments.insert", + "path": "{project}/regions/{region}/commitments", + "httpMethod": "POST", + "description": "Creates an commitment in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "Commitment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.regionCommitments.list", + "path": "{project}/regions/{region}/commitments", + "httpMethod": "GET", + "description": "Retrieves a list of commitments contained within the specified region.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "CommitmentList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "regionInstanceGroupManagers": { "methods": { "abandonInstances": { "id": "compute.regionInstanceGroupManagers.abandonInstances", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.", + "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -16417,7 +18224,7 @@ "id": "compute.regionInstanceGroupManagers.deleteInstances", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.", + "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -16499,7 +18306,7 @@ "id": "compute.regionInstanceGroupManagers.insert", "path": "{project}/regions/{region}/instanceGroupManagers", "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", "parameters": { "project": { "type": "string", @@ -16543,11 +18350,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16608,7 +18414,6 @@ "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "order_by": { @@ -16651,7 +18456,7 @@ "id": "compute.regionInstanceGroupManagers.patch", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", "httpMethod": "PATCH", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports patch semantics.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports patch semantics.", "parameters": { "instanceGroupManager": { "type": "string", @@ -16686,14 +18491,15 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "recreateInstances": { "id": "compute.regionInstanceGroupManagers.recreateInstances", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.", + "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -17049,11 +18855,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17112,11 +18917,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17344,11 +19148,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17440,11 +19243,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17494,11 +19296,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17705,11 +19506,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17754,7 +19554,7 @@ "id": "compute.routers.patch", "path": "{project}/regions/{region}/routers/{router}", "httpMethod": "PATCH", - "description": "Updates the specified Router resource with the data included in the request. This method supports patch semantics.", + "description": "Patches the specified Router resource with the data included in the request. This method supports patch semantics.", "parameters": { "project": { "type": "string", @@ -17772,7 +19572,7 @@ }, "router": { "type": "string", - "description": "Name of the Router resource to update.", + "description": "Name of the Router resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -17791,7 +19591,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "preview": { @@ -18040,11 +19841,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18198,11 +19998,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18420,11 +20219,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18511,11 +20309,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18766,11 +20563,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18852,8 +20648,51 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" + ] + }, + "setPrivateIpGoogleAccess": { + "id": "compute.subnetworks.setPrivateIpGoogleAccess", + "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", + "httpMethod": "POST", + "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "subnetwork": { + "type": "string", + "description": "Name of the Subnetwork resource.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "subnetwork" + ], + "request": { + "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" ] }, "testIamPermissions": { @@ -19013,11 +20852,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -19235,11 +21073,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -19398,11 +21235,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -19567,11 +21403,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -19762,11 +21597,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -19976,11 +21810,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20316,11 +22149,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20500,6 +22332,226 @@ } } }, + "targetTcpProxies": { + "methods": { + "delete": { + "id": "compute.targetTcpProxies.delete", + "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", + "httpMethod": "DELETE", + "description": "Deletes the specified TargetTcpProxy resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "targetTcpProxy": { + "type": "string", + "description": "Name of the TargetTcpProxy resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "targetTcpProxy" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.targetTcpProxies.get", + "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", + "httpMethod": "GET", + "description": "Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "targetTcpProxy": { + "type": "string", + "description": "Name of the TargetTcpProxy resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "targetTcpProxy" + ], + "response": { + "$ref": "TargetTcpProxy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.targetTcpProxies.insert", + "path": "{project}/global/targetTcpProxies", + "httpMethod": "POST", + "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "TargetTcpProxy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.targetTcpProxies.list", + "path": "{project}/global/targetTcpProxies", + "httpMethod": "GET", + "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "TargetTcpProxyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setBackendService": { + "id": "compute.targetTcpProxies.setBackendService", + "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", + "httpMethod": "POST", + "description": "Changes the BackendService for TargetTcpProxy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "targetTcpProxy": { + "type": "string", + "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "targetTcpProxy" + ], + "request": { + "$ref": "TargetTcpProxiesSetBackendServiceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setProxyHeader": { + "id": "compute.targetTcpProxies.setProxyHeader", + "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", + "httpMethod": "POST", + "description": "Changes the ProxyHeaderType for TargetTcpProxy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "targetTcpProxy": { + "type": "string", + "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "targetTcpProxy" + ], + "request": { + "$ref": "TargetTcpProxiesSetProxyHeaderRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "targetVpnGateways": { "methods": { "aggregatedList": { @@ -20515,11 +22567,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20684,11 +22735,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20922,11 +22972,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -20963,7 +23012,7 @@ "id": "compute.urlMaps.patch", "path": "{project}/global/urlMaps/{urlMap}", "httpMethod": "PATCH", - "description": "Updates the specified UrlMap resource with the data included in the request. This method supports patch semantics.", + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports patch semantics.", "parameters": { "project": { "type": "string", @@ -20974,7 +23023,7 @@ }, "urlMap": { "type": "string", - "description": "Name of the UrlMap resource to update.", + "description": "Name of the UrlMap resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -20992,7 +23041,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "testIamPermissions": { @@ -21121,11 +23171,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -21290,11 +23339,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -21477,11 +23525,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -21573,11 +23620,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { diff --git a/etc/api/compute/v1/compute-api.json b/etc/api/compute/v1/compute-api.json index 391300e3cf..1821ae26d2 100644 --- a/etc/api/compute/v1/compute-api.json +++ b/etc/api/compute/v1/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/BIPueDp4_YHmOXWnzCh7vT7JOHQ\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/0lLIb0a2O5fm-bLW1ABv4G_BX-0\"", "discoveryVersion": "v1", "id": "compute:v1", "name": "compute", "version": "v1", - "revision": "20161123", + "revision": "20170426", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -103,7 +103,7 @@ }, "name": { "type": "string", - "description": "Name of this access configuration." + "description": "The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access." }, "natIP": { "type": "string", @@ -282,6 +282,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -302,6 +303,7 @@ "", "", "", + "", "" ] }, @@ -410,12 +412,7 @@ "enumDescriptions": [ "", "" - ], - "annotations": { - "required": [ - "compute.instances.insert" - ] - } + ] } } }, @@ -596,6 +593,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -616,6 +614,7 @@ "", "", "", + "", "" ] }, @@ -700,11 +699,11 @@ "properties": { "metric": { "type": "string", - "description": "The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.\n\nFor example, the following is a valid metric:\ncompute.googleapis.com/instance/network/received_bytes_count\nThe following is not a valid metric because it does not increase or decrease based on usage:\ncompute.googleapis.com/instance/cpu/reserved_cores" + "description": "The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.\n\nThe metric must have a value type of INT64 or DOUBLE." }, "utilizationTarget": { "type": "number", - "description": "Target value of the metric which autoscaler should maintain. Must be a positive value.", + "description": "The target value of the metric that autoscaler should maintain. This must be a positive value.\n\nFor example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.", "format": "double" }, "utilizationTargetType": { @@ -784,7 +783,7 @@ }, "maxRatePerInstance": { "type": "number", - "description": "The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", "format": "float" }, "maxUtilization": { @@ -794,6 +793,79 @@ } } }, + "BackendBucket": { + "id": "BackendBucket", + "type": "object", + "description": "A BackendBucket resource. This resource defines a Cloud Storage bucket.", + "properties": { + "bucketName": { + "type": "string", + "description": "Cloud Storage bucket name." + }, + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "enableCdn": { + "type": "boolean", + "description": "If true, enable Cloud CDN for this BackendBucket." + }, + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#backendBucket" + }, + "name": { + "type": "string", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "BackendBucketList": { + "id": "BackendBucketList", + "type": "object", + "description": "Contains a list of BackendBucket resources.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of BackendBucket resources.", + "items": { + "$ref": "BackendBucket" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#backendBucketList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] A token used to continue a truncated list request." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, "BackendService": { "id": "BackendService", "type": "object", @@ -811,6 +883,10 @@ "$ref": "Backend" } }, + "cdnPolicy": { + "$ref": "BackendServiceCdnPolicy", + "description": "Cloud CDN configuration for this BackendService." + }, "connectionDraining": { "$ref": "ConnectionDraining" }, @@ -838,6 +914,9 @@ "type": "string" } }, + "iap": { + "$ref": "BackendServiceIAP" + }, "id": { "type": "string", "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", @@ -877,7 +956,7 @@ }, "protocol": { "type": "string", - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", + "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", "enum": [ "HTTP", "HTTPS", @@ -958,6 +1037,17 @@ } } }, + "BackendServiceCdnPolicy": { + "id": "BackendServiceCdnPolicy", + "type": "object", + "description": "Message containing Cloud CDN configuration for a backend service.", + "properties": { + "cacheKeyPolicy": { + "$ref": "CacheKeyPolicy", + "description": "The CacheKeyPolicy for this CdnPolicy." + } + } + }, "BackendServiceGroupHealth": { "id": "BackendServiceGroupHealth", "type": "object", @@ -975,6 +1065,26 @@ } } }, + "BackendServiceIAP": { + "id": "BackendServiceIAP", + "type": "object", + "description": "Identity-Aware Proxy", + "properties": { + "enabled": { + "type": "boolean" + }, + "oauth2ClientId": { + "type": "string" + }, + "oauth2ClientSecret": { + "type": "string" + }, + "oauth2ClientSecretSha256": { + "type": "string", + "description": "[Output Only] SHA256 hash value for the field oauth2_client_secret above." + } + } + }, "BackendServiceList": { "id": "BackendServiceList", "type": "object", @@ -998,7 +1108,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] A token used to continue a truncated list request." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -1038,6 +1148,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -1058,6 +1169,7 @@ "", "", "", + "", "" ] }, @@ -1099,6 +1211,39 @@ } } }, + "CacheKeyPolicy": { + "id": "CacheKeyPolicy", + "type": "object", + "description": "Message containing what to include in the cache key for a request for Cloud CDN.", + "properties": { + "includeHost": { + "type": "boolean", + "description": "If true, requests to different hosts will be cached separately." + }, + "includeProtocol": { + "type": "boolean", + "description": "If true, http and https requests will be cached separately." + }, + "includeQueryString": { + "type": "boolean", + "description": "If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely." + }, + "queryStringBlacklist": { + "type": "array", + "description": "Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", + "items": { + "type": "string" + } + }, + "queryStringWhitelist": { + "type": "array", + "description": "Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", + "items": { + "type": "string" + } + } + } + }, "ConnectionDraining": { "id": "ConnectionDraining", "type": "object", @@ -1322,7 +1467,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. Acceptable values are 0 to 500, inclusive. (Default: 500)" }, "selfLink": { "type": "string", @@ -1337,11 +1482,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of persistent disks.", + "description": "A list of Disk resources.", "items": { "$ref": "Disk" } @@ -1353,7 +1498,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + "description": "This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -1520,6 +1665,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -1540,6 +1686,7 @@ "", "", "", + "", "" ] }, @@ -1611,6 +1758,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -1631,6 +1779,7 @@ "", "", "", + "", "" ] }, @@ -1699,7 +1848,7 @@ }, "kind": { "type": "string", - "description": "[Output Ony] Type of the resource. Always compute#firewall for firewall rules.", + "description": "[Output Only] Type of the resource. Always compute#firewall for firewall rules.", "default": "compute#firewall" }, "name": { @@ -1723,7 +1872,7 @@ }, "sourceRanges": { "type": "array", - "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", + "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.", "items": { "type": "string" } @@ -1778,18 +1927,19 @@ "ForwardingRule": { "id": "ForwardingRule", "type": "object", - "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, portRange] tuple.", + "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple.", "properties": { "IPAddress": { "type": "string", - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nFor global forwarding rules, the address must be a global IP; for regional forwarding rules, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IP from the same scope (global or regional) will be assigned.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule." + "description": "The IP address that this forwarding rule is serving on behalf of.\n\nFor global forwarding rules, the address must be a global IP. For regional forwarding rules, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IP from the same scope (global or regional) will be assigned.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule. Only IPv4 is supported." }, "IPProtocol": { "type": "string", - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL\u003c/code, only TCP and UDP are valid.", + "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL, only TCP and UDP are valid.", "enum": [ "AH", "ESP", + "ICMP", "SCTP", "TCP", "UDP" @@ -1799,6 +1949,7 @@ "", "", "", + "", "" ] }, @@ -1826,7 +1977,7 @@ }, "loadBalancingScheme": { "type": "string", - "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", + "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", "enum": [ "EXTERNAL", "INTERNAL", @@ -1849,11 +2000,11 @@ }, "portRange": { "type": "string", - "description": "Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nThis field is not used for internal load balancing." + "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetSslProxy: 443 \n- TargetVpnGateway: 500, 4500\n-" }, "ports": { "type": "array", - "description": "This field is not used for external load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. If the port list is not provided then all ports are allowed to pass through.\n\nYou may specify a maximum of up to 5 ports.", + "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.", "items": { "type": "string" } @@ -1872,7 +2023,7 @@ }, "target": { "type": "string", - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global TargetHttpProxy or TargetHttpsProxy resource. The forwarded traffic must be of a type appropriate to the target object. For example, TargetHttpProxy requires HTTP traffic, and TargetHttpsProxy requires HTTPS traffic.\n\nThis field is not used for internal load balancing." + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object.\n\nThis field is not used for internal load balancing." } } }, @@ -1970,6 +2121,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -1990,6 +2142,7 @@ "", "", "", + "", "" ] }, @@ -2049,7 +2202,7 @@ }, "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80.", + "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -2084,7 +2237,7 @@ }, "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443.", + "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -2516,7 +2669,7 @@ }, "guestOsFeatures": { "type": "array", - "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSCI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSCI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSCI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", "items": { "$ref": "GuestOsFeature" } @@ -2709,7 +2862,13 @@ }, "name": { "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." + "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.instances.insert" + ] + } }, "networkInterfaces": { "type": "array", @@ -2720,7 +2879,7 @@ }, "scheduling": { "$ref": "Scheduling", - "description": "Scheduling options for this instance." + "description": "Sets the scheduling options for this instance." }, "selfLink": { "type": "string", @@ -2728,7 +2887,7 @@ }, "serviceAccounts": { "type": "array", - "description": "A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.", + "description": "A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.\n\nService accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.", "items": { "$ref": "ServiceAccount" } @@ -3147,7 +3306,7 @@ "properties": { "instances": { "type": "array", - "description": "The URL for one or more instances to abandon from the managed instance group.", + "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -3160,7 +3319,7 @@ "properties": { "instances": { "type": "array", - "description": "The list of instances to delete from this managed instance group. Specify one or more instance URLs.", + "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -3186,7 +3345,7 @@ "properties": { "instances": { "type": "array", - "description": "The URL for one or more instances to recreate.", + "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -3225,6 +3384,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -3245,6 +3405,7 @@ "", "", "", + "", "" ] }, @@ -3407,6 +3568,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -3427,6 +3589,7 @@ "", "", "", + "", "" ] }, @@ -3732,6 +3895,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -3752,6 +3916,7 @@ "", "", "", + "", "" ] }, @@ -3790,6 +3955,23 @@ } } }, + "InstancesSetServiceAccountRequest": { + "id": "InstancesSetServiceAccountRequest", + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email address of the service account." + }, + "scopes": { + "type": "array", + "description": "The list of scopes to be made available for this service account.", + "items": { + "type": "string" + } + } + } + }, "InstancesStartWithEncryptionKeyRequest": { "id": "InstancesStartWithEncryptionKeyRequest", "type": "object", @@ -4012,6 +4194,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -4032,6 +4215,7 @@ "", "", "", + "", "" ] }, @@ -4295,18 +4479,18 @@ "$ref": "AccessConfig" } }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", + "default": "compute#networkInterface" + }, "name": { "type": "string", "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc." }, "network": { "type": "string", - "description": "URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:\n\nglobal/networks/default \n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } + "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nThis field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default" }, "networkIP": { "type": "string", @@ -4360,7 +4544,7 @@ }, "creationTimestamp": { "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." + "description": "[Deprecated] This field is deprecated." }, "description": { "type": "string", @@ -4499,6 +4683,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -4519,6 +4704,7 @@ "", "", "", + "", "" ] }, @@ -4646,6 +4832,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -4666,6 +4853,7 @@ "", "", "", + "", "" ] }, @@ -4812,8 +5000,10 @@ "description": "[Output Only] Name of the quota metric.", "enum": [ "AUTOSCALERS", + "BACKEND_BUCKETS", "BACKEND_SERVICES", "CPUS", + "CPUS_ALL_REGIONS", "DISKS_TOTAL_GB", "FIREWALLS", "FORWARDING_RULES", @@ -4842,7 +5032,6 @@ "TARGET_POOLS", "TARGET_SSL_PROXIES", "TARGET_VPN_GATEWAYS", - "TOTAL_CPUS", "URL_MAPS", "VPN_TUNNELS" ], @@ -4880,6 +5069,7 @@ "", "", "", + "", "" ] }, @@ -5052,7 +5242,7 @@ "properties": { "instances": { "type": "array", - "description": "The names of one or more instances to abandon.", + "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -5065,7 +5255,7 @@ "properties": { "instances": { "type": "array", - "description": "The names of one or more instances to delete.", + "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -5091,7 +5281,7 @@ "properties": { "instances": { "type": "array", - "description": "The URL for one or more instances to recreate.", + "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" } @@ -5241,7 +5431,7 @@ "Route": { "id": "Route", "type": "object", - "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving a instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, a instance gateway or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", + "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving a instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", "properties": { "creationTimestamp": { "type": "string", @@ -5253,7 +5443,7 @@ }, "destRange": { "type": "string", - "description": "The destination range of outgoing packets that this route applies to.", + "description": "The destination range of outgoing packets that this route applies to. Only IPv4 is supported.", "annotations": { "required": [ "compute.routes.insert" @@ -5299,7 +5489,7 @@ }, "nextHopIp": { "type": "string", - "description": "The network IP address of an instance that should handle matching packets." + "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported." }, "nextHopNetwork": { "type": "string", @@ -5358,6 +5548,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -5378,6 +5569,7 @@ "", "", "", + "", "" ] }, @@ -5566,7 +5758,7 @@ }, "ipAddress": { "type": "string", - "description": "IP address of the interface inside Google Cloud Platform." + "description": "IP address of the interface inside Google Cloud Platform. Only IPv4 is supported." }, "name": { "type": "string", @@ -5580,7 +5772,7 @@ }, "peerIpAddress": { "type": "string", - "description": "IP address of the BGP interface outside Google cloud." + "description": "IP address of the BGP interface outside Google cloud. Only IPv4 is supported." } } }, @@ -5594,7 +5786,7 @@ }, "linkedVpnTunnel": { "type": "string", - "description": "URI of linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource." + "description": "URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." }, "name": { "type": "string", @@ -5645,6 +5837,13 @@ "$ref": "Route" } }, + "bestRoutesForRouter": { + "type": "array", + "description": "Best routes learned by this router.", + "items": { + "$ref": "Route" + } + }, "bgpPeerStatus": { "type": "array", "items": { @@ -5773,6 +5972,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -5793,6 +5993,7 @@ "", "", "", + "", "" ] }, @@ -5827,7 +6028,7 @@ "properties": { "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443.", + "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -5863,7 +6064,7 @@ "properties": { "automaticRestart": { "type": "boolean", - "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted." + "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.\n\nBy default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine." }, "onHostMaintenance": { "type": "string", @@ -5879,7 +6080,7 @@ }, "preemptible": { "type": "boolean", - "description": "Whether the instance is preemptible." + "description": "Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created." } } }, @@ -5908,7 +6109,7 @@ }, "start": { "type": "string", - "description": "[Output Only] The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.", + "description": "The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.", "format": "int64" } } @@ -6156,7 +6357,7 @@ }, "ipCidrRange": { "type": "string", - "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network." + "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported." }, "kind": { "type": "string", @@ -6172,6 +6373,10 @@ "type": "string", "description": "The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks." }, + "privateIpGoogleAccess": { + "type": "boolean", + "description": "Whether the VMs in this subnet can access Google services without assigned external IP addresses." + }, "region": { "type": "string", "description": "URL of the region where the Subnetwork resides." @@ -6286,6 +6491,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -6306,6 +6512,7 @@ "", "", "", + "", "" ] }, @@ -6334,13 +6541,22 @@ } } }, + "SubnetworksSetPrivateIpGoogleAccessRequest": { + "id": "SubnetworksSetPrivateIpGoogleAccessRequest", + "type": "object", + "properties": { + "privateIpGoogleAccess": { + "type": "boolean" + } + } + }, "TCPHealthCheck": { "id": "TCPHealthCheck", "type": "object", "properties": { "port": { "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80.", + "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", "format": "int32" }, "portName": { @@ -6692,6 +6908,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -6712,6 +6929,7 @@ "", "", "", + "", "" ] }, @@ -6743,7 +6961,7 @@ "TargetPool": { "id": "TargetPool", "type": "object", - "description": "A TargetPool resource. This resource defines a pool of instances, associated HttpHealthCheck resources, and the fallback target pool.", + "description": "A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool.", "properties": { "backupPool": { "type": "string", @@ -6764,7 +6982,7 @@ }, "healthChecks": { "type": "array", - "description": "A list of URLs to the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if all specified health checks pass. An empty list means all member instances will be considered healthy at all times.", + "description": "The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.", "items": { "type": "string" } @@ -6904,7 +7122,7 @@ "properties": { "healthChecks": { "type": "array", - "description": "A list of HttpHealthCheck resources to add to the target pool.", + "description": "The HttpHealthCheck to add to the target pool.", "items": { "$ref": "HealthCheckReference" } @@ -6982,6 +7200,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -7002,6 +7221,7 @@ "", "", "", + "", "" ] }, @@ -7344,6 +7564,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -7364,6 +7585,7 @@ "", "", "", + "", "" ] }, @@ -7631,7 +7853,7 @@ }, "localTrafficSelector": { "type": "array", - "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint.", + "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", "items": { "type": "string" } @@ -7648,7 +7870,7 @@ }, "peerIp": { "type": "string", - "description": "IP address of the peer VPN gateway." + "description": "IP address of the peer VPN gateway. Only IPv4 is supported." }, "region": { "type": "string", @@ -7656,7 +7878,7 @@ }, "remoteTrafficSelector": { "type": "array", - "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint.", + "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", "items": { "type": "string" } @@ -7814,6 +8036,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" @@ -7834,6 +8057,7 @@ "", "", "", + "", "" ] }, @@ -7963,11 +8187,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -8132,11 +8355,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -8194,11 +8416,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -8363,11 +8584,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -8416,8 +8636,7 @@ "parameters": { "autoscaler": { "type": "string", - "description": "Name of the autoscaler to update.", - "required": true, + "description": "Name of the autoscaler to patch.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "query" }, @@ -8438,8 +8657,7 @@ }, "parameterOrder": [ "project", - "zone", - "autoscaler" + "zone" ], "request": { "$ref": "Autoscaler" @@ -8449,7 +8667,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "update": { @@ -8496,6 +8715,227 @@ } } }, + "backendBuckets": { + "methods": { + "delete": { + "id": "compute.backendBuckets.delete", + "path": "{project}/global/backendBuckets/{backendBucket}", + "httpMethod": "DELETE", + "description": "Deletes the specified BackendBucket resource.", + "parameters": { + "backendBucket": { + "type": "string", + "description": "Name of the BackendBucket resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "backendBucket" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.backendBuckets.get", + "path": "{project}/global/backendBuckets/{backendBucket}", + "httpMethod": "GET", + "description": "Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request.", + "parameters": { + "backendBucket": { + "type": "string", + "description": "Name of the BackendBucket resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "backendBucket" + ], + "response": { + "$ref": "BackendBucket" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.backendBuckets.insert", + "path": "{project}/global/backendBuckets", + "httpMethod": "POST", + "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "BackendBucket" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.backendBuckets.list", + "path": "{project}/global/backendBuckets", + "httpMethod": "GET", + "description": "Retrieves the list of BackendBucket resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "BackendBucketList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "id": "compute.backendBuckets.patch", + "path": "{project}/global/backendBuckets/{backendBucket}", + "httpMethod": "PATCH", + "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports patch semantics.", + "parameters": { + "backendBucket": { + "type": "string", + "description": "Name of the BackendBucket resource to patch.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "backendBucket" + ], + "request": { + "$ref": "BackendBucket" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "update": { + "id": "compute.backendBuckets.update", + "path": "{project}/global/backendBuckets/{backendBucket}", + "httpMethod": "PUT", + "description": "Updates the specified BackendBucket resource with the data included in the request.", + "parameters": { + "backendBucket": { + "type": "string", + "description": "Name of the BackendBucket resource to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "backendBucket" + ], + "request": { + "$ref": "BackendBucket" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "backendServices": { "methods": { "aggregatedList": { @@ -8511,11 +8951,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -8692,11 +9131,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -8733,11 +9171,11 @@ "id": "compute.backendServices.patch", "path": "{project}/global/backendServices/{backendService}", "httpMethod": "PATCH", - "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", + "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", "parameters": { "backendService": { "type": "string", - "description": "Name of the BackendService resource to update.", + "description": "Name of the BackendService resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -8762,7 +9200,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "update": { @@ -8818,11 +9257,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -8910,11 +9348,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -8972,11 +9409,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9022,6 +9458,10 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "guestFlush": { + "type": "boolean", + "location": "query" + }, "project": { "type": "string", "description": "Project ID for this request.", @@ -9189,11 +9629,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9390,11 +9829,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9431,7 +9869,7 @@ "id": "compute.firewalls.patch", "path": "{project}/global/firewalls/{firewall}", "httpMethod": "PATCH", - "description": "Updates the specified firewall rule with the data included in the request. This method supports patch semantics.", + "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. This method supports patch semantics.", "parameters": { "firewall": { "type": "string", @@ -9467,7 +9905,7 @@ "id": "compute.firewalls.update", "path": "{project}/global/firewalls/{firewall}", "httpMethod": "PUT", - "description": "Updates the specified firewall rule with the data included in the request.", + "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", "parameters": { "firewall": { "type": "string", @@ -9516,11 +9954,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9685,11 +10122,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9886,11 +10322,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -9931,7 +10366,7 @@ "id": "compute.globalForwardingRules.delete", "path": "{project}/global/forwardingRules/{forwardingRule}", "httpMethod": "DELETE", - "description": "Deletes the specified ForwardingRule resource.", + "description": "Deletes the specified GlobalForwardingRule resource.", "parameters": { "forwardingRule": { "type": "string", @@ -9964,7 +10399,7 @@ "id": "compute.globalForwardingRules.get", "path": "{project}/global/forwardingRules/{forwardingRule}", "httpMethod": "GET", - "description": "Returns the specified ForwardingRule resource. Get a list of available forwarding rules by making a list() request.", + "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.", "parameters": { "forwardingRule": { "type": "string", @@ -9998,7 +10433,7 @@ "id": "compute.globalForwardingRules.insert", "path": "{project}/global/forwardingRules", "httpMethod": "POST", - "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", "parameters": { "project": { "type": "string", @@ -10026,7 +10461,7 @@ "id": "compute.globalForwardingRules.list", "path": "{project}/global/forwardingRules", "httpMethod": "GET", - "description": "Retrieves a list of ForwardingRule resources available to the specified project.", + "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", "parameters": { "filter": { "type": "string", @@ -10035,11 +10470,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10076,7 +10510,7 @@ "id": "compute.globalForwardingRules.setTarget", "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", "httpMethod": "POST", - "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", "parameters": { "forwardingRule": { "type": "string", @@ -10125,11 +10559,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10239,11 +10672,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10388,11 +10820,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10433,7 +10864,7 @@ "parameters": { "healthCheck": { "type": "string", - "description": "Name of the HealthCheck resource to update.", + "description": "Name of the HealthCheck resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -10458,7 +10889,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "update": { @@ -10609,11 +11041,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10654,7 +11085,7 @@ "parameters": { "httpHealthCheck": { "type": "string", - "description": "Name of the HttpHealthCheck resource to update.", + "description": "Name of the HttpHealthCheck resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -10679,7 +11110,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "update": { @@ -10830,11 +11262,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -10875,7 +11306,7 @@ "parameters": { "httpsHealthCheck": { "type": "string", - "description": "Name of the HttpsHealthCheck resource to update.", + "description": "Name of the HttpsHealthCheck resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -10900,7 +11331,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "update": { @@ -11124,11 +11556,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11169,7 +11600,7 @@ "id": "compute.instanceGroupManagers.abandonInstances", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.", + "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -11220,11 +11651,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11300,7 +11730,7 @@ "id": "compute.instanceGroupManagers.deleteInstances", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.", + "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -11382,7 +11812,7 @@ "id": "compute.instanceGroupManagers.insert", "path": "{project}/zones/{zone}/instanceGroupManagers", "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group.", "parameters": { "project": { "type": "string", @@ -11426,11 +11856,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11491,7 +11920,6 @@ "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "order_by": { @@ -11534,7 +11962,7 @@ "id": "compute.instanceGroupManagers.recreateInstances", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.", + "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -11762,11 +12190,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11926,11 +12353,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -11989,11 +12415,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12233,11 +12658,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12338,11 +12762,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12379,7 +12802,7 @@ "id": "compute.instances.attachDisk", "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", "httpMethod": "POST", - "description": "Attaches a Disk resource to an instance.", + "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", "parameters": { "instance": { "type": "string", @@ -12636,7 +13059,7 @@ }, "start": { "type": "string", - "description": "For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value that was returned in the previous call.", + "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.", "format": "int64", "location": "query" }, @@ -12711,11 +13134,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -12760,7 +13182,7 @@ "id": "compute.instances.reset", "path": "{project}/zones/{zone}/instances/{instance}/reset", "httpMethod": "POST", - "description": "Performs a hard reset on the instance.", + "description": "Performs a reset on the instance. For more information, see Resetting an instance.", "parameters": { "instance": { "type": "string", @@ -12985,6 +13407,50 @@ "https://www.googleapis.com/auth/compute" ] }, + "setServiceAccount": { + "id": "compute.instances.setServiceAccount", + "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount", + "httpMethod": "POST", + "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance resource to start.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "InstancesSetServiceAccountRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setTags": { "id": "compute.instances.setTags", "path": "{project}/zones/{zone}/instances/{instance}/setTags", @@ -13210,11 +13676,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13302,11 +13767,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13459,11 +13923,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13810,11 +14273,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -13863,8 +14325,7 @@ "parameters": { "autoscaler": { "type": "string", - "description": "Name of the autoscaler to update.", - "required": true, + "description": "Name of the autoscaler to patch.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "query" }, @@ -13885,8 +14346,7 @@ }, "parameterOrder": [ "project", - "region", - "autoscaler" + "region" ], "request": { "$ref": "Autoscaler" @@ -13896,7 +14356,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "update": { @@ -14121,11 +14582,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14174,7 +14634,7 @@ "parameters": { "backendService": { "type": "string", - "description": "Name of the BackendService resource to update.", + "description": "Name of the BackendService resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -14207,7 +14667,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "update": { @@ -14262,7 +14723,7 @@ "id": "compute.regionInstanceGroupManagers.abandonInstances", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.", + "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -14343,7 +14804,7 @@ "id": "compute.regionInstanceGroupManagers.deleteInstances", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.", + "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -14425,7 +14886,7 @@ "id": "compute.regionInstanceGroupManagers.insert", "path": "{project}/regions/{region}/instanceGroupManagers", "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", "parameters": { "project": { "type": "string", @@ -14469,11 +14930,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14534,7 +14994,6 @@ "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "order_by": { @@ -14577,7 +15036,7 @@ "id": "compute.regionInstanceGroupManagers.recreateInstances", "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.", + "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -14804,11 +15263,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -14867,11 +15325,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15054,11 +15511,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15150,11 +15606,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15204,11 +15659,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15415,11 +15869,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15464,7 +15917,7 @@ "id": "compute.routers.patch", "path": "{project}/regions/{region}/routers/{router}", "httpMethod": "PATCH", - "description": "Updates the specified Router resource with the data included in the request. This method supports patch semantics.", + "description": "Patches the specified Router resource with the data included in the request. This method supports patch semantics.", "parameters": { "project": { "type": "string", @@ -15482,7 +15935,7 @@ }, "router": { "type": "string", - "description": "Name of the Router resource to update.", + "description": "Name of the Router resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -15501,7 +15954,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "preview": { @@ -15705,11 +16159,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15826,11 +16279,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -15975,11 +16427,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16029,11 +16480,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16242,11 +16692,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16286,6 +16735,50 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "setPrivateIpGoogleAccess": { + "id": "compute.subnetworks.setPrivateIpGoogleAccess", + "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", + "httpMethod": "POST", + "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "subnetwork": { + "type": "string", + "description": "Name of the Subnetwork resource.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "subnetwork" + ], + "request": { + "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -16399,11 +16892,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16584,11 +17076,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16710,11 +17201,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -16879,11 +17369,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17029,11 +17518,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17243,11 +17731,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17538,11 +18025,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17700,11 +18186,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -17869,11 +18354,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18062,11 +18546,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18103,7 +18586,7 @@ "id": "compute.urlMaps.patch", "path": "{project}/global/urlMaps/{urlMap}", "httpMethod": "PATCH", - "description": "Updates the specified UrlMap resource with the data included in the request. This method supports patch semantics.", + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports patch semantics.", "parameters": { "project": { "type": "string", @@ -18114,7 +18597,7 @@ }, "urlMap": { "type": "string", - "description": "Name of the UrlMap resource to update.", + "description": "Name of the UrlMap resource to patch.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -18132,7 +18615,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] }, "update": { @@ -18224,11 +18708,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18393,11 +18876,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18535,11 +19017,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -18631,11 +19112,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { diff --git a/etc/api/consumersurveys/v2/consumersurveys-api.json b/etc/api/consumersurveys/v2/consumersurveys-api.json index fd41160f58..44d975c772 100644 --- a/etc/api/consumersurveys/v2/consumersurveys-api.json +++ b/etc/api/consumersurveys/v2/consumersurveys-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/rHWbtxT3gC8DAqrI4kJjmo2JS7Q\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/e7DEYLH6SdmU14auNlU-9VK4HgU\"", "discoveryVersion": "v1", "id": "consumersurveys:v2", "name": "consumersurveys", "canonicalName": "Consumer Surveys", "version": "v2", - "revision": "20161101", + "revision": "20170407", "title": "Consumer Surveys API", "description": "Creates and conducts surveys, lists the surveys that an authenticated user owns, and retrieves survey results and information about specified surveys.", "ownerDomain": "google.com", @@ -454,10 +454,6 @@ "requestId": { "type": "string", "description": "Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests." - }, - "resource": { - "$ref": "Survey", - "description": "Survey object containing the specification of the started Survey." } } }, @@ -468,10 +464,6 @@ "requestId": { "type": "string", "description": "Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests." - }, - "resource": { - "$ref": "Survey", - "description": "Survey object containing the specification of the stopped Survey." } } }, diff --git a/etc/api/container/v1/container-api.json b/etc/api/container/v1/container-api.json index 9594dca92b..ce3a3884ca 100644 --- a/etc/api/container/v1/container-api.json +++ b/etc/api/container/v1/container-api.json @@ -1,1057 +1,1710 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/cpP4K9eaLrLwMGtsdl5oXjxb8rw\"", - "discoveryVersion": "v1", - "id": "container:v1", - "name": "container", - "version": "v1", - "revision": "20160421", - "title": "Google Container Engine API", - "description": "Builds and manages clusters that run container-based applications, powered by open source Kubernetes technology.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/container-engine/", - "protocol": "rest", - "baseUrl": "https://container.googleapis.com/", - "basePath": "", - "rootUrl": "https://container.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "id": "container:v1", + "documentationLink": "https://cloud.google.com/container-engine/", + "revision": "20170430", + "title": "Google Container Engine API", + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { + "projects": { + "resources": { + "zones": { + "methods": { + "getServerconfig": { + "id": "container.projects.zones.getServerconfig", + "path": "v1/projects/{projectId}/zones/{zone}/serverconfig", + "description": "Returns configuration info about the Container Engine service.", + "httpMethod": "GET", + "response": { + "$ref": "ServerConfig" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.", + "required": true, + "type": "string" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig" + } + }, + "resources": { + "clusters": { + "methods": { + "legacyAbac": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "required": true, + "type": "string", + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster to update.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + "id": "container.projects.zones.clusters.legacyAbac", + "description": "Enables or disables the ABAC authorization mechanism on a cluster.", + "request": { + "$ref": "SetLegacyAbacRequest" + } + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Cluster" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to retrieve.", + "required": true, + "type": "string" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.get", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "description": "Gets the details of a specific cluster." + }, + "update": { + "request": { + "$ref": "UpdateClusterRequest" + }, + "description": "Updates the settings of a specific cluster.", + "httpMethod": "PUT", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "required": true, + "type": "string" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string" + }, + "zone": { + "required": true, + "type": "string", + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.update", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" + }, + "startIpRotation": { + "description": "Start master IP rotation.", + "request": { + "$ref": "StartIPRotationRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "type": "string", + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string", + "location": "path" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + "id": "container.projects.zones.clusters.startIpRotation", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation" + }, + "setMasterAuth": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string", + "location": "path" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string", + "location": "path" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + "id": "container.projects.zones.clusters.setMasterAuth", + "request": { + "$ref": "SetMasterAuthRequest" + }, + "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set the password." + }, + "delete": { + "id": "container.projects.zones.clusters.delete", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", + "httpMethod": "DELETE", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster to delete.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "required": true, + "type": "string", + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" + }, + "list": { + "response": { + "$ref": "ListClustersResponse" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", + "path": "v1/projects/{projectId}/zones/{zone}/clusters", + "id": "container.projects.zones.clusters.list", + "description": "Lists all clusters owned by a project in either the specified zone or all\nzones." + }, + "create": { + "request": { + "$ref": "CreateClusterRequest" + }, + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", + "path": "v1/projects/{projectId}/zones/{zone}/clusters", + "id": "container.projects.zones.clusters.create" + }, + "resourceLabels": { + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "type": "string" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + "id": "container.projects.zones.clusters.resourceLabels", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + "request": { + "$ref": "SetLabelsRequest" + }, + "description": "Sets labels on a cluster.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + } + }, + "completeIpRotation": { + "request": { + "$ref": "CompleteIPRotationRequest" + }, + "description": "Completes master IP rotation.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string", + "location": "path" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + "id": "container.projects.zones.clusters.completeIpRotation", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation" + } + }, + "resources": { + "nodePools": { + "methods": { + "delete": { + "description": "Deletes a node pool from a cluster.", + "httpMethod": "DELETE", + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.", + "required": true, + "type": "string" + }, + "nodePoolId": { + "description": "The name of the node pool to delete.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "id": "container.projects.zones.clusters.nodePools.delete", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}" + }, + "setManagement": { + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + "id": "container.projects.zones.clusters.nodePools.setManagement", + "description": "Sets the NodeManagement options for a node pool.", + "request": { + "$ref": "SetNodePoolManagementRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to update.", + "required": true, + "type": "string" + }, + "nodePoolId": { + "location": "path", + "description": "The name of the node pool to update.", + "required": true, + "type": "string" + }, + "projectId": { + "required": true, + "type": "string", + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement" + }, + "list": { + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "type": "string" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + }, + "clusterId": { + "required": true, + "type": "string", + "location": "path", + "description": "The name of the cluster." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "id": "container.projects.zones.clusters.nodePools.list", + "description": "Lists the node pools for a cluster.", + "response": { + "$ref": "ListNodePoolsResponse" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "GET" + }, + "rollback": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string", + "location": "path" + }, + "clusterId": { + "required": true, + "type": "string", + "location": "path", + "description": "The name of the cluster to rollback." + }, + "nodePoolId": { + "location": "path", + "description": "The name of the node pool to rollback.", + "required": true, + "type": "string" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + "id": "container.projects.zones.clusters.nodePools.rollback", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + "request": { + "$ref": "RollbackNodePoolUpgradeRequest" + }, + "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed." + }, + "create": { + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "id": "container.projects.zones.clusters.nodePools.create", + "request": { + "$ref": "CreateNodePoolRequest" + }, + "description": "Creates a node pool for a cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "type": "string", + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + }, + "clusterId": { + "required": true, + "type": "string", + "location": "path", + "description": "The name of the cluster." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools" + }, + "get": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "id": "container.projects.zones.clusters.nodePools.get", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "description": "Retrieves the node pool requested.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "NodePool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "clusterId": { + "description": "The name of the cluster.", + "required": true, + "type": "string", + "location": "path" + }, + "nodePoolId": { + "required": true, + "type": "string", + "location": "path", + "description": "The name of the node pool." + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "type": "string", + "location": "path" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + } + } + } + } + } + } + }, + "operations": { + "methods": { + "cancel": { + "request": { + "$ref": "CancelOperationRequest" + }, + "description": "Cancels the specified operation.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId", + "zone", + "operationId" + ], + "httpMethod": "POST", + "parameters": { + "operationId": { + "description": "The server-assigned `name` of the operation.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + "id": "container.projects.zones.operations.cancel" + }, + "list": { + "description": "Lists all operations in a project in a specific zone or all zones.", + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/operations", + "id": "container.projects.zones.operations.list", + "path": "v1/projects/{projectId}/zones/{zone}/operations" + }, + "get": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "id": "container.projects.zones.operations.get", + "description": "Gets the specified operation.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "operationId" + ], + "httpMethod": "GET", + "parameters": { + "operationId": { + "description": "The server-assigned `name` of the operation.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "required": true, + "type": "string" + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } } - } - } - }, - "schemas": { - "ListClustersResponse": { - "id": "ListClustersResponse", - "type": "object", - "description": "ListClustersResponse is the result of ListClustersRequest.", - "properties": { - "clusters": { - "type": "array", - "description": "A list of clusters in the project in the specified zone, or across all ones.", - "items": { - "$ref": "Cluster" - } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" }, - "missingZones": { - "type": "array", - "description": "If any zones are listed here, the list of clusters returned may be missing those zones.", - "items": { + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" - } - } - } - }, - "Cluster": { - "id": "Cluster", - "type": "object", - "description": "A Google Container Engine cluster.", - "properties": { - "name": { - "type": "string", - "description": "The name of this cluster. The name must be unique within this project and zone, and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter." }, - "description": { - "type": "string", - "description": "An optional description of this cluster." - }, - "initialNodeCount": { - "type": "integer", - "description": "The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a \"node_pool\" object, since this configuration (along with the \"node_config\") will be used to create a \"NodePool\" object with an auto-generated name. Do not use this and a node_pool at the same time.", - "format": "int32" - }, - "nodeConfig": { - "$ref": "NodeConfig", - "description": "Parameters used in creating the cluster's nodes. See `nodeConfig` for the description of its properties. For requests, this field should only be used in lieu of a \"node_pool\" object, since this configuration (along with the \"initial_node_count\") will be used to create a \"NodePool\" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. If unspecified, the defaults are used." - }, - "masterAuth": { - "$ref": "MasterAuth", - "description": "The authentication information for accessing the master endpoint." - }, - "loggingService": { - "type": "string", - "description": "The logging service the cluster should use to write logs. Currently available options: * `logging.googleapis.com` - the Google Cloud Logging service. * `none` - no logs will be exported from the cluster. * if left as an empty string,`logging.googleapis.com` will be used." - }, - "monitoringService": { - "type": "string", - "description": "The monitoring service the cluster should use to write metrics. Currently available options: * `monitoring.googleapis.com` - the Google Cloud Monitoring service. * `none` - no metrics will be exported from the cluster. * if left as an empty string, `monitoring.googleapis.com` will be used." - }, - "network": { - "type": "string", - "description": "The name of the Google Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. If left unspecified, the `default` network will be used." - }, - "clusterIpv4Cidr": { - "type": "string", - "description": "The IP address range of the container pods in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen or specify a `/14` block in `10.0.0.0/8`." - }, - "addonsConfig": { - "$ref": "AddonsConfig", - "description": "Configurations for the various addons available to run in the cluster." - }, - "subnetwork": { - "type": "string", - "description": "The name of the Google Compute Engine [subnetwork](/compute/docs/subnetworks) to which the cluster is connected." - }, - "nodePools": { - "type": "array", - "description": "The node pools associated with this cluster. When creating a new cluster, only a single node pool should be specified. This field should not be set if \"node_config\" or \"initial_node_count\" are specified.", - "items": { - "$ref": "NodePool" - } - }, - "locations": { - "type": "array", - "description": "The list of Google Compute Engine [locations](/compute/docs/zones#available) in which the cluster's nodes should be located.", - "items": { + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", "type": "string" - } }, - "selfLink": { - "type": "string", - "description": "[Output only] Server-defined URL for the resource." - }, - "zone": { - "type": "string", - "description": "[Output only] The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides." - }, - "endpoint": { - "type": "string", - "description": "[Output only] The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information." - }, - "initialClusterVersion": { - "type": "string", - "description": "[Output only] The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time." - }, - "currentMasterVersion": { - "type": "string", - "description": "[Output only] The current software version of the master endpoint." - }, - "currentNodeVersion": { - "type": "string", - "description": "[Output only] The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes." - }, - "createTime": { - "type": "string", - "description": "[Output only] The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format." - }, - "status": { - "type": "string", - "description": "[Output only] The current status of this cluster.", - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RECONCILING", - "STOPPING", - "ERROR" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output only] Additional information about the current status of this cluster, if available." - }, - "nodeIpv4CidrSize": { - "type": "integer", - "description": "[Output only] The size of the address space on each node for hosting containers. This is provisioned from within the `container_ipv4_cidr` range.", - "format": "int32" - }, - "servicesIpv4Cidr": { - "type": "string", - "description": "[Output only] The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last `/16` from the container CIDR." - }, - "instanceGroupUrls": { - "type": "array", - "description": "[Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this cluster.", - "items": { + "callback": { + "location": "query", + "description": "JSONP", "type": "string" - } }, - "currentNodeCount": { - "type": "integer", - "description": "[Output only] The number of nodes currently in the cluster.", - "format": "int32" - } - } - }, - "NodeConfig": { - "id": "NodeConfig", - "type": "object", - "description": "Parameters that describe the nodes in a cluster.", - "properties": { - "machineType": { - "type": "string", - "description": "The name of a Google Compute Engine [machine type](/compute/docs/machine-types) (e.g. `n1-standard-1`). If unspecified, the default machine type is `n1-standard-1`." + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" }, - "diskSizeGb": { - "type": "integer", - "description": "Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.", - "format": "int32" + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] }, - "oauthScopes": { - "type": "array", - "description": "The set of Google API scopes to be made available on all of the node VMs under the \"default\" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with **gcr.io** (the [Google Container Registry](/container-registry/)). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added.", - "items": { + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "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" - } }, - "metadata": { - "type": "object", - "description": "The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: \"instance-template\", \"kube-env\", \"startup-script\", and \"user-data\" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB.", - "additionalProperties": { + "quotaUser": { + "location": "query", + "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" - } + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" } - } }, - "MasterAuth": { - "id": "MasterAuth", - "type": "object", - "description": "The authentication information for accessing the master endpoint. Authentication can be done using HTTP basic auth or using client certificates.", - "properties": { - "username": { - "type": "string", - "description": "The username to use for HTTP basic authentication to the master endpoint." - }, - "password": { - "type": "string", - "description": "The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password." - }, - "clusterCaCertificate": { - "type": "string", - "description": "[Output only] Base64-encoded public certificate that is the root of trust for the cluster." - }, - "clientCertificate": { - "type": "string", - "description": "[Output only] Base64-encoded public certificate used by clients to authenticate to the cluster endpoint." - }, - "clientKey": { - "type": "string", - "description": "[Output only] Base64-encoded private key used by clients to authenticate to the cluster endpoint." - } - } - }, - "AddonsConfig": { - "id": "AddonsConfig", - "type": "object", - "description": "Configuration for the addons that can be automatically spun up in the cluster, enabling additional functionality.", - "properties": { - "httpLoadBalancing": { - "$ref": "HttpLoadBalancing", - "description": "Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster." - }, - "horizontalPodAutoscaling": { - "$ref": "HorizontalPodAutoscaling", - "description": "Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods." - } - } - }, - "HttpLoadBalancing": { - "id": "HttpLoadBalancing", - "type": "object", - "description": "Configuration options for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster.", - "properties": { - "disabled": { - "type": "boolean", - "description": "Whether the HTTP Load Balancing controller is enabled in the cluster. When enabled, it runs a small pod in the cluster that manages the load balancers." - } - } - }, - "HorizontalPodAutoscaling": { - "id": "HorizontalPodAutoscaling", - "type": "object", - "description": "Configuration options for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods.", - "properties": { - "disabled": { - "type": "boolean", - "description": "Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that a Heapster pod is running in the cluster, which is also used by the Cloud Monitoring service." - } - } - }, - "NodePool": { - "id": "NodePool", - "type": "object", - "description": "NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload.", - "properties": { - "name": { - "type": "string", - "description": "The name of the node pool." - }, - "config": { - "$ref": "NodeConfig", - "description": "The node configuration of the pool." - }, - "initialNodeCount": { - "type": "integer", - "description": "The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota.", - "format": "int32" - }, - "selfLink": { - "type": "string", - "description": "Server-defined URL for the resource." - }, - "version": { - "type": "string", - "description": "The version of the Kubernetes of this node." - }, - "instanceGroupUrls": { - "type": "array", - "description": "[Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this node pool.", - "items": { - "type": "string" - } - }, - "status": { - "type": "string", - "description": "The status of the nodes in this pool instance.", - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RUNNING_WITH_ERROR", - "RECONCILING", - "STOPPING", - "ERROR" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output only] Additional information about the current status of this node pool instance, if available." - } - } - }, - "CreateClusterRequest": { - "id": "CreateClusterRequest", - "type": "object", - "description": "CreateClusterRequest creates a cluster.", - "properties": { - "cluster": { - "$ref": "Cluster", - "description": "A [cluster resource](/container-engine/reference/rest/v1/projects.zones.clusters)" - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only.", - "properties": { - "name": { - "type": "string", - "description": "The server-assigned ID for the operation." - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation is taking place." - }, - "operationType": { - "type": "string", - "description": "The operation type.", - "enum": [ - "TYPE_UNSPECIFIED", - "CREATE_CLUSTER", - "DELETE_CLUSTER", - "UPGRADE_MASTER", - "UPGRADE_NODES", - "REPAIR_CLUSTER", - "UPDATE_CLUSTER", - "CREATE_NODE_POOL", - "DELETE_NODE_POOL" - ] - }, - "status": { - "type": "string", - "description": "The current status of the operation.", - "enum": [ - "STATUS_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "detail": { - "type": "string", - "description": "Detailed operation progress, if available." - }, - "statusMessage": { - "type": "string", - "description": "If an error has occurred, a textual description of the error." - }, - "selfLink": { - "type": "string", - "description": "Server-defined URL for the resource." - }, - "targetLink": { - "type": "string", - "description": "Server-defined URL for the target of the operation." - } - } - }, - "UpdateClusterRequest": { - "id": "UpdateClusterRequest", - "type": "object", - "description": "UpdateClusterRequest updates the settings of a cluster.", - "properties": { - "update": { - "$ref": "ClusterUpdate", - "description": "A description of the update." - } - } - }, - "ClusterUpdate": { - "id": "ClusterUpdate", - "type": "object", - "description": "ClusterUpdate describes an update to the cluster. Exactly one update can be applied to a cluster with each request, so at most one field can be provided.", - "properties": { - "desiredNodeVersion": { - "type": "string", - "description": "The Kubernetes version to change the nodes to (typically an upgrade). Use `-` to upgrade to the latest version supported by the server." - }, - "desiredMonitoringService": { - "type": "string", - "description": "The monitoring service the cluster should use to write metrics. Currently available options: * \"monitoring.googleapis.com\" - the Google Cloud Monitoring service * \"none\" - no metrics will be exported from the cluster" - }, - "desiredAddonsConfig": { - "$ref": "AddonsConfig", - "description": "Configurations for the various addons available to run in the cluster." - }, - "desiredNodePoolId": { - "type": "string", - "description": "The node pool to be upgraded. This field is mandatory if the \"desired_node_version\" or \"desired_image_family\" is specified and there is more than one node pool on the cluster." - }, - "desiredMasterVersion": { - "type": "string", - "description": "The Kubernetes version to change the master to. The only valid value is the latest supported version. Use \"-\" to have the server automatically select the latest version." - } - } - }, - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "ListOperationsResponse is the result of ListOperationsRequest.", - "properties": { - "operations": { - "type": "array", - "description": "A list of operations in the project in the specified zone.", - "items": { - "$ref": "Operation" - } - }, - "missingZones": { - "type": "array", - "description": "If any zones are listed here, the list of operations returned may be missing the operations from those zones.", - "items": { - "type": "string" - } - } - } - }, - "ServerConfig": { - "id": "ServerConfig", - "type": "object", - "description": "Container Engine service configuration.", - "properties": { - "defaultClusterVersion": { - "type": "string", - "description": "Version of Kubernetes the service deploys by default." - }, - "validNodeVersions": { - "type": "array", - "description": "List of valid node upgrade target versions.", - "items": { - "type": "string" - } - }, - "defaultImageFamily": { - "type": "string", - "description": "Default image family." - }, - "validImageFamilies": { - "type": "array", - "description": "List of valid image families.", - "items": { - "type": "string" - } - } - } - }, - "ListNodePoolsResponse": { - "id": "ListNodePoolsResponse", - "type": "object", - "description": "ListNodePoolsResponse is the result of ListNodePoolsRequest.", - "properties": { - "nodePools": { - "type": "array", - "description": "A list of node pools for a cluster.", - "items": { - "$ref": "NodePool" - } - } - } - }, - "CreateNodePoolRequest": { - "id": "CreateNodePoolRequest", - "type": "object", - "description": "CreateNodePoolRequest creates a node pool for a cluster.", - "properties": { - "nodePool": { - "$ref": "NodePool", - "description": "The node pool to create." - } - } - } - }, - "resources": { - "projects": { - "resources": { - "zones": { - "methods": { - "getServerconfig": { - "id": "container.projects.zones.getServerconfig", - "path": "v1/projects/{projectId}/zones/{zone}/serverconfig", - "httpMethod": "GET", - "description": "Returns configuration info about the Container Engine service.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", - "required": true, - "location": "path" + "schemas": { + "Operation": { + "description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only.", + "type": "object", + "properties": { + "operationType": { + "enumDescriptions": [ + "Not set.", + "Cluster create.", + "Cluster delete.", + "A master upgrade.", + "A node upgrade.", + "Cluster repair.", + "Cluster update.", + "Node pool create.", + "Node pool delete.", + "Set node pool management.", + "Automatic node pool repair.", + "Automatic node upgrade.", + "Set labels.", + "Set/generate master auth materials" + ], + "enum": [ + "TYPE_UNSPECIFIED", + "CREATE_CLUSTER", + "DELETE_CLUSTER", + "UPGRADE_MASTER", + "UPGRADE_NODES", + "REPAIR_CLUSTER", + "UPDATE_CLUSTER", + "CREATE_NODE_POOL", + "DELETE_NODE_POOL", + "SET_NODE_POOL_MANAGEMENT", + "AUTO_REPAIR_NODES", + "AUTO_UPGRADE_NODES", + "SET_LABELS", + "SET_MASTER_AUTH" + ], + "description": "The operation type.", + "type": "string" }, "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for.", - "required": true, - "location": "path" + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation\nis taking place.", + "type": "string" + }, + "status": { + "enumDescriptions": [ + "Not set.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed.", + "The operation is aborting." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PENDING", + "RUNNING", + "DONE", + "ABORTING" + ], + "description": "The current status of the operation.", + "type": "string" + }, + "name": { + "description": "The server-assigned ID for the operation.", + "type": "string" + }, + "statusMessage": { + "description": "If an error has occurred, a textual description of the error.", + "type": "string" + }, + "selfLink": { + "description": "Server-defined URL for the resource.", + "type": "string" + }, + "detail": { + "description": "Detailed operation progress, if available.", + "type": "string" + }, + "targetLink": { + "description": "Server-defined URL for the target of the operation.", + "type": "string" } - }, - "parameterOrder": [ - "projectId", - "zone" - ], - "response": { - "$ref": "ServerConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "clusters": { - "methods": { - "list": { - "id": "container.projects.zones.clusters.list", - "path": "v1/projects/{projectId}/zones/{zone}/clusters", - "httpMethod": "GET", - "description": "Lists all clusters owned by a project in either the specified zone or all zones.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or \"-\" for all zones.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone" - ], - "response": { - "$ref": "ListClustersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "container.projects.zones.clusters.get", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "httpMethod": "GET", - "description": "Gets the details of a specific cluster.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", - "required": true, - "location": "path" - }, - "clusterId": { - "type": "string", - "description": "The name of the cluster to retrieve.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Cluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "id": "container.projects.zones.clusters.create", - "path": "v1/projects/{projectId}/zones/{zone}/clusters", - "httpMethod": "POST", - "description": "Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone" - ], - "request": { - "$ref": "CreateClusterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "id": "container.projects.zones.clusters.update", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "httpMethod": "PUT", - "description": "Updates the settings of a specific cluster.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", - "required": true, - "location": "path" - }, - "clusterId": { - "type": "string", - "description": "The name of the cluster to upgrade.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "request": { - "$ref": "UpdateClusterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "container.projects.zones.clusters.delete", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "httpMethod": "DELETE", - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster (e.g. load balancer resources) will not be deleted if they weren't present at the initial create time.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", - "required": true, - "location": "path" - }, - "clusterId": { - "type": "string", - "description": "The name of the cluster to delete.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "nodePools": { - "methods": { - "list": { - "id": "container.projects.zones.clusters.nodePools.list", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "httpMethod": "GET", - "description": "Lists the node pools for a cluster.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", - "required": true, - "location": "path" - }, - "clusterId": { - "type": "string", - "description": "The name of the cluster.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "ListNodePoolsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "container.projects.zones.clusters.nodePools.get", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "httpMethod": "GET", - "description": "Retrieves the node pool requested.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", - "required": true, - "location": "path" - }, - "clusterId": { - "type": "string", - "description": "The name of the cluster.", - "required": true, - "location": "path" - }, - "nodePoolId": { - "type": "string", - "description": "The name of the node pool.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "NodePool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "id": "container.projects.zones.clusters.nodePools.create", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "httpMethod": "POST", - "description": "Creates a node pool for a cluster.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", - "required": true, - "location": "path" - }, - "clusterId": { - "type": "string", - "description": "The name of the cluster.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "request": { - "$ref": "CreateNodePoolRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "container.projects.zones.clusters.nodePools.delete", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "httpMethod": "DELETE", - "description": "Deletes a node pool from a cluster.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", - "required": true, - "location": "path" - }, - "clusterId": { - "type": "string", - "description": "The name of the cluster.", - "required": true, - "location": "path" - }, - "nodePoolId": { - "type": "string", - "description": "The name of the node pool to delete.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } }, - "operations": { - "methods": { - "list": { - "id": "container.projects.zones.operations.list", - "path": "v1/projects/{projectId}/zones/{zone}/operations", - "httpMethod": "GET", - "description": "Lists all operations in a project in a specific zone or all zones.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "id": "Operation" + }, + "AddonsConfig": { + "type": "object", + "properties": { + "horizontalPodAutoscaling": { + "$ref": "HorizontalPodAutoscaling", + "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods." }, - "get": { - "id": "container.projects.zones.operations.get", - "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", - "httpMethod": "GET", - "description": "Gets the specified operation.", - "parameters": { - "projectId": { - "type": "string", - "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", - "required": true, - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", - "required": true, - "location": "path" - }, - "operationId": { - "type": "string", - "description": "The server-assigned `name` of the operation.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "zone", - "operationId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "httpLoadBalancing": { + "$ref": "HttpLoadBalancing", + "description": "Configuration for the HTTP (L7) load balancing controller addon, which\nmakes it easy to set up HTTP load balancers for services in a cluster." + } + }, + "id": "AddonsConfig", + "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality." + }, + "RollbackNodePoolUpgradeRequest": { + "type": "object", + "properties": {}, + "id": "RollbackNodePoolUpgradeRequest", + "description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed\nNodePool upgrade. This will be an no-op if the last upgrade successfully\ncompleted." + }, + "UpdateClusterRequest": { + "description": "UpdateClusterRequest updates the settings of a cluster.", + "type": "object", + "properties": { + "update": { + "description": "A description of the update.", + "$ref": "ClusterUpdate" + } + }, + "id": "UpdateClusterRequest" + }, + "Cluster": { + "type": "object", + "properties": { + "clusterIpv4Cidr": { + "description": "The IP address range of the container pods in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`). Leave blank to have\none automatically chosen or specify a `/14` block in `10.0.0.0/8`.", + "type": "string" + }, + "initialNodeCount": { + "description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.", + "format": "int32", + "type": "integer" + }, + "selfLink": { + "description": "[Output only] Server-defined URL for the resource.", + "type": "string" + }, + "locations": { + "description": "The list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located.", + "type": "array", + "items": { + "type": "string" + } + }, + "nodePools": { + "type": "array", + "items": { + "$ref": "NodePool" + }, + "description": "The node pools associated with this cluster.\nThis field should not be set if \"node_config\" or \"initial_node_count\" are\nspecified." + }, + "instanceGroupUrls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\ncluster." + }, + "servicesIpv4Cidr": { + "description": "[Output only] The IP address range of the Kubernetes services in\nthis cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `1.2.3.4/29`). Service addresses are\ntypically put in the last `/16` from the container CIDR.", + "type": "string" + }, + "enableKubernetesAlpha": { + "description": "Kubernetes alpha features are enabled on this cluster. This includes alpha\nAPI groups (e.g. v1alpha1) and features that may not be production ready in\nthe kubernetes version of the master and nodes.\nThe cluster has no SLA for uptime and master/node upgrades are disabled.\nAlpha enabled clusters are automatically deleted thirty days after\ncreation.", + "type": "boolean" + }, + "description": { + "description": "An optional description of this cluster.", + "type": "string" + }, + "currentNodeCount": { + "description": "[Output only] The number of nodes currently in the cluster.", + "format": "int32", + "type": "integer" + }, + "monitoringService": { + "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* `monitoring.googleapis.com` - the Google Cloud Monitoring service.\n* `none` - no metrics will be exported from the cluster.\n* if left as an empty string, `monitoring.googleapis.com` will be used.", + "type": "string" + }, + "network": { + "description": "The name of the Google Compute Engine\n[network](/compute/docs/networks-and-firewalls#networks) to which the\ncluster is connected. If left unspecified, the `default` network\nwill be used.", + "type": "string" + }, + "labelFingerprint": { + "type": "string", + "description": "The fingerprint of the set of labels for this cluster." + }, + "zone": { + "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string" + }, + "expireTime": { + "description": "[Output only] The time the cluster will be automatically\ndeleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "loggingService": { + "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", + "type": "string" + }, + "nodeIpv4CidrSize": { + "description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange.", + "format": "int32", + "type": "integer" + }, + "statusMessage": { + "type": "string", + "description": "[Output only] Additional information about the current status of this\ncluster, if available." + }, + "masterAuth": { + "$ref": "MasterAuth", + "description": "The authentication information for accessing the master endpoint." + }, + "currentMasterVersion": { + "type": "string", + "description": "[Output only] The current software version of the master endpoint." + }, + "nodeConfig": { + "$ref": "NodeConfig", + "description": "Parameters used in creating the cluster's nodes.\nSee `nodeConfig` for the description of its properties.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"initial_node_count\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\nFor responses, this field will be populated with the node configuration of\nthe first node pool.\n\nIf unspecified, the defaults are used." + }, + "addonsConfig": { + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." + }, + "status": { + "enumDescriptions": [ + "Not set.", + "The PROVISIONING state indicates the cluster is being created.", + "The RUNNING state indicates the cluster has been created and is fully\nusable.", + "The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.", + "The STOPPING state indicates the cluster is being deleted.", + "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PROVISIONING", + "RUNNING", + "RECONCILING", + "STOPPING", + "ERROR" + ], + "description": "[Output only] The current status of this cluster.", + "type": "string" + }, + "currentNodeVersion": { + "description": "[Output only] The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.", + "type": "string" + }, + "subnetwork": { + "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of this cluster. The name must be unique within this project\nand zone, and can be up to 40 characters with the following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter." + }, + "resourceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The resource labels for the cluster to use to annotate any related GCE\nresources.", + "type": "object" + }, + "initialClusterVersion": { + "description": "The initial Kubernetes version for this cluster. Valid versions are those\nfound in validMasterVersions returned by getServerConfig. The version can\nbe upgraded over time; such upgrades are reflected in\ncurrentMasterVersion and currentNodeVersion.", + "type": "string" + }, + "legacyAbac": { + "$ref": "LegacyAbac", + "description": "Configuration for the legacy ABAC authorization mode." + }, + "endpoint": { + "description": "[Output only] The IP address of this cluster's master endpoint.\nThe endpoint can be accessed from the internet at\n`https://username:password@endpoint/`.\n\nSee the `masterAuth` property of this resource for username and\npassword information.", + "type": "string" + }, + "createTime": { + "description": "[Output only] The time the cluster was created, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + } + }, + "id": "Cluster", + "description": "A Google Container Engine cluster." + }, + "CreateNodePoolRequest": { + "id": "CreateNodePoolRequest", + "description": "CreateNodePoolRequest creates a node pool for a cluster.", + "type": "object", + "properties": { + "nodePool": { + "$ref": "NodePool", + "description": "The node pool to create." } - } } - } + }, + "ListOperationsResponse": { + "description": "ListOperationsResponse is the result of ListOperationsRequest.", + "type": "object", + "properties": { + "operations": { + "description": "A list of operations in the project in the specified zone.", + "type": "array", + "items": { + "$ref": "Operation" + } + }, + "missingZones": { + "description": "If any zones are listed here, the list of operations returned\nmay be missing the operations from those zones.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ListOperationsResponse" + }, + "ServerConfig": { + "description": "Container Engine service configuration.", + "type": "object", + "properties": { + "validMasterVersions": { + "description": "List of valid master versions.", + "type": "array", + "items": { + "type": "string" + } + }, + "defaultClusterVersion": { + "description": "Version of Kubernetes the service deploys by default.", + "type": "string" + }, + "defaultImageType": { + "description": "Default image type.", + "type": "string" + }, + "validNodeVersions": { + "description": "List of valid node upgrade target versions.", + "type": "array", + "items": { + "type": "string" + } + }, + "validImageTypes": { + "description": "List of valid image types.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ServerConfig" + }, + "NodeConfig": { + "description": "Parameters that describe the nodes in a cluster.", + "type": "object", + "properties": { + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the four reserved keys:\n\"instance-template\", \"kube-env\", \"startup-script\", and \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", + "type": "object" + }, + "diskSizeGb": { + "description": "Size of the disk attached to each node, specified in GB.\nThe smallest allowed disk size is 10GB.\n\nIf unspecified, the default disk size is 100GB.", + "format": "int32", + "type": "integer" + }, + "tags": { + "description": "The list of instance tags applied to all nodes. Tags are used to identify\nvalid sources or targets for network firewalls and are specified by\nthe client during cluster or node pool creation. Each tag within the list\nmust comply with RFC1035.", + "type": "array", + "items": { + "type": "string" + } + }, + "serviceAccount": { + "description": "The Google Cloud Platform Service Account to be used by the node VMs. If\nno Service Account is specified, the \"default\" service account is used.", + "type": "string" + }, + "machineType": { + "description": "The name of a Google Compute Engine [machine\ntype](/compute/docs/machine-types) (e.g.\n`n1-standard-1`).\n\nIf unspecified, the default machine type is\n`n1-standard-1`.", + "type": "string" + }, + "imageType": { + "type": "string", + "description": "The image type to use for this node. Note that for a given image type,\nthe latest version of it will be used." + }, + "oauthScopes": { + "description": "The set of Google API scopes to be made available on all of the\nnode VMs under the \"default\" service account.\n\nThe following scopes are recommended, but not required, and by default are\nnot included:\n\n* `https://www.googleapis.com/auth/compute` is required for mounting\npersistent storage on your nodes.\n* `https://www.googleapis.com/auth/devstorage.read_only` is required for\ncommunicating with **gcr.io**\n(the [Google Container Registry](/container-registry/)).\n\nIf unspecified, no scopes are added, unless Cloud Logging or Cloud\nMonitoring are enabled, in which case their required scopes will be added.", + "type": "array", + "items": { + "type": "string" + } + }, + "preemptible": { + "type": "boolean", + "description": "Whether the nodes are created as preemptible VM instances. See:\nhttps://cloud.google.com/compute/docs/instances/preemptible for more\ninforamtion about preemptible VM instances." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttp://kubernetes.io/v1.1/docs/user-guide/labels.html" + }, + "localSsdCount": { + "description": "The number of local SSD disks to be attached to the node.\n\nThe limit for this value is dependant upon the maximum number of\ndisks available on a machine per zone. See:\nhttps://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits\nfor more information.", + "format": "int32", + "type": "integer" + } + }, + "id": "NodeConfig" + }, + "MasterAuth": { + "description": "The authentication information for accessing the master endpoint.\nAuthentication can be done using HTTP basic auth or using client\ncertificates.", + "type": "object", + "properties": { + "clusterCaCertificate": { + "description": "[Output only] Base64-encoded public certificate that is the root of\ntrust for the cluster.", + "type": "string" + }, + "password": { + "description": "The password to use for HTTP basic authentication to the master endpoint.\nBecause the master endpoint is open to the Internet, you should create a\nstrong password. If a password is provided for cluster creation, username\nmust be non-empty.", + "type": "string" + }, + "clientCertificate": { + "description": "[Output only] Base64-encoded public certificate used by clients to\nauthenticate to the cluster endpoint.", + "type": "string" + }, + "username": { + "description": "The username to use for HTTP basic authentication to the master endpoint.\nFor clusters v1.6.0 and later, you can disable basic authentication by\nproviding an empty username.", + "type": "string" + }, + "clientKey": { + "description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.", + "type": "string" + } + }, + "id": "MasterAuth" + }, + "AutoUpgradeOptions": { + "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed.", + "type": "object", + "properties": { + "description": { + "description": "[Output only] This field is set when upgrades are about to commence\nwith the description of the upgrade.", + "type": "string" + }, + "autoUpgradeStartTime": { + "description": "[Output only] This field is set when upgrades are about to commence\nwith the approximate start time for the upgrades, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + } + }, + "id": "AutoUpgradeOptions" + }, + "ListClustersResponse": { + "description": "ListClustersResponse is the result of ListClustersRequest.", + "type": "object", + "properties": { + "clusters": { + "description": "A list of clusters in the project in the specified zone, or\nacross all ones.", + "type": "array", + "items": { + "$ref": "Cluster" + } + }, + "missingZones": { + "description": "If any zones are listed here, the list of clusters returned\nmay be missing those zones.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ListClustersResponse" + }, + "HttpLoadBalancing": { + "description": "Configuration options for the HTTP (L7) load balancing controller addon,\nwhich makes it easy to set up HTTP load balancers for services in a cluster.", + "type": "object", + "properties": { + "disabled": { + "description": "Whether the HTTP Load Balancing controller is enabled in the cluster.\nWhen enabled, it runs a small pod in the cluster that manages the load\nbalancers.", + "type": "boolean" + } + }, + "id": "HttpLoadBalancing" + }, + "NodePoolAutoscaling": { + "description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage.", + "type": "object", + "properties": { + "maxNodeCount": { + "description": "Maximum number of nodes in the NodePool. Must be \u003e= min_node_count. There\nhas to enough quota to scale up the cluster.", + "format": "int32", + "type": "integer" + }, + "minNodeCount": { + "description": "Minimum number of nodes in the NodePool. Must be \u003e= 1 and \u003c=\nmax_node_count.", + "format": "int32", + "type": "integer" + }, + "enabled": { + "description": "Is autoscaling enabled for this node pool.", + "type": "boolean" + } + }, + "id": "NodePoolAutoscaling" + }, + "SetMasterAuthRequest": { + "type": "object", + "properties": { + "update": { + "description": "A description of the update.", + "$ref": "MasterAuth" + }, + "action": { + "enumDescriptions": [ + "Operation is unknown and will error out", + "Set the password to a user generated value.", + "Generate a new password and set it to that." + ], + "enum": [ + "UNKNOWN", + "SET_PASSWORD", + "GENERATE_PASSWORD" + ], + "description": "The exact form of action to be taken on the master auth", + "type": "string" + } + }, + "id": "SetMasterAuthRequest", + "description": "SetMasterAuthRequest updates the admin password of a cluster." + }, + "ClusterUpdate": { + "description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided.", + "type": "object", + "properties": { + "desiredNodeVersion": { + "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", + "type": "string" + }, + "desiredMasterVersion": { + "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version.", + "type": "string" + }, + "desiredLocations": { + "description": "The desired list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", + "type": "array", + "items": { + "type": "string" + } + }, + "desiredNodePoolAutoscaling": { + "$ref": "NodePoolAutoscaling", + "description": "Autoscaler configuration for the node pool specified in\ndesired_node_pool_id. If there is only one pool in the\ncluster and desired_node_pool_id is not provided then\nthe change applies to that single node pool." + }, + "desiredMonitoringService": { + "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", + "type": "string" + }, + "desiredImageType": { + "description": "The desired image type for the node pool.\nNOTE: Set the \"desired_node_pool\" field as well.", + "type": "string" + }, + "desiredAddonsConfig": { + "description": "Configurations for the various addons available to run in the cluster.", + "$ref": "AddonsConfig" + }, + "desiredNodePoolId": { + "type": "string", + "description": "The node pool to be upgraded. This field is mandatory if\n\"desired_node_version\", \"desired_image_family\" or\n\"desired_node_pool_autoscaling\" is specified and there is more than one\nnode pool on the cluster." + } + }, + "id": "ClusterUpdate" + }, + "HorizontalPodAutoscaling": { + "description": "Configuration options for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", + "type": "object", + "properties": { + "disabled": { + "description": "Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.\nWhen enabled, it ensures that a Heapster pod is running in the cluster,\nwhich is also used by the Cloud Monitoring service.", + "type": "boolean" + } + }, + "id": "HorizontalPodAutoscaling" + }, + "SetNodePoolManagementRequest": { + "description": "SetNodePoolManagementRequest sets the node management properties of a node\npool.", + "type": "object", + "properties": { + "management": { + "$ref": "NodeManagement", + "description": "NodeManagement configuration for the node pool." + } + }, + "id": "SetNodePoolManagementRequest" + }, + "Empty": { + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {} + }, + "CreateClusterRequest": { + "description": "CreateClusterRequest creates a cluster.", + "type": "object", + "properties": { + "cluster": { + "description": "A [cluster\nresource](/container-engine/reference/rest/v1/projects.zones.clusters)", + "$ref": "Cluster" + } + }, + "id": "CreateClusterRequest" + }, + "ListNodePoolsResponse": { + "properties": { + "nodePools": { + "description": "A list of node pools for a cluster.", + "type": "array", + "items": { + "$ref": "NodePool" + } + } + }, + "id": "ListNodePoolsResponse", + "description": "ListNodePoolsResponse is the result of ListNodePoolsRequest.", + "type": "object" + }, + "CompleteIPRotationRequest": { + "description": "CompleteIPRotationRequest moves the cluster master back into single-IP mode.", + "type": "object", + "properties": {}, + "id": "CompleteIPRotationRequest" + }, + "StartIPRotationRequest": { + "type": "object", + "properties": {}, + "id": "StartIPRotationRequest", + "description": "StartIPRotationRequest creates a new IP for the cluster and then performs\na node upgrade on each node pool to point to the new IP." + }, + "LegacyAbac": { + "description": "Configuration for the legacy Attribute Based Access Control authorization\nmode.", + "type": "object", + "properties": { + "enabled": { + "description": "Whether the ABAC authorizer is enabled for this cluster. When enabled,\nidentities in the system, including service accounts, nodes, and\ncontrollers, will have statically granted permissions beyond those\nprovided by the RBAC configuration or IAM.", + "type": "boolean" + } + }, + "id": "LegacyAbac" + }, + "SetLabelsRequest": { + "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster", + "type": "object", + "properties": { + "resourceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The labels to set for that cluster.", + "type": "object" + }, + "labelFingerprint": { + "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nContainer Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint.", + "type": "string" + } + }, + "id": "SetLabelsRequest" + }, + "NodePool": { + "description": "NodePool contains the name and configuration for a cluster's node pool.\nNode pools are a set of nodes (i.e. VM's), with a common configuration and\nspecification, under the control of the cluster master. They may have a set\nof Kubernetes labels applied to them, which may be used to reference them\nduring pod scheduling. They may also be resized up or down, to accommodate\nthe workload.", + "type": "object", + "properties": { + "status": { + "description": "[Output only] The status of the nodes in this pool instance.", + "type": "string", + "enumDescriptions": [ + "Not set.", + "The PROVISIONING state indicates the node pool is being created.", + "The RUNNING state indicates the node pool has been created\nand is fully usable.", + "The RUNNING_WITH_ERROR state indicates the node pool has been created\nand is partially usable. Some error state has occurred and some\nfunctionality may be impaired. Customer may need to reissue a request\nor trigger a new update.", + "The RECONCILING state indicates that some work is actively being done on\nthe node pool, such as upgrading node software. Details can\nbe found in the `statusMessage` field.", + "The STOPPING state indicates the node pool is being deleted.", + "The ERROR state indicates the node pool may be unusable. Details\ncan be found in the `statusMessage` field." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PROVISIONING", + "RUNNING", + "RUNNING_WITH_ERROR", + "RECONCILING", + "STOPPING", + "ERROR" + ] + }, + "config": { + "$ref": "NodeConfig", + "description": "The node configuration of the pool." + }, + "name": { + "description": "The name of the node pool.", + "type": "string" + }, + "statusMessage": { + "description": "[Output only] Additional information about the current status of this\nnode pool instance, if available.", + "type": "string" + }, + "autoscaling": { + "$ref": "NodePoolAutoscaling", + "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present." + }, + "management": { + "$ref": "NodeManagement", + "description": "NodeManagement configuration for this NodePool." + }, + "initialNodeCount": { + "description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.", + "format": "int32", + "type": "integer" + }, + "selfLink": { + "description": "[Output only] Server-defined URL for the resource.", + "type": "string" + }, + "instanceGroupUrls": { + "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\nnode pool.", + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "description": "[Output only] The version of the Kubernetes of this node.", + "type": "string" + } + }, + "id": "NodePool" + }, + "NodeManagement": { + "description": "NodeManagement defines the set of node management services turned on for the\nnode pool.", + "type": "object", + "properties": { + "upgradeOptions": { + "$ref": "AutoUpgradeOptions", + "description": "Specifies the Auto Upgrade knobs for the node pool." + }, + "autoUpgrade": { + "description": "A flag that specifies whether node auto-upgrade is enabled for the node\npool. If enabled, node auto-upgrade helps keep the nodes in your node pool\nup to date with the latest release version of Kubernetes.", + "type": "boolean" + }, + "autoRepair": { + "description": "A flag that specifies whether the node auto-repair is enabled for the node\npool. If enabled, the nodes in this node pool will be monitored and, if\nthey fail health checks too many times, an automatic repair action will be\ntriggered.", + "type": "boolean" + } + }, + "id": "NodeManagement" + }, + "CancelOperationRequest": { + "description": "CancelOperationRequest cancels a single operation.", + "type": "object", + "properties": {}, + "id": "CancelOperationRequest" + }, + "SetLegacyAbacRequest": { + "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for\na cluster.", + "type": "object", + "properties": { + "enabled": { + "description": "Whether ABAC authorization will be enabled in the cluster.", + "type": "boolean" + } + }, + "id": "SetLegacyAbacRequest" } - } - } - } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "version": "v1", + "baseUrl": "https://container.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "kind": "discovery#restDescription", + "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", + "servicePath": "", + "rootUrl": "https://container.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "container", + "batchPath": "batch" } diff --git a/etc/api/content/v2/content-api.json b/etc/api/content/v2/content-api.json index 755df2be30..43ca1e2b0b 100644 --- a/etc/api/content/v2/content-api.json +++ b/etc/api/content/v2/content-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/VEEyLOh5uQoE1GRmT6bPbJj1uoA\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/BclkybusasZymwfyrM_IDMj_UwU\"", "discoveryVersion": "v1", "id": "content:v2", "name": "content", "canonicalName": "Shopping Content", "version": "v2", - "revision": "20161205", + "revision": "20170519", "title": "Content API for Shopping", "description": "Manages product items, inventory, and Merchant Center accounts for Google Shopping.", "ownerDomain": "google.com", @@ -88,7 +88,7 @@ }, "adwordsLinks": { "type": "array", - "description": "List of linked AdWords accounts, active or pending approval. To create a new link request, add a new link with status active to the list. It will remain is state pending until approved or rejected in the AdWords interface. To delete an active link or to cancel a link request, remove it from the list.", + "description": "List of linked AdWords accounts that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected either in the AdWords interface or through the AdWords API. To delete an active link, or to cancel a link request, remove it from the list.", "items": { "$ref": "AccountAdwordsLink" } @@ -170,370 +170,6 @@ } } }, - "AccountShipping": { - "id": "AccountShipping", - "type": "object", - "description": "The shipping settings of a merchant account.", - "properties": { - "accountId": { - "type": "string", - "description": "The ID of the account to which these account shipping settings belong.", - "format": "uint64", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "carrierRates": { - "type": "array", - "description": "Carrier-based shipping calculations.", - "items": { - "$ref": "AccountShippingCarrierRate" - } - }, - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountShipping\".", - "default": "content#accountShipping" - }, - "locationGroups": { - "type": "array", - "description": "Location groups for shipping.", - "items": { - "$ref": "AccountShippingLocationGroup" - } - }, - "rateTables": { - "type": "array", - "description": "Rate tables definitions.", - "items": { - "$ref": "AccountShippingRateTable" - } - }, - "services": { - "type": "array", - "description": "Shipping services describing shipping fees calculation.", - "items": { - "$ref": "AccountShippingShippingService" - } - } - } - }, - "AccountShippingCarrierRate": { - "id": "AccountShippingCarrierRate", - "type": "object", - "description": "A carrier-calculated shipping rate.", - "properties": { - "carrier": { - "type": "string", - "description": "The carrier that is responsible for the shipping, such as \"UPS\", \"FedEx\", or \"USPS\".", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "carrierService": { - "type": "string", - "description": "The carrier service, such as \"Ground\" or \"2Day\".", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "modifierFlatRate": { - "$ref": "Price", - "description": "Additive shipping rate modifier." - }, - "modifierPercent": { - "type": "string", - "description": "Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character." - }, - "name": { - "type": "string", - "description": "The name of the carrier rate.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "saleCountry": { - "type": "string", - "description": "The sale country for which this carrier rate is valid, represented as a CLDR territory code.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "shippingOrigin": { - "type": "string", - "description": "Shipping origin represented as a postal code.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - } - } - }, - "AccountShippingCondition": { - "id": "AccountShippingCondition", - "type": "object", - "properties": { - "deliveryLocationGroup": { - "type": "string", - "description": "Delivery location in terms of a location group name. A location group with this name must be specified among location groups." - }, - "deliveryLocationId": { - "type": "string", - "description": "Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities.", - "format": "int64" - }, - "deliveryPostalCode": { - "type": "string", - "description": "Delivery location in terms of a postal code." - }, - "deliveryPostalCodeRange": { - "$ref": "AccountShippingPostalCodeRange", - "description": "Delivery location in terms of a postal code range." - }, - "priceMax": { - "$ref": "Price", - "description": "Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive)." - }, - "shippingLabel": { - "type": "string", - "description": "Shipping label of the product. The products with the label are matched." - }, - "weightMax": { - "$ref": "Weight", - "description": "Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive)." - } - } - }, - "AccountShippingLocationGroup": { - "id": "AccountShippingLocationGroup", - "type": "object", - "description": "A user-defined locations group in a given country. All the locations of the group must be of the same type.", - "properties": { - "country": { - "type": "string", - "description": "The CLDR territory code of the country in which this location group is.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "locationIds": { - "type": "array", - "description": "A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities.", - "items": { - "type": "string", - "format": "int64" - } - }, - "name": { - "type": "string", - "description": "The name of the location group.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "postalCodeRanges": { - "type": "array", - "description": "A postal code range representing a city or a set of cities.", - "items": { - "$ref": "AccountShippingPostalCodeRange" - } - }, - "postalCodes": { - "type": "array", - "description": "A postal code representing a city or a set of cities. \n- A single postal code (e.g., 12345)\n- A postal code prefix followed by a star (e.g., 1234*)", - "items": { - "type": "string" - } - } - } - }, - "AccountShippingPostalCodeRange": { - "id": "AccountShippingPostalCodeRange", - "type": "object", - "description": "A postal code range, that can be either: \n- A range of postal codes (e.g., start=12340, end=12359)\n- A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid).", - "properties": { - "end": { - "type": "string", - "description": "The last (inclusive) postal code or prefix of the range.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "start": { - "type": "string", - "description": "The first (inclusive) postal code or prefix of the range.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - } - } - }, - "AccountShippingRateTable": { - "id": "AccountShippingRateTable", - "type": "object", - "description": "A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels.", - "properties": { - "content": { - "type": "array", - "description": "One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs).", - "items": { - "$ref": "AccountShippingRateTableCell" - } - }, - "name": { - "type": "string", - "description": "The name of the rate table.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "saleCountry": { - "type": "string", - "description": "The sale country for which this table is valid, represented as a CLDR territory code.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - } - } - }, - "AccountShippingRateTableCell": { - "id": "AccountShippingRateTableCell", - "type": "object", - "properties": { - "condition": { - "$ref": "AccountShippingCondition", - "description": "Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension." - }, - "rate": { - "$ref": "Price", - "description": "The rate applicable if the cell conditions are matched.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - } - } - }, - "AccountShippingShippingService": { - "id": "AccountShippingShippingService", - "type": "object", - "description": "Shipping services provided in a country.", - "properties": { - "active": { - "type": "boolean", - "description": "Whether the shipping service is available." - }, - "calculationMethod": { - "$ref": "AccountShippingShippingServiceCalculationMethod", - "description": "Calculation method for the \"simple\" case that needs no rules." - }, - "costRuleTree": { - "$ref": "AccountShippingShippingServiceCostRule", - "description": "Decision tree for \"complicated\" shipping cost calculation." - }, - "maxDaysInTransit": { - "type": "string", - "description": "The maximum number of days in transit. Must be a value between 0 and 250 included. A value of 0 means same day delivery.", - "format": "uint64" - }, - "minDaysInTransit": { - "type": "string", - "description": "The minimum number of days in transit. Must be a value between 0 and maxDaysIntransit included. A value of 0 means same day delivery.", - "format": "uint64" - }, - "name": { - "type": "string", - "description": "The name of this shipping service.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - }, - "saleCountry": { - "type": "string", - "description": "The CLDR territory code of the sale country for which this service can be used.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } - } - } - }, - "AccountShippingShippingServiceCalculationMethod": { - "id": "AccountShippingShippingServiceCalculationMethod", - "type": "object", - "description": "Shipping cost calculation method. Exactly one of the field is set.", - "properties": { - "carrierRate": { - "type": "string", - "description": "Name of the carrier rate to use for the calculation." - }, - "excluded": { - "type": "boolean", - "description": "Delivery is excluded. Valid only within cost rules tree." - }, - "flatRate": { - "$ref": "Price", - "description": "Fixed price shipping, represented as a floating point number associated with a currency." - }, - "percentageRate": { - "type": "string", - "description": "Percentage of the price, represented as a floating point number without the percentage character." - }, - "rateTable": { - "type": "string", - "description": "Name of the rate table to use for the calculation." - } - } - }, - "AccountShippingShippingServiceCostRule": { - "id": "AccountShippingShippingServiceCostRule", - "type": "object", - "description": "Building block of the cost calculation decision tree. \n- The tree root should have no condition and no calculation method.\n- All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals.\n- The last child of an element must have no condition and matches all elements not previously matched.\n- Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children.", - "properties": { - "calculationMethod": { - "$ref": "AccountShippingShippingServiceCalculationMethod", - "description": "Final calculation method to be used only in leaf nodes." - }, - "children": { - "type": "array", - "description": "Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all.", - "items": { - "$ref": "AccountShippingShippingServiceCostRule" - } - }, - "condition": { - "$ref": "AccountShippingCondition", - "description": "Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all." - } - } - }, "AccountStatus": { "id": "AccountStatus", "type": "object", @@ -554,6 +190,10 @@ "type": "string", "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountStatus\".", "default": "content#accountStatus" + }, + "websiteClaimed": { + "type": "boolean", + "description": "Whether the account's website is claimed or not." } } }, @@ -565,6 +205,10 @@ "type": "string", "description": "Country for which this issue is reported." }, + "detail": { + "type": "string", + "description": "A more detailed description of the issue." + }, "displayedValue": { "type": "string", "description": "Actual value displayed on the landing page." @@ -584,6 +228,10 @@ "type": "string", "description": "Last time the account was checked for this issue." }, + "location": { + "type": "string", + "description": "The attribute name that is relevant for the issue." + }, "numItems": { "type": "integer", "description": "Number of items in the account found to have the said issue.", @@ -720,6 +368,17 @@ } } }, + "AccountsClaimWebsiteResponse": { + "id": "AccountsClaimWebsiteResponse", + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountsClaimWebsiteResponse\".", + "default": "content#accountsClaimWebsiteResponse" + } + } + }, "AccountsCustomBatchRequest": { "id": "AccountsCustomBatchRequest", "type": "object", @@ -744,7 +403,7 @@ }, "accountId": { "type": "string", - "description": "The ID of the account to get or delete. Only defined if the method is get or delete.", + "description": "The ID of the targeted account. Only defined if the method is get, delete or claimwebsite.", "format": "uint64" }, "batchId": { @@ -759,6 +418,10 @@ }, "method": { "type": "string" + }, + "overwrite": { + "type": "boolean", + "description": "Only applicable if the method is claimwebsite. Indicates whether or not to take the claim from another account in case there is a conflict." } } }, @@ -787,7 +450,7 @@ "properties": { "account": { "$ref": "Account", - "description": "The retrieved, created, or updated account. Not defined if the method was delete." + "description": "The retrieved, created, or updated account. Not defined if the method was delete or claimwebsite." }, "batchId": { "type": "integer", @@ -826,112 +489,6 @@ } } }, - "AccountshippingCustomBatchRequest": { - "id": "AccountshippingCustomBatchRequest", - "type": "object", - "properties": { - "entries": { - "type": "array", - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "AccountshippingCustomBatchRequestEntry" - } - } - } - }, - "AccountshippingCustomBatchRequestEntry": { - "id": "AccountshippingCustomBatchRequestEntry", - "type": "object", - "description": "A batch entry encoding a single non-batch accountshipping request.", - "properties": { - "accountId": { - "type": "string", - "description": "The ID of the account for which to get/update account shipping settings.", - "format": "uint64" - }, - "accountShipping": { - "$ref": "AccountShipping", - "description": "The account shipping settings to update. Only defined if the method is update." - }, - "batchId": { - "type": "integer", - "description": "An entry ID, unique within the batch request.", - "format": "uint32" - }, - "merchantId": { - "type": "string", - "description": "The ID of the managing account.", - "format": "uint64" - }, - "method": { - "type": "string" - } - } - }, - "AccountshippingCustomBatchResponse": { - "id": "AccountshippingCustomBatchResponse", - "type": "object", - "properties": { - "entries": { - "type": "array", - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "AccountshippingCustomBatchResponseEntry" - } - }, - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountshippingCustomBatchResponse\".", - "default": "content#accountshippingCustomBatchResponse" - } - } - }, - "AccountshippingCustomBatchResponseEntry": { - "id": "AccountshippingCustomBatchResponseEntry", - "type": "object", - "description": "A batch entry encoding a single non-batch accountshipping response.", - "properties": { - "accountShipping": { - "$ref": "AccountShipping", - "description": "The retrieved or updated account shipping settings." - }, - "batchId": { - "type": "integer", - "description": "The ID of the request entry this entry responds to.", - "format": "uint32" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." - }, - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountshippingCustomBatchResponseEntry\".", - "default": "content#accountshippingCustomBatchResponseEntry" - } - } - }, - "AccountshippingListResponse": { - "id": "AccountshippingListResponse", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"content#accountshippingListResponse\".", - "default": "content#accountshippingListResponse" - }, - "nextPageToken": { - "type": "string", - "description": "The token for the retrieval of the next page of account shipping settings." - }, - "resources": { - "type": "array", - "items": { - "$ref": "AccountShipping" - } - } - } - }, "AccountstatusesCustomBatchRequest": { "id": "AccountstatusesCustomBatchRequest", "type": "object", @@ -1207,7 +764,7 @@ }, "contentType": { "type": "string", - "description": "The type of data feed.", + "description": "The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported.", "annotations": { "required": [ "content.datafeeds.insert", @@ -4319,7 +3876,7 @@ "ShippingsettingsCustomBatchRequestEntry": { "id": "ShippingsettingsCustomBatchRequestEntry", "type": "object", - "description": "A batch entry encoding a single non-batch accountshipping request.", + "description": "A batch entry encoding a single non-batch shippingsettings request.", "properties": { "accountId": { "type": "string", @@ -4768,21 +4325,11 @@ "properties": { "unit": { "type": "string", - "description": "The weight unit.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } + "description": "The weight unit." }, "value": { "type": "string", - "description": "The weight represented as a number.", - "annotations": { - "required": [ - "content.accountshipping.update" - ] - } + "description": "The weight represented as a number." } } } @@ -4802,6 +4349,43 @@ "https://www.googleapis.com/auth/content" ] }, + "claimwebsite": { + "id": "content.accounts.claimwebsite", + "path": "{merchantId}/accounts/{accountId}/claimwebsite", + "httpMethod": "POST", + "description": "Claims the website of a Merchant Center sub-account. This method can only be called for multi-client accounts.", + "parameters": { + "accountId": { + "type": "string", + "description": "The ID of the account whose website is claimed.", + "required": true, + "format": "uint64", + "location": "path" + }, + "merchantId": { + "type": "string", + "description": "The ID of the managing account.", + "required": true, + "format": "uint64", + "location": "path" + }, + "overwrite": { + "type": "boolean", + "description": "Flag to remove any existing claim on the requested website by another account and replace it with a claim from this account.", + "location": "query" + } + }, + "parameterOrder": [ + "merchantId", + "accountId" + ], + "response": { + "$ref": "AccountsClaimWebsiteResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, "custombatch": { "id": "content.accounts.custombatch", "path": "accounts/batch", @@ -4961,7 +4545,7 @@ "id": "content.accounts.patch", "path": "{merchantId}/accounts/{accountId}", "httpMethod": "PATCH", - "description": "Updates a Merchant Center account. This method can only be called for multi-client accounts. This method supports patch semantics.", + "description": "Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. This method supports patch semantics.", "parameters": { "accountId": { "type": "string", @@ -5001,7 +4585,7 @@ "id": "content.accounts.update", "path": "{merchantId}/accounts/{accountId}", "httpMethod": "PUT", - "description": "Updates a Merchant Center account. This method can only be called for multi-client accounts.", + "description": "Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account.", "parameters": { "accountId": { "type": "string", @@ -5039,179 +4623,6 @@ } } }, - "accountshipping": { - "methods": { - "custombatch": { - "id": "content.accountshipping.custombatch", - "path": "accountshipping/batch", - "httpMethod": "POST", - "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", - "parameters": { - "dryRun": { - "type": "boolean", - "description": "Flag to run the request in dry-run mode.", - "location": "query" - } - }, - "request": { - "$ref": "AccountshippingCustomBatchRequest" - }, - "response": { - "$ref": "AccountshippingCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "id": "content.accountshipping.get", - "path": "{merchantId}/accountshipping/{accountId}", - "httpMethod": "GET", - "description": "Retrieves the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account.", - "parameters": { - "accountId": { - "type": "string", - "description": "The ID of the account for which to get/update account shipping settings.", - "required": true, - "format": "uint64", - "location": "path" - }, - "merchantId": { - "type": "string", - "description": "The ID of the managing account.", - "required": true, - "format": "uint64", - "location": "path" - } - }, - "parameterOrder": [ - "merchantId", - "accountId" - ], - "response": { - "$ref": "AccountShipping" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "id": "content.accountshipping.list", - "path": "{merchantId}/accountshipping", - "httpMethod": "GET", - "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts.", - "parameters": { - "maxResults": { - "type": "integer", - "description": "The maximum number of shipping settings to return in the response, used for paging.", - "format": "uint32", - "location": "query" - }, - "merchantId": { - "type": "string", - "description": "The ID of the managing account.", - "required": true, - "format": "uint64", - "location": "path" - }, - "pageToken": { - "type": "string", - "description": "The token returned by the previous request.", - "location": "query" - } - }, - "parameterOrder": [ - "merchantId" - ], - "response": { - "$ref": "AccountshippingListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "patch": { - "id": "content.accountshipping.patch", - "path": "{merchantId}/accountshipping/{accountId}", - "httpMethod": "PATCH", - "description": "Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. This method supports patch semantics.", - "parameters": { - "accountId": { - "type": "string", - "description": "The ID of the account for which to get/update account shipping settings.", - "required": true, - "format": "uint64", - "location": "path" - }, - "dryRun": { - "type": "boolean", - "description": "Flag to run the request in dry-run mode.", - "location": "query" - }, - "merchantId": { - "type": "string", - "description": "The ID of the managing account.", - "required": true, - "format": "uint64", - "location": "path" - } - }, - "parameterOrder": [ - "merchantId", - "accountId" - ], - "request": { - "$ref": "AccountShipping" - }, - "response": { - "$ref": "AccountShipping" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "update": { - "id": "content.accountshipping.update", - "path": "{merchantId}/accountshipping/{accountId}", - "httpMethod": "PUT", - "description": "Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account.", - "parameters": { - "accountId": { - "type": "string", - "description": "The ID of the account for which to get/update account shipping settings.", - "required": true, - "format": "uint64", - "location": "path" - }, - "dryRun": { - "type": "boolean", - "description": "Flag to run the request in dry-run mode.", - "location": "query" - }, - "merchantId": { - "type": "string", - "description": "The ID of the managing account.", - "required": true, - "format": "uint64", - "location": "path" - } - }, - "parameterOrder": [ - "merchantId", - "accountId" - ], - "request": { - "$ref": "AccountShipping" - }, - "response": { - "$ref": "AccountShipping" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, "accountstatuses": { "methods": { "custombatch": { @@ -5925,7 +5336,7 @@ "id": "content.orders.cancel", "path": "{merchantId}/orders/{orderId}/cancel", "httpMethod": "POST", - "description": "Cancels all line items in an order. This method can only be called for non-multi-client accounts.", + "description": "Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts.", "parameters": { "merchantId": { "type": "string", @@ -5959,7 +5370,7 @@ "id": "content.orders.cancellineitem", "path": "{merchantId}/orders/{orderId}/cancelLineItem", "httpMethod": "POST", - "description": "Cancels a line item. This method can only be called for non-multi-client accounts.", + "description": "Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts.", "parameters": { "merchantId": { "type": "string", @@ -6572,6 +5983,13 @@ "path": "productstatuses/batch", "httpMethod": "POST", "description": "Gets the statuses of multiple products in a single request. This method can only be called for non-multi-client accounts.", + "parameters": { + "includeAttributes": { + "type": "boolean", + "description": "Flag to include full product data in the results of this request. The default value is false.", + "location": "query" + } + }, "request": { "$ref": "ProductstatusesCustomBatchRequest" }, @@ -6588,6 +6006,11 @@ "httpMethod": "GET", "description": "Gets the status of a product from your Merchant Center account. This method can only be called for non-multi-client accounts.", "parameters": { + "includeAttributes": { + "type": "boolean", + "description": "Flag to include full product data in the result of this get request. The default value is false.", + "location": "query" + }, "merchantId": { "type": "string", "description": "The ID of the managing account.", @@ -6619,6 +6042,11 @@ "httpMethod": "GET", "description": "Lists the statuses of the products in your Merchant Center account. This method can only be called for non-multi-client accounts.", "parameters": { + "includeAttributes": { + "type": "boolean", + "description": "Flag to include full product data in the results of the list request. The default value is false.", + "location": "query" + }, "includeInvalidInsertedItems": { "type": "boolean", "description": "Flag to include the invalid inserted items in the result of the list request. By default the invalid items are not shown (the default value is false).", diff --git a/etc/api/content/v2sandbox/content-api.json b/etc/api/content/v2sandbox/content-api.json index 8c73a4b245..bb5d14c077 100644 --- a/etc/api/content/v2sandbox/content-api.json +++ b/etc/api/content/v2sandbox/content-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/W1AQ-5FwbPweFAs-GFJ9Ju07xes\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/nn4zZjTupvVB_YDH6azVBTMwJuk\"", "discoveryVersion": "v1", "id": "content:v2sandbox", "name": "content", "canonicalName": "Shopping Content", "version": "v2sandbox", - "revision": "20161205", + "revision": "20170519", "title": "Content API for Shopping", "description": "Manages product items, inventory, and Merchant Center accounts for Google Shopping.", "ownerDomain": "google.com", @@ -1788,7 +1788,7 @@ "id": "content.orders.cancel", "path": "{merchantId}/orders/{orderId}/cancel", "httpMethod": "POST", - "description": "Cancels all line items in an order. This method can only be called for non-multi-client accounts.", + "description": "Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts.", "parameters": { "merchantId": { "type": "string", @@ -1822,7 +1822,7 @@ "id": "content.orders.cancellineitem", "path": "{merchantId}/orders/{orderId}/cancelLineItem", "httpMethod": "POST", - "description": "Cancels a line item. This method can only be called for non-multi-client accounts.", + "description": "Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts.", "parameters": { "merchantId": { "type": "string", diff --git a/etc/api/customsearch/v1/customsearch-api.json b/etc/api/customsearch/v1/customsearch-api.json index 6463cace45..a24c4351aa 100644 --- a/etc/api/customsearch/v1/customsearch-api.json +++ b/etc/api/customsearch/v1/customsearch-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/2gL3A40IBu11GP9xmmdXxrLKXPg\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/2gL3A40IBu11GP9xmmdXxrLKXPg\"", "discoveryVersion": "v1", "id": "customsearch:v1", "name": "customsearch", diff --git a/etc/api/dataflow/v1b3/dataflow-api.json b/etc/api/dataflow/v1b3/dataflow-api.json index b41dce8d2d..3cc958e423 100644 --- a/etc/api/dataflow/v1b3/dataflow-api.json +++ b/etc/api/dataflow/v1b3/dataflow-api.json @@ -1,3730 +1,4962 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/2ldmPeHEvQ6NGgRE1Cb3tnvrYr8\"", - "discoveryVersion": "v1", - "id": "dataflow:v1b3", - "name": "dataflow", - "version": "v1b3", - "revision": "20161004", - "title": "Google Dataflow API", - "description": "Develops and executes data processing patterns like ETL, batch computation, and continuous computation.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/dataflow", - "protocol": "rest", - "baseUrl": "https://dataflow.googleapis.com/", - "basePath": "", - "rootUrl": "https://dataflow.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/userinfo.email": { - "description": "View your email address" - } - } - } - }, - "schemas": { - "GetDebugConfigRequest": { - "id": "GetDebugConfigRequest", - "type": "object", - "description": "Request to get updated debug configuration for component.", - "properties": { - "workerId": { - "type": "string", - "description": "The worker id, i.e., VM hostname." - }, - "componentId": { - "type": "string", - "description": "The internal component id for which debug configuration is requested." - } - } - }, - "GetDebugConfigResponse": { - "id": "GetDebugConfigResponse", - "type": "object", - "description": "Response to a get debug configuration request.", - "properties": { - "config": { - "type": "string", - "description": "The encoded debug configuration for the requested component." - } - } - }, - "SendDebugCaptureRequest": { - "id": "SendDebugCaptureRequest", - "type": "object", - "description": "Request to send encoded debug information.", - "properties": { - "workerId": { - "type": "string", - "description": "The worker id, i.e., VM hostname." - }, - "componentId": { - "type": "string", - "description": "The internal component id for which debug information is sent." - }, - "data": { - "type": "string", - "description": "The encoded debug information." - } - } - }, - "SendDebugCaptureResponse": { - "id": "SendDebugCaptureResponse", - "type": "object", - "description": "Response to a send capture request. nothing" - }, - "Job": { - "id": "Job", - "type": "object", - "description": "Defines a job to be run by the Dataflow service.", - "properties": { - "id": { - "type": "string", - "description": "The unique ID of this job. This field is set by the Dataflow service when the Job is created, and is immutable for the life of the Job." - }, - "projectId": { - "type": "string", - "description": "The project which owns the job." - }, - "name": { - "type": "string", - "description": "The user-specified Dataflow job name. Only one Job with a given name may exist in a project at any given time. If a caller attempts to create a Job with the same name as an already-existing Job, the attempt will return the existing Job. The name must match the regular expression [a-z]([-a-z0-9]{0,38}[a-z0-9])?" - }, - "type": { - "type": "string", - "description": "The type of dataflow job.", - "enum": [ - "JOB_TYPE_UNKNOWN", - "JOB_TYPE_BATCH", - "JOB_TYPE_STREAMING" - ] - }, - "environment": { - "$ref": "Environment", - "description": "Environment for the job." - }, - "steps": { - "type": "array", - "description": "The top-level steps that constitute the entire job.", - "items": { - "$ref": "Step" - } - }, - "currentState": { - "type": "string", - "description": "The current state of the job. Jobs are created in the JOB_STATE_STOPPED state unless otherwise specified. A job in the JOB_STATE_RUNNING state may asynchronously enter a terminal state. Once a job has reached a terminal state, no further state updates may be made. This field may be mutated by the Dataflow service; callers cannot mutate it.", - "enum": [ - "JOB_STATE_UNKNOWN", - "JOB_STATE_STOPPED", - "JOB_STATE_RUNNING", - "JOB_STATE_DONE", - "JOB_STATE_FAILED", - "JOB_STATE_CANCELLED", - "JOB_STATE_UPDATED", - "JOB_STATE_DRAINING", - "JOB_STATE_DRAINED" - ] - }, - "currentStateTime": { - "type": "string", - "description": "The timestamp associated with the current state." - }, - "requestedState": { - "type": "string", - "description": "The job's requested state. UpdateJob may be used to switch between the JOB_STATE_STOPPED and JOB_STATE_RUNNING states, by setting requested_state. UpdateJob may also be used to directly set a job's requested state to JOB_STATE_CANCELLED or JOB_STATE_DONE, irrevocably terminating the job if it has not already reached a terminal state.", - "enum": [ - "JOB_STATE_UNKNOWN", - "JOB_STATE_STOPPED", - "JOB_STATE_RUNNING", - "JOB_STATE_DONE", - "JOB_STATE_FAILED", - "JOB_STATE_CANCELLED", - "JOB_STATE_UPDATED", - "JOB_STATE_DRAINING", - "JOB_STATE_DRAINED" - ] - }, - "executionInfo": { - "$ref": "JobExecutionInfo", - "description": "Information about how the Dataflow service will actually run the job." - }, - "createTime": { - "type": "string", - "description": "Timestamp when job was initially created. Immutable, set by the Dataflow service." - }, - "replaceJobId": { - "type": "string", - "description": "If this job is an update of an existing job, this field will be the ID of the job it replaced. When sending a CreateJobRequest, you can update a job by specifying it here. The job named here will be stopped, and its intermediate state transferred to this job." - }, - "transformNameMapping": { - "type": "object", - "description": "Map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job.", - "additionalProperties": { - "type": "string" - } - }, - "clientRequestId": { - "type": "string", - "description": "Client's unique identifier of the job, re-used by SDK across retried attempts. If this field is set, the service will ensure its uniqueness. That is, the request to create a job will fail if the service has knowledge of a previously submitted job with the same client's id and job name. The caller may, for example, use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it." - }, - "replacedByJobId": { - "type": "string", - "description": "If another job is an update of this job (and thus, this job is in JOB_STATE_UPDATED), this field will contain the ID of that job." - }, - "tempFiles": { - "type": "array", - "description": "A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}", - "items": { - "type": "string" - } - }, - "labels": { - "type": "object", - "description": "User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \\p{Ll}\\p{Lo}{0,62} * Values must conform to regexp: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63} * Both keys and values are additionally constrained to be \u003c= 128 bytes in size.", - "additionalProperties": { - "type": "string" - } - }, - "location": { - "type": "string", - "description": "The location which contains this job." - } - } - }, - "Environment": { - "id": "Environment", - "type": "object", - "description": "Describes the environment in which a Dataflow Job runs.", - "properties": { - "tempStoragePrefix": { - "type": "string", - "description": "The prefix of the resources the system should use for temporary storage. The system will append the suffix \"/temp-{JOBNAME} to this resource prefix, where {JOBNAME} is the value of the job_name field. The resulting bucket and object prefix is used as the prefix of the resources used to store temporary data needed during the job execution. NOTE: This will override the value in taskrunner_settings. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}" - }, - "clusterManagerApiService": { - "type": "string", - "description": "The type of cluster manager API to use. If unknown or unspecified, the service will attempt to choose a reasonable default. This should be in the form of the API service name, e.g. \"compute.googleapis.com\"." - }, - "experiments": { - "type": "array", - "description": "The list of experiments to enable.", - "items": { - "type": "string" - } - }, - "workerPools": { - "type": "array", - "description": "Worker pools. At least one \"harness\" worker pool must be specified in order for the job to have workers.", - "items": { - "$ref": "WorkerPool" - } - }, - "userAgent": { - "type": "object", - "description": "A description of the process that generated the request.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "version": { - "type": "object", - "description": "A structure describing which components and their versions of the service are required in order to run the job.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "dataset": { - "type": "string", - "description": "The dataset for the current project where various workflow related tables are stored. The supported resource type is: Google BigQuery: bigquery.googleapis.com/{dataset}" - }, - "sdkPipelineOptions": { - "type": "object", - "description": "The Dataflow SDK pipeline options specified by the user. These options are passed through the service and are used to recreate the SDK pipeline options on the worker in a language agnostic and platform independent way.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "internalExperiments": { - "type": "object", - "description": "Experimental settings.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "serviceAccountEmail": { - "type": "string", - "description": "Identity to run virtual machines as. Defaults to the default account." - } - } - }, - "WorkerPool": { - "id": "WorkerPool", - "type": "object", - "description": "Describes one particular pool of Dataflow workers to be instantiated by the Dataflow service in order to perform the computations required by a job. Note that a workflow job may use multiple pools, in order to match the various computational requirements of the various stages of the job.", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the worker pool; currently only 'harness' and 'shuffle' are supported." - }, - "numWorkers": { - "type": "integer", - "description": "Number of Google Compute Engine workers in this pool needed to execute the job. If zero or unspecified, the service will attempt to choose a reasonable default.", - "format": "int32" - }, - "packages": { - "type": "array", - "description": "Packages to be installed on workers.", - "items": { - "$ref": "Package" - } - }, - "defaultPackageSet": { - "type": "string", - "description": "The default package set to install. This allows the service to select a default set of packages which are useful to worker harnesses written in a particular language.", - "enum": [ - "DEFAULT_PACKAGE_SET_UNKNOWN", - "DEFAULT_PACKAGE_SET_NONE", - "DEFAULT_PACKAGE_SET_JAVA", - "DEFAULT_PACKAGE_SET_PYTHON" - ] - }, - "machineType": { - "type": "string", - "description": "Machine type (e.g. \"n1-standard-1\"). If empty or unspecified, the service will attempt to choose a reasonable default." - }, - "teardownPolicy": { - "type": "string", - "description": "Sets the policy for determining when to turndown worker pool. Allowed values are: TEARDOWN_ALWAYS, TEARDOWN_ON_SUCCESS, and TEARDOWN_NEVER. TEARDOWN_ALWAYS means workers are always torn down regardless of whether the job succeeds. TEARDOWN_ON_SUCCESS means workers are torn down if the job succeeds. TEARDOWN_NEVER means the workers are never torn down. If the workers are not torn down by the service, they will continue to run and use Google Compute Engine VM resources in the user's project until they are explicitly terminated by the user. Because of this, Google recommends using the TEARDOWN_ALWAYS policy except for small, manually supervised test jobs. If unknown or unspecified, the service will attempt to choose a reasonable default.", - "enum": [ - "TEARDOWN_POLICY_UNKNOWN", - "TEARDOWN_ALWAYS", - "TEARDOWN_ON_SUCCESS", - "TEARDOWN_NEVER" - ] - }, - "diskSizeGb": { - "type": "integer", - "description": "Size of root disk for VMs, in GB. If zero or unspecified, the service will attempt to choose a reasonable default.", - "format": "int32" - }, - "diskType": { - "type": "string", - "description": "Type of root disk for VMs. If empty or unspecified, the service will attempt to choose a reasonable default." - }, - "diskSourceImage": { - "type": "string", - "description": "Fully qualified source image for disks." - }, - "zone": { - "type": "string", - "description": "Zone to run the worker pools in. If empty or unspecified, the service will attempt to choose a reasonable default." - }, - "taskrunnerSettings": { - "$ref": "TaskRunnerSettings", - "description": "Settings passed through to Google Compute Engine workers when using the standard Dataflow task runner. Users should ignore this field." - }, - "onHostMaintenance": { - "type": "string", - "description": "The action to take on host maintenance, as defined by the Google Compute Engine API." - }, - "dataDisks": { - "type": "array", - "description": "Data disks that are used by a VM in this workflow.", - "items": { - "$ref": "Disk" - } - }, - "metadata": { - "type": "object", - "description": "Metadata to set on the Google Compute Engine VMs.", - "additionalProperties": { - "type": "string" - } - }, - "autoscalingSettings": { - "$ref": "AutoscalingSettings", - "description": "Settings for autoscaling of this WorkerPool." - }, - "poolArgs": { - "type": "object", - "description": "Extra arguments for this worker pool.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "network": { - "type": "string", - "description": "Network to which VMs will be assigned. If empty or unspecified, the service will use the network \"default\"." - }, - "subnetwork": { - "type": "string", - "description": "Subnetwork to which VMs will be assigned, if desired. Expected to be of the form \"regions/REGION/subnetworks/SUBNETWORK\"." - }, - "workerHarnessContainerImage": { - "type": "string", - "description": "Docker container image that executes Dataflow worker harness, residing in Google Container Registry. Required." - }, - "numThreadsPerWorker": { - "type": "integer", - "description": "The number of threads per worker harness. If empty or unspecified, the service will choose a number of threads (according to the number of cores on the selected machine type for batch, or 1 by convention for streaming).", - "format": "int32" - }, - "ipConfiguration": { - "type": "string", - "description": "Configuration for VM IPs.", - "enum": [ - "WORKER_IP_UNSPECIFIED", - "WORKER_IP_PUBLIC", - "WORKER_IP_PRIVATE" - ] - } - } - }, - "Package": { - "id": "Package", - "type": "object", - "description": "Packages that need to be installed in order for a worker to run the steps of the Dataflow job which will be assigned to its worker pool. This is the mechanism by which the SDK causes code to be loaded onto the workers. For example, the Dataflow Java SDK might use this to install jars containing the user's code and all of the various dependencies (libraries, data files, etc) required in order for that code to run.", - "properties": { - "name": { - "type": "string", - "description": "The name of the package." - }, - "location": { - "type": "string", - "description": "The resource to read the package from. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket} bucket.storage.googleapis.com/" - } - } - }, - "TaskRunnerSettings": { - "id": "TaskRunnerSettings", - "type": "object", - "description": "Taskrunner configuration settings.", - "properties": { - "taskUser": { - "type": "string", - "description": "The UNIX user ID on the worker VM to use for tasks launched by taskrunner; e.g. \"root\"." - }, - "taskGroup": { - "type": "string", - "description": "The UNIX group ID on the worker VM to use for tasks launched by taskrunner; e.g. \"wheel\"." - }, - "oauthScopes": { - "type": "array", - "description": "OAuth2 scopes to be requested by the taskrunner in order to access the dataflow API.", - "items": { - "type": "string" - } - }, - "baseUrl": { - "type": "string", - "description": "The base URL for the taskrunner to use when accessing Google Cloud APIs. When workers access Google Cloud APIs, they logically do so via relative URLs. If this field is specified, it supplies the base URL to use for resolving these relative URLs. The normative algorithm used is defined by RFC 1808, \"Relative Uniform Resource Locators\". If not specified, the default value is \"http://www.googleapis.com/\"" - }, - "dataflowApiVersion": { - "type": "string", - "description": "API version of endpoint, e.g. \"v1b3\"" - }, - "parallelWorkerSettings": { - "$ref": "WorkerSettings", - "description": "Settings to pass to the parallel worker harness." - }, - "baseTaskDir": { - "type": "string", - "description": "Location on the worker for task-specific subdirectories." - }, - "continueOnException": { - "type": "boolean", - "description": "Do we continue taskrunner if an exception is hit?" - }, - "logToSerialconsole": { - "type": "boolean", - "description": "Send taskrunner log into to Google Compute Engine VM serial console?" - }, - "alsologtostderr": { - "type": "boolean", - "description": "Also send taskrunner log info to stderr?" - }, - "logUploadLocation": { - "type": "string", - "description": "Indicates where to put logs. If this is not specified, the logs will not be uploaded. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}" - }, - "logDir": { - "type": "string", - "description": "Directory on the VM to store logs." - }, - "tempStoragePrefix": { - "type": "string", - "description": "The prefix of the resources the taskrunner should use for temporary storage. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}" - }, - "harnessCommand": { - "type": "string", - "description": "Command to launch the worker harness." - }, - "workflowFileName": { - "type": "string", - "description": "Store the workflow in this file." - }, - "commandlinesFileName": { - "type": "string", - "description": "Store preprocessing commands in this file." - }, - "vmId": { - "type": "string", - "description": "ID string of VM." - }, - "languageHint": { - "type": "string", - "description": "Suggested backend language." - }, - "streamingWorkerMainClass": { - "type": "string", - "description": "Streaming worker main class name." - } - } - }, - "WorkerSettings": { - "id": "WorkerSettings", - "type": "object", - "description": "Provides data to pass through to the worker harness.", - "properties": { - "baseUrl": { - "type": "string", - "description": "The base URL for accessing Google Cloud APIs. When workers access Google Cloud APIs, they logically do so via relative URLs. If this field is specified, it supplies the base URL to use for resolving these relative URLs. The normative algorithm used is defined by RFC 1808, \"Relative Uniform Resource Locators\". If not specified, the default value is \"http://www.googleapis.com/\"" - }, - "reportingEnabled": { - "type": "boolean", - "description": "Send work progress updates to service." - }, - "servicePath": { - "type": "string", - "description": "The Dataflow service path relative to the root URL, for example, \"dataflow/v1b3/projects\"." - }, - "shuffleServicePath": { - "type": "string", - "description": "The Shuffle service path relative to the root URL, for example, \"shuffle/v1beta1\"." - }, - "workerId": { - "type": "string", - "description": "ID of the worker running this pipeline." - }, - "tempStoragePrefix": { - "type": "string", - "description": "The prefix of the resources the system should use for temporary storage. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object}" - } - } - }, - "Disk": { - "id": "Disk", - "type": "object", - "description": "Describes the data disk used by a workflow job.", - "properties": { - "sizeGb": { - "type": "integer", - "description": "Size of disk in GB. If zero or unspecified, the service will attempt to choose a reasonable default.", - "format": "int32" - }, - "diskType": { - "type": "string", - "description": "Disk storage type, as defined by Google Compute Engine. This must be a disk type appropriate to the project and zone in which the workers will run. If unknown or unspecified, the service will attempt to choose a reasonable default. For example, the standard persistent disk type is a resource name typically ending in \"pd-standard\". If SSD persistent disks are available, the resource name typically ends with \"pd-ssd\". The actual valid values are defined the Google Compute Engine API, not by the Dataflow API; consult the Google Compute Engine documentation for more information about determining the set of available disk types for a particular project and zone. Google Compute Engine Disk types are local to a particular project in a particular zone, and so the resource name will typically look something like this: compute.googleapis.com/projects/\n/zones//diskTypes/pd-standard" - }, - "mountPoint": { - "type": "string", - "description": "Directory in a VM where disk is mounted." - } - } - }, - "AutoscalingSettings": { - "id": "AutoscalingSettings", - "type": "object", - "description": "Settings for WorkerPool autoscaling.", - "properties": { - "algorithm": { - "type": "string", - "description": "The algorithm to use for autoscaling.", - "enum": [ - "AUTOSCALING_ALGORITHM_UNKNOWN", - "AUTOSCALING_ALGORITHM_NONE", - "AUTOSCALING_ALGORITHM_BASIC" - ] - }, - "maxNumWorkers": { - "type": "integer", - "description": "The maximum number of workers to cap scaling at.", - "format": "int32" - } - } - }, - "Step": { - "id": "Step", - "type": "object", - "description": "Defines a particular step within a Dataflow job. A job consists of multiple steps, each of which performs some specific operation as part of the overall job. Data is typically passed from one step to another as part of the job. Here's an example of a sequence of steps which together implement a Map-Reduce job: * Read a collection of data from some source, parsing the collection's elements. * Validate the elements. * Apply a user-defined function to map each element to some value and extract an element-specific key value. * Group elements with the same key into a single element with that key, transforming a multiply-keyed collection into a uniquely-keyed collection. * Write the elements out to some data sink. (Note that the Dataflow service may be used to run many different types of jobs, not just Map-Reduce).", - "properties": { - "kind": { - "type": "string", - "description": "The kind of step in the dataflow Job." - }, - "name": { - "type": "string", - "description": "Name identifying the step. This must be unique for each step with respect to all other steps in the dataflow Job." - }, - "properties": { - "type": "object", - "description": "Named properties associated with the step. Each kind of predefined step has its own required set of properties.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - } - } - }, - "JobExecutionInfo": { - "id": "JobExecutionInfo", - "type": "object", - "description": "Additional information about how a Dataflow job will be executed which isn’t contained in the submitted job.", - "properties": { - "stages": { - "type": "object", - "description": "A mapping from each stage to the information about that stage.", - "additionalProperties": { - "$ref": "JobExecutionStageInfo" - } - } - } - }, - "JobExecutionStageInfo": { - "id": "JobExecutionStageInfo", - "type": "object", - "description": "Contains information about how a particular google.dataflow.v1beta3.Step will be executed.", - "properties": { - "stepName": { - "type": "array", - "description": "The steps associated with the execution stage. Note that stages may have several steps, and that a given step might be run by more than one stage.", - "items": { - "type": "string" - } - } - } - }, - "ListJobsResponse": { - "id": "ListJobsResponse", - "type": "object", - "description": "Response to a request to list Dataflow jobs. This may be a partial response, depending on the page size in the ListJobsRequest.", - "properties": { - "jobs": { - "type": "array", - "description": "A subset of the requested job information.", - "items": { - "$ref": "Job" - } - }, - "nextPageToken": { - "type": "string", - "description": "Set if there may be more results than fit in this response." - }, - "failedLocation": { - "type": "array", - "description": "Zero or more messages describing locations that failed to respond.", - "items": { - "$ref": "FailedLocation" - } - } - } - }, - "FailedLocation": { - "id": "FailedLocation", - "type": "object", - "description": "FailedLocation indicates which location failed to respond to a request for data.", - "properties": { - "name": { - "type": "string", - "description": "The name of the failed location." - } - } - }, - "ListJobMessagesResponse": { - "id": "ListJobMessagesResponse", - "type": "object", - "description": "Response to a request to list job messages.", - "properties": { - "jobMessages": { - "type": "array", - "description": "Messages in ascending timestamp order.", - "items": { - "$ref": "JobMessage" - } - }, - "nextPageToken": { - "type": "string", - "description": "The token to obtain the next page of results if there are more." - } - } - }, - "JobMessage": { - "id": "JobMessage", - "type": "object", - "description": "A particular message pertaining to a Dataflow job.", - "properties": { - "id": { - "type": "string", - "description": "Identifies the message. This is automatically generated by the service; the caller should treat it as an opaque string." - }, - "time": { - "type": "string", - "description": "The timestamp of the message." - }, - "messageText": { - "type": "string", - "description": "The text of the message." - }, - "messageImportance": { - "type": "string", - "description": "Importance level of the message.", - "enum": [ - "JOB_MESSAGE_IMPORTANCE_UNKNOWN", - "JOB_MESSAGE_DEBUG", - "JOB_MESSAGE_DETAILED", - "JOB_MESSAGE_BASIC", - "JOB_MESSAGE_WARNING", - "JOB_MESSAGE_ERROR" - ] - } - } - }, - "JobMetrics": { - "id": "JobMetrics", - "type": "object", - "description": "JobMetrics contains a collection of metrics descibing the detailed progress of a Dataflow job. Metrics correspond to user-defined and system-defined metrics in the job. This resource captures only the most recent values of each metric; time-series data can be queried for them (under the same metric names) from Cloud Monitoring.", - "properties": { - "metricTime": { - "type": "string", - "description": "Timestamp as of which metric values are current." - }, - "metrics": { - "type": "array", - "description": "All metrics for this job.", - "items": { - "$ref": "MetricUpdate" - } - } - } - }, - "MetricUpdate": { - "id": "MetricUpdate", - "type": "object", - "description": "Describes the state of a metric.", - "properties": { - "name": { - "$ref": "MetricStructuredName", - "description": "Name of the metric." - }, - "kind": { - "type": "string", - "description": "Metric aggregation kind. The possible metric aggregation kinds are \"Sum\", \"Max\", \"Min\", \"Mean\", \"Set\", \"And\", and \"Or\". The specified aggregation kind is case-insensitive. If omitted, this is not an aggregated value but instead a single metric sample value." - }, - "cumulative": { - "type": "boolean", - "description": "True if this metric is reported as the total cumulative aggregate value accumulated since the worker started working on this WorkItem. By default this is false, indicating that this metric is reported as a delta that is not associated with any WorkItem." - }, - "scalar": { - "type": "any", - "description": "Worker-computed aggregate value for aggregation kinds \"Sum\", \"Max\", \"Min\", \"And\", and \"Or\". The possible value types are Long, Double, and Boolean." - }, - "meanSum": { - "type": "any", - "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind. This holds the sum of the aggregated values and is used in combination with mean_count below to obtain the actual mean aggregate value. The only possible value types are Long and Double." - }, - "meanCount": { - "type": "any", - "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind. This holds the count of the aggregated values and is used in combination with mean_sum above to obtain the actual mean aggregate value. The only possible value type is Long." - }, - "set": { - "type": "any", - "description": "Worker-computed aggregate value for the \"Set\" aggregation kind. The only possible value type is a list of Values whose type can be Long, Double, or String, according to the metric's type. All Values in the list must be of the same type." - }, - "internal": { - "type": "any", - "description": "Worker-computed aggregate value for internal use by the Dataflow service." - }, - "updateTime": { - "type": "string", - "description": "Timestamp associated with the metric value. Optional when workers are reporting work progress; it will be filled in responses from the metrics API." - } - } - }, - "MetricStructuredName": { - "id": "MetricStructuredName", - "type": "object", - "description": "Identifies a metric, by describing the source which generated the metric.", - "properties": { - "origin": { - "type": "string", - "description": "Origin (namespace) of metric name. May be blank for user-define metrics; will be \"dataflow\" for metrics defined by the Dataflow service or SDK." - }, - "name": { - "type": "string", - "description": "Worker-defined metric name." - }, - "context": { - "type": "object", - "description": "Zero or more labeled fields which identify the part of the job this metric is associated with, such as the name of a step or collection. For example, built-in counters associated with steps will have context['step'] = . Counters associated with PCollections in the SDK will have context['pcollection'] =\n.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "CreateJobFromTemplateRequest": { - "id": "CreateJobFromTemplateRequest", - "type": "object", - "description": "Request to create a Dataflow job.", - "properties": { - "jobName": { - "type": "string", - "description": "The job name to use for the created job.." - }, - "gcsPath": { - "type": "string", - "description": "A path to the serialized JSON representation of the job." - }, - "parameters": { - "type": "object", - "description": "Dynamic parameterization of the job's runtime environment.", - "additionalProperties": { - "type": "string" - } - }, - "environment": { - "$ref": "RuntimeEnvironment", - "description": "Runtime environment for the job." - } - } - }, - "RuntimeEnvironment": { - "id": "RuntimeEnvironment", - "type": "object", - "description": "Environment values to set at runtime.", - "properties": { - "maxWorkers": { - "type": "integer", - "description": "The maximum number of workers to start for the job.", - "format": "int32" - }, - "zone": { - "type": "string", - "description": "The zone to start the workers in." - }, - "serviceAccountEmail": { - "type": "string", - "description": "The service account to run the job as." - } - } - }, - "ReportWorkItemStatusRequest": { - "id": "ReportWorkItemStatusRequest", - "type": "object", - "description": "Request to report the status of WorkItems.", - "properties": { - "workerId": { - "type": "string", - "description": "The ID of the worker reporting the WorkItem status. If this does not match the ID of the worker which the Dataflow service believes currently has the lease on the WorkItem, the report will be dropped (with an error response)." - }, - "workItemStatuses": { - "type": "array", - "description": "The order is unimportant, except that the order of the WorkItemServiceState messages in the ReportWorkItemStatusResponse corresponds to the order of WorkItemStatus messages here.", - "items": { - "$ref": "WorkItemStatus" - } - }, - "currentWorkerTime": { - "type": "string", - "description": "The current timestamp at the worker." - }, - "location": { - "type": "string", - "description": "The location which contains the WorkItem's job." - } - } - }, - "WorkItemStatus": { - "id": "WorkItemStatus", - "type": "object", - "description": "Conveys a worker's progress through the work described by a WorkItem.", - "properties": { - "workItemId": { - "type": "string", - "description": "Identifies the WorkItem." - }, - "reportIndex": { - "type": "string", - "description": "The report index. When a WorkItem is leased, the lease will contain an initial report index. When a WorkItem's status is reported to the system, the report should be sent with that report index, and the response will contain the index the worker should use for the next report. Reports received with unexpected index values will be rejected by the service. In order to preserve idempotency, the worker should not alter the contents of a report, even if the worker must submit the same report multiple times before getting back a response. The worker should not submit a subsequent report until the response for the previous report had been received from the service.", - "format": "int64" - }, - "requestedLeaseDuration": { - "type": "string", - "description": "Amount of time the worker requests for its lease." - }, - "completed": { - "type": "boolean", - "description": "True if the WorkItem was completed (successfully or unsuccessfully)." - }, - "errors": { - "type": "array", - "description": "Specifies errors which occurred during processing. If errors are provided, and completed = true, then the WorkItem is considered to have failed.", - "items": { - "$ref": "Status" - } - }, - "counterUpdates": { - "type": "array", - "description": "Worker output counters for this WorkItem.", - "items": { - "$ref": "CounterUpdate" - } - }, - "metricUpdates": { - "type": "array", - "description": "DEPRECATED in favor of counter_updates.", - "items": { - "$ref": "MetricUpdate" - } - }, - "reportedProgress": { - "$ref": "ApproximateReportedProgress", - "description": "The worker's progress through this WorkItem." - }, - "stopPosition": { - "$ref": "Position", - "description": "A worker may split an active map task in two parts, \"primary\" and \"residual\", continuing to process the primary part and returning the residual part into the pool of available work. This event is called a \"dynamic split\" and is critical to the dynamic work rebalancing feature. The two obtained sub-tasks are called \"parts\" of the split. The parts, if concatenated, must represent the same input as would be read by the current task if the split did not happen. The exact way in which the original task is decomposed into the two parts is specified either as a position demarcating them (stop_position), or explicitly as two DerivedSources, if this task consumes a user-defined source type (dynamic_source_split). The \"current\" task is adjusted as a result of the split: after a task with range [A, B) sends a stop_position update at C, its range is considered to be [A, C), e.g.: * Progress should be interpreted relative to the new range, e.g. \"75% completed\" means \"75% of [A, C) completed\" * The worker should interpret proposed_stop_position relative to the new range, e.g. \"split at 68%\" should be interpreted as \"split at 68% of [A, C)\". * If the worker chooses to split again using stop_position, only stop_positions in [A, C) will be accepted. * Etc. dynamic_source_split has similar semantics: e.g., if a task with source S splits using dynamic_source_split into {P, R} (where P and R must be together equivalent to S), then subsequent progress and proposed_stop_position should be interpreted relative to P, and in a potential subsequent dynamic_source_split into {P', R'}, P' and R' must be together equivalent to P, etc." - }, - "dynamicSourceSplit": { - "$ref": "DynamicSourceSplit", - "description": "See documentation of stop_position." - }, - "sourceOperationResponse": { - "$ref": "SourceOperationResponse", - "description": "If the work item represented a SourceOperationRequest, and the work is completed, contains the result of the operation." - }, - "sourceFork": { - "$ref": "SourceFork", - "description": "DEPRECATED in favor of dynamic_source_split." - }, - "progress": { - "$ref": "ApproximateProgress", - "description": "DEPRECATED in favor of reported_progress." - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "ownerDomain": "google.com", + "name": "dataflow", + "batchPath": "batch", + "id": "dataflow:v1b3", + "documentationLink": "https://cloud.google.com/dataflow", + "revision": "20170520", + "title": "Google Dataflow API", + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { + "projects": { + "methods": { + "workerMessages": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "SendWorkerMessagesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The project to send the WorkerMessages to.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/WorkerMessages", + "id": "dataflow.projects.workerMessages", + "path": "v1b3/projects/{projectId}/WorkerMessages", + "description": "Send a worker_message to the service.", + "request": { + "$ref": "SendWorkerMessagesRequest" + } + } + }, + "resources": { + "templates": { + "methods": { + "launch": { + "flatPath": "v1b3/projects/{projectId}/templates:launch", + "id": "dataflow.projects.templates.launch", + "path": "v1b3/projects/{projectId}/templates:launch", + "request": { + "$ref": "LaunchTemplateParameters" + }, + "description": "Launch a template.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "LaunchTemplateResponse" + }, + "parameters": { + "validateOnly": { + "description": "If true, the request is validated but not actually executed.\nDefaults to false.", + "type": "boolean", + "location": "query" + }, + "projectId": { + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "gcsPath": { + "description": "Required. A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", + "type": "string", + "location": "query" + }, + "location": { + "location": "query", + "description": "The location to which to direct the request.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ] + }, + "get": { + "response": { + "$ref": "GetTemplateResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "location": "path", + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "view": { + "location": "query", + "enum": [ + "METADATA_ONLY" + ], + "description": "The view to retrieve. Defaults to METADATA_ONLY.", + "type": "string" + }, + "gcsPath": { + "location": "query", + "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", + "type": "string" + }, + "location": { + "description": "The location to which to direct the request.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/templates:get", + "path": "v1b3/projects/{projectId}/templates:get", + "id": "dataflow.projects.templates.get", + "description": "Get the template associated with a template." + }, + "create": { + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/templates", + "path": "v1b3/projects/{projectId}/templates", + "id": "dataflow.projects.templates.create", + "description": "Creates a Cloud Dataflow job from a template.", + "request": { + "$ref": "CreateJobFromTemplateRequest" + } + } + } + }, + "locations": { + "methods": { + "workerMessages": { + "request": { + "$ref": "SendWorkerMessagesRequest" + }, + "description": "Send a worker_message to the service.", + "response": { + "$ref": "SendWorkerMessagesResponse" + }, + "parameterOrder": [ + "projectId", + "location" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The project to send the WorkerMessages to.", + "required": true, + "type": "string" + }, + "location": { + "location": "path", + "description": "The location which contains the job", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", + "path": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", + "id": "dataflow.projects.locations.workerMessages" + } + }, + "resources": { + "templates": { + "methods": { + "launch": { + "response": { + "$ref": "LaunchTemplateResponse" + }, + "parameterOrder": [ + "projectId", + "location" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "gcsPath": { + "location": "query", + "description": "Required. A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", + "type": "string" + }, + "location": { + "location": "path", + "description": "The location to which to direct the request.", + "required": true, + "type": "string" + }, + "validateOnly": { + "location": "query", + "description": "If true, the request is validated but not actually executed.\nDefaults to false.", + "type": "boolean" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:launch", + "path": "v1b3/projects/{projectId}/locations/{location}/templates:launch", + "id": "dataflow.projects.locations.templates.launch", + "request": { + "$ref": "LaunchTemplateParameters" + }, + "description": "Launch a template." + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "location" + ], + "response": { + "$ref": "GetTemplateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "view": { + "location": "query", + "enum": [ + "METADATA_ONLY" + ], + "description": "The view to retrieve. Defaults to METADATA_ONLY.", + "type": "string" + }, + "gcsPath": { + "location": "query", + "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", + "type": "string" + }, + "location": { + "location": "path", + "description": "The location to which to direct the request.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get", + "id": "dataflow.projects.locations.templates.get", + "path": "v1b3/projects/{projectId}/locations/{location}/templates:get", + "description": "Get the template associated with a template." + }, + "create": { + "description": "Creates a Cloud Dataflow job from a template.", + "request": { + "$ref": "CreateJobFromTemplateRequest" + }, + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "location" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "location": { + "location": "path", + "description": "The location to which to direct the request.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates", + "path": "v1b3/projects/{projectId}/locations/{location}/templates", + "id": "dataflow.projects.locations.templates.create" + } + } + }, + "jobs": { + "methods": { + "get": { + "parameters": { + "location": { + "description": "The location that contains this job.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "location": "path", + "description": "The job ID.", + "required": true, + "type": "string" + }, + "view": { + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "The level of information requested in response.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", + "id": "dataflow.projects.locations.jobs.get", + "description": "Gets the state of the specified Cloud Dataflow job.", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "httpMethod": "GET" + }, + "list": { + "description": "List the jobs of a project.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "location" + ], + "response": { + "$ref": "ListJobsResponse" + }, + "parameters": { + "view": { + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", + "type": "string" + }, + "projectId": { + "description": "The project which owns the jobs.", + "required": true, + "type": "string", + "location": "path" + }, + "filter": { + "location": "query", + "enum": [ + "UNKNOWN", + "ALL", + "TERMINATED", + "ACTIVE" + ], + "description": "The kind of filter to use.", + "type": "string" + }, + "location": { + "location": "path", + "description": "The location that contains this job.", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", + "format": "int32" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", + "id": "dataflow.projects.locations.jobs.list", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs" + }, + "update": { + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", + "id": "dataflow.projects.locations.jobs.update", + "request": { + "$ref": "Job" + }, + "description": "Updates the state of an existing Cloud Dataflow job.", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "httpMethod": "PUT", + "parameters": { + "location": { + "location": "path", + "description": "The location that contains this job.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "jobId": { + "location": "path", + "description": "The job ID.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "location" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "view": { + "type": "string", + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "The level of information requested in response." + }, + "location": { + "description": "The location that contains this job.", + "required": true, + "type": "string", + "location": "path" + }, + "replaceJobId": { + "location": "query", + "description": "Deprecated. This field is now in the Job message.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", + "id": "dataflow.projects.locations.jobs.create", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs", + "request": { + "$ref": "Job" + }, + "description": "Creates a Cloud Dataflow job." + }, + "getMetrics": { + "id": "dataflow.projects.locations.jobs.getMetrics", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", + "description": "Request the job status.", + "httpMethod": "GET", + "response": { + "$ref": "JobMetrics" + }, + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "A project id.", + "required": true, + "type": "string" + }, + "jobId": { + "location": "path", + "description": "The job to get messages for.", + "required": true, + "type": "string" + }, + "location": { + "location": "path", + "description": "The location which contains the job specified by job_id.", + "required": true, + "type": "string" + }, + "startTime": { + "type": "string", + "location": "query", + "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", + "format": "google-datetime" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics" + } + }, + "resources": { + "debug": { + "methods": { + "getConfig": { + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", + "id": "dataflow.projects.locations.jobs.debug.getConfig", + "description": "Get encoded debug configuration for component. Not cacheable.", + "request": { + "$ref": "GetDebugConfigRequest" + }, + "response": { + "$ref": "GetDebugConfigResponse" + }, + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "description": "The project id.", + "required": true, + "type": "string", + "location": "path" + }, + "jobId": { + "location": "path", + "description": "The job id.", + "required": true, + "type": "string" + }, + "location": { + "description": "The location which contains the job specified by job_id.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig" + }, + "sendCapture": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "response": { + "$ref": "SendDebugCaptureResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "location": { + "location": "path", + "description": "The location which contains the job specified by job_id.", + "required": true, + "type": "string" + }, + "projectId": { + "location": "path", + "description": "The project id.", + "required": true, + "type": "string" + }, + "jobId": { + "location": "path", + "description": "The job id.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", + "id": "dataflow.projects.locations.jobs.debug.sendCapture", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", + "description": "Send encoded debug capture data for component.", + "request": { + "$ref": "SendDebugCaptureRequest" + } + } + } + }, + "workItems": { + "methods": { + "lease": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "location": { + "description": "The location which contains the WorkItem's job.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Identifies the project this worker belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "description": "Identifies the workflow job this worker belongs to.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", + "id": "dataflow.projects.locations.jobs.workItems.lease", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", + "description": "Leases a dataflow WorkItem to run.", + "request": { + "$ref": "LeaseWorkItemRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "response": { + "$ref": "LeaseWorkItemResponse" + } + }, + "reportStatus": { + "request": { + "$ref": "ReportWorkItemStatusRequest" + }, + "description": "Reports the status of dataflow WorkItems leased by a worker.", + "response": { + "$ref": "ReportWorkItemStatusResponse" + }, + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The project which owns the WorkItem's job.", + "required": true, + "type": "string" + }, + "jobId": { + "location": "path", + "description": "The job which the WorkItem is part of.", + "required": true, + "type": "string" + }, + "location": { + "description": "The location which contains the WorkItem's job.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", + "id": "dataflow.projects.locations.jobs.workItems.reportStatus" + } + } + }, + "messages": { + "methods": { + "list": { + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", + "id": "dataflow.projects.locations.jobs.messages.list", + "description": "Request the job status.", + "response": { + "$ref": "ListJobMessagesResponse" + }, + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "httpMethod": "GET", + "parameters": { + "jobId": { + "description": "The job to get messages about.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "A project id.", + "required": true, + "type": "string" + }, + "location": { + "description": "The location which contains the job specified by job_id.", + "required": true, + "type": "string", + "location": "path" + }, + "endTime": { + "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).", + "format": "google-datetime", + "type": "string", + "location": "query" + }, + "startTime": { + "type": "string", + "location": "query", + "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", + "format": "google-datetime" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned." + }, + "pageSize": { + "location": "query", + "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.", + "format": "int32", + "type": "integer" + }, + "minimumImportance": { + "location": "query", + "enum": [ + "JOB_MESSAGE_IMPORTANCE_UNKNOWN", + "JOB_MESSAGE_DEBUG", + "JOB_MESSAGE_DETAILED", + "JOB_MESSAGE_BASIC", + "JOB_MESSAGE_WARNING", + "JOB_MESSAGE_ERROR" + ], + "description": "Filter to only get messages with importance \u003e= level", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ] + } + } + } + } + } + } + }, + "jobs": { + "methods": { + "getMetrics": { + "description": "Request the job status.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "JobMetrics" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "location": { + "location": "query", + "description": "The location which contains the job specified by job_id.", + "type": "string" + }, + "startTime": { + "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", + "format": "google-datetime", + "type": "string", + "location": "query" + }, + "projectId": { + "description": "A project id.", + "required": true, + "type": "string", + "location": "path" + }, + "jobId": { + "location": "path", + "description": "The job to get messages for.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", + "id": "dataflow.projects.jobs.getMetrics", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics" + }, + "get": { + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", + "path": "v1b3/projects/{projectId}/jobs/{jobId}", + "id": "dataflow.projects.jobs.get", + "description": "Gets the state of the specified Cloud Dataflow job.", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "GET", + "parameters": { + "location": { + "location": "query", + "description": "The location that contains this job.", + "type": "string" + }, + "projectId": { + "location": "path", + "description": "The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "description": "The job ID.", + "required": true, + "type": "string", + "location": "path" + }, + "view": { + "type": "string", + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "The level of information requested in response." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ] + }, + "list": { + "response": { + "$ref": "ListJobsResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list." + }, + "pageSize": { + "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "view": { + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", + "type": "string" + }, + "projectId": { + "location": "path", + "description": "The project which owns the jobs.", + "required": true, + "type": "string" + }, + "filter": { + "enum": [ + "UNKNOWN", + "ALL", + "TERMINATED", + "ACTIVE" + ], + "description": "The kind of filter to use.", + "type": "string", + "location": "query" + }, + "location": { + "description": "The location that contains this job.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/jobs", + "path": "v1b3/projects/{projectId}/jobs", + "id": "dataflow.projects.jobs.list", + "description": "List the jobs of a project." + }, + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "location": { + "location": "query", + "description": "The location that contains this job.", + "type": "string" + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "jobId": { + "required": true, + "type": "string", + "location": "path", + "description": "The job ID." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", + "id": "dataflow.projects.jobs.update", + "path": "v1b3/projects/{projectId}/jobs/{jobId}", + "request": { + "$ref": "Job" + }, + "description": "Updates the state of an existing Cloud Dataflow job." + }, + "create": { + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "location": { + "type": "string", + "location": "query", + "description": "The location that contains this job." + }, + "replaceJobId": { + "description": "Deprecated. This field is now in the Job message.", + "type": "string", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "The ID of the Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "view": { + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "The level of information requested in response.", + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs", + "path": "v1b3/projects/{projectId}/jobs", + "id": "dataflow.projects.jobs.create", + "description": "Creates a Cloud Dataflow job.", + "request": { + "$ref": "Job" + } + } + }, + "resources": { + "debug": { + "methods": { + "getConfig": { + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", + "id": "dataflow.projects.jobs.debug.getConfig", + "request": { + "$ref": "GetDebugConfigRequest" + }, + "description": "Get encoded debug configuration for component. Not cacheable.", + "response": { + "$ref": "GetDebugConfigResponse" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The project id.", + "required": true, + "type": "string" + }, + "jobId": { + "location": "path", + "description": "The job id.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ] + }, + "sendCapture": { + "response": { + "$ref": "SendDebugCaptureResponse" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The project id.", + "required": true, + "type": "string" + }, + "jobId": { + "required": true, + "type": "string", + "location": "path", + "description": "The job id." + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", + "id": "dataflow.projects.jobs.debug.sendCapture", + "description": "Send encoded debug capture data for component.", + "request": { + "$ref": "SendDebugCaptureRequest" + } + } + } + }, + "workItems": { + "methods": { + "lease": { + "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", + "id": "dataflow.projects.jobs.workItems.lease", + "request": { + "$ref": "LeaseWorkItemRequest" + }, + "description": "Leases a dataflow WorkItem to run.", + "response": { + "$ref": "LeaseWorkItemResponse" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "Identifies the project this worker belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "description": "Identifies the workflow job this worker belongs to.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease" + }, + "reportStatus": { + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", + "id": "dataflow.projects.jobs.workItems.reportStatus", + "description": "Reports the status of dataflow WorkItems leased by a worker.", + "request": { + "$ref": "ReportWorkItemStatusRequest" + }, + "response": { + "$ref": "ReportWorkItemStatusResponse" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The project which owns the WorkItem's job.", + "required": true, + "type": "string" + }, + "jobId": { + "description": "The job which the WorkItem is part of.", + "required": true, + "type": "string", + "location": "path" + } + } + } + } + }, + "messages": { + "methods": { + "list": { + "response": { + "$ref": "ListJobMessagesResponse" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "startTime": { + "location": "query", + "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", + "format": "google-datetime", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.", + "format": "int32", + "type": "integer" + }, + "minimumImportance": { + "location": "query", + "enum": [ + "JOB_MESSAGE_IMPORTANCE_UNKNOWN", + "JOB_MESSAGE_DEBUG", + "JOB_MESSAGE_DETAILED", + "JOB_MESSAGE_BASIC", + "JOB_MESSAGE_WARNING", + "JOB_MESSAGE_ERROR" + ], + "description": "Filter to only get messages with importance \u003e= level", + "type": "string" + }, + "jobId": { + "description": "The job to get messages about.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "A project id.", + "required": true, + "type": "string" + }, + "location": { + "description": "The location which contains the job specified by job_id.", + "type": "string", + "location": "query" + }, + "endTime": { + "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).", + "format": "google-datetime", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages", + "id": "dataflow.projects.jobs.messages.list", + "description": "Request the job status." + } + } + } + } + } } - } } - } }, - "CounterUpdate": { - "id": "CounterUpdate", - "type": "object", - "description": "An update to a Counter sent from a worker.", - "properties": { - "nameAndKind": { - "$ref": "NameAndKind", - "description": "Counter name and aggregation type." + "parameters": { + "pp": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Pretty-print response." }, - "shortId": { - "type": "string", - "description": "The service-generated short identifier for this counter. The short_id -\u003e (name, metadata) mapping is constant for the lifetime of a job.", - "format": "int64" + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." }, - "structuredNameAndMetadata": { - "$ref": "CounterStructuredNameAndMetadata", - "description": "Counter structured name and metadata." - }, - "cumulative": { - "type": "boolean", - "description": "True if this counter is reported as the total cumulative aggregate value accumulated since the worker started working on this WorkItem. By default this is false, indicating that this counter is reported as a delta." - }, - "integer": { - "$ref": "SplitInt64", - "description": "Integer value for Sum, Max, Min." - }, - "floatingPoint": { - "type": "number", - "description": "Floating point value for Sum, Max, Min.", - "format": "double" - }, - "boolean": { - "type": "boolean", - "description": "Boolean value for And, Or." - }, - "integerMean": { - "$ref": "IntegerMean", - "description": "Integer mean aggregation value for Mean." - }, - "floatingPointMean": { - "$ref": "FloatingPointMean", - "description": "Floating point mean aggregation value for Mean." - }, - "integerList": { - "$ref": "IntegerList", - "description": "List of integers, for Set." - }, - "floatingPointList": { - "$ref": "FloatingPointList", - "description": "List of floating point numbers, for Set." - }, - "stringList": { - "$ref": "StringList", - "description": "List of strings, for Set." - }, - "internal": { - "type": "any", - "description": "Value for internally-defined counters used by the Dataflow service." - } - } - }, - "NameAndKind": { - "id": "NameAndKind", - "type": "object", - "description": "Basic metadata about a counter.", - "properties": { - "name": { - "type": "string", - "description": "Name of the counter." - }, - "kind": { - "type": "string", - "description": "Counter aggregation kind.", - "enum": [ - "INVALID", - "SUM", - "MAX", - "MIN", - "MEAN", - "OR", - "AND", - "SET" - ] - } - } - }, - "CounterStructuredNameAndMetadata": { - "id": "CounterStructuredNameAndMetadata", - "type": "object", - "description": "A single message which encapsulates structured name and metadata for a given counter.", - "properties": { - "name": { - "$ref": "CounterStructuredName", - "description": "Structured name of the counter." - }, - "metadata": { - "$ref": "CounterMetadata", - "description": "Metadata associated with a counter" - } - } - }, - "CounterStructuredName": { - "id": "CounterStructuredName", - "type": "object", - "description": "Identifies a counter within a per-job namespace. Counters whose structured names are the same get merged into a single value for the job.", - "properties": { - "name": { - "type": "string", - "description": "Counter name. Not necessarily globally-unique, but unique within the context of the other fields. Required." - }, - "standardOrigin": { - "type": "string", - "description": "One of the standard Origins defined above.", - "enum": [ - "DATAFLOW", - "USER" - ] - }, - "otherOrigin": { - "type": "string", - "description": "A string containing the origin of the counter." - }, - "originalStepName": { - "type": "string", - "description": "System generated name of the original step in the user's graph, before optimization." - }, - "componentStepName": { - "type": "string", - "description": "Name of the optimized step being executed by the workers." - }, - "executionStepName": { - "type": "string", - "description": "Name of the stage. An execution step contains multiple component steps." - }, - "workerId": { - "type": "string", - "description": "ID of a particular worker." - }, - "portion": { - "type": "string", - "description": "Portion of this counter, either key or value.", - "enum": [ - "ALL", - "KEY", - "VALUE" - ] - } - } - }, - "CounterMetadata": { - "id": "CounterMetadata", - "type": "object", - "description": "CounterMetadata includes all static non-name non-value counter attributes.", - "properties": { - "kind": { - "type": "string", - "description": "Counter aggregation kind.", - "enum": [ - "INVALID", - "SUM", - "MAX", - "MIN", - "MEAN", - "OR", - "AND", - "SET" - ] - }, - "description": { - "type": "string", - "description": "Human-readable description of the counter semantics." - }, - "standardUnits": { - "type": "string", - "description": "System defined Units, see above enum.", - "enum": [ - "BYTES", - "BYTES_PER_SEC", - "MILLISECONDS", - "MICROSECONDS", - "NANOSECONDS", - "TIMESTAMP_MSEC", - "TIMESTAMP_USEC", - "TIMESTAMP_NSEC" - ] - }, - "otherUnits": { - "type": "string", - "description": "A string referring to the unit type." - } - } - }, - "SplitInt64": { - "id": "SplitInt64", - "type": "object", - "description": "A representation of an int64, n, that is immune to precision loss when encoded in JSON.", - "properties": { - "lowBits": { - "type": "integer", - "description": "The low order bits: n & 0xffffffff.", - "format": "uint32" - }, - "highBits": { - "type": "integer", - "description": "The high order bits, including the sign: n \u003e\u003e 32.", - "format": "int32" - } - } - }, - "IntegerMean": { - "id": "IntegerMean", - "type": "object", - "description": "A representation of an integer mean metric contribution.", - "properties": { - "sum": { - "$ref": "SplitInt64", - "description": "The sum of all values being aggregated." - }, - "count": { - "$ref": "SplitInt64", - "description": "The number of values being aggregated." - } - } - }, - "FloatingPointMean": { - "id": "FloatingPointMean", - "type": "object", - "description": "A representation of a floating point mean metric contribution.", - "properties": { - "sum": { - "type": "number", - "description": "The sum of all values being aggregated.", - "format": "double" - }, - "count": { - "$ref": "SplitInt64", - "description": "The number of values being aggregated." - } - } - }, - "IntegerList": { - "id": "IntegerList", - "type": "object", - "description": "A metric value representing a list of integers.", - "properties": { - "elements": { - "type": "array", - "description": "Elements of the list.", - "items": { - "$ref": "SplitInt64" - } - } - } - }, - "FloatingPointList": { - "id": "FloatingPointList", - "type": "object", - "description": "A metric value representing a list of floating point numbers.", - "properties": { - "elements": { - "type": "array", - "description": "Elements of the list.", - "items": { - "type": "number", - "format": "double" - } - } - } - }, - "StringList": { - "id": "StringList", - "type": "object", - "description": "A metric value representing a list of strings.", - "properties": { - "elements": { - "type": "array", - "description": "Elements of the list.", - "items": { + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", "type": "string" - } - } - } - }, - "ApproximateReportedProgress": { - "id": "ApproximateReportedProgress", - "type": "object", - "description": "A progress measurement of a WorkItem by a worker.", - "properties": { - "position": { - "$ref": "Position", - "description": "A Position within the work to represent a progress." }, - "fractionConsumed": { - "type": "number", - "description": "Completion as fraction of the input consumed, from 0.0 (beginning, nothing consumed), to 1.0 (end of the input, entire input consumed).", - "format": "double" + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" }, - "remainingParallelism": { - "$ref": "ReportedParallelism", - "description": "Total amount of parallelism in the input of this task that remains, (i.e. can be delegated to this task and any new tasks via dynamic splitting). Always at least 1 for non-finished work items and 0 for finished. \"Amount of parallelism\" refers to how many non-empty parts of the input can be read in parallel. This does not necessarily equal number of records. An input that can be read in parallel down to the individual records is called \"perfectly splittable\". An example of non-perfectly parallelizable input is a block-compressed file format where a block of records has to be read as a whole, but different blocks can be read in parallel. Examples: * If we are processing record #30 (starting at 1) out of 50 in a perfectly splittable 50-record input, this value should be 21 (20 remaining + 1 current). * If we are reading through block 3 in a block-compressed file consisting of 5 blocks, this value should be 3 (since blocks 4 and 5 can be processed in parallel by new tasks via dynamic splitting and the current task remains processing block 3). * If we are reading through the last block in a block-compressed file, or reading or processing the last record in a perfectly splittable input, this value should be 1, because apart from the current task, no additional remainder can be split off." + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" }, - "consumedParallelism": { - "$ref": "ReportedParallelism", - "description": "Total amount of parallelism in the portion of input of this task that has already been consumed and is no longer active. In the first two examples above (see remaining_parallelism), the value should be 29 or 2 respectively. The sum of remaining_parallelism and consumed_parallelism should equal the total amount of parallelism in this work item. If specified, must be finite." - } - } - }, - "Position": { - "id": "Position", - "type": "object", - "description": "Position defines a position within a collection of data. The value can be either the end position, a key (used with ordered collections), a byte offset, or a record index.", - "properties": { - "end": { - "type": "boolean", - "description": "Position is past all other positions. Also useful for the end position of an unbounded range." + "uploadType": { + "type": "string", + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + }, + "fields": { + "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ] }, "key": { - "type": "string", - "description": "Position is a string key, ordered lexicographically." + "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" }, - "byteOffset": { - "type": "string", - "description": "Position is a byte offset.", - "format": "int64" + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" }, - "recordIndex": { - "type": "string", - "description": "Position is a record index.", - "format": "int64" - }, - "shufflePosition": { - "type": "string", - "description": "CloudPosition is a base64 encoded BatchShufflePosition (with FIXED sharding)." - }, - "concatPosition": { - "$ref": "ConcatPosition", - "description": "CloudPosition is a concat position." + "quotaUser": { + "location": "query", + "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" } - } }, - "ConcatPosition": { - "id": "ConcatPosition", - "type": "object", - "description": "A position that encapsulates an inner position and an index for the inner position. A ConcatPosition can be used by a reader of a source that encapsulates a set of other sources.", - "properties": { - "index": { - "type": "integer", - "description": "Index of the inner source.", - "format": "int32" - }, - "position": { - "$ref": "Position", - "description": "Position within the inner source." - } - } - }, - "ReportedParallelism": { - "id": "ReportedParallelism", - "type": "object", - "description": "Represents the level of parallelism in a WorkItem's input, reported by the worker.", - "properties": { - "isInfinite": { - "type": "boolean", - "description": "Specifies whether the parallelism is infinite. If true, \"value\" is ignored. Infinite parallelism means the service will assume that the work item can always be split into more non-empty work items by dynamic splitting. This is a work-around for lack of support for infinity by the current JSON-based Java RPC stack." - }, - "value": { - "type": "number", - "description": "Specifies the level of parallelism in case it is finite.", - "format": "double" - } - } - }, - "DynamicSourceSplit": { - "id": "DynamicSourceSplit", - "type": "object", - "description": "When a task splits using WorkItemStatus.dynamic_source_split, this message describes the two parts of the split relative to the description of the current task's input.", - "properties": { - "primary": { - "$ref": "DerivedSource", - "description": "Primary part (continued to be processed by worker). Specified relative to the previously-current source. Becomes current." - }, - "residual": { - "$ref": "DerivedSource", - "description": "Residual part (returned to the pool of work). Specified relative to the previously-current source." - } - } - }, - "DerivedSource": { - "id": "DerivedSource", - "type": "object", - "description": "Specification of one of the bundles produced as a result of splitting a Source (e.g. when executing a SourceSplitRequest, or when splitting an active task using WorkItemStatus.dynamic_source_split), relative to the source being split.", - "properties": { - "source": { - "$ref": "Source", - "description": "Specification of the source." - }, - "derivationMode": { - "type": "string", - "description": "What source to base the produced source on (if any).", - "enum": [ - "SOURCE_DERIVATION_MODE_UNKNOWN", - "SOURCE_DERIVATION_MODE_INDEPENDENT", - "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT", - "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - ] - } - } - }, - "Source": { - "id": "Source", - "type": "object", - "description": "A source that records can be read and decoded from.", - "properties": { - "spec": { - "type": "object", - "description": "The source to read from, plus its parameters.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "codec": { - "type": "object", - "description": "The codec to use to decode data read from the source.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "baseSpecs": { - "type": "array", - "description": "While splitting, sources may specify the produced bundles as differences against another source, in order to save backend-side memory and allow bigger jobs. For details, see SourceSplitRequest. To support this use case, the full set of parameters of the source is logically obtained by taking the latest explicitly specified value of each parameter in the order: base_specs (later items win), spec (overrides anything in base_specs).", - "items": { + "schemas": { + "SourceOperationResponse": { + "description": "The result of a SourceOperationRequest, specified in\nReportWorkItemStatusRequest.source_operation when the work item\nis completed.", "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - } - }, - "metadata": { - "$ref": "SourceMetadata", - "description": "Optionally, metadata for this source can be supplied right away, avoiding a SourceGetMetadataOperation roundtrip (see SourceOperationRequest). This field is meaningful only in the Source objects populated by the user (e.g. when filling in a DerivedSource). Source objects supplied by the framework to the user don't have this field populated." - }, - "doesNotNeedSplitting": { - "type": "boolean", - "description": "Setting this value to true hints to the framework that the source doesn't need splitting, and using SourceSplitRequest on it would yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. E.g. a file splitter may set this to true when splitting a single file into a set of byte ranges of appropriate size, and set this to false when splitting a filepattern into individual files. However, for efficiency, a file splitter may decide to produce file subranges directly from the filepattern to avoid a splitting round-trip. See SourceSplitRequest for an overview of the splitting process. This field is meaningful only in the Source objects populated by the user (e.g. when filling in a DerivedSource). Source objects supplied by the framework to the user don't have this field populated." - } - } - }, - "SourceMetadata": { - "id": "SourceMetadata", - "type": "object", - "description": "Metadata about a Source useful for automatically optimizing and tuning the pipeline, etc.", - "properties": { - "producesSortedKeys": { - "type": "boolean", - "description": "Whether this source is known to produce key/value pairs with the (encoded) keys in lexicographically sorted order." - }, - "infinite": { - "type": "boolean", - "description": "Specifies that the size of this source is known to be infinite (this is a streaming source)." - }, - "estimatedSizeBytes": { - "type": "string", - "description": "An estimate of the total size (in bytes) of the data that would be read from this source. This estimate is in terms of external storage size, before any decompression or other processing done by the reader.", - "format": "int64" - } - } - }, - "SourceOperationResponse": { - "id": "SourceOperationResponse", - "type": "object", - "description": "The result of a SourceOperationRequest, specified in ReportWorkItemStatusRequest.source_operation when the work item is completed.", - "properties": { - "split": { - "$ref": "SourceSplitResponse", - "description": "A response to a request to split a source." - }, - "getMetadata": { - "$ref": "SourceGetMetadataResponse", - "description": "A response to a request to get metadata about a source." - } - } - }, - "SourceSplitResponse": { - "id": "SourceSplitResponse", - "type": "object", - "description": "The response to a SourceSplitRequest.", - "properties": { - "outcome": { - "type": "string", - "description": "Indicates whether splitting happened and produced a list of bundles. If this is USE_CURRENT_SOURCE_AS_IS, the current source should be processed \"as is\" without splitting. \"bundles\" is ignored in this case. If this is SPLITTING_HAPPENED, then \"bundles\" contains a list of bundles into which the source was split.", - "enum": [ - "SOURCE_SPLIT_OUTCOME_UNKNOWN", - "SOURCE_SPLIT_OUTCOME_USE_CURRENT", - "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" - ] - }, - "bundles": { - "type": "array", - "description": "If outcome is SPLITTING_HAPPENED, then this is a list of bundles into which the source was split. Otherwise this field is ignored. This list can be empty, which means the source represents an empty input.", - "items": { - "$ref": "DerivedSource" - } - }, - "shards": { - "type": "array", - "description": "DEPRECATED in favor of bundles.", - "items": { - "$ref": "SourceSplitShard" - } - } - } - }, - "SourceSplitShard": { - "id": "SourceSplitShard", - "type": "object", - "description": "DEPRECATED in favor of DerivedSource.", - "properties": { - "source": { - "$ref": "Source", - "description": "DEPRECATED" - }, - "derivationMode": { - "type": "string", - "description": "DEPRECATED", - "enum": [ - "SOURCE_DERIVATION_MODE_UNKNOWN", - "SOURCE_DERIVATION_MODE_INDEPENDENT", - "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT", - "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - ] - } - } - }, - "SourceGetMetadataResponse": { - "id": "SourceGetMetadataResponse", - "type": "object", - "description": "The result of a SourceGetMetadataOperation.", - "properties": { - "metadata": { - "$ref": "SourceMetadata", - "description": "The computed metadata." - } - } - }, - "SourceFork": { - "id": "SourceFork", - "type": "object", - "description": "DEPRECATED in favor of DynamicSourceSplit.", - "properties": { - "primary": { - "$ref": "SourceSplitShard", - "description": "DEPRECATED" - }, - "residual": { - "$ref": "SourceSplitShard", - "description": "DEPRECATED" - }, - "primarySource": { - "$ref": "DerivedSource", - "description": "DEPRECATED" - }, - "residualSource": { - "$ref": "DerivedSource", - "description": "DEPRECATED" - } - } - }, - "ApproximateProgress": { - "id": "ApproximateProgress", - "type": "object", - "description": "Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest.", - "properties": { - "position": { - "$ref": "Position", - "description": "Obsolete." - }, - "percentComplete": { - "type": "number", - "description": "Obsolete.", - "format": "float" - }, - "remainingTime": { - "type": "string", - "description": "Obsolete." - } - } - }, - "ReportWorkItemStatusResponse": { - "id": "ReportWorkItemStatusResponse", - "type": "object", - "description": "Response from a request to report the status of WorkItems.", - "properties": { - "workItemServiceStates": { - "type": "array", - "description": "A set of messages indicating the service-side state for each WorkItem whose status was reported, in the same order as the WorkItemStatus messages in the ReportWorkItemStatusRequest which resulting in this response.", - "items": { - "$ref": "WorkItemServiceState" - } - } - } - }, - "WorkItemServiceState": { - "id": "WorkItemServiceState", - "type": "object", - "description": "The Dataflow service's idea of the current state of a WorkItem being processed by a worker.", - "properties": { - "splitRequest": { - "$ref": "ApproximateSplitRequest", - "description": "The progress point in the WorkItem where the Dataflow service suggests that the worker truncate the task." - }, - "leaseExpireTime": { - "type": "string", - "description": "Time at which the current lease will expire." - }, - "reportStatusInterval": { - "type": "string", - "description": "New recommended reporting interval." - }, - "harnessData": { - "type": "object", - "description": "Other data returned by the service, specific to the particular worker harness.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "nextReportIndex": { - "type": "string", - "description": "The index value to use for the next report sent by the worker. Note: If the report call fails for whatever reason, the worker should reuse this index for subsequent report attempts.", - "format": "int64" - }, - "metricShortId": { - "type": "array", - "description": "The short ids that workers should use in subsequent metric updates. Workers should strive to use short ids whenever possible, but it is ok to request the short_id again if a worker lost track of it (e.g. if the worker is recovering from a crash). NOTE: it is possible that the response may have short ids for a subset of the metrics.", - "items": { - "$ref": "MetricShortId" - } - }, - "suggestedStopPosition": { - "$ref": "Position", - "description": "Obsolete, always empty." - }, - "suggestedStopPoint": { - "$ref": "ApproximateProgress", - "description": "DEPRECATED in favor of split_request." - } - } - }, - "ApproximateSplitRequest": { - "id": "ApproximateSplitRequest", - "type": "object", - "description": "A suggestion by the service to the worker to dynamically split the WorkItem.", - "properties": { - "position": { - "$ref": "Position", - "description": "A Position at which to split the work item." - }, - "fractionConsumed": { - "type": "number", - "description": "A fraction at which to split the work item, from 0.0 (beginning of the input) to 1.0 (end of the input).", - "format": "double" - } - } - }, - "MetricShortId": { - "id": "MetricShortId", - "type": "object", - "description": "The metric short id is returned to the user alongside an offset into ReportWorkItemStatusRequest", - "properties": { - "metricIndex": { - "type": "integer", - "description": "The index of the corresponding metric in the ReportWorkItemStatusRequest. Required.", - "format": "int32" - }, - "shortId": { - "type": "string", - "description": "The service-generated short identifier for the metric.", - "format": "int64" - } - } - }, - "LeaseWorkItemRequest": { - "id": "LeaseWorkItemRequest", - "type": "object", - "description": "Request to lease WorkItems.", - "properties": { - "workItemTypes": { - "type": "array", - "description": "Filter for WorkItem type.", - "items": { - "type": "string" - } - }, - "workerCapabilities": { - "type": "array", - "description": "Worker capabilities. WorkItems might be limited to workers with specific capabilities.", - "items": { - "type": "string" - } - }, - "requestedLeaseDuration": { - "type": "string", - "description": "The initial lease period." - }, - "currentWorkerTime": { - "type": "string", - "description": "The current timestamp at the worker." - }, - "workerId": { - "type": "string", - "description": "Identifies the worker leasing work -- typically the ID of the virtual machine running the worker." - }, - "location": { - "type": "string", - "description": "The location which contains the WorkItem's job." - } - } - }, - "LeaseWorkItemResponse": { - "id": "LeaseWorkItemResponse", - "type": "object", - "description": "Response to a request to lease WorkItems.", - "properties": { - "workItems": { - "type": "array", - "description": "A list of the leased WorkItems.", - "items": { - "$ref": "WorkItem" - } - } - } - }, - "WorkItem": { - "id": "WorkItem", - "type": "object", - "description": "WorkItem represents basic information about a WorkItem to be executed in the cloud.", - "properties": { - "id": { - "type": "string", - "description": "Identifies this WorkItem.", - "format": "int64" - }, - "projectId": { - "type": "string", - "description": "Identifies the cloud project this WorkItem belongs to." - }, - "jobId": { - "type": "string", - "description": "Identifies the workflow job this WorkItem belongs to." - }, - "packages": { - "type": "array", - "description": "Any required packages that need to be fetched in order to execute this WorkItem.", - "items": { - "$ref": "Package" - } - }, - "mapTask": { - "$ref": "MapTask", - "description": "Additional information for MapTask WorkItems." - }, - "seqMapTask": { - "$ref": "SeqMapTask", - "description": "Additional information for SeqMapTask WorkItems." - }, - "shellTask": { - "$ref": "ShellTask", - "description": "Additional information for ShellTask WorkItems." - }, - "streamingSetupTask": { - "$ref": "StreamingSetupTask", - "description": "Additional information for StreamingSetupTask WorkItems." - }, - "sourceOperationTask": { - "$ref": "SourceOperationRequest", - "description": "Additional information for source operation WorkItems." - }, - "streamingComputationTask": { - "$ref": "StreamingComputationTask", - "description": "Additional information for StreamingComputationTask WorkItems." - }, - "streamingConfigTask": { - "$ref": "StreamingConfigTask", - "description": "Additional information for StreamingConfigTask WorkItems." - }, - "reportStatusInterval": { - "type": "string", - "description": "Recommended reporting interval." - }, - "leaseExpireTime": { - "type": "string", - "description": "Time when the lease on this Work will expire." - }, - "configuration": { - "type": "string", - "description": "Work item-specific configuration as an opaque blob." - }, - "initialReportIndex": { - "type": "string", - "description": "The initial index to use when reporting the status of the WorkItem.", - "format": "int64" - } - } - }, - "MapTask": { - "id": "MapTask", - "type": "object", - "description": "MapTask consists of an ordered set of instructions, each of which describes one particular low-level operation for the worker to perform in order to accomplish the MapTask's WorkItem. Each instruction must appear in the list before any instructions which depends on its output.", - "properties": { - "instructions": { - "type": "array", - "description": "The instructions in the MapTask.", - "items": { - "$ref": "ParallelInstruction" - } - }, - "systemName": { - "type": "string", - "description": "System-defined name of this MapTask. Unique across the workflow." - }, - "stageName": { - "type": "string", - "description": "System-defined name of the stage containing this MapTask. Unique across the workflow." - } - } - }, - "ParallelInstruction": { - "id": "ParallelInstruction", - "type": "object", - "description": "Describes a particular operation comprising a MapTask.", - "properties": { - "systemName": { - "type": "string", - "description": "System-defined name of this operation. Unique across the workflow." - }, - "name": { - "type": "string", - "description": "User-provided name of this operation." - }, - "originalName": { - "type": "string", - "description": "System-defined name for the operation in the original workflow graph." - }, - "read": { - "$ref": "ReadInstruction", - "description": "Additional information for Read instructions." - }, - "write": { - "$ref": "WriteInstruction", - "description": "Additional information for Write instructions." - }, - "parDo": { - "$ref": "ParDoInstruction", - "description": "Additional information for ParDo instructions." - }, - "partialGroupByKey": { - "$ref": "PartialGroupByKeyInstruction", - "description": "Additional information for PartialGroupByKey instructions." - }, - "flatten": { - "$ref": "FlattenInstruction", - "description": "Additional information for Flatten instructions." - }, - "outputs": { - "type": "array", - "description": "Describes the outputs of the instruction.", - "items": { - "$ref": "InstructionOutput" - } - } - } - }, - "ReadInstruction": { - "id": "ReadInstruction", - "type": "object", - "description": "An instruction that reads records. Takes no inputs, produces one output.", - "properties": { - "source": { - "$ref": "Source", - "description": "The source to read from." - } - } - }, - "WriteInstruction": { - "id": "WriteInstruction", - "type": "object", - "description": "An instruction that writes records. Takes one input, produces no outputs.", - "properties": { - "input": { - "$ref": "InstructionInput", - "description": "The input." - }, - "sink": { - "$ref": "Sink", - "description": "The sink to write to." - } - } - }, - "InstructionInput": { - "id": "InstructionInput", - "type": "object", - "description": "An input of an instruction, as a reference to an output of a producer instruction.", - "properties": { - "producerInstructionIndex": { - "type": "integer", - "description": "The index (origin zero) of the parallel instruction that produces the output to be consumed by this input. This index is relative to the list of instructions in this input's instruction's containing MapTask.", - "format": "int32" - }, - "outputNum": { - "type": "integer", - "description": "The output index (origin zero) within the producer.", - "format": "int32" - } - } - }, - "Sink": { - "id": "Sink", - "type": "object", - "description": "A sink that records can be encoded and written to.", - "properties": { - "spec": { - "type": "object", - "description": "The sink to write to, plus its parameters.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "codec": { - "type": "object", - "description": "The codec to use to encode data written to the sink.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - } - } - }, - "ParDoInstruction": { - "id": "ParDoInstruction", - "type": "object", - "description": "An instruction that does a ParDo operation. Takes one main input and zero or more side inputs, and produces zero or more outputs. Runs user code.", - "properties": { - "input": { - "$ref": "InstructionInput", - "description": "The input." - }, - "sideInputs": { - "type": "array", - "description": "Zero or more side inputs.", - "items": { - "$ref": "SideInputInfo" - } - }, - "userFn": { - "type": "object", - "description": "The user function to invoke.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "numOutputs": { - "type": "integer", - "description": "The number of outputs.", - "format": "int32" - }, - "multiOutputInfos": { - "type": "array", - "description": "Information about each of the outputs, if user_fn is a MultiDoFn.", - "items": { - "$ref": "MultiOutputInfo" - } - } - } - }, - "SideInputInfo": { - "id": "SideInputInfo", - "type": "object", - "description": "Information about a side input of a DoFn or an input of a SeqDoFn.", - "properties": { - "sources": { - "type": "array", - "description": "The source(s) to read element(s) from to get the value of this side input. If more than one source, then the elements are taken from the sources, in the specified order if order matters. At least one source is required.", - "items": { - "$ref": "Source" - } - }, - "kind": { - "type": "object", - "description": "How to interpret the source element(s) as a side input value.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "tag": { - "type": "string", - "description": "The id of the tag the user code will access this side input by; this should correspond to the tag of some MultiOutputInfo." - } - } - }, - "MultiOutputInfo": { - "id": "MultiOutputInfo", - "type": "object", - "description": "Information about an output of a multi-output DoFn.", - "properties": { - "tag": { - "type": "string", - "description": "The id of the tag the user code will emit to this output by; this should correspond to the tag of some SideInputInfo." - } - } - }, - "PartialGroupByKeyInstruction": { - "id": "PartialGroupByKeyInstruction", - "type": "object", - "description": "An instruction that does a partial group-by-key. One input and one output.", - "properties": { - "input": { - "$ref": "InstructionInput", - "description": "Describes the input to the partial group-by-key instruction." - }, - "inputElementCodec": { - "type": "object", - "description": "The codec to use for interpreting an element in the input PTable.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "valueCombiningFn": { - "type": "object", - "description": "The value combining function to invoke.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "sideInputs": { - "type": "array", - "description": "Zero or more side inputs.", - "items": { - "$ref": "SideInputInfo" - } - }, - "originalCombineValuesStepName": { - "type": "string", - "description": "If this instruction includes a combining function, this is the name of the CombineValues instruction lifted into this instruction." - }, - "originalCombineValuesInputStoreName": { - "type": "string", - "description": "If this instruction includes a combining function this is the name of the intermediate store between the GBK and the CombineValues." - } - } - }, - "FlattenInstruction": { - "id": "FlattenInstruction", - "type": "object", - "description": "An instruction that copies its inputs (zero or more) to its (single) output.", - "properties": { - "inputs": { - "type": "array", - "description": "Describes the inputs to the flatten instruction.", - "items": { - "$ref": "InstructionInput" - } - } - } - }, - "InstructionOutput": { - "id": "InstructionOutput", - "type": "object", - "description": "An output of an instruction.", - "properties": { - "name": { - "type": "string", - "description": "The user-provided name of this output." - }, - "systemName": { - "type": "string", - "description": "System-defined name of this output. Unique across the workflow." - }, - "originalName": { - "type": "string", - "description": "System-defined name for this output in the original workflow graph. Outputs that do not contribute to an original instruction do not set this." - }, - "codec": { - "type": "object", - "description": "The codec to use to encode data being written via this output.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "onlyCountKeyBytes": { - "type": "boolean", - "description": "For system-generated byte and mean byte metrics, certain instructions should only report the key size." - }, - "onlyCountValueBytes": { - "type": "boolean", - "description": "For system-generated byte and mean byte metrics, certain instructions should only report the value size." - } - } - }, - "SeqMapTask": { - "id": "SeqMapTask", - "type": "object", - "description": "Describes a particular function to invoke.", - "properties": { - "inputs": { - "type": "array", - "description": "Information about each of the inputs.", - "items": { - "$ref": "SideInputInfo" - } - }, - "userFn": { - "type": "object", - "description": "The user function to invoke.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - }, - "outputInfos": { - "type": "array", - "description": "Information about each of the outputs.", - "items": { - "$ref": "SeqMapTaskOutputInfo" - } - }, - "name": { - "type": "string", - "description": "The user-provided name of the SeqDo operation." - }, - "systemName": { - "type": "string", - "description": "System-defined name of the SeqDo operation. Unique across the workflow." - }, - "stageName": { - "type": "string", - "description": "System-defined name of the stage containing the SeqDo operation. Unique across the workflow." - } - } - }, - "SeqMapTaskOutputInfo": { - "id": "SeqMapTaskOutputInfo", - "type": "object", - "description": "Information about an output of a SeqMapTask.", - "properties": { - "tag": { - "type": "string", - "description": "The id of the TupleTag the user code will tag the output value by." - }, - "sink": { - "$ref": "Sink", - "description": "The sink to write the output value to." - } - } - }, - "ShellTask": { - "id": "ShellTask", - "type": "object", - "description": "A task which consists of a shell command for the worker to execute.", - "properties": { - "command": { - "type": "string", - "description": "The shell command to run." - }, - "exitCode": { - "type": "integer", - "description": "Exit code for the task.", - "format": "int32" - } - } - }, - "StreamingSetupTask": { - "id": "StreamingSetupTask", - "type": "object", - "description": "A task which initializes part of a streaming Dataflow job.", - "properties": { - "receiveWorkPort": { - "type": "integer", - "description": "The TCP port on which the worker should listen for messages from other streaming computation workers.", - "format": "int32" - }, - "workerHarnessPort": { - "type": "integer", - "description": "The TCP port used by the worker to communicate with the Dataflow worker harness.", - "format": "int32" - }, - "streamingComputationTopology": { - "$ref": "TopologyConfig", - "description": "The global topology of the streaming Dataflow job." - }, - "drain": { - "type": "boolean", - "description": "The user has requested drain." - } - } - }, - "TopologyConfig": { - "id": "TopologyConfig", - "type": "object", - "description": "Global topology of the streaming Dataflow job, including all computations and their sharded locations.", - "properties": { - "computations": { - "type": "array", - "description": "The computations associated with a streaming Dataflow job.", - "items": { - "$ref": "ComputationTopology" - } - }, - "dataDiskAssignments": { - "type": "array", - "description": "The disks assigned to a streaming Dataflow job.", - "items": { - "$ref": "DataDiskAssignment" - } - }, - "userStageToComputationNameMap": { - "type": "object", - "description": "Maps user stage names to stable computation names.", - "additionalProperties": { - "type": "string" - } - }, - "forwardingKeyBits": { - "type": "integer", - "description": "The size (in bits) of keys that will be assigned to source messages.", - "format": "int32" - }, - "persistentStateVersion": { - "type": "integer", - "description": "Version number for persistent state.", - "format": "int32" - } - } - }, - "ComputationTopology": { - "id": "ComputationTopology", - "type": "object", - "description": "All configuration data for a particular Computation.", - "properties": { - "systemStageName": { - "type": "string", - "description": "The system stage name." - }, - "computationId": { - "type": "string", - "description": "The ID of the computation." - }, - "userStageName": { - "type": "string", - "description": "The user stage name." - }, - "keyRanges": { - "type": "array", - "description": "The key ranges processed by the computation.", - "items": { - "$ref": "KeyRangeLocation" - } - }, - "inputs": { - "type": "array", - "description": "The inputs to the computation.", - "items": { - "$ref": "StreamLocation" - } - }, - "outputs": { - "type": "array", - "description": "The outputs from the computation.", - "items": { - "$ref": "StreamLocation" - } - }, - "stateFamilies": { - "type": "array", - "description": "The state family values.", - "items": { - "$ref": "StateFamilyConfig" - } - } - } - }, - "KeyRangeLocation": { - "id": "KeyRangeLocation", - "type": "object", - "description": "Location information for a specific key-range of a sharded computation. Currently we only support UTF-8 character splits to simplify encoding into JSON.", - "properties": { - "start": { - "type": "string", - "description": "The start (inclusive) of the key range." - }, - "end": { - "type": "string", - "description": "The end (exclusive) of the key range." - }, - "deliveryEndpoint": { - "type": "string", - "description": "The physical location of this range assignment to be used for streaming computation cross-worker message delivery." - }, - "persistentDirectory": { - "type": "string", - "description": "The location of the persistent state for this range, as a persistent directory in the worker local filesystem." - }, - "dataDisk": { - "type": "string", - "description": "The name of the data disk where data for this range is stored. This name is local to the Google Cloud Platform project and uniquely identifies the disk within that project, for example \"myproject-1014-104817-4c2-harness-0-disk-1\"." - } - } - }, - "StreamLocation": { - "id": "StreamLocation", - "type": "object", - "description": "Describes a stream of data, either as input to be processed or as output of a streaming Dataflow job.", - "properties": { - "streamingStageLocation": { - "$ref": "StreamingStageLocation", - "description": "The stream is part of another computation within the current streaming Dataflow job." - }, - "pubsubLocation": { - "$ref": "PubsubLocation", - "description": "The stream is a pubsub stream." - }, - "sideInputLocation": { - "$ref": "StreamingSideInputLocation", - "description": "The stream is a streaming side input." - }, - "customSourceLocation": { - "$ref": "CustomSourceLocation", - "description": "The stream is a custom source." - } - } - }, - "StreamingStageLocation": { - "id": "StreamingStageLocation", - "type": "object", - "description": "Identifies the location of a streaming computation stage, for stage-to-stage communication.", - "properties": { - "streamId": { - "type": "string", - "description": "Identifies the particular stream within the streaming Dataflow job." - } - } - }, - "PubsubLocation": { - "id": "PubsubLocation", - "type": "object", - "description": "Identifies a pubsub location to use for transferring data into or out of a streaming Dataflow job.", - "properties": { - "topic": { - "type": "string", - "description": "A pubsub topic, in the form of \"pubsub.googleapis.com/topics/\n/\"" - }, - "subscription": { - "type": "string", - "description": "A pubsub subscription, in the form of \"pubsub.googleapis.com/subscriptions/\n/\"" - }, - "timestampLabel": { - "type": "string", - "description": "If set, contains a pubsub label from which to extract record timestamps. If left empty, record timestamps will be generated upon arrival." - }, - "idLabel": { - "type": "string", - "description": "If set, contains a pubsub label from which to extract record ids. If left empty, record deduplication will be strictly best effort." - }, - "dropLateData": { - "type": "boolean", - "description": "Indicates whether the pipeline allows late-arriving data." - }, - "trackingSubscription": { - "type": "string", - "description": "If set, specifies the pubsub subscription that will be used for tracking custom time timestamps for watermark estimation." - }, - "withAttributes": { - "type": "boolean", - "description": "If true, then the client has requested to get pubsub attributes." - } - } - }, - "StreamingSideInputLocation": { - "id": "StreamingSideInputLocation", - "type": "object", - "description": "Identifies the location of a streaming side input.", - "properties": { - "tag": { - "type": "string", - "description": "Identifies the particular side input within the streaming Dataflow job." - }, - "stateFamily": { - "type": "string", - "description": "Identifies the state family where this side input is stored." - } - } - }, - "CustomSourceLocation": { - "id": "CustomSourceLocation", - "type": "object", - "description": "Identifies the location of a custom souce.", - "properties": { - "stateful": { - "type": "boolean", - "description": "Whether this source is stateful." - } - } - }, - "StateFamilyConfig": { - "id": "StateFamilyConfig", - "type": "object", - "description": "State family configuration.", - "properties": { - "stateFamily": { - "type": "string", - "description": "The state family value." - }, - "isRead": { - "type": "boolean", - "description": "If true, this family corresponds to a read operation." - } - } - }, - "DataDiskAssignment": { - "id": "DataDiskAssignment", - "type": "object", - "description": "Data disk assignment for a given VM instance.", - "properties": { - "vmInstance": { - "type": "string", - "description": "VM instance name the data disks mounted to, for example \"myproject-1014-104817-4c2-harness-0\"." - }, - "dataDisks": { - "type": "array", - "description": "Mounted data disks. The order is important a data disk's 0-based index in this list defines which persistent directory the disk is mounted to, for example the list of { \"myproject-1014-104817-4c2-harness-0-disk-0\" }, { \"myproject-1014-104817-4c2-harness-0-disk-1\" }.", - "items": { - "type": "string" - } - } - } - }, - "SourceOperationRequest": { - "id": "SourceOperationRequest", - "type": "object", - "description": "A work item that represents the different operations that can be performed on a user-defined Source specification.", - "properties": { - "split": { - "$ref": "SourceSplitRequest", - "description": "Information about a request to split a source." - }, - "getMetadata": { - "$ref": "SourceGetMetadataRequest", - "description": "Information about a request to get metadata about a source." - } - } - }, - "SourceSplitRequest": { - "id": "SourceSplitRequest", - "type": "object", - "description": "Represents the operation to split a high-level Source specification into bundles (parts for parallel processing). At a high level, splitting of a source into bundles happens as follows: SourceSplitRequest is applied to the source. If it returns SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and the source is used \"as is\". Otherwise, splitting is applied recursively to each produced DerivedSource. As an optimization, for any Source, if its does_not_need_splitting is true, the framework assumes that splitting this source would return SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest. This applies both to the initial source being split and to bundles produced from it.", - "properties": { - "source": { - "$ref": "Source", - "description": "Specification of the source to be split." - }, - "options": { - "$ref": "SourceSplitOptions", - "description": "Hints for tuning the splitting process." - } - } - }, - "SourceSplitOptions": { - "id": "SourceSplitOptions", - "type": "object", - "description": "Hints for splitting a Source into bundles (parts for parallel processing) using SourceSplitRequest.", - "properties": { - "desiredBundleSizeBytes": { - "type": "string", - "description": "The source should be split into a set of bundles where the estimated size of each is approximately this many bytes.", - "format": "int64" - }, - "desiredShardSizeBytes": { - "type": "string", - "description": "DEPRECATED in favor of desired_bundle_size_bytes.", - "format": "int64" - } - } - }, - "SourceGetMetadataRequest": { - "id": "SourceGetMetadataRequest", - "type": "object", - "description": "A request to compute the SourceMetadata of a Source.", - "properties": { - "source": { - "$ref": "Source", - "description": "Specification of the source whose metadata should be computed." - } - } - }, - "StreamingComputationTask": { - "id": "StreamingComputationTask", - "type": "object", - "description": "A task which describes what action should be performed for the specified streaming computation ranges.", - "properties": { - "taskType": { - "type": "string", - "description": "A type of streaming computation task.", - "enum": [ - "STREAMING_COMPUTATION_TASK_UNKNOWN", - "STREAMING_COMPUTATION_TASK_STOP", - "STREAMING_COMPUTATION_TASK_START" - ] - }, - "dataDisks": { - "type": "array", - "description": "Describes the set of data disks this task should apply to.", - "items": { - "$ref": "MountedDataDisk" - } - }, - "computationRanges": { - "type": "array", - "description": "Contains ranges of a streaming computation this task should apply to.", - "items": { - "$ref": "StreamingComputationRanges" - } - } - } - }, - "MountedDataDisk": { - "id": "MountedDataDisk", - "type": "object", - "description": "Describes mounted data disk.", - "properties": { - "dataDisk": { - "type": "string", - "description": "The name of the data disk. This name is local to the Google Cloud Platform project and uniquely identifies the disk within that project, for example \"myproject-1014-104817-4c2-harness-0-disk-1\"." - } - } - }, - "StreamingComputationRanges": { - "id": "StreamingComputationRanges", - "type": "object", - "description": "Describes full or partial data disk assignment information of the computation ranges.", - "properties": { - "computationId": { - "type": "string", - "description": "The ID of the computation." - }, - "rangeAssignments": { - "type": "array", - "description": "Data disk assignments for ranges from this computation.", - "items": { - "$ref": "KeyRangeDataDiskAssignment" - } - } - } - }, - "KeyRangeDataDiskAssignment": { - "id": "KeyRangeDataDiskAssignment", - "type": "object", - "description": "Data disk assignment information for a specific key-range of a sharded computation. Currently we only support UTF-8 character splits to simplify encoding into JSON.", - "properties": { - "start": { - "type": "string", - "description": "The start (inclusive) of the key range." - }, - "end": { - "type": "string", - "description": "The end (exclusive) of the key range." - }, - "dataDisk": { - "type": "string", - "description": "The name of the data disk where data for this range is stored. This name is local to the Google Cloud Platform project and uniquely identifies the disk within that project, for example \"myproject-1014-104817-4c2-harness-0-disk-1\"." - } - } - }, - "StreamingConfigTask": { - "id": "StreamingConfigTask", - "type": "object", - "description": "A task that carries configuration information for streaming computations.", - "properties": { - "streamingComputationConfigs": { - "type": "array", - "description": "Set of computation configuration information.", - "items": { - "$ref": "StreamingComputationConfig" - } - }, - "userStepToStateFamilyNameMap": { - "type": "object", - "description": "Map from user step names to state families.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "StreamingComputationConfig": { - "id": "StreamingComputationConfig", - "type": "object", - "description": "Configuration information for a single streaming computation.", - "properties": { - "computationId": { - "type": "string", - "description": "Unique identifier for this computation." - }, - "systemName": { - "type": "string", - "description": "System defined name for this computation." - }, - "stageName": { - "type": "string", - "description": "Stage name of this computation." - }, - "instructions": { - "type": "array", - "description": "Instructions that comprise the computation.", - "items": { - "$ref": "ParallelInstruction" - } - } - } - }, - "SendWorkerMessagesRequest": { - "id": "SendWorkerMessagesRequest", - "type": "object", - "description": "A request for sending worker messages to the service.", - "properties": { - "workerMessages": { - "type": "array", - "description": "The WorkerMessages to send.", - "items": { - "$ref": "WorkerMessage" - } - } - } - }, - "WorkerMessage": { - "id": "WorkerMessage", - "type": "object", - "description": "WorkerMessage provides information to the backend about a worker.", - "properties": { - "labels": { - "type": "object", - "description": "Labels are used to group WorkerMessages. For example, a worker_message about a particular container might have the labels: { \"JOB_ID\": \"2015-04-22\", \"WORKER_ID\": \"wordcount-vm-2015…\" \"CONTAINER_TYPE\": \"worker\", \"CONTAINER_ID\": \"ac1234def\"} Label tags typically correspond to Label enum values. However, for ease of development other strings can be used as tags. LABEL_UNSPECIFIED should not be used here.", - "additionalProperties": { - "type": "string" - } - }, - "time": { - "type": "string", - "description": "The timestamp of the worker_message." - }, - "workerHealthReport": { - "$ref": "WorkerHealthReport", - "description": "The health of a worker." - }, - "workerMessageCode": { - "$ref": "WorkerMessageCode", - "description": "A worker message code." - } - } - }, - "WorkerHealthReport": { - "id": "WorkerHealthReport", - "type": "object", - "description": "WorkerHealthReport contains information about the health of a worker. The VM should be identified by the labels attached to the WorkerMessage that this health ping belongs to.", - "properties": { - "vmIsHealthy": { - "type": "boolean", - "description": "Whether the VM is healthy." - }, - "vmStartupTime": { - "type": "string", - "description": "The time the VM was booted." - }, - "reportInterval": { - "type": "string", - "description": "The interval at which the worker is sending health reports. The default value of 0 should be interpreted as the field is not being explicitly set by the worker." - }, - "pods": { - "type": "array", - "description": "The pods running on the worker. See: http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod This field is used by the worker to send the status of the indvidual containers running on each worker.", - "items": { + "properties": { + "getMetadata": { + "$ref": "SourceGetMetadataResponse", + "description": "A response to a request to get metadata about a source." + }, + "split": { + "$ref": "SourceSplitResponse", + "description": "A response to a request to split a source." + } + }, + "id": "SourceOperationResponse" + }, + "SendDebugCaptureResponse": { + "description": "Response to a send capture request.\nnothing", "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - } - } - } - }, - "WorkerMessageCode": { - "id": "WorkerMessageCode", - "type": "object", - "description": "A message code is used to report status and error messages to the service. The message codes are intended to be machine readable. The service will take care of translating these into user understandable messages if necessary. Example use cases: 1. Worker processes reporting successful startup. 2. Worker processes reporting specific errors (e.g. package staging failure).", - "properties": { - "code": { - "type": "string", - "description": "The code is a string intended for consumption by a machine that identifies the type of message being sent. Examples: 1. \"HARNESS_STARTED\" might be used to indicate the worker harness has started. 2. \"GCS_DOWNLOAD_ERROR\" might be used to indicate an error downloading a GCS file as part of the boot process of one of the worker containers. This is a string and not an enum to make it easy to add new codes without waiting for an API change." + "properties": {}, + "id": "SendDebugCaptureResponse" }, - "parameters": { - "type": "object", - "description": "Parameters contains specific information about the code. This is a struct to allow parameters of different types. Examples: 1. For a \"HARNESS_STARTED\" message parameters might provide the name of the worker and additional data like timing information. 2. For a \"GCS_DOWNLOAD_ERROR\" parameters might contain fields listing the GCS objects being downloaded and fields containing errors. In general complex data structures should be avoided. If a worker needs to send a specific and complicated data structure then please consider defining a new proto and adding it to the data oneof in WorkerMessageResponse. Conventions: Parameters should only be used for information that isn't typically passed as a label. hostname and other worker identifiers should almost always be passed as labels since they will be included on most messages.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object." - } - } - } - }, - "SendWorkerMessagesResponse": { - "id": "SendWorkerMessagesResponse", - "type": "object", - "description": "The response to the worker messages.", - "properties": { - "workerMessageResponses": { - "type": "array", - "description": "The servers response to the worker messages.", - "items": { - "$ref": "WorkerMessageResponse" - } - } - } - }, - "WorkerMessageResponse": { - "id": "WorkerMessageResponse", - "type": "object", - "description": "A worker_message response allows the server to pass information to the sender.", - "properties": { - "workerHealthReportResponse": { - "$ref": "WorkerHealthReportResponse", - "description": "The service's response to a worker's health report." - } - } - }, - "WorkerHealthReportResponse": { - "id": "WorkerHealthReportResponse", - "type": "object", - "description": "WorkerHealthReportResponse contains information returned to the worker in response to a health ping.", - "properties": { - "reportInterval": { - "type": "string", - "description": "A positive value indicates the worker should change its reporting interval to the specified value. The default value of zero means no change in report rate is requested by the server." - } - } - } - }, - "resources": { - "projects": { - "methods": { - "workerMessages": { - "id": "dataflow.projects.workerMessages", - "path": "v1b3/projects/{projectId}/WorkerMessages", - "httpMethod": "POST", - "description": "Send a worker_message to the service.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project to send the WorkerMessages to.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId" - ], - "request": { - "$ref": "SendWorkerMessagesRequest" - }, - "response": { - "$ref": "SendWorkerMessagesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - }, - "resources": { - "jobs": { - "methods": { - "create": { - "id": "dataflow.projects.jobs.create", - "path": "v1b3/projects/{projectId}/jobs", - "httpMethod": "POST", - "description": "Creates a dataflow job.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the job.", - "required": true, - "location": "path" - }, - "view": { - "type": "string", - "description": "Level of information requested in response.", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL" - ], - "location": "query" - }, - "replaceJobId": { - "type": "string", - "description": "DEPRECATED. This field is now on the Job message.", - "location": "query" - }, - "location": { - "type": "string", - "description": "The location which contains this job.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId" - ], - "request": { - "$ref": "Job" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "get": { - "id": "dataflow.projects.jobs.get", - "path": "v1b3/projects/{projectId}/jobs/{jobId}", - "httpMethod": "GET", - "description": "Gets the state of the specified dataflow job.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the job.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "Identifies a single job.", - "required": true, - "location": "path" - }, - "view": { - "type": "string", - "description": "Level of information requested in response.", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL" - ], - "location": "query" - }, - "location": { - "type": "string", - "description": "The location which contains this job.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "update": { - "id": "dataflow.projects.jobs.update", - "path": "v1b3/projects/{projectId}/jobs/{jobId}", - "httpMethod": "PUT", - "description": "Updates the state of an existing dataflow job.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the job.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "Identifies a single job.", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "description": "The location which contains this job.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "request": { - "$ref": "Job" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "list": { - "id": "dataflow.projects.jobs.list", - "path": "v1b3/projects/{projectId}/jobs", - "httpMethod": "GET", - "description": "List the jobs of a project", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the jobs.", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "description": "The kind of filter to use.", - "enum": [ - "UNKNOWN", - "ALL", - "TERMINATED", - "ACTIVE" - ], - "location": "query" - }, - "view": { - "type": "string", - "description": "Level of information requested in response. Default is SUMMARY.", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL" - ], - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Set this to the 'next_page_token' field of a previous response to request additional results in a long list.", - "location": "query" - }, - "location": { - "type": "string", - "description": "The location which contains this job.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ListJobsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "getMetrics": { - "id": "dataflow.projects.jobs.getMetrics", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", - "httpMethod": "GET", - "description": "Request the job status.", - "parameters": { - "projectId": { - "type": "string", - "description": "A project id.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "The job to get messages for.", - "required": true, - "location": "path" - }, - "startTime": { - "type": "string", - "description": "Return only metric data that has changed since this time. Default is to return all information about all metrics for the job.", - "location": "query" - }, - "location": { - "type": "string", - "description": "The location which contains the job specified by job_id.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "JobMetrics" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - }, - "resources": { - "debug": { - "methods": { - "getConfig": { - "id": "dataflow.projects.jobs.debug.getConfig", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", - "httpMethod": "POST", - "description": "Get encoded debug configuration for component. Not cacheable.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project id.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "The job id.", - "required": true, - "location": "path" + "SideInputInfo": { + "description": "Information about a side input of a DoFn or an input of a SeqDoFn.", + "type": "object", + "properties": { + "sources": { + "description": "The source(s) to read element(s) from to get the value of this side input.\nIf more than one source, then the elements are taken from the\nsources, in the specified order if order matters.\nAt least one source is required.", + "type": "array", + "items": { + "$ref": "Source" } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "request": { - "$ref": "GetDebugConfigRequest" - }, - "response": { - "$ref": "GetDebugConfigResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] }, - "sendCapture": { - "id": "dataflow.projects.jobs.debug.sendCapture", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", - "httpMethod": "POST", - "description": "Send encoded debug capture data for component.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project id.", - "required": true, - "location": "path" + "kind": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" }, - "jobId": { - "type": "string", - "description": "The job id.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "request": { - "$ref": "SendDebugCaptureRequest" - }, - "response": { - "$ref": "SendDebugCaptureResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] + "description": "How to interpret the source element(s) as a side input value.", + "type": "object" + }, + "tag": { + "description": "The id of the tag the user code will access this side input by;\nthis should correspond to the tag of some MultiOutputInfo.", + "type": "string" } - } }, - "messages": { - "methods": { - "list": { - "id": "dataflow.projects.jobs.messages.list", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages", - "httpMethod": "GET", - "description": "Request the job status.", - "parameters": { - "projectId": { - "type": "string", - "description": "A project id.", - "required": true, - "location": "path" + "id": "SideInputInfo" + }, + "CounterStructuredNameAndMetadata": { + "description": "A single message which encapsulates structured name and metadata for a given\ncounter.", + "type": "object", + "properties": { + "name": { + "description": "Structured name of the counter.", + "$ref": "CounterStructuredName" + }, + "metadata": { + "$ref": "CounterMetadata", + "description": "Metadata associated with a counter" + } + }, + "id": "CounterStructuredNameAndMetadata" + }, + "ConcatPosition": { + "description": "A position that encapsulates an inner position and an index for the inner\nposition. A ConcatPosition can be used by a reader of a source that\nencapsulates a set of other sources.", + "type": "object", + "properties": { + "position": { + "$ref": "Position", + "description": "Position within the inner source." + }, + "index": { + "description": "Index of the inner source.", + "format": "int32", + "type": "integer" + } + }, + "id": "ConcatPosition" + }, + "WriteInstruction": { + "description": "An instruction that writes records.\nTakes one input, produces no outputs.", + "type": "object", + "properties": { + "sink": { + "$ref": "Sink", + "description": "The sink to write to." + }, + "input": { + "description": "The input.", + "$ref": "InstructionInput" + } + }, + "id": "WriteInstruction" + }, + "StreamingComputationRanges": { + "description": "Describes full or partial data disk assignment information of the computation\nranges.", + "type": "object", + "properties": { + "computationId": { + "description": "The ID of the computation.", + "type": "string" + }, + "rangeAssignments": { + "description": "Data disk assignments for ranges from this computation.", + "type": "array", + "items": { + "$ref": "KeyRangeDataDiskAssignment" + } + } + }, + "id": "StreamingComputationRanges" + }, + "AutoscalingSettings": { + "description": "Settings for WorkerPool autoscaling.", + "type": "object", + "properties": { + "algorithm": { + "enumDescriptions": [ + "The algorithm is unknown, or unspecified.", + "Disable autoscaling.", + "Increase worker count over time to reduce job execution time." + ], + "enum": [ + "AUTOSCALING_ALGORITHM_UNKNOWN", + "AUTOSCALING_ALGORITHM_NONE", + "AUTOSCALING_ALGORITHM_BASIC" + ], + "description": "The algorithm to use for autoscaling.", + "type": "string" + }, + "maxNumWorkers": { + "description": "The maximum number of workers to cap scaling at.", + "format": "int32", + "type": "integer" + } + }, + "id": "AutoscalingSettings" + }, + "ExecutionStageSummary": { + "description": "Description of the composing transforms, names/ids, and input/outputs of a\nstage of execution. Some composing transforms and sources may have been\ngenerated by the Dataflow service during execution planning.", + "type": "object", + "properties": { + "componentTransform": { + "description": "Transforms that comprise this execution stage.", + "type": "array", + "items": { + "$ref": "ComponentTransform" + } + }, + "componentSource": { + "description": "Collections produced and consumed by component transforms of this stage.", + "type": "array", + "items": { + "$ref": "ComponentSource" + } + }, + "kind": { + "enum": [ + "UNKNOWN_KIND", + "PAR_DO_KIND", + "GROUP_BY_KEY_KIND", + "FLATTEN_KIND", + "READ_KIND", + "WRITE_KIND", + "CONSTANT_KIND", + "SINGLETON_KIND", + "SHUFFLE_KIND" + ], + "description": "Type of tranform this stage is executing.", + "type": "string", + "enumDescriptions": [ + "Unrecognized transform type.", + "ParDo transform.", + "Group By Key transform.", + "Flatten transform.", + "Read transform.", + "Write transform.", + "Constructs from a constant value, such as with Create.of.", + "Creates a Singleton view of a collection.", + "Opening or closing a shuffle session, often as part of a GroupByKey." + ] + }, + "outputSource": { + "description": "Output sources for this stage.", + "type": "array", + "items": { + "$ref": "StageSource" + } + }, + "name": { + "description": "Dataflow service generated name for this stage.", + "type": "string" + }, + "inputSource": { + "description": "Input sources for this stage.", + "type": "array", + "items": { + "$ref": "StageSource" + } + }, + "id": { + "description": "Dataflow service generated id for this stage.", + "type": "string" + } + }, + "id": "ExecutionStageSummary" + }, + "SendWorkerMessagesRequest": { + "description": "A request for sending worker messages to the service.", + "type": "object", + "properties": { + "workerMessages": { + "description": "The WorkerMessages to send.", + "type": "array", + "items": { + "$ref": "WorkerMessage" + } + }, + "location": { + "description": "The location which contains the job", + "type": "string" + } + }, + "id": "SendWorkerMessagesRequest" + }, + "LogBucket": { + "description": "Bucket of values for Distribution's logarithmic histogram.", + "type": "object", + "properties": { + "count": { + "description": "Number of values in this bucket.", + "format": "int64", + "type": "string" + }, + "log": { + "description": "floor(log2(value)); defined to be zero for nonpositive values.\n log(-1) = 0\n log(0) = 0\n log(1) = 0\n log(2) = 1\n log(3) = 1\n log(4) = 2\n log(5) = 2", + "format": "int32", + "type": "integer" + } + }, + "id": "LogBucket" + }, + "SourceSplitShard": { + "description": "DEPRECATED in favor of DerivedSource.", + "type": "object", + "properties": { + "derivationMode": { + "enumDescriptions": [ + "The source derivation is unknown, or unspecified.", + "Produce a completely independent Source with no base.", + "Produce a Source based on the Source being split.", + "Produce a Source based on the base of the Source being split." + ], + "enum": [ + "SOURCE_DERIVATION_MODE_UNKNOWN", + "SOURCE_DERIVATION_MODE_INDEPENDENT", + "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT", + "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" + ], + "description": "DEPRECATED", + "type": "string" + }, + "source": { + "description": "DEPRECATED", + "$ref": "Source" + } + }, + "id": "SourceSplitShard" + }, + "CPUTime": { + "properties": { + "rate": { + "type": "number", + "description": "Average CPU utilization rate (% non-idle cpu / second) since previous\nsample.", + "format": "double" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the measurement.", + "format": "google-datetime" + }, + "totalMs": { + "description": "Total active CPU time across all cores (ie., non-idle) in milliseconds\nsince start-up.", + "format": "uint64", + "type": "string" + } + }, + "id": "CPUTime", + "description": "Modeled after information exposed by /proc/stat.", + "type": "object" + }, + "Environment": { + "description": "Describes the environment in which a Dataflow Job runs.", + "type": "object", + "properties": { + "clusterManagerApiService": { + "description": "The type of cluster manager API to use. If unknown or\nunspecified, the service will attempt to choose a reasonable\ndefault. This should be in the form of the API service name,\ne.g. \"compute.googleapis.com\".", + "type": "string" + }, + "tempStoragePrefix": { + "description": "The prefix of the resources the system should use for temporary\nstorage. The system will append the suffix \"/temp-{JOBNAME} to\nthis resource prefix, where {JOBNAME} is the value of the\njob_name field. The resulting bucket and object prefix is used\nas the prefix of the resources used to store temporary data\nneeded during the job execution. NOTE: This will override the\nvalue in taskrunner_settings.\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", + "type": "string" + }, + "workerPools": { + "description": "The worker pools. At least one \"harness\" worker pool must be\nspecified in order for the job to have workers.", + "type": "array", + "items": { + "$ref": "WorkerPool" + } + }, + "dataset": { + "description": "The dataset for the current project where various workflow\nrelated tables are stored.\n\nThe supported resource type is:\n\nGoogle BigQuery:\n bigquery.googleapis.com/{dataset}", + "type": "string" + }, + "experiments": { + "description": "The list of experiments to enable.", + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "description": "A structure describing which components and their versions of the service\nare required in order to run the job.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + }, + "internalExperiments": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" }, - "jobId": { - "type": "string", - "description": "The job to get messages about.", - "required": true, - "location": "path" + "description": "Experimental settings.", + "type": "object" + }, + "serviceAccountEmail": { + "type": "string", + "description": "Identity to run virtual machines as. Defaults to the default account." + }, + "sdkPipelineOptions": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" }, - "minimumImportance": { - "type": "string", - "description": "Filter to only get messages with importance \u003e= level", - "enum": [ + "description": "The Cloud Dataflow SDK pipeline options specified by the user. These\noptions are passed through the service and are used to recreate the\nSDK pipeline options on the worker in a language agnostic and platform\nindependent way.", + "type": "object" + }, + "userAgent": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "A description of the process that generated the request.", + "type": "object" + } + }, + "id": "Environment" + }, + "StreamingComputationTask": { + "type": "object", + "properties": { + "dataDisks": { + "description": "Describes the set of data disks this task should apply to.", + "type": "array", + "items": { + "$ref": "MountedDataDisk" + } + }, + "taskType": { + "enum": [ + "STREAMING_COMPUTATION_TASK_UNKNOWN", + "STREAMING_COMPUTATION_TASK_STOP", + "STREAMING_COMPUTATION_TASK_START" + ], + "description": "A type of streaming computation task.", + "type": "string", + "enumDescriptions": [ + "The streaming computation task is unknown, or unspecified.", + "Stop processing specified streaming computation range(s).", + "Start processing specified streaming computation range(s)." + ] + }, + "computationRanges": { + "description": "Contains ranges of a streaming computation this task should apply to.", + "type": "array", + "items": { + "$ref": "StreamingComputationRanges" + } + } + }, + "id": "StreamingComputationTask", + "description": "A task which describes what action should be performed for the specified\nstreaming computation ranges." + }, + "SendDebugCaptureRequest": { + "description": "Request to send encoded debug information.", + "type": "object", + "properties": { + "location": { + "description": "The location which contains the job specified by job_id.", + "type": "string" + }, + "data": { + "description": "The encoded debug information.", + "type": "string" + }, + "componentId": { + "description": "The internal component id for which debug information is sent.", + "type": "string" + }, + "workerId": { + "description": "The worker id, i.e., VM hostname.", + "type": "string" + } + }, + "id": "SendDebugCaptureRequest" + }, + "GetDebugConfigResponse": { + "description": "Response to a get debug configuration request.", + "type": "object", + "properties": { + "config": { + "description": "The encoded debug configuration for the requested component.", + "type": "string" + } + }, + "id": "GetDebugConfigResponse" + }, + "ComponentTransform": { + "description": "Description of a transform executed as part of an execution stage.", + "type": "object", + "properties": { + "originalTransform": { + "description": "User name for the original user transform with which this transform is\nmost closely associated.", + "type": "string" + }, + "name": { + "description": "Dataflow service generated name for this source.", + "type": "string" + }, + "userName": { + "description": "Human-readable name for this transform; may be user or system generated.", + "type": "string" + } + }, + "id": "ComponentTransform" + }, + "StreamingSetupTask": { + "description": "A task which initializes part of a streaming Dataflow job.", + "type": "object", + "properties": { + "receiveWorkPort": { + "description": "The TCP port on which the worker should listen for messages from\nother streaming computation workers.", + "format": "int32", + "type": "integer" + }, + "streamingComputationTopology": { + "description": "The global topology of the streaming Dataflow job.", + "$ref": "TopologyConfig" + }, + "workerHarnessPort": { + "type": "integer", + "description": "The TCP port used by the worker to communicate with the Dataflow\nworker harness.", + "format": "int32" + }, + "drain": { + "description": "The user has requested drain.", + "type": "boolean" + } + }, + "id": "StreamingSetupTask" + }, + "PubsubLocation": { + "description": "Identifies a pubsub location to use for transferring data into or\nout of a streaming Dataflow job.", + "type": "object", + "properties": { + "subscription": { + "description": "A pubsub subscription, in the form of\n\"pubsub.googleapis.com/subscriptions/\u003cproject-id\u003e/\u003csubscription-name\u003e\"", + "type": "string" + }, + "dropLateData": { + "description": "Indicates whether the pipeline allows late-arriving data.", + "type": "boolean" + }, + "trackingSubscription": { + "description": "If set, specifies the pubsub subscription that will be used for tracking\ncustom time timestamps for watermark estimation.", + "type": "string" + }, + "withAttributes": { + "description": "If true, then the client has requested to get pubsub attributes.", + "type": "boolean" + }, + "idLabel": { + "description": "If set, contains a pubsub label from which to extract record ids.\nIf left empty, record deduplication will be strictly best effort.", + "type": "string" + }, + "timestampLabel": { + "description": "If set, contains a pubsub label from which to extract record timestamps.\nIf left empty, record timestamps will be generated upon arrival.", + "type": "string" + }, + "topic": { + "description": "A pubsub topic, in the form of\n\"pubsub.googleapis.com/topics/\u003cproject-id\u003e/\u003ctopic-name\u003e\"", + "type": "string" + } + }, + "id": "PubsubLocation" + }, + "WorkerHealthReport": { + "description": "WorkerHealthReport contains information about the health of a worker.\n\nThe VM should be identified by the labels attached to the WorkerMessage that\nthis health ping belongs to.", + "type": "object", + "properties": { + "vmStartupTime": { + "description": "The time the VM was booted.", + "format": "google-datetime", + "type": "string" + }, + "vmIsHealthy": { + "description": "Whether the VM is healthy.", + "type": "boolean" + }, + "reportInterval": { + "description": "The interval at which the worker is sending health reports.\nThe default value of 0 should be interpreted as the field is not being\nexplicitly set by the worker.", + "format": "google-duration", + "type": "string" + }, + "pods": { + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "type": "object" + }, + "description": "The pods running on the worker. See:\nhttp://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod\n\nThis field is used by the worker to send the status of the indvidual\ncontainers running on each worker." + } + }, + "id": "WorkerHealthReport" + }, + "JobMessage": { + "description": "A particular message pertaining to a Dataflow job.", + "type": "object", + "properties": { + "messageText": { + "description": "The text of the message.", + "type": "string" + }, + "messageImportance": { + "type": "string", + "enumDescriptions": [ + "The message importance isn't specified, or is unknown.", + "The message is at the 'debug' level: typically only useful for\nsoftware engineers working on the code the job is running.\nTypically, Dataflow pipeline runners do not display log messages\nat this level by default.", + "The message is at the 'detailed' level: somewhat verbose, but\npotentially useful to users. Typically, Dataflow pipeline\nrunners do not display log messages at this level by default.\nThese messages are displayed by default in the Dataflow\nmonitoring UI.", + "The message is at the 'basic' level: useful for keeping\ntrack of the execution of a Dataflow pipeline. Typically,\nDataflow pipeline runners display log messages at this level by\ndefault, and these messages are displayed by default in the\nDataflow monitoring UI.", + "The message is at the 'warning' level: indicating a condition\npertaining to a job which may require human intervention.\nTypically, Dataflow pipeline runners display log messages at this\nlevel by default, and these messages are displayed by default in\nthe Dataflow monitoring UI.", + "The message is at the 'error' level: indicating a condition\npreventing a job from succeeding. Typically, Dataflow pipeline\nrunners display log messages at this level by default, and these\nmessages are displayed by default in the Dataflow monitoring UI." + ], + "enum": [ "JOB_MESSAGE_IMPORTANCE_UNKNOWN", "JOB_MESSAGE_DEBUG", "JOB_MESSAGE_DETAILED", "JOB_MESSAGE_BASIC", "JOB_MESSAGE_WARNING", "JOB_MESSAGE_ERROR" - ], - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "If specified, determines the maximum number of messages to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.", - "location": "query" - }, - "startTime": { - "type": "string", - "description": "If specified, return only messages with timestamps \u003e= start_time. The default is the job creation time (i.e. beginning of messages).", - "location": "query" - }, - "endTime": { - "type": "string", - "description": "Return only messages with timestamps \u003c end_time. The default is now (i.e. return up to the latest messages available).", - "location": "query" - }, - "location": { - "type": "string", - "description": "The location which contains the job specified by job_id.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "ListJobMessagesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] + ], + "description": "Importance level of the message." + }, + "time": { + "type": "string", + "description": "The timestamp of the message.", + "format": "google-datetime" + }, + "id": { + "description": "Deprecated.", + "type": "string" } - } }, - "workItems": { - "methods": { - "reportStatus": { - "id": "dataflow.projects.jobs.workItems.reportStatus", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", - "httpMethod": "POST", - "description": "Reports the status of dataflow WorkItems leased by a worker.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the WorkItem's job.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "The job which the WorkItem is part of.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "request": { - "$ref": "ReportWorkItemStatusRequest" - }, - "response": { - "$ref": "ReportWorkItemStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "lease": { - "id": "dataflow.projects.jobs.workItems.lease", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", - "httpMethod": "POST", - "description": "Leases a dataflow WorkItem to run.", - "parameters": { - "projectId": { - "type": "string", - "description": "Identifies the project this worker belongs to.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "Identifies the workflow job this worker belongs to.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "request": { - "$ref": "LeaseWorkItemRequest" - }, - "response": { - "$ref": "LeaseWorkItemResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - } - } - } + "id": "JobMessage" }, - "locations": { - "resources": { - "jobs": { - "methods": { - "create": { - "id": "dataflow.projects.locations.jobs.create", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs", - "httpMethod": "POST", - "description": "Creates a dataflow job.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the job.", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "description": "The location which contains this job.", - "required": true, - "location": "path" - }, - "view": { - "type": "string", - "description": "Level of information requested in response.", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL" - ], - "location": "query" - }, - "replaceJobId": { - "type": "string", - "description": "DEPRECATED. This field is now on the Job message.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "location" - ], - "request": { - "$ref": "Job" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] + "ParameterMetadata": { + "type": "object", + "properties": { + "name": { + "description": "Required. The name of the parameter.", + "type": "string" }, - "get": { - "id": "dataflow.projects.locations.jobs.get", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", - "httpMethod": "GET", - "description": "Gets the state of the specified dataflow job.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the job.", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "description": "The location which contains this job.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "Identifies a single job.", - "required": true, - "location": "path" - }, - "view": { - "type": "string", - "description": "Level of information requested in response.", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL" - ], - "location": "query" + "regexes": { + "description": "Optional. Regexes that the parameter must match.", + "type": "array", + "items": { + "type": "string" } - }, - "parameterOrder": [ - "projectId", - "location", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] }, - "update": { - "id": "dataflow.projects.locations.jobs.update", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", - "httpMethod": "PUT", - "description": "Updates the state of an existing dataflow job.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the job.", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "description": "The location which contains this job.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "Identifies a single job.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "location", - "jobId" - ], - "request": { - "$ref": "Job" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] + "label": { + "description": "Required. The label to display for the parameter.", + "type": "string" }, - "list": { - "id": "dataflow.projects.locations.jobs.list", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs", - "httpMethod": "GET", - "description": "List the jobs of a project", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the jobs.", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "description": "The location which contains this job.", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "description": "The kind of filter to use.", - "enum": [ - "UNKNOWN", - "ALL", - "TERMINATED", - "ACTIVE" - ], - "location": "query" - }, - "view": { - "type": "string", - "description": "Level of information requested in response. Default is SUMMARY.", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL" - ], - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Set this to the 'next_page_token' field of a previous response to request additional results in a long list.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "location" - ], - "response": { - "$ref": "ListJobsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] + "helpText": { + "description": "Required. The help text to display for the parameter.", + "type": "string" }, - "getMetrics": { - "id": "dataflow.projects.locations.jobs.getMetrics", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", - "httpMethod": "GET", - "description": "Request the job status.", - "parameters": { - "projectId": { - "type": "string", - "description": "A project id.", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "description": "The location which contains the job specified by job_id.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "The job to get messages for.", - "required": true, - "location": "path" - }, - "startTime": { - "type": "string", - "description": "Return only metric data that has changed since this time. Default is to return all information about all metrics for the job.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "location", - "jobId" - ], - "response": { - "$ref": "JobMetrics" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] + "isOptional": { + "description": "Optional. Whether the parameter is optional. Defaults to false.", + "type": "boolean" } - }, - "resources": { - "messages": { - "methods": { - "list": { - "id": "dataflow.projects.locations.jobs.messages.list", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", - "httpMethod": "GET", - "description": "Request the job status.", - "parameters": { - "projectId": { - "type": "string", - "description": "A project id.", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "description": "The location which contains the job specified by job_id.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "The job to get messages about.", - "required": true, - "location": "path" - }, - "minimumImportance": { - "type": "string", - "description": "Filter to only get messages with importance \u003e= level", - "enum": [ - "JOB_MESSAGE_IMPORTANCE_UNKNOWN", - "JOB_MESSAGE_DEBUG", - "JOB_MESSAGE_DETAILED", - "JOB_MESSAGE_BASIC", - "JOB_MESSAGE_WARNING", - "JOB_MESSAGE_ERROR" - ], - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "If specified, determines the maximum number of messages to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.", - "location": "query" - }, - "startTime": { - "type": "string", - "description": "If specified, return only messages with timestamps \u003e= start_time. The default is the job creation time (i.e. beginning of messages).", - "location": "query" - }, - "endTime": { - "type": "string", - "description": "Return only messages with timestamps \u003c end_time. The default is now (i.e. return up to the latest messages available).", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "location", - "jobId" - ], - "response": { - "$ref": "ListJobMessagesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - } - }, - "workItems": { - "methods": { - "reportStatus": { - "id": "dataflow.projects.locations.jobs.workItems.reportStatus", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", - "httpMethod": "POST", - "description": "Reports the status of dataflow WorkItems leased by a worker.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project which owns the WorkItem's job.", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "description": "The location which contains the WorkItem's job.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "The job which the WorkItem is part of.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "location", - "jobId" - ], - "request": { - "$ref": "ReportWorkItemStatusRequest" - }, - "response": { - "$ref": "ReportWorkItemStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "lease": { - "id": "dataflow.projects.locations.jobs.workItems.lease", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", - "httpMethod": "POST", - "description": "Leases a dataflow WorkItem to run.", - "parameters": { - "projectId": { - "type": "string", - "description": "Identifies the project this worker belongs to.", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "description": "The location which contains the WorkItem's job.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "Identifies the workflow job this worker belongs to.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "location", - "jobId" - ], - "request": { - "$ref": "LeaseWorkItemRequest" - }, - "response": { - "$ref": "LeaseWorkItemResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - } - } - } - } - } + }, + "id": "ParameterMetadata", + "description": "Metadata for a specific parameter." }, - "templates": { - "methods": { - "create": { - "id": "dataflow.projects.templates.create", - "path": "v1b3/projects/{projectId}/templates", - "httpMethod": "POST", - "description": "Creates a dataflow job from a template.", - "parameters": { + "MultiOutputInfo": { + "description": "Information about an output of a multi-output DoFn.", + "type": "object", + "properties": { + "tag": { + "description": "The id of the tag the user code will emit to this output by; this\nshould correspond to the tag of some SideInputInfo.", + "type": "string" + } + }, + "id": "MultiOutputInfo" + }, + "SourceSplitRequest": { + "description": "Represents the operation to split a high-level Source specification\ninto bundles (parts for parallel processing).\n\nAt a high level, splitting of a source into bundles happens as follows:\nSourceSplitRequest is applied to the source. If it returns\nSOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and the source\nis used \"as is\". Otherwise, splitting is applied recursively to each\nproduced DerivedSource.\n\nAs an optimization, for any Source, if its does_not_need_splitting is\ntrue, the framework assumes that splitting this source would return\nSOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest.\nThis applies both to the initial source being split and to bundles\nproduced from it.", + "type": "object", + "properties": { + "source": { + "description": "Specification of the source to be split.", + "$ref": "Source" + }, + "options": { + "description": "Hints for tuning the splitting process.", + "$ref": "SourceSplitOptions" + } + }, + "id": "SourceSplitRequest" + }, + "SourceGetMetadataResponse": { + "description": "The result of a SourceGetMetadataOperation.", + "type": "object", + "properties": { + "metadata": { + "$ref": "SourceMetadata", + "description": "The computed metadata." + } + }, + "id": "SourceGetMetadataResponse" + }, + "ShellTask": { + "properties": { + "exitCode": { + "description": "Exit code for the task.", + "format": "int32", + "type": "integer" + }, + "command": { + "description": "The shell command to run.", + "type": "string" + } + }, + "id": "ShellTask", + "description": "A task which consists of a shell command for the worker to execute.", + "type": "object" + }, + "MetricShortId": { + "type": "object", + "properties": { + "metricIndex": { + "description": "The index of the corresponding metric in\nthe ReportWorkItemStatusRequest. Required.", + "format": "int32", + "type": "integer" + }, + "shortId": { + "description": "The service-generated short identifier for the metric.", + "format": "int64", + "type": "string" + } + }, + "id": "MetricShortId", + "description": "The metric short id is returned to the user alongside an offset into\nReportWorkItemStatusRequest" + }, + "AutoscalingEvent": { + "description": "A structured message reporting an autoscaling decision made by the Dataflow\nservice.", + "type": "object", + "properties": { + "targetNumWorkers": { + "description": "The target number of workers the worker pool wants to resize to use.", + "format": "int64", + "type": "string" + }, + "eventType": { + "enumDescriptions": [ + "Default type for the enum. Value should never be returned.", + "The TARGET_NUM_WORKERS_CHANGED type should be used when the target\nworker pool size has changed at the start of an actuation. An event\nshould always be specified as TARGET_NUM_WORKERS_CHANGED if it reflects\na change in the target_num_workers.", + "The CURRENT_NUM_WORKERS_CHANGED type should be used when actual worker\npool size has been changed, but the target_num_workers has not changed.", + "The ACTUATION_FAILURE type should be used when we want to report\nan error to the user indicating why the current number of workers\nin the pool could not be changed.\nDisplayed in the current status and history widgets.", + "Used when we want to report to the user a reason why we are\nnot currently adjusting the number of workers.\nShould specify both target_num_workers, current_num_workers and a\ndecision_message." + ], + "enum": [ + "TYPE_UNKNOWN", + "TARGET_NUM_WORKERS_CHANGED", + "CURRENT_NUM_WORKERS_CHANGED", + "ACTUATION_FAILURE", + "NO_CHANGE" + ], + "description": "The type of autoscaling event to report.", + "type": "string" + }, + "currentNumWorkers": { + "description": "The current number of workers the job has.", + "format": "int64", + "type": "string" + }, + "description": { + "$ref": "StructuredMessage", + "description": "A message describing why the system decided to adjust the current\nnumber of workers, why it failed, or why the system decided to\nnot make any changes to the number of workers." + }, + "time": { + "description": "The time this event was emitted to indicate a new target or current\nnum_workers value.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "AutoscalingEvent" + }, + "TaskRunnerSettings": { + "properties": { + "baseUrl": { + "description": "The base URL for the taskrunner to use when accessing Google Cloud APIs.\n\nWhen workers access Google Cloud APIs, they logically do so via\nrelative URLs. If this field is specified, it supplies the base\nURL to use for resolving these relative URLs. The normative\nalgorithm used is defined by RFC 1808, \"Relative Uniform Resource\nLocators\".\n\nIf not specified, the default value is \"http://www.googleapis.com/\"", + "type": "string" + }, + "logToSerialconsole": { + "description": "Whether to send taskrunner log info to Google Compute Engine VM serial\nconsole.", + "type": "boolean" + }, + "continueOnException": { + "description": "Whether to continue taskrunner if an exception is hit.", + "type": "boolean" + }, + "parallelWorkerSettings": { + "description": "The settings to pass to the parallel worker harness.", + "$ref": "WorkerSettings" + }, + "taskUser": { + "description": "The UNIX user ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"root\".", + "type": "string" + }, + "vmId": { + "description": "The ID string of the VM.", + "type": "string" + }, + "alsologtostderr": { + "description": "Whether to also send taskrunner log info to stderr.", + "type": "boolean" + }, + "taskGroup": { + "description": "The UNIX group ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"wheel\".", + "type": "string" + }, + "harnessCommand": { + "description": "The command to launch the worker harness.", + "type": "string" + }, + "logDir": { + "description": "The directory on the VM to store logs.", + "type": "string" + }, + "dataflowApiVersion": { + "type": "string", + "description": "The API version of endpoint, e.g. \"v1b3\"" + }, + "oauthScopes": { + "description": "The OAuth2 scopes to be requested by the taskrunner in order to\naccess the Cloud Dataflow API.", + "type": "array", + "items": { + "type": "string" + } + }, + "streamingWorkerMainClass": { + "type": "string", + "description": "The streaming worker main class name." + }, + "logUploadLocation": { + "description": "Indicates where to put logs. If this is not specified, the logs\nwill not be uploaded.\n\nThe supported resource type is:\n\nGoogle Cloud Storage:\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", + "type": "string" + }, + "workflowFileName": { + "type": "string", + "description": "The file to store the workflow in." + }, + "tempStoragePrefix": { + "description": "The prefix of the resources the taskrunner should use for\ntemporary storage.\n\nThe supported resource type is:\n\nGoogle Cloud Storage:\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", + "type": "string" + }, + "baseTaskDir": { + "type": "string", + "description": "The location on the worker for task-specific subdirectories." + }, + "commandlinesFileName": { + "type": "string", + "description": "The file to store preprocessing commands in." + }, + "languageHint": { + "description": "The suggested backend language.", + "type": "string" + } + }, + "id": "TaskRunnerSettings", + "description": "Taskrunner configuration settings.", + "type": "object" + }, + "Position": { + "id": "Position", + "description": "Position defines a position within a collection of data. The value\ncan be either the end position, a key (used with ordered\ncollections), a byte offset, or a record index.", + "type": "object", + "properties": { + "recordIndex": { + "description": "Position is a record index.", + "format": "int64", + "type": "string" + }, + "shufflePosition": { + "description": "CloudPosition is a base64 encoded BatchShufflePosition (with FIXED\nsharding).", + "type": "string" + }, + "concatPosition": { + "description": "CloudPosition is a concat position.", + "$ref": "ConcatPosition" + }, + "byteOffset": { + "description": "Position is a byte offset.", + "format": "int64", + "type": "string" + }, + "end": { + "description": "Position is past all other positions. Also useful for the end\nposition of an unbounded range.", + "type": "boolean" + }, + "key": { + "description": "Position is a string key, ordered lexicographically.", + "type": "string" + } + } + }, + "Source": { + "description": "A source that records can be read and decoded from.", + "type": "object", + "properties": { + "codec": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The codec to use to decode data read from the source." + }, + "doesNotNeedSplitting": { + "description": "Setting this value to true hints to the framework that the source\ndoesn't need splitting, and using SourceSplitRequest on it would\nyield SOURCE_SPLIT_OUTCOME_USE_CURRENT.\n\nE.g. a file splitter may set this to true when splitting a single file\ninto a set of byte ranges of appropriate size, and set this\nto false when splitting a filepattern into individual files.\nHowever, for efficiency, a file splitter may decide to produce\nfile subranges directly from the filepattern to avoid a splitting\nround-trip.\n\nSee SourceSplitRequest for an overview of the splitting process.\n\nThis field is meaningful only in the Source objects populated\nby the user (e.g. when filling in a DerivedSource).\nSource objects supplied by the framework to the user don't have\nthis field populated.", + "type": "boolean" + }, + "spec": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The source to read from, plus its parameters.", + "type": "object" + }, + "metadata": { + "$ref": "SourceMetadata", + "description": "Optionally, metadata for this source can be supplied right away,\navoiding a SourceGetMetadataOperation roundtrip\n(see SourceOperationRequest).\n\nThis field is meaningful only in the Source objects populated\nby the user (e.g. when filling in a DerivedSource).\nSource objects supplied by the framework to the user don't have\nthis field populated." + }, + "baseSpecs": { + "description": "While splitting, sources may specify the produced bundles\nas differences against another source, in order to save backend-side\nmemory and allow bigger jobs. For details, see SourceSplitRequest.\nTo support this use case, the full set of parameters of the source\nis logically obtained by taking the latest explicitly specified value\nof each parameter in the order:\nbase_specs (later items win), spec (overrides anything in base_specs).", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "type": "object" + } + } + }, + "id": "Source" + }, + "SplitInt64": { + "description": "A representation of an int64, n, that is immune to precision loss when\nencoded in JSON.", + "type": "object", + "properties": { + "lowBits": { + "description": "The low order bits: n & 0xffffffff.", + "format": "uint32", + "type": "integer" + }, + "highBits": { + "description": "The high order bits, including the sign: n \u003e\u003e 32.", + "format": "int32", + "type": "integer" + } + }, + "id": "SplitInt64" + }, + "WorkerPool": { + "type": "object", + "properties": { + "zone": { + "description": "Zone to run the worker pools in. If empty or unspecified, the service\nwill attempt to choose a reasonable default.", + "type": "string" + }, + "numWorkers": { + "type": "integer", + "description": "Number of Google Compute Engine workers in this pool needed to\nexecute the job. If zero or unspecified, the service will\nattempt to choose a reasonable default.", + "format": "int32" + }, + "numThreadsPerWorker": { + "description": "The number of threads per worker harness. If empty or unspecified, the\nservice will choose a number of threads (according to the number of cores\non the selected machine type for batch, or 1 by convention for streaming).", + "format": "int32", + "type": "integer" + }, + "diskSourceImage": { + "type": "string", + "description": "Fully qualified source image for disks." + }, + "packages": { + "description": "Packages to be installed on workers.", + "type": "array", + "items": { + "$ref": "Package" + } + }, + "teardownPolicy": { + "description": "Sets the policy for determining when to turndown worker pool.\nAllowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and\n`TEARDOWN_NEVER`.\n`TEARDOWN_ALWAYS` means workers are always torn down regardless of whether\nthe job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down\nif the job succeeds. `TEARDOWN_NEVER` means the workers are never torn\ndown.\n\nIf the workers are not torn down by the service, they will\ncontinue to run and use Google Compute Engine VM resources in the\nuser's project until they are explicitly terminated by the user.\nBecause of this, Google recommends using the `TEARDOWN_ALWAYS`\npolicy except for small, manually supervised test jobs.\n\nIf unknown or unspecified, the service will attempt to choose a reasonable\ndefault.", + "type": "string", + "enumDescriptions": [ + "The teardown policy isn't specified, or is unknown.", + "Always teardown the resource.", + "Teardown the resource on success. This is useful for debugging\nfailures.", + "Never teardown the resource. This is useful for debugging and\ndevelopment." + ], + "enum": [ + "TEARDOWN_POLICY_UNKNOWN", + "TEARDOWN_ALWAYS", + "TEARDOWN_ON_SUCCESS", + "TEARDOWN_NEVER" + ] + }, + "onHostMaintenance": { + "description": "The action to take on host maintenance, as defined by the Google\nCompute Engine API.", + "type": "string" + }, + "poolArgs": { + "description": "Extra arguments for this worker pool.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "diskSizeGb": { + "description": "Size of root disk for VMs, in GB. If zero or unspecified, the service will\nattempt to choose a reasonable default.", + "format": "int32", + "type": "integer" + }, + "workerHarnessContainerImage": { + "type": "string", + "description": "Required. Docker container image that executes the Cloud Dataflow worker\nharness, residing in Google Container Registry." + }, + "diskType": { + "description": "Type of root disk for VMs. If empty or unspecified, the service will\nattempt to choose a reasonable default.", + "type": "string" + }, + "machineType": { + "description": "Machine type (e.g. \"n1-standard-1\"). If empty or unspecified, the\nservice will attempt to choose a reasonable default.", + "type": "string" + }, + "kind": { + "type": "string", + "description": "The kind of the worker pool; currently only `harness` and `shuffle`\nare supported." + }, + "dataDisks": { + "description": "Data disks that are used by a VM in this workflow.", + "type": "array", + "items": { + "$ref": "Disk" + } + }, + "subnetwork": { + "description": "Subnetwork to which VMs will be assigned, if desired. Expected to be of\nthe form \"regions/REGION/subnetworks/SUBNETWORK\".", + "type": "string" + }, + "ipConfiguration": { + "type": "string", + "enumDescriptions": [ + "The configuration is unknown, or unspecified.", + "Workers should have public IP addresses.", + "Workers should have private IP addresses." + ], + "enum": [ + "WORKER_IP_UNSPECIFIED", + "WORKER_IP_PUBLIC", + "WORKER_IP_PRIVATE" + ], + "description": "Configuration for VM IPs." + }, + "taskrunnerSettings": { + "description": "Settings passed through to Google Compute Engine workers when\nusing the standard Dataflow task runner. Users should ignore\nthis field.", + "$ref": "TaskRunnerSettings" + }, + "autoscalingSettings": { + "$ref": "AutoscalingSettings", + "description": "Settings for autoscaling of this WorkerPool." + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata to set on the Google Compute Engine VMs.", + "type": "object" + }, + "defaultPackageSet": { + "enumDescriptions": [ + "The default set of packages to stage is unknown, or unspecified.", + "Indicates that no packages should be staged at the worker unless\nexplicitly specified by the job.", + "Stage packages typically useful to workers written in Java.", + "Stage pacakges typically useful to workers written in Python." + ], + "enum": [ + "DEFAULT_PACKAGE_SET_UNKNOWN", + "DEFAULT_PACKAGE_SET_NONE", + "DEFAULT_PACKAGE_SET_JAVA", + "DEFAULT_PACKAGE_SET_PYTHON" + ], + "description": "The default package set to install. This allows the service to\nselect a default set of packages which are useful to worker\nharnesses written in a particular language.", + "type": "string" + }, + "network": { + "description": "Network to which VMs will be assigned. If empty or unspecified,\nthe service will use the network \"default\".", + "type": "string" + } + }, + "id": "WorkerPool", + "description": "Describes one particular pool of Cloud Dataflow workers to be\ninstantiated by the Cloud Dataflow service in order to perform the\ncomputations required by a job. Note that a workflow job may use\nmultiple pools, in order to match the various computational\nrequirements of the various stages of the job." + }, + "SourceOperationRequest": { + "id": "SourceOperationRequest", + "description": "A work item that represents the different operations that can be\nperformed on a user-defined Source specification.", + "type": "object", + "properties": { + "split": { + "description": "Information about a request to split a source.", + "$ref": "SourceSplitRequest" + }, + "getMetadata": { + "description": "Information about a request to get metadata about a source.", + "$ref": "SourceGetMetadataRequest" + } + } + }, + "WorkItem": { + "description": "WorkItem represents basic information about a WorkItem to be executed\nin the cloud.", + "type": "object", + "properties": { + "initialReportIndex": { + "description": "The initial index to use when reporting the status of the WorkItem.", + "format": "int64", + "type": "string" + }, + "streamingComputationTask": { + "description": "Additional information for StreamingComputationTask WorkItems.", + "$ref": "StreamingComputationTask" + }, + "shellTask": { + "$ref": "ShellTask", + "description": "Additional information for ShellTask WorkItems." + }, + "jobId": { + "description": "Identifies the workflow job this WorkItem belongs to.", + "type": "string" + }, + "id": { + "description": "Identifies this WorkItem.", + "format": "int64", + "type": "string" + }, + "configuration": { + "description": "Work item-specific configuration as an opaque blob.", + "type": "string" + }, + "mapTask": { + "$ref": "MapTask", + "description": "Additional information for MapTask WorkItems." + }, + "seqMapTask": { + "$ref": "SeqMapTask", + "description": "Additional information for SeqMapTask WorkItems." + }, + "packages": { + "description": "Any required packages that need to be fetched in order to execute\nthis WorkItem.", + "type": "array", + "items": { + "$ref": "Package" + } + }, "projectId": { - "type": "string", - "description": "The project which owns the job.", - "required": true, - "location": "path" + "description": "Identifies the cloud project this WorkItem belongs to.", + "type": "string" + }, + "reportStatusInterval": { + "description": "Recommended reporting interval.", + "format": "google-duration", + "type": "string" + }, + "streamingSetupTask": { + "description": "Additional information for StreamingSetupTask WorkItems.", + "$ref": "StreamingSetupTask" + }, + "sourceOperationTask": { + "$ref": "SourceOperationRequest", + "description": "Additional information for source operation WorkItems." + }, + "streamingConfigTask": { + "description": "Additional information for StreamingConfigTask WorkItems.", + "$ref": "StreamingConfigTask" + }, + "leaseExpireTime": { + "description": "Time when the lease on this Work will expire.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "WorkItem" + }, + "StructuredMessage": { + "description": "A rich message format, including a human readable string, a key for\nidentifying the message, and structured data associated with the message for\nprogrammatic consumption.", + "type": "object", + "properties": { + "parameters": { + "description": "The structured data associated with this message.", + "type": "array", + "items": { + "$ref": "Parameter" + } + }, + "messageKey": { + "description": "Idenfier for this message type. Used by external systems to\ninternationalize or personalize message.", + "type": "string" + }, + "messageText": { + "description": "Human-readable version of message.", + "type": "string" + } + }, + "id": "StructuredMessage" + }, + "ReportedParallelism": { + "description": "Represents the level of parallelism in a WorkItem's input,\nreported by the worker.", + "type": "object", + "properties": { + "isInfinite": { + "type": "boolean", + "description": "Specifies whether the parallelism is infinite. If true, \"value\" is\nignored.\nInfinite parallelism means the service will assume that the work item\ncan always be split into more non-empty work items by dynamic splitting.\nThis is a work-around for lack of support for infinity by the current\nJSON-based Java RPC stack." + }, + "value": { + "description": "Specifies the level of parallelism in case it is finite.", + "format": "double", + "type": "number" + } + }, + "id": "ReportedParallelism" + }, + "ResourceUtilizationReport": { + "description": "Worker metrics exported from workers. This contains resource utilization\nmetrics accumulated from a variety of sources. For more information, see\ngo/df-resource-signals.", + "type": "object", + "properties": { + "cpuTime": { + "description": "CPU utilization samples.", + "type": "array", + "items": { + "$ref": "CPUTime" + } + } + }, + "id": "ResourceUtilizationReport" + }, + "TopologyConfig": { + "description": "Global topology of the streaming Dataflow job, including all\ncomputations and their sharded locations.", + "type": "object", + "properties": { + "userStageToComputationNameMap": { + "description": "Maps user stage names to stable computation names.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "computations": { + "description": "The computations associated with a streaming Dataflow job.", + "type": "array", + "items": { + "$ref": "ComputationTopology" + } + }, + "dataDiskAssignments": { + "description": "The disks assigned to a streaming Dataflow job.", + "type": "array", + "items": { + "$ref": "DataDiskAssignment" + } + }, + "persistentStateVersion": { + "description": "Version number for persistent state.", + "format": "int32", + "type": "integer" + }, + "forwardingKeyBits": { + "type": "integer", + "description": "The size (in bits) of keys that will be assigned to source messages.", + "format": "int32" + } + }, + "id": "TopologyConfig" + }, + "SourceSplitOptions": { + "type": "object", + "properties": { + "desiredBundleSizeBytes": { + "type": "string", + "description": "The source should be split into a set of bundles where the estimated size\nof each is approximately this many bytes.", + "format": "int64" + }, + "desiredShardSizeBytes": { + "description": "DEPRECATED in favor of desired_bundle_size_bytes.", + "format": "int64", + "type": "string" + } + }, + "id": "SourceSplitOptions", + "description": "Hints for splitting a Source into bundles (parts for parallel\nprocessing) using SourceSplitRequest." + }, + "ReadInstruction": { + "description": "An instruction that reads records.\nTakes no inputs, produces one output.", + "type": "object", + "properties": { + "source": { + "description": "The source to read from.", + "$ref": "Source" + } + }, + "id": "ReadInstruction" + }, + "WorkerSettings": { + "properties": { + "baseUrl": { + "description": "The base URL for accessing Google Cloud APIs.\n\nWhen workers access Google Cloud APIs, they logically do so via\nrelative URLs. If this field is specified, it supplies the base\nURL to use for resolving these relative URLs. The normative\nalgorithm used is defined by RFC 1808, \"Relative Uniform Resource\nLocators\".\n\nIf not specified, the default value is \"http://www.googleapis.com/\"", + "type": "string" + }, + "reportingEnabled": { + "description": "Whether to send work progress updates to the service.", + "type": "boolean" + }, + "servicePath": { + "description": "The Cloud Dataflow service path relative to the root URL, for example,\n\"dataflow/v1b3/projects\".", + "type": "string" + }, + "shuffleServicePath": { + "description": "The Shuffle service path relative to the root URL, for example,\n\"shuffle/v1beta1\".", + "type": "string" + }, + "workerId": { + "description": "The ID of the worker running this pipeline.", + "type": "string" + }, + "tempStoragePrefix": { + "description": "The prefix of the resources the system should use for temporary\nstorage.\n\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", + "type": "string" + } + }, + "id": "WorkerSettings", + "description": "Provides data to pass through to the worker harness.", + "type": "object" + }, + "StreamingStageLocation": { + "description": "Identifies the location of a streaming computation stage, for\nstage-to-stage communication.", + "type": "object", + "properties": { + "streamId": { + "description": "Identifies the particular stream within the streaming Dataflow\njob.", + "type": "string" + } + }, + "id": "StreamingStageLocation" + }, + "DataDiskAssignment": { + "properties": { + "vmInstance": { + "description": "VM instance name the data disks mounted to, for example\n\"myproject-1014-104817-4c2-harness-0\".", + "type": "string" + }, + "dataDisks": { + "description": "Mounted data disks. The order is important a data disk's 0-based index in\nthis list defines which persistent directory the disk is mounted to, for\nexample the list of { \"myproject-1014-104817-4c2-harness-0-disk-0\" },\n{ \"myproject-1014-104817-4c2-harness-0-disk-1\" }.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "DataDiskAssignment", + "description": "Data disk assignment for a given VM instance.", + "type": "object" + }, + "ApproximateSplitRequest": { + "description": "A suggestion by the service to the worker to dynamically split the WorkItem.", + "type": "object", + "properties": { + "position": { + "$ref": "Position", + "description": "A Position at which to split the work item." + }, + "fractionConsumed": { + "description": "A fraction at which to split the work item, from 0.0 (beginning of the\ninput) to 1.0 (end of the input).", + "format": "double", + "type": "number" + } + }, + "id": "ApproximateSplitRequest" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + } + }, + "id": "Status" + }, + "ExecutionStageState": { + "properties": { + "executionStageName": { + "description": "The name of the execution stage.", + "type": "string" + }, + "currentStateTime": { + "description": "The time at which the stage transitioned to this state.", + "format": "google-datetime", + "type": "string" + }, + "executionStageState": { + "enum": [ + "JOB_STATE_UNKNOWN", + "JOB_STATE_STOPPED", + "JOB_STATE_RUNNING", + "JOB_STATE_DONE", + "JOB_STATE_FAILED", + "JOB_STATE_CANCELLED", + "JOB_STATE_UPDATED", + "JOB_STATE_DRAINING", + "JOB_STATE_DRAINED", + "JOB_STATE_PENDING", + "JOB_STATE_CANCELLING" + ], + "description": "Executions stage states allow the same set of values as JobState.", + "type": "string", + "enumDescriptions": [ + "The job's run state isn't specified.", + "`JOB_STATE_STOPPED` indicates that the job has not\nyet started to run.", + "`JOB_STATE_RUNNING` indicates that the job is currently running.", + "`JOB_STATE_DONE` indicates that the job has successfully completed.\nThis is a terminal job state. This state may be set by the Cloud Dataflow\nservice, as a transition from `JOB_STATE_RUNNING`. It may also be set via a\nCloud Dataflow `UpdateJob` call, if the job has not yet reached a terminal\nstate.", + "`JOB_STATE_FAILED` indicates that the job has failed. This is a\nterminal job state. This state may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_RUNNING`.", + "`JOB_STATE_CANCELLED` indicates that the job has been explicitly\ncancelled. This is a terminal job state. This state may only be\nset via a Cloud Dataflow `UpdateJob` call, and only if the job has not\nyet reached another terminal state.", + "`JOB_STATE_UPDATED` indicates that the job was successfully updated,\nmeaning that this job was stopped and another job was started, inheriting\nstate from this one. This is a terminal job state. This state may only be\nset by the Cloud Dataflow service, and only as a transition from\n`JOB_STATE_RUNNING`.", + "`JOB_STATE_DRAINING` indicates that the job is in the process of draining.\nA draining job has stopped pulling from its input sources and is processing\nany data that remains in-flight. This state may be set via a Cloud Dataflow\n`UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs\nthat are draining may only transition to `JOB_STATE_DRAINED`,\n`JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.", + "`JOB_STATE_DRAINED` indicates that the job has been drained.\nA drained job terminated by stopping pulling from its input sources and\nprocessing any data that remained in-flight when draining was requested.\nThis state is a terminal state, may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_DRAINING`.", + "'JOB_STATE_PENDING' indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", + "'JOB_STATE_CANCELLING' indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'." + ] + } + }, + "id": "ExecutionStageState", + "description": "A message describing the state of a particular execution stage.", + "type": "object" + }, + "StreamLocation": { + "description": "Describes a stream of data, either as input to be processed or as\noutput of a streaming Dataflow job.", + "type": "object", + "properties": { + "customSourceLocation": { + "description": "The stream is a custom source.", + "$ref": "CustomSourceLocation" + }, + "streamingStageLocation": { + "description": "The stream is part of another computation within the current\nstreaming Dataflow job.", + "$ref": "StreamingStageLocation" + }, + "pubsubLocation": { + "$ref": "PubsubLocation", + "description": "The stream is a pubsub stream." + }, + "sideInputLocation": { + "$ref": "StreamingSideInputLocation", + "description": "The stream is a streaming side input." + } + }, + "id": "StreamLocation" + }, + "SendWorkerMessagesResponse": { + "description": "The response to the worker messages.", + "type": "object", + "properties": { + "workerMessageResponses": { + "description": "The servers response to the worker messages.", + "type": "array", + "items": { + "$ref": "WorkerMessageResponse" + } + } + }, + "id": "SendWorkerMessagesResponse" + }, + "StreamingComputationConfig": { + "type": "object", + "properties": { + "computationId": { + "description": "Unique identifier for this computation.", + "type": "string" + }, + "systemName": { + "description": "System defined name for this computation.", + "type": "string" + }, + "stageName": { + "description": "Stage name of this computation.", + "type": "string" + }, + "instructions": { + "description": "Instructions that comprise the computation.", + "type": "array", + "items": { + "$ref": "ParallelInstruction" + } + } + }, + "id": "StreamingComputationConfig", + "description": "Configuration information for a single streaming computation." + }, + "TransformSummary": { + "description": "Description of the type, names/ids, and input/outputs for a transform.", + "type": "object", + "properties": { + "kind": { + "enum": [ + "UNKNOWN_KIND", + "PAR_DO_KIND", + "GROUP_BY_KEY_KIND", + "FLATTEN_KIND", + "READ_KIND", + "WRITE_KIND", + "CONSTANT_KIND", + "SINGLETON_KIND", + "SHUFFLE_KIND" + ], + "description": "Type of transform.", + "type": "string", + "enumDescriptions": [ + "Unrecognized transform type.", + "ParDo transform.", + "Group By Key transform.", + "Flatten transform.", + "Read transform.", + "Write transform.", + "Constructs from a constant value, such as with Create.of.", + "Creates a Singleton view of a collection.", + "Opening or closing a shuffle session, often as part of a GroupByKey." + ] + }, + "inputCollectionName": { + "description": "User names for all collection inputs to this transform.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "User provided name for this transform instance.", + "type": "string" + }, + "id": { + "description": "SDK generated id of this transform instance.", + "type": "string" + }, + "displayData": { + "description": "Transform-specific display data.", + "type": "array", + "items": { + "$ref": "DisplayData" + } + }, + "outputCollectionName": { + "description": "User names for all collection outputs to this transform.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TransformSummary" + }, + "LeaseWorkItemResponse": { + "properties": { + "workItems": { + "description": "A list of the leased WorkItems.", + "type": "array", + "items": { + "$ref": "WorkItem" + } + } + }, + "id": "LeaseWorkItemResponse", + "description": "Response to a request to lease WorkItems.", + "type": "object" + }, + "Sink": { + "description": "A sink that records can be encoded and written to.", + "type": "object", + "properties": { + "spec": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The sink to write to, plus its parameters.", + "type": "object" + }, + "codec": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The codec to use to encode data written to the sink.", + "type": "object" + } + }, + "id": "Sink" + }, + "LaunchTemplateParameters": { + "description": "Parameters to provide to the template being launched.", + "type": "object", + "properties": { + "jobName": { + "type": "string", + "description": "Required. The job name to use for the created job." + }, + "environment": { + "$ref": "RuntimeEnvironment", + "description": "The runtime environment for the job." + }, + "parameters": { + "additionalProperties": { + "type": "string" + }, + "description": "The runtime parameters to pass to the job.", + "type": "object" + } + }, + "id": "LaunchTemplateParameters" + }, + "FlattenInstruction": { + "description": "An instruction that copies its inputs (zero or more) to its (single) output.", + "type": "object", + "properties": { + "inputs": { + "description": "Describes the inputs to the flatten instruction.", + "type": "array", + "items": { + "$ref": "InstructionInput" + } + } + }, + "id": "FlattenInstruction" + }, + "PartialGroupByKeyInstruction": { + "properties": { + "sideInputs": { + "description": "Zero or more side inputs.", + "type": "array", + "items": { + "$ref": "SideInputInfo" + } + }, + "originalCombineValuesStepName": { + "description": "If this instruction includes a combining function, this is the name of the\nCombineValues instruction lifted into this instruction.", + "type": "string" + }, + "input": { + "description": "Describes the input to the partial group-by-key instruction.", + "$ref": "InstructionInput" + }, + "inputElementCodec": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The codec to use for interpreting an element in the input PTable.", + "type": "object" + }, + "valueCombiningFn": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The value combining function to invoke.", + "type": "object" + }, + "originalCombineValuesInputStoreName": { + "description": "If this instruction includes a combining function this is the name of the\nintermediate store between the GBK and the CombineValues.", + "type": "string" + } + }, + "id": "PartialGroupByKeyInstruction", + "description": "An instruction that does a partial group-by-key.\nOne input and one output.", + "type": "object" + }, + "InstructionInput": { + "properties": { + "producerInstructionIndex": { + "description": "The index (origin zero) of the parallel instruction that produces\nthe output to be consumed by this input. This index is relative\nto the list of instructions in this input's instruction's\ncontaining MapTask.", + "format": "int32", + "type": "integer" + }, + "outputNum": { + "description": "The output index (origin zero) within the producer.", + "format": "int32", + "type": "integer" + } + }, + "id": "InstructionInput", + "description": "An input of an instruction, as a reference to an output of a\nproducer instruction.", + "type": "object" + }, + "StageSource": { + "description": "Description of an input or output of an execution stage.", + "type": "object", + "properties": { + "name": { + "description": "Dataflow service generated name for this source.", + "type": "string" + }, + "sizeBytes": { + "description": "Size of the source, if measurable.", + "format": "int64", + "type": "string" + }, + "userName": { + "description": "Human-readable name for this source; may be user or system generated.", + "type": "string" + }, + "originalTransformOrCollection": { + "description": "User name for the original user transform or collection with which this\nsource is most closely associated.", + "type": "string" + } + }, + "id": "StageSource" + }, + "StringList": { + "description": "A metric value representing a list of strings.", + "type": "object", + "properties": { + "elements": { + "description": "Elements of the list.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "StringList" + }, + "DisplayData": { + "description": "Data provided with a pipeline or transform to provide descriptive info.", + "type": "object", + "properties": { + "strValue": { + "description": "Contains value if the data is of string type.", + "type": "string" + }, + "durationValue": { + "description": "Contains value if the data is of duration type.", + "format": "google-duration", + "type": "string" + }, + "int64Value": { + "description": "Contains value if the data is of int64 type.", + "format": "int64", + "type": "string" + }, + "namespace": { + "description": "The namespace for the key. This is usually a class name or programming\nlanguage namespace (i.e. python module) which defines the display data.\nThis allows a dax monitoring system to specially handle the data\nand perform custom rendering.", + "type": "string" + }, + "floatValue": { + "description": "Contains value if the data is of float type.", + "format": "float", + "type": "number" + }, + "key": { + "description": "The key identifying the display data.\nThis is intended to be used as a label for the display data\nwhen viewed in a dax monitoring system.", + "type": "string" + }, + "shortStrValue": { + "description": "A possible additional shorter value to display.\nFor example a java_class_name_value of com.mypackage.MyDoFn\nwill be stored with MyDoFn as the short_str_value and\ncom.mypackage.MyDoFn as the java_class_name value.\nshort_str_value can be displayed and java_class_name_value\nwill be displayed as a tooltip.", + "type": "string" + }, + "label": { + "description": "An optional label to display in a dax UI for the element.", + "type": "string" + }, + "url": { + "description": "An optional full URL.", + "type": "string" + }, + "timestampValue": { + "description": "Contains value if the data is of timestamp type.", + "format": "google-datetime", + "type": "string" + }, + "boolValue": { + "description": "Contains value if the data is of a boolean type.", + "type": "boolean" + }, + "javaClassValue": { + "description": "Contains value if the data is of java class type.", + "type": "string" + } + }, + "id": "DisplayData" + }, + "GetDebugConfigRequest": { + "description": "Request to get updated debug configuration for component.", + "type": "object", + "properties": { + "location": { + "description": "The location which contains the job specified by job_id.", + "type": "string" + }, + "componentId": { + "description": "The internal component id for which debug configuration is\nrequested.", + "type": "string" + }, + "workerId": { + "description": "The worker id, i.e., VM hostname.", + "type": "string" + } + }, + "id": "GetDebugConfigRequest" + }, + "LeaseWorkItemRequest": { + "type": "object", + "properties": { + "workerCapabilities": { + "description": "Worker capabilities. WorkItems might be limited to workers with specific\ncapabilities.", + "type": "array", + "items": { + "type": "string" + } + }, + "workerId": { + "type": "string", + "description": "Identifies the worker leasing work -- typically the ID of the\nvirtual machine running the worker." + }, + "requestedLeaseDuration": { + "description": "The initial lease period.", + "format": "google-duration", + "type": "string" + }, + "currentWorkerTime": { + "description": "The current timestamp at the worker.", + "format": "google-datetime", + "type": "string" + }, + "workItemTypes": { + "description": "Filter for WorkItem type.", + "type": "array", + "items": { + "type": "string" + } + }, + "location": { + "description": "The location which contains the WorkItem's job.", + "type": "string" + } + }, + "id": "LeaseWorkItemRequest", + "description": "Request to lease WorkItems." + }, + "GetTemplateResponse": { + "description": "The response to a GetTemplate request.", + "type": "object", + "properties": { + "status": { + "$ref": "Status", + "description": "The status of the get template request. Any problems with the\nrequest will be indicated in the error_details." + }, + "metadata": { + "description": "The template metadata describing the template name, available\nparameters, etc.", + "$ref": "TemplateMetadata" + } + }, + "id": "GetTemplateResponse" + }, + "Parameter": { + "type": "object", + "properties": { + "value": { + "description": "Value for this parameter.", + "type": "any" + }, + "key": { + "description": "Key or name for this parameter.", + "type": "string" + } + }, + "id": "Parameter", + "description": "Structured data associated with this message." + }, + "ReportWorkItemStatusRequest": { + "description": "Request to report the status of WorkItems.", + "type": "object", + "properties": { + "workerId": { + "description": "The ID of the worker reporting the WorkItem status. If this\ndoes not match the ID of the worker which the Dataflow service\nbelieves currently has the lease on the WorkItem, the report\nwill be dropped (with an error response).", + "type": "string" + }, + "currentWorkerTime": { + "type": "string", + "description": "The current timestamp at the worker.", + "format": "google-datetime" + }, + "location": { + "description": "The location which contains the WorkItem's job.", + "type": "string" + }, + "workItemStatuses": { + "description": "The order is unimportant, except that the order of the\nWorkItemServiceState messages in the ReportWorkItemStatusResponse\ncorresponds to the order of WorkItemStatus messages here.", + "type": "array", + "items": { + "$ref": "WorkItemStatus" + } + } + }, + "id": "ReportWorkItemStatusRequest" + }, + "PipelineDescription": { + "properties": { + "displayData": { + "description": "Pipeline level display data.", + "type": "array", + "items": { + "$ref": "DisplayData" + } + }, + "executionPipelineStage": { + "description": "Description of each stage of execution of the pipeline.", + "type": "array", + "items": { + "$ref": "ExecutionStageSummary" + } + }, + "originalPipelineTransform": { + "description": "Description of each transform in the pipeline and collections between them.", + "type": "array", + "items": { + "$ref": "TransformSummary" + } + } + }, + "id": "PipelineDescription", + "description": "A descriptive representation of submitted pipeline as well as the executed\nform. This data is provided by the Dataflow service for ease of visualizing\nthe pipeline and interpretting Dataflow provided metrics.", + "type": "object" + }, + "StreamingConfigTask": { + "description": "A task that carries configuration information for streaming computations.", + "type": "object", + "properties": { + "userStepToStateFamilyNameMap": { + "description": "Map from user step names to state families.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "windmillServicePort": { + "description": "If present, the worker must use this port to communicate with Windmill\nService dispatchers. Only applicable when windmill_service_endpoint is\nspecified.", + "format": "int64", + "type": "string" + }, + "streamingComputationConfigs": { + "description": "Set of computation configuration information.", + "type": "array", + "items": { + "$ref": "StreamingComputationConfig" + } + }, + "windmillServiceEndpoint": { + "description": "If present, the worker must use this endpoint to communicate with Windmill\nService dispatchers, otherwise the worker must continue to use whatever\nendpoint it had been using.", + "type": "string" + } + }, + "id": "StreamingConfigTask" + }, + "JobExecutionInfo": { + "description": "Additional information about how a Cloud Dataflow job will be executed that\nisn't contained in the submitted job.", + "type": "object", + "properties": { + "stages": { + "additionalProperties": { + "$ref": "JobExecutionStageInfo" + }, + "description": "A mapping from each stage to the information about that stage.", + "type": "object" + } + }, + "id": "JobExecutionInfo" + }, + "Step": { + "description": "Defines a particular step within a Cloud Dataflow job.\n\nA job consists of multiple steps, each of which performs some\nspecific operation as part of the overall job. Data is typically\npassed from one step to another as part of the job.\n\nHere's an example of a sequence of steps which together implement a\nMap-Reduce job:\n\n * Read a collection of data from some source, parsing the\n collection's elements.\n\n * Validate the elements.\n\n * Apply a user-defined function to map each element to some value\n and extract an element-specific key value.\n\n * Group elements with the same key into a single element with\n that key, transforming a multiply-keyed collection into a\n uniquely-keyed collection.\n\n * Write the elements out to some data sink.\n\nNote that the Cloud Dataflow service may be used to run many different\ntypes of jobs, not just Map-Reduce.", + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of step in the Cloud Dataflow job." + }, + "properties": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Named properties associated with the step. Each kind of\npredefined step has its own required set of properties.\nMust be provided on Create. Only retrieved with JOB_VIEW_ALL.", + "type": "object" + }, + "name": { + "description": "The name that identifies the step. This must be unique for each\nstep with respect to all other steps in the Cloud Dataflow job.", + "type": "string" + } + }, + "id": "Step" + }, + "FailedLocation": { + "id": "FailedLocation", + "description": "Indicates which location failed to respond to a request for data.", + "type": "object", + "properties": { + "name": { + "description": "The name of the failed location.", + "type": "string" } - }, - "parameterOrder": [ - "projectId" - ], - "request": { - "$ref": "CreateJobFromTemplateRequest" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] } - } + }, + "Disk": { + "description": "Describes the data disk used by a workflow job.", + "type": "object", + "properties": { + "sizeGb": { + "type": "integer", + "description": "Size of disk in GB. If zero or unspecified, the service will\nattempt to choose a reasonable default.", + "format": "int32" + }, + "diskType": { + "type": "string", + "description": "Disk storage type, as defined by Google Compute Engine. This\nmust be a disk type appropriate to the project and zone in which\nthe workers will run. If unknown or unspecified, the service\nwill attempt to choose a reasonable default.\n\nFor example, the standard persistent disk type is a resource name\ntypically ending in \"pd-standard\". If SSD persistent disks are\navailable, the resource name typically ends with \"pd-ssd\". The\nactual valid values are defined the Google Compute Engine API,\nnot by the Cloud Dataflow API; consult the Google Compute Engine\ndocumentation for more information about determining the set of\navailable disk types for a particular project and zone.\n\nGoogle Compute Engine Disk types are local to a particular\nproject in a particular zone, and so the resource name will\ntypically look something like this:\n\ncompute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-standard" + }, + "mountPoint": { + "description": "Directory in a VM where disk is mounted.", + "type": "string" + } + }, + "id": "Disk" + }, + "CounterMetadata": { + "description": "CounterMetadata includes all static non-name non-value counter attributes.", + "type": "object", + "properties": { + "otherUnits": { + "type": "string", + "description": "A string referring to the unit type." + }, + "kind": { + "description": "Counter aggregation kind.", + "type": "string", + "enumDescriptions": [ + "Counter aggregation kind was not set.", + "Aggregated value is the sum of all contributed values.", + "Aggregated value is the max of all contributed values.", + "Aggregated value is the min of all contributed values.", + "Aggregated value is the mean of all contributed values.", + "Aggregated value represents the logical 'or' of all contributed values.", + "Aggregated value represents the logical 'and' of all contributed values.", + "Aggregated value is a set of unique contributed values.", + "Aggregated value captures statistics about a distribution." + ], + "enum": [ + "INVALID", + "SUM", + "MAX", + "MIN", + "MEAN", + "OR", + "AND", + "SET", + "DISTRIBUTION" + ] + }, + "description": { + "description": "Human-readable description of the counter semantics.", + "type": "string" + }, + "standardUnits": { + "enum": [ + "BYTES", + "BYTES_PER_SEC", + "MILLISECONDS", + "MICROSECONDS", + "NANOSECONDS", + "TIMESTAMP_MSEC", + "TIMESTAMP_USEC", + "TIMESTAMP_NSEC" + ], + "description": "System defined Units, see above enum.", + "type": "string", + "enumDescriptions": [ + "Counter returns a value in bytes.", + "Counter returns a value in bytes per second.", + "Counter returns a value in milliseconds.", + "Counter returns a value in microseconds.", + "Counter returns a value in nanoseconds.", + "Counter returns a timestamp in milliseconds.", + "Counter returns a timestamp in microseconds.", + "Counter returns a timestamp in nanoseconds." + ] + } + }, + "id": "CounterMetadata" + }, + "ListJobMessagesResponse": { + "type": "object", + "properties": { + "autoscalingEvents": { + "description": "Autoscaling events in ascending timestamp order.", + "type": "array", + "items": { + "$ref": "AutoscalingEvent" + } + }, + "jobMessages": { + "type": "array", + "items": { + "$ref": "JobMessage" + }, + "description": "Messages in ascending timestamp order." + }, + "nextPageToken": { + "description": "The token to obtain the next page of results if there are more.", + "type": "string" + } + }, + "id": "ListJobMessagesResponse", + "description": "Response to a request to list job messages." + }, + "ApproximateReportedProgress": { + "description": "A progress measurement of a WorkItem by a worker.", + "type": "object", + "properties": { + "remainingParallelism": { + "description": "Total amount of parallelism in the input of this task that remains,\n(i.e. can be delegated to this task and any new tasks via dynamic\nsplitting). Always at least 1 for non-finished work items and 0 for\nfinished.\n\n\"Amount of parallelism\" refers to how many non-empty parts of the input\ncan be read in parallel. This does not necessarily equal number\nof records. An input that can be read in parallel down to the\nindividual records is called \"perfectly splittable\".\nAn example of non-perfectly parallelizable input is a block-compressed\nfile format where a block of records has to be read as a whole,\nbut different blocks can be read in parallel.\n\nExamples:\n* If we are processing record #30 (starting at 1) out of 50 in a perfectly\n splittable 50-record input, this value should be 21 (20 remaining + 1\n current).\n* If we are reading through block 3 in a block-compressed file consisting\n of 5 blocks, this value should be 3 (since blocks 4 and 5 can be\n processed in parallel by new tasks via dynamic splitting and the current\n task remains processing block 3).\n* If we are reading through the last block in a block-compressed file,\n or reading or processing the last record in a perfectly splittable\n input, this value should be 1, because apart from the current task, no\n additional remainder can be split off.", + "$ref": "ReportedParallelism" + }, + "position": { + "$ref": "Position", + "description": "A Position within the work to represent a progress." + }, + "fractionConsumed": { + "type": "number", + "description": "Completion as fraction of the input consumed, from 0.0 (beginning, nothing\nconsumed), to 1.0 (end of the input, entire input consumed).", + "format": "double" + }, + "consumedParallelism": { + "description": "Total amount of parallelism in the portion of input of this task that has\nalready been consumed and is no longer active. In the first two examples\nabove (see remaining_parallelism), the value should be 29 or 2\nrespectively. The sum of remaining_parallelism and consumed_parallelism\nshould equal the total amount of parallelism in this work item. If\nspecified, must be finite.", + "$ref": "ReportedParallelism" + } + }, + "id": "ApproximateReportedProgress" + }, + "IntegerList": { + "description": "A metric value representing a list of integers.", + "type": "object", + "properties": { + "elements": { + "description": "Elements of the list.", + "type": "array", + "items": { + "$ref": "SplitInt64" + } + } + }, + "id": "IntegerList" + }, + "StateFamilyConfig": { + "description": "State family configuration.", + "type": "object", + "properties": { + "stateFamily": { + "description": "The state family value.", + "type": "string" + }, + "isRead": { + "description": "If true, this family corresponds to a read operation.", + "type": "boolean" + } + }, + "id": "StateFamilyConfig" + }, + "ResourceUtilizationReportResponse": { + "properties": {}, + "id": "ResourceUtilizationReportResponse", + "description": "Service-side response to WorkerMessage reporting resource utilization.", + "type": "object" + }, + "SourceSplitResponse": { + "description": "The response to a SourceSplitRequest.", + "type": "object", + "properties": { + "shards": { + "type": "array", + "items": { + "$ref": "SourceSplitShard" + }, + "description": "DEPRECATED in favor of bundles." + }, + "outcome": { + "enum": [ + "SOURCE_SPLIT_OUTCOME_UNKNOWN", + "SOURCE_SPLIT_OUTCOME_USE_CURRENT", + "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" + ], + "description": "Indicates whether splitting happened and produced a list of bundles.\nIf this is USE_CURRENT_SOURCE_AS_IS, the current source should\nbe processed \"as is\" without splitting. \"bundles\" is ignored in this case.\nIf this is SPLITTING_HAPPENED, then \"bundles\" contains a list of\nbundles into which the source was split.", + "type": "string", + "enumDescriptions": [ + "The source split outcome is unknown, or unspecified.", + "The current source should be processed \"as is\" without splitting.", + "Splitting produced a list of bundles." + ] + }, + "bundles": { + "description": "If outcome is SPLITTING_HAPPENED, then this is a list of bundles\ninto which the source was split. Otherwise this field is ignored.\nThis list can be empty, which means the source represents an empty input.", + "type": "array", + "items": { + "$ref": "DerivedSource" + } + } + }, + "id": "SourceSplitResponse" + }, + "ParallelInstruction": { + "id": "ParallelInstruction", + "description": "Describes a particular operation comprising a MapTask.", + "type": "object", + "properties": { + "parDo": { + "description": "Additional information for ParDo instructions.", + "$ref": "ParDoInstruction" + }, + "read": { + "$ref": "ReadInstruction", + "description": "Additional information for Read instructions." + }, + "originalName": { + "description": "System-defined name for the operation in the original workflow graph.", + "type": "string" + }, + "flatten": { + "description": "Additional information for Flatten instructions.", + "$ref": "FlattenInstruction" + }, + "write": { + "description": "Additional information for Write instructions.", + "$ref": "WriteInstruction" + }, + "systemName": { + "description": "System-defined name of this operation.\nUnique across the workflow.", + "type": "string" + }, + "partialGroupByKey": { + "$ref": "PartialGroupByKeyInstruction", + "description": "Additional information for PartialGroupByKey instructions." + }, + "outputs": { + "description": "Describes the outputs of the instruction.", + "type": "array", + "items": { + "$ref": "InstructionOutput" + } + }, + "name": { + "description": "User-provided name of this operation.", + "type": "string" + } + } + }, + "Package": { + "properties": { + "location": { + "description": "The resource to read the package from. The supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}\n bucket.storage.googleapis.com/", + "type": "string" + }, + "name": { + "description": "The name of the package.", + "type": "string" + } + }, + "id": "Package", + "description": "The packages that must be installed in order for a worker to run the\nsteps of the Cloud Dataflow job that will be assigned to its worker\npool.\n\nThis is the mechanism by which the Cloud Dataflow SDK causes code to\nbe loaded onto the workers. For example, the Cloud Dataflow Java SDK\nmight use this to install jars containing the user's code and all of the\nvarious dependencies (libraries, data files, etc.) required in order\nfor that code to run.", + "type": "object" + }, + "KeyRangeDataDiskAssignment": { + "description": "Data disk assignment information for a specific key-range of a sharded\ncomputation.\nCurrently we only support UTF-8 character splits to simplify encoding into\nJSON.", + "type": "object", + "properties": { + "end": { + "description": "The end (exclusive) of the key range.", + "type": "string" + }, + "start": { + "description": "The start (inclusive) of the key range.", + "type": "string" + }, + "dataDisk": { + "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", + "type": "string" + } + }, + "id": "KeyRangeDataDiskAssignment" + }, + "ParDoInstruction": { + "properties": { + "numOutputs": { + "description": "The number of outputs.", + "format": "int32", + "type": "integer" + }, + "sideInputs": { + "description": "Zero or more side inputs.", + "type": "array", + "items": { + "$ref": "SideInputInfo" + } + }, + "multiOutputInfos": { + "description": "Information about each of the outputs, if user_fn is a MultiDoFn.", + "type": "array", + "items": { + "$ref": "MultiOutputInfo" + } + }, + "userFn": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The user function to invoke.", + "type": "object" + }, + "input": { + "$ref": "InstructionInput", + "description": "The input." + } + }, + "id": "ParDoInstruction", + "description": "An instruction that does a ParDo operation.\nTakes one main input and zero or more side inputs, and produces\nzero or more outputs.\nRuns user code.", + "type": "object" + }, + "MetricUpdate": { + "id": "MetricUpdate", + "description": "Describes the state of a metric.", + "type": "object", + "properties": { + "kind": { + "description": "Metric aggregation kind. The possible metric aggregation kinds are\n\"Sum\", \"Max\", \"Min\", \"Mean\", \"Set\", \"And\", \"Or\", and \"Distribution\".\nThe specified aggregation kind is case-insensitive.\n\nIf omitted, this is not an aggregated value but instead\na single metric sample value.", + "type": "string" + }, + "scalar": { + "description": "Worker-computed aggregate value for aggregation kinds \"Sum\", \"Max\", \"Min\",\n\"And\", and \"Or\". The possible value types are Long, Double, and Boolean.", + "type": "any" + }, + "meanCount": { + "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the count of the aggregated values and is used in combination\nwith mean_sum above to obtain the actual mean aggregate value.\nThe only possible value type is Long.", + "type": "any" + }, + "meanSum": { + "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the sum of the aggregated values and is used in combination\nwith mean_count below to obtain the actual mean aggregate value.\nThe only possible value types are Long and Double.", + "type": "any" + }, + "updateTime": { + "description": "Timestamp associated with the metric value. Optional when workers are\nreporting work progress; it will be filled in responses from the\nmetrics API.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "$ref": "MetricStructuredName", + "description": "Name of the metric." + }, + "distribution": { + "description": "A struct value describing properties of a distribution of numeric values.", + "type": "any" + }, + "set": { + "description": "Worker-computed aggregate value for the \"Set\" aggregation kind. The only\npossible value type is a list of Values whose type can be Long, Double,\nor String, according to the metric's type. All Values in the list must\nbe of the same type.", + "type": "any" + }, + "cumulative": { + "description": "True if this metric is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this metric is reported\nas a delta that is not associated with any WorkItem.", + "type": "boolean" + }, + "internal": { + "type": "any", + "description": "Worker-computed aggregate value for internal use by the Dataflow\nservice." + } + } + }, + "CounterStructuredName": { + "description": "Identifies a counter within a per-job namespace. Counters whose structured\nnames are the same get merged into a single value for the job.", + "type": "object", + "properties": { + "workerId": { + "description": "ID of a particular worker.", + "type": "string" + }, + "originNamespace": { + "description": "A string containing a more specific namespace of the counter's origin.", + "type": "string" + }, + "origin": { + "enumDescriptions": [ + "Counter was created by the Dataflow system.", + "Counter was created by the user." + ], + "enum": [ + "SYSTEM", + "USER" + ], + "description": "One of the standard Origins defined above.", + "type": "string" + }, + "name": { + "description": "Counter name. Not necessarily globally-unique, but unique within the\ncontext of the other fields.\nRequired.", + "type": "string" + }, + "executionStepName": { + "description": "Name of the stage. An execution step contains multiple component steps.", + "type": "string" + }, + "componentStepName": { + "description": "Name of the optimized step being executed by the workers.", + "type": "string" + }, + "portion": { + "description": "Portion of this counter, either key or value.", + "type": "string", + "enumDescriptions": [ + "Counter portion has not been set.", + "Counter reports a key.", + "Counter reports a value." + ], + "enum": [ + "ALL", + "KEY", + "VALUE" + ] + }, + "originalStepName": { + "description": "System generated name of the original step in the user's graph, before\noptimization.", + "type": "string" + } + }, + "id": "CounterStructuredName" + }, + "ApproximateProgress": { + "description": "Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest.", + "type": "object", + "properties": { + "percentComplete": { + "description": "Obsolete.", + "format": "float", + "type": "number" + }, + "remainingTime": { + "description": "Obsolete.", + "format": "google-duration", + "type": "string" + }, + "position": { + "description": "Obsolete.", + "$ref": "Position" + } + }, + "id": "ApproximateProgress" + }, + "WorkerMessageResponse": { + "properties": { + "workerMetricsResponse": { + "$ref": "ResourceUtilizationReportResponse", + "description": "Service's response to reporting worker metrics (currently empty)." + }, + "workerHealthReportResponse": { + "$ref": "WorkerHealthReportResponse", + "description": "The service's response to a worker's health report." + } + }, + "id": "WorkerMessageResponse", + "description": "A worker_message response allows the server to pass information to the\nsender.", + "type": "object" + }, + "TemplateMetadata": { + "description": "Metadata describing a template.", + "type": "object", + "properties": { + "name": { + "description": "Required. The name of the template.", + "type": "string" + }, + "parameters": { + "description": "The parameters for the template.", + "type": "array", + "items": { + "$ref": "ParameterMetadata" + } + }, + "description": { + "description": "Optional. A description of the template.", + "type": "string" + }, + "bypassTempDirValidation": { + "description": "If true, will bypass the validation that the temp directory is\nwritable. This should only be used with templates for pipelines\nthat are guaranteed not to need to write to the temp directory,\nwhich is subject to change based on the optimizer.", + "type": "boolean" + } + }, + "id": "TemplateMetadata" + }, + "WorkerMessage": { + "description": "WorkerMessage provides information to the backend about a worker.", + "type": "object", + "properties": { + "time": { + "type": "string", + "description": "The timestamp of the worker_message.", + "format": "google-datetime" + }, + "workerHealthReport": { + "$ref": "WorkerHealthReport", + "description": "The health of a worker." + }, + "workerMessageCode": { + "description": "A worker message code.", + "$ref": "WorkerMessageCode" + }, + "workerMetrics": { + "description": "Resource metrics reported by workers.", + "$ref": "ResourceUtilizationReport" + }, + "labels": { + "description": "Labels are used to group WorkerMessages.\nFor example, a worker_message about a particular container\nmight have the labels:\n{ \"JOB_ID\": \"2015-04-22\",\n \"WORKER_ID\": \"wordcount-vm-2015…\"\n \"CONTAINER_TYPE\": \"worker\",\n \"CONTAINER_ID\": \"ac1234def\"}\nLabel tags typically correspond to Label enum values. However, for ease\nof development other strings can be used as tags. LABEL_UNSPECIFIED should\nnot be used here.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "id": "WorkerMessage" + }, + "JobMetrics": { + "description": "JobMetrics contains a collection of metrics descibing the detailed progress\nof a Dataflow job. Metrics correspond to user-defined and system-defined\nmetrics in the job.\n\nThis resource captures only the most recent values of each metric;\ntime-series data can be queried for them (under the same metric names)\nfrom Cloud Monitoring.", + "type": "object", + "properties": { + "metricTime": { + "description": "Timestamp as of which metric values are current.", + "format": "google-datetime", + "type": "string" + }, + "metrics": { + "description": "All metrics for this job.", + "type": "array", + "items": { + "$ref": "MetricUpdate" + } + } + }, + "id": "JobMetrics" + }, + "FloatingPointList": { + "id": "FloatingPointList", + "description": "A metric value representing a list of floating point numbers.", + "type": "object", + "properties": { + "elements": { + "description": "Elements of the list.", + "type": "array", + "items": { + "format": "double", + "type": "number" + } + } + } + }, + "CounterUpdate": { + "description": "An update to a Counter sent from a worker.", + "type": "object", + "properties": { + "integer": { + "$ref": "SplitInt64", + "description": "Integer value for Sum, Max, Min." + }, + "structuredNameAndMetadata": { + "$ref": "CounterStructuredNameAndMetadata", + "description": "Counter structured name and metadata." + }, + "integerList": { + "description": "List of integers, for Set.", + "$ref": "IntegerList" + }, + "floatingPoint": { + "description": "Floating point value for Sum, Max, Min.", + "format": "double", + "type": "number" + }, + "integerMean": { + "$ref": "IntegerMean", + "description": "Integer mean aggregation value for Mean." + }, + "cumulative": { + "description": "True if this counter is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this counter is reported\nas a delta.", + "type": "boolean" + }, + "internal": { + "description": "Value for internally-defined counters used by the Dataflow service.", + "type": "any" + }, + "floatingPointMean": { + "description": "Floating point mean aggregation value for Mean.", + "$ref": "FloatingPointMean" + }, + "boolean": { + "description": "Boolean value for And, Or.", + "type": "boolean" + }, + "nameAndKind": { + "description": "Counter name and aggregation type.", + "$ref": "NameAndKind" + }, + "stringList": { + "description": "List of strings, for Set.", + "$ref": "StringList" + }, + "distribution": { + "$ref": "DistributionUpdate", + "description": "Distribution data" + }, + "shortId": { + "description": "The service-generated short identifier for this counter.\nThe short_id -\u003e (name, metadata) mapping is constant for the lifetime of\na job.", + "format": "int64", + "type": "string" + }, + "floatingPointList": { + "description": "List of floating point numbers, for Set.", + "$ref": "FloatingPointList" + } + }, + "id": "CounterUpdate" + }, + "SourceMetadata": { + "description": "Metadata about a Source useful for automatically optimizing\nand tuning the pipeline, etc.", + "type": "object", + "properties": { + "producesSortedKeys": { + "description": "Whether this source is known to produce key/value pairs with\nthe (encoded) keys in lexicographically sorted order.", + "type": "boolean" + }, + "infinite": { + "description": "Specifies that the size of this source is known to be infinite\n(this is a streaming source).", + "type": "boolean" + }, + "estimatedSizeBytes": { + "description": "An estimate of the total size (in bytes) of the data that would be\nread from this source. This estimate is in terms of external storage\nsize, before any decompression or other processing done by the reader.", + "format": "int64", + "type": "string" + } + }, + "id": "SourceMetadata" + }, + "DistributionUpdate": { + "id": "DistributionUpdate", + "description": "A metric value representing a distribution.", + "type": "object", + "properties": { + "min": { + "description": "The minimum value present in the distribution.", + "$ref": "SplitInt64" + }, + "sumOfSquares": { + "description": "Use a double since the sum of squares is likely to overflow int64.", + "format": "double", + "type": "number" + }, + "sum": { + "$ref": "SplitInt64", + "description": "Use an int64 since we'd prefer the added precision. If overflow is a common\nproblem we can detect it and use an additional int64 or a double." + }, + "max": { + "description": "The maximum value present in the distribution.", + "$ref": "SplitInt64" + }, + "logBuckets": { + "description": "(Optional) Logarithmic histogram of values.\nEach log may be in no more than one bucket. Order does not matter.", + "type": "array", + "items": { + "$ref": "LogBucket" + } + }, + "count": { + "$ref": "SplitInt64", + "description": "The count of the number of elements present in the distribution." + } + } + }, + "WorkerHealthReportResponse": { + "type": "object", + "properties": { + "reportInterval": { + "description": "A positive value indicates the worker should change its reporting interval\nto the specified value.\n\nThe default value of zero means no change in report rate is requested by\nthe server.", + "format": "google-duration", + "type": "string" + } + }, + "id": "WorkerHealthReportResponse", + "description": "WorkerHealthReportResponse contains information returned to the worker\nin response to a health ping." + }, + "SourceFork": { + "type": "object", + "properties": { + "primary": { + "$ref": "SourceSplitShard", + "description": "DEPRECATED" + }, + "primarySource": { + "description": "DEPRECATED", + "$ref": "DerivedSource" + }, + "residual": { + "$ref": "SourceSplitShard", + "description": "DEPRECATED" + }, + "residualSource": { + "description": "DEPRECATED", + "$ref": "DerivedSource" + } + }, + "id": "SourceFork", + "description": "DEPRECATED in favor of DynamicSourceSplit." + }, + "WorkItemStatus": { + "description": "Conveys a worker's progress through the work described by a WorkItem.", + "type": "object", + "properties": { + "counterUpdates": { + "description": "Worker output counters for this WorkItem.", + "type": "array", + "items": { + "$ref": "CounterUpdate" + } + }, + "workItemId": { + "description": "Identifies the WorkItem.", + "type": "string" + }, + "errors": { + "description": "Specifies errors which occurred during processing. If errors are\nprovided, and completed = true, then the WorkItem is considered\nto have failed.", + "type": "array", + "items": { + "$ref": "Status" + } + }, + "metricUpdates": { + "description": "DEPRECATED in favor of counter_updates.", + "type": "array", + "items": { + "$ref": "MetricUpdate" + } + }, + "dynamicSourceSplit": { + "$ref": "DynamicSourceSplit", + "description": "See documentation of stop_position." + }, + "sourceOperationResponse": { + "$ref": "SourceOperationResponse", + "description": "If the work item represented a SourceOperationRequest, and the work\nis completed, contains the result of the operation." + }, + "progress": { + "$ref": "ApproximateProgress", + "description": "DEPRECATED in favor of reported_progress." + }, + "requestedLeaseDuration": { + "description": "Amount of time the worker requests for its lease.", + "format": "google-duration", + "type": "string" + }, + "reportIndex": { + "description": "The report index. When a WorkItem is leased, the lease will\ncontain an initial report index. When a WorkItem's status is\nreported to the system, the report should be sent with\nthat report index, and the response will contain the index the\nworker should use for the next report. Reports received with\nunexpected index values will be rejected by the service.\n\nIn order to preserve idempotency, the worker should not alter the\ncontents of a report, even if the worker must submit the same\nreport multiple times before getting back a response. The worker\nshould not submit a subsequent report until the response for the\nprevious report had been received from the service.", + "format": "int64", + "type": "string" + }, + "stopPosition": { + "description": "A worker may split an active map task in two parts, \"primary\" and\n\"residual\", continuing to process the primary part and returning the\nresidual part into the pool of available work.\nThis event is called a \"dynamic split\" and is critical to the dynamic\nwork rebalancing feature. The two obtained sub-tasks are called\n\"parts\" of the split.\nThe parts, if concatenated, must represent the same input as would\nbe read by the current task if the split did not happen.\nThe exact way in which the original task is decomposed into the two\nparts is specified either as a position demarcating them\n(stop_position), or explicitly as two DerivedSources, if this\ntask consumes a user-defined source type (dynamic_source_split).\n\nThe \"current\" task is adjusted as a result of the split: after a task\nwith range [A, B) sends a stop_position update at C, its range is\nconsidered to be [A, C), e.g.:\n* Progress should be interpreted relative to the new range, e.g.\n \"75% completed\" means \"75% of [A, C) completed\"\n* The worker should interpret proposed_stop_position relative to the\n new range, e.g. \"split at 68%\" should be interpreted as\n \"split at 68% of [A, C)\".\n* If the worker chooses to split again using stop_position, only\n stop_positions in [A, C) will be accepted.\n* Etc.\ndynamic_source_split has similar semantics: e.g., if a task with\nsource S splits using dynamic_source_split into {P, R}\n(where P and R must be together equivalent to S), then subsequent\nprogress and proposed_stop_position should be interpreted relative\nto P, and in a potential subsequent dynamic_source_split into {P', R'},\nP' and R' must be together equivalent to P, etc.", + "$ref": "Position" + }, + "completed": { + "description": "True if the WorkItem was completed (successfully or unsuccessfully).", + "type": "boolean" + }, + "reportedProgress": { + "$ref": "ApproximateReportedProgress", + "description": "The worker's progress through this WorkItem." + }, + "sourceFork": { + "description": "DEPRECATED in favor of dynamic_source_split.", + "$ref": "SourceFork" + } + }, + "id": "WorkItemStatus" + }, + "ComponentSource": { + "properties": { + "name": { + "description": "Dataflow service generated name for this source.", + "type": "string" + }, + "userName": { + "description": "Human-readable name for this transform; may be user or system generated.", + "type": "string" + }, + "originalTransformOrCollection": { + "description": "User name for the original user transform or collection with which this\nsource is most closely associated.", + "type": "string" + } + }, + "id": "ComponentSource", + "description": "Description of an interstitial value between transforms in an execution\nstage.", + "type": "object" + }, + "WorkItemServiceState": { + "description": "The Dataflow service's idea of the current state of a WorkItem\nbeing processed by a worker.", + "type": "object", + "properties": { + "harnessData": { + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + }, + "description": "Other data returned by the service, specific to the particular\nworker harness." + }, + "leaseExpireTime": { + "description": "Time at which the current lease will expire.", + "format": "google-datetime", + "type": "string" + }, + "metricShortId": { + "description": "The short ids that workers should use in subsequent metric updates.\nWorkers should strive to use short ids whenever possible, but it is ok\nto request the short_id again if a worker lost track of it\n(e.g. if the worker is recovering from a crash).\nNOTE: it is possible that the response may have short ids for a subset\nof the metrics.", + "type": "array", + "items": { + "$ref": "MetricShortId" + } + }, + "nextReportIndex": { + "description": "The index value to use for the next report sent by the worker.\nNote: If the report call fails for whatever reason, the worker should\nreuse this index for subsequent report attempts.", + "format": "int64", + "type": "string" + }, + "suggestedStopPoint": { + "$ref": "ApproximateProgress", + "description": "DEPRECATED in favor of split_request." + }, + "splitRequest": { + "$ref": "ApproximateSplitRequest", + "description": "The progress point in the WorkItem where the Dataflow service\nsuggests that the worker truncate the task." + }, + "reportStatusInterval": { + "description": "New recommended reporting interval.", + "format": "google-duration", + "type": "string" + }, + "suggestedStopPosition": { + "description": "Obsolete, always empty.", + "$ref": "Position" + } + }, + "id": "WorkItemServiceState" + }, + "MetricStructuredName": { + "description": "Identifies a metric, by describing the source which generated the\nmetric.", + "type": "object", + "properties": { + "origin": { + "description": "Origin (namespace) of metric name. May be blank for user-define metrics;\nwill be \"dataflow\" for metrics defined by the Dataflow service or SDK.", + "type": "string" + }, + "name": { + "description": "Worker-defined metric name.", + "type": "string" + }, + "context": { + "description": "Zero or more labeled fields which identify the part of the job this\nmetric is associated with, such as the name of a step or collection.\n\nFor example, built-in counters associated with steps will have\ncontext['step'] = \u003cstep-name\u003e. Counters associated with PCollections\nin the SDK will have context['pcollection'] = \u003cpcollection-name\u003e.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "id": "MetricStructuredName" + }, + "SeqMapTaskOutputInfo": { + "type": "object", + "properties": { + "tag": { + "description": "The id of the TupleTag the user code will tag the output value by.", + "type": "string" + }, + "sink": { + "$ref": "Sink", + "description": "The sink to write the output value to." + } + }, + "id": "SeqMapTaskOutputInfo", + "description": "Information about an output of a SeqMapTask." + }, + "JobExecutionStageInfo": { + "type": "object", + "properties": { + "stepName": { + "description": "The steps associated with the execution stage.\nNote that stages may have several steps, and that a given step\nmight be run by more than one stage.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "JobExecutionStageInfo", + "description": "Contains information about how a particular\ngoogle.dataflow.v1beta3.Step will be executed." + }, + "KeyRangeLocation": { + "description": "Location information for a specific key-range of a sharded computation.\nCurrently we only support UTF-8 character splits to simplify encoding into\nJSON.", + "type": "object", + "properties": { + "deprecatedPersistentDirectory": { + "description": "DEPRECATED. The location of the persistent state for this range, as a\npersistent directory in the worker local filesystem.", + "type": "string" + }, + "deliveryEndpoint": { + "description": "The physical location of this range assignment to be used for\nstreaming computation cross-worker message delivery.", + "type": "string" + }, + "start": { + "description": "The start (inclusive) of the key range.", + "type": "string" + }, + "dataDisk": { + "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", + "type": "string" + }, + "end": { + "description": "The end (exclusive) of the key range.", + "type": "string" + } + }, + "id": "KeyRangeLocation" + }, + "SourceGetMetadataRequest": { + "description": "A request to compute the SourceMetadata of a Source.", + "type": "object", + "properties": { + "source": { + "$ref": "Source", + "description": "Specification of the source whose metadata should be computed." + } + }, + "id": "SourceGetMetadataRequest" + }, + "SeqMapTask": { + "description": "Describes a particular function to invoke.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The user-provided name of the SeqDo operation." + }, + "outputInfos": { + "description": "Information about each of the outputs.", + "type": "array", + "items": { + "$ref": "SeqMapTaskOutputInfo" + } + }, + "inputs": { + "description": "Information about each of the inputs.", + "type": "array", + "items": { + "$ref": "SideInputInfo" + } + }, + "systemName": { + "description": "System-defined name of the SeqDo operation.\nUnique across the workflow.", + "type": "string" + }, + "stageName": { + "description": "System-defined name of the stage containing the SeqDo operation.\nUnique across the workflow.", + "type": "string" + }, + "userFn": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The user function to invoke.", + "type": "object" + } + }, + "id": "SeqMapTask" + }, + "NameAndKind": { + "description": "Basic metadata about a counter.", + "type": "object", + "properties": { + "name": { + "description": "Name of the counter.", + "type": "string" + }, + "kind": { + "description": "Counter aggregation kind.", + "type": "string", + "enumDescriptions": [ + "Counter aggregation kind was not set.", + "Aggregated value is the sum of all contributed values.", + "Aggregated value is the max of all contributed values.", + "Aggregated value is the min of all contributed values.", + "Aggregated value is the mean of all contributed values.", + "Aggregated value represents the logical 'or' of all contributed values.", + "Aggregated value represents the logical 'and' of all contributed values.", + "Aggregated value is a set of unique contributed values.", + "Aggregated value captures statistics about a distribution." + ], + "enum": [ + "INVALID", + "SUM", + "MAX", + "MIN", + "MEAN", + "OR", + "AND", + "SET", + "DISTRIBUTION" + ] + } + }, + "id": "NameAndKind" + }, + "WorkerMessageCode": { + "description": "A message code is used to report status and error messages to the service.\nThe message codes are intended to be machine readable. The service will\ntake care of translating these into user understandable messages if\nnecessary.\n\nExample use cases:\n 1. Worker processes reporting successful startup.\n 2. Worker processes reporting specific errors (e.g. package staging\n failure).", + "type": "object", + "properties": { + "code": { + "description": "The code is a string intended for consumption by a machine that identifies\nthe type of message being sent.\nExamples:\n 1. \"HARNESS_STARTED\" might be used to indicate the worker harness has\n started.\n 2. \"GCS_DOWNLOAD_ERROR\" might be used to indicate an error downloading\n a GCS file as part of the boot process of one of the worker containers.\n\nThis is a string and not an enum to make it easy to add new codes without\nwaiting for an API change.", + "type": "string" + }, + "parameters": { + "description": "Parameters contains specific information about the code.\n\nThis is a struct to allow parameters of different types.\n\nExamples:\n 1. For a \"HARNESS_STARTED\" message parameters might provide the name\n of the worker and additional data like timing information.\n 2. For a \"GCS_DOWNLOAD_ERROR\" parameters might contain fields listing\n the GCS objects being downloaded and fields containing errors.\n\nIn general complex data structures should be avoided. If a worker\nneeds to send a specific and complicated data structure then please\nconsider defining a new proto and adding it to the data oneof in\nWorkerMessageResponse.\n\nConventions:\n Parameters should only be used for information that isn't typically passed\n as a label.\n hostname and other worker identifiers should almost always be passed\n as labels since they will be included on most messages.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + } + }, + "id": "WorkerMessageCode" + }, + "CustomSourceLocation": { + "type": "object", + "properties": { + "stateful": { + "description": "Whether this source is stateful.", + "type": "boolean" + } + }, + "id": "CustomSourceLocation", + "description": "Identifies the location of a custom souce." + }, + "MapTask": { + "description": "MapTask consists of an ordered set of instructions, each of which\ndescribes one particular low-level operation for the worker to\nperform in order to accomplish the MapTask's WorkItem.\n\nEach instruction must appear in the list before any instructions which\ndepends on its output.", + "type": "object", + "properties": { + "systemName": { + "description": "System-defined name of this MapTask.\nUnique across the workflow.", + "type": "string" + }, + "stageName": { + "type": "string", + "description": "System-defined name of the stage containing this MapTask.\nUnique across the workflow." + }, + "instructions": { + "type": "array", + "items": { + "$ref": "ParallelInstruction" + }, + "description": "The instructions in the MapTask." + } + }, + "id": "MapTask" + }, + "FloatingPointMean": { + "properties": { + "count": { + "$ref": "SplitInt64", + "description": "The number of values being aggregated." + }, + "sum": { + "description": "The sum of all values being aggregated.", + "format": "double", + "type": "number" + } + }, + "id": "FloatingPointMean", + "description": "A representation of a floating point mean metric contribution.", + "type": "object" + }, + "ReportWorkItemStatusResponse": { + "description": "Response from a request to report the status of WorkItems.", + "type": "object", + "properties": { + "workItemServiceStates": { + "description": "A set of messages indicating the service-side state for each\nWorkItem whose status was reported, in the same order as the\nWorkItemStatus messages in the ReportWorkItemStatusRequest which\nresulting in this response.", + "type": "array", + "items": { + "$ref": "WorkItemServiceState" + } + } + }, + "id": "ReportWorkItemStatusResponse" + }, + "InstructionOutput": { + "description": "An output of an instruction.", + "type": "object", + "properties": { + "originalName": { + "description": "System-defined name for this output in the original workflow graph.\nOutputs that do not contribute to an original instruction do not set this.", + "type": "string" + }, + "systemName": { + "description": "System-defined name of this output.\nUnique across the workflow.", + "type": "string" + }, + "onlyCountKeyBytes": { + "description": "For system-generated byte and mean byte metrics, certain instructions\nshould only report the key size.", + "type": "boolean" + }, + "onlyCountValueBytes": { + "description": "For system-generated byte and mean byte metrics, certain instructions\nshould only report the value size.", + "type": "boolean" + }, + "codec": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The codec to use to encode data being written via this output.", + "type": "object" + }, + "name": { + "type": "string", + "description": "The user-provided name of this output." + } + }, + "id": "InstructionOutput" + }, + "CreateJobFromTemplateRequest": { + "description": "A request to create a Cloud Dataflow job from a template.", + "type": "object", + "properties": { + "parameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The runtime parameters to pass to the job." + }, + "jobName": { + "description": "Required. The job name to use for the created job.", + "type": "string" + }, + "gcsPath": { + "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", + "type": "string" + }, + "environment": { + "$ref": "RuntimeEnvironment", + "description": "The runtime environment for the job." + }, + "location": { + "description": "The location to which to direct the request.", + "type": "string" + } + }, + "id": "CreateJobFromTemplateRequest" + }, + "IntegerMean": { + "description": "A representation of an integer mean metric contribution.", + "type": "object", + "properties": { + "count": { + "$ref": "SplitInt64", + "description": "The number of values being aggregated." + }, + "sum": { + "description": "The sum of all values being aggregated.", + "$ref": "SplitInt64" + } + }, + "id": "IntegerMean" + }, + "ListJobsResponse": { + "id": "ListJobsResponse", + "description": "Response to a request to list Cloud Dataflow jobs. This may be a partial\nresponse, depending on the page size in the ListJobsRequest.", + "type": "object", + "properties": { + "jobs": { + "description": "A subset of the requested job information.", + "type": "array", + "items": { + "$ref": "Job" + } + }, + "nextPageToken": { + "description": "Set if there may be more results than fit in this response.", + "type": "string" + }, + "failedLocation": { + "description": "Zero or more messages describing locations that failed to respond.", + "type": "array", + "items": { + "$ref": "FailedLocation" + } + } + } + }, + "ComputationTopology": { + "type": "object", + "properties": { + "stateFamilies": { + "description": "The state family values.", + "type": "array", + "items": { + "$ref": "StateFamilyConfig" + } + }, + "outputs": { + "description": "The outputs from the computation.", + "type": "array", + "items": { + "$ref": "StreamLocation" + } + }, + "systemStageName": { + "description": "The system stage name.", + "type": "string" + }, + "computationId": { + "description": "The ID of the computation.", + "type": "string" + }, + "inputs": { + "description": "The inputs to the computation.", + "type": "array", + "items": { + "$ref": "StreamLocation" + } + }, + "keyRanges": { + "description": "The key ranges processed by the computation.", + "type": "array", + "items": { + "$ref": "KeyRangeLocation" + } + } + }, + "id": "ComputationTopology", + "description": "All configuration data for a particular Computation." + }, + "RuntimeEnvironment": { + "description": "The environment values to set at runtime.", + "type": "object", + "properties": { + "bypassTempDirValidation": { + "description": "Whether to bypass the safety checks for the job's temporary directory.\nUse with caution.", + "type": "boolean" + }, + "serviceAccountEmail": { + "description": "The email address of the service account to run the job as.", + "type": "string" + }, + "tempLocation": { + "description": "The Cloud Storage path to use for temporary files.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", + "type": "string" + }, + "machineType": { + "type": "string", + "description": "The machine type to use for the job. Defaults to the value from the\ntemplate if not specified." + }, + "zone": { + "description": "The Compute Engine [availability\nzone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)\nfor launching worker instances to run your pipeline.", + "type": "string" + }, + "maxWorkers": { + "type": "integer", + "description": "The maximum number of Google Compute Engine instances to be made\navailable to your pipeline during execution, from 1 to 1000.", + "format": "int32" + } + }, + "id": "RuntimeEnvironment" + }, + "StreamingSideInputLocation": { + "description": "Identifies the location of a streaming side input.", + "type": "object", + "properties": { + "stateFamily": { + "type": "string", + "description": "Identifies the state family where this side input is stored." + }, + "tag": { + "description": "Identifies the particular side input within the streaming Dataflow job.", + "type": "string" + } + }, + "id": "StreamingSideInputLocation" + }, + "MountedDataDisk": { + "properties": { + "dataDisk": { + "type": "string", + "description": "The name of the data disk.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\"." + } + }, + "id": "MountedDataDisk", + "description": "Describes mounted data disk.", + "type": "object" + }, + "LaunchTemplateResponse": { + "properties": { + "job": { + "description": "The job that was launched, if the request was not a dry run and\nthe job was successfully launched.", + "$ref": "Job" + } + }, + "id": "LaunchTemplateResponse", + "description": "Response to the request to launch a template.", + "type": "object" + }, + "Job": { + "description": "Defines a job to be run by the Cloud Dataflow service.", + "type": "object", + "properties": { + "environment": { + "description": "The environment for the job.", + "$ref": "Environment" + }, + "labels": { + "description": "User-defined labels for this job.\n\nThe labels map can contain no more than 64 entries. Entries of the labels\nmap are UTF8 strings that comply with the following restrictions:\n\n* Keys must conform to regexp: \\p{Ll}\\p{Lo}{0,62}\n* Values must conform to regexp: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}\n* Both keys and values are additionally constrained to be \u003c= 128 bytes in\nsize.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "createTime": { + "description": "The timestamp when the job was initially created. Immutable and set by the\nCloud Dataflow service.", + "format": "google-datetime", + "type": "string" + }, + "stageStates": { + "description": "This field may be mutated by the Cloud Dataflow service;\ncallers cannot mutate it.", + "type": "array", + "items": { + "$ref": "ExecutionStageState" + } + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string" + }, + "type": { + "enum": [ + "JOB_TYPE_UNKNOWN", + "JOB_TYPE_BATCH", + "JOB_TYPE_STREAMING" + ], + "description": "The type of Cloud Dataflow job.", + "type": "string", + "enumDescriptions": [ + "The type of the job is unspecified, or unknown.", + "A batch job with a well-defined end point: data is read, data is\nprocessed, data is written, and the job is done.", + "A continuously streaming job with no end: data is read,\nprocessed, and written continuously." + ] + }, + "pipelineDescription": { + "$ref": "PipelineDescription", + "description": "Preliminary field: The format of this data may change at any time.\nA description of the user pipeline and stages through which it is executed.\nCreated by Cloud Dataflow service. Only retrieved with\nJOB_VIEW_DESCRIPTION or JOB_VIEW_ALL." + }, + "replaceJobId": { + "description": "If this job is an update of an existing job, this field is the job ID\nof the job it replaced.\n\nWhen sending a `CreateJobRequest`, you can update a job by specifying it\nhere. The job named here is stopped, and its intermediate state is\ntransferred to this job.", + "type": "string" + }, + "requestedState": { + "type": "string", + "enumDescriptions": [ + "The job's run state isn't specified.", + "`JOB_STATE_STOPPED` indicates that the job has not\nyet started to run.", + "`JOB_STATE_RUNNING` indicates that the job is currently running.", + "`JOB_STATE_DONE` indicates that the job has successfully completed.\nThis is a terminal job state. This state may be set by the Cloud Dataflow\nservice, as a transition from `JOB_STATE_RUNNING`. It may also be set via a\nCloud Dataflow `UpdateJob` call, if the job has not yet reached a terminal\nstate.", + "`JOB_STATE_FAILED` indicates that the job has failed. This is a\nterminal job state. This state may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_RUNNING`.", + "`JOB_STATE_CANCELLED` indicates that the job has been explicitly\ncancelled. This is a terminal job state. This state may only be\nset via a Cloud Dataflow `UpdateJob` call, and only if the job has not\nyet reached another terminal state.", + "`JOB_STATE_UPDATED` indicates that the job was successfully updated,\nmeaning that this job was stopped and another job was started, inheriting\nstate from this one. This is a terminal job state. This state may only be\nset by the Cloud Dataflow service, and only as a transition from\n`JOB_STATE_RUNNING`.", + "`JOB_STATE_DRAINING` indicates that the job is in the process of draining.\nA draining job has stopped pulling from its input sources and is processing\nany data that remains in-flight. This state may be set via a Cloud Dataflow\n`UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs\nthat are draining may only transition to `JOB_STATE_DRAINED`,\n`JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.", + "`JOB_STATE_DRAINED` indicates that the job has been drained.\nA drained job terminated by stopping pulling from its input sources and\nprocessing any data that remained in-flight when draining was requested.\nThis state is a terminal state, may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_DRAINING`.", + "'JOB_STATE_PENDING' indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", + "'JOB_STATE_CANCELLING' indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'." + ], + "enum": [ + "JOB_STATE_UNKNOWN", + "JOB_STATE_STOPPED", + "JOB_STATE_RUNNING", + "JOB_STATE_DONE", + "JOB_STATE_FAILED", + "JOB_STATE_CANCELLED", + "JOB_STATE_UPDATED", + "JOB_STATE_DRAINING", + "JOB_STATE_DRAINED", + "JOB_STATE_PENDING", + "JOB_STATE_CANCELLING" + ], + "description": "The job's requested state.\n\n`UpdateJob` may be used to switch between the `JOB_STATE_STOPPED` and\n`JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob` may\nalso be used to directly set a job's requested state to\n`JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating the\njob if it has not already reached a terminal state." + }, + "tempFiles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A set of files the system should be aware of that are used\nfor temporary storage. These temporary files will be\nremoved on job completion.\nNo duplicates are allowed.\nNo file patterns are supported.\n\nThe supported files are:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}" + }, + "clientRequestId": { + "description": "The client's unique identifier of the job, re-used across retried attempts.\nIf this field is set, the service will ensure its uniqueness.\nThe request to create a job will fail if the service has knowledge of a\npreviously submitted job with the same client's ID and job name.\nThe caller may use this field to ensure idempotence of job\ncreation across retried attempts to create a job.\nBy default, the field is empty and, in that case, the service ignores it.", + "type": "string" + }, + "name": { + "description": "The user-specified Cloud Dataflow job name.\n\nOnly one Job with a given name may exist in a project at any\ngiven time. If a caller attempts to create a Job with the same\nname as an already-existing Job, the attempt returns the\nexisting Job.\n\nThe name must match the regular expression\n`[a-z]([-a-z0-9]{0,38}[a-z0-9])?`", + "type": "string" + }, + "steps": { + "description": "The top-level steps that constitute the entire job.", + "type": "array", + "items": { + "$ref": "Step" + } + }, + "replacedByJobId": { + "description": "If another job is an update of this job (and thus, this job is in\n`JOB_STATE_UPDATED`), this field contains the ID of that job.", + "type": "string" + }, + "executionInfo": { + "description": "Deprecated.", + "$ref": "JobExecutionInfo" + }, + "id": { + "description": "The unique ID of this job.\n\nThis field is set by the Cloud Dataflow service when the Job is\ncreated, and is immutable for the life of the job.", + "type": "string" + }, + "currentState": { + "type": "string", + "enumDescriptions": [ + "The job's run state isn't specified.", + "`JOB_STATE_STOPPED` indicates that the job has not\nyet started to run.", + "`JOB_STATE_RUNNING` indicates that the job is currently running.", + "`JOB_STATE_DONE` indicates that the job has successfully completed.\nThis is a terminal job state. This state may be set by the Cloud Dataflow\nservice, as a transition from `JOB_STATE_RUNNING`. It may also be set via a\nCloud Dataflow `UpdateJob` call, if the job has not yet reached a terminal\nstate.", + "`JOB_STATE_FAILED` indicates that the job has failed. This is a\nterminal job state. This state may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_RUNNING`.", + "`JOB_STATE_CANCELLED` indicates that the job has been explicitly\ncancelled. This is a terminal job state. This state may only be\nset via a Cloud Dataflow `UpdateJob` call, and only if the job has not\nyet reached another terminal state.", + "`JOB_STATE_UPDATED` indicates that the job was successfully updated,\nmeaning that this job was stopped and another job was started, inheriting\nstate from this one. This is a terminal job state. This state may only be\nset by the Cloud Dataflow service, and only as a transition from\n`JOB_STATE_RUNNING`.", + "`JOB_STATE_DRAINING` indicates that the job is in the process of draining.\nA draining job has stopped pulling from its input sources and is processing\nany data that remains in-flight. This state may be set via a Cloud Dataflow\n`UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs\nthat are draining may only transition to `JOB_STATE_DRAINED`,\n`JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.", + "`JOB_STATE_DRAINED` indicates that the job has been drained.\nA drained job terminated by stopping pulling from its input sources and\nprocessing any data that remained in-flight when draining was requested.\nThis state is a terminal state, may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_DRAINING`.", + "'JOB_STATE_PENDING' indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", + "'JOB_STATE_CANCELLING' indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'." + ], + "enum": [ + "JOB_STATE_UNKNOWN", + "JOB_STATE_STOPPED", + "JOB_STATE_RUNNING", + "JOB_STATE_DONE", + "JOB_STATE_FAILED", + "JOB_STATE_CANCELLED", + "JOB_STATE_UPDATED", + "JOB_STATE_DRAINING", + "JOB_STATE_DRAINED", + "JOB_STATE_PENDING", + "JOB_STATE_CANCELLING" + ], + "description": "The current state of the job.\n\nJobs are created in the `JOB_STATE_STOPPED` state unless otherwise\nspecified.\n\nA job in the `JOB_STATE_RUNNING` state may asynchronously enter a\nterminal state. After a job has reached a terminal state, no\nfurther state updates may be made.\n\nThis field may be mutated by the Cloud Dataflow service;\ncallers cannot mutate it." + }, + "location": { + "description": "The location that contains this job.", + "type": "string" + }, + "currentStateTime": { + "description": "The timestamp associated with the current state.", + "format": "google-datetime", + "type": "string" + }, + "transformNameMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The map of transform name prefixes of the job to be replaced to the\ncorresponding name prefixes of the new job." + } + }, + "id": "Job" + }, + "DynamicSourceSplit": { + "description": "When a task splits using WorkItemStatus.dynamic_source_split, this\nmessage describes the two parts of the split relative to the\ndescription of the current task's input.", + "type": "object", + "properties": { + "residual": { + "$ref": "DerivedSource", + "description": "Residual part (returned to the pool of work).\nSpecified relative to the previously-current source." + }, + "primary": { + "$ref": "DerivedSource", + "description": "Primary part (continued to be processed by worker).\nSpecified relative to the previously-current source.\nBecomes current." + } + }, + "id": "DynamicSourceSplit" + }, + "DerivedSource": { + "description": "Specification of one of the bundles produced as a result of splitting\na Source (e.g. when executing a SourceSplitRequest, or when\nsplitting an active task using WorkItemStatus.dynamic_source_split),\nrelative to the source being split.", + "type": "object", + "properties": { + "derivationMode": { + "enumDescriptions": [ + "The source derivation is unknown, or unspecified.", + "Produce a completely independent Source with no base.", + "Produce a Source based on the Source being split.", + "Produce a Source based on the base of the Source being split." + ], + "enum": [ + "SOURCE_DERIVATION_MODE_UNKNOWN", + "SOURCE_DERIVATION_MODE_INDEPENDENT", + "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT", + "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" + ], + "description": "What source to base the produced source on (if any).", + "type": "string" + }, + "source": { + "$ref": "Source", + "description": "Specification of the source." + } + }, + "id": "DerivedSource" } - } - } - } + }, + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "version": "v1b3", + "baseUrl": "https://dataflow.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/compute": { + "description": "View and manage your Google Compute Engine resources" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/userinfo.email": { + "description": "View your email address" + } + } + } + }, + "servicePath": "", + "description": "Manages Google Cloud Dataflow projects on Google Cloud Platform.", + "kind": "discovery#restDescription", + "rootUrl": "https://dataflow.googleapis.com/", + "basePath": "" } diff --git a/etc/api/dataproc/v1/dataproc-api.json b/etc/api/dataproc/v1/dataproc-api.json index 0c6e38c52f..91b577920b 100644 --- a/etc/api/dataproc/v1/dataproc-api.json +++ b/etc/api/dataproc/v1/dataproc-api.json @@ -1,1797 +1,2016 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/UWIx0i13luZLKjW6gmDu2evUqDA\"", - "discoveryVersion": "v1", - "id": "dataproc:v1", - "name": "dataproc", - "version": "v1", - "revision": "20161102", - "title": "Google Cloud Dataproc API", - "description": "An API for managing Hadoop-based clusters and jobs on Google Cloud Platform.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/dataproc/", - "protocol": "rest", - "baseUrl": "https://dataproc.googleapis.com/", - "basePath": "", - "rootUrl": "https://dataproc.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "schemas": { - "Cluster": { - "id": "Cluster", - "type": "object", - "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.", - "properties": { - "projectId": { - "type": "string", - "description": "[Required] The Google Cloud Platform project ID that the cluster belongs to." - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused." - }, - "config": { - "$ref": "ClusterConfig", - "description": "[Required] The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated." - }, - "labels": { - "type": "object", - "description": "[Optional] The labels to associate with this cluster. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.", - "additionalProperties": { - "type": "string" - } - }, - "status": { - "$ref": "ClusterStatus", - "description": "[Output-only] Cluster status." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] The previous cluster status.", - "items": { - "$ref": "ClusterStatus" - } - }, - "clusterUuid": { - "type": "string", - "description": "[Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster." - }, - "metrics": { - "$ref": "ClusterMetrics", - "description": "Contains cluster daemon metrics such as HDFS and YARN stats. **Beta Feature**: This report is available for testing purposes only. It may be changed before final release." - } - } - }, - "ClusterConfig": { - "id": "ClusterConfig", - "type": "object", - "description": "The cluster config.", - "properties": { - "configBucket": { - "type": "string", - "description": "[Optional] A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you." - }, - "gceClusterConfig": { - "$ref": "GceClusterConfig", - "description": "[Required] The shared Google Compute Engine config settings for all instances in a cluster." - }, - "masterConfig": { - "$ref": "InstanceGroupConfig", - "description": "[Optional] The Google Compute Engine config settings for the master instance in a cluster." - }, - "workerConfig": { - "$ref": "InstanceGroupConfig", - "description": "[Optional] The Google Compute Engine config settings for worker instances in a cluster." - }, - "secondaryWorkerConfig": { - "$ref": "InstanceGroupConfig", - "description": "[Optional] The Google Compute Engine config settings for additional worker instances in a cluster." - }, - "softwareConfig": { - "$ref": "SoftwareConfig", - "description": "[Optional] The config settings for software inside the cluster." - }, - "initializationActions": { - "type": "array", - "description": "[Optional] Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using `curl` (you can also use `wget`): ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) if [[ \"${ROLE}\" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi", - "items": { - "$ref": "NodeInitializationAction" - } - } - } - }, - "GceClusterConfig": { - "id": "GceClusterConfig", - "type": "object", - "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "properties": { - "zoneUri": { - "type": "string", - "description": "[Required] The zone where the Google Compute Engine cluster will be located. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`." - }, - "networkUri": { - "type": "string", - "description": "[Optional] The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither `network_uri` nor `subnetwork_uri` is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see [Using Subnetworks](/compute/docs/subnetworks) for more information). Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`." - }, - "subnetworkUri": { - "type": "string", - "description": "[Optional] The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`." - }, - "internalIpOnly": { - "type": "boolean", - "description": "[Optional] If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This `internal_ip_only` restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses." - }, - "serviceAccountScopes": { - "type": "array", - "description": "[Optional] The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: * https://www.googleapis.com/auth/cloud.useraccounts.readonly * https://www.googleapis.com/auth/devstorage.read_write * https://www.googleapis.com/auth/logging.write If no scopes are specified, the following defaults are also provided: * https://www.googleapis.com/auth/bigquery * https://www.googleapis.com/auth/bigtable.admin.table * https://www.googleapis.com/auth/bigtable.data * https://www.googleapis.com/auth/devstorage.full_control", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "description": "The Google Compute Engine tags to add to all instances (see [Tagging instances](/compute/docs/label-or-tag-resources#tags)).", - "items": { - "type": "string" - } - }, - "metadata": { - "type": "object", - "description": "The Google Compute Engine metadata entries to add to all instances (see [Project and instance metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", - "additionalProperties": { - "type": "string" - } - } - } - }, - "InstanceGroupConfig": { - "id": "InstanceGroupConfig", - "type": "object", - "description": "[Optional] The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", - "properties": { - "numInstances": { - "type": "integer", - "description": "[Required] The number of VM instances in the instance group. For master instance groups, must be set to 1.", - "format": "int32" - }, - "instanceNames": { - "type": "array", - "description": "[Optional] The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", - "items": { - "type": "string" - } - }, - "imageUri": { - "type": "string", - "description": "[Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`." - }, - "machineTypeUri": { - "type": "string", - "description": "[Required] The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`." - }, - "diskConfig": { - "$ref": "DiskConfig", - "description": "[Optional] Disk option config settings." - }, - "isPreemptible": { - "type": "boolean", - "description": "[Optional] Specifies that this instance group contains preemptible instances." - }, - "managedGroupConfig": { - "$ref": "ManagedGroupConfig", - "description": "[Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups." - } - } - }, - "DiskConfig": { - "id": "DiskConfig", - "type": "object", - "description": "Specifies the config of disk options for a group of VM instances.", - "properties": { - "bootDiskSizeGb": { - "type": "integer", - "description": "[Optional] Size in GB of the boot disk (default is 500GB).", - "format": "int32" - }, - "numLocalSsds": { - "type": "integer", - "description": "[Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.", - "format": "int32" - } - } - }, - "ManagedGroupConfig": { - "id": "ManagedGroupConfig", - "type": "object", - "description": "Specifies the resources used to actively manage an instance group.", - "properties": { - "instanceTemplateName": { - "type": "string", - "description": "[Output-only] The name of the Instance Template used for the Managed Instance Group." - }, - "instanceGroupManagerName": { - "type": "string", - "description": "[Output-only] The name of the Instance Group Manager for this group." - } - } - }, - "SoftwareConfig": { - "id": "SoftwareConfig", - "type": "object", - "description": "Specifies the selection and config of software inside the cluster.", - "properties": { - "imageVersion": { - "type": "string", - "description": "[Optional] The version of software inside the cluster. It must match the regular expression `[0-9]+\\.[0-9]+`. If unspecified, it defaults to the latest version (see [Cloud Dataproc Versioning](/dataproc/versioning))." - }, - "properties": { - "type": "object", - "description": "[Optional] The properties to set on daemon config files. Property keys are specified in `prefix:property` format, such as `core:fs.defaultFS`. The following are supported prefixes and their mappings: * core: `core-site.xml` * hdfs: `hdfs-site.xml` * mapred: `mapred-site.xml` * yarn: `yarn-site.xml` * hive: `hive-site.xml` * pig: `pig.properties` * spark: `spark-defaults.conf`", - "additionalProperties": { - "type": "string" - } - } - } - }, - "NodeInitializationAction": { - "id": "NodeInitializationAction", - "type": "object", - "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", - "properties": { - "executableFile": { - "type": "string", - "description": "[Required] Google Cloud Storage URI of executable file." - }, - "executionTimeout": { - "type": "string", - "description": "[Optional] Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period." - } - } - }, - "ClusterStatus": { - "id": "ClusterStatus", - "type": "object", - "description": "The status of a cluster and its instances.", - "properties": { - "state": { - "type": "string", - "description": "[Output-only] The cluster's state.", - "enum": [ - "UNKNOWN", - "CREATING", - "RUNNING", - "ERROR", - "DELETING", - "UPDATING" - ] - }, - "detail": { - "type": "string", - "description": "[Output-only] Optional details of cluster's state." - }, - "stateStartTime": { - "type": "string", - "description": "[Output-only] Time when this state was entered." - } - } - }, - "ClusterMetrics": { - "id": "ClusterMetrics", - "type": "object", - "description": "Contains cluster daemon metrics, such as HDFS and YARN stats. **Beta Feature**: This report is available for testing purposes only. It may be changed before final release.", - "properties": { - "hdfsMetrics": { - "type": "object", - "description": "The HDFS metrics.", - "additionalProperties": { - "type": "string", - "format": "int64" - } - }, - "yarnMetrics": { - "type": "object", - "description": "The YARN metrics.", - "additionalProperties": { - "type": "string", - "format": "int64" - } - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "properties": { - "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`." - }, - "metadata": { - "type": "object", - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "done": { - "type": "boolean", - "description": "If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available." - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "response": { - "type": "object", - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { + "projects": { + "resources": { + "regions": { + "resources": { + "jobs": { + "methods": { + "cancel": { + "request": { + "$ref": "CancelJobRequest" + }, + "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "location": "path", + "description": "Required. The job ID.", + "required": true, + "type": "string" + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "id": "dataproc.projects.regions.jobs.cancel" + }, + "patch": { + "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.patch", + "request": { + "$ref": "Job" + }, + "description": "Updates a job in a project.", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "httpMethod": "PATCH", + "parameters": { + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string", + "location": "path" + }, + "updateMask": { + "type": "string", + "location": "query", + "description": "Required. Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", + "format": "google-fieldmask" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "location": "path", + "description": "Required. The job ID.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}" + }, + "get": { + "description": "Gets the resource representation for a job in a project.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "jobId": { + "description": "Required. The job ID.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.get", + "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}" + }, + "submit": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "region" + ], + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs:submit", + "id": "dataproc.projects.regions.jobs.submit", + "path": "v1/projects/{projectId}/regions/{region}/jobs:submit", + "description": "Submits a job to a cluster.", + "request": { + "$ref": "SubmitJobRequest" + } + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "httpMethod": "DELETE", + "parameters": { + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "jobId": { + "location": "path", + "description": "Required. The job ID.", + "required": true, + "type": "string" + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", + "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.delete", + "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION." + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "region" + ], + "response": { + "$ref": "ListJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "location": "query", + "description": "Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *", + "type": "string" + }, + "jobStateMatcher": { + "description": "Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs).", + "type": "string", + "location": "query", + "enum": [ + "ALL", + "ACTIVE", + "NON_ACTIVE" + ] + }, + "pageToken": { + "description": "Optional. The page token, returned by a previous call, to request the next page of results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Optional. The number of results to return in each response.", + "format": "int32", + "type": "integer" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string", + "location": "path" + }, + "clusterName": { + "location": "query", + "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.", + "type": "string" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs", + "id": "dataproc.projects.regions.jobs.list", + "path": "v1/projects/{projectId}/regions/{region}/jobs", + "description": "Lists regions/{region}/jobs in a project." + } + } + }, + "clusters": { + "methods": { + "create": { + "path": "v1/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.create", + "description": "Creates a cluster in a project.", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string" + }, + "projectId": { + "required": true, + "type": "string", + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to." + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters" + }, + "patch": { + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.patch", + "description": "Updates a cluster in a project.", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "clusterName": { + "description": "Required. The cluster name.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string", + "location": "path" + }, + "updateMask": { + "description": "Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:\n{\n \"config\":{\n \"workerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, only the following fields can be updated:\u003ctable\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003elabels\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eUpdate labels\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eResize primary worker group\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.secondary_worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eResize secondary worker group\u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/table\u003e", + "format": "google-fieldmask", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}" + }, + "get": { + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.get", + "description": "Gets the resource representation for a cluster in a project.", + "response": { + "$ref": "Cluster" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "clusterName": { + "description": "Required. The cluster name.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string" + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string" + } + } + }, + "delete": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "clusterName": { + "description": "Required. The cluster name.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.delete", + "description": "Deletes a cluster in a project.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "DELETE" + }, + "diagnose": { + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", + "id": "dataproc.projects.regions.clusters.diagnose", + "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", + "request": { + "$ref": "DiagnoseClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "clusterName": { + "location": "path", + "description": "Required. The cluster name.", + "required": true, + "type": "string" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string" + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose" + }, + "list": { + "id": "dataproc.projects.regions.clusters.list", + "path": "v1/projects/{projectId}/regions/{region}/clusters", + "description": "Lists all regions/{region}/clusters in a project.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "region" + ], + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "required": true, + "type": "string", + "location": "path" + }, + "filter": { + "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", + "type": "string", + "location": "query" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "Optional. The standard List page token." + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "Optional. The standard List page size.", + "format": "int32" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters" + } + } + }, + "operations": { + "methods": { + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation collection.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/regions/[^/]+/operations$" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The standard list page size.", + "format": "int32", + "type": "integer" + }, + "filter": { + "type": "string", + "location": "query", + "description": "The standard list filter." + } + }, + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations", + "id": "dataproc.projects.regions.operations.list", + "path": "v1/{+name}" + }, + "get": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", + "path": "v1/{+name}", + "id": "dataproc.projects.regions.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." + }, + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "httpMethod": "POST", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel", + "id": "dataproc.projects.regions.operations.cancel", + "path": "v1/{+name}:cancel" + }, + "delete": { + "path": "v1/{+name}", + "id": "dataproc.projects.regions.operations.delete", + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be deleted.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}" + } + } + } + } + } } - } } - } }, - "ListClustersResponse": { - "id": "ListClustersResponse", - "type": "object", - "description": "The list of all clusters in a project.", - "properties": { - "clusters": { - "type": "array", - "description": "[Output-only] The clusters in the project.", - "items": { - "$ref": "Cluster" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Output-only] This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the `page_token` in a subsequent ListClustersRequest." - } - } - }, - "DiagnoseClusterRequest": { - "id": "DiagnoseClusterRequest", - "type": "object", - "description": "A request to collect cluster diagnostic information." - }, - "SubmitJobRequest": { - "id": "SubmitJobRequest", - "type": "object", - "description": "A request to submit a job.", - "properties": { - "job": { - "$ref": "Job", - "description": "[Required] The job resource." - } - } - }, - "Job": { - "id": "Job", - "type": "object", - "description": "A Cloud Dataproc job resource.", - "properties": { - "reference": { - "$ref": "JobReference", - "description": "[Optional] The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id." - }, - "placement": { - "$ref": "JobPlacement", - "description": "[Required] Job information, including how, when, and where to run the job." - }, - "hadoopJob": { - "$ref": "HadoopJob", - "description": "Job is a Hadoop job." - }, - "sparkJob": { - "$ref": "SparkJob", - "description": "Job is a Spark job." - }, - "pysparkJob": { - "$ref": "PySparkJob", - "description": "Job is a Pyspark job." - }, - "hiveJob": { - "$ref": "HiveJob", - "description": "Job is a Hive job." - }, - "pigJob": { - "$ref": "PigJob", - "description": "Job is a Pig job." - }, - "sparkSqlJob": { - "$ref": "SparkSqlJob", - "description": "Job is a SparkSql job." - }, - "status": { - "$ref": "JobStatus", - "description": "[Output-only] The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] The previous job status.", - "items": { - "$ref": "JobStatus" - } - }, - "yarnApplications": { - "type": "array", - "description": "[Output-only] The collection of YARN applications spun up by this job. **Beta** Feature: This report is available for testing purposes only. It may be changed before final release.", - "items": { - "$ref": "YarnApplication" - } - }, - "driverOutputResourceUri": { - "type": "string", - "description": "[Output-only] A URI pointing to the location of the stdout of the job's driver program." - }, - "driverControlFilesUri": { - "type": "string", - "description": "[Output-only] If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as `driver_output_uri`." - }, - "labels": { - "type": "object", - "description": "[Optional] The labels to associate with this job. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job.", - "additionalProperties": { + "parameters": { + "quotaUser": { + "location": "query", + "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" - } - } - } - }, - "JobReference": { - "id": "JobReference", - "type": "object", - "description": "Encapsulates the full scoping used to reference a job.", - "properties": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to." }, - "jobId": { - "type": "string", - "description": "[Optional] The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 512 characters." - } - } - }, - "JobPlacement": { - "id": "JobPlacement", - "type": "object", - "description": "Cloud Dataproc job config.", - "properties": { - "clusterName": { - "type": "string", - "description": "[Required] The name of the cluster where the job will be submitted." + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" }, - "clusterUuid": { - "type": "string", - "description": "[Output-only] A cluster UUID generated by the Cloud Dataproc service when the job is submitted." - } - } - }, - "HadoopJob": { - "id": "HadoopJob", - "type": "object", - "description": "A Cloud Dataproc job for running [Apache Hadoop MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on [Apache Hadoop YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).", - "properties": { - "mainJarFileUri": { - "type": "string", - "description": "The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'" - }, - "mainClass": { - "type": "string", - "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in `jar_file_uris`." - }, - "args": { - "type": "array", - "description": "[Optional] The arguments to pass to the driver. Do not include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", "type": "string" - } }, - "jarFileUris": { - "type": "array", - "description": "[Optional] Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", - "items": { + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", "type": "string" - } }, - "fileUris": { - "type": "array", - "description": "[Optional] HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - } - }, - "archiveUris": { - "type": "array", - "description": "[Optional] HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "[Optional] The runtime log config for job execution." - } - } - }, - "LoggingConfig": { - "id": "LoggingConfig", - "type": "object", - "description": "The runtime logging config of the job.", - "properties": { - "driverLogLevels": { - "type": "object", - "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", - "additionalProperties": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", "enum": [ - "LEVEL_UNSPECIFIED", - "ALL", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "FATAL", - "OFF" + "1", + "2" ] - } + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" } - } }, - "SparkJob": { - "id": "SparkJob", - "type": "object", - "description": "A Cloud Dataproc job for running [Apache Spark](http://spark.apache.org/) applications on YARN.", - "properties": { - "mainJarFileUri": { - "type": "string", - "description": "The HCFS URI of the jar file that contains the main class." - }, - "mainClass": { - "type": "string", - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in `jar_file_uris`." - }, - "args": { - "type": "array", - "description": "[Optional] The arguments to pass to the driver. Do not include arguments, such as `--conf`, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", - "items": { - "type": "string" - } - }, - "fileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - } - }, - "archiveUris": { - "type": "array", - "description": "[Optional] HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "[Optional] The runtime log config for job execution." - } - } - }, - "PySparkJob": { - "id": "PySparkJob", - "type": "object", - "description": "A Cloud Dataproc job for running [Apache PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN.", - "properties": { - "mainPythonFileUri": { - "type": "string", - "description": "[Required] The HCFS URI of the main Python file to use as the driver. Must be a .py file." - }, - "args": { - "type": "array", - "description": "[Optional] The arguments to pass to the driver. Do not include arguments, such as `--conf`, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - } - }, - "pythonFileUris": { - "type": "array", - "description": "[Optional] HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", - "items": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", - "items": { - "type": "string" - } - }, - "fileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - } - }, - "archiveUris": { - "type": "array", - "description": "[Optional] HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "[Optional] The runtime log config for job execution." - } - } - }, - "HiveJob": { - "id": "HiveJob", - "type": "object", - "description": "A Cloud Dataproc job for running [Apache Hive](https://hive.apache.org/) queries on YARN.", - "properties": { - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains Hive queries." - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "continueOnFailure": { - "type": "boolean", - "description": "[Optional] Whether to continue executing queries if a query fails. The default value is `false`. Setting to `true` can be useful when executing independent parallel queries." - }, - "scriptVariables": { - "type": "object", - "description": "[Optional] Mapping of query variable names to values (equivalent to the Hive command: `SET name=\"value\";`).", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", - "items": { - "type": "string" - } - } - } - }, - "QueryList": { - "id": "QueryList", - "type": "object", - "description": "A list of queries to run on a cluster.", - "properties": { - "queries": { - "type": "array", - "description": "[Required] The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob: \"hiveJob\": { \"queryList\": { \"queries\": [ \"query1\", \"query2\", \"query3;query4\", ] } }", - "items": { - "type": "string" - } - } - } - }, - "PigJob": { - "id": "PigJob", - "type": "object", - "description": "A Cloud Dataproc job for running [Apache Pig](https://pig.apache.org/) queries on YARN.", - "properties": { - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains the Pig queries." - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "continueOnFailure": { - "type": "boolean", - "description": "[Optional] Whether to continue executing queries if a query fails. The default value is `false`. Setting to `true` can be useful when executing independent parallel queries." - }, - "scriptVariables": { - "type": "object", - "description": "[Optional] Mapping of query variable names to values (equivalent to the Pig command: `name=[value]`).", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", - "items": { - "type": "string" - } - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "[Optional] The runtime log config for job execution." - } - } - }, - "SparkSqlJob": { - "id": "SparkSqlJob", - "type": "object", - "description": "A Cloud Dataproc job for running [Apache Spark SQL](http://spark.apache.org/sql/) queries.", - "properties": { - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains SQL queries." - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "scriptVariables": { - "type": "object", - "description": "[Optional] Mapping of query variable names to values (equivalent to the Spark SQL command: SET `name=\"value\";`).", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to be added to the Spark CLASSPATH.", - "items": { - "type": "string" - } - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "[Optional] The runtime log config for job execution." - } - } - }, - "JobStatus": { - "id": "JobStatus", - "type": "object", - "description": "Cloud Dataproc job status.", - "properties": { - "state": { - "type": "string", - "description": "[Output-only] A state message specifying the overall job state.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "SETUP_DONE", - "RUNNING", - "CANCEL_PENDING", - "CANCEL_STARTED", - "CANCELLED", - "DONE", - "ERROR" - ] - }, - "details": { - "type": "string", - "description": "[Output-only] Optional job state details, such as an error description if the state is ERROR." - }, - "stateStartTime": { - "type": "string", - "description": "[Output-only] The time when this state was entered." - } - } - }, - "YarnApplication": { - "id": "YarnApplication", - "type": "object", - "description": "A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto. **Beta Feature**: This report is available for testing purposes only. It may be changed before final release.", - "properties": { - "name": { - "type": "string", - "description": "[Required] The application name." - }, - "state": { - "type": "string", - "description": "[Required] The application state.", - "enum": [ - "STATE_UNSPECIFIED", - "NEW", - "NEW_SAVING", - "SUBMITTED", - "ACCEPTED", - "RUNNING", - "FINISHED", - "FAILED", - "KILLED" - ] - }, - "progress": { - "type": "number", - "description": "[Required] The numerical progress of the application, from 1 to 100.", - "format": "float" - }, - "trackingUrl": { - "type": "string", - "description": "[Optional] The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access." - } - } - }, - "ListJobsResponse": { - "id": "ListJobsResponse", - "type": "object", - "description": "A list of jobs in a project.", - "properties": { - "jobs": { - "type": "array", - "description": "[Output-only] Jobs list.", - "items": { - "$ref": "Job" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Optional] This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the `page_token` in a subsequent ListJobsRequest." - } - } - }, - "CancelJobRequest": { - "id": "CancelJobRequest", - "type": "object", - "description": "A request to cancel a job." - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "The response message for Operations.ListOperations.", - "properties": { - "operations": { - "type": "array", - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "DiagnoseClusterResults": { - "id": "DiagnoseClusterResults", - "type": "object", - "description": "The location of diagnostic output.", - "properties": { - "outputUri": { - "type": "string", - "description": "[Output-only] The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics." - } - } - }, - "ClusterOperationMetadata": { - "id": "ClusterOperationMetadata", - "type": "object", - "description": "Metadata describing the operation.", - "properties": { - "clusterName": { - "type": "string", - "description": "[Output-only] Name of the cluster for the operation." - }, - "clusterUuid": { - "type": "string", - "description": "[Output-only] Cluster UUID for the operation." - }, - "status": { - "$ref": "ClusterOperationStatus", - "description": "[Output-only] Current operation status." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] The previous operation status.", - "items": { - "$ref": "ClusterOperationStatus" - } - }, - "operationType": { - "type": "string", - "description": "[Output-only] The operation type." - }, - "description": { - "type": "string", - "description": "[Output-only] Short description of operation." - }, - "labels": { - "type": "object", - "description": "[Output-only] labels associated with the operation", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ClusterOperationStatus": { - "id": "ClusterOperationStatus", - "type": "object", - "description": "The status of the operation.", - "properties": { - "state": { - "type": "string", - "description": "[Output-only] A message containing the operation state.", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "innerState": { - "type": "string", - "description": "[Output-only] A message containing the detailed operation state." - }, - "details": { - "type": "string", - "description": "[Output-only]A message containing any operation metadata details." - }, - "stateStartTime": { - "type": "string", - "description": "[Output-only] The time this state was entered." - } - } - }, - "DiagnoseClusterOutputLocation": { - "id": "DiagnoseClusterOutputLocation", - "type": "object", - "description": "The location where output from diagnostic command can be found.", - "properties": { - "outputUri": { - "type": "string", - "description": "[Output-only] The Google Cloud Storage URI of the diagnostic output. This will be a plain text file with summary of collected diagnostics." - } - } - }, - "OperationMetadata": { - "id": "OperationMetadata", - "type": "object", - "description": "Metadata describing the operation.", - "properties": { - "state": { - "type": "string", - "description": "A message containing the operation state.", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "innerState": { - "type": "string", - "description": "A message containing the detailed operation state." - }, - "details": { - "type": "string", - "description": "A message containing any operation metadata details." - }, - "insertTime": { - "type": "string", - "description": "The time that the operation was requested." - }, - "startTime": { - "type": "string", - "description": "The time that the operation was started by the server." - }, - "endTime": { - "type": "string", - "description": "The time that the operation completed." - }, - "clusterName": { - "type": "string", - "description": "Name of the cluster for the operation." - }, - "clusterUuid": { - "type": "string", - "description": "Cluster UUId for the operation." - }, - "status": { - "$ref": "OperationStatus", - "description": "[Output-only] Current operation status." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] Previous operation status.", - "items": { - "$ref": "OperationStatus" - } - }, - "operationType": { - "type": "string", - "description": "[Output-only] The operation type." - }, - "description": { - "type": "string", - "description": "[Output-only] Short description of operation." - } - } - }, - "OperationStatus": { - "id": "OperationStatus", - "type": "object", - "description": "The status of the operation.", - "properties": { - "state": { - "type": "string", - "description": "A message containing the operation state.", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "innerState": { - "type": "string", - "description": "A message containing the detailed operation state." - }, - "details": { - "type": "string", - "description": "A message containing any operation metadata details." - }, - "stateStartTime": { - "type": "string", - "description": "The time this state was entered." - } - } - } - }, - "resources": { - "projects": { - "resources": { - "regions": { - "resources": { - "clusters": { - "methods": { - "create": { - "id": "dataproc.projects.regions.clusters.create", - "path": "v1/projects/{projectId}/regions/{region}/clusters", - "httpMethod": "POST", - "description": "Creates a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region" - ], - "request": { - "$ref": "Cluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "schemas": { + "SparkSqlJob": { + "description": "A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries.", + "type": "object", + "properties": { + "queryFileUri": { + "description": "The HCFS URI of the script that contains SQL queries.", + "type": "string" }, - "patch": { - "id": "dataproc.projects.regions.clusters.patch", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "httpMethod": "PATCH", - "description": "Updates a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project the cluster belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - }, - "updateMask": { - "type": "string", - "description": "[Required] Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the `PATCH` request body would specify the new value, as follows: { \"config\":{ \"workerConfig\":{ \"numInstances\":\"5\" } } } Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the `PATCH` request body would be set as follows: { \"config\":{ \"secondaryWorkerConfig\":{ \"numInstances\":\"5\" } } } Note: Currently, config.worker_config.num_instances and config.secondary_worker_config.num_instances are the only fields that can be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "request": { - "$ref": "Cluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "queryList": { + "description": "A list of queries.", + "$ref": "QueryList" }, - "delete": { - "id": "dataproc.projects.regions.clusters.delete", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "httpMethod": "DELETE", - "description": "Deletes a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" + "scriptVariables": { + "additionalProperties": { + "type": "string" }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "description": "Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", + "type": "object" }, - "get": { - "id": "dataproc.projects.regions.clusters.get", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "httpMethod": "GET", - "description": "Gets the resource representation for a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" + "jarFileUris": { + "type": "array", + "items": { + "type": "string" }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Cluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "description": "Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH." }, - "list": { - "id": "dataproc.projects.regions.clusters.list", - "path": "v1/projects/{projectId}/regions/{region}/clusters", - "httpMethod": "GET", - "description": "Lists all regions/{region}/clusters in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "description": "[Optional] A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax: field:value [field:value] ... or field = value [AND [field = value]] ... where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, and `[KEY]` is a label key. **value** can be `*` to match all values. `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` contains the `DELETING` and `ERROR` states. `clusterName` is the name of the cluster provided at creation time. Only the logical `AND` operator is supported; space-separated items are treated as having an implicit `AND` operator. Example valid filters are: status.state:ACTIVE clusterName:mycluster labels.env:staging \\ labels.starred:* and status.state = ACTIVE AND clusterName = mycluster \\ AND labels.env = staging AND labels.starred = *", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "[Optional] The standard List page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "[Optional] The standard List page token.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "region" - ], - "response": { - "$ref": "ListClustersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "loggingConfig": { + "description": "Optional. The runtime log config for job execution.", + "$ref": "LoggingConfig" }, - "diagnose": { - "id": "dataproc.projects.regions.clusters.diagnose", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", - "httpMethod": "POST", - "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains `DiagnoseClusterOutputLocation`.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" + "properties": { + "additionalProperties": { + "type": "string" }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "request": { - "$ref": "DiagnoseClusterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", + "type": "object" } - } }, - "jobs": { - "methods": { - "submit": { - "id": "dataproc.projects.regions.jobs.submit", - "path": "v1/projects/{projectId}/regions/{region}/jobs:submit", - "httpMethod": "POST", - "description": "Submits a job to a cluster.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" + "id": "SparkSqlJob" + }, + "Cluster": { + "id": "Cluster", + "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region" - ], - "request": { - "$ref": "SubmitJobRequest" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "description": "Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.", + "type": "object" }, - "get": { - "id": "dataproc.projects.regions.jobs.get", - "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "httpMethod": "GET", - "description": "Gets the resource representation for a job in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "[Required] The job ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "metrics": { + "description": "Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "$ref": "ClusterMetrics" }, - "list": { - "id": "dataproc.projects.regions.jobs.list", - "path": "v1/projects/{projectId}/regions/{region}/jobs", - "httpMethod": "GET", - "description": "Lists regions/{region}/jobs in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "[Optional] The number of results to return in each response.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "[Optional] The page token, returned by a previous call, to request the next page of results.", - "location": "query" - }, - "clusterName": { - "type": "string", - "description": "[Optional] If set, the returned jobs list includes only jobs that were submitted to the named cluster.", - "location": "query" - }, - "jobStateMatcher": { - "type": "string", - "description": "[Optional] Specifies enumerated categories of jobs to list (default = match ALL jobs).", - "enum": [ - "ALL", - "ACTIVE", - "NON_ACTIVE" - ], - "location": "query" - }, - "filter": { - "type": "string", - "description": "[Optional] A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax: field:value] ... or [field = value] AND [field [= value]] ... where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label key. **value** can be `*` to match all values. `status.state` can be either `ACTIVE` or `INACTIVE`. Only the logical `AND` operator is supported; space-separated items are treated as having an implicit `AND` operator. Example valid filters are: status.state:ACTIVE labels.env:staging labels.starred:* and status.state = ACTIVE AND labels.env = staging AND labels.starred = *", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "region" - ], - "response": { - "$ref": "ListJobsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "status": { + "description": "Output-only. Cluster status.", + "$ref": "ClusterStatus" }, - "cancel": { - "id": "dataproc.projects.regions.jobs.cancel", - "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "httpMethod": "POST", - "description": "Starts a job cancellation request. To access the job resource after cancellation, call [regions/{region}/jobs.list](/dataproc/reference/rest/v1/projects.regions.jobs/list) or [regions/{region}/jobs.get](/dataproc/reference/rest/v1/projects.regions.jobs/get).", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "[Required] The job ID.", - "required": true, - "location": "path" + "statusHistory": { + "description": "Output-only. The previous cluster status.", + "type": "array", + "items": { + "$ref": "ClusterStatus" } - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "request": { - "$ref": "CancelJobRequest" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "delete": { - "id": "dataproc.projects.regions.jobs.delete", - "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "httpMethod": "DELETE", - "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns `FAILED_PRECONDITION`.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Cloud Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "[Required] The job ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "config": { + "$ref": "ClusterConfig", + "description": "Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated." + }, + "clusterName": { + "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.", + "type": "string" + }, + "clusterUuid": { + "description": "Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", + "type": "string" + }, + "projectId": { + "description": "Required. The Google Cloud Platform project ID that the cluster belongs to.", + "type": "string" } - } - }, - "operations": { - "methods": { - "list": { - "id": "dataproc.projects.regions.operations.list", - "path": "v1/{+name}", - "httpMethod": "GET", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/*/operations`.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation collection.", - "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations$", - "location": "path" - }, - "filter": { - "type": "string", - "description": "The standard list filter.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard list page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "dataproc.projects.regions.operations.get", - "path": "v1/{+name}", - "httpMethod": "GET", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource.", - "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "dataproc.projects.regions.operations.delete", - "path": "v1/{+name}", - "httpMethod": "DELETE", - "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be deleted.", - "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "cancel": { - "id": "dataproc.projects.regions.operations.cancel", - "path": "v1/{+name}:cancel", - "httpMethod": "POST", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be cancelled.", - "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } - } + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "Operation" + }, + "description": "A list of operations that matches the specified filter in the request." + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListOperationsResponse" + }, + "OperationMetadata": { + "id": "OperationMetadata", + "description": "Metadata describing the operation.", + "type": "object", + "properties": { + "endTime": { + "description": "The time that the operation completed.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "The time that the operation was started by the server.", + "format": "google-datetime", + "type": "string" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Output-only Errors encountered during operation execution." + }, + "insertTime": { + "description": "The time that the operation was requested.", + "format": "google-datetime", + "type": "string" + }, + "statusHistory": { + "description": "Output-only Previous operation status.", + "type": "array", + "items": { + "$ref": "OperationStatus" + } + }, + "operationType": { + "description": "Output-only The operation type.", + "type": "string" + }, + "description": { + "description": "Output-only Short description of operation.", + "type": "string" + }, + "status": { + "description": "Output-only Current operation status.", + "$ref": "OperationStatus" + }, + "details": { + "type": "string", + "description": "A message containing any operation metadata details." + }, + "state": { + "description": "A message containing the operation state.", + "type": "string", + "enumDescriptions": [ + "Unused.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed." + ], + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" + ] + }, + "clusterName": { + "description": "Name of the cluster for the operation.", + "type": "string" + }, + "clusterUuid": { + "description": "Cluster UUId for the operation.", + "type": "string" + }, + "innerState": { + "description": "A message containing the detailed operation state.", + "type": "string" + } + } + }, + "SoftwareConfig": { + "description": "Specifies the selection and config of software inside the cluster.", + "type": "object", + "properties": { + "imageVersion": { + "description": "Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", + "type": "string" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xml", + "type": "object" + } + }, + "id": "SoftwareConfig" + }, + "JobPlacement": { + "properties": { + "clusterName": { + "description": "Required. The name of the cluster where the job will be submitted.", + "type": "string" + }, + "clusterUuid": { + "description": "Output-only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted.", + "type": "string" + } + }, + "id": "JobPlacement", + "description": "Cloud Dataproc job config.", + "type": "object" + }, + "ClusterStatus": { + "properties": { + "detail": { + "description": "Output-only. Optional details of cluster's state.", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "The cluster state is unknown.", + "The cluster is being created and set up. It is not ready for use.", + "The cluster is currently running and healthy. It is ready for use.", + "The cluster encountered an error. It is not ready for use.", + "The cluster is being deleted. It cannot be used.", + "The cluster is being updated. It continues to accept and process jobs." + ], + "enum": [ + "UNKNOWN", + "CREATING", + "RUNNING", + "ERROR", + "DELETING", + "UPDATING" + ], + "description": "Output-only. The cluster's state.", + "type": "string" + }, + "stateStartTime": { + "type": "string", + "description": "Output-only. Time when this state was entered.", + "format": "google-datetime" + }, + "substate": { + "enumDescriptions": [ + "", + "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", + "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "UNHEALTHY", + "STALE_STATUS" + ], + "description": "Output-only. Additional state information that includes status reported by the agent.", + "type": "string" + } + }, + "id": "ClusterStatus", + "description": "The status of a cluster and its instances.", + "type": "object" + }, + "PigJob": { + "id": "PigJob", + "description": "A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN.", + "type": "object", + "properties": { + "loggingConfig": { + "description": "Optional. The runtime log config for job execution.", + "$ref": "LoggingConfig" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", + "type": "object" + }, + "continueOnFailure": { + "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains the Pig queries.", + "type": "string" + }, + "jarFileUris": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs." + }, + "scriptVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).", + "type": "object" + } + } + }, + "ListClustersResponse": { + "properties": { + "clusters": { + "description": "Output-only. The clusters in the project.", + "type": "array", + "items": { + "$ref": "Cluster" + } + }, + "nextPageToken": { + "description": "Output-only. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent ListClustersRequest.", + "type": "string" + } + }, + "id": "ListClustersResponse", + "description": "The list of all clusters in a project.", + "type": "object" + }, + "Job": { + "description": "A Cloud Dataproc job resource.", + "type": "object", + "properties": { + "scheduling": { + "$ref": "JobScheduling", + "description": "Optional. Job scheduling configuration." + }, + "pigJob": { + "$ref": "PigJob", + "description": "Job is a Pig job." + }, + "hiveJob": { + "$ref": "HiveJob", + "description": "Job is a Hive job." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job.", + "type": "object" + }, + "driverOutputResourceUri": { + "type": "string", + "description": "Output-only. A URI pointing to the location of the stdout of the job's driver program." + }, + "statusHistory": { + "description": "Output-only. The previous job status.", + "type": "array", + "items": { + "$ref": "JobStatus" + } + }, + "sparkJob": { + "$ref": "SparkJob", + "description": "Job is a Spark job." + }, + "sparkSqlJob": { + "$ref": "SparkSqlJob", + "description": "Job is a SparkSql job." + }, + "yarnApplications": { + "description": "Output-only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "type": "array", + "items": { + "$ref": "YarnApplication" + } + }, + "pysparkJob": { + "$ref": "PySparkJob", + "description": "Job is a Pyspark job." + }, + "reference": { + "$ref": "JobReference", + "description": "Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e." + }, + "hadoopJob": { + "description": "Job is a Hadoop job.", + "$ref": "HadoopJob" + }, + "status": { + "$ref": "JobStatus", + "description": "Output-only. The job status. Additional application-specific status information may be contained in the \u003ccode\u003etype_job\u003c/code\u003e and \u003ccode\u003eyarn_applications\u003c/code\u003e fields." + }, + "placement": { + "$ref": "JobPlacement", + "description": "Required. Job information, including how, when, and where to run the job." + }, + "driverControlFilesUri": { + "description": "Output-only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", + "type": "string" + } + }, + "id": "Job" + }, + "SparkJob": { + "description": "A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN.", + "type": "object", + "properties": { + "fileUris": { + "description": "Optional. HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainJarFileUri": { + "type": "string", + "description": "The HCFS URI of the jar file that contains the main class." + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object" + }, + "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "SparkJob" + }, + "JobStatus": { + "type": "object", + "properties": { + "state": { + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "SETUP_DONE", + "RUNNING", + "CANCEL_PENDING", + "CANCEL_STARTED", + "CANCELLED", + "DONE", + "ERROR", + "ATTEMPT_FAILURE" + ], + "description": "Output-only. A state message specifying the overall job state.", + "type": "string", + "enumDescriptions": [ + "The job state is unknown.", + "The job is pending; it has been submitted, but is not yet running.", + "Job has been received by the service and completed initial setup; it will soon be submitted to the cluster.", + "The job is running on the cluster.", + "A CancelJob request has been received, but is pending.", + "Transient in-flight resources have been canceled, and the request to cancel the running job has been issued to the cluster.", + "The job cancellation was successful.", + "The job has completed successfully.", + "The job has completed, but encountered an error.", + "Job attempt has failed. The detail field contains failure details for this attempt.Applies to restartable jobs only." + ] + }, + "details": { + "description": "Output-only. Optional job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e.", + "type": "string" + }, + "stateStartTime": { + "description": "Output-only. The time when this state was entered.", + "format": "google-datetime", + "type": "string" + }, + "substate": { + "description": "Output-only. Additional state information, which includes status reported by the agent.", + "type": "string", + "enumDescriptions": [ + "", + "The Job is submitted to the agent.Applies to RUNNING state.", + "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", + "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "SUBMITTED", + "QUEUED", + "STALE_STATUS" + ] + } + }, + "id": "JobStatus", + "description": "Cloud Dataproc job status." + }, + "ManagedGroupConfig": { + "description": "Specifies the resources used to actively manage an instance group.", + "type": "object", + "properties": { + "instanceGroupManagerName": { + "description": "Output-only. The name of the Instance Group Manager for this group.", + "type": "string" + }, + "instanceTemplateName": { + "description": "Output-only. The name of the Instance Template used for the Managed Instance Group.", + "type": "string" + } + }, + "id": "ManagedGroupConfig" + }, + "ClusterOperationStatus": { + "id": "ClusterOperationStatus", + "description": "The status of the operation.", + "type": "object", + "properties": { + "innerState": { + "description": "Output-only. A message containing the detailed operation state.", + "type": "string" + }, + "stateStartTime": { + "description": "Output-only. The time this state was entered.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "type": "string", + "enumDescriptions": [ + "Unused.", + "The operation has been created.", + "The operation is running.", + "The operation is done; either cancelled or completed." + ], + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" + ], + "description": "Output-only. A message containing the operation state." + }, + "details": { + "description": "Output-only.A message containing any operation metadata details.", + "type": "string" + } + } + }, + "YarnApplication": { + "description": "A YARN application created by a job. Application information is a subset of \u003ccode\u003eorg.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto\u003c/code\u003e.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "type": "object", + "properties": { + "state": { + "enum": [ + "STATE_UNSPECIFIED", + "NEW", + "NEW_SAVING", + "SUBMITTED", + "ACCEPTED", + "RUNNING", + "FINISHED", + "FAILED", + "KILLED" + ], + "description": "Required. The application state.", + "type": "string", + "enumDescriptions": [ + "Status is unspecified.", + "Status is NEW.", + "Status is NEW_SAVING.", + "Status is SUBMITTED.", + "Status is ACCEPTED.", + "Status is RUNNING.", + "Status is FINISHED.", + "Status is FAILED.", + "Status is KILLED." + ] + }, + "name": { + "description": "Required. The application name.", + "type": "string" + }, + "trackingUrl": { + "description": "Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", + "type": "string" + }, + "progress": { + "description": "Required. The numerical progress of the application, from 1 to 100.", + "format": "float", + "type": "number" + } + }, + "id": "YarnApplication" + }, + "QueryList": { + "description": "A list of queries to run on a cluster.", + "type": "object", + "properties": { + "queries": { + "description": "Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "QueryList" + }, + "HadoopJob": { + "properties": { + "jarFileUris": { + "description": "Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "properties": { + "description": "Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "type": "array", + "items": { + "type": "string" + } + }, + "fileUris": { + "description": "Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainJarFileUri": { + "description": "The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'", + "type": "string" + } + }, + "id": "HadoopJob", + "description": "A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).", + "type": "object" + }, + "DiagnoseClusterRequest": { + "description": "A request to collect cluster diagnostic information.", + "type": "object", + "properties": {}, + "id": "DiagnoseClusterRequest" + }, + "DiskConfig": { + "properties": { + "numLocalSsds": { + "description": "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.", + "format": "int32", + "type": "integer" + }, + "bootDiskSizeGb": { + "description": "Optional. Size in GB of the boot disk (default is 500GB).", + "format": "int32", + "type": "integer" + } + }, + "id": "DiskConfig", + "description": "Specifies the config of disk options for a group of VM instances.", + "type": "object" + }, + "ClusterOperationMetadata": { + "description": "Metadata describing the operation.", + "type": "object", + "properties": { + "warnings": { + "description": "Output-only. Errors encountered during operation execution.", + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Output-only. Labels associated with the operation" + }, + "status": { + "$ref": "ClusterOperationStatus", + "description": "Output-only. Current operation status." + }, + "statusHistory": { + "description": "Output-only. The previous operation status.", + "type": "array", + "items": { + "$ref": "ClusterOperationStatus" + } + }, + "clusterUuid": { + "description": "Output-only. Cluster UUID for the operation.", + "type": "string" + }, + "clusterName": { + "type": "string", + "description": "Output-only. Name of the cluster for the operation." + }, + "operationType": { + "description": "Output-only. The operation type.", + "type": "string" + }, + "description": { + "description": "Output-only. Short description of operation.", + "type": "string" + } + }, + "id": "ClusterOperationMetadata" + }, + "HiveJob": { + "description": "A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN.", + "type": "object", + "properties": { + "continueOnFailure": { + "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryList": { + "description": "A list of queries.", + "$ref": "QueryList" + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains Hive queries.", + "type": "string" + }, + "scriptVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", + "type": "object" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", + "type": "array", + "items": { + "type": "string" + } + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", + "type": "object" + } + }, + "id": "HiveJob" + }, + "Empty": { + "type": "object", + "properties": {}, + "id": "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:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}." + }, + "DiagnoseClusterResults": { + "description": "The location of diagnostic output.", + "type": "object", + "properties": { + "outputUri": { + "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.", + "type": "string" + } + }, + "id": "DiagnoseClusterResults" + }, + "ClusterConfig": { + "description": "The cluster config.", + "type": "object", + "properties": { + "initializationActions": { + "description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", + "type": "array", + "items": { + "$ref": "NodeInitializationAction" + } + }, + "configBucket": { + "description": "Optional. A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.", + "type": "string" + }, + "workerConfig": { + "$ref": "InstanceGroupConfig", + "description": "Optional. The Google Compute Engine config settings for worker instances in a cluster." + }, + "gceClusterConfig": { + "$ref": "GceClusterConfig", + "description": "Required. The shared Google Compute Engine config settings for all instances in a cluster." + }, + "softwareConfig": { + "$ref": "SoftwareConfig", + "description": "Optional. The config settings for software inside the cluster." + }, + "masterConfig": { + "$ref": "InstanceGroupConfig", + "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster." + }, + "secondaryWorkerConfig": { + "$ref": "InstanceGroupConfig", + "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster." + } + }, + "id": "ClusterConfig" + }, + "PySparkJob": { + "description": "A Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN.", + "type": "object", + "properties": { + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object" + }, + "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "type": "array", + "items": { + "type": "string" + } + }, + "fileUris": { + "description": "Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "pythonFileUris": { + "description": "Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainPythonFileUri": { + "description": "Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "PySparkJob" + }, + "GceClusterConfig": { + "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", + "type": "object", + "properties": { + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", + "type": "object" + }, + "internalIpOnly": { + "description": "Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", + "type": "boolean" + }, + "serviceAccountScopes": { + "description": "Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included:\nhttps://www.googleapis.com/auth/cloud.useraccounts.readonly\nhttps://www.googleapis.com/auth/devstorage.read_write\nhttps://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:\nhttps://www.googleapis.com/auth/bigquery\nhttps://www.googleapis.com/auth/bigtable.admin.table\nhttps://www.googleapis.com/auth/bigtable.data\nhttps://www.googleapis.com/auth/devstorage.full_control", + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).", + "type": "array", + "items": { + "type": "string" + } + }, + "serviceAccount": { + "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", + "type": "string" + }, + "subnetworkUri": { + "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0.", + "type": "string" + }, + "networkUri": { + "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information). Example: https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default.", + "type": "string" + }, + "zoneUri": { + "description": "Required. The zone where the Google Compute Engine cluster will be located. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone].", + "type": "string" + } + }, + "id": "GceClusterConfig" + }, + "ClusterMetrics": { + "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "type": "object", + "properties": { + "yarnMetrics": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The YARN metrics.", + "type": "object" + }, + "hdfsMetrics": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The HDFS metrics.", + "type": "object" + } + }, + "id": "ClusterMetrics" + }, + "AcceleratorConfig": { + "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", + "type": "object", + "properties": { + "acceleratorTypeUri": { + "description": "Full or partial URI of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)", + "type": "string" + }, + "acceleratorCount": { + "description": "The number of the accelerator cards of this type exposed to this instance.", + "format": "int32", + "type": "integer" + } + }, + "id": "AcceleratorConfig" + }, + "LoggingConfig": { + "description": "The runtime logging config of the job.", + "type": "object", + "properties": { + "driverLogLevels": { + "additionalProperties": { + "enum": [ + "LEVEL_UNSPECIFIED", + "ALL", + "TRACE", + "DEBUG", + "INFO", + "WARN", + "ERROR", + "FATAL", + "OFF" + ], + "type": "string" + }, + "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", + "type": "object" + } + }, + "id": "LoggingConfig" + }, + "DiagnoseClusterOutputLocation": { + "type": "object", + "properties": { + "outputUri": { + "description": "Output-only The Google Cloud Storage URI of the diagnostic output. This will be a plain text file with summary of collected diagnostics.", + "type": "string" + } + }, + "id": "DiagnoseClusterOutputLocation", + "description": "The location where output from diagnostic command can be found." + }, + "Operation": { + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object" + }, + "OperationStatus": { + "description": "The status of the operation.", + "type": "object", + "properties": { + "state": { + "enumDescriptions": [ + "Unused.", + "The operation has been created.", + "The operation is running.", + "The operation is done; either cancelled or completed." + ], + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" + ], + "description": "A message containing the operation state.", + "type": "string" + }, + "details": { + "description": "A message containing any operation metadata details.", + "type": "string" + }, + "innerState": { + "description": "A message containing the detailed operation state.", + "type": "string" + }, + "stateStartTime": { + "description": "The time this state was entered.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OperationStatus" + }, + "JobReference": { + "description": "Encapsulates the full scoping used to reference a job.", + "type": "object", + "properties": { + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string" + }, + "jobId": { + "description": "Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", + "type": "string" + } + }, + "id": "JobReference" + }, + "SubmitJobRequest": { + "id": "SubmitJobRequest", + "description": "A request to submit a job.", + "type": "object", + "properties": { + "job": { + "$ref": "Job", + "description": "Required. The job resource." + } + } + }, + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + } + }, + "id": "Status" + }, + "JobScheduling": { + "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", + "type": "object", + "properties": { + "maxFailuresPerHour": { + "type": "integer", + "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", + "format": "int32" + } + }, + "id": "JobScheduling" + }, + "InstanceGroupConfig": { + "id": "InstanceGroupConfig", + "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", + "type": "object", + "properties": { + "instanceNames": { + "description": "Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", + "type": "array", + "items": { + "type": "string" + } + }, + "accelerators": { + "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.", + "type": "array", + "items": { + "$ref": "AcceleratorConfig" + } + }, + "numInstances": { + "type": "integer", + "description": "Required. The number of VM instances in the instance group. For master instance groups, must be set to 1.", + "format": "int32" + }, + "diskConfig": { + "description": "Optional. Disk option config settings.", + "$ref": "DiskConfig" + }, + "isPreemptible": { + "description": "Optional. Specifies that this instance group contains preemptible instances.", + "type": "boolean" + }, + "managedGroupConfig": { + "description": "Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.", + "$ref": "ManagedGroupConfig" + }, + "imageUri": { + "description": "Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.", + "type": "string" + }, + "machineTypeUri": { + "type": "string", + "description": "Required. The Google Compute Engine machine type used for cluster instances. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2." + } + } + }, + "NodeInitializationAction": { + "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", + "type": "object", + "properties": { + "executionTimeout": { + "description": "Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", + "format": "google-duration", + "type": "string" + }, + "executableFile": { + "description": "Required. Google Cloud Storage URI of executable file.", + "type": "string" + } + }, + "id": "NodeInitializationAction" + }, + "ListJobsResponse": { + "id": "ListJobsResponse", + "description": "A list of jobs in a project.", + "type": "object", + "properties": { + "jobs": { + "description": "Output-only. Jobs list.", + "type": "array", + "items": { + "$ref": "Job" + } + }, + "nextPageToken": { + "description": "Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListJobsRequest\u003c/code\u003e.", + "type": "string" + } + } + }, + "CancelJobRequest": { + "description": "A request to cancel a job.", + "type": "object", + "properties": {}, + "id": "CancelJobRequest" } - } - } - } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "version": "v1", + "baseUrl": "https://dataproc.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "servicePath": "", + "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", + "kind": "discovery#restDescription", + "rootUrl": "https://dataproc.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "dataproc", + "batchPath": "batch", + "revision": "20170515", + "documentationLink": "https://cloud.google.com/dataproc/", + "id": "dataproc:v1", + "title": "Google Cloud Dataproc API" } diff --git a/etc/api/dataproc/v1alpha1/dataproc-api.json b/etc/api/dataproc/v1alpha1/dataproc-api.json index 43865b59fc..38644f164f 100644 --- a/etc/api/dataproc/v1alpha1/dataproc-api.json +++ b/etc/api/dataproc/v1alpha1/dataproc-api.json @@ -1,1822 +1,2082 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/r7FI1XKe3nwqujSEPgINO6f6aJQ\"", - "discoveryVersion": "v1", - "id": "dataproc:v1alpha1", - "name": "dataproc", - "version": "v1alpha1", - "revision": "20161102", - "title": "Google Cloud Dataproc API", - "description": "An API for managing Hadoop-based clusters and jobs on Google Cloud Platform.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/dataproc/", - "protocol": "rest", - "baseUrl": "https://dataproc.googleapis.com/", - "basePath": "", - "rootUrl": "https://dataproc.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "schemas": { - "Cluster": { - "id": "Cluster", - "type": "object", - "description": "Describes the identifying information, configuration, and status of a cluster of Google Compute Engine instances.", - "properties": { - "projectId": { - "type": "string", - "description": "[Required] The Google Cloud Platform project ID that the cluster belongs to." - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name. Cluster names within a project must be unique. Names from deleted clusters can be reused." - }, - "configuration": { - "$ref": "ClusterConfiguration", - "description": "[Required] The cluster configuration. It may differ from a user's initial configuration due to Cloud Dataproc setting of default values and updating clusters." - }, - "labels": { - "type": "object", - "description": "[Optional] The labels to associate with this cluster. Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}{0,62} Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63} No more than 64 labels can be associated with a given cluster.", - "additionalProperties": { - "type": "string" - } - }, - "status": { - "$ref": "ClusterStatus", - "description": "[Output-only] Cluster status." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] Previous cluster statuses.", - "items": { - "$ref": "ClusterStatus" - } - }, - "createTime": { - "type": "string", - "description": "[Output-only] The timestamp of cluster creation." - }, - "clusterUuid": { - "type": "string", - "description": "[Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster." - }, - "metrics": { - "$ref": "ClusterMetrics", - "description": "Contains cluster daemon metrics such as HDFS and YARN stats." - } - } - }, - "ClusterConfiguration": { - "id": "ClusterConfiguration", - "type": "object", - "description": "The cluster configuration.", - "properties": { - "configurationBucket": { - "type": "string", - "description": "[Optional] A Google Cloud Storage staging bucket used for sharing generated SSH keys and configuration. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, then it will create and manage this project-level, per-location bucket for you." - }, - "gceConfiguration": { - "$ref": "GceConfiguration", - "description": "[Deprecated] The Google Compute Engine configuration settings for cluster resources." - }, - "numWorkers": { - "type": "integer", - "description": "[Deprecated] The number of worker nodes in the cluster.", - "format": "int32" - }, - "workers": { - "type": "array", - "description": "[Deprecated] The list of worker node names. Dataproc derives the names from cluster_name and num_workers if not set by user (recommended practice is to let Dataproc derive the name). Derived worker node name example: hadoop-w-0.", - "items": { - "type": "string" - } - }, - "masterName": { - "type": "string", - "description": "[Deprecated] The Master's hostname. Dataproc derives the name from cluster_name if not set by user (recommended practice is to let Dataproc derive the name). Derived master name example: hadoop-m." - }, - "masterDiskConfiguration": { - "$ref": "DiskConfiguration", - "description": "[Deprecated] The configuration settings of master node disk options." - }, - "workerDiskConfiguration": { - "$ref": "DiskConfiguration", - "description": "[Deprecated] The configuration settings of worker node disk options." - }, - "gceClusterConfiguration": { - "$ref": "GceClusterConfiguration", - "description": "[Optional] The shared Google Compute Engine configuration settings for all instances in a cluster." - }, - "masterConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "[Optional] The Google Compute Engine configuration settings for the master instance in a cluster." - }, - "workerConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "[Optional] The Google Compute Engine configuration settings for worker instances in a cluster." - }, - "secondaryWorkerConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "[Optional] The Google Compute Engine configuration settings for additional worker instances in a cluster." - }, - "softwareConfiguration": { - "$ref": "SoftwareConfiguration", - "description": "[Optional] The configuration settings for software inside the cluster." - }, - "initializationActions": { - "type": "array", - "description": "[Optional] Commands to execute on each node after configuration is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below: ROLE=$(/usr/share/google/get_metadata_value attributes/role) if [[ \"${ROLE}\" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi", - "items": { - "$ref": "NodeInitializationAction" - } - } - } - }, - "GceConfiguration": { - "id": "GceConfiguration", - "type": "object", - "description": "[Deprecated] Common configuration settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "properties": { - "imageUri": { - "type": "string", - "description": "[Deprecated] The Google Compute Engine image resource used for cluster instances. Example: \"compute.googleapis.com/projects/debian-cloud /global/images/backports-debian-7-wheezy-v20140904\"." - }, - "machineTypeUri": { - "type": "string", - "description": "[Deprecated] The Google Compute Engine machine type used for cluster instances. Example: \"compute.googleapis.com/projects/[project_id] /zones/us-east1-a/machineTypes/n1-standard-2\"." - }, - "zoneUri": { - "type": "string", - "description": "[Deprecated] The zone where the Google Compute Engine cluster will be located. Example: \"compute.googleapis.com/projects/[project_id] /zones/us-east1-a\"." - }, - "networkUri": { - "type": "string", - "description": "[Deprecated] The Google Compute Engine network to be used for machine communications. Inbound SSH connections are necessary to complete cluster configuration. Example \"compute.googleapis.com/projects/[project_id] /zones/us-east1-a/default\"." - }, - "serviceAccountScopes": { - "type": "array", - "description": "[Deprecated] The service account scopes included in Google Compute Engine instances. Must include devstorage.full_control to enable the Google Cloud Storage connector. Example \"auth.googleapis.com/compute\" and \"auth.googleapis.com/devstorage.full_control\".", - "items": { - "type": "string" - } - } - } - }, - "DiskConfiguration": { - "id": "DiskConfiguration", - "type": "object", - "description": "Specifies the configuration of disk options for a group of VM instances.", - "properties": { - "bootDiskSizeGb": { - "type": "integer", - "description": "[Optional] Size in GB of the boot disk (default is 500GB).", - "format": "int32" - }, - "numLocalSsds": { - "type": "integer", - "description": "[Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs, and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic configuration and installed binaries.", - "format": "int32" - } - } - }, - "GceClusterConfiguration": { - "id": "GceClusterConfiguration", - "type": "object", - "description": "Common configuration settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "properties": { - "zoneUri": { - "type": "string", - "description": "[Required] The zone where the Google Compute Engine cluster will be located. Example: \"compute.googleapis.com/projects/[project_id] /zones/us-east1-a\"." - }, - "networkUri": { - "type": "string", - "description": "The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: `compute.googleapis.com/projects/[project_id]/regions/global/default`." - }, - "subnetworkUri": { - "type": "string", - "description": "The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: `compute.googleapis.com/projects/[project_id]/regions/us-east1/sub0`." - }, - "internalIpOnly": { - "type": "boolean", - "description": "If true, all instances in the cluser will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses." - }, - "serviceAccountScopes": { - "type": "array", - "description": "The service account scopes included in Google Compute Engine instances. Must include devstorage.full_control to enable the Google Cloud Storage connector. Example \"auth.googleapis.com/compute\" and \"auth.googleapis.com/devstorage.full_control\".", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "description": "The Google Compute Engine tags to add to all instances.", - "items": { - "type": "string" - } - }, - "metadata": { - "type": "object", - "description": "The Google Compute Engine metadata entries to add to all instances.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "InstanceGroupConfiguration": { - "id": "InstanceGroupConfiguration", - "type": "object", - "description": "The configuration settings for Google Compute Engine resources in an instance group, such as a master or worker group.", - "properties": { - "numInstances": { - "type": "integer", - "description": "The number of VM instances in the instance group. For master instance groups, must be set to 1.", - "format": "int32" - }, - "instanceNames": { - "type": "array", - "description": "The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Dataproc derive the name).", - "items": { - "type": "string" - } - }, - "imageUri": { - "type": "string", - "description": "[Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfiguration.image_version. Example: \"compute.googleapis.com/projects/debian-cloud /global/images/backports-debian-7-wheezy-v20140904\"." - }, - "machineTypeUri": { - "type": "string", - "description": "The Google Compute Engine machine type used for cluster instances. Example: \"compute.googleapis.com/projects/[project_id] /zones/us-east1-a/machineTypes/n1-standard-2\"." - }, - "diskConfiguration": { - "$ref": "DiskConfiguration", - "description": "Disk option configuration settings." - }, - "isPreemptible": { - "type": "boolean", - "description": "Specifies that this instance group contains Preemptible Instances." - }, - "managedGroupConfiguration": { - "$ref": "ManagedGroupConfiguration", - "description": "[Output-only] The configuration for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups." - } - } - }, - "ManagedGroupConfiguration": { - "id": "ManagedGroupConfiguration", - "type": "object", - "description": "Specifies the resources used to actively manage an instance group.", - "properties": { - "instanceTemplateName": { - "type": "string", - "description": "[Output-only] The name of Instance Template used for Managed Instance Group." - }, - "instanceGroupManagerName": { - "type": "string", - "description": "[Output-only] The name of Instance Group Manager managing this group." - } - } - }, - "SoftwareConfiguration": { - "id": "SoftwareConfiguration", - "type": "object", - "description": "Specifies the selection and configuration of software inside the cluster.", - "properties": { - "imageVersion": { - "type": "string", - "description": "[Optional] The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified it will default to latest version." - }, - "properties": { - "type": "object", - "description": "[Optional] The properties to set on daemon configuration files. Property keys are specified in \"prefix:property\" format, such as \"core:fs.defaultFS\". The following are supported prefixes and their mappings: core - core-site.xml hdfs - hdfs-site.xml mapred - mapred-site.xml yarn - yarn-site.xml hive - hive-site.xml pig - pig.properties spark - spark-defaults.conf", - "additionalProperties": { - "type": "string" - } - } - } - }, - "NodeInitializationAction": { - "id": "NodeInitializationAction", - "type": "object", - "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", - "properties": { - "executableFile": { - "type": "string", - "description": "[Required] Google Cloud Storage URI of executable file." - }, - "executionTimeout": { - "type": "string", - "description": "[Optional] Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period." - } - } - }, - "ClusterStatus": { - "id": "ClusterStatus", - "type": "object", - "description": "The status of a cluster and its instances.", - "properties": { - "state": { - "type": "string", - "description": "The cluster's state.", - "enum": [ - "UNKNOWN", - "CREATING", - "RUNNING", - "ERROR", - "DELETING", - "UPDATING" - ] - }, - "detail": { - "type": "string", - "description": "Optional details of cluster's state." - }, - "stateStartTime": { - "type": "string", - "description": "Time when this state was entered." - } - } - }, - "ClusterMetrics": { - "id": "ClusterMetrics", - "type": "object", - "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.", - "properties": { - "hdfsMetrics": { - "type": "object", - "description": "The HDFS metrics.", - "additionalProperties": { - "type": "string", - "format": "int64" - } - }, - "yarnMetrics": { - "type": "object", - "description": "The YARN metrics.", - "additionalProperties": { - "type": "string", - "format": "int64" - } - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "An asynchronous operation in a project that runs over a given cluster. Used to track the progress of a user request that is running asynchronously. Examples include creating a cluster, updating a cluster, and deleting a cluster.", - "properties": { - "name": { - "type": "string", - "description": "The name of the operation resource, in the format projects/[project_id]/operations/[operation_id]" - }, - "metadata": { - "type": "object", - "description": "Service-specific metadata associated with the operation.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "done": { - "type": "boolean", - "description": "Indicates if the operation is done. If true, the operation is complete and the `result` is available. If false, the operation is still in progress." - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure." - }, - "response": { - "type": "object", - "description": "The operation response. If the called method returns no data on success, the response is `google.protobuf.Empty`. If the called method is `Get`,`Create` or `Update`, the response is the resource. For all other methods, the response type is a concatenation of the method name and \"Response\". For example, if the called method is `TakeSnapshot()`, the response type is `TakeSnapshotResponse`.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } } - } } - } }, - "ListClustersResponse": { - "id": "ListClustersResponse", - "type": "object", - "description": "The list of all clusters in a project.", - "properties": { - "clusters": { - "type": "array", - "description": "[Output-only] The clusters in the project.", - "items": { - "$ref": "Cluster" - } + "kind": "discovery#restDescription", + "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", + "servicePath": "", + "rootUrl": "https://dataproc.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "dataproc", + "batchPath": "batch", + "revision": "20170515", + "id": "dataproc:v1alpha1", + "documentationLink": "https://cloud.google.com/dataproc/", + "title": "Google Cloud Dataproc API", + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { + "projects": { + "resources": { + "regions": { + "resources": { + "clusters": { + "methods": { + "create": { + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.create", + "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters", + "description": "Request to create a cluster in a project.", + "request": { + "$ref": "Cluster" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "region" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "description": "Required The Dataproc region in which to handle the request.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string" + } + } + }, + "delete": { + "description": "Request to delete a cluster in a project.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string" + }, + "region": { + "required": true, + "type": "string", + "location": "path", + "description": "Required The Dataproc region in which to handle the request." + }, + "clusterName": { + "required": true, + "type": "string", + "location": "path", + "description": "Required The cluster name." + } + }, + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.delete" + }, + "patch": { + "request": { + "$ref": "Cluster" + }, + "description": "Request to update a cluster in a project.", + "httpMethod": "PATCH", + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "region": { + "required": true, + "type": "string", + "location": "path", + "description": "Required The Dataproc region in which to handle the request." + }, + "updateMask": { + "type": "string", + "location": "query", + "description": "Required Specifies the path, relative to \u003ccode\u003eCluster\u003c/code\u003e, of the field to update. For example, to change the number of workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003e\"configuration.worker_configuration.num_instances,\"\u003c/code\u003e and the PATCH request body would specify the new value, as follows:\n{\n \"configuration\":{\n \"workerConfiguration\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003econfiguration.worker_configuration.num_instances\u003c/code\u003e is the only field that can be updated.", + "format": "google-fieldmask" + }, + "clusterName": { + "description": "Required The cluster name.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "description": "Required The ID of the Google Cloud Platform project the cluster belongs to.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.patch", + "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}" + }, + "get": { + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.get", + "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "description": "Request to get the resource representation for a cluster in a project.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "response": { + "$ref": "Cluster" + }, + "parameters": { + "clusterName": { + "location": "path", + "description": "Required The cluster name.", + "required": true, + "type": "string" + }, + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string" + }, + "region": { + "location": "path", + "description": "Required The Dataproc region in which to handle the request.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Request a list of all regions/{region}/clusters in a project.", + "response": { + "$ref": "ListClustersResponse" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "The standard List page token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "The standard List page size.", + "format": "int32", + "type": "integer" + }, + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string" + }, + "region": { + "description": "Required The Dataproc region in which to handle the request.", + "required": true, + "type": "string", + "location": "path" + }, + "filter": { + "description": "Optional A filter constraining which clusters to list. Valid filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 = val3)", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/clusters", + "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.list" + } + } + }, + "jobs": { + "methods": { + "get": { + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", + "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.get", + "description": "Gets the resource representation for a job in a project.", + "response": { + "$ref": "Job" + }, + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "description": "Required The Dataproc region in which to handle the request.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "description": "Required The job ID.", + "required": true, + "type": "string", + "location": "path" + } + } + }, + "patch": { + "request": { + "$ref": "Job" + }, + "description": "Updates a job in a project.", + "httpMethod": "PATCH", + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "region": { + "description": "Required The Dataproc region in which to handle the request.", + "required": true, + "type": "string", + "location": "path" + }, + "updateMask": { + "location": "query", + "description": "Required Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", + "format": "google-fieldmask", + "type": "string" + }, + "projectId": { + "required": true, + "type": "string", + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the job belongs to." + }, + "jobId": { + "location": "path", + "description": "Required The job ID.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.patch", + "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}" + }, + "submit": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "region" + ], + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "region": { + "description": "Required The Dataproc region in which to handle the request.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs:submit", + "id": "dataproc.projects.regions.jobs.submit", + "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs:submit", + "description": "Submits a job to a cluster.", + "request": { + "$ref": "SubmitJobRequest" + } + }, + "delete": { + "id": "dataproc.projects.regions.jobs.delete", + "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", + "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.", + "httpMethod": "DELETE", + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "region": { + "location": "path", + "description": "Required The Dataproc region in which to handle the request.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "jobId": { + "description": "Required The job ID.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}" + }, + "list": { + "parameters": { + "region": { + "location": "path", + "description": "Required The Dataproc region in which to handle the request.", + "required": true, + "type": "string" + }, + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs:list", + "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs:list", + "id": "dataproc.projects.regions.jobs.list", + "request": { + "$ref": "ListJobsRequest" + }, + "description": "Lists regions/{region}/jobs in a project.", + "response": { + "$ref": "ListJobsResponse" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "POST" + }, + "cancel": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "location": "path", + "description": "Required The job ID.", + "required": true, + "type": "string" + }, + "region": { + "location": "path", + "description": "Required The Dataproc region in which to handle the request.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "id": "dataproc.projects.regions.jobs.cancel", + "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "request": { + "$ref": "CancelJobRequest" + }, + "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs:list or regions/{region}/jobs:get." + } + } + } + } + } + } }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "SubmitJobRequest": { - "id": "SubmitJobRequest", - "type": "object", - "description": "A job submission request.", - "properties": { - "job": { - "$ref": "Job", - "description": "[Required] The job resource." - } - } - }, - "Job": { - "id": "Job", - "type": "object", - "description": "A Cloud Dataproc job resource.", - "properties": { - "reference": { - "$ref": "JobReference", - "description": "[Optional] The fully-qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id." - }, - "placement": { - "$ref": "JobPlacement", - "description": "[Required] Job information, including how, when, and where to run the job." - }, - "hadoopJob": { - "$ref": "HadoopJob", - "description": "Job is a Hadoop job." - }, - "sparkJob": { - "$ref": "SparkJob", - "description": "Job is a Spark job." - }, - "pysparkJob": { - "$ref": "PySparkJob", - "description": "Job is a Pyspark job." - }, - "hiveJob": { - "$ref": "HiveJob", - "description": "Job is a Hive job." - }, - "pigJob": { - "$ref": "PigJob", - "description": "Job is a Pig job." - }, - "sparkSqlJob": { - "$ref": "SparkSqlJob", - "description": "Job is a SparkSql job." - }, - "status": { - "$ref": "JobStatus", - "description": "[Output-only] The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] The previous job status.", - "items": { - "$ref": "JobStatus" - } - }, - "yarnApplications": { - "type": "array", - "description": "[Output-only] The collection of Yarn applications spun up by this job.", - "items": { - "$ref": "YarnApplication" - } - }, - "submittedBy": { - "type": "string", - "description": "[Output-only] The email address of the user submitting the job. For jobs submitted on the cluster, the address is username@hostname." - }, - "driverOutputUri": { - "type": "string", - "description": "[Output-only] A URI pointing to the location of the mixed stdout/stderr of the job's driver program—for example, gs://sysbucket123/foo-cluster/jobid-123/driver/output." - }, - "driverInputResourceUri": { - "type": "string", - "description": "[Output-only] A URI pointing to the location of the stdin of the job's driver program, only set if the job is interactive." - }, - "driverOutputResourceUri": { - "type": "string", - "description": "[Output-only] A URI pointing to the location of the stdout of the job's driver program." - }, - "driverControlFilesUri": { - "type": "string", - "description": "[Output-only] If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri." - }, - "interactive": { - "type": "boolean", - "description": "[Optional] If set to true, then the driver's stdin will be kept open and driver_input_uri will be set to provide a path at which additional input can be sent to the driver." - }, - "labels": { - "type": "object", - "description": "[Optional] The labels to associate with this job. Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}{0,62} Label values must be between 1 and 63 characters long, and must conform to the following regular expression: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63} No more than 64 labels can be associated with a given job.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "JobReference": { - "id": "JobReference", - "type": "object", - "description": "Encapsulates the full scoping used to reference a job.", - "properties": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to." - }, - "jobId": { - "type": "string", - "description": "[Required] The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 512 characters." - } - } - }, - "JobPlacement": { - "id": "JobPlacement", - "type": "object", - "description": "Cloud Dataproc job configuration.", - "properties": { - "clusterName": { - "type": "string", - "description": "[Required] The name of the cluster where the job will be submitted." - }, - "clusterUuid": { - "type": "string", - "description": "[Output-only] A cluster UUID generated by the Dataproc service when the job is submitted." - } - } - }, - "HadoopJob": { - "id": "HadoopJob", - "type": "object", - "description": "A Cloud Dataproc job for running Hadoop MapReduce jobs on YARN.", - "properties": { - "mainJarFileUri": { - "type": "string", - "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file containing the main class. Examples: gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar hdfs:/tmp/test-samples/custom-wordcount.jar file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar" - }, - "mainClass": { - "type": "string", - "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris." - }, - "args": { - "type": "array", - "description": "[Optional] The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", - "items": { - "type": "string" - } - }, - "fileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - } - }, - "archiveUris": { - "type": "array", - "description": "[Optional] HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "LoggingConfiguration": { - "id": "LoggingConfiguration", - "type": "object", - "description": "The runtime logging configuration of the job.", - "properties": { - "driverLogLevels": { - "type": "object", - "description": "The per-package log levels for the driver. This may include 'root' package name to configure rootLogger. Examples: com.google = FATAL, root = INFO, org.apache = DEBUG", - "additionalProperties": { - "type": "string", - "enum": [ - "LEVEL_UNSPECIFIED", - "ALL", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "FATAL", - "OFF" - ] - } - } - } - }, - "SparkJob": { - "id": "SparkJob", - "type": "object", - "description": "A Cloud Dataproc job for running Spark applications on YARN.", - "properties": { - "mainJarFileUri": { - "type": "string", - "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file that contains the main class." - }, - "mainClass": { - "type": "string", - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris." - }, - "args": { - "type": "array", - "description": "[Optional] The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", - "items": { - "type": "string" - } - }, - "fileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - } - }, - "archiveUris": { - "type": "array", - "description": "[Optional] HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "PySparkJob": { - "id": "PySparkJob", - "type": "object", - "description": "A Cloud Dataproc job for running PySpark applications on YARN.", - "properties": { - "mainPythonFileUri": { - "type": "string", - "description": "[Required] The Hadoop Compatible Filesystem (HCFS) URI of the main Python file to use as the driver. Must be a .py file." - }, - "args": { - "type": "array", - "description": "[Optional] The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - } - }, - "pythonFileUris": { - "type": "array", - "description": "[Optional] HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", - "items": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", - "items": { - "type": "string" - } - }, - "fileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - } - }, - "archiveUris": { - "type": "array", - "description": "[Optional] HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "HiveJob": { - "id": "HiveJob", - "type": "object", - "description": "A Cloud Dataproc job for running Hive queries on YARN.", - "properties": { - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains Hive queries." - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "continueOnFailure": { - "type": "boolean", - "description": "[Optional] Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries." - }, - "scriptVariables": { - "type": "object", - "description": "[Optional] Mapping of query variable names to values (equivalent to the Hive command: 'SET name=\"value\";').", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", - "items": { - "type": "string" - } - } - } - }, - "QueryList": { - "id": "QueryList", - "type": "object", - "description": "A list of queries to run on a cluster.", - "properties": { - "queries": { - "type": "array", - "description": "[Required] The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob: \"hiveJob\": { \"queryList\": { \"queries\": [ \"query1\", \"query2\", \"query3;query4\", ] } }", - "items": { - "type": "string" - } - } - } - }, - "PigJob": { - "id": "PigJob", - "type": "object", - "description": "A Cloud Dataproc job for running Pig queries on YARN.", - "properties": { - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains the Pig queries." - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "continueOnFailure": { - "type": "boolean", - "description": "[Optional] Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries." - }, - "scriptVariables": { - "type": "object", - "description": "[Optional] Mapping of query variable names to values (equivalent to the Pig command: \"name=[value]\").", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "SparkSqlJob": { - "id": "SparkSqlJob", - "type": "object", - "description": "A Cloud Dataproc job for running Spark SQL queries.", - "properties": { - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains SQL queries." - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "scriptVariables": { - "type": "object", - "description": "[Optional] Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to be added to the Spark CLASSPATH.", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "JobStatus": { - "id": "JobStatus", - "type": "object", - "description": "Cloud Dataproc job status.", - "properties": { - "state": { - "type": "string", - "description": "[Required] A state message specifying the overall job state.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "SETUP_DONE", - "RUNNING", - "CANCEL_PENDING", - "CANCEL_STARTED", - "CANCELLED", - "DONE", - "ERROR" - ] - }, - "details": { - "type": "string", - "description": "[Optional] Job state details, such as an error description if the state is ERROR." - }, - "insertTime": { - "type": "string", - "description": "The time of the job request." - }, - "startTime": { - "type": "string", - "description": "The time when the server started the job." - }, - "endTime": { - "type": "string", - "description": "The time when the job completed." - }, - "stateStartTime": { - "type": "string", - "description": "[Output-only] The time when this state was entered." - } - } - }, - "YarnApplication": { - "id": "YarnApplication", - "type": "object", - "description": "A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.", - "properties": { - "name": { - "type": "string", - "description": "[Required] The application name." - }, - "state": { - "type": "string", - "description": "[Required] The application state.", - "enum": [ - "STATE_UNSPECIFIED", - "NEW", - "NEW_SAVING", - "SUBMITTED", - "ACCEPTED", - "RUNNING", - "FINISHED", - "FAILED", - "KILLED" - ] - }, - "progress": { - "type": "number", - "description": "[Required] The numerical progress of the application, from 1 to 100.", - "format": "float" - }, - "trackingUrl": { - "type": "string", - "description": "[Optional] The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access." - } - } - }, - "ListJobsResponse": { - "id": "ListJobsResponse", - "type": "object", - "description": "A response to a request to list jobs in a project.", - "properties": { - "jobs": { - "type": "array", - "description": "[Output-only] Jobs list.", - "items": { - "$ref": "Job" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Optional] This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent ListJobsRequest." - } - } - }, - "ListJobsRequest": { - "id": "ListJobsRequest", - "type": "object", - "description": "A request to list jobs in a project.", - "properties": { - "pageSize": { - "type": "integer", - "description": "[Optional] The number of results to return in each response.", - "format": "int32" - }, - "pageToken": { - "type": "string", - "description": "[Optional] The page token, returned by a previous call, to request the next page of results." - }, - "clusterName": { - "type": "string", - "description": "[Optional] If set, the returned jobs list includes only jobs that were submitted to the named cluster." - }, - "jobStateMatcher": { - "type": "string", - "description": "[Optional] Specifies enumerated categories of jobs to list.", - "enum": [ - "ALL", - "ACTIVE", - "NON_ACTIVE" - ] - }, - "filter": { - "type": "string", - "description": "[Optional] A filter constraining which jobs to list. Valid filters contain job state and label terms such as: labels.key1 = val1 AND (labels.k2 = val2 OR labels.k3 = val3)" - } - } - }, - "CancelJobRequest": { - "id": "CancelJobRequest", - "type": "object", - "description": "A request to cancel a job." - }, - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "The response message for Operations.ListOperations.", - "properties": { "operations": { - "type": "array", - "description": "A list of operations that match the specified filter in the request.", - "items": { - "$ref": "Operation" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "CancelOperationRequest": { - "id": "CancelOperationRequest", - "type": "object", - "description": "The request message for Operations.CancelOperation." - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "DiagnoseClusterResults": { - "id": "DiagnoseClusterResults", - "type": "object", - "description": "The location of diagnostic output.", - "properties": { - "outputUri": { - "type": "string", - "description": "[Output-only] The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics." - } - } - }, - "ClusterOperationMetadata": { - "id": "ClusterOperationMetadata", - "type": "object", - "description": "Metadata describing the operation.", - "properties": { - "clusterName": { - "type": "string", - "description": "[Output-only] Name of the cluster for the operation." - }, - "clusterUuid": { - "type": "string", - "description": "[Output-only] Cluster UUID for the operation." - }, - "status": { - "$ref": "ClusterOperationStatus", - "description": "[Output-only] Current operation status." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] The previous operation status.", - "items": { - "$ref": "ClusterOperationStatus" - } - }, - "operationType": { - "type": "string", - "description": "[Output-only] The operation type." - }, - "description": { - "type": "string", - "description": "[Output-only] Short description of operation." - }, - "labels": { - "type": "object", - "description": "[Output-only] labels associated with the operation", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ClusterOperationStatus": { - "id": "ClusterOperationStatus", - "type": "object", - "description": "The status of the operation.", - "properties": { - "state": { - "type": "string", - "description": "[Output-only] A message containing the operation state.", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "innerState": { - "type": "string", - "description": "[Output-only] A message containing the detailed operation state." - }, - "details": { - "type": "string", - "description": "[Output-only]A message containing any operation metadata details." - }, - "stateStartTime": { - "type": "string", - "description": "[Output-only] The time this state was entered." - } - } - }, - "DiagnoseClusterOutputLocation": { - "id": "DiagnoseClusterOutputLocation", - "type": "object", - "description": "The location where output from diagnostic command can be found.", - "properties": { - "outputUri": { - "type": "string", - "description": "[Output-only] The Google Cloud Storage URI of the diagnostic output. This will be a plain text file with summary of collected diagnostics." - } - } - }, - "OperationMetadata": { - "id": "OperationMetadata", - "type": "object", - "description": "Metadata describing the operation.", - "properties": { - "state": { - "type": "string", - "description": "A message containing the operation state.", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "innerState": { - "type": "string", - "description": "A message containing the detailed operation state." - }, - "details": { - "type": "string", - "description": "A message containing any operation metadata details." - }, - "insertTime": { - "type": "string", - "description": "The time that the operation was requested." - }, - "startTime": { - "type": "string", - "description": "The time that the operation was started by the server." - }, - "endTime": { - "type": "string", - "description": "The time that the operation completed." - }, - "clusterName": { - "type": "string", - "description": "Name of the cluster for the operation." - }, - "clusterUuid": { - "type": "string", - "description": "Cluster UUId for the operation." - }, - "status": { - "$ref": "OperationStatus", - "description": "[Output-only] Current operation status." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] Previous operation status.", - "items": { - "$ref": "OperationStatus" - } - }, - "operationType": { - "type": "string", - "description": "[Output-only] The operation type." - }, - "description": { - "type": "string", - "description": "[Output-only] Short description of operation." - } - } - }, - "OperationStatus": { - "id": "OperationStatus", - "type": "object", - "description": "The status of the operation.", - "properties": { - "state": { - "type": "string", - "description": "A message containing the operation state.", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "innerState": { - "type": "string", - "description": "A message containing the detailed operation state." - }, - "details": { - "type": "string", - "description": "A message containing any operation metadata details." - }, - "stateStartTime": { - "type": "string", - "description": "The time this state was entered." - } - } - } - }, - "resources": { - "projects": { - "resources": { - "regions": { - "resources": { - "clusters": { - "methods": { - "create": { - "id": "dataproc.projects.regions.clusters.create", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - "httpMethod": "POST", - "description": "Request to create a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Dataproc region in which to handle the request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region" - ], - "request": { - "$ref": "Cluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "id": "dataproc.projects.regions.clusters.patch", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "httpMethod": "PATCH", - "description": "Request to update a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project the cluster belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - }, - "updateMask": { - "type": "string", - "description": "[Required] Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as \"configuration.worker_configuration.num_instances,\" and the PATCH request body would specify the new value, as follows: { \"configuration\":{ \"workerConfiguration\":{ \"numInstances\":\"5\" } } } Note: Currently, configuration.worker_configuration.num_instances is the only field that can be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "request": { - "$ref": "Cluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "dataproc.projects.regions.clusters.delete", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "httpMethod": "DELETE", - "description": "Request to delete a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, + "methods": { "get": { - "id": "dataproc.projects.regions.clusters.get", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "httpMethod": "GET", - "description": "Request to get the resource representation for a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The operation resource name.", + "required": true, + "type": "string", + "pattern": "^operations/.+$" + } }, - "region": { - "type": "string", - "description": "[Required] The Dataproc region in which to handle the request.", - "required": true, - "location": "path" + "flatPath": "v1alpha1/operations/{operationsId}", + "path": "v1alpha1/{+name}", + "id": "dataproc.operations.get", + "description": "Gets the latest state of a long-running operation. Clients may use this method to poll the operation result at intervals as recommended by the API service.", + "response": { + "$ref": "Operation" }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "response": { - "$ref": "Cluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "parameterOrder": [ + "name" + ], + "httpMethod": "GET" }, "list": { - "id": "dataproc.projects.regions.clusters.list", - "path": "v1alpha1/projects/{projectId}/regions/{region}/clusters", - "httpMethod": "GET", - "description": "Request a list of all regions/{region}/clusters in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + "response": { + "$ref": "ListOperationsResponse" }, - "region": { - "type": "string", - "description": "[Required] The Dataproc region in which to handle the request.", - "required": true, - "location": "path" + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "location": "query", + "description": "Required A JSON object that contains filters for the list operation, in the format {\"key1\":\"value1\",\"key2\":\"value2\", ..., }. Possible keys include project_id, cluster_name, and operation_state_matcher.If project_id is set, requests the list of operations that belong to the specified Google Cloud Platform project ID. This key is required.If cluster_name is set, requests the list of operations that were submitted to the specified cluster name. This key is optional.If operation_state_matcher is set, requests the list of operations that match one of the following status options: ALL, ACTIVE, or NON_ACTIVE.", + "type": "string" + }, + "name": { + "location": "path", + "description": "The operation collection name.", + "required": true, + "type": "string", + "pattern": "^operations$" + }, + "pageToken": { + "description": "The standard List page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The standard List page size.", + "format": "int32", + "type": "integer" + } }, - "filter": { - "type": "string", - "description": "[Optional] A filter constraining which clusters to list. Valid filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 = val3)", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard List page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard List page token.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "region" - ], - "response": { - "$ref": "ListClustersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "jobs": { - "methods": { - "submit": { - "id": "dataproc.projects.regions.jobs.submit", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs:submit", - "httpMethod": "POST", - "description": "Submits a job to a cluster.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Dataproc region in which to handle the request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region" - ], - "request": { - "$ref": "SubmitJobRequest" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "dataproc.projects.regions.jobs.get", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "httpMethod": "GET", - "description": "Gets the resource representation for a job in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" - }, - "region": { - "type": "string", - "description": "[Required] The Dataproc region in which to handle the request.", - "required": true, - "location": "path" - }, - "jobId": { - "type": "string", - "description": "[Required] The job ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "flatPath": "v1alpha1/operations", + "path": "v1alpha1/{+name}", + "id": "dataproc.operations.list" }, "cancel": { - "id": "dataproc.projects.regions.jobs.cancel", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "httpMethod": "POST", - "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs:list or regions/{region}/jobs:get.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" + "response": { + "$ref": "Empty" }, - "region": { - "type": "string", - "description": "[Required] The Dataproc region in which to handle the request.", - "required": true, - "location": "path" + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string", + "pattern": "^operations/.+$", + "location": "path" + } }, - "jobId": { - "type": "string", - "description": "[Required] The job ID.", - "required": true, - "location": "path" + "flatPath": "v1alpha1/operations/{operationsId}:cancel", + "path": "v1alpha1/{+name}:cancel", + "id": "dataproc.operations.cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients may use Operations.GetOperation or other methods to check whether the cancellation succeeded or the operation completed despite cancellation.", + "request": { + "$ref": "CancelOperationRequest" } - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "request": { - "$ref": "CancelJobRequest" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, "delete": { - "id": "dataproc.projects.regions.jobs.delete", - "path": "v1alpha1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "httpMethod": "DELETE", - "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns `FAILED_PRECONDITION`.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" + "description": "Deletes a long-running operation. It indicates the client is no longer interested in the operation result. It does not cancel the operation.", + "response": { + "$ref": "Empty" }, - "region": { - "type": "string", - "description": "[Required] The Dataproc region in which to handle the request.", - "required": true, - "location": "path" + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "required": true, + "type": "string", + "pattern": "^operations/.+$", + "location": "path" + } }, - "jobId": { - "type": "string", - "description": "[Required] The job ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "flatPath": "v1alpha1/operations/{operationsId}", + "path": "v1alpha1/{+name}", + "id": "dataproc.operations.delete" } - } } - } } - } }, - "operations": { - "methods": { - "get": { - "id": "dataproc.operations.get", - "path": "v1alpha1/{+name}", - "httpMethod": "GET", - "description": "Gets the latest state of a long-running operation. Clients may use this method to poll the operation result at intervals as recommended by the API service.", - "parameters": { - "name": { - "type": "string", - "description": "The operation resource name.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" }, - "list": { - "id": "dataproc.operations.list", - "path": "v1alpha1/{+name}", - "httpMethod": "GET", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - "parameters": { - "name": { - "type": "string", - "description": "The operation collection name.", - "required": true, - "pattern": "^operations$", - "location": "path" - }, - "filter": { - "type": "string", - "description": "[Required] A JSON object that contains filters for the list operation, in the format {\"key1\":\"value1\",\"key2\":\"value2\", ..., }. Possible keys include project_id, cluster_name, and operation_state_matcher. If project_id is set, requests the list of operations that belong to the specified Google Cloud Platform project ID. This key is required. If cluster_name is set, requests the list of operations that were submitted to the specified cluster name. This key is optional. If operation_state_matcher is set, requests the list of operations that match one of the following status options: ALL, ACTIVE, or NON_ACTIVE.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard List page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard List page token.", - "location": "query" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "prettyPrint": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Returns response with indentations and line breaks." }, - "cancel": { - "id": "dataproc.operations.cancel", - "path": "v1alpha1/{+name}:cancel", - "httpMethod": "POST", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients may use [Operations.GetOperation] or other methods to check whether the cancellation succeeded or the operation completed despite cancellation.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be cancelled.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" }, - "delete": { - "id": "dataproc.operations.delete", - "path": "v1alpha1/{+name}", - "httpMethod": "DELETE", - "description": "Deletes a long-running operation. It indicates the client is no longer interested in the operation result. It does not cancel the operation.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be deleted.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response." + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "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", + "location": "query" + }, + "quotaUser": { + "type": "string", + "location": "query", + "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." + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" } - } - } - } + }, + "schemas": { + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use." + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + } + }, + "id": "Status" + }, + "JobScheduling": { + "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", + "type": "object", + "properties": { + "maxFailuresPerHour": { + "description": "Optional Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", + "format": "int32", + "type": "integer" + } + }, + "id": "JobScheduling" + }, + "NodeInitializationAction": { + "type": "object", + "properties": { + "executableFile": { + "description": "Required Google Cloud Storage URI of executable file.", + "type": "string" + }, + "executionTimeout": { + "description": "Optional Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", + "format": "google-duration", + "type": "string" + } + }, + "id": "NodeInitializationAction", + "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion." + }, + "ListJobsResponse": { + "description": "A response to a request to list jobs in a project.", + "type": "object", + "properties": { + "jobs": { + "description": "Output-only Jobs list.", + "type": "array", + "items": { + "$ref": "Job" + } + }, + "nextPageToken": { + "description": "Optional This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListJobsRequest\u003c/code\u003e.", + "type": "string" + } + }, + "id": "ListJobsResponse" + }, + "CancelJobRequest": { + "description": "A request to cancel a job.", + "type": "object", + "properties": {}, + "id": "CancelJobRequest" + }, + "SparkSqlJob": { + "description": "A Cloud Dataproc job for running Spark SQL queries.", + "type": "object", + "properties": { + "queryFileUri": { + "description": "The HCFS URI of the script that contains SQL queries.", + "type": "string" + }, + "queryList": { + "description": "A list of queries.", + "$ref": "QueryList" + }, + "scriptVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", + "type": "object" + }, + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to be added to the Spark CLASSPATH.", + "type": "array", + "items": { + "type": "string" + } + }, + "loggingConfiguration": { + "$ref": "LoggingConfiguration", + "description": "Optional The runtime log configuration for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", + "type": "object" + } + }, + "id": "SparkSqlJob" + }, + "Cluster": { + "description": "Describes the identifying information, configuration, and status of a cluster of Google Compute Engine instances.", + "type": "object", + "properties": { + "clusterName": { + "description": "Required The cluster name. Cluster names within a project must be unique. Names from deleted clusters can be reused.", + "type": "string" + }, + "clusterUuid": { + "description": "Output-only A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", + "type": "string" + }, + "projectId": { + "type": "string", + "description": "Required The Google Cloud Platform project ID that the cluster belongs to." + }, + "configuration": { + "$ref": "ClusterConfiguration", + "description": "Required The cluster configuration. It may differ from a user's initial configuration due to Cloud Dataproc setting of default values and updating clusters." + }, + "createTime": { + "type": "string", + "description": "Output-only The timestamp of cluster creation.", + "format": "google-datetime" + }, + "labels": { + "description": "Optional The labels to associate with this cluster.Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given cluster.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "metrics": { + "description": "Contains cluster daemon metrics such as HDFS and YARN stats.", + "$ref": "ClusterMetrics" + }, + "status": { + "$ref": "ClusterStatus", + "description": "Output-only Cluster status." + }, + "statusHistory": { + "description": "Output-only Previous cluster statuses.", + "type": "array", + "items": { + "$ref": "ClusterStatus" + } + } + }, + "id": "Cluster" + }, + "ListOperationsResponse": { + "properties": { + "operations": { + "description": "A list of operations that match the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object" + }, + "OperationMetadata": { + "description": "Metadata describing the operation.", + "type": "object", + "properties": { + "startTime": { + "description": "The time that the operation was started by the server.", + "format": "google-datetime", + "type": "string" + }, + "warnings": { + "description": "Output-only Errors encountered during operation execution.", + "type": "array", + "items": { + "type": "string" + } + }, + "insertTime": { + "description": "The time that the operation was requested.", + "format": "google-datetime", + "type": "string" + }, + "statusHistory": { + "description": "Output-only Previous operation status.", + "type": "array", + "items": { + "$ref": "OperationStatus" + } + }, + "operationType": { + "description": "Output-only The operation type.", + "type": "string" + }, + "description": { + "description": "Output-only Short description of operation.", + "type": "string" + }, + "status": { + "description": "Output-only Current operation status.", + "$ref": "OperationStatus" + }, + "details": { + "description": "A message containing any operation metadata details.", + "type": "string" + }, + "state": { + "description": "A message containing the operation state.", + "type": "string", + "enumDescriptions": [ + "Unused.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed." + ], + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" + ] + }, + "clusterUuid": { + "description": "Cluster UUId for the operation.", + "type": "string" + }, + "clusterName": { + "description": "Name of the cluster for the operation.", + "type": "string" + }, + "innerState": { + "description": "A message containing the detailed operation state.", + "type": "string" + }, + "endTime": { + "description": "The time that the operation completed.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "OperationMetadata" + }, + "JobPlacement": { + "properties": { + "clusterName": { + "type": "string", + "description": "Required The name of the cluster where the job will be submitted." + }, + "clusterUuid": { + "description": "Output-only A cluster UUID generated by the Dataproc service when the job is submitted.", + "type": "string" + } + }, + "id": "JobPlacement", + "description": "Cloud Dataproc job configuration.", + "type": "object" + }, + "ClusterStatus": { + "description": "The status of a cluster and its instances.", + "type": "object", + "properties": { + "stateStartTime": { + "description": "Time when this state was entered.", + "format": "google-datetime", + "type": "string" + }, + "substate": { + "enum": [ + "UNSPECIFIED", + "UNHEALTHY", + "STALE_STATUS" + ], + "description": "Output-only Additional state information that includes status reported by the agent.", + "type": "string", + "enumDescriptions": [ + "", + "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", + "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." + ] + }, + "detail": { + "description": "Optional details of cluster's state.", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "The cluster state is unknown.", + "The cluster is being created and set up. It is not ready for use.", + "The cluster is currently running and healthy. It is ready for use.", + "The cluster encountered an error. It is not ready for use.", + "The cluster is being deleted. It cannot be used.", + "The cluster is being updated. It continues to accept and process jobs." + ], + "enum": [ + "UNKNOWN", + "CREATING", + "RUNNING", + "ERROR", + "DELETING", + "UPDATING" + ], + "description": "The cluster's state.", + "type": "string" + } + }, + "id": "ClusterStatus" + }, + "PigJob": { + "properties": { + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", + "type": "array", + "items": { + "type": "string" + } + }, + "scriptVariables": { + "description": "Optional Mapping of query variable names to values (equivalent to the Pig command: \"name=value\").", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "loggingConfiguration": { + "$ref": "LoggingConfiguration", + "description": "Optional The runtime log configuration for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", + "type": "object" + }, + "continueOnFailure": { + "description": "Optional Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains the Pig queries.", + "type": "string" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + } + }, + "id": "PigJob", + "description": "A Cloud Dataproc job for running Pig queries on YARN.", + "type": "object" + }, + "AcceleratorConfiguration": { + "type": "object", + "properties": { + "acceleratorTypeUri": { + "description": "Full or partial URI of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)", + "type": "string" + }, + "acceleratorCount": { + "type": "integer", + "description": "The number of the accelerator cards of this type exposed to this instance.", + "format": "int32" + } + }, + "id": "AcceleratorConfiguration", + "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine)." + }, + "ListClustersResponse": { + "properties": { + "clusters": { + "description": "Output-only The clusters in the project.", + "type": "array", + "items": { + "$ref": "Cluster" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListClustersResponse", + "description": "The list of all clusters in a project.", + "type": "object" + }, + "ManagedGroupConfiguration": { + "description": "Specifies the resources used to actively manage an instance group.", + "type": "object", + "properties": { + "instanceGroupManagerName": { + "description": "Output-only The name of Instance Group Manager managing this group.", + "type": "string" + }, + "instanceTemplateName": { + "description": "Output-only The name of Instance Template used for Managed Instance Group.", + "type": "string" + } + }, + "id": "ManagedGroupConfiguration" + }, + "SparkJob": { + "properties": { + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "loggingConfiguration": { + "$ref": "LoggingConfiguration", + "description": "Optional The runtime log configuration for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object" + }, + "args": { + "description": "Optional The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "type": "array", + "items": { + "type": "string" + } + }, + "fileUris": { + "description": "Optional HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainClass": { + "type": "string", + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris." + }, + "archiveUris": { + "description": "Optional HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainJarFileUri": { + "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file that contains the main class.", + "type": "string" + } + }, + "id": "SparkJob", + "description": "A Cloud Dataproc job for running Spark applications on YARN.", + "type": "object" + }, + "Job": { + "description": "A Cloud Dataproc job resource.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional The labels to associate with this job.Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given job.", + "type": "object" + }, + "driverOutputResourceUri": { + "description": "Output-only A URI pointing to the location of the stdout of the job's driver program.", + "type": "string" + }, + "sparkJob": { + "$ref": "SparkJob", + "description": "Job is a Spark job." + }, + "sparkSqlJob": { + "$ref": "SparkSqlJob", + "description": "Job is a SparkSql job." + }, + "statusHistory": { + "description": "Output-only The previous job status.", + "type": "array", + "items": { + "$ref": "JobStatus" + } + }, + "yarnApplications": { + "description": "Output-only The collection of Yarn applications spun up by this job.", + "type": "array", + "items": { + "$ref": "YarnApplication" + } + }, + "pysparkJob": { + "$ref": "PySparkJob", + "description": "Job is a Pyspark job." + }, + "reference": { + "$ref": "JobReference", + "description": "Optional The fully-qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e." + }, + "interactive": { + "description": "Optional If set to true, then the driver's stdin will be kept open and driver_input_uri will be set to provide a path at which additional input can be sent to the driver.", + "type": "boolean" + }, + "driverInputResourceUri": { + "description": "Output-only A URI pointing to the location of the stdin of the job's driver program, only set if the job is interactive.", + "type": "string" + }, + "hadoopJob": { + "description": "Job is a Hadoop job.", + "$ref": "HadoopJob" + }, + "placement": { + "$ref": "JobPlacement", + "description": "Required Job information, including how, when, and where to run the job." + }, + "status": { + "$ref": "JobStatus", + "description": "Output-only The job status. Additional application-specific status information may be contained in the \u003ccode\u003etype_job\u003c/code\u003e and \u003ccode\u003eyarn_applications\u003c/code\u003e fields." + }, + "driverControlFilesUri": { + "description": "Output-only If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", + "type": "string" + }, + "submittedBy": { + "type": "string", + "description": "Output-only The email address of the user submitting the job. For jobs submitted on the cluster, the address is \u003ccode\u003eusername@hostname\u003c/code\u003e." + }, + "scheduling": { + "$ref": "JobScheduling", + "description": "Optional Job scheduling configuration." + }, + "pigJob": { + "$ref": "PigJob", + "description": "Job is a Pig job." + }, + "driverOutputUri": { + "description": "Output-only A URI pointing to the location of the mixed stdout/stderr of the job's driver program—for example, \u003ccode\u003egs://sysbucket123/foo-cluster/jobid-123/driver/output\u003c/code\u003e.", + "type": "string" + }, + "hiveJob": { + "$ref": "HiveJob", + "description": "Job is a Hive job." + } + }, + "id": "Job" + }, + "JobStatus": { + "description": "Cloud Dataproc job status.", + "type": "object", + "properties": { + "state": { + "enumDescriptions": [ + "The job state is unknown.", + "The job is pending; it has been submitted, but is not yet running.", + "Job has been received by the service and completed initial setup; it will shortly be submitted to the cluster.", + "The job is running on the cluster.", + "A CancelJob request has been received, but is pending.", + "Transient in-flight resources have been canceled, and the request to cancel the running job has been issued to the cluster.", + "The job cancelation was successful.", + "The job has completed successfully.", + "The job has completed, but encountered an error.", + "Job attempt has failed. The detail field contains failure details for this attempt.Applies to restartable jobs only." + ], + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "SETUP_DONE", + "RUNNING", + "CANCEL_PENDING", + "CANCEL_STARTED", + "CANCELLED", + "DONE", + "ERROR", + "ATTEMPT_FAILURE" + ], + "description": "Required A state message specifying the overall job state.", + "type": "string" + }, + "details": { + "description": "Optional Job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e.", + "type": "string" + }, + "stateStartTime": { + "description": "Output-only The time when this state was entered.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "The time when the job completed.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "The time when the server started the job.", + "format": "google-datetime", + "type": "string" + }, + "substate": { + "enumDescriptions": [ + "", + "The Job is submitted to the agent.Applies to RUNNING state.", + "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", + "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "SUBMITTED", + "QUEUED", + "STALE_STATUS" + ], + "description": "Output-only Additional state information, which includes status reported by the agent.", + "type": "string" + }, + "insertTime": { + "description": "The time of the job request.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "JobStatus" + }, + "DiskConfiguration": { + "type": "object", + "properties": { + "bootDiskSizeGb": { + "description": "Optional Size in GB of the boot disk (default is 500GB).", + "format": "int32", + "type": "integer" + }, + "numLocalSsds": { + "description": "Optional Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs, and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic configuration and installed binaries.", + "format": "int32", + "type": "integer" + } + }, + "id": "DiskConfiguration", + "description": "Specifies the configuration of disk options for a group of VM instances." + }, + "ClusterOperationStatus": { + "description": "The status of the operation.", + "type": "object", + "properties": { + "state": { + "enumDescriptions": [ + "Unused.", + "The operation has been created.", + "The operation is running.", + "The operation is done; either cancelled or completed." + ], + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" + ], + "description": "Output-only. A message containing the operation state.", + "type": "string" + }, + "details": { + "description": "Output-only.A message containing any operation metadata details.", + "type": "string" + }, + "innerState": { + "description": "Output-only. A message containing the detailed operation state.", + "type": "string" + }, + "stateStartTime": { + "description": "Output-only. The time this state was entered.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "ClusterOperationStatus" + }, + "HadoopJob": { + "type": "object", + "properties": { + "archiveUris": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip." + }, + "mainJarFileUri": { + "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file containing the main class. Examples: gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar hdfs:/tmp/test-samples/custom-wordcount.jar file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar", + "type": "string" + }, + "jarFileUris": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks." + }, + "loggingConfiguration": { + "$ref": "LoggingConfiguration", + "description": "Optional The runtime log configuration for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", + "type": "object" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission." + }, + "fileUris": { + "description": "Optional HCFS URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + } + }, + "id": "HadoopJob", + "description": "A Cloud Dataproc job for running Hadoop MapReduce jobs on YARN." + }, + "QueryList": { + "description": "A list of queries to run on a cluster.", + "type": "object", + "properties": { + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Required The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n" + } + }, + "id": "QueryList" + }, + "YarnApplication": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Required The application name." + }, + "trackingUrl": { + "description": "Optional The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", + "type": "string" + }, + "progress": { + "description": "Required The numerical progress of the application, from 1 to 100.", + "format": "float", + "type": "number" + }, + "state": { + "enumDescriptions": [ + "Status is unspecified.", + "Status is NEW.", + "Status is NEW_SAVING.", + "Status is SUBMITTED.", + "Status is ACCEPTED.", + "Status is RUNNING.", + "Status is FINISHED.", + "Status is FAILED.", + "Status is KILLED." + ], + "enum": [ + "STATE_UNSPECIFIED", + "NEW", + "NEW_SAVING", + "SUBMITTED", + "ACCEPTED", + "RUNNING", + "FINISHED", + "FAILED", + "KILLED" + ], + "description": "Required The application state.", + "type": "string" + } + }, + "id": "YarnApplication", + "description": "A YARN application created by a job. Application information is a subset of \u003ccode\u003eorg.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto\u003c/code\u003e." + }, + "ClusterOperationMetadata": { + "properties": { + "operationType": { + "description": "Output-only. The operation type.", + "type": "string" + }, + "description": { + "description": "Output-only. Short description of operation.", + "type": "string" + }, + "warnings": { + "description": "Output-only. Errors encountered during operation execution.", + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Output-only. Labels associated with the operation", + "type": "object" + }, + "status": { + "$ref": "ClusterOperationStatus", + "description": "Output-only. Current operation status." + }, + "statusHistory": { + "description": "Output-only. The previous operation status.", + "type": "array", + "items": { + "$ref": "ClusterOperationStatus" + } + }, + "clusterUuid": { + "description": "Output-only. Cluster UUID for the operation.", + "type": "string" + }, + "clusterName": { + "description": "Output-only. Name of the cluster for the operation.", + "type": "string" + } + }, + "id": "ClusterOperationMetadata", + "description": "Metadata describing the operation.", + "type": "object" + }, + "Empty": { + "type": "object", + "properties": {}, + "id": "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:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}." + }, + "HiveJob": { + "description": "A Cloud Dataproc job for running Hive queries on YARN.", + "type": "object", + "properties": { + "continueOnFailure": { + "type": "boolean", + "description": "Optional Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries." + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains Hive queries.", + "type": "string" + }, + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", + "type": "array", + "items": { + "type": "string" + } + }, + "scriptVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional Mapping of query variable names to values (equivalent to the Hive command: 'SET name=\"value\";').", + "type": "object" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", + "type": "object" + } + }, + "id": "HiveJob" + }, + "DiagnoseClusterResults": { + "description": "The location of diagnostic output.", + "type": "object", + "properties": { + "outputUri": { + "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.", + "type": "string" + } + }, + "id": "DiagnoseClusterResults" + }, + "ListJobsRequest": { + "id": "ListJobsRequest", + "description": "A request to list jobs in a project.", + "type": "object", + "properties": { + "pageToken": { + "description": "Optional The page token, returned by a previous call, to request the next page of results.", + "type": "string" + }, + "clusterName": { + "type": "string", + "description": "Optional If set, the returned jobs list includes only jobs that were submitted to the named cluster." + }, + "pageSize": { + "description": "Optional The number of results to return in each response.", + "format": "int32", + "type": "integer" + }, + "filter": { + "description": "Optional A filter constraining which jobs to list. Valid filters contain job state and label terms such as: labels.key1 = val1 AND (labels.k2 = val2 OR labels.k3 = val3)", + "type": "string" + }, + "jobStateMatcher": { + "enum": [ + "ALL", + "ACTIVE", + "NON_ACTIVE" + ], + "description": "Optional Specifies enumerated categories of jobs to list.", + "type": "string", + "enumDescriptions": [ + "Match all jobs, regardless of state.", + "Only match jobs in non-terminal states: PENDING, RUNNING, CANCEL_PENDING", + "Only match jobs in terminal states: CANCELLED, DONE, ERROR" + ] + } + } + }, + "GceConfiguration": { + "properties": { + "imageUri": { + "description": "Deprecated The Google Compute Engine image resource used for cluster instances. Example: \"compute.googleapis.com/projects/debian-cloud /global/images/backports-debian-7-wheezy-v20140904\".", + "type": "string" + }, + "machineTypeUri": { + "description": "Deprecated The Google Compute Engine machine type used for cluster instances. Example: \"compute.googleapis.com/projects/project_id /zones/us-east1-a/machineTypes/n1-standard-2\".", + "type": "string" + }, + "networkUri": { + "description": "Deprecated The Google Compute Engine network to be used for machine communications. Inbound SSH connections are necessary to complete cluster configuration. Example \"compute.googleapis.com/projects/project_id /zones/us-east1-a/default\".", + "type": "string" + }, + "serviceAccountScopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Deprecated The service account scopes included in Google Compute Engine instances. Must include devstorage.full_control to enable the Google Cloud Storage connector. Example \"auth.googleapis.com/compute\" and \"auth.googleapis.com/devstorage.full_control\"." + }, + "zoneUri": { + "description": "Deprecated The zone where the Google Compute Engine cluster will be located. Example: \"compute.googleapis.com/projects/project_id /zones/us-east1-a\".", + "type": "string" + } + }, + "id": "GceConfiguration", + "description": "Deprecated Common configuration settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", + "type": "object" + }, + "SoftwareConfiguration": { + "type": "object", + "properties": { + "imageVersion": { + "description": "Optional The version of software inside the cluster. It must match the regular expression 0-9+.0-9+. If unspecified it will default to latest version.", + "type": "string" + }, + "properties": { + "description": "Optional The properties to set on daemon configuration files.Property keys are specified in \"prefix:property\" format, such as \"core:fs.defaultFS\". The following are supported prefixes and their mappings: core - core-site.xml hdfs - hdfs-site.xml mapred - mapred-site.xml yarn - yarn-site.xml hive - hive-site.xml pig - pig.properties spark - spark-defaults.conf", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "id": "SoftwareConfiguration", + "description": "Specifies the selection and configuration of software inside the cluster." + }, + "PySparkJob": { + "description": "A Cloud Dataproc job for running PySpark applications on YARN.", + "type": "object", + "properties": { + "pythonFileUris": { + "description": "Optional HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainPythonFileUri": { + "description": "Required The Hadoop Compatible Filesystem (HCFS) URI of the main Python file to use as the driver. Must be a .py file.", + "type": "string" + }, + "archiveUris": { + "description": "Optional HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "loggingConfiguration": { + "$ref": "LoggingConfiguration", + "description": "Optional The runtime log configuration for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object" + }, + "args": { + "description": "Optional The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "type": "array", + "items": { + "type": "string" + } + }, + "fileUris": { + "description": "Optional HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "PySparkJob" + }, + "LoggingConfiguration": { + "type": "object", + "properties": { + "driverLogLevels": { + "description": "The per-package log levels for the driver. This may include 'root' package name to configure rootLogger. Examples: com.google = FATAL, root = INFO, org.apache = DEBUG", + "type": "object", + "additionalProperties": { + "enum": [ + "LEVEL_UNSPECIFIED", + "ALL", + "TRACE", + "DEBUG", + "INFO", + "WARN", + "ERROR", + "FATAL", + "OFF" + ], + "type": "string" + } + } + }, + "id": "LoggingConfiguration", + "description": "The runtime logging configuration of the job." + }, + "ClusterConfiguration": { + "description": "The cluster configuration.", + "type": "object", + "properties": { + "masterConfiguration": { + "$ref": "InstanceGroupConfiguration", + "description": "Optional The Google Compute Engine configuration settings for the master instance in a cluster." + }, + "secondaryWorkerConfiguration": { + "$ref": "InstanceGroupConfiguration", + "description": "Optional The Google Compute Engine configuration settings for additional worker instances in a cluster." + }, + "masterName": { + "description": "Deprecated The Master's hostname. Dataproc derives the name from cluster_name if not set by user (recommended practice is to let Dataproc derive the name). Derived master name example: hadoop-m.", + "type": "string" + }, + "workers": { + "description": "Deprecated The list of worker node names. Dataproc derives the names from cluster_name and num_workers if not set by user (recommended practice is to let Dataproc derive the name). Derived worker node name example: hadoop-w-0.", + "type": "array", + "items": { + "type": "string" + } + }, + "initializationActions": { + "description": "Optional Commands to execute on each node after configuration is completed. By default, executables are run on master and all worker nodes. You can test a node's \u003ccode\u003erole\u003c/code\u003e metadata to run an executable on a master or worker node, as shown below:\nROLE=$(/usr/share/google/get_metadata_value attributes/role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", + "type": "array", + "items": { + "$ref": "NodeInitializationAction" + } + }, + "workerConfiguration": { + "description": "Optional The Google Compute Engine configuration settings for worker instances in a cluster.", + "$ref": "InstanceGroupConfiguration" + }, + "softwareConfiguration": { + "$ref": "SoftwareConfiguration", + "description": "Optional The configuration settings for software inside the cluster." + }, + "gceClusterConfiguration": { + "$ref": "GceClusterConfiguration", + "description": "Optional The shared Google Compute Engine configuration settings for all instances in a cluster." + }, + "configurationBucket": { + "description": "Optional A Google Cloud Storage staging bucket used for sharing generated SSH keys and configuration. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, then it will create and manage this project-level, per-location bucket for you.", + "type": "string" + }, + "numWorkers": { + "description": "Deprecated The number of worker nodes in the cluster.", + "format": "int32", + "type": "integer" + }, + "masterDiskConfiguration": { + "$ref": "DiskConfiguration", + "description": "Deprecated The configuration settings of master node disk options." + }, + "workerDiskConfiguration": { + "$ref": "DiskConfiguration", + "description": "Deprecated The configuration settings of worker node disk options." + }, + "gceConfiguration": { + "description": "Deprecated The Google Compute Engine configuration settings for cluster resources.", + "$ref": "GceConfiguration" + } + }, + "id": "ClusterConfiguration" + }, + "ClusterMetrics": { + "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.", + "type": "object", + "properties": { + "yarnMetrics": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The YARN metrics.", + "type": "object" + }, + "hdfsMetrics": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The HDFS metrics.", + "type": "object" + } + }, + "id": "ClusterMetrics" + }, + "InstanceGroupConfiguration": { + "description": "The configuration settings for Google Compute Engine resources in an instance group, such as a master or worker group.", + "type": "object", + "properties": { + "diskConfiguration": { + "$ref": "DiskConfiguration", + "description": "Disk option configuration settings." + }, + "machineTypeUri": { + "description": "The Google Compute Engine machine type used for cluster instances. Example: \"compute.googleapis.com/projects/project_id /zones/us-east1-a/machineTypes/n1-standard-2\".", + "type": "string" + }, + "imageUri": { + "description": "Output-only The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfiguration.image_version. Example: \"compute.googleapis.com/projects/debian-cloud /global/images/backports-debian-7-wheezy-v20140904\".", + "type": "string" + }, + "isPreemptible": { + "type": "boolean", + "description": "Specifies that this instance group contains Preemptible Instances." + }, + "instanceNames": { + "description": "The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Dataproc derive the name).", + "type": "array", + "items": { + "type": "string" + } + }, + "managedGroupConfiguration": { + "$ref": "ManagedGroupConfiguration", + "description": "Output-only The configuration for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups." + }, + "accelerators": { + "description": "Optional The Google Compute Engine accelerator configuration for these instances.", + "type": "array", + "items": { + "$ref": "AcceleratorConfiguration" + } + }, + "numInstances": { + "description": "The number of VM instances in the instance group. For master instance groups, must be set to 1.", + "format": "int32", + "type": "integer" + } + }, + "id": "InstanceGroupConfiguration" + }, + "GceClusterConfiguration": { + "description": "Common configuration settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", + "type": "object", + "properties": { + "networkUri": { + "description": "The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: compute.googleapis.com/projects/[project_id]/regions/global/default.", + "type": "string" + }, + "zoneUri": { + "type": "string", + "description": "Required The zone where the Google Compute Engine cluster will be located. Example: \"compute.googleapis.com/projects/project_id /zones/us-east1-a\"." + }, + "metadata": { + "description": "The Google Compute Engine metadata entries to add to all instances.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "internalIpOnly": { + "description": "If true, all instances in the cluser will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", + "type": "boolean" + }, + "serviceAccountScopes": { + "description": "The service account scopes included in Google Compute Engine instances. Must include devstorage.full_control to enable the Google Cloud Storage connector. Example \"auth.googleapis.com/compute\" and \"auth.googleapis.com/devstorage.full_control\".", + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "description": "The Google Compute Engine tags to add to all instances.", + "type": "array", + "items": { + "type": "string" + } + }, + "serviceAccount": { + "description": "Optional The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", + "type": "string" + }, + "subnetworkUri": { + "type": "string", + "description": "The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: compute.googleapis.com/projects/[project_id]/regions/us-east1/sub0." + } + }, + "id": "GceClusterConfiguration" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "type": "object", + "properties": {}, + "id": "CancelOperationRequest" + }, + "DiagnoseClusterOutputLocation": { + "description": "The location where output from diagnostic command can be found.", + "type": "object", + "properties": { + "outputUri": { + "description": "Output-only The Google Cloud Storage URI of the diagnostic output. This will be a plain text file with summary of collected diagnostics.", + "type": "string" + } + }, + "id": "DiagnoseClusterOutputLocation" + }, + "Operation": { + "description": "An asynchronous operation in a project that runs over a given cluster. Used to track the progress of a user request that is running asynchronously. Examples include creating a cluster, updating a cluster, and deleting a cluster.", + "type": "object", + "properties": { + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The operation response. If the called method returns no data on success, the response is google.protobuf.Empty. If the called method is Get,Create or Update, the response is the resource. For all other methods, the response type is a concatenation of the method name and \"Response\". For example, if the called method is TakeSnapshot(), the response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The name of the operation resource, in the format projects/project_id/operations/operation_id", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure." + }, + "metadata": { + "description": "Service-specific metadata associated with the operation.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "done": { + "description": "Indicates if the operation is done. If true, the operation is complete and the result is available. If false, the operation is still in progress.", + "type": "boolean" + } + }, + "id": "Operation" + }, + "OperationStatus": { + "description": "The status of the operation.", + "type": "object", + "properties": { + "innerState": { + "description": "A message containing the detailed operation state.", + "type": "string" + }, + "stateStartTime": { + "description": "The time this state was entered.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "Unused.", + "The operation has been created.", + "The operation is running.", + "The operation is done; either cancelled or completed." + ], + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" + ], + "description": "A message containing the operation state.", + "type": "string" + }, + "details": { + "description": "A message containing any operation metadata details.", + "type": "string" + } + }, + "id": "OperationStatus" + }, + "JobReference": { + "type": "object", + "properties": { + "projectId": { + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string" + }, + "jobId": { + "description": "Required The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 100 characters.", + "type": "string" + } + }, + "id": "JobReference", + "description": "Encapsulates the full scoping used to reference a job." + }, + "SubmitJobRequest": { + "description": "A job submission request.", + "type": "object", + "properties": { + "job": { + "description": "Required The job resource.", + "$ref": "Job" + } + }, + "id": "SubmitJobRequest" + } + }, + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "version": "v1alpha1", + "baseUrl": "https://dataproc.googleapis.com/" } diff --git a/etc/api/dataproc/v1beta1/dataproc-api.json b/etc/api/dataproc/v1beta1/dataproc-api.json index 907b0ee9d6..beb79568f5 100644 --- a/etc/api/dataproc/v1beta1/dataproc-api.json +++ b/etc/api/dataproc/v1beta1/dataproc-api.json @@ -1,1736 +1,1910 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/cZQ-6vqHhMM0YELMHYWsiSzNXAM\"", - "discoveryVersion": "v1", - "id": "dataproc:v1beta1", - "name": "dataproc", - "version": "v1beta1", - "revision": "20161102", - "title": "Google Cloud Dataproc API", - "description": "An API for managing Hadoop-based clusters and jobs on Google Cloud Platform.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/dataproc/", - "protocol": "rest", - "baseUrl": "https://dataproc.googleapis.com/", - "basePath": "", - "rootUrl": "https://dataproc.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "schemas": { - "Cluster": { - "id": "Cluster", - "type": "object", - "description": "Describes the identifying information, configuration, and status of a cluster of Google Compute Engine instances.", - "properties": { - "projectId": { - "type": "string", - "description": "[Required] The Google Cloud Platform project ID that the cluster belongs to." - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name. Cluster names within a project must be unique. Names from deleted clusters can be reused." - }, - "configuration": { - "$ref": "ClusterConfiguration", - "description": "[Required] The cluster configuration. Note that Cloud Dataproc may set default values, and values may change when clusters are updated." - }, - "labels": { - "type": "object", - "description": "[Optional] The labels to associate with this cluster. Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}{0,62} Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63} No more than 64 labels can be associated with a given cluster.", - "additionalProperties": { - "type": "string" - } - }, - "status": { - "$ref": "ClusterStatus", - "description": "[Output-only] Cluster status." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] Previous cluster statuses.", - "items": { - "$ref": "ClusterStatus" - } - }, - "clusterUuid": { - "type": "string", - "description": "[Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster." - }, - "metrics": { - "$ref": "ClusterMetrics", - "description": "Contains cluster daemon metrics such as HDFS and YARN stats." - } - } - }, - "ClusterConfiguration": { - "id": "ClusterConfiguration", - "type": "object", - "description": "The cluster configuration.", - "properties": { - "configurationBucket": { - "type": "string", - "description": "[Optional] A Google Cloud Storage staging bucket used for sharing generated SSH keys and configuration. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you." - }, - "gceClusterConfiguration": { - "$ref": "GceClusterConfiguration", - "description": "[Required] The shared Google Compute Engine configuration settings for all instances in a cluster." - }, - "masterConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "[Optional] The Google Compute Engine configuration settings for the master instance in a cluster." - }, - "workerConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "[Optional] The Google Compute Engine configuration settings for worker instances in a cluster." - }, - "secondaryWorkerConfiguration": { - "$ref": "InstanceGroupConfiguration", - "description": "[Optional] The Google Compute Engine configuration settings for additional worker instances in a cluster." - }, - "softwareConfiguration": { - "$ref": "SoftwareConfiguration", - "description": "[Optional] The configuration settings for software inside the cluster." - }, - "initializationActions": { - "type": "array", - "description": "[Optional] Commands to execute on each node after configuration is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below: ROLE=$(/usr/share/google/get_metadata_value attributes/role) if [[ \"${ROLE}\" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi", - "items": { - "$ref": "NodeInitializationAction" - } - } - } - }, - "GceClusterConfiguration": { - "id": "GceClusterConfiguration", - "type": "object", - "description": "Common configuration settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "properties": { - "zoneUri": { - "type": "string", - "description": "[Required] The zone where the Google Compute Engine cluster will be located. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`." - }, - "networkUri": { - "type": "string", - "description": "The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`." - }, - "subnetworkUri": { - "type": "string", - "description": "The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`." - }, - "internalIpOnly": { - "type": "boolean", - "description": "If true, all instances in the cluser will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses." - }, - "serviceAccountScopes": { - "type": "array", - "description": "The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: - https://www.googleapis.com/auth/cloud.useraccounts.readonly - https://www.googleapis.com/auth/devstorage.read_write - https://www.googleapis.com/auth/logging.write If no scopes are specfied, the following defaults are also provided: - https://www.googleapis.com/auth/bigquery - https://www.googleapis.com/auth/bigtable.admin.table - https://www.googleapis.com/auth/bigtable.data - https://www.googleapis.com/auth/devstorage.full_control", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "description": "The Google Compute Engine tags to add to all instances.", - "items": { - "type": "string" - } - }, - "metadata": { - "type": "object", - "description": "The Google Compute Engine metadata entries to add to all instances.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "InstanceGroupConfiguration": { - "id": "InstanceGroupConfiguration", - "type": "object", - "description": "The configuration settings for Google Compute Engine resources in an instance group, such as a master or worker group.", - "properties": { - "numInstances": { - "type": "integer", - "description": "The number of VM instances in the instance group. For master instance groups, must be set to 1.", - "format": "int32" - }, - "instanceNames": { - "type": "array", - "description": "The list of instance names. Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Dataproc derive the name).", - "items": { - "type": "string" - } - }, - "imageUri": { - "type": "string", - "description": "[Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfiguration.image_version`." - }, - "machineTypeUri": { - "type": "string", - "description": "The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`." - }, - "diskConfiguration": { - "$ref": "DiskConfiguration", - "description": "Disk option configuration settings." - }, - "isPreemptible": { - "type": "boolean", - "description": "Specifies that this instance group contains Preemptible Instances." - }, - "managedGroupConfiguration": { - "$ref": "ManagedGroupConfiguration", - "description": "[Output-only] The configuration for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups." - } - } - }, - "DiskConfiguration": { - "id": "DiskConfiguration", - "type": "object", - "description": "Specifies the configuration of disk options for a group of VM instances.", - "properties": { - "bootDiskSizeGb": { - "type": "integer", - "description": "[Optional] Size in GB of the boot disk (default is 500GB).", - "format": "int32" - }, - "numLocalSsds": { - "type": "integer", - "description": "[Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic configuration and installed binaries.", - "format": "int32" - } - } - }, - "ManagedGroupConfiguration": { - "id": "ManagedGroupConfiguration", - "type": "object", - "description": "Specifies the resources used to actively manage an instance group.", - "properties": { - "instanceTemplateName": { - "type": "string", - "description": "[Output-only] The name of the Instance Template used for the Managed Instance Group." - }, - "instanceGroupManagerName": { - "type": "string", - "description": "[Output-only] The name of the Instance Group Manager for this group." - } - } - }, - "SoftwareConfiguration": { - "id": "SoftwareConfiguration", - "type": "object", - "description": "Specifies the selection and configuration of software inside the cluster.", - "properties": { - "imageVersion": { - "type": "string", - "description": "[Optional] The version of software inside the cluster. It must match the regular expression `[0-9]+\\.[0-9]+`. If unspecified, it defaults to the latest version (see [Cloud Dataproc Versioning](/dataproc/versioning))." - }, - "properties": { - "type": "object", - "description": "[Optional] The properties to set on daemon configuration files. Property keys are specified in \"prefix:property\" format, such as \"core:fs.defaultFS\". The following are supported prefixes and their mappings: core - core-site.xml hdfs - hdfs-site.xml mapred - mapred-site.xml yarn - yarn-site.xml hive - hive-site.xml pig - pig.properties spark - spark-defaults.conf", - "additionalProperties": { - "type": "string" - } - } - } - }, - "NodeInitializationAction": { - "id": "NodeInitializationAction", - "type": "object", - "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", - "properties": { - "executableFile": { - "type": "string", - "description": "[Required] Google Cloud Storage URI of executable file." - }, - "executionTimeout": { - "type": "string", - "description": "[Optional] Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period." - } - } - }, - "ClusterStatus": { - "id": "ClusterStatus", - "type": "object", - "description": "The status of a cluster and its instances.", - "properties": { - "state": { - "type": "string", - "description": "The cluster's state.", - "enum": [ - "UNKNOWN", - "CREATING", - "RUNNING", - "ERROR", - "DELETING", - "UPDATING" - ] - }, - "detail": { - "type": "string", - "description": "Optional details of cluster's state." - }, - "stateStartTime": { - "type": "string", - "description": "Time when this state was entered." - } - } - }, - "ClusterMetrics": { - "id": "ClusterMetrics", - "type": "object", - "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.", - "properties": { - "hdfsMetrics": { - "type": "object", - "description": "The HDFS metrics.", - "additionalProperties": { - "type": "string", - "format": "int64" - } - }, - "yarnMetrics": { - "type": "object", - "description": "The YARN metrics.", - "additionalProperties": { - "type": "string", - "format": "int64" - } - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "properties": { - "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`." - }, - "metadata": { - "type": "object", - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "done": { - "type": "boolean", - "description": "If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available." - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "response": { - "type": "object", - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } } - } } - } }, - "ListClustersResponse": { - "id": "ListClustersResponse", - "type": "object", - "description": "The list of all clusters in a project.", - "properties": { - "clusters": { - "type": "array", - "description": "[Output-only] The clusters in the project.", - "items": { - "$ref": "Cluster" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "DiagnoseClusterRequest": { - "id": "DiagnoseClusterRequest", - "type": "object", - "description": "A request to collect cluster diagnostic information." - }, - "SubmitJobRequest": { - "id": "SubmitJobRequest", - "type": "object", - "description": "A request to submit a job.", - "properties": { - "job": { - "$ref": "Job", - "description": "[Required] The job resource." - } - } - }, - "Job": { - "id": "Job", - "type": "object", - "description": "A Cloud Dataproc job resource.", - "properties": { - "reference": { - "$ref": "JobReference", - "description": "[Optional] The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id." - }, - "placement": { - "$ref": "JobPlacement", - "description": "[Required] Job information, including how, when, and where to run the job." - }, - "hadoopJob": { - "$ref": "HadoopJob", - "description": "Job is a Hadoop job." - }, - "sparkJob": { - "$ref": "SparkJob", - "description": "Job is a Spark job." - }, - "pysparkJob": { - "$ref": "PySparkJob", - "description": "Job is a Pyspark job." - }, - "hiveJob": { - "$ref": "HiveJob", - "description": "Job is a Hive job." - }, - "pigJob": { - "$ref": "PigJob", - "description": "Job is a Pig job." - }, - "sparkSqlJob": { - "$ref": "SparkSqlJob", - "description": "Job is a SparkSql job." - }, - "status": { - "$ref": "JobStatus", - "description": "[Output-only] The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] The previous job status.", - "items": { - "$ref": "JobStatus" - } - }, - "yarnApplications": { - "type": "array", - "description": "[Output-only] The collection of YARN applications spun up by this job.", - "items": { - "$ref": "YarnApplication" - } - }, - "submittedBy": { - "type": "string", - "description": "[Output-only] The email address of the user submitting the job. For jobs submitted on the cluster, the address is username@hostname." - }, - "driverInputResourceUri": { - "type": "string", - "description": "[Output-only] A URI pointing to the location of the stdin of the job's driver program, only set if the job is interactive." - }, - "driverOutputResourceUri": { - "type": "string", - "description": "[Output-only] A URI pointing to the location of the stdout of the job's driver program." - }, - "driverControlFilesUri": { - "type": "string", - "description": "[Output-only] If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as `driver_output_uri`." - }, - "interactive": { - "type": "boolean", - "description": "[Optional] If set to `true`, the driver's stdin will be kept open and `driver_input_uri` will be set to provide a path at which additional input can be sent to the driver." - }, - "labels": { - "type": "object", - "description": "[Optional] The labels to associate with this job. Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}{0,62} Label values must be between 1 and 63 characters long, and must conform to the following regular expression: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63} No more than 64 labels can be associated with a given job.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "JobReference": { - "id": "JobReference", - "type": "object", - "description": "Encapsulates the full scoping used to reference a job.", - "properties": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to." - }, - "jobId": { - "type": "string", - "description": "[Required] The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 512 characters." - } - } - }, - "JobPlacement": { - "id": "JobPlacement", - "type": "object", - "description": "Cloud Dataproc job configuration.", - "properties": { - "clusterName": { - "type": "string", - "description": "[Required] The name of the cluster where the job will be submitted." - }, - "clusterUuid": { - "type": "string", - "description": "[Output-only] A cluster UUID generated by the Dataproc service when the job is submitted." - } - } - }, - "HadoopJob": { - "id": "HadoopJob", - "type": "object", - "description": "A Cloud Dataproc job for running Hadoop MapReduce jobs on YARN.", - "properties": { - "mainJarFileUri": { - "type": "string", - "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'" - }, - "mainClass": { - "type": "string", - "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in `jar_file_uris`." - }, - "args": { - "type": "array", - "description": "[Optional] The arguments to pass to the driver. Do not include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", - "items": { - "type": "string" - } - }, - "fileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - } - }, - "archiveUris": { - "type": "array", - "description": "[Optional] HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "LoggingConfiguration": { - "id": "LoggingConfiguration", - "type": "object", - "description": "The runtime logging configuration of the job.", - "properties": { - "driverLogLevels": { - "type": "object", - "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", - "additionalProperties": { - "type": "string", - "enum": [ - "LEVEL_UNSPECIFIED", - "ALL", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "FATAL", - "OFF" - ] - } - } - } - }, - "SparkJob": { - "id": "SparkJob", - "type": "object", - "description": "A Cloud Dataproc job for running Spark applications on YARN.", - "properties": { - "mainJarFileUri": { - "type": "string", - "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file that contains the main class." - }, - "mainClass": { - "type": "string", - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in `jar_file_uris`." - }, - "args": { - "type": "array", - "description": "[Optional] The arguments to pass to the driver. Do not include arguments, such as `--conf`, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", - "items": { - "type": "string" - } - }, - "fileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - } - }, - "archiveUris": { - "type": "array", - "description": "[Optional] HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "PySparkJob": { - "id": "PySparkJob", - "type": "object", - "description": "A Cloud Dataproc job for running PySpark applications on YARN.", - "properties": { - "mainPythonFileUri": { - "type": "string", - "description": "[Required] The Hadoop Compatible Filesystem (HCFS) URI of the main Python file to use as the driver. Must be a .py file." - }, - "args": { - "type": "array", - "description": "[Optional] The arguments to pass to the driver. Do not include arguments, such as `--conf`, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - } - }, - "pythonFileUris": { - "type": "array", - "description": "[Optional] HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", - "items": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", - "items": { - "type": "string" - } - }, - "fileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - } - }, - "archiveUris": { - "type": "array", - "description": "[Optional] HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "HiveJob": { - "id": "HiveJob", - "type": "object", - "description": "A Cloud Dataproc job for running Hive queries on YARN.", - "properties": { - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains Hive queries." - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "continueOnFailure": { - "type": "boolean", - "description": "[Optional] Whether to continue executing queries if a query fails. The default value is `false`. Setting to `true` can be useful when executing independent parallel queries." - }, - "scriptVariables": { - "type": "object", - "description": "[Optional] Mapping of query variable names to values (equivalent to the Hive command: `SET name=\"value\";`).", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", - "items": { - "type": "string" - } - } - } - }, - "QueryList": { - "id": "QueryList", - "type": "object", - "description": "A list of queries to run on a cluster.", - "properties": { - "queries": { - "type": "array", - "description": "[Required] The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob: \"hiveJob\": { \"queryList\": { \"queries\": [ \"query1\", \"query2\", \"query3;query4\", ] } }", - "items": { - "type": "string" - } - } - } - }, - "PigJob": { - "id": "PigJob", - "type": "object", - "description": "A Cloud Dataproc job for running Pig queries on YARN.", - "properties": { - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains the Pig queries." - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "continueOnFailure": { - "type": "boolean", - "description": "[Optional] Whether to continue executing queries if a query fails. The default value is `false`. Setting to `true` can be useful when executing independent parallel queries." - }, - "scriptVariables": { - "type": "object", - "description": "[Optional] Mapping of query variable names to values (equivalent to the Pig command: `name=[value]`).", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "SparkSqlJob": { - "id": "SparkSqlJob", - "type": "object", - "description": "A Cloud Dataproc job for running Spark SQL queries.", - "properties": { - "queryFileUri": { - "type": "string", - "description": "The HCFS URI of the script that contains SQL queries." - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "scriptVariables": { - "type": "object", - "description": "[Optional] Mapping of query variable names to values (equivalent to the Spark SQL command: SET `name=\"value\";`).", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "[Optional] A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "type": "array", - "description": "[Optional] HCFS URIs of jar files to be added to the Spark CLASSPATH.", - "items": { - "type": "string" - } - }, - "loggingConfiguration": { - "$ref": "LoggingConfiguration", - "description": "[Optional] The runtime log configuration for job execution." - } - } - }, - "JobStatus": { - "id": "JobStatus", - "type": "object", - "description": "Cloud Dataproc job status.", - "properties": { - "state": { - "type": "string", - "description": "[Required] A state message specifying the overall job state.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "SETUP_DONE", - "RUNNING", - "CANCEL_PENDING", - "CANCEL_STARTED", - "CANCELLED", - "DONE", - "ERROR" - ] - }, - "details": { - "type": "string", - "description": "[Optional] Job state details, such as an error description if the state is ERROR." - }, - "stateStartTime": { - "type": "string", - "description": "[Output-only] The time when this state was entered." - } - } - }, - "YarnApplication": { - "id": "YarnApplication", - "type": "object", - "description": "A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.", - "properties": { - "name": { - "type": "string", - "description": "[Required] The application name." - }, - "state": { - "type": "string", - "description": "[Required] The application state.", - "enum": [ - "STATE_UNSPECIFIED", - "NEW", - "NEW_SAVING", - "SUBMITTED", - "ACCEPTED", - "RUNNING", - "FINISHED", - "FAILED", - "KILLED" - ] - }, - "progress": { - "type": "number", - "description": "[Required] The numerical progress of the application, from 1 to 100.", - "format": "float" - }, - "trackingUrl": { - "type": "string", - "description": "[Optional] The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access." - } - } - }, - "ListJobsResponse": { - "id": "ListJobsResponse", - "type": "object", - "description": "A list of jobs in a project.", - "properties": { - "jobs": { - "type": "array", - "description": "[Output-only] Jobs list.", - "items": { - "$ref": "Job" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Optional] This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the `page_token` in a subsequent ListJobsRequest." - } - } - }, - "CancelJobRequest": { - "id": "CancelJobRequest", - "type": "object", - "description": "A request to cancel a job." - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "The response message for Operations.ListOperations.", - "properties": { + "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", + "kind": "discovery#restDescription", + "servicePath": "", + "rootUrl": "https://dataproc.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "dataproc", + "batchPath": "batch", + "revision": "20170515", + "documentationLink": "https://cloud.google.com/dataproc/", + "id": "dataproc:v1beta1", + "title": "Google Cloud Dataproc API", + "discoveryVersion": "v1", + "ownerName": "Google", + "resources": { "operations": { - "type": "array", - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - } + "methods": { + "cancel": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string", + "pattern": "^operations/.+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/operations/{operationsId}:cancel", + "path": "v1beta1/{+name}:cancel", + "id": "dataproc.operations.cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use operations.get or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation." + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be deleted.", + "required": true, + "type": "string", + "pattern": "^operations/.+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/operations/{operationsId}", + "path": "v1beta1/{+name}", + "id": "dataproc.operations.delete" + }, + "get": { + "flatPath": "v1beta1/operations/{operationsId}", + "id": "dataproc.operations.get", + "path": "v1beta1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^operations/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.", + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "name": { + "description": "The name of the operation collection.", + "required": true, + "type": "string", + "pattern": "^operations$", + "location": "path" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The standard list page size.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v1beta1/operations", + "id": "dataproc.operations.list", + "path": "v1beta1/{+name}" + } + } }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." + "projects": { + "resources": { + "jobs": { + "methods": { + "get": { + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "description": "Required The job ID.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}", + "path": "v1beta1/projects/{projectId}/jobs/{jobId}", + "id": "dataproc.projects.jobs.get", + "description": "Gets the resource representation for a job in a project." + }, + "patch": { + "request": { + "$ref": "Job" + }, + "description": "Updates a job in a project.", + "httpMethod": "PATCH", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "projectId": { + "required": true, + "type": "string", + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the job belongs to." + }, + "jobId": { + "description": "Required The job ID.", + "required": true, + "type": "string", + "location": "path" + }, + "updateMask": { + "location": "query", + "description": "Required Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}", + "id": "dataproc.projects.jobs.patch", + "path": "v1beta1/projects/{projectId}/jobs/{jobId}" + }, + "submit": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "projectId": { + "required": true, + "type": "string", + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the job belongs to." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/jobs:submit", + "id": "dataproc.projects.jobs.submit", + "path": "v1beta1/projects/{projectId}/jobs:submit", + "request": { + "$ref": "SubmitJobRequest" + }, + "description": "Submits a job to a cluster." + }, + "delete": { + "path": "v1beta1/projects/{projectId}/jobs/{jobId}", + "id": "dataproc.projects.jobs.delete", + "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "DELETE", + "parameters": { + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "description": "Required The job ID.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}" + }, + "list": { + "id": "dataproc.projects.jobs.list", + "path": "v1beta1/projects/{projectId}/jobs", + "description": "Lists jobs in a project.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ListJobsResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional The page token, returned by a previous call, to request the next page of results.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Optional The number of results to return in each response.", + "format": "int32", + "type": "integer" + }, + "clusterName": { + "type": "string", + "location": "query", + "description": "Optional If set, the returned jobs list includes only jobs that were submitted to the named cluster." + }, + "projectId": { + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string", + "location": "path" + }, + "filter": { + "description": "Optional A filter constraining which jobs to list. Valid filters contain job state and label terms such as: labels.key1 = val1 AND (labels.k2 = val2 OR labels.k3 = val3)", + "type": "string", + "location": "query" + }, + "jobStateMatcher": { + "description": "Optional Specifies enumerated categories of jobs to list.", + "type": "string", + "location": "query", + "enum": [ + "ALL", + "ACTIVE", + "NON_ACTIVE" + ] + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/jobs" + }, + "cancel": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "required": true, + "type": "string" + }, + "jobId": { + "location": "path", + "description": "Required The job ID.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta1/projects/{projectId}/jobs/{jobId}:cancel", + "id": "dataproc.projects.jobs.cancel", + "path": "v1beta1/projects/{projectId}/jobs/{jobId}:cancel", + "description": "Starts a job cancellation request. To access the job resource after cancellation, call jobs.list or jobs.get.", + "request": { + "$ref": "CancelJobRequest" + } + } + } + }, + "clusters": { + "methods": { + "get": { + "id": "dataproc.projects.clusters.get", + "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", + "description": "Gets the resource representation for a cluster in a project.", + "httpMethod": "GET", + "response": { + "$ref": "Cluster" + }, + "parameterOrder": [ + "projectId", + "clusterName" + ], + "parameters": { + "clusterName": { + "description": "Required The cluster name.", + "required": true, + "type": "string", + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}" + }, + "patch": { + "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}", + "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", + "id": "dataproc.projects.clusters.patch", + "description": "Updates a cluster in a project.", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "clusterName" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "type": "string", + "location": "query", + "description": "Required Specifies the path, relative to \u003ccode\u003eCluster\u003c/code\u003e, of the field to update. For example, to change the number of workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003econfiguration.worker_configuration.num_instances\u003c/code\u003e, and the PATCH request body would specify the new value, as follows:\n{\n \"configuration\":{\n \"workerConfiguration\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be \u003ccode\u003econfig.secondary_worker_config.num_instances\u003c/code\u003e, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003econfig.worker_config.num_instances\u003c/code\u003e and \u003ccode\u003econfig.secondary_worker_config.num_instances\u003c/code\u003e are the only fields that can be updated.", + "format": "google-fieldmask" + }, + "clusterName": { + "required": true, + "type": "string", + "location": "path", + "description": "Required The cluster name." + }, + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project the cluster belongs to.", + "required": true, + "type": "string" + } + } + }, + "diagnose": { + "request": { + "$ref": "DiagnoseClusterRequest" + }, + "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "clusterName" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "clusterName": { + "location": "path", + "description": "Required The cluster name.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}:diagnose", + "id": "dataproc.projects.clusters.diagnose", + "path": "v1beta1/projects/{projectId}/clusters/{clusterName}:diagnose" + }, + "delete": { + "flatPath": "v1beta1/projects/{projectId}/clusters/{clusterName}", + "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", + "id": "dataproc.projects.clusters.delete", + "description": "Deletes a cluster in a project.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "clusterName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "clusterName": { + "location": "path", + "description": "Required The cluster name.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string", + "location": "path" + } + } + }, + "list": { + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ListClustersResponse" + }, + "httpMethod": "GET", + "parameters": { + "filter": { + "type": "string", + "location": "query", + "description": "Optional A filter constraining which clusters to list. Valid filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 = val3)" + }, + "pageToken": { + "location": "query", + "description": "The standard List page token.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "The standard List page size.", + "format": "int32" + }, + "projectId": { + "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/clusters", + "path": "v1beta1/projects/{projectId}/clusters", + "id": "dataproc.projects.clusters.list", + "description": "Lists all clusters in a project." + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "Required The ID of the Google Cloud Platform project that the cluster belongs to.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectId}/clusters", + "path": "v1beta1/projects/{projectId}/clusters", + "id": "dataproc.projects.clusters.create", + "request": { + "$ref": "Cluster" + }, + "description": "Creates a cluster in a project." + } + } + } + } } - } }, - "CancelOperationRequest": { - "id": "CancelOperationRequest", - "type": "object", - "description": "The request message for Operations.CancelOperation." - }, - "DiagnoseClusterResults": { - "id": "DiagnoseClusterResults", - "type": "object", - "description": "The location of diagnostic output.", - "properties": { - "outputUri": { - "type": "string", - "description": "[Output-only] The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics." - } - } - }, - "ClusterOperationMetadata": { - "id": "ClusterOperationMetadata", - "type": "object", - "description": "Metadata describing the operation.", - "properties": { - "clusterName": { - "type": "string", - "description": "[Output-only] Name of the cluster for the operation." - }, - "clusterUuid": { - "type": "string", - "description": "[Output-only] Cluster UUID for the operation." - }, - "status": { - "$ref": "ClusterOperationStatus", - "description": "[Output-only] Current operation status." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] The previous operation status.", - "items": { - "$ref": "ClusterOperationStatus" - } - }, - "operationType": { - "type": "string", - "description": "[Output-only] The operation type." - }, - "description": { - "type": "string", - "description": "[Output-only] Short description of operation." - }, - "labels": { - "type": "object", - "description": "[Output-only] labels associated with the operation", - "additionalProperties": { + "parameters": { + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", "type": "string" - } + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "key": { + "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", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" } - } }, - "ClusterOperationStatus": { - "id": "ClusterOperationStatus", - "type": "object", - "description": "The status of the operation.", - "properties": { - "state": { - "type": "string", - "description": "[Output-only] A message containing the operation state.", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "innerState": { - "type": "string", - "description": "[Output-only] A message containing the detailed operation state." - }, - "details": { - "type": "string", - "description": "[Output-only]A message containing any operation metadata details." - }, - "stateStartTime": { - "type": "string", - "description": "[Output-only] The time this state was entered." - } - } - }, - "DiagnoseClusterOutputLocation": { - "id": "DiagnoseClusterOutputLocation", - "type": "object", - "description": "The location where output from diagnostic command can be found.", - "properties": { - "outputUri": { - "type": "string", - "description": "[Output-only] The Google Cloud Storage URI of the diagnostic output. This will be a plain text file with summary of collected diagnostics." - } - } - }, - "OperationMetadata": { - "id": "OperationMetadata", - "type": "object", - "description": "Metadata describing the operation.", - "properties": { - "state": { - "type": "string", - "description": "A message containing the operation state.", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "innerState": { - "type": "string", - "description": "A message containing the detailed operation state." - }, - "details": { - "type": "string", - "description": "A message containing any operation metadata details." - }, - "insertTime": { - "type": "string", - "description": "The time that the operation was requested." - }, - "startTime": { - "type": "string", - "description": "The time that the operation was started by the server." - }, - "endTime": { - "type": "string", - "description": "The time that the operation completed." - }, - "clusterName": { - "type": "string", - "description": "Name of the cluster for the operation." - }, - "clusterUuid": { - "type": "string", - "description": "Cluster UUId for the operation." - }, - "status": { - "$ref": "OperationStatus", - "description": "[Output-only] Current operation status." - }, - "statusHistory": { - "type": "array", - "description": "[Output-only] Previous operation status.", - "items": { - "$ref": "OperationStatus" - } - }, - "operationType": { - "type": "string", - "description": "[Output-only] The operation type." - }, - "description": { - "type": "string", - "description": "[Output-only] Short description of operation." - } - } - }, - "OperationStatus": { - "id": "OperationStatus", - "type": "object", - "description": "The status of the operation.", - "properties": { - "state": { - "type": "string", - "description": "A message containing the operation state.", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "DONE" - ] - }, - "innerState": { - "type": "string", - "description": "A message containing the detailed operation state." - }, - "details": { - "type": "string", - "description": "A message containing any operation metadata details." - }, - "stateStartTime": { - "type": "string", - "description": "The time this state was entered." - } - } - } - }, - "resources": { - "projects": { - "resources": { - "clusters": { - "methods": { - "create": { - "id": "dataproc.projects.clusters.create", - "path": "v1beta1/projects/{projectId}/clusters", - "httpMethod": "POST", - "description": "Creates a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" + "schemas": { + "DiskConfiguration": { + "type": "object", + "properties": { + "numLocalSsds": { + "type": "integer", + "description": "Optional Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic configuration and installed binaries.", + "format": "int32" + }, + "bootDiskSizeGb": { + "description": "Optional Size in GB of the boot disk (default is 500GB).", + "format": "int32", + "type": "integer" } - }, - "parameterOrder": [ - "projectId" - ], - "request": { - "$ref": "Cluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "patch": { - "id": "dataproc.projects.clusters.patch", - "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", - "httpMethod": "PATCH", - "description": "Updates a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project the cluster belongs to.", - "required": true, - "location": "path" + "id": "DiskConfiguration", + "description": "Specifies the configuration of disk options for a group of VM instances." + }, + "JobStatus": { + "properties": { + "stateStartTime": { + "description": "Output-only The time when this state was entered.", + "format": "google-datetime", + "type": "string" + }, + "substate": { + "description": "Output-only Additional state information, which includes status reported by the agent.", + "type": "string", + "enumDescriptions": [ + "", + "The Job is submitted to the agent.Applies to RUNNING state.", + "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", + "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "SUBMITTED", + "QUEUED", + "STALE_STATUS" + ] + }, + "state": { + "description": "Required A state message specifying the overall job state.", + "type": "string", + "enumDescriptions": [ + "The job state is unknown.", + "The job is pending; it has been submitted, but is not yet running.", + "Job has been received by the service and completed initial setup; it will shortly be submitted to the cluster.", + "The job is running on the cluster.", + "A CancelJob request has been received, but is pending.", + "Transient in-flight resources have been canceled, and the request to cancel the running job has been issued to the cluster.", + "The job cancelation was successful.", + "The job has completed successfully.", + "The job has completed, but encountered an error.", + "Job attempt has failed. The detail field contains failure details for this attempt.Applies to restartable jobs only." + ], + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "SETUP_DONE", + "RUNNING", + "CANCEL_PENDING", + "CANCEL_STARTED", + "CANCELLED", + "DONE", + "ERROR", + "ATTEMPT_FAILURE" + ] + }, + "details": { + "type": "string", + "description": "Optional Job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e." + } + }, + "id": "JobStatus", + "description": "Cloud Dataproc job status.", + "type": "object" + }, + "ClusterOperationStatus": { + "description": "The status of the operation.", + "type": "object", + "properties": { + "innerState": { + "description": "Output-only. A message containing the detailed operation state.", + "type": "string" + }, + "stateStartTime": { + "description": "Output-only. The time this state was entered.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output-only. A message containing the operation state.", + "type": "string", + "enumDescriptions": [ + "Unused.", + "The operation has been created.", + "The operation is running.", + "The operation is done; either cancelled or completed." + ], + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" + ] + }, + "details": { + "description": "Output-only.A message containing any operation metadata details.", + "type": "string" + } + }, + "id": "ClusterOperationStatus" + }, + "YarnApplication": { + "type": "object", + "properties": { + "name": { + "description": "Required The application name.", + "type": "string" + }, + "trackingUrl": { + "description": "Optional The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", + "type": "string" + }, + "progress": { + "description": "Required The numerical progress of the application, from 1 to 100.", + "format": "float", + "type": "number" + }, + "state": { + "enumDescriptions": [ + "Status is unspecified.", + "Status is NEW.", + "Status is NEW_SAVING.", + "Status is SUBMITTED.", + "Status is ACCEPTED.", + "Status is RUNNING.", + "Status is FINISHED.", + "Status is FAILED.", + "Status is KILLED." + ], + "enum": [ + "STATE_UNSPECIFIED", + "NEW", + "NEW_SAVING", + "SUBMITTED", + "ACCEPTED", + "RUNNING", + "FINISHED", + "FAILED", + "KILLED" + ], + "description": "Required The application state.", + "type": "string" + } + }, + "id": "YarnApplication", + "description": "A YARN application created by a job. Application information is a subset of \u003ccode\u003eorg.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto\u003c/code\u003e." + }, + "HadoopJob": { + "description": "A Cloud Dataproc job for running Hadoop MapReduce jobs on YARN.", + "type": "object", + "properties": { + "properties": { + "description": "Optional A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "args": { + "description": "Optional The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "type": "array", + "items": { + "type": "string" + } + }, + "fileUris": { + "description": "Optional HCFS URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainJarFileUri": { + "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'", + "type": "string" + }, + "jarFileUris": { + "description": "Optional Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "loggingConfiguration": { + "$ref": "LoggingConfiguration", + "description": "Optional The runtime log configuration for job execution." + } + }, + "id": "HadoopJob" + }, + "QueryList": { + "description": "A list of queries to run on a cluster.", + "type": "object", + "properties": { + "queries": { + "description": "Required The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "QueryList" + }, + "DiagnoseClusterRequest": { + "properties": {}, + "id": "DiagnoseClusterRequest", + "description": "A request to collect cluster diagnostic information.", + "type": "object" + }, + "ClusterOperationMetadata": { + "id": "ClusterOperationMetadata", + "description": "Metadata describing the operation.", + "type": "object", + "properties": { + "warnings": { + "description": "Output-only. Errors encountered during operation execution.", + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Output-only. Labels associated with the operation", + "type": "object" + }, + "status": { + "$ref": "ClusterOperationStatus", + "description": "Output-only. Current operation status." + }, + "statusHistory": { + "type": "array", + "items": { + "$ref": "ClusterOperationStatus" + }, + "description": "Output-only. The previous operation status." + }, + "clusterUuid": { + "type": "string", + "description": "Output-only. Cluster UUID for the operation." }, "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" + "description": "Output-only. Name of the cluster for the operation.", + "type": "string" }, - "updateMask": { - "type": "string", - "description": "[Required] Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as configuration.worker_configuration.num_instances, and the `PATCH` request body would specify the new value, as follows: { \"configuration\":{ \"workerConfiguration\":{ \"numInstances\":\"5\" } } } Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the `PATCH` request body would be set as follows: { \"config\":{ \"secondaryWorkerConfig\":{ \"numInstances\":\"5\" } } } Note: Currently, config.worker_config.num_instances and config.secondary_worker_config.num_instances are the only fields that can be updated.", - "location": "query" + "operationType": { + "description": "Output-only. The operation type.", + "type": "string" + }, + "description": { + "description": "Output-only. Short description of operation.", + "type": "string" } - }, - "parameterOrder": [ - "projectId", - "clusterName" - ], - "request": { - "$ref": "Cluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "dataproc.projects.clusters.delete", - "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", - "httpMethod": "DELETE", - "description": "Deletes a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "clusterName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "dataproc.projects.clusters.get", - "path": "v1beta1/projects/{projectId}/clusters/{clusterName}", - "httpMethod": "GET", - "description": "Gets the resource representation for a cluster in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "clusterName" - ], - "response": { - "$ref": "Cluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "dataproc.projects.clusters.list", - "path": "v1beta1/projects/{projectId}/clusters", - "httpMethod": "GET", - "description": "Lists all clusters in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" - }, - "filter": { - "type": "string", - "description": "[Optional] A filter constraining which clusters to list. Valid filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = val2 OR labels.k3 = val3)", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard List page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard List page token.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ListClustersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "diagnose": { - "id": "dataproc.projects.clusters.diagnose", - "path": "v1beta1/projects/{projectId}/clusters/{clusterName}:diagnose", - "httpMethod": "POST", - "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains `DiagnoseClusterOutputLocation`.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the cluster belongs to.", - "required": true, - "location": "path" - }, - "clusterName": { - "type": "string", - "description": "[Required] The cluster name.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId", - "clusterName" - ], - "request": { - "$ref": "DiagnoseClusterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } - } }, - "jobs": { - "methods": { - "submit": { - "id": "dataproc.projects.jobs.submit", - "path": "v1beta1/projects/{projectId}/jobs:submit", - "httpMethod": "POST", - "description": "Submits a job to a cluster.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" + "HiveJob": { + "type": "object", + "properties": { + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", + "type": "object" + }, + "continueOnFailure": { + "description": "Optional Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains Hive queries.", + "type": "string" + }, + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", + "type": "array", + "items": { + "type": "string" + } + }, + "scriptVariables": { + "description": "Optional Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", + "type": "object", + "additionalProperties": { + "type": "string" + } } - }, - "parameterOrder": [ - "projectId" - ], - "request": { - "$ref": "SubmitJobRequest" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "get": { - "id": "dataproc.projects.jobs.get", - "path": "v1beta1/projects/{projectId}/jobs/{jobId}", - "httpMethod": "GET", - "description": "Gets the resource representation for a job in a project.", - "parameters": { + "id": "HiveJob", + "description": "A Cloud Dataproc job for running Hive queries on YARN." + }, + "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:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "DiagnoseClusterResults": { + "description": "The location of diagnostic output.", + "type": "object", + "properties": { + "outputUri": { + "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.", + "type": "string" + } + }, + "id": "DiagnoseClusterResults" + }, + "SoftwareConfiguration": { + "description": "Specifies the selection and configuration of software inside the cluster.", + "type": "object", + "properties": { + "imageVersion": { + "type": "string", + "description": "Optional The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning)." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional The properties to set on daemon configuration files.Property keys are specified in \"prefix:property\" format, such as \"core:fs.defaultFS\". The following are supported prefixes and their mappings: core - core-site.xml hdfs - hdfs-site.xml mapred - mapred-site.xml yarn - yarn-site.xml hive - hive-site.xml pig - pig.properties spark - spark-defaults.conf", + "type": "object" + } + }, + "id": "SoftwareConfiguration" + }, + "PySparkJob": { + "description": "A Cloud Dataproc job for running PySpark applications on YARN.", + "type": "object", + "properties": { + "loggingConfiguration": { + "description": "Optional The runtime log configuration for job execution.", + "$ref": "LoggingConfiguration" + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code." + }, + "args": { + "description": "Optional The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "type": "array", + "items": { + "type": "string" + } + }, + "fileUris": { + "description": "Optional HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "pythonFileUris": { + "description": "Optional HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainPythonFileUri": { + "description": "Required The Hadoop Compatible Filesystem (HCFS) URI of the main Python file to use as the driver. Must be a .py file.", + "type": "string" + }, + "archiveUris": { + "description": "Optional HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "PySparkJob" + }, + "ClusterMetrics": { + "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.", + "type": "object", + "properties": { + "yarnMetrics": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The YARN metrics.", + "type": "object" + }, + "hdfsMetrics": { + "description": "The HDFS metrics.", + "type": "object", + "additionalProperties": { + "format": "int64", + "type": "string" + } + } + }, + "id": "ClusterMetrics" + }, + "ClusterConfiguration": { + "description": "The cluster configuration.", + "type": "object", + "properties": { + "configurationBucket": { + "description": "Optional A Google Cloud Storage staging bucket used for sharing generated SSH keys and configuration. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.", + "type": "string" + }, + "masterConfiguration": { + "$ref": "InstanceGroupConfiguration", + "description": "Optional The Google Compute Engine configuration settings for the master instance in a cluster." + }, + "secondaryWorkerConfiguration": { + "description": "Optional The Google Compute Engine configuration settings for additional worker instances in a cluster.", + "$ref": "InstanceGroupConfiguration" + }, + "workerConfiguration": { + "description": "Optional The Google Compute Engine configuration settings for worker instances in a cluster.", + "$ref": "InstanceGroupConfiguration" + }, + "initializationActions": { + "description": "Optional Commands to execute on each node after configuration is completed. By default, executables are run on master and all worker nodes. You can test a node's \u003ccode\u003erole\u003c/code\u003e metadata to run an executable on a master or worker node, as shown below:\nROLE=$(/usr/share/google/get_metadata_value attributes/role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", + "type": "array", + "items": { + "$ref": "NodeInitializationAction" + } + }, + "gceClusterConfiguration": { + "$ref": "GceClusterConfiguration", + "description": "Required The shared Google Compute Engine configuration settings for all instances in a cluster." + }, + "softwareConfiguration": { + "description": "Optional The configuration settings for software inside the cluster.", + "$ref": "SoftwareConfiguration" + } + }, + "id": "ClusterConfiguration" + }, + "LoggingConfiguration": { + "description": "The runtime logging configuration of the job.", + "type": "object", + "properties": { + "driverLogLevels": { + "additionalProperties": { + "type": "string", + "enum": [ + "LEVEL_UNSPECIFIED", + "ALL", + "TRACE", + "DEBUG", + "INFO", + "WARN", + "ERROR", + "FATAL", + "OFF" + ] + }, + "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", + "type": "object" + } + }, + "id": "LoggingConfiguration" + }, + "InstanceGroupConfiguration": { + "id": "InstanceGroupConfiguration", + "description": "The configuration settings for Google Compute Engine resources in an instance group, such as a master or worker group.", + "type": "object", + "properties": { + "diskConfiguration": { + "$ref": "DiskConfiguration", + "description": "Disk option configuration settings." + }, + "isPreemptible": { + "type": "boolean", + "description": "Specifies that this instance group contains Preemptible Instances." + }, + "imageUri": { + "description": "Output-only The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfiguration.image_version.", + "type": "string" + }, + "machineTypeUri": { + "description": "The Google Compute Engine machine type used for cluster instances. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2.", + "type": "string" + }, + "instanceNames": { + "description": "The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Dataproc derive the name).", + "type": "array", + "items": { + "type": "string" + } + }, + "managedGroupConfiguration": { + "$ref": "ManagedGroupConfiguration", + "description": "Output-only The configuration for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups." + }, + "accelerators": { + "description": "Optional The Google Compute Engine accelerator configuration for these instances.", + "type": "array", + "items": { + "$ref": "AcceleratorConfiguration" + } + }, + "numInstances": { + "description": "The number of VM instances in the instance group. For master instance groups, must be set to 1.", + "format": "int32", + "type": "integer" + } + } + }, + "GceClusterConfiguration": { + "description": "Common configuration settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", + "type": "object", + "properties": { + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "The Google Compute Engine metadata entries to add to all instances.", + "type": "object" + }, + "internalIpOnly": { + "description": "If true, all instances in the cluser will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", + "type": "boolean" + }, + "serviceAccountScopes": { + "description": "The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: - https://www.googleapis.com/auth/cloud.useraccounts.readonly - https://www.googleapis.com/auth/devstorage.read_write - https://www.googleapis.com/auth/logging.write If no scopes are specfied, the following defaults are also provided: - https://www.googleapis.com/auth/bigquery - https://www.googleapis.com/auth/bigtable.admin.table - https://www.googleapis.com/auth/bigtable.data - https://www.googleapis.com/auth/devstorage.full_control", + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "description": "The Google Compute Engine tags to add to all instances.", + "type": "array", + "items": { + "type": "string" + } + }, + "serviceAccount": { + "description": "Optional The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", + "type": "string" + }, + "subnetworkUri": { + "description": "The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0.", + "type": "string" + }, + "networkUri": { + "description": "The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default.", + "type": "string" + }, + "zoneUri": { + "description": "Required The zone where the Google Compute Engine cluster will be located. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone].", + "type": "string" + } + }, + "id": "GceClusterConfiguration" + }, + "CancelOperationRequest": { + "properties": {}, + "id": "CancelOperationRequest", + "description": "The request message for Operations.CancelOperation.", + "type": "object" + }, + "DiagnoseClusterOutputLocation": { + "description": "The location of diagnostic output.", + "type": "object", + "properties": { + "outputUri": { + "description": "Output-only The Google Cloud Storage URI of the diagnostic output. This is a plain text file with a summary of collected diagnostics.", + "type": "string" + } + }, + "id": "DiagnoseClusterOutputLocation" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse." + } + }, + "id": "Operation" + }, + "OperationStatus": { + "id": "OperationStatus", + "description": "The status of the operation.", + "type": "object", + "properties": { + "innerState": { + "description": "A message containing the detailed operation state.", + "type": "string" + }, + "stateStartTime": { + "description": "The time this state was entered.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" + ], + "description": "A message containing the operation state.", + "type": "string", + "enumDescriptions": [ + "Unused.", + "The operation has been created.", + "The operation is running.", + "The operation is done; either cancelled or completed." + ] + }, + "details": { + "type": "string", + "description": "A message containing any operation metadata details." + } + } + }, + "JobReference": { + "properties": { "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" + "description": "Required The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string" }, "jobId": { - "type": "string", - "description": "[Required] The job ID.", - "required": true, - "location": "path" + "description": "Required The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", + "type": "string" } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "list": { - "id": "dataproc.projects.jobs.list", - "path": "v1beta1/projects/{projectId}/jobs", - "httpMethod": "GET", - "description": "Lists jobs in a project.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" + "id": "JobReference", + "description": "Encapsulates the full scoping used to reference a job.", + "type": "object" + }, + "SubmitJobRequest": { + "description": "A request to submit a job.", + "type": "object", + "properties": { + "job": { + "description": "Required The job resource.", + "$ref": "Job" + } + }, + "id": "SubmitJobRequest" + }, + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } }, - "pageSize": { - "type": "integer", - "description": "[Optional] The number of results to return in each response.", - "format": "int32", - "location": "query" + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" }, - "pageToken": { - "type": "string", - "description": "[Optional] The page token, returned by a previous call, to request the next page of results.", - "location": "query" + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "JobScheduling": { + "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", + "type": "object", + "properties": { + "maxFailuresPerHour": { + "type": "integer", + "description": "Optional Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", + "format": "int32" + } + }, + "id": "JobScheduling" + }, + "ListJobsResponse": { + "description": "A list of jobs in a project.", + "type": "object", + "properties": { + "jobs": { + "description": "Output-only Jobs list.", + "type": "array", + "items": { + "$ref": "Job" + } + }, + "nextPageToken": { + "description": "Optional This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListJobsRequest\u003c/code\u003e.", + "type": "string" + } + }, + "id": "ListJobsResponse" + }, + "NodeInitializationAction": { + "type": "object", + "properties": { + "executableFile": { + "description": "Required Google Cloud Storage URI of executable file.", + "type": "string" + }, + "executionTimeout": { + "description": "Optional Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", + "format": "google-duration", + "type": "string" + } + }, + "id": "NodeInitializationAction", + "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion." + }, + "CancelJobRequest": { + "description": "A request to cancel a job.", + "type": "object", + "properties": {}, + "id": "CancelJobRequest" + }, + "SparkSqlJob": { + "description": "A Cloud Dataproc job for running Spark SQL queries.", + "type": "object", + "properties": { + "scriptVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", + "type": "object" + }, + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to be added to the Spark CLASSPATH.", + "type": "array", + "items": { + "type": "string" + } + }, + "loggingConfiguration": { + "$ref": "LoggingConfiguration", + "description": "Optional The runtime log configuration for job execution." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten." + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains SQL queries.", + "type": "string" + } + }, + "id": "SparkSqlJob" + }, + "Cluster": { + "description": "Describes the identifying information, configuration, and status of a cluster of Google Compute Engine instances.", + "type": "object", + "properties": { + "status": { + "$ref": "ClusterStatus", + "description": "Output-only Cluster status." + }, + "metrics": { + "$ref": "ClusterMetrics", + "description": "Contains cluster daemon metrics such as HDFS and YARN stats." + }, + "statusHistory": { + "description": "Output-only Previous cluster statuses.", + "type": "array", + "items": { + "$ref": "ClusterStatus" + } + }, + "clusterUuid": { + "description": "Output-only A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", + "type": "string" }, "clusterName": { - "type": "string", - "description": "[Optional] If set, the returned jobs list includes only jobs that were submitted to the named cluster.", - "location": "query" + "description": "Required The cluster name. Cluster names within a project must be unique. Names from deleted clusters can be reused.", + "type": "string" }, - "jobStateMatcher": { - "type": "string", - "description": "[Optional] Specifies enumerated categories of jobs to list.", - "enum": [ - "ALL", - "ACTIVE", - "NON_ACTIVE" - ], - "location": "query" - }, - "filter": { - "type": "string", - "description": "[Optional] A filter constraining which jobs to list. Valid filters contain job state and label terms such as: labels.key1 = val1 AND (labels.k2 = val2 OR labels.k3 = val3)", - "location": "query" - } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ListJobsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "cancel": { - "id": "dataproc.projects.jobs.cancel", - "path": "v1beta1/projects/{projectId}/jobs/{jobId}:cancel", - "httpMethod": "POST", - "description": "Starts a job cancellation request. To access the job resource after cancellation, call [jobs.list](/dataproc/reference/rest/v1beta1/projects.jobs/list) or [jobs.get](/dataproc/reference/rest/v1beta1/projects.jobs/get).", - "parameters": { "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" + "description": "Required The Google Cloud Platform project ID that the cluster belongs to.", + "type": "string" }, - "jobId": { - "type": "string", - "description": "[Required] The job ID.", - "required": true, - "location": "path" + "configuration": { + "$ref": "ClusterConfiguration", + "description": "Required The cluster configuration. Note that Cloud Dataproc may set default values, and values may change when clusters are updated." + }, + "labels": { + "description": "Optional The labels to associate with this cluster.Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given cluster.", + "type": "object", + "additionalProperties": { + "type": "string" + } } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "request": { - "$ref": "CancelJobRequest" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "delete": { - "id": "dataproc.projects.jobs.delete", - "path": "v1beta1/projects/{projectId}/jobs/{jobId}", - "httpMethod": "DELETE", - "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns `FAILED_PRECONDITION`.", - "parameters": { - "projectId": { - "type": "string", - "description": "[Required] The ID of the Google Cloud Platform project that the job belongs to.", - "required": true, - "location": "path" + "id": "Cluster" + }, + "ListOperationsResponse": { + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } }, - "jobId": { - "type": "string", - "description": "[Required] The job ID.", - "required": true, - "location": "path" + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + } + }, + "OperationMetadata": { + "description": "Metadata describing the operation.", + "type": "object", + "properties": { + "operationType": { + "description": "Output-only The operation type.", + "type": "string" + }, + "description": { + "description": "Output-only Short description of operation.", + "type": "string" + }, + "warnings": { + "description": "Output-only Errors encountered during operation execution.", + "type": "array", + "items": { + "type": "string" + } + }, + "status": { + "$ref": "OperationStatus", + "description": "Output-only Current operation status." + }, + "statusHistory": { + "description": "Output-only Previous operation status.", + "type": "array", + "items": { + "$ref": "OperationStatus" + } + }, + "clusterUuid": { + "description": "Cluster UUId for the operation.", + "type": "string" + }, + "clusterName": { + "description": "Name of the cluster for the operation.", + "type": "string" + } + }, + "id": "OperationMetadata" + }, + "JobPlacement": { + "description": "Cloud Dataproc job configuration.", + "type": "object", + "properties": { + "clusterName": { + "description": "Required The name of the cluster where the job will be submitted.", + "type": "string" + }, + "clusterUuid": { + "description": "Output-only A cluster UUID generated by the Dataproc service when the job is submitted.", + "type": "string" + } + }, + "id": "JobPlacement" + }, + "ClusterStatus": { + "description": "The status of a cluster and its instances.", + "type": "object", + "properties": { + "detail": { + "description": "Optional details of cluster's state.", + "type": "string" + }, + "state": { + "enum": [ + "UNKNOWN", + "CREATING", + "RUNNING", + "ERROR", + "DELETING", + "UPDATING" + ], + "description": "The cluster's state.", + "type": "string", + "enumDescriptions": [ + "The cluster state is unknown.", + "The cluster is being created and set up. It is not ready for use.", + "The cluster is currently running and healthy. It is ready for use.", + "The cluster encountered an error. It is not ready for use.", + "The cluster is being deleted. It cannot be used.", + "The cluster is being updated. It continues to accept and process jobs." + ] + }, + "stateStartTime": { + "description": "Time when this state was entered.", + "format": "google-datetime", + "type": "string" + }, + "substate": { + "description": "Output-only Additional state information that includes status reported by the agent.", + "type": "string", + "enumDescriptions": [ + "", + "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", + "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "UNHEALTHY", + "STALE_STATUS" + ] + } + }, + "id": "ClusterStatus" + }, + "PigJob": { + "type": "object", + "properties": { + "continueOnFailure": { + "description": "Optional Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains the Pig queries.", + "type": "string" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", + "type": "array", + "items": { + "type": "string" + } + }, + "scriptVariables": { + "description": "Optional Mapping of query variable names to values (equivalent to the Pig command: name=[value]).", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "loggingConfiguration": { + "$ref": "LoggingConfiguration", + "description": "Optional The runtime log configuration for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", + "type": "object" + } + }, + "id": "PigJob", + "description": "A Cloud Dataproc job for running Pig queries on YARN." + }, + "AcceleratorConfiguration": { + "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", + "type": "object", + "properties": { + "acceleratorTypeUri": { + "description": "Full or partial URI of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)", + "type": "string" + }, + "acceleratorCount": { + "description": "The number of the accelerator cards of this type exposed to this instance.", + "format": "int32", + "type": "integer" + } + }, + "id": "AcceleratorConfiguration" + }, + "ListClustersResponse": { + "description": "The list of all clusters in a project.", + "type": "object", + "properties": { + "clusters": { + "description": "Output-only The clusters in the project.", + "type": "array", + "items": { + "$ref": "Cluster" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListClustersResponse" + }, + "ManagedGroupConfiguration": { + "description": "Specifies the resources used to actively manage an instance group.", + "type": "object", + "properties": { + "instanceGroupManagerName": { + "description": "Output-only The name of the Instance Group Manager for this group.", + "type": "string" + }, + "instanceTemplateName": { + "description": "Output-only The name of the Instance Template used for the Managed Instance Group.", + "type": "string" + } + }, + "id": "ManagedGroupConfiguration" + }, + "Job": { + "description": "A Cloud Dataproc job resource.", + "type": "object", + "properties": { + "submittedBy": { + "description": "Output-only The email address of the user submitting the job. For jobs submitted on the cluster, the address is \u003ccode\u003eusername@hostname\u003c/code\u003e.", + "type": "string" + }, + "scheduling": { + "description": "Optional Job scheduling configuration.", + "$ref": "JobScheduling" + }, + "pigJob": { + "$ref": "PigJob", + "description": "Job is a Pig job." + }, + "hiveJob": { + "$ref": "HiveJob", + "description": "Job is a Hive job." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional The labels to associate with this job.Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given job.", + "type": "object" + }, + "driverOutputResourceUri": { + "description": "Output-only A URI pointing to the location of the stdout of the job's driver program.", + "type": "string" + }, + "sparkJob": { + "$ref": "SparkJob", + "description": "Job is a Spark job." + }, + "statusHistory": { + "description": "Output-only The previous job status.", + "type": "array", + "items": { + "$ref": "JobStatus" + } + }, + "sparkSqlJob": { + "$ref": "SparkSqlJob", + "description": "Job is a SparkSql job." + }, + "yarnApplications": { + "description": "Output-only The collection of YARN applications spun up by this job.", + "type": "array", + "items": { + "$ref": "YarnApplication" + } + }, + "pysparkJob": { + "$ref": "PySparkJob", + "description": "Job is a Pyspark job." + }, + "reference": { + "$ref": "JobReference", + "description": "Optional The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e." + }, + "interactive": { + "description": "Optional If set to true, the driver's stdin will be kept open and driver_input_uri will be set to provide a path at which additional input can be sent to the driver.", + "type": "boolean" + }, + "driverInputResourceUri": { + "description": "Output-only A URI pointing to the location of the stdin of the job's driver program, only set if the job is interactive.", + "type": "string" + }, + "hadoopJob": { + "description": "Job is a Hadoop job.", + "$ref": "HadoopJob" + }, + "placement": { + "$ref": "JobPlacement", + "description": "Required Job information, including how, when, and where to run the job." + }, + "status": { + "description": "Output-only The job status. Additional application-specific status information may be contained in the \u003ccode\u003etype_job\u003c/code\u003e and \u003ccode\u003eyarn_applications\u003c/code\u003e fields.", + "$ref": "JobStatus" + }, + "driverControlFilesUri": { + "description": "Output-only If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", + "type": "string" + } + }, + "id": "Job" + }, + "SparkJob": { + "id": "SparkJob", + "description": "A Cloud Dataproc job for running Spark applications on YARN.", + "type": "object", + "properties": { + "args": { + "description": "Optional The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "type": "array", + "items": { + "type": "string" + } + }, + "fileUris": { + "description": "Optional HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", + "type": "array", + "items": { + "type": "string" + } + }, + "mainJarFileUri": { + "description": "The Hadoop Compatible Filesystem (HCFS) URI of the jar file that contains the main class.", + "type": "string" + }, + "jarFileUris": { + "description": "Optional HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", + "type": "array", + "items": { + "type": "string" + } + }, + "loggingConfiguration": { + "$ref": "LoggingConfiguration", + "description": "Optional The runtime log configuration for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object" } - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } - } } - } }, - "operations": { - "methods": { - "get": { - "id": "dataproc.operations.get", - "path": "v1beta1/{+name}", - "httpMethod": "GET", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "dataproc.operations.list", - "path": "v1beta1/{+name}", - "httpMethod": "GET", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/*/operations`.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation collection.", - "required": true, - "pattern": "^operations$", - "location": "path" - }, - "filter": { - "type": "string", - "description": "The standard list filter.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard list page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "cancel": { - "id": "dataproc.operations.cancel", - "path": "v1beta1/{+name}:cancel", - "httpMethod": "POST", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use [operations.get](/dataproc/reference/rest/v1beta1/operations/get) or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be cancelled.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "dataproc.operations.delete", - "path": "v1beta1/{+name}", - "httpMethod": "DELETE", - "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be deleted.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "version": "v1beta1", + "baseUrl": "https://dataproc.googleapis.com/" } diff --git a/etc/api/datastore/v1/datastore-api.json b/etc/api/datastore/v1/datastore-api.json index 8226cc43cc..911c93f6bb 100644 --- a/etc/api/datastore/v1/datastore-api.json +++ b/etc/api/datastore/v1/datastore-api.json @@ -1,497 +1,377 @@ { - "id": "datastore:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/datastore": { - "description": "View and manage your Google Cloud Datastore data" - } - } - } - }, - "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.\n", - "protocol": "rest", - "title": "Google Cloud Datastore API", + "version_module": "True", "resources": { "projects": { "methods": { - "runQuery": { - "id": "datastore.projects.runQuery", - "response": { - "$ref": "RunQueryResponse" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Queries for entities.", - "request": { - "$ref": "RunQueryRequest" - }, - "flatPath": "v1/projects/{projectId}:runQuery", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The ID of the project against which to make the request.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}:runQuery", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ] - }, - "beginTransaction": { - "id": "datastore.projects.beginTransaction", - "response": { - "$ref": "BeginTransactionResponse" - }, - "parameterOrder": [ - "projectId" - ], - "description": "Begins a new transaction.", - "request": { - "$ref": "BeginTransactionRequest" - }, - "flatPath": "v1/projects/{projectId}:beginTransaction", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The ID of the project against which to make the request.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/projects/{projectId}:beginTransaction", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ] - }, "allocateIds": { - "id": "datastore.projects.allocateIds", "response": { "$ref": "AllocateIdsResponse" }, "parameterOrder": [ "projectId" ], - "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted.", - "request": { - "$ref": "AllocateIdsRequest" - }, - "flatPath": "v1/projects/{projectId}:allocateIds", "httpMethod": "POST", "parameters": { "projectId": { + "location": "path", "description": "The ID of the project against which to make the request.", "required": true, - "location": "path", "type": "string" } }, - "path": "v1/projects/{projectId}:allocateIds", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" - ] + ], + "flatPath": "v1/projects/{projectId}:allocateIds", + "path": "v1/projects/{projectId}:allocateIds", + "id": "datastore.projects.allocateIds", + "request": { + "$ref": "AllocateIdsRequest" + }, + "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted." }, - "lookup": { - "id": "datastore.projects.lookup", + "beginTransaction": { "response": { - "$ref": "LookupResponse" + "$ref": "BeginTransactionResponse" }, "parameterOrder": [ "projectId" ], - "description": "Looks up entities by key.", - "request": { - "$ref": "LookupRequest" - }, - "flatPath": "v1/projects/{projectId}:lookup", "httpMethod": "POST", "parameters": { "projectId": { + "location": "path", "description": "The ID of the project against which to make the request.", "required": true, - "location": "path", "type": "string" } }, - "path": "v1/projects/{projectId}:lookup", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" - ] + ], + "flatPath": "v1/projects/{projectId}:beginTransaction", + "path": "v1/projects/{projectId}:beginTransaction", + "id": "datastore.projects.beginTransaction", + "request": { + "$ref": "BeginTransactionRequest" + }, + "description": "Begins a new transaction." }, "commit": { - "id": "datastore.projects.commit", + "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.", + "request": { + "$ref": "CommitRequest" + }, "response": { "$ref": "CommitResponse" }, "parameterOrder": [ "projectId" ], - "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.", - "request": { - "$ref": "CommitRequest" - }, - "flatPath": "v1/projects/{projectId}:commit", "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], "parameters": { "projectId": { "description": "The ID of the project against which to make the request.", "required": true, - "location": "path", - "type": "string" + "type": "string", + "location": "path" } }, + "flatPath": "v1/projects/{projectId}:commit", "path": "v1/projects/{projectId}:commit", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ] + "id": "datastore.projects.commit" }, - "rollback": { - "id": "datastore.projects.rollback", + "runQuery": { + "description": "Queries for entities.", + "request": { + "$ref": "RunQueryRequest" + }, "response": { - "$ref": "RollbackResponse" + "$ref": "RunQueryResponse" }, "parameterOrder": [ "projectId" ], - "description": "Rolls back a transaction.", - "request": { - "$ref": "RollbackRequest" - }, - "flatPath": "v1/projects/{projectId}:rollback", "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], "parameters": { "projectId": { "description": "The ID of the project against which to make the request.", "required": true, - "location": "path", - "type": "string" + "type": "string", + "location": "path" } }, - "path": "v1/projects/{projectId}:rollback", + "flatPath": "v1/projects/{projectId}:runQuery", + "path": "v1/projects/{projectId}:runQuery", + "id": "datastore.projects.runQuery" + }, + "rollback": { + "description": "Rolls back a transaction.", + "request": { + "$ref": "RollbackRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "RollbackResponse" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" - ] + ], + "parameters": { + "projectId": { + "description": "The ID of the project against which to make the request.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}:rollback", + "id": "datastore.projects.rollback", + "path": "v1/projects/{projectId}:rollback" + }, + "lookup": { + "id": "datastore.projects.lookup", + "path": "v1/projects/{projectId}:lookup", + "description": "Looks up entities by key.", + "request": { + "$ref": "LookupRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "LookupResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "projectId": { + "description": "The ID of the project against which to make the request.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}:lookup" } } } }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + } + }, "schemas": { - "Value": { - "description": "A message that can hold any of the supported value types and associated\nmetadata.", - "type": "object", - "properties": { - "stringValue": { - "description": "A UTF-8 encoded string value.\nWhen `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.\nOtherwise, may be set to at least 1,000,000 bytes.", - "type": "string" - }, - "arrayValue": { - "description": "An array value.\nCannot contain another array value.\nA `Value` instance that sets field `array_value` must not set fields\n`meaning` or `exclude_from_indexes`.", - "$ref": "ArrayValue" - }, - "entityValue": { - "description": "An entity value.\n\n- May have no key.\n- May have a key with an incomplete key path.\n- May have a reserved/read-only key.", - "$ref": "Entity" - }, - "meaning": { - "description": "The `meaning` field should only be populated for backwards compatibility.", - "type": "integer", - "format": "int32" - }, - "integerValue": { - "description": "An integer value.", - "type": "string", - "format": "int64" - }, - "doubleValue": { - "description": "A double value.", - "type": "number", - "format": "double" - }, - "blobValue": { - "description": "A blob value.\nMay have at most 1,000,000 bytes.\nWhen `exclude_from_indexes` is false, may have at most 1500 bytes.\nIn JSON requests, must be base64-encoded.", - "type": "string", - "format": "byte" - }, - "geoPointValue": { - "description": "A geo point value representing a point on the surface of Earth.", - "$ref": "LatLng" - }, - "nullValue": { - "description": "A null value.", - "enum": [ - "NULL_VALUE" - ], - "enumDescriptions": [ - "Null value." - ], - "type": "string" - }, - "booleanValue": { - "description": "A boolean value.", - "type": "boolean" - }, - "keyValue": { - "description": "A key value.", - "$ref": "Key" - }, - "excludeFromIndexes": { - "description": "If the value should be excluded from all indexes including those defined\nexplicitly.", - "type": "boolean" - }, - "timestampValue": { - "description": "A timestamp value.\nWhen stored in the Datastore, precise only to microseconds;\nany additional precision is rounded down.", - "type": "string", - "format": "google-datetime" - } - }, - "id": "Value" - }, - "ReadOptions": { - "description": "The options shared by read requests.", - "type": "object", - "properties": { - "transaction": { - "description": "The identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", - "type": "string", - "format": "byte" - }, - "readConsistency": { - "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.", - "enum": [ - "READ_CONSISTENCY_UNSPECIFIED", - "STRONG", - "EVENTUAL" - ], - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Strong consistency.", - "Eventual consistency." - ], - "type": "string" - } - }, - "id": "ReadOptions" - }, - "PropertyOrder": { - "description": "The desired order for a specific property.", - "type": "object", - "properties": { - "direction": { - "description": "The direction to order by. Defaults to `ASCENDING`.", - "enum": [ - "DIRECTION_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Ascending.", - "Descending." - ], - "type": "string" - }, - "property": { - "description": "The property to order by.", - "$ref": "PropertyReference" - } - }, - "id": "PropertyOrder" - }, - "CommitRequest": { - "description": "The request for Datastore.Commit.", - "type": "object", - "properties": { - "transaction": { - "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", - "type": "string", - "format": "byte" - }, - "mode": { - "description": "The type of commit to perform. Defaults to `TRANSACTIONAL`.", - "enum": [ - "MODE_UNSPECIFIED", - "TRANSACTIONAL", - "NON_TRANSACTIONAL" - ], - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Transactional: The mutations are either all applied, or none are applied.\nLearn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).", - "Non-transactional: The mutations may not apply as all or none." - ], - "type": "string" - }, - "mutations": { - "description": "The mutations to perform.\n\nWhen mode is `TRANSACTIONAL`, mutations affecting a single entity are\napplied in order. The following sequences of mutations affecting a single\nentity are not permitted in a single `Commit` request:\n\n- `insert` followed by `insert`\n- `update` followed by `insert`\n- `upsert` followed by `insert`\n- `delete` followed by `update`\n\nWhen mode is `NON_TRANSACTIONAL`, no two mutations may affect a single\nentity.", - "type": "array", - "items": { - "$ref": "Mutation" - } - } - }, - "id": "CommitRequest" - }, - "Query": { - "description": "A query for entities.", - "type": "object", - "properties": { - "limit": { - "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "The filter to apply.", - "$ref": "Filter" - }, - "endCursor": { - "description": "An ending point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", - "type": "string", - "format": "byte" - }, - "distinctOn": { - "description": "The properties to make distinct. The query results will contain the first\nresult for each distinct combination of values for the given properties\n(if empty, all results are returned).", - "type": "array", - "items": { - "$ref": "PropertyReference" - } - }, - "offset": { - "description": "The number of results to skip. Applies before limit, but after all other\nconstraints. Optional. Must be \u003e= 0 if specified.", - "type": "integer", - "format": "int32" - }, - "projection": { - "description": "The projection to return. Defaults to returning all properties.", - "type": "array", - "items": { - "$ref": "Projection" - } - }, - "order": { - "description": "The order to apply to the query results (if empty, order is unspecified).", - "type": "array", - "items": { - "$ref": "PropertyOrder" - } - }, - "startCursor": { - "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", - "type": "string", - "format": "byte" - }, - "kind": { - "description": "The kinds to query (if empty, returns entities of all kinds).\nCurrently at most 1 kind may be specified.", - "type": "array", - "items": { - "$ref": "KindExpression" - } - } - }, - "id": "Query" - }, - "RollbackRequest": { - "description": "The request for Datastore.Rollback.", - "type": "object", - "properties": { - "transaction": { - "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.", - "type": "string", - "format": "byte" - } - }, - "id": "RollbackRequest" - }, "EntityResult": { "description": "The result of fetching an entity from Datastore.", "type": "object", "properties": { "cursor": { "description": "A cursor that points to the position after the result entity.\nSet only when the `EntityResult` is part of a `QueryResultBatch` message.", - "type": "string", - "format": "byte" + "format": "byte", + "type": "string" + }, + "version": { + "description": "The version of the entity, a strictly positive number that monotonically\nincreases with changes to the entity.\n\nThis field is set for `FULL` entity\nresults.\n\nFor missing entities in `LookupResponse`, this\nis the version of the snapshot that was used to look up the entity, and it\nis always set except for eventually consistent reads.", + "format": "int64", + "type": "string" }, "entity": { "description": "The resulting entity.", "$ref": "Entity" - }, - "version": { - "description": "The version of the entity, a strictly positive number that monotonically\nincreases with changes to the entity.\n\nThis field is set for `FULL` entity\nresults.\n\nFor missing entities in `LookupResponse`, this\nis the version of the snapshot that was used to look up the entity, and it\nis always set except for eventually consistent reads.", - "type": "string", - "format": "int64" } }, "id": "EntityResult" }, - "GqlQueryParameter": { - "description": "A binding parameter for a GQL query.", + "Value": { + "description": "A message that can hold any of the supported value types and associated\nmetadata.", "type": "object", "properties": { - "value": { - "description": "A value parameter.", - "$ref": "Value" + "geoPointValue": { + "$ref": "LatLng", + "description": "A geo point value representing a point on the surface of Earth." }, - "cursor": { - "description": "A query cursor. Query cursors are returned in query\nresult batches.", - "type": "string", - "format": "byte" + "keyValue": { + "description": "A key value.", + "$ref": "Key" + }, + "integerValue": { + "description": "An integer value.", + "format": "int64", + "type": "string" + }, + "stringValue": { + "description": "A UTF-8 encoded string value.\nWhen `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.\nOtherwise, may be set to at least 1,000,000 bytes.", + "type": "string" + }, + "excludeFromIndexes": { + "description": "If the value should be excluded from all indexes including those defined\nexplicitly.", + "type": "boolean" + }, + "doubleValue": { + "description": "A double value.", + "format": "double", + "type": "number" + }, + "timestampValue": { + "description": "A timestamp value.\nWhen stored in the Datastore, precise only to microseconds;\nany additional precision is rounded down.", + "format": "google-datetime", + "type": "string" + }, + "nullValue": { + "enumDescriptions": [ + "Null value." + ], + "enum": [ + "NULL_VALUE" + ], + "description": "A null value.", + "type": "string" + }, + "booleanValue": { + "description": "A boolean value.", + "type": "boolean" + }, + "blobValue": { + "description": "A blob value.\nMay have at most 1,000,000 bytes.\nWhen `exclude_from_indexes` is false, may have at most 1500 bytes.\nIn JSON requests, must be base64-encoded.", + "format": "byte", + "type": "string" + }, + "meaning": { + "description": "The `meaning` field should only be populated for backwards compatibility.", + "format": "int32", + "type": "integer" + }, + "arrayValue": { + "description": "An array value.\nCannot contain another array value.\nA `Value` instance that sets field `array_value` must not set fields\n`meaning` or `exclude_from_indexes`.", + "$ref": "ArrayValue" + }, + "entityValue": { + "$ref": "Entity", + "description": "An entity value.\n\n- May have no key.\n- May have a key with an incomplete key path.\n- May have a reserved/read-only key." } }, - "id": "GqlQueryParameter" + "id": "Value" }, - "ArrayValue": { - "description": "An array value.", + "CommitResponse": { + "description": "The response for Datastore.Commit.", "type": "object", "properties": { - "values": { - "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.", + "mutationResults": { + "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.", "type": "array", "items": { - "$ref": "Value" + "$ref": "MutationResult" } - } - }, - "id": "ArrayValue" - }, - "Filter": { - "description": "A holder for any type of filter.", - "type": "object", - "properties": { - "propertyFilter": { - "description": "A filter on a property.", - "$ref": "PropertyFilter" }, - "compositeFilter": { - "description": "A composite filter.", - "$ref": "CompositeFilter" + "indexUpdates": { + "description": "The number of index entries updated during the commit, or zero if none were\nupdated.", + "format": "int32", + "type": "integer" } }, - "id": "Filter" - }, - "BeginTransactionResponse": { - "description": "The response for Datastore.BeginTransaction.", - "type": "object", - "properties": { - "transaction": { - "description": "The transaction identifier (always present).", - "type": "string", - "format": "byte" - } - }, - "id": "BeginTransactionResponse" + "id": "CommitResponse" }, "PartitionId": { "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d\\.\\-_]{1,100}`\nIf the value of any dimension matches regex `__.*__`, the partition is\nreserved/read-only.\nA reserved/read-only partition ID is forbidden in certain documented\ncontexts.\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in an active state.", @@ -508,50 +388,49 @@ }, "id": "PartitionId" }, + "Entity": { + "description": "A Datastore data object.\n\nAn entity is limited to 1 megabyte when stored. That _roughly_\ncorresponds to a limit of 1 megabyte for the serialized form of this\nmessage.", + "type": "object", + "properties": { + "key": { + "$ref": "Key", + "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example,\nan entity in `Value.entity_value` may have no key).\nAn entity's kind is its key path's last element's kind,\nor null if it has no key." + }, + "properties": { + "description": "The entity's properties.\nThe map's keys are property names.\nA property name matching regex `__.*__` is reserved.\nA reserved property name is forbidden in certain documented contexts.\nThe name must not contain more than 500 characters.\nThe name cannot be `\"\"`.", + "type": "object", + "additionalProperties": { + "$ref": "Value" + } + } + }, + "id": "Entity" + }, + "LookupRequest": { + "description": "The request for Datastore.Lookup.", + "type": "object", + "properties": { + "readOptions": { + "$ref": "ReadOptions", + "description": "The options for this lookup request." + }, + "keys": { + "description": "Keys of entities to look up.", + "type": "array", + "items": { + "$ref": "Key" + } + } + }, + "id": "LookupRequest" + }, "QueryResultBatch": { "description": "A batch of results produced by a query.", "type": "object", "properties": { - "snapshotVersion": { - "description": "The version number of the snapshot this batch was returned from.\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\n\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.\nThe value will be zero for eventually consistent queries.", - "type": "string", - "format": "int64" - }, - "endCursor": { - "description": "A cursor that points to the position after the last result in the batch.", - "type": "string", - "format": "byte" - }, - "skippedCursor": { - "description": "A cursor that points to the position after the last skipped result.\nWill be set when `skipped_results` != 0.", - "type": "string", - "format": "byte" - }, - "entityResultType": { - "description": "The result type for every entity in `entity_results`.", - "enum": [ - "RESULT_TYPE_UNSPECIFIED", - "FULL", - "PROJECTION", - "KEY_ONLY" - ], - "enumDescriptions": [ - "Unspecified. This value is never used.", - "The key and properties.", - "A projected subset of properties. The entity may have no key.", - "Only the key." - ], - "type": "string" - }, "moreResults": { "description": "The state of the query after the current batch.", - "enum": [ - "MORE_RESULTS_TYPE_UNSPECIFIED", - "NOT_FINISHED", - "MORE_RESULTS_AFTER_LIMIT", - "MORE_RESULTS_AFTER_CURSOR", - "NO_MORE_RESULTS" - ], + "type": "string", "enumDescriptions": [ "Unspecified. This value is never used.", "There may be additional batches to fetch from this query.", @@ -559,23 +438,108 @@ "The query is finished, but there may be more results after the end\ncursor.", "The query has been exhausted." ], + "enum": [ + "MORE_RESULTS_TYPE_UNSPECIFIED", + "NOT_FINISHED", + "MORE_RESULTS_AFTER_LIMIT", + "MORE_RESULTS_AFTER_CURSOR", + "NO_MORE_RESULTS" + ] + }, + "endCursor": { + "description": "A cursor that points to the position after the last result in the batch.", + "format": "byte", "type": "string" }, + "snapshotVersion": { + "description": "The version number of the snapshot this batch was returned from.\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\n\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.\nThe value will be zero for eventually consistent queries.", + "format": "int64", + "type": "string" + }, + "skippedCursor": { + "description": "A cursor that points to the position after the last skipped result.\nWill be set when `skipped_results` != 0.", + "format": "byte", + "type": "string" + }, + "skippedResults": { + "description": "The number of results skipped, typically because of an offset.", + "format": "int32", + "type": "integer" + }, + "entityResultType": { + "description": "The result type for every entity in `entity_results`.", + "type": "string", + "enumDescriptions": [ + "Unspecified. This value is never used.", + "The key and properties.", + "A projected subset of properties. The entity may have no key.", + "Only the key." + ], + "enum": [ + "RESULT_TYPE_UNSPECIFIED", + "FULL", + "PROJECTION", + "KEY_ONLY" + ] + }, "entityResults": { "description": "The results for this batch.", "type": "array", "items": { "$ref": "EntityResult" } - }, - "skippedResults": { - "description": "The number of results skipped, typically because of an offset.", - "type": "integer", - "format": "int32" } }, "id": "QueryResultBatch" }, + "PathElement": { + "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", + "type": "object", + "properties": { + "name": { + "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", + "type": "string" + }, + "kind": { + "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", + "type": "string" + }, + "id": { + "description": "The auto-allocated ID of the entity.\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.", + "format": "int64", + "type": "string" + } + }, + "id": "PathElement" + }, + "GqlQueryParameter": { + "description": "A binding parameter for a GQL query.", + "type": "object", + "properties": { + "cursor": { + "description": "A query cursor. Query cursors are returned in query\nresult batches.", + "format": "byte", + "type": "string" + }, + "value": { + "description": "A value parameter.", + "$ref": "Value" + } + }, + "id": "GqlQueryParameter" + }, + "BeginTransactionResponse": { + "description": "The response for Datastore.BeginTransaction.", + "type": "object", + "properties": { + "transaction": { + "description": "The transaction identifier (always present).", + "format": "byte", + "type": "string" + } + }, + "id": "BeginTransactionResponse" + }, "AllocateIdsRequest": { "description": "The request for Datastore.AllocateIds.", "type": "object", @@ -590,6 +554,113 @@ }, "id": "AllocateIdsRequest" }, + "LookupResponse": { + "description": "The response for Datastore.Lookup.", + "type": "object", + "properties": { + "deferred": { + "description": "A list of keys that were not looked up due to resource constraints. The\norder of results in this field is undefined and has no relation to the\norder of the keys in the input.", + "type": "array", + "items": { + "$ref": "Key" + } + }, + "found": { + "description": "Entities found as `ResultType.FULL` entities. The order of results in this\nfield is undefined and has no relation to the order of the keys in the\ninput.", + "type": "array", + "items": { + "$ref": "EntityResult" + } + }, + "missing": { + "description": "Entities not found as `ResultType.KEY_ONLY` entities. The order of results\nin this field is undefined and has no relation to the order of the keys\nin the input.", + "type": "array", + "items": { + "$ref": "EntityResult" + } + } + }, + "id": "LookupResponse" + }, + "RunQueryResponse": { + "description": "The response for Datastore.RunQuery.", + "type": "object", + "properties": { + "query": { + "$ref": "Query", + "description": "The parsed form of the `GqlQuery` from the request, if it was set." + }, + "batch": { + "description": "A batch of query results (always present).", + "$ref": "QueryResultBatch" + } + }, + "id": "RunQueryResponse" + }, + "PropertyOrder": { + "description": "The desired order for a specific property.", + "type": "object", + "properties": { + "property": { + "$ref": "PropertyReference", + "description": "The property to order by." + }, + "direction": { + "description": "The direction to order by. Defaults to `ASCENDING`.", + "type": "string", + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Ascending.", + "Descending." + ], + "enum": [ + "DIRECTION_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ] + } + }, + "id": "PropertyOrder" + }, + "BeginTransactionRequest": { + "description": "The request for Datastore.BeginTransaction.", + "type": "object", + "properties": {}, + "id": "BeginTransactionRequest" + }, + "CommitRequest": { + "description": "The request for Datastore.Commit.", + "type": "object", + "properties": { + "mode": { + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Transactional: The mutations are either all applied, or none are applied.\nLearn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).", + "Non-transactional: The mutations may not apply as all or none." + ], + "enum": [ + "MODE_UNSPECIFIED", + "TRANSACTIONAL", + "NON_TRANSACTIONAL" + ], + "description": "The type of commit to perform. Defaults to `TRANSACTIONAL`.", + "type": "string" + }, + "mutations": { + "description": "The mutations to perform.\n\nWhen mode is `TRANSACTIONAL`, mutations affecting a single entity are\napplied in order. The following sequences of mutations affecting a single\nentity are not permitted in a single `Commit` request:\n\n- `insert` followed by `insert`\n- `update` followed by `insert`\n- `upsert` followed by `insert`\n- `delete` followed by `update`\n\nWhen mode is `NON_TRANSACTIONAL`, no two mutations may affect a single\nentity.", + "type": "array", + "items": { + "$ref": "Mutation" + } + }, + "transaction": { + "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", + "format": "byte", + "type": "string" + } + }, + "id": "CommitRequest" + }, "KindExpression": { "description": "A representation of a kind.", "type": "object", @@ -601,91 +672,137 @@ }, "id": "KindExpression" }, - "PropertyFilter": { - "description": "A filter on a specific property.", + "LatLng": { + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)\n\nThe code in logs/storage/validator/logs_validator_traits.cc treats this type\nas if it were annotated as ST_LOCATION.", "type": "object", "properties": { - "value": { - "description": "The value to compare the property to.", - "$ref": "Value" + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" }, - "op": { - "description": "The operator to filter by.", - "enum": [ - "OPERATOR_UNSPECIFIED", - "LESS_THAN", - "LESS_THAN_OR_EQUAL", - "GREATER_THAN", - "GREATER_THAN_OR_EQUAL", - "EQUAL", - "HAS_ANCESTOR" - ], - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Less than.", - "Less than or equal.", - "Greater than.", - "Greater than or equal.", - "Equal.", - "Has ancestor." - ], - "type": "string" - }, - "property": { - "description": "The property to filter by.", - "$ref": "PropertyReference" + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "type": "number" } }, - "id": "PropertyFilter" + "id": "LatLng" }, - "PathElement": { - "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", + "Key": { + "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", "type": "object", "properties": { - "kind": { - "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", - "type": "string" + "path": { + "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nAn entity path is always fully complete: *all* of the entity's ancestors\nare required to be in the path along with the entity identifier itself.\nThe only exception is that in some documented cases, the identifier in the\nlast path element (for the entity) itself may be omitted. For example,\nthe last path element of the key of `Mutation.insert` may have no\nidentifier.\n\nA path can never be empty, and a path can have at most 100 elements.", + "type": "array", + "items": { + "$ref": "PathElement" + } }, - "id": { - "description": "The auto-allocated ID of the entity.\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.", - "type": "string", - "format": "int64" - }, - "name": { - "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", - "type": "string" + "partitionId": { + "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition.", + "$ref": "PartitionId" } }, - "id": "PathElement" - }, - "RollbackResponse": { - "description": "The response for Datastore.Rollback.\n(an empty message).", - "type": "object", - "properties": {}, - "id": "RollbackResponse" + "id": "Key" }, "PropertyReference": { - "description": "A reference to a property relative to the kind expressions.", - "type": "object", "properties": { "name": { "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path.", "type": "string" } }, - "id": "PropertyReference" + "id": "PropertyReference", + "description": "A reference to a property relative to the kind expressions.", + "type": "object" + }, + "ArrayValue": { + "properties": { + "values": { + "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.", + "type": "array", + "items": { + "$ref": "Value" + } + } + }, + "id": "ArrayValue", + "description": "An array value.", + "type": "object" }, "Projection": { "description": "A representation of a property in a projection.", "type": "object", "properties": { "property": { - "description": "The property to project.", - "$ref": "PropertyReference" + "$ref": "PropertyReference", + "description": "The property to project." } }, "id": "Projection" }, + "Mutation": { + "properties": { + "insert": { + "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete.", + "$ref": "Entity" + }, + "baseVersion": { + "description": "The version of the entity that this mutation is being applied to. If this\ndoes not match the current version on the server, the mutation conflicts.", + "format": "int64", + "type": "string" + }, + "update": { + "$ref": "Entity", + "description": "The entity to update. The entity must already exist.\nMust have a complete key path." + }, + "upsert": { + "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete.", + "$ref": "Entity" + }, + "delete": { + "$ref": "Key", + "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only." + } + }, + "id": "Mutation", + "description": "A mutation to apply to an entity.", + "type": "object" + }, + "ReadOptions": { + "description": "The options shared by read requests.", + "type": "object", + "properties": { + "readConsistency": { + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Strong consistency.", + "Eventual consistency." + ], + "enum": [ + "READ_CONSISTENCY_UNSPECIFIED", + "STRONG", + "EVENTUAL" + ], + "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.", + "type": "string" + }, + "transaction": { + "description": "The identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", + "format": "byte", + "type": "string" + } + }, + "id": "ReadOptions" + }, + "RollbackResponse": { + "description": "The response for Datastore.Rollback.\n(an empty message).", + "type": "object", + "properties": {}, + "id": "RollbackResponse" + }, "MutationResult": { "description": "The result of applying a mutation.", "type": "object", @@ -700,12 +817,117 @@ }, "version": { "description": "The version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.", - "type": "string", - "format": "int64" + "format": "int64", + "type": "string" } }, "id": "MutationResult" }, + "GqlQuery": { + "description": "A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", + "type": "object", + "properties": { + "queryString": { + "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", + "type": "string" + }, + "allowLiterals": { + "description": "When false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.", + "type": "boolean" + }, + "namedBindings": { + "additionalProperties": { + "$ref": "GqlQueryParameter" + }, + "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.", + "type": "object" + }, + "positionalBindings": { + "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true.", + "type": "array", + "items": { + "$ref": "GqlQueryParameter" + } + } + }, + "id": "GqlQuery" + }, + "Filter": { + "properties": { + "compositeFilter": { + "description": "A composite filter.", + "$ref": "CompositeFilter" + }, + "propertyFilter": { + "description": "A filter on a property.", + "$ref": "PropertyFilter" + } + }, + "id": "Filter", + "description": "A holder for any type of filter.", + "type": "object" + }, + "RollbackRequest": { + "properties": { + "transaction": { + "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.", + "format": "byte", + "type": "string" + } + }, + "id": "RollbackRequest", + "description": "The request for Datastore.Rollback.", + "type": "object" + }, + "RunQueryRequest": { + "description": "The request for Datastore.RunQuery.", + "type": "object", + "properties": { + "partitionId": { + "$ref": "PartitionId", + "description": "Entities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID." + }, + "gqlQuery": { + "$ref": "GqlQuery", + "description": "The GQL query to run." + }, + "readOptions": { + "description": "The options for this query.", + "$ref": "ReadOptions" + }, + "query": { + "$ref": "Query", + "description": "The query to run." + } + }, + "id": "RunQueryRequest" + }, + "CompositeFilter": { + "description": "A filter that merges multiple other filters using the given operator.", + "type": "object", + "properties": { + "op": { + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "The results are required to satisfy each of the combined filters." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "AND" + ], + "description": "The operator for combining multiple filters.", + "type": "string" + }, + "filters": { + "description": "The list of filters to combine.\nMust contain at least one filter.", + "type": "array", + "items": { + "$ref": "Filter" + } + } + }, + "id": "CompositeFilter" + }, "AllocateIdsResponse": { "description": "The response for Datastore.AllocateIds.", "type": "object", @@ -720,356 +942,134 @@ }, "id": "AllocateIdsResponse" }, - "LookupResponse": { - "description": "The response for Datastore.Lookup.", + "Query": { + "description": "A query for entities.", "type": "object", "properties": { - "found": { - "description": "Entities found as `ResultType.FULL` entities. The order of results in this\nfield is undefined and has no relation to the order of the keys in the\ninput.", + "projection": { + "description": "The projection to return. Defaults to returning all properties.", "type": "array", "items": { - "$ref": "EntityResult" + "$ref": "Projection" } }, - "missing": { - "description": "Entities not found as `ResultType.KEY_ONLY` entities. The order of results\nin this field is undefined and has no relation to the order of the keys\nin the input.", - "type": "array", - "items": { - "$ref": "EntityResult" - } - }, - "deferred": { - "description": "A list of keys that were not looked up due to resource constraints. The\norder of results in this field is undefined and has no relation to the\norder of the keys in the input.", - "type": "array", - "items": { - "$ref": "Key" - } - } - }, - "id": "LookupResponse" - }, - "BeginTransactionRequest": { - "description": "The request for Datastore.BeginTransaction.", - "type": "object", - "properties": {}, - "id": "BeginTransactionRequest" - }, - "Key": { - "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", - "type": "object", - "properties": { - "partitionId": { - "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition.", - "$ref": "PartitionId" - }, - "path": { - "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nAn entity path is always fully complete: *all* of the entity's ancestors\nare required to be in the path along with the entity identifier itself.\nThe only exception is that in some documented cases, the identifier in the\nlast path element (for the entity) itself may be omitted. For example,\nthe last path element of the key of `Mutation.insert` may have no\nidentifier.\n\nA path can never be empty, and a path can have at most 100 elements.", - "type": "array", - "items": { - "$ref": "PathElement" - } - } - }, - "id": "Key" - }, - "RunQueryResponse": { - "description": "The response for Datastore.RunQuery.", - "type": "object", - "properties": { - "batch": { - "description": "A batch of query results (always present).", - "$ref": "QueryResultBatch" - }, - "query": { - "description": "The parsed form of the `GqlQuery` from the request, if it was set.", - "$ref": "Query" - } - }, - "id": "RunQueryResponse" - }, - "Entity": { - "description": "A Datastore data object.\n\nAn entity is limited to 1 megabyte when stored. That _roughly_\ncorresponds to a limit of 1 megabyte for the serialized form of this\nmessage.", - "type": "object", - "properties": { - "properties": { - "description": "The entity's properties.\nThe map's keys are property names.\nA property name matching regex `__.*__` is reserved.\nA reserved property name is forbidden in certain documented contexts.\nThe name must not contain more than 500 characters.\nThe name cannot be `\"\"`.", - "additionalProperties": { - "$ref": "Value" - }, - "type": "object" - }, - "key": { - "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example,\nan entity in `Value.entity_value` may have no key).\nAn entity's kind is its key path's last element's kind,\nor null if it has no key.", - "$ref": "Key" - } - }, - "id": "Entity" - }, - "GqlQuery": { - "description": "A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", - "type": "object", - "properties": { - "queryString": { - "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", + "endCursor": { + "description": "An ending point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", + "format": "byte", "type": "string" }, - "namedBindings": { - "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.", - "additionalProperties": { - "$ref": "GqlQueryParameter" - }, - "type": "object" + "limit": { + "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.", + "format": "int32", + "type": "integer" }, - "allowLiterals": { - "description": "When false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.", - "type": "boolean" + "filter": { + "description": "The filter to apply.", + "$ref": "Filter" }, - "positionalBindings": { - "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true.", + "offset": { + "description": "The number of results to skip. Applies before limit, but after all other\nconstraints. Optional. Must be \u003e= 0 if specified.", + "format": "int32", + "type": "integer" + }, + "startCursor": { + "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", + "format": "byte", + "type": "string" + }, + "kind": { + "description": "The kinds to query (if empty, returns entities of all kinds).\nCurrently at most 1 kind may be specified.", "type": "array", "items": { - "$ref": "GqlQueryParameter" + "$ref": "KindExpression" + } + }, + "distinctOn": { + "description": "The properties to make distinct. The query results will contain the first\nresult for each distinct combination of values for the given properties\n(if empty, all results are returned).", + "type": "array", + "items": { + "$ref": "PropertyReference" + } + }, + "order": { + "description": "The order to apply to the query results (if empty, order is unspecified).", + "type": "array", + "items": { + "$ref": "PropertyOrder" } } }, - "id": "GqlQuery" + "id": "Query" }, - "Mutation": { - "description": "A mutation to apply to an entity.", + "PropertyFilter": { + "description": "A filter on a specific property.", "type": "object", "properties": { - "insert": { - "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete.", - "$ref": "Entity" + "property": { + "description": "The property to filter by.", + "$ref": "PropertyReference" }, - "update": { - "description": "The entity to update. The entity must already exist.\nMust have a complete key path.", - "$ref": "Entity" - }, - "baseVersion": { - "description": "The version of the entity that this mutation is being applied to. If this\ndoes not match the current version on the server, the mutation conflicts.", - "type": "string", - "format": "int64" - }, - "upsert": { - "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete.", - "$ref": "Entity" - }, - "delete": { - "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only.", - "$ref": "Key" - } - }, - "id": "Mutation" - }, - "CommitResponse": { - "description": "The response for Datastore.Commit.", - "type": "object", - "properties": { - "mutationResults": { - "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.", - "type": "array", - "items": { - "$ref": "MutationResult" - } - }, - "indexUpdates": { - "description": "The number of index entries updated during the commit, or zero if none were\nupdated.", - "type": "integer", - "format": "int32" - } - }, - "id": "CommitResponse" - }, - "RunQueryRequest": { - "description": "The request for Datastore.RunQuery.", - "type": "object", - "properties": { - "partitionId": { - "description": "Entities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID.", - "$ref": "PartitionId" - }, - "gqlQuery": { - "description": "The GQL query to run.", - "$ref": "GqlQuery" - }, - "readOptions": { - "description": "The options for this query.", - "$ref": "ReadOptions" - }, - "query": { - "description": "The query to run.", - "$ref": "Query" - } - }, - "id": "RunQueryRequest" - }, - "LookupRequest": { - "description": "The request for Datastore.Lookup.", - "type": "object", - "properties": { - "readOptions": { - "description": "The options for this lookup request.", - "$ref": "ReadOptions" - }, - "keys": { - "description": "Keys of entities to look up.", - "type": "array", - "items": { - "$ref": "Key" - } - } - }, - "id": "LookupRequest" - }, - "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "type": "object", - "properties": { - "latitude": { - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "type": "number", - "format": "double" - }, - "longitude": { - "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", - "type": "number", - "format": "double" - } - }, - "id": "LatLng" - }, - "CompositeFilter": { - "description": "A filter that merges multiple other filters using the given operator.", - "type": "object", - "properties": { "op": { - "description": "The operator for combining multiple filters.", - "enum": [ - "OPERATOR_UNSPECIFIED", - "AND" - ], "enumDescriptions": [ "Unspecified. This value must not be used.", - "The results are required to satisfy each of the combined filters." + "Less than.", + "Less than or equal.", + "Greater than.", + "Greater than or equal.", + "Equal.", + "Has ancestor." ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "LESS_THAN", + "LESS_THAN_OR_EQUAL", + "GREATER_THAN", + "GREATER_THAN_OR_EQUAL", + "EQUAL", + "HAS_ANCESTOR" + ], + "description": "The operator to filter by.", "type": "string" }, - "filters": { - "description": "The list of filters to combine.\nMust contain at least one filter.", - "type": "array", - "items": { - "$ref": "Filter" - } + "value": { + "description": "The value to compare the property to.", + "$ref": "Value" } }, - "id": "CompositeFilter" + "id": "PropertyFilter" } }, - "revision": "20161108", - "basePath": "", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version_module": "True", - "discoveryVersion": "v1", + "protocol": "rest", + "version": "v1", "baseUrl": "https://datastore.googleapis.com/", - "name": "datastore", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/datastore": { + "description": "View and manage your Google Cloud Datastore data" + } + } } }, - "documentationLink": "https://cloud.google.com/datastore/", - "ownerDomain": "google.com", - "batchPath": "batch", + "kind": "discovery#restDescription", + "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.\n", "servicePath": "", - "ownerName": "Google", - "version": "v1", "rootUrl": "https://datastore.googleapis.com/", - "kind": "discovery#restDescription" + "basePath": "", + "ownerDomain": "google.com", + "name": "datastore", + "batchPath": "batch", + "revision": "20170509", + "documentationLink": "https://cloud.google.com/datastore/", + "id": "datastore:v1", + "title": "Google Cloud Datastore API", + "discoveryVersion": "v1", + "ownerName": "Google" } diff --git a/etc/api/datastore/v1beta1/datastore-api.json b/etc/api/datastore/v1beta1/datastore-api.json index 92b2eb4952..e69de29bb2 100644 --- a/etc/api/datastore/v1beta1/datastore-api.json +++ b/etc/api/datastore/v1beta1/datastore-api.json @@ -1,988 +0,0 @@ -{ - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/exiNwA5EYULji4urf-Hcdv-K2mE\"", - "discoveryVersion": "v1", - "id": "datastore:v1beta1", - "name": "datastore", - "version": "v1beta1", - "revision": "20160314", - "title": "Google Cloud Datastore API", - "description": "Stores and queries data in Google Cloud Datastore.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "https://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/datastore/", - "protocol": "rest", - "baseUrl": "https://www.googleapis.com/datastore/v1beta1/datasets/", - "basePath": "/datastore/v1beta1/datasets/", - "rootUrl": "https://www.googleapis.com/", - "servicePath": "datastore/v1beta1/datasets/", - "batchPath": "batch", - "parameters": { - "alt": { - "type": "string", - "description": "Data format for the response.", - "default": "proto", - "enum": [ - "json", - "proto" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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. Overrides userIp if both are provided.", - "location": "query" - }, - "userIp": { - "type": "string", - "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/datastore": { - "description": "View and manage your Google Cloud Datastore data" - }, - "https://www.googleapis.com/auth/userinfo.email": { - "description": "View your email address" - } - } - } - }, - "schemas": { - "AllocateIdsRequest": { - "id": "AllocateIdsRequest", - "type": "object", - "properties": { - "keys": { - "type": "array", - "description": "A list of keys with incomplete key paths to allocate IDs for. No key may be reserved/read-only.", - "items": { - "$ref": "Key" - } - } - } - }, - "AllocateIdsResponse": { - "id": "AllocateIdsResponse", - "type": "object", - "properties": { - "header": { - "$ref": "ResponseHeader" - }, - "keys": { - "type": "array", - "description": "The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID.", - "items": { - "$ref": "Key" - } - } - } - }, - "BeginTransactionRequest": { - "id": "BeginTransactionRequest", - "type": "object", - "properties": { - "isolationLevel": { - "type": "string", - "description": "The transaction isolation level. Either snapshot or serializable. The default isolation level is snapshot isolation, which means that another transaction may not concurrently modify the data that is modified by this transaction. Optionally, a transaction can request to be made serializable which means that another transaction cannot concurrently modify the data that is read or modified by this transaction." - } - } - }, - "BeginTransactionResponse": { - "id": "BeginTransactionResponse", - "type": "object", - "properties": { - "header": { - "$ref": "ResponseHeader" - }, - "transaction": { - "type": "string", - "description": "The transaction identifier (always present).", - "format": "byte" - } - } - }, - "BlindWriteRequest": { - "id": "BlindWriteRequest", - "type": "object", - "properties": { - "mutation": { - "$ref": "Mutation", - "description": "The mutation to perform." - } - } - }, - "BlindWriteResponse": { - "id": "BlindWriteResponse", - "type": "object", - "properties": { - "header": { - "$ref": "ResponseHeader" - }, - "mutationResult": { - "$ref": "MutationResult", - "description": "The result of performing the mutation (always present)." - } - } - }, - "CommitRequest": { - "id": "CommitRequest", - "type": "object", - "properties": { - "ignoreReadOnly": { - "type": "boolean" - }, - "mutation": { - "$ref": "Mutation", - "description": "The mutation to perform. Optional." - }, - "transaction": { - "type": "string", - "description": "The transaction identifier, returned by a call to beginTransaction. Must be set when mode is TRANSACTIONAL.", - "format": "byte" - } - } - }, - "CommitResponse": { - "id": "CommitResponse", - "type": "object", - "properties": { - "header": { - "$ref": "ResponseHeader" - }, - "mutationResult": { - "$ref": "MutationResult", - "description": "The result of performing the mutation (if any)." - } - } - }, - "CompositeFilter": { - "id": "CompositeFilter", - "type": "object", - "description": "A filter that merges the multiple other filters using the given operation.", - "properties": { - "filters": { - "type": "array", - "description": "The list of filters to combine. Must contain at least one filter.", - "items": { - "$ref": "Filter" - } - }, - "operator": { - "type": "string", - "description": "The operator for combining multiple filters. Only \"and\" is currently supported." - } - } - }, - "Entity": { - "id": "Entity", - "type": "object", - "description": "An entity.", - "properties": { - "key": { - "$ref": "Key", - "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key." - }, - "properties": { - "type": "object", - "description": "The entity's properties.", - "additionalProperties": { - "$ref": "Property", - "description": "The name of the property. A property name matching regex \"__.*__\" is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. Cannot be \"\"." - } - } - } - }, - "EntityResult": { - "id": "EntityResult", - "type": "object", - "description": "The result of fetching an entity from the datastore.", - "properties": { - "entity": { - "$ref": "Entity", - "description": "The resulting entity." - } - } - }, - "Filter": { - "id": "Filter", - "type": "object", - "description": "A holder for any type of filter. Exactly one field should be specified.", - "properties": { - "compositeFilter": { - "$ref": "CompositeFilter", - "description": "A composite filter." - }, - "propertyFilter": { - "$ref": "PropertyFilter", - "description": "A filter on a property." - } - } - }, - "GqlQuery": { - "id": "GqlQuery", - "type": "object", - "description": "A GQL query.", - "properties": { - "allowLiteral": { - "type": "boolean", - "description": "When false, the query string must not contain a literal." - }, - "nameArgs": { - "type": "array", - "description": "A named argument must set field GqlQueryArg.name. No two named arguments may have the same name. For each non-reserved named binding site in the query string, there must be a named argument with that name, but not necessarily the inverse.", - "items": { - "$ref": "GqlQueryArg" - } - }, - "numberArgs": { - "type": "array", - "description": "Numbered binding site @1 references the first numbered argument, effectively using 1-based indexing, rather than the usual 0. A numbered argument must NOT set field GqlQueryArg.name. For each binding site numbered i in query_string, there must be an ith numbered argument. The inverse must also be true.", - "items": { - "$ref": "GqlQueryArg" - } - }, - "queryString": { - "type": "string", - "description": "The query string." - } - } - }, - "GqlQueryArg": { - "id": "GqlQueryArg", - "type": "object", - "description": "A binding argument for a GQL query.", - "properties": { - "cursor": { - "type": "string", - "format": "byte" - }, - "name": { - "type": "string", - "description": "Must match regex \"[A-Za-z_$][A-Za-z_$0-9]*\". Must not match regex \"__.*__\". Must not be \"\"." - }, - "value": { - "$ref": "Value" - } - } - }, - "Key": { - "id": "Key", - "type": "object", - "description": "A unique identifier for an entity.", - "properties": { - "partitionId": { - "$ref": "PartitionId", - "description": "Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition." - }, - "path": { - "type": "array", - "description": "The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors. An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty. The path can have at most 100 elements.", - "items": { - "$ref": "KeyPathElement" - } - } - } - }, - "KeyPathElement": { - "id": "KeyPathElement", - "type": "object", - "description": "A (kind, ID/name) pair used to construct a key path.\n\nAt most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.", - "properties": { - "id": { - "type": "string", - "description": "The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.", - "format": "int64" - }, - "kind": { - "type": "string", - "description": "The kind of the entity. A kind matching regex \"__.*__\" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be \"\"." - }, - "name": { - "type": "string", - "description": "The name of the entity. A name matching regex \"__.*__\" is reserved/read-only. A name must not be more than 500 characters. Cannot be \"\"." - } - } - }, - "KindExpression": { - "id": "KindExpression", - "type": "object", - "description": "A representation of a kind.", - "properties": { - "name": { - "type": "string", - "description": "The name of the kind." - } - } - }, - "LookupRequest": { - "id": "LookupRequest", - "type": "object", - "properties": { - "keys": { - "type": "array", - "description": "Keys of entities to look up from the datastore.", - "items": { - "$ref": "Key" - } - }, - "readOptions": { - "$ref": "ReadOptions", - "description": "Options for this lookup request. Optional." - } - } - }, - "LookupResponse": { - "id": "LookupResponse", - "type": "object", - "properties": { - "deferred": { - "type": "array", - "description": "A list of keys that were not looked up due to resource constraints.", - "items": { - "$ref": "Key" - } - }, - "found": { - "type": "array", - "description": "Entities found.", - "items": { - "$ref": "EntityResult" - } - }, - "header": { - "$ref": "ResponseHeader" - }, - "missing": { - "type": "array", - "description": "Entities not found, with only the key populated.", - "items": { - "$ref": "EntityResult" - } - } - } - }, - "Mutation": { - "id": "Mutation", - "type": "object", - "description": "A set of changes to apply.", - "properties": { - "delete": { - "type": "array", - "description": "Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only.", - "items": { - "$ref": "Key" - } - }, - "force": { - "type": "boolean", - "description": "Ignore a user specified read-only period. Optional." - }, - "insert": { - "type": "array", - "description": "Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only.", - "items": { - "$ref": "Entity" - } - }, - "insertAutoId": { - "type": "array", - "description": "Insert entities with a newly allocated ID. Each inserted entity's key must omit the final identifier in its path and must not be reserved/read-only.", - "items": { - "$ref": "Entity" - } - }, - "update": { - "type": "array", - "description": "Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only.", - "items": { - "$ref": "Entity" - } - }, - "upsert": { - "type": "array", - "description": "Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only.", - "items": { - "$ref": "Entity" - } - } - } - }, - "MutationResult": { - "id": "MutationResult", - "type": "object", - "properties": { - "indexUpdates": { - "type": "integer", - "description": "Number of index writes.", - "format": "int32" - }, - "insertAutoIdKeys": { - "type": "array", - "description": "Keys for insertAutoId entities. One per entity from the request, in the same order.", - "items": { - "$ref": "Key" - } - } - } - }, - "PartitionId": { - "id": "PartitionId", - "type": "object", - "description": "An identifier for a particular subset of entities.\n\nEntities are partitioned into various subsets, each used by different datasets and different namespaces within a dataset and so forth.", - "properties": { - "datasetId": { - "type": "string", - "description": "The dataset ID." - }, - "namespace": { - "type": "string", - "description": "The namespace." - } - } - }, - "Property": { - "id": "Property", - "type": "object", - "description": "An entity property.", - "properties": { - "multi": { - "type": "boolean", - "description": "If this property contains a list of values. Input values may explicitly set multi to false, but otherwise false is always represented by omitting multi." - }, - "values": { - "type": "array", - "description": "The value(s) of the property. When multi is false there is always exactly one value. When multi is true there are always one or more values. Each value can have only one value property populated. For example, you cannot have a values list of { values: [ { integerValue: 22, stringValue: \"a\" } ] }, but you can have { multi: true, values: [ { integerValue: 22 }, { stringValue: \"a\" } ] }.", - "items": { - "$ref": "Value" - } - } - } - }, - "PropertyExpression": { - "id": "PropertyExpression", - "type": "object", - "description": "A representation of a property in a projection.", - "properties": { - "aggregationFunction": { - "type": "string", - "description": "The aggregation function to apply to the property. Optional. Can only be used when grouping by at least one property. Must then be set on all properties in the projection that are not being grouped by. Aggregation functions: first selects the first result as determined by the query's order." - }, - "property": { - "$ref": "PropertyReference", - "description": "The property to project." - } - } - }, - "PropertyFilter": { - "id": "PropertyFilter", - "type": "object", - "description": "A filter on a specific property.", - "properties": { - "operator": { - "type": "string", - "description": "The operator to filter by. One of lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual, equal, or hasAncestor." - }, - "property": { - "$ref": "PropertyReference", - "description": "The property to filter by." - }, - "value": { - "$ref": "Value", - "description": "The value to compare the property to." - } - } - }, - "PropertyOrder": { - "id": "PropertyOrder", - "type": "object", - "description": "The desired order for a specific property.", - "properties": { - "direction": { - "type": "string", - "description": "The direction to order by. One of ascending or descending. Optional, defaults to ascending." - }, - "property": { - "$ref": "PropertyReference", - "description": "The property to order by." - } - } - }, - "PropertyReference": { - "id": "PropertyReference", - "type": "object", - "description": "A reference to a property relative to the kind expressions.", - "properties": { - "name": { - "type": "string", - "description": "The name of the property." - } - } - }, - "Query": { - "id": "Query", - "type": "object", - "description": "A query.", - "properties": { - "endCursor": { - "type": "string", - "description": "An ending point for the query results. Optional. Query cursors are returned in query result batches.", - "format": "byte" - }, - "filter": { - "$ref": "Filter", - "description": "The filter to apply (optional)." - }, - "groupBy": { - "type": "array", - "description": "The properties to group by (if empty, no grouping is applied to the result set).", - "items": { - "$ref": "PropertyReference" - } - }, - "kinds": { - "type": "array", - "description": "The kinds to query (if empty, returns entities from all kinds).", - "items": { - "$ref": "KindExpression" - } - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return. Applies after all other constraints. Optional.", - "format": "int32" - }, - "offset": { - "type": "integer", - "description": "The number of results to skip. Applies before limit, but after all other constraints (optional, defaults to 0).", - "format": "int32" - }, - "order": { - "type": "array", - "description": "The order to apply to the query results (if empty, order is unspecified).", - "items": { - "$ref": "PropertyOrder" - } - }, - "projection": { - "type": "array", - "description": "The projection to return. If not set the entire entity is returned.", - "items": { - "$ref": "PropertyExpression" - } - }, - "startCursor": { - "type": "string", - "description": "A starting point for the query results. Optional. Query cursors are returned in query result batches.", - "format": "byte" - } - } - }, - "QueryResultBatch": { - "id": "QueryResultBatch", - "type": "object", - "description": "A batch of results produced by a query.", - "properties": { - "endCursor": { - "type": "string", - "description": "A cursor that points to the position after the last result in the batch. May be absent. TODO(arfuller): Once all plans produce cursors update documentation here.", - "format": "byte" - }, - "entityResultType": { - "type": "string", - "description": "The result type for every entity in entityResults. full for full entities, projection for entities with only projected properties, keyOnly for entities with only a key." - }, - "entityResults": { - "type": "array", - "description": "The results for this batch.", - "items": { - "$ref": "EntityResult" - } - }, - "moreResults": { - "type": "string", - "description": "The state of the query after the current batch. One of notFinished, moreResultsAfterLimit, noMoreResults." - }, - "skippedResults": { - "type": "integer", - "description": "The number of results skipped because of Query.offset.", - "format": "int32" - } - } - }, - "ReadOptions": { - "id": "ReadOptions", - "type": "object", - "properties": { - "readConsistency": { - "type": "string", - "description": "The read consistency to use. One of default, strong, or eventual. Cannot be set when transaction is set. Lookup and ancestor queries default to strong, global queries default to eventual and cannot be set to strong. Optional. Default is default." - }, - "transaction": { - "type": "string", - "description": "The transaction to use. Optional.", - "format": "byte" - } - } - }, - "ResponseHeader": { - "id": "ResponseHeader", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"datastore#responseHeader\".", - "default": "datastore#responseHeader" - } - } - }, - "RollbackRequest": { - "id": "RollbackRequest", - "type": "object", - "properties": { - "transaction": { - "type": "string", - "description": "The transaction identifier, returned by a call to beginTransaction.", - "format": "byte" - } - } - }, - "RollbackResponse": { - "id": "RollbackResponse", - "type": "object", - "properties": { - "header": { - "$ref": "ResponseHeader" - } - } - }, - "RunQueryRequest": { - "id": "RunQueryRequest", - "type": "object", - "properties": { - "gqlQuery": { - "$ref": "GqlQuery", - "description": "The GQL query to run. Either this field or field query must be set, but not both." - }, - "partitionId": { - "$ref": "PartitionId", - "description": "Entities are partitioned into subsets, identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID, but all other partition IDs in RunQueryRequest are normalized with this partition ID as the context partition ID." - }, - "query": { - "$ref": "Query", - "description": "The query to run. Either this field or field gql_query must be set, but not both." - }, - "readOptions": { - "$ref": "ReadOptions", - "description": "The options for this query." - } - } - }, - "RunQueryResponse": { - "id": "RunQueryResponse", - "type": "object", - "properties": { - "batch": { - "$ref": "QueryResultBatch", - "description": "A batch of query results (always present)." - }, - "header": { - "$ref": "ResponseHeader" - } - } - }, - "Value": { - "id": "Value", - "type": "object", - "description": "A message that can hold any of the supported value types and associated metadata.", - "properties": { - "blobKeyValue": { - "type": "string", - "description": "A blob key value." - }, - "blobValue": { - "type": "string", - "description": "A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, may have at most 500 bytes.", - "format": "byte" - }, - "booleanValue": { - "type": "boolean", - "description": "A boolean value." - }, - "dateTimeValue": { - "type": "string", - "description": "A timestamp value.", - "format": "date-time" - }, - "doubleValue": { - "type": "number", - "description": "A double value.", - "format": "double" - }, - "entityValue": { - "$ref": "Entity", - "description": "An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key." - }, - "indexed": { - "type": "boolean", - "description": "If the value should be indexed.\n\nThe indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true." - }, - "integerValue": { - "type": "string", - "description": "An integer value.", - "format": "int64" - }, - "keyValue": { - "$ref": "Key", - "description": "A key value." - }, - "meaning": { - "type": "integer", - "description": "The meaning field is reserved and should not be used.", - "format": "int32" - }, - "stringValue": { - "type": "string", - "description": "A UTF-8 encoded string value. When indexed is true, may have at most 500 characters." - } - } - } - }, - "resources": { - "datasets": { - "methods": { - "allocateIds": { - "id": "datastore.datasets.allocateIds", - "path": "{datasetId}/allocateIds", - "httpMethod": "POST", - "description": "Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted).", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "AllocateIdsRequest" - }, - "response": { - "$ref": "AllocateIdsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "beginTransaction": { - "id": "datastore.datasets.beginTransaction", - "path": "{datasetId}/beginTransaction", - "httpMethod": "POST", - "description": "Begin a new transaction.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "BeginTransactionRequest" - }, - "response": { - "$ref": "BeginTransactionResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "blindWrite": { - "id": "datastore.datasets.blindWrite", - "path": "{datasetId}/blindWrite", - "httpMethod": "POST", - "description": "Create, delete or modify some entities outside a transaction.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "BlindWriteRequest" - }, - "response": { - "$ref": "BlindWriteResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "commit": { - "id": "datastore.datasets.commit", - "path": "{datasetId}/commit", - "httpMethod": "POST", - "description": "Commit a transaction, optionally creating, deleting or modifying some entities.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "CommitRequest" - }, - "response": { - "$ref": "CommitResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "lookup": { - "id": "datastore.datasets.lookup", - "path": "{datasetId}/lookup", - "httpMethod": "POST", - "description": "Look up some entities by key.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "LookupRequest" - }, - "response": { - "$ref": "LookupResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "rollback": { - "id": "datastore.datasets.rollback", - "path": "{datasetId}/rollback", - "httpMethod": "POST", - "description": "Roll back a transaction.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "RollbackRequest" - }, - "response": { - "$ref": "RollbackResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "runQuery": { - "id": "datastore.datasets.runQuery", - "path": "{datasetId}/runQuery", - "httpMethod": "POST", - "description": "Query for entities.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "RunQueryRequest" - }, - "response": { - "$ref": "RunQueryResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - } - } - } -} diff --git a/etc/api/datastore/v1beta2/datastore-api.json b/etc/api/datastore/v1beta2/datastore-api.json index 9cda68f9f6..e69de29bb2 100644 --- a/etc/api/datastore/v1beta2/datastore-api.json +++ b/etc/api/datastore/v1beta2/datastore-api.json @@ -1,1075 +0,0 @@ -{ - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/KnvSOTZ1D3HuWYBmolpDipcu9hU\"", - "discoveryVersion": "v1", - "id": "datastore:v1beta2", - "name": "datastore", - "version": "v1beta2", - "revision": "20160314", - "title": "Google Cloud Datastore API", - "description": "Stores and queries data in Google Cloud Datastore.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "https://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/datastore/", - "protocol": "rest", - "baseUrl": "https://www.googleapis.com/datastore/v1beta2/datasets/", - "basePath": "/datastore/v1beta2/datasets/", - "rootUrl": "https://www.googleapis.com/", - "servicePath": "datastore/v1beta2/datasets/", - "batchPath": "batch", - "parameters": { - "alt": { - "type": "string", - "description": "Data format for the response.", - "default": "proto", - "enum": [ - "json", - "proto" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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. Overrides userIp if both are provided.", - "location": "query" - }, - "userIp": { - "type": "string", - "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/datastore": { - "description": "View and manage your Google Cloud Datastore data" - }, - "https://www.googleapis.com/auth/userinfo.email": { - "description": "View your email address" - } - } - } - }, - "schemas": { - "AllocateIdsRequest": { - "id": "AllocateIdsRequest", - "type": "object", - "properties": { - "keys": { - "type": "array", - "description": "A list of keys with incomplete key paths to allocate IDs for. No key may be reserved/read-only.", - "items": { - "$ref": "Key" - } - } - } - }, - "AllocateIdsResponse": { - "id": "AllocateIdsResponse", - "type": "object", - "properties": { - "header": { - "$ref": "ResponseHeader" - }, - "keys": { - "type": "array", - "description": "The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID.", - "items": { - "$ref": "Key" - } - } - } - }, - "BeginTransactionRequest": { - "id": "BeginTransactionRequest", - "type": "object", - "properties": { - "isolationLevel": { - "type": "string", - "description": "The transaction isolation level. Either snapshot or serializable. The default isolation level is snapshot isolation, which means that another transaction may not concurrently modify the data that is modified by this transaction. Optionally, a transaction can request to be made serializable which means that another transaction cannot concurrently modify the data that is read or modified by this transaction.", - "enum": [ - "SERIALIZABLE", - "SNAPSHOT" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "BeginTransactionResponse": { - "id": "BeginTransactionResponse", - "type": "object", - "properties": { - "header": { - "$ref": "ResponseHeader" - }, - "transaction": { - "type": "string", - "description": "The transaction identifier (always present).", - "format": "byte" - } - } - }, - "CommitRequest": { - "id": "CommitRequest", - "type": "object", - "properties": { - "ignoreReadOnly": { - "type": "boolean" - }, - "mode": { - "type": "string", - "description": "The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL.", - "enum": [ - "NON_TRANSACTIONAL", - "TRANSACTIONAL" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "mutation": { - "$ref": "Mutation", - "description": "The mutation to perform. Optional." - }, - "transaction": { - "type": "string", - "description": "The transaction identifier, returned by a call to beginTransaction. Must be set when mode is TRANSACTIONAL.", - "format": "byte" - } - } - }, - "CommitResponse": { - "id": "CommitResponse", - "type": "object", - "properties": { - "header": { - "$ref": "ResponseHeader" - }, - "mutationResult": { - "$ref": "MutationResult", - "description": "The result of performing the mutation (if any)." - } - } - }, - "CompositeFilter": { - "id": "CompositeFilter", - "type": "object", - "description": "A filter that merges the multiple other filters using the given operation.", - "properties": { - "filters": { - "type": "array", - "description": "The list of filters to combine. Must contain at least one filter.", - "items": { - "$ref": "Filter" - } - }, - "operator": { - "type": "string", - "description": "The operator for combining multiple filters. Only \"and\" is currently supported.", - "enum": [ - "AND" - ], - "enumDescriptions": [ - "" - ] - } - } - }, - "Entity": { - "id": "Entity", - "type": "object", - "description": "An entity.", - "properties": { - "key": { - "$ref": "Key", - "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key." - }, - "properties": { - "type": "object", - "description": "The entity's properties.", - "additionalProperties": { - "$ref": "Property", - "description": "The name of the property. A property name matching regex \"__.*__\" is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. Cannot be \"\"." - } - } - } - }, - "EntityResult": { - "id": "EntityResult", - "type": "object", - "description": "The result of fetching an entity from the datastore.", - "properties": { - "entity": { - "$ref": "Entity", - "description": "The resulting entity." - } - } - }, - "Filter": { - "id": "Filter", - "type": "object", - "description": "A holder for any type of filter. Exactly one field should be specified.", - "properties": { - "compositeFilter": { - "$ref": "CompositeFilter", - "description": "A composite filter." - }, - "propertyFilter": { - "$ref": "PropertyFilter", - "description": "A filter on a property." - } - } - }, - "GqlQuery": { - "id": "GqlQuery", - "type": "object", - "description": "A GQL query.", - "properties": { - "allowLiteral": { - "type": "boolean", - "description": "When false, the query string must not contain a literal." - }, - "nameArgs": { - "type": "array", - "description": "A named argument must set field GqlQueryArg.name. No two named arguments may have the same name. For each non-reserved named binding site in the query string, there must be a named argument with that name, but not necessarily the inverse.", - "items": { - "$ref": "GqlQueryArg" - } - }, - "numberArgs": { - "type": "array", - "description": "Numbered binding site @1 references the first numbered argument, effectively using 1-based indexing, rather than the usual 0. A numbered argument must NOT set field GqlQueryArg.name. For each binding site numbered i in query_string, there must be an ith numbered argument. The inverse must also be true.", - "items": { - "$ref": "GqlQueryArg" - } - }, - "queryString": { - "type": "string", - "description": "The query string." - } - } - }, - "GqlQueryArg": { - "id": "GqlQueryArg", - "type": "object", - "description": "A binding argument for a GQL query.", - "properties": { - "cursor": { - "type": "string", - "format": "byte" - }, - "name": { - "type": "string", - "description": "Must match regex \"[A-Za-z_$][A-Za-z_$0-9]*\". Must not match regex \"__.*__\". Must not be \"\"." - }, - "value": { - "$ref": "Value" - } - } - }, - "Key": { - "id": "Key", - "type": "object", - "description": "A unique identifier for an entity.", - "properties": { - "partitionId": { - "$ref": "PartitionId", - "description": "Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition." - }, - "path": { - "type": "array", - "description": "The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors. An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty. The path can have at most 100 elements.", - "items": { - "$ref": "KeyPathElement" - } - } - } - }, - "KeyPathElement": { - "id": "KeyPathElement", - "type": "object", - "description": "A (kind, ID/name) pair used to construct a key path.\n\nAt most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.", - "properties": { - "id": { - "type": "string", - "description": "The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.", - "format": "int64" - }, - "kind": { - "type": "string", - "description": "The kind of the entity. A kind matching regex \"__.*__\" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be \"\"." - }, - "name": { - "type": "string", - "description": "The name of the entity. A name matching regex \"__.*__\" is reserved/read-only. A name must not be more than 500 characters. Cannot be \"\"." - } - } - }, - "KindExpression": { - "id": "KindExpression", - "type": "object", - "description": "A representation of a kind.", - "properties": { - "name": { - "type": "string", - "description": "The name of the kind." - } - } - }, - "LookupRequest": { - "id": "LookupRequest", - "type": "object", - "properties": { - "keys": { - "type": "array", - "description": "Keys of entities to look up from the datastore.", - "items": { - "$ref": "Key" - } - }, - "readOptions": { - "$ref": "ReadOptions", - "description": "Options for this lookup request. Optional." - } - } - }, - "LookupResponse": { - "id": "LookupResponse", - "type": "object", - "properties": { - "deferred": { - "type": "array", - "description": "A list of keys that were not looked up due to resource constraints.", - "items": { - "$ref": "Key" - } - }, - "found": { - "type": "array", - "description": "Entities found.", - "items": { - "$ref": "EntityResult" - } - }, - "header": { - "$ref": "ResponseHeader" - }, - "missing": { - "type": "array", - "description": "Entities not found, with only the key populated.", - "items": { - "$ref": "EntityResult" - } - } - } - }, - "Mutation": { - "id": "Mutation", - "type": "object", - "description": "A set of changes to apply.", - "properties": { - "delete": { - "type": "array", - "description": "Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only.", - "items": { - "$ref": "Key" - } - }, - "force": { - "type": "boolean", - "description": "Ignore a user specified read-only period. Optional." - }, - "insert": { - "type": "array", - "description": "Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only.", - "items": { - "$ref": "Entity" - } - }, - "insertAutoId": { - "type": "array", - "description": "Insert entities with a newly allocated ID. Each inserted entity's key must omit the final identifier in its path and must not be reserved/read-only.", - "items": { - "$ref": "Entity" - } - }, - "update": { - "type": "array", - "description": "Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only.", - "items": { - "$ref": "Entity" - } - }, - "upsert": { - "type": "array", - "description": "Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only.", - "items": { - "$ref": "Entity" - } - } - } - }, - "MutationResult": { - "id": "MutationResult", - "type": "object", - "properties": { - "indexUpdates": { - "type": "integer", - "description": "Number of index writes.", - "format": "int32" - }, - "insertAutoIdKeys": { - "type": "array", - "description": "Keys for insertAutoId entities. One per entity from the request, in the same order.", - "items": { - "$ref": "Key" - } - } - } - }, - "PartitionId": { - "id": "PartitionId", - "type": "object", - "description": "An identifier for a particular subset of entities.\n\nEntities are partitioned into various subsets, each used by different datasets and different namespaces within a dataset and so forth.", - "properties": { - "datasetId": { - "type": "string", - "description": "The dataset ID." - }, - "namespace": { - "type": "string", - "description": "The namespace." - } - } - }, - "Property": { - "id": "Property", - "type": "object", - "description": "An entity property.", - "properties": { - "blobKeyValue": { - "type": "string", - "description": "A blob key value." - }, - "blobValue": { - "type": "string", - "description": "A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, may have at most 500 bytes.", - "format": "byte" - }, - "booleanValue": { - "type": "boolean", - "description": "A boolean value." - }, - "dateTimeValue": { - "type": "string", - "description": "A timestamp value.", - "format": "date-time" - }, - "doubleValue": { - "type": "number", - "description": "A double value.", - "format": "double" - }, - "entityValue": { - "$ref": "Entity", - "description": "An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key." - }, - "indexed": { - "type": "boolean", - "description": "If the value should be indexed.\n\nThe indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true." - }, - "integerValue": { - "type": "string", - "description": "An integer value.", - "format": "int64" - }, - "keyValue": { - "$ref": "Key", - "description": "A key value." - }, - "listValue": { - "type": "array", - "description": "A list value. Cannot contain another list value. A Value instance that sets field list_value must not set field meaning or field indexed.", - "items": { - "$ref": "Value" - } - }, - "meaning": { - "type": "integer", - "description": "The meaning field is reserved and should not be used.", - "format": "int32" - }, - "stringValue": { - "type": "string", - "description": "A UTF-8 encoded string value. When indexed is true, may have at most 500 characters." - } - } - }, - "PropertyExpression": { - "id": "PropertyExpression", - "type": "object", - "description": "A representation of a property in a projection.", - "properties": { - "aggregationFunction": { - "type": "string", - "description": "The aggregation function to apply to the property. Optional. Can only be used when grouping by at least one property. Must then be set on all properties in the projection that are not being grouped by. Aggregation functions: first selects the first result as determined by the query's order.", - "enum": [ - "FIRST" - ], - "enumDescriptions": [ - "" - ] - }, - "property": { - "$ref": "PropertyReference", - "description": "The property to project." - } - } - }, - "PropertyFilter": { - "id": "PropertyFilter", - "type": "object", - "description": "A filter on a specific property.", - "properties": { - "operator": { - "type": "string", - "description": "The operator to filter by. One of lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual, equal, or hasAncestor.", - "enum": [ - "EQUAL", - "GREATER_THAN", - "GREATER_THAN_OR_EQUAL", - "HAS_ANCESTOR", - "LESS_THAN", - "LESS_THAN_OR_EQUAL" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "property": { - "$ref": "PropertyReference", - "description": "The property to filter by." - }, - "value": { - "$ref": "Value", - "description": "The value to compare the property to." - } - } - }, - "PropertyOrder": { - "id": "PropertyOrder", - "type": "object", - "description": "The desired order for a specific property.", - "properties": { - "direction": { - "type": "string", - "description": "The direction to order by. One of ascending or descending. Optional, defaults to ascending.", - "enum": [ - "ASCENDING", - "DESCENDING" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "property": { - "$ref": "PropertyReference", - "description": "The property to order by." - } - } - }, - "PropertyReference": { - "id": "PropertyReference", - "type": "object", - "description": "A reference to a property relative to the kind expressions.", - "properties": { - "name": { - "type": "string", - "description": "The name of the property." - } - } - }, - "Query": { - "id": "Query", - "type": "object", - "description": "A query.", - "properties": { - "endCursor": { - "type": "string", - "description": "An ending point for the query results. Optional. Query cursors are returned in query result batches.", - "format": "byte" - }, - "filter": { - "$ref": "Filter", - "description": "The filter to apply (optional)." - }, - "groupBy": { - "type": "array", - "description": "The properties to group by (if empty, no grouping is applied to the result set).", - "items": { - "$ref": "PropertyReference" - } - }, - "kinds": { - "type": "array", - "description": "The kinds to query (if empty, returns entities from all kinds).", - "items": { - "$ref": "KindExpression" - } - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return. Applies after all other constraints. Optional.", - "format": "int32" - }, - "offset": { - "type": "integer", - "description": "The number of results to skip. Applies before limit, but after all other constraints (optional, defaults to 0).", - "format": "int32" - }, - "order": { - "type": "array", - "description": "The order to apply to the query results (if empty, order is unspecified).", - "items": { - "$ref": "PropertyOrder" - } - }, - "projection": { - "type": "array", - "description": "The projection to return. If not set the entire entity is returned.", - "items": { - "$ref": "PropertyExpression" - } - }, - "startCursor": { - "type": "string", - "description": "A starting point for the query results. Optional. Query cursors are returned in query result batches.", - "format": "byte" - } - } - }, - "QueryResultBatch": { - "id": "QueryResultBatch", - "type": "object", - "description": "A batch of results produced by a query.", - "properties": { - "endCursor": { - "type": "string", - "description": "A cursor that points to the position after the last result in the batch. May be absent. TODO(arfuller): Once all plans produce cursors update documentation here.", - "format": "byte" - }, - "entityResultType": { - "type": "string", - "description": "The result type for every entity in entityResults. full for full entities, projection for entities with only projected properties, keyOnly for entities with only a key.", - "enum": [ - "FULL", - "KEY_ONLY", - "PROJECTION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "entityResults": { - "type": "array", - "description": "The results for this batch.", - "items": { - "$ref": "EntityResult" - } - }, - "moreResults": { - "type": "string", - "description": "The state of the query after the current batch. One of notFinished, moreResultsAfterLimit, noMoreResults.", - "enum": [ - "MORE_RESULTS_AFTER_LIMIT", - "NOT_FINISHED", - "NO_MORE_RESULTS" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "skippedResults": { - "type": "integer", - "description": "The number of results skipped because of Query.offset.", - "format": "int32" - } - } - }, - "ReadOptions": { - "id": "ReadOptions", - "type": "object", - "properties": { - "readConsistency": { - "type": "string", - "description": "The read consistency to use. One of default, strong, or eventual. Cannot be set when transaction is set. Lookup and ancestor queries default to strong, global queries default to eventual and cannot be set to strong. Optional. Default is default.", - "enum": [ - "DEFAULT", - "EVENTUAL", - "STRONG" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "transaction": { - "type": "string", - "description": "The transaction to use. Optional.", - "format": "byte" - } - } - }, - "ResponseHeader": { - "id": "ResponseHeader", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"datastore#responseHeader\".", - "default": "datastore#responseHeader" - } - } - }, - "RollbackRequest": { - "id": "RollbackRequest", - "type": "object", - "properties": { - "transaction": { - "type": "string", - "description": "The transaction identifier, returned by a call to beginTransaction.", - "format": "byte" - } - } - }, - "RollbackResponse": { - "id": "RollbackResponse", - "type": "object", - "properties": { - "header": { - "$ref": "ResponseHeader" - } - } - }, - "RunQueryRequest": { - "id": "RunQueryRequest", - "type": "object", - "properties": { - "gqlQuery": { - "$ref": "GqlQuery", - "description": "The GQL query to run. Either this field or field query must be set, but not both." - }, - "partitionId": { - "$ref": "PartitionId", - "description": "Entities are partitioned into subsets, identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID, but all other partition IDs in RunQueryRequest are normalized with this partition ID as the context partition ID." - }, - "query": { - "$ref": "Query", - "description": "The query to run. Either this field or field gql_query must be set, but not both." - }, - "readOptions": { - "$ref": "ReadOptions", - "description": "The options for this query." - } - } - }, - "RunQueryResponse": { - "id": "RunQueryResponse", - "type": "object", - "properties": { - "batch": { - "$ref": "QueryResultBatch", - "description": "A batch of query results (always present)." - }, - "header": { - "$ref": "ResponseHeader" - } - } - }, - "Value": { - "id": "Value", - "type": "object", - "description": "A message that can hold any of the supported value types and associated metadata.", - "properties": { - "blobKeyValue": { - "type": "string", - "description": "A blob key value." - }, - "blobValue": { - "type": "string", - "description": "A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, may have at most 500 bytes.", - "format": "byte" - }, - "booleanValue": { - "type": "boolean", - "description": "A boolean value." - }, - "dateTimeValue": { - "type": "string", - "description": "A timestamp value.", - "format": "date-time" - }, - "doubleValue": { - "type": "number", - "description": "A double value.", - "format": "double" - }, - "entityValue": { - "$ref": "Entity", - "description": "An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key." - }, - "indexed": { - "type": "boolean", - "description": "If the value should be indexed.\n\nThe indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true." - }, - "integerValue": { - "type": "string", - "description": "An integer value.", - "format": "int64" - }, - "keyValue": { - "$ref": "Key", - "description": "A key value." - }, - "listValue": { - "type": "array", - "description": "A list value. Cannot contain another list value. A Value instance that sets field list_value must not set field meaning or field indexed.", - "items": { - "$ref": "Value" - } - }, - "meaning": { - "type": "integer", - "description": "The meaning field is reserved and should not be used.", - "format": "int32" - }, - "stringValue": { - "type": "string", - "description": "A UTF-8 encoded string value. When indexed is true, may have at most 500 characters." - } - } - } - }, - "resources": { - "datasets": { - "methods": { - "allocateIds": { - "id": "datastore.datasets.allocateIds", - "path": "{datasetId}/allocateIds", - "httpMethod": "POST", - "description": "Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted).", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "AllocateIdsRequest" - }, - "response": { - "$ref": "AllocateIdsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "beginTransaction": { - "id": "datastore.datasets.beginTransaction", - "path": "{datasetId}/beginTransaction", - "httpMethod": "POST", - "description": "Begin a new transaction.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "BeginTransactionRequest" - }, - "response": { - "$ref": "BeginTransactionResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "commit": { - "id": "datastore.datasets.commit", - "path": "{datasetId}/commit", - "httpMethod": "POST", - "description": "Commit a transaction, optionally creating, deleting or modifying some entities.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "CommitRequest" - }, - "response": { - "$ref": "CommitResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "lookup": { - "id": "datastore.datasets.lookup", - "path": "{datasetId}/lookup", - "httpMethod": "POST", - "description": "Look up some entities by key.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "LookupRequest" - }, - "response": { - "$ref": "LookupResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "rollback": { - "id": "datastore.datasets.rollback", - "path": "{datasetId}/rollback", - "httpMethod": "POST", - "description": "Roll back a transaction.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "RollbackRequest" - }, - "response": { - "$ref": "RollbackResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "runQuery": { - "id": "datastore.datasets.runQuery", - "path": "{datasetId}/runQuery", - "httpMethod": "POST", - "description": "Query for entities.", - "parameters": { - "datasetId": { - "type": "string", - "description": "Identifies the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "RunQueryRequest" - }, - "response": { - "$ref": "RunQueryResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - } - } - } -} diff --git a/etc/api/datastore/v1beta3/datastore-api.json b/etc/api/datastore/v1beta3/datastore-api.json index 36433026c7..aace709465 100644 --- a/etc/api/datastore/v1beta3/datastore-api.json +++ b/etc/api/datastore/v1beta3/datastore-api.json @@ -1,5 +1,6 @@ { - "id": "datastore:v1beta3", + "version": "v1beta3", + "baseUrl": "https://datastore.googleapis.com/", "auth": { "oauth2": { "scopes": { @@ -13,712 +14,345 @@ } }, "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.\n", - "protocol": "rest", + "servicePath": "", + "kind": "discovery#restDescription", + "rootUrl": "https://datastore.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "datastore", + "batchPath": "batch", + "id": "datastore:v1beta3", + "documentationLink": "https://cloud.google.com/datastore/", + "revision": "20170509", "title": "Google Cloud Datastore API", + "ownerName": "Google", + "discoveryVersion": "v1", + "version_module": "True", "resources": { "projects": { "methods": { "runQuery": { - "id": "datastore.projects.runQuery", "response": { "$ref": "RunQueryResponse" }, "parameterOrder": [ "projectId" ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "projectId": { + "description": "The ID of the project against which to make the request.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1beta3/projects/{projectId}:runQuery", + "path": "v1beta3/projects/{projectId}:runQuery", + "id": "datastore.projects.runQuery", "description": "Queries for entities.", "request": { "$ref": "RunQueryRequest" - }, - "flatPath": "v1beta3/projects/{projectId}:runQuery", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The ID of the project against which to make the request.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta3/projects/{projectId}:runQuery", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ] + } }, - "beginTransaction": { - "id": "datastore.projects.beginTransaction", - "response": { - "$ref": "BeginTransactionResponse" - }, + "rollback": { + "httpMethod": "POST", "parameterOrder": [ "projectId" ], - "description": "Begins a new transaction.", - "request": { - "$ref": "BeginTransactionRequest" - }, - "flatPath": "v1beta3/projects/{projectId}:beginTransaction", - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The ID of the project against which to make the request.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta3/projects/{projectId}:beginTransaction", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ] - }, - "allocateIds": { - "id": "datastore.projects.allocateIds", "response": { - "$ref": "AllocateIdsResponse" + "$ref": "RollbackResponse" }, - "parameterOrder": [ - "projectId" - ], - "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted.", - "request": { - "$ref": "AllocateIdsRequest" - }, - "flatPath": "v1beta3/projects/{projectId}:allocateIds", - "httpMethod": "POST", "parameters": { "projectId": { "description": "The ID of the project against which to make the request.", "required": true, - "location": "path", - "type": "string" + "type": "string", + "location": "path" } }, - "path": "v1beta3/projects/{projectId}:allocateIds", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" - ] + ], + "flatPath": "v1beta3/projects/{projectId}:rollback", + "id": "datastore.projects.rollback", + "path": "v1beta3/projects/{projectId}:rollback", + "request": { + "$ref": "RollbackRequest" + }, + "description": "Rolls back a transaction." }, "lookup": { + "path": "v1beta3/projects/{projectId}:lookup", "id": "datastore.projects.lookup", + "description": "Looks up entities by key.", + "request": { + "$ref": "LookupRequest" + }, "response": { "$ref": "LookupResponse" }, "parameterOrder": [ "projectId" ], - "description": "Looks up entities by key.", - "request": { - "$ref": "LookupRequest" - }, - "flatPath": "v1beta3/projects/{projectId}:lookup", "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], "parameters": { "projectId": { "description": "The ID of the project against which to make the request.", "required": true, - "location": "path", - "type": "string" + "type": "string", + "location": "path" } }, - "path": "v1beta3/projects/{projectId}:lookup", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ] + "flatPath": "v1beta3/projects/{projectId}:lookup" }, - "commit": { - "id": "datastore.projects.commit", + "allocateIds": { "response": { - "$ref": "CommitResponse" + "$ref": "AllocateIdsResponse" }, "parameterOrder": [ "projectId" ], - "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.", + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ], + "parameters": { + "projectId": { + "description": "The ID of the project against which to make the request.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1beta3/projects/{projectId}:allocateIds", + "path": "v1beta3/projects/{projectId}:allocateIds", + "id": "datastore.projects.allocateIds", + "description": "Allocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted.", + "request": { + "$ref": "AllocateIdsRequest" + } + }, + "commit": { "request": { "$ref": "CommitRequest" }, - "flatPath": "v1beta3/projects/{projectId}:commit", + "description": "Commits a transaction, optionally creating, deleting or modifying some\nentities.", "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "CommitResponse" + }, "parameters": { "projectId": { "description": "The ID of the project against which to make the request.", "required": true, - "location": "path", - "type": "string" + "type": "string", + "location": "path" } }, - "path": "v1beta3/projects/{projectId}:commit", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" - ] + ], + "flatPath": "v1beta3/projects/{projectId}:commit", + "id": "datastore.projects.commit", + "path": "v1beta3/projects/{projectId}:commit" }, - "rollback": { - "id": "datastore.projects.rollback", + "beginTransaction": { "response": { - "$ref": "RollbackResponse" + "$ref": "BeginTransactionResponse" }, "parameterOrder": [ "projectId" ], - "description": "Rolls back a transaction.", - "request": { - "$ref": "RollbackRequest" - }, - "flatPath": "v1beta3/projects/{projectId}:rollback", "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The ID of the project against which to make the request.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1beta3/projects/{projectId}:rollback", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" - ] + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The ID of the project against which to make the request.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta3/projects/{projectId}:beginTransaction", + "path": "v1beta3/projects/{projectId}:beginTransaction", + "id": "datastore.projects.beginTransaction", + "description": "Begins a new transaction.", + "request": { + "$ref": "BeginTransactionRequest" + } } } } }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "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" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + } + }, "schemas": { - "Value": { - "description": "A message that can hold any of the supported value types and associated\nmetadata.", - "type": "object", - "properties": { - "stringValue": { - "description": "A UTF-8 encoded string value.\nWhen `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.\nOtherwise, may be set to at least 1,000,000 bytes.", - "type": "string" - }, - "arrayValue": { - "description": "An array value.\nCannot contain another array value.\nA `Value` instance that sets field `array_value` must not set fields\n`meaning` or `exclude_from_indexes`.", - "$ref": "ArrayValue" - }, - "entityValue": { - "description": "An entity value.\n\n- May have no key.\n- May have a key with an incomplete key path.\n- May have a reserved/read-only key.", - "$ref": "Entity" - }, - "meaning": { - "description": "The `meaning` field should only be populated for backwards compatibility.", - "type": "integer", - "format": "int32" - }, - "integerValue": { - "description": "An integer value.", - "type": "string", - "format": "int64" - }, - "doubleValue": { - "description": "A double value.", - "type": "number", - "format": "double" - }, - "blobValue": { - "description": "A blob value.\nMay have at most 1,000,000 bytes.\nWhen `exclude_from_indexes` is false, may have at most 1500 bytes.\nIn JSON requests, must be base64-encoded.", - "type": "string", - "format": "byte" - }, - "geoPointValue": { - "description": "A geo point value representing a point on the surface of Earth.", - "$ref": "LatLng" - }, - "nullValue": { - "description": "A null value.", - "enum": [ - "NULL_VALUE" - ], - "enumDescriptions": [ - "Null value." - ], - "type": "string" - }, - "booleanValue": { - "description": "A boolean value.", - "type": "boolean" - }, - "keyValue": { - "description": "A key value.", - "$ref": "Key" - }, - "excludeFromIndexes": { - "description": "If the value should be excluded from all indexes including those defined\nexplicitly.", - "type": "boolean" - }, - "timestampValue": { - "description": "A timestamp value.\nWhen stored in the Datastore, precise only to microseconds;\nany additional precision is rounded down.", - "type": "string", - "format": "google-datetime" - } - }, - "id": "Value" - }, - "ReadOptions": { - "description": "The options shared by read requests.", - "type": "object", - "properties": { - "transaction": { - "description": "The identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", - "type": "string", - "format": "byte" - }, - "readConsistency": { - "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.", - "enum": [ - "READ_CONSISTENCY_UNSPECIFIED", - "STRONG", - "EVENTUAL" - ], - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Strong consistency.", - "Eventual consistency." - ], - "type": "string" - } - }, - "id": "ReadOptions" - }, - "PropertyOrder": { - "description": "The desired order for a specific property.", - "type": "object", - "properties": { - "direction": { - "description": "The direction to order by. Defaults to `ASCENDING`.", - "enum": [ - "DIRECTION_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Ascending.", - "Descending." - ], - "type": "string" - }, - "property": { - "description": "The property to order by.", - "$ref": "PropertyReference" - } - }, - "id": "PropertyOrder" - }, - "CommitRequest": { - "description": "The request for Datastore.Commit.", - "type": "object", - "properties": { - "transaction": { - "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", - "type": "string", - "format": "byte" - }, - "mode": { - "description": "The type of commit to perform. Defaults to `TRANSACTIONAL`.", - "enum": [ - "MODE_UNSPECIFIED", - "TRANSACTIONAL", - "NON_TRANSACTIONAL" - ], - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Transactional: The mutations are either all applied, or none are applied.\nLearn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).", - "Non-transactional: The mutations may not apply as all or none." - ], - "type": "string" - }, - "mutations": { - "description": "The mutations to perform.\n\nWhen mode is `TRANSACTIONAL`, mutations affecting a single entity are\napplied in order. The following sequences of mutations affecting a single\nentity are not permitted in a single `Commit` request:\n\n- `insert` followed by `insert`\n- `update` followed by `insert`\n- `upsert` followed by `insert`\n- `delete` followed by `update`\n\nWhen mode is `NON_TRANSACTIONAL`, no two mutations may affect a single\nentity.", - "type": "array", - "items": { - "$ref": "Mutation" - } - } - }, - "id": "CommitRequest" - }, - "Query": { - "description": "A query for entities.", - "type": "object", - "properties": { - "limit": { - "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "The filter to apply.", - "$ref": "Filter" - }, - "endCursor": { - "description": "An ending point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", - "type": "string", - "format": "byte" - }, - "distinctOn": { - "description": "The properties to make distinct. The query results will contain the first\nresult for each distinct combination of values for the given properties\n(if empty, all results are returned).", - "type": "array", - "items": { - "$ref": "PropertyReference" - } - }, - "offset": { - "description": "The number of results to skip. Applies before limit, but after all other\nconstraints. Optional. Must be \u003e= 0 if specified.", - "type": "integer", - "format": "int32" - }, - "projection": { - "description": "The projection to return. Defaults to returning all properties.", - "type": "array", - "items": { - "$ref": "Projection" - } - }, - "order": { - "description": "The order to apply to the query results (if empty, order is unspecified).", - "type": "array", - "items": { - "$ref": "PropertyOrder" - } - }, - "startCursor": { - "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", - "type": "string", - "format": "byte" - }, - "kind": { - "description": "The kinds to query (if empty, returns entities of all kinds).\nCurrently at most 1 kind may be specified.", - "type": "array", - "items": { - "$ref": "KindExpression" - } - } - }, - "id": "Query" - }, - "RollbackRequest": { - "description": "The request for Datastore.Rollback.", - "type": "object", - "properties": { - "transaction": { - "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.", - "type": "string", - "format": "byte" - } - }, - "id": "RollbackRequest" - }, - "EntityResult": { - "description": "The result of fetching an entity from Datastore.", - "type": "object", - "properties": { - "cursor": { - "description": "A cursor that points to the position after the result entity.\nSet only when the `EntityResult` is part of a `QueryResultBatch` message.", - "type": "string", - "format": "byte" - }, - "entity": { - "description": "The resulting entity.", - "$ref": "Entity" - }, - "version": { - "description": "The version of the entity, a strictly positive number that monotonically\nincreases with changes to the entity.\n\nThis field is set for `FULL` entity\nresults.\n\nFor missing entities in `LookupResponse`, this\nis the version of the snapshot that was used to look up the entity, and it\nis always set except for eventually consistent reads.", - "type": "string", - "format": "int64" - } - }, - "id": "EntityResult" - }, - "GqlQueryParameter": { - "description": "A binding parameter for a GQL query.", - "type": "object", - "properties": { - "value": { - "description": "A value parameter.", - "$ref": "Value" - }, - "cursor": { - "description": "A query cursor. Query cursors are returned in query\nresult batches.", - "type": "string", - "format": "byte" - } - }, - "id": "GqlQueryParameter" - }, - "ArrayValue": { - "description": "An array value.", - "type": "object", - "properties": { - "values": { - "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.", - "type": "array", - "items": { - "$ref": "Value" - } - } - }, - "id": "ArrayValue" - }, - "Filter": { - "description": "A holder for any type of filter.", - "type": "object", - "properties": { - "propertyFilter": { - "description": "A filter on a property.", - "$ref": "PropertyFilter" - }, - "compositeFilter": { - "description": "A composite filter.", - "$ref": "CompositeFilter" - } - }, - "id": "Filter" - }, - "BeginTransactionResponse": { - "description": "The response for Datastore.BeginTransaction.", - "type": "object", - "properties": { - "transaction": { - "description": "The transaction identifier (always present).", - "type": "string", - "format": "byte" - } - }, - "id": "BeginTransactionResponse" - }, - "PartitionId": { - "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d\\.\\-_]{1,100}`\nIf the value of any dimension matches regex `__.*__`, the partition is\nreserved/read-only.\nA reserved/read-only partition ID is forbidden in certain documented\ncontexts.\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in an active state.", - "type": "object", - "properties": { - "namespaceId": { - "description": "If not empty, the ID of the namespace to which the entities belong.", - "type": "string" - }, - "projectId": { - "description": "The ID of the project to which the entities belong.", - "type": "string" - } - }, - "id": "PartitionId" - }, - "QueryResultBatch": { - "description": "A batch of results produced by a query.", - "type": "object", - "properties": { - "snapshotVersion": { - "description": "The version number of the snapshot this batch was returned from.\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\n\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.\nThe value will be zero for eventually consistent queries.", - "type": "string", - "format": "int64" - }, - "endCursor": { - "description": "A cursor that points to the position after the last result in the batch.", - "type": "string", - "format": "byte" - }, - "skippedCursor": { - "description": "A cursor that points to the position after the last skipped result.\nWill be set when `skipped_results` != 0.", - "type": "string", - "format": "byte" - }, - "entityResultType": { - "description": "The result type for every entity in `entity_results`.", - "enum": [ - "RESULT_TYPE_UNSPECIFIED", - "FULL", - "PROJECTION", - "KEY_ONLY" - ], - "enumDescriptions": [ - "Unspecified. This value is never used.", - "The key and properties.", - "A projected subset of properties. The entity may have no key.", - "Only the key." - ], - "type": "string" - }, - "moreResults": { - "description": "The state of the query after the current batch.", - "enum": [ - "MORE_RESULTS_TYPE_UNSPECIFIED", - "NOT_FINISHED", - "MORE_RESULTS_AFTER_LIMIT", - "MORE_RESULTS_AFTER_CURSOR", - "NO_MORE_RESULTS" - ], - "enumDescriptions": [ - "Unspecified. This value is never used.", - "There may be additional batches to fetch from this query.", - "The query is finished, but there may be more results after the limit.", - "The query is finished, but there may be more results after the end\ncursor.", - "The query has been exhausted." - ], - "type": "string" - }, - "entityResults": { - "description": "The results for this batch.", - "type": "array", - "items": { - "$ref": "EntityResult" - } - }, - "skippedResults": { - "description": "The number of results skipped, typically because of an offset.", - "type": "integer", - "format": "int32" - } - }, - "id": "QueryResultBatch" - }, - "AllocateIdsRequest": { - "description": "The request for Datastore.AllocateIds.", - "type": "object", - "properties": { - "keys": { - "description": "A list of keys with incomplete key paths for which to allocate IDs.\nNo key may be reserved/read-only.", - "type": "array", - "items": { - "$ref": "Key" - } - } - }, - "id": "AllocateIdsRequest" - }, - "KindExpression": { - "description": "A representation of a kind.", - "type": "object", + "PathElement": { "properties": { "name": { - "description": "The name of the kind.", - "type": "string" - } - }, - "id": "KindExpression" - }, - "PropertyFilter": { - "description": "A filter on a specific property.", - "type": "object", - "properties": { - "value": { - "description": "The value to compare the property to.", - "$ref": "Value" - }, - "op": { - "description": "The operator to filter by.", - "enum": [ - "OPERATOR_UNSPECIFIED", - "LESS_THAN", - "LESS_THAN_OR_EQUAL", - "GREATER_THAN", - "GREATER_THAN_OR_EQUAL", - "EQUAL", - "HAS_ANCESTOR" - ], - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "Less than.", - "Less than or equal.", - "Greater than.", - "Greater than or equal.", - "Equal.", - "Has ancestor." - ], + "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", "type": "string" }, - "property": { - "description": "The property to filter by.", - "$ref": "PropertyReference" - } - }, - "id": "PropertyFilter" - }, - "PathElement": { - "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", - "type": "object", - "properties": { "kind": { "description": "The kind of the entity.\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", "type": "string" }, "id": { "description": "The auto-allocated ID of the entity.\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.", - "type": "string", - "format": "int64" - }, - "name": { - "description": "The name of the entity.\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.", + "format": "int64", "type": "string" } }, - "id": "PathElement" + "id": "PathElement", + "description": "A (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.", + "type": "object" }, - "RollbackResponse": { - "description": "The response for Datastore.Rollback.\n(an empty message).", - "type": "object", - "properties": {}, - "id": "RollbackResponse" - }, - "PropertyReference": { - "description": "A reference to a property relative to the kind expressions.", + "GqlQueryParameter": { + "description": "A binding parameter for a GQL query.", "type": "object", "properties": { - "name": { - "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path.", + "cursor": { + "description": "A query cursor. Query cursors are returned in query\nresult batches.", + "format": "byte", + "type": "string" + }, + "value": { + "$ref": "Value", + "description": "A value parameter." + } + }, + "id": "GqlQueryParameter" + }, + "BeginTransactionResponse": { + "properties": { + "transaction": { + "description": "The transaction identifier (always present).", + "format": "byte", "type": "string" } }, - "id": "PropertyReference" + "id": "BeginTransactionResponse", + "description": "The response for Datastore.BeginTransaction.", + "type": "object" }, - "Projection": { - "description": "A representation of a property in a projection.", - "type": "object", + "RunQueryResponse": { "properties": { - "property": { - "description": "The property to project.", - "$ref": "PropertyReference" - } - }, - "id": "Projection" - }, - "MutationResult": { - "description": "The result of applying a mutation.", - "type": "object", - "properties": { - "conflictDetected": { - "description": "Whether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation.", - "type": "boolean" + "query": { + "$ref": "Query", + "description": "The parsed form of the `GqlQuery` from the request, if it was set." }, - "key": { - "description": "The automatically allocated key.\nSet only when the mutation allocated a key.", - "$ref": "Key" - }, - "version": { - "description": "The version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.", - "type": "string", - "format": "int64" + "batch": { + "$ref": "QueryResultBatch", + "description": "A batch of query results (always present)." } }, - "id": "MutationResult" - }, - "AllocateIdsResponse": { - "description": "The response for Datastore.AllocateIds.", - "type": "object", - "properties": { - "keys": { - "description": "The keys specified in the request (in the same order), each with\nits key path completed with a newly allocated ID.", - "type": "array", - "items": { - "$ref": "Key" - } - } - }, - "id": "AllocateIdsResponse" + "id": "RunQueryResponse", + "description": "The response for Datastore.RunQuery.", + "type": "object" }, "LookupResponse": { "description": "The response for Datastore.Lookup.", @@ -748,62 +382,245 @@ }, "id": "LookupResponse" }, - "BeginTransactionRequest": { - "description": "The request for Datastore.BeginTransaction.", - "type": "object", - "properties": {}, - "id": "BeginTransactionRequest" + "AllocateIdsRequest": { + "properties": { + "keys": { + "description": "A list of keys with incomplete key paths for which to allocate IDs.\nNo key may be reserved/read-only.", + "type": "array", + "items": { + "$ref": "Key" + } + } + }, + "id": "AllocateIdsRequest", + "description": "The request for Datastore.AllocateIds.", + "type": "object" }, - "Key": { - "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", + "PropertyOrder": { + "properties": { + "property": { + "description": "The property to order by.", + "$ref": "PropertyReference" + }, + "direction": { + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Ascending.", + "Descending." + ], + "enum": [ + "DIRECTION_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ], + "description": "The direction to order by. Defaults to `ASCENDING`.", + "type": "string" + } + }, + "id": "PropertyOrder", + "description": "The desired order for a specific property.", + "type": "object" + }, + "BeginTransactionRequest": { + "properties": {}, + "id": "BeginTransactionRequest", + "description": "The request for Datastore.BeginTransaction.", + "type": "object" + }, + "CommitRequest": { + "properties": { + "mutations": { + "description": "The mutations to perform.\n\nWhen mode is `TRANSACTIONAL`, mutations affecting a single entity are\napplied in order. The following sequences of mutations affecting a single\nentity are not permitted in a single `Commit` request:\n\n- `insert` followed by `insert`\n- `update` followed by `insert`\n- `upsert` followed by `insert`\n- `delete` followed by `update`\n\nWhen mode is `NON_TRANSACTIONAL`, no two mutations may affect a single\nentity.", + "type": "array", + "items": { + "$ref": "Mutation" + } + }, + "transaction": { + "description": "The identifier of the transaction associated with the commit. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", + "format": "byte", + "type": "string" + }, + "mode": { + "enum": [ + "MODE_UNSPECIFIED", + "TRANSACTIONAL", + "NON_TRANSACTIONAL" + ], + "description": "The type of commit to perform. Defaults to `TRANSACTIONAL`.", + "type": "string", + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Transactional: The mutations are either all applied, or none are applied.\nLearn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).", + "Non-transactional: The mutations may not apply as all or none." + ] + } + }, + "id": "CommitRequest", + "description": "The request for Datastore.Commit.", + "type": "object" + }, + "KindExpression": { + "properties": { + "name": { + "description": "The name of the kind.", + "type": "string" + } + }, + "id": "KindExpression", + "description": "A representation of a kind.", + "type": "object" + }, + "LatLng": { + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)\n\nThe code in logs/storage/validator/logs_validator_traits.cc treats this type\nas if it were annotated as ST_LOCATION.", "type": "object", "properties": { - "partitionId": { - "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition.", - "$ref": "PartitionId" + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" }, + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "type": "number" + } + }, + "id": "LatLng" + }, + "Key": { + "properties": { "path": { "description": "The entity path.\nAn entity path consists of one or more elements composed of a kind and a\nstring or numerical identifier, which identify entities. The first\nelement identifies a _root entity_, the second element identifies\na _child_ of the root entity, the third element identifies a child of the\nsecond entity, and so forth. The entities identified by all prefixes of\nthe path are called the element's _ancestors_.\n\nAn entity path is always fully complete: *all* of the entity's ancestors\nare required to be in the path along with the entity identifier itself.\nThe only exception is that in some documented cases, the identifier in the\nlast path element (for the entity) itself may be omitted. For example,\nthe last path element of the key of `Mutation.insert` may have no\nidentifier.\n\nA path can never be empty, and a path can have at most 100 elements.", "type": "array", "items": { "$ref": "PathElement" } - } - }, - "id": "Key" - }, - "RunQueryResponse": { - "description": "The response for Datastore.RunQuery.", - "type": "object", - "properties": { - "batch": { - "description": "A batch of query results (always present).", - "$ref": "QueryResultBatch" }, - "query": { - "description": "The parsed form of the `GqlQuery` from the request, if it was set.", - "$ref": "Query" + "partitionId": { + "description": "Entities are partitioned into subsets, currently identified by a project\nID and namespace ID.\nQueries are scoped to a single partition.", + "$ref": "PartitionId" } }, - "id": "RunQueryResponse" + "id": "Key", + "description": "A unique identifier for an entity.\nIf a key's partition ID or any of its path kinds or names are\nreserved/read-only, the key is reserved/read-only.\nA reserved/read-only key is forbidden in certain documented contexts.", + "type": "object" }, - "Entity": { - "description": "A Datastore data object.\n\nAn entity is limited to 1 megabyte when stored. That _roughly_\ncorresponds to a limit of 1 megabyte for the serialized form of this\nmessage.", + "PropertyReference": { + "properties": { + "name": { + "description": "The name of the property.\nIf name includes \".\"s, it may be interpreted as a property name path.", + "type": "string" + } + }, + "id": "PropertyReference", + "description": "A reference to a property relative to the kind expressions.", + "type": "object" + }, + "Projection": { + "properties": { + "property": { + "description": "The property to project.", + "$ref": "PropertyReference" + } + }, + "id": "Projection", + "description": "A representation of a property in a projection.", + "type": "object" + }, + "ArrayValue": { + "properties": { + "values": { + "description": "Values in the array.\nThe order of this array may not be preserved if it contains a mix of\nindexed and unindexed values.", + "type": "array", + "items": { + "$ref": "Value" + } + } + }, + "id": "ArrayValue", + "description": "An array value.", + "type": "object" + }, + "Mutation": { + "description": "A mutation to apply to an entity.", "type": "object", "properties": { - "properties": { - "description": "The entity's properties.\nThe map's keys are property names.\nA property name matching regex `__.*__` is reserved.\nA reserved property name is forbidden in certain documented contexts.\nThe name must not contain more than 500 characters.\nThe name cannot be `\"\"`.", - "additionalProperties": { - "$ref": "Value" - }, - "type": "object" + "delete": { + "$ref": "Key", + "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only." + }, + "insert": { + "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete.", + "$ref": "Entity" + }, + "baseVersion": { + "description": "The version of the entity that this mutation is being applied to. If this\ndoes not match the current version on the server, the mutation conflicts.", + "format": "int64", + "type": "string" + }, + "update": { + "description": "The entity to update. The entity must already exist.\nMust have a complete key path.", + "$ref": "Entity" + }, + "upsert": { + "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete.", + "$ref": "Entity" + } + }, + "id": "Mutation" + }, + "ReadOptions": { + "properties": { + "readConsistency": { + "enum": [ + "READ_CONSISTENCY_UNSPECIFIED", + "STRONG", + "EVENTUAL" + ], + "description": "The non-transactional read consistency to use.\nCannot be set to `STRONG` for global queries.", + "type": "string", + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Strong consistency.", + "Eventual consistency." + ] + }, + "transaction": { + "description": "The identifier of the transaction in which to read. A\ntransaction identifier is returned by a call to\nDatastore.BeginTransaction.", + "format": "byte", + "type": "string" + } + }, + "id": "ReadOptions", + "description": "The options shared by read requests.", + "type": "object" + }, + "RollbackResponse": { + "properties": {}, + "id": "RollbackResponse", + "description": "The response for Datastore.Rollback.\n(an empty message).", + "type": "object" + }, + "MutationResult": { + "description": "The result of applying a mutation.", + "type": "object", + "properties": { + "version": { + "description": "The version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.", + "format": "int64", + "type": "string" + }, + "conflictDetected": { + "description": "Whether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation.", + "type": "boolean" }, "key": { - "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example,\nan entity in `Value.entity_value` may have no key).\nAn entity's kind is its key path's last element's kind,\nor null if it has no key.", - "$ref": "Key" + "$ref": "Key", + "description": "The automatically allocated key.\nSet only when the mutation allocated a key." } }, - "id": "Entity" + "id": "MutationResult" }, "GqlQuery": { "description": "A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", @@ -813,17 +630,17 @@ "description": "A string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).", "type": "string" }, - "namedBindings": { - "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.", - "additionalProperties": { - "$ref": "GqlQueryParameter" - }, - "type": "object" - }, "allowLiterals": { "description": "When false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.", "type": "boolean" }, + "namedBindings": { + "additionalProperties": { + "$ref": "GqlQueryParameter" + }, + "description": "For each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `A-Za-z_$*`, must not match regex\n`__.*__`, and must not be `\"\"`.", + "type": "object" + }, "positionalBindings": { "description": "Numbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true.", "type": "array", @@ -834,56 +651,34 @@ }, "id": "GqlQuery" }, - "Mutation": { - "description": "A mutation to apply to an entity.", - "type": "object", + "Filter": { "properties": { - "insert": { - "description": "The entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete.", - "$ref": "Entity" + "compositeFilter": { + "description": "A composite filter.", + "$ref": "CompositeFilter" }, - "update": { - "description": "The entity to update. The entity must already exist.\nMust have a complete key path.", - "$ref": "Entity" - }, - "baseVersion": { - "description": "The version of the entity that this mutation is being applied to. If this\ndoes not match the current version on the server, the mutation conflicts.", - "type": "string", - "format": "int64" - }, - "upsert": { - "description": "The entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete.", - "$ref": "Entity" - }, - "delete": { - "description": "The key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only.", - "$ref": "Key" + "propertyFilter": { + "$ref": "PropertyFilter", + "description": "A filter on a property." } }, - "id": "Mutation" + "id": "Filter", + "description": "A holder for any type of filter.", + "type": "object" }, - "CommitResponse": { - "description": "The response for Datastore.Commit.", + "RollbackRequest": { + "description": "The request for Datastore.Rollback.", "type": "object", "properties": { - "mutationResults": { - "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.", - "type": "array", - "items": { - "$ref": "MutationResult" - } - }, - "indexUpdates": { - "description": "The number of index entries updated during the commit, or zero if none were\nupdated.", - "type": "integer", - "format": "int32" + "transaction": { + "description": "The transaction identifier, returned by a call to\nDatastore.BeginTransaction.", + "format": "byte", + "type": "string" } }, - "id": "CommitResponse" + "id": "RollbackRequest" }, "RunQueryRequest": { - "description": "The request for Datastore.RunQuery.", - "type": "object", "properties": { "partitionId": { "description": "Entities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID.", @@ -898,178 +693,383 @@ "$ref": "ReadOptions" }, "query": { - "description": "The query to run.", - "$ref": "Query" + "$ref": "Query", + "description": "The query to run." } }, - "id": "RunQueryRequest" - }, - "LookupRequest": { - "description": "The request for Datastore.Lookup.", - "type": "object", - "properties": { - "readOptions": { - "description": "The options for this lookup request.", - "$ref": "ReadOptions" - }, - "keys": { - "description": "Keys of entities to look up.", - "type": "array", - "items": { - "$ref": "Key" - } - } - }, - "id": "LookupRequest" - }, - "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "type": "object", - "properties": { - "latitude": { - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "type": "number", - "format": "double" - }, - "longitude": { - "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", - "type": "number", - "format": "double" - } - }, - "id": "LatLng" + "id": "RunQueryRequest", + "description": "The request for Datastore.RunQuery.", + "type": "object" }, "CompositeFilter": { "description": "A filter that merges multiple other filters using the given operator.", "type": "object", "properties": { - "op": { - "description": "The operator for combining multiple filters.", - "enum": [ - "OPERATOR_UNSPECIFIED", - "AND" - ], - "enumDescriptions": [ - "Unspecified. This value must not be used.", - "The results are required to satisfy each of the combined filters." - ], - "type": "string" - }, "filters": { "description": "The list of filters to combine.\nMust contain at least one filter.", "type": "array", "items": { "$ref": "Filter" } + }, + "op": { + "enum": [ + "OPERATOR_UNSPECIFIED", + "AND" + ], + "description": "The operator for combining multiple filters.", + "type": "string", + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "The results are required to satisfy each of the combined filters." + ] } }, "id": "CompositeFilter" + }, + "AllocateIdsResponse": { + "description": "The response for Datastore.AllocateIds.", + "type": "object", + "properties": { + "keys": { + "description": "The keys specified in the request (in the same order), each with\nits key path completed with a newly allocated ID.", + "type": "array", + "items": { + "$ref": "Key" + } + } + }, + "id": "AllocateIdsResponse" + }, + "Query": { + "properties": { + "endCursor": { + "description": "An ending point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", + "format": "byte", + "type": "string" + }, + "limit": { + "description": "The maximum number of results to return. Applies after all other\nconstraints. Optional.\nUnspecified is interpreted as no limit.\nMust be \u003e= 0 if specified.", + "format": "int32", + "type": "integer" + }, + "filter": { + "$ref": "Filter", + "description": "The filter to apply." + }, + "offset": { + "description": "The number of results to skip. Applies before limit, but after all other\nconstraints. Optional. Must be \u003e= 0 if specified.", + "format": "int32", + "type": "integer" + }, + "startCursor": { + "description": "A starting point for the query results. Query cursors are\nreturned in query result batches and\n[can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).", + "format": "byte", + "type": "string" + }, + "kind": { + "description": "The kinds to query (if empty, returns entities of all kinds).\nCurrently at most 1 kind may be specified.", + "type": "array", + "items": { + "$ref": "KindExpression" + } + }, + "distinctOn": { + "description": "The properties to make distinct. The query results will contain the first\nresult for each distinct combination of values for the given properties\n(if empty, all results are returned).", + "type": "array", + "items": { + "$ref": "PropertyReference" + } + }, + "order": { + "description": "The order to apply to the query results (if empty, order is unspecified).", + "type": "array", + "items": { + "$ref": "PropertyOrder" + } + }, + "projection": { + "description": "The projection to return. Defaults to returning all properties.", + "type": "array", + "items": { + "$ref": "Projection" + } + } + }, + "id": "Query", + "description": "A query for entities.", + "type": "object" + }, + "PropertyFilter": { + "properties": { + "value": { + "$ref": "Value", + "description": "The value to compare the property to." + }, + "property": { + "$ref": "PropertyReference", + "description": "The property to filter by." + }, + "op": { + "enumDescriptions": [ + "Unspecified. This value must not be used.", + "Less than.", + "Less than or equal.", + "Greater than.", + "Greater than or equal.", + "Equal.", + "Has ancestor." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "LESS_THAN", + "LESS_THAN_OR_EQUAL", + "GREATER_THAN", + "GREATER_THAN_OR_EQUAL", + "EQUAL", + "HAS_ANCESTOR" + ], + "description": "The operator to filter by.", + "type": "string" + } + }, + "id": "PropertyFilter", + "description": "A filter on a specific property.", + "type": "object" + }, + "EntityResult": { + "properties": { + "cursor": { + "description": "A cursor that points to the position after the result entity.\nSet only when the `EntityResult` is part of a `QueryResultBatch` message.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "The version of the entity, a strictly positive number that monotonically\nincreases with changes to the entity.\n\nThis field is set for `FULL` entity\nresults.\n\nFor missing entities in `LookupResponse`, this\nis the version of the snapshot that was used to look up the entity, and it\nis always set except for eventually consistent reads.", + "format": "int64", + "type": "string" + }, + "entity": { + "description": "The resulting entity.", + "$ref": "Entity" + } + }, + "id": "EntityResult", + "description": "The result of fetching an entity from Datastore.", + "type": "object" + }, + "CommitResponse": { + "properties": { + "mutationResults": { + "description": "The result of performing the mutations.\nThe i-th mutation result corresponds to the i-th mutation in the request.", + "type": "array", + "items": { + "$ref": "MutationResult" + } + }, + "indexUpdates": { + "description": "The number of index entries updated during the commit, or zero if none were\nupdated.", + "format": "int32", + "type": "integer" + } + }, + "id": "CommitResponse", + "description": "The response for Datastore.Commit.", + "type": "object" + }, + "Value": { + "properties": { + "entityValue": { + "$ref": "Entity", + "description": "An entity value.\n\n- May have no key.\n- May have a key with an incomplete key path.\n- May have a reserved/read-only key." + }, + "geoPointValue": { + "$ref": "LatLng", + "description": "A geo point value representing a point on the surface of Earth." + }, + "integerValue": { + "description": "An integer value.", + "format": "int64", + "type": "string" + }, + "keyValue": { + "$ref": "Key", + "description": "A key value." + }, + "stringValue": { + "description": "A UTF-8 encoded string value.\nWhen `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.\nOtherwise, may be set to at least 1,000,000 bytes.", + "type": "string" + }, + "excludeFromIndexes": { + "description": "If the value should be excluded from all indexes including those defined\nexplicitly.", + "type": "boolean" + }, + "doubleValue": { + "description": "A double value.", + "format": "double", + "type": "number" + }, + "timestampValue": { + "description": "A timestamp value.\nWhen stored in the Datastore, precise only to microseconds;\nany additional precision is rounded down.", + "format": "google-datetime", + "type": "string" + }, + "nullValue": { + "enumDescriptions": [ + "Null value." + ], + "enum": [ + "NULL_VALUE" + ], + "description": "A null value.", + "type": "string" + }, + "booleanValue": { + "description": "A boolean value.", + "type": "boolean" + }, + "blobValue": { + "description": "A blob value.\nMay have at most 1,000,000 bytes.\nWhen `exclude_from_indexes` is false, may have at most 1500 bytes.\nIn JSON requests, must be base64-encoded.", + "format": "byte", + "type": "string" + }, + "meaning": { + "description": "The `meaning` field should only be populated for backwards compatibility.", + "format": "int32", + "type": "integer" + }, + "arrayValue": { + "$ref": "ArrayValue", + "description": "An array value.\nCannot contain another array value.\nA `Value` instance that sets field `array_value` must not set fields\n`meaning` or `exclude_from_indexes`." + } + }, + "id": "Value", + "description": "A message that can hold any of the supported value types and associated\nmetadata.", + "type": "object" + }, + "PartitionId": { + "properties": { + "namespaceId": { + "description": "If not empty, the ID of the namespace to which the entities belong.", + "type": "string" + }, + "projectId": { + "description": "The ID of the project to which the entities belong.", + "type": "string" + } + }, + "id": "PartitionId", + "description": "A partition ID identifies a grouping of entities. The grouping is always\nby project and namespace, however the namespace ID may be empty.\n\nA partition ID contains several dimensions:\nproject ID and namespace ID.\n\nPartition dimensions:\n\n- May be `\"\"`.\n- Must be valid UTF-8 bytes.\n- Must have values that match regex `[A-Za-z\\d\\.\\-_]{1,100}`\nIf the value of any dimension matches regex `__.*__`, the partition is\nreserved/read-only.\nA reserved/read-only partition ID is forbidden in certain documented\ncontexts.\n\nForeign partition IDs (in which the project ID does\nnot match the context project ID ) are discouraged.\nReads and writes of foreign partition IDs may fail if the project is not in an active state.", + "type": "object" + }, + "Entity": { + "properties": { + "properties": { + "additionalProperties": { + "$ref": "Value" + }, + "description": "The entity's properties.\nThe map's keys are property names.\nA property name matching regex `__.*__` is reserved.\nA reserved property name is forbidden in certain documented contexts.\nThe name must not contain more than 500 characters.\nThe name cannot be `\"\"`.", + "type": "object" + }, + "key": { + "$ref": "Key", + "description": "The entity's key.\n\nAn entity must have a key, unless otherwise documented (for example,\nan entity in `Value.entity_value` may have no key).\nAn entity's kind is its key path's last element's kind,\nor null if it has no key." + } + }, + "id": "Entity", + "description": "A Datastore data object.\n\nAn entity is limited to 1 megabyte when stored. That _roughly_\ncorresponds to a limit of 1 megabyte for the serialized form of this\nmessage.", + "type": "object" + }, + "LookupRequest": { + "description": "The request for Datastore.Lookup.", + "type": "object", + "properties": { + "keys": { + "description": "Keys of entities to look up.", + "type": "array", + "items": { + "$ref": "Key" + } + }, + "readOptions": { + "$ref": "ReadOptions", + "description": "The options for this lookup request." + } + }, + "id": "LookupRequest" + }, + "QueryResultBatch": { + "properties": { + "endCursor": { + "description": "A cursor that points to the position after the last result in the batch.", + "format": "byte", + "type": "string" + }, + "moreResults": { + "enumDescriptions": [ + "Unspecified. This value is never used.", + "There may be additional batches to fetch from this query.", + "The query is finished, but there may be more results after the limit.", + "The query is finished, but there may be more results after the end\ncursor.", + "The query has been exhausted." + ], + "enum": [ + "MORE_RESULTS_TYPE_UNSPECIFIED", + "NOT_FINISHED", + "MORE_RESULTS_AFTER_LIMIT", + "MORE_RESULTS_AFTER_CURSOR", + "NO_MORE_RESULTS" + ], + "description": "The state of the query after the current batch.", + "type": "string" + }, + "snapshotVersion": { + "description": "The version number of the snapshot this batch was returned from.\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\n\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.\nThe value will be zero for eventually consistent queries.", + "format": "int64", + "type": "string" + }, + "skippedCursor": { + "description": "A cursor that points to the position after the last skipped result.\nWill be set when `skipped_results` != 0.", + "format": "byte", + "type": "string" + }, + "skippedResults": { + "description": "The number of results skipped, typically because of an offset.", + "format": "int32", + "type": "integer" + }, + "entityResultType": { + "enumDescriptions": [ + "Unspecified. This value is never used.", + "The key and properties.", + "A projected subset of properties. The entity may have no key.", + "Only the key." + ], + "enum": [ + "RESULT_TYPE_UNSPECIFIED", + "FULL", + "PROJECTION", + "KEY_ONLY" + ], + "description": "The result type for every entity in `entity_results`.", + "type": "string" + }, + "entityResults": { + "description": "The results for this batch.", + "type": "array", + "items": { + "$ref": "EntityResult" + } + } + }, + "id": "QueryResultBatch", + "description": "A batch of results produced by a query.", + "type": "object" } }, - "revision": "20161108", - "basePath": "", + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "version_module": "True", - "discoveryVersion": "v1", - "baseUrl": "https://datastore.googleapis.com/", - "name": "datastore", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - } - }, - "documentationLink": "https://cloud.google.com/datastore/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v1beta3", - "rootUrl": "https://datastore.googleapis.com/", - "kind": "discovery#restDescription" + } } diff --git a/etc/api/deploymentmanager/v2/deploymentmanager-api.json b/etc/api/deploymentmanager/v2/deploymentmanager-api.json index 67f49c6ee3..afd01a7680 100644 --- a/etc/api/deploymentmanager/v2/deploymentmanager-api.json +++ b/etc/api/deploymentmanager/v2/deploymentmanager-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/OCYmftvQxj4AeJHkXNi3Nl_Kgng\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/llynIIguUtQGZnafw0-LKyjVFvE\"", "discoveryVersion": "v1", "id": "deploymentmanager:v2", "name": "deploymentmanager", "canonicalName": "Deployment Manager", "version": "v2", - "revision": "20161209", + "revision": "20170501", "title": "Google Cloud Deployment Manager API", "description": "Declares, configures, and deploys complex solutions on Google Cloud Platform.", "ownerDomain": "google.com", @@ -89,36 +89,36 @@ "AuditConfig": { "id": "AuditConfig", "type": "object", - "description": "Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types.", + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:bar@gmail.com\" ] } ] } ] }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.", "properties": { "auditLogConfigs": { "type": "array", - "description": "The configuration for each type of logging", + "description": "The configuration for logging of each type of permission.", "items": { "$ref": "AuditLogConfig" } }, "exemptedMembers": { "type": "array", - "description": "Specifies the identities that are exempted from \"data access\" audit logging for the `service` specified above. Follows the same format of Binding.members.", + "description": "", "items": { "type": "string" } }, "service": { "type": "string", - "description": "Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services." + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services." } } }, "AuditLogConfig": { "id": "AuditLogConfig", "type": "object", - "description": "Provides the configuration for a sub-type of logging.", + "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.", "properties": { "exemptedMembers": { "type": "array", - "description": "Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members.", + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].", "items": { "type": "string" } @@ -265,6 +265,10 @@ "type": "object", "description": "", "properties": { + "description": { + "type": "string", + "description": "[Output Only] An optional user-provided description of the deployment after the current update has been applied." + }, "labels": { "type": "array", "description": "[Output Only] Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?", @@ -445,7 +449,7 @@ }, "creationTimestamp": { "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." + "description": "[Deprecated] This field is deprecated." }, "description": { "type": "string", @@ -616,7 +620,7 @@ "properties": { "auditConfigs": { "type": "array", - "description": "Specifies audit logging configs for \"data access\". \"data access\": generally refers to data reads/writes and admin reads. \"admin activity\": generally refers to admin writes.\n\nNote: `AuditConfig` doesn't apply to \"admin activity\", which always enables audit logging.", + "description": "Specifies cloud audit logging configuration for this policy.", "items": { "$ref": "AuditConfig" } @@ -1199,11 +1203,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -1552,11 +1555,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -1642,11 +1644,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -1746,11 +1747,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { @@ -1802,11 +1802,10 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", "default": "500", "format": "uint32", "minimum": "0", - "maximum": "500", "location": "query" }, "orderBy": { diff --git a/etc/api/dfareporting/v2.5/dfareporting-api.json b/etc/api/dfareporting/v2.5/dfareporting-api.json index c51e040b55..446040f94e 100644 --- a/etc/api/dfareporting/v2.5/dfareporting-api.json +++ b/etc/api/dfareporting/v2.5/dfareporting-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/NjTto7z56uIMZ6dXu1KlAZzPglQ\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/PSjQ5INR52Dur7bcP5lv0bNnJhE\"", "discoveryVersion": "v1", "id": "dfareporting:v2.5", "name": "dfareporting", "version": "v2.5", - "revision": "20161027", + "revision": "20170428", "title": "DCM/DFA Reporting And Trafficking API", "description": "Manages your DoubleClick Campaign Manager ad campaigns and reports.", "ownerDomain": "google.com", @@ -116,6 +116,7 @@ "description": "Maximum number of active ads allowed for this account.", "enum": [ "ACTIVE_ADS_TIER_100K", + "ACTIVE_ADS_TIER_1M", "ACTIVE_ADS_TIER_200K", "ACTIVE_ADS_TIER_300K", "ACTIVE_ADS_TIER_40K", @@ -130,6 +131,7 @@ "", "", "", + "", "" ] }, @@ -156,7 +158,7 @@ }, "currencyId": { "type": "string", - "description": "ID of currency associated with this account. This is a required field.\nAcceptable values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK", + "description": "ID of currency associated with this account. This is a required field.\nAcceptable values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK \n- \"49\" for MXN", "format": "int64" }, "defaultCreativeSizeId": { @@ -184,7 +186,7 @@ }, "maximumImageSize": { "type": "string", - "description": "Maximum image size allowed for this account.", + "description": "Maximum image size allowed for this account, in kilobytes. Value must be greater than or equal to 1.", "format": "int64" }, "name": { @@ -201,7 +203,7 @@ }, "teaserSizeLimit": { "type": "string", - "description": "File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 and 10240.", + "description": "File size limit in kilobytes of Rich Media teaser creatives. Acceptable values are 1 to 10240, inclusive.", "format": "int64" } } @@ -226,6 +228,7 @@ "description": "Maximum number of active ads allowed for the account.", "enum": [ "ACTIVE_ADS_TIER_100K", + "ACTIVE_ADS_TIER_1M", "ACTIVE_ADS_TIER_200K", "ACTIVE_ADS_TIER_300K", "ACTIVE_ADS_TIER_40K", @@ -240,6 +243,7 @@ "", "", "", + "", "" ] }, @@ -985,7 +989,7 @@ "properties": { "allocation": { "type": "integer", - "description": "Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group.", + "description": "Weight allocated to this segment. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. Acceptable values are 1 to 1000, inclusive.", "format": "int32" }, "id": { @@ -1795,7 +1799,7 @@ }, "status": { "type": "array", - "description": "The status of each conversion's insertion status. The status is returned in the same order that conversions are inserted.", + "description": "The insert status of each conversion. Statuses are returned in the same order that conversions are inserted.", "items": { "$ref": "ConversionStatus" } @@ -2452,7 +2456,7 @@ }, "customStartTimeValue": { "type": "integer", - "description": "Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA.", + "description": "Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. Value must be greater than or equal to 0.", "format": "int32" }, "detectedFeatures": { @@ -2628,7 +2632,7 @@ }, "duration": { "type": "integer", - "description": "Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO.", + "description": "Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1.", "format": "int32" }, "durationType": { @@ -2730,7 +2734,7 @@ }, "pushdownDuration": { "type": "number", - "description": "Pushdown duration in seconds for an asset. Must be between 0 and 9.99. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height.", + "description": "Pushdown duration in seconds for an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. Acceptable values are 0 to 9.99, inclusive.", "format": "float" }, "role": { @@ -2810,7 +2814,7 @@ }, "zIndex": { "type": "integer", - "description": "zIndex value of an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY.", + "description": "zIndex value of an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable values are -999999999 to 999999999, inclusive.", "format": "int32" }, "zipFilename": { @@ -3124,14 +3128,14 @@ }, "richMediaExitOverrides": { "type": "array", - "description": "Rich media exit overrides for this creative assignment.\nApplicable when the creative type is any of the following: \n- RICH_MEDIA_INPAGE\n- RICH_MEDIA_INPAGE_FLOATING\n- RICH_MEDIA_IM_EXPAND\n- RICH_MEDIA_EXPANDING\n- RICH_MEDIA_INTERSTITIAL_FLOAT\n- RICH_MEDIA_MOBILE_IN_APP\n- RICH_MEDIA_MULTI_FLOATING\n- RICH_MEDIA_PEEL_DOWN\n- ADVANCED_BANNER\n- VPAID_LINEAR\n- VPAID_NON_LINEAR", + "description": "Rich media exit overrides for this creative assignment.\nApplicable when the creative type is any of the following: \n- DISPLAY\n- RICH_MEDIA_INPAGE\n- RICH_MEDIA_INPAGE_FLOATING\n- RICH_MEDIA_IM_EXPAND\n- RICH_MEDIA_EXPANDING\n- RICH_MEDIA_INTERSTITIAL_FLOAT\n- RICH_MEDIA_MOBILE_IN_APP\n- RICH_MEDIA_MULTI_FLOATING\n- RICH_MEDIA_PEEL_DOWN\n- VPAID_LINEAR\n- VPAID_NON_LINEAR", "items": { "$ref": "RichMediaExitOverride" } }, "sequence": { "type": "integer", - "description": "Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL.", + "description": "Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable values are 1 to 65535, inclusive.", "format": "int32" }, "sslCompliant": { @@ -3145,7 +3149,7 @@ }, "weight": { "type": "integer", - "description": "Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM.", + "description": "Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater than or equal to 1.", "format": "int32" } } @@ -3380,7 +3384,7 @@ }, "groupNumber": { "type": "integer", - "description": "Subgroup of the creative group. Assign your creative groups to one of the following subgroups in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion.\nAcceptable values are: \n- 1\n- 2", + "description": "Subgroup of the creative group. Assign your creative groups to a subgroup in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. Acceptable values are 1 to 2, inclusive.", "format": "int32" }, "id": { @@ -3952,7 +3956,7 @@ }, "hoursOfDay": { "type": "array", - "description": "Hours of the day when the ad will serve. Must be an integer between 0 and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example, if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm.", + "description": "Hours of the day when the ad will serve, where 0 is midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.", "items": { "type": "integer", "format": "int32" @@ -3995,7 +3999,7 @@ }, "impressionRatio": { "type": "string", - "description": "Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Must be between 1 and 10.", + "description": "Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Acceptable values are 1 to 10, inclusive.", "format": "int64" }, "priority": { @@ -4240,17 +4244,17 @@ }, "countryId": { "type": "string", - "description": "Country ID of this directory site.", + "description": "Country ID of this directory site. This is a read-only field.", "format": "int64" }, "currencyId": { "type": "string", - "description": "Currency ID of this directory site.\nPossible values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK", + "description": "Currency ID of this directory site. This is a read-only field.\nPossible values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK \n- \"49\" for MXN", "format": "int64" }, "description": { "type": "string", - "description": "Description of this directory site." + "description": "Description of this directory site. This is a read-only field." }, "id": { "type": "string", @@ -4950,7 +4954,7 @@ }, "cacheBustingType": { "type": "string", - "description": "Code type used for cache busting in the generated tag.", + "description": "Code type used for cache busting in the generated tag. Applicable only when floodlightActivityGroupType is COUNTER and countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.", "enum": [ "ACTIVE_SERVER_PAGE", "COLD_FUSION", @@ -5639,12 +5643,12 @@ "properties": { "duration": { "type": "string", - "description": "Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days in seconds, or 7,776,000.", + "description": "Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days. Acceptable values are 1 to 7776000, inclusive.", "format": "int64" }, "impressions": { "type": "string", - "description": "Number of times an individual user can be served the ad within the specified duration. The maximum allowed is 15.", + "description": "Number of times an individual user can be served the ad within the specified duration. Acceptable values are 1 to 15, inclusive.", "format": "int64" } } @@ -6063,12 +6067,12 @@ "properties": { "clickDuration": { "type": "integer", - "description": "Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used.", + "description": "Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive.", "format": "int32" }, "postImpressionActivitiesDuration": { "type": "integer", - "description": "Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used.", + "description": "Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive.", "format": "int32" } } @@ -6378,7 +6382,7 @@ }, "weight": { "type": "integer", - "description": "Weight associated with this optimization. Must be greater than 1. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities.", + "description": "Weight associated with this optimization. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. Value must be greater than or equal to 1.", "format": "int32" } } @@ -6907,7 +6911,7 @@ }, "tagFormats": { "type": "array", - "description": "Tag formats to generate for this placement. This field is required on insertion.\nAcceptable values are:\n- \"PLACEMENT_TAG_STANDARD\"\n- \"PLACEMENT_TAG_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_IFRAME_ILAYER\"\n- \"PLACEMENT_TAG_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT\"\n- \"PLACEMENT_TAG_CLICK_COMMANDS\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH\"\n- \"PLACEMENT_TAG_TRACKING\"\n- \"PLACEMENT_TAG_TRACKING_IFRAME\"\n- \"PLACEMENT_TAG_TRACKING_JAVASCRIPT\"", + "description": "Tag formats to generate for this placement. This field is required on insertion.\nAcceptable values are:\n- \"PLACEMENT_TAG_STANDARD\"\n- \"PLACEMENT_TAG_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_IFRAME_ILAYER\"\n- \"PLACEMENT_TAG_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT\"\n- \"PLACEMENT_TAG_CLICK_COMMANDS\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4\"\n- \"PLACEMENT_TAG_TRACKING\"\n- \"PLACEMENT_TAG_TRACKING_IFRAME\"\n- \"PLACEMENT_TAG_TRACKING_JAVASCRIPT\"", "items": { "type": "string", "enum": [ @@ -6917,6 +6921,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -6948,6 +6953,7 @@ "", "", "", + "", "" ] } @@ -7554,7 +7560,7 @@ }, "rateOrCostNanos": { "type": "string", - "description": "Rate or cost of this pricing period.", + "description": "Rate or cost of this pricing period in nanos (i.e., multipled by 1000000000). Acceptable values are 0 to 1000000000000000000, inclusive.", "format": "int64" }, "startDate": { @@ -7564,7 +7570,7 @@ }, "units": { "type": "string", - "description": "Units of this pricing period.", + "description": "Units of this pricing period. Acceptable values are 0 to 10000000000, inclusive.", "format": "int64" } } @@ -7902,7 +7908,7 @@ }, "lifeSpan": { "type": "string", - "description": "Number of days that a user should remain in the remarketing list without an impression.", + "description": "Number of days that a user should remain in the remarketing list without an impression. Acceptable values are 1 to 540, inclusive.", "format": "int64" }, "listPopulationRule": { @@ -8838,7 +8844,7 @@ "properties": { "height": { "type": "integer", - "description": "Height of this size.", + "description": "Height of this size. Acceptable values are 0 to 32767, inclusive.", "format": "int32" }, "iab": { @@ -8857,7 +8863,7 @@ }, "width": { "type": "integer", - "description": "Width of this size.", + "description": "Width of this size. Acceptable values are 0 to 32767, inclusive.", "format": "int32" } } @@ -8973,7 +8979,7 @@ "properties": { "adId": { "type": "string", - "description": "Ad associated with this placement tag.", + "description": "Ad associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING.", "format": "int64" }, "clickTag": { @@ -8982,7 +8988,7 @@ }, "creativeId": { "type": "string", - "description": "Creative associated with this placement tag.", + "description": "Creative associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING.", "format": "int64" }, "format": { @@ -8995,6 +9001,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -9026,6 +9033,7 @@ "", "", "", + "", "" ] }, @@ -10050,7 +10058,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10073,6 +10084,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10085,7 +10097,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10238,7 +10251,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10261,6 +10277,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10273,7 +10290,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10568,7 +10586,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "overriddenEventTagId": { @@ -10618,6 +10639,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10630,7 +10652,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10850,7 +10873,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10873,6 +10899,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10885,7 +10912,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11067,7 +11095,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "onlyParent": { @@ -11095,6 +11126,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11107,7 +11139,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11293,7 +11326,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -11310,7 +11346,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11457,7 +11494,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "overriddenEventTagId": { @@ -11486,6 +11526,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11498,7 +11539,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11688,7 +11730,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "minChangeTime": { @@ -12047,7 +12092,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12070,6 +12118,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -12082,7 +12131,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12452,7 +12502,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12475,6 +12528,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "VALUE" @@ -12487,7 +12541,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12703,7 +12758,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12726,6 +12784,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -12738,7 +12797,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12902,6 +12962,8 @@ "type": "integer", "description": "Select only creative groups that belong to this subgroup.", "format": "int32", + "minimum": "1", + "maximum": "2", "location": "query" }, "ids": { @@ -12914,7 +12976,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12937,6 +13002,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -12949,7 +13015,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13148,7 +13215,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13185,6 +13255,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13197,7 +13268,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13448,7 +13520,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13471,6 +13546,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13483,7 +13559,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13615,7 +13692,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13644,6 +13724,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13656,7 +13737,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13987,6 +14069,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13999,7 +14082,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14381,7 +14465,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -14404,6 +14491,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14416,7 +14504,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14596,7 +14685,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -14619,6 +14711,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14631,7 +14724,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14922,7 +15016,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "orderId": { @@ -14961,6 +15058,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14973,7 +15071,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15508,7 +15607,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "orderId": { @@ -15552,6 +15654,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15564,7 +15667,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15647,7 +15751,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -15684,6 +15791,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15696,7 +15804,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15836,7 +15945,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "800", "format": "int32", + "minimum": "0", + "maximum": "800", "location": "query" }, "maxStartDate": { @@ -15923,6 +16035,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15935,7 +16048,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16127,7 +16241,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -16150,6 +16267,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16162,7 +16280,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16286,6 +16405,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -16317,6 +16437,7 @@ "", "", "", + "", "" ], "repeated": true, @@ -16473,7 +16594,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "maxStartDate": { @@ -16567,6 +16691,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16579,7 +16704,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16841,7 +16967,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -16864,6 +16993,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16876,7 +17006,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17114,7 +17245,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "name": { @@ -17137,6 +17271,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -17149,7 +17284,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17783,7 +17919,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -17806,6 +17945,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -17818,7 +17958,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17986,6 +18127,8 @@ "type": "integer", "description": "Select only sizes with this height.", "format": "int32", + "minimum": "0", + "maximum": "32767", "location": "query" }, "iabStandard": { @@ -18011,6 +18154,8 @@ "type": "integer", "description": "Select only sizes with this width.", "format": "int32", + "minimum": "0", + "maximum": "32767", "location": "query" } }, @@ -18103,7 +18248,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18126,6 +18274,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18138,7 +18287,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18279,7 +18429,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "name": { @@ -18302,6 +18455,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18314,7 +18468,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18619,7 +18774,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18642,6 +18800,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18654,7 +18813,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" diff --git a/etc/api/dfareporting/v2.5beta1/dfareporting-api.json b/etc/api/dfareporting/v2.5beta1/dfareporting-api.json index f6035dbcd8..fdd2573959 100644 --- a/etc/api/dfareporting/v2.5beta1/dfareporting-api.json +++ b/etc/api/dfareporting/v2.5beta1/dfareporting-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/IuF-UJwb7L5VgOXQMERaZkF35jI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/6fZWToVH2wMo5mVXtzdjGQ53PmI\"", "discoveryVersion": "v1", "id": "dfareporting:v2.5beta1", "name": "dfareporting", "version": "v2.5beta1", - "revision": "20161027", + "revision": "20170428", "title": "DCM/DFA Reporting And Trafficking API", "description": "Manages your DoubleClick Campaign Manager ad campaigns and reports.", "ownerDomain": "google.com", @@ -116,6 +116,7 @@ "description": "Maximum number of active ads allowed for this account.", "enum": [ "ACTIVE_ADS_TIER_100K", + "ACTIVE_ADS_TIER_1M", "ACTIVE_ADS_TIER_200K", "ACTIVE_ADS_TIER_300K", "ACTIVE_ADS_TIER_40K", @@ -130,6 +131,7 @@ "", "", "", + "", "" ] }, @@ -156,7 +158,7 @@ }, "currencyId": { "type": "string", - "description": "ID of currency associated with this account. This is a required field.\nAcceptable values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK", + "description": "ID of currency associated with this account. This is a required field.\nAcceptable values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK \n- \"49\" for MXN", "format": "int64" }, "defaultCreativeSizeId": { @@ -184,7 +186,7 @@ }, "maximumImageSize": { "type": "string", - "description": "Maximum image size allowed for this account.", + "description": "Maximum image size allowed for this account, in kilobytes. Value must be greater than or equal to 1.", "format": "int64" }, "name": { @@ -201,7 +203,7 @@ }, "teaserSizeLimit": { "type": "string", - "description": "File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 and 10240.", + "description": "File size limit in kilobytes of Rich Media teaser creatives. Acceptable values are 1 to 10240, inclusive.", "format": "int64" } } @@ -226,6 +228,7 @@ "description": "Maximum number of active ads allowed for the account.", "enum": [ "ACTIVE_ADS_TIER_100K", + "ACTIVE_ADS_TIER_1M", "ACTIVE_ADS_TIER_200K", "ACTIVE_ADS_TIER_300K", "ACTIVE_ADS_TIER_40K", @@ -240,6 +243,7 @@ "", "", "", + "", "" ] }, @@ -985,7 +989,7 @@ "properties": { "allocation": { "type": "integer", - "description": "Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group.", + "description": "Weight allocated to this segment. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. Acceptable values are 1 to 1000, inclusive.", "format": "int32" }, "id": { @@ -1795,7 +1799,7 @@ }, "status": { "type": "array", - "description": "The status of each conversion's insertion status. The status is returned in the same order that conversions are inserted.", + "description": "The insert status of each conversion. Statuses are returned in the same order that conversions are inserted.", "items": { "$ref": "ConversionStatus" } @@ -2452,7 +2456,7 @@ }, "customStartTimeValue": { "type": "integer", - "description": "Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA.", + "description": "Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. Value must be greater than or equal to 0.", "format": "int32" }, "detectedFeatures": { @@ -2730,7 +2734,7 @@ }, "pushdownDuration": { "type": "number", - "description": "Pushdown duration in seconds for an asset. Must be between 0 and 9.99. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height.", + "description": "Pushdown duration in seconds for an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. Acceptable values are 0 to 9.99, inclusive.", "format": "float" }, "role": { @@ -2810,7 +2814,7 @@ }, "zIndex": { "type": "integer", - "description": "zIndex value of an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY.", + "description": "zIndex value of an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable values are -999999999 to 999999999, inclusive.", "format": "int32" }, "zipFilename": { @@ -3124,14 +3128,14 @@ }, "richMediaExitOverrides": { "type": "array", - "description": "Rich media exit overrides for this creative assignment.\nApplicable when the creative type is any of the following: \n- RICH_MEDIA_INPAGE\n- RICH_MEDIA_INPAGE_FLOATING\n- RICH_MEDIA_IM_EXPAND\n- RICH_MEDIA_EXPANDING\n- RICH_MEDIA_INTERSTITIAL_FLOAT\n- RICH_MEDIA_MOBILE_IN_APP\n- RICH_MEDIA_MULTI_FLOATING\n- RICH_MEDIA_PEEL_DOWN\n- ADVANCED_BANNER\n- VPAID_LINEAR\n- VPAID_NON_LINEAR", + "description": "Rich media exit overrides for this creative assignment.\nApplicable when the creative type is any of the following: \n- DISPLAY\n- RICH_MEDIA_INPAGE\n- RICH_MEDIA_INPAGE_FLOATING\n- RICH_MEDIA_IM_EXPAND\n- RICH_MEDIA_EXPANDING\n- RICH_MEDIA_INTERSTITIAL_FLOAT\n- RICH_MEDIA_MOBILE_IN_APP\n- RICH_MEDIA_MULTI_FLOATING\n- RICH_MEDIA_PEEL_DOWN\n- VPAID_LINEAR\n- VPAID_NON_LINEAR", "items": { "$ref": "RichMediaExitOverride" } }, "sequence": { "type": "integer", - "description": "Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL.", + "description": "Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable values are 1 to 65535, inclusive.", "format": "int32" }, "sslCompliant": { @@ -3145,7 +3149,7 @@ }, "weight": { "type": "integer", - "description": "Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM.", + "description": "Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater than or equal to 1.", "format": "int32" } } @@ -3380,7 +3384,7 @@ }, "groupNumber": { "type": "integer", - "description": "Subgroup of the creative group. Assign your creative groups to one of the following subgroups in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion.\nAcceptable values are: \n- 1\n- 2", + "description": "Subgroup of the creative group. Assign your creative groups to a subgroup in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. Acceptable values are 1 to 2, inclusive.", "format": "int32" }, "id": { @@ -3952,7 +3956,7 @@ }, "hoursOfDay": { "type": "array", - "description": "Hours of the day when the ad will serve. Must be an integer between 0 and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example, if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm.", + "description": "Hours of the day when the ad will serve, where 0 is midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.", "items": { "type": "integer", "format": "int32" @@ -3995,7 +3999,7 @@ }, "impressionRatio": { "type": "string", - "description": "Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Must be between 1 and 10.", + "description": "Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Acceptable values are 1 to 10, inclusive.", "format": "int64" }, "priority": { @@ -4240,17 +4244,17 @@ }, "countryId": { "type": "string", - "description": "Country ID of this directory site.", + "description": "Country ID of this directory site. This is a read-only field.", "format": "int64" }, "currencyId": { "type": "string", - "description": "Currency ID of this directory site.\nPossible values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK", + "description": "Currency ID of this directory site. This is a read-only field.\nPossible values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK \n- \"49\" for MXN", "format": "int64" }, "description": { "type": "string", - "description": "Description of this directory site." + "description": "Description of this directory site. This is a read-only field." }, "id": { "type": "string", @@ -4950,7 +4954,7 @@ }, "cacheBustingType": { "type": "string", - "description": "Code type used for cache busting in the generated tag.", + "description": "Code type used for cache busting in the generated tag. Applicable only when floodlightActivityGroupType is COUNTER and countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.", "enum": [ "ACTIVE_SERVER_PAGE", "COLD_FUSION", @@ -5639,12 +5643,12 @@ "properties": { "duration": { "type": "string", - "description": "Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days in seconds, or 7,776,000.", + "description": "Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days. Acceptable values are 1 to 7776000, inclusive.", "format": "int64" }, "impressions": { "type": "string", - "description": "Number of times an individual user can be served the ad within the specified duration. The maximum allowed is 15.", + "description": "Number of times an individual user can be served the ad within the specified duration. Acceptable values are 1 to 15, inclusive.", "format": "int64" } } @@ -6063,12 +6067,12 @@ "properties": { "clickDuration": { "type": "integer", - "description": "Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used.", + "description": "Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive.", "format": "int32" }, "postImpressionActivitiesDuration": { "type": "integer", - "description": "Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used.", + "description": "Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive.", "format": "int32" } } @@ -6378,7 +6382,7 @@ }, "weight": { "type": "integer", - "description": "Weight associated with this optimization. Must be greater than 1. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities.", + "description": "Weight associated with this optimization. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. Value must be greater than or equal to 1.", "format": "int32" } } @@ -6907,7 +6911,7 @@ }, "tagFormats": { "type": "array", - "description": "Tag formats to generate for this placement. This field is required on insertion.\nAcceptable values are:\n- \"PLACEMENT_TAG_STANDARD\"\n- \"PLACEMENT_TAG_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_IFRAME_ILAYER\"\n- \"PLACEMENT_TAG_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT\"\n- \"PLACEMENT_TAG_CLICK_COMMANDS\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH\"\n- \"PLACEMENT_TAG_TRACKING\"\n- \"PLACEMENT_TAG_TRACKING_IFRAME\"\n- \"PLACEMENT_TAG_TRACKING_JAVASCRIPT\"", + "description": "Tag formats to generate for this placement. This field is required on insertion.\nAcceptable values are:\n- \"PLACEMENT_TAG_STANDARD\"\n- \"PLACEMENT_TAG_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_IFRAME_ILAYER\"\n- \"PLACEMENT_TAG_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT\"\n- \"PLACEMENT_TAG_CLICK_COMMANDS\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4\"\n- \"PLACEMENT_TAG_TRACKING\"\n- \"PLACEMENT_TAG_TRACKING_IFRAME\"\n- \"PLACEMENT_TAG_TRACKING_JAVASCRIPT\"", "items": { "type": "string", "enum": [ @@ -6917,6 +6921,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -6948,6 +6953,7 @@ "", "", "", + "", "" ] } @@ -7554,7 +7560,7 @@ }, "rateOrCostNanos": { "type": "string", - "description": "Rate or cost of this pricing period.", + "description": "Rate or cost of this pricing period in nanos (i.e., multipled by 1000000000). Acceptable values are 0 to 1000000000000000000, inclusive.", "format": "int64" }, "startDate": { @@ -7564,7 +7570,7 @@ }, "units": { "type": "string", - "description": "Units of this pricing period.", + "description": "Units of this pricing period. Acceptable values are 0 to 10000000000, inclusive.", "format": "int64" } } @@ -7902,7 +7908,7 @@ }, "lifeSpan": { "type": "string", - "description": "Number of days that a user should remain in the remarketing list without an impression.", + "description": "Number of days that a user should remain in the remarketing list without an impression. Acceptable values are 1 to 540, inclusive.", "format": "int64" }, "listPopulationRule": { @@ -8838,7 +8844,7 @@ "properties": { "height": { "type": "integer", - "description": "Height of this size.", + "description": "Height of this size. Acceptable values are 0 to 32767, inclusive.", "format": "int32" }, "iab": { @@ -8857,7 +8863,7 @@ }, "width": { "type": "integer", - "description": "Width of this size.", + "description": "Width of this size. Acceptable values are 0 to 32767, inclusive.", "format": "int32" } } @@ -8973,7 +8979,7 @@ "properties": { "adId": { "type": "string", - "description": "Ad associated with this placement tag.", + "description": "Ad associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING.", "format": "int64" }, "clickTag": { @@ -8982,7 +8988,7 @@ }, "creativeId": { "type": "string", - "description": "Creative associated with this placement tag.", + "description": "Creative associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING.", "format": "int64" }, "format": { @@ -8995,6 +9001,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -9026,6 +9033,7 @@ "", "", "", + "", "" ] }, @@ -10050,7 +10058,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10073,6 +10084,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10085,7 +10097,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10238,7 +10251,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10261,6 +10277,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10273,7 +10290,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10568,7 +10586,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "overriddenEventTagId": { @@ -10618,6 +10639,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10630,7 +10652,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10850,7 +10873,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10873,6 +10899,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10885,7 +10912,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11067,7 +11095,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "onlyParent": { @@ -11095,6 +11126,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11107,7 +11139,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11293,7 +11326,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -11310,7 +11346,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11457,7 +11494,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "overriddenEventTagId": { @@ -11486,6 +11526,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11498,7 +11539,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11688,7 +11730,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "minChangeTime": { @@ -12047,7 +12092,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12070,6 +12118,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -12082,7 +12131,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12452,7 +12502,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12475,6 +12528,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "VALUE" @@ -12487,7 +12541,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12703,7 +12758,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12726,6 +12784,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -12738,7 +12797,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12902,6 +12962,8 @@ "type": "integer", "description": "Select only creative groups that belong to this subgroup.", "format": "int32", + "minimum": "1", + "maximum": "2", "location": "query" }, "ids": { @@ -12914,7 +12976,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12937,6 +13002,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -12949,7 +13015,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13148,7 +13215,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13185,6 +13255,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13197,7 +13268,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13448,7 +13520,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13471,6 +13546,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13483,7 +13559,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13615,7 +13692,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13644,6 +13724,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13656,7 +13737,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13987,6 +14069,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13999,7 +14082,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14381,7 +14465,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -14404,6 +14491,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14416,7 +14504,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14596,7 +14685,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -14619,6 +14711,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14631,7 +14724,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14922,7 +15016,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "orderId": { @@ -14961,6 +15058,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14973,7 +15071,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15508,7 +15607,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "orderId": { @@ -15552,6 +15654,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15564,7 +15667,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15647,7 +15751,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -15684,6 +15791,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15696,7 +15804,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15836,7 +15945,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "800", "format": "int32", + "minimum": "0", + "maximum": "800", "location": "query" }, "maxStartDate": { @@ -15923,6 +16035,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15935,7 +16048,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16127,7 +16241,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -16150,6 +16267,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16162,7 +16280,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16286,6 +16405,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -16317,6 +16437,7 @@ "", "", "", + "", "" ], "repeated": true, @@ -16473,7 +16594,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "maxStartDate": { @@ -16567,6 +16691,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16579,7 +16704,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16841,7 +16967,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -16864,6 +16993,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16876,7 +17006,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17114,7 +17245,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "name": { @@ -17137,6 +17271,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -17149,7 +17284,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17783,7 +17919,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -17806,6 +17945,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -17818,7 +17958,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17986,6 +18127,8 @@ "type": "integer", "description": "Select only sizes with this height.", "format": "int32", + "minimum": "0", + "maximum": "32767", "location": "query" }, "iabStandard": { @@ -18011,6 +18154,8 @@ "type": "integer", "description": "Select only sizes with this width.", "format": "int32", + "minimum": "0", + "maximum": "32767", "location": "query" } }, @@ -18103,7 +18248,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18126,6 +18274,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18138,7 +18287,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18279,7 +18429,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "name": { @@ -18302,6 +18455,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18314,7 +18468,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18619,7 +18774,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18642,6 +18800,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18654,7 +18813,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" diff --git a/etc/api/dfareporting/v2.6/dfareporting-api.json b/etc/api/dfareporting/v2.6/dfareporting-api.json index 3696119c9b..9932a50599 100644 --- a/etc/api/dfareporting/v2.6/dfareporting-api.json +++ b/etc/api/dfareporting/v2.6/dfareporting-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/IUIpYIH18PV9NykwTxBMEWqSYmE\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/mmyTbWh_0Nt00ggr_lCfBuSuwx4\"", "discoveryVersion": "v1", "id": "dfareporting:v2.6", "name": "dfareporting", "version": "v2.6", - "revision": "20161027", + "revision": "20170428", "title": "DCM/DFA Reporting And Trafficking API", "description": "Manages your DoubleClick Campaign Manager ad campaigns and reports.", "ownerDomain": "google.com", @@ -116,6 +116,7 @@ "description": "Maximum number of active ads allowed for this account.", "enum": [ "ACTIVE_ADS_TIER_100K", + "ACTIVE_ADS_TIER_1M", "ACTIVE_ADS_TIER_200K", "ACTIVE_ADS_TIER_300K", "ACTIVE_ADS_TIER_40K", @@ -130,6 +131,7 @@ "", "", "", + "", "" ] }, @@ -152,7 +154,7 @@ }, "currencyId": { "type": "string", - "description": "ID of currency associated with this account. This is a required field.\nAcceptable values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK", + "description": "ID of currency associated with this account. This is a required field.\nAcceptable values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK \n- \"49\" for MXN", "format": "int64" }, "defaultCreativeSizeId": { @@ -180,7 +182,7 @@ }, "maximumImageSize": { "type": "string", - "description": "Maximum image size allowed for this account.", + "description": "Maximum image size allowed for this account, in kilobytes. Value must be greater than or equal to 1.", "format": "int64" }, "name": { @@ -201,7 +203,7 @@ }, "teaserSizeLimit": { "type": "string", - "description": "File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 and 10240.", + "description": "File size limit in kilobytes of Rich Media teaser creatives. Acceptable values are 1 to 10240, inclusive.", "format": "int64" } } @@ -226,6 +228,7 @@ "description": "Maximum number of active ads allowed for the account.", "enum": [ "ACTIVE_ADS_TIER_100K", + "ACTIVE_ADS_TIER_1M", "ACTIVE_ADS_TIER_200K", "ACTIVE_ADS_TIER_300K", "ACTIVE_ADS_TIER_40K", @@ -240,6 +243,7 @@ "", "", "", + "", "" ] }, @@ -994,7 +998,7 @@ "properties": { "allocation": { "type": "integer", - "description": "Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group.", + "description": "Weight allocated to this segment. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. Acceptable values are 1 to 1000, inclusive.", "format": "int32" }, "id": { @@ -1807,7 +1811,7 @@ }, "status": { "type": "array", - "description": "The status of each conversion's insertion status. The status is returned in the same order that conversions are inserted.", + "description": "The insert status of each conversion. Statuses are returned in the same order that conversions are inserted.", "items": { "$ref": "ConversionStatus" } @@ -2480,7 +2484,7 @@ }, "customStartTimeValue": { "type": "integer", - "description": "Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA.", + "description": "Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. Value must be greater than or equal to 0.", "format": "int32" }, "detectedFeatures": { @@ -2656,7 +2660,7 @@ }, "duration": { "type": "integer", - "description": "Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO.", + "description": "Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1.", "format": "int32" }, "durationType": { @@ -2762,7 +2766,7 @@ }, "pushdownDuration": { "type": "number", - "description": "Pushdown duration in seconds for an asset. Must be between 0 and 9.99. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height.", + "description": "Pushdown duration in seconds for an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. Acceptable values are 0 to 9.99, inclusive.", "format": "float" }, "role": { @@ -2842,7 +2846,7 @@ }, "zIndex": { "type": "integer", - "description": "zIndex value of an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY.", + "description": "zIndex value of an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable values are -999999999 to 999999999, inclusive.", "format": "int32" }, "zipFilename": { @@ -3184,14 +3188,14 @@ }, "richMediaExitOverrides": { "type": "array", - "description": "Rich media exit overrides for this creative assignment.\nApplicable when the creative type is any of the following: \n- RICH_MEDIA_INPAGE\n- RICH_MEDIA_INPAGE_FLOATING\n- RICH_MEDIA_IM_EXPAND\n- RICH_MEDIA_EXPANDING\n- RICH_MEDIA_INTERSTITIAL_FLOAT\n- RICH_MEDIA_MOBILE_IN_APP\n- RICH_MEDIA_MULTI_FLOATING\n- RICH_MEDIA_PEEL_DOWN\n- ADVANCED_BANNER\n- VPAID_LINEAR\n- VPAID_NON_LINEAR", + "description": "Rich media exit overrides for this creative assignment.\nApplicable when the creative type is any of the following: \n- DISPLAY\n- RICH_MEDIA_INPAGE\n- RICH_MEDIA_INPAGE_FLOATING\n- RICH_MEDIA_IM_EXPAND\n- RICH_MEDIA_EXPANDING\n- RICH_MEDIA_INTERSTITIAL_FLOAT\n- RICH_MEDIA_MOBILE_IN_APP\n- RICH_MEDIA_MULTI_FLOATING\n- RICH_MEDIA_PEEL_DOWN\n- VPAID_LINEAR\n- VPAID_NON_LINEAR", "items": { "$ref": "RichMediaExitOverride" } }, "sequence": { "type": "integer", - "description": "Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL.", + "description": "Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable values are 1 to 65535, inclusive.", "format": "int32" }, "sslCompliant": { @@ -3205,7 +3209,7 @@ }, "weight": { "type": "integer", - "description": "Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM.", + "description": "Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater than or equal to 1.", "format": "int32" } } @@ -3440,7 +3444,7 @@ }, "groupNumber": { "type": "integer", - "description": "Subgroup of the creative group. Assign your creative groups to one of the following subgroups in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion.\nAcceptable values are: \n- 1\n- 2", + "description": "Subgroup of the creative group. Assign your creative groups to a subgroup in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. Acceptable values are 1 to 2, inclusive.", "format": "int32" }, "id": { @@ -4012,7 +4016,7 @@ }, "hoursOfDay": { "type": "array", - "description": "Hours of the day when the ad will serve. Must be an integer between 0 and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example, if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm.", + "description": "Hours of the day when the ad will serve, where 0 is midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.", "items": { "type": "integer", "format": "int32" @@ -4055,7 +4059,7 @@ }, "impressionRatio": { "type": "string", - "description": "Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Must be between 1 and 10.", + "description": "Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Acceptable values are 1 to 10, inclusive.", "format": "int64" }, "priority": { @@ -4300,17 +4304,17 @@ }, "countryId": { "type": "string", - "description": "Country ID of this directory site.", + "description": "Country ID of this directory site. This is a read-only field.", "format": "int64" }, "currencyId": { "type": "string", - "description": "Currency ID of this directory site.\nPossible values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK", + "description": "Currency ID of this directory site. This is a read-only field.\nPossible values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK \n- \"49\" for MXN", "format": "int64" }, "description": { "type": "string", - "description": "Description of this directory site." + "description": "Description of this directory site. This is a read-only field." }, "id": { "type": "string", @@ -5010,7 +5014,7 @@ }, "cacheBustingType": { "type": "string", - "description": "Code type used for cache busting in the generated tag.", + "description": "Code type used for cache busting in the generated tag. Applicable only when floodlightActivityGroupType is COUNTER and countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.", "enum": [ "ACTIVE_SERVER_PAGE", "COLD_FUSION", @@ -5699,12 +5703,12 @@ "properties": { "duration": { "type": "string", - "description": "Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days in seconds, or 7,776,000.", + "description": "Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days. Acceptable values are 1 to 7776000, inclusive.", "format": "int64" }, "impressions": { "type": "string", - "description": "Number of times an individual user can be served the ad within the specified duration. The maximum allowed is 15.", + "description": "Number of times an individual user can be served the ad within the specified duration. Acceptable values are 1 to 15, inclusive.", "format": "int64" } } @@ -6181,12 +6185,12 @@ "properties": { "clickDuration": { "type": "integer", - "description": "Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used.", + "description": "Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive.", "format": "int32" }, "postImpressionActivitiesDuration": { "type": "integer", - "description": "Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used.", + "description": "Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive.", "format": "int32" } } @@ -6496,7 +6500,7 @@ }, "weight": { "type": "integer", - "description": "Weight associated with this optimization. Must be greater than 1. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities.", + "description": "Weight associated with this optimization. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. Value must be greater than or equal to 1.", "format": "int32" } } @@ -7025,7 +7029,7 @@ }, "tagFormats": { "type": "array", - "description": "Tag formats to generate for this placement. This field is required on insertion.\nAcceptable values are:\n- \"PLACEMENT_TAG_STANDARD\"\n- \"PLACEMENT_TAG_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_IFRAME_ILAYER\"\n- \"PLACEMENT_TAG_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT\"\n- \"PLACEMENT_TAG_CLICK_COMMANDS\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH\"\n- \"PLACEMENT_TAG_TRACKING\"\n- \"PLACEMENT_TAG_TRACKING_IFRAME\"\n- \"PLACEMENT_TAG_TRACKING_JAVASCRIPT\"", + "description": "Tag formats to generate for this placement. This field is required on insertion.\nAcceptable values are:\n- \"PLACEMENT_TAG_STANDARD\"\n- \"PLACEMENT_TAG_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_IFRAME_ILAYER\"\n- \"PLACEMENT_TAG_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT\"\n- \"PLACEMENT_TAG_CLICK_COMMANDS\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4\"\n- \"PLACEMENT_TAG_TRACKING\"\n- \"PLACEMENT_TAG_TRACKING_IFRAME\"\n- \"PLACEMENT_TAG_TRACKING_JAVASCRIPT\"", "items": { "type": "string", "enum": [ @@ -7035,6 +7039,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -7066,6 +7071,7 @@ "", "", "", + "", "" ] } @@ -7672,7 +7678,7 @@ }, "rateOrCostNanos": { "type": "string", - "description": "Rate or cost of this pricing period.", + "description": "Rate or cost of this pricing period in nanos (i.e., multipled by 1000000000). Acceptable values are 0 to 1000000000000000000, inclusive.", "format": "int64" }, "startDate": { @@ -7682,7 +7688,7 @@ }, "units": { "type": "string", - "description": "Units of this pricing period.", + "description": "Units of this pricing period. Acceptable values are 0 to 10000000000, inclusive.", "format": "int64" } } @@ -8025,7 +8031,7 @@ }, "lifeSpan": { "type": "string", - "description": "Number of days that a user should remain in the remarketing list without an impression.", + "description": "Number of days that a user should remain in the remarketing list without an impression. Acceptable values are 1 to 540, inclusive.", "format": "int64" }, "listPopulationRule": { @@ -8982,7 +8988,7 @@ "properties": { "height": { "type": "integer", - "description": "Height of this size.", + "description": "Height of this size. Acceptable values are 0 to 32767, inclusive.", "format": "int32" }, "iab": { @@ -9001,7 +9007,7 @@ }, "width": { "type": "integer", - "description": "Width of this size.", + "description": "Width of this size. Acceptable values are 0 to 32767, inclusive.", "format": "int32" } } @@ -9117,7 +9123,7 @@ "properties": { "adId": { "type": "string", - "description": "Ad associated with this placement tag.", + "description": "Ad associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING.", "format": "int64" }, "clickTag": { @@ -9126,7 +9132,7 @@ }, "creativeId": { "type": "string", - "description": "Creative associated with this placement tag.", + "description": "Creative associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING.", "format": "int64" }, "format": { @@ -9139,6 +9145,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -9170,6 +9177,7 @@ "", "", "", + "", "" ] }, @@ -10281,7 +10289,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10304,6 +10315,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10316,7 +10328,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10469,7 +10482,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10492,6 +10508,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10504,7 +10521,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10799,7 +10817,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "overriddenEventTagId": { @@ -10849,6 +10870,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10861,7 +10883,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11081,7 +11104,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -11104,6 +11130,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11116,7 +11143,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11298,7 +11326,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "onlyParent": { @@ -11326,6 +11357,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11338,7 +11370,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11524,7 +11557,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -11541,7 +11577,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11688,7 +11725,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "overriddenEventTagId": { @@ -11717,6 +11757,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11729,7 +11770,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11919,7 +11961,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "minChangeTime": { @@ -12278,7 +12323,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12301,6 +12349,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -12313,7 +12362,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12683,7 +12733,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12706,6 +12759,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "VALUE" @@ -12718,7 +12772,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12934,7 +12989,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12957,6 +13015,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -12969,7 +13028,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13133,6 +13193,8 @@ "type": "integer", "description": "Select only creative groups that belong to this subgroup.", "format": "int32", + "minimum": "1", + "maximum": "2", "location": "query" }, "ids": { @@ -13145,7 +13207,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13168,6 +13233,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13180,7 +13246,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13379,7 +13446,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13416,6 +13486,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13428,7 +13499,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13679,7 +13751,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13702,6 +13777,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13714,7 +13790,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13846,7 +13923,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13875,6 +13955,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13887,7 +13968,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14218,6 +14300,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14230,7 +14313,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14612,7 +14696,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -14635,6 +14722,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14647,7 +14735,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14827,7 +14916,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -14850,6 +14942,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14862,7 +14955,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15153,7 +15247,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "orderId": { @@ -15192,6 +15289,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15204,7 +15302,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15767,7 +15866,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "orderId": { @@ -15811,6 +15913,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15823,7 +15926,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15906,7 +16010,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -15943,6 +16050,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15955,7 +16063,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16095,7 +16204,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "800", "format": "int32", + "minimum": "0", + "maximum": "800", "location": "query" }, "maxStartDate": { @@ -16182,6 +16294,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16194,7 +16307,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16386,7 +16500,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -16409,6 +16526,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16421,7 +16539,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16545,6 +16664,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -16576,6 +16696,7 @@ "", "", "", + "", "" ], "repeated": true, @@ -16732,7 +16853,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "maxStartDate": { @@ -16826,6 +16950,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16838,7 +16963,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17100,7 +17226,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -17123,6 +17252,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -17135,7 +17265,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17373,7 +17504,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "name": { @@ -17396,6 +17530,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -17408,7 +17543,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18042,7 +18178,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18065,6 +18204,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18077,7 +18217,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18245,6 +18386,8 @@ "type": "integer", "description": "Select only sizes with this height.", "format": "int32", + "minimum": "0", + "maximum": "32767", "location": "query" }, "iabStandard": { @@ -18270,6 +18413,8 @@ "type": "integer", "description": "Select only sizes with this width.", "format": "int32", + "minimum": "0", + "maximum": "32767", "location": "query" } }, @@ -18362,7 +18507,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18385,6 +18533,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18397,7 +18546,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18538,7 +18688,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "name": { @@ -18561,6 +18714,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18573,7 +18727,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18681,7 +18836,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18704,6 +18862,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18716,7 +18875,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -19082,7 +19242,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -19105,6 +19268,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -19117,7 +19281,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" diff --git a/etc/api/dfareporting/v2.7/dfareporting-api.json b/etc/api/dfareporting/v2.7/dfareporting-api.json index 08b139c01d..84887ca43f 100644 --- a/etc/api/dfareporting/v2.7/dfareporting-api.json +++ b/etc/api/dfareporting/v2.7/dfareporting-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/OBUnP-P7ni-fogNkVJMH8BP7EG8\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/p-RysYnjE2Jp5kxjC09O1FcghzI\"", "discoveryVersion": "v1", "id": "dfareporting:v2.7", "name": "dfareporting", "version": "v2.7", - "revision": "20161027", + "revision": "20170428", "title": "DCM/DFA Reporting And Trafficking API", "description": "Manages your DoubleClick Campaign Manager ad campaigns and reports.", "ownerDomain": "google.com", @@ -116,6 +116,7 @@ "description": "Maximum number of active ads allowed for this account.", "enum": [ "ACTIVE_ADS_TIER_100K", + "ACTIVE_ADS_TIER_1M", "ACTIVE_ADS_TIER_200K", "ACTIVE_ADS_TIER_300K", "ACTIVE_ADS_TIER_40K", @@ -130,6 +131,7 @@ "", "", "", + "", "" ] }, @@ -152,7 +154,7 @@ }, "currencyId": { "type": "string", - "description": "ID of currency associated with this account. This is a required field.\nAcceptable values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK", + "description": "ID of currency associated with this account. This is a required field.\nAcceptable values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK \n- \"49\" for MXN", "format": "int64" }, "defaultCreativeSizeId": { @@ -180,7 +182,7 @@ }, "maximumImageSize": { "type": "string", - "description": "Maximum image size allowed for this account.", + "description": "Maximum image size allowed for this account, in kilobytes. Value must be greater than or equal to 1.", "format": "int64" }, "name": { @@ -201,7 +203,7 @@ }, "teaserSizeLimit": { "type": "string", - "description": "File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 and 10240.", + "description": "File size limit in kilobytes of Rich Media teaser creatives. Acceptable values are 1 to 10240, inclusive.", "format": "int64" } } @@ -226,6 +228,7 @@ "description": "Maximum number of active ads allowed for the account.", "enum": [ "ACTIVE_ADS_TIER_100K", + "ACTIVE_ADS_TIER_1M", "ACTIVE_ADS_TIER_200K", "ACTIVE_ADS_TIER_300K", "ACTIVE_ADS_TIER_40K", @@ -240,6 +243,7 @@ "", "", "", + "", "" ] }, @@ -994,7 +998,7 @@ "properties": { "allocation": { "type": "integer", - "description": "Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group.", + "description": "Weight allocated to this segment. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. Acceptable values are 1 to 1000, inclusive.", "format": "int32" }, "id": { @@ -1834,7 +1838,7 @@ }, "status": { "type": "array", - "description": "The status of each conversion's insertion status. The status is returned in the same order that conversions are inserted.", + "description": "The insert status of each conversion. Statuses are returned in the same order that conversions are inserted.", "items": { "$ref": "ConversionStatus" } @@ -2515,7 +2519,7 @@ }, "customStartTimeValue": { "type": "integer", - "description": "Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA.", + "description": "Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. Value must be greater than or equal to 0.", "format": "int32" }, "detectedFeatures": { @@ -2691,7 +2695,7 @@ }, "duration": { "type": "integer", - "description": "Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO.", + "description": "Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1.", "format": "int32" }, "durationType": { @@ -2797,7 +2801,7 @@ }, "pushdownDuration": { "type": "number", - "description": "Pushdown duration in seconds for an asset. Must be between 0 and 9.99. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height.", + "description": "Pushdown duration in seconds for an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. Acceptable values are 0 to 9.99, inclusive.", "format": "float" }, "role": { @@ -2877,7 +2881,7 @@ }, "zIndex": { "type": "integer", - "description": "zIndex value of an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY.", + "description": "zIndex value of an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable values are -999999999 to 999999999, inclusive.", "format": "int32" }, "zipFilename": { @@ -3219,14 +3223,14 @@ }, "richMediaExitOverrides": { "type": "array", - "description": "Rich media exit overrides for this creative assignment.\nApplicable when the creative type is any of the following: \n- RICH_MEDIA_INPAGE\n- RICH_MEDIA_INPAGE_FLOATING\n- RICH_MEDIA_IM_EXPAND\n- RICH_MEDIA_EXPANDING\n- RICH_MEDIA_INTERSTITIAL_FLOAT\n- RICH_MEDIA_MOBILE_IN_APP\n- RICH_MEDIA_MULTI_FLOATING\n- RICH_MEDIA_PEEL_DOWN\n- ADVANCED_BANNER\n- VPAID_LINEAR\n- VPAID_NON_LINEAR", + "description": "Rich media exit overrides for this creative assignment.\nApplicable when the creative type is any of the following: \n- DISPLAY\n- RICH_MEDIA_INPAGE\n- RICH_MEDIA_INPAGE_FLOATING\n- RICH_MEDIA_IM_EXPAND\n- RICH_MEDIA_EXPANDING\n- RICH_MEDIA_INTERSTITIAL_FLOAT\n- RICH_MEDIA_MOBILE_IN_APP\n- RICH_MEDIA_MULTI_FLOATING\n- RICH_MEDIA_PEEL_DOWN\n- VPAID_LINEAR\n- VPAID_NON_LINEAR", "items": { "$ref": "RichMediaExitOverride" } }, "sequence": { "type": "integer", - "description": "Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL.", + "description": "Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable values are 1 to 65535, inclusive.", "format": "int32" }, "sslCompliant": { @@ -3240,7 +3244,7 @@ }, "weight": { "type": "integer", - "description": "Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM.", + "description": "Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater than or equal to 1.", "format": "int32" } } @@ -3475,7 +3479,7 @@ }, "groupNumber": { "type": "integer", - "description": "Subgroup of the creative group. Assign your creative groups to one of the following subgroups in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion.\nAcceptable values are: \n- 1\n- 2", + "description": "Subgroup of the creative group. Assign your creative groups to a subgroup in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. Acceptable values are 1 to 2, inclusive.", "format": "int32" }, "id": { @@ -4047,7 +4051,7 @@ }, "hoursOfDay": { "type": "array", - "description": "Hours of the day when the ad will serve. Must be an integer between 0 and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example, if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm.", + "description": "Hours of the day when the ad will serve, where 0 is midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive.", "items": { "type": "integer", "format": "int32" @@ -4090,7 +4094,7 @@ }, "impressionRatio": { "type": "string", - "description": "Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Must be between 1 and 10.", + "description": "Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Acceptable values are 1 to 10, inclusive.", "format": "int64" }, "priority": { @@ -4335,17 +4339,17 @@ }, "countryId": { "type": "string", - "description": "Country ID of this directory site.", + "description": "Country ID of this directory site. This is a read-only field.", "format": "int64" }, "currencyId": { "type": "string", - "description": "Currency ID of this directory site.\nPossible values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK", + "description": "Currency ID of this directory site. This is a read-only field.\nPossible values are: \n- \"1\" for USD \n- \"2\" for GBP \n- \"3\" for ESP \n- \"4\" for SEK \n- \"5\" for CAD \n- \"6\" for JPY \n- \"7\" for DEM \n- \"8\" for AUD \n- \"9\" for FRF \n- \"10\" for ITL \n- \"11\" for DKK \n- \"12\" for NOK \n- \"13\" for FIM \n- \"14\" for ZAR \n- \"15\" for IEP \n- \"16\" for NLG \n- \"17\" for EUR \n- \"18\" for KRW \n- \"19\" for TWD \n- \"20\" for SGD \n- \"21\" for CNY \n- \"22\" for HKD \n- \"23\" for NZD \n- \"24\" for MYR \n- \"25\" for BRL \n- \"26\" for PTE \n- \"27\" for MXP \n- \"28\" for CLP \n- \"29\" for TRY \n- \"30\" for ARS \n- \"31\" for PEN \n- \"32\" for ILS \n- \"33\" for CHF \n- \"34\" for VEF \n- \"35\" for COP \n- \"36\" for GTQ \n- \"37\" for PLN \n- \"39\" for INR \n- \"40\" for THB \n- \"41\" for IDR \n- \"42\" for CZK \n- \"43\" for RON \n- \"44\" for HUF \n- \"45\" for RUB \n- \"46\" for AED \n- \"47\" for BGN \n- \"48\" for HRK \n- \"49\" for MXN", "format": "int64" }, "description": { "type": "string", - "description": "Description of this directory site." + "description": "Description of this directory site. This is a read-only field." }, "id": { "type": "string", @@ -5045,7 +5049,7 @@ }, "cacheBustingType": { "type": "string", - "description": "Code type used for cache busting in the generated tag.", + "description": "Code type used for cache busting in the generated tag. Applicable only when floodlightActivityGroupType is COUNTER and countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING.", "enum": [ "ACTIVE_SERVER_PAGE", "COLD_FUSION", @@ -5734,12 +5738,12 @@ "properties": { "duration": { "type": "string", - "description": "Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days in seconds, or 7,776,000.", + "description": "Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days. Acceptable values are 1 to 7776000, inclusive.", "format": "int64" }, "impressions": { "type": "string", - "description": "Number of times an individual user can be served the ad within the specified duration. The maximum allowed is 15.", + "description": "Number of times an individual user can be served the ad within the specified duration. Acceptable values are 1 to 15, inclusive.", "format": "int64" } } @@ -6216,12 +6220,12 @@ "properties": { "clickDuration": { "type": "integer", - "description": "Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used.", + "description": "Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive.", "format": "int32" }, "postImpressionActivitiesDuration": { "type": "integer", - "description": "Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used.", + "description": "Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive.", "format": "int32" } } @@ -6531,7 +6535,7 @@ }, "weight": { "type": "integer", - "description": "Weight associated with this optimization. Must be greater than 1. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities.", + "description": "Weight associated with this optimization. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. Value must be greater than or equal to 1.", "format": "int32" } } @@ -7060,7 +7064,7 @@ }, "tagFormats": { "type": "array", - "description": "Tag formats to generate for this placement. This field is required on insertion.\nAcceptable values are:\n- \"PLACEMENT_TAG_STANDARD\"\n- \"PLACEMENT_TAG_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_IFRAME_ILAYER\"\n- \"PLACEMENT_TAG_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT\"\n- \"PLACEMENT_TAG_CLICK_COMMANDS\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH\"\n- \"PLACEMENT_TAG_TRACKING\"\n- \"PLACEMENT_TAG_TRACKING_IFRAME\"\n- \"PLACEMENT_TAG_TRACKING_JAVASCRIPT\"", + "description": "Tag formats to generate for this placement. This field is required on insertion.\nAcceptable values are:\n- \"PLACEMENT_TAG_STANDARD\"\n- \"PLACEMENT_TAG_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_IFRAME_ILAYER\"\n- \"PLACEMENT_TAG_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT\"\n- \"PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT\"\n- \"PLACEMENT_TAG_CLICK_COMMANDS\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3\"\n- \"PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4\"\n- \"PLACEMENT_TAG_TRACKING\"\n- \"PLACEMENT_TAG_TRACKING_IFRAME\"\n- \"PLACEMENT_TAG_TRACKING_JAVASCRIPT\"", "items": { "type": "string", "enum": [ @@ -7070,6 +7074,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -7101,6 +7106,7 @@ "", "", "", + "", "" ] } @@ -7731,7 +7737,7 @@ }, "rateOrCostNanos": { "type": "string", - "description": "Rate or cost of this pricing period.", + "description": "Rate or cost of this pricing period in nanos (i.e., multipled by 1000000000). Acceptable values are 0 to 1000000000000000000, inclusive.", "format": "int64" }, "startDate": { @@ -7741,7 +7747,7 @@ }, "units": { "type": "string", - "description": "Units of this pricing period.", + "description": "Units of this pricing period. Acceptable values are 0 to 10000000000, inclusive.", "format": "int64" } } @@ -8084,7 +8090,7 @@ }, "lifeSpan": { "type": "string", - "description": "Number of days that a user should remain in the remarketing list without an impression.", + "description": "Number of days that a user should remain in the remarketing list without an impression. Acceptable values are 1 to 540, inclusive.", "format": "int64" }, "listPopulationRule": { @@ -9057,7 +9063,7 @@ "properties": { "height": { "type": "integer", - "description": "Height of this size.", + "description": "Height of this size. Acceptable values are 0 to 32767, inclusive.", "format": "int32" }, "iab": { @@ -9076,7 +9082,7 @@ }, "width": { "type": "integer", - "description": "Width of this size.", + "description": "Width of this size. Acceptable values are 0 to 32767, inclusive.", "format": "int32" } } @@ -9216,7 +9222,7 @@ "properties": { "adId": { "type": "string", - "description": "Ad associated with this placement tag.", + "description": "Ad associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING.", "format": "int64" }, "clickTag": { @@ -9225,7 +9231,7 @@ }, "creativeId": { "type": "string", - "description": "Creative associated with this placement tag.", + "description": "Creative associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING.", "format": "int64" }, "format": { @@ -9238,6 +9244,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -9269,6 +9276,7 @@ "", "", "", + "", "" ] }, @@ -10230,12 +10238,12 @@ "properties": { "offsetPercentage": { "type": "integer", - "description": "Duration, as a percentage of video duration. Do not set when offsetSeconds is set.", + "description": "Duration, as a percentage of video duration. Do not set when offsetSeconds is set. Acceptable values are 0 to 100, inclusive.", "format": "int32" }, "offsetSeconds": { "type": "integer", - "description": "Duration, in seconds. Do not set when offsetPercentage is set.", + "description": "Duration, in seconds. Do not set when offsetPercentage is set. Acceptable values are 0 to 86399, inclusive.", "format": "int32" } } @@ -10504,7 +10512,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10527,6 +10538,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10539,7 +10551,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10692,7 +10705,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -10715,6 +10731,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -10727,7 +10744,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -10965,7 +10983,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "overriddenEventTagId": { @@ -11015,6 +11036,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11027,7 +11049,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11247,7 +11270,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -11270,6 +11296,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11282,7 +11309,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11464,7 +11492,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "onlyParent": { @@ -11492,6 +11523,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11504,7 +11536,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11690,7 +11723,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -11707,7 +11743,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -11854,7 +11891,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "overriddenEventTagId": { @@ -11883,6 +11923,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -11895,7 +11936,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12085,7 +12127,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "minChangeTime": { @@ -12444,7 +12489,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12467,6 +12515,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -12479,7 +12528,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -12849,7 +12899,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -12872,6 +12925,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "VALUE" @@ -12884,7 +12938,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13100,7 +13155,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13123,6 +13181,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13135,7 +13194,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13299,6 +13359,8 @@ "type": "integer", "description": "Select only creative groups that belong to this subgroup.", "format": "int32", + "minimum": "1", + "maximum": "2", "location": "query" }, "ids": { @@ -13311,7 +13373,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13334,6 +13399,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13346,7 +13412,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13545,7 +13612,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13582,6 +13652,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13594,7 +13665,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -13755,6 +13827,7 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "100", "format": "int32", "minimum": "0", "maximum": "100", @@ -13845,7 +13918,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -13868,6 +13944,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -13880,7 +13957,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14012,7 +14090,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -14041,6 +14122,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14053,7 +14135,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14384,6 +14467,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14396,7 +14480,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14488,7 +14573,7 @@ "id": "dfareporting.files.get", "path": "reports/{reportId}/files/{fileId}", "httpMethod": "GET", - "description": "Retrieves a report file by its report ID and file ID.", + "description": "Retrieves a report file by its report ID and file ID. This method supports media download.", "parameters": { "fileId": { "type": "string", @@ -14526,6 +14611,7 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "10", "format": "int32", "minimum": "0", "maximum": "10", @@ -14545,7 +14631,7 @@ }, "scope": { "type": "string", - "description": "The scope that defines which results are returned, default is 'MINE'.", + "description": "The scope that defines which results are returned.", "default": "MINE", "enum": [ "ALL", @@ -14575,7 +14661,7 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is 'DESCENDING'.", + "description": "Order of sorted results.", "default": "DESCENDING", "enum": [ "ASCENDING", @@ -14778,7 +14864,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -14801,6 +14890,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -14813,7 +14903,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -14993,7 +15084,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -15016,6 +15110,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15028,7 +15123,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15319,7 +15415,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "orderId": { @@ -15358,6 +15457,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15370,7 +15470,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -15933,7 +16034,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "orderId": { @@ -15977,6 +16081,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -15989,7 +16094,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16072,7 +16178,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -16109,6 +16218,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16121,7 +16231,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16261,7 +16372,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "800", "format": "int32", + "minimum": "0", + "maximum": "800", "location": "query" }, "maxStartDate": { @@ -16348,6 +16462,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16360,7 +16475,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16552,7 +16668,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -16575,6 +16694,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -16587,7 +16707,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -16711,6 +16832,7 @@ "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH", "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3", + "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4", "PLACEMENT_TAG_INTERNAL_REDIRECT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT", "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY", @@ -16742,6 +16864,7 @@ "", "", "", + "", "" ], "repeated": true, @@ -16898,7 +17021,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "maxStartDate": { @@ -16992,6 +17118,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -17004,7 +17131,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17266,7 +17394,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -17289,6 +17420,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -17301,7 +17433,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17539,7 +17672,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "name": { @@ -17562,6 +17698,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -17574,7 +17711,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -17760,6 +17898,7 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "10", "format": "int32", "minimum": "0", "maximum": "10", @@ -17779,7 +17918,7 @@ }, "scope": { "type": "string", - "description": "The scope that defines which results are returned, default is 'MINE'.", + "description": "The scope that defines which results are returned.", "default": "MINE", "enum": [ "ALL", @@ -17809,7 +17948,7 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is 'DESCENDING'.", + "description": "Order of sorted results.", "default": "DESCENDING", "enum": [ "ASCENDING", @@ -17890,6 +18029,7 @@ "synchronous": { "type": "boolean", "description": "If set and true, tries to run the report synchronously.", + "default": "false", "location": "query" } }, @@ -17978,7 +18118,7 @@ "id": "dfareporting.reports.files.get", "path": "userprofiles/{profileId}/reports/{reportId}/files/{fileId}", "httpMethod": "GET", - "description": "Retrieves a report file.", + "description": "Retrieves a report file. This method supports media download.", "parameters": { "fileId": { "type": "string", @@ -18024,6 +18164,7 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "10", "format": "int32", "minimum": "0", "maximum": "10", @@ -18064,7 +18205,7 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is 'DESCENDING'.", + "description": "Order of sorted results.", "default": "DESCENDING", "enum": [ "ASCENDING", @@ -18208,7 +18349,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18231,6 +18375,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18243,7 +18388,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18411,6 +18557,8 @@ "type": "integer", "description": "Select only sizes with this height.", "format": "int32", + "minimum": "0", + "maximum": "32767", "location": "query" }, "iabStandard": { @@ -18436,6 +18584,8 @@ "type": "integer", "description": "Select only sizes with this width.", "format": "int32", + "minimum": "0", + "maximum": "32767", "location": "query" } }, @@ -18528,7 +18678,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18551,6 +18704,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18563,7 +18717,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18704,7 +18859,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "name": { @@ -18727,6 +18885,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18739,7 +18898,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -18847,7 +19007,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -18870,6 +19033,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -18882,7 +19046,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" @@ -19248,7 +19413,10 @@ "maxResults": { "type": "integer", "description": "Maximum number of results to return.", + "default": "1000", "format": "int32", + "minimum": "0", + "maximum": "1000", "location": "query" }, "pageToken": { @@ -19271,6 +19439,7 @@ "sortField": { "type": "string", "description": "Field by which to sort the list.", + "default": "ID", "enum": [ "ID", "NAME" @@ -19283,7 +19452,8 @@ }, "sortOrder": { "type": "string", - "description": "Order of sorted results, default is ASCENDING.", + "description": "Order of sorted results.", + "default": "ASCENDING", "enum": [ "ASCENDING", "DESCENDING" diff --git a/etc/api/discovery/v1/discovery-api.json b/etc/api/discovery/v1/discovery-api.json index fd0afa0c21..b240e12e08 100644 --- a/etc/api/discovery/v1/discovery-api.json +++ b/etc/api/discovery/v1/discovery-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/Pyg0A4J33Dq212hoe9BYpSm0dl4\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Pyg0A4J33Dq212hoe9BYpSm0dl4\"", "discoveryVersion": "v1", "id": "discovery:v1", "name": "discovery", diff --git a/etc/api/dns/v1/dns-api.json b/etc/api/dns/v1/dns-api.json index f7d4415831..73980a5009 100644 --- a/etc/api/dns/v1/dns-api.json +++ b/etc/api/dns/v1/dns-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/kZhVBEml6IgIs86-wixFuVP5H9c\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/nI5hxBcCe0tNnzyChFSdnIGBMt0\"", "discoveryVersion": "v1", "id": "dns:v1", "name": "dns", "version": "v1", - "revision": "20161130", + "revision": "20170512", "title": "Google Cloud DNS API", "description": "Configures and serves authoritative DNS records.", "ownerDomain": "google.com", diff --git a/etc/api/dns/v2beta1/dns-api.json b/etc/api/dns/v2beta1/dns-api.json index c7df530049..d7911b7297 100644 --- a/etc/api/dns/v2beta1/dns-api.json +++ b/etc/api/dns/v2beta1/dns-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/VNWoCHk2DTUctXjZhpj19vf2iTM\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/TFtoAUbJqSv6jKBRWRbK7yQFFhw\"", "discoveryVersion": "v1", "id": "dns:v2beta1", "name": "dns", "version": "v2beta1", - "revision": "20161130", + "revision": "20170512", "title": "Google Cloud DNS API", "description": "Configures and serves authoritative DNS records.", "ownerDomain": "google.com", diff --git a/etc/api/doubleclickbidmanager/v1/doubleclickbidmanager-api.json b/etc/api/doubleclickbidmanager/v1/doubleclickbidmanager-api.json index 1eab141f73..13b078ad14 100644 --- a/etc/api/doubleclickbidmanager/v1/doubleclickbidmanager-api.json +++ b/etc/api/doubleclickbidmanager/v1/doubleclickbidmanager-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/xZhMuyiLnKVSMmQ3sSqyBn6nxs0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/TpAruLLB982pPy6sW_n60NUC_v0\"", "discoveryVersion": "v1", "id": "doubleclickbidmanager:v1", "name": "doubleclickbidmanager", "canonicalName": "DoubleClick Bid Manager", "version": "v1", - "revision": "20161010", + "revision": "20170224", "title": "DoubleClick Bid Manager API", "description": "API for viewing and managing your reports in DoubleClick Bid Manager.", "ownerDomain": "google.com", @@ -70,6 +70,15 @@ "location": "query" } }, + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/doubleclickbidmanager": { + "description": "View and manage your reports in DoubleClick Bid Manager" + } + } + } + }, "schemas": { "DownloadLineItemsRequest": { "id": "DownloadLineItemsRequest", @@ -159,7 +168,7 @@ }, "filterIds": { "type": "array", - "description": "The IDs of the specified filter type. This is used to filter entities to fetch. At least one ID must be specified. Only one ID is allowed for the ADVERTISER_ID filter type. For INSERTION_ORDER_ID or LINE_ITEM_ID filter types all IDs must be from the same Advertiser.", + "description": "The IDs of the specified filter type. This is used to filter entities to fetch. At least one ID must be specified. Only one ID is allowed for the ADVERTISER_ID filter type. For INSERTION_ORDER_ID or LINE_ITEM_ID filter types, all IDs must be from the same Advertiser.", "items": { "type": "string", "format": "int64" @@ -230,6 +239,7 @@ "FILTER_CARRIER", "FILTER_CHANNEL_ID", "FILTER_CITY", + "FILTER_COMPANION_CREATIVE_ID", "FILTER_CONVERSION_DELAY", "FILTER_COUNTRY", "FILTER_CREATIVE_HEIGHT", @@ -278,6 +288,7 @@ "FILTER_REGULAR_CHANNEL_ID", "FILTER_SITE_ID", "FILTER_SITE_LANGUAGE", + "FILTER_SKIPPABLE_SUPPORT", "FILTER_TARGETED_USER_LIST", "FILTER_TIME_OF_DAY", "FILTER_TRUEVIEW_AD_GROUP_AD_ID", @@ -448,6 +459,8 @@ "", "", "", + "", + "", "" ] }, @@ -526,6 +539,7 @@ "FILTER_CARRIER", "FILTER_CHANNEL_ID", "FILTER_CITY", + "FILTER_COMPANION_CREATIVE_ID", "FILTER_CONVERSION_DELAY", "FILTER_COUNTRY", "FILTER_CREATIVE_HEIGHT", @@ -574,6 +588,7 @@ "FILTER_REGULAR_CHANNEL_ID", "FILTER_SITE_ID", "FILTER_SITE_LANGUAGE", + "FILTER_SKIPPABLE_SUPPORT", "FILTER_TARGETED_USER_LIST", "FILTER_TIME_OF_DAY", "FILTER_TRUEVIEW_AD_GROUP_AD_ID", @@ -744,6 +759,8 @@ "", "", "", + "", + "", "" ] } @@ -758,6 +775,7 @@ "items": { "type": "string", "enum": [ + "METRIC_ACTIVE_VIEW_AUDIBLE_VISIBLE_ON_COMPLETE_IMPRESSIONS", "METRIC_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME", "METRIC_ACTIVE_VIEW_DISTRIBUTION_UNMEASURABLE", "METRIC_ACTIVE_VIEW_DISTRIBUTION_UNVIEWABLE", @@ -766,8 +784,20 @@ "METRIC_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS", "METRIC_ACTIVE_VIEW_PCT_MEASURABLE_IMPRESSIONS", "METRIC_ACTIVE_VIEW_PCT_VIEWABLE_IMPRESSIONS", + "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_AT_START", + "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_FIRST_QUAR", + "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_ON_COMPLETE", + "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_SECOND_QUAR", + "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_THIRD_QUAR", + "METRIC_ACTIVE_VIEW_PERCENT_VIEWABLE_FOR_TIME_THRESHOLD", + "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_AT_START", + "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_FIRST_QUAR", + "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_ON_COMPLETE", + "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_SECOND_QUAR", + "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_THIRD_QUAR", "METRIC_ACTIVE_VIEW_UNMEASURABLE_IMPRESSIONS", "METRIC_ACTIVE_VIEW_UNVIEWABLE_IMPRESSIONS", + "METRIC_ACTIVE_VIEW_VIEWABLE_FOR_TIME_THRESHOLD", "METRIC_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS", "METRIC_BID_REQUESTS", "METRIC_BILLABLE_COST_ADVERTISER", @@ -954,6 +984,7 @@ "METRIC_REVENUE_ECPC_ADVERTISER", "METRIC_REVENUE_ECPC_PARTNER", "METRIC_REVENUE_ECPC_USD", + "METRIC_REVENUE_ECPIAVC_ADVERTISER", "METRIC_REVENUE_ECPM_ADVERTISER", "METRIC_REVENUE_ECPM_PARTNER", "METRIC_REVENUE_ECPM_USD", @@ -1337,6 +1368,20 @@ "", "", "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "" ] } @@ -1370,6 +1415,7 @@ "TYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKET", "TYPE_PIXEL_LOAD", "TYPE_REACH_AND_FREQUENCY", + "TYPE_REACH_AUDIENCE", "TYPE_THIRD_PARTY_DATA_PROVIDER", "TYPE_TRUEVIEW", "TYPE_TRUEVIEW_IAR", @@ -1406,6 +1452,7 @@ "", "", "", + "", "" ] } @@ -1933,7 +1980,10 @@ }, "response": { "$ref": "DownloadLineItemsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclickbidmanager" + ] }, "uploadlineitems": { "id": "doubleclickbidmanager.lineitems.uploadlineitems", @@ -1945,7 +1995,10 @@ }, "response": { "$ref": "UploadLineItemsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclickbidmanager" + ] } } }, @@ -1961,7 +2014,10 @@ }, "response": { "$ref": "Query" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclickbidmanager" + ] }, "deletequery": { "id": "doubleclickbidmanager.queries.deletequery", @@ -1979,6 +2035,9 @@ }, "parameterOrder": [ "queryId" + ], + "scopes": [ + "https://www.googleapis.com/auth/doubleclickbidmanager" ] }, "getquery": { @@ -2000,7 +2059,10 @@ ], "response": { "$ref": "Query" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclickbidmanager" + ] }, "listqueries": { "id": "doubleclickbidmanager.queries.listqueries", @@ -2009,7 +2071,10 @@ "description": "Retrieves stored queries.", "response": { "$ref": "ListQueriesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclickbidmanager" + ] }, "runquery": { "id": "doubleclickbidmanager.queries.runquery", @@ -2030,7 +2095,10 @@ ], "request": { "$ref": "RunQueryRequest" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclickbidmanager" + ] } } }, @@ -2055,7 +2123,10 @@ ], "response": { "$ref": "ListReportsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclickbidmanager" + ] } } }, @@ -2071,7 +2142,10 @@ }, "response": { "$ref": "DownloadResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclickbidmanager" + ] } } } diff --git a/etc/api/doubleclicksearch/v2/doubleclicksearch-api.json b/etc/api/doubleclicksearch/v2/doubleclicksearch-api.json index d8021102b5..42e39fe9e4 100644 --- a/etc/api/doubleclicksearch/v2/doubleclicksearch-api.json +++ b/etc/api/doubleclicksearch/v2/doubleclicksearch-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/HRuJCCIlMtHocq2WCX0lbnhTmso\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/CNwW5zhdZOVYCBH02fYR4CSgom8\"", "discoveryVersion": "v1", "id": "doubleclicksearch:v2", "name": "doubleclicksearch", "version": "v2", - "revision": "20161108", + "revision": "20170509", "title": "DoubleClick Search API", "description": "Reports and modifies your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions).", "ownerDomain": "google.com", @@ -175,7 +175,7 @@ }, "conversionId": { "type": "string", - "description": "For offline conversions, this is an ID that advertisers are required to provide. Advertisers can specify any ID that is meaningful to them. For online conversions, DS copies the dsConversionId or floodlightOrderId into this property depending on the advertiser's Floodlight instructions.", + "description": "For offline conversions, advertisers provide this ID. Advertisers can specify any ID that is meaningful to them. Each conversion in a request must specify a unique ID, and the combination of ID and timestamp must be unique amongst all conversions within the advertiser.\nFor online conversions, DS copies the dsConversionId or floodlightOrderId into this property depending on the advertiser's Floodlight instructions.", "annotations": { "required": [ "doubleclicksearch.conversion.insert" diff --git a/etc/api/drive/v2/drive-api.json b/etc/api/drive/v2/drive-api.json index 5c28a2c116..839462f601 100644 --- a/etc/api/drive/v2/drive-api.json +++ b/etc/api/drive/v2/drive-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/W9mfjzQR1RkzHwNqZlCoG9HjWHE\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/HjapmkPPa8mIdGN85nrk4HlNMhc\"", "discoveryVersion": "v1", "id": "drive:v2", "name": "drive", "version": "v2", - "revision": "20161212", + "revision": "20170512", "title": "Drive API", "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "ownerDomain": "google.com", @@ -310,6 +310,27 @@ "type": "string", "description": "A link back to this item." }, + "teamDriveThemes": { + "type": "array", + "description": "A list of themes that are supported for Team Drives.", + "items": { + "type": "object", + "properties": { + "backgroundImageLink": { + "type": "string", + "description": "A link to this Team Drive theme's background image." + }, + "colorRgb": { + "type": "string", + "description": "The color of this Team Drive theme as an RGB hex string." + }, + "id": { + "type": "string", + "description": "The ID of the theme." + } + } + } + }, "user": { "$ref": "User", "description": "The authenticated user." @@ -468,7 +489,7 @@ }, "items": { "type": "array", - "description": "The actual list of apps.", + "description": "The list of apps.", "items": { "$ref": "App" } @@ -487,15 +508,15 @@ "Change": { "id": "Change", "type": "object", - "description": "Representation of a change to a file.", + "description": "Representation of a change to a file or Team Drive.", "properties": { "deleted": { "type": "boolean", - "description": "Whether the file has been deleted." + "description": "Whether the file or Team Drive has been removed from this list of changes, for example by deletion or loss of access." }, "file": { "$ref": "File", - "description": "The updated state of the file. Present if the file has not been deleted." + "description": "The updated state of the file. Present if the type is file and the file has not been removed from this list of changes." }, "fileId": { "type": "string", @@ -519,6 +540,18 @@ "selfLink": { "type": "string", "description": "A link back to this change." + }, + "teamDrive": { + "$ref": "TeamDrive", + "description": "The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member of the Team Drive, and the Team Drive has not been deleted." + }, + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive associated with this change." + }, + "type": { + "type": "string", + "description": "The type of the change. Possible values are file and teamDrive." } } }, @@ -533,7 +566,7 @@ }, "items": { "type": "array", - "description": "The actual list of changes.", + "description": "The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "Change" } @@ -548,13 +581,17 @@ "description": "The current largest change ID.", "format": "int64" }, + "newStartPageToken": { + "type": "string", + "description": "The starting page token for future changes. This will be present only if the end of the current changes list has been reached." + }, "nextLink": { "type": "string", "description": "A link to the next page of changes." }, "nextPageToken": { "type": "string", - "description": "The page token for the next page of changes." + "description": "The page token for the next page of changes. This will be absent if the end of the changes list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." }, "selfLink": { "type": "string", @@ -626,7 +663,7 @@ }, "items": { "type": "array", - "description": "The actual list of children.", + "description": "The list of children. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "ChildReference" } @@ -642,7 +679,7 @@ }, "nextPageToken": { "type": "string", - "description": "The page token for the next page of children." + "description": "The page token for the next page of children. This will be absent if the end of the children list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." }, "selfLink": { "type": "string", @@ -775,7 +812,7 @@ "properties": { "items": { "type": "array", - "description": "List of comments.", + "description": "The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "Comment" } @@ -791,7 +828,7 @@ }, "nextPageToken": { "type": "string", - "description": "The token to use to request the next page of results." + "description": "The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." }, "selfLink": { "type": "string", @@ -857,7 +894,7 @@ "properties": { "items": { "type": "array", - "description": "List of reply.", + "description": "The list of replies. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "CommentReply" } @@ -873,7 +910,7 @@ }, "nextPageToken": { "type": "string", - "description": "The token to use to request the next page of results." + "description": "The page token for the next page of replies. This will be absent if the end of the replies list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." }, "selfLink": { "type": "string", @@ -896,15 +933,89 @@ }, "canComment": { "type": "boolean", - "description": "Whether the current user can comment on the file." + "description": "Deprecated: use capabilities/canComment." }, "canReadRevisions": { "type": "boolean", - "description": "Whether the current user has read access to the Revisions resource of the file." + "description": "Deprecated: use capabilities/canReadRevisions." + }, + "capabilities": { + "type": "object", + "description": "Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.", + "properties": { + "canAddChildren": { + "type": "boolean", + "description": "Whether the current user can add children to this folder. This is always false when the item is not a folder." + }, + "canChangeRestrictedDownload": { + "type": "boolean", + "description": "Whether the current user can change the restricted download label of this file." + }, + "canComment": { + "type": "boolean", + "description": "Whether the current user can comment on this file." + }, + "canCopy": { + "type": "boolean", + "description": "Whether the current user can copy this file. For a Team Drive item, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder." + }, + "canDelete": { + "type": "boolean", + "description": "Whether the current user can delete this file." + }, + "canDownload": { + "type": "boolean", + "description": "Whether the current user can download this file." + }, + "canEdit": { + "type": "boolean", + "description": "Whether the current user can edit this file." + }, + "canListChildren": { + "type": "boolean", + "description": "Whether the current user can list the children of this folder. This is always false when the item is not a folder." + }, + "canMoveItemIntoTeamDrive": { + "type": "boolean", + "description": "Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem." + }, + "canMoveTeamDriveItem": { + "type": "boolean", + "description": "Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files." + }, + "canReadRevisions": { + "type": "boolean", + "description": "Whether the current user can read the revisions resource of this file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read." + }, + "canReadTeamDrive": { + "type": "boolean", + "description": "Whether the current user can read the Team Drive to which this file belongs. Only populated for Team Drive files." + }, + "canRemoveChildren": { + "type": "boolean", + "description": "Whether the current user can remove children from this folder. This is always false when the item is not a folder." + }, + "canRename": { + "type": "boolean", + "description": "Whether the current user can rename this file." + }, + "canShare": { + "type": "boolean", + "description": "Whether the current user can modify the sharing settings for this file." + }, + "canTrash": { + "type": "boolean", + "description": "Whether the current user can move this file to trash." + }, + "canUntrash": { + "type": "boolean", + "description": "Whether the current user can restore this file from trash." + } + } }, "copyable": { "type": "boolean", - "description": "Whether the file can be copied by the current user." + "description": "Deprecated: use capabilities/canCopy." }, "createdDate": { "type": "string", @@ -924,7 +1035,7 @@ }, "editable": { "type": "boolean", - "description": "Whether the file can be edited by the current user." + "description": "Deprecated: use capabilities/canEdit." }, "embedLink": { "type": "string", @@ -957,15 +1068,19 @@ }, "folderColorRgb": { "type": "string", - "description": "Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette." + "description": "Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for Team Drive files." }, "fullFileExtension": { "type": "string", "description": "The full file extension; extracted from the title. May contain multiple concatenated extensions, such as \"tar.gz\". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files." }, + "hasAugmentedPermissions": { + "type": "boolean", + "description": "Whether any users are granted file access directly on this file. This field is only populated for Team Drive files." + }, "hasThumbnail": { "type": "boolean", - "description": "Whether this file has a thumbnail." + "description": "Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field." }, "headRevisionId": { "type": "string", @@ -1194,18 +1309,18 @@ }, "ownedByMe": { "type": "boolean", - "description": "Whether the file is owned by the current user." + "description": "Whether the file is owned by the current user. Not populated for Team Drive files." }, "ownerNames": { "type": "array", - "description": "Name(s) of the owner(s) of this file.", + "description": "Name(s) of the owner(s) of this file. Not populated for Team Drive files.", "items": { "type": "string" } }, "owners": { "type": "array", - "description": "The owner(s) of this file.", + "description": "The owner(s) of this file. Not populated for Team Drive files.", "items": { "$ref": "User" } @@ -1219,7 +1334,7 @@ }, "permissions": { "type": "array", - "description": "The list of permissions for users with access to this file.", + "description": "The list of permissions for users with access to this file. Not populated for Team Drive files.", "items": { "$ref": "Permission" } @@ -1242,11 +1357,11 @@ }, "shareable": { "type": "boolean", - "description": "Whether the file's sharing settings can be modified by the current user." + "description": "Deprecated: use capabilities/canShare." }, "shared": { "type": "boolean", - "description": "Whether the file has been shared." + "description": "Whether the file has been shared. Not populated for Team Drive files." }, "sharedWithMeDate": { "type": "string", @@ -1264,6 +1379,10 @@ "type": "string" } }, + "teamDriveId": { + "type": "string", + "description": "ID of the Team Drive the file resides in." + }, "thumbnail": { "type": "object", "description": "A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.", @@ -1285,12 +1404,21 @@ }, "thumbnailVersion": { "type": "string", - "description": "The thumbnail version for use in client-contructable thumbnail URLs or thumbnail cache invalidation.", + "description": "The thumbnail version for use in thumbnail cache invalidation.", "format": "int64" }, "title": { "type": "string", - "description": "The title of this file." + "description": "The title of this file. Note that for immutable items such as the top level folders of Team Drives, My Drive root folder, and Application Data folder the title is constant." + }, + "trashedDate": { + "type": "string", + "description": "The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.", + "format": "date-time" + }, + "trashingUser": { + "$ref": "User", + "description": "If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files." }, "userPermission": { "$ref": "Permission", @@ -1332,7 +1460,7 @@ }, "writersCanShare": { "type": "boolean", - "description": "Whether writers can share the document with other users." + "description": "Whether writers can share the document with other users. Not populated for Team Drive files." } } }, @@ -1345,9 +1473,13 @@ "type": "string", "description": "The ETag of the list." }, + "incompleteSearch": { + "type": "boolean", + "description": "Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple Team Drives with the \"default,allTeamDrives\" corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as \"default\" or \"teamDrive\"." + }, "items": { "type": "array", - "description": "The actual list of files.", + "description": "The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "File" } @@ -1363,7 +1495,7 @@ }, "nextPageToken": { "type": "string", - "description": "The page token for the next page of files." + "description": "The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." }, "selfLink": { "type": "string", @@ -1405,7 +1537,7 @@ }, "items": { "type": "array", - "description": "The actual list of parents.", + "description": "The list of parents.", "items": { "$ref": "ParentReference" } @@ -1461,7 +1593,7 @@ "properties": { "additionalRoles": { "type": "array", - "description": "Additional roles for this user. Only commenter is currently allowed.", + "description": "Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.", "items": { "type": "string" } @@ -1470,6 +1602,10 @@ "type": "string", "description": "The authkey parameter required for this permission." }, + "deleted": { + "type": "boolean", + "description": "Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions." + }, "domain": { "type": "string", "description": "The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain." @@ -1484,7 +1620,7 @@ }, "expirationDate": { "type": "string", - "description": "The time at which this permission will expire (RFC 3339 date-time).", + "description": "The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: \n- They can only be set on user and group permissions \n- The date must be in the future \n- The date cannot be more than a year in the future \n- The date can only be set on drive.permissions.update requests", "format": "date-time" }, "id": { @@ -1506,7 +1642,7 @@ }, "role": { "type": "string", - "description": "The primary role for this user. Allowed values are: \n- owner \n- reader \n- writer", + "description": "The primary role for this user. While new values may be supported in the future, the following are currently allowed: \n- organizer \n- owner \n- reader \n- writer", "annotations": { "required": [ "drive.permissions.insert" @@ -1517,6 +1653,38 @@ "type": "string", "description": "A link back to this permission." }, + "teamDrivePermissionDetails": { + "type": "array", + "description": "Details of whether the permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.", + "items": { + "type": "object", + "properties": { + "additionalRoles": { + "type": "array", + "description": "Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.", + "items": { + "type": "string" + } + }, + "inherited": { + "type": "boolean", + "description": "Whether this permission is inherited. This field is always populated. This is an output-only field." + }, + "inheritedFrom": { + "type": "string", + "description": "The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive." + }, + "role": { + "type": "string", + "description": "The primary role for this user. While new values may be added in the future, the following are currently possible: \n- organizer \n- reader \n- writer" + }, + "teamDrivePermissionType": { + "type": "string", + "description": "The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: \n- file \n- member" + } + } + } + }, "type": { "type": "string", "description": "The account type. Allowed values are: \n- user \n- group \n- domain \n- anyone", @@ -1563,7 +1731,7 @@ }, "items": { "type": "array", - "description": "The actual list of permissions.", + "description": "The list of permissions.", "items": { "$ref": "Permission" } @@ -1573,6 +1741,10 @@ "description": "This is always drive#permissionList.", "default": "drive#permissionList" }, + "nextPageToken": { + "type": "string", + "description": "The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." + }, "selfLink": { "type": "string", "description": "A link back to this list." @@ -1735,7 +1907,7 @@ }, "items": { "type": "array", - "description": "The actual list of revisions.", + "description": "The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "Revision" } @@ -1755,6 +1927,163 @@ } } }, + "StartPageToken": { + "id": "StartPageToken", + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#startPageToken\".", + "default": "drive#startPageToken" + }, + "startPageToken": { + "type": "string", + "description": "The starting page token for listing changes." + } + } + }, + "TeamDrive": { + "id": "TeamDrive", + "type": "object", + "description": "Representation of a Team Drive.", + "properties": { + "backgroundImageFile": { + "type": "object", + "description": "An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.", + "properties": { + "id": { + "type": "string", + "description": "The ID of an image file in Drive to use for the background image." + }, + "width": { + "type": "number", + "description": "The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.", + "format": "float" + }, + "xCoordinate": { + "type": "number", + "description": "The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.", + "format": "float" + }, + "yCoordinate": { + "type": "number", + "description": "The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.", + "format": "float" + } + } + }, + "backgroundImageLink": { + "type": "string", + "description": "A short-lived link to this Team Drive's background image." + }, + "capabilities": { + "type": "object", + "description": "Capabilities the current user has on this Team Drive.", + "properties": { + "canAddChildren": { + "type": "boolean", + "description": "Whether the current user can add children to folders in this Team Drive." + }, + "canChangeTeamDriveBackground": { + "type": "boolean", + "description": "Whether the current user can change the background of this Team Drive." + }, + "canComment": { + "type": "boolean", + "description": "Whether the current user can comment on files in this Team Drive." + }, + "canCopy": { + "type": "boolean", + "description": "Whether the current user can copy files in this Team Drive." + }, + "canDeleteTeamDrive": { + "type": "boolean", + "description": "Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive." + }, + "canDownload": { + "type": "boolean", + "description": "Whether the current user can download files in this Team Drive." + }, + "canEdit": { + "type": "boolean", + "description": "Whether the current user can edit files in this Team Drive" + }, + "canListChildren": { + "type": "boolean", + "description": "Whether the current user can list the children of folders in this Team Drive." + }, + "canManageMembers": { + "type": "boolean", + "description": "Whether the current user can add members to this Team Drive or remove them or change their role." + }, + "canReadRevisions": { + "type": "boolean", + "description": "Whether the current user can read the revisions resource of files in this Team Drive." + }, + "canRemoveChildren": { + "type": "boolean", + "description": "Whether the current user can remove children from folders in this Team Drive." + }, + "canRename": { + "type": "boolean", + "description": "Whether the current user can rename files or folders in this Team Drive." + }, + "canRenameTeamDrive": { + "type": "boolean", + "description": "Whether the current user can rename this Team Drive." + }, + "canShare": { + "type": "boolean", + "description": "Whether the current user can share files or folders in this Team Drive." + } + } + }, + "colorRgb": { + "type": "string", + "description": "The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId." + }, + "id": { + "type": "string", + "description": "The ID of this Team Drive which is also the ID of the top level folder for this Team Drive." + }, + "kind": { + "type": "string", + "description": "This is always drive#teamDrive", + "default": "drive#teamDrive" + }, + "name": { + "type": "string", + "description": "The name of this Team Drive." + }, + "themeId": { + "type": "string", + "description": "The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile." + } + } + }, + "TeamDriveList": { + "id": "TeamDriveList", + "type": "object", + "description": "A list of Team Drives.", + "properties": { + "items": { + "type": "array", + "description": "The list of Team Drives.", + "items": { + "$ref": "TeamDrive" + } + }, + "kind": { + "type": "string", + "description": "This is always drive#teamDriveList", + "default": "drive#teamDriveList" + }, + "nextPageToken": { + "type": "string", + "description": "The page token for the next page of Team Drives." + } + } + }, "User": { "id": "User", "type": "object", @@ -1915,6 +2244,17 @@ "description": "The ID of the change.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, + "teamDriveId": { + "type": "string", + "description": "The Team Drive from which the change will be returned.", + "location": "query" } }, "parameterOrder": [ @@ -1934,15 +2274,53 @@ "https://www.googleapis.com/auth/drive.readonly" ] }, + "getStartPageToken": { + "id": "drive.changes.getStartPageToken", + "path": "changes/startPageToken", + "httpMethod": "GET", + "description": "Gets the starting pageToken for listing future changes.", + "parameters": { + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive for which the starting pageToken for listing future changes from that Team Drive will be returned.", + "location": "query" + } + }, + "response": { + "$ref": "StartPageToken" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.appdata", + "https://www.googleapis.com/auth/drive.apps.readonly", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.metadata", + "https://www.googleapis.com/auth/drive.metadata.readonly", + "https://www.googleapis.com/auth/drive.photos.readonly", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, "list": { "id": "drive.changes.list", "path": "changes", "httpMethod": "GET", - "description": "Lists the changes for a user.", + "description": "Lists the changes for a user or Team Drive.", "parameters": { + "includeCorpusRemovals": { + "type": "boolean", + "description": "Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.", + "default": "false", + "location": "query" + }, "includeDeleted": { "type": "boolean", - "description": "Whether to include deleted items.", + "description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.", "default": "true", "location": "query" }, @@ -1952,6 +2330,12 @@ "default": "true", "location": "query" }, + "includeTeamDriveItems": { + "type": "boolean", + "description": "Whether Team Drive files or changes should be included in results.", + "default": "false", + "location": "query" + }, "maxResults": { "type": "integer", "description": "Maximum number of changes to return.", @@ -1962,7 +2346,7 @@ }, "pageToken": { "type": "string", - "description": "Page token for changes.", + "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.", "location": "query" }, "spaces": { @@ -1975,6 +2359,17 @@ "description": "Change ID to start listing changes from.", "format": "int64", "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, + "teamDriveId": { + "type": "string", + "description": "The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.", + "location": "query" } }, "response": { @@ -1998,9 +2393,15 @@ "httpMethod": "POST", "description": "Subscribe to changes for a user.", "parameters": { + "includeCorpusRemovals": { + "type": "boolean", + "description": "Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.", + "default": "false", + "location": "query" + }, "includeDeleted": { "type": "boolean", - "description": "Whether to include deleted items.", + "description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.", "default": "true", "location": "query" }, @@ -2010,6 +2411,12 @@ "default": "true", "location": "query" }, + "includeTeamDriveItems": { + "type": "boolean", + "description": "Whether Team Drive files or changes should be included in results.", + "default": "false", + "location": "query" + }, "maxResults": { "type": "integer", "description": "Maximum number of changes to return.", @@ -2020,7 +2427,7 @@ }, "pageToken": { "type": "string", - "description": "Page token for changes.", + "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.", "location": "query" }, "spaces": { @@ -2033,6 +2440,17 @@ "description": "Change ID to start listing changes from.", "format": "int64", "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, + "teamDriveId": { + "type": "string", + "description": "The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.", + "location": "query" } }, "request": { @@ -2157,6 +2575,12 @@ "description": "The ID of the folder.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -2480,6 +2904,12 @@ "default": "false", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "timedTextLanguage": { "type": "string", "description": "The language of the timed text.", @@ -2526,13 +2956,19 @@ "id": "drive.files.delete", "path": "files/{fileId}", "httpMethod": "DELETE", - "description": "Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file.", + "description": "Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files.", "parameters": { "fileId": { "type": "string", "description": "The ID of the file to delete.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -2650,6 +3086,12 @@ "description": "Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "updateViewedDate": { "type": "boolean", "description": "Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.", @@ -2705,6 +3147,12 @@ "default": "false", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "timedTextLanguage": { "type": "string", "description": "The language of the timed text.", @@ -2773,9 +3221,14 @@ "httpMethod": "GET", "description": "Lists the user's files.", "parameters": { + "corpora": { + "type": "string", + "description": "Comma-separated list of bodies of items (files/documents) to which the query applies. Supported bodies are 'default', 'domain', 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with 'default'; all other values must be used in isolation. Prefer 'default' or 'teamDrive' to 'allTeamDrives' for efficiency.", + "location": "query" + }, "corpus": { "type": "string", - "description": "The body of items (files/documents) to which the query applies.", + "description": "The body of items (files/documents) to which the query applies. Deprecated: use 'corpora' instead.", "enum": [ "DEFAULT", "DOMAIN" @@ -2786,9 +3239,15 @@ ], "location": "query" }, + "includeTeamDriveItems": { + "type": "boolean", + "description": "Whether Team Drive items should be included in results.", + "default": "false", + "location": "query" + }, "maxResults": { "type": "integer", - "description": "Maximum number of files to return.", + "description": "The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.", "default": "100", "format": "int32", "minimum": "0", @@ -2826,6 +3285,17 @@ "type": "string", "description": "A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.", "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, + "teamDriveId": { + "type": "string", + "description": "ID of Team Drive to search.", + "location": "query" } }, "response": { @@ -2920,6 +3390,12 @@ "default": "false", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "timedTextLanguage": { "type": "string", "description": "The language of the timed text.", @@ -2972,6 +3448,12 @@ "description": "The ID of the file to update.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -2992,13 +3474,19 @@ "id": "drive.files.trash", "path": "files/{fileId}/trash", "httpMethod": "POST", - "description": "Moves a file to the trash. The currently authenticated user must own the file.", + "description": "Moves a file to the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files.", "parameters": { "fileId": { "type": "string", "description": "The ID of the file to trash.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -3025,6 +3513,12 @@ "description": "The ID of the file to untrash.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -3118,6 +3612,12 @@ "default": "false", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "timedTextLanguage": { "type": "string", "description": "The language of the timed text.", @@ -3212,6 +3712,12 @@ "description": "Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "updateViewedDate": { "type": "boolean", "description": "Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.", @@ -3321,6 +3827,12 @@ "description": "The ID of the file.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -3375,11 +3887,11 @@ "id": "drive.permissions.delete", "path": "files/{fileId}/permissions/{permissionId}", "httpMethod": "DELETE", - "description": "Deletes a permission from a file.", + "description": "Deletes a permission from a file or Team Drive.", "parameters": { "fileId": { "type": "string", - "description": "The ID for the file.", + "description": "The ID for the file or Team Drive.", "required": true, "location": "path" }, @@ -3388,6 +3900,12 @@ "description": "The ID for the permission.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -3407,7 +3925,7 @@ "parameters": { "fileId": { "type": "string", - "description": "The ID for the file.", + "description": "The ID for the file or Team Drive.", "required": true, "location": "path" }, @@ -3416,6 +3934,12 @@ "description": "The ID for the permission.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -3468,7 +3992,7 @@ "id": "drive.permissions.insert", "path": "files/{fileId}/permissions", "httpMethod": "POST", - "description": "Inserts a permission for a file.", + "description": "Inserts a permission for a file or Team Drive.", "parameters": { "emailMessage": { "type": "string", @@ -3477,7 +4001,7 @@ }, "fileId": { "type": "string", - "description": "The ID for the file.", + "description": "The ID for the file or Team Drive.", "required": true, "location": "path" }, @@ -3486,6 +4010,12 @@ "description": "Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner.", "default": "true", "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -3506,13 +4036,32 @@ "id": "drive.permissions.list", "path": "files/{fileId}/permissions", "httpMethod": "GET", - "description": "Lists a file's permissions.", + "description": "Lists a file's or Team Drive's permissions.", "parameters": { "fileId": { "type": "string", - "description": "The ID for the file.", + "description": "The ID for the file or Team Drive.", "required": true, "location": "path" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire list will be returned.", + "format": "int32", + "minimum": "1", + "maximum": "100", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.", + "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -3538,7 +4087,7 @@ "parameters": { "fileId": { "type": "string", - "description": "The ID for the file.", + "description": "The ID for the file or Team Drive.", "required": true, "location": "path" }, @@ -3554,6 +4103,12 @@ "default": "false", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "transferOwnership": { "type": "boolean", "description": "Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.", @@ -3584,7 +4139,7 @@ "parameters": { "fileId": { "type": "string", - "description": "The ID for the file.", + "description": "The ID for the file or Team Drive.", "required": true, "location": "path" }, @@ -3600,6 +4155,12 @@ "default": "false", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "transferOwnership": { "type": "boolean", "description": "Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.", @@ -4358,6 +4919,135 @@ ] } } + }, + "teamdrives": { + "methods": { + "delete": { + "id": "drive.teamdrives.delete", + "path": "teamdrives/{teamDriveId}", + "httpMethod": "DELETE", + "description": "Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items.", + "parameters": { + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "teamDriveId" + ], + "scopes": [ + "https://www.googleapis.com/auth/drive" + ] + }, + "get": { + "id": "drive.teamdrives.get", + "path": "teamdrives/{teamDriveId}", + "httpMethod": "GET", + "description": "Gets a Team Drive's metadata by ID.", + "parameters": { + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "teamDriveId" + ], + "response": { + "$ref": "TeamDrive" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, + "insert": { + "id": "drive.teamdrives.insert", + "path": "teamdrives", + "httpMethod": "POST", + "description": "Creates a new Team Drive.", + "parameters": { + "requestId": { + "type": "string", + "description": "An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned.", + "required": true, + "location": "query" + } + }, + "parameterOrder": [ + "requestId" + ], + "request": { + "$ref": "TeamDrive" + }, + "response": { + "$ref": "TeamDrive" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive" + ] + }, + "list": { + "id": "drive.teamdrives.list", + "path": "teamdrives", + "httpMethod": "GET", + "description": "Lists the user's Team Drives.", + "parameters": { + "maxResults": { + "type": "integer", + "description": "Maximum number of Team Drives to return.", + "default": "10", + "format": "int32", + "minimum": "1", + "maximum": "100", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Page token for Team Drives.", + "location": "query" + } + }, + "response": { + "$ref": "TeamDriveList" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, + "update": { + "id": "drive.teamdrives.update", + "path": "teamdrives/{teamDriveId}", + "httpMethod": "PUT", + "description": "Updates a Team Drive's metadata", + "parameters": { + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "teamDriveId" + ], + "request": { + "$ref": "TeamDrive" + }, + "response": { + "$ref": "TeamDrive" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive" + ] + } + } } } } diff --git a/etc/api/drive/v3/drive-api.json b/etc/api/drive/v3/drive-api.json index af7b2445cc..97675625ed 100644 --- a/etc/api/drive/v3/drive-api.json +++ b/etc/api/drive/v3/drive-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/4kaUogU191OXLH6MjJOHkd-Z-o8\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/1elIKE9OJ8UNewNj9RsDGTkU5MM\"", "discoveryVersion": "v1", "id": "drive:v3", "name": "drive", "version": "v3", - "revision": "20161212", + "revision": "20170512", "title": "Drive API", "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "ownerDomain": "google.com", @@ -177,6 +177,27 @@ } } }, + "teamDriveThemes": { + "type": "array", + "description": "A list of themes that are supported for Team Drives.", + "items": { + "type": "object", + "properties": { + "backgroundImageLink": { + "type": "string", + "description": "A link to this Team Drive theme's background image." + }, + "colorRgb": { + "type": "string", + "description": "The color of this Team Drive theme as an RGB hex string." + }, + "id": { + "type": "string", + "description": "The ID of the theme." + } + } + } + }, "user": { "$ref": "User", "description": "The authenticated user." @@ -186,11 +207,11 @@ "Change": { "id": "Change", "type": "object", - "description": "A change to a file.", + "description": "A change to a file or Team Drive.", "properties": { "file": { "$ref": "File", - "description": "The updated state of the file. Present if the file has not been removed." + "description": "The updated state of the file. Present if the type is file and the file has not been removed from this list of changes." }, "fileId": { "type": "string", @@ -203,12 +224,24 @@ }, "removed": { "type": "boolean", - "description": "Whether the file has been removed from the view of the changes list, for example by deletion or lost access." + "description": "Whether the file or Team Drive has been removed from this list of changes, for example by deletion or loss of access." + }, + "teamDrive": { + "$ref": "TeamDrive", + "description": "The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member of the Team Drive, and the Team Drive has not been removed." + }, + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive associated with this change." }, "time": { "type": "string", "description": "The time of this change (RFC 3339 date-time).", "format": "date-time" + }, + "type": { + "type": "string", + "description": "The type of the change. Possible values are file and teamDrive." } } }, @@ -219,7 +252,7 @@ "properties": { "changes": { "type": "array", - "description": "The page of changes.", + "description": "The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "Change" } @@ -235,7 +268,7 @@ }, "nextPageToken": { "type": "string", - "description": "The page token for the next page of changes. This will be absent if the end of the current changes list has been reached." + "description": "The page token for the next page of changes. This will be absent if the end of the changes list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." } } }, @@ -376,7 +409,7 @@ "properties": { "comments": { "type": "array", - "description": "The page of comments.", + "description": "The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "Comment" } @@ -388,7 +421,7 @@ }, "nextPageToken": { "type": "string", - "description": "The page token for the next page of comments. This will be absent if the end of the comments list has been reached." + "description": "The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." } } }, @@ -406,27 +439,75 @@ }, "capabilities": { "type": "object", - "description": "Capabilities the current user has on the file.", + "description": "Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.", "properties": { + "canAddChildren": { + "type": "boolean", + "description": "Whether the current user can add children to this folder. This is always false when the item is not a folder." + }, + "canChangeViewersCanCopyContent": { + "type": "boolean", + "description": "Whether the current user can change whether viewers can copy the contents of this file." + }, "canComment": { "type": "boolean", - "description": "Whether the user can comment on the file." + "description": "Whether the current user can comment on this file." }, "canCopy": { "type": "boolean", - "description": "Whether the user can copy the file." + "description": "Whether the current user can copy this file. For a Team Drive item, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder." + }, + "canDelete": { + "type": "boolean", + "description": "Whether the current user can delete this file." + }, + "canDownload": { + "type": "boolean", + "description": "Whether the current user can download this file." }, "canEdit": { "type": "boolean", - "description": "Whether the user can edit the file's content." + "description": "Whether the current user can edit this file." + }, + "canListChildren": { + "type": "boolean", + "description": "Whether the current user can list the children of this folder. This is always false when the item is not a folder." + }, + "canMoveItemIntoTeamDrive": { + "type": "boolean", + "description": "Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem." + }, + "canMoveTeamDriveItem": { + "type": "boolean", + "description": "Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files." }, "canReadRevisions": { "type": "boolean", - "description": "Whether the current user has read access to the Revisions resource of the file." + "description": "Whether the current user can read the revisions resource of this file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read." + }, + "canReadTeamDrive": { + "type": "boolean", + "description": "Whether the current user can read the Team Drive to which this file belongs. Only populated for Team Drive files." + }, + "canRemoveChildren": { + "type": "boolean", + "description": "Whether the current user can remove children from this folder. This is always false when the item is not a folder." + }, + "canRename": { + "type": "boolean", + "description": "Whether the current user can rename this file." }, "canShare": { "type": "boolean", - "description": "Whether the user can modify the file's permissions and sharing settings." + "description": "Whether the current user can modify the sharing settings for this file." + }, + "canTrash": { + "type": "boolean", + "description": "Whether the current user can move this file to trash." + }, + "canUntrash": { + "type": "boolean", + "description": "Whether the current user can restore this file from trash." } } }, @@ -480,9 +561,13 @@ "type": "string", "description": "The full file extension extracted from the name field. May contain multiple concatenated extensions, such as \"tar.gz\". This is only available for files with binary content in Drive.\nThis is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension." }, + "hasAugmentedPermissions": { + "type": "boolean", + "description": "Whether any users are granted file access directly on this file. This field is only populated for Team Drive files." + }, "hasThumbnail": { "type": "boolean", - "description": "Whether this file has a thumbnail." + "description": "Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field." }, "headRevisionId": { "type": "string", @@ -650,7 +735,7 @@ }, "name": { "type": "string", - "description": "The name of the file. This is not necessarily unique within a folder." + "description": "The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of Team Drives, My Drive root folder, and Application Data folder the name is constant." }, "originalFilename": { "type": "string", @@ -658,11 +743,11 @@ }, "ownedByMe": { "type": "boolean", - "description": "Whether the user owns the file." + "description": "Whether the user owns the file. Not populated for Team Drive files." }, "owners": { "type": "array", - "description": "The owners of the file. Currently, only certain legacy files may have more than one owner.", + "description": "The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for Team Drive files.", "items": { "$ref": "User" } @@ -676,7 +761,7 @@ }, "permissions": { "type": "array", - "description": "The full list of permissions for the file. This is only available if the requesting user can share the file.", + "description": "The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for Team Drive files.", "items": { "$ref": "Permission" } @@ -695,7 +780,7 @@ }, "shared": { "type": "boolean", - "description": "Whether the file has been shared." + "description": "Whether the file has been shared. Not populated for Team Drive files." }, "sharedWithMeTime": { "type": "string", @@ -722,19 +807,32 @@ "type": "boolean", "description": "Whether the user has starred the file." }, + "teamDriveId": { + "type": "string", + "description": "ID of the Team Drive the file resides in." + }, "thumbnailLink": { "type": "string", "description": "A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content." }, "thumbnailVersion": { "type": "string", - "description": "The thumbnail version for use in client-contructable thumbnail URLs or thumbnail cache invalidation.", + "description": "The thumbnail version for use in thumbnail cache invalidation.", "format": "int64" }, "trashed": { "type": "boolean", "description": "Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash." }, + "trashedTime": { + "type": "string", + "description": "The time that the item was trashed (RFC 3339 date-time). Only populated for Team Drive files.", + "format": "date-time" + }, + "trashingUser": { + "$ref": "User", + "description": "If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files." + }, "version": { "type": "string", "description": "A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.", @@ -784,7 +882,7 @@ }, "writersCanShare": { "type": "boolean", - "description": "Whether users with only writer permission can modify the file's permissions." + "description": "Whether users with only writer permission can modify the file's permissions. Not populated for Team Drive files." } } }, @@ -795,11 +893,15 @@ "properties": { "files": { "type": "array", - "description": "The page of files.", + "description": "The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "File" } }, + "incompleteSearch": { + "type": "boolean", + "description": "Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple Team Drives with the \"user,allTeamDrives\" corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as \"user\" or \"teamDrive\"." + }, "kind": { "type": "string", "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#fileList\".", @@ -807,7 +909,7 @@ }, "nextPageToken": { "type": "string", - "description": "The page token for the next page of files. This will be absent if the end of the files list has been reached." + "description": "The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." } } }, @@ -843,6 +945,10 @@ "type": "boolean", "description": "Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone." }, + "deleted": { + "type": "boolean", + "description": "Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions." + }, "displayName": { "type": "string", "description": "A displayable name for users, groups or domains." @@ -857,7 +963,7 @@ }, "expirationTime": { "type": "string", - "description": "The time at which this permission will expire (RFC 3339 date-time).", + "description": "The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: \n- They can only be set on user and group permissions \n- The time must be in the future \n- The time cannot be more than a year in the future", "format": "date-time" }, "id": { @@ -875,13 +981,38 @@ }, "role": { "type": "string", - "description": "The role granted by this permission. Valid values are: \n- owner \n- writer \n- commenter \n- reader", + "description": "The role granted by this permission. While new values may be supported in the future, the following are currently allowed: \n- organizer \n- owner \n- writer \n- commenter \n- reader", "annotations": { "required": [ "drive.permissions.create" ] } }, + "teamDrivePermissionDetails": { + "type": "array", + "description": "Details of whether the permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.", + "items": { + "type": "object", + "properties": { + "inherited": { + "type": "boolean", + "description": "Whether this permission is inherited. This field is always populated. This is an output-only field." + }, + "inheritedFrom": { + "type": "string", + "description": "The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive." + }, + "role": { + "type": "string", + "description": "The primary role for this user. While new values may be added in the future, the following are currently possible: \n- organizer \n- writer \n- commenter \n- reader" + }, + "teamDrivePermissionType": { + "type": "string", + "description": "The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: \n- file \n- member" + } + } + } + }, "type": { "type": "string", "description": "The type of the grantee. Valid values are: \n- user \n- group \n- domain \n- anyone", @@ -903,9 +1034,13 @@ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#permissionList\".", "default": "drive#permissionList" }, + "nextPageToken": { + "type": "string", + "description": "The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." + }, "permissions": { "type": "array", - "description": "The full list of permissions.", + "description": "The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "Permission" } @@ -975,11 +1110,11 @@ }, "nextPageToken": { "type": "string", - "description": "The page token for the next page of replies. This will be absent if the end of the replies list has been reached." + "description": "The page token for the next page of replies. This will be absent if the end of the replies list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." }, "replies": { "type": "array", - "description": "The page of replies.", + "description": "The list of replies. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "Reply" } @@ -1056,11 +1191,11 @@ }, "nextPageToken": { "type": "string", - "description": "The page token for the next page of revisions. This will be absent if the end of the revisions list has been reached." + "description": "The page token for the next page of revisions. This will be absent if the end of the revisions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." }, "revisions": { "type": "array", - "description": "The full list of revisions.", + "description": "The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", "items": { "$ref": "Revision" } @@ -1082,6 +1217,148 @@ } } }, + "TeamDrive": { + "id": "TeamDrive", + "type": "object", + "description": "Representation of a Team Drive.", + "properties": { + "backgroundImageFile": { + "type": "object", + "description": "An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.", + "properties": { + "id": { + "type": "string", + "description": "The ID of an image file in Drive to use for the background image." + }, + "width": { + "type": "number", + "description": "The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.", + "format": "float" + }, + "xCoordinate": { + "type": "number", + "description": "The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.", + "format": "float" + }, + "yCoordinate": { + "type": "number", + "description": "The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.", + "format": "float" + } + } + }, + "backgroundImageLink": { + "type": "string", + "description": "A short-lived link to this Team Drive's background image." + }, + "capabilities": { + "type": "object", + "description": "Capabilities the current user has on this Team Drive.", + "properties": { + "canAddChildren": { + "type": "boolean", + "description": "Whether the current user can add children to folders in this Team Drive." + }, + "canChangeTeamDriveBackground": { + "type": "boolean", + "description": "Whether the current user can change the background of this Team Drive." + }, + "canComment": { + "type": "boolean", + "description": "Whether the current user can comment on files in this Team Drive." + }, + "canCopy": { + "type": "boolean", + "description": "Whether the current user can copy files in this Team Drive." + }, + "canDeleteTeamDrive": { + "type": "boolean", + "description": "Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive." + }, + "canDownload": { + "type": "boolean", + "description": "Whether the current user can download files in this Team Drive." + }, + "canEdit": { + "type": "boolean", + "description": "Whether the current user can edit files in this Team Drive" + }, + "canListChildren": { + "type": "boolean", + "description": "Whether the current user can list the children of folders in this Team Drive." + }, + "canManageMembers": { + "type": "boolean", + "description": "Whether the current user can add members to this Team Drive or remove them or change their role." + }, + "canReadRevisions": { + "type": "boolean", + "description": "Whether the current user can read the revisions resource of files in this Team Drive." + }, + "canRemoveChildren": { + "type": "boolean", + "description": "Whether the current user can remove children from folders in this Team Drive." + }, + "canRename": { + "type": "boolean", + "description": "Whether the current user can rename files or folders in this Team Drive." + }, + "canRenameTeamDrive": { + "type": "boolean", + "description": "Whether the current user can rename this Team Drive." + }, + "canShare": { + "type": "boolean", + "description": "Whether the current user can share files or folders in this Team Drive." + } + } + }, + "colorRgb": { + "type": "string", + "description": "The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId." + }, + "id": { + "type": "string", + "description": "The ID of this Team Drive which is also the ID of the top level folder for this Team Drive." + }, + "kind": { + "type": "string", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#teamDrive\".", + "default": "drive#teamDrive" + }, + "name": { + "type": "string", + "description": "The name of this Team Drive." + }, + "themeId": { + "type": "string", + "description": "The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile." + } + } + }, + "TeamDriveList": { + "id": "TeamDriveList", + "type": "object", + "description": "A list of Team Drives.", + "properties": { + "kind": { + "type": "string", + "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#teamDriveList\".", + "default": "drive#teamDriveList" + }, + "nextPageToken": { + "type": "string", + "description": "The page token for the next page of Team Drives. This will be absent if the end of the Team Drives list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results." + }, + "teamDrives": { + "type": "array", + "description": "The list of Team Drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.", + "items": { + "$ref": "TeamDrive" + } + } + } + }, "User": { "id": "User", "type": "object", @@ -1145,6 +1422,19 @@ "path": "changes/startPageToken", "httpMethod": "GET", "description": "Gets the starting pageToken for listing future changes.", + "parameters": { + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive for which the starting pageToken for listing future changes from that Team Drive will be returned.", + "location": "query" + } + }, "response": { "$ref": "StartPageToken" }, @@ -1162,14 +1452,26 @@ "id": "drive.changes.list", "path": "changes", "httpMethod": "GET", - "description": "Lists changes for a user.", + "description": "Lists the changes for a user or Team Drive.", "parameters": { + "includeCorpusRemovals": { + "type": "boolean", + "description": "Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.", + "default": "false", + "location": "query" + }, "includeRemoved": { "type": "boolean", - "description": "Whether to include changes indicating that items have left the view of the changes list, for example by deletion or lost access.", + "description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.", "default": "true", "location": "query" }, + "includeTeamDriveItems": { + "type": "boolean", + "description": "Whether Team Drive files or changes should be included in results.", + "default": "false", + "location": "query" + }, "pageSize": { "type": "integer", "description": "The maximum number of changes to return per page.", @@ -1196,6 +1498,17 @@ "description": "A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.", "default": "drive", "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, + "teamDriveId": { + "type": "string", + "description": "The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.", + "location": "query" } }, "parameterOrder": [ @@ -1221,12 +1534,24 @@ "httpMethod": "POST", "description": "Subscribes to changes for a user.", "parameters": { + "includeCorpusRemovals": { + "type": "boolean", + "description": "Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.", + "default": "false", + "location": "query" + }, "includeRemoved": { "type": "boolean", - "description": "Whether to include changes indicating that items have left the view of the changes list, for example by deletion or lost access.", + "description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.", "default": "true", "location": "query" }, + "includeTeamDriveItems": { + "type": "boolean", + "description": "Whether Team Drive files or changes should be included in results.", + "default": "false", + "location": "query" + }, "pageSize": { "type": "integer", "description": "The maximum number of changes to return per page.", @@ -1253,6 +1578,17 @@ "description": "A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.", "default": "drive", "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, + "teamDriveId": { + "type": "string", + "description": "The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.", + "location": "query" } }, "parameterOrder": [ @@ -1512,6 +1848,12 @@ "type": "string", "description": "A language hint for OCR processing during image import (ISO 639-1 code).", "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -1553,6 +1895,12 @@ "description": "A language hint for OCR processing during image import (ISO 639-1 code).", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "useContentAsIndexableText": { "type": "boolean", "description": "Whether to use the uploaded content as indexable text.", @@ -1594,13 +1942,19 @@ "id": "drive.files.delete", "path": "files/{fileId}", "httpMethod": "DELETE", - "description": "Permanently deletes a file owned by the user without moving it to the trash. If the target is a folder, all descendants owned by the user are also deleted.", + "description": "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a Team Drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.", "parameters": { "fileId": { "type": "string", "description": "The ID of the file.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -1699,6 +2053,12 @@ "description": "The ID of the file.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -1726,10 +2086,14 @@ "httpMethod": "GET", "description": "Lists or searches files.", "parameters": { + "corpora": { + "type": "string", + "description": "Comma-separated list of bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with 'user'; all other values must be used in isolation. Prefer 'user' or 'teamDrive' to 'allTeamDrives' for efficiency.", + "location": "query" + }, "corpus": { "type": "string", - "description": "The source of files to list.", - "default": "user", + "description": "The source of files to list. Deprecated: use 'corpora' instead.", "enum": [ "domain", "user" @@ -1740,6 +2104,12 @@ ], "location": "query" }, + "includeTeamDriveItems": { + "type": "boolean", + "description": "Whether Team Drive items should be included in results.", + "default": "false", + "location": "query" + }, "orderBy": { "type": "string", "description": "A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", @@ -1747,7 +2117,7 @@ }, "pageSize": { "type": "integer", - "description": "The maximum number of files to return per page.", + "description": "The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.", "default": "100", "format": "int32", "minimum": "1", @@ -1769,6 +2139,17 @@ "description": "A comma-separated list of spaces to query within the corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.", "default": "drive", "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, + "teamDriveId": { + "type": "string", + "description": "ID of Team Drive to search.", + "location": "query" } }, "response": { @@ -1817,6 +2198,12 @@ "description": "A comma-separated list of parent IDs to remove.", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "useContentAsIndexableText": { "type": "boolean", "description": "Whether to use the uploaded content as indexable text.", @@ -1875,6 +2262,12 @@ "description": "The ID of the file.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -1908,7 +2301,7 @@ "id": "drive.permissions.create", "path": "files/{fileId}/permissions", "httpMethod": "POST", - "description": "Creates a permission for a file.", + "description": "Creates a permission for a file or Team Drive.", "parameters": { "emailMessage": { "type": "string", @@ -1917,7 +2310,7 @@ }, "fileId": { "type": "string", - "description": "The ID of the file.", + "description": "The ID of the file or Team Drive.", "required": true, "location": "path" }, @@ -1926,6 +2319,12 @@ "description": "Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "transferOwnership": { "type": "boolean", "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.", @@ -1955,7 +2354,7 @@ "parameters": { "fileId": { "type": "string", - "description": "The ID of the file.", + "description": "The ID of the file or Team Drive.", "required": true, "location": "path" }, @@ -1964,6 +2363,12 @@ "description": "The ID of the permission.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -1992,6 +2397,12 @@ "description": "The ID of the permission.", "required": true, "location": "path" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -2014,13 +2425,32 @@ "id": "drive.permissions.list", "path": "files/{fileId}/permissions", "httpMethod": "GET", - "description": "Lists a file's permissions.", + "description": "Lists a file's or Team Drive's permissions.", "parameters": { "fileId": { "type": "string", - "description": "The ID of the file.", + "description": "The ID of the file or Team Drive.", "required": true, "location": "path" + }, + "pageSize": { + "type": "integer", + "description": "The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire list will be returned.", + "format": "int32", + "minimum": "1", + "maximum": "100", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.", + "location": "query" + }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" } }, "parameterOrder": [ @@ -2046,7 +2476,7 @@ "parameters": { "fileId": { "type": "string", - "description": "The ID of the file.", + "description": "The ID of the file or Team Drive.", "required": true, "location": "path" }, @@ -2062,6 +2492,12 @@ "default": "false", "location": "query" }, + "supportsTeamDrives": { + "type": "boolean", + "description": "Whether the requesting application supports Team Drives.", + "default": "false", + "location": "query" + }, "transferOwnership": { "type": "boolean", "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.", @@ -2451,6 +2887,135 @@ ] } } + }, + "teamdrives": { + "methods": { + "create": { + "id": "drive.teamdrives.create", + "path": "teamdrives", + "httpMethod": "POST", + "description": "Creates a new Team Drive.", + "parameters": { + "requestId": { + "type": "string", + "description": "An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned.", + "required": true, + "location": "query" + } + }, + "parameterOrder": [ + "requestId" + ], + "request": { + "$ref": "TeamDrive" + }, + "response": { + "$ref": "TeamDrive" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive" + ] + }, + "delete": { + "id": "drive.teamdrives.delete", + "path": "teamdrives/{teamDriveId}", + "httpMethod": "DELETE", + "description": "Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items.", + "parameters": { + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "teamDriveId" + ], + "scopes": [ + "https://www.googleapis.com/auth/drive" + ] + }, + "get": { + "id": "drive.teamdrives.get", + "path": "teamdrives/{teamDriveId}", + "httpMethod": "GET", + "description": "Gets a Team Drive's metadata by ID.", + "parameters": { + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "teamDriveId" + ], + "response": { + "$ref": "TeamDrive" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, + "list": { + "id": "drive.teamdrives.list", + "path": "teamdrives", + "httpMethod": "GET", + "description": "Lists the user's Team Drives.", + "parameters": { + "pageSize": { + "type": "integer", + "description": "Maximum number of Team Drives to return.", + "default": "10", + "format": "int32", + "minimum": "1", + "maximum": "100", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Page token for Team Drives.", + "location": "query" + } + }, + "response": { + "$ref": "TeamDriveList" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, + "update": { + "id": "drive.teamdrives.update", + "path": "teamdrives/{teamDriveId}", + "httpMethod": "PATCH", + "description": "Updates a Team Drive's metadata", + "parameters": { + "teamDriveId": { + "type": "string", + "description": "The ID of the Team Drive", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "teamDriveId" + ], + "request": { + "$ref": "TeamDrive" + }, + "response": { + "$ref": "TeamDrive" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive" + ] + } + } } } } diff --git a/etc/api/firebasedynamiclinks/v1/firebasedynamiclinks-api.json b/etc/api/firebasedynamiclinks/v1/firebasedynamiclinks-api.json index 29e5ba2d13..12dd48646b 100644 --- a/etc/api/firebasedynamiclinks/v1/firebasedynamiclinks-api.json +++ b/etc/api/firebasedynamiclinks/v1/firebasedynamiclinks-api.json @@ -1,81 +1,247 @@ { - "id": "firebasedynamiclinks:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/firebase": { - "description": "View and administer all your Firebase data and settings" - } - } - } - }, - "description": "Firebase Dynamic Links API enables third party developers to programmatically create and manage Dynamic Links.", - "protocol": "rest", + "rootUrl": "https://firebasedynamiclinks.googleapis.com/", + "ownerDomain": "google.com", + "name": "firebasedynamiclinks", + "batchPath": "batch", "title": "Firebase Dynamic Links API", + "ownerName": "Google", "resources": { "shortLinks": { "methods": { "create": { - "id": "firebasedynamiclinks.shortLinks.create", + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "CreateShortDynamicLinkResponse" }, - "parameterOrder": [], - "description": "Creates a short Dynamic Link given either a valid long Dynamic Link or\ndetails such as Dynamic Link domain, Android and iOS app information.\nThe created short Dynamic Link will not expire.\n\nRepeated calls with the same long Dynamic Link or Dynamic Link information\nwill produce the same short Dynamic Link.\n\nThe Dynamic Link domain in the request must be owned by requester's\nFirebase project.", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/firebase" + ], + "flatPath": "v1/shortLinks", + "id": "firebasedynamiclinks.shortLinks.create", + "path": "v1/shortLinks", "request": { "$ref": "CreateShortDynamicLinkRequest" }, - "flatPath": "v1/shortLinks", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/shortLinks", - "scopes": [ - "https://www.googleapis.com/auth/firebase" - ] + "description": "Creates a short Dynamic Link given either a valid long Dynamic Link or\ndetails such as Dynamic Link domain, Android and iOS app information.\nThe created short Dynamic Link will not expire.\n\nRepeated calls with the same long Dynamic Link or Dynamic Link information\nwill produce the same short Dynamic Link.\n\nThe Dynamic Link domain in the request must be owned by requester's\nFirebase project." } } } }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + } + }, + "version": "v1", + "baseUrl": "https://firebasedynamiclinks.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Programmatically creates and manages Firebase Dynamic Links.", + "servicePath": "", + "basePath": "", + "id": "firebasedynamiclinks:v1", + "documentationLink": "https://firebase.google.com/docs/dynamic-links/", + "revision": "20170517", + "discoveryVersion": "v1", + "version_module": "True", "schemas": { - "DynamicLinkInfo": { - "description": "Information about a Dynamic Link.", - "type": "object", + "CreateShortDynamicLinkResponse": { "properties": { - "socialMetaTagInfo": { - "description": "Parameters for social meta tag params.\nUsed to set meta tag data for link previews on social sites.", - "$ref": "SocialMetaTagInfo" - }, - "analyticsInfo": { - "description": "Parameters used for tracking. See all tracking parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/android#create-a-dynamic-link-programmatically).", - "$ref": "AnalyticsInfo" - }, - "link": { - "description": "The link your app will open, You can specify any URL your app can handle.\nThis link must be a well-formatted URL, be properly URL-encoded, and use\nthe HTTP or HTTPS scheme. See 'link' parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/android#create-a-dynamic-link-programmatically).\n\nRequired.", + "shortLink": { + "description": "Short Dynamic Link value. e.g. https://abcd.app.goo.gl/wxyz", "type": "string" }, + "previewLink": { + "description": "Preivew link to show the link flow chart.", + "type": "string" + }, + "warning": { + "description": "Information about potential warnings on link creation.", + "type": "array", + "items": { + "$ref": "DynamicLinkWarning" + } + } + }, + "id": "CreateShortDynamicLinkResponse", + "description": "Response to create a short Dynamic Link.", + "type": "object" + }, + "Suffix": { + "description": "Short Dynamic Link suffix.", + "type": "object", + "properties": { + "option": { + "enumDescriptions": [ + "The suffix option is not specified, performs as NOT_GUESSABLE .", + "Short Dynamic Link suffix is a base62 [0-9A-Za-z] encoded string of\na random generated 96 bit random number, which has a length of 17 chars.\nFor example, \"nlAR8U4SlKRZw1cb2\".\nIt prevents other people from guessing and crawling short Dynamic Links\nthat contain personal identifiable information.", + "Short Dynamic Link suffix is a base62 [0-9A-Za-z] string starting with a\nlength of 4 chars. the length will increase when all the space is\noccupied." + ], + "enum": [ + "OPTION_UNSPECIFIED", + "UNGUESSABLE", + "SHORT" + ], + "description": "Suffix option.", + "type": "string" + } + }, + "id": "Suffix" + }, + "GooglePlayAnalytics": { + "properties": { + "gclid": { + "description": "[AdWords autotagging parameter](https://support.google.com/analytics/answer/1033981?hl=en);\nused to measure Google AdWords ads. This value is generated dynamically\nand should never be modified.", + "type": "string" + }, + "utmCampaign": { + "description": "Campaign name; used for keyword analysis to identify a specific product\npromotion or strategic campaign.", + "type": "string" + }, + "utmContent": { + "description": "Campaign content; used for A/B testing and content-targeted ads to\ndifferentiate ads or links that point to the same URL.", + "type": "string" + }, + "utmMedium": { + "description": "Campaign medium; used to identify a medium such as email or cost-per-click.", + "type": "string" + }, + "utmTerm": { + "description": "Campaign term; used with paid search to supply the keywords for ads.", + "type": "string" + }, + "utmSource": { + "description": "Campaign source; used to identify a search engine, newsletter, or other\nsource.", + "type": "string" + } + }, + "id": "GooglePlayAnalytics", + "description": "Parameters for Google Play Campaign Measurements.\n[Learn more](https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#campaign-params)", + "type": "object" + }, + "DynamicLinkInfo": { + "properties": { "dynamicLinkDomain": { - "description": "Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl\n[Learn more](https://firebase.google.com/docs/dynamic-links/android#set-up-firebase-and-the-dynamic-links-sdk)\non how to set up Dynamic Link domain associated with your Firebase project.\n\nRequired.", + "description": "Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl\n[Learn more](https://firebase.google.com/docs/dynamic-links/android/receive)\non how to set up Dynamic Link domain associated with your Firebase project.\n\nRequired.", + "type": "string" + }, + "link": { + "description": "The link your app will open, You can specify any URL your app can handle.\nThis link must be a well-formatted URL, be properly URL-encoded, and use\nthe HTTP or HTTPS scheme. See 'link' parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/create-manually).\n\nRequired.", "type": "string" }, "iosInfo": { - "description": "iOS related information. See iOS related parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/ios#create-a-dynamic-link-programmatically).", + "description": "iOS related information. See iOS related parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/create-manually).", "$ref": "IosInfo" }, + "socialMetaTagInfo": { + "$ref": "SocialMetaTagInfo", + "description": "Parameters for social meta tag params.\nUsed to set meta tag data for link previews on social sites." + }, "androidInfo": { - "description": "Android related information. See Android related parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/android#create-a-dynamic-link-programmatically).", + "description": "Android related information. See Android related parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/create-manually).", "$ref": "AndroidInfo" + }, + "navigationInfo": { + "$ref": "NavigationInfo", + "description": "Information of navigation behavior of a Firebase Dynamic Links." + }, + "analyticsInfo": { + "$ref": "AnalyticsInfo", + "description": "Parameters used for tracking. See all tracking parameters in the\n[documentation](https://firebase.google.com/docs/dynamic-links/create-manually)." } }, - "id": "DynamicLinkInfo" + "id": "DynamicLinkInfo", + "description": "Information about a Dynamic Link.", + "type": "object" }, "ITunesConnectAnalytics": { "description": "Parameters for iTunes Connect App Analytics.", "type": "object", "properties": { - "mt": { - "description": "iTune media types, including music, podcasts, audiobooks and so on.", - "type": "string" - }, "at": { "description": "Affiliate token used to create affiliate-coded links.", "type": "string" @@ -84,6 +250,10 @@ "description": "Campaign text that developers can optionally add to any link in order to\ntrack sales from a specific marketing campaign.", "type": "string" }, + "mt": { + "description": "iTune media types, including music, podcasts, audiobooks and so on.", + "type": "string" + }, "pt": { "description": "Provider token that enables analytics for Dynamic Links from within iTunes\nConnect.", "type": "string" @@ -91,43 +261,30 @@ }, "id": "ITunesConnectAnalytics" }, + "SocialMetaTagInfo": { + "description": "Parameters for social meta tag params.\nUsed to set meta tag data for link previews on social sites.", + "type": "object", + "properties": { + "socialTitle": { + "description": "Title to be displayed. Optional.", + "type": "string" + }, + "socialImageLink": { + "description": "An image url string. Optional.", + "type": "string" + }, + "socialDescription": { + "description": "A short description of the link. Optional.", + "type": "string" + } + }, + "id": "SocialMetaTagInfo" + }, "DynamicLinkWarning": { "description": "Dynamic Links warning messages.", "type": "object", "properties": { "warningCode": { - "description": "The warning code.", - "enum": [ - "CODE_UNSPECIFIED", - "NOT_IN_PROJECT_ANDROID_PACKAGE_NAME", - "NOT_INTEGER_ANDROID_PACKAGE_MIN_VERSION", - "UNNECESSARY_ANDROID_PACKAGE_MIN_VERSION", - "NOT_URI_ANDROID_LINK", - "UNNECESSARY_ANDROID_LINK", - "NOT_URI_ANDROID_FALLBACK_LINK", - "BAD_URI_SCHEME_ANDROID_FALLBACK_LINK", - "NOT_IN_PROJECT_IOS_BUNDLE_ID", - "NOT_IN_PROJECT_IPAD_BUNDLE_ID", - "UNNECESSARY_IOS_URL_SCHEME", - "NOT_NUMERIC_IOS_APP_STORE_ID", - "UNNECESSARY_IOS_APP_STORE_ID", - "NOT_URI_IOS_FALLBACK_LINK", - "BAD_URI_SCHEME_IOS_FALLBACK_LINK", - "NOT_URI_IPAD_FALLBACK_LINK", - "BAD_URI_SCHEME_IPAD_FALLBACK_LINK", - "BAD_DEBUG_PARAM", - "BAD_AD_PARAM", - "DEPRECATED_PARAM", - "UNRECOGNIZED_PARAM", - "TOO_LONG_PARAM", - "NOT_URI_SOCIAL_IMAGE_LINK", - "BAD_URI_SCHEME_SOCIAL_IMAGE_LINK", - "NOT_URI_SOCIAL_URL", - "BAD_URI_SCHEME_SOCIAL_URL", - "LINK_LENGTH_TOO_LONG", - "LINK_WITH_FRAGMENTS", - "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" - ], "enumDescriptions": [ "Unknown code.", "The Android package does not match any in developer's DevConsole project.", @@ -159,6 +316,38 @@ "Dynamic Link URL contains fragments.", "The iOS bundle ID does not match with the given iOS store ID." ], + "enum": [ + "CODE_UNSPECIFIED", + "NOT_IN_PROJECT_ANDROID_PACKAGE_NAME", + "NOT_INTEGER_ANDROID_PACKAGE_MIN_VERSION", + "UNNECESSARY_ANDROID_PACKAGE_MIN_VERSION", + "NOT_URI_ANDROID_LINK", + "UNNECESSARY_ANDROID_LINK", + "NOT_URI_ANDROID_FALLBACK_LINK", + "BAD_URI_SCHEME_ANDROID_FALLBACK_LINK", + "NOT_IN_PROJECT_IOS_BUNDLE_ID", + "NOT_IN_PROJECT_IPAD_BUNDLE_ID", + "UNNECESSARY_IOS_URL_SCHEME", + "NOT_NUMERIC_IOS_APP_STORE_ID", + "UNNECESSARY_IOS_APP_STORE_ID", + "NOT_URI_IOS_FALLBACK_LINK", + "BAD_URI_SCHEME_IOS_FALLBACK_LINK", + "NOT_URI_IPAD_FALLBACK_LINK", + "BAD_URI_SCHEME_IPAD_FALLBACK_LINK", + "BAD_DEBUG_PARAM", + "BAD_AD_PARAM", + "DEPRECATED_PARAM", + "UNRECOGNIZED_PARAM", + "TOO_LONG_PARAM", + "NOT_URI_SOCIAL_IMAGE_LINK", + "BAD_URI_SCHEME_SOCIAL_IMAGE_LINK", + "NOT_URI_SOCIAL_URL", + "BAD_URI_SCHEME_SOCIAL_URL", + "LINK_LENGTH_TOO_LONG", + "LINK_WITH_FRAGMENTS", + "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" + ], + "description": "The warning code.", "type": "string" }, "warningMessage": { @@ -168,6 +357,86 @@ }, "id": "DynamicLinkWarning" }, + "AndroidInfo": { + "properties": { + "androidLink": { + "description": "If specified, this overrides the ‘link’ parameter on Android.", + "type": "string" + }, + "androidFallbackLink": { + "description": "Link to open on Android if the app is not installed.", + "type": "string" + }, + "androidPackageName": { + "description": "Android package name of the app.", + "type": "string" + }, + "androidMinPackageVersionCode": { + "description": "Minimum version code for the Android app. If the installed app’s version\ncode is lower, then the user is taken to the Play Store.", + "type": "string" + } + }, + "id": "AndroidInfo", + "description": "Android related attributes to the Dynamic Link.", + "type": "object" + }, + "NavigationInfo": { + "description": "Information of navigation behavior.", + "type": "object", + "properties": { + "enableForcedRedirect": { + "description": "If this option is on, FDL click will be forced to redirect rather than\nshow an interstitial page.", + "type": "boolean" + } + }, + "id": "NavigationInfo" + }, + "IosInfo": { + "description": "iOS related attributes to the Dynamic Link..", + "type": "object", + "properties": { + "iosIpadFallbackLink": { + "description": "If specified, this overrides the ios_fallback_link value on iPads.", + "type": "string" + }, + "iosIpadBundleId": { + "description": "iPad bundle ID of the app.", + "type": "string" + }, + "iosCustomScheme": { + "description": "Custom (destination) scheme to use for iOS. By default, we’ll use the\nbundle ID as the custom scheme. Developer can override this behavior using\nthis param.", + "type": "string" + }, + "iosBundleId": { + "description": "iOS bundle ID of the app.", + "type": "string" + }, + "iosFallbackLink": { + "description": "Link to open on iOS if the app is not installed.", + "type": "string" + }, + "iosAppStoreId": { + "description": "iOS App Store ID.", + "type": "string" + } + }, + "id": "IosInfo" + }, + "AnalyticsInfo": { + "properties": { + "itunesConnectAnalytics": { + "description": "iTunes Connect App Analytics.", + "$ref": "ITunesConnectAnalytics" + }, + "googlePlayAnalytics": { + "$ref": "GooglePlayAnalytics", + "description": "Google Play Campaign Measurements." + } + }, + "id": "AnalyticsInfo", + "description": "Tracking parameters supported by Dynamic Link.", + "type": "object" + }, "CreateShortDynamicLinkRequest": { "description": "Request to create a short Dynamic Link.", "type": "object", @@ -181,280 +450,26 @@ "type": "string" }, "suffix": { - "description": "Short Dynamic Link suffix. Optional.", - "$ref": "Suffix" + "$ref": "Suffix", + "description": "Short Dynamic Link suffix. Optional." } }, "id": "CreateShortDynamicLinkRequest" - }, - "AnalyticsInfo": { - "description": "Tracking parameters supported by Dynamic Link.", - "type": "object", - "properties": { - "googlePlayAnalytics": { - "description": "Google Play Campaign Measurements.", - "$ref": "GooglePlayAnalytics" - }, - "itunesConnectAnalytics": { - "description": "iTunes Connect App Analytics.", - "$ref": "ITunesConnectAnalytics" - } - }, - "id": "AnalyticsInfo" - }, - "Suffix": { - "description": "Short Dynamic Link suffix.", - "type": "object", - "properties": { - "option": { - "description": "Suffix option.", - "enum": [ - "OPTION_UNSPECIFIED", - "UNGUESSABLE", - "SHORT" - ], - "enumDescriptions": [ - "The suffix option is not specified, performs as NOT_GUESSABLE .", - "Short Dynamic Link suffix is a base62 [0-9A-Za-z] encoded string of\na random generated 96 bit random number, which has a length of 17 chars.\nFor example, \"nlAR8U4SlKRZw1cb2\".\nIt prevents other people from guessing and crawling short Dynamic Links\nthat contain personal identifiable information.", - "Short Dynamic Link suffix is a base62 [0-9A-Za-z] string starting with a\nlength of 4 chars. the length will increase when all the space is\noccupied." - ], - "type": "string" - } - }, - "id": "Suffix" - }, - "CreateShortDynamicLinkResponse": { - "description": "Response to create a short Dynamic Link.", - "type": "object", - "properties": { - "previewLink": { - "description": "Preivew link to show the link flow chart.", - "type": "string" - }, - "warning": { - "description": "Information about potential warnings on link creation.", - "type": "array", - "items": { - "$ref": "DynamicLinkWarning" - } - }, - "shortLink": { - "description": "Short Dynamic Link value. e.g. https://abcd.app.goo.gl/wxyz", - "type": "string" - } - }, - "id": "CreateShortDynamicLinkResponse" - }, - "IosInfo": { - "description": "iOS related attributes to the Dynamic Link..", - "type": "object", - "properties": { - "iosAppStoreId": { - "description": "iOS App Store ID.", - "type": "string" - }, - "iosIpadFallbackLink": { - "description": "If specified, this overrides the ios_fallback_link value on iPads.", - "type": "string" - }, - "iosBundleId": { - "description": "iOS bundle ID of the app.", - "type": "string" - }, - "iosFallbackLink": { - "description": "Link to open on iOS if the app is not installed.", - "type": "string" - }, - "iosIpadBundleId": { - "description": "iPad bundle ID of the app.", - "type": "string" - }, - "iosCustomScheme": { - "description": "Custom (destination) scheme to use for iOS. By default, we’ll use the\nbundle ID as the custom scheme. Developer can override this behavior using\nthis param.", - "type": "string" - } - }, - "id": "IosInfo" - }, - "AndroidInfo": { - "description": "Android related attributes to the Dynamic Link.", - "type": "object", - "properties": { - "androidMinPackageVersionCode": { - "description": "Minimum version code for the Android app. If the installed app’s version\ncode is lower, then the user is taken to the Play Store.", - "type": "string" - }, - "androidLink": { - "description": "If specified, this overrides the ‘link’ parameter on Android.", - "type": "string" - }, - "androidFallbackLink": { - "description": "Link to open on Android if the app is not installed.", - "type": "string" - }, - "androidPackageName": { - "description": "Android package name of the app.", - "type": "string" - } - }, - "id": "AndroidInfo" - }, - "SocialMetaTagInfo": { - "description": "Parameters for social meta tag params.\nUsed to set meta tag data for link previews on social sites.", - "type": "object", - "properties": { - "socialTitle": { - "description": "Title to be displayed. Optional.", - "type": "string" - }, - "socialDescription": { - "description": "A short description of the link. Optional.", - "type": "string" - }, - "socialImageLink": { - "description": "An image url string. Optional.", - "type": "string" - } - }, - "id": "SocialMetaTagInfo" - }, - "GooglePlayAnalytics": { - "description": "Parameters for Google Play Campaign Measurements.\n[Learn more](https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#campaign-params)", - "type": "object", - "properties": { - "utmCampaign": { - "description": "Campaign name; used for keyword analysis to identify a specific product\npromotion or strategic campaign.", - "type": "string" - }, - "utmTerm": { - "description": "Campaign term; used with paid search to supply the keywords for ads.", - "type": "string" - }, - "gclid": { - "description": "[AdWords autotagging parameter](https://support.google.com/analytics/answer/1033981?hl=en);\nused to measure Google AdWords ads. This value is generated dynamically\nand should never be modified.", - "type": "string" - }, - "utmSource": { - "description": "Campaign source; used to identify a search engine, newsletter, or other\nsource.", - "type": "string" - }, - "utmMedium": { - "description": "Campaign medium; used to identify a medium such as email or cost-per-click.", - "type": "string" - }, - "utmContent": { - "description": "Campaign content; used for A/B testing and content-targeted ads to\ndifferentiate ads or links that point to the same URL.", - "type": "string" - } - }, - "id": "GooglePlayAnalytics" } }, - "revision": "20161118", - "basePath": "", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", + "protocol": "rest", "canonicalName": "Firebase Dynamic Links", - "discoveryVersion": "v1", - "baseUrl": "https://firebasedynamiclinks.googleapis.com/", - "name": "firebasedynamiclinks", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/firebase": { + "description": "View and administer all your Firebase data and settings" + } + } } - }, - "documentationLink": "https://firebase.google.com/docs/dynamic-links/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v1", - "rootUrl": "https://firebasedynamiclinks.googleapis.com/", - "kind": "discovery#restDescription" + } } diff --git a/etc/api/firebaserules/v1/firebaserules-api.json b/etc/api/firebaserules/v1/firebaserules-api.json index 7de796337d..1faa0ca74d 100644 --- a/etc/api/firebaserules/v1/firebaserules-api.json +++ b/etc/api/firebaserules/v1/firebaserules-api.json @@ -1,5 +1,703 @@ { + "ownerDomain": "google.com", + "name": "firebaserules", + "batchPath": "batch", + "title": "Firebase Rules API", + "ownerName": "Google", + "resources": { + "projects": { + "methods": { + "test": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "TestRulesetResponse" + }, + "parameters": { + "name": { + "required": true, + "type": "string", + "pattern": "^projects/.+$", + "location": "path", + "description": "Tests may either provide `source` or a `Ruleset` resource name.\n\nFor tests against `source`, the resource name must refer to the project:\nFormat: `projects/{project_id}`\n\nFor tests against a `Ruleset`, this must be the `Ruleset` resource name:\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "flatPath": "v1/projects/{projectsId}:test", + "id": "firebaserules.projects.test", + "path": "v1/{+name}:test", + "request": { + "$ref": "TestRulesetRequest" + }, + "description": "Test `Source` for syntactic and semantic correctness. Issues present, if\nany, will be returned to the caller with a description, severity, and\nsource location.\n\nThe test method may be executed with `Source` or a `Ruleset` name.\nPassing `Source` is useful for unit testing new rules. Passing a `Ruleset`\nname is useful for regression testing an existing rule.\n\nThe following is an example of `Source` that permits users to upload images\nto a bucket bearing their user id and matching the correct metadata:\n\n_*Example*_\n\n // Users are allowed to subscribe and unsubscribe to the blog.\n service firebase.storage {\n match /users/{userId}/images/{imageName} {\n allow write: if userId == request.auth.uid\n && (imageName.matches('*.png$')\n || imageName.matches('*.jpg$'))\n && resource.mimeType.matches('^image/')\n }\n }" + } + }, + "resources": { + "rulesets": { + "methods": { + "get": { + "parameters": { + "name": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/rulesets/[^/]+$", + "location": "path", + "description": "Resource name for the ruleset to get.\n\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}", + "id": "firebaserules.projects.rulesets.get", + "path": "v1/{+name}", + "description": "Get a `Ruleset` by name including the full `Source` contents.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Ruleset" + } + }, + "list": { + "id": "firebaserules.projects.rulesets.list", + "path": "v1/{+name}/rulesets", + "description": "List `Ruleset` metadata only and optionally filter the results by `Ruleset`\nname.\n\nThe full `Source` contents of a `Ruleset` may be retrieved with\nGetRuleset.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListRulesetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "parameters": { + "name": { + "description": "Resource name for the project.\n\nFormat: `projects/{project_id}`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "Next page token for loading the next batch of `Ruleset` instances.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Page size to load. Maximum of 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may choose to load less\nthan `page_size` due to the size of the output. To traverse all of the\nreleases, caller should iterate until the `page_token` is empty.", + "format": "int32", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "`Ruleset` filter. The list method supports filters with restrictions on\n`Ruleset.name`.\n\nFilters on `Ruleset.create_time` should use the `date` function which\nparses strings that conform to the RFC 3339 date/time specifications.\n\nExample: `create_time \u003e date(\"2017-01-01\") AND name=UUID-*`", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/rulesets" + }, + "create": { + "id": "firebaserules.projects.rulesets.create", + "path": "v1/{+name}/rulesets", + "description": "Create a `Ruleset` from `Source`.\n\nThe `Ruleset` is given a unique generated name which is returned to the\ncaller. `Source` containing syntactic or semantics errors will result in an\nerror response indicating the first error encountered. For a detailed view\nof `Source` issues, use TestRuleset.", + "request": { + "$ref": "Ruleset" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Ruleset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ], + "parameters": { + "name": { + "location": "path", + "description": "Resource name for Project which owns this `Ruleset`.\n\nFormat: `projects/{project_id}`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/rulesets" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/rulesets/[^/]+$", + "location": "path", + "description": "Resource name for the ruleset to delete.\n\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ], + "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}", + "path": "v1/{+name}", + "id": "firebaserules.projects.rulesets.delete", + "description": "Delete a `Ruleset` by resource name.\n\nIf the `Ruleset` is referenced by a `Release` the operation will fail." + } + } + }, + "releases": { + "methods": { + "delete": { + "id": "firebaserules.projects.releases.delete", + "path": "v1/{+name}", + "description": "Delete a `Release` by resource name.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ], + "parameters": { + "name": { + "description": "Resource name for the `Release` to delete.\n\nFormat: `projects/{project_id}/releases/{release_id}`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/releases/.+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/releases/{releasesId}" + }, + "get": { + "response": { + "$ref": "Release" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "parameters": { + "name": { + "location": "path", + "description": "Resource name of the `Release`.\n\nFormat: `projects/{project_id}/releases/{release_id}`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/releases/.+$" + } + }, + "flatPath": "v1/projects/{projectsId}/releases/{releasesId}", + "path": "v1/{+name}", + "id": "firebaserules.projects.releases.get", + "description": "Get a `Release` by name." + }, + "list": { + "description": "List the `Release` values for a project. This list may optionally be\nfiltered by `Release` name, `Ruleset` name, `TestSuite` name, or any\ncombination thereof.", + "response": { + "$ref": "ListReleasesResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ], + "parameters": { + "filter": { + "description": "`Release` filter. The list method supports filters with restrictions on the\n`Release.name`, `Release.ruleset_name`, and `Release.test_suite_name`.\n\nExample 1: A filter of 'name=prod*' might return `Release`s with names\nwithin 'projects/foo' prefixed with 'prod':\n\nName | Ruleset Name\n------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid1234\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234\nprojects/foo/releases/prod/v2 | projects/foo/rulesets/uuid8888\n\nExample 2: A filter of `name=prod* ruleset_name=uuid1234` would return only\n`Release` instances for 'projects/foo' with names prefixed with 'prod'\nreferring to the same `Ruleset` name of 'uuid1234':\n\nName | Ruleset Name\n------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/1234\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/1234\n\nIn the examples, the filter parameters refer to the search filters are\nrelative to the project. Fully qualified prefixed may also be used. e.g.\n`test_suite_name=projects/foo/testsuites/uuid1`", + "type": "string", + "location": "query" + }, + "name": { + "description": "Resource name for the project.\n\nFormat: `projects/{project_id}`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "Next page token for the next batch of `Release` instances." + }, + "pageSize": { + "description": "Page size to load. Maximum of 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may choose to load fewer\nthan `page_size` results due to the size of the output. To traverse all of\nthe releases, the caller should iterate until the `page_token` on the\nresponse is empty.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1/projects/{projectsId}/releases", + "path": "v1/{+name}/releases", + "id": "firebaserules.projects.releases.list" + }, + "update": { + "response": { + "$ref": "Release" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/releases/.+$", + "location": "path", + "description": "Resource name for the `Release`.\n\n`Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2`\nwhich affords developers a great deal of flexibility in mapping the name\nto the style that best fits their existing development practices. For\nexample, a name could refer to an environment, an app, a version, or some\ncombination of three.\n\nIn the table below, for the project name `projects/foo`, the following\nrelative release paths show how flat and structured names might be chosen\nto match a desired development / deployment strategy.\n\nUse Case | Flat Name | Structured Name\n-------------|---------------------|----------------\nEnvironments | releases/qa | releases/qa\nApps | releases/app1_qa | releases/app1/qa\nVersions | releases/app1_v2_qa | releases/app1/v2/qa\n\nThe delimiter between the release name path elements can be almost anything\nand it should work equally well with the release name list filter, but in\nmany ways the structured paths provide a clearer picture of the\nrelationship between `Release` instances.\n\nFormat: `projects/{project_id}/releases/{release_id}`", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ], + "flatPath": "v1/projects/{projectsId}/releases/{releasesId}", + "path": "v1/{+name}", + "id": "firebaserules.projects.releases.update", + "request": { + "$ref": "Release" + }, + "description": "Update a `Release`.\n\nOnly updates to the `ruleset_name` and `test_suite_name` fields will be\nhonored. `Release` rename is not supported. To create a `Release` use the\nCreateRelease method." + }, + "create": { + "description": "Create a `Release`.\n\nRelease names should reflect the developer's deployment practices. For\nexample, the release name may include the environment name, application\nname, application version, or any other name meaningful to the developer.\nOnce a `Release` refers to a `Ruleset`, the rules can be enforced by\nFirebase Rules-enabled services.\n\nMore than one `Release` may be 'live' concurrently. Consider the following\nthree `Release` names for `projects/foo` and the `Ruleset` to which they\nrefer.\n\nRelease Name | Ruleset Name\n--------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid123\nprojects/foo/releases/prod/beta | projects/foo/rulesets/uuid123\nprojects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456\n\nThe table reflects the `Ruleset` rollout in progress. The `prod` and\n`prod/beta` releases refer to the same `Ruleset`. However, `prod/v23`\nrefers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be\nupdated using the UpdateRelease method.", + "request": { + "$ref": "Release" + }, + "response": { + "$ref": "Release" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ], + "parameters": { + "name": { + "location": "path", + "description": "Resource name for the project which owns this `Release`.\n\nFormat: `projects/{project_id}`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/releases", + "path": "v1/{+name}/releases", + "id": "firebaserules.projects.releases.create" + } + } + } + } + } + }, + "parameters": { + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + } + }, + "version": "v1", + "baseUrl": "https://firebaserules.googleapis.com/", + "servicePath": "", + "description": "Creates and manages rules that determine when a Firebase Rules-enabled service should permit a request.\n", + "kind": "discovery#restDescription", + "basePath": "", + "documentationLink": "https://firebase.google.com/docs/storage/security", + "revision": "20170418", "id": "firebaserules:v1", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { + "Source": { + "properties": { + "files": { + "description": "`File` set constituting the `Source` bundle.", + "type": "array", + "items": { + "$ref": "File" + } + } + }, + "id": "Source", + "description": "`Source` is one or more `File` messages comprising a logical set of rules.", + "type": "object" + }, + "SourcePosition": { + "description": "Position in the `Source` content including its line, column number, and an\nindex of the `File` in the `Source` message. Used for debug purposes.", + "type": "object", + "properties": { + "line": { + "description": "Line number of the source fragment. 1-based.", + "format": "int32", + "type": "integer" + }, + "column": { + "description": "First column on the source line associated with the source fragment.", + "format": "int32", + "type": "integer" + }, + "fileName": { + "description": "Name of the `File`.", + "type": "string" + } + }, + "id": "SourcePosition" + }, + "Ruleset": { + "description": "`Ruleset` is an immutable copy of `Source` with a globally unique identifier\nand a creation time.", + "type": "object", + "properties": { + "name": { + "description": "Name of the `Ruleset`. The ruleset_id is auto generated by the service.\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`\nOutput only.", + "type": "string" + }, + "source": { + "$ref": "Source", + "description": "`Source` for the `Ruleset`." + }, + "createTime": { + "description": "Time the `Ruleset` was created.\nOutput only.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "Ruleset" + }, + "TestRulesetRequest": { + "description": "The request for FirebaseRulesService.TestRuleset.", + "type": "object", + "properties": { + "source": { + "$ref": "Source", + "description": "Optional `Source` to be checked for correctness.\n\nThis field must not be set when the resource name refers to a `Ruleset`." + } + }, + "id": "TestRulesetRequest" + }, + "Issue": { + "description": "Issues include warnings, errors, and deprecation notices.", + "type": "object", + "properties": { + "sourcePosition": { + "$ref": "SourcePosition", + "description": "Position of the issue in the `Source`." + }, + "severity": { + "type": "string", + "enumDescriptions": [ + "An unspecified severity.", + "Deprecation issue for statements and method that may no longer be\nsupported or maintained.", + "Warnings such as: unused variables.", + "Errors such as: unmatched curly braces or variable redefinition." + ], + "enum": [ + "SEVERITY_UNSPECIFIED", + "DEPRECATION", + "WARNING", + "ERROR" + ], + "description": "The severity of the issue." + }, + "description": { + "description": "Short error description.", + "type": "string" + } + }, + "id": "Issue" + }, + "FunctionCall": { + "description": "Represents a service-defined function call that was invoked during test\nexecution.", + "type": "object", + "properties": { + "args": { + "description": "The arguments that were provided to the function.", + "type": "array", + "items": { + "type": "any" + } + }, + "function": { + "description": "Name of the function invoked.", + "type": "string" + } + }, + "id": "FunctionCall" + }, + "File": { + "id": "File", + "description": "`File` containing source content.", + "type": "object", + "properties": { + "content": { + "description": "Textual Content.", + "type": "string" + }, + "fingerprint": { + "description": "Fingerprint (e.g. github sha) associated with the `File`.", + "format": "byte", + "type": "string" + }, + "name": { + "description": "File name.", + "type": "string" + } + } + }, + "ListReleasesResponse": { + "description": "The response for FirebaseRulesService.ListReleases.", + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "The pagination token to retrieve the next page of results. If the value is\nempty, no further results remain." + }, + "releases": { + "description": "List of `Release` instances.", + "type": "array", + "items": { + "$ref": "Release" + } + } + }, + "id": "ListReleasesResponse" + }, + "Release": { + "properties": { + "createTime": { + "type": "string", + "description": "Time the release was created.\nOutput only.", + "format": "google-datetime" + }, + "updateTime": { + "description": "Time the release was updated.\nOutput only.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Resource name for the `Release`.\n\n`Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2`\nwhich affords developers a great deal of flexibility in mapping the name\nto the style that best fits their existing development practices. For\nexample, a name could refer to an environment, an app, a version, or some\ncombination of three.\n\nIn the table below, for the project name `projects/foo`, the following\nrelative release paths show how flat and structured names might be chosen\nto match a desired development / deployment strategy.\n\nUse Case | Flat Name | Structured Name\n-------------|---------------------|----------------\nEnvironments | releases/qa | releases/qa\nApps | releases/app1_qa | releases/app1/qa\nVersions | releases/app1_v2_qa | releases/app1/v2/qa\n\nThe delimiter between the release name path elements can be almost anything\nand it should work equally well with the release name list filter, but in\nmany ways the structured paths provide a clearer picture of the\nrelationship between `Release` instances.\n\nFormat: `projects/{project_id}/releases/{release_id}`", + "type": "string" + }, + "rulesetName": { + "description": "Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must\nexist the `Release` to be created.", + "type": "string" + } + }, + "id": "Release", + "description": "`Release` is a named reference to a `Ruleset`. Once a `Release` refers to a\n`Ruleset`, rules-enabled services will be able to enforce the `Ruleset`.", + "type": "object" + }, + "TestRulesetResponse": { + "properties": { + "testResults": { + "description": "The set of test results given the test cases in the `TestSuite`.\nThe results will appear in the same order as the test cases appear in the\n`TestSuite`.", + "type": "array", + "items": { + "$ref": "TestResult" + } + }, + "issues": { + "type": "array", + "items": { + "$ref": "Issue" + }, + "description": "Syntactic and semantic `Source` issues of varying severity. Issues of\n`ERROR` severity will prevent tests from executing." + } + }, + "id": "TestRulesetResponse", + "description": "The response for FirebaseRulesService.TestRuleset.", + "type": "object" + }, + "TestResult": { + "description": "Test result message containing the state of the test as well as a\ndescription and source position for test failures.", + "type": "object", + "properties": { + "functionCalls": { + "description": "The set of function calls made to service-defined methods.\n\nFunction calls are included in the order in which they are encountered\nduring evaluation, are provided for both mocked and unmocked functions,\nand included on the response regardless of the test `state`.", + "type": "array", + "items": { + "$ref": "FunctionCall" + } + }, + "state": { + "enum": [ + "STATE_UNSPECIFIED", + "SUCCESS", + "FAILURE" + ], + "description": "State of the test.", + "type": "string", + "enumDescriptions": [ + "Test state is not set.", + "Test is a success.", + "Test is a failure." + ] + }, + "debugMessages": { + "description": "Debug messages related to test execution issues encountered during\nevaluation.\n\nDebug messages may be related to too many or too few invocations of\nfunction mocks or to runtime errors that occur during evaluation.\n\nFor example: ```Unable to read variable [name: \"resource\"]```", + "type": "array", + "items": { + "type": "string" + } + }, + "errorPosition": { + "$ref": "SourcePosition", + "description": "Position in the `Source` or `Ruleset` where the principle runtime error\noccurs.\n\nEvaluation of an expression may result in an error. Rules are deny by\ndefault, so a `DENY` expectation when an error is generated is valid.\nWhen there is a `DENY` with an error, the `SourcePosition` is returned.\n\nE.g. `error_position { line: 19 column: 37 }`" + } + }, + "id": "TestResult" + }, + "ListRulesetsResponse": { + "properties": { + "rulesets": { + "description": "List of `Ruleset` instances.", + "type": "array", + "items": { + "$ref": "Ruleset" + } + }, + "nextPageToken": { + "description": "The pagination token to retrieve the next page of results. If the value is\nempty, no further results remain.", + "type": "string" + } + }, + "id": "ListRulesetsResponse", + "description": "The response for FirebaseRulesService.ListRulesets.", + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "canonicalName": "Firebase Rules", "auth": { "oauth2": { "scopes": { @@ -15,634 +713,5 @@ } } }, - "description": "Creates and manages rules that determine when a Firebase Rules-enabled service should permit a request.\n", - "protocol": "rest", - "title": "Firebase Rules API", - "resources": { - "projects": { - "resources": { - "rulesets": { - "methods": { - "create": { - "id": "firebaserules.projects.rulesets.create", - "response": { - "$ref": "Ruleset" - }, - "parameterOrder": [ - "name" - ], - "description": "Create a `Ruleset` from `Source`.\n\nThe `Ruleset` is given a unique generated name which is returned to the\ncaller. `Source` containing syntactic or semantics errors will result in an\nerror response indicating the first error encountered. For a detailed view\nof `Source` issues, use TestRuleset.", - "request": { - "$ref": "Ruleset" - }, - "flatPath": "v1/projects/{projectsId}/rulesets", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "Resource name for Project which owns this `Ruleset`.\n\nFormat: `projects/{project_id}`", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}/rulesets", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ] - }, - "get": { - "id": "firebaserules.projects.rulesets.get", - "response": { - "$ref": "Ruleset" - }, - "parameterOrder": [ - "name" - ], - "description": "Get a `Ruleset` by name including the full `Source` contents.", - "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "Resource name for the ruleset to get.\n\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`", - "required": true, - "pattern": "^projects/[^/]+/rulesets/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ] - }, - "list": { - "id": "firebaserules.projects.rulesets.list", - "response": { - "$ref": "ListRulesetsResponse" - }, - "parameterOrder": [ - "name" - ], - "description": "List `Ruleset` metadata only and optionally filter the results by Ruleset\nname.\n\nThe full `Source` contents of a `Ruleset` may be retrieved with\nGetRuleset.", - "flatPath": "v1/projects/{projectsId}/rulesets", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Page size to load. Maximum of 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may choose to load less\nthan `page_size` due to the size of the output. To traverse all of the\nreleases, caller should iterate until the `page_token` is empty.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "name": { - "description": "Resource name for the project.\n\nFormat: `projects/{project_id}`", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Next page token for loading the next batch of `Ruleset` instances.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}/rulesets", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ] - }, - "delete": { - "id": "firebaserules.projects.rulesets.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Delete a `Ruleset` by resource name.\n\nIf the `Ruleset` is referenced by a `Release` the operation will fail.", - "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "Resource name for the ruleset to delete.\n\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`", - "required": true, - "pattern": "^projects/[^/]+/rulesets/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ] - } - } - }, - "releases": { - "methods": { - "update": { - "id": "firebaserules.projects.releases.update", - "response": { - "$ref": "Release" - }, - "parameterOrder": [ - "name" - ], - "description": "Update a `Release`.\n\nOnly updates to the `ruleset_name` field will be honored. `Release` rename\nis not supported. To create a `Release` use the CreateRelease method\ninstead.", - "request": { - "$ref": "Release" - }, - "flatPath": "v1/projects/{projectsId}/releases/{releasesId}", - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "Resource name for the `Release`.\n\n`Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2`\nwhich affords developers a great deal of flexibility in mapping the name\nto the style that best fits their existing development practices. For\nexample, a name could refer to an environment, an app, a version, or some\ncombination of three.\n\nIn the table below, for the project name `projects/foo`, the following\nrelative release paths show how flat and structured names might be chosen\nto match a desired development / deployment strategy.\n\nUse Case | Flat Name | Structured Name\n-------------|---------------------|----------------\nEnvironments | releases/qa | releases/qa\nApps | releases/app1_qa | releases/app1/qa\nVersions | releases/app1_v2_qa | releases/app1/v2/qa\n\nThe delimiter between the release name path elements can be almost anything\nand it should work equally well with the release name list filter, but in\nmany ways the structured paths provide a clearer picture of the\nrelationship between `Release` instances.\n\nFormat: `projects/{project_id}/releases/{release_id}`", - "required": true, - "pattern": "^projects/[^/]+/releases/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ] - }, - "create": { - "id": "firebaserules.projects.releases.create", - "response": { - "$ref": "Release" - }, - "parameterOrder": [ - "name" - ], - "description": "Create a `Release`.\n\nRelease names should reflect the developer's deployment practices. For\nexample, the release name may include the environment name, application\nname, application version, or any other name meaningful to the developer.\nOnce a `Release` refers to a `Ruleset`, the rules can be enforced by\nFirebase Rules-enabled services.\n\nMore than one `Release` may be 'live' concurrently. Consider the following\nthree `Release` names for `projects/foo` and the `Ruleset` to which they\nrefer.\n\nRelease Name | Ruleset Name\n--------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid123\nprojects/foo/releases/prod/beta | projects/foo/rulesets/uuid123\nprojects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456\n\nThe table reflects the `Ruleset` rollout in progress. The `prod` and\n`prod/beta` releases refer to the same `Ruleset`. However, `prod/v23`\nrefers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be\nupdated using the UpdateRelease method, and the custom `Release` name\nmay be referenced by specifying the `X-Firebase-Rules-Release-Name` header.", - "request": { - "$ref": "Release" - }, - "flatPath": "v1/projects/{projectsId}/releases", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "Resource name for the project which owns this `Release`.\n\nFormat: `projects/{project_id}`", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}/releases", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ] - }, - "get": { - "id": "firebaserules.projects.releases.get", - "response": { - "$ref": "Release" - }, - "parameterOrder": [ - "name" - ], - "description": "Get a `Release` by name.", - "flatPath": "v1/projects/{projectsId}/releases/{releasesId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "Resource name of the `Release`.\n\n\nFormat: `projects/{project_id}/releases/{release_id}`", - "required": true, - "pattern": "^projects/[^/]+/releases/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ] - }, - "list": { - "id": "firebaserules.projects.releases.list", - "response": { - "$ref": "ListReleasesResponse" - }, - "parameterOrder": [ - "name" - ], - "description": "List the `Release` values for a project. This list may optionally be\nfiltered by `Release` name or `Ruleset` id or both.", - "flatPath": "v1/projects/{projectsId}/releases", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Page size to load. Maximum of 100. Defaults to 10.\nNote: `page_size` is just a hint and the service may choose to load less\nthan `page_size` due to the size of the output. To traverse all of the\nreleases, caller should iterate until the `page_token` is empty.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "`Release` filter. The list method supports filters with restrictions on the\n`Release` `name` and also on the `Ruleset` `ruleset_name`.\n\nExample 1) A filter of 'name=prod*' might return `Release`s with names\nwithin 'projects/foo' prefixed with 'prod':\n\nName | Ruleset Name\n------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/uuid1234\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234\nprojects/foo/releases/prod/v2 | projects/foo/rulesets/uuid8888\n\nExample 2) A filter of `name=prod* ruleset_name=uuid1234` would return only\n`Release` instances for 'projects/foo' with names prefixed with 'prod'\nreferring to the same `Ruleset` name of 'uuid1234':\n\nName | Ruleset Name\n------------------------------|-------------\nprojects/foo/releases/prod | projects/foo/rulesets/1234\nprojects/foo/releases/prod/v1 | projects/foo/rulesets/1234\n\nIn the examples, the filter parameters refer to the search filters for\nrelease and ruleset names are relative to the project releases and rulesets\ncollections. Fully qualified prefixed may also be used. e.g.\n`name=projects/foo/releases/prod* ruleset_name=projects/foo/rulesets/uuid1`", - "location": "query", - "type": "string" - }, - "name": { - "description": "Resource name for the project.\n\nFormat: `projects/{project_id}`", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Next page token for the next batch of `Release` instances.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}/releases", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ] - }, - "delete": { - "id": "firebaserules.projects.releases.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Delete a `Release` by resource name.", - "flatPath": "v1/projects/{projectsId}/releases/{releasesId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "Resource name for the `Release` to delete.\n\nFormat: `projects/{project_id}/releases/{release_id}`", - "required": true, - "pattern": "^projects/[^/]+/releases/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase" - ] - } - } - } - }, - "methods": { - "test": { - "id": "firebaserules.projects.test", - "response": { - "$ref": "TestRulesetResponse" - }, - "parameterOrder": [ - "name" - ], - "description": "Test `Source` for syntactic and semantic correctness. Issues present in the\nrules, if any, will be returned to the caller with a description, severity,\nand source location.\n\nThe test method will typically be executed with a developer provided\n`Source`, but if regression testing is desired, this method may be\nexecuted against a `Ruleset` resource name and the `Source` will be\nretrieved from the persisted `Ruleset`.\n\nThe following is an example of `Source` that permits users to upload images\nto a bucket bearing their user id and matching the correct metadata:\n\n_*Example*_\n\n // Users are allowed to subscribe and unsubscribe to the blog.\n service firebase.storage {\n match /users/{userId}/images/{imageName} {\n allow write: if userId == request.userId\n && (imageName.endsWith('.png') || imageName.endsWith('.jpg'))\n && resource.mimeType.startsWith('image/')\n }\n }", - "request": { - "$ref": "TestRulesetRequest" - }, - "flatPath": "v1/projects/{projectsId}:test", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "Name of the project.\n\nFormat: `projects/{project_id}`", - "required": true, - "pattern": "^projects/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}:test", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/firebase", - "https://www.googleapis.com/auth/firebase.readonly" - ] - } - } - } - }, - "schemas": { - "Release": { - "description": "`Release` is a named reference to a `Ruleset`. Once a `Release` refers to a\n`Ruleset`, rules-enabled services will be able to enforce the `Ruleset`.", - "type": "object", - "properties": { - "updateTime": { - "description": "Time the release was updated.\n@OutputOnly", - "type": "string", - "format": "google-datetime" - }, - "createTime": { - "description": "Time the release was created.\n@OutputOnly", - "type": "string", - "format": "google-datetime" - }, - "name": { - "description": "Resource name for the `Release`.\n\n`Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2`\nwhich affords developers a great deal of flexibility in mapping the name\nto the style that best fits their existing development practices. For\nexample, a name could refer to an environment, an app, a version, or some\ncombination of three.\n\nIn the table below, for the project name `projects/foo`, the following\nrelative release paths show how flat and structured names might be chosen\nto match a desired development / deployment strategy.\n\nUse Case | Flat Name | Structured Name\n-------------|---------------------|----------------\nEnvironments | releases/qa | releases/qa\nApps | releases/app1_qa | releases/app1/qa\nVersions | releases/app1_v2_qa | releases/app1/v2/qa\n\nThe delimiter between the release name path elements can be almost anything\nand it should work equally well with the release name list filter, but in\nmany ways the structured paths provide a clearer picture of the\nrelationship between `Release` instances.\n\nFormat: `projects/{project_id}/releases/{release_id}`", - "type": "string" - }, - "rulesetName": { - "description": "Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must\nexist the `Release` to be created.", - "type": "string" - } - }, - "id": "Release" - }, - "Source": { - "description": "`Source` is one or more `File` messages comprising a logical set of rules.", - "type": "object", - "properties": { - "files": { - "description": "`File` set constituting the `Source` bundle.", - "type": "array", - "items": { - "$ref": "File" - } - } - }, - "id": "Source" - }, - "SourcePosition": { - "description": "Position in the `Source` content including its line, column number, and an\nindex of the `File` in the `Source` message. Used for debug purposes.", - "type": "object", - "properties": { - "fileName": { - "description": "Name of the `File`.", - "type": "string" - }, - "column": { - "description": "First column on the source line associated with the source fragment.", - "type": "integer", - "format": "int32" - }, - "line": { - "description": "Line number of the source fragment. 1-based.", - "type": "integer", - "format": "int32" - } - }, - "id": "SourcePosition" - }, - "TestRulesetResponse": { - "description": "The response for FirebaseRulesService.TestRuleset.", - "type": "object", - "properties": { - "issues": { - "description": "Syntactic and semantic `Source` issues of varying severity. Issues of\n`ERROR` severity will prevent tests from executing.", - "type": "array", - "items": { - "$ref": "Issue" - } - } - }, - "id": "TestRulesetResponse" - }, - "Ruleset": { - "description": "`Ruleset` is an immutable copy of `Source` with a globally unique identifier\nand a creation time.", - "type": "object", - "properties": { - "source": { - "description": "`Source` for the `Ruleset`.", - "$ref": "Source" - }, - "createTime": { - "description": "Time the `Ruleset` was created.\n@OutputOnly", - "type": "string", - "format": "google-datetime" - }, - "name": { - "description": "Name of the `Ruleset`. The ruleset_id is auto generated by the service.\nFormat: `projects/{project_id}/rulesets/{ruleset_id}`\n@OutputOnly", - "type": "string" - } - }, - "id": "Ruleset" - }, - "ListReleasesResponse": { - "description": "The response for FirebaseRulesService.ListReleases.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The pagination token to retrieve the next page of results. If the value is\nempty, no further results remain.", - "type": "string" - }, - "releases": { - "description": "List of `Release` instances.", - "type": "array", - "items": { - "$ref": "Release" - } - } - }, - "id": "ListReleasesResponse" - }, - "ListRulesetsResponse": { - "description": "The response for FirebaseRulesService.ListRulesets", - "type": "object", - "properties": { - "rulesets": { - "description": "List of `Ruleset` instances.", - "type": "array", - "items": { - "$ref": "Ruleset" - } - }, - "nextPageToken": { - "description": "The pagination token to retrieve the next page of results. If the value is\nempty, no further results remain.", - "type": "string" - } - }, - "id": "ListRulesetsResponse" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "File": { - "description": "`File` containing source content.", - "type": "object", - "properties": { - "content": { - "description": "Textual Content.", - "type": "string" - }, - "name": { - "description": "File name.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint (e.g. github sha) associated with the `File`.", - "type": "string", - "format": "byte" - } - }, - "id": "File" - }, - "TestRulesetRequest": { - "description": "The request for FirebaseRulesService.TestRuleset.", - "type": "object", - "properties": { - "source": { - "description": "`Source` to be checked for correctness.", - "$ref": "Source" - } - }, - "id": "TestRulesetRequest" - }, - "Issue": { - "description": "Issues include warnings, errors, and deprecation notices.", - "type": "object", - "properties": { - "description": { - "description": "Short error description.", - "type": "string" - }, - "severity": { - "description": "The severity of the issue.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "DEPRECATION", - "WARNING", - "ERROR" - ], - "enumDescriptions": [ - "An unspecified severity.", - "Deprecation issue for statements and method that may no longer be\nsupported or maintained.", - "Warnings such as: unused variables.", - "Errors such as: unmatched curly braces or variable redefinition." - ], - "type": "string" - }, - "sourcePosition": { - "description": "Position of the issue in the `Source`.", - "$ref": "SourcePosition" - } - }, - "id": "Issue" - } - }, - "revision": "20161205", - "basePath": "", - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "version_module": "True", - "canonicalName": "Firebase Rules API", - "discoveryVersion": "v1", - "baseUrl": "https://firebaserules.googleapis.com/", - "name": "firebaserules", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - } - }, - "documentationLink": "https://firebase.google.com/docs/storage/security", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v1", - "rootUrl": "https://firebaserules.googleapis.com/", - "kind": "discovery#restDescription" + "rootUrl": "https://firebaserules.googleapis.com/" } diff --git a/etc/api/fitness/v1/fitness-api.json b/etc/api/fitness/v1/fitness-api.json index 2f19d42bf2..4dc972a633 100644 --- a/etc/api/fitness/v1/fitness-api.json +++ b/etc/api/fitness/v1/fitness-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/ijeguRXyVpN9uEUSOI4kjLGOD9E\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/ijeguRXyVpN9uEUSOI4kjLGOD9E\"", "discoveryVersion": "v1", "id": "fitness:v1", "name": "fitness", diff --git a/etc/api/fusiontables/v1/fusiontables-api.json b/etc/api/fusiontables/v1/fusiontables-api.json index 7c4ea6718c..beeb66a183 100644 --- a/etc/api/fusiontables/v1/fusiontables-api.json +++ b/etc/api/fusiontables/v1/fusiontables-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/0FCdL0BWEx8yMtZQU6marCZhfgI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/hYetPnobfGbbTDN2IyE3ld5RWXw\"", "discoveryVersion": "v1", "id": "fusiontables:v1", "name": "fusiontables", "version": "v1", - "revision": "20160526", + "revision": "20170413", "title": "Fusion Tables API", "description": "API for working with Fusion Tables data.", "ownerDomain": "google.com", diff --git a/etc/api/fusiontables/v2/fusiontables-api.json b/etc/api/fusiontables/v2/fusiontables-api.json index 1d198175a5..a0ca84f170 100644 --- a/etc/api/fusiontables/v2/fusiontables-api.json +++ b/etc/api/fusiontables/v2/fusiontables-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/QkjGIRroDT5nHgu1Wy3bp0C7GqA\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/p_O8VQ1GgwnmLUmXhlZf5JsJdkk\"", "discoveryVersion": "v1", "id": "fusiontables:v2", "name": "fusiontables", "version": "v2", - "revision": "20160526", + "revision": "20170413", "title": "Fusion Tables API", "description": "API for working with Fusion Tables data.", "ownerDomain": "google.com", diff --git a/etc/api/games/v1/games-api.json b/etc/api/games/v1/games-api.json index ab8ac6d7e5..01d5394784 100644 --- a/etc/api/games/v1/games-api.json +++ b/etc/api/games/v1/games-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/di4Um_ykilUe3tcpJDyVB0T7e64\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/xRU0iq97BVwEymZdT-IMpyJ394E\"", "discoveryVersion": "v1", "id": "games:v1", "name": "games", "canonicalName": "Games", "version": "v1", - "revision": "20161207", + "revision": "20170511", "title": "Google Play Game Services API", "description": "The API for Google Play Game Services.", "ownerDomain": "google.com", diff --git a/etc/api/gamesconfiguration/v1configuration/gamesconfiguration-api.json b/etc/api/gamesconfiguration/v1configuration/gamesconfiguration-api.json index 3f3c0e3559..771a9e90dd 100644 --- a/etc/api/gamesconfiguration/v1configuration/gamesconfiguration-api.json +++ b/etc/api/gamesconfiguration/v1configuration/gamesconfiguration-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/xMP3-t2S3m8oLMTQw_TGyMQw30Y\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/xoUDLrOefVzVgtqG3x8wJuxbC_M\"", "discoveryVersion": "v1", "id": "gamesConfiguration:v1configuration", "name": "gamesConfiguration", "canonicalName": "Games Configuration", "version": "v1configuration", - "revision": "20161207", + "revision": "20170511", "title": "Google Play Game Services Publishing API", "description": "The Publishing API for Google Play Game Services.", "ownerDomain": "google.com", diff --git a/etc/api/gamesmanagement/v1management/gamesmanagement-api.json b/etc/api/gamesmanagement/v1management/gamesmanagement-api.json index 0ea9ea943d..387d36639d 100644 --- a/etc/api/gamesmanagement/v1management/gamesmanagement-api.json +++ b/etc/api/gamesmanagement/v1management/gamesmanagement-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/YwPBC4iYbpIMphCGliTYOBhrujY\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/t5ojdIyqE9cj_9KmuahxNl9Z7R8\"", "discoveryVersion": "v1", "id": "gamesManagement:v1management", "name": "gamesManagement", "canonicalName": "Games Management", "version": "v1management", - "revision": "20161207", + "revision": "20170511", "title": "Google Play Game Services Management API", "description": "The Management API for Google Play Game Services.", "ownerDomain": "google.com", diff --git a/etc/api/genomics/v1/genomics-api.json b/etc/api/genomics/v1/genomics-api.json index 6a520f355d..54e582577b 100644 --- a/etc/api/genomics/v1/genomics-api.json +++ b/etc/api/genomics/v1/genomics-api.json @@ -1,3745 +1,3817 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/jo14IJ9oMjJmju16_ICU62ty30c\"", - "discoveryVersion": "v1", - "id": "genomics:v1", - "name": "genomics", - "version": "v1", - "revision": "20160928", - "title": "Genomics API", - "description": "Stores, processes, explores and shares genomic data.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/genomics/", - "protocol": "rest", - "baseUrl": "https://genomics.googleapis.com/", - "basePath": "", - "rootUrl": "https://genomics.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/bigquery": { - "description": "View and manage your data in Google BigQuery" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/devstorage.read_write": { - "description": "Manage your data in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/genomics": { - "description": "View and manage Genomics data" - }, - "https://www.googleapis.com/auth/genomics.readonly": { - "description": "View Genomics data" - } - } - } - }, - "schemas": { - "AnnotationSet": { - "id": "AnnotationSet", - "type": "object", - "description": "An annotation set is a logical grouping of annotations that share consistent type information and provenance. Examples of annotation sets include 'all genes from refseq', and 'all variant annotations from ClinVar'.", - "properties": { - "id": { - "type": "string", - "description": "The server-generated annotation set ID, unique across all annotation sets." - }, - "datasetId": { - "type": "string", - "description": "The dataset to which this annotation set belongs." - }, - "referenceSetId": { - "type": "string", - "description": "The ID of the reference set that defines the coordinate space for this set's annotations." - }, - "name": { - "type": "string", - "description": "The display name for this annotation set." - }, - "sourceUri": { - "type": "string", - "description": "The source URI describing the file from which this annotation set was generated, if any." - }, - "type": { - "type": "string", - "description": "The type of annotations contained within this set.", - "enum": [ - "ANNOTATION_TYPE_UNSPECIFIED", - "GENERIC", - "VARIANT", - "GENE", - "TRANSCRIPT" - ] - }, - "info": { - "type": "object", - "description": "A map of additional read alignment information. This must be of the form map (string key mapping to a list of string values).", - "additionalProperties": { - "type": "array", - "items": { - "type": "any" + "resources": { + "annotationsets": { + "methods": { + "update": { + "path": "v1/annotationsets/{annotationSetId}", + "id": "genomics.annotationsets.update", + "description": "Updates an annotation set. The update must respect all mutability\nrestrictions and other invariants described on the annotation set resource.\nCaller must have WRITE permission for the associated dataset.", + "request": { + "$ref": "AnnotationSet" + }, + "response": { + "$ref": "AnnotationSet" + }, + "parameterOrder": [ + "annotationSetId" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "updateMask": { + "description": "An optional mask specifying which fields to update. Mutable fields are\nname,\nsource_uri, and\ninfo. If unspecified, all\nmutable fields will be updated.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + }, + "annotationSetId": { + "description": "The ID of the annotation set to be updated.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/annotationsets/{annotationSetId}" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnnotationSet" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/annotationsets", + "id": "genomics.annotationsets.create", + "path": "v1/annotationsets", + "request": { + "$ref": "AnnotationSet" + }, + "description": "Creates a new annotation set. Caller must have WRITE permission for the\nassociated dataset.\n\nThe following fields are required:\n\n * datasetId\n * referenceSetId\n\nAll other fields may be optionally specified, unless documented as being\nserver-generated (for example, the `id` field)." + }, + "delete": { + "parameters": { + "annotationSetId": { + "location": "path", + "description": "The ID of the annotation set to be deleted.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/annotationsets/{annotationSetId}", + "id": "genomics.annotationsets.delete", + "path": "v1/annotationsets/{annotationSetId}", + "description": "Deletes an annotation set. Caller must have WRITE permission\nfor the associated annotation set.", + "httpMethod": "DELETE", + "parameterOrder": [ + "annotationSetId" + ], + "response": { + "$ref": "Empty" + } + }, + "search": { + "response": { + "$ref": "SearchAnnotationSetsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": {}, + "flatPath": "v1/annotationsets/search", + "path": "v1/annotationsets/search", + "id": "genomics.annotationsets.search", + "description": "Searches for annotation sets that match the given criteria. Annotation sets\nare returned in an unspecified order. This order is consistent, such that\ntwo queries for the same content (regardless of page size) yield annotation\nsets in the same order across their respective streams of paginated\nresponses. Caller must have READ permission for the queried datasets.", + "request": { + "$ref": "SearchAnnotationSetsRequest" + } + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "annotationSetId" + ], + "response": { + "$ref": "AnnotationSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": { + "annotationSetId": { + "location": "path", + "description": "The ID of the annotation set to be retrieved.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/annotationsets/{annotationSetId}", + "id": "genomics.annotationsets.get", + "path": "v1/annotationsets/{annotationSetId}", + "description": "Gets an annotation set. Caller must have READ permission for\nthe associated dataset." + } } - } - } - } - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "SearchAnnotationSetsRequest": { - "id": "SearchAnnotationSetsRequest", - "type": "object", - "properties": { - "datasetIds": { - "type": "array", - "description": "Required. The dataset IDs to search within. Caller must have `READ` access to these datasets.", - "items": { - "type": "string" - } }, - "referenceSetId": { - "type": "string", - "description": "If specified, only annotation sets associated with the given reference set are returned." - }, - "name": { - "type": "string", - "description": "Only return annotations sets for which a substring of the name matches this string (case insensitive)." - }, - "types": { - "type": "array", - "description": "If specified, only annotation sets that have any of these types are returned.", - "enumDescriptions": [ - "", - "A `GENERIC` annotation type should be used when no other annotation type will suffice. This represents an untyped annotation of the reference genome.", - "A `VARIANT` annotation type.", - "A `GENE` annotation type represents the existence of a gene at the associated reference coordinates. The start coordinate is typically the gene's transcription start site and the end is typically the end of the gene's last exon.", - "A `TRANSCRIPT` annotation type represents the assertion that a particular region of the reference genome may be transcribed as RNA." - ], - "items": { - "type": "string", - "enum": [ - "ANNOTATION_TYPE_UNSPECIFIED", - "GENERIC", - "VARIANT", - "GENE", - "TRANSCRIPT" - ] - } - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response." - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 128. The maximum value is 1024.", - "format": "int32" - } - } - }, - "SearchAnnotationSetsResponse": { - "id": "SearchAnnotationSetsResponse", - "type": "object", - "properties": { - "annotationSets": { - "type": "array", - "description": "The matching annotation sets.", - "items": { - "$ref": "AnnotationSet" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "Annotation": { - "id": "Annotation", - "type": "object", - "description": "An annotation describes a region of reference genome. The value of an annotation may be one of several canonical types, supplemented by arbitrary info tags. An annotation is not inherently associated with a specific sample or individual (though a client could choose to use annotations in this way). Example canonical annotation types are `GENE` and `VARIANT`.", - "properties": { - "id": { - "type": "string", - "description": "The server-generated annotation ID, unique across all annotations." - }, - "annotationSetId": { - "type": "string", - "description": "The annotation set to which this annotation belongs." - }, - "name": { - "type": "string", - "description": "The display name of this annotation." - }, - "referenceId": { - "type": "string", - "description": "The ID of the Google Genomics reference associated with this range." - }, - "referenceName": { - "type": "string", - "description": "The display name corresponding to the reference specified by `referenceId`, for example `chr1`, `1`, or `chrX`." - }, - "start": { - "type": "string", - "description": "The start position of the range on the reference, 0-based inclusive.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end position of the range on the reference, 0-based exclusive.", - "format": "int64" - }, - "reverseStrand": { - "type": "boolean", - "description": "Whether this range refers to the reverse strand, as opposed to the forward strand. Note that regardless of this field, the start/end position of the range always refer to the forward strand." - }, - "type": { - "type": "string", - "description": "The data type for this annotation. Must match the containing annotation set's type.", - "enum": [ - "ANNOTATION_TYPE_UNSPECIFIED", - "GENERIC", - "VARIANT", - "GENE", - "TRANSCRIPT" - ] - }, - "variant": { - "$ref": "VariantAnnotation", - "description": "A variant annotation, which describes the effect of a variant on the genome, the coding sequence, and/or higher level consequences at the organism level e.g. pathogenicity. This field is only set for annotations of type `VARIANT`." - }, - "transcript": { - "$ref": "Transcript", - "description": "A transcript value represents the assertion that a particular region of the reference genome may be transcribed as RNA. An alternative splicing pattern would be represented as a separate transcript object. This field is only set for annotations of type `TRANSCRIPT`." - }, - "info": { - "type": "object", - "description": "A map of additional read alignment information. This must be of the form map (string key mapping to a list of string values).", - "additionalProperties": { - "type": "array", - "items": { - "type": "any" + "variants": { + "methods": { + "create": { + "path": "v1/variants", + "id": "genomics.variants.create", + "request": { + "$ref": "Variant" + }, + "description": "Creates a new variant.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "response": { + "$ref": "Variant" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/variants" + }, + "search": { + "id": "genomics.variants.search", + "path": "v1/variants/search", + "request": { + "$ref": "SearchVariantsRequest" + }, + "description": "Gets a list of variants matching the criteria.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "SearchVariantsResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/variants/search" + }, + "get": { + "id": "genomics.variants.get", + "path": "v1/variants/{variantId}", + "description": "Gets a variant by ID.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "httpMethod": "GET", + "parameterOrder": [ + "variantId" + ], + "response": { + "$ref": "Variant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": { + "variantId": { + "location": "path", + "description": "The ID of the variant.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/variants/{variantId}" + }, + "patch": { + "id": "genomics.variants.patch", + "path": "v1/variants/{variantId}", + "description": "Updates a variant.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics. Returns the modified variant without\nits calls.", + "request": { + "$ref": "Variant" + }, + "httpMethod": "PATCH", + "parameterOrder": [ + "variantId" + ], + "response": { + "$ref": "Variant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "variantId": { + "required": true, + "type": "string", + "location": "path", + "description": "The ID of the variant to be updated." + }, + "updateMask": { + "location": "query", + "description": "An optional mask specifying which fields to update. At this time, mutable\nfields are names and\ninfo. Acceptable values are \"names\" and\n\"info\". If unspecified, all mutable fields will be updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "flatPath": "v1/variants/{variantId}" + }, + "import": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.read_write", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/variants:import", + "path": "v1/variants:import", + "id": "genomics.variants.import", + "request": { + "$ref": "ImportVariantsRequest" + }, + "description": "Creates variant data by asynchronously importing the provided information.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThe variants for import will be merged with any existing variant that\nmatches its reference sequence, start, end, reference bases, and\nalternative bases. If no such variant exists, a new one will be created.\n\nWhen variants are merged, the call information from the new variant\nis added to the existing variant, and Variant info fields are merged\nas specified in\ninfoMergeConfig.\nAs a special case, for single-sample VCF files, QUAL and FILTER fields will\nbe moved to the call level; these are sometimes interpreted in a\ncall-specific context.\nImported VCF headers are appended to the metadata already in a variant set." + }, + "merge": { + "description": "Merges the given variants with existing variants.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nEach variant will be\nmerged with an existing variant that matches its reference sequence,\nstart, end, reference bases, and alternative bases. If no such variant\nexists, a new one will be created.\n\nWhen variants are merged, the call information from the new variant\nis added to the existing variant. Variant info fields are merged as\nspecified in the\ninfoMergeConfig\nfield of the MergeVariantsRequest.\n\nPlease exercise caution when using this method! It is easy to introduce\nmistakes in existing variants and difficult to back out of them. For\nexample,\nsuppose you were trying to merge a new variant with an existing one and\nboth\nvariants contain calls that belong to callsets with the same callset ID.\n\n // Existing variant - irrelevant fields trimmed for clarity\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 0,\n 1\n ],\n }\n ]\n }\n\n // New variant with conflicting call information\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 1,\n 1\n ],\n }\n ]\n }\n\nThe resulting merged variant would overwrite the existing calls with those\nfrom the new variant:\n\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 1,\n 1\n ],\n }\n ]\n }\n\nThis may be the desired outcome, but it is up to the user to determine if\nif that is indeed the case.", + "request": { + "$ref": "MergeVariantsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": {}, + "flatPath": "v1/variants:merge", + "id": "genomics.variants.merge", + "path": "v1/variants:merge" + }, + "delete": { + "description": "Deletes a variant.\n\nFor the definitions of variants and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "httpMethod": "DELETE", + "parameterOrder": [ + "variantId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "variantId": { + "location": "path", + "description": "The ID of the variant to be deleted.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/variants/{variantId}", + "id": "genomics.variants.delete", + "path": "v1/variants/{variantId}" + } } - } - } - } - }, - "VariantAnnotation": { - "id": "VariantAnnotation", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type has been adapted from ClinVar's list of variant types.", - "enum": [ - "TYPE_UNSPECIFIED", - "TYPE_OTHER", - "INSERTION", - "DELETION", - "SUBSTITUTION", - "SNP", - "STRUCTURAL", - "CNV" - ] }, - "effect": { - "type": "string", - "description": "Effect of the variant on the coding sequence.", - "enum": [ - "EFFECT_UNSPECIFIED", - "EFFECT_OTHER", - "FRAMESHIFT", - "FRAME_PRESERVING_INDEL", - "SYNONYMOUS_SNP", - "NONSYNONYMOUS_SNP", - "STOP_GAIN", - "STOP_LOSS", - "SPLICE_SITE_DISRUPTION" - ] - }, - "alternateBases": { - "type": "string", - "description": "The alternate allele for this variant. If multiple alternate alleles exist at this location, create a separate variant for each one, as they may represent distinct conditions." - }, - "geneId": { - "type": "string", - "description": "Google annotation ID of the gene affected by this variant. This should be provided when the variant is created." - }, - "transcriptIds": { - "type": "array", - "description": "Google annotation IDs of the transcripts affected by this variant. These should be provided when the variant is created.", - "items": { - "type": "string" - } - }, - "conditions": { - "type": "array", - "description": "The set of conditions associated with this variant. A condition describes the way a variant influences human health.", - "items": { - "$ref": "ClinicalCondition" - } - }, - "clinicalSignificance": { - "type": "string", - "description": "Describes the clinical significance of a variant. It is adapted from the ClinVar controlled vocabulary for clinical significance described at: http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/", - "enum": [ - "CLINICAL_SIGNIFICANCE_UNSPECIFIED", - "CLINICAL_SIGNIFICANCE_OTHER", - "UNCERTAIN", - "BENIGN", - "LIKELY_BENIGN", - "LIKELY_PATHOGENIC", - "PATHOGENIC", - "DRUG_RESPONSE", - "HISTOCOMPATIBILITY", - "CONFERS_SENSITIVITY", - "RISK_FACTOR", - "ASSOCIATION", - "PROTECTIVE", - "MULTIPLE_REPORTED" - ] - } - } - }, - "ClinicalCondition": { - "id": "ClinicalCondition", - "type": "object", - "properties": { - "names": { - "type": "array", - "description": "A set of names for the condition.", - "items": { - "type": "string" - } - }, - "externalIds": { - "type": "array", - "description": "The set of external IDs for this condition.", - "items": { - "$ref": "ExternalId" - } - }, - "conceptId": { - "type": "string", - "description": "The MedGen concept id associated with this gene. Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/" - }, - "omimId": { - "type": "string", - "description": "The OMIM id for this condition. Search for these IDs at http://omim.org/" - } - } - }, - "ExternalId": { - "id": "ExternalId", - "type": "object", - "properties": { - "sourceName": { - "type": "string", - "description": "The name of the source of this data." - }, - "id": { - "type": "string", - "description": "The id used by the source of this data." - } - } - }, - "Transcript": { - "id": "Transcript", - "type": "object", - "description": "A transcript represents the assertion that a particular region of the reference genome may be transcribed as RNA.", - "properties": { - "geneId": { - "type": "string", - "description": "The annotation ID of the gene from which this transcript is transcribed." - }, - "exons": { - "type": "array", - "description": "The exons that compose this transcript. This field should be unset for genomes where transcript splicing does not occur, for example prokaryotes. Introns are regions of the transcript that are not included in the spliced RNA product. Though not explicitly modeled here, intron ranges can be deduced; all regions of this transcript that are not exons are introns. Exonic sequences do not necessarily code for a translational product (amino acids). Only the regions of exons bounded by the codingSequence correspond to coding DNA sequence. Exons are ordered by start position and may not overlap.", - "items": { - "$ref": "Exon" - } - }, - "codingSequence": { - "$ref": "CodingSequence", - "description": "The range of the coding sequence for this transcript, if any. To determine the exact ranges of coding sequence, intersect this range with those of the exons, if any. If there are any exons, the codingSequence must start and end within them. Note that in some cases, the reference genome will not exactly match the observed mRNA transcript e.g. due to variance in the source genome from reference. In these cases, exon.frame will not necessarily match the expected reference reading frame and coding exon reference bases cannot necessarily be concatenated to produce the original transcript mRNA." - } - } - }, - "Exon": { - "id": "Exon", - "type": "object", - "properties": { - "start": { - "type": "string", - "description": "The start position of the exon on this annotation's reference sequence, 0-based inclusive. Note that this is relative to the reference start, and **not** the containing annotation start.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end position of the exon on this annotation's reference sequence, 0-based exclusive. Note that this is relative to the reference start, and *not* the containing annotation start.", - "format": "int64" - }, - "frame": { - "type": "integer", - "description": "The frame of this exon. Contains a value of 0, 1, or 2, which indicates the offset of the first coding base of the exon within the reading frame of the coding DNA sequence, if any. This field is dependent on the strandedness of this annotation (see Annotation.reverse_strand). For forward stranded annotations, this offset is relative to the exon.start. For reverse strand annotations, this offset is relative to the exon.end `- 1`. Unset if this exon does not intersect the coding sequence. Upon creation of a transcript, the frame must be populated for all or none of the coding exons.", - "format": "int32" - } - } - }, - "CodingSequence": { - "id": "CodingSequence", - "type": "object", - "properties": { - "start": { - "type": "string", - "description": "The start of the coding sequence on this annotation's reference sequence, 0-based inclusive. Note that this position is relative to the reference start, and *not* the containing annotation start.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end of the coding sequence on this annotation's reference sequence, 0-based exclusive. Note that this position is relative to the reference start, and *not* the containing annotation start.", - "format": "int64" - } - } - }, - "BatchCreateAnnotationsRequest": { - "id": "BatchCreateAnnotationsRequest", - "type": "object", - "properties": { - "annotations": { - "type": "array", - "description": "The annotations to be created. At most 4096 can be specified in a single request.", - "items": { - "$ref": "Annotation" - } - }, - "requestId": { - "type": "string", - "description": "A unique request ID which enables the server to detect duplicated requests. If provided, duplicated requests will result in the same response; if not provided, duplicated requests may result in duplicated data. For a given annotation set, callers should not reuse `request_id`s when writing different batches of annotations - behavior in this case is undefined. A common approach is to use a UUID. For batch jobs where worker crashes are a possibility, consider using some unique variant of a worker or run ID." - } - } - }, - "BatchCreateAnnotationsResponse": { - "id": "BatchCreateAnnotationsResponse", - "type": "object", - "properties": { - "entries": { - "type": "array", - "description": "The resulting per-annotation entries, ordered consistently with the original request.", - "items": { - "$ref": "Entry" - } - } - } - }, - "Entry": { - "id": "Entry", - "type": "object", - "properties": { - "status": { - "$ref": "Status", - "description": "The creation status." - }, - "annotation": { - "$ref": "Annotation", - "description": "The created annotation, if creation was successful." - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - } - }, - "SearchAnnotationsRequest": { - "id": "SearchAnnotationsRequest", - "type": "object", - "properties": { - "annotationSetIds": { - "type": "array", - "description": "Required. The annotation sets to search within. The caller must have `READ` access to these annotation sets. All queried annotation sets must have the same type.", - "items": { - "type": "string" - } - }, - "referenceId": { - "type": "string", - "description": "The ID of the reference to query." - }, - "referenceName": { - "type": "string", - "description": "The name of the reference to query, within the reference set associated with this query." - }, - "start": { - "type": "string", - "description": "The start position of the range on the reference, 0-based inclusive. If specified, referenceId or referenceName must be specified. Defaults to 0.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end position of the range on the reference, 0-based exclusive. If referenceId or referenceName must be specified, Defaults to the length of the reference.", - "format": "int64" - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response." - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 256. The maximum value is 2048.", - "format": "int32" - } - } - }, - "SearchAnnotationsResponse": { - "id": "SearchAnnotationsResponse", - "type": "object", - "properties": { - "annotations": { - "type": "array", - "description": "The matching annotations.", - "items": { - "$ref": "Annotation" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "ListDatasetsResponse": { - "id": "ListDatasetsResponse", - "type": "object", - "description": "The dataset list response.", - "properties": { - "datasets": { - "type": "array", - "description": "The list of matching Datasets.", - "items": { - "$ref": "Dataset" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "Dataset": { - "id": "Dataset", - "type": "object", - "description": "A Dataset is a collection of genomic data. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "properties": { - "id": { - "type": "string", - "description": "The server-generated dataset ID, unique across all datasets." - }, - "projectId": { - "type": "string", - "description": "The Google Cloud project ID that this dataset belongs to." - }, - "name": { - "type": "string", - "description": "The dataset name." - }, - "createTime": { - "type": "string", - "description": "The time this dataset was created, in seconds from the epoch." - } - } - }, - "UndeleteDatasetRequest": { - "id": "UndeleteDatasetRequest", - "type": "object" - }, - "SetIamPolicyRequest": { - "id": "SetIamPolicyRequest", - "type": "object", - "description": "Request message for `SetIamPolicy` method.", - "properties": { - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." - } - } - }, - "Policy": { - "id": "Policy", - "type": "object", - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\", ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", - "properties": { - "version": { - "type": "integer", - "description": "Version of the `Policy`. The default version is 0.", - "format": "int32" - }, - "bindings": { - "type": "array", - "description": "Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - } - }, - "etag": { - "type": "string", - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", - "format": "byte" - } - } - }, - "Binding": { - "id": "Binding", - "type": "object", - "description": "Associates `members` with a `role`.", - "properties": { - "role": { - "type": "string", - "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required" - }, - "members": { - "type": "array", - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", - "items": { - "type": "string" - } - } - } - }, - "GetIamPolicyRequest": { - "id": "GetIamPolicyRequest", - "type": "object", - "description": "Request message for `GetIamPolicy` method." - }, - "TestIamPermissionsRequest": { - "id": "TestIamPermissionsRequest", - "type": "object", - "description": "Request message for `TestIamPermissions` method.", - "properties": { - "permissions": { - "type": "array", - "description": "REQUIRED: The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. Allowed permissions are: * `genomics.datasets.create` * `genomics.datasets.delete` * `genomics.datasets.get` * `genomics.datasets.list` * `genomics.datasets.update` * `genomics.datasets.getIamPolicy` * `genomics.datasets.setIamPolicy`", - "items": { - "type": "string" - } - } - } - }, - "TestIamPermissionsResponse": { - "id": "TestIamPermissionsResponse", - "type": "object", - "description": "Response message for `TestIamPermissions` method.", - "properties": { - "permissions": { - "type": "array", - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - } - } - } - }, - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "The response message for Operations.ListOperations.", - "properties": { - "operations": { - "type": "array", - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "properties": { - "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`" - }, - "metadata": { - "type": "object", - "description": "An OperationMetadata object. This will always be returned with the Operation.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "done": { - "type": "boolean", - "description": "If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available." - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "response": { - "type": "object", - "description": "If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For exports, an empty response is returned.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "CancelOperationRequest": { - "id": "CancelOperationRequest", - "type": "object", - "description": "The request message for Operations.CancelOperation." - }, - "ImportReadGroupSetsRequest": { - "id": "ImportReadGroupSetsRequest", - "type": "object", - "description": "The read group set import request.", - "properties": { - "datasetId": { - "type": "string", - "description": "Required. The ID of the dataset these read group sets will belong to. The caller must have WRITE permissions to this dataset." - }, - "referenceSetId": { - "type": "string", - "description": "The reference set to which the imported read group sets are aligned to, if any. The reference names of this reference set must be a superset of those found in the imported file headers. If no reference set id is provided, a best effort is made to associate with a matching reference set." - }, - "sourceUris": { - "type": "array", - "description": "A list of URIs pointing at [BAM files](https://samtools.github.io/hts-specs/SAMv1.pdf) in Google Cloud Storage.", - "items": { - "type": "string" - } - }, - "partitionStrategy": { - "type": "string", - "description": "The partition strategy describes how read groups are partitioned into read group sets.", - "enum": [ - "PARTITION_STRATEGY_UNSPECIFIED", - "PER_FILE_PER_SAMPLE", - "MERGE_ALL" - ] - } - } - }, - "ExportReadGroupSetRequest": { - "id": "ExportReadGroupSetRequest", - "type": "object", - "description": "The read group set export request.", - "properties": { - "projectId": { - "type": "string", - "description": "Required. The Google Cloud project ID that owns this export. The caller must have WRITE access to this project." - }, - "exportUri": { - "type": "string", - "description": "Required. A Google Cloud Storage URI for the exported BAM file. The currently authenticated user must have write access to the new file. An error will be returned if the URI already contains data." - }, - "referenceNames": { - "type": "array", - "description": "The reference names to export. If this is not specified, all reference sequences, including unmapped reads, are exported. Use `*` to export only unmapped reads.", - "items": { - "type": "string" - } - } - } - }, - "SearchReadGroupSetsRequest": { - "id": "SearchReadGroupSetsRequest", - "type": "object", - "description": "The read group set search request.", - "properties": { - "datasetIds": { - "type": "array", - "description": "Restricts this query to read group sets within the given datasets. At least one ID must be provided.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Only return read group sets for which a substring of the name matches this string." - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response." - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 256. The maximum value is 1024.", - "format": "int32" - } - } - }, - "SearchReadGroupSetsResponse": { - "id": "SearchReadGroupSetsResponse", - "type": "object", - "description": "The read group set search response.", - "properties": { - "readGroupSets": { - "type": "array", - "description": "The list of matching read group sets.", - "items": { - "$ref": "ReadGroupSet" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "ReadGroupSet": { - "id": "ReadGroupSet", - "type": "object", - "description": "A read group set is a logical collection of read groups, which are collections of reads produced by a sequencer. A read group set typically models reads corresponding to one sample, sequenced one way, and aligned one way. * A read group set belongs to one dataset. * A read group belongs to one read group set. * A read belongs to one read group. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "properties": { - "id": { - "type": "string", - "description": "The server-generated read group set ID, unique for all read group sets." - }, - "datasetId": { - "type": "string", - "description": "The dataset to which this read group set belongs." - }, - "referenceSetId": { - "type": "string", - "description": "The reference set to which the reads in this read group set are aligned." - }, - "name": { - "type": "string", - "description": "The read group set name. By default this will be initialized to the sample name of the sequenced data contained in this set." - }, - "filename": { - "type": "string", - "description": "The filename of the original source file for this read group set, if any." - }, - "readGroups": { - "type": "array", - "description": "The read groups in this set. There are typically 1-10 read groups in a read group set.", - "items": { - "$ref": "ReadGroup" - } - }, - "info": { - "type": "object", - "description": "A map of additional read group set information.", - "additionalProperties": { - "type": "array", - "items": { - "type": "any" - } - } - } - } - }, - "ReadGroup": { - "id": "ReadGroup", - "type": "object", - "description": "A read group is all the data that's processed the same way by the sequencer.", - "properties": { - "id": { - "type": "string", - "description": "The server-generated read group ID, unique for all read groups. Note: This is different than the @RG ID field in the SAM spec. For that value, see name." - }, - "datasetId": { - "type": "string", - "description": "The dataset to which this read group belongs." - }, - "name": { - "type": "string", - "description": "The read group name. This corresponds to the @RG ID field in the SAM spec." - }, - "description": { - "type": "string", - "description": "A free-form text description of this read group." - }, - "sampleId": { - "type": "string", - "description": "A client-supplied sample identifier for the reads in this read group." - }, - "experiment": { - "$ref": "Experiment", - "description": "The experiment used to generate this read group." - }, - "predictedInsertSize": { - "type": "integer", - "description": "The predicted insert size of this read group. The insert size is the length the sequenced DNA fragment from end-to-end, not including the adapters.", - "format": "int32" - }, - "programs": { - "type": "array", - "description": "The programs used to generate this read group. Programs are always identical for all read groups within a read group set. For this reason, only the first read group in a returned set will have this field populated.", - "items": { - "$ref": "Program" - } - }, - "referenceSetId": { - "type": "string", - "description": "The reference set the reads in this read group are aligned to." - }, - "info": { - "type": "object", - "description": "A map of additional read group information. This must be of the form map (string key mapping to a list of string values).", - "additionalProperties": { - "type": "array", - "items": { - "type": "any" - } - } - } - } - }, - "Experiment": { - "id": "Experiment", - "type": "object", - "properties": { - "libraryId": { - "type": "string", - "description": "A client-supplied library identifier; a library is a collection of DNA fragments which have been prepared for sequencing from a sample. This field is important for quality control as error or bias can be introduced during sample preparation." - }, - "platformUnit": { - "type": "string", - "description": "The platform unit used as part of this experiment, for example flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the @RG PU field in the SAM spec." - }, - "sequencingCenter": { - "type": "string", - "description": "The sequencing center used as part of this experiment." - }, - "instrumentModel": { - "type": "string", - "description": "The instrument model used as part of this experiment. This maps to sequencing technology in the SAM spec." - } - } - }, - "Program": { - "id": "Program", - "type": "object", - "properties": { - "commandLine": { - "type": "string", - "description": "The command line used to run this program." - }, - "id": { - "type": "string", - "description": "The user specified locally unique ID of the program. Used along with `prevProgramId` to define an ordering between programs." - }, - "name": { - "type": "string", - "description": "The display name of the program. This is typically the colloquial name of the tool used, for example 'bwa' or 'picard'." - }, - "prevProgramId": { - "type": "string", - "description": "The ID of the program run before this one." - }, - "version": { - "type": "string", - "description": "The version of the program run." - } - } - }, - "ListCoverageBucketsResponse": { - "id": "ListCoverageBucketsResponse", - "type": "object", - "properties": { - "bucketWidth": { - "type": "string", - "description": "The length of each coverage bucket in base pairs. Note that buckets at the end of a reference sequence may be shorter. This value is omitted if the bucket width is infinity (the default behaviour, with no range or `targetBucketWidth`).", - "format": "int64" - }, - "coverageBuckets": { - "type": "array", - "description": "The coverage buckets. The list of buckets is sparse; a bucket with 0 overlapping reads is not returned. A bucket never crosses more than one reference sequence. Each bucket has width `bucketWidth`, unless its end is the end of the reference sequence.", - "items": { - "$ref": "CoverageBucket" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "CoverageBucket": { - "id": "CoverageBucket", - "type": "object", - "description": "A bucket over which read coverage has been precomputed. A bucket corresponds to a specific range of the reference sequence.", - "properties": { - "range": { - "$ref": "Range", - "description": "The genomic coordinate range spanned by this bucket." - }, - "meanCoverage": { - "type": "number", - "description": "The average number of reads which are aligned to each individual reference base in this bucket.", - "format": "float" - } - } - }, - "Range": { - "id": "Range", - "type": "object", - "description": "A 0-based half-open genomic coordinate range for search requests.", - "properties": { - "referenceName": { - "type": "string", - "description": "The reference sequence name, for example `chr1`, `1`, or `chrX`." - }, - "start": { - "type": "string", - "description": "The start position of the range on the reference, 0-based inclusive.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end position of the range on the reference, 0-based exclusive.", - "format": "int64" - } - } - }, - "SearchReadsRequest": { - "id": "SearchReadsRequest", - "type": "object", - "description": "The read search request.", - "properties": { - "readGroupSetIds": { - "type": "array", - "description": "The IDs of the read groups sets within which to search for reads. All specified read group sets must be aligned against a common set of reference sequences; this defines the genomic coordinates for the query. Must specify one of `readGroupSetIds` or `readGroupIds`.", - "items": { - "type": "string" - } - }, - "readGroupIds": { - "type": "array", - "description": "The IDs of the read groups within which to search for reads. All specified read groups must belong to the same read group sets. Must specify one of `readGroupSetIds` or `readGroupIds`.", - "items": { - "type": "string" - } - }, - "referenceName": { - "type": "string", - "description": "The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to `*`, only unmapped reads are returned. If unspecified, all reads (mapped and unmapped) are returned." - }, - "start": { - "type": "string", - "description": "The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified.", - "format": "int64" - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response." - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 256. The maximum value is 2048.", - "format": "int32" - } - } - }, - "SearchReadsResponse": { - "id": "SearchReadsResponse", - "type": "object", - "description": "The read search response.", - "properties": { - "alignments": { - "type": "array", - "description": "The list of matching alignments sorted by mapped genomic coordinate, if any, ascending in position within the same reference. Unmapped reads, which have no position, are returned contiguously and are sorted in ascending lexicographic order by fragment name.", - "items": { - "$ref": "Read" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "Read": { - "id": "Read", - "type": "object", - "description": "A read alignment describes a linear alignment of a string of DNA to a reference sequence, in addition to metadata about the fragment (the molecule of DNA sequenced) and the read (the bases which were read by the sequencer). A read is equivalent to a line in a SAM file. A read belongs to exactly one read group and exactly one read group set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) ### Reverse-stranded reads Mapped reads (reads having a non-null `alignment`) can be aligned to either the forward or the reverse strand of their associated reference. Strandedness of a mapped read is encoded by `alignment.position.reverseStrand`. If we consider the reference to be a forward-stranded coordinate space of `[0, reference.length)` with `0` as the left-most position and `reference.length` as the right-most position, reads are always aligned left to right. That is, `alignment.position.position` always refers to the left-most reference coordinate and `alignment.cigar` describes the alignment of this read to the reference from left to right. All per-base fields such as `alignedSequence` and `alignedQuality` share this same left-to-right orientation; this is true of reads which are aligned to either strand. For reverse-stranded reads, this means that `alignedSequence` is the reverse complement of the bases that were originally reported by the sequencing machine. ### Generating a reference-aligned sequence string When interacting with mapped reads, it's often useful to produce a string representing the local alignment of the read to reference. The following pseudocode demonstrates one way of doing this: out = \"\" offset = 0 for c in read.alignment.cigar { switch c.operation { case \"ALIGNMENT_MATCH\", \"SEQUENCE_MATCH\", \"SEQUENCE_MISMATCH\": out += read.alignedSequence[offset:offset+c.operationLength] offset += c.operationLength break case \"CLIP_SOFT\", \"INSERT\": offset += c.operationLength break case \"PAD\": out += repeat(\"*\", c.operationLength) break case \"DELETE\": out += repeat(\"-\", c.operationLength) break case \"SKIP\": out += repeat(\" \", c.operationLength) break case \"CLIP_HARD\": break } } return out ### Converting to SAM's CIGAR string The following pseudocode generates a SAM CIGAR string from the `cigar` field. Note that this is a lossy conversion (`cigar.referenceSequence` is lost). cigarMap = { \"ALIGNMENT_MATCH\": \"M\", \"INSERT\": \"I\", \"DELETE\": \"D\", \"SKIP\": \"N\", \"CLIP_SOFT\": \"S\", \"CLIP_HARD\": \"H\", \"PAD\": \"P\", \"SEQUENCE_MATCH\": \"=\", \"SEQUENCE_MISMATCH\": \"X\", } cigarStr = \"\" for c in read.alignment.cigar { cigarStr += c.operationLength + cigarMap[c.operation] } return cigarStr", - "properties": { - "id": { - "type": "string", - "description": "The server-generated read ID, unique across all reads. This is different from the `fragmentName`." - }, - "readGroupId": { - "type": "string", - "description": "The ID of the read group this read belongs to. A read belongs to exactly one read group. This is a server-generated ID which is distinct from SAM's RG tag (for that value, see ReadGroup.name)." - }, - "readGroupSetId": { - "type": "string", - "description": "The ID of the read group set this read belongs to. A read belongs to exactly one read group set." - }, - "fragmentName": { - "type": "string", - "description": "The fragment name. Equivalent to QNAME (query template name) in SAM." - }, - "properPlacement": { - "type": "boolean", - "description": "The orientation and the distance between reads from the fragment are consistent with the sequencing protocol (SAM flag 0x2)." - }, - "duplicateFragment": { - "type": "boolean", - "description": "The fragment is a PCR or optical duplicate (SAM flag 0x400)." - }, - "fragmentLength": { - "type": "integer", - "description": "The observed length of the fragment, equivalent to TLEN in SAM.", - "format": "int32" - }, - "readNumber": { - "type": "integer", - "description": "The read number in sequencing. 0-based and less than numberReads. This field replaces SAM flag 0x40 and 0x80.", - "format": "int32" - }, - "numberReads": { - "type": "integer", - "description": "The number of reads in the fragment (extension to SAM flag 0x1).", - "format": "int32" - }, - "failedVendorQualityChecks": { - "type": "boolean", - "description": "Whether this read did not pass filters, such as platform or vendor quality controls (SAM flag 0x200)." - }, - "alignment": { - "$ref": "LinearAlignment", - "description": "The linear alignment for this alignment record. This field is null for unmapped reads." - }, - "secondaryAlignment": { - "type": "boolean", - "description": "Whether this alignment is secondary. Equivalent to SAM flag 0x100. A secondary alignment represents an alternative to the primary alignment for this read. Aligners may return secondary alignments if a read can map ambiguously to multiple coordinates in the genome. By convention, each read has one and only one alignment where both `secondaryAlignment` and `supplementaryAlignment` are false." - }, - "supplementaryAlignment": { - "type": "boolean", - "description": "Whether this alignment is supplementary. Equivalent to SAM flag 0x800. Supplementary alignments are used in the representation of a chimeric alignment. In a chimeric alignment, a read is split into multiple linear alignments that map to different reference contigs. The first linear alignment in the read will be designated as the representative alignment; the remaining linear alignments will be designated as supplementary alignments. These alignments may have different mapping quality scores. In each linear alignment in a chimeric alignment, the read will be hard clipped. The `alignedSequence` and `alignedQuality` fields in the alignment record will only represent the bases for its respective linear alignment." - }, - "alignedSequence": { - "type": "string", - "description": "The bases of the read sequence contained in this alignment record, **without CIGAR operations applied** (equivalent to SEQ in SAM). `alignedSequence` and `alignedQuality` may be shorter than the full read sequence and quality. This will occur if the alignment is part of a chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR for this read will begin/end with a hard clip operator that will indicate the length of the excised sequence." - }, - "alignedQuality": { - "type": "array", - "description": "The quality of the read sequence contained in this alignment record (equivalent to QUAL in SAM). `alignedSequence` and `alignedQuality` may be shorter than the full read sequence and quality. This will occur if the alignment is part of a chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR for this read will begin/end with a hard clip operator that will indicate the length of the excised sequence.", - "items": { - "type": "integer", - "format": "int32" - } - }, - "nextMatePosition": { - "$ref": "Position", - "description": "The mapping of the primary alignment of the `(readNumber+1)%numberReads` read in the fragment. It replaces mate position and mate strand in SAM." - }, - "info": { - "type": "object", - "description": "A map of additional read alignment information. This must be of the form map (string key mapping to a list of string values).", - "additionalProperties": { - "type": "array", - "items": { - "type": "any" - } - } - } - } - }, - "LinearAlignment": { - "id": "LinearAlignment", - "type": "object", - "description": "A linear alignment can be represented by one CIGAR string. Describes the mapped position and local alignment of the read to the reference.", - "properties": { - "position": { - "$ref": "Position", - "description": "The position of this alignment." - }, - "mappingQuality": { - "type": "integer", - "description": "The mapping quality of this alignment. Represents how likely the read maps to this position as opposed to other locations. Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to the nearest integer.", - "format": "int32" - }, - "cigar": { - "type": "array", - "description": "Represents the local alignment of this sequence (alignment matches, indels, etc) against the reference.", - "items": { - "$ref": "CigarUnit" - } - } - } - }, - "Position": { - "id": "Position", - "type": "object", - "description": "An abstraction for referring to a genomic position, in relation to some already known reference. For now, represents a genomic position as a reference name, a base number on that reference (0-based), and a determination of forward or reverse strand.", - "properties": { - "referenceName": { - "type": "string", - "description": "The name of the reference in whatever reference set is being used." - }, - "position": { - "type": "string", - "description": "The 0-based offset from the start of the forward strand for that reference.", - "format": "int64" - }, - "reverseStrand": { - "type": "boolean", - "description": "Whether this position is on the reverse strand, as opposed to the forward strand." - } - } - }, - "CigarUnit": { - "id": "CigarUnit", - "type": "object", - "description": "A single CIGAR operation.", - "properties": { - "operation": { - "type": "string", - "enum": [ - "OPERATION_UNSPECIFIED", - "ALIGNMENT_MATCH", - "INSERT", - "DELETE", - "SKIP", - "CLIP_SOFT", - "CLIP_HARD", - "PAD", - "SEQUENCE_MATCH", - "SEQUENCE_MISMATCH" - ] - }, - "operationLength": { - "type": "string", - "description": "The number of genomic bases that the operation runs for. Required.", - "format": "int64" - }, - "referenceSequence": { - "type": "string", - "description": "`referenceSequence` is only used at mismatches (`SEQUENCE_MISMATCH`) and deletions (`DELETE`). Filling this field replaces SAM's MD tag. If the relevant information is not available, this field is unset." - } - } - }, - "StreamReadsRequest": { - "id": "StreamReadsRequest", - "type": "object", - "description": "The stream reads request.", - "properties": { - "projectId": { - "type": "string", - "description": "The Google Cloud project ID which will be billed for this access. The caller must have WRITE access to this project. Required." - }, - "readGroupSetId": { - "type": "string", - "description": "The ID of the read group set from which to stream reads." - }, - "referenceName": { - "type": "string", - "description": "The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to *, only unmapped reads are returned." - }, - "start": { - "type": "string", - "description": "The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified.", - "format": "int64" - }, - "shard": { - "type": "integer", - "description": "Restricts results to a shard containing approximately `1/totalShards` of the normal response payload for this query. Results from a sharded request are disjoint from those returned by all queries which differ only in their shard parameter. A shard may yield 0 results; this is especially likely for large values of `totalShards`. Valid values are `[0, totalShards)`.", - "format": "int32" - }, - "totalShards": { - "type": "integer", - "description": "Specifying `totalShards` causes a disjoint subset of the normal response payload to be returned for each query with a unique `shard` parameter specified. A best effort is made to yield equally sized shards. Sharding can be used to distribute processing amongst workers, where each worker is assigned a unique `shard` number and all workers specify the same `totalShards` number. The union of reads returned for all sharded queries `[0, totalShards)` is equal to those returned by a single unsharded query. Queries for different values of `totalShards` with common divisors will share shard boundaries. For example, streaming `shard` 2 of 5 `totalShards` yields the same results as streaming `shard`s 4 and 5 of 10 `totalShards`. This property can be leveraged for adaptive retries.", - "format": "int32" - } - } - }, - "StreamReadsResponse": { - "id": "StreamReadsResponse", - "type": "object", - "properties": { - "alignments": { - "type": "array", - "items": { - "$ref": "Read" - } - } - } - }, - "SearchReferenceSetsRequest": { - "id": "SearchReferenceSetsRequest", - "type": "object", - "properties": { - "md5checksums": { - "type": "array", - "description": "If present, return reference sets for which the md5checksum matches exactly.", - "items": { - "type": "string" - } - }, - "accessions": { - "type": "array", - "description": "If present, return reference sets for which a prefix of any of sourceAccessions match any of these strings. Accession numbers typically have a main number and a version, for example `NC_000001.11`.", - "items": { - "type": "string" - } - }, - "assemblyId": { - "type": "string", - "description": "If present, return reference sets for which a substring of their `assemblyId` matches this string (case insensitive)." - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response." - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 4096.", - "format": "int32" - } - } - }, - "SearchReferenceSetsResponse": { - "id": "SearchReferenceSetsResponse", - "type": "object", - "properties": { - "referenceSets": { - "type": "array", - "description": "The matching references sets.", - "items": { - "$ref": "ReferenceSet" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "ReferenceSet": { - "id": "ReferenceSet", - "type": "object", - "description": "A reference set is a set of references which typically comprise a reference assembly for a species, such as `GRCh38` which is representative of the human genome. A reference set defines a common coordinate space for comparing reference-aligned experimental data. A reference set contains 1 or more references. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "properties": { - "id": { - "type": "string", - "description": "The server-generated reference set ID, unique across all reference sets." - }, - "referenceIds": { - "type": "array", - "description": "The IDs of the reference objects that are part of this set. `Reference.md5checksum` must be unique within this set.", - "items": { - "type": "string" - } - }, - "md5checksum": { - "type": "string", - "description": "Order-independent MD5 checksum which identifies this reference set. The checksum is computed by sorting all lower case hexidecimal string `reference.md5checksum` (for all reference in this set) in ascending lexicographic order, concatenating, and taking the MD5 of that value. The resulting value is represented in lower case hexadecimal format." - }, - "ncbiTaxonId": { - "type": "integer", - "description": "ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human) indicating the species which this reference set is intended to model. Note that contained references may specify a different `ncbiTaxonId`, as assemblies may contain reference sequences which do not belong to the modeled species, for example EBV in a human reference genome.", - "format": "int32" - }, - "description": { - "type": "string", - "description": "Free text description of this reference set." - }, - "assemblyId": { - "type": "string", - "description": "Public id of this reference set, such as `GRCh37`." - }, - "sourceUri": { - "type": "string", - "description": "The URI from which the references were obtained." - }, - "sourceAccessions": { - "type": "array", - "description": "All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with a version number, for example `NC_000001.11`.", - "items": { - "type": "string" - } - } - } - }, - "SearchReferencesRequest": { - "id": "SearchReferencesRequest", - "type": "object", - "properties": { - "md5checksums": { - "type": "array", - "description": "If present, return references for which the md5checksum matches exactly.", - "items": { - "type": "string" - } - }, - "accessions": { - "type": "array", - "description": "If present, return references for which a prefix of any of sourceAccessions match any of these strings. Accession numbers typically have a main number and a version, for example `GCF_000001405.26`.", - "items": { - "type": "string" - } - }, - "referenceSetId": { - "type": "string", - "description": "If present, return only references which belong to this reference set." - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response." - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 4096.", - "format": "int32" - } - } - }, - "SearchReferencesResponse": { - "id": "SearchReferencesResponse", - "type": "object", - "properties": { "references": { - "type": "array", - "description": "The matching references.", - "items": { - "$ref": "Reference" - } + "methods": { + "search": { + "response": { + "$ref": "SearchReferencesResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": {}, + "flatPath": "v1/references/search", + "path": "v1/references/search", + "id": "genomics.references.search", + "description": "Searches for references which match the given criteria.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146).", + "request": { + "$ref": "SearchReferencesRequest" + } + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "referenceId" + ], + "response": { + "$ref": "Reference" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": { + "referenceId": { + "location": "path", + "description": "The ID of the reference.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/references/{referenceId}", + "id": "genomics.references.get", + "path": "v1/references/{referenceId}", + "description": "Gets a reference.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158)." + } + }, + "resources": { + "bases": { + "methods": { + "list": { + "id": "genomics.references.bases.list", + "path": "v1/references/{referenceId}/bases", + "description": "Lists the bases in a reference, optionally restricted to a range.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221).", + "httpMethod": "GET", + "parameterOrder": [ + "referenceId" + ], + "response": { + "$ref": "ListBasesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": { + "end": { + "location": "query", + "description": "The end position (0-based, exclusive) of this query. Defaults to the length\nof this reference.", + "format": "int64", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "The maximum number of bases to return in a single page. If unspecified,\ndefaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base\npairs).", + "format": "int32", + "type": "integer" + }, + "start": { + "location": "query", + "description": "The start position (0-based) of this query. Defaults to 0.", + "format": "int64", + "type": "string" + }, + "referenceId": { + "location": "path", + "description": "The ID of the reference.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/references/{referenceId}/bases" + } + } + } + } }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." + "datasets": { + "methods": { + "create": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Dataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": {}, + "flatPath": "v1/datasets", + "id": "genomics.datasets.create", + "path": "v1/datasets", + "description": "Creates a new dataset.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "request": { + "$ref": "Dataset" + } + }, + "setIamPolicy": { + "flatPath": "v1/datasets/{datasetsId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "genomics.datasets.setIamPolicy", + "description": "Sets the access control policy on the specified dataset. Replaces any\nexisting policy.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nSee \u003ca href=\"/iam/docs/managing-policies#setting_a_policy\"\u003eSetting a\nPolicy\u003c/a\u003e for more information.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.", + "required": true, + "type": "string", + "pattern": "^datasets/[^/]+$" + } + } + }, + "getIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.", + "required": true, + "type": "string", + "pattern": "^datasets/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/datasets/{datasetsId}:getIamPolicy", + "id": "genomics.datasets.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for the dataset. This is empty if the\npolicy or resource does not exist.\n\nSee \u003ca href=\"/iam/docs/managing-policies#getting_a_policy\"\u003eGetting a\nPolicy\u003c/a\u003e for more information.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "undelete": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "datasetId": { + "description": "The ID of the dataset to be undeleted.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/datasets/{datasetId}:undelete", + "path": "v1/datasets/{datasetId}:undelete", + "id": "genomics.datasets.undelete", + "description": "Undeletes a dataset by restoring a dataset which was deleted via this API.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis operation is only possible for a week after the deletion occurred.", + "request": { + "$ref": "UndeleteDatasetRequest" + }, + "response": { + "$ref": "Dataset" + }, + "parameterOrder": [ + "datasetId" + ], + "httpMethod": "POST" + }, + "get": { + "flatPath": "v1/datasets/{datasetId}", + "path": "v1/datasets/{datasetId}", + "id": "genomics.datasets.get", + "description": "Gets a dataset by ID.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "parameterOrder": [ + "datasetId" + ], + "response": { + "$ref": "Dataset" + }, + "httpMethod": "GET", + "parameters": { + "datasetId": { + "location": "path", + "description": "The ID of the dataset.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ] + }, + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "datasetId" + ], + "response": { + "$ref": "Dataset" + }, + "parameters": { + "datasetId": { + "location": "path", + "description": "The ID of the dataset to be updated.", + "required": true, + "type": "string" + }, + "updateMask": { + "location": "query", + "description": "An optional mask specifying which fields to update. At this time, the only\nmutable field is name. The only\nacceptable value is \"name\". If unspecified, all mutable fields will be\nupdated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/datasets/{datasetId}", + "id": "genomics.datasets.patch", + "path": "v1/datasets/{datasetId}", + "request": { + "$ref": "Dataset" + }, + "description": "Updates a dataset.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics." + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.", + "required": true, + "type": "string", + "pattern": "^datasets/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/datasets/{datasetsId}:testIamPermissions", + "id": "genomics.datasets.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified resource.\nSee \u003ca href=\"/iam/docs/managing-policies#testing_permissions\"\u003eTesting\nPermissions\u003c/a\u003e for more information.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "delete": { + "id": "genomics.datasets.delete", + "path": "v1/datasets/{datasetId}", + "description": "Deletes a dataset and all of its contents (all read group sets,\nreference sets, variant sets, call sets, annotation sets, etc.)\nThis is reversible (up to one week after the deletion) via\nthe\ndatasets.undelete\noperation.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "httpMethod": "DELETE", + "parameterOrder": [ + "datasetId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "datasetId": { + "location": "path", + "description": "The ID of the dataset to be deleted.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/datasets/{datasetId}" + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListDatasetsResponse" + }, + "parameterOrder": [], + "parameters": { + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 50. The maximum value is 1024.", + "format": "int32", + "type": "integer" + }, + "projectId": { + "location": "query", + "description": "Required. The Google Cloud project ID to list datasets for.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/datasets", + "id": "genomics.datasets.list", + "path": "v1/datasets", + "description": "Lists datasets within a project.\n\nFor the definitions of datasets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + } + } + }, + "variantsets": { + "methods": { + "export": { + "id": "genomics.variantsets.export", + "path": "v1/variantsets/{variantSetId}:export", + "description": "Exports variant set data to an external destination.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "request": { + "$ref": "ExportVariantSetRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "variantSetId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "variantSetId": { + "required": true, + "type": "string", + "location": "path", + "description": "Required. The ID of the variant set that contains variant data which\nshould be exported. The caller must have READ access to this variant set." + } + }, + "flatPath": "v1/variantsets/{variantSetId}:export" + }, + "search": { + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/variantsets/search", + "path": "v1/variantsets/search", + "id": "genomics.variantsets.search", + "request": { + "$ref": "SearchVariantSetsRequest" + }, + "description": "Returns a list of all variant sets matching search criteria.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).", + "response": { + "$ref": "SearchVariantSetsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST" + }, + "get": { + "response": { + "$ref": "VariantSet" + }, + "parameterOrder": [ + "variantSetId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": { + "variantSetId": { + "location": "path", + "description": "Required. The ID of the variant set.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/variantsets/{variantSetId}", + "path": "v1/variantsets/{variantSetId}", + "id": "genomics.variantsets.get", + "description": "Gets a variant set by ID.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "patch": { + "request": { + "$ref": "VariantSet" + }, + "description": "Updates a variant set using patch semantics.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "response": { + "$ref": "VariantSet" + }, + "parameterOrder": [ + "variantSetId" + ], + "httpMethod": "PATCH", + "parameters": { + "updateMask": { + "location": "query", + "description": "An optional mask specifying which fields to update. Supported fields:\n\n* metadata.\n* name.\n* description.\n\nLeaving `updateMask` unset is equivalent to specifying all mutable\nfields.", + "format": "google-fieldmask", + "type": "string" + }, + "variantSetId": { + "location": "path", + "description": "The ID of the variant to be updated (must already exist).", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/variantsets/{variantSetId}", + "path": "v1/variantsets/{variantSetId}", + "id": "genomics.variantsets.patch" + }, + "delete": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "variantSetId": { + "location": "path", + "description": "The ID of the variant set to be deleted.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/variantsets/{variantSetId}", + "id": "genomics.variantsets.delete", + "path": "v1/variantsets/{variantSetId}", + "description": "Deletes a variant set including all variants, call sets, and calls within.\nThis is not reversible.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "httpMethod": "DELETE", + "parameterOrder": [ + "variantSetId" + ], + "response": { + "$ref": "Empty" + } + }, + "create": { + "request": { + "$ref": "VariantSet" + }, + "description": "Creates a new variant set.\n\nFor the definitions of variant sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThe provided variant set must have a valid `datasetId` set - all other\nfields are optional. Note that the `id` field will be ignored, as this is\nassigned by the server.", + "response": { + "$ref": "VariantSet" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/variantsets", + "path": "v1/variantsets", + "id": "genomics.variantsets.create" + } + } + }, + "annotations": { + "methods": { + "search": { + "description": "Searches for annotations that match the given criteria. Results are\nordered by genomic coordinate (by reference sequence, then position).\nAnnotations with equivalent genomic coordinates are returned in an\nunspecified order. This order is consistent, such that two queries for the\nsame content (regardless of page size) yield annotations in the same order\nacross their respective streams of paginated responses. Caller must have\nREAD permission for the queried annotation sets.", + "request": { + "$ref": "SearchAnnotationsRequest" + }, + "response": { + "$ref": "SearchAnnotationsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": {}, + "flatPath": "v1/annotations/search", + "path": "v1/annotations/search", + "id": "genomics.annotations.search" + }, + "get": { + "flatPath": "v1/annotations/{annotationId}", + "id": "genomics.annotations.get", + "path": "v1/annotations/{annotationId}", + "description": "Gets an annotation. Caller must have READ permission\nfor the associated annotation set.", + "httpMethod": "GET", + "response": { + "$ref": "Annotation" + }, + "parameterOrder": [ + "annotationId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": { + "annotationId": { + "description": "The ID of the annotation to be retrieved.", + "required": true, + "type": "string", + "location": "path" + } + } + }, + "update": { + "description": "Updates an annotation. Caller must have\nWRITE permission for the associated dataset.", + "request": { + "$ref": "Annotation" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "annotationId" + ], + "response": { + "$ref": "Annotation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "updateMask": { + "description": "An optional mask specifying which fields to update. Mutable fields are\nname,\nvariant,\ntranscript, and\ninfo. If unspecified, all mutable\nfields will be updated.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + }, + "annotationId": { + "location": "path", + "description": "The ID of the annotation to be updated.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/annotations/{annotationId}", + "id": "genomics.annotations.update", + "path": "v1/annotations/{annotationId}" + }, + "delete": { + "path": "v1/annotations/{annotationId}", + "id": "genomics.annotations.delete", + "description": "Deletes an annotation. Caller must have WRITE permission for\nthe associated annotation set.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "annotationId" + ], + "httpMethod": "DELETE", + "parameters": { + "annotationId": { + "description": "The ID of the annotation to be deleted.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/annotations/{annotationId}" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Annotation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": {}, + "flatPath": "v1/annotations", + "id": "genomics.annotations.create", + "path": "v1/annotations", + "description": "Creates a new annotation. Caller must have WRITE permission\nfor the associated annotation set.\n\nThe following fields are required:\n\n* annotationSetId\n* referenceName or\n referenceId\n\n### Transcripts\n\nFor annotations of type TRANSCRIPT, the following fields of\ntranscript must be provided:\n\n* exons.start\n* exons.end\n\nAll other fields may be optionally specified, unless documented as being\nserver-generated (for example, the `id` field). The annotated\nrange must be no longer than 100Mbp (mega base pairs). See the\nAnnotation resource\nfor additional restrictions on each field.", + "request": { + "$ref": "Annotation" + } + }, + "batchCreate": { + "flatPath": "v1/annotations:batchCreate", + "path": "v1/annotations:batchCreate", + "id": "genomics.annotations.batchCreate", + "request": { + "$ref": "BatchCreateAnnotationsRequest" + }, + "description": "Creates one or more new annotations atomically. All annotations must\nbelong to the same annotation set. Caller must have WRITE\npermission for this annotation set. For optimal performance, batch\npositionally adjacent annotations together.\n\nIf the request has a systemic issue, such as an attempt to write to\nan inaccessible annotation set, the entire RPC will fail accordingly. For\nlesser data issues, when possible an error will be isolated to the\ncorresponding batch entry in the response; the remaining well formed\nannotations will be created normally.\n\nFor details on the requirements for each individual annotation resource,\nsee\nCreateAnnotation.", + "response": { + "$ref": "BatchCreateAnnotationsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "flatPath": "v1/operations/{operationsId}:cancel", + "path": "v1/{+name}:cancel", + "id": "genomics.operations.cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "name": { + "required": true, + "type": "string", + "pattern": "^operations/.+$", + "location": "path", + "description": "The name of the operation resource to be cancelled." + } + } + }, + "list": { + "description": "Lists operations that match the specified filter in the request.", + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation collection.", + "required": true, + "type": "string", + "pattern": "^operations$", + "location": "path" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "The standard list page token." + }, + "pageSize": { + "location": "query", + "description": "The maximum number of results to return. If unspecified, defaults to\n256. The maximum value is 2048.", + "format": "int32", + "type": "integer" + }, + "filter": { + "description": "A string for filtering Operations.\nThe following filter fields are supported:\n\n* projectId: Required. Corresponds to\n OperationMetadata.projectId.\n* createTime: The time this job was created, in seconds from the\n [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `\u003e=` and/or `\u003c=`\n operators.\n* status: Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only\n one status may be specified.\n* labels.key where key is a label key.\n\nExamples:\n\n* `projectId = my-project AND createTime \u003e= 1432140000`\n* `projectId = my-project AND createTime \u003e= 1432140000 AND createTime \u003c= 1432150000 AND status = RUNNING`\n* `projectId = my-project AND labels.color = *`\n* `projectId = my-project AND labels.color = red`", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/operations", + "id": "genomics.operations.list", + "path": "v1/{+name}" + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "name": { + "pattern": "^operations/.+$", + "location": "path", + "description": "The name of the operation resource.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/operations/{operationsId}", + "id": "genomics.operations.get", + "path": "v1/{+name}" + } + } + }, + "referencesets": { + "methods": { + "search": { + "flatPath": "v1/referencesets/search", + "id": "genomics.referencesets.search", + "path": "v1/referencesets/search", + "description": "Searches for reference sets which match the given criteria.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)", + "request": { + "$ref": "SearchReferenceSetsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "SearchReferenceSetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": {} + }, + "get": { + "response": { + "$ref": "ReferenceSet" + }, + "parameterOrder": [ + "referenceSetId" + ], + "httpMethod": "GET", + "parameters": { + "referenceSetId": { + "description": "The ID of the reference set.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/referencesets/{referenceSetId}", + "path": "v1/referencesets/{referenceSetId}", + "id": "genomics.referencesets.get", + "description": "Gets a reference set.\n\nFor the definitions of references and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83)." + } + } + }, + "callsets": { + "methods": { + "delete": { + "description": "Deletes a call set.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "callSetId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "callSetId": { + "location": "path", + "description": "The ID of the call set to be deleted.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/callsets/{callSetId}", + "path": "v1/callsets/{callSetId}", + "id": "genomics.callsets.delete" + }, + "search": { + "request": { + "$ref": "SearchCallSetsRequest" + }, + "description": "Gets a list of call sets matching the criteria.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178).", + "response": { + "$ref": "SearchCallSetsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/callsets/search", + "path": "v1/callsets/search", + "id": "genomics.callsets.search" + }, + "patch": { + "response": { + "$ref": "CallSet" + }, + "parameterOrder": [ + "callSetId" + ], + "httpMethod": "PATCH", + "parameters": { + "callSetId": { + "location": "path", + "description": "The ID of the call set to be updated.", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "An optional mask specifying which fields to update. At this time, the only\nmutable field is name. The only\nacceptable value is \"name\". If unspecified, all mutable fields will be\nupdated.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/callsets/{callSetId}", + "path": "v1/callsets/{callSetId}", + "id": "genomics.callsets.patch", + "request": { + "$ref": "CallSet" + }, + "description": "Updates a call set.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics." + }, + "get": { + "response": { + "$ref": "CallSet" + }, + "parameterOrder": [ + "callSetId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": { + "callSetId": { + "description": "The ID of the call set.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/callsets/{callSetId}", + "path": "v1/callsets/{callSetId}", + "id": "genomics.callsets.get", + "description": "Gets a call set by ID.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "CallSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": {}, + "flatPath": "v1/callsets", + "id": "genomics.callsets.create", + "path": "v1/callsets", + "description": "Creates a new call set.\n\nFor the definitions of call sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "request": { + "$ref": "CallSet" + } + } + } + }, + "reads": { + "methods": { + "search": { + "description": "Gets a list of reads for one or more read group sets.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nReads search operates over a genomic coordinate space of reference sequence\n& position defined over the reference sequences to which the requested\nread group sets are aligned.\n\nIf a target positional range is specified, search returns all reads whose\nalignment to the reference genome overlap the range. A query which\nspecifies only read group set IDs yields all reads in those read group\nsets, including unmapped reads.\n\nAll reads returned (including reads on subsequent pages) are ordered by\ngenomic coordinate (by reference sequence, then position). Reads with\nequivalent genomic coordinates are returned in an unspecified order. This\norder is consistent, such that two queries for the same content (regardless\nof page size) yield reads in the same order across their respective streams\nof paginated responses.\n\nImplements\n[GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85).", + "request": { + "$ref": "SearchReadsRequest" + }, + "response": { + "$ref": "SearchReadsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": {}, + "flatPath": "v1/reads/search", + "path": "v1/reads/search", + "id": "genomics.reads.search" + } + } + }, + "readgroupsets": { + "methods": { + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "readGroupSetId" + ], + "httpMethod": "DELETE", + "parameters": { + "readGroupSetId": { + "location": "path", + "description": "The ID of the read group set to be deleted. The caller must have WRITE\npermissions to the dataset associated with this read group set.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/readgroupsets/{readGroupSetId}", + "path": "v1/readgroupsets/{readGroupSetId}", + "id": "genomics.readgroupsets.delete", + "description": "Deletes a read group set.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "import": { + "flatPath": "v1/readgroupsets:import", + "id": "genomics.readgroupsets.import", + "path": "v1/readgroupsets:import", + "request": { + "$ref": "ImportReadGroupSetsRequest" + }, + "description": "Creates read group sets by asynchronously importing the provided\ninformation.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThe caller must have WRITE permissions to the dataset.\n\n## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import\n\n- Tags will be converted to strings - tag types are not preserved\n- Comments (`@CO`) in the input file header will not be preserved\n- Original header order of references (`@SQ`) will not be preserved\n- Any reverse stranded unmapped reads will be reverse complemented, and\ntheir qualities (also the \"BQ\" and \"OQ\" tags, if any) will be reversed\n- Unmapped reads will be stripped of positional information (reference name\nand position)", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.read_write", + "https://www.googleapis.com/auth/genomics" + ] + }, + "export": { + "parameters": { + "readGroupSetId": { + "description": "Required. The ID of the read group set to export. The caller must have\nREAD access to this read group set.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.read_write", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/readgroupsets/{readGroupSetId}:export", + "path": "v1/readgroupsets/{readGroupSetId}:export", + "id": "genomics.readgroupsets.export", + "request": { + "$ref": "ExportReadGroupSetRequest" + }, + "description": "Exports a read group set to a BAM file in Google Cloud Storage.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nNote that currently there may be some differences between exported BAM\nfiles and the original BAM file at the time of import. See\nImportReadGroupSets\nfor caveats.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "readGroupSetId" + ], + "httpMethod": "POST" + }, + "search": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "SearchReadGroupSetsResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "flatPath": "v1/readgroupsets/search", + "id": "genomics.readgroupsets.search", + "path": "v1/readgroupsets/search", + "request": { + "$ref": "SearchReadGroupSetsRequest" + }, + "description": "Searches for read group sets matching the criteria.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nImplements\n[GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135)." + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "readGroupSetId" + ], + "response": { + "$ref": "ReadGroupSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": { + "readGroupSetId": { + "required": true, + "type": "string", + "location": "path", + "description": "The ID of the read group set." + } + }, + "flatPath": "v1/readgroupsets/{readGroupSetId}", + "id": "genomics.readgroupsets.get", + "path": "v1/readgroupsets/{readGroupSetId}", + "description": "Gets a read group set by ID.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "patch": { + "path": "v1/readgroupsets/{readGroupSetId}", + "id": "genomics.readgroupsets.patch", + "request": { + "$ref": "ReadGroupSet" + }, + "description": "Updates a read group set.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nThis method supports patch semantics.", + "response": { + "$ref": "ReadGroupSet" + }, + "parameterOrder": [ + "readGroupSetId" + ], + "httpMethod": "PATCH", + "parameters": { + "readGroupSetId": { + "description": "The ID of the read group set to be updated. The caller must have WRITE\npermissions to the dataset associated with this read group set.", + "required": true, + "type": "string", + "location": "path" + }, + "updateMask": { + "location": "query", + "description": "An optional mask specifying which fields to update. Supported fields:\n\n* name.\n* referenceSetId.\n\nLeaving `updateMask` unset is equivalent to specifying all mutable\nfields.", + "format": "google-fieldmask", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1/readgroupsets/{readGroupSetId}" + } + }, + "resources": { + "coveragebuckets": { + "methods": { + "list": { + "response": { + "$ref": "ListCoverageBucketsResponse" + }, + "parameterOrder": [ + "readGroupSetId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics", + "https://www.googleapis.com/auth/genomics.readonly" + ], + "parameters": { + "referenceName": { + "description": "The name of the reference to query, within the reference set associated\nwith this query. Optional.", + "type": "string", + "location": "query" + }, + "end": { + "location": "query", + "description": "The end position of the range on the reference, 0-based exclusive. If\nspecified, `referenceName` must also be specified. If unset or 0, defaults\nto the length of the reference.", + "format": "int64", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024. The maximum value is 2048.", + "format": "int32" + }, + "start": { + "location": "query", + "description": "The start position of the range on the reference, 0-based inclusive. If\nspecified, `referenceName` must also be specified. Defaults to 0.", + "format": "int64", + "type": "string" + }, + "readGroupSetId": { + "description": "Required. The ID of the read group set over which coverage is requested.", + "required": true, + "type": "string", + "location": "path" + }, + "targetBucketWidth": { + "location": "query", + "description": "The desired width of each reported coverage bucket in base pairs. This\nwill be rounded down to the nearest precomputed bucket width; the value\nof which is returned as `bucketWidth` in the response. Defaults\nto infinity (each bucket spans an entire reference sequence) or the length\nof the target range, if specified. The smallest precomputed\n`bucketWidth` is currently 2048 base pairs; this is subject to\nchange.", + "format": "int64", + "type": "string" + } + }, + "flatPath": "v1/readgroupsets/{readGroupSetId}/coveragebuckets", + "path": "v1/readgroupsets/{readGroupSetId}/coveragebuckets", + "id": "genomics.readgroupsets.coveragebuckets.list", + "description": "Lists fixed width coverage buckets for a read group set, each of which\ncorrespond to a range of a reference sequence. Each bucket summarizes\ncoverage information across its corresponding genomic range.\n\nFor the definitions of read group sets and other genomics resources, see\n[Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nCoverage is defined as the number of reads which are aligned to a given\nbase in the reference sequence. Coverage buckets are available at several\nprecomputed bucket widths, enabling retrieval of various coverage 'zoom\nlevels'. The caller must have READ permissions for the target read group\nset." + } + } + } + } } - } }, - "Reference": { - "id": "Reference", - "type": "object", - "description": "A reference is a canonical assembled DNA sequence, intended to act as a reference coordinate space for other genomic annotations. A single reference might represent the human chromosome 1 or mitochandrial DNA, for instance. A reference belongs to one or more reference sets. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "properties": { - "id": { - "type": "string", - "description": "The server-generated reference ID, unique across all references." - }, - "length": { - "type": "string", - "description": "The length of this reference's sequence.", - "format": "int64" - }, - "md5checksum": { - "type": "string", - "description": "MD5 of the upper-case sequence excluding all whitespace characters (this is equivalent to SQ:M5 in SAM). This value is represented in lower case hexadecimal format." - }, - "name": { - "type": "string", - "description": "The name of this reference, for example `22`." - }, - "sourceUri": { - "type": "string", - "description": "The URI from which the sequence was obtained. Typically specifies a FASTA format file." - }, - "sourceAccessions": { - "type": "array", - "description": "All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with a version number, for example `GCF_000001405.26`.", - "items": { + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string" - } }, - "ncbiTaxonId": { - "type": "integer", - "description": "ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human.", - "format": "int32" - } - } - }, - "ListBasesResponse": { - "id": "ListBasesResponse", - "type": "object", - "properties": { - "offset": { - "type": "string", - "description": "The offset position (0-based) of the given `sequence` from the start of this `Reference`. This value will differ for each page in a paginated request.", - "format": "int64" + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" }, - "sequence": { - "type": "string", - "description": "A substring of the bases that make up this reference." - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "ImportVariantsRequest": { - "id": "ImportVariantsRequest", - "type": "object", - "description": "The variant data import request.", - "properties": { - "variantSetId": { - "type": "string", - "description": "Required. The variant set to which variant data should be imported." - }, - "sourceUris": { - "type": "array", - "description": "A list of URIs referencing variant files in Google Cloud Storage. URIs can include wildcards [as described here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). Note that recursive wildcards ('**') are not supported.", - "items": { - "type": "string" - } - }, - "format": { - "type": "string", - "description": "The format of the variant data being imported. If unspecified, defaults to to `VCF`.", - "enum": [ - "FORMAT_UNSPECIFIED", - "FORMAT_VCF", - "FORMAT_COMPLETE_GENOMICS" - ] - }, - "normalizeReferenceNames": { - "type": "boolean", - "description": "Convert reference names to the canonical representation. hg19 haploytypes (those reference names containing \"_hap\") are not modified in any way. All other reference names are modified according to the following rules: The reference name is capitalized. The \"chr\" prefix is dropped for all autosomes and sex chromsomes. For example \"chr17\" becomes \"17\" and \"chrX\" becomes \"X\". All mitochondrial chromosomes (\"chrM\", \"chrMT\", etc) become \"MT\"." - }, - "infoMergeConfig": { - "type": "object", - "description": "A mapping between info field keys and the InfoMergeOperations to be performed on them. This is plumbed down to the MergeVariantRequests generated by the resulting import job.", - "additionalProperties": { + "fields": { "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", "enum": [ - "INFO_MERGE_OPERATION_UNSPECIFIED", - "IGNORE_NEW", - "MOVE_TO_CALLS" - ] - } - } - } - }, - "VariantSet": { - "id": "VariantSet", - "type": "object", - "description": "A variant set is a collection of call sets and variants. It contains summary statistics of those contents. A variant set belongs to a dataset. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "properties": { - "datasetId": { - "type": "string", - "description": "The dataset to which this variant set belongs." + "1", + "2" + ], + "description": "V1 error format." }, - "id": { - "type": "string", - "description": "The server-generated variant set ID, unique across all variant sets." + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" }, - "referenceSetId": { - "type": "string", - "description": "The reference set to which the variant set is mapped. The reference set describes the alignment provenance of the variant set, while the `referenceBounds` describe the shape of the actual variant data. The reference set's reference names are a superset of those found in the `referenceBounds`. For example, given a variant set that is mapped to the GRCh38 reference set and contains a single variant on reference 'X', `referenceBounds` would contain only an entry for 'X', while the associated reference set enumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc." + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" }, - "referenceBounds": { - "type": "array", - "description": "A list of all references used by the variants in a variant set with associated coordinate upper bounds for each one.", - "items": { - "$ref": "ReferenceBound" - } - }, - "metadata": { - "type": "array", - "description": "The metadata associated with this variant set.", - "items": { - "$ref": "VariantSetMetadata" - } - }, - "name": { - "type": "string", - "description": "User-specified, mutable name." - }, - "description": { - "type": "string", - "description": "A textual description of this variant set." - } - } - }, - "ReferenceBound": { - "id": "ReferenceBound", - "type": "object", - "description": "ReferenceBound records an upper bound for the starting coordinate of variants in a particular reference.", - "properties": { - "referenceName": { - "type": "string", - "description": "The name of the reference associated with this reference bound." - }, - "upperBound": { - "type": "string", - "description": "An upper bound (inclusive) on the starting coordinate of any variant in the reference sequence.", - "format": "int64" - } - } - }, - "VariantSetMetadata": { - "id": "VariantSetMetadata", - "type": "object", - "description": "Metadata describes a single piece of variant call metadata. These data include a top level key and either a single value string (value) or a list of key-value pairs (info.) Value and info are mutually exclusive.", - "properties": { "key": { - "type": "string", - "description": "The top-level key." - }, - "value": { - "type": "string", - "description": "The value field for simple metadata" - }, - "id": { - "type": "string", - "description": "User-provided ID field, not enforced by this API. Two or more pieces of structured metadata with identical id and key fields are considered equivalent." - }, - "type": { - "type": "string", - "description": "The type of data. Possible types include: Integer, Float, Flag, Character, and String.", - "enum": [ - "TYPE_UNSPECIFIED", - "INTEGER", - "FLOAT", - "FLAG", - "CHARACTER", - "STRING" - ] - }, - "number": { - "type": "string", - "description": "The number of values that can be included in a field described by this metadata." - }, - "description": { - "type": "string", - "description": "A textual description of this metadata." - }, - "info": { - "type": "object", - "description": "Remaining structured metadata key-value pairs. This must be of the form map (string key mapping to a list of string values).", - "additionalProperties": { - "type": "array", - "items": { - "type": "any" - } - } - } - } - }, - "ExportVariantSetRequest": { - "id": "ExportVariantSetRequest", - "type": "object", - "description": "The variant data export request.", - "properties": { - "callSetIds": { - "type": "array", - "description": "If provided, only variant call information from the specified call sets will be exported. By default all variant calls are exported.", - "items": { + "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" - } }, - "projectId": { - "type": "string", - "description": "Required. The Google Cloud project ID that owns the destination BigQuery dataset. The caller must have WRITE access to this project. This project will also own the resulting export job." - }, - "format": { - "type": "string", - "description": "The format for the exported data.", - "enum": [ - "FORMAT_UNSPECIFIED", - "FORMAT_BIGQUERY" - ] - }, - "bigqueryDataset": { - "type": "string", - "description": "Required. The BigQuery dataset to export data to. This dataset must already exist. Note that this is distinct from the Genomics concept of \"dataset\"." - }, - "bigqueryTable": { - "type": "string", - "description": "Required. The BigQuery table to export data to. If the table doesn't exist, it will be created. If it already exists, it will be overwritten." - } - } - }, - "SearchVariantSetsRequest": { - "id": "SearchVariantSetsRequest", - "type": "object", - "description": "The search variant sets request.", - "properties": { - "datasetIds": { - "type": "array", - "description": "Exactly one dataset ID must be provided here. Only variant sets which belong to this dataset will be returned.", - "items": { - "type": "string" - } - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response." - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 1024.", - "format": "int32" - } - } - }, - "SearchVariantSetsResponse": { - "id": "SearchVariantSetsResponse", - "type": "object", - "description": "The search variant sets response.", - "properties": { - "variantSets": { - "type": "array", - "description": "The variant sets belonging to the requested dataset.", - "items": { - "$ref": "VariantSet" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "SearchVariantsRequest": { - "id": "SearchVariantsRequest", - "type": "object", - "description": "The variant search request.", - "properties": { - "variantSetIds": { - "type": "array", - "description": "At most one variant set ID must be provided. Only variants from this variant set will be returned. If omitted, a call set id must be included in the request.", - "items": { - "type": "string" - } - }, - "variantName": { - "type": "string", - "description": "Only return variants which have exactly this name." - }, - "callSetIds": { - "type": "array", - "description": "Only return variant calls which belong to call sets with these ids. Leaving this blank returns all variant calls. If a variant has no calls belonging to any of these call sets, it won't be returned at all.", - "items": { - "type": "string" - } - }, - "referenceName": { - "type": "string", - "description": "Required. Only return variants in this reference sequence." - }, - "start": { - "type": "string", - "description": "The beginning of the window (0-based, inclusive) for which overlapping variants should be returned. If unspecified, defaults to 0.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end of the window, 0-based exclusive. If unspecified or 0, defaults to the length of the reference.", - "format": "int64" - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response." - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of variants to return in a single page. If unspecified, defaults to 5000. The maximum value is 10000.", - "format": "int32" - }, - "maxCalls": { - "type": "integer", - "description": "The maximum number of calls to return in a single page. Note that this limit may be exceeded in the event that a matching variant contains more calls than the requested maximum. If unspecified, defaults to 5000. The maximum value is 10000.", - "format": "int32" - } - } - }, - "SearchVariantsResponse": { - "id": "SearchVariantsResponse", - "type": "object", - "description": "The variant search response.", - "properties": { - "variants": { - "type": "array", - "description": "The list of matching Variants.", - "items": { - "$ref": "Variant" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "Variant": { - "id": "Variant", - "type": "object", - "description": "A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.", - "properties": { - "variantSetId": { - "type": "string", - "description": "The ID of the variant set this variant belongs to." - }, - "id": { - "type": "string", - "description": "The server-generated variant ID, unique across all variants." - }, - "names": { - "type": "array", - "description": "Names for the variant, for example a RefSNP ID.", - "items": { - "type": "string" - } - }, - "created": { - "type": "string", - "description": "The date this variant was created, in milliseconds from the epoch.", - "format": "int64" - }, - "referenceName": { - "type": "string", - "description": "The reference on which this variant occurs. (such as `chr20` or `X`)" - }, - "start": { - "type": "string", - "description": "The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions.", - "format": "int64" - }, - "referenceBases": { - "type": "string", - "description": "The reference bases for this variant. They start at the given position." - }, - "alternateBases": { - "type": "array", - "description": "The bases that appear instead of the reference bases.", - "items": { - "type": "string" - } - }, - "quality": { - "type": "number", - "description": "A measure of how likely this variant is to be real. A higher value is better.", - "format": "double" - }, - "filter": { - "type": "array", - "description": "A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters.", - "items": { - "type": "string" - } - }, - "info": { - "type": "object", - "description": "A map of additional variant information. This must be of the form map (string key mapping to a list of string values).", - "additionalProperties": { - "type": "array", - "items": { - "type": "any" - } - } - }, - "calls": { - "type": "array", - "description": "The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant.", - "items": { - "$ref": "VariantCall" - } - } - } - }, - "VariantCall": { - "id": "VariantCall", - "type": "object", - "description": "A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345.", - "properties": { - "callSetId": { - "type": "string", - "description": "The ID of the call set this variant call belongs to." - }, - "callSetName": { - "type": "string", - "description": "The name of the call set this variant call belongs to." - }, - "genotype": { - "type": "array", - "description": "The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `[\"A\", \"C\"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned.", - "items": { - "type": "integer", - "format": "int32" - } - }, - "phaseset": { - "type": "string", - "description": "If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`." - }, - "genotypeLikelihood": { - "type": "array", - "description": "The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`.", - "items": { - "type": "number", - "format": "double" - } - }, - "info": { - "type": "object", - "description": "A map of additional variant call information. This must be of the form map (string key mapping to a list of string values).", - "additionalProperties": { - "type": "array", - "items": { - "type": "any" - } - } - } - } - }, - "MergeVariantsRequest": { - "id": "MergeVariantsRequest", - "type": "object", - "properties": { - "variantSetId": { - "type": "string", - "description": "The destination variant set." - }, - "variants": { - "type": "array", - "description": "The variants to be merged with existing variants.", - "items": { - "$ref": "Variant" - } - }, - "infoMergeConfig": { - "type": "object", - "description": "A mapping between info field keys and the InfoMergeOperations to be performed on them.", - "additionalProperties": { + "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", - "enum": [ - "INFO_MERGE_OPERATION_UNSPECIFIED", - "IGNORE_NEW", - "MOVE_TO_CALLS" - ] - } - } - } - }, - "SearchCallSetsRequest": { - "id": "SearchCallSetsRequest", - "type": "object", - "description": "The call set search request.", - "properties": { - "variantSetIds": { - "type": "array", - "description": "Restrict the query to call sets within the given variant sets. At least one ID must be provided.", - "items": { + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", "type": "string" - } }, - "name": { - "type": "string", - "description": "Only return call sets for which a substring of the name matches this string." - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response." - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 1024.", - "format": "int32" + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" } - } }, - "SearchCallSetsResponse": { - "id": "SearchCallSetsResponse", - "type": "object", - "description": "The call set search response.", - "properties": { - "callSets": { - "type": "array", - "description": "The list of matching call sets.", - "items": { - "$ref": "CallSet" - } - }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results." - } - } - }, - "CallSet": { - "id": "CallSet", - "type": "object", - "description": "A call set is a collection of variant calls, typically for one sample. It belongs to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "properties": { - "id": { - "type": "string", - "description": "The server-generated call set ID, unique across all call sets." - }, - "name": { - "type": "string", - "description": "The call set name." - }, - "sampleId": { - "type": "string", - "description": "The sample ID this call set corresponds to." - }, - "variantSetIds": { - "type": "array", - "description": "The IDs of the variant sets this call set belongs to. This field must have exactly length one, as a call set belongs to a single variant set. This field is repeated for compatibility with the [GA4GH 0.5.1 API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76).", - "items": { - "type": "string" - } - }, - "created": { - "type": "string", - "description": "The date this call set was created in milliseconds from the epoch.", - "format": "int64" - }, - "info": { - "type": "object", - "description": "A map of additional call set information. This must be of the form map (string key mapping to a list of string values).", - "additionalProperties": { - "type": "array", - "items": { - "type": "any" - } - } - } - } - }, - "StreamVariantsRequest": { - "id": "StreamVariantsRequest", - "type": "object", - "description": "The stream variants request.", - "properties": { - "projectId": { - "type": "string", - "description": "The Google Cloud project ID which will be billed for this access. The caller must have WRITE access to this project. Required." - }, - "variantSetId": { - "type": "string", - "description": "The variant set ID from which to stream variants." - }, - "callSetIds": { - "type": "array", - "description": "Only return variant calls which belong to call sets with these IDs. Leaving this blank returns all variant calls.", - "items": { - "type": "string" - } - }, - "referenceName": { - "type": "string", - "description": "Required. Only return variants in this reference sequence." - }, - "start": { - "type": "string", - "description": "The beginning of the window (0-based, inclusive) for which overlapping variants should be returned.", - "format": "int64" - }, - "end": { - "type": "string", - "description": "The end of the window (0-based, exclusive) for which overlapping variants should be returned.", - "format": "int64" - } - } - }, - "StreamVariantsResponse": { - "id": "StreamVariantsResponse", - "type": "object", - "properties": { - "variants": { - "type": "array", - "items": { - "$ref": "Variant" - } - } - } - }, - "ImportReadGroupSetsResponse": { - "id": "ImportReadGroupSetsResponse", - "type": "object", - "description": "The read group set import response.", - "properties": { - "readGroupSetIds": { - "type": "array", - "description": "IDs of the read group sets that were created.", - "items": { - "type": "string" - } - } - } - }, - "ImportVariantsResponse": { - "id": "ImportVariantsResponse", - "type": "object", - "description": "The variant data import response.", - "properties": { - "callSetIds": { - "type": "array", - "description": "IDs of the call sets created during the import.", - "items": { - "type": "string" - } - } - } - }, - "OperationMetadata": { - "id": "OperationMetadata", - "type": "object", - "description": "Metadata describing an Operation.", - "properties": { - "projectId": { - "type": "string", - "description": "The Google Cloud Project in which the job is scoped." - }, - "createTime": { - "type": "string", - "description": "The time at which the job was submitted to the Genomics service." - }, - "startTime": { - "type": "string", - "description": "The time at which the job began to run." - }, - "endTime": { - "type": "string", - "description": "The time at which the job stopped running." - }, - "request": { - "type": "object", - "description": "The original request that started the operation. Note that this will be in current version of the API. If the operation was started with v1beta2 API and a GetOperation is performed on v1 API, a v1 request will be returned.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "events": { - "type": "array", - "description": "Optional event messages that were generated during the job's execution. This also contains any warnings that were generated during import or export.", - "items": { - "$ref": "OperationEvent" - } - }, - "clientId": { - "type": "string", - "description": "This field is deprecated. Use `labels` instead. Optionally provided by the caller when submitting the request that creates the operation." - }, - "runtimeMetadata": { - "type": "object", - "description": "Runtime metadata on this Operation.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "labels": { - "type": "object", - "description": "Optionally provided by the caller when submitting the request that creates the operation.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "OperationEvent": { - "id": "OperationEvent", - "type": "object", - "description": "An event that occurred during an Operation.", - "properties": { - "startTime": { - "type": "string", - "description": "Optional time of when event started." - }, - "endTime": { - "type": "string", - "description": "Optional time of when event finished. An event can have a start time and no finish time. If an event has a finish time, there must be a start time." - }, - "description": { - "type": "string", - "description": "Required description of event." - } - } - }, - "RuntimeMetadata": { - "id": "RuntimeMetadata", - "type": "object", - "description": "Runtime metadata that will be populated in the runtimeMetadata field of the Operation associated with a RunPipeline execution.", - "properties": { - "computeEngine": { - "$ref": "ComputeEngine", - "description": "Execution information specific to Google Compute Engine." - } - } - }, - "ComputeEngine": { - "id": "ComputeEngine", - "type": "object", - "description": "Describes a Compute Engine resource that is being managed by a running pipeline.", - "properties": { - "instanceName": { - "type": "string", - "description": "The instance on which the operation is running." - }, - "zone": { - "type": "string", - "description": "The availability zone in which the instance resides." - }, - "machineType": { - "type": "string", - "description": "The machine type of the instance." - }, - "diskNames": { - "type": "array", - "description": "The names of the disks that were created for this pipeline.", - "items": { - "type": "string" - } - } - } - } - }, - "resources": { - "annotationsets": { - "methods": { - "create": { - "id": "genomics.annotationsets.create", - "path": "v1/annotationsets", - "httpMethod": "POST", - "description": "Creates a new annotation set. Caller must have WRITE permission for the associated dataset. The following fields are required: * datasetId * referenceSetId All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field).", - "request": { - "$ref": "AnnotationSet" - }, - "response": { - "$ref": "AnnotationSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "get": { - "id": "genomics.annotationsets.get", - "path": "v1/annotationsets/{annotationSetId}", - "httpMethod": "GET", - "description": "Gets an annotation set. Caller must have READ permission for the associated dataset.", - "parameters": { - "annotationSetId": { - "type": "string", - "description": "The ID of the annotation set to be retrieved.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "annotationSetId" - ], - "response": { - "$ref": "AnnotationSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "update": { - "id": "genomics.annotationsets.update", - "path": "v1/annotationsets/{annotationSetId}", - "httpMethod": "PUT", - "description": "Updates an annotation set. The update must respect all mutability restrictions and other invariants described on the annotation set resource. Caller must have WRITE permission for the associated dataset.", - "parameters": { - "annotationSetId": { - "type": "string", - "description": "The ID of the annotation set to be updated.", - "required": true, - "location": "path" + "schemas": { + "Exon": { + "type": "object", + "properties": { + "start": { + "description": "The start position of the exon on this annotation's reference sequence,\n0-based inclusive. Note that this is relative to the reference start, and\n**not** the containing annotation start.", + "format": "int64", + "type": "string" + }, + "end": { + "description": "The end position of the exon on this annotation's reference sequence,\n0-based exclusive. Note that this is relative to the reference start, and\n*not* the containing annotation start.", + "format": "int64", + "type": "string" + }, + "frame": { + "type": "integer", + "description": "The frame of this exon. Contains a value of 0, 1, or 2, which indicates\nthe offset of the first coding base of the exon within the reading frame\nof the coding DNA sequence, if any. This field is dependent on the\nstrandedness of this annotation (see\nAnnotation.reverse_strand).\nFor forward stranded annotations, this offset is relative to the\nexon.start. For reverse\nstrand annotations, this offset is relative to the\nexon.end `- 1`.\n\nUnset if this exon does not intersect the coding sequence. Upon creation\nof a transcript, the frame must be populated for all or none of the\ncoding exons.", + "format": "int32" + } }, - "updateMask": { - "type": "string", - "description": "An optional mask specifying which fields to update. Mutable fields are name, source_uri, and info. If unspecified, all mutable fields will be updated.", - "location": "query" + "id": "Exon" + }, + "ExportReadGroupSetRequest": { + "id": "ExportReadGroupSetRequest", + "description": "The read group set export request.", + "type": "object", + "properties": { + "exportUri": { + "description": "Required. A Google Cloud Storage URI for the exported BAM file.\nThe currently authenticated user must have write access to the new file.\nAn error will be returned if the URI already contains data.", + "type": "string" + }, + "referenceNames": { + "description": "The reference names to export. If this is not specified, all reference\nsequences, including unmapped reads, are exported.\nUse `*` to export only unmapped reads.", + "type": "array", + "items": { + "type": "string" + } + }, + "projectId": { + "description": "Required. The Google Cloud project ID that owns this\nexport. The caller must have WRITE access to this project.", + "type": "string" + } } - }, - "parameterOrder": [ - "annotationSetId" - ], - "request": { - "$ref": "AnnotationSet" - }, - "response": { - "$ref": "AnnotationSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] }, - "delete": { - "id": "genomics.annotationsets.delete", - "path": "v1/annotationsets/{annotationSetId}", - "httpMethod": "DELETE", - "description": "Deletes an annotation set. Caller must have WRITE permission for the associated annotation set.", - "parameters": { - "annotationSetId": { - "type": "string", - "description": "The ID of the annotation set to be deleted.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "annotationSetId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "search": { - "id": "genomics.annotationsets.search", - "path": "v1/annotationsets/search", - "httpMethod": "POST", - "description": "Searches for annotation sets that match the given criteria. Annotation sets are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotation sets in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried datasets.", - "request": { - "$ref": "SearchAnnotationSetsRequest" - }, - "response": { - "$ref": "SearchAnnotationSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - } - } - }, - "annotations": { - "methods": { - "create": { - "id": "genomics.annotations.create", - "path": "v1/annotations", - "httpMethod": "POST", - "description": "Creates a new annotation. Caller must have WRITE permission for the associated annotation set. The following fields are required: * annotationSetId * referenceName or referenceId ### Transcripts For annotations of type TRANSCRIPT, the following fields of transcript must be provided: * exons.start * exons.end All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). The annotated range must be no longer than 100Mbp (mega base pairs). See the Annotation resource for additional restrictions on each field.", - "request": { - "$ref": "Annotation" - }, - "response": { - "$ref": "Annotation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "batchCreate": { - "id": "genomics.annotations.batchCreate", - "path": "v1/annotations:batchCreate", - "httpMethod": "POST", - "description": "Creates one or more new annotations atomically. All annotations must belong to the same annotation set. Caller must have WRITE permission for this annotation set. For optimal performance, batch positionally adjacent annotations together. If the request has a systemic issue, such as an attempt to write to an inaccessible annotation set, the entire RPC will fail accordingly. For lesser data issues, when possible an error will be isolated to the corresponding batch entry in the response; the remaining well formed annotations will be created normally. For details on the requirements for each individual annotation resource, see CreateAnnotation.", - "request": { - "$ref": "BatchCreateAnnotationsRequest" - }, - "response": { - "$ref": "BatchCreateAnnotationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "get": { - "id": "genomics.annotations.get", - "path": "v1/annotations/{annotationId}", - "httpMethod": "GET", - "description": "Gets an annotation. Caller must have READ permission for the associated annotation set.", - "parameters": { - "annotationId": { - "type": "string", - "description": "The ID of the annotation to be retrieved.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "annotationId" - ], - "response": { - "$ref": "Annotation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "update": { - "id": "genomics.annotations.update", - "path": "v1/annotations/{annotationId}", - "httpMethod": "PUT", - "description": "Updates an annotation. Caller must have WRITE permission for the associated dataset.", - "parameters": { - "annotationId": { - "type": "string", - "description": "The ID of the annotation to be updated.", - "required": true, - "location": "path" + "CallSet": { + "description": "A call set is a collection of variant calls, typically for one sample. It\nbelongs to a variant set.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "type": "object", + "properties": { + "info": { + "description": "A map of additional call set information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "any" + } + } + }, + "variantSetIds": { + "description": "The IDs of the variant sets this call set belongs to. This field must\nhave exactly length one, as a call set belongs to a single variant set.\nThis field is repeated for compatibility with the\n[GA4GH 0.5.1\nAPI](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76).", + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "description": "The server-generated call set ID, unique across all call sets.", + "type": "string" + }, + "created": { + "description": "The date this call set was created in milliseconds from the epoch.", + "format": "int64", + "type": "string" + }, + "sampleId": { + "description": "The sample ID this call set corresponds to.", + "type": "string" + }, + "name": { + "description": "The call set name.", + "type": "string" + } }, - "updateMask": { - "type": "string", - "description": "An optional mask specifying which fields to update. Mutable fields are name, variant, transcript, and info. If unspecified, all mutable fields will be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "annotationId" - ], - "request": { - "$ref": "Annotation" - }, - "response": { - "$ref": "Annotation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "id": "CallSet" }, - "delete": { - "id": "genomics.annotations.delete", - "path": "v1/annotations/{annotationId}", - "httpMethod": "DELETE", - "description": "Deletes an annotation. Caller must have WRITE permission for the associated annotation set.", - "parameters": { - "annotationId": { - "type": "string", - "description": "The ID of the annotation to be deleted.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "annotationId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "search": { - "id": "genomics.annotations.search", - "path": "v1/annotations/search", - "httpMethod": "POST", - "description": "Searches for annotations that match the given criteria. Results are ordered by genomic coordinate (by reference sequence, then position). Annotations with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotations in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried annotation sets.", - "request": { - "$ref": "SearchAnnotationsRequest" - }, - "response": { - "$ref": "SearchAnnotationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - } - } - }, - "datasets": { - "methods": { - "list": { - "id": "genomics.datasets.list", - "path": "v1/datasets", - "httpMethod": "GET", - "description": "Lists datasets within a project. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "projectId": { - "type": "string", - "description": "Required. The Google Cloud project ID to list datasets for.", - "location": "query" + "SearchAnnotationSetsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results." + }, + "annotationSets": { + "description": "The matching annotation sets.", + "type": "array", + "items": { + "$ref": "AnnotationSet" + } + } }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 50. The maximum value is 1024.", - "format": "int32", - "location": "query" + "id": "SearchAnnotationSetsResponse" + }, + "ImportVariantsRequest": { + "description": "The variant data import request.", + "type": "object", + "properties": { + "infoMergeConfig": { + "additionalProperties": { + "enum": [ + "INFO_MERGE_OPERATION_UNSPECIFIED", + "IGNORE_NEW", + "MOVE_TO_CALLS" + ], + "type": "string" + }, + "description": "A mapping between info field keys and the InfoMergeOperations to\nbe performed on them. This is plumbed down to the MergeVariantRequests\ngenerated by the resulting import job.", + "type": "object" + }, + "variantSetId": { + "description": "Required. The variant set to which variant data should be imported.", + "type": "string" + }, + "sourceUris": { + "description": "A list of URIs referencing variant files in Google Cloud Storage. URIs can\ninclude wildcards [as described\nhere](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames).\nNote that recursive wildcards ('**') are not supported.", + "type": "array", + "items": { + "type": "string" + } + }, + "normalizeReferenceNames": { + "description": "Convert reference names to the canonical representation.\nhg19 haploytypes (those reference names containing \"_hap\")\nare not modified in any way.\nAll other reference names are modified according to the following rules:\nThe reference name is capitalized.\nThe \"chr\" prefix is dropped for all autosomes and sex chromsomes.\nFor example \"chr17\" becomes \"17\" and \"chrX\" becomes \"X\".\nAll mitochondrial chromosomes (\"chrM\", \"chrMT\", etc) become \"MT\".", + "type": "boolean" + }, + "format": { + "type": "string", + "enumDescriptions": [ + "", + "VCF (Variant Call Format). The VCF files may be gzip compressed. gVCF is\nalso supported. Disclaimer: gzip VCF imports are currently much slower\nthan equivalent uncompressed VCF imports. For this reason, uncompressed\nVCF is currently recommended for imports with more than 1GB combined\nuncompressed size, or for time sensitive imports.", + "Complete Genomics masterVarBeta format. The masterVarBeta files may\nbe bzip2 compressed." + ], + "enum": [ + "FORMAT_UNSPECIFIED", + "FORMAT_VCF", + "FORMAT_COMPLETE_GENOMICS" + ], + "description": "The format of the variant data being imported. If unspecified, defaults to\nto `VCF`." + } }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response.", - "location": "query" - } - }, - "response": { - "$ref": "ListDatasetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] + "id": "ImportVariantsRequest" }, - "create": { - "id": "genomics.datasets.create", - "path": "v1/datasets", - "httpMethod": "POST", - "description": "Creates a new dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "request": { - "$ref": "Dataset" - }, - "response": { - "$ref": "Dataset" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "get": { - "id": "genomics.datasets.get", - "path": "v1/datasets/{datasetId}", - "httpMethod": "GET", - "description": "Gets a dataset by ID. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "datasetId": { - "type": "string", - "description": "The ID of the dataset.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "response": { - "$ref": "Dataset" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "patch": { - "id": "genomics.datasets.patch", - "path": "v1/datasets/{datasetId}", - "httpMethod": "PATCH", - "description": "Updates a dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics.", - "parameters": { - "datasetId": { - "type": "string", - "description": "The ID of the dataset to be updated.", - "required": true, - "location": "path" + "VariantAnnotation": { + "type": "object", + "properties": { + "alternateBases": { + "description": "The alternate allele for this variant. If multiple alternate alleles\nexist at this location, create a separate variant for each one, as they\nmay represent distinct conditions.", + "type": "string" + }, + "geneId": { + "description": "Google annotation ID of the gene affected by this variant. This should\nbe provided when the variant is created.", + "type": "string" + }, + "clinicalSignificance": { + "enum": [ + "CLINICAL_SIGNIFICANCE_UNSPECIFIED", + "CLINICAL_SIGNIFICANCE_OTHER", + "UNCERTAIN", + "BENIGN", + "LIKELY_BENIGN", + "LIKELY_PATHOGENIC", + "PATHOGENIC", + "DRUG_RESPONSE", + "HISTOCOMPATIBILITY", + "CONFERS_SENSITIVITY", + "RISK_FACTOR", + "ASSOCIATION", + "PROTECTIVE", + "MULTIPLE_REPORTED" + ], + "description": "Describes the clinical significance of a variant.\nIt is adapted from the ClinVar controlled vocabulary for clinical\nsignificance described at:\nhttp://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/", + "type": "string", + "enumDescriptions": [ + "", + "`OTHER` should be used when no other clinical significance\nvalue will suffice.", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "`MULTIPLE_REPORTED` should be used when multiple clinical\nsignficances are reported for a variant. The original clinical\nsignificance values may be provided in the `info` field." + ] + }, + "conditions": { + "type": "array", + "items": { + "$ref": "ClinicalCondition" + }, + "description": "The set of conditions associated with this variant.\nA condition describes the way a variant influences human health." + }, + "effect": { + "description": "Effect of the variant on the coding sequence.", + "type": "string", + "enumDescriptions": [ + "", + "`EFFECT_OTHER` should be used when no other Effect\nwill suffice.", + "`FRAMESHIFT` indicates a mutation in which the insertion or\ndeletion of nucleotides resulted in a frameshift change.", + "`FRAME_PRESERVING_INDEL` indicates a mutation in which a\nmultiple of three nucleotides has been inserted or deleted, resulting\nin no change to the reading frame of the coding sequence.", + "`SYNONYMOUS_SNP` indicates a single nucleotide polymorphism\nmutation that results in no amino acid change.", + "`NONSYNONYMOUS_SNP` indicates a single nucleotide\npolymorphism mutation that results in an amino acid change.", + "`STOP_GAIN` indicates a mutation that leads to the creation\nof a stop codon at the variant site. Frameshift mutations creating\ndownstream stop codons do not count as `STOP_GAIN`.", + "`STOP_LOSS` indicates a mutation that eliminates a\nstop codon at the variant site.", + "`SPLICE_SITE_DISRUPTION` indicates that this variant is\nfound in a splice site for the associated transcript, and alters the\nnormal splicing pattern." + ], + "enum": [ + "EFFECT_UNSPECIFIED", + "EFFECT_OTHER", + "FRAMESHIFT", + "FRAME_PRESERVING_INDEL", + "SYNONYMOUS_SNP", + "NONSYNONYMOUS_SNP", + "STOP_GAIN", + "STOP_LOSS", + "SPLICE_SITE_DISRUPTION" + ] + }, + "transcriptIds": { + "description": "Google annotation IDs of the transcripts affected by this variant. These\nshould be provided when the variant is created.", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "enum": [ + "TYPE_UNSPECIFIED", + "TYPE_OTHER", + "INSERTION", + "DELETION", + "SUBSTITUTION", + "SNP", + "STRUCTURAL", + "CNV" + ], + "description": "Type has been adapted from ClinVar's list of variant types.", + "type": "string", + "enumDescriptions": [ + "", + "`TYPE_OTHER` should be used when no other Type will suffice.\nFurther explanation of the variant type may be included in the\ninfo field.", + "`INSERTION` indicates an insertion.", + "`DELETION` indicates a deletion.", + "`SUBSTITUTION` indicates a block substitution of\ntwo or more nucleotides.", + "`SNP` indicates a single nucleotide polymorphism.", + "`STRUCTURAL` indicates a large structural variant,\nincluding chromosomal fusions, inversions, etc.", + "`CNV` indicates a variation in copy number." + ] + } }, - "updateMask": { - "type": "string", - "description": "An optional mask specifying which fields to update. At this time, the only mutable field is name. The only acceptable value is \"name\". If unspecified, all mutable fields will be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "Dataset" - }, - "response": { - "$ref": "Dataset" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "id": "VariantAnnotation" }, - "delete": { - "id": "genomics.datasets.delete", - "path": "v1/datasets/{datasetId}", - "httpMethod": "DELETE", - "description": "Deletes a dataset and all of its contents (all read group sets, reference sets, variant sets, call sets, annotation sets, etc.) This is reversible (up to one week after the deletion) via the datasets.undelete operation. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "datasetId": { - "type": "string", - "description": "The ID of the dataset to be deleted.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "undelete": { - "id": "genomics.datasets.undelete", - "path": "v1/datasets/{datasetId}:undelete", - "httpMethod": "POST", - "description": "Undeletes a dataset by restoring a dataset which was deleted via this API. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This operation is only possible for a week after the deletion occurred.", - "parameters": { - "datasetId": { - "type": "string", - "description": "The ID of the dataset to be undeleted.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "datasetId" - ], - "request": { - "$ref": "UndeleteDatasetRequest" - }, - "response": { - "$ref": "Dataset" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "setIamPolicy": { - "id": "genomics.datasets.setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified dataset. Replaces any existing policy. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) See Setting a Policy for more information.", - "parameters": { - "resource": { - "type": "string", - "description": "REQUIRED: The resource for which policy is being specified. Format is `datasets/`.", - "required": true, - "pattern": "^datasets/[^/]+$", - "location": "path" - } - }, - "parameterOrder": [ - "resource" - ], - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "getIamPolicy": { - "id": "genomics.datasets.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "httpMethod": "POST", - "description": "Gets the access control policy for the dataset. This is empty if the policy or resource does not exist. See Getting a Policy for more information. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "resource": { - "type": "string", - "description": "REQUIRED: The resource for which policy is being specified. Format is `datasets/`.", - "required": true, - "pattern": "^datasets/[^/]+$", - "location": "path" - } - }, - "parameterOrder": [ - "resource" - ], - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "testIamPermissions": { - "id": "genomics.datasets.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource. See Testing Permissions for more information. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "resource": { - "type": "string", - "description": "REQUIRED: The resource for which policy is being specified. Format is `datasets/`.", - "required": true, - "pattern": "^datasets/[^/]+$", - "location": "path" - } - }, - "parameterOrder": [ - "resource" - ], - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - } - } - }, - "operations": { - "methods": { - "list": { - "id": "genomics.operations.list", - "path": "v1/{+name}", - "httpMethod": "GET", - "description": "Lists operations that match the specified filter in the request.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation collection.", - "required": true, - "pattern": "^operations$", - "location": "path" + "ListCoverageBucketsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" + }, + "bucketWidth": { + "type": "string", + "description": "The length of each coverage bucket in base pairs. Note that buckets at the\nend of a reference sequence may be shorter. This value is omitted if the\nbucket width is infinity (the default behaviour, with no range or\n`targetBucketWidth`).", + "format": "int64" + }, + "coverageBuckets": { + "description": "The coverage buckets. The list of buckets is sparse; a bucket with 0\noverlapping reads is not returned. A bucket never crosses more than one\nreference sequence. Each bucket has width `bucketWidth`, unless\nits end is the end of the reference sequence.", + "type": "array", + "items": { + "$ref": "CoverageBucket" + } + } }, - "filter": { - "type": "string", - "description": "A string for filtering Operations. The following filter fields are supported: * projectId: Required. Corresponds to OperationMetadata.projectId. * createTime: The time this job was created, in seconds from the [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `\u003e=` and/or `= 1432140000` * `projectId = my-project AND createTime \u003e= 1432140000 AND createTime \u003c= 1432150000 AND status = RUNNING` * `projectId = my-project AND labels.color = *` * `projectId = my-project AND labels.color = red`", - "location": "query" + "id": "ListCoverageBucketsResponse" + }, + "ExportVariantSetRequest": { + "description": "The variant data export request.", + "type": "object", + "properties": { + "format": { + "enum": [ + "FORMAT_UNSPECIFIED", + "FORMAT_BIGQUERY" + ], + "description": "The format for the exported data.", + "type": "string", + "enumDescriptions": [ + "", + "Export the data to Google BigQuery." + ] + }, + "bigqueryDataset": { + "description": "Required. The BigQuery dataset to export data to. This dataset must already\nexist. Note that this is distinct from the Genomics concept of \"dataset\".", + "type": "string" + }, + "bigqueryTable": { + "description": "Required. The BigQuery table to export data to.\nIf the table doesn't exist, it will be created. If it already exists, it\nwill be overwritten.", + "type": "string" + }, + "callSetIds": { + "description": "If provided, only variant call information from the specified call sets\nwill be exported. By default all variant calls are exported.", + "type": "array", + "items": { + "type": "string" + } + }, + "projectId": { + "description": "Required. The Google Cloud project ID that owns the destination\nBigQuery dataset. The caller must have WRITE access to this project. This\nproject will also own the resulting export job.", + "type": "string" + } }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return. If unspecified, defaults to 256. The maximum value is 2048.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "id": "ExportVariantSetRequest" }, - "get": { - "id": "genomics.operations.get", - "path": "v1/{+name}", - "httpMethod": "GET", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "cancel": { - "id": "genomics.operations.cancel", - "path": "v1/{+name}:cancel", - "httpMethod": "POST", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be cancelled.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - } - } - }, - "readgroupsets": { - "methods": { - "import": { - "id": "genomics.readgroupsets.import", - "path": "v1/readgroupsets:import", - "httpMethod": "POST", - "description": "Creates read group sets by asynchronously importing the provided information. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The caller must have WRITE permissions to the dataset. ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import - Tags will be converted to strings - tag types are not preserved - Comments (`@CO`) in the input file header will not be preserved - Original header order of references (`@SQ`) will not be preserved - Any reverse stranded unmapped reads will be reverse complemented, and their qualities (also the \"BQ\" and \"OQ\" tags, if any) will be reversed - Unmapped reads will be stripped of positional information (reference name and position)", - "request": { - "$ref": "ImportReadGroupSetsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.read_write", - "https://www.googleapis.com/auth/genomics" - ] - }, - "export": { - "id": "genomics.readgroupsets.export", - "path": "v1/readgroupsets/{readGroupSetId}:export", - "httpMethod": "POST", - "description": "Exports a read group set to a BAM file in Google Cloud Storage. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Note that currently there may be some differences between exported BAM files and the original BAM file at the time of import. See ImportReadGroupSets for caveats.", - "parameters": { - "readGroupSetId": { - "type": "string", - "description": "Required. The ID of the read group set to export. The caller must have READ access to this read group set.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "readGroupSetId" - ], - "request": { - "$ref": "ExportReadGroupSetRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.read_write", - "https://www.googleapis.com/auth/genomics" - ] - }, - "search": { - "id": "genomics.readgroupsets.search", - "path": "v1/readgroupsets/search", - "httpMethod": "POST", - "description": "Searches for read group sets matching the criteria. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135).", - "request": { - "$ref": "SearchReadGroupSetsRequest" - }, - "response": { - "$ref": "SearchReadGroupSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "patch": { - "id": "genomics.readgroupsets.patch", - "path": "v1/readgroupsets/{readGroupSetId}", - "httpMethod": "PATCH", - "description": "Updates a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics.", - "parameters": { - "readGroupSetId": { - "type": "string", - "description": "The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set.", - "required": true, - "location": "path" - }, - "updateMask": { - "type": "string", - "description": "An optional mask specifying which fields to update. Supported fields: * name. * referenceSetId. Leaving `updateMask` unset is equivalent to specifying all mutable fields.", - "location": "query" - } - }, - "parameterOrder": [ - "readGroupSetId" - ], - "request": { - "$ref": "ReadGroupSet" - }, - "response": { - "$ref": "ReadGroupSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "delete": { - "id": "genomics.readgroupsets.delete", - "path": "v1/readgroupsets/{readGroupSetId}", - "httpMethod": "DELETE", - "description": "Deletes a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "readGroupSetId": { - "type": "string", - "description": "The ID of the read group set to be deleted. The caller must have WRITE permissions to the dataset associated with this read group set.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "readGroupSetId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "get": { - "id": "genomics.readgroupsets.get", - "path": "v1/readgroupsets/{readGroupSetId}", - "httpMethod": "GET", - "description": "Gets a read group set by ID. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "readGroupSetId": { - "type": "string", - "description": "The ID of the read group set.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "readGroupSetId" - ], - "response": { - "$ref": "ReadGroupSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - } - }, - "resources": { - "coveragebuckets": { - "methods": { - "list": { - "id": "genomics.readgroupsets.coveragebuckets.list", - "path": "v1/readgroupsets/{readGroupSetId}/coveragebuckets", - "httpMethod": "GET", - "description": "Lists fixed width coverage buckets for a read group set, each of which correspond to a range of a reference sequence. Each bucket summarizes coverage information across its corresponding genomic range. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Coverage is defined as the number of reads which are aligned to a given base in the reference sequence. Coverage buckets are available at several precomputed bucket widths, enabling retrieval of various coverage 'zoom levels'. The caller must have READ permissions for the target read group set.", - "parameters": { - "readGroupSetId": { - "type": "string", - "description": "Required. The ID of the read group set over which coverage is requested.", - "required": true, - "location": "path" + "SearchAnnotationsRequest": { + "type": "object", + "properties": { + "start": { + "description": "The start position of the range on the reference, 0-based inclusive. If\nspecified,\nreferenceId or\nreferenceName\nmust be specified. Defaults to 0.", + "format": "int64", + "type": "string" + }, + "annotationSetIds": { + "description": "Required. The annotation sets to search within. The caller must have\n`READ` access to these annotation sets.\nAll queried annotation sets must have the same type.", + "type": "array", + "items": { + "type": "string" + } }, "referenceName": { - "type": "string", - "description": "The name of the reference to query, within the reference set associated with this query. Optional.", - "location": "query" + "description": "The name of the reference to query, within the reference set associated\nwith this query.", + "type": "string" }, - "start": { - "type": "string", - "description": "The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified. Defaults to 0.", - "format": "int64", - "location": "query" - }, - "end": { - "type": "string", - "description": "The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified. If unset or 0, defaults to the length of the reference.", - "format": "int64", - "location": "query" - }, - "targetBucketWidth": { - "type": "string", - "description": "The desired width of each reported coverage bucket in base pairs. This will be rounded down to the nearest precomputed bucket width; the value of which is returned as `bucketWidth` in the response. Defaults to infinity (each bucket spans an entire reference sequence) or the length of the target range, if specified. The smallest precomputed `bucketWidth` is currently 2048 base pairs; this is subject to change.", - "format": "int64", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 2048.", - "format": "int32", - "location": "query" - } - }, - "parameterOrder": [ - "readGroupSetId" - ], - "response": { - "$ref": "ListCoverageBucketsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - } - } - } - } - }, - "reads": { - "methods": { - "search": { - "id": "genomics.reads.search", - "path": "v1/reads/search", - "httpMethod": "POST", - "description": "Gets a list of reads for one or more read group sets. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Reads search operates over a genomic coordinate space of reference sequence & position defined over the reference sequences to which the requested read group sets are aligned. If a target positional range is specified, search returns all reads whose alignment to the reference genome overlap the range. A query which specifies only read group set IDs yields all reads in those read group sets, including unmapped reads. All reads returned (including reads on subsequent pages) are ordered by genomic coordinate (by reference sequence, then position). Reads with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield reads in the same order across their respective streams of paginated responses. Implements [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85).", - "request": { - "$ref": "SearchReadsRequest" - }, - "response": { - "$ref": "SearchReadsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "stream": { - "id": "genomics.reads.stream", - "path": "v1/reads:stream", - "httpMethod": "POST", - "description": "Returns a stream of all the reads matching the search request, ordered by reference name, position, and ID.", - "request": { - "$ref": "StreamReadsRequest" - }, - "response": { - "$ref": "StreamReadsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - } - } - }, - "referencesets": { - "methods": { - "search": { - "id": "genomics.referencesets.search", - "path": "v1/referencesets/search", - "httpMethod": "POST", - "description": "Searches for reference sets which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)", - "request": { - "$ref": "SearchReferenceSetsRequest" - }, - "response": { - "$ref": "SearchReferenceSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "get": { - "id": "genomics.referencesets.get", - "path": "v1/referencesets/{referenceSetId}", - "httpMethod": "GET", - "description": "Gets a reference set. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83).", - "parameters": { - "referenceSetId": { - "type": "string", - "description": "The ID of the reference set.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "referenceSetId" - ], - "response": { - "$ref": "ReferenceSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - } - } - }, - "references": { - "methods": { - "search": { - "id": "genomics.references.search", - "path": "v1/references/search", - "httpMethod": "POST", - "description": "Searches for references which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146).", - "request": { - "$ref": "SearchReferencesRequest" - }, - "response": { - "$ref": "SearchReferencesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "get": { - "id": "genomics.references.get", - "path": "v1/references/{referenceId}", - "httpMethod": "GET", - "description": "Gets a reference. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158).", - "parameters": { - "referenceId": { - "type": "string", - "description": "The ID of the reference.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "referenceId" - ], - "response": { - "$ref": "Reference" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - } - }, - "resources": { - "bases": { - "methods": { - "list": { - "id": "genomics.references.bases.list", - "path": "v1/references/{referenceId}/bases", - "httpMethod": "GET", - "description": "Lists the bases in a reference, optionally restricted to a range. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221).", - "parameters": { "referenceId": { - "type": "string", - "description": "The ID of the reference.", - "required": true, - "location": "path" - }, - "start": { - "type": "string", - "description": "The start position (0-based) of this query. Defaults to 0.", - "format": "int64", - "location": "query" + "description": "The ID of the reference to query.", + "type": "string" }, "end": { - "type": "string", - "description": "The end position (0-based, exclusive) of this query. Defaults to the length of this reference.", - "format": "int64", - "location": "query" + "description": "The end position of the range on the reference, 0-based exclusive. If\nreferenceId or\nreferenceName\nmust be specified, Defaults to the length of the reference.", + "format": "int64", + "type": "string" }, "pageToken": { - "type": "string", - "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response.", - "location": "query" + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" }, "pageSize": { - "type": "integer", - "description": "The maximum number of bases to return in a single page. If unspecified, defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base pairs).", - "format": "int32", - "location": "query" + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 256. The maximum value is 2048.", + "format": "int32", + "type": "integer" } - }, - "parameterOrder": [ - "referenceId" - ], - "response": { - "$ref": "ListBasesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - } - } - } - } - }, - "variants": { - "methods": { - "import": { - "id": "genomics.variants.import", - "path": "v1/variants:import", - "httpMethod": "POST", - "description": "Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and Variant info fields are merged as specified in infoMergeConfig. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set.", - "request": { - "$ref": "ImportVariantsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.read_write", - "https://www.googleapis.com/auth/genomics" - ] - }, - "search": { - "id": "genomics.variants.search", - "path": "v1/variants/search", - "httpMethod": "POST", - "description": "Gets a list of variants matching the criteria. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).", - "request": { - "$ref": "SearchVariantsRequest" - }, - "response": { - "$ref": "SearchVariantsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "create": { - "id": "genomics.variants.create", - "path": "v1/variants", - "httpMethod": "POST", - "description": "Creates a new variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "request": { - "$ref": "Variant" - }, - "response": { - "$ref": "Variant" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "patch": { - "id": "genomics.variants.patch", - "path": "v1/variants/{variantId}", - "httpMethod": "PATCH", - "description": "Updates a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. Returns the modified variant without its calls.", - "parameters": { - "variantId": { - "type": "string", - "description": "The ID of the variant to be updated.", - "required": true, - "location": "path" }, - "updateMask": { - "type": "string", - "description": "An optional mask specifying which fields to update. At this time, mutable fields are names and info. Acceptable values are \"names\" and \"info\". If unspecified, all mutable fields will be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "variantId" - ], - "request": { - "$ref": "Variant" - }, - "response": { - "$ref": "Variant" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "id": "SearchAnnotationsRequest" }, - "delete": { - "id": "genomics.variants.delete", - "path": "v1/variants/{variantId}", - "httpMethod": "DELETE", - "description": "Deletes a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "variantId": { - "type": "string", - "description": "The ID of the variant to be deleted.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "variantId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "get": { - "id": "genomics.variants.get", - "path": "v1/variants/{variantId}", - "httpMethod": "GET", - "description": "Gets a variant by ID. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "variantId": { - "type": "string", - "description": "The ID of the variant.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "variantId" - ], - "response": { - "$ref": "Variant" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "merge": { - "id": "genomics.variants.merge", - "path": "v1/variants:merge", - "httpMethod": "POST", - "description": "Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant. Variant info fields are merged as specified in the infoMergeConfig field of the MergeVariantsRequest. Please exercise caution when using this method! It is easy to introduce mistakes in existing variants and difficult to back out of them. For example, suppose you were trying to merge a new variant with an existing one and both variants contain calls that belong to callsets with the same callset ID. // Existing variant - irrelevant fields trimmed for clarity { \"variantSetId\": \"10473108253681171589\", \"referenceName\": \"1\", \"start\": \"10582\", \"referenceBases\": \"G\", \"alternateBases\": [ \"A\" ], \"calls\": [ { \"callSetId\": \"10473108253681171589-0\", \"callSetName\": \"CALLSET0\", \"genotype\": [ 0, 1 ], } ] } // New variant with conflicting call information { \"variantSetId\": \"10473108253681171589\", \"referenceName\": \"1\", \"start\": \"10582\", \"referenceBases\": \"G\", \"alternateBases\": [ \"A\" ], \"calls\": [ { \"callSetId\": \"10473108253681171589-0\", \"callSetName\": \"CALLSET0\", \"genotype\": [ 1, 1 ], } ] } The resulting merged variant would overwrite the existing calls with those from the new variant: { \"variantSetId\": \"10473108253681171589\", \"referenceName\": \"1\", \"start\": \"10582\", \"referenceBases\": \"G\", \"alternateBases\": [ \"A\" ], \"calls\": [ { \"callSetId\": \"10473108253681171589-0\", \"callSetName\": \"CALLSET0\", \"genotype\": [ 1, 1 ], } ] } This may be the desired outcome, but it is up to the user to determine if if that is indeed the case.", - "request": { - "$ref": "MergeVariantsRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "stream": { - "id": "genomics.variants.stream", - "path": "v1/variants:stream", - "httpMethod": "POST", - "description": "Returns a stream of all the variants matching the search request, ordered by reference name, position, and ID.", - "request": { - "$ref": "StreamVariantsRequest" - }, - "response": { - "$ref": "StreamVariantsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - } - } - }, - "variantsets": { - "methods": { - "create": { - "id": "genomics.variantsets.create", - "path": "v1/variantsets", - "httpMethod": "POST", - "description": "Creates a new variant set. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The provided variant set must have a valid `datasetId` set - all other fields are optional. Note that the `id` field will be ignored, as this is assigned by the server.", - "request": { - "$ref": "VariantSet" - }, - "response": { - "$ref": "VariantSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "export": { - "id": "genomics.variantsets.export", - "path": "v1/variantsets/{variantSetId}:export", - "httpMethod": "POST", - "description": "Exports variant set data to an external destination. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "variantSetId": { - "type": "string", - "description": "Required. The ID of the variant set that contains variant data which should be exported. The caller must have READ access to this variant set.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "variantSetId" - ], - "request": { - "$ref": "ExportVariantSetRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "get": { - "id": "genomics.variantsets.get", - "path": "v1/variantsets/{variantSetId}", - "httpMethod": "GET", - "description": "Gets a variant set by ID. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "variantSetId": { - "type": "string", - "description": "Required. The ID of the variant set.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "variantSetId" - ], - "response": { - "$ref": "VariantSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "search": { - "id": "genomics.variantsets.search", - "path": "v1/variantsets/search", - "httpMethod": "POST", - "description": "Returns a list of all variant sets matching search criteria. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).", - "request": { - "$ref": "SearchVariantSetsRequest" - }, - "response": { - "$ref": "SearchVariantSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] - }, - "delete": { - "id": "genomics.variantsets.delete", - "path": "v1/variantsets/{variantSetId}", - "httpMethod": "DELETE", - "description": "Deletes a variant set including all variants, call sets, and calls within. This is not reversible. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "variantSetId": { - "type": "string", - "description": "The ID of the variant set to be deleted.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "variantSetId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "patch": { - "id": "genomics.variantsets.patch", - "path": "v1/variantsets/{variantSetId}", - "httpMethod": "PATCH", - "description": "Updates a variant set using patch semantics. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "variantSetId": { - "type": "string", - "description": "The ID of the variant to be updated (must already exist).", - "required": true, - "location": "path" + "OperationEvent": { + "description": "An event that occurred during an Operation.", + "type": "object", + "properties": { + "endTime": { + "description": "Optional time of when event finished. An event can have a start time and no\nfinish time. If an event has a finish time, there must be a start time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "type": "string", + "description": "Optional time of when event started.", + "format": "google-datetime" + }, + "description": { + "type": "string", + "description": "Required description of event." + } }, - "updateMask": { - "type": "string", - "description": "An optional mask specifying which fields to update. Supported fields: * metadata. * name. * description. Leaving `updateMask` unset is equivalent to specifying all mutable fields.", - "location": "query" - } - }, - "parameterOrder": [ - "variantSetId" - ], - "request": { - "$ref": "VariantSet" - }, - "response": { - "$ref": "VariantSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - } - } - }, - "callsets": { - "methods": { - "search": { - "id": "genomics.callsets.search", - "path": "v1/callsets/search", - "httpMethod": "POST", - "description": "Gets a list of call sets matching the criteria. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178).", - "request": { - "$ref": "SearchCallSetsRequest" - }, - "response": { - "$ref": "SearchCallSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] + "id": "OperationEvent" }, - "create": { - "id": "genomics.callsets.create", - "path": "v1/callsets", - "httpMethod": "POST", - "description": "Creates a new call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "request": { - "$ref": "CallSet" - }, - "response": { - "$ref": "CallSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "patch": { - "id": "genomics.callsets.patch", - "path": "v1/callsets/{callSetId}", - "httpMethod": "PATCH", - "description": "Updates a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics.", - "parameters": { - "callSetId": { - "type": "string", - "description": "The ID of the call set to be updated.", - "required": true, - "location": "path" + "CodingSequence": { + "type": "object", + "properties": { + "start": { + "description": "The start of the coding sequence on this annotation's reference sequence,\n0-based inclusive. Note that this position is relative to the reference\nstart, and *not* the containing annotation start.", + "format": "int64", + "type": "string" + }, + "end": { + "description": "The end of the coding sequence on this annotation's reference sequence,\n0-based exclusive. Note that this position is relative to the reference\nstart, and *not* the containing annotation start.", + "format": "int64", + "type": "string" + } }, - "updateMask": { - "type": "string", - "description": "An optional mask specifying which fields to update. At this time, the only mutable field is name. The only acceptable value is \"name\". If unspecified, all mutable fields will be updated.", - "location": "query" - } - }, - "parameterOrder": [ - "callSetId" - ], - "request": { - "$ref": "CallSet" - }, - "response": { - "$ref": "CallSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "id": "CodingSequence" }, - "delete": { - "id": "genomics.callsets.delete", - "path": "v1/callsets/{callSetId}", - "httpMethod": "DELETE", - "description": "Deletes a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "callSetId": { - "type": "string", - "description": "The ID of the call set to be deleted.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "callSetId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "SearchReferencesResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results." + }, + "references": { + "description": "The matching references.", + "type": "array", + "items": { + "$ref": "Reference" + } + } + }, + "id": "SearchReferencesResponse" }, - "get": { - "id": "genomics.callsets.get", - "path": "v1/callsets/{callSetId}", - "httpMethod": "GET", - "description": "Gets a call set by ID. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", - "parameters": { - "callSetId": { - "type": "string", - "description": "The ID of the call set.", - "required": true, - "location": "path" + "GetIamPolicyRequest": { + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest", + "description": "Request message for `GetIamPolicy` method." + }, + "TestIamPermissionsResponse": { + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsResponse", + "description": "Response message for `TestIamPermissions` method." + }, + "SearchAnnotationSetsRequest": { + "id": "SearchAnnotationSetsRequest", + "type": "object", + "properties": { + "name": { + "description": "Only return annotations sets for which a substring of the name matches this\nstring (case insensitive).", + "type": "string" + }, + "referenceSetId": { + "type": "string", + "description": "If specified, only annotation sets associated with the given reference set\nare returned." + }, + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 128. The maximum value is 1024.", + "format": "int32" + }, + "datasetIds": { + "description": "Required. The dataset IDs to search within. Caller must have `READ` access\nto these datasets.", + "type": "array", + "items": { + "type": "string" + } + }, + "types": { + "description": "If specified, only annotation sets that have any of these types are\nreturned.", + "type": "array", + "items": { + "enum": [ + "ANNOTATION_TYPE_UNSPECIFIED", + "GENERIC", + "VARIANT", + "GENE", + "TRANSCRIPT" + ], + "type": "string" + }, + "enumDescriptions": [ + "", + "A `GENERIC` annotation type should be used when no other annotation\ntype will suffice. This represents an untyped annotation of the reference\ngenome.", + "A `VARIANT` annotation type.", + "A `GENE` annotation type represents the existence of a gene at the\nassociated reference coordinates. The start coordinate is typically the\ngene's transcription start site and the end is typically the end of the\ngene's last exon.", + "A `TRANSCRIPT` annotation type represents the assertion that a\nparticular region of the reference genome may be transcribed as RNA." + ] + } } - }, - "parameterOrder": [ - "callSetId" - ], - "response": { - "$ref": "CallSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics", - "https://www.googleapis.com/auth/genomics.readonly" - ] + }, + "SearchReadGroupSetsResponse": { + "description": "The read group set search response.", + "type": "object", + "properties": { + "readGroupSets": { + "description": "The list of matching read group sets.", + "type": "array", + "items": { + "$ref": "ReadGroupSet" + } + }, + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" + } + }, + "id": "SearchReadGroupSetsResponse" + }, + "LinearAlignment": { + "properties": { + "position": { + "description": "The position of this alignment.", + "$ref": "Position" + }, + "cigar": { + "description": "Represents the local alignment of this sequence (alignment matches, indels,\netc) against the reference.", + "type": "array", + "items": { + "$ref": "CigarUnit" + } + }, + "mappingQuality": { + "description": "The mapping quality of this alignment. Represents how likely\nthe read maps to this position as opposed to other locations.\n\nSpecifically, this is -10 log10 Pr(mapping position is wrong), rounded to\nthe nearest integer.", + "format": "int32", + "type": "integer" + } + }, + "id": "LinearAlignment", + "description": "A linear alignment can be represented by one CIGAR string. Describes the\nmapped position and local alignment of the read to the reference.", + "type": "object" + }, + "SearchReferencesRequest": { + "properties": { + "accessions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "If present, return references for which a prefix of any of\nsourceAccessions match\nany of these strings. Accession numbers typically have a main number and a\nversion, for example `GCF_000001405.26`." + }, + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "referenceSetId": { + "description": "If present, return only references which belong to this reference set.", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024. The maximum value is 4096.", + "format": "int32", + "type": "integer" + }, + "md5checksums": { + "type": "array", + "items": { + "type": "string" + }, + "description": "If present, return references for which the\nmd5checksum matches exactly." + } + }, + "id": "SearchReferencesRequest", + "type": "object" + }, + "Dataset": { + "properties": { + "name": { + "description": "The dataset name.", + "type": "string" + }, + "projectId": { + "description": "The Google Cloud project ID that this dataset belongs to.", + "type": "string" + }, + "id": { + "type": "string", + "description": "The server-generated dataset ID, unique across all datasets." + }, + "createTime": { + "description": "The time this dataset was created, in seconds from the epoch.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "Dataset", + "description": "A Dataset is a collection of genomic data.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "type": "object" + }, + "ImportVariantsResponse": { + "description": "The variant data import response.", + "type": "object", + "properties": { + "callSetIds": { + "description": "IDs of the call sets created during the import.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ImportVariantsResponse" + }, + "ReadGroup": { + "description": "A read group is all the data that's processed the same way by the sequencer.", + "type": "object", + "properties": { + "datasetId": { + "description": "The dataset to which this read group belongs.", + "type": "string" + }, + "experiment": { + "$ref": "Experiment", + "description": "The experiment used to generate this read group." + }, + "name": { + "description": "The read group name. This corresponds to the @RG ID field in the SAM spec.", + "type": "string" + }, + "referenceSetId": { + "description": "The reference set the reads in this read group are aligned to.", + "type": "string" + }, + "info": { + "additionalProperties": { + "type": "array", + "items": { + "type": "any" + } + }, + "description": "A map of additional read group information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", + "type": "object" + }, + "id": { + "description": "The server-generated read group ID, unique for all read groups.\nNote: This is different than the @RG ID field in the SAM spec. For that\nvalue, see name.", + "type": "string" + }, + "predictedInsertSize": { + "description": "The predicted insert size of this read group. The insert size is the length\nthe sequenced DNA fragment from end-to-end, not including the adapters.", + "format": "int32", + "type": "integer" + }, + "programs": { + "description": "The programs used to generate this read group. Programs are always\nidentical for all read groups within a read group set. For this reason,\nonly the first read group in a returned set will have this field\npopulated.", + "type": "array", + "items": { + "$ref": "Program" + } + }, + "description": { + "description": "A free-form text description of this read group.", + "type": "string" + }, + "sampleId": { + "description": "A client-supplied sample identifier for the reads in this read group.", + "type": "string" + } + }, + "id": "ReadGroup" + }, + "ReadGroupSet": { + "description": "A read group set is a logical collection of read groups, which are\ncollections of reads produced by a sequencer. A read group set typically\nmodels reads corresponding to one sample, sequenced one way, and aligned one\nway.\n\n* A read group set belongs to one dataset.\n* A read group belongs to one read group set.\n* A read belongs to one read group.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "type": "object", + "properties": { + "referenceSetId": { + "description": "The reference set to which the reads in this read group set are aligned.", + "type": "string" + }, + "info": { + "additionalProperties": { + "type": "array", + "items": { + "type": "any" + } + }, + "description": "A map of additional read group set information.", + "type": "object" + }, + "id": { + "type": "string", + "description": "The server-generated read group set ID, unique for all read group sets." + }, + "datasetId": { + "description": "The dataset to which this read group set belongs.", + "type": "string" + }, + "readGroups": { + "type": "array", + "items": { + "$ref": "ReadGroup" + }, + "description": "The read groups in this set. There are typically 1-10 read groups in a read\ngroup set." + }, + "filename": { + "description": "The filename of the original source file for this read group set, if any.", + "type": "string" + }, + "name": { + "description": "The read group set name. By default this will be initialized to the sample\nname of the sequenced data contained in this set.", + "type": "string" + } + }, + "id": "ReadGroupSet" + }, + "SearchVariantSetsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results." + }, + "variantSets": { + "description": "The variant sets belonging to the requested dataset.", + "type": "array", + "items": { + "$ref": "VariantSet" + } + } + }, + "id": "SearchVariantSetsResponse", + "description": "The search variant sets response." + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "Entry": { + "type": "object", + "properties": { + "status": { + "$ref": "Status", + "description": "The creation status." + }, + "annotation": { + "$ref": "Annotation", + "description": "The created annotation, if creation was successful." + } + }, + "id": "Entry" + }, + "Position": { + "description": "An abstraction for referring to a genomic position, in relation to some\nalready known reference. For now, represents a genomic position as a\nreference name, a base number on that reference (0-based), and a\ndetermination of forward or reverse strand.", + "type": "object", + "properties": { + "reverseStrand": { + "description": "Whether this position is on the reverse strand, as opposed to the forward\nstrand.", + "type": "boolean" + }, + "position": { + "description": "The 0-based offset from the start of the forward strand for that reference.", + "format": "int64", + "type": "string" + }, + "referenceName": { + "description": "The name of the reference in whatever reference set is being used.", + "type": "string" + } + }, + "id": "Position" + }, + "SearchReferenceSetsResponse": { + "type": "object", + "properties": { + "referenceSets": { + "description": "The matching references sets.", + "type": "array", + "items": { + "$ref": "ReferenceSet" + } + }, + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" + } + }, + "id": "SearchReferenceSetsResponse" + }, + "SearchCallSetsRequest": { + "id": "SearchCallSetsRequest", + "description": "The call set search request.", + "type": "object", + "properties": { + "variantSetIds": { + "description": "Restrict the query to call sets within the given variant sets. At least one\nID must be provided.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "Only return call sets for which a substring of the name matches this\nstring.", + "type": "string" + }, + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024.", + "format": "int32", + "type": "integer" + } + } + }, + "ImportReadGroupSetsRequest": { + "id": "ImportReadGroupSetsRequest", + "description": "The read group set import request.", + "type": "object", + "properties": { + "partitionStrategy": { + "type": "string", + "enumDescriptions": [ + "", + "In most cases, this strategy yields one read group set per file. This is\nthe default behavior.\n\nAllocate one read group set per file per sample. For BAM files, read\ngroups are considered to share a sample if they have identical sample\nnames. Furthermore, all reads for each file which do not belong to a read\ngroup, if any, will be grouped into a single read group set per-file.", + "Includes all read groups in all imported files into a single read group\nset. Requires that the headers for all imported files are equivalent. All\nreads which do not belong to a read group, if any, will be grouped into a\nseparate read group set." + ], + "enum": [ + "PARTITION_STRATEGY_UNSPECIFIED", + "PER_FILE_PER_SAMPLE", + "MERGE_ALL" + ], + "description": "The partition strategy describes how read groups are partitioned into read\ngroup sets." + }, + "datasetId": { + "description": "Required. The ID of the dataset these read group sets will belong to. The\ncaller must have WRITE permissions to this dataset.", + "type": "string" + }, + "sourceUris": { + "description": "A list of URIs pointing at [BAM\nfiles](https://samtools.github.io/hts-specs/SAMv1.pdf)\nin Google Cloud Storage.\nThose URIs can include wildcards (*), but do not add or remove\nmatching files before import has completed.\n\nNote that Google Cloud Storage object listing is only eventually\nconsistent: files added may be not be immediately visible to\neveryone. Thus, if using a wildcard it is preferable not to start\nthe import immediately after the files are created.", + "type": "array", + "items": { + "type": "string" + } + }, + "referenceSetId": { + "description": "The reference set to which the imported read group sets are aligned to, if\nany. The reference names of this reference set must be a superset of those\nfound in the imported file headers. If no reference set id is provided, a\nbest effort is made to associate with a matching reference set.", + "type": "string" + } + } + }, + "Policy": { + "properties": { + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "format": "byte", + "type": "string" + }, + "version": { + "type": "integer", + "description": "Version of the `Policy`. The default version is 0.", + "format": "int32" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", + "type": "array", + "items": { + "$ref": "Binding" + } + } + }, + "id": "Policy", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object" + }, + "SearchReadsRequest": { + "description": "The read search request.", + "type": "object", + "properties": { + "referenceName": { + "description": "The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to\n`*`, only unmapped reads are returned. If unspecified, all reads (mapped\nand unmapped) are returned.", + "type": "string" + }, + "readGroupSetIds": { + "description": "The IDs of the read groups sets within which to search for reads. All\nspecified read group sets must be aligned against a common set of reference\nsequences; this defines the genomic coordinates for the query. Must specify\none of `readGroupSetIds` or `readGroupIds`.", + "type": "array", + "items": { + "type": "string" + } + }, + "readGroupIds": { + "description": "The IDs of the read groups within which to search for reads. All specified\nread groups must belong to the same read group sets. Must specify one of\n`readGroupSetIds` or `readGroupIds`.", + "type": "array", + "items": { + "type": "string" + } + }, + "end": { + "description": "The end position of the range on the reference, 0-based exclusive. If\nspecified, `referenceName` must also be specified.", + "format": "int64", + "type": "string" + }, + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 256. The maximum value is 2048.", + "format": "int32", + "type": "integer" + }, + "start": { + "description": "The start position of the range on the reference, 0-based inclusive. If\nspecified, `referenceName` must also be specified.", + "format": "int64", + "type": "string" + } + }, + "id": "SearchReadsRequest" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "type": "object", + "properties": {}, + "id": "CancelOperationRequest" + }, + "Annotation": { + "description": "An annotation describes a region of reference genome. The value of an\nannotation may be one of several canonical types, supplemented by arbitrary\ninfo tags. An annotation is not inherently associated with a specific\nsample or individual (though a client could choose to use annotations in\nthis way). Example canonical annotation types are `GENE` and\n`VARIANT`.", + "type": "object", + "properties": { + "referenceName": { + "description": "The display name corresponding to the reference specified by\n`referenceId`, for example `chr1`, `1`, or `chrX`.", + "type": "string" + }, + "type": { + "enumDescriptions": [ + "", + "A `GENERIC` annotation type should be used when no other annotation\ntype will suffice. This represents an untyped annotation of the reference\ngenome.", + "A `VARIANT` annotation type.", + "A `GENE` annotation type represents the existence of a gene at the\nassociated reference coordinates. The start coordinate is typically the\ngene's transcription start site and the end is typically the end of the\ngene's last exon.", + "A `TRANSCRIPT` annotation type represents the assertion that a\nparticular region of the reference genome may be transcribed as RNA." + ], + "enum": [ + "ANNOTATION_TYPE_UNSPECIFIED", + "GENERIC", + "VARIANT", + "GENE", + "TRANSCRIPT" + ], + "description": "The data type for this annotation. Must match the containing annotation\nset's type.", + "type": "string" + }, + "info": { + "additionalProperties": { + "type": "array", + "items": { + "type": "any" + } + }, + "description": "A map of additional read alignment information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", + "type": "object" + }, + "end": { + "type": "string", + "description": "The end position of the range on the reference, 0-based exclusive.", + "format": "int64" + }, + "transcript": { + "$ref": "Transcript", + "description": "A transcript value represents the assertion that a particular region of\nthe reference genome may be transcribed as RNA. An alternative splicing\npattern would be represented as a separate transcript object. This field\nis only set for annotations of type `TRANSCRIPT`." + }, + "start": { + "description": "The start position of the range on the reference, 0-based inclusive.", + "format": "int64", + "type": "string" + }, + "annotationSetId": { + "description": "The annotation set to which this annotation belongs.", + "type": "string" + }, + "name": { + "description": "The display name of this annotation.", + "type": "string" + }, + "variant": { + "$ref": "VariantAnnotation", + "description": "A variant annotation, which describes the effect of a variant on the\ngenome, the coding sequence, and/or higher level consequences at the\norganism level e.g. pathogenicity. This field is only set for annotations\nof type `VARIANT`." + }, + "id": { + "description": "The server-generated annotation ID, unique across all annotations.", + "type": "string" + }, + "referenceId": { + "description": "The ID of the Google Genomics reference associated with this range.", + "type": "string" + }, + "reverseStrand": { + "description": "Whether this range refers to the reverse strand, as opposed to the forward\nstrand. Note that regardless of this field, the start/end position of the\nrange always refer to the forward strand.", + "type": "boolean" + } + }, + "id": "Annotation" + }, + "RuntimeMetadata": { + "description": "Runtime metadata that will be populated in the\nruntimeMetadata\nfield of the Operation associated with a RunPipeline execution.", + "type": "object", + "properties": { + "computeEngine": { + "description": "Execution information specific to Google Compute Engine.", + "$ref": "ComputeEngine" + } + }, + "id": "RuntimeMetadata" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "metadata": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "An OperationMetadata object. This will always be returned with the Operation.", + "type": "object" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For pipelines and exports, an empty response is returned.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + } + }, + "id": "Operation" + }, + "ImportReadGroupSetsResponse": { + "description": "The read group set import response.", + "type": "object", + "properties": { + "readGroupSetIds": { + "description": "IDs of the read group sets that were created.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ImportReadGroupSetsResponse" + }, + "VariantCall": { + "description": "A call represents the determination of genotype with respect to a particular\nvariant. It may include associated information such as quality and phasing.\nFor example, a call might assign a probability of 0.32 to the occurrence of\na SNP named rs1234 in a call set with the name NA12345.", + "type": "object", + "properties": { + "phaseset": { + "description": "If this field is present, this variant call's genotype ordering implies\nthe phase of the bases and is consistent with any other variant calls in\nthe same reference sequence which have the same phaseset value.\nWhen importing data from VCF, if the genotype data was phased but no\nphase set was specified this field will be set to `*`.", + "type": "string" + }, + "info": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "any" + } + }, + "description": "A map of additional variant call information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values)." + }, + "callSetName": { + "description": "The name of the call set this variant call belongs to.", + "type": "string" + }, + "genotypeLikelihood": { + "description": "The genotype likelihoods for this variant call. Each array entry\nrepresents how likely a specific genotype is for this call. The value\nordering is defined by the GL tag in the VCF spec.\nIf Phred-scaled genotype likelihood scores (PL) are available and\nlog10(P) genotype likelihood scores (GL) are not, PL scores are converted\nto GL scores. If both are available, PL scores are stored in `info`.", + "type": "array", + "items": { + "format": "double", + "type": "number" + } + }, + "callSetId": { + "description": "The ID of the call set this variant call belongs to.", + "type": "string" + }, + "genotype": { + "description": "The genotype of this variant call. Each value represents either the value\nof the `referenceBases` field or a 1-based index into\n`alternateBases`. If a variant had a `referenceBases`\nvalue of `T` and an `alternateBases`\nvalue of `[\"A\", \"C\"]`, and the `genotype` was\n`[2, 1]`, that would mean the call\nrepresented the heterozygous value `CA` for this variant.\nIf the `genotype` was instead `[0, 1]`, the\nrepresented value would be `TA`. Ordering of the\ngenotype values is important if the `phaseset` is present.\nIf a genotype is not called (that is, a `.` is present in the\nGT string) -1 is returned.", + "type": "array", + "items": { + "format": "int32", + "type": "integer" + } + } + }, + "id": "VariantCall" + }, + "SearchVariantsResponse": { + "properties": { + "nextPageToken": { + "type": "string", + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results." + }, + "variants": { + "description": "The list of matching Variants.", + "type": "array", + "items": { + "$ref": "Variant" + } + } + }, + "id": "SearchVariantsResponse", + "description": "The variant search response.", + "type": "object" + }, + "ListBasesResponse": { + "type": "object", + "properties": { + "sequence": { + "type": "string", + "description": "A substring of the bases that make up this reference." + }, + "offset": { + "description": "The offset position (0-based) of the given `sequence` from the\nstart of this `Reference`. This value will differ for each page\nin a paginated request.", + "format": "int64", + "type": "string" + }, + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" + } + }, + "id": "ListBasesResponse" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + } + }, + "id": "Status" + }, + "UndeleteDatasetRequest": { + "type": "object", + "properties": {}, + "id": "UndeleteDatasetRequest" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "type": "array", + "items": { + "type": "string" + } + }, + "role": { + "type": "string", + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired" + } + }, + "id": "Binding" + }, + "Range": { + "properties": { + "start": { + "description": "The start position of the range on the reference, 0-based inclusive.", + "format": "int64", + "type": "string" + }, + "end": { + "description": "The end position of the range on the reference, 0-based exclusive.", + "format": "int64", + "type": "string" + }, + "referenceName": { + "description": "The reference sequence name, for example `chr1`,\n`1`, or `chrX`.", + "type": "string" + } + }, + "id": "Range", + "description": "A 0-based half-open genomic coordinate range for search requests.", + "type": "object" + }, + "VariantSet": { + "description": "A variant set is a collection of call sets and variants. It contains summary\nstatistics of those contents. A variant set belongs to a dataset.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "type": "object", + "properties": { + "referenceSetId": { + "description": "The reference set to which the variant set is mapped. The reference set\ndescribes the alignment provenance of the variant set, while the\n`referenceBounds` describe the shape of the actual variant data. The\nreference set's reference names are a superset of those found in the\n`referenceBounds`.\n\nFor example, given a variant set that is mapped to the GRCh38 reference set\nand contains a single variant on reference 'X', `referenceBounds` would\ncontain only an entry for 'X', while the associated reference set\nenumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc.", + "type": "string" + }, + "metadata": { + "description": "The metadata associated with this variant set.", + "type": "array", + "items": { + "$ref": "VariantSetMetadata" + } + }, + "referenceBounds": { + "description": "A list of all references used by the variants in a variant set\nwith associated coordinate upper bounds for each one.", + "type": "array", + "items": { + "$ref": "ReferenceBound" + } + }, + "id": { + "description": "The server-generated variant set ID, unique across all variant sets.", + "type": "string" + }, + "description": { + "description": "A textual description of this variant set.", + "type": "string" + }, + "datasetId": { + "type": "string", + "description": "The dataset to which this variant set belongs." + }, + "name": { + "type": "string", + "description": "User-specified, mutable name." + } + }, + "id": "VariantSet" + }, + "BatchCreateAnnotationsResponse": { + "type": "object", + "properties": { + "entries": { + "description": "The resulting per-annotation entries, ordered consistently with the\noriginal request.", + "type": "array", + "items": { + "$ref": "Entry" + } + } + }, + "id": "BatchCreateAnnotationsResponse" + }, + "ReferenceBound": { + "id": "ReferenceBound", + "description": "ReferenceBound records an upper bound for the starting coordinate of\nvariants in a particular reference.", + "type": "object", + "properties": { + "upperBound": { + "description": "An upper bound (inclusive) on the starting coordinate of any\nvariant in the reference sequence.", + "format": "int64", + "type": "string" + }, + "referenceName": { + "description": "The name of the reference associated with this reference bound.", + "type": "string" + } + } + }, + "Variant": { + "description": "A variant represents a change in DNA sequence relative to a reference\nsequence. For example, a variant could represent a SNP or an insertion.\nVariants belong to a variant set.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\nEach of the calls on a variant represent a determination of genotype with\nrespect to that variant. For example, a call might assign probability of 0.32\nto the occurrence of a SNP named rs1234 in a sample named NA12345. A call\nbelongs to a call set, which contains related calls typically from one\nsample.", + "type": "object", + "properties": { + "info": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "any" + } + }, + "description": "A map of additional variant information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values)." + }, + "referenceBases": { + "description": "The reference bases for this variant. They start at the given\nposition.", + "type": "string" + }, + "alternateBases": { + "description": "The bases that appear instead of the reference bases.", + "type": "array", + "items": { + "type": "string" + } + }, + "names": { + "description": "Names for the variant, for example a RefSNP ID.", + "type": "array", + "items": { + "type": "string" + } + }, + "end": { + "description": "The end position (0-based) of this variant. This corresponds to the first\nbase after the last base in the reference allele. So, the length of\nthe reference allele is (end - start). This is useful for variants\nthat don't explicitly give alternate bases, for example large deletions.", + "format": "int64", + "type": "string" + }, + "filter": { + "description": "A list of filters (normally quality filters) this variant has failed.\n`PASS` indicates this variant has passed all filters.", + "type": "array", + "items": { + "type": "string" + } + }, + "calls": { + "description": "The variant calls for this particular variant. Each one represents the\ndetermination of genotype with respect to this variant.", + "type": "array", + "items": { + "$ref": "VariantCall" + } + }, + "created": { + "description": "The date this variant was created, in milliseconds from the epoch.", + "format": "int64", + "type": "string" + }, + "start": { + "description": "The position at which this variant occurs (0-based).\nThis corresponds to the first base of the string of reference bases.", + "format": "int64", + "type": "string" + }, + "quality": { + "description": "A measure of how likely this variant is to be real.\nA higher value is better.", + "format": "double", + "type": "number" + }, + "id": { + "description": "The server-generated variant ID, unique across all variants.", + "type": "string" + }, + "variantSetId": { + "description": "The ID of the variant set this variant belongs to.", + "type": "string" + }, + "referenceName": { + "type": "string", + "description": "The reference on which this variant occurs.\n(such as `chr20` or `X`)" + } + }, + "id": "Variant" + }, + "SearchCallSetsResponse": { + "id": "SearchCallSetsResponse", + "description": "The call set search response.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" + }, + "callSets": { + "description": "The list of matching call sets.", + "type": "array", + "items": { + "$ref": "CallSet" + } + } + } + }, + "ListOperationsResponse": { + "type": "object", + "properties": { + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations." + }, + "OperationMetadata": { + "description": "Metadata describing an Operation.", + "type": "object", + "properties": { + "startTime": { + "description": "The time at which the job began to run.", + "format": "google-datetime", + "type": "string" + }, + "request": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation. Note that this will be in\ncurrent version of the API. If the operation was started with v1beta2 API\nand a GetOperation is performed on v1 API, a v1 request will be returned.", + "type": "object" + }, + "runtimeMetadata": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "Runtime metadata on this Operation.", + "type": "object" + }, + "createTime": { + "description": "The time at which the job was submitted to the Genomics service.", + "format": "google-datetime", + "type": "string" + }, + "labels": { + "description": "Optionally provided by the caller when submitting the request that creates\nthe operation.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "projectId": { + "description": "The Google Cloud Project in which the job is scoped.", + "type": "string" + }, + "clientId": { + "description": "This field is deprecated. Use `labels` instead. Optionally provided by the\ncaller when submitting the request that creates the operation.", + "type": "string" + }, + "events": { + "description": "Optional event messages that were generated during the job's execution.\nThis also contains any warnings that were generated during import\nor export.", + "type": "array", + "items": { + "$ref": "OperationEvent" + } + }, + "endTime": { + "type": "string", + "description": "The time at which the job stopped running.", + "format": "google-datetime" + } + }, + "id": "OperationMetadata" + }, + "SearchVariantsRequest": { + "description": "The variant search request.", + "type": "object", + "properties": { + "referenceName": { + "description": "Required. Only return variants in this reference sequence.", + "type": "string" + }, + "variantSetIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "At most one variant set ID must be provided. Only variants from this\nvariant set will be returned. If omitted, a call set id must be included in\nthe request." + }, + "end": { + "description": "The end of the window, 0-based exclusive. If unspecified or 0, defaults to\nthe length of the reference.", + "format": "int64", + "type": "string" + }, + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "maxCalls": { + "description": "The maximum number of calls to return in a single page. Note that this\nlimit may be exceeded in the event that a matching variant contains more\ncalls than the requested maximum. If unspecified, defaults to 5000. The\nmaximum value is 10000.", + "format": "int32", + "type": "integer" + }, + "pageSize": { + "description": "The maximum number of variants to return in a single page. If unspecified,\ndefaults to 5000. The maximum value is 10000.", + "format": "int32", + "type": "integer" + }, + "callSetIds": { + "description": "Only return variant calls which belong to call sets with these ids.\nLeaving this blank returns all variant calls. If a variant has no\ncalls belonging to any of these call sets, it won't be returned at all.", + "type": "array", + "items": { + "type": "string" + } + }, + "variantName": { + "description": "Only return variants which have exactly this name.", + "type": "string" + }, + "start": { + "description": "The beginning of the window (0-based, inclusive) for which\noverlapping variants should be returned. If unspecified, defaults to 0.", + "format": "int64", + "type": "string" + } + }, + "id": "SearchVariantsRequest" + }, + "SearchReadGroupSetsRequest": { + "id": "SearchReadGroupSetsRequest", + "description": "The read group set search request.", + "type": "object", + "properties": { + "name": { + "description": "Only return read group sets for which a substring of the name matches this\nstring.", + "type": "string" + }, + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 256. The maximum value is 1024.", + "format": "int32", + "type": "integer" + }, + "datasetIds": { + "description": "Restricts this query to read group sets within the given datasets. At least\none ID must be provided.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "SearchAnnotationsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" + }, + "annotations": { + "type": "array", + "items": { + "$ref": "Annotation" + }, + "description": "The matching annotations." + } + }, + "id": "SearchAnnotationsResponse" + }, + "SearchReadsResponse": { + "description": "The read search response.", + "type": "object", + "properties": { + "alignments": { + "description": "The list of matching alignments sorted by mapped genomic coordinate,\nif any, ascending in position within the same reference. Unmapped reads,\nwhich have no position, are returned contiguously and are sorted in\nascending lexicographic order by fragment name.", + "type": "array", + "items": { + "$ref": "Read" + } + }, + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" + } + }, + "id": "SearchReadsResponse" + }, + "ClinicalCondition": { + "type": "object", + "properties": { + "omimId": { + "description": "The OMIM id for this condition.\nSearch for these IDs at http://omim.org/", + "type": "string" + }, + "externalIds": { + "description": "The set of external IDs for this condition.", + "type": "array", + "items": { + "$ref": "ExternalId" + } + }, + "conceptId": { + "description": "The MedGen concept id associated with this gene.\nSearch for these IDs at http://www.ncbi.nlm.nih.gov/medgen/", + "type": "string" + }, + "names": { + "description": "A set of names for the condition.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ClinicalCondition" + }, + "Program": { + "type": "object", + "properties": { + "name": { + "description": "The display name of the program. This is typically the colloquial name of\nthe tool used, for example 'bwa' or 'picard'.", + "type": "string" + }, + "commandLine": { + "type": "string", + "description": "The command line used to run this program." + }, + "prevProgramId": { + "description": "The ID of the program run before this one.", + "type": "string" + }, + "id": { + "description": "The user specified locally unique ID of the program. Used along with\n`prevProgramId` to define an ordering between programs.", + "type": "string" + }, + "version": { + "description": "The version of the program run.", + "type": "string" + } + }, + "id": "Program" + }, + "CoverageBucket": { + "description": "A bucket over which read coverage has been precomputed. A bucket corresponds\nto a specific range of the reference sequence.", + "type": "object", + "properties": { + "meanCoverage": { + "description": "The average number of reads which are aligned to each individual\nreference base in this bucket.", + "format": "float", + "type": "number" + }, + "range": { + "description": "The genomic coordinate range spanned by this bucket.", + "$ref": "Range" + } + }, + "id": "CoverageBucket" + }, + "ComputeEngine": { + "description": "Describes a Compute Engine resource that is being managed by a running\npipeline.", + "type": "object", + "properties": { + "machineType": { + "description": "The machine type of the instance.", + "type": "string" + }, + "diskNames": { + "description": "The names of the disks that were created for this pipeline.", + "type": "array", + "items": { + "type": "string" + } + }, + "instanceName": { + "description": "The instance on which the operation is running.", + "type": "string" + }, + "zone": { + "description": "The availability zone in which the instance resides.", + "type": "string" + } + }, + "id": "ComputeEngine" + }, + "ExternalId": { + "properties": { + "id": { + "type": "string", + "description": "The id used by the source of this data." + }, + "sourceName": { + "description": "The name of the source of this data.", + "type": "string" + } + }, + "id": "ExternalId", + "type": "object" + }, + "Reference": { + "description": "A reference is a canonical assembled DNA sequence, intended to act as a\nreference coordinate space for other genomic annotations. A single reference\nmight represent the human chromosome 1 or mitochandrial DNA, for instance. A\nreference belongs to one or more reference sets.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)", + "type": "object", + "properties": { + "ncbiTaxonId": { + "description": "ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human.", + "format": "int32", + "type": "integer" + }, + "sourceUri": { + "description": "The URI from which the sequence was obtained. Typically specifies a FASTA\nformat file.", + "type": "string" + }, + "name": { + "description": "The name of this reference, for example `22`.", + "type": "string" + }, + "md5checksum": { + "description": "MD5 of the upper-case sequence excluding all whitespace characters (this\nis equivalent to SQ:M5 in SAM). This value is represented in lower case\nhexadecimal format.", + "type": "string" + }, + "id": { + "description": "The server-generated reference ID, unique across all references.", + "type": "string" + }, + "length": { + "description": "The length of this reference's sequence.", + "format": "int64", + "type": "string" + }, + "sourceAccessions": { + "description": "All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally\nwith a version number, for example `GCF_000001405.26`.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "Reference" + }, + "VariantSetMetadata": { + "description": "Metadata describes a single piece of variant call metadata.\nThese data include a top level key and either a single value string (value)\nor a list of key-value pairs (info.)\nValue and info are mutually exclusive.", + "type": "object", + "properties": { + "description": { + "description": "A textual description of this metadata.", + "type": "string" + }, + "info": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "any" + } + }, + "description": "Remaining structured metadata key-value pairs. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values)." + }, + "type": { + "description": "The type of data. Possible types include: Integer, Float,\nFlag, Character, and String.", + "type": "string", + "enumDescriptions": [ + "", + "", + "", + "", + "", + "" + ], + "enum": [ + "TYPE_UNSPECIFIED", + "INTEGER", + "FLOAT", + "FLAG", + "CHARACTER", + "STRING" + ] + }, + "number": { + "description": "The number of values that can be included in a field described by this\nmetadata.", + "type": "string" + }, + "id": { + "description": "User-provided ID field, not enforced by this API.\nTwo or more pieces of structured metadata with identical\nid and key fields are considered equivalent.", + "type": "string" + }, + "value": { + "description": "The value field for simple metadata", + "type": "string" + }, + "key": { + "type": "string", + "description": "The top-level key." + } + }, + "id": "VariantSetMetadata" + }, + "SearchVariantSetsRequest": { + "description": "The search variant sets request.", + "type": "object", + "properties": { + "datasetIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Exactly one dataset ID must be provided here. Only variant sets which\nbelong to this dataset will be returned." + }, + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024.", + "format": "int32", + "type": "integer" + } + }, + "id": "SearchVariantSetsRequest" + }, + "SearchReferenceSetsRequest": { + "id": "SearchReferenceSetsRequest", + "type": "object", + "properties": { + "accessions": { + "description": "If present, return reference sets for which a prefix of any of\nsourceAccessions\nmatch any of these strings. Accession numbers typically have a main number\nand a version, for example `NC_000001.11`.", + "type": "array", + "items": { + "type": "string" + } + }, + "pageToken": { + "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024. The maximum value is 4096.", + "format": "int32", + "type": "integer" + }, + "assemblyId": { + "description": "If present, return reference sets for which a substring of their\n`assemblyId` matches this string (case insensitive).", + "type": "string" + }, + "md5checksums": { + "description": "If present, return reference sets for which the\nmd5checksum matches exactly.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + } + }, + "id": "SetIamPolicyRequest" + }, + "MergeVariantsRequest": { + "type": "object", + "properties": { + "variants": { + "description": "The variants to be merged with existing variants.", + "type": "array", + "items": { + "$ref": "Variant" + } + }, + "infoMergeConfig": { + "description": "A mapping between info field keys and the InfoMergeOperations to\nbe performed on them.", + "type": "object", + "additionalProperties": { + "enum": [ + "INFO_MERGE_OPERATION_UNSPECIFIED", + "IGNORE_NEW", + "MOVE_TO_CALLS" + ], + "type": "string" + } + }, + "variantSetId": { + "description": "The destination variant set.", + "type": "string" + } + }, + "id": "MergeVariantsRequest" + }, + "BatchCreateAnnotationsRequest": { + "type": "object", + "properties": { + "requestId": { + "description": "A unique request ID which enables the server to detect duplicated requests.\nIf provided, duplicated requests will result in the same response; if not\nprovided, duplicated requests may result in duplicated data. For a given\nannotation set, callers should not reuse `request_id`s when writing\ndifferent batches of annotations - behavior in this case is undefined.\nA common approach is to use a UUID. For batch jobs where worker crashes are\na possibility, consider using some unique variant of a worker or run ID.", + "type": "string" + }, + "annotations": { + "description": "The annotations to be created. At most 4096 can be specified in a single\nrequest.", + "type": "array", + "items": { + "$ref": "Annotation" + } + } + }, + "id": "BatchCreateAnnotationsRequest" + }, + "Read": { + "description": "A read alignment describes a linear alignment of a string of DNA to a\nreference sequence, in addition to metadata\nabout the fragment (the molecule of DNA sequenced) and the read (the bases\nwhich were read by the sequencer). A read is equivalent to a line in a SAM\nfile. A read belongs to exactly one read group and exactly one\nread group set.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)\n\n### Reverse-stranded reads\n\nMapped reads (reads having a non-null `alignment`) can be aligned to either\nthe forward or the reverse strand of their associated reference. Strandedness\nof a mapped read is encoded by `alignment.position.reverseStrand`.\n\nIf we consider the reference to be a forward-stranded coordinate space of\n`[0, reference.length)` with `0` as the left-most position and\n`reference.length` as the right-most position, reads are always aligned left\nto right. That is, `alignment.position.position` always refers to the\nleft-most reference coordinate and `alignment.cigar` describes the alignment\nof this read to the reference from left to right. All per-base fields such as\n`alignedSequence` and `alignedQuality` share this same left-to-right\norientation; this is true of reads which are aligned to either strand. For\nreverse-stranded reads, this means that `alignedSequence` is the reverse\ncomplement of the bases that were originally reported by the sequencing\nmachine.\n\n### Generating a reference-aligned sequence string\n\nWhen interacting with mapped reads, it's often useful to produce a string\nrepresenting the local alignment of the read to reference. The following\npseudocode demonstrates one way of doing this:\n\n out = \"\"\n offset = 0\n for c in read.alignment.cigar {\n switch c.operation {\n case \"ALIGNMENT_MATCH\", \"SEQUENCE_MATCH\", \"SEQUENCE_MISMATCH\":\n out += read.alignedSequence[offset:offset+c.operationLength]\n offset += c.operationLength\n break\n case \"CLIP_SOFT\", \"INSERT\":\n offset += c.operationLength\n break\n case \"PAD\":\n out += repeat(\"*\", c.operationLength)\n break\n case \"DELETE\":\n out += repeat(\"-\", c.operationLength)\n break\n case \"SKIP\":\n out += repeat(\" \", c.operationLength)\n break\n case \"CLIP_HARD\":\n break\n }\n }\n return out\n\n### Converting to SAM's CIGAR string\n\nThe following pseudocode generates a SAM CIGAR string from the\n`cigar` field. Note that this is a lossy conversion\n(`cigar.referenceSequence` is lost).\n\n cigarMap = {\n \"ALIGNMENT_MATCH\": \"M\",\n \"INSERT\": \"I\",\n \"DELETE\": \"D\",\n \"SKIP\": \"N\",\n \"CLIP_SOFT\": \"S\",\n \"CLIP_HARD\": \"H\",\n \"PAD\": \"P\",\n \"SEQUENCE_MATCH\": \"=\",\n \"SEQUENCE_MISMATCH\": \"X\",\n }\n cigarStr = \"\"\n for c in read.alignment.cigar {\n cigarStr += c.operationLength + cigarMap[c.operation]\n }\n return cigarStr", + "type": "object", + "properties": { + "readGroupSetId": { + "description": "The ID of the read group set this read belongs to. A read belongs to\nexactly one read group set.", + "type": "string" + }, + "duplicateFragment": { + "description": "The fragment is a PCR or optical duplicate (SAM flag 0x400).", + "type": "boolean" + }, + "readNumber": { + "description": "The read number in sequencing. 0-based and less than numberReads. This\nfield replaces SAM flag 0x40 and 0x80.", + "format": "int32", + "type": "integer" + }, + "readGroupId": { + "description": "The ID of the read group this read belongs to. A read belongs to exactly\none read group. This is a server-generated ID which is distinct from SAM's\nRG tag (for that value, see\nReadGroup.name).", + "type": "string" + }, + "alignedSequence": { + "description": "The bases of the read sequence contained in this alignment record,\n**without CIGAR operations applied** (equivalent to SEQ in SAM).\n`alignedSequence` and `alignedQuality` may be\nshorter than the full read sequence and quality. This will occur if the\nalignment is part of a chimeric alignment, or if the read was trimmed. When\nthis occurs, the CIGAR for this read will begin/end with a hard clip\noperator that will indicate the length of the excised sequence.", + "type": "string" + }, + "info": { + "additionalProperties": { + "type": "array", + "items": { + "type": "any" + } + }, + "description": "A map of additional read alignment information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", + "type": "object" + }, + "nextMatePosition": { + "$ref": "Position", + "description": "The mapping of the primary alignment of the\n`(readNumber+1)%numberReads` read in the fragment. It replaces\nmate position and mate strand in SAM." + }, + "supplementaryAlignment": { + "type": "boolean", + "description": "Whether this alignment is supplementary. Equivalent to SAM flag 0x800.\nSupplementary alignments are used in the representation of a chimeric\nalignment. In a chimeric alignment, a read is split into multiple\nlinear alignments that map to different reference contigs. The first\nlinear alignment in the read will be designated as the representative\nalignment; the remaining linear alignments will be designated as\nsupplementary alignments. These alignments may have different mapping\nquality scores. In each linear alignment in a chimeric alignment, the read\nwill be hard clipped. The `alignedSequence` and\n`alignedQuality` fields in the alignment record will only\nrepresent the bases for its respective linear alignment." + }, + "properPlacement": { + "description": "The orientation and the distance between reads from the fragment are\nconsistent with the sequencing protocol (SAM flag 0x2).", + "type": "boolean" + }, + "fragmentLength": { + "description": "The observed length of the fragment, equivalent to TLEN in SAM.", + "format": "int32", + "type": "integer" + }, + "failedVendorQualityChecks": { + "description": "Whether this read did not pass filters, such as platform or vendor quality\ncontrols (SAM flag 0x200).", + "type": "boolean" + }, + "alignedQuality": { + "description": "The quality of the read sequence contained in this alignment record\n(equivalent to QUAL in SAM).\n`alignedSequence` and `alignedQuality` may be shorter than the full read\nsequence and quality. This will occur if the alignment is part of a\nchimeric alignment, or if the read was trimmed. When this occurs, the CIGAR\nfor this read will begin/end with a hard clip operator that will indicate\nthe length of the excised sequence.", + "type": "array", + "items": { + "format": "int32", + "type": "integer" + } + }, + "alignment": { + "description": "The linear alignment for this alignment record. This field is null for\nunmapped reads.", + "$ref": "LinearAlignment" + }, + "numberReads": { + "type": "integer", + "description": "The number of reads in the fragment (extension to SAM flag 0x1).", + "format": "int32" + }, + "id": { + "description": "The server-generated read ID, unique across all reads. This is different\nfrom the `fragmentName`.", + "type": "string" + }, + "secondaryAlignment": { + "type": "boolean", + "description": "Whether this alignment is secondary. Equivalent to SAM flag 0x100.\nA secondary alignment represents an alternative to the primary alignment\nfor this read. Aligners may return secondary alignments if a read can map\nambiguously to multiple coordinates in the genome. By convention, each read\nhas one and only one alignment where both `secondaryAlignment`\nand `supplementaryAlignment` are false." + }, + "fragmentName": { + "description": "The fragment name. Equivalent to QNAME (query template name) in SAM.", + "type": "string" + } + }, + "id": "Read" + }, + "ReferenceSet": { + "type": "object", + "properties": { + "assemblyId": { + "description": "Public id of this reference set, such as `GRCh37`.", + "type": "string" + }, + "md5checksum": { + "description": "Order-independent MD5 checksum which identifies this reference set. The\nchecksum is computed by sorting all lower case hexidecimal string\n`reference.md5checksum` (for all reference in this set) in\nascending lexicographic order, concatenating, and taking the MD5 of that\nvalue. The resulting value is represented in lower case hexadecimal format.", + "type": "string" + }, + "id": { + "description": "The server-generated reference set ID, unique across all reference sets.", + "type": "string" + }, + "sourceAccessions": { + "description": "All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally\nwith a version number, for example `NC_000001.11`.", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "description": "Free text description of this reference set.", + "type": "string" + }, + "ncbiTaxonId": { + "description": "ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human)\nindicating the species which this reference set is intended to model. Note\nthat contained references may specify a different `ncbiTaxonId`, as\nassemblies may contain reference sequences which do not belong to the\nmodeled species, for example EBV in a human reference genome.", + "format": "int32", + "type": "integer" + }, + "sourceUri": { + "description": "The URI from which the references were obtained.", + "type": "string" + }, + "referenceIds": { + "description": "The IDs of the reference objects that are part of this set.\n`Reference.md5checksum` must be unique within this set.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ReferenceSet", + "description": "A reference set is a set of references which typically comprise a reference\nassembly for a species, such as `GRCh38` which is representative\nof the human genome. A reference set defines a common coordinate space for\ncomparing reference-aligned experimental data. A reference set contains 1 or\nmore references.\n\nFor more genomics resource definitions, see [Fundamentals of Google\nGenomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)" + }, + "CigarUnit": { + "description": "A single CIGAR operation.", + "type": "object", + "properties": { + "operation": { + "enumDescriptions": [ + "", + "An alignment match indicates that a sequence can be aligned to the\nreference without evidence of an INDEL. Unlike the\n`SEQUENCE_MATCH` and `SEQUENCE_MISMATCH` operators,\nthe `ALIGNMENT_MATCH` operator does not indicate whether the\nreference and read sequences are an exact match. This operator is\nequivalent to SAM's `M`.", + "The insert operator indicates that the read contains evidence of bases\nbeing inserted into the reference. This operator is equivalent to SAM's\n`I`.", + "The delete operator indicates that the read contains evidence of bases\nbeing deleted from the reference. This operator is equivalent to SAM's\n`D`.", + "The skip operator indicates that this read skips a long segment of the\nreference, but the bases have not been deleted. This operator is commonly\nused when working with RNA-seq data, where reads may skip long segments\nof the reference between exons. This operator is equivalent to SAM's\n`N`.", + "The soft clip operator indicates that bases at the start/end of a read\nhave not been considered during alignment. This may occur if the majority\nof a read maps, except for low quality bases at the start/end of a read.\nThis operator is equivalent to SAM's `S`. Bases that are soft\nclipped will still be stored in the read.", + "The hard clip operator indicates that bases at the start/end of a read\nhave been omitted from this alignment. This may occur if this linear\nalignment is part of a chimeric alignment, or if the read has been\ntrimmed (for example, during error correction or to trim poly-A tails for\nRNA-seq). This operator is equivalent to SAM's `H`.", + "The pad operator indicates that there is padding in an alignment. This\noperator is equivalent to SAM's `P`.", + "This operator indicates that this portion of the aligned sequence exactly\nmatches the reference. This operator is equivalent to SAM's `=`.", + "This operator indicates that this portion of the aligned sequence is an\nalignment match to the reference, but a sequence mismatch. This can\nindicate a SNP or a read error. This operator is equivalent to SAM's\n`X`." + ], + "enum": [ + "OPERATION_UNSPECIFIED", + "ALIGNMENT_MATCH", + "INSERT", + "DELETE", + "SKIP", + "CLIP_SOFT", + "CLIP_HARD", + "PAD", + "SEQUENCE_MATCH", + "SEQUENCE_MISMATCH" + ], + "type": "string" + }, + "referenceSequence": { + "description": "`referenceSequence` is only used at mismatches\n(`SEQUENCE_MISMATCH`) and deletions (`DELETE`).\nFilling this field replaces SAM's MD tag. If the relevant information is\nnot available, this field is unset.", + "type": "string" + }, + "operationLength": { + "description": "The number of genomic bases that the operation runs for. Required.", + "format": "int64", + "type": "string" + } + }, + "id": "CigarUnit" + }, + "AnnotationSet": { + "id": "AnnotationSet", + "description": "An annotation set is a logical grouping of annotations that share consistent\ntype information and provenance. Examples of annotation sets include 'all\ngenes from refseq', and 'all variant annotations from ClinVar'.", + "type": "object", + "properties": { + "id": { + "description": "The server-generated annotation set ID, unique across all annotation sets.", + "type": "string" + }, + "datasetId": { + "description": "The dataset to which this annotation set belongs.", + "type": "string" + }, + "sourceUri": { + "description": "The source URI describing the file from which this annotation set was\ngenerated, if any.", + "type": "string" + }, + "name": { + "description": "The display name for this annotation set.", + "type": "string" + }, + "referenceSetId": { + "description": "The ID of the reference set that defines the coordinate space for this\nset's annotations.", + "type": "string" + }, + "type": { + "enumDescriptions": [ + "", + "A `GENERIC` annotation type should be used when no other annotation\ntype will suffice. This represents an untyped annotation of the reference\ngenome.", + "A `VARIANT` annotation type.", + "A `GENE` annotation type represents the existence of a gene at the\nassociated reference coordinates. The start coordinate is typically the\ngene's transcription start site and the end is typically the end of the\ngene's last exon.", + "A `TRANSCRIPT` annotation type represents the assertion that a\nparticular region of the reference genome may be transcribed as RNA." + ], + "enum": [ + "ANNOTATION_TYPE_UNSPECIFIED", + "GENERIC", + "VARIANT", + "GENE", + "TRANSCRIPT" + ], + "description": "The type of annotations contained within this set.", + "type": "string" + }, + "info": { + "additionalProperties": { + "type": "array", + "items": { + "type": "any" + } + }, + "description": "A map of additional read alignment information. This must be of the form\nmap\u003cstring, string[]\u003e (string key mapping to a list of string values).", + "type": "object" + } + } + }, + "Transcript": { + "properties": { + "exons": { + "description": "The \u003ca href=\"http://en.wikipedia.org/wiki/Exon\"\u003eexons\u003c/a\u003e that compose\nthis transcript. This field should be unset for genomes where transcript\nsplicing does not occur, for example prokaryotes.\n\nIntrons are regions of the transcript that are not included in the\nspliced RNA product. Though not explicitly modeled here, intron ranges can\nbe deduced; all regions of this transcript that are not exons are introns.\n\nExonic sequences do not necessarily code for a translational product\n(amino acids). Only the regions of exons bounded by the\ncodingSequence correspond\nto coding DNA sequence.\n\nExons are ordered by start position and may not overlap.", + "type": "array", + "items": { + "$ref": "Exon" + } + }, + "codingSequence": { + "$ref": "CodingSequence", + "description": "The range of the coding sequence for this transcript, if any. To determine\nthe exact ranges of coding sequence, intersect this range with those of the\nexons, if any. If there are any\nexons, the\ncodingSequence must start\nand end within them.\n\nNote that in some cases, the reference genome will not exactly match the\nobserved mRNA transcript e.g. due to variance in the source genome from\nreference. In these cases,\nexon.frame will not necessarily\nmatch the expected reference reading frame and coding exon reference bases\ncannot necessarily be concatenated to produce the original transcript mRNA." + }, + "geneId": { + "description": "The annotation ID of the gene from which this transcript is transcribed.", + "type": "string" + } + }, + "id": "Transcript", + "description": "A transcript represents the assertion that a particular region of the\nreference genome may be transcribed as RNA.", + "type": "object" + }, + "Experiment": { + "properties": { + "sequencingCenter": { + "description": "The sequencing center used as part of this experiment.", + "type": "string" + }, + "platformUnit": { + "description": "The platform unit used as part of this experiment, for example\nflowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the\n@RG PU field in the SAM spec.", + "type": "string" + }, + "libraryId": { + "description": "A client-supplied library identifier; a library is a collection of DNA\nfragments which have been prepared for sequencing from a sample. This\nfield is important for quality control as error or bias can be introduced\nduring sample preparation.", + "type": "string" + }, + "instrumentModel": { + "description": "The instrument model used as part of this experiment. This maps to\nsequencing technology in the SAM spec.", + "type": "string" + } + }, + "id": "Experiment", + "type": "object" + }, + "ListDatasetsResponse": { + "description": "The dataset list response.", + "type": "object", + "properties": { + "datasets": { + "description": "The list of matching Datasets.", + "type": "array", + "items": { + "$ref": "Dataset" + } + }, + "nextPageToken": { + "description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults. This field will be empty if there aren't any additional results.", + "type": "string" + } + }, + "id": "ListDatasetsResponse" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "REQUIRED: The set of permissions to check for the 'resource'.\nPermissions with wildcards (such as '*' or 'storage.*') are not allowed.\nAllowed permissions are:\n\n* `genomics.datasets.create`\n* `genomics.datasets.delete`\n* `genomics.datasets.get`\n* `genomics.datasets.list`\n* `genomics.datasets.update`\n* `genomics.datasets.getIamPolicy`\n* `genomics.datasets.setIamPolicy`" + } + }, + "id": "TestIamPermissionsRequest" } - } - } - } + }, + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest", + "version": "v1", + "baseUrl": "https://genomics.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/genomics": { + "description": "View and manage Genomics data" + }, + "https://www.googleapis.com/auth/bigquery": { + "description": "View and manage your data in Google BigQuery" + }, + "https://www.googleapis.com/auth/devstorage.read_write": { + "description": "Manage your data in Google Cloud Storage" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/genomics.readonly": { + "description": "View Genomics data" + } + } + } + }, + "kind": "discovery#restDescription", + "description": "Upload, process, query, and search Genomics data in the cloud.", + "servicePath": "", + "rootUrl": "https://genomics.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "genomics", + "batchPath": "batch", + "documentationLink": "https://cloud.google.com/genomics", + "id": "genomics:v1", + "revision": "20170520", + "title": "Genomics API", + "ownerName": "Google", + "discoveryVersion": "v1" } diff --git a/etc/api/genomics/v1alpha2/genomics-api.json b/etc/api/genomics/v1alpha2/genomics-api.json index c7567f8aa9..cc107e1351 100644 --- a/etc/api/genomics/v1alpha2/genomics-api.json +++ b/etc/api/genomics/v1alpha2/genomics-api.json @@ -1,1030 +1,1090 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/sdWGjK18RRF0Jy_-SVhZDih5U4M\"", - "discoveryVersion": "v1", - "id": "genomics:v1alpha2", - "name": "genomics", - "version": "v1alpha2", - "revision": "20160928", - "title": "Genomics API", - "description": "Stores, processes, explores and shares genomic data.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/genomics/", - "protocol": "rest", - "baseUrl": "https://genomics.googleapis.com/", - "basePath": "", - "rootUrl": "https://genomics.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/genomics": { - "description": "View and manage Genomics data" - } - } - } - }, - "schemas": { - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "The response message for Operations.ListOperations.", - "properties": { - "operations": { - "type": "array", - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - } - }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "properties": { - "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`" - }, - "metadata": { - "type": "object", - "description": "An OperationMetadata object. This will always be returned with the Operation.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "done": { - "type": "boolean", - "description": "If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available." - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "response": { - "type": "object", - "description": "If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For exports, an empty response is returned.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - } - } - }, - "CancelOperationRequest": { - "id": "CancelOperationRequest", - "type": "object", - "description": "The request message for Operations.CancelOperation." - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "Pipeline": { - "id": "Pipeline", - "type": "object", - "description": "The pipeline object. Represents a transformation from a set of input parameters to a set of output parameters. The transformation is defined as a docker image and command to run within that image. Each pipeline is run on a Google Compute Engine VM. A pipeline can be created with the `create` method and then later run with the `run` method, or a pipeline can be defined and run all at once with the `run` method.", - "properties": { - "projectId": { - "type": "string", - "description": "Required. The project in which to create the pipeline. The caller must have WRITE access." - }, - "name": { - "type": "string", - "description": "Required. A user specified pipeline name that does not have to be unique. This name can be used for filtering Pipelines in ListPipelines." - }, - "description": { - "type": "string", - "description": "User-specified description." - }, - "inputParameters": { - "type": "array", - "description": "Input parameters of the pipeline.", - "items": { - "$ref": "PipelineParameter" - } - }, - "outputParameters": { - "type": "array", - "description": "Output parameters of the pipeline.", - "items": { - "$ref": "PipelineParameter" - } - }, - "docker": { - "$ref": "DockerExecutor", - "description": "Specifies the docker run information." - }, - "resources": { - "$ref": "PipelineResources", - "description": "Required. Specifies resource requirements for the pipeline run. Required fields: * minimumCpuCores * minimumRamGb" - }, - "pipelineId": { - "type": "string", - "description": "Unique pipeline id that is generated by the service when CreatePipeline is called. Cannot be specified in the Pipeline used in the CreatePipelineRequest, and will be populated in the response to CreatePipeline and all subsequent Get and List calls. Indicates that the service has registered this pipeline." - } - } - }, - "PipelineParameter": { - "id": "PipelineParameter", - "type": "object", - "description": "Parameters facilitate setting and delivering data into the pipeline's execution environment. They are defined at create time, with optional defaults, and can be overridden at run time. If `localCopy` is unset, then the parameter specifies a string that is passed as-is into the pipeline, as the value of the environment variable with the given name. A default value can be optionally specified at create time. The default can be overridden at run time using the inputs map. If no default is given, a value must be supplied at runtime. If `localCopy` is defined, then the parameter specifies a data source or sink, both in Google Cloud Storage and on the Docker container where the pipeline computation is run. The service account associated with the Pipeline (by default the project's Compute Engine service account) must have access to the Google Cloud Storage paths. At run time, the Google Cloud Storage paths can be overridden if a default was provided at create time, or must be set otherwise. The pipeline runner should add a key/value pair to either the inputs or outputs map. The indicated data copies will be carried out before/after pipeline execution, just as if the corresponding arguments were provided to `gsutil cp`. For example: Given the following `PipelineParameter`, specified in the `inputParameters` list: ``` {name: \"input_file\", localCopy: {path: \"file.txt\", disk: \"pd1\"}} ``` where `disk` is defined in the `PipelineResources` object as: ``` {name: \"pd1\", mountPoint: \"/mnt/disk/\"} ``` We create a disk named `pd1`, mount it on the host VM, and map `/mnt/pd1` to `/mnt/disk` in the docker container. At runtime, an entry for `input_file` would be required in the inputs map, such as: ``` inputs[\"input_file\"] = \"gs://my-bucket/bar.txt\" ``` This would generate the following gsutil call: ``` gsutil cp gs://my-bucket/bar.txt /mnt/pd1/file.txt ``` The file `/mnt/pd1/file.txt` maps to `/mnt/disk/file.txt` in the Docker container. Acceptable paths are: Google Cloud storage pathLocal path filefile globdirectory For outputs, the direction of the copy is reversed: ``` gsutil cp /mnt/disk/file.txt gs://my-bucket/bar.txt ``` Acceptable paths are: Local pathGoogle Cloud Storage path filefile file directory - directory must already exist glob directory - directory will be created if it doesn't exist One restriction due to docker limitations, is that for outputs that are found on the boot disk, the local path cannot be a glob and must be a file.", - "properties": { - "name": { - "type": "string", - "description": "Required. Name of the parameter - the pipeline runner uses this string as the key to the input and output maps in RunPipeline." - }, - "description": { - "type": "string", - "description": "Human-readable description." - }, - "defaultValue": { - "type": "string", - "description": "The default value for this parameter. Can be overridden at runtime. If `localCopy` is present, then this must be a Google Cloud Storage path beginning with `gs://`." - }, - "localCopy": { - "$ref": "LocalCopy", - "description": "If present, this parameter is marked for copying to and from the VM. `LocalCopy` indicates where on the VM the file should be. The value given to this parameter (either at runtime or using `defaultValue`) must be the remote path where the file should be." - } - } - }, - "LocalCopy": { - "id": "LocalCopy", - "type": "object", - "description": "LocalCopy defines how a remote file should be copied to and from the VM.", - "properties": { - "path": { - "type": "string", - "description": "Required. The path within the user's docker container where this input should be localized to and from, relative to the specified disk's mount point. For example: file.txt," - }, - "disk": { - "type": "string", - "description": "Required. The name of the disk where this parameter is located. Can be the name of one of the disks specified in the Resources field, or \"boot\", which represents the Docker instance's boot disk and has a mount point of `/`." - } - } - }, - "DockerExecutor": { - "id": "DockerExecutor", - "type": "object", - "description": "The Docker execuctor specification.", - "properties": { - "imageName": { - "type": "string", - "description": "Required. Image name from either Docker Hub or Google Container Registry. Users that run pipelines must have READ access to the image." - }, - "cmd": { - "type": "string", - "description": "Required. The command or newline delimited script to run. The command string will be executed within a bash shell. If the command exits with a non-zero exit code, output parameter de-localization will be skipped and the pipeline operation's `error` field will be populated. Maximum command string length is 16384." - } - } - }, - "PipelineResources": { - "id": "PipelineResources", - "type": "object", - "description": "The system resources for the pipeline run.", - "properties": { - "minimumCpuCores": { - "type": "integer", - "description": "The minimum number of cores to use. Defaults to 1.", - "format": "int32" - }, - "preemptible": { - "type": "boolean", - "description": "Whether to use preemptible VMs. Defaults to `false`. In order to use this, must be true for both create time and run time. Cannot be true at run time if false at create time." - }, - "minimumRamGb": { - "type": "number", - "description": "The minimum amount of RAM to use. Defaults to 3.75 (GB)", - "format": "double" - }, - "disks": { - "type": "array", - "description": "Disks to attach.", - "items": { - "$ref": "Disk" - } - }, - "zones": { - "type": "array", - "description": "List of Google Compute Engine availability zones to which resource creation will restricted. If empty, any zone may be chosen.", - "items": { - "type": "string" - } - }, - "bootDiskSizeGb": { - "type": "integer", - "description": "The size of the boot disk. Defaults to 10 (GB).", - "format": "int32" - }, - "noAddress": { - "type": "boolean", - "description": "Whether to assign an external IP to the instance. This is an experimental feature that may go away. Defaults to false. Corresponds to `--no_address` flag for [gcloud compute instances create] (https://cloud.google.com/sdk/gcloud/reference/compute/instances/create). In order to use this, must be true for both create time and run time. Cannot be true at run time if false at create time. If you need to ssh into a private IP VM for debugging, you can ssh to a public VM and then ssh into the private VM's Internal IP. If noAddress is set, this pipeline run may only load docker images from Google Container Registry and not Docker Hub. ** Note: To use this option, your project must be in Google Access for Private IPs Early Access Program.**" - } - } - }, - "Disk": { - "id": "Disk", - "type": "object", - "description": "A Google Compute Engine disk resource specification.", - "properties": { - "name": { - "type": "string", - "description": "Required. The name of the disk that can be used in the pipeline parameters. Must be 1 - 63 characters. The name \"boot\" is reserved for system use." - }, - "type": { - "type": "string", - "description": "Required. The type of the disk to create.", - "enum": [ - "TYPE_UNSPECIFIED", - "PERSISTENT_HDD", - "PERSISTENT_SSD", - "LOCAL_SSD" - ] - }, - "sizeGb": { - "type": "integer", - "description": "The size of the disk. Defaults to 500 (GB). This field is not applicable for local SSD.", - "format": "int32" - }, - "source": { - "type": "string", - "description": "The full or partial URL of the persistent disk to attach. See https://cloud.google.com/compute/docs/reference/latest/instances#resource and https://cloud.google.com/compute/docs/disks/persistent-disks#snapshots for more details." - }, - "autoDelete": { - "type": "boolean", - "description": "Specifies whether or not to delete the disk when the pipeline completes. This field is applicable only for newly created disks. See https://cloud.google.com/compute/docs/reference/latest/instances#resource for more details. By default, `autoDelete` is `false`. `autoDelete` will be enabled if set to `true` at create time or run time." - }, - "readOnly": { - "type": "boolean", - "description": "Specifies how a sourced-base persistent disk will be mounted. See https://cloud.google.com/compute/docs/disks/persistent-disks#use_multi_instances for more details. Can only be set at create time." - }, - "mountPoint": { - "type": "string", - "description": "Required at create time and cannot be overridden at run time. Specifies the path in the docker container where files on this disk should be located. For example, if `mountPoint` is `/mnt/disk`, and the parameter has `localPath` `inputs/file.txt`, the docker container can access the data at `/mnt/disk/inputs/file.txt`." - } - } - }, - "RunPipelineRequest": { - "id": "RunPipelineRequest", - "type": "object", - "description": "The request to run a pipeline. If `pipelineId` is specified, it refers to a saved pipeline created with CreatePipeline and set as the `pipelineId` of the returned Pipeline object. If `ephemeralPipeline` is specified, that pipeline is run once with the given args and not saved. It is an error to specify both `pipelineId` and `ephemeralPipeline`. `pipelineArgs` must be specified.", - "properties": { - "pipelineId": { - "type": "string", - "description": "The already created pipeline to run." - }, - "ephemeralPipeline": { - "$ref": "Pipeline", - "description": "A new pipeline object to run once and then delete." - }, - "pipelineArgs": { - "$ref": "RunPipelineArgs", - "description": "The arguments to use when running this pipeline." - } - } - }, - "RunPipelineArgs": { - "id": "RunPipelineArgs", - "type": "object", - "description": "The pipeline run arguments.", - "properties": { - "projectId": { - "type": "string", - "description": "Required. The project in which to run the pipeline. The caller must have WRITER access to all Google Cloud services and resources (e.g. Google Compute Engine) will be used." - }, - "inputs": { - "type": "object", - "description": "Pipeline input arguments; keys are defined in the pipeline documentation. All input parameters that do not have default values must be specified. If parameters with defaults are specified here, the defaults will be overridden.", - "additionalProperties": { - "type": "string" - } - }, - "outputs": { - "type": "object", - "description": "Pipeline output arguments; keys are defined in the pipeline documentation. All output parameters of without default values must be specified. If parameters with defaults are specified here, the defaults will be overridden.", - "additionalProperties": { - "type": "string" - } - }, - "serviceAccount": { - "$ref": "ServiceAccount", - "description": "The Google Cloud Service Account that will be used to access data and services. By default, the compute service account associated with `projectId` is used." - }, - "clientId": { - "type": "string", - "description": "This field is deprecated. Use `labels` instead. Client-specified pipeline operation identifier." - }, - "resources": { - "$ref": "PipelineResources", - "description": "Specifies resource requirements/overrides for the pipeline run." - }, - "logging": { - "$ref": "LoggingOptions", - "description": "Required. Logging options. Used by the service to communicate results to the user." - }, - "keepVmAliveOnFailureDuration": { - "type": "string", - "description": "How long to keep the VM up after a failure (for example docker command failed, copying input or output files failed, etc). While the VM is up, one can ssh into the VM to debug. Default is 0; maximum allowed value is 1 day." - }, - "labels": { - "type": "object", - "description": "Labels to apply to this pipeline run. Labels will also be applied to compute resources (VM, disks) created by this pipeline run. When listing operations, operations can filtered by labels. Label keys may not be empty; label values may be empty. Non-empty labels must be 1-63 characters long, and comply with [RFC1035] (https://www.ietf.org/rfc/rfc1035.txt). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ServiceAccount": { - "id": "ServiceAccount", - "type": "object", - "description": "A Google Cloud Service Account.", - "properties": { - "email": { - "type": "string", - "description": "Email address of the service account. Defaults to `default`, which uses the compute service account associated with the project." - }, - "scopes": { - "type": "array", - "description": "List of scopes to be enabled for this service account on the VM. The following scopes are automatically included: * https://www.googleapis.com/auth/compute * https://www.googleapis.com/auth/devstorage.full_control * https://www.googleapis.com/auth/genomics * https://www.googleapis.com/auth/logging.write * https://www.googleapis.com/auth/monitoring.write", - "items": { - "type": "string" - } - } - } - }, - "LoggingOptions": { - "id": "LoggingOptions", - "type": "object", - "description": "The logging options for the pipeline run.", - "properties": { - "gcsPath": { - "type": "string", - "description": "The location in Google Cloud Storage to which the pipeline logs will be copied. Can be specified as a fully qualified directory path, in which case logs will be output with a unique identifier as the filename in that directory, or as a fully specified path, which must end in `.log`, in which case that path will be used, and the user must ensure that logs are not overwritten. Stdout and stderr logs from the run are also generated and output as `-stdout.log` and `-stderr.log`." - } - } - }, - "ListPipelinesResponse": { - "id": "ListPipelinesResponse", - "type": "object", - "description": "The response of ListPipelines. Contains at most `pageSize` pipelines. If it contains `pageSize` pipelines, and more pipelines exist, then `nextPageToken` will be populated and should be used as the `pageToken` argument to a subsequent ListPipelines request.", - "properties": { + "ownerDomain": "google.com", + "name": "genomics", + "batchPath": "batch", + "id": "genomics:v1alpha2", + "documentationLink": "https://cloud.google.com/genomics", + "revision": "20170520", + "title": "Genomics API", + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { "pipelines": { - "type": "array", - "description": "The matched pipelines.", - "items": { - "$ref": "Pipeline" - } - }, - "nextPageToken": { - "type": "string", - "description": "The token to use to get the next page of results." - } - } - }, - "ControllerConfig": { - "id": "ControllerConfig", - "type": "object", - "description": "Stores the information that the controller will fetch from the server in order to run. Should only be used by VMs created by the Pipelines Service and not by end users.", - "properties": { - "image": { - "type": "string" - }, - "cmd": { - "type": "string" - }, - "gcsLogPath": { - "type": "string" - }, - "machineType": { - "type": "string" - }, - "vars": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "disks": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "gcsSources": { - "type": "object", - "additionalProperties": { - "$ref": "RepeatedString" - } - }, - "gcsSinks": { - "type": "object", - "additionalProperties": { - "$ref": "RepeatedString" - } - } - } - }, - "RepeatedString": { - "id": "RepeatedString", - "type": "object", - "properties": { - "values": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "SetOperationStatusRequest": { - "id": "SetOperationStatusRequest", - "type": "object", - "description": "Request to set operation status. Should only be used by VMs created by the Pipelines Service and not by end users.", - "properties": { - "operationId": { - "type": "string" - }, - "timestampEvents": { - "type": "array", - "items": { - "$ref": "TimestampEvent" - } - }, - "errorCode": { - "type": "string", - "enum": [ - "OK", - "CANCELLED", - "UNKNOWN", - "INVALID_ARGUMENT", - "DEADLINE_EXCEEDED", - "NOT_FOUND", - "ALREADY_EXISTS", - "PERMISSION_DENIED", - "UNAUTHENTICATED", - "RESOURCE_EXHAUSTED", - "FAILED_PRECONDITION", - "ABORTED", - "OUT_OF_RANGE", - "UNIMPLEMENTED", - "INTERNAL", - "UNAVAILABLE", - "DATA_LOSS" - ] - }, - "errorMessage": { - "type": "string" - }, - "validationToken": { - "type": "string", - "format": "uint64" - } - } - }, - "TimestampEvent": { - "id": "TimestampEvent", - "type": "object", - "description": "Stores the list of events and times they occured for major events in job execution.", - "properties": { - "description": { - "type": "string", - "description": "String indicating the type of event" - }, - "timestamp": { - "type": "string", - "description": "The time this event occured." - } - } - }, - "ImportReadGroupSetsResponse": { - "id": "ImportReadGroupSetsResponse", - "type": "object", - "description": "The read group set import response.", - "properties": { - "readGroupSetIds": { - "type": "array", - "description": "IDs of the read group sets that were created.", - "items": { - "type": "string" - } - } - } - }, - "ImportVariantsResponse": { - "id": "ImportVariantsResponse", - "type": "object", - "description": "The variant data import response.", - "properties": { - "callSetIds": { - "type": "array", - "description": "IDs of the call sets created during the import.", - "items": { - "type": "string" - } - } - } - }, - "OperationMetadata": { - "id": "OperationMetadata", - "type": "object", - "description": "Metadata describing an Operation.", - "properties": { - "projectId": { - "type": "string", - "description": "The Google Cloud Project in which the job is scoped." - }, - "createTime": { - "type": "string", - "description": "The time at which the job was submitted to the Genomics service." - }, - "startTime": { - "type": "string", - "description": "The time at which the job began to run." - }, - "endTime": { - "type": "string", - "description": "The time at which the job stopped running." - }, - "request": { - "type": "object", - "description": "The original request that started the operation. Note that this will be in current version of the API. If the operation was started with v1beta2 API and a GetOperation is performed on v1 API, a v1 request will be returned.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "events": { - "type": "array", - "description": "Optional event messages that were generated during the job's execution. This also contains any warnings that were generated during import or export.", - "items": { - "$ref": "OperationEvent" - } - }, - "clientId": { - "type": "string", - "description": "This field is deprecated. Use `labels` instead. Optionally provided by the caller when submitting the request that creates the operation." - }, - "runtimeMetadata": { - "type": "object", - "description": "Runtime metadata on this Operation.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "labels": { - "type": "object", - "description": "Optionally provided by the caller when submitting the request that creates the operation.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "OperationEvent": { - "id": "OperationEvent", - "type": "object", - "description": "An event that occurred during an Operation.", - "properties": { - "startTime": { - "type": "string", - "description": "Optional time of when event started." - }, - "endTime": { - "type": "string", - "description": "Optional time of when event finished. An event can have a start time and no finish time. If an event has a finish time, there must be a start time." - }, - "description": { - "type": "string", - "description": "Required description of event." - } - } - }, - "RuntimeMetadata": { - "id": "RuntimeMetadata", - "type": "object", - "description": "Runtime metadata that will be populated in the runtimeMetadata field of the Operation associated with a RunPipeline execution.", - "properties": { - "computeEngine": { - "$ref": "ComputeEngine", - "description": "Execution information specific to Google Compute Engine." - } - } - }, - "ComputeEngine": { - "id": "ComputeEngine", - "type": "object", - "description": "Describes a Compute Engine resource that is being managed by a running pipeline.", - "properties": { - "instanceName": { - "type": "string", - "description": "The instance on which the operation is running." - }, - "zone": { - "type": "string", - "description": "The availability zone in which the instance resides." - }, - "machineType": { - "type": "string", - "description": "The machine type of the instance." - }, - "diskNames": { - "type": "array", - "description": "The names of the disks that were created for this pipeline.", - "items": { - "type": "string" - } - } - } - } - }, - "resources": { - "operations": { - "methods": { - "list": { - "id": "genomics.operations.list", - "path": "v1alpha2/{+name}", - "httpMethod": "GET", - "description": "Lists operations that match the specified filter in the request.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation collection.", - "required": true, - "pattern": "^operations$", - "location": "path" - }, - "filter": { - "type": "string", - "description": "A string for filtering Operations. The following filter fields are supported: * projectId: Required. Corresponds to OperationMetadata.projectId. * createTime: The time this job was created, in seconds from the [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `\u003e=` and/or `= 1432140000` * `projectId = my-project AND createTime \u003e= 1432140000 AND createTime \u003c= 1432150000 AND status = RUNNING` * `projectId = my-project AND labels.color = *` * `projectId = my-project AND labels.color = red`", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of results to return. If unspecified, defaults to 256. The maximum value is 2048.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" + "methods": { + "setOperationStatus": { + "request": { + "$ref": "SetOperationStatusRequest" + }, + "description": "Sets status of a given operation. Any new timestamps (as determined by\ndescription) are appended to TimestampEvents. Should only be called by VMs\ncreated by the Pipelines Service and not by end users.", + "httpMethod": "PUT", + "parameterOrder": [], + "response": { + "$ref": "Empty" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1alpha2/pipelines:setOperationStatus", + "id": "genomics.pipelines.setOperationStatus", + "path": "v1alpha2/pipelines:setOperationStatus" + }, + "delete": { + "flatPath": "v1alpha2/pipelines/{pipelineId}", + "id": "genomics.pipelines.delete", + "path": "v1alpha2/pipelines/{pipelineId}", + "description": "Deletes a pipeline based on ID.\n\nCaller must have WRITE permission to the project.", + "httpMethod": "DELETE", + "parameterOrder": [ + "pipelineId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "pipelineId": { + "required": true, + "type": "string", + "location": "path", + "description": "Caller must have WRITE access to the project in which this pipeline\nis defined." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ] + }, + "getControllerConfig": { + "response": { + "$ref": "ControllerConfig" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "operationId": { + "location": "query", + "description": "The operation to retrieve controller configuration for.", + "type": "string" + }, + "validationToken": { + "location": "query", + "format": "uint64", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1alpha2/pipelines:getControllerConfig", + "path": "v1alpha2/pipelines:getControllerConfig", + "id": "genomics.pipelines.getControllerConfig", + "description": "Gets controller configuration information. Should only be called\nby VMs created by the Pipelines Service and not by end users." + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListPipelinesResponse" + }, + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "namePrefix": { + "location": "query", + "description": "Pipelines with names that match this prefix should be\nreturned. If unspecified, all pipelines in the project, up to\n`pageSize`, will be returned.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Token to use to indicate where to start getting results.\nIf unspecified, returns the first page of results.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "Number of pipelines to return at once. Defaults to 256, and max\nis 2048.", + "format": "int32" + }, + "projectId": { + "location": "query", + "description": "Required. The name of the project to search for pipelines. Caller\nmust have READ access to this project.", + "type": "string" + } + }, + "flatPath": "v1alpha2/pipelines", + "id": "genomics.pipelines.list", + "path": "v1alpha2/pipelines", + "description": "Lists pipelines.\n\nCaller must have READ permission to the project." + }, + "create": { + "description": "Creates a pipeline that can be run later. Create takes a Pipeline that\nhas all fields other than `pipelineId` populated, and then returns\nthe same pipeline with `pipelineId` populated. This id can be used\nto run the pipeline.\n\nCaller must have WRITE permission to the project.", + "request": { + "$ref": "Pipeline" + }, + "response": { + "$ref": "Pipeline" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": {}, + "flatPath": "v1alpha2/pipelines", + "path": "v1alpha2/pipelines", + "id": "genomics.pipelines.create" + }, + "run": { + "description": "Runs a pipeline. If `pipelineId` is specified in the request, then\nrun a saved pipeline. If `ephemeralPipeline` is specified, then run\nthat pipeline once without saving a copy.\n\nThe caller must have READ permission to the project where the pipeline\nis stored and WRITE permission to the project where the pipeline will be\nrun, as VMs will be created and storage will be used.\n\nIf a pipeline operation is still running after 6 days, it will be canceled.", + "request": { + "$ref": "RunPipelineRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": {}, + "flatPath": "v1alpha2/pipelines:run", + "id": "genomics.pipelines.run", + "path": "v1alpha2/pipelines:run" + }, + "get": { + "description": "Retrieves a pipeline based on ID.\n\nCaller must have READ permission to the project.", + "httpMethod": "GET", + "response": { + "$ref": "Pipeline" + }, + "parameterOrder": [ + "pipelineId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "parameters": { + "pipelineId": { + "location": "path", + "description": "Caller must have READ access to the project in which this pipeline\nis defined.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1alpha2/pipelines/{pipelineId}", + "id": "genomics.pipelines.get", + "path": "v1alpha2/pipelines/{pipelineId}" + } } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] }, - "get": { - "id": "genomics.operations.get", - "path": "v1alpha2/{+name}", - "httpMethod": "GET", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" + "operations": { + "methods": { + "cancel": { + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string", + "pattern": "^operations/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1alpha2/operations/{operationsId}:cancel", + "path": "v1alpha2/{+name}:cancel", + "id": "genomics.operations.cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation collection.", + "required": true, + "type": "string", + "pattern": "^operations$" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "The maximum number of results to return. If unspecified, defaults to\n256. The maximum value is 2048.", + "format": "int32", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "A string for filtering Operations.\nThe following filter fields are supported:\n\n* projectId: Required. Corresponds to\n OperationMetadata.projectId.\n* createTime: The time this job was created, in seconds from the\n [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `\u003e=` and/or `\u003c=`\n operators.\n* status: Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only\n one status may be specified.\n* labels.key where key is a label key.\n\nExamples:\n\n* `projectId = my-project AND createTime \u003e= 1432140000`\n* `projectId = my-project AND createTime \u003e= 1432140000 AND createTime \u003c= 1432150000 AND status = RUNNING`\n* `projectId = my-project AND labels.color = *`\n* `projectId = my-project AND labels.color = red`", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1alpha2/operations", + "id": "genomics.operations.list", + "path": "v1alpha2/{+name}", + "description": "Lists operations that match the specified filter in the request." + }, + "get": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^operations/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/genomics" + ], + "flatPath": "v1alpha2/operations/{operationsId}", + "id": "genomics.operations.get", + "path": "v1alpha2/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + } } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] - }, - "cancel": { - "id": "genomics.operations.cancel", - "path": "v1alpha2/{+name}:cancel", - "httpMethod": "POST", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be cancelled.", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] } - } }, - "pipelines": { - "methods": { - "create": { - "id": "genomics.pipelines.create", - "path": "v1alpha2/pipelines", - "httpMethod": "POST", - "description": "Creates a pipeline that can be run later. Create takes a Pipeline that has all fields other than `pipelineId` populated, and then returns the same pipeline with `pipelineId` populated. This id can be used to run the pipeline. Caller must have WRITE permission to the project.", - "request": { - "$ref": "Pipeline" - }, - "response": { - "$ref": "Pipeline" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "parameters": { + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" }, - "run": { - "id": "genomics.pipelines.run", - "path": "v1alpha2/pipelines:run", - "httpMethod": "POST", - "description": "Runs a pipeline. If `pipelineId` is specified in the request, then run a saved pipeline. If `ephemeralPipeline` is specified, then run that pipeline once without saving a copy. The caller must have READ permission to the project where the pipeline is stored and WRITE permission to the project where the pipeline will be run, as VMs will be created and storage will be used.", - "request": { - "$ref": "RunPipelineRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/genomics" - ] + "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" }, - "get": { - "id": "genomics.pipelines.get", - "path": "v1alpha2/pipelines/{pipelineId}", - "httpMethod": "GET", - "description": "Retrieves a pipeline based on ID. Caller must have READ permission to the project.", - "parameters": { - "pipelineId": { - "type": "string", - "description": "Caller must have READ access to the project in which this pipeline is defined.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "pipelineId" - ], - "response": { - "$ref": "Pipeline" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "quotaUser": { + "location": "query", + "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" }, - "list": { - "id": "genomics.pipelines.list", - "path": "v1alpha2/pipelines", - "httpMethod": "GET", - "description": "Lists pipelines. Caller must have READ permission to the project.", - "parameters": { - "projectId": { - "type": "string", - "description": "Required. The name of the project to search for pipelines. Caller must have READ access to this project.", - "location": "query" - }, - "namePrefix": { - "type": "string", - "description": "Pipelines with names that match this prefix should be returned. If unspecified, all pipelines in the project, up to `pageSize`, will be returned.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Number of pipelines to return at once. Defaults to 256, and max is 2048.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Token to use to indicate where to start getting results. If unspecified, returns the first page of results.", - "location": "query" - } - }, - "response": { - "$ref": "ListPipelinesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" }, - "delete": { - "id": "genomics.pipelines.delete", - "path": "v1alpha2/pipelines/{pipelineId}", - "httpMethod": "DELETE", - "description": "Deletes a pipeline based on ID. Caller must have WRITE permission to the project.", - "parameters": { - "pipelineId": { - "type": "string", - "description": "Caller must have WRITE access to the project in which this pipeline is defined.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "pipelineId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" }, - "getControllerConfig": { - "id": "genomics.pipelines.getControllerConfig", - "path": "v1alpha2/pipelines:getControllerConfig", - "httpMethod": "GET", - "description": "Gets controller configuration information. Should only be called by VMs created by the Pipelines Service and not by end users.", - "parameters": { - "operationId": { - "type": "string", - "description": "The operation to retrieve controller configuration for.", - "location": "query" - }, - "validationToken": { - "type": "string", - "format": "uint64", - "location": "query" - } - }, - "response": { - "$ref": "ControllerConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" }, - "setOperationStatus": { - "id": "genomics.pipelines.setOperationStatus", - "path": "v1alpha2/pipelines:setOperationStatus", - "httpMethod": "PUT", - "description": "Sets status of a given operation. Any new timestamps (as determined by description) are appended to TimestampEvents. Should only be called by VMs created by the Pipelines Service and not by end users.", - "request": { - "$ref": "SetOperationStatusRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/genomics" - ] + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Returns response with indentations and line breaks." + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" } - } - } - } + }, + "schemas": { + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "code": { + "type": "integer", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "ServiceAccount": { + "description": "A Google Cloud Service Account.", + "type": "object", + "properties": { + "email": { + "description": "Email address of the service account. Defaults to `default`,\nwhich uses the compute service account associated with the project.", + "type": "string" + }, + "scopes": { + "description": "List of scopes to be enabled for this service account on the VM.\nThe following scopes are automatically included:\n\n* https://www.googleapis.com/auth/compute\n* https://www.googleapis.com/auth/devstorage.full_control\n* https://www.googleapis.com/auth/genomics\n* https://www.googleapis.com/auth/logging.write\n* https://www.googleapis.com/auth/monitoring.write", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ServiceAccount" + }, + "PipelineResources": { + "id": "PipelineResources", + "description": "The system resources for the pipeline run.", + "type": "object", + "properties": { + "zones": { + "description": "List of Google Compute Engine availability zones to which resource\ncreation will restricted. If empty, any zone may be chosen.", + "type": "array", + "items": { + "type": "string" + } + }, + "minimumCpuCores": { + "description": "The minimum number of cores to use. Defaults to 1.", + "format": "int32", + "type": "integer" + }, + "noAddress": { + "description": "Whether to assign an external IP to the instance. This is an experimental\nfeature that may go away. Defaults to false.\nCorresponds to `--no_address` flag for [gcloud compute instances create]\n(https://cloud.google.com/sdk/gcloud/reference/compute/instances/create).\nIn order to use this, must be true for both create time and run time.\nCannot be true at run time if false at create time. If you need to ssh into\na private IP VM for debugging, you can ssh to a public VM and then ssh into\nthe private VM's Internal IP. If noAddress is set, this pipeline run may\nonly load docker images from Google Container Registry and not Docker Hub.\nBefore using this, you must\n[configure access to Google services from internal IPs](https://cloud.google.com/compute/docs/configure-private-google-access#configuring_access_to_google_services_from_internal_ips).", + "type": "boolean" + }, + "disks": { + "type": "array", + "items": { + "$ref": "Disk" + }, + "description": "Disks to attach." + }, + "bootDiskSizeGb": { + "description": "The size of the boot disk. Defaults to 10 (GB).", + "format": "int32", + "type": "integer" + }, + "preemptible": { + "description": "Whether to use preemptible VMs. Defaults to `false`. In order to use this,\nmust be true for both create time and run time. Cannot be true at run time\nif false at create time.", + "type": "boolean" + }, + "minimumRamGb": { + "description": "The minimum amount of RAM to use. Defaults to 3.75 (GB)", + "format": "double", + "type": "number" + } + } + }, + "Pipeline": { + "properties": { + "resources": { + "description": "Required. Specifies resource requirements for the pipeline run.\nRequired fields:\n\n*\nminimumCpuCores\n\n*\nminimumRamGb", + "$ref": "PipelineResources" + }, + "name": { + "description": "Required. A user specified pipeline name that does not have to be unique.\nThis name can be used for filtering Pipelines in ListPipelines.", + "type": "string" + }, + "projectId": { + "type": "string", + "description": "Required. The project in which to create the pipeline. The caller must have\nWRITE access." + }, + "pipelineId": { + "description": "Unique pipeline id that is generated by the service when CreatePipeline\nis called. Cannot be specified in the Pipeline used in the\nCreatePipelineRequest, and will be populated in the response to\nCreatePipeline and all subsequent Get and List calls. Indicates that the\nservice has registered this pipeline.", + "type": "string" + }, + "outputParameters": { + "description": "Output parameters of the pipeline.", + "type": "array", + "items": { + "$ref": "PipelineParameter" + } + }, + "description": { + "description": "User-specified description.", + "type": "string" + }, + "docker": { + "$ref": "DockerExecutor", + "description": "Specifies the docker run information." + }, + "inputParameters": { + "description": "Input parameters of the pipeline.", + "type": "array", + "items": { + "$ref": "PipelineParameter" + } + } + }, + "id": "Pipeline", + "description": "The pipeline object. Represents a transformation from a set of input\nparameters to a set of output parameters. The transformation is defined\nas a docker image and command to run within that image. Each pipeline\nis run on a Google Compute Engine VM. A pipeline can be created with the\n`create` method and then later run with the `run` method, or a pipeline can\nbe defined and run all at once with the `run` method.", + "type": "object" + }, + "ControllerConfig": { + "description": "Stores the information that the controller will fetch from the\nserver in order to run. Should only be used by VMs created by the\nPipelines Service and not by end users.", + "type": "object", + "properties": { + "vars": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "image": { + "type": "string" + }, + "gcsLogPath": { + "type": "string" + }, + "gcsSources": { + "additionalProperties": { + "$ref": "RepeatedString" + }, + "type": "object" + }, + "gcsSinks": { + "type": "object", + "additionalProperties": { + "$ref": "RepeatedString" + } + }, + "disks": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "machineType": { + "type": "string" + }, + "cmd": { + "type": "string" + } + }, + "id": "ControllerConfig" + }, + "OperationEvent": { + "type": "object", + "properties": { + "endTime": { + "description": "Optional time of when event finished. An event can have a start time and no\nfinish time. If an event has a finish time, there must be a start time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Optional time of when event started.", + "format": "google-datetime", + "type": "string" + }, + "description": { + "description": "Required description of event.", + "type": "string" + } + }, + "id": "OperationEvent", + "description": "An event that occurred during an Operation." + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } + } + }, + "id": "ListOperationsResponse" + }, + "RepeatedString": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "RepeatedString" + }, + "OperationMetadata": { + "description": "Metadata describing an Operation.", + "type": "object", + "properties": { + "endTime": { + "description": "The time at which the job stopped running.", + "format": "google-datetime", + "type": "string" + }, + "events": { + "type": "array", + "items": { + "$ref": "OperationEvent" + }, + "description": "Optional event messages that were generated during the job's execution.\nThis also contains any warnings that were generated during import\nor export." + }, + "startTime": { + "description": "The time at which the job began to run.", + "format": "google-datetime", + "type": "string" + }, + "request": { + "description": "The original request that started the operation. Note that this will be in\ncurrent version of the API. If the operation was started with v1beta2 API\nand a GetOperation is performed on v1 API, a v1 request will be returned.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "runtimeMetadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Runtime metadata on this Operation.", + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optionally provided by the caller when submitting the request that creates\nthe operation.", + "type": "object" + }, + "createTime": { + "description": "The time at which the job was submitted to the Genomics service.", + "format": "google-datetime", + "type": "string" + }, + "projectId": { + "type": "string", + "description": "The Google Cloud Project in which the job is scoped." + }, + "clientId": { + "description": "This field is deprecated. Use `labels` instead. Optionally provided by the\ncaller when submitting the request that creates the operation.", + "type": "string" + } + }, + "id": "OperationMetadata" + }, + "RunPipelineArgs": { + "description": "The pipeline run arguments.", + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "This field is deprecated. Use `labels` instead. Client-specified pipeline\noperation identifier." + }, + "serviceAccount": { + "description": "The Google Cloud Service Account that will be used to access data and\nservices. By default, the compute service account associated with\n`projectId` is used.", + "$ref": "ServiceAccount" + }, + "inputs": { + "additionalProperties": { + "type": "string" + }, + "description": "Pipeline input arguments; keys are defined in the pipeline documentation.\nAll input parameters that do not have default values must be specified.\nIf parameters with defaults are specified here, the defaults will be\noverridden.", + "type": "object" + }, + "logging": { + "description": "Required. Logging options. Used by the service to communicate results\nto the user.", + "$ref": "LoggingOptions" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to this pipeline run. Labels will also be applied to\ncompute resources (VM, disks) created by this pipeline run. When listing\noperations, operations can filtered by labels.\nLabel keys may not be empty; label values may be empty. Non-empty labels\nmust be 1-63 characters long, and comply with [RFC1035]\n(https://www.ietf.org/rfc/rfc1035.txt).\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash." + }, + "keepVmAliveOnFailureDuration": { + "description": "How long to keep the VM up after a failure (for example docker command\nfailed, copying input or output files failed, etc). While the VM is up, one\ncan ssh into the VM to debug. Default is 0; maximum allowed value is 1 day.", + "format": "google-duration", + "type": "string" + }, + "resources": { + "description": "Specifies resource requirements/overrides for the pipeline run.", + "$ref": "PipelineResources" + }, + "outputs": { + "additionalProperties": { + "type": "string" + }, + "description": "Pipeline output arguments; keys are defined in the pipeline\ndocumentation. All output parameters of without default values\nmust be specified. If parameters with defaults are specified\nhere, the defaults will be overridden.", + "type": "object" + }, + "projectId": { + "description": "Required. The project in which to run the pipeline. The caller must have\nWRITER access to all Google Cloud services and resources (e.g. Google\nCompute Engine) will be used.", + "type": "string" + } + }, + "id": "RunPipelineArgs" + }, + "ListPipelinesResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "The token to use to get the next page of results." + }, + "pipelines": { + "description": "The matched pipelines.", + "type": "array", + "items": { + "$ref": "Pipeline" + } + } + }, + "id": "ListPipelinesResponse", + "description": "The response of ListPipelines. Contains at most `pageSize`\npipelines. If it contains `pageSize` pipelines, and more pipelines\nexist, then `nextPageToken` will be populated and should be\nused as the `pageToken` argument to a subsequent ListPipelines\nrequest." + }, + "SetOperationStatusRequest": { + "id": "SetOperationStatusRequest", + "description": "Request to set operation status. Should only be used by VMs\ncreated by the Pipelines Service and not by end users.", + "type": "object", + "properties": { + "operationId": { + "type": "string" + }, + "errorMessage": { + "type": "string" + }, + "validationToken": { + "format": "uint64", + "type": "string" + }, + "errorCode": { + "type": "string", + "enumDescriptions": [ + "Not an error; returned on success\n\nHTTP Mapping: 200 OK", + "The operation was cancelled, typically by the caller.\n\nHTTP Mapping: 499 Client Closed Request", + "Unknown error. For example, this error may be returned when\na `Status` value received from another address space belongs to\nan error space that is not known in this address space. Also\nerrors raised by APIs that do not return enough error information\nmay be converted to this error.\n\nHTTP Mapping: 500 Internal Server Error", + "The client specified an invalid argument. Note that this differs\nfrom `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments\nthat are problematic regardless of the state of the system\n(e.g., a malformed file name).\n\nHTTP Mapping: 400 Bad Request", + "The deadline expired before the operation could complete. For operations\nthat change the state of the system, this error may be returned\neven if the operation has completed successfully. For example, a\nsuccessful response from a server could have been delayed long\nenough for the deadline to expire.\n\nHTTP Mapping: 504 Gateway Timeout", + "Some requested entity (e.g., file or directory) was not found.\n\nNote to server developers: if a request is denied for an entire class\nof users, such as gradual feature rollout or undocumented whitelist,\n`NOT_FOUND` may be used. If a request is denied for some users within\na class of users, such as user-based access control, `PERMISSION_DENIED`\nmust be used.\n\nHTTP Mapping: 404 Not Found", + "The entity that a client attempted to create (e.g., file or directory)\nalready exists.\n\nHTTP Mapping: 409 Conflict", + "The caller does not have permission to execute the specified\noperation. `PERMISSION_DENIED` must not be used for rejections\ncaused by exhausting some resource (use `RESOURCE_EXHAUSTED`\ninstead for those errors). `PERMISSION_DENIED` must not be\nused if the caller can not be identified (use `UNAUTHENTICATED`\ninstead for those errors). This error code does not imply the\nrequest is valid or the requested entity exists or satisfies\nother pre-conditions.\n\nHTTP Mapping: 403 Forbidden", + "The request does not have valid authentication credentials for the\noperation.\n\nHTTP Mapping: 401 Unauthorized", + "Some resource has been exhausted, perhaps a per-user quota, or\nperhaps the entire file system is out of space.\n\nHTTP Mapping: 429 Too Many Requests", + "The operation was rejected because the system is not in a state\nrequired for the operation's execution. For example, the directory\nto be deleted is non-empty, an rmdir operation is applied to\na non-directory, etc.\n\nService implementors can use the following guidelines to decide\nbetween `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:\n (a) Use `UNAVAILABLE` if the client can retry just the failing call.\n (b) Use `ABORTED` if the client should retry at a higher level\n (e.g., when a client-specified test-and-set fails, indicating the\n client should restart a read-modify-write sequence).\n (c) Use `FAILED_PRECONDITION` if the client should not retry until\n the system state has been explicitly fixed. E.g., if an \"rmdir\"\n fails because the directory is non-empty, `FAILED_PRECONDITION`\n should be returned since the client should not retry unless\n the files are deleted from the directory.\n\nHTTP Mapping: 400 Bad Request", + "The operation was aborted, typically due to a concurrency issue such as\na sequencer check failure or transaction abort.\n\nSee the guidelines above for deciding between `FAILED_PRECONDITION`,\n`ABORTED`, and `UNAVAILABLE`.\n\nHTTP Mapping: 409 Conflict", + "The operation was attempted past the valid range. E.g., seeking or\nreading past end-of-file.\n\nUnlike `INVALID_ARGUMENT`, this error indicates a problem that may\nbe fixed if the system state changes. For example, a 32-bit file\nsystem will generate `INVALID_ARGUMENT` if asked to read at an\noffset that is not in the range [0,2^32-1], but it will generate\n`OUT_OF_RANGE` if asked to read from an offset past the current\nfile size.\n\nThere is a fair bit of overlap between `FAILED_PRECONDITION` and\n`OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific\nerror) when it applies so that callers who are iterating through\na space can easily look for an `OUT_OF_RANGE` error to detect when\nthey are done.\n\nHTTP Mapping: 400 Bad Request", + "The operation is not implemented or is not supported/enabled in this\nservice.\n\nHTTP Mapping: 501 Not Implemented", + "Internal errors. This means that some invariants expected by the\nunderlying system have been broken. This error code is reserved\nfor serious errors.\n\nHTTP Mapping: 500 Internal Server Error", + "The service is currently unavailable. This is most likely a\ntransient condition, which can be corrected by retrying with\na backoff.\n\nSee the guidelines above for deciding between `FAILED_PRECONDITION`,\n`ABORTED`, and `UNAVAILABLE`.\n\nHTTP Mapping: 503 Service Unavailable", + "Unrecoverable data loss or corruption.\n\nHTTP Mapping: 500 Internal Server Error" + ], + "enum": [ + "OK", + "CANCELLED", + "UNKNOWN", + "INVALID_ARGUMENT", + "DEADLINE_EXCEEDED", + "NOT_FOUND", + "ALREADY_EXISTS", + "PERMISSION_DENIED", + "UNAUTHENTICATED", + "RESOURCE_EXHAUSTED", + "FAILED_PRECONDITION", + "ABORTED", + "OUT_OF_RANGE", + "UNIMPLEMENTED", + "INTERNAL", + "UNAVAILABLE", + "DATA_LOSS" + ] + }, + "timestampEvents": { + "type": "array", + "items": { + "$ref": "TimestampEvent" + } + } + } + }, + "ImportVariantsResponse": { + "description": "The variant data import response.", + "type": "object", + "properties": { + "callSetIds": { + "description": "IDs of the call sets created during the import.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ImportVariantsResponse" + }, + "ComputeEngine": { + "properties": { + "machineType": { + "description": "The machine type of the instance.", + "type": "string" + }, + "diskNames": { + "description": "The names of the disks that were created for this pipeline.", + "type": "array", + "items": { + "type": "string" + } + }, + "instanceName": { + "description": "The instance on which the operation is running.", + "type": "string" + }, + "zone": { + "description": "The availability zone in which the instance resides.", + "type": "string" + } + }, + "id": "ComputeEngine", + "description": "Describes a Compute Engine resource that is being managed by a running\npipeline.", + "type": "object" + }, + "TimestampEvent": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "String indicating the type of event" + }, + "timestamp": { + "description": "The time this event occured.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "TimestampEvent", + "description": "Stores the list of events and times they occured for major events in job\nexecution." + }, + "LocalCopy": { + "description": "LocalCopy defines how a remote file should be copied to and from the VM.", + "type": "object", + "properties": { + "disk": { + "description": "Required. The name of the disk where this parameter is\nlocated. Can be the name of one of the disks specified in the\nResources field, or \"boot\", which represents the Docker\ninstance's boot disk and has a mount point of `/`.", + "type": "string" + }, + "path": { + "description": "Required. The path within the user's docker container where\nthis input should be localized to and from, relative to the specified\ndisk's mount point. For example: file.txt,", + "type": "string" + } + }, + "id": "LocalCopy" + }, + "DockerExecutor": { + "id": "DockerExecutor", + "description": "The Docker execuctor specification.", + "type": "object", + "properties": { + "cmd": { + "description": "Required. The command or newline delimited script to run. The command\nstring will be executed within a bash shell.\n\nIf the command exits with a non-zero exit code, output parameter\nde-localization will be skipped and the pipeline operation's\n`error` field will be populated.\n\nMaximum command string length is 16384.", + "type": "string" + }, + "imageName": { + "description": "Required. Image name from either Docker Hub or Google Container Registry.\nUsers that run pipelines must have READ access to the image.", + "type": "string" + } + } + }, + "Disk": { + "description": "A Google Compute Engine disk resource specification.", + "type": "object", + "properties": { + "autoDelete": { + "description": "Deprecated. Disks created by the Pipelines API will be deleted at the end\nof the pipeline run, regardless of what this field is set to.", + "type": "boolean" + }, + "sizeGb": { + "description": "The size of the disk. Defaults to 500 (GB).\nThis field is not applicable for local SSD.", + "format": "int32", + "type": "integer" + }, + "mountPoint": { + "description": "Required at create time and cannot be overridden at run time.\nSpecifies the path in the docker container where files on\nthis disk should be located. For example, if `mountPoint`\nis `/mnt/disk`, and the parameter has `localPath`\n`inputs/file.txt`, the docker container can access the data at\n`/mnt/disk/inputs/file.txt`.", + "type": "string" + }, + "readOnly": { + "description": "Specifies how a sourced-base persistent disk will be mounted. See\nhttps://cloud.google.com/compute/docs/disks/persistent-disks#use_multi_instances\nfor more details.\nCan only be set at create time.", + "type": "boolean" + }, + "source": { + "description": "The full or partial URL of the persistent disk to attach. See\nhttps://cloud.google.com/compute/docs/reference/latest/instances#resource\nand\nhttps://cloud.google.com/compute/docs/disks/persistent-disks#snapshots\nfor more details.", + "type": "string" + }, + "name": { + "description": "Required. The name of the disk that can be used in the pipeline\nparameters. Must be 1 - 63 characters.\nThe name \"boot\" is reserved for system use.", + "type": "string" + }, + "type": { + "enumDescriptions": [ + "Default disk type. Use one of the other options below.", + "Specifies a Google Compute Engine persistent hard disk. See\nhttps://cloud.google.com/compute/docs/disks/#pdspecs for details.", + "Specifies a Google Compute Engine persistent solid-state disk. See\nhttps://cloud.google.com/compute/docs/disks/#pdspecs for details.", + "Specifies a Google Compute Engine local SSD.\nSee https://cloud.google.com/compute/docs/disks/local-ssd for details." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "PERSISTENT_HDD", + "PERSISTENT_SSD", + "LOCAL_SSD" + ], + "description": "Required. The type of the disk to create.", + "type": "string" + } + }, + "id": "Disk" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "PipelineParameter": { + "id": "PipelineParameter", + "description": "Parameters facilitate setting and delivering data into the\npipeline's execution environment. They are defined at create time,\nwith optional defaults, and can be overridden at run time.\n\nIf `localCopy` is unset, then the parameter specifies a string that\nis passed as-is into the pipeline, as the value of the environment\nvariable with the given name. A default value can be optionally\nspecified at create time. The default can be overridden at run time\nusing the inputs map. If no default is given, a value must be\nsupplied at runtime.\n\nIf `localCopy` is defined, then the parameter specifies a data\nsource or sink, both in Google Cloud Storage and on the Docker container\nwhere the pipeline computation is run. The service account associated with\nthe Pipeline (by\ndefault the project's Compute Engine service account) must have access to the\nGoogle Cloud Storage paths.\n\nAt run time, the Google Cloud Storage paths can be overridden if a default\nwas provided at create time, or must be set otherwise. The pipeline runner\nshould add a key/value pair to either the inputs or outputs map. The\nindicated data copies will be carried out before/after pipeline execution,\njust as if the corresponding arguments were provided to `gsutil cp`.\n\nFor example: Given the following `PipelineParameter`, specified\nin the `inputParameters` list:\n\n```\n{name: \"input_file\", localCopy: {path: \"file.txt\", disk: \"pd1\"}}\n```\n\nwhere `disk` is defined in the `PipelineResources` object as:\n\n```\n{name: \"pd1\", mountPoint: \"/mnt/disk/\"}\n```\n\nWe create a disk named `pd1`, mount it on the host VM, and map\n`/mnt/pd1` to `/mnt/disk` in the docker container. At\nruntime, an entry for `input_file` would be required in the inputs\nmap, such as:\n\n```\n inputs[\"input_file\"] = \"gs://my-bucket/bar.txt\"\n```\n\nThis would generate the following gsutil call:\n\n```\n gsutil cp gs://my-bucket/bar.txt /mnt/pd1/file.txt\n```\n\nThe file `/mnt/pd1/file.txt` maps to `/mnt/disk/file.txt` in the\nDocker container. Acceptable paths are:\n\n\u003ctable\u003e\n \u003cthead\u003e\n \u003ctr\u003e\u003cth\u003eGoogle Cloud storage path\u003c/th\u003e\u003cth\u003eLocal path\u003c/th\u003e\u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\u003ctd\u003efile\u003c/td\u003e\u003ctd\u003efile\u003c/td\u003e\u003c/tr\u003e\n \u003ctr\u003e\u003ctd\u003eglob\u003c/td\u003e\u003ctd\u003edirectory\u003c/td\u003e\u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\nFor outputs, the direction of the copy is reversed:\n\n```\n gsutil cp /mnt/disk/file.txt gs://my-bucket/bar.txt\n```\n\nAcceptable paths are:\n\n\u003ctable\u003e\n \u003cthead\u003e\n \u003ctr\u003e\u003cth\u003eLocal path\u003c/th\u003e\u003cth\u003eGoogle Cloud Storage path\u003c/th\u003e\u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\u003ctd\u003efile\u003c/td\u003e\u003ctd\u003efile\u003c/td\u003e\u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003efile\u003c/td\u003e\n \u003ctd\u003edirectory - directory must already exist\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003eglob\u003c/td\u003e\n \u003ctd\u003edirectory - directory will be created if it doesn't exist\u003c/td\u003e\u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\nOne restriction due to docker limitations, is that for outputs that are found\non the boot disk, the local path cannot be a glob and must be a file.", + "type": "object", + "properties": { + "defaultValue": { + "description": "The default value for this parameter. Can be overridden at runtime.\nIf `localCopy` is present, then this must be a Google Cloud Storage path\nbeginning with `gs://`.", + "type": "string" + }, + "name": { + "description": "Required. Name of the parameter - the pipeline runner uses this string\nas the key to the input and output maps in RunPipeline.", + "type": "string" + }, + "description": { + "description": "Human-readable description.", + "type": "string" + }, + "localCopy": { + "$ref": "LocalCopy", + "description": "If present, this parameter is marked for copying to and from the VM.\n`LocalCopy` indicates where on the VM the file should be. The value\ngiven to this parameter (either at runtime or using `defaultValue`)\nmust be the remote path where the file should be." + } + } + }, + "LoggingOptions": { + "description": "The logging options for the pipeline run.", + "type": "object", + "properties": { + "gcsPath": { + "type": "string", + "description": "The location in Google Cloud Storage to which the pipeline logs\nwill be copied. Can be specified as a fully qualified directory\npath, in which case logs will be output with a unique identifier\nas the filename in that directory, or as a fully specified path,\nwhich must end in `.log`, in which case that path will be\nused, and the user must ensure that logs are not\noverwritten. Stdout and stderr logs from the run are also\ngenerated and output as `-stdout.log` and `-stderr.log`." + } + }, + "id": "LoggingOptions" + }, + "RunPipelineRequest": { + "description": "The request to run a pipeline. If `pipelineId` is specified, it\nrefers to a saved pipeline created with CreatePipeline and set as\nthe `pipelineId` of the returned Pipeline object. If\n`ephemeralPipeline` is specified, that pipeline is run once\nwith the given args and not saved. It is an error to specify both\n`pipelineId` and `ephemeralPipeline`. `pipelineArgs`\nmust be specified.", + "type": "object", + "properties": { + "pipelineArgs": { + "$ref": "RunPipelineArgs", + "description": "The arguments to use when running this pipeline." + }, + "pipelineId": { + "description": "The already created pipeline to run.", + "type": "string" + }, + "ephemeralPipeline": { + "$ref": "Pipeline", + "description": "A new pipeline object to run once and then delete." + } + }, + "id": "RunPipelineRequest" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "type": "object", + "properties": {}, + "id": "CancelOperationRequest" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "An OperationMetadata object. This will always be returned with the Operation." + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "description": "If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For pipelines and exports, an empty response is returned.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "Operation" + }, + "RuntimeMetadata": { + "id": "RuntimeMetadata", + "description": "Runtime metadata that will be populated in the\nruntimeMetadata\nfield of the Operation associated with a RunPipeline execution.", + "type": "object", + "properties": { + "computeEngine": { + "description": "Execution information specific to Google Compute Engine.", + "$ref": "ComputeEngine" + } + } + }, + "ImportReadGroupSetsResponse": { + "description": "The read group set import response.", + "type": "object", + "properties": { + "readGroupSetIds": { + "description": "IDs of the read group sets that were created.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ImportReadGroupSetsResponse" + } + }, + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "version": "v1alpha2", + "baseUrl": "https://genomics.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/genomics": { + "description": "View and manage Genomics data" + }, + "https://www.googleapis.com/auth/compute": { + "description": "View and manage your Google Compute Engine resources" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "servicePath": "", + "description": "Upload, process, query, and search Genomics data in the cloud.", + "kind": "discovery#restDescription", + "rootUrl": "https://genomics.googleapis.com/", + "basePath": "" } diff --git a/etc/api/gmail/v1/gmail-api.json b/etc/api/gmail/v1/gmail-api.json index 6941d50511..1e140380a7 100644 --- a/etc/api/gmail/v1/gmail-api.json +++ b/etc/api/gmail/v1/gmail-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/p_Ki8ZAiDCpzN2N5osErTV2szew\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/sp6jQ8V0i8GKNN9WuCJbaCVJmmQ\"", "discoveryVersion": "v1", "id": "gmail:v1", "name": "gmail", "version": "v1", - "revision": "20161206", + "revision": "20170510", "title": "Gmail API", "description": "Access Gmail mailboxes including sending user email.", "ownerDomain": "google.com", @@ -70,7 +70,7 @@ "oauth2": { "scopes": { "https://mail.google.com/": { - "description": "View and manage your mail" + "description": "Read, send, delete, and manage your email" }, "https://www.googleapis.com/auth/gmail.compose": { "description": "Manage drafts and send emails" @@ -669,6 +669,19 @@ } } }, + "ListSmimeInfoResponse": { + "id": "ListSmimeInfoResponse", + "type": "object", + "properties": { + "smimeInfo": { + "type": "array", + "description": "List of SmimeInfo.", + "items": { + "$ref": "SmimeInfo" + } + } + } + }, "ListThreadsResponse": { "id": "ListThreadsResponse", "type": "object", @@ -981,6 +994,43 @@ } } }, + "SmimeInfo": { + "id": "SmimeInfo", + "type": "object", + "description": "An S/MIME email config.", + "properties": { + "encryptedKeyPassword": { + "type": "string", + "description": "Encrypted key password, when key is encrypted." + }, + "expiration": { + "type": "string", + "description": "When the certificate expires (in milliseconds since epoch).", + "format": "int64" + }, + "id": { + "type": "string", + "description": "The immutable ID for the SmimeInfo." + }, + "isDefault": { + "type": "boolean", + "description": "Whether this SmimeInfo is the default one for this user's send-as address." + }, + "issuerCn": { + "type": "string", + "description": "The S/MIME certificate issuer's common name." + }, + "pem": { + "type": "string", + "description": "PEM formatted X509 concatenated certificate string (standard base64 encoding). Format used for returning key, which includes public key as well as certificate chain (not private key)." + }, + "pkcs12": { + "type": "string", + "description": "PKCS#12 format containing a single private/public key pair and certificate chain. This format is only accepted from client for creating a new SmimeInfo and is never returned, because the private key is not intended to be exported. PKCS#12 may be encrypted, in which case encryptedKeyPassword should be set appropriately.", + "format": "byte" + } + } + }, "SmtpMsa": { "id": "SmtpMsa", "type": "object", @@ -1080,7 +1130,7 @@ }, "restrictToDomain": { "type": "boolean", - "description": "Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for Google Apps users." + "description": "Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for G Suite users." }, "startTime": { "type": "string", @@ -1513,6 +1563,24 @@ "httpMethod": "GET", "description": "Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId).", "parameters": { + "historyTypes": { + "type": "string", + "description": "History types to be returned by the function", + "enum": [ + "labelAdded", + "labelRemoved", + "messageAdded", + "messageDeleted" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "repeated": true, + "location": "query" + }, "labelId": { "type": "string", "description": "Only return messages with a label matching the ID.", @@ -1902,7 +1970,7 @@ "parameters": { "deleted": { "type": "boolean", - "description": "Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts.", + "description": "Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts.", "default": "false", "location": "query" }, @@ -1959,7 +2027,7 @@ "accept": [ "message/rfc822" ], - "maxSize": "35MB", + "maxSize": "50MB", "protocols": { "simple": { "multipart": true, @@ -1980,7 +2048,7 @@ "parameters": { "deleted": { "type": "boolean", - "description": "Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts.", + "description": "Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts.", "default": "false", "location": "query" }, @@ -2025,7 +2093,7 @@ "accept": [ "message/rfc822" ], - "maxSize": "35MB", + "maxSize": "50MB", "protocols": { "simple": { "multipart": true, @@ -2070,7 +2138,7 @@ }, "q": { "type": "string", - "description": "Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, \"from:someuser@example.com rfc822msgid: is:unread\". Parameter cannot be used when accessing the api using the gmail.metadata scope.", + "description": "Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, \"from:someuser@example.com rfc822msgid:\u003csomemsgid@example.com\u003e is:unread\". Parameter cannot be used when accessing the api using the gmail.metadata scope.", "location": "query" }, "userId": { @@ -2402,7 +2470,7 @@ "id": "gmail.users.settings.updateAutoForwarding", "path": "{userId}/settings/autoForwarding", "httpMethod": "PUT", - "description": "Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled.", + "description": "Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled.\n\nThis method is only available to service account clients that have been delegated domain-wide authority.", "parameters": { "userId": { "type": "string", @@ -2634,7 +2702,7 @@ "id": "gmail.users.settings.forwardingAddresses.create", "path": "{userId}/settings/forwardingAddresses", "httpMethod": "POST", - "description": "Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted.", + "description": "Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted.\n\nThis method is only available to service account clients that have been delegated domain-wide authority.", "parameters": { "userId": { "type": "string", @@ -2661,7 +2729,7 @@ "id": "gmail.users.settings.forwardingAddresses.delete", "path": "{userId}/settings/forwardingAddresses/{forwardingEmail}", "httpMethod": "DELETE", - "description": "Deletes the specified forwarding address and revokes any verification that may have been required.", + "description": "Deletes the specified forwarding address and revokes any verification that may have been required.\n\nThis method is only available to service account clients that have been delegated domain-wide authority.", "parameters": { "forwardingEmail": { "type": "string", @@ -2754,7 +2822,7 @@ "id": "gmail.users.settings.sendAs.create", "path": "{userId}/settings/sendAs", "httpMethod": "POST", - "description": "Creates a custom \"from\" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.", + "description": "Creates a custom \"from\" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.\n\nThis method is only available to service account clients that have been delegated domain-wide authority.", "parameters": { "userId": { "type": "string", @@ -2781,7 +2849,7 @@ "id": "gmail.users.settings.sendAs.delete", "path": "{userId}/settings/sendAs/{sendAsEmail}", "httpMethod": "DELETE", - "description": "Deletes the specified send-as alias. Revokes any verification that may have been required for using it.", + "description": "Deletes the specified send-as alias. Revokes any verification that may have been required for using it.\n\nThis method is only available to service account clients that have been delegated domain-wide authority.", "parameters": { "sendAsEmail": { "type": "string", @@ -2870,7 +2938,7 @@ "id": "gmail.users.settings.sendAs.patch", "path": "{userId}/settings/sendAs/{sendAsEmail}", "httpMethod": "PATCH", - "description": "Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. This method supports patch semantics.", + "description": "Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.\n\nAddresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. This method supports patch semantics.", "parameters": { "sendAsEmail": { "type": "string", @@ -2905,7 +2973,7 @@ "id": "gmail.users.settings.sendAs.update", "path": "{userId}/settings/sendAs/{sendAsEmail}", "httpMethod": "PUT", - "description": "Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.", + "description": "Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.\n\nAddresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority.", "parameters": { "sendAsEmail": { "type": "string", @@ -2940,7 +3008,7 @@ "id": "gmail.users.settings.sendAs.verify", "path": "{userId}/settings/sendAs/{sendAsEmail}/verify", "httpMethod": "POST", - "description": "Sends a verification email to the specified send-as alias address. The verification status must be pending.", + "description": "Sends a verification email to the specified send-as alias address. The verification status must be pending.\n\nThis method is only available to service account clients that have been delegated domain-wide authority.", "parameters": { "sendAsEmail": { "type": "string", @@ -2964,6 +3032,196 @@ "https://www.googleapis.com/auth/gmail.settings.sharing" ] } + }, + "resources": { + "smimeInfo": { + "methods": { + "delete": { + "id": "gmail.users.settings.sendAs.smimeInfo.delete", + "path": "{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}", + "httpMethod": "DELETE", + "description": "Deletes the specified S/MIME config for the specified send-as alias.", + "parameters": { + "id": { + "type": "string", + "description": "The immutable ID for the SmimeInfo.", + "required": true, + "location": "path" + }, + "sendAsEmail": { + "type": "string", + "description": "The email address that appears in the \"From:\" header for mail sent using this alias.", + "required": true, + "location": "path" + }, + "userId": { + "type": "string", + "description": "The user's email address. The special value me can be used to indicate the authenticated user.", + "default": "me", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "userId", + "sendAsEmail", + "id" + ], + "scopes": [ + "https://www.googleapis.com/auth/gmail.settings.basic", + "https://www.googleapis.com/auth/gmail.settings.sharing" + ] + }, + "get": { + "id": "gmail.users.settings.sendAs.smimeInfo.get", + "path": "{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}", + "httpMethod": "GET", + "description": "Gets the specified S/MIME config for the specified send-as alias.", + "parameters": { + "id": { + "type": "string", + "description": "The immutable ID for the SmimeInfo.", + "required": true, + "location": "path" + }, + "sendAsEmail": { + "type": "string", + "description": "The email address that appears in the \"From:\" header for mail sent using this alias.", + "required": true, + "location": "path" + }, + "userId": { + "type": "string", + "description": "The user's email address. The special value me can be used to indicate the authenticated user.", + "default": "me", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "userId", + "sendAsEmail", + "id" + ], + "response": { + "$ref": "SmimeInfo" + }, + "scopes": [ + "https://mail.google.com/", + "https://www.googleapis.com/auth/gmail.modify", + "https://www.googleapis.com/auth/gmail.readonly", + "https://www.googleapis.com/auth/gmail.settings.basic", + "https://www.googleapis.com/auth/gmail.settings.sharing" + ] + }, + "insert": { + "id": "gmail.users.settings.sendAs.smimeInfo.insert", + "path": "{userId}/settings/sendAs/{sendAsEmail}/smimeInfo", + "httpMethod": "POST", + "description": "Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key.", + "parameters": { + "sendAsEmail": { + "type": "string", + "description": "The email address that appears in the \"From:\" header for mail sent using this alias.", + "required": true, + "location": "path" + }, + "userId": { + "type": "string", + "description": "The user's email address. The special value me can be used to indicate the authenticated user.", + "default": "me", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "userId", + "sendAsEmail" + ], + "request": { + "$ref": "SmimeInfo" + }, + "response": { + "$ref": "SmimeInfo" + }, + "scopes": [ + "https://www.googleapis.com/auth/gmail.settings.basic", + "https://www.googleapis.com/auth/gmail.settings.sharing" + ] + }, + "list": { + "id": "gmail.users.settings.sendAs.smimeInfo.list", + "path": "{userId}/settings/sendAs/{sendAsEmail}/smimeInfo", + "httpMethod": "GET", + "description": "Lists S/MIME configs for the specified send-as alias.", + "parameters": { + "sendAsEmail": { + "type": "string", + "description": "The email address that appears in the \"From:\" header for mail sent using this alias.", + "required": true, + "location": "path" + }, + "userId": { + "type": "string", + "description": "The user's email address. The special value me can be used to indicate the authenticated user.", + "default": "me", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "userId", + "sendAsEmail" + ], + "response": { + "$ref": "ListSmimeInfoResponse" + }, + "scopes": [ + "https://mail.google.com/", + "https://www.googleapis.com/auth/gmail.modify", + "https://www.googleapis.com/auth/gmail.readonly", + "https://www.googleapis.com/auth/gmail.settings.basic", + "https://www.googleapis.com/auth/gmail.settings.sharing" + ] + }, + "setDefault": { + "id": "gmail.users.settings.sendAs.smimeInfo.setDefault", + "path": "{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault", + "httpMethod": "POST", + "description": "Sets the default S/MIME config for the specified send-as alias.", + "parameters": { + "id": { + "type": "string", + "description": "The immutable ID for the SmimeInfo.", + "required": true, + "location": "path" + }, + "sendAsEmail": { + "type": "string", + "description": "The email address that appears in the \"From:\" header for mail sent using this alias.", + "required": true, + "location": "path" + }, + "userId": { + "type": "string", + "description": "The user's email address. The special value me can be used to indicate the authenticated user.", + "default": "me", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "userId", + "sendAsEmail", + "id" + ], + "scopes": [ + "https://www.googleapis.com/auth/gmail.settings.basic", + "https://www.googleapis.com/auth/gmail.settings.sharing" + ] + } + } + } } } } diff --git a/etc/api/groupsmigration/v1/groupsmigration-api.json b/etc/api/groupsmigration/v1/groupsmigration-api.json index 4d1c092732..a67806924e 100644 --- a/etc/api/groupsmigration/v1/groupsmigration-api.json +++ b/etc/api/groupsmigration/v1/groupsmigration-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/HWdr3QolTxcnkwueTlDTCxOXBdE\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/HWdr3QolTxcnkwueTlDTCxOXBdE\"", "discoveryVersion": "v1", "id": "groupsmigration:v1", "name": "groupsmigration", diff --git a/etc/api/groupssettings/v1/groupssettings-api.json b/etc/api/groupssettings/v1/groupssettings-api.json index a28e82b61b..c4ba1e3369 100644 --- a/etc/api/groupssettings/v1/groupssettings-api.json +++ b/etc/api/groupssettings/v1/groupssettings-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/26Y5Yyn2D8WwxhPa2zJyQ3Axz8I\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/8JFCy9G09DiKop8V7jh2RwsOYyI\"", "discoveryVersion": "v1", "id": "groupssettings:v1", "name": "groupssettings", @@ -72,7 +72,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/apps.groups.settings": { - "description": "View and manage the settings of a Google Apps Group" + "description": "View and manage the settings of a G Suite group" } } } diff --git a/etc/api/iam/v1/iam-api.json b/etc/api/iam/v1/iam-api.json index 681a9645e0..fc4d82fc6b 100644 --- a/etc/api/iam/v1/iam-api.json +++ b/etc/api/iam/v1/iam-api.json @@ -1,875 +1,997 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/bQX0iw41CX8vYvVm7WSKLdyxMvI\"", - "discoveryVersion": "v1", - "id": "iam:v1", - "name": "iam", - "canonicalName": "iam", - "version": "v1", - "revision": "20160915", - "title": "Google 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.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/iam/", - "protocol": "rest", - "baseUrl": "https://iam.googleapis.com/", - "basePath": "", - "rootUrl": "https://iam.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "version_module": true, - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "schemas": { - "ListServiceAccountsResponse": { - "id": "ListServiceAccountsResponse", - "type": "object", - "description": "The service account list response.", - "properties": { - "accounts": { - "type": "array", - "description": "The list of matching service accounts.", - "items": { - "$ref": "ServiceAccount" - } - }, - "nextPageToken": { - "type": "string", - "description": "To retrieve the next page of results, set ListServiceAccountsRequest.page_token to this value." - } - } - }, - "ServiceAccount": { - "id": "ServiceAccount", - "type": "object", - "description": "A service account in the Identity and Access Management API. To create a service account, specify the `project_id` and the `account_id` for the account. The `account_id` is unique within the project, and is used to generate the service account email address and a stable `unique_id`. If the account already exists, the account's resource name is returned in util::Status's ResourceInfo.resource_name in the format of projects/{project}/serviceAccounts/{email}. The caller can use the name in other methods to access the account. All other methods can identify the service account using the format `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", - "properties": { - "name": { - "type": "string", - "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a wildcard for the project will infer the project from the `account` and the `account` value can be the `email` address or the `unique_id` of the service account. In responses the resource name will always be in the format `projects/{project}/serviceAccounts/{email}`." - }, - "projectId": { - "type": "string", - "description": "@OutputOnly The id of the project that owns the service account." - }, - "uniqueId": { - "type": "string", - "description": "@OutputOnly The unique and stable id of the service account." - }, - "email": { - "type": "string", - "description": "@OutputOnly The email address of the service account." - }, - "displayName": { - "type": "string", - "description": "Optional. A user-specified description of the service account. Must be fewer than 100 UTF-8 bytes." - }, - "etag": { - "type": "string", - "description": "Used to perform a consistent read-modify-write.", - "format": "byte" - }, - "oauth2ClientId": { - "type": "string", - "description": "@OutputOnly. The OAuth2 client id for the service account. This is used in conjunction with the OAuth2 clientconfig API to make three legged OAuth2 (3LO) flows to access the data of Google users." - } - } - }, - "CreateServiceAccountRequest": { - "id": "CreateServiceAccountRequest", - "type": "object", - "description": "The service account create request.", - "properties": { - "accountId": { - "type": "string", - "description": "Required. The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035." - }, - "serviceAccount": { - "$ref": "ServiceAccount", - "description": "The ServiceAccount resource to create. Currently, only the following values are user assignable: `display_name` ." - } - } - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "ListServiceAccountKeysResponse": { - "id": "ListServiceAccountKeysResponse", - "type": "object", - "description": "The service account keys list response.", - "properties": { - "keys": { - "type": "array", - "description": "The public keys for the service account.", - "items": { - "$ref": "ServiceAccountKey" - } - } - } - }, - "ServiceAccountKey": { - "id": "ServiceAccountKey", - "type": "object", - "description": "Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed key-pairs are managed automatically by Google, and rotated daily without user intervention. The private key never leaves Google's servers to maximize security. Public keys for all service accounts are also published at the OAuth2 Service Account API.", - "properties": { - "name": { - "type": "string", - "description": "The resource name of the service account key in the following format `projects/{project}/serviceAccounts/{account}/keys/{key}`." - }, - "privateKeyType": { - "type": "string", - "description": "The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.", - "enum": [ - "TYPE_UNSPECIFIED", - "TYPE_PKCS12_FILE", - "TYPE_GOOGLE_CREDENTIALS_FILE" - ] - }, - "keyAlgorithm": { - "type": "string", - "description": "Specifies the algorithm (and possibly key size) for the key.", - "enum": [ - "KEY_ALG_UNSPECIFIED", - "KEY_ALG_RSA_1024", - "KEY_ALG_RSA_2048" - ] - }, - "privateKeyData": { - "type": "string", - "description": "The private key data. Only provided in `CreateServiceAccountKey` responses.", - "format": "byte" - }, - "publicKeyData": { - "type": "string", - "description": "The public key data. Only provided in `GetServiceAccountKey` responses.", - "format": "byte" - }, - "validAfterTime": { - "type": "string", - "description": "The key can be used after this timestamp." - }, - "validBeforeTime": { - "type": "string", - "description": "The key can be used before this timestamp." - } - } - }, - "CreateServiceAccountKeyRequest": { - "id": "CreateServiceAccountKeyRequest", - "type": "object", - "description": "The service account key create request.", - "properties": { - "privateKeyType": { - "type": "string", - "description": "The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the default output format.", - "enum": [ - "TYPE_UNSPECIFIED", - "TYPE_PKCS12_FILE", - "TYPE_GOOGLE_CREDENTIALS_FILE" - ] - }, - "keyAlgorithm": { - "type": "string", - "description": "Which type of key and algorithm to use for the key. The default is currently a 4K RSA key. However this may change in the future.", - "enum": [ - "KEY_ALG_UNSPECIFIED", - "KEY_ALG_RSA_1024", - "KEY_ALG_RSA_2048" - ] - } - } - }, - "SignBlobRequest": { - "id": "SignBlobRequest", - "type": "object", - "description": "The service account sign blob request.", - "properties": { - "bytesToSign": { - "type": "string", - "description": "The bytes to sign.", - "format": "byte" - } - } - }, - "SignBlobResponse": { - "id": "SignBlobResponse", - "type": "object", - "description": "The service account sign blob response.", - "properties": { - "keyId": { - "type": "string", - "description": "The id of the key used to sign the blob." - }, - "signature": { - "type": "string", - "description": "The signed blob.", - "format": "byte" - } - } - }, - "Policy": { - "id": "Policy", - "type": "object", - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\", ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", - "properties": { - "version": { - "type": "integer", - "description": "Version of the `Policy`. The default version is 0.", - "format": "int32" - }, - "bindings": { - "type": "array", - "description": "Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - } - }, - "etag": { - "type": "string", - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", - "format": "byte" - } - } - }, - "Binding": { - "id": "Binding", - "type": "object", - "description": "Associates `members` with a `role`.", - "properties": { - "role": { - "type": "string", - "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required" - }, - "members": { - "type": "array", - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", - "items": { - "type": "string" - } - } - } - }, - "SetIamPolicyRequest": { - "id": "SetIamPolicyRequest", - "type": "object", - "description": "Request message for `SetIamPolicy` method.", - "properties": { - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." - } - } - }, - "TestIamPermissionsRequest": { - "id": "TestIamPermissionsRequest", - "type": "object", - "description": "Request message for `TestIamPermissions` method.", - "properties": { - "permissions": { - "type": "array", - "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "items": { - "type": "string" - } - } - } - }, - "TestIamPermissionsResponse": { - "id": "TestIamPermissionsResponse", - "type": "object", - "description": "Response message for `TestIamPermissions` method.", - "properties": { - "permissions": { - "type": "array", - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - } - } - } - }, - "QueryGrantableRolesRequest": { - "id": "QueryGrantableRolesRequest", - "type": "object", - "description": "The grantable role query request.", - "properties": { - "fullResourceName": { - "type": "string", - "description": "Required. The full resource name to query from the list of grantable roles. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`." - } - } - }, - "QueryGrantableRolesResponse": { - "id": "QueryGrantableRolesResponse", - "type": "object", - "description": "The grantable role query response.", - "properties": { - "roles": { - "type": "array", - "description": "The list of matching roles.", - "items": { - "$ref": "Role" - } - } - } - }, - "Role": { - "id": "Role", - "type": "object", - "description": "A role in the Identity and Access Management API.", - "properties": { - "name": { - "type": "string", - "description": "The name of the role. When Role is used in CreateRole, the role name must not be set. When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for curated roles and organizations/{organization-id}/roles/logging.viewer for custom roles." - }, - "title": { - "type": "string", - "description": "Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes." - }, - "description": { - "type": "string", - "description": "Optional. A human-readable description for the role." - } - } - }, - "AuditData": { - "id": "AuditData", - "type": "object", - "description": "Audit log information specific to Cloud IAM. This message is serialized as an `Any` type in the `ServiceData` message of an `AuditLog` message.", - "properties": { - "policyDelta": { - "$ref": "PolicyDelta", - "description": "Policy delta between the original policy and the newly set policy." - } - } - }, - "PolicyDelta": { - "id": "PolicyDelta", - "type": "object", - "description": "The difference delta between two policies.", - "properties": { - "bindingDeltas": { - "type": "array", - "description": "The delta for Bindings between two policies.", - "items": { - "$ref": "BindingDelta" - } - } - } - }, - "BindingDelta": { - "id": "BindingDelta", - "type": "object", - "description": "One delta entry for Binding. Each individual change (only one member in each entry) to a binding will be a separate entry.", - "properties": { - "action": { - "type": "string", - "description": "The action that was performed on a Binding. Required", - "enum": [ - "ACTION_UNSPECIFIED", - "ADD", - "REMOVE" - ] - }, - "role": { - "type": "string", - "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required" - }, - "member": { - "type": "string", - "description": "A single identity requesting access for a Cloud Platform resource. Follows the same format of Binding.members. Required" - } - } - } - }, - "resources": { - "projects": { - "resources": { - "serviceAccounts": { - "methods": { - "list": { - "id": "iam.projects.serviceAccounts.list", - "path": "v1/{+name}/serviceAccounts", - "httpMethod": "GET", - "description": "Lists ServiceAccounts for a project.", - "parameters": { - "name": { - "type": "string", - "description": "Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.", - "required": true, - "pattern": "^projects/[^/]*$", - "location": "path" + "revision": "20170515", + "documentationLink": "https://cloud.google.com/iam/", + "id": "iam:v1", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { + "SignJwtResponse": { + "id": "SignJwtResponse", + "description": "The service account sign JWT response.", + "type": "object", + "properties": { + "keyId": { + "description": "The id of the key used to sign the JWT.", + "type": "string" }, - "pageSize": { - "type": "integer", - "description": "Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the ListServiceAccountsResponse.next_page_token in a subsequent request.", - "format": "int32", - "location": "query" + "signedJwt": { + "type": "string", + "description": "The signed JWT." + } + } + }, + "SignBlobResponse": { + "description": "The service account sign blob response.", + "type": "object", + "properties": { + "signature": { + "description": "The signed blob.", + "format": "byte", + "type": "string" + }, + "keyId": { + "description": "The id of the key used to sign the blob.", + "type": "string" + } + }, + "id": "SignBlobResponse" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsRequest" + }, + "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Version of the `Policy`. The default version is 0.", + "format": "int32", + "type": "integer" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", + "type": "array", + "items": { + "$ref": "Binding" + } + } + }, + "id": "Policy" + }, + "SignJwtRequest": { + "type": "object", + "properties": { + "payload": { + "description": "The JWT payload to sign, a JSON JWT Claim set.", + "type": "string" + } + }, + "id": "SignJwtRequest", + "description": "The service account sign JWT request." + }, + "AuditData": { + "description": "Audit log information specific to Cloud IAM. This message is serialized\nas an `Any` type in the `ServiceData` message of an\n`AuditLog` message.", + "type": "object", + "properties": { + "policyDelta": { + "description": "Policy delta between the original policy and the newly set policy.", + "$ref": "PolicyDelta" + } + }, + "id": "AuditData" + }, + "BindingDelta": { + "description": "One delta entry for Binding. Each individual change (only one member in each\nentry) to a binding will be a separate entry.", + "type": "object", + "properties": { + "member": { + "description": "A single identity requesting access for a Cloud Platform resource.\nFollows the same format of Binding.members.\nRequired", + "type": "string" + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + }, + "action": { + "enumDescriptions": [ + "Unspecified.", + "Addition of a Binding.", + "Removal of a Binding." + ], + "enum": [ + "ACTION_UNSPECIFIED", + "ADD", + "REMOVE" + ], + "description": "The action that was performed on a Binding.\nRequired", + "type": "string" + } + }, + "id": "BindingDelta" + }, + "PolicyDelta": { + "id": "PolicyDelta", + "description": "The difference delta between two policies.", + "type": "object", + "properties": { + "bindingDeltas": { + "description": "The delta for Bindings between two policies.", + "type": "array", + "items": { + "$ref": "BindingDelta" + } + } + } + }, + "CreateServiceAccountRequest": { + "description": "The service account create request.", + "type": "object", + "properties": { + "serviceAccount": { + "description": "The ServiceAccount resource to create.\nCurrently, only the following values are user assignable:\n`display_name` .", + "$ref": "ServiceAccount" + }, + "accountId": { + "description": "Required. The account id that is used to generate the service account\nemail address and a stable unique id. It is unique within a project,\nmust be 6-30 characters long, and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.", + "type": "string" + } + }, + "id": "CreateServiceAccountRequest" + }, + "ListServiceAccountsResponse": { + "properties": { + "nextPageToken": { + "type": "string", + "description": "To retrieve the next page of results, set\nListServiceAccountsRequest.page_token\nto this value." + }, + "accounts": { + "type": "array", + "items": { + "$ref": "ServiceAccount" + }, + "description": "The list of matching service accounts." + } + }, + "id": "ListServiceAccountsResponse", + "description": "The service account list response.", + "type": "object" + }, + "QueryGrantableRolesResponse": { + "description": "The grantable role query response.", + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "$ref": "Role" + }, + "description": "The list of matching roles." + }, + "nextPageToken": { + "description": "To retrieve the next page of results, set\n`QueryGrantableRolesRequest.page_token` to this value.", + "type": "string" + } + }, + "id": "QueryGrantableRolesResponse" + }, + "Role": { + "description": "A role in the Identity and Access Management API.", + "type": "object", + "properties": { + "name": { + "description": "The name of the role.\n\nWhen Role is used in CreateRole, the role name must not be set.\n\nWhen Role is used in output and other input such as UpdateRole, the role\nname is the complete path, e.g., roles/logging.viewer for curated roles\nand organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.", + "type": "string" + }, + "description": { + "description": "Optional. A human-readable description for the role.", + "type": "string" + }, + "title": { + "description": "Optional. A human-readable title for the role. Typically this\nis limited to 100 UTF-8 bytes.", + "type": "string" + } + }, + "id": "Role" + }, + "SignBlobRequest": { + "description": "The service account sign blob request.", + "type": "object", + "properties": { + "bytesToSign": { + "description": "The bytes to sign.", + "format": "byte", + "type": "string" + } + }, + "id": "SignBlobRequest" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + } + }, + "id": "SetIamPolicyRequest" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "type": "array", + "items": { + "type": "string" + } + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + } + }, + "id": "Binding" + }, + "ServiceAccount": { + "description": "A service account in the Identity and Access Management API.\n\nTo create a service account, specify the `project_id` and the `account_id`\nfor the account. The `account_id` is unique within the project, and is used\nto generate the service account email address and a stable\n`unique_id`.\n\nIf the account already exists, the account's resource name is returned\nin util::Status's ResourceInfo.resource_name in the format of\nprojects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}. The caller can\nuse the name in other methods to access the account.\n\nAll other methods can identify the service account using the format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "type": "object", + "properties": { + "oauth2ClientId": { + "description": "@OutputOnly. The OAuth2 client id for the service account.\nThis is used in conjunction with the OAuth2 clientconfig API to make\nthree legged OAuth2 (3LO) flows to access the data of Google users.", + "type": "string" + }, + "uniqueId": { + "description": "@OutputOnly The unique and stable id of the service account.", + "type": "string" + }, + "displayName": { + "description": "Optional. A user-specified description of the service account. Must be\nfewer than 100 UTF-8 bytes.", + "type": "string" + }, + "etag": { + "description": "Used to perform a consistent read-modify-write.", + "format": "byte", + "type": "string" + }, + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\n\nRequests using `-` as a wildcard for the project will infer the project\nfrom the `account` and the `account` value can be the `email` address or\nthe `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.", + "type": "string" + }, + "email": { + "type": "string", + "description": "@OutputOnly The email address of the service account." + }, + "projectId": { + "description": "@OutputOnly The id of the project that owns the service account.", + "type": "string" + } + }, + "id": "ServiceAccount" + }, + "Empty": { + "type": "object", + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." + }, + "QueryGrantableRolesRequest": { + "description": "The grantable role query request.", + "type": "object", + "properties": { + "fullResourceName": { + "description": "Required. The full resource name to query from the list of grantable roles.\n\nThe name follows the Google Cloud Platform resource format.\nFor example, a Cloud Platform project with id `my-project` will be named\n`//cloudresourcemanager.googleapis.com/projects/my-project`.", + "type": "string" }, "pageToken": { - "type": "string", - "description": "Optional pagination token returned in an earlier ListServiceAccountsResponse.next_page_token.", - "location": "query" + "type": "string", + "description": "Optional pagination token returned in an earlier\nQueryGrantableRolesResponse." + }, + "pageSize": { + "description": "Optional limit on the number of roles to include in the response.", + "format": "int32", + "type": "integer" } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListServiceAccountsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "get": { - "id": "iam.projects.serviceAccounts.get", - "path": "v1/{+name}", - "httpMethod": "GET", - "description": "Gets a ServiceAccount.", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", - "location": "path" + "id": "QueryGrantableRolesRequest" + }, + "TestIamPermissionsResponse": { + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "type": "array", + "items": { + "type": "string" + } } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ServiceAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "create": { - "id": "iam.projects.serviceAccounts.create", - "path": "v1/{+name}/serviceAccounts", - "httpMethod": "POST", - "description": "Creates a ServiceAccount and returns it.", - "parameters": { - "name": { - "type": "string", - "description": "Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.", - "required": true, - "pattern": "^projects/[^/]*$", - "location": "path" + "id": "TestIamPermissionsResponse", + "description": "Response message for `TestIamPermissions` method.", + "type": "object" + }, + "ListServiceAccountKeysResponse": { + "id": "ListServiceAccountKeysResponse", + "description": "The service account keys list response.", + "type": "object", + "properties": { + "keys": { + "description": "The public keys for the service account.", + "type": "array", + "items": { + "$ref": "ServiceAccountKey" + } } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "CreateServiceAccountRequest" - }, - "response": { - "$ref": "ServiceAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "id": "iam.projects.serviceAccounts.update", - "path": "v1/{+name}", - "httpMethod": "PUT", - "description": "Updates a ServiceAccount. Currently, only the following fields are updatable: `display_name` . The `etag` is mandatory.", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a wildcard for the project will infer the project from the `account` and the `account` value can be the `email` address or the `unique_id` of the service account. In responses the resource name will always be in the format `projects/{project}/serviceAccounts/{email}`.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "ServiceAccount" - }, - "response": { - "$ref": "ServiceAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "iam.projects.serviceAccounts.delete", - "path": "v1/{+name}", - "httpMethod": "DELETE", - "description": "Deletes a ServiceAccount.", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "signBlob": { - "id": "iam.projects.serviceAccounts.signBlob", - "path": "v1/{+name}:signBlob", - "httpMethod": "POST", - "description": "Signs a blob using a service account's system-managed private key.", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "SignBlobRequest" - }, - "response": { - "$ref": "SignBlobResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getIamPolicy": { - "id": "iam.projects.serviceAccounts.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "httpMethod": "POST", - "description": "Returns the IAM access control policy for a ServiceAccount.", - "parameters": { - "resource": { - "type": "string", - "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", - "location": "path" - } - }, - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "id": "iam.projects.serviceAccounts.setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "httpMethod": "POST", - "description": "Sets the IAM access control policy for a ServiceAccount.", - "parameters": { - "resource": { - "type": "string", - "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", - "location": "path" - } - }, - "parameterOrder": [ - "resource" - ], - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "id": "iam.projects.serviceAccounts.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "httpMethod": "POST", - "description": "Tests the specified permissions against the IAM access control policy for a ServiceAccount.", - "parameters": { - "resource": { - "type": "string", - "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", - "location": "path" - } - }, - "parameterOrder": [ - "resource" - ], - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } - }, - "resources": { - "keys": { - "methods": { - "list": { - "id": "iam.projects.serviceAccounts.keys.list", - "path": "v1/{+name}/keys", - "httpMethod": "GET", - "description": "Lists ServiceAccountKeys.", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project, will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", - "location": "path" - }, - "keyTypes": { - "type": "string", - "description": "Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned.", - "enum": [ - "KEY_TYPE_UNSPECIFIED", - "USER_MANAGED", - "SYSTEM_MANAGED" - ], - "repeated": true, - "location": "query" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListServiceAccountKeysResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + }, + "ServiceAccountKey": { + "description": "Represents a service account key.\n\nA service account has two sets of key-pairs: user-managed, and\nsystem-managed.\n\nUser-managed key-pairs can be created and deleted by users. Users are\nresponsible for rotating these keys periodically to ensure security of\ntheir service accounts. Users retain the private key of these key-pairs,\nand Google retains ONLY the public key.\n\nSystem-managed key-pairs are managed automatically by Google, and rotated\ndaily without user intervention. The private key never leaves Google's\nservers to maximize security.\n\nPublic keys for all service accounts are also published at the OAuth2\nService Account API.", + "type": "object", + "properties": { + "privateKeyData": { + "description": "The private key data. Only provided in `CreateServiceAccountKey`\nresponses.", + "format": "byte", + "type": "string" }, - "get": { - "id": "iam.projects.serviceAccounts.keys.get", - "path": "v1/{+name}", - "httpMethod": "GET", - "description": "Gets the ServiceAccountKey by key id.", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$", - "location": "path" - }, - "publicKeyType": { - "type": "string", - "description": "The output format of the public key requested. X509_PEM is the default output format.", - "enum": [ - "TYPE_NONE", - "TYPE_X509_PEM_FILE", - "TYPE_RAW_PUBLIC_KEY" - ], - "location": "query" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ServiceAccountKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "publicKeyData": { + "description": "The public key data. Only provided in `GetServiceAccountKey` responses.", + "format": "byte", + "type": "string" }, - "create": { - "id": "iam.projects.serviceAccounts.keys.create", - "path": "v1/{+name}/keys", - "httpMethod": "POST", - "description": "Creates a ServiceAccountKey and returns it.", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "CreateServiceAccountKeyRequest" - }, - "response": { - "$ref": "ServiceAccountKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "name": { + "description": "The resource name of the service account key in the following format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.", + "type": "string" }, - "delete": { - "id": "iam.projects.serviceAccounts.keys.delete", - "path": "v1/{+name}", - "httpMethod": "DELETE", - "description": "Deletes a ServiceAccountKey.", - "parameters": { - "name": { - "type": "string", - "description": "The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", - "required": true, - "pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "validBeforeTime": { + "description": "The key can be used before this timestamp.", + "format": "google-datetime", + "type": "string" + }, + "keyAlgorithm": { + "type": "string", + "enumDescriptions": [ + "An unspecified key algorithm.", + "1k RSA Key.", + "2k RSA Key." + ], + "enum": [ + "KEY_ALG_UNSPECIFIED", + "KEY_ALG_RSA_1024", + "KEY_ALG_RSA_2048" + ], + "description": "Specifies the algorithm (and possibly key size) for the key." + }, + "privateKeyType": { + "enumDescriptions": [ + "Unspecified. Equivalent to `TYPE_GOOGLE_CREDENTIALS_FILE`.", + "PKCS12 format.\nThe password for the PKCS12 file is `notasecret`.\nFor more information, see https://tools.ietf.org/html/rfc7292.", + "Google Credentials File format." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "TYPE_PKCS12_FILE", + "TYPE_GOOGLE_CREDENTIALS_FILE" + ], + "description": "The output format for the private key.\nOnly provided in `CreateServiceAccountKey` responses, not\nin `GetServiceAccountKey` or `ListServiceAccountKey` responses.\n\nGoogle never exposes system-managed private keys, and never retains\nuser-managed private keys.", + "type": "string" + }, + "validAfterTime": { + "description": "The key can be used after this timestamp.", + "format": "google-datetime", + "type": "string" } - } - } - } + }, + "id": "ServiceAccountKey" + }, + "CreateServiceAccountKeyRequest": { + "description": "The service account key create request.", + "type": "object", + "properties": { + "privateKeyType": { + "description": "The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the\ndefault output format.", + "type": "string", + "enumDescriptions": [ + "Unspecified. Equivalent to `TYPE_GOOGLE_CREDENTIALS_FILE`.", + "PKCS12 format.\nThe password for the PKCS12 file is `notasecret`.\nFor more information, see https://tools.ietf.org/html/rfc7292.", + "Google Credentials File format." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "TYPE_PKCS12_FILE", + "TYPE_GOOGLE_CREDENTIALS_FILE" + ] + }, + "includePublicKeyData": { + "type": "boolean" + }, + "keyAlgorithm": { + "description": "Which type of key and algorithm to use for the key.\nThe default is currently a 2K RSA key. However this may change in the\nfuture.", + "type": "string", + "enumDescriptions": [ + "An unspecified key algorithm.", + "1k RSA Key.", + "2k RSA Key." + ], + "enum": [ + "KEY_ALG_UNSPECIFIED", + "KEY_ALG_RSA_1024", + "KEY_ALG_RSA_2048" + ] + } + }, + "id": "CreateServiceAccountKeyRequest" } - } }, - "roles": { - "methods": { - "queryGrantableRoles": { - "id": "iam.roles.queryGrantableRoles", - "path": "v1/roles:queryGrantableRoles", - "httpMethod": "POST", - "description": "Queries roles that can be granted on a particular resource. A role is grantable if it can be used as the role in a binding for a policy for that resource.", - "request": { - "$ref": "QueryGrantableRolesRequest" - }, - "response": { - "$ref": "QueryGrantableRolesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "canonicalName": "iam", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } } - } - } - } + }, + "rootUrl": "https://iam.googleapis.com/", + "ownerDomain": "google.com", + "name": "iam", + "batchPath": "batch", + "title": "Google Identity and Access Management (IAM) API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "serviceAccounts": { + "methods": { + "signBlob": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "SignBlobResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", + "id": "iam.projects.serviceAccounts.signBlob", + "path": "v1/{+name}:signBlob", + "description": "Signs a blob using a service account's system-managed private key.", + "request": { + "$ref": "SignBlobRequest" + } + }, + "list": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "Required. The resource name of the project associated with the service\naccounts, such as `projects/my-project-123`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + }, + "pageToken": { + "description": "Optional pagination token returned in an earlier\nListServiceAccountsResponse.next_page_token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Optional limit on the number of service accounts to include in the\nresponse. Further accounts can subsequently be obtained by including the\nListServiceAccountsResponse.next_page_token\nin a subsequent request.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts", + "id": "iam.projects.serviceAccounts.list", + "path": "v1/{+name}/serviceAccounts", + "description": "Lists ServiceAccounts for a project.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListServiceAccountsResponse" + } + }, + "signJwt": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "SignJwtResponse" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", + "id": "iam.projects.serviceAccounts.signJwt", + "path": "v1/{+name}:signJwt", + "request": { + "$ref": "SignJwtRequest" + }, + "description": "Signs a JWT using a service account's system-managed private key.\n\nIf no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an\nan expiry time of one hour by default. If you request an expiry time of\nmore than one hour, the request will fail." + }, + "setIamPolicy": { + "description": "Sets the IAM access control policy for a\nServiceAccount.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field." + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:setIamPolicy", + "id": "iam.projects.serviceAccounts.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy" + }, + "create": { + "flatPath": "v1/projects/{projectsId}/serviceAccounts", + "path": "v1/{+name}/serviceAccounts", + "id": "iam.projects.serviceAccounts.create", + "description": "Creates a ServiceAccount\nand returns it.", + "request": { + "$ref": "CreateServiceAccountRequest" + }, + "response": { + "$ref": "ServiceAccount" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The resource name of the project associated with the service\naccounts, such as `projects/my-project-123`.", + "required": true, + "type": "string" + } + } + }, + "getIamPolicy": { + "httpMethod": "POST", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:getIamPolicy", + "id": "iam.projects.serviceAccounts.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "description": "Returns the IAM access control policy for a\nServiceAccount." + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "ServiceAccount" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", + "id": "iam.projects.serviceAccounts.get", + "path": "v1/{+name}", + "description": "Gets a ServiceAccount." + }, + "update": { + "description": "Updates a ServiceAccount.\n\nCurrently, only the following fields are updatable:\n`display_name` .\nThe `etag` is mandatory.", + "request": { + "$ref": "ServiceAccount" + }, + "response": { + "$ref": "ServiceAccount" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\n\nRequests using `-` as a wildcard for the project will infer the project\nfrom the `account` and the `account` value can be the `email` address or\nthe `unique_id` of the service account.\n\nIn responses the resource name will always be in the format\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", + "path": "v1/{+name}", + "id": "iam.projects.serviceAccounts.update" + }, + "testIamPermissions": { + "id": "iam.projects.serviceAccounts.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Tests the specified permissions against the IAM access control policy\nfor a ServiceAccount.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:testIamPermissions" + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}", + "id": "iam.projects.serviceAccounts.delete", + "path": "v1/{+name}", + "description": "Deletes a ServiceAccount." + } + }, + "resources": { + "keys": { + "methods": { + "create": { + "path": "v1/{+name}/keys", + "id": "iam.projects.serviceAccounts.keys.create", + "request": { + "$ref": "CreateServiceAccountKeyRequest" + }, + "description": "Creates a ServiceAccountKey\nand returns it.", + "response": { + "$ref": "ServiceAccountKey" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys" + }, + "delete": { + "description": "Deletes a ServiceAccountKey.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "location": "path", + "description": "The resource name of the service account key in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}", + "path": "v1/{+name}", + "id": "iam.projects.serviceAccounts.keys.delete" + }, + "list": { + "description": "Lists ServiceAccountKeys.", + "response": { + "$ref": "ListServiceAccountKeysResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The resource name of the service account in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.\n\nUsing `-` as a wildcard for the project, will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+$" + }, + "keyTypes": { + "description": "Filters the types of keys the user wants to include in the list\nresponse. Duplicate key types are not allowed. If no key type\nis provided, all keys are returned.", + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "KEY_TYPE_UNSPECIFIED", + "USER_MANAGED", + "SYSTEM_MANAGED" + ] + } + }, + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys", + "path": "v1/{+name}/keys", + "id": "iam.projects.serviceAccounts.keys.list" + }, + "get": { + "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}", + "path": "v1/{+name}", + "id": "iam.projects.serviceAccounts.keys.get", + "description": "Gets the ServiceAccountKey\nby key id.", + "response": { + "$ref": "ServiceAccountKey" + }, + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "parameters": { + "publicKeyType": { + "description": "The output format of the public key requested.\nX509_PEM is the default output format.", + "type": "string", + "location": "query", + "enum": [ + "TYPE_NONE", + "TYPE_X509_PEM_FILE", + "TYPE_RAW_PUBLIC_KEY" + ] + }, + "name": { + "location": "path", + "description": "The resource name of the service account key in the following format:\n`projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.\n\nUsing `-` as a wildcard for the project will infer the project from\nthe account. The `account` value can be the `email` address or the\n`unique_id` of the service account.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, + "roles": { + "methods": { + "queryGrantableRoles": { + "response": { + "$ref": "QueryGrantableRolesResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1/roles:queryGrantableRoles", + "path": "v1/roles:queryGrantableRoles", + "id": "iam.roles.queryGrantableRoles", + "description": "Queries roles that can be granted on a particular resource.\nA role is grantable if it can be used as the role in a binding for a policy\nfor that resource.", + "request": { + "$ref": "QueryGrantableRolesRequest" + } + } + } + } + }, + "parameters": { + "key": { + "type": "string", + "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." + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "quotaUser": { + "type": "string", + "location": "query", + "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." + }, + "pp": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Pretty-print response." + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response." + } + }, + "version": "v1", + "baseUrl": "https://iam.googleapis.com/", + "kind": "discovery#restDescription", + "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.", + "servicePath": "", + "basePath": "" } diff --git a/etc/api/identitytoolkit/v3/identitytoolkit-api.json b/etc/api/identitytoolkit/v3/identitytoolkit-api.json index dda7ad5985..cc45b3b351 100644 --- a/etc/api/identitytoolkit/v3/identitytoolkit-api.json +++ b/etc/api/identitytoolkit/v3/identitytoolkit-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/9lrbPxfnfcTzLSOgIxD2Vj83GmI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/mRP2pwjx8HZNSfXtE0G7azflT_U\"", "discoveryVersion": "v1", "id": "identitytoolkit:v3", "name": "identitytoolkit", "canonicalName": "Identity Toolkit", "version": "v3", - "revision": "20161206", + "revision": "20170425", "title": "Google Identity Toolkit API", "description": "Help the third party sites to implement federated login.", "ownerDomain": "google.com", @@ -138,7 +138,7 @@ "DownloadAccountResponse": { "id": "DownloadAccountResponse", "type": "object", - "description": "Respone of downloading accounts in batch.", + "description": "Response of downloading accounts in batch.", "properties": { "kind": { "type": "string", @@ -717,6 +717,10 @@ "type": "string", "description": "Instance id token of the app." }, + "localId": { + "type": "string", + "description": "Privileged caller can create user with specified user id." + }, "password": { "type": "string", "description": "The new password of the user." @@ -787,6 +791,10 @@ "type": "object", "description": "Request to verify the IDP assertion.", "properties": { + "autoCreate": { + "type": "boolean", + "description": "When it's true, automatically creates a new account if the user doesn't exist. When it's false, allows existing user to sign in normally and throws exception if the user doesn't exist." + }, "delegatedProjectNumber": { "type": "string", "description": "GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration.", @@ -938,6 +946,22 @@ "type": "object", "description": "Request of getting a code for user confirmation (reset password, change email etc.)", "properties": { + "androidInstallApp": { + "type": "boolean", + "description": "whether or not to install the android app on the device where the link is opened" + }, + "androidMinimumVersion": { + "type": "string", + "description": "minimum version of the app. if the version on the device is lower than this version then the user is taken to the play store to upgrade the app" + }, + "androidPackageName": { + "type": "string", + "description": "android package name of the android app to handle the action code" + }, + "canHandleCodeInApp": { + "type": "boolean", + "description": "whether or not the app can handle the oob code without first going to web" + }, "captchaResp": { "type": "string", "description": "The recaptcha response from the user." @@ -946,10 +970,22 @@ "type": "string", "description": "The recaptcha challenge presented to the user." }, + "continueUrl": { + "type": "string", + "description": "The url to continue to the Gitkit app" + }, "email": { "type": "string", "description": "The email of the user." }, + "iOSAppStoreId": { + "type": "string", + "description": "iOS app store id to download the app if it's not already installed" + }, + "iOSBundleId": { + "type": "string", + "description": "the iOS bundle id of iOS app to handle the action code" + }, "idToken": { "type": "string", "description": "The user's Gitkit login token for email change." @@ -1010,6 +1046,10 @@ "type": "string", "description": "The email of the user." }, + "emailVerified": { + "type": "boolean", + "description": "If email has been verified." + }, "expiresIn": { "type": "string", "description": "If idToken is STS id token, then this field will be expiration time of STS id token in seconds.", @@ -1188,6 +1228,10 @@ "description": "The timestamp when the password was last updated.", "format": "double" }, + "phoneNumber": { + "type": "string", + "description": "User's phone number." + }, "photoUrl": { "type": "string", "description": "The URL of the user profile photo." @@ -1210,6 +1254,10 @@ "type": "string", "description": "User's identifier at IDP." }, + "phoneNumber": { + "type": "string", + "description": "User's phone number." + }, "photoUrl": { "type": "string", "description": "The user's photo url at the IDP." @@ -1324,6 +1372,10 @@ "type": "string", "description": "It's the identifier param in the createAuthUri request if the identifier is an email. It can be used to check whether the user input email is different from the asserted email." }, + "isNewUser": { + "type": "boolean", + "description": "True if it's a new user sign-in, false if it's a returning user." + }, "kind": { "type": "string", "description": "The fixed string \"identitytoolkit#VerifyAssertionResponse\".", diff --git a/etc/api/kgsearch/v1/kgsearch-api.json b/etc/api/kgsearch/v1/kgsearch-api.json index f39764c0c4..a7d90a4080 100644 --- a/etc/api/kgsearch/v1/kgsearch-api.json +++ b/etc/api/kgsearch/v1/kgsearch-api.json @@ -1,184 +1,194 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/MyGIPHuwU0Ku04gaZJZTvYYLLEQ\"", - "discoveryVersion": "v1", - "id": "kgsearch:v1", - "name": "kgsearch", - "version": "v1", - "revision": "20151215", - "title": "Knowledge Graph Search API", - "description": "Knowledge Graph Search API allows developers to search the Google Knowledge Graph for entities.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/knowledge-graph/", - "protocol": "rest", - "baseUrl": "https://kgsearch.googleapis.com/", - "basePath": "", - "rootUrl": "https://kgsearch.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "version_module": true, - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "schemas": { - "SearchResponse": { - "id": "SearchResponse", - "type": "object", - "description": "Response message includes the context and a list of matching results which contain the detail of associated entities.", - "properties": { - "context": { - "type": "any", - "description": "The local context applicable for the response. See more details at http://www.w3.org/TR/json-ld/#context-definitions." - }, - "type": { - "type": "any", - "description": "The schema type of top-level JSON-LD object, e.g. ItemList." - }, - "itemListElement": { - "type": "array", - "description": "The item list of search results.", - "items": { - "type": "any" - } - } - } - } - }, - "resources": { - "entities": { - "methods": { - "search": { - "id": "kgsearch.entities.search", - "path": "v1/entities:search", - "httpMethod": "GET", - "description": "Searches Knowledge Graph for entities that match the constraints. A list of matched entities will be returned in response, which will be in JSON-LD format and compatible with http://schema.org", - "parameters": { - "query": { - "type": "string", - "description": "The literal query string for search.", - "location": "query" - }, - "ids": { - "type": "string", - "description": "The list of entity id to be used for search instead of query string.", - "repeated": true, - "location": "query" - }, - "languages": { - "type": "string", - "description": "The list of language codes (defined in ISO 693) to run the query with, e.g. 'en'.", - "repeated": true, - "location": "query" - }, - "types": { - "type": "string", - "description": "Restricts returned entities with these types, e.g. Person (as defined in http://schema.org/Person).", - "repeated": true, - "location": "query" - }, - "indent": { - "type": "boolean", - "description": "Enables indenting of json results.", - "location": "query" - }, - "prefix": { - "type": "boolean", - "description": "Enables prefix match against names and aliases of entities", - "location": "query" - }, - "limit": { - "type": "integer", - "description": "Limits the number of entities to be returned.", - "format": "int32", - "location": "query" + "version_module": "True", + "resources": { + "entities": { + "methods": { + "search": { + "flatPath": "v1/entities:search", + "path": "v1/entities:search", + "id": "kgsearch.entities.search", + "description": "Searches Knowledge Graph for entities that match the constraints.\nA list of matched entities will be returned in response, which will be in\nJSON-LD format and compatible with http://schema.org", + "response": { + "$ref": "SearchResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "languages": { + "repeated": true, + "location": "query", + "description": "The list of language codes (defined in ISO 693) to run the query with,\ne.g. 'en'.", + "type": "string" + }, + "ids": { + "description": "The list of entity id to be used for search instead of query string.\nTo specify multiple ids in the HTTP request, repeat the parameter in the\nURL as in ...?ids=A&ids=B", + "type": "string", + "repeated": true, + "location": "query" + }, + "limit": { + "description": "Limits the number of entities to be returned.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "prefix": { + "description": "Enables prefix match against names and aliases of entities", + "type": "boolean", + "location": "query" + }, + "query": { + "description": "The literal query string for search.", + "type": "string", + "location": "query" + }, + "types": { + "description": "Restricts returned entities with these types, e.g. Person\n(as defined in http://schema.org/Person). If multiple types are specified,\nreturned entities will contain one or more of these types.", + "type": "string", + "repeated": true, + "location": "query" + }, + "indent": { + "type": "boolean", + "location": "query", + "description": "Enables indenting of json results." + } + } + } } - }, - "response": { - "$ref": "SearchResponse" - } } - } - } - } + }, + "parameters": { + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "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", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "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" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + }, + "pp": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Pretty-print response." + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + } + }, + "schemas": { + "SearchResponse": { + "type": "object", + "properties": { + "@type": { + "description": "The schema type of top-level JSON-LD object, e.g. ItemList.", + "type": "any" + }, + "@context": { + "type": "any", + "description": "The local context applicable for the response. See more details at\nhttp://www.w3.org/TR/json-ld/#context-definitions." + }, + "itemListElement": { + "description": "The item list of search results.", + "type": "array", + "items": { + "type": "any" + } + } + }, + "id": "SearchResponse", + "description": "Response message includes the context and a list of matching results\nwhich contain the detail of associated entities." + } + }, + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "version": "v1", + "baseUrl": "https://kgsearch.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Searches the Google Knowledge Graph for entities.", + "servicePath": "", + "rootUrl": "https://kgsearch.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "kgsearch", + "batchPath": "batch", + "id": "kgsearch:v1", + "documentationLink": "https://developers.google.com/knowledge-graph/", + "revision": "20170109", + "title": "Knowledge Graph Search API", + "ownerName": "Google", + "discoveryVersion": "v1" } diff --git a/etc/api/language/v1/language-api.json b/etc/api/language/v1/language-api.json index 2f5f087150..32459ba277 100644 --- a/etc/api/language/v1/language-api.json +++ b/etc/api/language/v1/language-api.json @@ -1,273 +1,7 @@ { - "id": "language:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "description": "Google Cloud Natural Language API provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, and text annotations.", - "protocol": "rest", - "title": "Google Cloud Natural Language API", - "resources": { - "documents": { - "methods": { - "analyzeSentiment": { - "id": "language.documents.analyzeSentiment", - "response": { - "$ref": "AnalyzeSentimentResponse" - }, - "parameterOrder": [], - "description": "Analyzes the sentiment of the provided text.", - "request": { - "$ref": "AnalyzeSentimentRequest" - }, - "flatPath": "v1/documents:analyzeSentiment", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/documents:analyzeSentiment", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "analyzeSyntax": { - "id": "language.documents.analyzeSyntax", - "response": { - "$ref": "AnalyzeSyntaxResponse" - }, - "parameterOrder": [], - "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", - "request": { - "$ref": "AnalyzeSyntaxRequest" - }, - "flatPath": "v1/documents:analyzeSyntax", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/documents:analyzeSyntax", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "annotateText": { - "id": "language.documents.annotateText", - "response": { - "$ref": "AnnotateTextResponse" - }, - "parameterOrder": [], - "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call.", - "request": { - "$ref": "AnnotateTextRequest" - }, - "flatPath": "v1/documents:annotateText", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/documents:annotateText", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "analyzeEntities": { - "id": "language.documents.analyzeEntities", - "response": { - "$ref": "AnalyzeEntitiesResponse" - }, - "parameterOrder": [], - "description": "Finds named entities (currently finds proper names) in the text,\nentity types, salience, mentions for each entity, and other properties.", - "request": { - "$ref": "AnalyzeEntitiesRequest" - }, - "flatPath": "v1/documents:analyzeEntities", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/documents:analyzeEntities", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - }, + "discoveryVersion": "v1", + "version_module": "True", "schemas": { - "Document": { - "description": "################################################################ #\n\nRepresents the input to API methods.", - "type": "object", - "properties": { - "language": { - "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n**Current Language Restrictions:**\n\n * Only English, Spanish, and Japanese textual content are supported.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", - "type": "string" - }, - "gcsContentUri": { - "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", - "type": "string" - }, - "type": { - "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", - "enum": [ - "TYPE_UNSPECIFIED", - "PLAIN_TEXT", - "HTML" - ], - "enumDescriptions": [ - "The content type is not specified.", - "Plain text", - "HTML" - ], - "type": "string" - }, - "content": { - "description": "The content of the input in string format.", - "type": "string" - } - }, - "id": "Document" - }, - "TextSpan": { - "description": "Represents an output piece of text.", - "type": "object", - "properties": { - "beginOffset": { - "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request.", - "type": "integer", - "format": "int32" - }, - "content": { - "description": "The content of the output text.", - "type": "string" - } - }, - "id": "TextSpan" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - } - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status" - }, - "AnalyzeEntitiesRequest": { - "description": "The entity analysis request message.", - "type": "object", - "properties": { - "document": { - "description": "Input document.", - "$ref": "Document" - }, - "encodingType": { - "description": "The encoding type used by the API to calculate offsets.", - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], - "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." - ], - "type": "string" - } - }, - "id": "AnalyzeEntitiesRequest" - }, - "EntityMention": { - "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", - "type": "object", - "properties": { - "text": { - "description": "The mention text.", - "$ref": "TextSpan" - }, - "type": { - "description": "The type of the entity mention.", - "enum": [ - "TYPE_UNKNOWN", - "PROPER", - "COMMON" - ], - "enumDescriptions": [ - "Unknown", - "Proper name", - "Common noun (or noun compound)" - ], - "type": "string" - } - }, - "id": "EntityMention" - }, - "AnalyzeSentimentRequest": { - "description": "The sentiment analysis request message.", - "type": "object", - "properties": { - "document": { - "description": "Input document. Currently, `analyzeSentiment` only supports English text\n(Document.language=\"EN\").", - "$ref": "Document" - }, - "encodingType": { - "description": "The encoding type used by the API to calculate sentence offsets.", - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], - "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." - ], - "type": "string" - } - }, - "id": "AnalyzeSentimentRequest" - }, - "AnalyzeSentimentResponse": { - "description": "The sentiment analysis response message.", - "type": "object", - "properties": { - "documentSentiment": { - "description": "The overall sentiment of the input document.", - "$ref": "Sentiment" - }, - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee `Document.language` field for more details.", - "type": "string" - }, - "sentences": { - "description": "The sentiment for all the sentences in the document.", - "type": "array", - "items": { - "$ref": "Sentence" - } - } - }, - "id": "AnalyzeSentimentResponse" - }, "AnalyzeSyntaxRequest": { "description": "The syntax analysis request message.", "type": "object", @@ -278,113 +12,246 @@ }, "encodingType": { "description": "The encoding type used by the API to calculate offsets.", - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], + "type": "string", "enumDescriptions": [ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." ], - "type": "string" + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ] } }, "id": "AnalyzeSyntaxRequest" }, + "AnalyzeSentimentResponse": { + "description": "The sentiment analysis response message.", + "type": "object", + "properties": { + "sentences": { + "description": "The sentiment for all the sentences in the document.", + "type": "array", + "items": { + "$ref": "Sentence" + } + }, + "documentSentiment": { + "description": "The overall sentiment of the input document.", + "$ref": "Sentiment" + }, + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + } + }, + "id": "AnalyzeSentimentResponse" + }, + "AnalyzeEntitiesResponse": { + "description": "The entity analysis response message.", + "type": "object", + "properties": { + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + }, + "entities": { + "description": "The recognized entities in the input document.", + "type": "array", + "items": { + "$ref": "Entity" + } + } + }, + "id": "AnalyzeEntitiesResponse" + }, + "Entity": { + "description": "Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.", + "type": "object", + "properties": { + "mentions": { + "description": "The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.", + "type": "array", + "items": { + "$ref": "EntityMention" + } + }, + "name": { + "description": "The representative name for the entity.", + "type": "string" + }, + "type": { + "enumDescriptions": [ + "Unknown", + "Person", + "Location", + "Organization", + "Event", + "Work of art", + "Consumer goods", + "Other types" + ], + "enum": [ + "UNKNOWN", + "PERSON", + "LOCATION", + "ORGANIZATION", + "EVENT", + "WORK_OF_ART", + "CONSUMER_GOOD", + "OTHER" + ], + "description": "The entity type.", + "type": "string" + }, + "metadata": { + "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "salience": { + "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", + "format": "float", + "type": "number" + } + }, + "id": "Entity" + }, + "AnalyzeSyntaxResponse": { + "description": "The syntax analysis response message.", + "type": "object", + "properties": { + "sentences": { + "description": "Sentences in the input document.", + "type": "array", + "items": { + "$ref": "Sentence" + } + }, + "tokens": { + "description": "Tokens, along with their syntactic information, in the input document.", + "type": "array", + "items": { + "$ref": "Token" + } + }, + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + } + }, + "id": "AnalyzeSyntaxResponse" + }, + "AnnotateTextRequest": { + "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.", + "type": "object", + "properties": { + "encodingType": { + "description": "The encoding type used by the API to calculate offsets.", + "type": "string", + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ] + }, + "document": { + "$ref": "Document", + "description": "Input document." + }, + "features": { + "description": "The enabled features.", + "$ref": "Features" + } + }, + "id": "AnnotateTextRequest" + }, + "AnalyzeSentimentRequest": { + "description": "The sentiment analysis request message.", + "type": "object", + "properties": { + "encodingType": { + "description": "The encoding type used by the API to calculate sentence offsets.", + "type": "string", + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ] + }, + "document": { + "description": "Input document.", + "$ref": "Document" + } + }, + "id": "AnalyzeSentimentRequest" + }, + "AnnotateTextResponse": { + "description": "The text annotations response message.", + "type": "object", + "properties": { + "documentSentiment": { + "$ref": "Sentiment", + "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment." + }, + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + }, + "sentences": { + "description": "Sentences in the input document. Populated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", + "type": "array", + "items": { + "$ref": "Sentence" + } + }, + "tokens": { + "description": "Tokens, along with their syntactic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", + "type": "array", + "items": { + "$ref": "Token" + } + }, + "entities": { + "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", + "type": "array", + "items": { + "$ref": "Entity" + } + } + }, + "id": "AnnotateTextResponse" + }, "DependencyEdge": { "description": "Represents dependency parse tree information for a token. (For more\ninformation on dependency labels, see\nhttp://www.aclweb.org/anthology/P13-2017", "type": "object", "properties": { "headTokenIndex": { "description": "Represents the head of this token in the dependency tree.\nThis is the index of the token which has an arc going to this token.\nThe index is the position of the token in the array of tokens returned\nby the API method. If this token is a root token, then the\n`head_token_index` is its own index.", - "type": "integer", - "format": "int32" + "format": "int32", + "type": "integer" }, "label": { - "description": "The parse label for the token.", - "enum": [ - "UNKNOWN", - "ABBREV", - "ACOMP", - "ADVCL", - "ADVMOD", - "AMOD", - "APPOS", - "ATTR", - "AUX", - "AUXPASS", - "CC", - "CCOMP", - "CONJ", - "CSUBJ", - "CSUBJPASS", - "DEP", - "DET", - "DISCOURSE", - "DOBJ", - "EXPL", - "GOESWITH", - "IOBJ", - "MARK", - "MWE", - "MWV", - "NEG", - "NN", - "NPADVMOD", - "NSUBJ", - "NSUBJPASS", - "NUM", - "NUMBER", - "P", - "PARATAXIS", - "PARTMOD", - "PCOMP", - "POBJ", - "POSS", - "POSTNEG", - "PRECOMP", - "PRECONJ", - "PREDET", - "PREF", - "PREP", - "PRONL", - "PRT", - "PS", - "QUANTMOD", - "RCMOD", - "RCMODREL", - "RDROP", - "REF", - "REMNANT", - "REPARANDUM", - "ROOT", - "SNUM", - "SUFF", - "TMOD", - "TOPIC", - "VMOD", - "VOCATIVE", - "XCOMP", - "SUFFIX", - "TITLE", - "ADVPHMOD", - "AUXCAUS", - "AUXVV", - "DTMOD", - "FOREIGN", - "KW", - "LIST", - "NOMC", - "NOMCSUBJ", - "NOMCSUBJPASS", - "NUMC", - "COP", - "DISLOCATED" - ], "enumDescriptions": [ "Unknown", "Abbreviation modifier", @@ -464,74 +331,241 @@ "Copula", "Dislocated relation (for fronted/topicalized elements)" ], + "enum": [ + "UNKNOWN", + "ABBREV", + "ACOMP", + "ADVCL", + "ADVMOD", + "AMOD", + "APPOS", + "ATTR", + "AUX", + "AUXPASS", + "CC", + "CCOMP", + "CONJ", + "CSUBJ", + "CSUBJPASS", + "DEP", + "DET", + "DISCOURSE", + "DOBJ", + "EXPL", + "GOESWITH", + "IOBJ", + "MARK", + "MWE", + "MWV", + "NEG", + "NN", + "NPADVMOD", + "NSUBJ", + "NSUBJPASS", + "NUM", + "NUMBER", + "P", + "PARATAXIS", + "PARTMOD", + "PCOMP", + "POBJ", + "POSS", + "POSTNEG", + "PRECOMP", + "PRECONJ", + "PREDET", + "PREF", + "PREP", + "PRONL", + "PRT", + "PS", + "QUANTMOD", + "RCMOD", + "RCMODREL", + "RDROP", + "REF", + "REMNANT", + "REPARANDUM", + "ROOT", + "SNUM", + "SUFF", + "TMOD", + "TOPIC", + "VMOD", + "VOCATIVE", + "XCOMP", + "SUFFIX", + "TITLE", + "ADVPHMOD", + "AUXCAUS", + "AUXVV", + "DTMOD", + "FOREIGN", + "KW", + "LIST", + "NOMC", + "NOMCSUBJ", + "NOMCSUBJPASS", + "NUMC", + "COP", + "DISLOCATED" + ], + "description": "The parse label for the token.", "type": "string" } }, "id": "DependencyEdge" }, - "AnalyzeSyntaxResponse": { - "description": "The syntax analysis response message.", + "TextSpan": { + "description": "Represents an output piece of text.", "type": "object", "properties": { - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee `Document.language` field for more details.", + "beginOffset": { + "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request.", + "format": "int32", + "type": "integer" + }, + "content": { + "description": "The content of the output text.", "type": "string" - }, - "tokens": { - "description": "Tokens, along with their syntactic information, in the input document.", - "type": "array", - "items": { - "$ref": "Token" - } - }, - "sentences": { - "description": "Sentences in the input document.", - "type": "array", - "items": { - "$ref": "Sentence" - } } }, - "id": "AnalyzeSyntaxResponse" + "id": "TextSpan" }, - "AnnotateTextRequest": { - "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.", + "Token": { + "description": "Represents the smallest syntactic building block of the text.", "type": "object", "properties": { - "document": { - "description": "Input document.", - "$ref": "Document" + "text": { + "$ref": "TextSpan", + "description": "The token text." }, - "encodingType": { - "description": "The encoding type used by the API to calculate offsets.", - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], - "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." - ], + "dependencyEdge": { + "description": "Dependency tree parse for this token.", + "$ref": "DependencyEdge" + }, + "lemma": { + "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.", "type": "string" }, - "features": { - "description": "The enabled features.", - "$ref": "Features" + "partOfSpeech": { + "$ref": "PartOfSpeech", + "description": "Parts of speech tag for this token." } }, - "id": "AnnotateTextRequest" + "id": "Token" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "EntityMention": { + "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", + "type": "object", + "properties": { + "text": { + "description": "The mention text.", + "$ref": "TextSpan" + }, + "type": { + "enumDescriptions": [ + "Unknown", + "Proper name", + "Common noun (or noun compound)" + ], + "enum": [ + "TYPE_UNKNOWN", + "PROPER", + "COMMON" + ], + "description": "The type of the entity mention.", + "type": "string" + } + }, + "id": "EntityMention" + }, + "Features": { + "description": "All available features for sentiment, syntax, and semantic analysis.\nSetting each one to true will enable that specific analysis for the input.", + "type": "object", + "properties": { + "extractSyntax": { + "description": "Extract syntax information.", + "type": "boolean" + }, + "extractDocumentSentiment": { + "description": "Extract document-level sentiment.", + "type": "boolean" + }, + "extractEntities": { + "description": "Extract entities.", + "type": "boolean" + } + }, + "id": "Features" + }, + "Document": { + "description": "################################################################ #\n\nRepresents the input to API methods.", + "type": "object", + "properties": { + "type": { + "enumDescriptions": [ + "The content type is not specified.", + "Plain text", + "HTML" + ], + "enum": [ + "TYPE_UNSPECIFIED", + "PLAIN_TEXT", + "HTML" + ], + "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", + "type": "string" + }, + "content": { + "description": "The content of the input in string format.", + "type": "string" + }, + "gcsContentUri": { + "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", + "type": "string" + }, + "language": { + "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n[Language Support](/natural-language/docs/languages)\nlists currently supported languages for each API method.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", + "type": "string" + } + }, + "id": "Document" }, "Sentence": { "description": "Represents a sentence in the input document.", "type": "object", "properties": { "text": { - "description": "The sentence text.", - "$ref": "TextSpan" + "$ref": "TextSpan", + "description": "The sentence text." }, "sentiment": { "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence.", @@ -540,70 +574,225 @@ }, "id": "Sentence" }, - "Features": { - "description": "All available features for sentiment, syntax, and semantic analysis.\nSetting each one to true will enable that specific analysis for the input.", + "Sentiment": { + "description": "Represents the feeling associated with the entire text or entities in\nthe text.", "type": "object", "properties": { - "extractDocumentSentiment": { - "description": "Extract document-level sentiment.", - "type": "boolean" + "score": { + "description": "Sentiment score between -1.0 (negative sentiment) and 1.0\n(positive sentiment).", + "format": "float", + "type": "number" }, - "extractEntities": { - "description": "Extract entities.", - "type": "boolean" - }, - "extractSyntax": { - "description": "Extract syntax information.", - "type": "boolean" + "magnitude": { + "description": "A non-negative number in the [0, +inf) range, which represents\nthe absolute magnitude of sentiment regardless of score (positive or\nnegative).", + "format": "float", + "type": "number" } }, - "id": "Features" + "id": "Sentiment" + }, + "AnalyzeEntitiesRequest": { + "description": "The entity analysis request message.", + "type": "object", + "properties": { + "document": { + "description": "Input document.", + "$ref": "Document" + }, + "encodingType": { + "description": "The encoding type used by the API to calculate offsets.", + "type": "string", + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ] + } + }, + "id": "AnalyzeEntitiesRequest" }, "PartOfSpeech": { "description": "Represents part of speech information for a token. Parts of speech\nare as defined in\nhttp://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf", "type": "object", "properties": { - "aspect": { - "description": "The grammatical aspect.", - "enum": [ - "ASPECT_UNKNOWN", - "PERFECTIVE", - "IMPERFECTIVE", - "PROGRESSIVE" + "reciprocity": { + "description": "The grammatical reciprocity.", + "type": "string", + "enumDescriptions": [ + "Reciprocity is not applicable in the analyzed language or is not\npredicted.", + "Reciprocal", + "Non-reciprocal" ], + "enum": [ + "RECIPROCITY_UNKNOWN", + "RECIPROCAL", + "NON_RECIPROCAL" + ] + }, + "form": { + "enumDescriptions": [ + "Form is not applicable in the analyzed language or is not predicted.", + "Adnomial", + "Auxiliary", + "Complementizer", + "Final ending", + "Gerund", + "Realis", + "Irrealis", + "Short form", + "Long form", + "Order form", + "Specific form" + ], + "enum": [ + "FORM_UNKNOWN", + "ADNOMIAL", + "AUXILIARY", + "COMPLEMENTIZER", + "FINAL_ENDING", + "GERUND", + "REALIS", + "IRREALIS", + "SHORT", + "LONG", + "ORDER", + "SPECIFIC" + ], + "description": "The grammatical form.", + "type": "string" + }, + "number": { + "description": "The grammatical number.", + "type": "string", + "enumDescriptions": [ + "Number is not applicable in the analyzed language or is not predicted.", + "Singular", + "Plural", + "Dual" + ], + "enum": [ + "NUMBER_UNKNOWN", + "SINGULAR", + "PLURAL", + "DUAL" + ] + }, + "voice": { + "description": "The grammatical voice.", + "type": "string", + "enumDescriptions": [ + "Voice is not applicable in the analyzed language or is not predicted.", + "Active", + "Causative", + "Passive" + ], + "enum": [ + "VOICE_UNKNOWN", + "ACTIVE", + "CAUSATIVE", + "PASSIVE" + ] + }, + "aspect": { "enumDescriptions": [ "Aspect is not applicable in the analyzed language or is not predicted.", "Perfective", "Imperfective", "Progressive" ], + "enum": [ + "ASPECT_UNKNOWN", + "PERFECTIVE", + "IMPERFECTIVE", + "PROGRESSIVE" + ], + "description": "The grammatical aspect.", + "type": "string" + }, + "mood": { + "enumDescriptions": [ + "Mood is not applicable in the analyzed language or is not predicted.", + "Conditional", + "Imperative", + "Indicative", + "Interrogative", + "Jussive", + "Subjunctive" + ], + "enum": [ + "MOOD_UNKNOWN", + "CONDITIONAL_MOOD", + "IMPERATIVE", + "INDICATIVE", + "INTERROGATIVE", + "JUSSIVE", + "SUBJUNCTIVE" + ], + "description": "The grammatical mood.", + "type": "string" + }, + "tag": { + "enumDescriptions": [ + "Unknown", + "Adjective", + "Adposition (preposition and postposition)", + "Adverb", + "Conjunction", + "Determiner", + "Noun (common and proper)", + "Cardinal number", + "Pronoun", + "Particle or other function word", + "Punctuation", + "Verb (all tenses and modes)", + "Other: foreign words, typos, abbreviations", + "Affix" + ], + "enum": [ + "UNKNOWN", + "ADJ", + "ADP", + "ADV", + "CONJ", + "DET", + "NOUN", + "NUM", + "PRON", + "PRT", + "PUNCT", + "VERB", + "X", + "AFFIX" + ], + "description": "The part of speech tag.", "type": "string" }, "gender": { - "description": "The grammatical gender.", - "enum": [ - "GENDER_UNKNOWN", - "FEMININE", - "MASCULINE", - "NEUTER" - ], "enumDescriptions": [ "Gender is not applicable in the analyzed language or is not predicted.", "Feminine", "Masculine", "Neuter" ], + "enum": [ + "GENDER_UNKNOWN", + "FEMININE", + "MASCULINE", + "NEUTER" + ], + "description": "The grammatical gender.", "type": "string" }, "person": { "description": "The grammatical person.", - "enum": [ - "PERSON_UNKNOWN", - "FIRST", - "SECOND", - "THIRD", - "REFLEXIVE_PERSON" - ], + "type": "string", "enumDescriptions": [ "Person is not applicable in the analyzed language or is not predicted.", "First", @@ -611,27 +800,29 @@ "Third", "Reflexive" ], + "enum": [ + "PERSON_UNKNOWN", + "FIRST", + "SECOND", + "THIRD", + "REFLEXIVE_PERSON" + ] + }, + "proper": { + "enumDescriptions": [ + "Proper is not applicable in the analyzed language or is not predicted.", + "Proper", + "Not proper" + ], + "enum": [ + "PROPER_UNKNOWN", + "PROPER", + "NOT_PROPER" + ], + "description": "The grammatical properness.", "type": "string" }, "case": { - "description": "The grammatical case.", - "enum": [ - "CASE_UNKNOWN", - "ACCUSATIVE", - "ADVERBIAL", - "COMPLEMENTIVE", - "DATIVE", - "GENITIVE", - "INSTRUMENTAL", - "LOCATIVE", - "NOMINATIVE", - "OBLIQUE", - "PARTITIVE", - "PREPOSITIONAL", - "REFLEXIVE_CASE", - "RELATIVE_CASE", - "VOCATIVE" - ], "enumDescriptions": [ "Case is not applicable in the analyzed language or is not predicted.", "Accusative", @@ -649,51 +840,27 @@ "Relative", "Vocative" ], - "type": "string" - }, - "form": { - "description": "The grammatical form.", "enum": [ - "FORM_UNKNOWN", - "ADNOMIAL", - "AUXILIARY", - "COMPLEMENTIZER", - "FINAL_ENDING", - "GERUND", - "REALIS", - "IRREALIS", - "SHORT", - "LONG", - "ORDER", - "SPECIFIC" - ], - "enumDescriptions": [ - "Form is not applicable in the analyzed language or is not predicted.", - "Adnomial", - "Auxiliary", - "Complementizer", - "Final ending", - "Gerund", - "Realis", - "Irrealis", - "Short form", - "Long form", - "Order form", - "Specific form" + "CASE_UNKNOWN", + "ACCUSATIVE", + "ADVERBIAL", + "COMPLEMENTIVE", + "DATIVE", + "GENITIVE", + "INSTRUMENTAL", + "LOCATIVE", + "NOMINATIVE", + "OBLIQUE", + "PARTITIVE", + "PREPOSITIONAL", + "REFLEXIVE_CASE", + "RELATIVE_CASE", + "VOCATIVE" ], + "description": "The grammatical case.", "type": "string" }, "tense": { - "description": "The grammatical tense.", - "enum": [ - "TENSE_UNKNOWN", - "CONDITIONAL_TENSE", - "FUTURE", - "PAST", - "PRESENT", - "IMPERFECT", - "PLUPERFECT" - ], "enumDescriptions": [ "Tense is not applicable in the analyzed language or is not predicted.", "Conditional", @@ -703,299 +870,190 @@ "Imperfect", "Pluperfect" ], - "type": "string" - }, - "proper": { - "description": "The grammatical properness.", "enum": [ - "PROPER_UNKNOWN", - "PROPER", - "NOT_PROPER" - ], - "enumDescriptions": [ - "Proper is not applicable in the analyzed language or is not predicted.", - "Proper", - "Not proper" - ], - "type": "string" - }, - "mood": { - "description": "The grammatical mood.", - "enum": [ - "MOOD_UNKNOWN", - "CONDITIONAL_MOOD", - "IMPERATIVE", - "INDICATIVE", - "INTERROGATIVE", - "JUSSIVE", - "SUBJUNCTIVE" - ], - "enumDescriptions": [ - "Mood is not applicable in the analyzed language or is not predicted.", - "Conditional", - "Imperative", - "Indicative", - "Interrogative", - "Jussive", - "Subjunctive" - ], - "type": "string" - }, - "tag": { - "description": "The part of speech tag.", - "enum": [ - "UNKNOWN", - "ADJ", - "ADP", - "ADV", - "CONJ", - "DET", - "NOUN", - "NUM", - "PRON", - "PRT", - "PUNCT", - "VERB", - "X", - "AFFIX" - ], - "enumDescriptions": [ - "Unknown", - "Adjective", - "Adposition (preposition and postposition)", - "Adverb", - "Conjunction", - "Determiner", - "Noun (common and proper)", - "Cardinal number", - "Pronoun", - "Particle or other function word", - "Punctuation", - "Verb (all tenses and modes)", - "Other: foreign words, typos, abbreviations", - "Affix" - ], - "type": "string" - }, - "number": { - "description": "The grammatical number.", - "enum": [ - "NUMBER_UNKNOWN", - "SINGULAR", - "PLURAL", - "DUAL" - ], - "enumDescriptions": [ - "Number is not applicable in the analyzed language or is not predicted.", - "Singular", - "Plural", - "Dual" - ], - "type": "string" - }, - "reciprocity": { - "description": "The grammatical reciprocity.", - "enum": [ - "RECIPROCITY_UNKNOWN", - "RECIPROCAL", - "NON_RECIPROCAL" - ], - "enumDescriptions": [ - "Reciprocity is not applicable in the analyzed language or is not\npredicted.", - "Reciprocal", - "Non-reciprocal" - ], - "type": "string" - }, - "voice": { - "description": "The grammatical voice.", - "enum": [ - "VOICE_UNKNOWN", - "ACTIVE", - "CAUSATIVE", - "PASSIVE" - ], - "enumDescriptions": [ - "Voice is not applicable in the analyzed language or is not predicted.", - "Active", - "Causative", - "Passive" + "TENSE_UNKNOWN", + "CONDITIONAL_TENSE", + "FUTURE", + "PAST", + "PRESENT", + "IMPERFECT", + "PLUPERFECT" ], + "description": "The grammatical tense.", "type": "string" } }, "id": "PartOfSpeech" - }, - "AnnotateTextResponse": { - "description": "The text annotations response message.", - "type": "object", - "properties": { - "entities": { - "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", - "type": "array", - "items": { - "$ref": "Entity" - } - }, - "documentSentiment": { - "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment.", - "$ref": "Sentiment" - }, - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee `Document.language` field for more details.", - "type": "string" - }, - "tokens": { - "description": "Tokens, along with their syntactic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", - "type": "array", - "items": { - "$ref": "Token" - } - }, - "sentences": { - "description": "Sentences in the input document. Populated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", - "type": "array", - "items": { - "$ref": "Sentence" - } - } - }, - "id": "AnnotateTextResponse" - }, - "Entity": { - "description": "Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.", - "type": "object", - "properties": { - "metadata": { - "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "salience": { - "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", - "type": "number", - "format": "float" - }, - "type": { - "description": "The entity type.", - "enum": [ - "UNKNOWN", - "PERSON", - "LOCATION", - "ORGANIZATION", - "EVENT", - "WORK_OF_ART", - "CONSUMER_GOOD", - "OTHER" - ], - "enumDescriptions": [ - "Unknown", - "Person", - "Location", - "Organization", - "Event", - "Work of art", - "Consumer goods", - "Other types" - ], - "type": "string" - }, - "mentions": { - "description": "The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.", - "type": "array", - "items": { - "$ref": "EntityMention" - } - }, - "name": { - "description": "The representative name for the entity.", - "type": "string" - } - }, - "id": "Entity" - }, - "Sentiment": { - "description": "Represents the feeling associated with the entire text or entities in\nthe text.", - "type": "object", - "properties": { - "score": { - "description": "Sentiment score between -1.0 (negative sentiment) and 1.0\n(positive sentiment).", - "type": "number", - "format": "float" - }, - "magnitude": { - "description": "A non-negative number in the [0, +inf) range, which represents\nthe absolute magnitude of sentiment regardless of score (positive or\nnegative).", - "type": "number", - "format": "float" - } - }, - "id": "Sentiment" - }, - "Token": { - "description": "Represents the smallest syntactic building block of the text.", - "type": "object", - "properties": { - "text": { - "description": "The token text.", - "$ref": "TextSpan" - }, - "partOfSpeech": { - "description": "Parts of speech tag for this token.", - "$ref": "PartOfSpeech" - }, - "dependencyEdge": { - "description": "Dependency tree parse for this token.", - "$ref": "DependencyEdge" - }, - "lemma": { - "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.", - "type": "string" - } - }, - "id": "Token" - }, - "AnalyzeEntitiesResponse": { - "description": "The entity analysis response message.", - "type": "object", - "properties": { - "entities": { - "description": "The recognized entities in the input document.", - "type": "array", - "items": { - "$ref": "Entity" - } - }, - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee `Document.language` field for more details.", - "type": "string" - } - }, - "id": "AnalyzeEntitiesResponse" } }, - "revision": "20161205", - "basePath": "", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", + "protocol": "rest", "canonicalName": "Cloud Natural Language", - "discoveryVersion": "v1", - "baseUrl": "https://language.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://language.googleapis.com/", + "ownerDomain": "google.com", "name": "language", + "batchPath": "batch", + "title": "Google Cloud Natural Language API", + "ownerName": "Google", + "resources": { + "documents": { + "methods": { + "analyzeSyntax": { + "request": { + "$ref": "AnalyzeSyntaxRequest" + }, + "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnalyzeSyntaxResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/documents:analyzeSyntax", + "id": "language.documents.analyzeSyntax", + "path": "v1/documents:analyzeSyntax" + }, + "analyzeSentiment": { + "flatPath": "v1/documents:analyzeSentiment", + "id": "language.documents.analyzeSentiment", + "path": "v1/documents:analyzeSentiment", + "description": "Analyzes the sentiment of the provided text.", + "request": { + "$ref": "AnalyzeSentimentRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnalyzeSentimentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {} + }, + "annotateText": { + "flatPath": "v1/documents:annotateText", + "id": "language.documents.annotateText", + "path": "v1/documents:annotateText", + "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call.", + "request": { + "$ref": "AnnotateTextRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnnotateTextResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {} + }, + "analyzeEntities": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnalyzeEntitiesResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/documents:analyzeEntities", + "id": "language.documents.analyzeEntities", + "path": "v1/documents:analyzeEntities", + "request": { + "$ref": "AnalyzeEntitiesRequest" + }, + "description": "Finds named entities (currently proper names and common nouns) in the text\nalong with entity types, salience, mentions for each entity, and\nother properties." + } + } + } + }, "parameters": { - "access_token": { - "description": "OAuth access token.", + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", "type": "string", "location": "query" }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", - "default": "true", "type": "boolean", + "default": "true" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", "location": "query" }, "key": { @@ -1004,82 +1062,24 @@ "location": "query" }, "quotaUser": { + "location": "query", "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" + "type": "string" }, "pp": { "description": "Pretty-print response.", - "default": "true", "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", + "default": "true", "location": "query" } }, - "documentationLink": "https://cloud.google.com/natural-language/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v1", - "rootUrl": "https://language.googleapis.com/", - "kind": "discovery#restDescription" + "baseUrl": "https://language.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations.", + "servicePath": "", + "basePath": "", + "id": "language:v1", + "revision": "20170515", + "documentationLink": "https://cloud.google.com/natural-language/" } diff --git a/etc/api/language/v1beta1/language-api.json b/etc/api/language/v1beta1/language-api.json index 0135a3ec48..21aedd5c62 100644 --- a/etc/api/language/v1beta1/language-api.json +++ b/etc/api/language/v1beta1/language-api.json @@ -1,261 +1,320 @@ { + "version": "v1beta1", + "baseUrl": "https://language.googleapis.com/", + "description": "Provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, entity sentiment analysis, and text annotations.", + "kind": "discovery#restDescription", + "servicePath": "", + "basePath": "", + "revision": "20170515", "id": "language:v1beta1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "description": "Google Cloud Natural Language API provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, and text annotations.", - "protocol": "rest", - "title": "Google Cloud Natural Language API", - "resources": { - "documents": { - "methods": { - "analyzeSentiment": { - "id": "language.documents.analyzeSentiment", - "response": { - "$ref": "AnalyzeSentimentResponse" - }, - "parameterOrder": [], - "description": "Analyzes the sentiment of the provided text.", - "request": { - "$ref": "AnalyzeSentimentRequest" - }, - "flatPath": "v1beta1/documents:analyzeSentiment", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1/documents:analyzeSentiment", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "analyzeSyntax": { - "id": "language.documents.analyzeSyntax", - "response": { - "$ref": "AnalyzeSyntaxResponse" - }, - "parameterOrder": [], - "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", - "request": { - "$ref": "AnalyzeSyntaxRequest" - }, - "flatPath": "v1beta1/documents:analyzeSyntax", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1/documents:analyzeSyntax", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "annotateText": { - "id": "language.documents.annotateText", - "response": { - "$ref": "AnnotateTextResponse" - }, - "parameterOrder": [], - "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call.", - "request": { - "$ref": "AnnotateTextRequest" - }, - "flatPath": "v1beta1/documents:annotateText", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1/documents:annotateText", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "analyzeEntities": { - "id": "language.documents.analyzeEntities", - "response": { - "$ref": "AnalyzeEntitiesResponse" - }, - "parameterOrder": [], - "description": "Finds named entities (currently finds proper names) in the text,\nentity types, salience, mentions for each entity, and other properties.", - "request": { - "$ref": "AnalyzeEntitiesRequest" - }, - "flatPath": "v1beta1/documents:analyzeEntities", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1/documents:analyzeEntities", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - }, + "documentationLink": "https://cloud.google.com/natural-language/", + "discoveryVersion": "v1", + "version_module": "True", "schemas": { - "Document": { - "description": "################################################################ #\n\nRepresents the input to API methods.", + "PartOfSpeech": { + "description": "Represents part of speech information for a token.", "type": "object", "properties": { - "language": { - "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n**Current Language Restrictions:**\n\n * Only English, Spanish, and Japanese textual content are supported.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", - "type": "string" - }, - "gcsContentUri": { - "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", - "type": "string" - }, - "type": { - "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", - "enum": [ - "TYPE_UNSPECIFIED", - "PLAIN_TEXT", - "HTML" - ], + "case": { "enumDescriptions": [ - "The content type is not specified.", - "Plain text", - "HTML" + "Case is not applicable in the analyzed language or is not predicted.", + "Accusative", + "Adverbial", + "Complementive", + "Dative", + "Genitive", + "Instrumental", + "Locative", + "Nominative", + "Oblique", + "Partitive", + "Prepositional", + "Reflexive", + "Relative", + "Vocative" ], - "type": "string" - }, - "content": { - "description": "The content of the input in string format.", - "type": "string" - } - }, - "id": "Document" - }, - "TextSpan": { - "description": "Represents an output piece of text.", - "type": "object", - "properties": { - "beginOffset": { - "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request.", - "type": "integer", - "format": "int32" - }, - "content": { - "description": "The content of the output text.", - "type": "string" - } - }, - "id": "TextSpan" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - } - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status" - }, - "AnalyzeEntitiesRequest": { - "description": "The entity analysis request message.", - "type": "object", - "properties": { - "document": { - "description": "Input document.", - "$ref": "Document" - }, - "encodingType": { - "description": "The encoding type used by the API to calculate offsets.", "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" + "CASE_UNKNOWN", + "ACCUSATIVE", + "ADVERBIAL", + "COMPLEMENTIVE", + "DATIVE", + "GENITIVE", + "INSTRUMENTAL", + "LOCATIVE", + "NOMINATIVE", + "OBLIQUE", + "PARTITIVE", + "PREPOSITIONAL", + "REFLEXIVE_CASE", + "RELATIVE_CASE", + "VOCATIVE" ], + "description": "The grammatical case.", + "type": "string" + }, + "tense": { "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + "Tense is not applicable in the analyzed language or is not predicted.", + "Conditional", + "Future", + "Past", + "Present", + "Imperfect", + "Pluperfect" ], - "type": "string" - } - }, - "id": "AnalyzeEntitiesRequest" - }, - "EntityMention": { - "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", - "type": "object", - "properties": { - "text": { - "description": "The mention text.", - "$ref": "TextSpan" - }, - "type": { - "description": "The type of the entity mention.", "enum": [ - "TYPE_UNKNOWN", - "PROPER", - "COMMON" + "TENSE_UNKNOWN", + "CONDITIONAL_TENSE", + "FUTURE", + "PAST", + "PRESENT", + "IMPERFECT", + "PLUPERFECT" ], + "description": "The grammatical tense.", + "type": "string" + }, + "reciprocity": { + "enum": [ + "RECIPROCITY_UNKNOWN", + "RECIPROCAL", + "NON_RECIPROCAL" + ], + "description": "The grammatical reciprocity.", + "type": "string", + "enumDescriptions": [ + "Reciprocity is not applicable in the analyzed language or is not\npredicted.", + "Reciprocal", + "Non-reciprocal" + ] + }, + "form": { + "enumDescriptions": [ + "Form is not applicable in the analyzed language or is not predicted.", + "Adnomial", + "Auxiliary", + "Complementizer", + "Final ending", + "Gerund", + "Realis", + "Irrealis", + "Short form", + "Long form", + "Order form", + "Specific form" + ], + "enum": [ + "FORM_UNKNOWN", + "ADNOMIAL", + "AUXILIARY", + "COMPLEMENTIZER", + "FINAL_ENDING", + "GERUND", + "REALIS", + "IRREALIS", + "SHORT", + "LONG", + "ORDER", + "SPECIFIC" + ], + "description": "The grammatical form.", + "type": "string" + }, + "number": { + "enumDescriptions": [ + "Number is not applicable in the analyzed language or is not predicted.", + "Singular", + "Plural", + "Dual" + ], + "enum": [ + "NUMBER_UNKNOWN", + "SINGULAR", + "PLURAL", + "DUAL" + ], + "description": "The grammatical number.", + "type": "string" + }, + "voice": { + "enum": [ + "VOICE_UNKNOWN", + "ACTIVE", + "CAUSATIVE", + "PASSIVE" + ], + "description": "The grammatical voice.", + "type": "string", + "enumDescriptions": [ + "Voice is not applicable in the analyzed language or is not predicted.", + "Active", + "Causative", + "Passive" + ] + }, + "aspect": { + "enumDescriptions": [ + "Aspect is not applicable in the analyzed language or is not predicted.", + "Perfective", + "Imperfective", + "Progressive" + ], + "enum": [ + "ASPECT_UNKNOWN", + "PERFECTIVE", + "IMPERFECTIVE", + "PROGRESSIVE" + ], + "description": "The grammatical aspect.", + "type": "string" + }, + "mood": { + "enumDescriptions": [ + "Mood is not applicable in the analyzed language or is not predicted.", + "Conditional", + "Imperative", + "Indicative", + "Interrogative", + "Jussive", + "Subjunctive" + ], + "enum": [ + "MOOD_UNKNOWN", + "CONDITIONAL_MOOD", + "IMPERATIVE", + "INDICATIVE", + "INTERROGATIVE", + "JUSSIVE", + "SUBJUNCTIVE" + ], + "description": "The grammatical mood.", + "type": "string" + }, + "tag": { "enumDescriptions": [ "Unknown", - "Proper name", - "Common noun (or noun compound)" + "Adjective", + "Adposition (preposition and postposition)", + "Adverb", + "Conjunction", + "Determiner", + "Noun (common and proper)", + "Cardinal number", + "Pronoun", + "Particle or other function word", + "Punctuation", + "Verb (all tenses and modes)", + "Other: foreign words, typos, abbreviations", + "Affix" ], + "enum": [ + "UNKNOWN", + "ADJ", + "ADP", + "ADV", + "CONJ", + "DET", + "NOUN", + "NUM", + "PRON", + "PRT", + "PUNCT", + "VERB", + "X", + "AFFIX" + ], + "description": "The part of speech tag.", "type": "string" + }, + "gender": { + "enumDescriptions": [ + "Gender is not applicable in the analyzed language or is not predicted.", + "Feminine", + "Masculine", + "Neuter" + ], + "enum": [ + "GENDER_UNKNOWN", + "FEMININE", + "MASCULINE", + "NEUTER" + ], + "description": "The grammatical gender.", + "type": "string" + }, + "person": { + "enumDescriptions": [ + "Person is not applicable in the analyzed language or is not predicted.", + "First", + "Second", + "Third", + "Reflexive" + ], + "enum": [ + "PERSON_UNKNOWN", + "FIRST", + "SECOND", + "THIRD", + "REFLEXIVE_PERSON" + ], + "description": "The grammatical person.", + "type": "string" + }, + "proper": { + "enum": [ + "PROPER_UNKNOWN", + "PROPER", + "NOT_PROPER" + ], + "description": "The grammatical properness.", + "type": "string", + "enumDescriptions": [ + "Proper is not applicable in the analyzed language or is not predicted.", + "Proper", + "Not proper" + ] } }, - "id": "EntityMention" + "id": "PartOfSpeech" }, - "AnalyzeSentimentRequest": { - "description": "The sentiment analysis request message.", - "type": "object", + "AnalyzeSyntaxRequest": { "properties": { - "document": { - "description": "Input document. Currently, `analyzeSentiment` only supports English text\n(Document.language=\"EN\").", - "$ref": "Document" - }, "encodingType": { - "description": "The encoding type used by the API to calculate sentence offsets for the\nsentence sentiment.", - "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], "enumDescriptions": [ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], + "description": "The encoding type used by the API to calculate offsets.", "type": "string" + }, + "document": { + "$ref": "Document", + "description": "Input document." } }, - "id": "AnalyzeSentimentRequest" + "id": "AnalyzeSyntaxRequest", + "description": "The syntax analysis request message.", + "type": "object" }, "AnalyzeSentimentResponse": { "description": "The sentiment analysis response message.", "type": "object", "properties": { "documentSentiment": { - "description": "The overall sentiment of the input document.", - "$ref": "Sentiment" + "$ref": "Sentiment", + "description": "The overall sentiment of the input document." }, "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.", + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", "type": "string" }, "sentences": { @@ -268,123 +327,205 @@ }, "id": "AnalyzeSentimentResponse" }, - "AnalyzeSyntaxRequest": { - "description": "The syntax analysis request message.", + "AnalyzeEntitiesResponse": { + "properties": { + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + }, + "entities": { + "description": "The recognized entities in the input document.", + "type": "array", + "items": { + "$ref": "Entity" + } + } + }, + "id": "AnalyzeEntitiesResponse", + "description": "The entity analysis response message.", + "type": "object" + }, + "Entity": { + "description": "Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.", "type": "object", "properties": { - "document": { - "description": "Input document.", - "$ref": "Document" + "mentions": { + "description": "The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.", + "type": "array", + "items": { + "$ref": "EntityMention" + } }, - "encodingType": { - "description": "The encoding type used by the API to calculate offsets.", + "name": { + "description": "The representative name for the entity.", + "type": "string" + }, + "type": { "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" + "UNKNOWN", + "PERSON", + "LOCATION", + "ORGANIZATION", + "EVENT", + "WORK_OF_ART", + "CONSUMER_GOOD", + "OTHER" ], + "description": "The entity type.", + "type": "string", + "enumDescriptions": [ + "Unknown", + "Person", + "Location", + "Organization", + "Event", + "Work of art", + "Consumer goods", + "Other types" + ] + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", + "type": "object" + }, + "salience": { + "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", + "format": "float", + "type": "number" + } + }, + "id": "Entity" + }, + "AnalyzeSyntaxResponse": { + "properties": { + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + }, + "sentences": { + "description": "Sentences in the input document.", + "type": "array", + "items": { + "$ref": "Sentence" + } + }, + "tokens": { + "description": "Tokens, along with their syntactic information, in the input document.", + "type": "array", + "items": { + "$ref": "Token" + } + } + }, + "id": "AnalyzeSyntaxResponse", + "description": "The syntax analysis response message.", + "type": "object" + }, + "AnnotateTextRequest": { + "properties": { + "encodingType": { "enumDescriptions": [ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], + "description": "The encoding type used by the API to calculate offsets.", "type": "string" + }, + "document": { + "description": "Input document.", + "$ref": "Document" + }, + "features": { + "$ref": "Features", + "description": "The enabled features." } }, - "id": "AnalyzeSyntaxRequest" + "id": "AnnotateTextRequest", + "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.", + "type": "object" + }, + "AnalyzeSentimentRequest": { + "properties": { + "encodingType": { + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ], + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], + "description": "The encoding type used by the API to calculate sentence offsets for the\nsentence sentiment.", + "type": "string" + }, + "document": { + "$ref": "Document", + "description": "Input document." + } + }, + "id": "AnalyzeSentimentRequest", + "description": "The sentiment analysis request message.", + "type": "object" + }, + "AnnotateTextResponse": { + "properties": { + "language": { + "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "type": "string" + }, + "sentences": { + "description": "Sentences in the input document. Populated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", + "type": "array", + "items": { + "$ref": "Sentence" + } + }, + "tokens": { + "description": "Tokens, along with their syntactic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", + "type": "array", + "items": { + "$ref": "Token" + } + }, + "entities": { + "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", + "type": "array", + "items": { + "$ref": "Entity" + } + }, + "documentSentiment": { + "$ref": "Sentiment", + "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment." + } + }, + "id": "AnnotateTextResponse", + "description": "The text annotations response message.", + "type": "object" }, "DependencyEdge": { - "description": "Represents dependency parse tree information for a token.", - "type": "object", "properties": { "headTokenIndex": { "description": "Represents the head of this token in the dependency tree.\nThis is the index of the token which has an arc going to this token.\nThe index is the position of the token in the array of tokens returned\nby the API method. If this token is a root token, then the\n`head_token_index` is its own index.", - "type": "integer", - "format": "int32" + "format": "int32", + "type": "integer" }, "label": { - "description": "The parse label for the token.", - "enum": [ - "UNKNOWN", - "ABBREV", - "ACOMP", - "ADVCL", - "ADVMOD", - "AMOD", - "APPOS", - "ATTR", - "AUX", - "AUXPASS", - "CC", - "CCOMP", - "CONJ", - "CSUBJ", - "CSUBJPASS", - "DEP", - "DET", - "DISCOURSE", - "DOBJ", - "EXPL", - "GOESWITH", - "IOBJ", - "MARK", - "MWE", - "MWV", - "NEG", - "NN", - "NPADVMOD", - "NSUBJ", - "NSUBJPASS", - "NUM", - "NUMBER", - "P", - "PARATAXIS", - "PARTMOD", - "PCOMP", - "POBJ", - "POSS", - "POSTNEG", - "PRECOMP", - "PRECONJ", - "PREDET", - "PREF", - "PREP", - "PRONL", - "PRT", - "PS", - "QUANTMOD", - "RCMOD", - "RCMODREL", - "RDROP", - "REF", - "REMNANT", - "REPARANDUM", - "ROOT", - "SNUM", - "SUFF", - "TMOD", - "TOPIC", - "VMOD", - "VOCATIVE", - "XCOMP", - "SUFFIX", - "TITLE", - "ADVPHMOD", - "AUXCAUS", - "AUXVV", - "DTMOD", - "FOREIGN", - "KW", - "LIST", - "NOMC", - "NOMCSUBJ", - "NOMCSUBJPASS", - "NUMC", - "COP", - "DISLOCATED" - ], "enumDescriptions": [ "Unknown", "Abbreviation modifier", @@ -464,86 +605,192 @@ "Copula", "Dislocated relation (for fronted/topicalized elements)" ], - "type": "string" - } - }, - "id": "DependencyEdge" - }, - "AnalyzeSyntaxResponse": { - "description": "The syntax analysis response message.", - "type": "object", - "properties": { - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" - }, - "tokens": { - "description": "Tokens, along with their syntactic information, in the input document.", - "type": "array", - "items": { - "$ref": "Token" - } - }, - "sentences": { - "description": "Sentences in the input document.", - "type": "array", - "items": { - "$ref": "Sentence" - } - } - }, - "id": "AnalyzeSyntaxResponse" - }, - "AnnotateTextRequest": { - "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.", - "type": "object", - "properties": { - "document": { - "description": "Input document.", - "$ref": "Document" - }, - "encodingType": { - "description": "The encoding type used by the API to calculate offsets.", "enum": [ - "NONE", - "UTF8", - "UTF16", - "UTF32" - ], - "enumDescriptions": [ - "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", - "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + "UNKNOWN", + "ABBREV", + "ACOMP", + "ADVCL", + "ADVMOD", + "AMOD", + "APPOS", + "ATTR", + "AUX", + "AUXPASS", + "CC", + "CCOMP", + "CONJ", + "CSUBJ", + "CSUBJPASS", + "DEP", + "DET", + "DISCOURSE", + "DOBJ", + "EXPL", + "GOESWITH", + "IOBJ", + "MARK", + "MWE", + "MWV", + "NEG", + "NN", + "NPADVMOD", + "NSUBJ", + "NSUBJPASS", + "NUM", + "NUMBER", + "P", + "PARATAXIS", + "PARTMOD", + "PCOMP", + "POBJ", + "POSS", + "POSTNEG", + "PRECOMP", + "PRECONJ", + "PREDET", + "PREF", + "PREP", + "PRONL", + "PRT", + "PS", + "QUANTMOD", + "RCMOD", + "RCMODREL", + "RDROP", + "REF", + "REMNANT", + "REPARANDUM", + "ROOT", + "SNUM", + "SUFF", + "TMOD", + "TOPIC", + "VMOD", + "VOCATIVE", + "XCOMP", + "SUFFIX", + "TITLE", + "ADVPHMOD", + "AUXCAUS", + "AUXVV", + "DTMOD", + "FOREIGN", + "KW", + "LIST", + "NOMC", + "NOMCSUBJ", + "NOMCSUBJPASS", + "NUMC", + "COP", + "DISLOCATED" ], + "description": "The parse label for the token.", "type": "string" - }, - "features": { - "description": "The enabled features.", - "$ref": "Features" } }, - "id": "AnnotateTextRequest" + "id": "DependencyEdge", + "description": "Represents dependency parse tree information for a token.", + "type": "object" }, - "Sentence": { - "description": "Represents a sentence in the input document.", + "TextSpan": { + "description": "Represents an output piece of text.", + "type": "object", + "properties": { + "beginOffset": { + "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request.", + "format": "int32", + "type": "integer" + }, + "content": { + "description": "The content of the output text.", + "type": "string" + } + }, + "id": "TextSpan" + }, + "Token": { + "properties": { + "partOfSpeech": { + "$ref": "PartOfSpeech", + "description": "Parts of speech tag for this token." + }, + "text": { + "description": "The token text.", + "$ref": "TextSpan" + }, + "dependencyEdge": { + "$ref": "DependencyEdge", + "description": "Dependency tree parse for this token." + }, + "lemma": { + "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.", + "type": "string" + } + }, + "id": "Token", + "description": "Represents the smallest syntactic building block of the text.", + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "EntityMention": { + "description": "Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.", "type": "object", "properties": { "text": { - "description": "The sentence text.", + "description": "The mention text.", "$ref": "TextSpan" }, - "sentiment": { - "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence.", - "$ref": "Sentiment" + "type": { + "enumDescriptions": [ + "Unknown", + "Proper name", + "Common noun (or noun compound)" + ], + "enum": [ + "TYPE_UNKNOWN", + "PROPER", + "COMMON" + ], + "description": "The type of the entity mention.", + "type": "string" } }, - "id": "Sentence" + "id": "EntityMention" }, "Features": { "description": "All available features for sentiment, syntax, and semantic analysis.\nSetting each one to true will enable that specific analysis for the input.", "type": "object", "properties": { + "extractSyntax": { + "description": "Extract syntax information.", + "type": "boolean" + }, "extractDocumentSentiment": { "description": "Extract document-level sentiment.", "type": "boolean" @@ -551,540 +798,293 @@ "extractEntities": { "description": "Extract entities.", "type": "boolean" - }, - "extractSyntax": { - "description": "Extract syntax information.", - "type": "boolean" } }, "id": "Features" }, - "PartOfSpeech": { - "description": "Represents part of speech information for a token.", + "Document": { + "description": "################################################################ #\n\nRepresents the input to API methods.", "type": "object", "properties": { - "aspect": { - "description": "The grammatical aspect.", - "enum": [ - "ASPECT_UNKNOWN", - "PERFECTIVE", - "IMPERFECTIVE", - "PROGRESSIVE" - ], - "enumDescriptions": [ - "Aspect is not applicable in the analyzed language or is not predicted.", - "Perfective", - "Imperfective", - "Progressive" - ], + "gcsContentUri": { + "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", "type": "string" }, - "gender": { - "description": "The grammatical gender.", - "enum": [ - "GENDER_UNKNOWN", - "FEMININE", - "MASCULINE", - "NEUTER" - ], - "enumDescriptions": [ - "Gender is not applicable in the analyzed language or is not predicted.", - "Feminine", - "Masculine", - "Neuter" - ], - "type": "string" - }, - "person": { - "description": "The grammatical person.", - "enum": [ - "PERSON_UNKNOWN", - "FIRST", - "SECOND", - "THIRD", - "REFLEXIVE_PERSON" - ], - "enumDescriptions": [ - "Person is not applicable in the analyzed language or is not predicted.", - "First", - "Second", - "Third", - "Reflexive" - ], - "type": "string" - }, - "case": { - "description": "The grammatical case.", - "enum": [ - "CASE_UNKNOWN", - "ACCUSATIVE", - "ADVERBIAL", - "COMPLEMENTIVE", - "DATIVE", - "GENITIVE", - "INSTRUMENTAL", - "LOCATIVE", - "NOMINATIVE", - "OBLIQUE", - "PARTITIVE", - "PREPOSITIONAL", - "REFLEXIVE_CASE", - "RELATIVE_CASE", - "VOCATIVE" - ], - "enumDescriptions": [ - "Case is not applicable in the analyzed language or is not predicted.", - "Accusative", - "Adverbial", - "Complementive", - "Dative", - "Genitive", - "Instrumental", - "Locative", - "Nominative", - "Oblique", - "Partitive", - "Prepositional", - "Reflexive", - "Relative", - "Vocative" - ], - "type": "string" - }, - "form": { - "description": "The grammatical form.", - "enum": [ - "FORM_UNKNOWN", - "ADNOMIAL", - "AUXILIARY", - "COMPLEMENTIZER", - "FINAL_ENDING", - "GERUND", - "REALIS", - "IRREALIS", - "SHORT", - "LONG", - "ORDER", - "SPECIFIC" - ], - "enumDescriptions": [ - "Form is not applicable in the analyzed language or is not predicted.", - "Adnomial", - "Auxiliary", - "Complementizer", - "Final ending", - "Gerund", - "Realis", - "Irrealis", - "Short form", - "Long form", - "Order form", - "Specific form" - ], - "type": "string" - }, - "tense": { - "description": "The grammatical tense.", - "enum": [ - "TENSE_UNKNOWN", - "CONDITIONAL_TENSE", - "FUTURE", - "PAST", - "PRESENT", - "IMPERFECT", - "PLUPERFECT" - ], - "enumDescriptions": [ - "Tense is not applicable in the analyzed language or is not predicted.", - "Conditional", - "Future", - "Past", - "Present", - "Imperfect", - "Pluperfect" - ], - "type": "string" - }, - "proper": { - "description": "The grammatical properness.", - "enum": [ - "PROPER_UNKNOWN", - "PROPER", - "NOT_PROPER" - ], - "enumDescriptions": [ - "Proper is not applicable in the analyzed language or is not predicted.", - "Proper", - "Not proper" - ], - "type": "string" - }, - "mood": { - "description": "The grammatical mood.", - "enum": [ - "MOOD_UNKNOWN", - "CONDITIONAL_MOOD", - "IMPERATIVE", - "INDICATIVE", - "INTERROGATIVE", - "JUSSIVE", - "SUBJUNCTIVE" - ], - "enumDescriptions": [ - "Mood is not applicable in the analyzed language or is not predicted.", - "Conditional", - "Imperative", - "Indicative", - "Interrogative", - "Jussive", - "Subjunctive" - ], - "type": "string" - }, - "tag": { - "description": "The part of speech tag.", - "enum": [ - "UNKNOWN", - "ADJ", - "ADP", - "ADV", - "CONJ", - "DET", - "NOUN", - "NUM", - "PRON", - "PRT", - "PUNCT", - "VERB", - "X", - "AFFIX" - ], - "enumDescriptions": [ - "Unknown", - "Adjective", - "Adposition (preposition and postposition)", - "Adverb", - "Conjunction", - "Determiner", - "Noun (common and proper)", - "Cardinal number", - "Pronoun", - "Particle or other function word", - "Punctuation", - "Verb (all tenses and modes)", - "Other: foreign words, typos, abbreviations", - "Affix" - ], - "type": "string" - }, - "number": { - "description": "The grammatical number.", - "enum": [ - "NUMBER_UNKNOWN", - "SINGULAR", - "PLURAL", - "DUAL" - ], - "enumDescriptions": [ - "Number is not applicable in the analyzed language or is not predicted.", - "Singular", - "Plural", - "Dual" - ], - "type": "string" - }, - "reciprocity": { - "description": "The grammatical reciprocity.", - "enum": [ - "RECIPROCITY_UNKNOWN", - "RECIPROCAL", - "NON_RECIPROCAL" - ], - "enumDescriptions": [ - "Reciprocity is not applicable in the analyzed language or is not\npredicted.", - "Reciprocal", - "Non-reciprocal" - ], - "type": "string" - }, - "voice": { - "description": "The grammatical voice.", - "enum": [ - "VOICE_UNKNOWN", - "ACTIVE", - "CAUSATIVE", - "PASSIVE" - ], - "enumDescriptions": [ - "Voice is not applicable in the analyzed language or is not predicted.", - "Active", - "Causative", - "Passive" - ], - "type": "string" - } - }, - "id": "PartOfSpeech" - }, - "AnnotateTextResponse": { - "description": "The text annotations response message.", - "type": "object", - "properties": { - "entities": { - "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", - "type": "array", - "items": { - "$ref": "Entity" - } - }, - "documentSentiment": { - "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment.", - "$ref": "Sentiment" - }, "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", + "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n[Language Support](/natural-language/docs/languages)\nlists currently supported languages for each API method.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", "type": "string" }, - "tokens": { - "description": "Tokens, along with their syntactic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", - "type": "array", - "items": { - "$ref": "Token" - } - }, - "sentences": { - "description": "Sentences in the input document. Populated if the user enables\nAnnotateTextRequest.Features.extract_syntax.", - "type": "array", - "items": { - "$ref": "Sentence" - } - } - }, - "id": "AnnotateTextResponse" - }, - "Entity": { - "description": "Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.", - "type": "object", - "properties": { - "metadata": { - "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "salience": { - "description": "The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.", - "type": "number", - "format": "float" - }, "type": { - "description": "The entity type.", - "enum": [ - "UNKNOWN", - "PERSON", - "LOCATION", - "ORGANIZATION", - "EVENT", - "WORK_OF_ART", - "CONSUMER_GOOD", - "OTHER" - ], "enumDescriptions": [ - "Unknown", - "Person", - "Location", - "Organization", - "Event", - "Work of art", - "Consumer goods", - "Other types" + "The content type is not specified.", + "Plain text", + "HTML" ], + "enum": [ + "TYPE_UNSPECIFIED", + "PLAIN_TEXT", + "HTML" + ], + "description": "Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", "type": "string" }, - "mentions": { - "description": "The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.", - "type": "array", - "items": { - "$ref": "EntityMention" - } - }, - "name": { - "description": "The representative name for the entity.", + "content": { + "description": "The content of the input in string format.", "type": "string" } }, - "id": "Entity" + "id": "Document" + }, + "Sentence": { + "properties": { + "text": { + "$ref": "TextSpan", + "description": "The sentence text." + }, + "sentiment": { + "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence.", + "$ref": "Sentiment" + } + }, + "id": "Sentence", + "description": "Represents a sentence in the input document.", + "type": "object" }, "Sentiment": { "description": "Represents the feeling associated with the entire text or entities in\nthe text.", "type": "object", "properties": { - "score": { - "description": "Sentiment score between -1.0 (negative sentiment) and 1.0\n(positive sentiment).", - "type": "number", - "format": "float" - }, "polarity": { "description": "DEPRECATED FIELD - This field is being deprecated in\nfavor of score. Please refer to our documentation at\nhttps://cloud.google.com/natural-language/docs for more information.", - "type": "number", - "format": "float" + "format": "float", + "type": "number" + }, + "score": { + "description": "Sentiment score between -1.0 (negative sentiment) and 1.0\n(positive sentiment).", + "format": "float", + "type": "number" }, "magnitude": { "description": "A non-negative number in the [0, +inf) range, which represents\nthe absolute magnitude of sentiment regardless of score (positive or\nnegative).", - "type": "number", - "format": "float" + "format": "float", + "type": "number" } }, "id": "Sentiment" }, - "Token": { - "description": "Represents the smallest syntactic building block of the text.", - "type": "object", + "AnalyzeEntitiesRequest": { "properties": { - "text": { - "description": "The token text.", - "$ref": "TextSpan" + "encodingType": { + "enum": [ + "NONE", + "UTF8", + "UTF16", + "UTF32" + ], + "description": "The encoding type used by the API to calculate offsets.", + "type": "string", + "enumDescriptions": [ + "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", + "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." + ] }, - "partOfSpeech": { - "description": "Parts of speech tag for this token.", - "$ref": "PartOfSpeech" - }, - "dependencyEdge": { - "description": "Dependency tree parse for this token.", - "$ref": "DependencyEdge" - }, - "lemma": { - "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.", - "type": "string" + "document": { + "$ref": "Document", + "description": "Input document." } }, - "id": "Token" - }, - "AnalyzeEntitiesResponse": { - "description": "The entity analysis response message.", - "type": "object", - "properties": { - "entities": { - "description": "The recognized entities in the input document.", - "type": "array", - "items": { - "$ref": "Entity" - } - }, - "language": { - "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", - "type": "string" - } - }, - "id": "AnalyzeEntitiesResponse" + "id": "AnalyzeEntitiesRequest", + "description": "The entity analysis request message.", + "type": "object" } }, - "revision": "20161205", - "basePath": "", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version_module": "True", + "protocol": "rest", "canonicalName": "Cloud Natural Language", - "discoveryVersion": "v1", - "baseUrl": "https://language.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://language.googleapis.com/", + "ownerDomain": "google.com", "name": "language", + "batchPath": "batch", + "title": "Google Cloud Natural Language API", + "ownerName": "Google", + "resources": { + "documents": { + "methods": { + "analyzeSentiment": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnalyzeSentimentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1beta1/documents:analyzeSentiment", + "id": "language.documents.analyzeSentiment", + "path": "v1beta1/documents:analyzeSentiment", + "description": "Analyzes the sentiment of the provided text.", + "request": { + "$ref": "AnalyzeSentimentRequest" + } + }, + "annotateText": { + "response": { + "$ref": "AnnotateTextResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/documents:annotateText", + "path": "v1beta1/documents:annotateText", + "id": "language.documents.annotateText", + "request": { + "$ref": "AnnotateTextRequest" + }, + "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call." + }, + "analyzeEntities": { + "id": "language.documents.analyzeEntities", + "path": "v1beta1/documents:analyzeEntities", + "request": { + "$ref": "AnalyzeEntitiesRequest" + }, + "description": "Finds named entities (currently proper names and common nouns) in the text\nalong with entity types, salience, mentions for each entity, and\nother properties.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "AnalyzeEntitiesResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/documents:analyzeEntities" + }, + "analyzeSyntax": { + "response": { + "$ref": "AnalyzeSyntaxResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1beta1/documents:analyzeSyntax", + "path": "v1beta1/documents:analyzeSyntax", + "id": "language.documents.analyzeSyntax", + "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", + "request": { + "$ref": "AnalyzeSyntaxRequest" + } + } + } + } + }, "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", - "default": "true", "type": "boolean", - "location": "query" + "default": "true" }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" }, "alt": { "description": "Data format for response.", - "location": "query", + "default": "json", "enum": [ "json", "media", "proto" ], - "default": "json", + "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], + "location": "query" + }, + "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" }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], + "access_token": { + "description": "OAuth access token.", "type": "string", "location": "query" }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" }, "oauth_token": { + "location": "query", "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "bearer_token": { + "location": "query", "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" } - }, - "documentationLink": "https://cloud.google.com/natural-language/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v1beta1", - "rootUrl": "https://language.googleapis.com/", - "kind": "discovery#restDescription" + } } diff --git a/etc/api/licensing/v1/licensing-api.json b/etc/api/licensing/v1/licensing-api.json index 929b4e5634..a6015c6ce3 100644 --- a/etc/api/licensing/v1/licensing-api.json +++ b/etc/api/licensing/v1/licensing-api.json @@ -1,13 +1,13 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/FyUD9D0inmca5JWfAKYW1_Iol18\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/WD_dCFRiB71YKGuRij6Gw1Sn7dI\"", "discoveryVersion": "v1", "id": "licensing:v1", "name": "licensing", "version": "v1", - "revision": "20150901", + "revision": "20170213", "title": "Enterprise License Manager API", - "description": "Licensing API to view and manage license for your domain.", + "description": "Views and manages licenses for your domain.", "ownerDomain": "google.com", "ownerName": "Google", "icons": { @@ -70,7 +70,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/apps.licensing": { - "description": "View and manage Google Apps licenses for your domain" + "description": "View and manage G Suite licenses for your domain" } } } @@ -92,26 +92,34 @@ }, "productId": { "type": "string", - "description": "Name of the product.", + "description": "Id of the product.", "annotations": { "required": [ "licensing.licenseAssignments.update" ] } }, + "productName": { + "type": "string", + "description": "Display Name of the product." + }, "selfLink": { "type": "string", "description": "Link to this page." }, "skuId": { "type": "string", - "description": "Name of the sku of the product.", + "description": "Id of the sku of the product.", "annotations": { "required": [ "licensing.licenseAssignments.update" ] } }, + "skuName": { + "type": "string", + "description": "Display Name of the sku of the product." + }, "userId": { "type": "string", "description": "Email id of the user.", diff --git a/etc/api/logging/v2/logging-api.json b/etc/api/logging/v2/logging-api.json index 17584009df..55398119ed 100644 --- a/etc/api/logging/v2/logging-api.json +++ b/etc/api/logging/v2/logging-api.json @@ -1,263 +1,951 @@ { - "id": "logging:v2", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/logging.read": { - "description": "View log data for your projects" - }, - "https://www.googleapis.com/auth/logging.write": { - "description": "Submit log data for your projects" - }, - "https://www.googleapis.com/auth/logging.admin": { - "description": "Administrate log data for your projects" - } - } - } - }, - "description": "Writes log entries and manages your Stackdriver Logging configuration.", - "protocol": "rest", - "title": "Stackdriver Logging API", "resources": { "folders": { "resources": { "logs": { "methods": { + "delete": { + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", + "httpMethod": "DELETE", + "parameterOrder": [ + "logName" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "logName": { + "location": "path", + "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "required": true, + "type": "string", + "pattern": "^folders/[^/]+/logs/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/folders/{foldersId}/logs/{logsId}", + "id": "logging.folders.logs.delete", + "path": "v2/{+logName}" + }, "list": { - "id": "logging.folders.logs.list", + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", "response": { "$ref": "ListLogsResponse" }, + "httpMethod": "GET", "parameterOrder": [ "parent" ], - "description": "Lists the logs in projects or organizations. Only logs that have entries are listed.", - "flatPath": "v2/folders/{foldersId}/logs", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2/{+parent}/logs", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.folders.logs.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "logName" ], - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries.", - "flatPath": "v2/folders/{foldersId}/logs/{logsId}", - "httpMethod": "DELETE", "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "required": true, - "pattern": "^folders/[^/]+/logs/[^/]+$", + "parent": { "location": "path", + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^folders/[^/]+$" + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" } }, - "path": "v2/{+logName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] + "flatPath": "v2/folders/{foldersId}/logs", + "id": "logging.folders.logs.list", + "path": "v2/{+parent}/logs" } } }, "sinks": { "methods": { - "update": { - "id": "logging.folders.sinks.update", + "delete": { + "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", + "id": "logging.folders.sinks.delete", + "path": "v2/{+sinkName}", + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", + "httpMethod": "DELETE", "response": { - "$ref": "LogSink" + "$ref": "Empty" }, "parameterOrder": [ "sinkName" ], - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", - "request": { - "$ref": "LogSink" - }, - "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", - "httpMethod": "PUT", "parameters": { "sinkName": { - "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "required": true, "pattern": "^folders/[^/]+/sinks/[^/]+$", "location": "path", - "type": "string" - }, - "uniqueWriterIdentity": { - "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value was false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value was true and the new value is false.", - "location": "query", - "type": "boolean" - } - }, - "path": "v2/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - }, - "get": { - "id": "logging.folders.sinks.get", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Gets a sink.", - "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", - "httpMethod": "GET", - "parameters": { - "sinkName": { - "description": "Required. The parent resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", "required": true, - "pattern": "^folders/[^/]+/sinks/[^/]+$", - "location": "path", "type": "string" } }, - "path": "v2/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "create": { - "id": "logging.folders.sinks.create", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", - "request": { - "$ref": "LogSink" - }, - "flatPath": "v2/folders/{foldersId}/sinks", - "httpMethod": "POST", - "parameters": { - "uniqueWriterIdentity": { - "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", - "location": "query", - "type": "boolean" - }, - "parent": { - "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+parent}/sinks", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" ] }, "list": { + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "parent": { + "location": "path", + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^folders/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/folders/{foldersId}/sinks", + "path": "v2/{+parent}/sinks", "id": "logging.folders.sinks.list", + "description": "Lists sinks.", "response": { "$ref": "ListSinksResponse" }, "parameterOrder": [ "parent" ], - "description": "Lists sinks.", - "flatPath": "v2/folders/{foldersId}/sinks", + "httpMethod": "GET" + }, + "get": { + "path": "v2/{+sinkName}", + "id": "logging.folders.sinks.get", + "description": "Gets a sink.", + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "sinkName" + ], "httpMethod": "GET", "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The parent resource whose sinks are to be listed. Examples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^folders/[^/]+$", + "sinkName": { + "pattern": "^folders/[^/]+/sinks/[^/]+$", "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", + "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, "type": "string" } }, - "path": "v2/{+parent}/sinks", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}" + }, + "update": { + "request": { + "$ref": "LogSink" + }, + "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + "httpMethod": "PUT", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + }, + "parameters": { + "sinkName": { + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string", + "pattern": "^folders/[^/]+/sinks/[^/]+$", + "location": "path" + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is false.", + "type": "boolean" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", + "id": "logging.folders.sinks.update", + "path": "v2/{+sinkName}" + }, + "create": { + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "parent": { + "location": "path", + "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "required": true, + "type": "string", + "pattern": "^folders/[^/]+$" + }, + "uniqueWriterIdentity": { + "type": "boolean", + "location": "query", + "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink." + } + }, + "flatPath": "v2/folders/{foldersId}/sinks", + "path": "v2/{+parent}/sinks", + "id": "logging.folders.sinks.create", + "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + "request": { + "$ref": "LogSink" + } + } + } + } + } + }, + "monitoredResourceDescriptors": { + "methods": { + "list": { + "description": "Lists the descriptors for monitored resource types used by Stackdriver Logging.", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListMonitoredResourceDescriptorsResponse" + }, + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call." + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/monitoredResourceDescriptors", + "id": "logging.monitoredResourceDescriptors.list", + "path": "v2/monitoredResourceDescriptors" + } + } + }, + "organizations": { + "resources": { + "logs": { + "methods": { + "delete": { + "flatPath": "v2/organizations/{organizationsId}/logs/{logsId}", + "id": "logging.organizations.logs.delete", + "path": "v2/{+logName}", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", + "httpMethod": "DELETE", + "parameterOrder": [ + "logName" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "logName": { + "location": "path", + "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+/logs/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" ] }, + "list": { + "flatPath": "v2/organizations/{organizationsId}/logs", + "id": "logging.organizations.logs.list", + "path": "v2/{+parent}/logs", + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListLogsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "parent": { + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + } + } + } + } + }, + "sinks": { + "methods": { + "list": { + "id": "logging.organizations.sinks.list", + "path": "v2/{+parent}/sinks", + "description": "Lists sinks.", + "httpMethod": "GET", + "response": { + "$ref": "ListSinksResponse" + }, + "parameterOrder": [ + "parent" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "parent": { + "location": "path", + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v2/organizations/{organizationsId}/sinks" + }, + "get": { + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "sinkName" + ], + "httpMethod": "GET", + "parameters": { + "sinkName": { + "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+/sinks/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.organizations.sinks.get", + "description": "Gets a sink." + }, + "update": { + "id": "logging.organizations.sinks.update", + "path": "v2/{+sinkName}", + "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + "request": { + "$ref": "LogSink" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "sinkName": { + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+/sinks/[^/]+$", + "location": "path", + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\"." + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is false.", + "type": "boolean" + } + }, + "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}" + }, + "create": { + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "parent": { + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\"." + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", + "type": "boolean" + } + }, + "flatPath": "v2/organizations/{organizationsId}/sinks", + "path": "v2/{+parent}/sinks", + "id": "logging.organizations.sinks.create", + "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + "request": { + "$ref": "LogSink" + } + }, "delete": { - "id": "logging.folders.sinks.delete", "response": { "$ref": "Empty" }, "parameterOrder": [ "sinkName" ], - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", - "flatPath": "v2/folders/{foldersId}/sinks/{sinksId}", "httpMethod": "DELETE", "parameters": { "sinkName": { - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nIt is an error if the sink does not exist. Example: \"projects/my-project-id/sinks/my-sink-id\". It is an error if the sink does not exist.", + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", "required": true, - "pattern": "^folders/[^/]+/sinks/[^/]+$", + "type": "string", + "pattern": "^organizations/[^/]+/sinks/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.organizations.sinks.delete", + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted." + } + } + } + } + }, + "entries": { + "methods": { + "list": { + "path": "v2/entries:list", + "id": "logging.entries.list", + "description": "Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see Exporting Logs.", + "request": { + "$ref": "ListLogEntriesRequest" + }, + "response": { + "$ref": "ListLogEntriesResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": {}, + "flatPath": "v2/entries:list" + }, + "write": { + "response": { + "$ref": "WriteLogEntriesResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "flatPath": "v2/entries:write", + "path": "v2/entries:write", + "id": "logging.entries.write", + "request": { + "$ref": "WriteLogEntriesRequest" + }, + "description": "Writes log entries to Stackdriver Logging." + } + } + }, + "projects": { + "resources": { + "logs": { + "methods": { + "delete": { + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "logName" + ], + "httpMethod": "DELETE", + "parameters": { + "logName": { + "pattern": "^projects/[^/]+/logs/[^/]+$", "location": "path", + "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "required": true, "type": "string" } }, - "path": "v2/{+sinkName}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/projects/{projectsId}/logs/{logsId}", + "path": "v2/{+logName}", + "id": "logging.projects.logs.delete" + }, + "list": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v2/projects/{projectsId}/logs", + "id": "logging.projects.logs.list", + "path": "v2/{+parent}/logs", + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "httpMethod": "GET", + "response": { + "$ref": "ListLogsResponse" + }, + "parameterOrder": [ + "parent" + ] + } + } + }, + "sinks": { + "methods": { + "create": { + "flatPath": "v2/projects/{projectsId}/sinks", + "path": "v2/{+parent}/sinks", + "id": "logging.projects.sinks.create", + "request": { + "$ref": "LogSink" + }, + "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", + "type": "boolean" + }, + "parent": { + "location": "path", + "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" ] + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "sinkName": { + "location": "path", + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/sinks/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", + "id": "logging.projects.sinks.delete", + "path": "v2/{+sinkName}", + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted." + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListSinksResponse" + }, + "parameterOrder": [ + "parent" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v2/projects/{projectsId}/sinks", + "id": "logging.projects.sinks.list", + "path": "v2/{+parent}/sinks", + "description": "Lists sinks." + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "sinkName": { + "pattern": "^projects/[^/]+/sinks/[^/]+$", + "location": "path", + "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string" + } + }, + "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", + "id": "logging.projects.sinks.get", + "path": "v2/{+sinkName}", + "description": "Gets a sink." + }, + "update": { + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "sinkName" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "sinkName": { + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/sinks/[^/]+$", + "location": "path" + }, + "uniqueWriterIdentity": { + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is false.", + "type": "boolean", + "location": "query" + } + }, + "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", + "path": "v2/{+sinkName}", + "id": "logging.projects.sinks.update", + "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + "request": { + "$ref": "LogSink" + } + } + } + }, + "metrics": { + "methods": { + "update": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "parameters": { + "metricName": { + "pattern": "^projects/[^/]+/metrics/[^/]+$", + "location": "path", + "description": "The resource name of the metric to update:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\nThe updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created.", + "required": true, + "type": "string" + } + }, + "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", + "id": "logging.projects.metrics.update", + "path": "v2/{+metricName}", + "description": "Creates or updates a logs-based metric.", + "request": { + "$ref": "LogMetric" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "metricName" + ], + "response": { + "$ref": "LogMetric" + } + }, + "create": { + "request": { + "$ref": "LogMetric" + }, + "description": "Creates a logs-based metric.", + "response": { + "$ref": "LogMetric" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "location": "path", + "description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "flatPath": "v2/projects/{projectsId}/metrics", + "path": "v2/{+parent}/metrics", + "id": "logging.projects.metrics.create" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "httpMethod": "DELETE", + "parameterOrder": [ + "metricName" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "parameters": { + "metricName": { + "pattern": "^projects/[^/]+/metrics/[^/]+$", + "location": "path", + "description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", + "required": true, + "type": "string" + } + }, + "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", + "path": "v2/{+metricName}", + "id": "logging.projects.metrics.delete", + "description": "Deletes a logs-based metric." + }, + "list": { + "response": { + "$ref": "ListLogMetricsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + }, + "parent": { + "location": "path", + "description": "Required. The name of the project containing the metrics:\n\"projects/[PROJECT_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "flatPath": "v2/projects/{projectsId}/metrics", + "path": "v2/{+parent}/metrics", + "id": "logging.projects.metrics.list", + "description": "Lists logs-based metrics." + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "metricName" + ], + "response": { + "$ref": "LogMetric" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "metricName": { + "pattern": "^projects/[^/]+/metrics/[^/]+$", + "location": "path", + "description": "The resource name of the desired metric:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", + "required": true, + "type": "string" + } + }, + "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", + "id": "logging.projects.metrics.get", + "path": "v2/{+metricName}", + "description": "Gets a logs-based metric." } } } @@ -267,974 +955,812 @@ "resources": { "logs": { "methods": { - "list": { - "id": "logging.billingAccounts.logs.list", - "response": { - "$ref": "ListLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists the logs in projects or organizations. Only logs that have entries are listed.", - "flatPath": "v2/billingAccounts/{billingAccountsId}/logs", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n", - "required": true, - "pattern": "^billingAccounts/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2/{+parent}/logs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, "delete": { - "id": "logging.billingAccounts.logs.delete", "response": { "$ref": "Empty" }, "parameterOrder": [ "logName" ], - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries.", - "flatPath": "v2/billingAccounts/{billingAccountsId}/logs/{logsId}", "httpMethod": "DELETE", "parameters": { "logName": { - "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", "required": true, + "type": "string", "pattern": "^billingAccounts/[^/]+/logs/[^/]+$", "location": "path", - "type": "string" + "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry." } }, - "path": "v2/{+logName}", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" - ] + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/logs/{logsId}", + "path": "v2/{+logName}", + "id": "logging.billingAccounts.logs.delete", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." + }, + "list": { + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListLogsResponse" + }, + "parameters": { + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + }, + "parent": { + "required": true, + "type": "string", + "pattern": "^billingAccounts/[^/]+$", + "location": "path", + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/logs", + "id": "logging.billingAccounts.logs.list", + "path": "v2/{+parent}/logs" } } }, "sinks": { "methods": { - "update": { - "id": "logging.billingAccounts.sinks.update", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", - "request": { - "$ref": "LogSink" - }, - "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", - "httpMethod": "PUT", + "delete": { "parameters": { "sinkName": { - "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "required": true, - "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", "location": "path", - "type": "string" - }, - "uniqueWriterIdentity": { - "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value was false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value was true and the new value is false.", - "location": "query", - "type": "boolean" + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string", + "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$" } }, - "path": "v2/{+sinkName}", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/logging.admin" - ] + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", + "id": "logging.billingAccounts.sinks.delete", + "path": "v2/{+sinkName}", + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", + "httpMethod": "DELETE", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "Empty" + } + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListSinksResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "pattern": "^billingAccounts/[^/]+$", + "location": "path", + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks", + "id": "logging.billingAccounts.sinks.list", + "path": "v2/{+parent}/sinks", + "description": "Lists sinks." }, "get": { "id": "logging.billingAccounts.sinks.get", + "path": "v2/{+sinkName}", + "description": "Gets a sink.", + "httpMethod": "GET", "response": { "$ref": "LogSink" }, "parameterOrder": [ "sinkName" ], - "description": "Gets a sink.", - "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", - "httpMethod": "GET", - "parameters": { - "sinkName": { - "description": "Required. The parent resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "required": true, - "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+sinkName}", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/logging.admin", "https://www.googleapis.com/auth/logging.read" - ] + ], + "parameters": { + "sinkName": { + "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string", + "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}" + }, + "update": { + "parameters": { + "sinkName": { + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string", + "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", + "location": "path" + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is false.", + "type": "boolean" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", + "id": "logging.billingAccounts.sinks.update", + "path": "v2/{+sinkName}", + "request": { + "$ref": "LogSink" + }, + "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + "httpMethod": "PUT", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + } }, "create": { + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "parent": { + "location": "path", + "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "required": true, + "type": "string", + "pattern": "^billingAccounts/[^/]+$" + }, + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", + "type": "boolean" + } + }, + "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks", + "path": "v2/{+parent}/sinks", "id": "logging.billingAccounts.sinks.create", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "parent" - ], "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", "request": { "$ref": "LogSink" - }, - "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks", - "httpMethod": "POST", - "parameters": { - "uniqueWriterIdentity": { - "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", - "location": "query", - "type": "boolean" - }, - "parent": { - "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^billingAccounts/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+parent}/sinks", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - }, - "list": { - "id": "logging.billingAccounts.sinks.list", - "response": { - "$ref": "ListSinksResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists sinks.", - "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The parent resource whose sinks are to be listed. Examples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^billingAccounts/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2/{+parent}/sinks", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.billingAccounts.sinks.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", - "flatPath": "v2/billingAccounts/{billingAccountsId}/sinks/{sinksId}", - "httpMethod": "DELETE", - "parameters": { - "sinkName": { - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nIt is an error if the sink does not exist. Example: \"projects/my-project-id/sinks/my-sink-id\". It is an error if the sink does not exist.", - "required": true, - "pattern": "^billingAccounts/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] + } } } } } - }, - "organizations": { - "resources": { - "logs": { - "methods": { - "list": { - "id": "logging.organizations.logs.list", - "response": { - "$ref": "ListLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists the logs in projects or organizations. Only logs that have entries are listed.", - "flatPath": "v2/organizations/{organizationsId}/logs", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2/{+parent}/logs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.organizations.logs.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "logName" - ], - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries.", - "flatPath": "v2/organizations/{organizationsId}/logs/{logsId}", - "httpMethod": "DELETE", - "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "required": true, - "pattern": "^organizations/[^/]+/logs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+logName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - } - } - }, - "sinks": { - "methods": { - "update": { - "id": "logging.organizations.sinks.update", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", - "request": { - "$ref": "LogSink" - }, - "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", - "httpMethod": "PUT", - "parameters": { - "sinkName": { - "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "required": true, - "pattern": "^organizations/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - }, - "uniqueWriterIdentity": { - "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value was false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value was true and the new value is false.", - "location": "query", - "type": "boolean" - } - }, - "path": "v2/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - }, - "get": { - "id": "logging.organizations.sinks.get", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Gets a sink.", - "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", - "httpMethod": "GET", - "parameters": { - "sinkName": { - "description": "Required. The parent resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "required": true, - "pattern": "^organizations/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "create": { - "id": "logging.organizations.sinks.create", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", - "request": { - "$ref": "LogSink" - }, - "flatPath": "v2/organizations/{organizationsId}/sinks", - "httpMethod": "POST", - "parameters": { - "uniqueWriterIdentity": { - "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", - "location": "query", - "type": "boolean" - }, - "parent": { - "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+parent}/sinks", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - }, - "list": { - "id": "logging.organizations.sinks.list", - "response": { - "$ref": "ListSinksResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists sinks.", - "flatPath": "v2/organizations/{organizationsId}/sinks", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The parent resource whose sinks are to be listed. Examples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2/{+parent}/sinks", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.organizations.sinks.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", - "flatPath": "v2/organizations/{organizationsId}/sinks/{sinksId}", - "httpMethod": "DELETE", - "parameters": { - "sinkName": { - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nIt is an error if the sink does not exist. Example: \"projects/my-project-id/sinks/my-sink-id\". It is an error if the sink does not exist.", - "required": true, - "pattern": "^organizations/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - } - } - } - } - }, - "projects": { - "resources": { - "metrics": { - "methods": { - "update": { - "id": "logging.projects.metrics.update", - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "metricName" - ], - "description": "Creates or updates a logs-based metric.", - "request": { - "$ref": "LogMetric" - }, - "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", - "httpMethod": "PUT", - "parameters": { - "metricName": { - "description": "The resource name of the metric to update:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\nThe updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created.", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+metricName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ] - }, - "get": { - "id": "logging.projects.metrics.get", - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "metricName" - ], - "description": "Gets a logs-based metric.", - "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", - "httpMethod": "GET", - "parameters": { - "metricName": { - "description": "The resource name of the desired metric:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+metricName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "create": { - "id": "logging.projects.metrics.create", - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a logs-based metric.", - "request": { - "$ref": "LogMetric" - }, - "flatPath": "v2/projects/{projectsId}/metrics", - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+parent}/metrics", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ] - }, - "list": { - "id": "logging.projects.metrics.list", - "response": { - "$ref": "ListLogMetricsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists logs-based metrics.", - "flatPath": "v2/projects/{projectsId}/metrics", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The name of the project containing the metrics:\n\"projects/[PROJECT_ID]\"\n", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2/{+parent}/metrics", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.projects.metrics.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "metricName" - ], - "description": "Deletes a logs-based metric.", - "flatPath": "v2/projects/{projectsId}/metrics/{metricsId}", - "httpMethod": "DELETE", - "parameters": { - "metricName": { - "description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+metricName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ] - } - } - }, - "logs": { - "methods": { - "list": { - "id": "logging.projects.logs.list", - "response": { - "$ref": "ListLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists the logs in projects or organizations. Only logs that have entries are listed.", - "flatPath": "v2/projects/{projectsId}/logs", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2/{+parent}/logs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.projects.logs.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "logName" - ], - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries.", - "flatPath": "v2/projects/{projectsId}/logs/{logsId}", - "httpMethod": "DELETE", - "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "required": true, - "pattern": "^projects/[^/]+/logs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+logName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - } - } - }, - "sinks": { - "methods": { - "update": { - "id": "logging.projects.sinks.update", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", - "request": { - "$ref": "LogSink" - }, - "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", - "httpMethod": "PUT", - "parameters": { - "sinkName": { - "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "required": true, - "pattern": "^projects/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - }, - "uniqueWriterIdentity": { - "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value was false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value was true and the new value is false.", - "location": "query", - "type": "boolean" - } - }, - "path": "v2/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - }, - "get": { - "id": "logging.projects.sinks.get", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Gets a sink.", - "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", - "httpMethod": "GET", - "parameters": { - "sinkName": { - "description": "Required. The parent resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "required": true, - "pattern": "^projects/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "create": { - "id": "logging.projects.sinks.create", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", - "request": { - "$ref": "LogSink" - }, - "flatPath": "v2/projects/{projectsId}/sinks", - "httpMethod": "POST", - "parameters": { - "uniqueWriterIdentity": { - "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", - "location": "query", - "type": "boolean" - }, - "parent": { - "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+parent}/sinks", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - }, - "list": { - "id": "logging.projects.sinks.list", - "response": { - "$ref": "ListSinksResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists sinks.", - "flatPath": "v2/projects/{projectsId}/sinks", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The parent resource whose sinks are to be listed. Examples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2/{+parent}/sinks", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.projects.sinks.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", - "flatPath": "v2/projects/{projectsId}/sinks/{sinksId}", - "httpMethod": "DELETE", - "parameters": { - "sinkName": { - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nIt is an error if the sink does not exist. Example: \"projects/my-project-id/sinks/my-sink-id\". It is an error if the sink does not exist.", - "required": true, - "pattern": "^projects/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - } - } - } - } - }, - "entries": { - "methods": { - "write": { - "id": "logging.entries.write", - "response": { - "$ref": "WriteLogEntriesResponse" - }, - "parameterOrder": [], - "description": "Writes log entries to Stackdriver Logging. All log entries are written by this method.", - "request": { - "$ref": "WriteLogEntriesRequest" - }, - "flatPath": "v2/entries:write", - "httpMethod": "POST", - "parameters": {}, - "path": "v2/entries:write", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ] - }, - "list": { - "id": "logging.entries.list", - "response": { - "$ref": "ListLogEntriesResponse" - }, - "parameterOrder": [], - "description": "Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see Exporting Logs.", - "request": { - "$ref": "ListLogEntriesRequest" - }, - "flatPath": "v2/entries:list", - "httpMethod": "POST", - "parameters": {}, - "path": "v2/entries:list", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - } - } - }, - "monitoredResourceDescriptors": { - "methods": { - "list": { - "id": "logging.monitoredResourceDescriptors.list", - "response": { - "$ref": "ListMonitoredResourceDescriptorsResponse" - }, - "parameterOrder": [], - "description": "Lists the descriptors for monitored resource types used by Stackdriver Logging.", - "flatPath": "v2/monitoredResourceDescriptors", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2/monitoredResourceDescriptors", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - } - } } }, + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "callback": { + "type": "string", + "location": "query", + "description": "JSONP" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "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" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + } + }, + "version": "v2", + "baseUrl": "https://logging.googleapis.com/", + "servicePath": "", + "description": "Writes log entries and manages your Stackdriver Logging configuration.", + "kind": "discovery#restDescription", + "basePath": "", + "documentationLink": "https://cloud.google.com/logging/docs/", + "id": "logging:v2", + "revision": "20170516", + "discoveryVersion": "v1", + "version_module": "True", "schemas": { - "ListLogEntriesResponse": { - "description": "Result returned from ListLogEntries.", + "ListLogEntriesRequest": { "type": "object", "properties": { + "orderBy": { + "description": "Optional. How the results should be sorted. Presently, the only permitted values are \"timestamp asc\" (default) and \"timestamp desc\". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values.", + "type": "string" + }, + "resourceNames": { + "description": "Required. Names of one or more parent resources from which to retrieve log entries:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nProjects listed in the project_ids field are added to this list.", + "type": "array", + "items": { + "type": "string" + } + }, + "filter": { + "description": "Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters.", + "type": "string" + }, + "projectIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names." + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available.", + "format": "int32" + } + }, + "id": "ListLogEntriesRequest", + "description": "The parameters to ListLogEntries." + }, + "RequestLog": { + "description": "Complete log information about a single HTTP request to an App Engine application.", + "type": "object", + "properties": { + "line": { + "description": "A list of log lines emitted by the application while serving this request.", + "type": "array", + "items": { + "$ref": "LogLine" + } + }, + "referrer": { + "description": "Referrer URL of request.", + "type": "string" + }, + "taskQueueName": { + "description": "Queue name of the request, in the case of an offline request.", + "type": "string" + }, + "requestId": { + "description": "Globally unique identifier for a request, which is based on the request start time. Request IDs for requests which started later will compare greater as strings than those for requests which started earlier.", + "type": "string" + }, + "nickname": { + "description": "The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21.", + "type": "string" + }, + "pendingTime": { + "description": "Time this request spent in the pending request queue.", + "format": "google-duration", + "type": "string" + }, + "resource": { + "description": "Contains the path and query portion of the URL that was requested. For example, if the URL was \"http://example.com/app?name=val\", the resource would be \"/app?name=val\". The fragment identifier, which is identified by the # character, is not included.", + "type": "string" + }, + "status": { + "description": "HTTP response status code. Example: 200, 404.", + "format": "int32", + "type": "integer" + }, + "taskName": { + "description": "Task name of the request, in the case of an offline request.", + "type": "string" + }, + "urlMapEntry": { + "type": "string", + "description": "File or class that handled the request." + }, + "instanceIndex": { + "description": "If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1.", + "format": "int32", + "type": "integer" + }, + "finished": { + "description": "Whether this request is finished or active.", + "type": "boolean" + }, + "host": { + "description": "Internet host and port number of the resource being requested.", + "type": "string" + }, + "httpVersion": { + "description": "HTTP version of request. Example: \"HTTP/1.1\".", + "type": "string" + }, + "startTime": { + "description": "Time when the request started.", + "format": "google-datetime", + "type": "string" + }, + "latency": { + "type": "string", + "description": "Latency of the request.", + "format": "google-duration" + }, + "ip": { + "description": "Origin IP address.", + "type": "string" + }, + "appId": { + "description": "Application that handled this request.", + "type": "string" + }, + "appEngineRelease": { + "description": "App Engine release version.", + "type": "string" + }, + "method": { + "description": "Request method. Example: \"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\".", + "type": "string" + }, + "cost": { + "description": "An indication of the relative cost of serving this request.", + "format": "double", + "type": "number" + }, + "instanceId": { + "description": "An identifier for the instance that handled the request.", + "type": "string" + }, + "megaCycles": { + "description": "Number of CPU megacycles used to process request.", + "format": "int64", + "type": "string" + }, + "first": { + "description": "Whether this is the first RequestLog entry for this request. If an active request has several RequestLog entries written to Stackdriver Logging, then this field will be set for one of them.", + "type": "boolean" + }, + "versionId": { + "description": "Version of the application that handled this request.", + "type": "string" + }, + "moduleId": { + "description": "Module of the application that handled this request.", + "type": "string" + }, + "endTime": { + "description": "Time when the request finished.", + "format": "google-datetime", + "type": "string" + }, + "userAgent": { + "description": "User agent that made the request.", + "type": "string" + }, + "wasLoadingRequest": { + "description": "Whether this was a loading request for the instance.", + "type": "boolean" + }, + "sourceReference": { + "description": "Source code for the application that handled this request. There can be more than one source reference per deployed application if source code is distributed among multiple repositories.", + "type": "array", + "items": { + "$ref": "SourceReference" + } + }, + "responseSize": { + "type": "string", + "description": "Size in bytes sent back to client by request.", + "format": "int64" + }, + "traceId": { + "description": "Stackdriver Trace identifier for this request.", + "type": "string" + } + }, + "id": "RequestLog" + }, + "ListMonitoredResourceDescriptorsResponse": { + "description": "Result returned from ListMonitoredResourceDescriptors.", + "type": "object", + "properties": { + "resourceDescriptors": { + "description": "A list of resource descriptors.", + "type": "array", + "items": { + "$ref": "MonitoredResourceDescriptor" + } + }, + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", + "type": "string" + } + }, + "id": "ListMonitoredResourceDescriptorsResponse" + }, + "SourceReference": { + "properties": { + "repository": { + "description": "Optional. A URI string identifying the repository. Example: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", + "type": "string" + }, + "revisionId": { + "description": "The canonical and persistent identifier of the deployed revision. Example (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", + "type": "string" + } + }, + "id": "SourceReference", + "description": "A reference to a particular snapshot of the source tree used to build and deploy an application.", + "type": "object" + }, + "WriteLogEntriesResponse": { + "properties": {}, + "id": "WriteLogEntriesResponse", + "description": "Result returned from WriteLogEntries. empty", + "type": "object" + }, + "LogMetric": { + "id": "LogMetric", + "description": "Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.", + "type": "object", + "properties": { + "name": { + "description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\".", + "type": "string" + }, + "description": { + "description": "Optional. A description of this metric, which is used in documentation.", + "type": "string" + }, + "version": { + "enum": [ + "V2", + "V1" + ], + "description": "Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.", + "type": "string", + "enumDescriptions": [ + "Stackdriver Logging API v2.", + "Stackdriver Logging API v1." + ] + }, + "filter": { + "description": "Required. An advanced logs filter which is used to match log entries. Example:\n\"resource.type=gae_app AND severity\u003e=ERROR\"\nThe maximum length of the filter is 20000 characters.", + "type": "string" + } + } + }, + "LogEntryOperation": { + "description": "Additional information about a potentially long-running operation with which a log entry is associated.", + "type": "object", + "properties": { + "last": { + "description": "Optional. Set this to True if this is the last log entry in the operation.", + "type": "boolean" + }, + "id": { + "description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.", + "type": "string" + }, + "producer": { + "description": "Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: \"MyDivision.MyBigCompany.com\", \"github.com/MyProject/MyApplication\".", + "type": "string" + }, + "first": { + "description": "Optional. Set this to True if this is the first log entry in the operation.", + "type": "boolean" + } + }, + "id": "LogEntryOperation" + }, + "MonitoredResource": { + "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"instance_id\" and \"zone\":\n{ \"type\": \"gce_instance\",\n \"labels\": { \"instance_id\": \"12345678901234\",\n \"zone\": \"us-central1-a\" }}\n", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels \"project_id\", \"instance_id\", and \"zone\".", + "type": "object" + }, + "type": { + "description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance.", + "type": "string" + } + }, + "id": "MonitoredResource" + }, + "WriteLogEntriesRequest": { + "description": "The parameters to WriteLogEntries.", + "type": "object", + "properties": { + "logName": { + "description": "Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\" or \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "type": "string" + }, "entries": { - "description": "A list of log entries.", + "description": "Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are inserted into those log entries in this list that do not provide their own values.Stackdriver Logging also creates and inserts values for timestamp and insert_id if the entries do not provide them. The created insert_id for the N'th entry in this list will be greater than earlier entries and less than later entries. Otherwise, the order of log entries in this list does not matter.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry.", "type": "array", "items": { "$ref": "LogEntry" } }, + "partialSuccess": { + "description": "Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries' zero-based index in the entries.write method.", + "type": "boolean" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry.", + "type": "object" + }, + "resource": { + "description": "Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example:\n{ \"type\": \"gce_instance\",\n \"labels\": {\n \"zone\": \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }}\nSee LogEntry.", + "$ref": "MonitoredResource" + } + }, + "id": "WriteLogEntriesRequest" + }, + "LogSink": { + "description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.", + "type": "object", + "properties": { + "filter": { + "description": "Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format:\nlogName=\"projects/[PROJECT_ID]/logs/[LOG_ID]\" AND severity\u003e=ERROR\n", + "type": "string" + }, + "destination": { + "description": "Required. The export destination:\n\"storage.googleapis.com/[GCS_BUCKET]\"\n\"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"\n\"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]\"\nThe sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks.", + "type": "string" + }, + "endTime": { + "description": "Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated.", + "format": "google-datetime", + "type": "string" + }, + "writerIdentity": { + "description": "Output only. An IAM identity—a service account or group—under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.", + "type": "string" + }, + "outputVersionFormat": { + "enum": [ + "VERSION_FORMAT_UNSPECIFIED", + "V2", + "V1" + ], + "description": "Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API.", + "type": "string", + "enumDescriptions": [ + "An unspecified format version that will default to V2.", + "LogEntry version 2 format.", + "LogEntry version 1 format." + ] + }, + "name": { + "description": "Required. The client-assigned sink identifier, unique within the project. Example: \"my-syslog-errors-to-pubsub\". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.", + "type": "string" + }, + "includeChildren": { + "description": "Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log name:\nlogName:(\"projects/test-project1/\" OR \"projects/test-project2/\") AND\nresource.type=gce_instance\n", + "type": "boolean" + } + }, + "id": "LogSink" + }, + "ListLogsResponse": { + "id": "ListLogsResponse", + "description": "Result returned from ListLogs.", + "type": "object", + "properties": { "nextPageToken": { - "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search.", + "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", + "type": "string" + }, + "logNames": { + "description": "A list of log names. For example, \"projects/my-project/syslog\" or \"organizations/123/cloudresourcemanager.googleapis.com%2Factivity\".", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "HttpRequest": { + "description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", + "type": "object", + "properties": { + "cacheLookup": { + "description": "Whether or not a cache lookup was attempted.", + "type": "boolean" + }, + "cacheHit": { + "description": "Whether or not an entity was served from cache (with or without validation).", + "type": "boolean" + }, + "cacheValidatedWithOriginServer": { + "description": "Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True.", + "type": "boolean" + }, + "status": { + "description": "The response code indicating the status of response. Examples: 200, 404.", + "format": "int32", + "type": "integer" + }, + "referer": { + "description": "The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", + "type": "string" + }, + "latency": { + "description": "The request processing latency on the server, from the time the request was received until the response was sent.", + "format": "google-duration", + "type": "string" + }, + "userAgent": { + "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".", + "type": "string" + }, + "cacheFillBytes": { + "description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", + "format": "int64", + "type": "string" + }, + "requestMethod": { + "description": "The request method. Examples: \"GET\", \"HEAD\", \"PUT\", \"POST\".", + "type": "string" + }, + "requestSize": { + "description": "The size of the HTTP request message in bytes, including the request headers and the request body.", + "format": "int64", + "type": "string" + }, + "responseSize": { + "description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", + "format": "int64", + "type": "string" + }, + "requestUrl": { + "type": "string", + "description": "The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: \"http://example.com/some/info?color=red\"." + }, + "remoteIp": { + "description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: \"192.168.1.1\", \"FE80::0202:B3FF:FE1E:8329\".", + "type": "string" + }, + "serverIp": { + "description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", "type": "string" } }, - "id": "ListLogEntriesResponse" + "id": "HttpRequest" }, "ListSinksResponse": { + "id": "ListSinksResponse", "description": "Result returned from ListSinks.", "type": "object", "properties": { @@ -1249,360 +1775,153 @@ "$ref": "LogSink" } } - }, - "id": "ListSinksResponse" - }, - "SourceLocation": { - "description": "Specifies a location in a source code file.", - "type": "object", - "properties": { - "file": { - "description": "Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", - "type": "string" - }, - "functionName": { - "description": "Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", - "type": "string" - }, - "line": { - "description": "Line within the source file.", - "type": "string", - "format": "int64" - } - }, - "id": "SourceLocation" - }, - "LogSink": { - "description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project or organization.", - "type": "object", - "properties": { - "destination": { - "description": "Required. The export destination:\n\"storage.googleapis.com/[GCS_BUCKET]\"\n\"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"\n\"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]\"\nThe sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks.", - "type": "string" - }, - "filter": { - "description": "Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format:\nlogName=\"projects/[PROJECT_ID]/logs/[LOG_ID]\" AND severity\u003e=ERROR\n", - "type": "string" - }, - "endTime": { - "description": "Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time.", - "type": "string", - "format": "google-datetime" - }, - "name": { - "description": "Required. The client-assigned sink identifier, unique within the project. Example: \"my-syslog-errors-to-pubsub\". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.", - "type": "string" - }, - "startTime": { - "description": "Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated.", - "type": "string", - "format": "google-datetime" - }, - "outputVersionFormat": { - "description": "Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API.", - "enum": [ - "VERSION_FORMAT_UNSPECIFIED", - "V2", - "V1" - ], - "enumDescriptions": [ - "An unspecified format version that will default to V2.", - "LogEntry version 2 format.", - "LogEntry version 1 format." - ], - "type": "string" - }, - "writerIdentity": { - "description": "Output only. An IAM identity—a service account or group—under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.", - "type": "string" - } - }, - "id": "LogSink" - }, - "ListLogsResponse": { - "description": "Result returned from ListLogs.", - "type": "object", - "properties": { - "logNames": { - "description": "A list of log names. For example, \"projects/my-project/syslog\" or \"organizations/123/cloudresourcemanager.googleapis.com%2Factivity\".", - "type": "array", - "items": { - "type": "string" - } - }, - "nextPageToken": { - "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", - "type": "string" - } - }, - "id": "ListLogsResponse" - }, - "LogMetric": { - "description": "Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.", - "type": "object", - "properties": { - "description": { - "description": "Optional. A description of this metric, which is used in documentation.", - "type": "string" - }, - "filter": { - "description": "Required. An advanced logs filter which is used to match log entries. Example:\n\"resource.type=gae_app AND severity\u003e=ERROR\"\nThe maximum length of the filter is 20000 characters.", - "type": "string" - }, - "name": { - "description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\".", - "type": "string" - }, - "version": { - "description": "Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.", - "enum": [ - "V2", - "V1" - ], - "enumDescriptions": [ - "Stackdriver Logging API v2.", - "Stackdriver Logging API v1." - ], - "type": "string" - } - }, - "id": "LogMetric" - }, - "LogEntry": { - "description": "An individual entry in a log.", - "type": "object", - "properties": { - "textPayload": { - "description": "The log entry payload, represented as a Unicode string (UTF-8).", - "type": "string" - }, - "httpRequest": { - "description": "Optional. Information about the HTTP request associated with this log entry, if applicable.", - "$ref": "HttpRequest" - }, - "sourceLocation": { - "description": "Optional. Source code location information associated with the log entry, if any.", - "$ref": "LogEntrySourceLocation" - }, - "jsonPayload": { - "description": "The log entry payload, represented as a structure that is expressed as a JSON object.", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "type": "object" - }, - "labels": { - "description": "Optional. A set of user-defined (key, value) data that provides additional information about the log entry.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "trace": { - "description": "Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824", - "type": "string" - }, - "logName": { - "description": "Required. The resource name of the log to which this log entry belongs:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.", - "type": "string" - }, - "severity": { - "description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.", - "enum": [ - "DEFAULT", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ], - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or a configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], - "type": "string" - }, - "resource": { - "description": "Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.", - "$ref": "MonitoredResource" - }, - "protoPayload": { - "description": "The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "timestamp": { - "description": "Optional. The time the event described by the log entry occurred. If omitted, Stackdriver Logging will use the time the log entry is received.", - "type": "string", - "format": "google-datetime" - }, - "insertId": { - "description": "Optional. A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same project with the same ID as duplicates which can be removed. If omitted, Stackdriver Logging will generate a unique ID for this log entry.", - "type": "string" - }, - "operation": { - "description": "Optional. Information about an operation associated with the log entry, if applicable.", - "$ref": "LogEntryOperation" - } - }, - "id": "LogEntry" - }, - "LogLine": { - "description": "Application log line emitted while processing a request.", - "type": "object", - "properties": { - "time": { - "description": "Approximate time when this log entry was made.", - "type": "string", - "format": "google-datetime" - }, - "severity": { - "description": "Severity of this log entry.", - "enum": [ - "DEFAULT", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ], - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or a configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], - "type": "string" - }, - "sourceLocation": { - "description": "Where in the source code this log message was written.", - "$ref": "SourceLocation" - }, - "logMessage": { - "description": "App-provided log message.", - "type": "string" - } - }, - "id": "LogLine" - }, - "SourceReference": { - "description": "A reference to a particular snapshot of the source tree used to build and deploy an application.", - "type": "object", - "properties": { - "repository": { - "description": "Optional. A URI string identifying the repository. Example: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", - "type": "string" - }, - "revisionId": { - "description": "The canonical and persistent identifier of the deployed revision. Example (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", - "type": "string" - } - }, - "id": "SourceReference" - }, - "MonitoredResource": { - "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"instance_id\" and \"zone\":\n{ \"type\": \"gce_instance\",\n \"labels\": { \"instance_id\": \"12345678901234\",\n \"zone\": \"us-central1-a\" }}\n", - "type": "object", - "properties": { - "labels": { - "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels \"database_id\" and \"zone\".", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "type": { - "description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is \"cloudsql_database\".", - "type": "string" - } - }, - "id": "MonitoredResource" - }, - "WriteLogEntriesRequest": { - "description": "The parameters to WriteLogEntries.", - "type": "object", - "properties": { - "labels": { - "description": "Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "entries": { - "description": "Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are added to those log entries that do not provide their own values for the fields.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry.", - "type": "array", - "items": { - "$ref": "LogEntry" - } - }, - "logName": { - "description": "Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\" or \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "type": "string" - }, - "partialSuccess": { - "description": "Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, the response status will be the error associated with one of the failed entries and include error details in the form of WriteLogEntriesPartialErrors.", - "type": "boolean" - }, - "resource": { - "description": "Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example:\n{ \"type\": \"gce_instance\",\n \"labels\": {\n \"zone\": \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }}\nSee LogEntry.", - "$ref": "MonitoredResource" - } - }, - "id": "WriteLogEntriesRequest" + } }, "LabelDescriptor": { "description": "A description of a label.", "type": "object", "properties": { + "key": { + "description": "The label key.", + "type": "string" + }, "description": { "description": "A human-readable description for the label.", "type": "string" }, "valueType": { - "description": "The type of data that can be assigned to the label.", "enum": [ "STRING", "BOOL", "INT64" ], + "description": "The type of data that can be assigned to the label.", + "type": "string", "enumDescriptions": [ "A variable-length string. This is the default.", "Boolean; true or false.", "A 64-bit signed integer." - ], - "type": "string" - }, - "key": { - "description": "The label key.", - "type": "string" + ] } }, "id": "LabelDescriptor" }, + "MonitoredResourceDescriptor": { + "type": "object", + "properties": { + "labels": { + "description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels \"database_id\" and \"zone\".", + "type": "array", + "items": { + "$ref": "LabelDescriptor" + } + }, + "name": { + "description": "Optional. The resource name of the monitored resource descriptor: \"projects/{project_id}/monitoredResourceDescriptors/{type}\" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format \"monitoredResourceDescriptors/{type}\".", + "type": "string" + }, + "displayName": { + "description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, \"Google Cloud SQL Database\".", + "type": "string" + }, + "description": { + "description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", + "type": "string" + }, + "type": { + "description": "Required. The monitored resource type. For example, the type \"cloudsql_database\" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters.", + "type": "string" + } + }, + "id": "MonitoredResourceDescriptor", + "description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of \"gce_instance\" and specifies the use of the labels \"instance_id\" and \"zone\" to identify particular VM instances.Different APIs can support different monitored resource types. APIs generally provide a list method that returns the monitored resource descriptors used by the API." + }, + "LogEntrySourceLocation": { + "type": "object", + "properties": { + "file": { + "description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", + "type": "string" + }, + "function": { + "description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", + "type": "string" + }, + "line": { + "description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", + "format": "int64", + "type": "string" + } + }, + "id": "LogEntrySourceLocation", + "description": "Additional information about the source code location that produced the log entry." + }, + "ListLogEntriesResponse": { + "description": "Result returned from ListLogEntries.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search.", + "type": "string" + }, + "entries": { + "description": "A list of log entries.", + "type": "array", + "items": { + "$ref": "LogEntry" + } + } + }, + "id": "ListLogEntriesResponse" + }, + "LogLine": { + "id": "LogLine", + "description": "Application log line emitted while processing a request.", + "type": "object", + "properties": { + "severity": { + "enumDescriptions": [ + "(0) The log entry has no assigned severity level.", + "(100) Debug or trace information.", + "(200) Routine information, such as ongoing status or performance.", + "(300) Normal but significant events, such as start up, shut down, or a configuration change.", + "(400) Warning events might cause problems.", + "(500) Error events are likely to cause problems.", + "(600) Critical events cause more severe problems or outages.", + "(700) A person must take an action immediately.", + "(800) One or more systems are unusable." + ], + "enum": [ + "DEFAULT", + "DEBUG", + "INFO", + "NOTICE", + "WARNING", + "ERROR", + "CRITICAL", + "ALERT", + "EMERGENCY" + ], + "description": "Severity of this log entry.", + "type": "string" + }, + "logMessage": { + "description": "App-provided log message.", + "type": "string" + }, + "sourceLocation": { + "$ref": "SourceLocation", + "description": "Where in the source code this log message was written." + }, + "time": { + "description": "Approximate time when this log entry was made.", + "format": "google-datetime", + "type": "string" + } + } + }, "ListLogMetricsResponse": { + "id": "ListLogMetricsResponse", "description": "Result returned from ListLogMetrics.", "type": "object", "properties": { @@ -1617,79 +1936,105 @@ "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", "type": "string" } - }, - "id": "ListLogMetricsResponse" + } }, - "MonitoredResourceDescriptor": { - "description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of \"gce_instance\" and specifies the use of the labels \"instance_id\" and \"zone\" to identify particular VM instances.Different APIs can support different monitored resource types. APIs generally provide a list method that returns the monitored resource descriptors used by the API.", + "LogEntry": { "type": "object", "properties": { - "displayName": { - "description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, \"Google Cloud SQL Database\".", - "type": "string" + "protoPayload": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.", + "type": "object" }, - "description": { - "description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", + "trace": { + "description": "Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824", "type": "string" }, "labels": { - "description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels \"database_id\" and \"zone\".", - "type": "array", - "items": { - "$ref": "LabelDescriptor" + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A set of user-defined (key, value) data that provides additional information about the log entry.", + "type": "object" + }, + "severity": { + "enum": [ + "DEFAULT", + "DEBUG", + "INFO", + "NOTICE", + "WARNING", + "ERROR", + "CRITICAL", + "ALERT", + "EMERGENCY" + ], + "description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.", + "type": "string", + "enumDescriptions": [ + "(0) The log entry has no assigned severity level.", + "(100) Debug or trace information.", + "(200) Routine information, such as ongoing status or performance.", + "(300) Normal but significant events, such as start up, shut down, or a configuration change.", + "(400) Warning events might cause problems.", + "(500) Error events are likely to cause problems.", + "(600) Critical events cause more severe problems or outages.", + "(700) A person must take an action immediately.", + "(800) One or more systems are unusable." + ] + }, + "sourceLocation": { + "description": "Optional. Source code location information associated with the log entry, if any.", + "$ref": "LogEntrySourceLocation" + }, + "timestamp": { + "description": "Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted.", + "format": "google-datetime", + "type": "string" + }, + "receiveTimestamp": { + "type": "string", + "description": "Output only. The time the log entry was received by Stackdriver Logging.", + "format": "google-datetime" + }, + "logName": { + "type": "string", + "description": "Required. The resource name of the log to which this log entry belongs:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results." + }, + "httpRequest": { + "$ref": "HttpRequest", + "description": "Optional. Information about the HTTP request associated with this log entry, if applicable." + }, + "resource": { + "$ref": "MonitoredResource", + "description": "Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error." + }, + "jsonPayload": { + "description": "The log entry payload, represented as a structure that is expressed as a JSON object.", + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object." } }, - "type": { - "description": "Required. The monitored resource type. For example, the type \"cloudsql_database\" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters.", - "type": "string" + "insertId": { + "type": "string", + "description": "Optional. A unique identifier for the log entry. If you provide a value, then Stackdriver Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which can be removed. If omitted in new log entries, then Stackdriver Logging will insert its own unique identifier. The insert_id is used to order log entries that have the same timestamp value." }, - "name": { - "description": "Optional. The resource name of the monitored resource descriptor: \"projects/{project_id}/monitoredResourceDescriptors/{type}\" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format \"monitoredResourceDescriptors/{type}\".", + "operation": { + "description": "Optional. Information about an operation associated with the log entry, if applicable.", + "$ref": "LogEntryOperation" + }, + "textPayload": { + "description": "The log entry payload, represented as a Unicode string (UTF-8).", "type": "string" } }, - "id": "MonitoredResourceDescriptor" - }, - "ListMonitoredResourceDescriptorsResponse": { - "description": "Result returned from ListMonitoredResourceDescriptors.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", - "type": "string" - }, - "resourceDescriptors": { - "description": "A list of resource descriptors.", - "type": "array", - "items": { - "$ref": "MonitoredResourceDescriptor" - } - } - }, - "id": "ListMonitoredResourceDescriptorsResponse" - }, - "LogEntryOperation": { - "description": "Additional information about a potentially long-running operation with which a log entry is associated.", - "type": "object", - "properties": { - "producer": { - "description": "Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: \"MyDivision.MyBigCompany.com\", \"github.com/MyProject/MyApplication\".", - "type": "string" - }, - "last": { - "description": "Optional. Set this to True if this is the last log entry in the operation.", - "type": "boolean" - }, - "first": { - "description": "Optional. Set this to True if this is the first log entry in the operation.", - "type": "boolean" - }, - "id": { - "description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.", - "type": "string" - } - }, - "id": "LogEntryOperation" + "id": "LogEntry", + "description": "An individual entry in a log." }, "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:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", @@ -1697,394 +2042,58 @@ "properties": {}, "id": "Empty" }, - "HttpRequest": { - "description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", + "SourceLocation": { + "description": "Specifies a location in a source code file.", "type": "object", "properties": { - "cacheLookup": { - "description": "Whether or not a cache lookup was attempted.", - "type": "boolean" - }, - "responseSize": { - "description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", - "type": "string", - "format": "int64" - }, - "status": { - "description": "The response code indicating the status of response. Examples: 200, 404.", - "type": "integer", - "format": "int32" - }, - "cacheValidatedWithOriginServer": { - "description": "Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True.", - "type": "boolean" - }, - "referer": { - "description": "The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", - "type": "string" - }, - "cacheHit": { - "description": "Whether or not an entity was served from cache (with or without validation).", - "type": "boolean" - }, - "requestUrl": { - "description": "The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: \"http://example.com/some/info?color=red\".", - "type": "string" - }, - "latency": { - "description": "The request processing latency on the server, from the time the request was received until the response was sent.", - "type": "string", - "format": "google-duration" - }, - "cacheFillBytes": { - "description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", - "type": "string", - "format": "int64" - }, - "requestMethod": { - "description": "The request method. Examples: \"GET\", \"HEAD\", \"PUT\", \"POST\".", - "type": "string" - }, - "remoteIp": { - "description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: \"192.168.1.1\", \"FE80::0202:B3FF:FE1E:8329\".", - "type": "string" - }, - "serverIp": { - "description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", - "type": "string" - }, - "userAgent": { - "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".", - "type": "string" - }, - "requestSize": { - "description": "The size of the HTTP request message in bytes, including the request headers and the request body.", - "type": "string", - "format": "int64" - } - }, - "id": "HttpRequest" - }, - "LogEntrySourceLocation": { - "description": "Additional information about the source code location that produced the log entry.", - "type": "object", - "properties": { - "function": { - "description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", - "type": "string" - }, "file": { - "description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", + "description": "Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", + "type": "string" + }, + "functionName": { + "description": "Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", "type": "string" }, "line": { - "description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", "type": "string", + "description": "Line within the source file.", "format": "int64" } }, - "id": "LogEntrySourceLocation" - }, - "RequestLog": { - "description": "Complete log information about a single HTTP request to an App Engine application.", - "type": "object", - "properties": { - "responseSize": { - "description": "Size in bytes sent back to client by request.", - "type": "string", - "format": "int64" - }, - "requestId": { - "description": "Globally unique identifier for a request, which is based on the request start time. Request IDs for requests which started later will compare greater as strings than those for requests which started earlier.", - "type": "string" - }, - "first": { - "description": "Whether this is the first RequestLog entry for this request. If an active request has several RequestLog entries written to Stackdriver Logging, then this field will be set for one of them.", - "type": "boolean" - }, - "method": { - "description": "Request method. Example: \"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\".", - "type": "string" - }, - "versionId": { - "description": "Version of the application that handled this request.", - "type": "string" - }, - "status": { - "description": "HTTP response status code. Example: 200, 404.", - "type": "integer", - "format": "int32" - }, - "wasLoadingRequest": { - "description": "Whether this was a loading request for the instance.", - "type": "boolean" - }, - "ip": { - "description": "Origin IP address.", - "type": "string" - }, - "nickname": { - "description": "The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21.", - "type": "string" - }, - "taskQueueName": { - "description": "Queue name of the request, in the case of an offline request.", - "type": "string" - }, - "pendingTime": { - "description": "Time this request spent in the pending request queue.", - "type": "string", - "format": "google-duration" - }, - "instanceIndex": { - "description": "If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1.", - "type": "integer", - "format": "int32" - }, - "sourceReference": { - "description": "Source code for the application that handled this request. There can be more than one source reference per deployed application if source code is distributed among multiple repositories.", - "type": "array", - "items": { - "$ref": "SourceReference" - } - }, - "moduleId": { - "description": "Module of the application that handled this request.", - "type": "string" - }, - "host": { - "description": "Internet host and port number of the resource being requested.", - "type": "string" - }, - "latency": { - "description": "Latency of the request.", - "type": "string", - "format": "google-duration" - }, - "urlMapEntry": { - "description": "File or class that handled the request.", - "type": "string" - }, - "endTime": { - "description": "Time when the request finished.", - "type": "string", - "format": "google-datetime" - }, - "line": { - "description": "A list of log lines emitted by the application while serving this request.", - "type": "array", - "items": { - "$ref": "LogLine" - } - }, - "megaCycles": { - "description": "Number of CPU megacycles used to process request.", - "type": "string", - "format": "int64" - }, - "appId": { - "description": "Application that handled this request.", - "type": "string" - }, - "traceId": { - "description": "Stackdriver Trace identifier for this request.", - "type": "string" - }, - "taskName": { - "description": "Task name of the request, in the case of an offline request.", - "type": "string" - }, - "cost": { - "description": "An indication of the relative cost of serving this request.", - "type": "number", - "format": "double" - }, - "instanceId": { - "description": "An identifier for the instance that handled the request.", - "type": "string" - }, - "startTime": { - "description": "Time when the request started.", - "type": "string", - "format": "google-datetime" - }, - "appEngineRelease": { - "description": "App Engine release version.", - "type": "string" - }, - "resource": { - "description": "Contains the path and query portion of the URL that was requested. For example, if the URL was \"http://example.com/app?name=val\", the resource would be \"/app?name=val\". The fragment identifier, which is identified by the # character, is not included.", - "type": "string" - }, - "httpVersion": { - "description": "HTTP version of request. Example: \"HTTP/1.1\".", - "type": "string" - }, - "referrer": { - "description": "Referrer URL of request.", - "type": "string" - }, - "userAgent": { - "description": "User agent that made the request.", - "type": "string" - }, - "finished": { - "description": "Whether this request is finished or active.", - "type": "boolean" - } - }, - "id": "RequestLog" - }, - "WriteLogEntriesResponse": { - "description": "Result returned from WriteLogEntries. empty", - "type": "object", - "properties": {}, - "id": "WriteLogEntriesResponse" - }, - "ListLogEntriesRequest": { - "description": "The parameters to ListLogEntries.", - "type": "object", - "properties": { - "filter": { - "description": "Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters.", - "type": "string" - }, - "projectIds": { - "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names.", - "type": "array", - "items": { - "type": "string" - } - }, - "resourceNames": { - "description": "Required. Names of one or more resources from which to retrieve log entries:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nProjects listed in the project_ids field are added to this list.", - "type": "array", - "items": { - "type": "string" - } - }, - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer", - "format": "int32" - }, - "orderBy": { - "description": "Optional. How the results should be sorted. Presently, the only permitted values are \"timestamp asc\" (default) and \"timestamp desc\". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of LogEntry.insertId.", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "type": "string" - } - }, - "id": "ListLogEntriesRequest" + "id": "SourceLocation" } }, - "revision": "20161206", - "basePath": "", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", + "protocol": "rest", "canonicalName": "Logging", - "discoveryVersion": "v1", - "baseUrl": "https://logging.googleapis.com/", - "name": "logging", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/logging.admin": { + "description": "Administrate log data for your projects" + }, + "https://www.googleapis.com/auth/logging.read": { + "description": "View log data for your projects" + }, + "https://www.googleapis.com/auth/logging.write": { + "description": "Submit log data for your projects" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } } }, - "documentationLink": "https://cloud.google.com/logging/docs/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v2", "rootUrl": "https://logging.googleapis.com/", - "kind": "discovery#restDescription" + "ownerDomain": "google.com", + "name": "logging", + "batchPath": "batch", + "title": "Stackdriver Logging API", + "ownerName": "Google" } diff --git a/etc/api/logging/v2beta1/logging-api.json b/etc/api/logging/v2beta1/logging-api.json index d5926d31b5..e867d87b5a 100644 --- a/etc/api/logging/v2beta1/logging-api.json +++ b/etc/api/logging/v2beta1/logging-api.json @@ -1,670 +1,626 @@ { - "id": "logging:v2beta1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/logging.read": { - "description": "View log data for your projects" - }, - "https://www.googleapis.com/auth/logging.write": { - "description": "Submit log data for your projects" - }, - "https://www.googleapis.com/auth/logging.admin": { - "description": "Administrate log data for your projects" - } - } - } - }, + "version": "v2beta1", + "baseUrl": "https://logging.googleapis.com/", "description": "Writes log entries and manages your Stackdriver Logging configuration.", - "protocol": "rest", - "title": "Stackdriver Logging API", - "resources": { - "projects": { - "resources": { - "metrics": { - "methods": { - "update": { - "id": "logging.projects.metrics.update", - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "metricName" - ], - "description": "Creates or updates a logs-based metric.", - "request": { - "$ref": "LogMetric" - }, - "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", - "httpMethod": "PUT", - "parameters": { - "metricName": { - "description": "The resource name of the metric to update:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\nThe updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created.", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+metricName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ] - }, - "get": { - "id": "logging.projects.metrics.get", - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "metricName" - ], - "description": "Gets a logs-based metric.", - "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", - "httpMethod": "GET", - "parameters": { - "metricName": { - "description": "The resource name of the desired metric:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+metricName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "create": { - "id": "logging.projects.metrics.create", - "response": { - "$ref": "LogMetric" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a logs-based metric.", - "request": { - "$ref": "LogMetric" - }, - "flatPath": "v2beta1/projects/{projectsId}/metrics", - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+parent}/metrics", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ] - }, - "list": { - "id": "logging.projects.metrics.list", - "response": { - "$ref": "ListLogMetricsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists logs-based metrics.", - "flatPath": "v2beta1/projects/{projectsId}/metrics", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The name of the project containing the metrics:\n\"projects/[PROJECT_ID]\"\n", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+parent}/metrics", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.projects.metrics.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "metricName" - ], - "description": "Deletes a logs-based metric.", - "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", - "httpMethod": "DELETE", - "parameters": { - "metricName": { - "description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", - "required": true, - "pattern": "^projects/[^/]+/metrics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+metricName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ] - } - } - }, - "logs": { - "methods": { - "list": { - "id": "logging.projects.logs.list", - "response": { - "$ref": "ListLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists the logs in projects or organizations. Only logs that have entries are listed.", - "flatPath": "v2beta1/projects/{projectsId}/logs", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+parent}/logs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.projects.logs.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "logName" - ], - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries.", - "flatPath": "v2beta1/projects/{projectsId}/logs/{logsId}", - "httpMethod": "DELETE", - "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "required": true, - "pattern": "^projects/[^/]+/logs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+logName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - } - } - }, - "sinks": { - "methods": { - "update": { - "id": "logging.projects.sinks.update", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", - "request": { - "$ref": "LogSink" - }, - "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", - "httpMethod": "PUT", - "parameters": { - "sinkName": { - "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "required": true, - "pattern": "^projects/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - }, - "uniqueWriterIdentity": { - "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value was false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value was true and the new value is false.", - "location": "query", - "type": "boolean" - } - }, - "path": "v2beta1/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - }, - "get": { - "id": "logging.projects.sinks.get", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Gets a sink.", - "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", - "httpMethod": "GET", - "parameters": { - "sinkName": { - "description": "Required. The parent resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", - "required": true, - "pattern": "^projects/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "create": { - "id": "logging.projects.sinks.create", - "response": { - "$ref": "LogSink" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", - "request": { - "$ref": "LogSink" - }, - "flatPath": "v2beta1/projects/{projectsId}/sinks", - "httpMethod": "POST", - "parameters": { - "uniqueWriterIdentity": { - "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", - "location": "query", - "type": "boolean" - }, - "parent": { - "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+parent}/sinks", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - }, - "list": { - "id": "logging.projects.sinks.list", - "response": { - "$ref": "ListSinksResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists sinks.", - "flatPath": "v2beta1/projects/{projectsId}/sinks", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The parent resource whose sinks are to be listed. Examples: \"projects/my-logging-project\", \"organizations/123456789\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+parent}/sinks", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.projects.sinks.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "sinkName" - ], - "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", - "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", - "httpMethod": "DELETE", - "parameters": { - "sinkName": { - "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nIt is an error if the sink does not exist. Example: \"projects/my-project-id/sinks/my-sink-id\". It is an error if the sink does not exist.", - "required": true, - "pattern": "^projects/[^/]+/sinks/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+sinkName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - } - } - } - } - }, - "organizations": { - "resources": { - "logs": { - "methods": { - "list": { - "id": "logging.organizations.logs.list", - "response": { - "$ref": "ListLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists the logs in projects or organizations. Only logs that have entries are listed.", - "flatPath": "v2beta1/organizations/{organizationsId}/logs", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+parent}/logs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.organizations.logs.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "logName" - ], - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries.", - "flatPath": "v2beta1/organizations/{organizationsId}/logs/{logsId}", - "httpMethod": "DELETE", - "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "required": true, - "pattern": "^organizations/[^/]+/logs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+logName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - } - } - } - } - }, - "entries": { - "methods": { - "write": { - "id": "logging.entries.write", - "response": { - "$ref": "WriteLogEntriesResponse" - }, - "parameterOrder": [], - "description": "Writes log entries to Stackdriver Logging. All log entries are written by this method.", - "request": { - "$ref": "WriteLogEntriesRequest" - }, - "flatPath": "v2beta1/entries:write", - "httpMethod": "POST", - "parameters": {}, - "path": "v2beta1/entries:write", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.write" - ] - }, - "list": { - "id": "logging.entries.list", - "response": { - "$ref": "ListLogEntriesResponse" - }, - "parameterOrder": [], - "description": "Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see Exporting Logs.", - "request": { - "$ref": "ListLogEntriesRequest" - }, - "flatPath": "v2beta1/entries:list", - "httpMethod": "POST", - "parameters": {}, - "path": "v2beta1/entries:list", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - } - } - }, - "monitoredResourceDescriptors": { - "methods": { - "list": { - "id": "logging.monitoredResourceDescriptors.list", - "response": { - "$ref": "ListMonitoredResourceDescriptorsResponse" - }, - "parameterOrder": [], - "description": "Lists the descriptors for monitored resource types used by Stackdriver Logging.", - "flatPath": "v2beta1/monitoredResourceDescriptors", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/monitoredResourceDescriptors", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - } - } - }, - "billingAccounts": { - "resources": { - "logs": { - "methods": { - "list": { - "id": "logging.billingAccounts.logs.list", - "response": { - "$ref": "ListLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists the logs in projects or organizations. Only logs that have entries are listed.", - "flatPath": "v2beta1/billingAccounts/{billingAccountsId}/logs", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n", - "required": true, - "pattern": "^billingAccounts/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+parent}/logs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read" - ] - }, - "delete": { - "id": "logging.billingAccounts.logs.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "logName" - ], - "description": "Deletes all the log entries in a log. The log reappears if it receives new entries.", - "flatPath": "v2beta1/billingAccounts/{billingAccountsId}/logs/{logsId}", - "httpMethod": "DELETE", - "parameters": { - "logName": { - "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "required": true, - "pattern": "^billingAccounts/[^/]+/logs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v2beta1/{+logName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/logging.admin" - ] - } - } - } - } - } - }, + "kind": "discovery#restDescription", + "servicePath": "", + "basePath": "", + "id": "logging:v2beta1", + "documentationLink": "https://cloud.google.com/logging/docs/", + "revision": "20170516", + "discoveryVersion": "v1", + "version_module": "True", "schemas": { - "ListLogEntriesResponse": { - "description": "Result returned from ListLogEntries.", + "ListLogMetricsResponse": { "type": "object", "properties": { + "metrics": { + "description": "A list of logs-based metrics.", + "type": "array", + "items": { + "$ref": "LogMetric" + } + }, + "nextPageToken": { + "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", + "type": "string" + } + }, + "id": "ListLogMetricsResponse", + "description": "Result returned from ListLogMetrics." + }, + "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:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "LogEntry": { + "id": "LogEntry", + "description": "An individual entry in a log.", + "type": "object", + "properties": { + "severity": { + "enum": [ + "DEFAULT", + "DEBUG", + "INFO", + "NOTICE", + "WARNING", + "ERROR", + "CRITICAL", + "ALERT", + "EMERGENCY" + ], + "description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.", + "type": "string", + "enumDescriptions": [ + "(0) The log entry has no assigned severity level.", + "(100) Debug or trace information.", + "(200) Routine information, such as ongoing status or performance.", + "(300) Normal but significant events, such as start up, shut down, or a configuration change.", + "(400) Warning events might cause problems.", + "(500) Error events are likely to cause problems.", + "(600) Critical events cause more severe problems or outages.", + "(700) A person must take an action immediately.", + "(800) One or more systems are unusable." + ] + }, + "sourceLocation": { + "$ref": "LogEntrySourceLocation", + "description": "Optional. Source code location information associated with the log entry, if any." + }, + "timestamp": { + "description": "Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted.", + "format": "google-datetime", + "type": "string" + }, + "receiveTimestamp": { + "description": "Output only. The time the log entry was received by Stackdriver Logging.", + "format": "google-datetime", + "type": "string" + }, + "logName": { + "description": "Required. The resource name of the log to which this log entry belongs:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.", + "type": "string" + }, + "httpRequest": { + "description": "Optional. Information about the HTTP request associated with this log entry, if applicable.", + "$ref": "HttpRequest" + }, + "resource": { + "$ref": "MonitoredResource", + "description": "Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error." + }, + "jsonPayload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The log entry payload, represented as a structure that is expressed as a JSON object.", + "type": "object" + }, + "insertId": { + "description": "Optional. A unique identifier for the log entry. If you provide a value, then Stackdriver Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which can be removed. If omitted in new log entries, then Stackdriver Logging will insert its own unique identifier. The insert_id is used to order log entries that have the same timestamp value.", + "type": "string" + }, + "operation": { + "$ref": "LogEntryOperation", + "description": "Optional. Information about an operation associated with the log entry, if applicable." + }, + "textPayload": { + "description": "The log entry payload, represented as a Unicode string (UTF-8).", + "type": "string" + }, + "protoPayload": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.", + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A set of user-defined (key, value) data that provides additional information about the log entry.", + "type": "object" + }, + "trace": { + "description": "Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824", + "type": "string" + } + } + }, + "SourceLocation": { + "type": "object", + "properties": { + "file": { + "description": "Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", + "type": "string" + }, + "functionName": { + "type": "string", + "description": "Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python)." + }, + "line": { + "description": "Line within the source file.", + "format": "int64", + "type": "string" + } + }, + "id": "SourceLocation", + "description": "Specifies a location in a source code file." + }, + "ListLogEntriesRequest": { + "description": "The parameters to ListLogEntries.", + "type": "object", + "properties": { + "orderBy": { + "description": "Optional. How the results should be sorted. Presently, the only permitted values are \"timestamp asc\" (default) and \"timestamp desc\". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values.", + "type": "string" + }, + "resourceNames": { + "description": "Required. Names of one or more parent resources from which to retrieve log entries:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nProjects listed in the project_ids field are added to this list.", + "type": "array", + "items": { + "type": "string" + } + }, + "filter": { + "description": "Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters.", + "type": "string" + }, + "projectIds": { + "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names.", + "type": "array", + "items": { + "type": "string" + } + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + } + }, + "id": "ListLogEntriesRequest" + }, + "RequestLog": { + "type": "object", + "properties": { + "line": { + "description": "A list of log lines emitted by the application while serving this request.", + "type": "array", + "items": { + "$ref": "LogLine" + } + }, + "referrer": { + "type": "string", + "description": "Referrer URL of request." + }, + "taskQueueName": { + "description": "Queue name of the request, in the case of an offline request.", + "type": "string" + }, + "requestId": { + "description": "Globally unique identifier for a request, which is based on the request start time. Request IDs for requests which started later will compare greater as strings than those for requests which started earlier.", + "type": "string" + }, + "nickname": { + "description": "The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21.", + "type": "string" + }, + "status": { + "description": "HTTP response status code. Example: 200, 404.", + "format": "int32", + "type": "integer" + }, + "resource": { + "description": "Contains the path and query portion of the URL that was requested. For example, if the URL was \"http://example.com/app?name=val\", the resource would be \"/app?name=val\". The fragment identifier, which is identified by the # character, is not included.", + "type": "string" + }, + "pendingTime": { + "description": "Time this request spent in the pending request queue.", + "format": "google-duration", + "type": "string" + }, + "taskName": { + "description": "Task name of the request, in the case of an offline request.", + "type": "string" + }, + "urlMapEntry": { + "description": "File or class that handled the request.", + "type": "string" + }, + "instanceIndex": { + "description": "If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1.", + "format": "int32", + "type": "integer" + }, + "finished": { + "type": "boolean", + "description": "Whether this request is finished or active." + }, + "host": { + "description": "Internet host and port number of the resource being requested.", + "type": "string" + }, + "httpVersion": { + "description": "HTTP version of request. Example: \"HTTP/1.1\".", + "type": "string" + }, + "startTime": { + "description": "Time when the request started.", + "format": "google-datetime", + "type": "string" + }, + "latency": { + "type": "string", + "description": "Latency of the request.", + "format": "google-duration" + }, + "ip": { + "description": "Origin IP address.", + "type": "string" + }, + "appId": { + "description": "Application that handled this request.", + "type": "string" + }, + "appEngineRelease": { + "description": "App Engine release version.", + "type": "string" + }, + "method": { + "description": "Request method. Example: \"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\".", + "type": "string" + }, + "cost": { + "type": "number", + "description": "An indication of the relative cost of serving this request.", + "format": "double" + }, + "instanceId": { + "description": "An identifier for the instance that handled the request.", + "type": "string" + }, + "megaCycles": { + "description": "Number of CPU megacycles used to process request.", + "format": "int64", + "type": "string" + }, + "first": { + "description": "Whether this is the first RequestLog entry for this request. If an active request has several RequestLog entries written to Stackdriver Logging, then this field will be set for one of them.", + "type": "boolean" + }, + "versionId": { + "type": "string", + "description": "Version of the application that handled this request." + }, + "moduleId": { + "description": "Module of the application that handled this request.", + "type": "string" + }, + "endTime": { + "description": "Time when the request finished.", + "format": "google-datetime", + "type": "string" + }, + "userAgent": { + "description": "User agent that made the request.", + "type": "string" + }, + "wasLoadingRequest": { + "description": "Whether this was a loading request for the instance.", + "type": "boolean" + }, + "sourceReference": { + "description": "Source code for the application that handled this request. There can be more than one source reference per deployed application if source code is distributed among multiple repositories.", + "type": "array", + "items": { + "$ref": "SourceReference" + } + }, + "responseSize": { + "type": "string", + "description": "Size in bytes sent back to client by request.", + "format": "int64" + }, + "traceId": { + "description": "Stackdriver Trace identifier for this request.", + "type": "string" + } + }, + "id": "RequestLog", + "description": "Complete log information about a single HTTP request to an App Engine application." + }, + "ListMonitoredResourceDescriptorsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", + "type": "string" + }, + "resourceDescriptors": { + "description": "A list of resource descriptors.", + "type": "array", + "items": { + "$ref": "MonitoredResourceDescriptor" + } + } + }, + "id": "ListMonitoredResourceDescriptorsResponse", + "description": "Result returned from ListMonitoredResourceDescriptors." + }, + "SourceReference": { + "description": "A reference to a particular snapshot of the source tree used to build and deploy an application.", + "type": "object", + "properties": { + "revisionId": { + "type": "string", + "description": "The canonical and persistent identifier of the deployed revision. Example (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"" + }, + "repository": { + "description": "Optional. A URI string identifying the repository. Example: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", + "type": "string" + } + }, + "id": "SourceReference" + }, + "LogMetric": { + "description": "Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.", + "type": "object", + "properties": { + "version": { + "description": "Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.", + "type": "string", + "enumDescriptions": [ + "Stackdriver Logging API v2.", + "Stackdriver Logging API v1." + ], + "enum": [ + "V2", + "V1" + ] + }, + "filter": { + "description": "Required. An advanced logs filter which is used to match log entries. Example:\n\"resource.type=gae_app AND severity\u003e=ERROR\"\nThe maximum length of the filter is 20000 characters.", + "type": "string" + }, + "name": { + "description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\".", + "type": "string" + }, + "description": { + "description": "Optional. A description of this metric, which is used in documentation.", + "type": "string" + } + }, + "id": "LogMetric" + }, + "WriteLogEntriesResponse": { + "description": "Result returned from WriteLogEntries. empty", + "type": "object", + "properties": {}, + "id": "WriteLogEntriesResponse" + }, + "LogEntryOperation": { + "properties": { + "producer": { + "type": "string", + "description": "Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: \"MyDivision.MyBigCompany.com\", \"github.com/MyProject/MyApplication\"." + }, + "first": { + "description": "Optional. Set this to True if this is the first log entry in the operation.", + "type": "boolean" + }, + "last": { + "description": "Optional. Set this to True if this is the last log entry in the operation.", + "type": "boolean" + }, + "id": { + "description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.", + "type": "string" + } + }, + "id": "LogEntryOperation", + "description": "Additional information about a potentially long-running operation with which a log entry is associated.", + "type": "object" + }, + "MonitoredResource": { + "id": "MonitoredResource", + "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"instance_id\" and \"zone\":\n{ \"type\": \"gce_instance\",\n \"labels\": { \"instance_id\": \"12345678901234\",\n \"zone\": \"us-central1-a\" }}\n", + "type": "object", + "properties": { + "labels": { + "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels \"project_id\", \"instance_id\", and \"zone\".", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance.", + "type": "string" + } + } + }, + "WriteLogEntriesRequest": { + "description": "The parameters to WriteLogEntries.", + "type": "object", + "properties": { + "logName": { + "description": "Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\" or \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "type": "string" + }, "entries": { - "description": "A list of log entries.", + "description": "Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are inserted into those log entries in this list that do not provide their own values.Stackdriver Logging also creates and inserts values for timestamp and insert_id if the entries do not provide them. The created insert_id for the N'th entry in this list will be greater than earlier entries and less than later entries. Otherwise, the order of log entries in this list does not matter.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry.", "type": "array", "items": { "$ref": "LogEntry" } }, + "partialSuccess": { + "description": "Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries' zero-based index in the entries.write method.", + "type": "boolean" + }, + "labels": { + "description": "Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "resource": { + "$ref": "MonitoredResource", + "description": "Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example:\n{ \"type\": \"gce_instance\",\n \"labels\": {\n \"zone\": \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }}\nSee LogEntry." + } + }, + "id": "WriteLogEntriesRequest" + }, + "LogSink": { + "properties": { + "filter": { + "description": "Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format:\nlogName=\"projects/[PROJECT_ID]/logs/[LOG_ID]\" AND severity\u003e=ERROR\n", + "type": "string" + }, + "destination": { + "type": "string", + "description": "Required. The export destination:\n\"storage.googleapis.com/[GCS_BUCKET]\"\n\"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"\n\"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]\"\nThe sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks." + }, + "endTime": { + "description": "Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated.", + "format": "google-datetime", + "type": "string" + }, + "writerIdentity": { + "description": "Output only. An IAM identity—a service account or group—under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.", + "type": "string" + }, + "outputVersionFormat": { + "enumDescriptions": [ + "An unspecified format version that will default to V2.", + "LogEntry version 2 format.", + "LogEntry version 1 format." + ], + "enum": [ + "VERSION_FORMAT_UNSPECIFIED", + "V2", + "V1" + ], + "description": "Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API.", + "type": "string" + }, + "name": { + "description": "Required. The client-assigned sink identifier, unique within the project. Example: \"my-syslog-errors-to-pubsub\". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.", + "type": "string" + }, + "includeChildren": { + "description": "Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log name:\nlogName:(\"projects/test-project1/\" OR \"projects/test-project2/\") AND\nresource.type=gce_instance\n", + "type": "boolean" + } + }, + "id": "LogSink", + "description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.", + "type": "object" + }, + "ListLogsResponse": { + "type": "object", + "properties": { "nextPageToken": { - "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search.", + "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", + "type": "string" + }, + "logNames": { + "description": "A list of log names. For example, \"projects/my-project/syslog\" or \"organizations/123/cloudresourcemanager.googleapis.com%2Factivity\".", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ListLogsResponse", + "description": "Result returned from ListLogs." + }, + "HttpRequest": { + "description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", + "type": "object", + "properties": { + "cacheLookup": { + "type": "boolean", + "description": "Whether or not a cache lookup was attempted." + }, + "cacheHit": { + "description": "Whether or not an entity was served from cache (with or without validation).", + "type": "boolean" + }, + "cacheValidatedWithOriginServer": { + "description": "Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True.", + "type": "boolean" + }, + "status": { + "description": "The response code indicating the status of response. Examples: 200, 404.", + "format": "int32", + "type": "integer" + }, + "referer": { + "description": "The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", + "type": "string" + }, + "userAgent": { + "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".", + "type": "string" + }, + "latency": { + "description": "The request processing latency on the server, from the time the request was received until the response was sent.", + "format": "google-duration", + "type": "string" + }, + "cacheFillBytes": { + "description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", + "format": "int64", + "type": "string" + }, + "requestMethod": { + "description": "The request method. Examples: \"GET\", \"HEAD\", \"PUT\", \"POST\".", + "type": "string" + }, + "requestSize": { + "description": "The size of the HTTP request message in bytes, including the request headers and the request body.", + "format": "int64", + "type": "string" + }, + "responseSize": { + "description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", + "format": "int64", + "type": "string" + }, + "requestUrl": { + "description": "The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: \"http://example.com/some/info?color=red\".", + "type": "string" + }, + "serverIp": { + "description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", + "type": "string" + }, + "remoteIp": { + "description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: \"192.168.1.1\", \"FE80::0202:B3FF:FE1E:8329\".", "type": "string" } }, - "id": "ListLogEntriesResponse" + "id": "HttpRequest" }, "ListSinksResponse": { "description": "Result returned from ListSinks.", @@ -684,384 +640,41 @@ }, "id": "ListSinksResponse" }, - "SourceLocation": { - "description": "Specifies a location in a source code file.", - "type": "object", - "properties": { - "file": { - "description": "Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", - "type": "string" - }, - "functionName": { - "description": "Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information is used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", - "type": "string" - }, - "line": { - "description": "Line within the source file.", - "type": "string", - "format": "int64" - } - }, - "id": "SourceLocation" - }, - "LogSink": { - "description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project or organization.", - "type": "object", - "properties": { - "destination": { - "description": "Required. The export destination:\n\"storage.googleapis.com/[GCS_BUCKET]\"\n\"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"\n\"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]\"\nThe sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks.", - "type": "string" - }, - "filter": { - "description": "Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format:\nlogName=\"projects/[PROJECT_ID]/logs/[LOG_ID]\" AND severity\u003e=ERROR\n", - "type": "string" - }, - "endTime": { - "description": "Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time.", - "type": "string", - "format": "google-datetime" - }, - "name": { - "description": "Required. The client-assigned sink identifier, unique within the project. Example: \"my-syslog-errors-to-pubsub\". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.", - "type": "string" - }, - "startTime": { - "description": "Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated.", - "type": "string", - "format": "google-datetime" - }, - "outputVersionFormat": { - "description": "Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API.", - "enum": [ - "VERSION_FORMAT_UNSPECIFIED", - "V2", - "V1" - ], - "enumDescriptions": [ - "An unspecified format version that will default to V2.", - "LogEntry version 2 format.", - "LogEntry version 1 format." - ], - "type": "string" - }, - "writerIdentity": { - "description": "Output only. An IAM identity—a service account or group—under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.", - "type": "string" - } - }, - "id": "LogSink" - }, - "ListLogsResponse": { - "description": "Result returned from ListLogs.", - "type": "object", - "properties": { - "logNames": { - "description": "A list of log names. For example, \"projects/my-project/syslog\" or \"organizations/123/cloudresourcemanager.googleapis.com%2Factivity\".", - "type": "array", - "items": { - "type": "string" - } - }, - "nextPageToken": { - "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", - "type": "string" - } - }, - "id": "ListLogsResponse" - }, - "LogMetric": { - "description": "Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.", - "type": "object", - "properties": { - "description": { - "description": "Optional. A description of this metric, which is used in documentation.", - "type": "string" - }, - "filter": { - "description": "Required. An advanced logs filter which is used to match log entries. Example:\n\"resource.type=gae_app AND severity\u003e=ERROR\"\nThe maximum length of the filter is 20000 characters.", - "type": "string" - }, - "name": { - "description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\".", - "type": "string" - }, - "version": { - "description": "Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.", - "enum": [ - "V2", - "V1" - ], - "enumDescriptions": [ - "Stackdriver Logging API v2.", - "Stackdriver Logging API v1." - ], - "type": "string" - } - }, - "id": "LogMetric" - }, - "LogEntry": { - "description": "An individual entry in a log.", - "type": "object", - "properties": { - "textPayload": { - "description": "The log entry payload, represented as a Unicode string (UTF-8).", - "type": "string" - }, - "httpRequest": { - "description": "Optional. Information about the HTTP request associated with this log entry, if applicable.", - "$ref": "HttpRequest" - }, - "sourceLocation": { - "description": "Optional. Source code location information associated with the log entry, if any.", - "$ref": "LogEntrySourceLocation" - }, - "jsonPayload": { - "description": "The log entry payload, represented as a structure that is expressed as a JSON object.", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "type": "object" - }, - "labels": { - "description": "Optional. A set of user-defined (key, value) data that provides additional information about the log entry.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "trace": { - "description": "Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824", - "type": "string" - }, - "logName": { - "description": "Required. The resource name of the log to which this log entry belongs:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.", - "type": "string" - }, - "severity": { - "description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.", - "enum": [ - "DEFAULT", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ], - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or a configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], - "type": "string" - }, - "resource": { - "description": "Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.", - "$ref": "MonitoredResource" - }, - "protoPayload": { - "description": "The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "timestamp": { - "description": "Optional. The time the event described by the log entry occurred. If omitted, Stackdriver Logging will use the time the log entry is received.", - "type": "string", - "format": "google-datetime" - }, - "insertId": { - "description": "Optional. A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same project with the same ID as duplicates which can be removed. If omitted, Stackdriver Logging will generate a unique ID for this log entry.", - "type": "string" - }, - "operation": { - "description": "Optional. Information about an operation associated with the log entry, if applicable.", - "$ref": "LogEntryOperation" - } - }, - "id": "LogEntry" - }, - "LogLine": { - "description": "Application log line emitted while processing a request.", - "type": "object", - "properties": { - "time": { - "description": "Approximate time when this log entry was made.", - "type": "string", - "format": "google-datetime" - }, - "severity": { - "description": "Severity of this log entry.", - "enum": [ - "DEFAULT", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ], - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or a configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], - "type": "string" - }, - "sourceLocation": { - "description": "Where in the source code this log message was written.", - "$ref": "SourceLocation" - }, - "logMessage": { - "description": "App-provided log message.", - "type": "string" - } - }, - "id": "LogLine" - }, - "SourceReference": { - "description": "A reference to a particular snapshot of the source tree used to build and deploy an application.", - "type": "object", - "properties": { - "repository": { - "description": "Optional. A URI string identifying the repository. Example: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", - "type": "string" - }, - "revisionId": { - "description": "The canonical and persistent identifier of the deployed revision. Example (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", - "type": "string" - } - }, - "id": "SourceReference" - }, - "MonitoredResource": { - "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"instance_id\" and \"zone\":\n{ \"type\": \"gce_instance\",\n \"labels\": { \"instance_id\": \"12345678901234\",\n \"zone\": \"us-central1-a\" }}\n", - "type": "object", - "properties": { - "labels": { - "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels \"database_id\" and \"zone\".", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "type": { - "description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is \"cloudsql_database\".", - "type": "string" - } - }, - "id": "MonitoredResource" - }, - "WriteLogEntriesRequest": { - "description": "The parameters to WriteLogEntries.", - "type": "object", - "properties": { - "labels": { - "description": "Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "entries": { - "description": "Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are added to those log entries that do not provide their own values for the fields.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry.", - "type": "array", - "items": { - "$ref": "LogEntry" - } - }, - "logName": { - "description": "Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\" or \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", - "type": "string" - }, - "partialSuccess": { - "description": "Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, the response status will be the error associated with one of the failed entries and include error details in the form of WriteLogEntriesPartialErrors.", - "type": "boolean" - }, - "resource": { - "description": "Optional. A default monitored resource object that is assigned to all log entries in entries that do not specify a value for resource. Example:\n{ \"type\": \"gce_instance\",\n \"labels\": {\n \"zone\": \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }}\nSee LogEntry.", - "$ref": "MonitoredResource" - } - }, - "id": "WriteLogEntriesRequest" - }, "LabelDescriptor": { "description": "A description of a label.", "type": "object", "properties": { - "description": { - "description": "A human-readable description for the label.", - "type": "string" - }, "valueType": { - "description": "The type of data that can be assigned to the label.", "enum": [ "STRING", "BOOL", "INT64" ], + "description": "The type of data that can be assigned to the label.", + "type": "string", "enumDescriptions": [ "A variable-length string. This is the default.", "Boolean; true or false.", "A 64-bit signed integer." - ], - "type": "string" + ] }, "key": { "description": "The label key.", "type": "string" + }, + "description": { + "description": "A human-readable description for the label.", + "type": "string" } }, "id": "LabelDescriptor" }, - "ListLogMetricsResponse": { - "description": "Result returned from ListLogMetrics.", - "type": "object", - "properties": { - "metrics": { - "description": "A list of logs-based metrics.", - "type": "array", - "items": { - "$ref": "LogMetric" - } - }, - "nextPageToken": { - "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", - "type": "string" - } - }, - "id": "ListLogMetricsResponse" - }, "MonitoredResourceDescriptor": { "description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of \"gce_instance\" and specifies the use of the labels \"instance_id\" and \"zone\" to identify particular VM instances.Different APIs can support different monitored resource types. APIs generally provide a list method that returns the monitored resource descriptors used by the API.", "type": "object", "properties": { - "displayName": { - "description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, \"Google Cloud SQL Database\".", - "type": "string" - }, - "description": { - "description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", + "type": { + "description": "Required. The monitored resource type. For example, the type \"cloudsql_database\" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters.", "type": "string" }, "labels": { @@ -1071,368 +684,821 @@ "$ref": "LabelDescriptor" } }, - "type": { - "description": "Required. The monitored resource type. For example, the type \"cloudsql_database\" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters.", - "type": "string" - }, "name": { "description": "Optional. The resource name of the monitored resource descriptor: \"projects/{project_id}/monitoredResourceDescriptors/{type}\" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format \"monitoredResourceDescriptors/{type}\".", "type": "string" + }, + "displayName": { + "description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, \"Google Cloud SQL Database\".", + "type": "string" + }, + "description": { + "description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", + "type": "string" } }, "id": "MonitoredResourceDescriptor" }, - "ListMonitoredResourceDescriptorsResponse": { - "description": "Result returned from ListMonitoredResourceDescriptors.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.", - "type": "string" - }, - "resourceDescriptors": { - "description": "A list of resource descriptors.", - "type": "array", - "items": { - "$ref": "MonitoredResourceDescriptor" - } - } - }, - "id": "ListMonitoredResourceDescriptorsResponse" - }, - "LogEntryOperation": { - "description": "Additional information about a potentially long-running operation with which a log entry is associated.", - "type": "object", - "properties": { - "producer": { - "description": "Optional. An arbitrary producer identifier. The combination of id and producer must be globally unique. Examples for producer: \"MyDivision.MyBigCompany.com\", \"github.com/MyProject/MyApplication\".", - "type": "string" - }, - "last": { - "description": "Optional. Set this to True if this is the last log entry in the operation.", - "type": "boolean" - }, - "first": { - "description": "Optional. Set this to True if this is the first log entry in the operation.", - "type": "boolean" - }, - "id": { - "description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.", - "type": "string" - } - }, - "id": "LogEntryOperation" - }, - "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:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "HttpRequest": { - "description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", - "type": "object", - "properties": { - "cacheLookup": { - "description": "Whether or not a cache lookup was attempted.", - "type": "boolean" - }, - "responseSize": { - "description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", - "type": "string", - "format": "int64" - }, - "status": { - "description": "The response code indicating the status of response. Examples: 200, 404.", - "type": "integer", - "format": "int32" - }, - "cacheValidatedWithOriginServer": { - "description": "Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True.", - "type": "boolean" - }, - "referer": { - "description": "The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", - "type": "string" - }, - "cacheHit": { - "description": "Whether or not an entity was served from cache (with or without validation).", - "type": "boolean" - }, - "requestUrl": { - "description": "The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: \"http://example.com/some/info?color=red\".", - "type": "string" - }, - "latency": { - "description": "The request processing latency on the server, from the time the request was received until the response was sent.", - "type": "string", - "format": "google-duration" - }, - "cacheFillBytes": { - "description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", - "type": "string", - "format": "int64" - }, - "requestMethod": { - "description": "The request method. Examples: \"GET\", \"HEAD\", \"PUT\", \"POST\".", - "type": "string" - }, - "remoteIp": { - "description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: \"192.168.1.1\", \"FE80::0202:B3FF:FE1E:8329\".", - "type": "string" - }, - "serverIp": { - "description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", - "type": "string" - }, - "userAgent": { - "description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".", - "type": "string" - }, - "requestSize": { - "description": "The size of the HTTP request message in bytes, including the request headers and the request body.", - "type": "string", - "format": "int64" - } - }, - "id": "HttpRequest" - }, "LogEntrySourceLocation": { "description": "Additional information about the source code location that produced the log entry.", "type": "object", "properties": { - "function": { - "description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", - "type": "string" - }, "file": { "description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", "type": "string" }, + "function": { + "description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).", + "type": "string" + }, "line": { - "description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", "type": "string", + "description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", "format": "int64" } }, "id": "LogEntrySourceLocation" }, - "RequestLog": { - "description": "Complete log information about a single HTTP request to an App Engine application.", - "type": "object", + "ListLogEntriesResponse": { "properties": { - "responseSize": { - "description": "Size in bytes sent back to client by request.", - "type": "string", - "format": "int64" - }, - "requestId": { - "description": "Globally unique identifier for a request, which is based on the request start time. Request IDs for requests which started later will compare greater as strings than those for requests which started earlier.", + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken.If a value for next_page_token appears and the entries field is empty, it means that the search found no log entries so far but it did not have time to search all the possible log entries. Retry the method with this value for page_token to continue the search. Alternatively, consider speeding up the search by changing your filter to specify a single log name or resource type, or to narrow the time range of the search.", "type": "string" }, - "first": { - "description": "Whether this is the first RequestLog entry for this request. If an active request has several RequestLog entries written to Stackdriver Logging, then this field will be set for one of them.", - "type": "boolean" - }, - "method": { - "description": "Request method. Example: \"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\".", - "type": "string" - }, - "versionId": { - "description": "Version of the application that handled this request.", - "type": "string" - }, - "status": { - "description": "HTTP response status code. Example: 200, 404.", - "type": "integer", - "format": "int32" - }, - "wasLoadingRequest": { - "description": "Whether this was a loading request for the instance.", - "type": "boolean" - }, - "ip": { - "description": "Origin IP address.", - "type": "string" - }, - "nickname": { - "description": "The logged-in user who made the request.Most likely, this is the part of the user's email before the @ sign. The field value is the same for different requests from the same user, but different users can have similar names. This information is also available to the application via the App Engine Users API.This field will be populated starting with App Engine 1.9.21.", - "type": "string" - }, - "taskQueueName": { - "description": "Queue name of the request, in the case of an offline request.", - "type": "string" - }, - "pendingTime": { - "description": "Time this request spent in the pending request queue.", - "type": "string", - "format": "google-duration" - }, - "instanceIndex": { - "description": "If the instance processing this request belongs to a manually scaled module, then this is the 0-based index of the instance. Otherwise, this value is -1.", - "type": "integer", - "format": "int32" - }, - "sourceReference": { - "description": "Source code for the application that handled this request. There can be more than one source reference per deployed application if source code is distributed among multiple repositories.", + "entries": { + "description": "A list of log entries.", "type": "array", "items": { - "$ref": "SourceReference" + "$ref": "LogEntry" } - }, - "moduleId": { - "description": "Module of the application that handled this request.", - "type": "string" - }, - "host": { - "description": "Internet host and port number of the resource being requested.", - "type": "string" - }, - "latency": { - "description": "Latency of the request.", - "type": "string", - "format": "google-duration" - }, - "urlMapEntry": { - "description": "File or class that handled the request.", - "type": "string" - }, - "endTime": { - "description": "Time when the request finished.", - "type": "string", - "format": "google-datetime" - }, - "line": { - "description": "A list of log lines emitted by the application while serving this request.", - "type": "array", - "items": { - "$ref": "LogLine" - } - }, - "megaCycles": { - "description": "Number of CPU megacycles used to process request.", - "type": "string", - "format": "int64" - }, - "appId": { - "description": "Application that handled this request.", - "type": "string" - }, - "traceId": { - "description": "Stackdriver Trace identifier for this request.", - "type": "string" - }, - "taskName": { - "description": "Task name of the request, in the case of an offline request.", - "type": "string" - }, - "cost": { - "description": "An indication of the relative cost of serving this request.", - "type": "number", - "format": "double" - }, - "instanceId": { - "description": "An identifier for the instance that handled the request.", - "type": "string" - }, - "startTime": { - "description": "Time when the request started.", - "type": "string", - "format": "google-datetime" - }, - "appEngineRelease": { - "description": "App Engine release version.", - "type": "string" - }, - "resource": { - "description": "Contains the path and query portion of the URL that was requested. For example, if the URL was \"http://example.com/app?name=val\", the resource would be \"/app?name=val\". The fragment identifier, which is identified by the # character, is not included.", - "type": "string" - }, - "httpVersion": { - "description": "HTTP version of request. Example: \"HTTP/1.1\".", - "type": "string" - }, - "referrer": { - "description": "Referrer URL of request.", - "type": "string" - }, - "userAgent": { - "description": "User agent that made the request.", - "type": "string" - }, - "finished": { - "description": "Whether this request is finished or active.", - "type": "boolean" } }, - "id": "RequestLog" + "id": "ListLogEntriesResponse", + "description": "Result returned from ListLogEntries.", + "type": "object" }, - "WriteLogEntriesResponse": { - "description": "Result returned from WriteLogEntries. empty", - "type": "object", - "properties": {}, - "id": "WriteLogEntriesResponse" - }, - "ListLogEntriesRequest": { - "description": "The parameters to ListLogEntries.", + "LogLine": { + "description": "Application log line emitted while processing a request.", "type": "object", "properties": { - "filter": { - "description": "Optional. A filter that chooses which log entries to return. See Advanced Logs Filters. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters.", + "severity": { + "enumDescriptions": [ + "(0) The log entry has no assigned severity level.", + "(100) Debug or trace information.", + "(200) Routine information, such as ongoing status or performance.", + "(300) Normal but significant events, such as start up, shut down, or a configuration change.", + "(400) Warning events might cause problems.", + "(500) Error events are likely to cause problems.", + "(600) Critical events cause more severe problems or outages.", + "(700) A person must take an action immediately.", + "(800) One or more systems are unusable." + ], + "enum": [ + "DEFAULT", + "DEBUG", + "INFO", + "NOTICE", + "WARNING", + "ERROR", + "CRITICAL", + "ALERT", + "EMERGENCY" + ], + "description": "Severity of this log entry.", "type": "string" }, - "projectIds": { - "description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names.", - "type": "array", - "items": { - "type": "string" - } - }, - "resourceNames": { - "description": "Required. Names of one or more resources from which to retrieve log entries:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nProjects listed in the project_ids field are added to this list.", - "type": "array", - "items": { - "type": "string" - } - }, - "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", - "type": "integer", - "format": "int32" - }, - "orderBy": { - "description": "Optional. How the results should be sorted. Presently, the only permitted values are \"timestamp asc\" (default) and \"timestamp desc\". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of LogEntry.insertId.", + "logMessage": { + "description": "App-provided log message.", "type": "string" }, - "pageToken": { - "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "sourceLocation": { + "$ref": "SourceLocation", + "description": "Where in the source code this log message was written." + }, + "time": { + "description": "Approximate time when this log entry was made.", + "format": "google-datetime", "type": "string" } }, - "id": "ListLogEntriesRequest" + "id": "LogLine" } }, - "revision": "20161206", - "basePath": "", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version_module": "True", + "protocol": "rest", "canonicalName": "Logging", - "discoveryVersion": "v1", - "baseUrl": "https://logging.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/logging.admin": { + "description": "Administrate log data for your projects" + }, + "https://www.googleapis.com/auth/logging.read": { + "description": "View log data for your projects" + }, + "https://www.googleapis.com/auth/logging.write": { + "description": "Submit log data for your projects" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://logging.googleapis.com/", + "ownerDomain": "google.com", "name": "logging", + "batchPath": "batch", + "title": "Stackdriver Logging API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "logs": { + "methods": { + "list": { + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListLogsResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + }, + "parent": { + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2beta1/projects/{projectsId}/logs", + "id": "logging.projects.logs.list", + "path": "v2beta1/{+parent}/logs" + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "logName" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "logName": { + "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/logs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/projects/{projectsId}/logs/{logsId}", + "id": "logging.projects.logs.delete", + "path": "v2beta1/{+logName}", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." + } + } + }, + "sinks": { + "methods": { + "update": { + "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", + "id": "logging.projects.sinks.update", + "path": "v2beta1/{+sinkName}", + "description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.", + "request": { + "$ref": "LogSink" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "LogSink" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "sinkName": { + "location": "path", + "description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/sinks/[^/]+$" + }, + "uniqueWriterIdentity": { + "description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value is false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value is true and the new value is false.", + "type": "boolean", + "location": "query" + } + } + }, + "create": { + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "uniqueWriterIdentity": { + "location": "query", + "description": "Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.", + "type": "boolean" + }, + "parent": { + "location": "path", + "description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "flatPath": "v2beta1/projects/{projectsId}/sinks", + "path": "v2beta1/{+parent}/sinks", + "id": "logging.projects.sinks.create", + "description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.", + "request": { + "$ref": "LogSink" + } + }, + "delete": { + "description": "Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted.", + "httpMethod": "DELETE", + "parameterOrder": [ + "sinkName" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "sinkName": { + "location": "path", + "description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/sinks/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", + "id": "logging.projects.sinks.delete", + "path": "v2beta1/{+sinkName}" + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListSinksResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "location": "path", + "description": "Required. The parent resource whose sinks are to be listed:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2beta1/projects/{projectsId}/sinks", + "id": "logging.projects.sinks.list", + "path": "v2beta1/{+parent}/sinks", + "description": "Lists sinks." + }, + "get": { + "description": "Gets a sink.", + "httpMethod": "GET", + "response": { + "$ref": "LogSink" + }, + "parameterOrder": [ + "sinkName" + ], + "parameters": { + "sinkName": { + "pattern": "^projects/[^/]+/sinks/[^/]+$", + "location": "path", + "description": "Required. The resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]\"\n\"folders/[FOLDER_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}", + "id": "logging.projects.sinks.get", + "path": "v2beta1/{+sinkName}" + } + } + }, + "metrics": { + "methods": { + "create": { + "response": { + "$ref": "LogMetric" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "parameters": { + "parent": { + "description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/projects/{projectsId}/metrics", + "path": "v2beta1/{+parent}/metrics", + "id": "logging.projects.metrics.create", + "description": "Creates a logs-based metric.", + "request": { + "$ref": "LogMetric" + } + }, + "delete": { + "id": "logging.projects.metrics.delete", + "path": "v2beta1/{+metricName}", + "description": "Deletes a logs-based metric.", + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "metricName" + ], + "parameters": { + "metricName": { + "description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/metrics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}" + }, + "list": { + "response": { + "$ref": "ListLogMetricsResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The name of the project containing the metrics:\n\"projects/[PROJECT_ID]\"\n", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2beta1/projects/{projectsId}/metrics", + "path": "v2beta1/{+parent}/metrics", + "id": "logging.projects.metrics.list", + "description": "Lists logs-based metrics." + }, + "get": { + "description": "Gets a logs-based metric.", + "response": { + "$ref": "LogMetric" + }, + "parameterOrder": [ + "metricName" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "metricName": { + "pattern": "^projects/[^/]+/metrics/[^/]+$", + "location": "path", + "description": "The resource name of the desired metric:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n", + "required": true, + "type": "string" + } + }, + "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", + "path": "v2beta1/{+metricName}", + "id": "logging.projects.metrics.get" + }, + "update": { + "response": { + "$ref": "LogMetric" + }, + "parameterOrder": [ + "metricName" + ], + "httpMethod": "PUT", + "parameters": { + "metricName": { + "location": "path", + "description": "The resource name of the metric to update:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\nThe updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/metrics/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "flatPath": "v2beta1/projects/{projectsId}/metrics/{metricsId}", + "path": "v2beta1/{+metricName}", + "id": "logging.projects.metrics.update", + "request": { + "$ref": "LogMetric" + }, + "description": "Creates or updates a logs-based metric." + } + } + } + } + }, + "billingAccounts": { + "resources": { + "logs": { + "methods": { + "delete": { + "flatPath": "v2beta1/billingAccounts/{billingAccountsId}/logs/{logsId}", + "id": "logging.billingAccounts.logs.delete", + "path": "v2beta1/{+logName}", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted.", + "httpMethod": "DELETE", + "parameterOrder": [ + "logName" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "logName": { + "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "required": true, + "type": "string", + "pattern": "^billingAccounts/[^/]+/logs/[^/]+$", + "location": "path" + } + } + }, + "list": { + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "response": { + "$ref": "ListLogsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + }, + "parent": { + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^billingAccounts/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2beta1/billingAccounts/{billingAccountsId}/logs", + "path": "v2beta1/{+parent}/logs", + "id": "logging.billingAccounts.logs.list" + } + } + } + } + }, + "monitoredResourceDescriptors": { + "methods": { + "list": { + "response": { + "$ref": "ListMonitoredResourceDescriptorsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2beta1/monitoredResourceDescriptors", + "path": "v2beta1/monitoredResourceDescriptors", + "id": "logging.monitoredResourceDescriptors.list", + "description": "Lists the descriptors for monitored resource types used by Stackdriver Logging." + } + } + }, + "organizations": { + "resources": { + "logs": { + "methods": { + "list": { + "description": "Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListLogsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "type": "integer" + }, + "parent": { + "description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]\"\n\"folders/[FOLDER_ID]\"\n", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/organizations/{organizationsId}/logs", + "id": "logging.organizations.logs.list", + "path": "v2beta1/{+parent}/logs" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "logName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ], + "parameters": { + "logName": { + "description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", + "required": true, + "type": "string", + "pattern": "^organizations/[^/]+/logs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta1/organizations/{organizationsId}/logs/{logsId}", + "path": "v2beta1/{+logName}", + "id": "logging.organizations.logs.delete", + "description": "Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted." + } + } + } + } + }, + "entries": { + "methods": { + "list": { + "id": "logging.entries.list", + "path": "v2beta1/entries:list", + "request": { + "$ref": "ListLogEntriesRequest" + }, + "description": "Lists log entries. Use this method to retrieve log entries from Stackdriver Logging. For ways to export log entries, see Exporting Logs.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "ListLogEntriesResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ], + "flatPath": "v2beta1/entries:list" + }, + "write": { + "request": { + "$ref": "WriteLogEntriesRequest" + }, + "description": "Writes log entries to Stackdriver Logging.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "WriteLogEntriesResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.write" + ], + "flatPath": "v2beta1/entries:write", + "id": "logging.entries.write", + "path": "v2beta1/entries:write" + } + } + } + }, "parameters": { - "access_token": { - "description": "OAuth access token.", + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Returns response with indentations and line breaks." + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", "type": "string", "location": "query" }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", "location": "query" }, "key": { @@ -1441,52 +1507,18 @@ "location": "query" }, "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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": "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" }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" + "pp": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Pretty-print response." }, - "callback": { - "description": "JSONP", + "bearer_token": { + "description": "OAuth bearer token.", "type": "string", "location": "query" }, @@ -1494,29 +1526,6 @@ "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" } - }, - "documentationLink": "https://cloud.google.com/logging/docs/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v2beta1", - "rootUrl": "https://logging.googleapis.com/", - "kind": "discovery#restDescription" + } } diff --git a/etc/api/manufacturers/v1/manufacturers-api.json b/etc/api/manufacturers/v1/manufacturers-api.json index 307547a6c4..3384e5fd16 100644 --- a/etc/api/manufacturers/v1/manufacturers-api.json +++ b/etc/api/manufacturers/v1/manufacturers-api.json @@ -1,97 +1,76 @@ { - "id": "manufacturers:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/manufacturercenter": { - "description": "Manage your product listings for Google Manufacturer Center" - } - } - } - }, - "description": "Public API for managing Manufacturer Center related data.", - "protocol": "rest", - "title": "Manufacturer Center API", - "resources": { - "accounts": { - "resources": { - "products": { - "methods": { - "get": { - "id": "manufacturers.accounts.products.get", - "response": { - "$ref": "Product" - }, - "parameterOrder": [ - "parent", - "name" - ], - "description": "Gets the product from a Manufacturer Center account, including product\nissues.", - "flatPath": "v1/accounts/{accountsId}/products/{productsId}", - "httpMethod": "GET", - "parameters": { - "parent": { - "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.", - "required": true, - "pattern": "^accounts/[^/]+$", - "location": "path", - "type": "string" - }, - "name": { - "description": "Name in the format `{target_country}:{content_language}:{product_id}`.\n\n`target_country` - The target country of the product as a CLDR territory\n code (for example, US).\n\n`content_language` - The content language of the product as a two-letter\n ISO 639-1 language code (for example, en).\n\n`product_id` - The ID of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#id.", - "required": true, - "pattern": "^[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+parent}/products/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/manufacturercenter" - ] - }, - "list": { - "id": "manufacturers.accounts.products.list", - "response": { - "$ref": "ListProductsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists all the products in a Manufacturer Center account.", - "flatPath": "v1/accounts/{accountsId}/products", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Maximum number of product statuses to return in the response, used for\npaging.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.", - "required": true, - "pattern": "^accounts/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/products", - "scopes": [ - "https://www.googleapis.com/auth/manufacturercenter" - ] - } - } - } - } - } - }, + "discoveryVersion": "v1", + "version_module": "True", "schemas": { + "Product": { + "description": "Product data.", + "type": "object", + "properties": { + "uploadedAttributes": { + "$ref": "Attributes", + "description": "Attributes of the product uploaded via the Manufacturer Center API or via\nfeeds." + }, + "parent": { + "type": "string", + "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.\n@OutputOnly" + }, + "manuallyProvidedAttributes": { + "$ref": "Attributes", + "description": "Attributes of the product provided manually via the Manufacturer Center UI.\n@OutputOnly" + }, + "targetCountry": { + "type": "string", + "description": "The target country of the product as a CLDR territory code (for example,\nUS).\n@OutputOnly" + }, + "contentLanguage": { + "description": "The content language of the product as a two-letter ISO 639-1 language code\n(for example, en).\n@OutputOnly", + "type": "string" + }, + "name": { + "description": "Name in the format `{target_country}:{content_language}:{product_id}`.\n\n`target_country` - The target country of the product as a CLDR territory\n code (for example, US).\n\n`content_language` - The content language of the product as a two-letter\n ISO 639-1 language code (for example, en).\n\n`product_id` - The ID of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#id.\n@OutputOnly", + "type": "string" + }, + "issues": { + "description": "A server-generated list of issues associated with the product.\n@OutputOnly", + "type": "array", + "items": { + "$ref": "Issue" + } + }, + "manuallyDeletedAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Names of the attributes of the product deleted manually via the\nManufacturer Center UI.\n@OutputOnly" + }, + "finalAttributes": { + "description": "Final attributes of the product. The final attributes are obtained by\noverriding the uploaded attributes with the manually provided and deleted\nattributes. Google systems only process, evaluate, review, and/or use final\nattributes.\n@OutputOnly", + "$ref": "Attributes" + }, + "productId": { + "type": "string", + "description": "The ID of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#id.\n@OutputOnly" + } + }, + "id": "Product" + }, + "Capacity": { + "properties": { + "value": { + "description": "The numeric value of the capacity.", + "format": "int64", + "type": "string" + }, + "unit": { + "description": "The unit of the capacity, i.e., MB, GB, or TB.", + "type": "string" + } + }, + "id": "Capacity", + "description": "The capacity of a product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#capacity.", + "type": "object" + }, "ListProductsResponse": { "type": "object", "properties": { @@ -109,167 +88,450 @@ }, "id": "ListProductsResponse" }, + "ProductDetail": { + "description": "A product detail of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productdetail.", + "type": "object", + "properties": { + "attributeValue": { + "description": "The value of the attribute.", + "type": "string" + }, + "sectionName": { + "description": "A short section name that can be reused between multiple product details.", + "type": "string" + }, + "attributeName": { + "description": "The name of the attribute.", + "type": "string" + } + }, + "id": "ProductDetail" + }, + "FeatureDescription": { + "description": "A feature description of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#featuredesc.", + "type": "object", + "properties": { + "image": { + "$ref": "Image", + "description": "An optional image describing the feature." + }, + "headline": { + "description": "A short description of the feature.", + "type": "string" + }, + "text": { + "description": "A detailed description of the feature.", + "type": "string" + } + }, + "id": "FeatureDescription" + }, "Issue": { "description": "Product issue.", "type": "object", "properties": { + "timestamp": { + "type": "string", + "description": "The timestamp when this issue appeared.", + "format": "google-datetime" + }, "severity": { - "description": "The severity of the issue.", "enum": [ "SEVERITY_UNSPECIFIED", "ERROR", "WARNING", "INFO" ], + "description": "The severity of the issue.", + "type": "string", "enumDescriptions": [ "Unspecified severity, never used.", "Error severity. The issue prevents the usage of the whole item.", "Warning severity. The issue is either one that prevents the usage of the\nattribute that triggered it or one that will soon prevent the usage of\nthe whole item.", "Info severity. The issue is one that doesn't require immediate attention.\nIt is, for example, used to communicate which attributes are still\npending review." - ], - "type": "string" + ] }, "description": { "description": "Description of the issue.", "type": "string" }, - "attribute": { - "description": "If present, the attribute that triggered the issue. For more information\nabout attributes, see\nhttps://support.google.com/manufacturers/answer/6124116.", - "type": "string" - }, "type": { "description": "The server-generated type of the issue, for example,\n“INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc.", "type": "string" + }, + "attribute": { + "description": "If present, the attribute that triggered the issue. For more information\nabout attributes, see\nhttps://support.google.com/manufacturers/answer/6124116.", + "type": "string" } }, "id": "Issue" }, + "Price": { + "type": "object", + "properties": { + "currency": { + "description": "The currency in which the price is denoted.", + "type": "string" + }, + "amount": { + "description": "The numeric value of the price.", + "type": "string" + } + }, + "id": "Price", + "description": "A price." + }, + "Image": { + "description": "An image.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enumDescriptions": [ + "Type is unspecified. Should not be used.", + "The image was crawled from a provided URL.", + "The image was uploaded." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "CRAWLED", + "UPLOADED" + ], + "description": "The type of the image, i.e., crawled or uploaded.\n@OutputOnly" + }, + "imageUrl": { + "description": "The URL of the image. For crawled images, this is the provided URL. For\nuploaded images, this is a serving URL from Google if the image has been\nprocessed successfully.", + "type": "string" + }, + "status": { + "enumDescriptions": [ + "Status is unspecified. Should not be used.", + "Image was uploaded and is being processed.", + "The image crawl is still pending.", + "The image was processed and it meets the requirements.", + "The image URL is protected by robots.txt file and cannot be crawled.", + "The image URL is protected by X-Robots-Tag and cannot be crawled.", + "There was an error while crawling the image.", + "The image cannot be processed.", + "The image cannot be decoded.", + "The image is too big.", + "The image was manually overridden and will not be crawled." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PENDING_PROCESSING", + "PENDING_CRAWL", + "OK", + "ROBOTED", + "XROBOTED", + "CRAWL_ERROR", + "PROCESSING_ERROR", + "DECODING_ERROR", + "TOO_BIG", + "CRAWL_SKIPPED" + ], + "description": "The status of the image.\n@OutputOnly", + "type": "string" + } + }, + "id": "Image" + }, "Attributes": { "description": "Attributes of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116.", "type": "object", "properties": { - "productPageUrl": { - "description": "The URL of the manufacturer's detail page of the product. For more\ninformation, see\nhttps://support.google.com/manufacturers/answer/6124116#productpage.", + "imageLink": { + "$ref": "Image", + "description": "The image of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#image." + }, + "productType": { + "description": "The category of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#producttype.", + "type": "array", + "items": { + "type": "string" + } + }, + "format": { + "description": "The format of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#format.", "type": "string" }, - "mpn": { - "description": "The Manufacturer Part Number (MPN) of the product. For more information,\nsee https://support.google.com/manufacturers/answer/6124116#mpn.", - "type": "string" + "additionalImageLink": { + "description": "The additional images of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#addlimage.", + "type": "array", + "items": { + "$ref": "Image" + } }, - "title": { - "description": "The title of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#title.", - "type": "string" + "videoLink": { + "description": "The videos of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#video.", + "type": "array", + "items": { + "type": "string" + } }, - "productLine": { - "description": "The name of the group of products related to the product. For more\ninformation, see\nhttps://support.google.com/manufacturers/answer/6124116#productline.", + "color": { + "description": "The color of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#color.", "type": "string" }, "productName": { "description": "The canonical name of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productname.", "type": "string" }, + "sizeType": { + "description": "The size type of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#sizetype.", + "type": "string" + }, + "suggestedRetailPrice": { + "description": "The suggested retail price (MSRP) of the product. For more information,\nsee https://support.google.com/manufacturers/answer/6124116#price.", + "$ref": "Price" + }, + "featureDescription": { + "description": "The rich format description of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#featuredesc.", + "type": "array", + "items": { + "$ref": "FeatureDescription" + } + }, + "size": { + "description": "The size of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#size.", + "type": "string" + }, + "title": { + "description": "The title of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#title.", + "type": "string" + }, + "count": { + "description": "The count of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#count.", + "$ref": "Count" + }, "brand": { "description": "The brand name of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#brand.", "type": "string" }, - "productType": { - "description": "The manufacturer's category of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#producttype.", + "disclosureDate": { + "description": "The disclosure date of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#disclosure.", + "type": "string" + }, + "material": { + "type": "string", + "description": "The material of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#material." + }, + "scent": { + "description": "The scent of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#scent.", + "type": "string" + }, + "flavor": { + "description": "The flavor of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#flavor.", + "type": "string" + }, + "productDetail": { + "description": "The details of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productdetail.", "type": "array", "items": { - "type": "string" + "$ref": "ProductDetail" } }, + "ageGroup": { + "type": "string", + "description": "The target age group of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#agegroup." + }, + "mpn": { + "description": "The Manufacturer Part Number (MPN) of the product. For more information,\nsee https://support.google.com/manufacturers/answer/6124116#mpn.", + "type": "string" + }, + "productPageUrl": { + "type": "string", + "description": "The URL of the detail page of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#productpage." + }, + "releaseDate": { + "description": "The release date of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#release.", + "type": "string" + }, + "itemGroupId": { + "type": "string", + "description": "The item group id of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#itemgroupid." + }, "gtin": { "description": "The Global Trade Item Number (GTIN) of the product. For more information,\nsee https://support.google.com/manufacturers/answer/6124116#gtin.", "type": "array", "items": { "type": "string" } + }, + "productLine": { + "description": "The name of the group of products related to the product. For more\ninformation, see\nhttps://support.google.com/manufacturers/answer/6124116#productline.", + "type": "string" + }, + "capacity": { + "$ref": "Capacity", + "description": "The capacity of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#capacity." + }, + "description": { + "description": "The description of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#description.", + "type": "string" + }, + "gender": { + "description": "The target gender of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#gender.", + "type": "string" + }, + "sizeSystem": { + "description": "The size system of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#sizesystem.", + "type": "string" + }, + "theme": { + "description": "The theme of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#theme.", + "type": "string" + }, + "pattern": { + "description": "The pattern of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#pattern.", + "type": "string" } }, "id": "Attributes" }, - "Product": { - "description": "Product data.", + "Count": { + "description": "The number of products in a single package. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#count.", "type": "object", "properties": { - "parent": { - "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.\n@OutputOnly", + "value": { + "type": "string", + "description": "The numeric value of the number of products in a package.", + "format": "int64" + }, + "unit": { + "description": "The unit in which these products are counted.", "type": "string" - }, - "targetCountry": { - "description": "The target country of the product as a CLDR territory code (for example,\nUS).\n@OutputOnly", - "type": "string" - }, - "contentLanguage": { - "description": "The content language of the product as a two-letter ISO 639-1 language code\n(for example, en).\n@OutputOnly", - "type": "string" - }, - "manuallyDeletedAttributes": { - "description": "Names of the attributes of the product deleted manually via the\nManufacturer Center UI.\n@OutputOnly", - "type": "array", - "items": { - "type": "string" - } - }, - "productId": { - "description": "The ID of the product. For more information, see\nhttps://support.google.com/manufacturers/answer/6124116#id.\n@OutputOnly", - "type": "string" - }, - "finalAttributes": { - "description": "Final attributes of the product. The final attributes are obtained by\noverriding the uploaded attributes with the manually provided and deleted\nattributes. Google systems only process, evaluate, review, and/or use final\nattributes.\n@OutputOnly", - "$ref": "Attributes" - }, - "issues": { - "description": "A server-generated list of issues associated with the product.\n@OutputOnly", - "type": "array", - "items": { - "$ref": "Issue" - } - }, - "name": { - "description": "Name in the format `{target_country}:{content_language}:{product_id}`.\n\n`target_country` - The target country of the product as a CLDR territory\n code (for example, US).\n\n`content_language` - The content language of the product as a two-letter\n ISO 639-1 language code (for example, en).\n\n`product_id` - The ID of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#id.\n@OutputOnly", - "type": "string" - }, - "uploadedAttributes": { - "description": "Attributes of the product uploaded via the Manufacturer Center API or via\nfeeds.", - "$ref": "Attributes" - }, - "manuallyProvidedAttributes": { - "description": "Attributes of the product provided manually via the Manufacturer Center UI.\n@OutputOnly", - "$ref": "Attributes" } }, - "id": "Product" + "id": "Count" } }, - "revision": "20161028", - "basePath": "", + "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", "canonicalName": "Manufacturer Center", - "discoveryVersion": "v1", - "baseUrl": "https://manufacturers.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/manufacturercenter": { + "description": "Manage your product listings for Google Manufacturer Center" + } + } + } + }, + "rootUrl": "https://manufacturers.googleapis.com/", + "ownerDomain": "google.com", "name": "manufacturers", + "batchPath": "batch", + "title": "Manufacturer Center API", + "ownerName": "Google", + "resources": { + "accounts": { + "resources": { + "products": { + "methods": { + "list": { + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListProductsResponse" + }, + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "The token returned by the previous request.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of product statuses to return in the response, used for\npaging.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "parent": { + "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.", + "required": true, + "type": "string", + "pattern": "^accounts/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/manufacturercenter" + ], + "flatPath": "v1/accounts/{accountsId}/products", + "id": "manufacturers.accounts.products.list", + "path": "v1/{+parent}/products", + "description": "Lists all the products in a Manufacturer Center account." + }, + "get": { + "response": { + "$ref": "Product" + }, + "parameterOrder": [ + "parent", + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/manufacturercenter" + ], + "parameters": { + "name": { + "pattern": "^[^/]+$", + "location": "path", + "description": "Name in the format `{target_country}:{content_language}:{product_id}`.\n\n`target_country` - The target country of the product as a CLDR territory\n code (for example, US).\n\n`content_language` - The content language of the product as a two-letter\n ISO 639-1 language code (for example, en).\n\n`product_id` - The ID of the product. For more information, see\n https://support.google.com/manufacturers/answer/6124116#id.", + "required": true, + "type": "string" + }, + "parent": { + "description": "Parent ID in the format `accounts/{account_id}`.\n\n`account_id` - The ID of the Manufacturer Center account.", + "required": true, + "type": "string", + "pattern": "^accounts/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/accounts/{accountsId}/products/{productsId}", + "path": "v1/{+parent}/products/{+name}", + "id": "manufacturers.accounts.products.get", + "description": "Gets the product from a Manufacturer Center account, including product\nissues." + } + } + } + } + } + }, "parameters": { + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, "access_token": { "description": "OAuth access token.", "type": "string", "location": "query" }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, "key": { - "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", - "location": "query" + "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." }, "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.", @@ -278,52 +540,29 @@ }, "pp": { "description": "Pretty-print response.", - "default": "true", "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", + "default": "true", "location": "query" }, "oauth_token": { + "location": "query", "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "upload_protocol": { + "type": "string", + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", "location": "query" }, "uploadType": { @@ -331,23 +570,37 @@ "type": "string", "location": "query" }, - "bearer_token": { - "description": "OAuth bearer token.", + "fields": { "type": "string", - "location": "query" + "location": "query", + "description": "Selector specifying which fields to include in a partial response." }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", "type": "string", - "location": "query" + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] } }, - "documentationLink": "https://developers.google.com/manufacturers/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v1", - "rootUrl": "https://manufacturers.googleapis.com/", - "kind": "discovery#restDescription" + "baseUrl": "https://manufacturers.googleapis.com/", + "servicePath": "", + "description": "Public API for managing Manufacturer Center related data.", + "kind": "discovery#restDescription", + "basePath": "", + "revision": "20170412", + "documentationLink": "https://developers.google.com/manufacturers/", + "id": "manufacturers:v1" } diff --git a/etc/api/mirror/v1/mirror-api.json b/etc/api/mirror/v1/mirror-api.json index 4e86829c4f..3c1525de08 100644 --- a/etc/api/mirror/v1/mirror-api.json +++ b/etc/api/mirror/v1/mirror-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/nxDdKsGKU-CGQ0rCYbUZuIhDXnY\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/WPRVY9WdjtlhnPeIWQ7gxByfU3U\"", "discoveryVersion": "v1", "id": "mirror:v1", "name": "mirror", "version": "v1", - "revision": "20160616", + "revision": "20170419", "title": "Google Mirror API", "description": "Interacts with Glass users via the timeline.", "ownerDomain": "google.com", diff --git a/etc/api/ml/v1beta1/ml-api.json b/etc/api/ml/v1beta1/ml-api.json index bd6464e192..c4393cad87 100644 --- a/etc/api/ml/v1beta1/ml-api.json +++ b/etc/api/ml/v1beta1/ml-api.json @@ -1,1091 +1,169 @@ { - "id": "ml:v1beta1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, "description": "An API to enable creating and using machine learning models.", - "protocol": "rest", - "title": "Google Cloud Machine Learning", - "resources": { - "projects": { - "resources": { - "models": { - "resources": { - "versions": { - "methods": { - "create": { - "id": "ml.projects.models.versions.create", - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a new version of a model from a trained TensorFlow model.\n\nIf the version created in the cloud by this call is the first deployed\nversion of the specified model, it will be made the default version of the\nmodel. When you add a version to a model that already has one or more\nversions, the default version does not automatically change. If you want a\nnew version to be the default, you must call\n[projects.models.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).", - "request": { - "$ref": "GoogleCloudMlV1beta1__Version" - }, - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions", - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "Required. The name of the model.\n\nAuthorization: requires `Editor` role on the parent project.", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/versions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "ml.projects.models.versions.get", - "response": { - "$ref": "GoogleCloudMlV1beta1__Version" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets information about a model version.\n\nModels can have multiple versions. You can call\n[projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list)\nto get the same information that this method returns for all of the\nversions of a model.", - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "Required. The name of the version.\n\nAuthorization: requires `Viewer` role on the parent project.", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setDefault": { - "id": "ml.projects.models.versions.setDefault", - "response": { - "$ref": "GoogleCloudMlV1beta1__Version" - }, - "parameterOrder": [ - "name" - ], - "description": "Designates a version to be the default for the model.\n\nThe default version is used for prediction requests made against the model\nthat don't specify a version.\n\nThe first version to be created for a model is automatically set as the\ndefault. You must make any subsequent changes to the default version\nsetting manually using this method.", - "request": { - "$ref": "GoogleCloudMlV1beta1__SetDefaultVersionRequest" - }, - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}:setDefault", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "Required. The name of the version to make the default for the model. You\ncan get the names of all the versions of a model by calling\n[projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).\n\nAuthorization: requires `Editor` role on the parent project.", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}:setDefault", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "ml.projects.models.versions.list", - "response": { - "$ref": "GoogleCloudMlV1beta1__ListVersionsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Gets basic information about all the versions of a model.\n\nIf you expect that a model has a lot of versions, or if you need to handle\nonly a limited number of results at a time, you can request that the list\nbe retrieved in batches (called pages):", - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The number of versions to retrieve per \"page\" of results. If\nthere are more remaining results than this number, the response message\nwill contain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The name of the model for which to list the version.\n\nAuthorization: requires `Viewer` role on the parent project.", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/versions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "ml.projects.models.versions.delete", - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameterOrder": [ - "name" - ], - "description": "Deletes a model version.\n\nEach model can have multiple versions deployed and in use at any given\ntime. Use this method to remove a single version.\n\nNote: You cannot delete the version that is set as the default version\nof the model unless it is the only remaining version.", - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "Required. The name of the version. You can get the names of all the\nversions of a model by calling\n[projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).\n\nAuthorization: requires `Editor` role on the parent project.", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - }, - "methods": { - "create": { - "id": "ml.projects.models.create", - "response": { - "$ref": "GoogleCloudMlV1beta1__Model" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a model which will later contain one or more versions.\n\nYou must add at least one version before you can request predictions from\nthe model. Add versions by calling\n[projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create).", - "request": { - "$ref": "GoogleCloudMlV1beta1__Model" - }, - "flatPath": "v1beta1/projects/{projectsId}/models", - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "Required. The project name.\n\nAuthorization: requires `Editor` role on the specified project.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/models", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "ml.projects.models.get", - "response": { - "$ref": "GoogleCloudMlV1beta1__Model" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets information about a model, including its name, the description (if\nset), and the default version (if at least one version of the model has\nbeen deployed).", - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "Required. The name of the model.\n\nAuthorization: requires `Viewer` role on the parent project.", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "ml.projects.models.list", - "response": { - "$ref": "GoogleCloudMlV1beta1__ListModelsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists the models in a project.\n\nEach project can contain multiple models, and each model can have multiple\nversions.", - "flatPath": "v1beta1/projects/{projectsId}/models", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The number of models to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "Required. The name of the project whose models are to be listed.\n\nAuthorization: requires `Viewer` role on the specified project.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/models", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "ml.projects.models.delete", - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameterOrder": [ - "name" - ], - "description": "Deletes a model.\n\nYou can only delete a model if there are no versions in it. You can delete\nversions by calling\n[projects.models.versions.delete](/ml/reference/rest/v1beta1/projects.models.versions/delete).", - "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "Required. The name of the model.\n\nAuthorization: requires `Editor` role on the parent project.", - "required": true, - "pattern": "^projects/[^/]+/models/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "jobs": { - "methods": { - "create": { - "id": "ml.projects.jobs.create", - "response": { - "$ref": "GoogleCloudMlV1beta1__Job" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a training or a batch prediction job.", - "request": { - "$ref": "GoogleCloudMlV1beta1__Job" - }, - "flatPath": "v1beta1/projects/{projectsId}/jobs", - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "Required. The project name.\n\nAuthorization: requires `Editor` role on the specified project.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/jobs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "ml.projects.jobs.get", - "response": { - "$ref": "GoogleCloudMlV1beta1__Job" - }, - "parameterOrder": [ - "name" - ], - "description": "Describes a job.", - "flatPath": "v1beta1/projects/{projectsId}/jobs/{jobsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "Required. The name of the job to get the description of.\n\nAuthorization: requires `Viewer` role on the parent project.", - "required": true, - "pattern": "^projects/[^/]+/jobs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "ml.projects.jobs.list", - "response": { - "$ref": "GoogleCloudMlV1beta1__ListJobsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists the jobs in the project.", - "flatPath": "v1beta1/projects/{projectsId}/jobs", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Optional. The number of jobs to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "Optional. Specifies the subset of jobs to retrieve.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The name of the project for which to list jobs.\n\nAuthorization: requires `Viewer` role on the specified project.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/jobs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "cancel": { - "id": "ml.projects.jobs.cancel", - "response": { - "$ref": "GoogleProtobuf__Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Cancels a running job.", - "request": { - "$ref": "GoogleCloudMlV1beta1__CancelJobRequest" - }, - "flatPath": "v1beta1/projects/{projectsId}/jobs/{jobsId}:cancel", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "Required. The name of the job to cancel.\n\nAuthorization: requires `Editor` role on the parent project.", - "required": true, - "pattern": "^projects/[^/]+/jobs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}:cancel", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "operations": { - "methods": { - "get": { - "id": "ml.projects.operations.get", - "response": { - "$ref": "GoogleLongrunning__Operation" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "required": true, - "pattern": "^projects/[^/]+/operations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "ml.projects.operations.list", - "response": { - "$ref": "GoogleLongrunning__ListOperationsResponse" - }, - "parameterOrder": [ - "name" - ], - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`.", - "flatPath": "v1beta1/projects/{projectsId}/operations", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "The standard list page size.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation collection.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+name}/operations", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "ml.projects.operations.delete", - "response": { - "$ref": "GoogleProtobuf__Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", - "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "The name of the operation resource to be deleted.", - "required": true, - "pattern": "^projects/[^/]+/operations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "cancel": { - "id": "ml.projects.operations.cancel", - "response": { - "$ref": "GoogleProtobuf__Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}:cancel", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "required": true, - "pattern": "^projects/[^/]+/operations/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}:cancel", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - }, - "methods": { - "predict": { - "id": "ml.projects.predict", - "response": { - "$ref": "GoogleApi__HttpBody" - }, - "parameterOrder": [ - "name" - ], - "description": "Performs prediction on the data in the request.\n\nResponses are very similar to requests. There are two top-level fields,\neach of which are JSON lists:\n\n\u003cdl\u003e\n \u003cdt\u003epredictions\u003c/dt\u003e\n \u003cdd\u003eThe list of predictions, one per instance in the request.\u003c/dd\u003e\n \u003cdt\u003eerror\u003c/dt\u003e\n \u003cdd\u003eAn error message returned instead of a prediction list if any\n instance produced an error.\u003c/dd\u003e\n\u003c/dl\u003e\n\nIf the call is successful, the response body will contain one prediction\nentry per instance in the request body. If prediction fails for any\ninstance, the response body will contain no predictions and will contian\na single error entry instead.\n\nEven though there is one prediction per instance, the format of a\nprediction is not directly related to the format of an instance.\nPredictions take whatever format is specified in the outputs collection\ndefined in the model. The collection of predictions is returned in a JSON\nlist. Each member of the list can be a simple value, a list, or a JSON\nobject of any complexity. If your model has more than one output tensor,\neach prediction will be a JSON object containing a name/value pair for each\noutput. The names identify the output aliases in the graph.\n\nThe following examples show some possible responses:\n\nA simple set of predictions for three input instances, where each\nprediction is an integer value:\n\u003cpre\u003e\n{\"predictions\": [5, 4, 3]}\n\u003c/pre\u003e\nA more complex set of predictions, each containing two named values that\ncorrespond to output tensors, named **label** and **scores** respectively.\nThe value of **label** is the predicted category (\"car\" or \"beach\") and\n**scores** contains a list of probabilities for that instance across the\npossible categories.\n\u003cpre\u003e\n{\"predictions\": [{\"label\": \"beach\", \"scores\": [0.1, 0.9]},\n {\"label\": \"car\", \"scores\": [0.75, 0.25]}]}\n\u003c/pre\u003e\nA response when there is an error processing an input instance:\n\u003cpre\u003e\n{\"error\": \"Divide by zero\"}\n\u003c/pre\u003e", - "request": { - "$ref": "GoogleCloudMlV1beta1__PredictRequest" - }, - "flatPath": "v1beta1/projects/{projectsId}:predict", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "Required. The resource name of a model or a version.\n\nAuthorization: requires `Viewer` role on the parent project.", - "required": true, - "pattern": "^projects/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}:predict", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getConfig": { - "id": "ml.projects.getConfig", - "response": { - "$ref": "GoogleCloudMlV1beta1__GetConfigResponse" - }, - "parameterOrder": [ - "name" - ], - "description": "Get the service account information associated with your project. You need\nthis information in order to grant the service account persmissions for\nthe Google Cloud Storage location where you put your model training code\nfor training the model with Google Cloud Machine Learning.", - "flatPath": "v1beta1/projects/{projectsId}:getConfig", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "Required. The project name.\n\nAuthorization: requires `Viewer` role on the specified project.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}:getConfig", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "kind": "discovery#restDescription", + "servicePath": "", + "basePath": "", + "id": "ml:v1beta1", + "documentationLink": "https://cloud.google.com/ml/", + "revision": "20170515", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { + "GoogleCloudMlV1__ManualScaling": { + "id": "GoogleCloudMlV1__ManualScaling", + "description": "Options for manually scaling a model.", + "type": "object", + "properties": { + "nodes": { + "type": "integer", + "description": "The number of nodes to allocate for this model. These nodes are always up,\nstarting from the time the model is deployed, so the cost of operating\nthis model will be proportional to nodes * number of hours since\ndeployment.", + "format": "int32" } } - } - }, - "schemas": { - "GoogleCloudMlV1beta1__HyperparameterOutput": { - "description": "Represents the result of a single hyperparameter tuning trial from a\ntraining job. The TrainingOutput object that is returned on successful\ncompletion of a training job with hyperparameter tuning includes a list\nof HyperparameterOutput objects, one for each successful trial.", - "type": "object", - "properties": { - "finalMetric": { - "description": "The final objective metric seen for this trial.", - "$ref": "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric" - }, - "allMetrics": { - "description": "All recorded object metrics for this trial.", - "type": "array", - "items": { - "$ref": "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric" - } - }, - "trialId": { - "description": "The trial id for these results.", - "type": "string" - }, - "hyperparameters": { - "description": "The hyperparameters given to this trial.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "id": "GoogleCloudMlV1beta1__HyperparameterOutput" - }, - "GoogleCloudMlV1beta1__GetConfigResponse": { - "description": "Returns service account information associated with a project.", - "type": "object", - "properties": { - "serviceAccount": { - "description": "The service account Cloud ML uses to access resources in the project.", - "type": "string" - }, - "serviceAccountProject": { - "description": "The project number for `service_account`.", - "type": "string", - "format": "int64" - } - }, - "id": "GoogleCloudMlV1beta1__GetConfigResponse" - }, - "GoogleCloudMlV1beta1__ListVersionsResponse": { - "description": "Response message for the ListVersions method.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", - "type": "string" - }, - "versions": { - "description": "The list of versions.", - "type": "array", - "items": { - "$ref": "GoogleCloudMlV1beta1__Version" - } - } - }, - "id": "GoogleCloudMlV1beta1__ListVersionsResponse" - }, - "GoogleApi__HttpBody": { - "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged.", - "type": "object", - "properties": { - "data": { - "description": "HTTP body binary data.", - "type": "string", - "format": "byte" - }, - "contentType": { - "description": "The HTTP Content-Type string representing the content type of the body.", - "type": "string" - } - }, - "id": "GoogleApi__HttpBody" - }, - "GoogleCloudMlV1beta1__Job": { - "description": "Represents a training or prediction job.", - "type": "object", - "properties": { - "predictionInput": { - "description": "Input parameters to create a prediction job.", - "$ref": "GoogleCloudMlV1beta1__PredictionInput" - }, - "state": { - "description": "Output only. The detailed state of a job.", - "enum": [ - "STATE_UNSPECIFIED", - "QUEUED", - "PREPARING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLING", - "CANCELLED" - ], - "enumDescriptions": [ - "The job state is unspecified.", - "The job has been just created and processing has not yet begun.", - "The service is preparing to run the job.", - "The job is in progress.", - "The job completed successfully.", - "The job failed.\n`error_message` should contain the details of the failure.", - "The job is being cancelled.\n`error_message` should describe the reason for the cancellation.", - "The job has been cancelled.\n`error_message` should describe the reason for the cancellation." - ], - "type": "string" - }, - "endTime": { - "description": "Output only. When the job processing was completed.", - "type": "string", - "format": "google-datetime" - }, - "createTime": { - "description": "Output only. When the job was created.", - "type": "string", - "format": "google-datetime" - }, - "errorMessage": { - "description": "Output only. The details of a failure or a cancellation.", - "type": "string" - }, - "trainingOutput": { - "description": "The current training job result.", - "$ref": "GoogleCloudMlV1beta1__TrainingOutput" - }, - "startTime": { - "description": "Output only. When the job processing was started.", - "type": "string", - "format": "google-datetime" - }, - "trainingInput": { - "description": "Input parameters to create a training job.", - "$ref": "GoogleCloudMlV1beta1__TrainingInput" - }, - "jobId": { - "description": "Required. The user-specified id of the job.", - "type": "string" - }, - "predictionOutput": { - "description": "The current prediction job result.", - "$ref": "GoogleCloudMlV1beta1__PredictionOutput" - } - }, - "id": "GoogleCloudMlV1beta1__Job" }, "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric": { "description": "An observed value of a metric.", "type": "object", "properties": { - "objectiveValue": { - "description": "The objective value at this training step.", - "type": "number", - "format": "double" - }, "trainingStep": { "description": "The global training step for this metric.", - "type": "string", - "format": "int64" + "format": "int64", + "type": "string" + }, + "objectiveValue": { + "description": "The objective value at this training step.", + "format": "double", + "type": "number" } }, "id": "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric" }, - "GoogleLongrunning__Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "GoogleCloudMlV1beta1__ParameterSpec": { + "description": "Represents a single hyperparameter to optimize.", "type": "object", "properties": { - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "GoogleRpc__Status" + "minValue": { + "description": "Required if type is `DOUBLE` or `INTEGER`. This field\nshould be unset if type is `CATEGORICAL`. This value should be integers if\ntype is INTEGER.", + "format": "double", + "type": "number" }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - } - }, - "id": "GoogleLongrunning__Operation" - }, - "GoogleCloudMlV1beta1__PredictRequest": { - "description": "Request for predictions to be issued against a trained model.\n\nThe body of the request is a single JSON object with a single top-level\nfield:\n\n\u003cdl\u003e\n \u003cdt\u003einstances\u003c/dt\u003e\n \u003cdd\u003eA JSON array containing values representing the instances to use for\n prediction.\u003c/dd\u003e\n\u003c/dl\u003e\n\nThe structure of each element of the instances list is determined by your\nmodel's input definition. Instances can include named inputs or can contain\nonly unlabeled values.\n\nMost data does not include named inputs. Some instances will be simple\nJSON values (boolean, number, or string). However, instances are often lists\nof simple values, or complex nested lists. Here are some examples of request\nbodies:\n\nCSV data with each row encoded as a string value:\n\u003cpre\u003e\n{\"instances\": [\"1.0,true,\\\\\"x\\\\\"\", \"-2.0,false,\\\\\"y\\\\\"\"]}\n\u003c/pre\u003e\nPlain text:\n\u003cpre\u003e\n{\"instances\": [\"the quick brown fox\", \"la bruja le dio\"]}\n\u003c/pre\u003e\nSentences encoded as lists of words (vectors of strings):\n\u003cpre\u003e\n{\"instances\": [[\"the\",\"quick\",\"brown\"], [\"la\",\"bruja\",\"le\"]]}\n\u003c/pre\u003e\nFloating point scalar values:\n\u003cpre\u003e\n{\"instances\": [0.0, 1.1, 2.2]}\n\u003c/pre\u003e\nVectors of integers:\n\u003cpre\u003e\n{\"instances\": [[0, 1, 2], [3, 4, 5],...]}\n\u003c/pre\u003e\nTensors (in this case, two-dimensional tensors):\n\u003cpre\u003e\n{\"instances\": [[[0, 1, 2], [3, 4, 5]], ...]}\n\u003c/pre\u003e\nImages represented as a three-dimensional list. In this encoding scheme the\nfirst two dimensions represent the rows and columns of the image, and the\nthird contains the R, G, and B values for each pixel.\n\u003cpre\u003e\n{\"instances\": [[[[138, 30, 66], [130, 20, 56], ...]]]]}\n\u003c/pre\u003e\nData must be encoded as UTF-8. If your data uses another character encoding,\nyou must base64 encode the data and mark it as binary. To mark a JSON string\nas binary, replace it with an object with a single attribute named `b`:\n\u003cpre\u003e{\"b\": \"...\"} \u003c/pre\u003e\nFor example:\n\nTwo Serialized tf.Examples (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"X5ad6u\"}, {\"b64\": \"IA9j4nx\"}]}\n\u003c/pre\u003e\nTwo JPEG image byte strings (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"ASa8asdf\"}, {\"b64\": \"JLK7ljk3\"}]}\n\u003c/pre\u003e\nIf your data includes named references, format each instance as a JSON object\nwith the named references as the keys:\n\nJSON input data to be preprocessed:\n\u003cpre\u003e\n{\"instances\": [{\"a\": 1.0, \"b\": true, \"c\": \"x\"},\n {\"a\": -2.0, \"b\": false, \"c\": \"y\"}]}\n\u003c/pre\u003e\nSome models have an underlying TensorFlow graph that accepts multiple input\ntensors. In this case, you should use the names of JSON name/value pairs to\nidentify the input tensors, as shown in the following exmaples:\n\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(base64-encoded string):\n\u003cpre\u003e\n{\"instances\": [{\"tag\": \"beach\", \"image\": {\"b64\": \"ASa8asdf\"}},\n {\"tag\": \"car\", \"image\": {\"b64\": \"JLK7ljk3\"}}]}\n\u003c/pre\u003e\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(3-dimensional array of 8-bit ints):\n\u003cpre\u003e\n{\"instances\": [{\"tag\": \"beach\", \"image\": [[[263, 1, 10], [262, 2, 11], ...]]},\n {\"tag\": \"car\", \"image\": [[[10, 11, 24], [23, 10, 15], ...]]}]}\n\u003c/pre\u003e\nIf the call is successful, the response body will contain one prediction\nentry per instance in the request body. If prediction fails for any\ninstance, the response body will contain no predictions and will contian\na single error entry instead.", - "type": "object", - "properties": { - "httpBody": { - "description": "\nRequired. The prediction request body.", - "$ref": "GoogleApi__HttpBody" - } - }, - "id": "GoogleCloudMlV1beta1__PredictRequest" - }, - "GoogleRpc__Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "discreteValues": { + "description": "Required if type is `DISCRETE`.\nA list of feasible points.\nThe list should be in strictly increasing order. For instance, this\nparameter might have possible settings of 1.5, 2.5, and 4.0. This list\nshould not contain more than 1,000 values.", "type": "array", "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" + "format": "double", + "type": "number" } }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "scaleType": { + "type": "string", + "enumDescriptions": [ + "By default, no scaling is applied.", + "Scales the feasible space to (0, 1) linearly.", + "Scales the feasible space logarithmically to (0, 1). The entire feasible\nspace must be strictly positive.", + "Scales the feasible space \"reverse\" logarithmically to (0, 1). The result\nis that values close to the top of the feasible space are spread out more\nthan points near the bottom. The entire feasible space must be strictly\npositive." + ], + "enum": [ + "NONE", + "UNIT_LINEAR_SCALE", + "UNIT_LOG_SCALE", + "UNIT_REVERSE_LOG_SCALE" + ], + "description": "Optional. How the parameter should be scaled to the hypercube.\nLeave unset for categorical parameters.\nSome kind of scaling is strongly recommended for real or integral\nparameters (e.g., `UNIT_LINEAR_SCALE`)." + }, + "maxValue": { + "description": "Required if typeis `DOUBLE` or `INTEGER`. This field\nshould be unset if type is `CATEGORICAL`. This value should be integers if\ntype is `INTEGER`.", + "format": "double", + "type": "number" + }, + "type": { + "description": "Required. The type of the parameter.", + "type": "string", + "enumDescriptions": [ + "You must specify a valid type. Using this unspecified type will result in\nan error.", + "Type for real-valued parameters.", + "Type for integral parameters.", + "The parameter is categorical, with a value chosen from the categories\nfield.", + "The parameter is real valued, with a fixed set of feasible points. If\n`type==DISCRETE`, feasible_points must be provided, and\n{`min_value`, `max_value`} will be ignored." + ], + "enum": [ + "PARAMETER_TYPE_UNSPECIFIED", + "DOUBLE", + "INTEGER", + "CATEGORICAL", + "DISCRETE" + ] + }, + "categoricalValues": { + "description": "Required if type is `CATEGORICAL`. The list of possible categories.", + "type": "array", + "items": { + "type": "string" + } + }, + "parameterName": { + "description": "Required. The parameter name must be unique amongst all ParameterConfigs in\na HyperparameterSpec message. E.g., \"learning_rate\".", "type": "string" } }, - "id": "GoogleRpc__Status" + "id": "GoogleCloudMlV1beta1__ParameterSpec" }, - "GoogleCloudMlV1beta1__CancelJobRequest": { - "description": "Request message for the CancelJob method.", - "type": "object", - "properties": {}, - "id": "GoogleCloudMlV1beta1__CancelJobRequest" - }, - "GoogleCloudMlV1beta1__TrainingOutput": { - "description": "Represents results of a training job.", + "GoogleCloudMlV1beta1__PredictionOutput": { + "description": "Represents results of a prediction job.", "type": "object", "properties": { - "consumedMlUnits": { - "description": "The amount of ML units consumed by the job.", - "type": "number", - "format": "double" + "outputPath": { + "description": "The output Google Cloud Storage location provided at the job creation time.", + "type": "string" }, + "nodeHours": { + "description": "Node hours used by the batch prediction job.", + "format": "double", + "type": "number" + }, + "predictionCount": { + "description": "The number of generated predictions.", + "format": "int64", + "type": "string" + }, + "errorCount": { + "description": "The number of data instances which resulted in errors.", + "format": "int64", + "type": "string" + } + }, + "id": "GoogleCloudMlV1beta1__PredictionOutput" + }, + "GoogleCloudMlV1beta1__TrainingOutput": { + "properties": { "completedTrialCount": { - "description": "The number of hyperparameter tuning trials that completed successfully.", - "type": "string", - "format": "int64" + "description": "The number of hyperparameter tuning trials that completed successfully.\nOnly set for hyperparameter tuning jobs.", + "format": "int64", + "type": "string" + }, + "isHyperparameterTuningJob": { + "description": "Whether this job is a hyperparameter tuning job.", + "type": "boolean" + }, + "consumedMLUnits": { + "description": "The amount of ML units consumed by the job.", + "format": "double", + "type": "number" }, "trials": { - "description": "Results for individual Hyperparameter trials.", + "description": "Results for individual Hyperparameter trials.\nOnly set for hyperparameter tuning jobs.", "type": "array", "items": { "$ref": "GoogleCloudMlV1beta1__HyperparameterOutput" } } }, - "id": "GoogleCloudMlV1beta1__TrainingOutput" + "id": "GoogleCloudMlV1beta1__TrainingOutput", + "description": "Represents results of a training job. Output only.", + "type": "object" }, - "GoogleLongrunning__ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "type": "array", - "items": { - "$ref": "GoogleLongrunning__Operation" - } - } - }, - "id": "GoogleLongrunning__ListOperationsResponse" - }, - "GoogleCloudMlV1beta1__PredictionOutput": { - "description": "Represents results of a prediction job.", - "type": "object", - "properties": { - "errorCount": { - "description": "The number of data instances which resulted in errors.", - "type": "string", - "format": "int64" - }, - "predictionCount": { - "description": "The number of generated predictions.", - "type": "string", - "format": "int64" - }, - "outputPath": { - "description": "The output Google Cloud Storage location provided at the job creation time.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__PredictionOutput" - }, - "GoogleCloudMlV1beta1__HyperparameterSpec": { - "description": "Represents a set of hyperparameters to optimize.", - "type": "object", - "properties": { - "maxParallelTrials": { - "description": "Optional. The number of training trials to run concurrently.\nYou can reduce the time it takes to perform hyperparameter tuning by adding\ntrials in parallel. However, each trail only benefits from the information\ngained in completed trials. That means that a trial does not get access to\nthe results of trials running at the same time, which could reduce the\nquality of the overall optimization.\n\nEach trial will use the same scale tier and machine types.\n\nDefaults to one.", - "type": "integer", - "format": "int32" - }, - "maxTrials": { - "description": "Optional. How many training trials should be attempted to optimize\nthe specified hyperparameters.\n\nDefaults to one.", - "type": "integer", - "format": "int32" - }, - "goal": { - "description": "Required. The type of goal to use for tuning. Available types are\n`MAXIMIZE` and `MINIMIZE`.\n\nDefaults to `MAXIMIZE`.", - "enum": [ - "GOAL_TYPE_UNSPECIFIED", - "MAXIMIZE", - "MINIMIZE" - ], - "enumDescriptions": [ - "Goal Type will default to maximize.", - "Maximize the goal metric.", - "Minimize the goal metric." - ], - "type": "string" - }, - "params": { - "description": "Required. The set of parameters to tune.", - "type": "array", - "items": { - "$ref": "GoogleCloudMlV1beta1__ParameterSpec" - } - } - }, - "id": "GoogleCloudMlV1beta1__HyperparameterSpec" - }, - "GoogleProtobuf__Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "GoogleProtobuf__Empty" - }, - "GoogleCloudMlV1beta1__PredictionInput": { - "description": "Represents input parameters for a prediction job.", - "type": "object", - "properties": { - "modelName": { - "description": "Use this field if you want to use the default version for the specified\nmodel. The string must use the following format:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003e[YOUR_MODEL]\u003c/var\u003e\"`", - "type": "string" - }, - "outputPath": { - "description": "Required. The output Google Cloud Storage location.", - "type": "string" - }, - "inputPaths": { - "description": "Required. The Google Cloud Storage location of the input data files.\nMay contain wildcards.", - "type": "array", - "items": { - "type": "string" - } - }, - "dataFormat": { - "description": "Required. The format of the input data files.", - "enum": [ - "DATA_FORMAT_UNSPECIFIED", - "TEXT", - "TF_RECORD", - "TF_RECORD_GZIP" - ], - "enumDescriptions": [ - "Unspecified format.", - "The source file is a text file with instances separated by the\nnew-line character.", - "The source file is a TFRecord file.", - "The source file is a GZIP-compressed TFRecord file." - ], - "type": "string" - }, - "maxWorkerCount": { - "description": "Optional. The maximum number of workers to be used for parallel processing.\nDefaults to 10 if not specified.", - "type": "string", - "format": "int64" - }, - "versionName": { - "description": "Use this field if you want to specify a version of the model to use. The\nstring is formatted the same way as `model_version`, with the addition\nof the version information:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003eYOUR_MODEL/versions/\u003cvar\u003e[YOUR_VERSION]\u003c/var\u003e\"`", - "type": "string" - }, - "region": { - "description": "Required. The Google Compute Engine region to run the prediction job in.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__PredictionInput" - }, - "GoogleCloudMlV1beta1__ListJobsResponse": { - "description": "Response message for the ListJobs method.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", - "type": "string" - }, - "jobs": { - "description": "The list of jobs.", - "type": "array", - "items": { - "$ref": "GoogleCloudMlV1beta1__Job" - } - } - }, - "id": "GoogleCloudMlV1beta1__ListJobsResponse" - }, - "GoogleCloudMlV1beta1__SetDefaultVersionRequest": { - "description": "Request message for the SetDefaultVersion request.", - "type": "object", - "properties": {}, - "id": "GoogleCloudMlV1beta1__SetDefaultVersionRequest" - }, - "GoogleCloudMlV1beta1__TrainingInput": { - "description": "Represents input parameters for a training job.", - "type": "object", - "properties": { - "args": { - "description": "Optional. Command line arguments to pass to the program.", - "type": "array", - "items": { - "type": "string" - } - }, - "workerType": { - "description": "Optional. Specifies the type of virtual machine to use for your training\njob's worker nodes.\n\nThe supported values are the same as those described in the entry for\n`masterType`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`workerCount` is greater than zero.", - "type": "string" - }, - "workerCount": { - "description": "Optional. The number of worker replicas to use for the training job. Each\nreplica in the cluster will be of the type specified in `worker_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`. If you\nset this value, you must also set `worker_type`.", - "type": "string", - "format": "int64" - }, - "packageUris": { - "description": "Required. The Google Cloud Storage location of the packages with\nthe training program and any additional dependencies.", - "type": "array", - "items": { - "type": "string" - } - }, - "hyperparameters": { - "description": "Optional. The set of Hyperparameters to tune.", - "$ref": "GoogleCloudMlV1beta1__HyperparameterSpec" - }, - "masterType": { - "description": "Optional. Specifies the type of virtual machine to use for your training\njob's master worker.\n\nThe following types are supported:\n\n\u003cdl\u003e\n \u003cdt\u003estandard\u003c/dt\u003e\n \u003cdd\u003e\n A basic machine configuration suitable for training simple models with\n small to moderate datasets.\n \u003c/dd\u003e\n \u003cdt\u003elarge_model\u003c/dt\u003e\n \u003cdd\u003e\n A machine with a lot of memory, specially suited for parameter servers\n when your model is large (having many hidden layers or layers with very\n large numbers of nodes).\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_s\u003c/dt\u003e\n \u003cdd\u003e\n A machine suitable for the master and workers of the cluster when your\n model requires more computation than the standard machine can handle\n satisfactorily.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_m\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_s\u003c/code\u003e.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_l\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_m\u003c/code\u003e.\n \u003c/dd\u003e\n\u003c/dl\u003e\n\nYou must set this value when `scaleTier` is set to `CUSTOM`.", - "type": "string" - }, - "parameterServerCount": { - "description": "Optional. The number of parameter server replicas to use for the training\njob. Each replica in the cluster will be of the type specified in\n`parameter_server_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`.If you\nset this value, you must also set `parameter_server_type`.", - "type": "string", - "format": "int64" - }, - "region": { - "description": "Required. The Google Compute Engine region to run the training job in.", - "type": "string" - }, - "parameterServerType": { - "description": "Optional. Specifies the type of virtual machine to use for your training\njob's parameter server.\n\nThe supported values are the same as those described in the entry for\n`master_type`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`parameter_server_count` is greater than zero.", - "type": "string" - }, - "scaleTier": { - "description": "Required. Specifies the machine types, the number of replicas for workers\nand parameter servers.", - "enum": [ - "BASIC", - "STANDARD_1", - "PREMIUM_1", - "CUSTOM" - ], - "enumDescriptions": [ - "A single worker instance. This tier is suitable for learning how to use\nCloud ML, and for experimenting with new models using small datasets.", - "Many workers and a few parameter servers.", - "A large number of workers with many parameter servers.", - "The CUSTOM tier is not a set tier, but rather enables you to use your\nown cluster specification. When you use this tier, set values to\nconfigure your processing cluster according to these guidelines:\n\n* You _must_ set `TrainingInput.masterType` to specify the type\n of machine to use for your master node. This is the only required\n setting.\n\n* You _may_ set `TrainingInput.workerCount` to specify the number of\n workers to use. If you specify one or more workers, you _must_ also\n set `TrainingInput.workerType` to specify the type of machine to use\n for your worker nodes.\n\n* You _may_ set `TrainingInput.parameterServerCount` to specify the\n number of parameter servers to use. If you specify one or more\n parameter servers, you _must_ also set\n `TrainingInput.parameterServerType` to specify the type of machine to\n use for your parameter servers.\n\nNote that all of your workers must use the same machine type, which can\nbe different from your parameter server type and master type. Your\nparameter servers must likewise use the same machine type, which can be\ndifferent from your worker type and master type." - ], - "type": "string" - }, - "pythonModule": { - "description": "Required. The Python module name to run after installing the packages.", - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__TrainingInput" - }, - "GoogleCloudMlV1beta1__Version": { - "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).", + "GoogleCloudMlV1__Version": { + "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.versions/list).", "type": "object", "properties": { "description": { @@ -1093,33 +171,181 @@ "type": "string" }, "deploymentUri": { - "description": "Required. The Google Cloud Storage location of the trained model used to\ncreate the version. See the\n[overview of model deployment](/ml/docs/concepts/deployment-overview) for\nmore informaiton.\n\nWhen passing Version to\n[projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)\nthe model service uses the specified location as the source of the model.\nOnce deployed, the model version is hosted by the prediction service, so\nthis location is useful only as a historical record.", + "description": "Required. The Google Cloud Storage location of the trained model used to\ncreate the version. See the\n[overview of model\ndeployment](/ml-engine/docs/concepts/deployment-overview) for more\ninformaiton.\n\nWhen passing Version to\n[projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.versions/create)\nthe model service uses the specified location as the source of the model.\nOnce deployed, the model version is hosted by the prediction service, so\nthis location is useful only as a historical record.\nThe total number of model files can't exceed 1000.", "type": "string" }, + "isDefault": { + "type": "boolean", + "description": "Output only. If true, this version will be used to handle prediction\nrequests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.models.versions/setDefault)." + }, "createTime": { "description": "Output only. The time the version was created.", - "type": "string", - "format": "google-datetime" + "format": "google-datetime", + "type": "string" }, - "lastUseTime": { - "description": "Output only. The time the version was last used for prediction.", - "type": "string", - "format": "google-datetime" + "manualScaling": { + "$ref": "GoogleCloudMlV1__ManualScaling", + "description": "Optional. Manually select the number of nodes to use for serving the\nmodel. If unset (i.e., by default), the number of nodes used to serve\nthe model automatically scales with traffic. However, care should be\ntaken to ramp up traffic according to the model's ability to scale. If\nyour model needs to handle bursts of traffic beyond it's ability to\nscale, it is recommended you set this field appropriately." }, "name": { "description": "Required.The name specified for the version when it was created.\n\nThe version name must be unique within the model it is created in.", "type": "string" }, - "isDefault": { - "description": "Output only. If true, this version will be used to handle prediction\nrequests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).", + "lastUseTime": { + "type": "string", + "description": "Output only. The time the version was last used for prediction.", + "format": "google-datetime" + }, + "runtimeVersion": { + "description": "Optional. The Google Cloud ML runtime version to use for this deployment.\nIf not set, Google Cloud ML will choose a version.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1__Version" + }, + "GoogleCloudMlV1beta1__HyperparameterSpec": { + "description": "Represents a set of hyperparameters to optimize.", + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "$ref": "GoogleCloudMlV1beta1__ParameterSpec" + }, + "description": "Required. The set of parameters to tune." + }, + "maxTrials": { + "description": "Optional. How many training trials should be attempted to optimize\nthe specified hyperparameters.\n\nDefaults to one.", + "format": "int32", + "type": "integer" + }, + "maxParallelTrials": { + "description": "Optional. The number of training trials to run concurrently.\nYou can reduce the time it takes to perform hyperparameter tuning by adding\ntrials in parallel. However, each trail only benefits from the information\ngained in completed trials. That means that a trial does not get access to\nthe results of trials running at the same time, which could reduce the\nquality of the overall optimization.\n\nEach trial will use the same scale tier and machine types.\n\nDefaults to one.", + "format": "int32", + "type": "integer" + }, + "goal": { + "description": "Required. The type of goal to use for tuning. Available types are\n`MAXIMIZE` and `MINIMIZE`.\n\nDefaults to `MAXIMIZE`.", + "type": "string", + "enumDescriptions": [ + "Goal Type will default to maximize.", + "Maximize the goal metric.", + "Minimize the goal metric." + ], + "enum": [ + "GOAL_TYPE_UNSPECIFIED", + "MAXIMIZE", + "MINIMIZE" + ] + }, + "hyperparameterMetricTag": { + "description": "Optional. The Tensorflow summary tag name to use for optimizing trials. For\ncurrent versions of Tensorflow, this tag name should exactly match what is\nshown in Tensorboard, including all scopes. For versions of Tensorflow\nprior to 0.12, this should be only the tag passed to tf.Summary.\nBy default, \"training/hptuning/metric\" will be used.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1beta1__HyperparameterSpec" + }, + "GoogleCloudMlV1beta1__OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "type": "object", + "properties": { + "createTime": { + "description": "The time the operation was submitted.", + "format": "google-datetime", + "type": "string" + }, + "modelName": { + "description": "Contains the name of the model associated with the operation.", + "type": "string" + }, + "version": { + "$ref": "GoogleCloudMlV1beta1__Version", + "description": "Contains the version associated with the operation." + }, + "endTime": { + "type": "string", + "description": "The time operation processing completed.", + "format": "google-datetime" + }, + "operationType": { + "enumDescriptions": [ + "Unspecified operation type.", + "An operation to create a new version.", + "An operation to delete an existing version.", + "An operation to delete an existing model." + ], + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "CREATE_VERSION", + "DELETE_VERSION", + "DELETE_MODEL" + ], + "description": "The operation type.", + "type": "string" + }, + "startTime": { + "description": "The time operation processing started.", + "format": "google-datetime", + "type": "string" + }, + "isCancellationRequested": { + "description": "Indicates whether a request to cancel this operation has been made.", "type": "boolean" } }, - "id": "GoogleCloudMlV1beta1__Version" + "id": "GoogleCloudMlV1beta1__OperationMetadata" + }, + "GoogleCloudMlV1__OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "type": "object", + "properties": { + "createTime": { + "description": "The time the operation was submitted.", + "format": "google-datetime", + "type": "string" + }, + "modelName": { + "description": "Contains the name of the model associated with the operation.", + "type": "string" + }, + "version": { + "$ref": "GoogleCloudMlV1__Version", + "description": "Contains the version associated with the operation." + }, + "endTime": { + "description": "The time operation processing completed.", + "format": "google-datetime", + "type": "string" + }, + "operationType": { + "enumDescriptions": [ + "Unspecified operation type.", + "An operation to create a new version.", + "An operation to delete an existing version.", + "An operation to delete an existing model." + ], + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "CREATE_VERSION", + "DELETE_VERSION", + "DELETE_MODEL" + ], + "description": "The operation type.", + "type": "string" + }, + "startTime": { + "description": "The time operation processing started.", + "format": "google-datetime", + "type": "string" + }, + "isCancellationRequested": { + "type": "boolean", + "description": "Indicates whether a request to cancel this operation has been made." + } + }, + "id": "GoogleCloudMlV1__OperationMetadata" }, "GoogleCloudMlV1beta1__ListModelsResponse": { - "description": "Response message for the ListModels method.", - "type": "object", "properties": { "models": { "description": "The list of models.", @@ -1133,171 +359,1126 @@ "type": "string" } }, - "id": "GoogleCloudMlV1beta1__ListModelsResponse" + "id": "GoogleCloudMlV1beta1__ListModelsResponse", + "description": "Response message for the ListModels method.", + "type": "object" }, - "GoogleCloudMlV1beta1__OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", + "GoogleLongrunning__Operation": { + "id": "GoogleLongrunning__Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { - "modelName": { - "description": "Contains the name of the model associated with the operation.", - "type": "string" + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } }, - "isCancellationRequested": { - "description": "Indicates whether a request to cancel this operation has been made.", + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" }, - "endTime": { - "description": "The time operation processing completed.", + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { "type": "string", - "format": "google-datetime" + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`." }, - "createTime": { - "description": "The time the operation was submitted.", + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "GoogleRpc__Status" + } + } + }, + "GoogleCloudMlV1beta1__HyperparameterOutput": { + "id": "GoogleCloudMlV1beta1__HyperparameterOutput", + "description": "Represents the result of a single hyperparameter tuning trial from a\ntraining job. The TrainingOutput object that is returned on successful\ncompletion of a training job with hyperparameter tuning includes a list\nof HyperparameterOutput objects, one for each successful trial.", + "type": "object", + "properties": { + "allMetrics": { + "type": "array", + "items": { + "$ref": "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric" + }, + "description": "All recorded object metrics for this trial." + }, + "finalMetric": { + "description": "The final objective metric seen for this trial.", + "$ref": "GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric" + }, + "hyperparameters": { + "additionalProperties": { + "type": "string" + }, + "description": "The hyperparameters given to this trial.", + "type": "object" + }, + "trialId": { "type": "string", - "format": "google-datetime" + "description": "The trial id for these results." + } + } + }, + "GoogleProtobuf__Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "GoogleProtobuf__Empty" + }, + "GoogleCloudMlV1beta1__ManualScaling": { + "description": "Options for manually scaling a model.", + "type": "object", + "properties": { + "nodes": { + "description": "The number of nodes to allocate for this model. These nodes are always up,\nstarting from the time the model is deployed, so the cost of operating\nthis model will be proportional to nodes * number of hours since\ndeployment.", + "format": "int32", + "type": "integer" + } + }, + "id": "GoogleCloudMlV1beta1__ManualScaling" + }, + "GoogleRpc__Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } }, - "startTime": { - "description": "The time operation processing started.", - "type": "string", - "format": "google-datetime" + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" }, - "version": { - "description": "Contains the version associated with the operation.", - "$ref": "GoogleCloudMlV1beta1__Version" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE_VERSION", - "DELETE_VERSION", - "DELETE_MODEL" - ], - "enumDescriptions": [ - "Unspecified operation type.", - "An operation to create a new version.", - "An operation to delete an existing version.", - "An operation to delete an existing model." - ], + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" } }, - "id": "GoogleCloudMlV1beta1__OperationMetadata" + "id": "GoogleRpc__Status" }, - "GoogleCloudMlV1beta1__ParameterSpec": { - "description": "Represents a single hyperparameter to optimize.", + "GoogleCloudMlV1beta1__PredictRequest": { "type": "object", "properties": { - "parameterName": { - "description": "Required. The parameter name must be unique amongst all ParameterConfigs in\na HyperparameterSpec message. E.g., \"learning_rate\".", + "httpBody": { + "$ref": "GoogleApi__HttpBody", + "description": "\nRequired. The prediction request body." + } + }, + "id": "GoogleCloudMlV1beta1__PredictRequest", + "description": "Request for predictions to be issued against a trained model.\n\nThe body of the request is a single JSON object with a single top-level\nfield:\n\n\u003cdl\u003e\n \u003cdt\u003einstances\u003c/dt\u003e\n \u003cdd\u003eA JSON array containing values representing the instances to use for\n prediction.\u003c/dd\u003e\n\u003c/dl\u003e\n\nThe structure of each element of the instances list is determined by your\nmodel's input definition. Instances can include named inputs or can contain\nonly unlabeled values.\n\nNot all data includes named inputs. Some instances will be simple\nJSON values (boolean, number, or string). However, instances are often lists\nof simple values, or complex nested lists. Here are some examples of request\nbodies:\n\nCSV data with each row encoded as a string value:\n\u003cpre\u003e\n{\"instances\": [\"1.0,true,\\\\\"x\\\\\"\", \"-2.0,false,\\\\\"y\\\\\"\"]}\n\u003c/pre\u003e\nPlain text:\n\u003cpre\u003e\n{\"instances\": [\"the quick brown fox\", \"la bruja le dio\"]}\n\u003c/pre\u003e\nSentences encoded as lists of words (vectors of strings):\n\u003cpre\u003e\n{\n \"instances\": [\n [\"the\",\"quick\",\"brown\"],\n [\"la\",\"bruja\",\"le\"],\n ...\n ]\n}\n\u003c/pre\u003e\nFloating point scalar values:\n\u003cpre\u003e\n{\"instances\": [0.0, 1.1, 2.2]}\n\u003c/pre\u003e\nVectors of integers:\n\u003cpre\u003e\n{\n \"instances\": [\n [0, 1, 2],\n [3, 4, 5],\n ...\n ]\n}\n\u003c/pre\u003e\nTensors (in this case, two-dimensional tensors):\n\u003cpre\u003e\n{\n \"instances\": [\n [\n [0, 1, 2],\n [3, 4, 5]\n ],\n ...\n ]\n}\n\u003c/pre\u003e\nImages can be represented different ways. In this encoding scheme the first\ntwo dimensions represent the rows and columns of the image, and the third\ncontains lists (vectors) of the R, G, and B values for each pixel.\n\u003cpre\u003e\n{\n \"instances\": [\n [\n [\n [138, 30, 66],\n [130, 20, 56],\n ...\n ],\n [\n [126, 38, 61],\n [122, 24, 57],\n ...\n ],\n ...\n ],\n ...\n ]\n}\n\u003c/pre\u003e\nJSON strings must be encoded as UTF-8. To send binary data, you must\nbase64-encode the data and mark it as binary. To mark a JSON string\nas binary, replace it with a JSON object with a single attribute named `b64`:\n\u003cpre\u003e{\"b64\": \"...\"} \u003c/pre\u003e\nFor example:\n\nTwo Serialized tf.Examples (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"X5ad6u\"}, {\"b64\": \"IA9j4nx\"}]}\n\u003c/pre\u003e\nTwo JPEG image byte strings (fake data, for illustrative purposes only):\n\u003cpre\u003e\n{\"instances\": [{\"b64\": \"ASa8asdf\"}, {\"b64\": \"JLK7ljk3\"}]}\n\u003c/pre\u003e\nIf your data includes named references, format each instance as a JSON object\nwith the named references as the keys:\n\nJSON input data to be preprocessed:\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"a\": 1.0,\n \"b\": true,\n \"c\": \"x\"\n },\n {\n \"a\": -2.0,\n \"b\": false,\n \"c\": \"y\"\n }\n ]\n}\n\u003c/pre\u003e\nSome models have an underlying TensorFlow graph that accepts multiple input\ntensors. In this case, you should use the names of JSON name/value pairs to\nidentify the input tensors, as shown in the following exmaples:\n\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(base64-encoded string):\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"tag\": \"beach\",\n \"image\": {\"b64\": \"ASa8asdf\"}\n },\n {\n \"tag\": \"car\",\n \"image\": {\"b64\": \"JLK7ljk3\"}\n }\n ]\n}\n\u003c/pre\u003e\nFor a graph with input tensor aliases \"tag\" (string) and \"image\"\n(3-dimensional array of 8-bit ints):\n\u003cpre\u003e\n{\n \"instances\": [\n {\n \"tag\": \"beach\",\n \"image\": [\n [\n [138, 30, 66],\n [130, 20, 56],\n ...\n ],\n [\n [126, 38, 61],\n [122, 24, 57],\n ...\n ],\n ...\n ]\n },\n {\n \"tag\": \"car\",\n \"image\": [\n [\n [255, 0, 102],\n [255, 0, 97],\n ...\n ],\n [\n [254, 1, 101],\n [254, 2, 93],\n ...\n ],\n ...\n ]\n },\n ...\n ]\n}\n\u003c/pre\u003e\nIf the call is successful, the response body will contain one prediction\nentry per instance in the request body. If prediction fails for any\ninstance, the response body will contain no predictions and will contian\na single error entry instead." + }, + "GoogleApi__HttpBody": { + "type": "object", + "properties": { + "data": { + "description": "HTTP body binary data.", + "format": "byte", "type": "string" }, - "maxValue": { - "description": "Required if typeis `DOUBLE` or `INTEGER`. This field\nshould be unset if type is `CATEGORICAL`. This value should be integers if\ntype is `INTEGER`.", - "type": "number", - "format": "double" + "contentType": { + "description": "The HTTP Content-Type string representing the content type of the body.", + "type": "string" + } + }, + "id": "GoogleApi__HttpBody", + "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged." + }, + "GoogleCloudMlV1beta1__PredictionInput": { + "description": "Represents input parameters for a prediction job.", + "type": "object", + "properties": { + "region": { + "description": "Required. The Google Compute Engine region to run the prediction job in.", + "type": "string" }, - "categoricalValues": { - "description": "Required if type is `CATEGORICAL`. The list of possible categories.", + "versionName": { + "description": "Use this field if you want to specify a version of the model to use. The\nstring is formatted the same way as `model_version`, with the addition\nof the version information:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003eYOUR_MODEL/versions/\u003cvar\u003e[YOUR_VERSION]\u003c/var\u003e\"`", + "type": "string" + }, + "modelName": { + "description": "Use this field if you want to use the default version for the specified\nmodel. The string must use the following format:\n\n`\"projects/\u003cvar\u003e[YOUR_PROJECT]\u003c/var\u003e/models/\u003cvar\u003e[YOUR_MODEL]\u003c/var\u003e\"`", + "type": "string" + }, + "outputPath": { + "description": "Required. The output Google Cloud Storage location.", + "type": "string" + }, + "maxWorkerCount": { + "description": "Optional. The maximum number of workers to be used for parallel processing.\nDefaults to 10 if not specified.", + "format": "int64", + "type": "string" + }, + "uri": { + "description": "Use this field if you want to specify a Google Cloud Storage path for\nthe model to use.", + "type": "string" + }, + "dataFormat": { + "description": "Required. The format of the input data files.", + "type": "string", + "enumDescriptions": [ + "Unspecified format.", + "The source file is a text file with instances separated by the\nnew-line character.", + "The source file is a TFRecord file.", + "The source file is a GZIP-compressed TFRecord file." + ], + "enum": [ + "DATA_FORMAT_UNSPECIFIED", + "TEXT", + "TF_RECORD", + "TF_RECORD_GZIP" + ] + }, + "runtimeVersion": { + "description": "Optional. The Google Cloud ML runtime version to use for this batch\nprediction. If not set, Google Cloud ML will pick the runtime version used\nduring the CreateVersion request for this model version, or choose the\nlatest stable version when model version information is not available\nsuch as when the model is specified by uri.", + "type": "string" + }, + "inputPaths": { + "description": "Required. The Google Cloud Storage location of the input data files.\nMay contain wildcards.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "GoogleCloudMlV1beta1__PredictionInput" + }, + "GoogleCloudMlV1beta1__ListVersionsResponse": { + "description": "Response message for the ListVersions method.", + "type": "object", + "properties": { + "versions": { + "description": "The list of versions.", + "type": "array", + "items": { + "$ref": "GoogleCloudMlV1beta1__Version" + } + }, + "nextPageToken": { + "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1beta1__ListVersionsResponse" + }, + "GoogleCloudMlV1beta1__Version": { + "properties": { + "lastUseTime": { + "description": "Output only. The time the version was last used for prediction.", + "format": "google-datetime", + "type": "string" + }, + "runtimeVersion": { + "description": "Optional. The Google Cloud ML runtime version to use for this deployment.\nIf not set, Google Cloud ML will choose a version.", + "type": "string" + }, + "description": { + "description": "Optional. The description specified for the version when it was created.", + "type": "string" + }, + "deploymentUri": { + "description": "Required. The Google Cloud Storage location of the trained model used to\ncreate the version. See the\n[overview of model\ndeployment](/ml-engine/docs/concepts/deployment-overview) for more\ninformaiton.\n\nWhen passing Version to\n[projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create)\nthe model service uses the specified location as the source of the model.\nOnce deployed, the model version is hosted by the prediction service, so\nthis location is useful only as a historical record.\nThe total number of model files can't exceed 1000.", + "type": "string" + }, + "isDefault": { + "type": "boolean", + "description": "Output only. If true, this version will be used to handle prediction\nrequests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault)." + }, + "createTime": { + "description": "Output only. The time the version was created.", + "format": "google-datetime", + "type": "string" + }, + "manualScaling": { + "$ref": "GoogleCloudMlV1beta1__ManualScaling", + "description": "Optional. Manually select the number of nodes to use for serving the\nmodel. If unset (i.e., by default), the number of nodes used to serve\nthe model automatically scales with traffic. However, care should be\ntaken to ramp up traffic according to the model's ability to scale. If\nyour model needs to handle bursts of traffic beyond it's ability to\nscale, it is recommended you set this field appropriately." + }, + "name": { + "description": "Required.The name specified for the version when it was created.\n\nThe version name must be unique within the model it is created in.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1beta1__Version", + "description": "Represents a version of the model.\n\nEach version is a trained model deployed in the cloud, ready to handle\nprediction requests. A model can have multiple versions. You can get\ninformation about all of the versions of a given model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).", + "type": "object" + }, + "GoogleCloudMlV1beta1__ListJobsResponse": { + "description": "Response message for the ListJobs method.", + "type": "object", + "properties": { + "jobs": { + "description": "The list of jobs.", + "type": "array", + "items": { + "$ref": "GoogleCloudMlV1beta1__Job" + } + }, + "nextPageToken": { + "description": "Optional. Pass this token as the `page_token` field of the request for a\nsubsequent call.", + "type": "string" + } + }, + "id": "GoogleCloudMlV1beta1__ListJobsResponse" + }, + "GoogleCloudMlV1beta1__CancelJobRequest": { + "description": "Request message for the CancelJob method.", + "type": "object", + "properties": {}, + "id": "GoogleCloudMlV1beta1__CancelJobRequest" + }, + "GoogleCloudMlV1beta1__Model": { + "type": "object", + "properties": { + "regions": { + "description": "Optional. The list of regions where the model is going to be deployed.\nCurrently only one region per model is supported.\nDefaults to 'us-central1' if nothing is set.\nNote:\n* No matter where a model is deployed, it can always be accessed by\n users from anywhere, both for online and batch prediction.\n* The region for a batch prediction job is set by the region field when\n submitting the batch prediction job and does not take its value from\n this field.", "type": "array", "items": { "type": "string" } }, - "minValue": { - "description": "Required if type is `DOUBLE` or `INTEGER`. This field\nshould be unset if type is `CATEGORICAL`. This value should be integers if\ntype is INTEGER.", - "type": "number", - "format": "double" - }, - "scaleType": { - "description": "Optional. How the parameter should be scaled to the hypercube.\nLeave unset for categorical parameters.\nSome kind of scaling is strongly recommended for real or integral\nparameters (e.g., `UNIT_LINEAR_SCALE`).", - "enum": [ - "NONE", - "UNIT_LINEAR_SCALE", - "UNIT_LOG_SCALE", - "UNIT_REVERSE_LOG_SCALE" - ], - "enumDescriptions": [ - "By default, no scaling is applied.", - "Scales the feasible space to (0, 1) linearly.", - "Scales the feasible space logarithmically to (0, 1). The entire feasible\nspace must be strictly positive.", - "Scales the feasible space \"reverse\" logarithmically to (0, 1). The result\nis that values close to the top of the feasible space are spread out more\nthan points near the bottom. The entire feasible space must be strictly\npositive." - ], + "name": { + "description": "Required. The name specified for the model when it was created.\n\nThe model name must be unique within the project it is created in.", "type": "string" }, - "discreteValues": { - "description": "Required if type is `DISCRETE`.\nA list of feasible points.\nThe list should be in strictly increasing order. For instance, this\nparameter might have possible settings of 1.5, 2.5, and 4.0. This list\nshould not contain more than 1,000 values.", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "type": { - "description": "Required. The type of the parameter.", - "enum": [ - "PARAMETER_TYPE_UNSPECIFIED", - "DOUBLE", - "INTEGER", - "CATEGORICAL", - "DISCRETE" - ], - "enumDescriptions": [ - "You must specify a valid type. Using this unspecified type will result in\nan error.", - "Type for real-valued parameters.", - "Type for integral parameters.", - "The parameter is categorical, with a value chosen from the categories\nfield.", - "The parameter is real valued, with a fixed set of feasible points. If\n`type==DISCRETE`, feasible_points must be provided, and\n{`min_value`, `max_value`} will be ignored." - ], - "type": "string" - } - }, - "id": "GoogleCloudMlV1beta1__ParameterSpec" - }, - "GoogleCloudMlV1beta1__Model": { - "description": "Represents a machine learning solution.\n\nA model can have multiple versions, each of which is a deployed, trained\nmodel ready to receive prediction requests. The model itself is just a\ncontainer.", - "type": "object", - "properties": { "description": { "description": "Optional. The description specified for the model when it was created.", "type": "string" }, - "defaultVersion": { - "description": "Output only. The default version of the model. This version will be used to\nhandle prediction requests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).", - "$ref": "GoogleCloudMlV1beta1__Version" + "onlinePredictionLogging": { + "description": "Optional. If true, enables StackDriver Logging for online prediction.\nDefault is false.", + "type": "boolean" }, - "name": { - "description": "Required. The name specified for the model when it was created.\n\nThe model name must be unique within the project it is created in.", + "defaultVersion": { + "description": "Output only. The default version of the model. This version will be used to\nhandle prediction requests that do not specify a version.\n\nYou can change the default version by calling\n[projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).", + "$ref": "GoogleCloudMlV1beta1__Version" + } + }, + "id": "GoogleCloudMlV1beta1__Model", + "description": "Represents a machine learning solution.\n\nA model can have multiple versions, each of which is a deployed, trained\nmodel ready to receive prediction requests. The model itself is just a\ncontainer." + }, + "GoogleCloudMlV1beta1__Job": { + "id": "GoogleCloudMlV1beta1__Job", + "description": "Represents a training or prediction job.", + "type": "object", + "properties": { + "errorMessage": { + "description": "Output only. The details of a failure or a cancellation.", + "type": "string" + }, + "jobId": { + "description": "Required. The user-specified id of the job.", + "type": "string" + }, + "endTime": { + "description": "Output only. When the job processing was completed.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "type": "string", + "description": "Output only. When the job processing was started.", + "format": "google-datetime" + }, + "predictionOutput": { + "$ref": "GoogleCloudMlV1beta1__PredictionOutput", + "description": "The current prediction job result." + }, + "trainingOutput": { + "$ref": "GoogleCloudMlV1beta1__TrainingOutput", + "description": "The current training job result." + }, + "createTime": { + "description": "Output only. When the job was created.", + "format": "google-datetime", + "type": "string" + }, + "trainingInput": { + "$ref": "GoogleCloudMlV1beta1__TrainingInput", + "description": "Input parameters to create a training job." + }, + "state": { + "enumDescriptions": [ + "The job state is unspecified.", + "The job has been just created and processing has not yet begun.", + "The service is preparing to run the job.", + "The job is in progress.", + "The job completed successfully.", + "The job failed.\n`error_message` should contain the details of the failure.", + "The job is being cancelled.\n`error_message` should describe the reason for the cancellation.", + "The job has been cancelled.\n`error_message` should describe the reason for the cancellation." + ], + "enum": [ + "STATE_UNSPECIFIED", + "QUEUED", + "PREPARING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLING", + "CANCELLED" + ], + "description": "Output only. The detailed state of a job.", + "type": "string" + }, + "predictionInput": { + "$ref": "GoogleCloudMlV1beta1__PredictionInput", + "description": "Input parameters to create a prediction job." + } + } + }, + "GoogleCloudMlV1beta1__TrainingInput": { + "description": "Represents input parameters for a training job.", + "type": "object", + "properties": { + "pythonModule": { + "description": "Required. The Python module name to run after installing the packages.", + "type": "string" + }, + "workerType": { + "description": "Optional. Specifies the type of virtual machine to use for your training\njob's worker nodes.\n\nThe supported values are the same as those described in the entry for\n`masterType`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`workerCount` is greater than zero.", + "type": "string" + }, + "args": { + "description": "Optional. Command line arguments to pass to the program.", + "type": "array", + "items": { + "type": "string" + } + }, + "region": { + "description": "Required. The Google Compute Engine region to run the training job in.", + "type": "string" + }, + "parameterServerType": { + "description": "Optional. Specifies the type of virtual machine to use for your training\njob's parameter server.\n\nThe supported values are the same as those described in the entry for\n`master_type`.\n\nThis value must be present when `scaleTier` is set to `CUSTOM` and\n`parameter_server_count` is greater than zero.", + "type": "string" + }, + "scaleTier": { + "enumDescriptions": [ + "A single worker instance. This tier is suitable for learning how to use\nCloud ML, and for experimenting with new models using small datasets.", + "Many workers and a few parameter servers.", + "A large number of workers with many parameter servers.", + "A single worker instance [with a GPU](/ml-engine/docs/how-tos/using-gpus).", + "The CUSTOM tier is not a set tier, but rather enables you to use your\nown cluster specification. When you use this tier, set values to\nconfigure your processing cluster according to these guidelines:\n\n* You _must_ set `TrainingInput.masterType` to specify the type\n of machine to use for your master node. This is the only required\n setting.\n\n* You _may_ set `TrainingInput.workerCount` to specify the number of\n workers to use. If you specify one or more workers, you _must_ also\n set `TrainingInput.workerType` to specify the type of machine to use\n for your worker nodes.\n\n* You _may_ set `TrainingInput.parameterServerCount` to specify the\n number of parameter servers to use. If you specify one or more\n parameter servers, you _must_ also set\n `TrainingInput.parameterServerType` to specify the type of machine to\n use for your parameter servers.\n\nNote that all of your workers must use the same machine type, which can\nbe different from your parameter server type and master type. Your\nparameter servers must likewise use the same machine type, which can be\ndifferent from your worker type and master type." + ], + "enum": [ + "BASIC", + "STANDARD_1", + "PREMIUM_1", + "BASIC_GPU", + "CUSTOM" + ], + "description": "Required. Specifies the machine types, the number of replicas for workers\nand parameter servers.", + "type": "string" + }, + "jobDir": { + "type": "string", + "description": "Optional. A Google Cloud Storage path in which to store training outputs\nand other data needed for training. This path is passed to your TensorFlow\nprogram as the 'job_dir' command-line argument. The benefit of specifying\nthis field is that Cloud ML validates the path for use in training." + }, + "hyperparameters": { + "$ref": "GoogleCloudMlV1beta1__HyperparameterSpec", + "description": "Optional. The set of Hyperparameters to tune." + }, + "parameterServerCount": { + "description": "Optional. The number of parameter server replicas to use for the training\njob. Each replica in the cluster will be of the type specified in\n`parameter_server_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`.If you\nset this value, you must also set `parameter_server_type`.", + "format": "int64", + "type": "string" + }, + "packageUris": { + "description": "Required. The Google Cloud Storage location of the packages with\nthe training program and any additional dependencies.\nThe maximum number of package URIs is 100.", + "type": "array", + "items": { + "type": "string" + } + }, + "workerCount": { + "description": "Optional. The number of worker replicas to use for the training job. Each\nreplica in the cluster will be of the type specified in `worker_type`.\n\nThis value can only be used when `scale_tier` is set to `CUSTOM`. If you\nset this value, you must also set `worker_type`.", + "format": "int64", + "type": "string" + }, + "masterType": { + "description": "Optional. Specifies the type of virtual machine to use for your training\njob's master worker.\n\nThe following types are supported:\n\n\u003cdl\u003e\n \u003cdt\u003estandard\u003c/dt\u003e\n \u003cdd\u003e\n A basic machine configuration suitable for training simple models with\n small to moderate datasets.\n \u003c/dd\u003e\n \u003cdt\u003elarge_model\u003c/dt\u003e\n \u003cdd\u003e\n A machine with a lot of memory, specially suited for parameter servers\n when your model is large (having many hidden layers or layers with very\n large numbers of nodes).\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_s\u003c/dt\u003e\n \u003cdd\u003e\n A machine suitable for the master and workers of the cluster when your\n model requires more computation than the standard machine can handle\n satisfactorily.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_m\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_s\u003c/code\u003e.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_l\u003c/dt\u003e\n \u003cdd\u003e\n A machine with roughly twice the number of cores and roughly double the\n memory of \u003ccode suppresswarning=\"true\"\u003ecomplex_model_m\u003c/code\u003e.\n \u003c/dd\u003e\n \u003cdt\u003estandard_gpu\u003c/dt\u003e\n \u003cdd\u003e\n A machine equivalent to \u003ccode suppresswarning=\"true\"\u003estandard\u003c/code\u003e that\n also includes a\n \u003ca href=\"/ml-engine/docs/how-tos/using-gpus\"\u003e\n GPU that you can use in your trainer\u003c/a\u003e.\n \u003c/dd\u003e\n \u003cdt\u003ecomplex_model_m_gpu\u003c/dt\u003e\n \u003cdd\u003e\n A machine equivalent to\n \u003ccode suppresswarning=\"true\"\u003ecomplex_model_m\u003c/code\u003e that also includes\n four GPUs.\n \u003c/dd\u003e\n\u003c/dl\u003e\n\nYou must set this value when `scaleTier` is set to `CUSTOM`.", + "type": "string" + }, + "runtimeVersion": { + "description": "Optional. The Google Cloud ML runtime version to use for training. If not\nset, Google Cloud ML will choose the latest stable version.", "type": "string" } }, - "id": "GoogleCloudMlV1beta1__Model" + "id": "GoogleCloudMlV1beta1__TrainingInput" + }, + "GoogleLongrunning__ListOperationsResponse": { + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "GoogleLongrunning__Operation" + } + } + }, + "id": "GoogleLongrunning__ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object" + }, + "GoogleCloudMlV1beta1__GetConfigResponse": { + "id": "GoogleCloudMlV1beta1__GetConfigResponse", + "description": "Returns service account information associated with a project.", + "type": "object", + "properties": { + "serviceAccountProject": { + "description": "The project number for `service_account`.", + "format": "int64", + "type": "string" + }, + "serviceAccount": { + "description": "The service account Cloud ML uses to access resources in the project.", + "type": "string" + } + } + }, + "GoogleCloudMlV1beta1__SetDefaultVersionRequest": { + "description": "Request message for the SetDefaultVersion request.", + "type": "object", + "properties": {}, + "id": "GoogleCloudMlV1beta1__SetDefaultVersionRequest" } }, - "revision": "20161212", - "basePath": "", + "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", - "canonicalName": "Cloud Machine Learning", - "discoveryVersion": "v1", - "baseUrl": "https://ml.googleapis.com/", + "canonicalName": "Cloud Machine Learning Engine", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://ml.googleapis.com/", + "ownerDomain": "google.com", "name": "ml", + "batchPath": "batch", + "title": "Google Cloud Machine Learning Engine", + "ownerName": "Google", + "resources": { + "projects": { + "methods": { + "getConfig": { + "response": { + "$ref": "GoogleCloudMlV1beta1__GetConfigResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The project name.\n\nAuthorization: requires `Viewer` role on the specified project.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}:getConfig", + "path": "v1beta1/{+name}:getConfig", + "id": "ml.projects.getConfig", + "description": "Get the service account information associated with your project. You need\nthis information in order to grant the service account persmissions for\nthe Google Cloud Storage location where you put your model training code\nfor training the model with Google Cloud Machine Learning." + }, + "predict": { + "description": "Performs prediction on the data in the request.\n\n**** REMOVE FROM GENERATED DOCUMENTATION", + "request": { + "$ref": "GoogleCloudMlV1beta1__PredictRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleApi__HttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "Required. The resource name of a model or a version.\n\nAuthorization: requires `Viewer` role on the parent project.", + "required": true, + "type": "string", + "pattern": "^projects/.+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}:predict", + "id": "ml.projects.predict", + "path": "v1beta1/{+name}:predict" + } + }, + "resources": { + "jobs": { + "methods": { + "cancel": { + "description": "Cancels a running job.", + "request": { + "$ref": "GoogleCloudMlV1beta1__CancelJobRequest" + }, + "response": { + "$ref": "GoogleProtobuf__Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "Required. The name of the job to cancel.\n\nAuthorization: requires `Editor` role on the parent project.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/jobs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/jobs/{jobsId}:cancel", + "path": "v1beta1/{+name}:cancel", + "id": "ml.projects.jobs.cancel" + }, + "list": { + "flatPath": "v1beta1/projects/{projectsId}/jobs", + "path": "v1beta1/{+parent}/jobs", + "id": "ml.projects.jobs.list", + "description": "Lists the jobs in the project.", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "GoogleCloudMlV1beta1__ListJobsResponse" + }, + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "location": "path", + "description": "Required. The name of the project for which to list jobs.\n\nAuthorization: requires `Viewer` role on the specified project.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + }, + "filter": { + "description": "Optional. Specifies the subset of jobs to retrieve.", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "Optional. The number of jobs to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", + "format": "int32", + "type": "integer", + "location": "query" + } + } + }, + "get": { + "description": "Describes a job.", + "response": { + "$ref": "GoogleCloudMlV1beta1__Job" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/jobs/[^/]+$", + "location": "path", + "description": "Required. The name of the job to get the description of.\n\nAuthorization: requires `Viewer` role on the parent project.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/jobs/{jobsId}", + "path": "v1beta1/{+name}", + "id": "ml.projects.jobs.get" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "GoogleCloudMlV1beta1__Job" + }, + "parameters": { + "parent": { + "location": "path", + "description": "Required. The project name.\n\nAuthorization: requires `Editor` role on the specified project.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/jobs", + "id": "ml.projects.jobs.create", + "path": "v1beta1/{+parent}/jobs", + "request": { + "$ref": "GoogleCloudMlV1beta1__Job" + }, + "description": "Creates a training or a batch prediction job." + } + } + }, + "operations": { + "methods": { + "cancel": { + "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}:cancel", + "path": "v1beta1/{+name}:cancel", + "id": "ml.projects.operations.cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "response": { + "$ref": "GoogleProtobuf__Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "response": { + "$ref": "GoogleProtobuf__Empty" + }, + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be deleted.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/operations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}", + "id": "ml.projects.operations.delete", + "path": "v1beta1/{+name}" + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`.", + "httpMethod": "GET", + "response": { + "$ref": "GoogleLongrunning__ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The name of the operation collection." + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "The standard list page size.", + "format": "int32" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/operations", + "id": "ml.projects.operations.list", + "path": "v1beta1/{+name}/operations" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleLongrunning__Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/operations/{operationsId}", + "id": "ml.projects.operations.get", + "path": "v1beta1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + } + } + }, + "models": { + "methods": { + "delete": { + "response": { + "$ref": "GoogleLongrunning__Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path", + "description": "Required. The name of the model.\n\nAuthorization: requires `Editor` role on the parent project.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}", + "id": "ml.projects.models.delete", + "path": "v1beta1/{+name}", + "description": "Deletes a model.\n\nYou can only delete a model if there are no versions in it. You can delete\nversions by calling\n[projects.models.versions.delete](/ml-engine/reference/rest/v1beta1/projects.models.versions/delete)." + }, + "list": { + "path": "v1beta1/{+parent}/models", + "id": "ml.projects.models.list", + "description": "Lists the models in a project.\n\nEach project can contain multiple models, and each model can have multiple\nversions.", + "response": { + "$ref": "GoogleCloudMlV1beta1__ListModelsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call." + }, + "pageSize": { + "description": "Optional. The number of models to retrieve per \"page\" of results. If there\nare more remaining results than this number, the response message will\ncontain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The name of the project whose models are to be listed.\n\nAuthorization: requires `Viewer` role on the specified project.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/models" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleCloudMlV1beta1__Model" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "Required. The name of the model.\n\nAuthorization: requires `Viewer` role on the parent project.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/models/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}", + "id": "ml.projects.models.get", + "path": "v1beta1/{+name}", + "description": "Gets information about a model, including its name, the description (if\nset), and the default version (if at least one version of the model has\nbeen deployed)." + }, + "create": { + "response": { + "$ref": "GoogleCloudMlV1beta1__Model" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Required. The project name.\n\nAuthorization: requires `Editor` role on the specified project." + } + }, + "flatPath": "v1beta1/projects/{projectsId}/models", + "path": "v1beta1/{+parent}/models", + "id": "ml.projects.models.create", + "description": "Creates a model which will later contain one or more versions.\n\nYou must add at least one version before you can request predictions from\nthe model. Add versions by calling\n[projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create).", + "request": { + "$ref": "GoogleCloudMlV1beta1__Model" + } + } + }, + "resources": { + "versions": { + "methods": { + "delete": { + "response": { + "$ref": "GoogleLongrunning__Operation" + }, + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", + "location": "path", + "description": "Required. The name of the version. You can get the names of all the\nversions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).\n\nAuthorization: requires `Editor` role on the parent project." + } + }, + "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", + "path": "v1beta1/{+name}", + "id": "ml.projects.models.versions.delete", + "description": "Deletes a model version.\n\nEach model can have multiple versions deployed and in use at any given\ntime. Use this method to remove a single version.\n\nNote: You cannot delete the version that is set as the default version\nof the model unless it is the only remaining version." + }, + "list": { + "description": "Gets basic information about all the versions of a model.\n\nIf you expect that a model has a lot of versions, or if you need to handle\nonly a limited number of results at a time, you can request that the list\nbe retrieved in batches (called pages):", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "GoogleCloudMlV1beta1__ListVersionsResponse" + }, + "parameters": { + "parent": { + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path", + "description": "Required. The name of the model for which to list the version.\n\nAuthorization: requires `Viewer` role on the parent project.", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Optional. A page token to request the next page of results.\n\nYou get the token from the `next_page_token` field of the response from\nthe previous call.", + "type": "string" + }, + "pageSize": { + "description": "Optional. The number of versions to retrieve per \"page\" of results. If\nthere are more remaining results than this number, the response message\nwill contain a valid value in the `next_page_token` field.\n\nThe default value is 20, and the maximum page size is 100.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions", + "id": "ml.projects.models.versions.list", + "path": "v1beta1/{+parent}/versions" + }, + "get": { + "description": "Gets information about a model version.\n\nModels can have multiple versions. You can call\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list)\nto get the same information that this method returns for all of the\nversions of a model.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "GoogleCloudMlV1beta1__Version" + }, + "parameters": { + "name": { + "location": "path", + "description": "Required. The name of the version.\n\nAuthorization: requires `Viewer` role on the parent project.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", + "id": "ml.projects.models.versions.get", + "path": "v1beta1/{+name}" + }, + "create": { + "request": { + "$ref": "GoogleCloudMlV1beta1__Version" + }, + "description": "Creates a new version of a model from a trained TensorFlow model.\n\nIf the version created in the cloud by this call is the first deployed\nversion of the specified model, it will be made the default version of the\nmodel. When you add a version to a model that already has one or more\nversions, the default version does not automatically change. If you want a\nnew version to be the default, you must call\n[projects.models.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault).", + "response": { + "$ref": "GoogleLongrunning__Operation" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/models/[^/]+$", + "location": "path", + "description": "Required. The name of the model.\n\nAuthorization: requires `Editor` role on the parent project." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions", + "path": "v1beta1/{+parent}/versions", + "id": "ml.projects.models.versions.create" + }, + "setDefault": { + "response": { + "$ref": "GoogleCloudMlV1beta1__Version" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "Required. The name of the version to make the default for the model. You\ncan get the names of all the versions of a model by calling\n[projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list).\n\nAuthorization: requires `Editor` role on the parent project.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}:setDefault", + "path": "v1beta1/{+name}:setDefault", + "id": "ml.projects.models.versions.setDefault", + "description": "Designates a version to be the default for the model.\n\nThe default version is used for prediction requests made against the model\nthat don't specify a version.\n\nThe first version to be created for a model is automatically set as the\ndefault. You must make any subsequent changes to the default version\nsetting manually using this method.", + "request": { + "$ref": "GoogleCloudMlV1beta1__SetDefaultVersionRequest" + } + } + } + } + } + } + } + } + }, "parameters": { + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, "access_token": { "description": "OAuth access token.", "type": "string", "location": "query" }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, "key": { "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", @@ -1309,77 +1490,61 @@ "location": "query" }, "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" }, "oauth_token": { "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, - "bearer_token": { - "description": "OAuth bearer token.", + "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", "type": "string", - "location": "query" + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ] }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" } }, - "documentationLink": "https://cloud.google.com/ml/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v1beta1", - "rootUrl": "https://ml.googleapis.com/", - "kind": "discovery#restDescription" + "baseUrl": "https://ml.googleapis.com/" } diff --git a/etc/api/monitoring/v3/monitoring-api.json b/etc/api/monitoring/v3/monitoring-api.json index fac3839593..cc0f192bce 100644 --- a/etc/api/monitoring/v3/monitoring-api.json +++ b/etc/api/monitoring/v3/monitoring-api.json @@ -1,491 +1,335 @@ { - "id": "monitoring:v3", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/monitoring.read": { - "description": "View monitoring data for all of your Google Cloud and third-party projects" - }, - "https://www.googleapis.com/auth/monitoring.write": { - "description": "Publish metric data to your Google Cloud projects" - }, - "https://www.googleapis.com/auth/monitoring": { - "description": "View and write monitoring data for all of your Google and third-party Cloud and API projects" - } - } - } - }, - "description": "Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages.", - "protocol": "rest", - "title": "Stackdriver Monitoring API", + "ownerName": "Google", "resources": { "projects": { "resources": { - "collectdTimeSeries": { + "groups": { "methods": { - "create": { - "id": "monitoring.projects.collectdTimeSeries.create", + "delete": { + "description": "Deletes an existing group.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], "response": { "$ref": "Empty" }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring" + ], + "parameters": { + "name": { + "location": "path", + "description": "The group to delete. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/groups/[^/]+$" + } + }, + "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", + "id": "monitoring.projects.groups.delete", + "path": "v3/{+name}" + }, + "list": { + "description": "Lists the existing groups.", + "response": { + "$ref": "ListGroupsResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "parameters": { + "pageSize": { + "description": "A positive number that is the maximum number of results to return.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "ancestorsOfGroup": { + "location": "query", + "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty.", + "type": "string" + }, + "name": { + "location": "path", + "description": "The project whose groups are to be listed. The format is \"projects/{project_id_or_number}\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + }, + "childrenOfGroup": { + "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns groups whose parentName field contains the group name. If no groups have this parent, the results are empty.", + "type": "string", + "location": "query" + }, + "descendantsOfGroup": { + "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns the descendants of the specified group. This is a superset of the results returned by the childrenOfGroup filter, and includes children-of-children, and so forth.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.read" + ], + "flatPath": "v3/projects/{projectsId}/groups", + "path": "v3/{+name}/groups", + "id": "monitoring.projects.groups.list" + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Group" + }, "parameterOrder": [ "name" ], - "description": "Stackdriver Monitoring Agent only: Creates a new time series.\u003caside class=\"caution\"\u003eThis method is only for use by the Stackdriver Monitoring Agent. Use projects.timeSeries.create instead.\u003c/aside\u003e", - "request": { - "$ref": "CreateCollectdTimeSeriesRequest" - }, - "flatPath": "v3/projects/{projectsId}/collectdTimeSeries", - "httpMethod": "POST", "parameters": { "name": { - "description": "The project in which to create the time series. The format is \"projects/PROJECT_ID_OR_NUMBER\".", - "required": true, - "pattern": "^projects/[^/]+$", "location": "path", - "type": "string" + "description": "The group to retrieve. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/groups/[^/]+$" } }, - "path": "v3/{+name}/collectdTimeSeries", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ] + "https://www.googleapis.com/auth/monitoring.read" + ], + "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", + "id": "monitoring.projects.groups.get", + "path": "v3/{+name}", + "description": "Gets a single group." + }, + "update": { + "path": "v3/{+name}", + "id": "monitoring.projects.groups.update", + "description": "Updates an existing group. You can change any group attributes except name.", + "request": { + "$ref": "Group" + }, + "response": { + "$ref": "Group" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring" + ], + "parameters": { + "name": { + "location": "path", + "description": "Output only. The name of this group. The format is \"projects/{project_id_or_number}/groups/{group_id}\". When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique {group_id} that is generated automatically.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/groups/[^/]+$" + }, + "validateOnly": { + "location": "query", + "description": "If true, validate this request but do not update the existing group.", + "type": "boolean" + } + }, + "flatPath": "v3/projects/{projectsId}/groups/{groupsId}" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Group" + }, + "parameters": { + "name": { + "location": "path", + "description": "The project in which to create the group. The format is \"projects/{project_id_or_number}\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + }, + "validateOnly": { + "description": "If true, validate this request but do not create the group.", + "type": "boolean", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring" + ], + "flatPath": "v3/projects/{projectsId}/groups", + "id": "monitoring.projects.groups.create", + "path": "v3/{+name}/groups", + "request": { + "$ref": "Group" + }, + "description": "Creates a new group." } - } - }, - "groups": { + }, "resources": { "members": { "methods": { "list": { + "path": "v3/{+name}/members", "id": "monitoring.projects.groups.members.list", + "description": "Lists the monitored resources that are members of a group.", "response": { "$ref": "ListGroupMembersResponse" }, "parameterOrder": [ "name" ], - "description": "Lists the monitored resources that are members of a group.", - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}/members", "httpMethod": "GET", "parameters": { - "filter": { - "description": "An optional list filter describing the members to be returned. The filter may reference the type, labels, and metadata of monitored resources that comprise the group. For example, to return only resources representing Compute Engine VM instances, use this filter:\nresource.type = \"gce_instance\"\n", - "location": "query", - "type": "string" - }, - "interval.endTime": { - "description": "Required. The end of the time interval.", - "location": "query", - "type": "string", - "format": "google-datetime" - }, - "interval.startTime": { - "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - "location": "query", - "type": "string", - "format": "google-datetime" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, "name": { "description": "The group whose members are listed. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", "required": true, + "type": "string", "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path", + "location": "path" + }, + "interval.endTime": { + "description": "Required. The end of the time interval.", + "format": "google-datetime", + "type": "string", + "location": "query" + }, + "filter": { + "location": "query", + "description": "An optional list filter describing the members to be returned. The filter may reference the type, labels, and metadata of monitored resources that comprise the group. For example, to return only resources representing Compute Engine VM instances, use this filter:\nresource.type = \"gce_instance\"\n", "type": "string" }, "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", + "type": "string", "location": "query", - "type": "string" + "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call." + }, + "interval.startTime": { + "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", + "format": "google-datetime", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "A positive number that is the maximum number of results to return.", + "format": "int32", + "type": "integer" } }, - "path": "v3/{+name}/members", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/monitoring", "https://www.googleapis.com/auth/monitoring.read" - ] + ], + "flatPath": "v3/projects/{projectsId}/groups/{groupsId}/members" } } } - }, - "methods": { - "update": { - "id": "monitoring.projects.groups.update", - "response": { - "$ref": "Group" - }, - "parameterOrder": [ - "name" - ], - "description": "Updates an existing group. You can change any group attributes except name.", - "request": { - "$ref": "Group" - }, - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - "httpMethod": "PUT", - "parameters": { - "validateOnly": { - "description": "If true, validate this request but do not update the existing group.", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "Output only. The name of this group. The format is \"projects/{project_id_or_number}/groups/{group_id}\". When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique {group_id} that is generated automatically.", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v3/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "get": { - "id": "monitoring.projects.groups.get", - "response": { - "$ref": "Group" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets a single group.", - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The group to retrieve. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v3/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "create": { - "id": "monitoring.projects.groups.create", - "response": { - "$ref": "Group" - }, - "parameterOrder": [ - "name" - ], - "description": "Creates a new group.", - "request": { - "$ref": "Group" - }, - "flatPath": "v3/projects/{projectsId}/groups", - "httpMethod": "POST", - "parameters": { - "validateOnly": { - "description": "If true, validate this request but do not create the group.", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "The project in which to create the group. The format is \"projects/{project_id_or_number}\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v3/{+name}/groups", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "list": { - "id": "monitoring.projects.groups.list", - "response": { - "$ref": "ListGroupsResponse" - }, - "parameterOrder": [ - "name" - ], - "description": "Lists the existing groups.", - "flatPath": "v3/projects/{projectsId}/groups", - "httpMethod": "GET", - "parameters": { - "descendantsOfGroup": { - "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns the descendants of the specified group. This is a superset of the results returned by the childrenOfGroup filter, and includes children-of-children, and so forth.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "childrenOfGroup": { - "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns groups whose parentName field contains the group name. If no groups have this parent, the results are empty.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project whose groups are to be listed. The format is \"projects/{project_id_or_number}\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "ancestorsOfGroup": { - "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/groups", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "delete": { - "id": "monitoring.projects.groups.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Deletes an existing group.", - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "The group to delete. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v3/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - } } }, - "metricDescriptors": { + "collectdTimeSeries": { "methods": { - "get": { - "id": "monitoring.projects.metricDescriptors.get", - "response": { - "$ref": "MetricDescriptor" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets a single metric descriptor. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example value of {metric_id} is \"compute.googleapis.com/instance/disk/read_bytes_count\".", - "required": true, - "pattern": "^projects/[^/]+/metricDescriptors/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v3/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, "create": { - "id": "monitoring.projects.metricDescriptors.create", - "response": { - "$ref": "MetricDescriptor" - }, - "parameterOrder": [ - "name" - ], - "description": "Creates a new metric descriptor. User-created metric descriptors define custom metrics.", "request": { - "$ref": "MetricDescriptor" + "$ref": "CreateCollectdTimeSeriesRequest" }, - "flatPath": "v3/projects/{projectsId}/metricDescriptors", + "description": "Stackdriver Monitoring Agent only: Creates a new time series.\u003caside class=\"caution\"\u003eThis method is only for use by the Stackdriver Monitoring Agent. Use projects.timeSeries.create instead.\u003c/aside\u003e", "httpMethod": "POST", - "parameters": { - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v3/{+name}/metricDescriptors", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "list": { - "id": "monitoring.projects.metricDescriptors.list", - "response": { - "$ref": "ListMetricDescriptorsResponse" - }, "parameterOrder": [ "name" ], - "description": "Lists metric descriptors that match a filter. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/metricDescriptors", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the filter specifies which metric descriptors are to be returned. For example, the following filter matches all custom metrics:\nmetric.type = starts_with(\"custom.googleapis.com/\")\n", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/metricDescriptors", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "delete": { - "id": "monitoring.projects.metricDescriptors.delete", "response": { "$ref": "Empty" }, - "parameterOrder": [ - "name" - ], - "description": "Deletes a metric descriptor. Only user-created custom metrics can be deleted.", - "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", - "httpMethod": "DELETE", "parameters": { "name": { - "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example of {metric_id} is: \"custom.googleapis.com/my_test_metric\".", - "required": true, - "pattern": "^projects/[^/]+/metricDescriptors/.+$", "location": "path", - "type": "string" + "description": "The project in which to create the time series. The format is \"projects/PROJECT_ID_OR_NUMBER\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" } }, - "path": "v3/{+name}", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.write" + ], + "flatPath": "v3/projects/{projectsId}/collectdTimeSeries", + "id": "monitoring.projects.collectdTimeSeries.create", + "path": "v3/{+name}/collectdTimeSeries" } } }, "timeSeries": { "methods": { - "create": { - "id": "monitoring.projects.timeSeries.create", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.", - "request": { - "$ref": "CreateTimeSeriesRequest" - }, - "flatPath": "v3/projects/{projectsId}/timeSeries", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v3/{+name}/timeSeries", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, "list": { - "id": "monitoring.projects.timeSeries.list", "response": { "$ref": "ListTimeSeriesResponse" }, "parameterOrder": [ "name" ], - "description": "Lists time series that match a filter. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/timeSeries", "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.read" + ], "parameters": { - "filter": { - "description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.label.instance_name = \"my-instance-name\"\n", - "location": "query", - "type": "string" - }, "aggregation.groupByFields": { "description": "The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored.", + "type": "string", "repeated": true, + "location": "query" + }, + "name": { + "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "interval.endTime": { + "description": "Required. The end of the time interval.", + "format": "google-datetime", + "type": "string", + "location": "query" + }, + "aggregation.alignmentPeriod": { "location": "query", + "description": "The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.", + "format": "google-duration", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "A positive number that is the maximum number of results to return. When view field sets to FULL, it limits the number of Points server will return; if view field is HEADERS, it limits the number of TimeSeries server will return.", + "format": "int32" + }, + "orderBy": { + "location": "query", + "description": "Specifies the order in which the points of the time series should be returned. By default, results are not ordered. Currently, this field must be left blank.", "type": "string" }, "aggregation.crossSeriesReducer": { - "description": "The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", + "location": "query", "enum": [ "REDUCE_NONE", "REDUCE_MEAN", @@ -501,51 +345,23 @@ "REDUCE_PERCENTILE_50", "REDUCE_PERCENTILE_05" ], - "location": "query", + "description": "The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", "type": "string" }, - "interval.endTime": { - "description": "Required. The end of the time interval.", - "location": "query", + "filter": { + "description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.label.instance_name = \"my-instance-name\"\n", "type": "string", - "format": "google-datetime" + "location": "query" }, - "interval.startTime": { - "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - "location": "query", + "pageToken": { "type": "string", - "format": "google-datetime" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return. When view field sets to FULL, it limits the number of Points server will return; if view field is HEADERS, it limits the number of TimeSeries server will return.", "location": "query", - "type": "integer", - "format": "int32" - }, - "view": { - "description": "Specifies which information is returned about the time series.", - "enum": [ - "FULL", - "HEADERS" - ], - "location": "query", - "type": "string" - }, - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "aggregation.alignmentPeriod": { - "description": "The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.", - "location": "query", - "type": "string", - "format": "google-duration" + "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call." }, "aggregation.perSeriesAligner": { "description": "The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", + "type": "string", + "location": "query", "enum": [ "ALIGN_NONE", "ALIGN_DELTA", @@ -564,663 +380,455 @@ "ALIGN_PERCENTILE_95", "ALIGN_PERCENTILE_50", "ALIGN_PERCENTILE_05" + ] + }, + "interval.startTime": { + "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", + "format": "google-datetime", + "type": "string", + "location": "query" + }, + "view": { + "location": "query", + "enum": [ + "FULL", + "HEADERS" ], - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Specifies the order in which the points of the time series should be returned. By default, results are not ordered. Currently, this field must be left blank.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", + "description": "Specifies which information is returned about the time series.", "type": "string" } }, + "flatPath": "v3/projects/{projectsId}/timeSeries", "path": "v3/{+name}/timeSeries", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - } - } - }, - "monitoredResourceDescriptors": { - "methods": { - "get": { - "id": "monitoring.projects.monitoredResourceDescriptors.get", + "id": "monitoring.projects.timeSeries.list", + "description": "Lists time series that match a filter. This method does not require a Stackdriver account." + }, + "create": { + "description": "Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.", + "request": { + "$ref": "CreateTimeSeriesRequest" + }, "response": { - "$ref": "MonitoredResourceDescriptor" + "$ref": "Empty" }, "parameterOrder": [ "name" ], - "description": "Gets a single monitored resource descriptor. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors/{monitoredResourceDescriptorsId}", - "httpMethod": "GET", + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.write" + ], "parameters": { "name": { - "description": "The monitored resource descriptor to get. The format is \"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}\". The {resource_type} is a predefined type, such as cloudsql_database.", - "required": true, - "pattern": "^projects/[^/]+/monitoredResourceDescriptors/[^/]+$", "location": "path", - "type": "string" + "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" } }, - "path": "v3/{+name}", + "flatPath": "v3/projects/{projectsId}/timeSeries", + "path": "v3/{+name}/timeSeries", + "id": "monitoring.projects.timeSeries.create" + } + } + }, + "metricDescriptors": { + "methods": { + "create": { + "request": { + "$ref": "MetricDescriptor" + }, + "description": "Creates a new metric descriptor. User-created metric descriptors define custom metrics.", + "response": { + "$ref": "MetricDescriptor" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.write" + ], + "flatPath": "v3/projects/{projectsId}/metricDescriptors", + "path": "v3/{+name}/metricDescriptors", + "id": "monitoring.projects.metricDescriptors.create" + }, + "delete": { + "description": "Deletes a metric descriptor. Only user-created custom metrics can be deleted.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example of {metric_id} is: \"custom.googleapis.com/my_test_metric\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/metricDescriptors/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring" + ], + "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", + "id": "monitoring.projects.metricDescriptors.delete", + "path": "v3/{+name}" + }, + "list": { "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/monitoring", "https://www.googleapis.com/auth/monitoring.read", "https://www.googleapis.com/auth/monitoring.write" - ] + ], + "parameters": { + "filter": { + "description": "If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the filter specifies which metric descriptors are to be returned. For example, the following filter matches all custom metrics:\nmetric.type = starts_with(\"custom.googleapis.com/\")\n", + "type": "string", + "location": "query" + }, + "name": { + "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "A positive number that is the maximum number of results to return.", + "format": "int32", + "type": "integer" + } + }, + "flatPath": "v3/projects/{projectsId}/metricDescriptors", + "path": "v3/{+name}/metricDescriptors", + "id": "monitoring.projects.metricDescriptors.list", + "description": "Lists metric descriptors that match a filter. This method does not require a Stackdriver account.", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListMetricDescriptorsResponse" + }, + "httpMethod": "GET" }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "MetricDescriptor" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example value of {metric_id} is \"compute.googleapis.com/instance/disk/read_bytes_count\".", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/metricDescriptors/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.read", + "https://www.googleapis.com/auth/monitoring.write" + ], + "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", + "id": "monitoring.projects.metricDescriptors.get", + "path": "v3/{+name}", + "description": "Gets a single metric descriptor. This method does not require a Stackdriver account." + } + } + }, + "monitoredResourceDescriptors": { + "methods": { "list": { - "id": "monitoring.projects.monitoredResourceDescriptors.list", "response": { "$ref": "ListMonitoredResourceDescriptorsResponse" }, "parameterOrder": [ "name" ], - "description": "Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors", "httpMethod": "GET", "parameters": { - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "An optional filter describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label:\nresource.type = starts_with(\"gce_\") AND resource.label:id\n", - "location": "query", - "type": "string" - }, "name": { + "location": "path", "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" + "type": "string", + "pattern": "^projects/[^/]+$" }, "pageToken": { "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", + "type": "string", + "location": "query" + }, + "pageSize": { "location": "query", + "description": "A positive number that is the maximum number of results to return.", + "format": "int32", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "An optional filter describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label:\nresource.type = starts_with(\"gce_\") AND resource.label:id\n", "type": "string" } }, - "path": "v3/{+name}/monitoredResourceDescriptors", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/monitoring", "https://www.googleapis.com/auth/monitoring.read", "https://www.googleapis.com/auth/monitoring.write" - ] + ], + "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors", + "path": "v3/{+name}/monitoredResourceDescriptors", + "id": "monitoring.projects.monitoredResourceDescriptors.list", + "description": "Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account." + }, + "get": { + "response": { + "$ref": "MonitoredResourceDescriptor" + }, + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/monitoring", + "https://www.googleapis.com/auth/monitoring.read", + "https://www.googleapis.com/auth/monitoring.write" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/monitoredResourceDescriptors/[^/]+$", + "location": "path", + "description": "The monitored resource descriptor to get. The format is \"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}\". The {resource_type} is a predefined type, such as cloudsql_database.", + "required": true, + "type": "string" + } + }, + "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors/{monitoredResourceDescriptorsId}", + "path": "v3/{+name}", + "id": "monitoring.projects.monitoredResourceDescriptors.get", + "description": "Gets a single monitored resource descriptor. This method does not require a Stackdriver account." } } } } } }, + "parameters": { + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Returns response with indentations and line breaks." + } + }, + "version": "v3", + "baseUrl": "https://monitoring.googleapis.com/", + "servicePath": "", + "description": "Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages.", + "kind": "discovery#restDescription", + "basePath": "", + "documentationLink": "https://cloud.google.com/monitoring/api/", + "revision": "20170519", + "id": "monitoring:v3", + "discoveryVersion": "v1", + "version_module": "True", "schemas": { - "Metric": { - "description": "A specific metric, identified by specifying values for all of the labels of a MetricDescriptor.", + "Range": { + "description": "The range of the population values.", "type": "object", "properties": { - "labels": { - "description": "The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.", - "additionalProperties": { - "type": "string" - }, - "type": "object" + "max": { + "description": "The maximum of the population values.", + "format": "double", + "type": "number" }, - "type": { - "description": "An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount.", + "min": { + "description": "The minimum of the population values.", + "format": "double", + "type": "number" + } + }, + "id": "Range" + }, + "ListGroupsResponse": { + "description": "The ListGroups response.", + "type": "object", + "properties": { + "group": { + "description": "The groups that match the specified filters.", + "type": "array", + "items": { + "$ref": "Group" + } + }, + "nextPageToken": { + "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", "type": "string" } }, - "id": "Metric" + "id": "ListGroupsResponse" + }, + "CreateCollectdTimeSeriesRequest": { + "description": "The CreateCollectdTimeSeries request.", + "type": "object", + "properties": { + "resource": { + "$ref": "MonitoredResource", + "description": "The monitored resource associated with the time series." + }, + "collectdPayloads": { + "description": "The collectd payloads representing the time series data. You must not include more than a single point for each time series, so no two payloads can have the same values for all of the fields plugin, plugin_instance, type, and type_instance.", + "type": "array", + "items": { + "$ref": "CollectdPayload" + } + }, + "collectdVersion": { + "description": "The version of collectd that collected the data. Example: \"5.3.0-192.el6\".", + "type": "string" + } + }, + "id": "CreateCollectdTimeSeriesRequest" }, "ListGroupMembersResponse": { "description": "The ListGroupMembers response.", "type": "object", "properties": { - "members": { - "description": "A set of monitored resources in the group.", - "type": "array", - "items": { - "$ref": "MonitoredResource" - } - }, "nextPageToken": { "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", "type": "string" }, "totalSize": { "description": "The total number of elements matching this request.", - "type": "integer", - "format": "int32" + "format": "int32", + "type": "integer" + }, + "members": { + "description": "A set of monitored resources in the group.", + "type": "array", + "items": { + "$ref": "MonitoredResource" + } } }, "id": "ListGroupMembersResponse" }, - "TimeInterval": { - "description": "A time interval extending just after a start time through an end time. If the start time is the same as the end time, then the interval represents a single point in time.", - "type": "object", - "properties": { - "endTime": { - "description": "Required. The end of the time interval.", - "type": "string", - "format": "google-datetime" - }, - "startTime": { - "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - "type": "string", - "format": "google-datetime" - } - }, - "id": "TimeInterval" - }, - "Group": { - "description": "The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group. Groups can contain any number of monitored resources, and each monitored resource can be a member of any number of groups.Groups can be nested in parent-child hierarchies. The parentName field identifies an optional parent for each group. If a group has a parent, then the only monitored resources available to be matched by the group's filter are the resources contained in the parent group. In other words, a group contains the monitored resources that match its filter and the filters of all the group's ancestors. A group without a parent can contain any monitored resource.For example, consider an infrastructure running a set of instances with two user-defined tags: \"environment\" and \"role\". A parent group has a filter, environment=\"production\". A child of that parent group has a filter, role=\"transcoder\". The parent group contains all instances in the production environment, regardless of their roles. The child group contains instances that have the transcoder role and are in the production environment.The monitored resources contained in a group can change at any moment, depending on what resources exist and what filters are associated with the group and its ancestors.", - "type": "object", - "properties": { - "displayName": { - "description": "A user-assigned name for this group, used only for display purposes.", - "type": "string" - }, - "parentName": { - "description": "The name of the group's parent, if it has one. The format is \"projects/{project_id_or_number}/groups/{group_id}\". For groups with no parent, parentName is the empty string, \"\".", - "type": "string" - }, - "isCluster": { - "description": "If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.", - "type": "boolean" - }, - "filter": { - "description": "The filter used to determine which monitored resources belong to this group.", - "type": "string" - }, - "name": { - "description": "Output only. The name of this group. The format is \"projects/{project_id_or_number}/groups/{group_id}\". When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique {group_id} that is generated automatically.", - "type": "string" - } - }, - "id": "Group" - }, - "ListTimeSeriesResponse": { - "description": "The ListTimeSeries response.", - "type": "object", - "properties": { - "timeSeries": { - "description": "One or more time series that match the filter included in the request.", - "type": "array", - "items": { - "$ref": "TimeSeries" - } - }, - "nextPageToken": { - "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", - "type": "string" - } - }, - "id": "ListTimeSeriesResponse" - }, - "Point": { - "description": "A single data point in a time series.", - "type": "object", - "properties": { - "value": { - "description": "The value of the data point.", - "$ref": "TypedValue" - }, - "interval": { - "description": "The time interval to which the data point applies. For GAUGE metrics, only the end time of the interval is used. For DELTA metrics, the start and end time should specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For CUMULATIVE metrics, the start and end time should specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points.", - "$ref": "TimeInterval" - } - }, - "id": "Point" - }, - "CollectdValue": { - "description": "A single data point from a collectd-based plugin.", - "type": "object", - "properties": { - "value": { - "description": "The measurement value.", - "$ref": "TypedValue" - }, - "dataSourceName": { - "description": "The data source for the collectd value. For example there are two data sources for network measurements: \"rx\" and \"tx\".", - "type": "string" - }, - "dataSourceType": { - "description": "The type of measurement.", - "enum": [ - "UNSPECIFIED_DATA_SOURCE_TYPE", - "GAUGE", - "COUNTER", - "DERIVE", - "ABSOLUTE" - ], - "enumDescriptions": [ - "An unspecified data source type. This corresponds to google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.", - "An instantaneous measurement of a varying quantity. This corresponds to google.api.MetricDescriptor.MetricKind.GAUGE.", - "A cumulative value over time. This corresponds to google.api.MetricDescriptor.MetricKind.CUMULATIVE.", - "A rate of change of the measurement.", - "An amount of change since the last measurement interval. This corresponds to google.api.MetricDescriptor.MetricKind.DELTA." - ], - "type": "string" - } - }, - "id": "CollectdValue" - }, - "TimeSeries": { - "description": "A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series.", - "type": "object", - "properties": { - "metric": { - "description": "The associated metric. A fully-specified metric used to identify the time series.", - "$ref": "Metric" - }, - "points": { - "description": "The data points of this time series. When listing time series, the order of the points is specified by the list method.When creating a time series, this field must contain exactly one point and the point's type must be the same as the value type of the associated metric. If the associated metric's descriptor must be auto-created, then the value type of the descriptor is determined by the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION.", - "type": "array", - "items": { - "$ref": "Point" - } - }, - "valueType": { - "description": "The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field.", - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The value is a boolean. This value type can be used only if the metric kind is GAUGE.", - "The value is a signed 64-bit integer.", - "The value is a double precision floating point number.", - "The value is a text string. This value type can be used only if the metric kind is GAUGE.", - "The value is a Distribution.", - "The value is money." - ], - "type": "string" - }, - "resource": { - "description": "The associated resource. A fully-specified monitored resource used to identify the time series.", - "$ref": "MonitoredResource" - }, - "metricKind": { - "description": "The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either GAUGE (the default) or CUMULATIVE.", - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ], - "enumDescriptions": [ - "Do not use this default value.", - "An instantaneous measurement of a value.", - "The change in a value during a time interval.", - "A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." - ], - "type": "string" - } - }, - "id": "TimeSeries" - }, - "MetricDescriptor": { - "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.", - "type": "object", - "properties": { - "description": { - "description": "A detailed description of the metric, which can be used in documentation.", - "type": "string" - }, - "unit": { - "description": "The unit in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT)\nbit bit\nBy byte\ns second\nmin minute\nh hour\nd dayPrefixes (PREFIX)\nk kilo (10**3)\nM mega (10**6)\nG giga (10**9)\nT tera (10**12)\nP peta (10**15)\nE exa (10**18)\nZ zetta (10**21)\nY yotta (10**24)\nm milli (10**-3)\nu micro (10**-6)\nn nano (10**-9)\np pico (10**-12)\nf femto (10**-15)\na atto (10**-18)\nz zepto (10**-21)\ny yocto (10**-24)\nKi kibi (2**10)\nMi mebi (2**20)\nGi gibi (2**30)\nTi tebi (2**40)GrammarThe grammar includes the dimensionless unit 1, such as 1/s.The grammar also includes these connectors:\n/ division (as an infix operator, e.g. 1/s).\n. multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit is as follows:\nExpression = Component { \".\" Component } { \"/\" Component } ;\n\nComponent = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\nAnnotation = \"{\" NAME \"}\" ;\nNotes:\nAnnotation is just a comment if it follows a UNIT and is equivalent to 1 if it is used alone. For examples, {requests}/s == 1/s, By{transmitted}/s == By/s.\nNAME is a sequence of non-blank printable ASCII characters not containing '{' or '}'.", - "type": "string" - }, - "labels": { - "description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response_latencies metric type has a label for the HTTP response code, response_code, so you can look at latencies for successful responses or just for responses that failed.", - "type": "array", - "items": { - "$ref": "LabelDescriptor" - } - }, - "metricKind": { - "description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric_kind and value_type might not be supported.", - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ], - "enumDescriptions": [ - "Do not use this default value.", - "An instantaneous measurement of a value.", - "The change in a value during a time interval.", - "A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." - ], - "type": "string" - }, - "valueType": { - "description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric_kind and value_type might not be supported.", - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The value is a boolean. This value type can be used only if the metric kind is GAUGE.", - "The value is a signed 64-bit integer.", - "The value is a double precision floating point number.", - "The value is a text string. This value type can be used only if the metric kind is GAUGE.", - "The value is a Distribution.", - "The value is money." - ], - "type": "string" - }, - "displayName": { - "description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\".", - "type": "string" - }, - "name": { - "description": "The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project 123456789:\n\"projects/123456789/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"\n", - "type": "string" - }, - "type": { - "description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example:\n\"custom.googleapis.com/invoice/paid/amount\"\n\"appengine.googleapis.com/http/server/response_latencies\"\n", - "type": "string" - } - }, - "id": "MetricDescriptor" - }, - "Exponential": { - "description": "Specify a sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with these boundaries for bucket i:Upper bound (0 \u003c= i \u003c N-1): scale * (growth_factor ^ i). Lower bound (1 \u003c= i \u003c N): scale * (growth_factor ^ (i - 1)).", - "type": "object", - "properties": { - "growthFactor": { - "description": "Must be greater than 1.", - "type": "number", - "format": "double" - }, - "scale": { - "description": "Must be greater than 0.", - "type": "number", - "format": "double" - }, - "numFiniteBuckets": { - "description": "Must be greater than 0.", - "type": "integer", - "format": "int32" - } - }, - "id": "Exponential" - }, - "Explicit": { - "description": "A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets with these boundaries for bucket i:Upper bound (0 \u003c= i \u003c N-1): boundsi Lower bound (1 \u003c= i \u003c N); boundsi - 1There must be at least one element in bounds. If bounds has only one element, there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.", - "type": "object", - "properties": { - "bounds": { - "description": "The values must be monotonically increasing.", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - }, - "id": "Explicit" - }, - "Linear": { - "description": "Specify a sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with these boundaries for bucket i:Upper bound (0 \u003c= i \u003c N-1): offset + (width * i). Lower bound (1 \u003c= i \u003c N): offset + (width * (i - 1)).", - "type": "object", - "properties": { - "width": { - "description": "Must be greater than 0.", - "type": "number", - "format": "double" - }, - "offset": { - "description": "Lower bound of the first bucket.", - "type": "number", - "format": "double" - }, - "numFiniteBuckets": { - "description": "Must be greater than 0.", - "type": "integer", - "format": "int32" - } - }, - "id": "Linear" - }, - "CollectdPayload": { - "description": "A collection of data points sent from a collectd-based plugin. See the collectd documentation for more information.", - "type": "object", - "properties": { - "endTime": { - "description": "The end time of the interval.", - "type": "string", - "format": "google-datetime" - }, - "metadata": { - "description": "The measurement metadata. Example: \"process_id\" -\u003e 12345", - "additionalProperties": { - "$ref": "TypedValue" - }, - "type": "object" - }, - "values": { - "description": "The measured values during this time interval. Each value must have a different dataSourceName.", - "type": "array", - "items": { - "$ref": "CollectdValue" - } - }, - "pluginInstance": { - "description": "The instance name of the plugin Example: \"hdcl\".", - "type": "string" - }, - "startTime": { - "description": "The start time of the interval.", - "type": "string", - "format": "google-datetime" - }, - "typeInstance": { - "description": "The measurement type instance. Example: \"used\".", - "type": "string" - }, - "type": { - "description": "The measurement type. Example: \"memory\".", - "type": "string" - }, - "plugin": { - "description": "The name of the plugin. Example: \"disk\".", - "type": "string" - } - }, - "id": "CollectdPayload" - }, - "ListMetricDescriptorsResponse": { - "description": "The ListMetricDescriptors response.", - "type": "object", - "properties": { - "metricDescriptors": { - "description": "The metric descriptors that are available to the project and that match the value of filter, if present.", - "type": "array", - "items": { - "$ref": "MetricDescriptor" - } - }, - "nextPageToken": { - "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", - "type": "string" - } - }, - "id": "ListMetricDescriptorsResponse" - }, - "Distribution": { - "description": "Distribution contains summary statistics for a population of values and, optionally, a histogram representing the distribution of those values across a specified set of histogram buckets.The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values.The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by specifying parameters for a method of computing them (buckets of fixed width or buckets of exponentially increasing width).Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the mean and sum_of_squared_deviation fields meaningless.", - "type": "object", - "properties": { - "bucketCounts": { - "description": "If bucket_options is given, then the sum of the values in bucket_counts must equal the value in count. If bucket_options is not given, no bucket_counts fields may be given.Bucket counts are given in order under the numbering scheme described above (the underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; the overflow bucket has number N-1).The size of bucket_counts must be no greater than N as defined in bucket_options.Any suffix of trailing zero bucket_count fields may be omitted.", - "type": "array", - "items": { - "type": "string", - "format": "int64" - } - }, - "bucketOptions": { - "description": "Defines the histogram bucket boundaries.", - "$ref": "BucketOptions" - }, - "count": { - "description": "The number of values in the population. Must be non-negative.", - "type": "string", - "format": "int64" - }, - "sumOfSquaredDeviation": { - "description": "The sum of squared deviations from the mean of the values in the population. For values x_i this is:\nSum[i=1..n]((x_i - mean)^2)\nKnuth, \"The Art of Computer Programming\", Vol. 2, page 323, 3rd edition describes Welford's method for accumulating this sum in one pass.If count is zero then this field must be zero.", - "type": "number", - "format": "double" - }, - "mean": { - "description": "The arithmetic mean of the values in the population. If count is zero then this field must be zero.", - "type": "number", - "format": "double" - }, - "range": { - "description": "If specified, contains the range of the population values. The field must not be present if the count is zero. This field is presently ignored by the Stackdriver Monitoring API v3.", - "$ref": "Range" - } - }, - "id": "Distribution" - }, - "MonitoredResource": { - "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"instance_id\" and \"zone\":\n{ \"type\": \"gce_instance\",\n \"labels\": { \"instance_id\": \"12345678901234\",\n \"zone\": \"us-central1-a\" }}\n", - "type": "object", - "properties": { - "labels": { - "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels \"database_id\" and \"zone\".", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "type": { - "description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is \"cloudsql_database\".", - "type": "string" - } - }, - "id": "MonitoredResource" - }, - "LabelDescriptor": { - "description": "A description of a label.", - "type": "object", - "properties": { - "description": { - "description": "A human-readable description for the label.", - "type": "string" - }, - "valueType": { - "description": "The type of data that can be assigned to the label.", - "enum": [ - "STRING", - "BOOL", - "INT64" - ], - "enumDescriptions": [ - "A variable-length string. This is the default.", - "Boolean; true or false.", - "A 64-bit signed integer." - ], - "type": "string" - }, - "key": { - "description": "The label key.", - "type": "string" - } - }, - "id": "LabelDescriptor" - }, - "MonitoredResourceDescriptor": { - "description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of \"gce_instance\" and specifies the use of the labels \"instance_id\" and \"zone\" to identify particular VM instances.Different APIs can support different monitored resource types. APIs generally provide a list method that returns the monitored resource descriptors used by the API.", - "type": "object", - "properties": { - "displayName": { - "description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, \"Google Cloud SQL Database\".", - "type": "string" - }, - "description": { - "description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", - "type": "string" - }, - "labels": { - "description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels \"database_id\" and \"zone\".", - "type": "array", - "items": { - "$ref": "LabelDescriptor" - } - }, - "type": { - "description": "Required. The monitored resource type. For example, the type \"cloudsql_database\" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters.", - "type": "string" - }, - "name": { - "description": "Optional. The resource name of the monitored resource descriptor: \"projects/{project_id}/monitoredResourceDescriptors/{type}\" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format \"monitoredResourceDescriptors/{type}\".", - "type": "string" - } - }, - "id": "MonitoredResourceDescriptor" - }, - "TypedValue": { - "description": "A single strongly-typed value.", - "type": "object", - "properties": { - "boolValue": { - "description": "A Boolean value: true or false.", - "type": "boolean" - }, - "stringValue": { - "description": "A variable-length string value.", - "type": "string" - }, - "int64Value": { - "description": "A 64-bit integer. Its range is approximately ±9.2x10\u003csup\u003e18\u003c/sup\u003e.", - "type": "string", - "format": "int64" - }, - "doubleValue": { - "description": "A 64-bit double-precision floating-point number. Its magnitude is approximately ±10\u003csup\u003e±300\u003c/sup\u003e and it has 16 significant digits of precision.", - "type": "number", - "format": "double" - }, - "distributionValue": { - "description": "A distribution value.", - "$ref": "Distribution" - } - }, - "id": "TypedValue" - }, "ListMonitoredResourceDescriptorsResponse": { - "description": "The ListMonitoredResourcDescriptors response.", + "id": "ListMonitoredResourceDescriptorsResponse", + "description": "The ListMonitoredResourceDescriptors response.", "type": "object", "properties": { "nextPageToken": { @@ -1234,89 +842,389 @@ "$ref": "MonitoredResourceDescriptor" } } + } + }, + "TimeSeries": { + "description": "A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series.", + "type": "object", + "properties": { + "resource": { + "$ref": "MonitoredResource", + "description": "The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data." + }, + "metricKind": { + "enumDescriptions": [ + "Do not use this default value.", + "An instantaneous measurement of a value.", + "The change in a value during a time interval.", + "A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." + ], + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ], + "description": "The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either GAUGE (the default) or CUMULATIVE.", + "type": "string" + }, + "metric": { + "description": "The associated metric. A fully-specified metric used to identify the time series.", + "$ref": "Metric" + }, + "points": { + "description": "The data points of this time series. When listing time series, the order of the points is specified by the list method.When creating a time series, this field must contain exactly one point and the point's type must be the same as the value type of the associated metric. If the associated metric's descriptor must be auto-created, then the value type of the descriptor is determined by the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION.", + "type": "array", + "items": { + "$ref": "Point" + } + }, + "valueType": { + "enumDescriptions": [ + "Do not use this default value.", + "The value is a boolean. This value type can be used only if the metric kind is GAUGE.", + "The value is a signed 64-bit integer.", + "The value is a double precision floating point number.", + "The value is a text string. This value type can be used only if the metric kind is GAUGE.", + "The value is a Distribution.", + "The value is money." + ], + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "DOUBLE", + "STRING", + "DISTRIBUTION", + "MONEY" + ], + "description": "The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field.", + "type": "string" + } }, - "id": "ListMonitoredResourceDescriptorsResponse" + "id": "TimeSeries" + }, + "CreateTimeSeriesRequest": { + "description": "The CreateTimeSeries request.", + "type": "object", + "properties": { + "timeSeries": { + "description": "The new data to be added to a list of time series. Adds at most one data point to each of several time series. The new data point must be more recent than any other point in its time series. Each TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.", + "type": "array", + "items": { + "$ref": "TimeSeries" + } + } + }, + "id": "CreateTimeSeriesRequest" + }, + "Distribution": { + "description": "Distribution contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets.The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths.Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the mean and sum_of_squared_deviation fields meaningless.", + "type": "object", + "properties": { + "range": { + "description": "If specified, contains the range of the population values. The field must not be present if the count is zero. This field is presently ignored by the Stackdriver Monitoring API v3.", + "$ref": "Range" + }, + "mean": { + "description": "The arithmetic mean of the values in the population. If count is zero then this field must be zero.", + "format": "double", + "type": "number" + }, + "count": { + "type": "string", + "description": "The number of values in the population. Must be non-negative. This value must equal the sum of the values in bucket_counts if a histogram is provided.", + "format": "int64" + }, + "bucketCounts": { + "description": "Required in the Stackdriver Monitoring API v3. The values for each bucket specified in bucket_options. The sum of the values in bucketCounts must equal the value in the count field of the Distribution object. The order of the bucket counts follows the numbering schemes described for the three bucket types. The underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; and the overflow bucket has number N-1. The size of bucket_counts must not be greater than N. If the size is less than N, then the remaining buckets are assigned values of zero.", + "type": "array", + "items": { + "format": "int64", + "type": "string" + } + }, + "bucketOptions": { + "description": "Required in the Stackdriver Monitoring API v3. Defines the histogram bucket boundaries.", + "$ref": "BucketOptions" + }, + "sumOfSquaredDeviation": { + "description": "The sum of squared deviations from the mean of the values in the population. For values x_i this is:\nSum[i=1..n]((x_i - mean)^2)\nKnuth, \"The Art of Computer Programming\", Vol. 2, page 323, 3rd edition describes Welford's method for accumulating this sum in one pass.If count is zero then this field must be zero.", + "format": "double", + "type": "number" + } + }, + "id": "Distribution" + }, + "MonitoredResource": { + "type": "object", + "properties": { + "type": { + "description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels \"project_id\", \"instance_id\", and \"zone\".", + "type": "object" + } + }, + "id": "MonitoredResource", + "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"instance_id\" and \"zone\":\n{ \"type\": \"gce_instance\",\n \"labels\": { \"instance_id\": \"12345678901234\",\n \"zone\": \"us-central1-a\" }}\n" + }, + "ListMetricDescriptorsResponse": { + "description": "The ListMetricDescriptors response.", + "type": "object", + "properties": { + "metricDescriptors": { + "description": "The metric descriptors that are available to the project and that match the value of filter, if present.", + "type": "array", + "items": { + "$ref": "MetricDescriptor" + } + }, + "nextPageToken": { + "type": "string", + "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method." + } + }, + "id": "ListMetricDescriptorsResponse" + }, + "MonitoredResourceDescriptor": { + "description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of \"gce_instance\" and specifies the use of the labels \"instance_id\" and \"zone\" to identify particular VM instances.Different APIs can support different monitored resource types. APIs generally provide a list method that returns the monitored resource descriptors used by the API.", + "type": "object", + "properties": { + "name": { + "description": "Optional. The resource name of the monitored resource descriptor: \"projects/{project_id}/monitoredResourceDescriptors/{type}\" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format \"monitoredResourceDescriptors/{type}\".", + "type": "string" + }, + "displayName": { + "description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, \"Google Cloud SQL Database\".", + "type": "string" + }, + "description": { + "description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", + "type": "string" + }, + "type": { + "description": "Required. The monitored resource type. For example, the type \"cloudsql_database\" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters.", + "type": "string" + }, + "labels": { + "description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels \"database_id\" and \"zone\".", + "type": "array", + "items": { + "$ref": "LabelDescriptor" + } + } + }, + "id": "MonitoredResourceDescriptor" + }, + "TypedValue": { + "id": "TypedValue", + "description": "A single strongly-typed value.", + "type": "object", + "properties": { + "boolValue": { + "description": "A Boolean value: true or false.", + "type": "boolean" + }, + "stringValue": { + "description": "A variable-length string value.", + "type": "string" + }, + "doubleValue": { + "description": "A 64-bit double-precision floating-point number. Its magnitude is approximately ±10\u003csup\u003e±300\u003c/sup\u003e and it has 16 significant digits of precision.", + "format": "double", + "type": "number" + }, + "int64Value": { + "type": "string", + "description": "A 64-bit integer. Its range is approximately ±9.2x10\u003csup\u003e18\u003c/sup\u003e.", + "format": "int64" + }, + "distributionValue": { + "description": "A distribution value.", + "$ref": "Distribution" + } + } + }, + "CollectdPayload": { + "type": "object", + "properties": { + "values": { + "description": "The measured values during this time interval. Each value must have a different dataSourceName.", + "type": "array", + "items": { + "$ref": "CollectdValue" + } + }, + "typeInstance": { + "description": "The measurement type instance. Example: \"used\".", + "type": "string" + }, + "type": { + "description": "The measurement type. Example: \"memory\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "$ref": "TypedValue" + }, + "description": "The measurement metadata. Example: \"process_id\" -\u003e 12345", + "type": "object" + }, + "plugin": { + "description": "The name of the plugin. Example: \"disk\".", + "type": "string" + }, + "pluginInstance": { + "description": "The instance name of the plugin Example: \"hdcl\".", + "type": "string" + }, + "endTime": { + "description": "The end time of the interval.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "The start time of the interval.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "CollectdPayload", + "description": "A collection of data points sent from a collectd-based plugin. See the collectd documentation for more information." + }, + "Linear": { + "id": "Linear", + "description": "Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): offset + (width * i). Lower bound (1 \u003c= i \u003c N): offset + (width * (i - 1)).", + "type": "object", + "properties": { + "width": { + "description": "Must be greater than 0.", + "format": "double", + "type": "number" + }, + "offset": { + "description": "Lower bound of the first bucket.", + "format": "double", + "type": "number" + }, + "numFiniteBuckets": { + "description": "Must be greater than 0.", + "format": "int32", + "type": "integer" + } + } + }, + "Option": { + "properties": { + "value": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", + "type": "object" + }, + "name": { + "description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, \"map_entry\". For custom options, it should be the fully-qualified name. For example, \"google.api.http\".", + "type": "string" + } + }, + "id": "Option", + "description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", + "type": "object" + }, + "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:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "Explicit": { + "properties": { + "bounds": { + "description": "The values must be monotonically increasing.", + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "id": "Explicit", + "description": "Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): boundsi Lower bound (1 \u003c= i \u003c N); boundsi - 1The bounds field must contain at least one element. If bounds has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.", + "type": "object" + }, + "TimeInterval": { + "description": "A time interval extending just after a start time through an end time. If the start time is the same as the end time, then the interval represents a single point in time.", + "type": "object", + "properties": { + "endTime": { + "description": "Required. The end of the time interval.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "TimeInterval" + }, + "Exponential": { + "description": "Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): scale * (growth_factor ^ i). Lower bound (1 \u003c= i \u003c N): scale * (growth_factor ^ (i - 1)).", + "type": "object", + "properties": { + "growthFactor": { + "description": "Must be greater than 1.", + "format": "double", + "type": "number" + }, + "scale": { + "description": "Must be greater than 0.", + "format": "double", + "type": "number" + }, + "numFiniteBuckets": { + "type": "integer", + "description": "Must be greater than 0.", + "format": "int32" + } + }, + "id": "Exponential" + }, + "Point": { + "description": "A single data point in a time series.", + "type": "object", + "properties": { + "interval": { + "$ref": "TimeInterval", + "description": "The time interval to which the data point applies. For GAUGE metrics, only the end time of the interval is used. For DELTA metrics, the start and end time should specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For CUMULATIVE metrics, the start and end time should specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." + }, + "value": { + "$ref": "TypedValue", + "description": "The value of the data point." + } + }, + "id": "Point" }, "Field": { "description": "A single field of a message type.", "type": "object", "properties": { - "defaultValue": { - "description": "The string value of the default value of this field. Proto2 syntax only.", - "type": "string" - }, "jsonName": { "description": "The field JSON name.", "type": "string" }, - "options": { - "description": "The protocol buffer options.", - "type": "array", - "items": { - "$ref": "Option" - } - }, - "oneofIndex": { - "description": "The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", - "type": "integer", - "format": "int32" - }, - "cardinality": { - "description": "The field cardinality.", - "enum": [ - "CARDINALITY_UNKNOWN", - "CARDINALITY_OPTIONAL", - "CARDINALITY_REQUIRED", - "CARDINALITY_REPEATED" - ], - "enumDescriptions": [ - "For fields with unknown cardinality.", - "For optional fields.", - "For required fields. Proto2 syntax only.", - "For repeated fields." - ], - "type": "string" - }, - "typeUrl": { - "description": "The field type URL, without the scheme, for message or enumeration types. Example: \"type.googleapis.com/google.protobuf.Timestamp\".", - "type": "string" - }, - "name": { - "description": "The field name.", - "type": "string" - }, - "packed": { - "description": "Whether to use alternative packed wire representation.", - "type": "boolean" - }, - "number": { - "description": "The field number.", - "type": "integer", - "format": "int32" - }, "kind": { "description": "The field type.", - "enum": [ - "TYPE_UNKNOWN", - "TYPE_DOUBLE", - "TYPE_FLOAT", - "TYPE_INT64", - "TYPE_UINT64", - "TYPE_INT32", - "TYPE_FIXED64", - "TYPE_FIXED32", - "TYPE_BOOL", - "TYPE_STRING", - "TYPE_GROUP", - "TYPE_MESSAGE", - "TYPE_BYTES", - "TYPE_UINT32", - "TYPE_ENUM", - "TYPE_SFIXED32", - "TYPE_SFIXED64", - "TYPE_SINT32", - "TYPE_SINT64" - ], + "type": "string", "enumDescriptions": [ "Field type unknown.", "Field type double.", @@ -1338,129 +1246,27 @@ "Field type sint32.", "Field type sint64." ], - "type": "string" - } - }, - "id": "Field" - }, - "Option": { - "description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", - "type": "object", - "properties": { - "value": { - "description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "name": { - "description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, \"map_entry\". For custom options, it should be the fully-qualified name. For example, \"google.api.http\".", - "type": "string" - } - }, - "id": "Option" - }, - "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:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "SourceContext": { - "description": "SourceContext represents information about the source of a protobuf element, like the file in which it is defined.", - "type": "object", - "properties": { - "fileName": { - "description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: \"google/protobuf/source_context.proto\".", - "type": "string" - } - }, - "id": "SourceContext" - }, - "Range": { - "description": "The range of the population values.", - "type": "object", - "properties": { - "max": { - "description": "The maximum of the population values.", - "type": "number", - "format": "double" - }, - "min": { - "description": "The minimum of the population values.", - "type": "number", - "format": "double" - } - }, - "id": "Range" - }, - "CreateTimeSeriesRequest": { - "description": "The CreateTimeSeries request.", - "type": "object", - "properties": { - "timeSeries": { - "description": "The new data to be added to a list of time series. Adds at most one data point to each of several time series. The new data point must be more recent than any other point in its time series. Each TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.", - "type": "array", - "items": { - "$ref": "TimeSeries" - } - } - }, - "id": "CreateTimeSeriesRequest" - }, - "BucketOptions": { - "description": "A Distribution may optionally contain a histogram of the values in the population. The histogram is given in bucket_counts as counts of values that fall into one of a sequence of non-overlapping buckets. The sequence of buckets is described by bucket_options.A bucket specifies an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket is strictly greater than the lower bound.The sequence of N buckets for a Distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i \u003e 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.BucketOptions describes bucket boundaries in one of three ways. Two describe the boundaries by giving parameters for a formula to generate boundaries and one gives the bucket boundaries explicitly.If bucket_options is not given, then no bucket_counts may be given.", - "type": "object", - "properties": { - "explicitBuckets": { - "description": "The explicit buckets.", - "$ref": "Explicit" - }, - "exponentialBuckets": { - "description": "The exponential buckets.", - "$ref": "Exponential" - }, - "linearBuckets": { - "description": "The linear bucket.", - "$ref": "Linear" - } - }, - "id": "BucketOptions" - }, - "CreateCollectdTimeSeriesRequest": { - "description": "The CreateCollectdTimeSeries request.", - "type": "object", - "properties": { - "collectdPayloads": { - "description": "The collectd payloads representing the time series data. You must not include more than a single point for each time series, so no two payloads can have the same values for all of the fields plugin, plugin_instance, type, and type_instance.", - "type": "array", - "items": { - "$ref": "CollectdPayload" - } - }, - "collectdVersion": { - "description": "The version of collectd that collected the data. Example: \"5.3.0-192.el6\".", - "type": "string" - }, - "resource": { - "description": "The monitored resource associated with the time series.", - "$ref": "MonitoredResource" - } - }, - "id": "CreateCollectdTimeSeriesRequest" - }, - "Type": { - "description": "A protocol buffer message type.", - "type": "object", - "properties": { - "oneofs": { - "description": "The list of types appearing in oneof definitions in this type.", - "type": "array", - "items": { - "type": "string" - } + "enum": [ + "TYPE_UNKNOWN", + "TYPE_DOUBLE", + "TYPE_FLOAT", + "TYPE_INT64", + "TYPE_UINT64", + "TYPE_INT32", + "TYPE_FIXED64", + "TYPE_FIXED32", + "TYPE_BOOL", + "TYPE_STRING", + "TYPE_GROUP", + "TYPE_MESSAGE", + "TYPE_BYTES", + "TYPE_UINT32", + "TYPE_ENUM", + "TYPE_SFIXED32", + "TYPE_SFIXED64", + "TYPE_SINT32", + "TYPE_SINT64" + ] }, "options": { "description": "The protocol buffer options.", @@ -1469,9 +1275,125 @@ "$ref": "Option" } }, - "sourceContext": { - "description": "The source context.", - "$ref": "SourceContext" + "oneofIndex": { + "description": "The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", + "format": "int32", + "type": "integer" + }, + "cardinality": { + "enum": [ + "CARDINALITY_UNKNOWN", + "CARDINALITY_OPTIONAL", + "CARDINALITY_REQUIRED", + "CARDINALITY_REPEATED" + ], + "description": "The field cardinality.", + "type": "string", + "enumDescriptions": [ + "For fields with unknown cardinality.", + "For optional fields.", + "For required fields. Proto2 syntax only.", + "For repeated fields." + ] + }, + "packed": { + "description": "Whether to use alternative packed wire representation.", + "type": "boolean" + }, + "defaultValue": { + "description": "The string value of the default value of this field. Proto2 syntax only.", + "type": "string" + }, + "name": { + "description": "The field name.", + "type": "string" + }, + "typeUrl": { + "description": "The field type URL, without the scheme, for message or enumeration types. Example: \"type.googleapis.com/google.protobuf.Timestamp\".", + "type": "string" + }, + "number": { + "description": "The field number.", + "format": "int32", + "type": "integer" + } + }, + "id": "Field" + }, + "Metric": { + "properties": { + "type": { + "description": "An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.", + "type": "object" + } + }, + "id": "Metric", + "description": "A specific metric, identified by specifying values for all of the labels of a MetricDescriptor.", + "type": "object" + }, + "ListTimeSeriesResponse": { + "description": "The ListTimeSeries response.", + "type": "object", + "properties": { + "timeSeries": { + "description": "One or more time series that match the filter included in the request.", + "type": "array", + "items": { + "$ref": "TimeSeries" + } + }, + "nextPageToken": { + "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", + "type": "string" + } + }, + "id": "ListTimeSeriesResponse" + }, + "LabelDescriptor": { + "properties": { + "description": { + "description": "A human-readable description for the label.", + "type": "string" + }, + "valueType": { + "enumDescriptions": [ + "A variable-length string. This is the default.", + "Boolean; true or false.", + "A 64-bit signed integer." + ], + "enum": [ + "STRING", + "BOOL", + "INT64" + ], + "description": "The type of data that can be assigned to the label.", + "type": "string" + }, + "key": { + "description": "The label key.", + "type": "string" + } + }, + "id": "LabelDescriptor", + "description": "A description of a label.", + "type": "object" + }, + "Type": { + "type": "object", + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "Option" + }, + "description": "The protocol buffer options." }, "fields": { "description": "The list of fields.", @@ -1484,145 +1406,223 @@ "description": "The fully qualified message name.", "type": "string" }, + "oneofs": { + "description": "The list of types appearing in oneof definitions in this type.", + "type": "array", + "items": { + "type": "string" + } + }, + "sourceContext": { + "description": "The source context.", + "$ref": "SourceContext" + }, "syntax": { - "description": "The source syntax.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], "enumDescriptions": [ "Syntax proto2.", "Syntax proto3." ], + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax.", "type": "string" } }, - "id": "Type" + "id": "Type", + "description": "A protocol buffer message type." }, - "ListGroupsResponse": { - "description": "The ListGroups response.", + "Group": { + "id": "Group", + "description": "The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group. Groups can contain any number of monitored resources, and each monitored resource can be a member of any number of groups.Groups can be nested in parent-child hierarchies. The parentName field identifies an optional parent for each group. If a group has a parent, then the only monitored resources available to be matched by the group's filter are the resources contained in the parent group. In other words, a group contains the monitored resources that match its filter and the filters of all the group's ancestors. A group without a parent can contain any monitored resource.For example, consider an infrastructure running a set of instances with two user-defined tags: \"environment\" and \"role\". A parent group has a filter, environment=\"production\". A child of that parent group has a filter, role=\"transcoder\". The parent group contains all instances in the production environment, regardless of their roles. The child group contains instances that have the transcoder role and are in the production environment.The monitored resources contained in a group can change at any moment, depending on what resources exist and what filters are associated with the group and its ancestors.", "type": "object", "properties": { - "group": { - "description": "The groups that match the specified filters.", - "type": "array", - "items": { - "$ref": "Group" - } + "filter": { + "description": "The filter used to determine which monitored resources belong to this group.", + "type": "string" }, - "nextPageToken": { - "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", + "name": { + "description": "Output only. The name of this group. The format is \"projects/{project_id_or_number}/groups/{group_id}\". When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique {group_id} that is generated automatically.", + "type": "string" + }, + "parentName": { + "description": "The name of the group's parent, if it has one. The format is \"projects/{project_id_or_number}/groups/{group_id}\". For groups with no parent, parentName is the empty string, \"\".", + "type": "string" + }, + "displayName": { + "description": "A user-assigned name for this group, used only for display purposes.", + "type": "string" + }, + "isCluster": { + "description": "If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.", + "type": "boolean" + } + } + }, + "BucketOptions": { + "properties": { + "exponentialBuckets": { + "description": "The exponential buckets.", + "$ref": "Exponential" + }, + "linearBuckets": { + "$ref": "Linear", + "description": "The linear bucket." + }, + "explicitBuckets": { + "description": "The explicit buckets.", + "$ref": "Explicit" + } + }, + "id": "BucketOptions", + "description": "BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i \u003e 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.", + "type": "object" + }, + "CollectdValue": { + "description": "A single data point from a collectd-based plugin.", + "type": "object", + "properties": { + "value": { + "description": "The measurement value.", + "$ref": "TypedValue" + }, + "dataSourceType": { + "enumDescriptions": [ + "An unspecified data source type. This corresponds to google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.", + "An instantaneous measurement of a varying quantity. This corresponds to google.api.MetricDescriptor.MetricKind.GAUGE.", + "A cumulative value over time. This corresponds to google.api.MetricDescriptor.MetricKind.CUMULATIVE.", + "A rate of change of the measurement.", + "An amount of change since the last measurement interval. This corresponds to google.api.MetricDescriptor.MetricKind.DELTA." + ], + "enum": [ + "UNSPECIFIED_DATA_SOURCE_TYPE", + "GAUGE", + "COUNTER", + "DERIVE", + "ABSOLUTE" + ], + "description": "The type of measurement.", + "type": "string" + }, + "dataSourceName": { + "description": "The data source for the collectd value. For example there are two data sources for network measurements: \"rx\" and \"tx\".", "type": "string" } }, - "id": "ListGroupsResponse" + "id": "CollectdValue" + }, + "SourceContext": { + "description": "SourceContext represents information about the source of a protobuf element, like the file in which it is defined.", + "type": "object", + "properties": { + "fileName": { + "description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: \"google/protobuf/source_context.proto\".", + "type": "string" + } + }, + "id": "SourceContext" + }, + "MetricDescriptor": { + "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.", + "type": "object", + "properties": { + "metricKind": { + "description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric_kind and value_type might not be supported.", + "type": "string", + "enumDescriptions": [ + "Do not use this default value.", + "An instantaneous measurement of a value.", + "The change in a value during a time interval.", + "A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." + ], + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ] + }, + "description": { + "description": "A detailed description of the metric, which can be used in documentation.", + "type": "string" + }, + "displayName": { + "description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\".", + "type": "string" + }, + "unit": { + "type": "string", + "description": "The unit in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT)\nbit bit\nBy byte\ns second\nmin minute\nh hour\nd dayPrefixes (PREFIX)\nk kilo (10**3)\nM mega (10**6)\nG giga (10**9)\nT tera (10**12)\nP peta (10**15)\nE exa (10**18)\nZ zetta (10**21)\nY yotta (10**24)\nm milli (10**-3)\nu micro (10**-6)\nn nano (10**-9)\np pico (10**-12)\nf femto (10**-15)\na atto (10**-18)\nz zepto (10**-21)\ny yocto (10**-24)\nKi kibi (2**10)\nMi mebi (2**20)\nGi gibi (2**30)\nTi tebi (2**40)GrammarThe grammar includes the dimensionless unit 1, such as 1/s.The grammar also includes these connectors:\n/ division (as an infix operator, e.g. 1/s).\n. multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit is as follows:\nExpression = Component { \".\" Component } { \"/\" Component } ;\n\nComponent = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\nAnnotation = \"{\" NAME \"}\" ;\nNotes:\nAnnotation is just a comment if it follows a UNIT and is equivalent to 1 if it is used alone. For examples, {requests}/s == 1/s, By{transmitted}/s == By/s.\nNAME is a sequence of non-blank printable ASCII characters not containing '{' or '}'." + }, + "labels": { + "description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response_latencies metric type has a label for the HTTP response code, response_code, so you can look at latencies for successful responses or just for responses that failed.", + "type": "array", + "items": { + "$ref": "LabelDescriptor" + } + }, + "name": { + "description": "The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project my-project-id:\n\"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"\n", + "type": "string" + }, + "type": { + "description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined custom metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example:\n\"custom.googleapis.com/invoice/paid/amount\"\n\"appengine.googleapis.com/http/server/response_latencies\"\n", + "type": "string" + }, + "valueType": { + "description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric_kind and value_type might not be supported.", + "type": "string", + "enumDescriptions": [ + "Do not use this default value.", + "The value is a boolean. This value type can be used only if the metric kind is GAUGE.", + "The value is a signed 64-bit integer.", + "The value is a double precision floating point number.", + "The value is a text string. This value type can be used only if the metric kind is GAUGE.", + "The value is a Distribution.", + "The value is money." + ], + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "DOUBLE", + "STRING", + "DISTRIBUTION", + "MONEY" + ] + } + }, + "id": "MetricDescriptor" } }, - "revision": "20161212", - "basePath": "", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version_module": "True", + "protocol": "rest", "canonicalName": "Monitoring", - "discoveryVersion": "v1", - "baseUrl": "https://monitoring.googleapis.com/", - "name": "monitoring", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/monitoring": { + "description": "View and write monitoring data for all of your Google and third-party Cloud and API projects" + }, + "https://www.googleapis.com/auth/monitoring.write": { + "description": "Publish metric data to your Google Cloud projects" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/monitoring.read": { + "description": "View monitoring data for all of your Google Cloud and third-party projects" + } + } } }, - "documentationLink": "https://cloud.google.com/monitoring/api/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v3", "rootUrl": "https://monitoring.googleapis.com/", - "kind": "discovery#restDescription" + "ownerDomain": "google.com", + "name": "monitoring", + "batchPath": "batch", + "title": "Stackdriver Monitoring API" } diff --git a/etc/api/oauth2/v1/oauth2-api.json b/etc/api/oauth2/v1/oauth2-api.json index 1adf77f089..9838be754f 100644 --- a/etc/api/oauth2/v1/oauth2-api.json +++ b/etc/api/oauth2/v1/oauth2-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/ZNWWs55SDv_tc8yf5oM647SvRm8\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/yA-nmrGtGyV39fzR7zooTCbGs10\"", "discoveryVersion": "v1", "id": "oauth2:v1", "name": "oauth2", "version": "v1", - "revision": "20161103", + "revision": "20170509", "title": "Google OAuth2 API", "description": "Obtains end-user authorization grants for use with other Google APIs.", "ownerDomain": "google.com", diff --git a/etc/api/oauth2/v2/oauth2-api.json b/etc/api/oauth2/v2/oauth2-api.json index f1f8bebe89..277bbd1d2c 100644 --- a/etc/api/oauth2/v2/oauth2-api.json +++ b/etc/api/oauth2/v2/oauth2-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/DLGEtypjIuIXh77Iqrmfcan50ew\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/JnT6R6N-Azl-6h2VUiLhx9Ixv98\"", "discoveryVersion": "v1", "id": "oauth2:v2", "name": "oauth2", "version": "v2", - "revision": "20161103", + "revision": "20170509", "title": "Google OAuth2 API", "description": "Obtains end-user authorization grants for use with other Google APIs.", "ownerDomain": "google.com", diff --git a/etc/api/pagespeedonline/v1/pagespeedonline-api.json b/etc/api/pagespeedonline/v1/pagespeedonline-api.json index 4b3f08bf4b..1c410cc3d7 100644 --- a/etc/api/pagespeedonline/v1/pagespeedonline-api.json +++ b/etc/api/pagespeedonline/v1/pagespeedonline-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/FkGdm1NgZtAvow-TudpcDpRNyE0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/FkGdm1NgZtAvow-TudpcDpRNyE0\"", "discoveryVersion": "v1", "id": "pagespeedonline:v1", "name": "pagespeedonline", diff --git a/etc/api/pagespeedonline/v2/pagespeedonline-api.json b/etc/api/pagespeedonline/v2/pagespeedonline-api.json index ba342c8b1f..c7d6c91a5e 100644 --- a/etc/api/pagespeedonline/v2/pagespeedonline-api.json +++ b/etc/api/pagespeedonline/v2/pagespeedonline-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/5bET14Wb_tD2YUoj5aAgBlN7I1k\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/5bET14Wb_tD2YUoj5aAgBlN7I1k\"", "discoveryVersion": "v1", "id": "pagespeedonline:v2", "name": "pagespeedonline", diff --git a/etc/api/partners/v2/partners-api.json b/etc/api/partners/v2/partners-api.json index b1d188790f..234381b934 100644 --- a/etc/api/partners/v2/partners-api.json +++ b/etc/api/partners/v2/partners-api.json @@ -1,1379 +1,3616 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/IsLtDjyeCcVcrLheR4Lh75k5EO4\"", - "discoveryVersion": "v1", - "id": "partners:v2", - "name": "partners", - "version": "v2", - "revision": "20151009", - "title": "Google Partners API", - "description": "Lets advertisers search certified companies and create contact leads with them, and also audits the usage of clients.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/partners/", - "protocol": "rest", - "baseUrl": "https://partners.googleapis.com/", - "basePath": "", - "rootUrl": "https://partners.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "version_module": true, - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "schemas": { - "LogUserEventRequest": { - "id": "LogUserEventRequest", - "type": "object", - "description": "Request message for LogUserEvent.", - "properties": { - "requestMetadata": { - "$ref": "RequestMetadata", - "description": "Current request metadata." - }, - "eventAction": { - "type": "string", - "description": "The action that occurred.", - "enum": [ - "EVENT_ACTION_UNSPECIFIED", - "SMB_CLICKED_FIND_A_PARTNER_BUTTON_BOTTOM", - "SMB_CLICKED_FIND_A_PARTNER_BUTTON_TOP", - "AGENCY_CLICKED_JOIN_NOW_BUTTON_BOTTOM", - "AGENCY_CLICKED_JOIN_NOW_BUTTON_TOP", - "SMB_CANCELED_PARTNER_CONTACT_FORM", - "SMB_CLICKED_CONTACT_A_PARTNER", - "SMB_COMPLETED_PARTNER_CONTACT_FORM", - "SMB_ENTERED_EMAIL_IN_CONTACT_PARTNER_FORM", - "SMB_ENTERED_NAME_IN_CONTACT_PARTNER_FORM", - "SMB_ENTERED_PHONE_IN_CONTACT_PARTNER_FORM", - "SMB_FAILED_RECAPTCHA_IN_CONTACT_PARTNER_FORM", - "PARTNER_VIEWED_BY_SMB", - "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_GPS", - "SMB_CHANGED_A_SEARCH_PARAMETER_TOP", - "SMB_CLICKED_CONTACT_A_PARTNER_ON_GPS", - "SMB_CLICKED_SHOW_MORE_PARTNERS_BUTTON_BOTTOM", - "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_GPS", - "SMB_NO_PARTNERS_AVAILABLE_WITH_SEARCH_CRITERIA", - "SMB_PERFORMED_SEARCH_ON_GPS", - "SMB_VIEWED_A_PARTNER_ON_GPS", - "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE", - "SMB_CLICKED_CONTACT_A_PARTNER_ON_PROFILE_PAGE", - "SMB_CLICKED_PARTNER_WEBSITE", - "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE", - "SMB_VIEWED_A_PARTNER_PROFILE", - "AGENCY_CLICKED_ACCEPT_TOS_BUTTON", - "AGENCY_CHANGED_TOS_COUNTRY", - "AGENCY_ADDED_ADDRESS_IN_MY_PROFILE_PORTAL", - "AGENCY_ADDED_PHONE_NUMBER_IN_MY_PROFILE_PORTAL", - "AGENCY_CHANGED_PRIMARY_ACCOUNT_ASSOCIATION", - "AGENCY_CHANGED_PRIMARY_COUNTRY_ASSOCIATION", - "AGENCY_CLICKED_AFFILIATE_BUTTON_IN_MY_PROFILE_IN_PORTAL", - "AGENCY_CLICKED_GIVE_EDIT_ACCESS_IN_MY_PROFILE_PORTAL", - "AGENCY_CLICKED_LOG_OUT_IN_MY_PROFILE_PORTAL", - "AGENCY_CLICKED_MY_PROFILE_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_COMPLETE_PROFILE", - "AGENCY_CLICKED_UNAFFILIATE_IN_MY_PROFILE_PORTAL", - "AGENCY_FILLED_OUT_COMP_AFFILIATION_IN_MY_PROFILE_PORTAL", - "AGENCY_SUCCESSFULLY_CONNECTED_WITH_COMPANY_IN_MY_PROFILE", - "AGENCY_CLICKED_CREATE_MCC_IN_MY_PROFILE_PORTAL", - "AGENCY_DIDNT_HAVE_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE", - "AGENCY_HAD_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE", - "AGENCY_ADDED_JOB_FUNCTION_IN_MY_PROFILE_PORTAL", - "AGENCY_LOOKED_AT_JOB_FUNCTION_DROP_DOWN", - "AGENCY_SELECTED_ACCOUNT_MANAGER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_ACCOUNT_PLANNER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_ANALYTICS_AS_JOB_FUNCTION", - "AGENCY_SELECTED_CREATIVE_AS_JOB_FUNCTION", - "AGENCY_SELECTED_MEDIA_BUYER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_MEDIA_PLANNER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_OTHER_AS_JOB_FUNCTION", - "AGENCY_SELECTED_PRODUCTION_AS_JOB_FUNCTION", - "AGENCY_SELECTED_SEO_AS_JOB_FUNCTION", - "AGENCY_SELECTED_SALES_REP_AS_JOB_FUNCTION", - "AGENCY_SELECTED_SEARCH_SPECIALIST_AS_JOB_FUNCTION", - "AGENCY_ADDED_CHANNELS_IN_MY_PROFILE_PORTAL", - "AGENCY_LOOKED_AT_ADD_CHANNEL_DROP_DOWN", - "AGENCY_SELECTED_CROSS_CHANNEL_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_DISPLAY_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_MOBILE_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_SEARCH_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_SOCIAL_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_TOOLS_FROM_ADD_CHANNEL", - "AGENCY_SELECTED_YOUTUBE_FROM_ADD_CHANNEL", - "AGENCY_ADDED_INDUSTRIES_IN_MY_PROFILE_PORTAL", - "AGENCY_CHANGED_ADD_INDUSTRIES_DROP_DOWN", - "AGENCY_ADDED_MARKETS_IN_MY_PROFILE_PORTAL", - "AGENCY_CHANGED_ADD_MARKETS_DROP_DOWN", - "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_MYPROFILE", - "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_SIGNUP", - "AGENCY_SELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH", - "AGENCY_SELECTED_OPT_IN_BETA_TESTS_IN_MY_PROFILE_PORTAL", - "AGENCY_SELECTED_OPT_IN_NEWS_IN_MY_PROFILE_PORTAL", - "AGENCY_SELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS", - "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUG_IN_MY_PROFILE_PORTAL", - "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS", - "AGENCY_SELECTED_OPT_IN_SELECT_ALL_EMAIL_NOTIFICATIONS", - "AGENCY_SELECTED_SELECT_ALL_OPT_INS_IN_MY_PROFILE_PORTAL", - "AGENCY_CLICKED_BACK_BUTTON_ON_CONNECT_WITH_COMPANY", - "AGENCY_CLICKED_CONTINUE_TO_OVERVIEW_ON_CONNECT_WITH_COMPANY", - "AGECNY_CLICKED_CREATE_MCC_CONNECT_WITH_COMPANY_NOT_FOUND", - "AGECNY_CLICKED_GIVE_EDIT_ACCESS_CONNECT_WITH_COMPANY_NOT_FOUND", - "AGECNY_CLICKED_LOG_OUT_CONNECT_WITH_COMPANY_NOT_FOUND", - "AGENCY_CLICKED_SKIP_FOR_NOW_ON_CONNECT_WITH_COMPANY_PAGE", - "AGENCY_CLOSED_CONNECTED_TO_COMPANY_X_BUTTON_WRONG_COMPANY", - "AGENCY_COMPLETED_FIELD_CONNECT_WITH_COMPANY", - "AGECNY_FOUND_COMPANY_TO_CONNECT_WITH", - "AGENCY_SUCCESSFULLY_CREATED_COMPANY", - "AGENCY_ADDED_NEW_COMPANY_LOCATION", - "AGENCY_CLICKED_COMMUNITY_JOIN_NOW_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_CONNECT_TO_COMPANY_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_GET_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_GET_VIDEO_ADS_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_LINK_TO_MCC_LINK_IN_PORTAL_NOTIFICATIONS", - "AGENCY_CLICKED_INSIGHT_CONTENT_IN_PORTAL", - "AGENCY_CLICKED_INSIGHTS_VIEW_NOW_PITCH_DECKS_IN_PORTAL", - "AGENCY_CLICKED_INSIGHTS_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_INSIGHTS_UPLOAD_CONTENT", - "AGENCY_CLICKED_INSIGHTS_VIEWED_DEPRECATED", - "AGENCY_CLICKED_COMMUNITY_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_JOIN_COMMUNITY_BUTTON_COMMUNITY_PORTAL", - "AGENCY_CLICKED_CERTIFICATIONS_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_CERTIFICATIONS_PRODUCT_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_PARTNER_STATUS_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_PARTNER_STATUS_PRODUCT_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_OFFERS_LEFT_NAV_IN_PORTAL", - "AGENCY_CLICKED_SEND_BUTTON_ON_OFFERS_PAGE", - "AGENCY_CLICKED_EXAM_DETAILS_ON_CERT_ADWORDS_PAGE", - "AGENCY_CLICKED_SEE_EXAMS_CERTIFICATION_MAIN_PAGE", - "AGENCY_CLICKED_TAKE_EXAM_ON_CERT_EXAM_PAGE", - "AGENCY_OPENED_LAST_ADMIN_DIALOG", - "AGENCY_OPENED_DIALOG_WITH_NO_USERS", - "AGENCY_PROMOTED_USER_TO_ADMIN", - "AGENCY_UNAFFILIATED", - "AGENCY_CHANGED_ROLES", - "SMB_CLICKED_COMPANY_NAME_LINK_TO_PROFILE", - "SMB_VIEWED_ADWORDS_CERTIFICATE", - "SMB_CLICKED_ADWORDS_CERTIFICATE_HELP_ICON", - "SMB_VIEWED_ANALYTICS_CERTIFICATE", - "SMB_VIEWED_DOUBLECLICK_CERTIFICATE", - "SMB_VIEWED_VIDEO_ADS_CERTIFICATE", - "SMB_VIEWED_SHOPPING_CERTIFICATE", - "SMB_CLICKED_VIDEO_ADS_CERTIFICATE_HELP_ICON", - "CLICKED_HELP_AT_BOTTOM", - "CLICKED_HELP_AT_TOP", - "CLIENT_ERROR", - "AGENCY_CLICKED_LEFT_NAV_STORIES", - "CLICKED", - "SMB_VIEWED_MOBILE_CERTIFICATE", - "AGENCY_FAILED_COMPANY_VERIFICATION", - "VISITED_LANDING", - "VISITED_GPS", - "VISITED_AGENCY_PORTAL", - "CANCELLED_INDIVIDUAL_SIGN_UP", - "CANCELLED_COMPANY_SIGN_UP", - "AGENCY_CLICKED_SIGN_IN_BUTTON_TOP", - "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_INCOMPLETE_PROFILE", - "AGENCY_UNSELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS", - "AGENCY_UNSELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH", - "AGENCY_UNSELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS", - "AGENCY_SELECTED_OPT_OUT_UNSELECT_ALL_EMAIL_NOTIFICATIONS", - "AGENCY_LINKED_INDIVIDUAL_MCC", - "AGENCY_SUGGESTED_TO_USER", - "AGENCY_IGNORED_SUGGESTED_AGENCIES_AND_SEARCHED", - "AGENCY_PICKED_SUGGESTED_AGENCY", - "AGENCY_SEARCHED_FOR_AGENCIES", - "AGENCY_PICKED_SEARCHED_AGENCY", - "AGENCY_DISMISSED_AFFILIATION_WIDGET", - "AGENCY_CLICKED_INSIGHTS_DOWNLOAD_CONTENT", - "AGENCY_PROGRESS_INSIGHTS_VIEW_CONTENT", - "AGENCY_CLICKED_CANCEL_ACCEPT_TOS_BUTTON", - "SMB_ENTERED_WEBSITE_IN_CONTACT_PARTNER_FORM" - ] - }, - "eventCategory": { - "type": "string", - "description": "The category the action belongs to.", - "enum": [ - "EVENT_CATEGORY_UNSPECIFIED", - "GOOGLE_PARTNER_SEARCH", - "GOOGLE_PARTNER_SIGNUP_FLOW", - "GOOGLE_PARTNER_PORTAL", - "GOOGLE_PARTNER_PORTAL_MY_PROFILE", - "GOOGLE_PARTNER_PORTAL_CERTIFICATIONS", - "GOOGLE_PARTNER_PORTAL_COMMUNITY", - "GOOGLE_PARTNER_PORTAL_INSIGHTS", - "GOOGLE_PARTNER_PORTAL_CLIENTS", - "GOOGLE_PARTNER_PUBLIC_USER_PROFILE", - "GOOGLE_PARTNER_PANEL", - "GOOGLE_PARTNER_PORTAL_LAST_ADMIN_DIALOG", - "GOOGLE_PARTNER_CLIENT", - "GOOGLE_PARTNER_PORTAL_COMPANY_PROFILE", - "EXTERNAL_LINKS", - "GOOGLE_PARTNER_LANDING" - ] - }, - "eventScope": { - "type": "string", - "description": "The scope of the event.", - "enum": [ - "EVENT_SCOPE_UNSPECIFIED", - "VISITOR", - "SESSION", - "PAGE" - ] - }, - "eventDatas": { - "type": "array", - "description": "List of event data for the event.", - "items": { - "$ref": "EventData" - } - }, - "url": { - "type": "string", - "description": "The URL where the event occurred." - }, - "lead": { - "$ref": "Lead", - "description": "Advertiser lead information." - } - } - }, - "RequestMetadata": { - "id": "RequestMetadata", - "type": "object", - "description": "Common data that is in each API request.", - "properties": { - "userOverrides": { - "$ref": "UserOverrides", - "description": "Values to use instead of the user's respective defaults for the current request. These are only honored by whitelisted products." - }, - "locale": { - "type": "string", - "description": "Locale to use for the current request." - }, - "partnersSessionId": { - "type": "string", - "description": "Google Partners session ID." - }, - "experimentIds": { - "type": "array", - "description": "Experiment IDs the current request belongs to.", - "items": { - "type": "string" - } - }, - "trafficSource": { - "$ref": "TrafficSource", - "description": "Source of traffic for the current request." - } - } - }, - "UserOverrides": { - "id": "UserOverrides", - "type": "object", - "description": "Values to use instead of the user's respective defaults. These are only honored by whitelisted products.", - "properties": { - "ipAddress": { - "type": "string", - "description": "IP address to use instead of the user's geo-located IP address." - }, - "userId": { - "type": "string", - "description": "Logged-in user ID to impersonate instead of the user's ID." - } - } - }, - "TrafficSource": { - "id": "TrafficSource", - "type": "object", - "description": "Source of traffic for the current request.", - "properties": { - "trafficSourceId": { - "type": "string", - "description": "Identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us." - }, - "trafficSubId": { - "type": "string", - "description": "Second level identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us." - } - } - }, - "EventData": { - "id": "EventData", - "type": "object", - "description": "Key value data pair for an event.", - "properties": { - "key": { - "type": "string", - "description": "Data type.", - "enum": [ - "EVENT_DATA_TYPE_UNSPECIFIED", - "ACTION", - "AGENCY_ID", - "AGENCY_NAME", - "AGENCY_PHONE_NUMBER", - "AGENCY_WEBSITE", - "BUDGET", - "CENTER_POINT", - "CERTIFICATION", - "COMMENT", - "COUNTRY", - "CURRENCY", - "CURRENTLY_VIEWED_AGENCY_ID", - "DISTANCE", - "DISTANCE_TYPE", - "EXAM", - "HISTORY_TOKEN", - "IDENTIFIER", - "INDUSTRY", - "INSIGHT_TAG", - "LANGUAGE", - "LOCATION", - "MARKETING_OPT_IN", - "QUERY", - "SEARCH_START_INDEX", - "SERVICE", - "SHOW_VOW", - "SOLUTION", - "TRAFFIC_SOURCE_ID", - "TRAFFIC_SUB_ID", - "VIEW_PORT", - "WEBSITE", - "DETAILS", - "EXPERIMENT_ID", - "GPS_MOTIVATION", - "URL", - "ELEMENT_FOCUS", - "PROGRESS" - ] - }, - "values": { - "type": "array", - "description": "Data values.", - "items": { - "type": "string" - } - } - } - }, - "Lead": { - "id": "Lead", - "type": "object", - "description": "A lead resource that represents an advertiser contact for a `Company`. These are usually generated via Google Partner Search (the advertiser portal).", - "properties": { - "id": { - "type": "string", - "description": "ID of the lead." - }, - "type": { - "type": "string", - "description": "Type of lead.", - "enum": [ - "LEAD_TYPE_UNSPECIFIED", - "LT_GPS" - ] - }, - "email": { - "type": "string", - "description": "Email address of lead source." - }, - "givenName": { - "type": "string", - "description": "First name of lead source." - }, - "familyName": { - "type": "string", - "description": "Last name of lead source." - }, - "websiteUrl": { - "type": "string", - "description": "Website URL of lead source." - }, - "phoneNumber": { - "type": "string", - "description": "Phone number of lead source." - }, - "comments": { - "type": "string", - "description": "Comments lead source gave." - }, - "gpsMotivations": { - "type": "array", - "description": "List of reasons for using Google Partner Search and creating a lead.", - "enumDescriptions": [ - "Unchosen.", - "Advertiser needs help with their advertising.", - "Advertiser needs help with their website.", - "Advertiser does not have a website." - ], - "items": { - "type": "string", - "enum": [ - "GPS_MOTIVATION_UNSPECIFIED", - "GPSM_HELP_WITH_ADVERTISING", - "GPSM_HELP_WITH_WEBSITE", - "GPSM_NO_WEBSITE" - ] - } - }, - "minMonthlyBudget": { - "$ref": "Money", - "description": "The minimum monthly budget lead source is willing to spend." - } - } - }, - "Money": { - "id": "Money", - "type": "object", - "description": "Represents an amount of money with its currency type.", - "properties": { - "currencyCode": { - "type": "string", - "description": "The 3-letter currency code defined in ISO 4217." - }, - "units": { - "type": "string", - "description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", - "format": "int64" - }, - "nanos": { - "type": "integer", - "description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", - "format": "int32" - } - } - }, - "LogUserEventResponse": { - "id": "LogUserEventResponse", - "type": "object", - "description": "Response message for LogUserEvent.", - "properties": { - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." - } - } - }, - "ResponseMetadata": { - "id": "ResponseMetadata", - "type": "object", - "description": "Common data that is in each API response.", - "properties": { - "debugInfo": { - "$ref": "DebugInfo", - "description": "Debug information about this request." - } - } - }, - "DebugInfo": { - "id": "DebugInfo", - "type": "object", - "description": "Debug information about this request.", - "properties": { - "serverInfo": { - "type": "string", - "description": "Info about the server that serviced this request." - }, - "serviceUrl": { - "type": "string", - "description": "URL of the service that handled this request." - }, - "serverTraceInfo": { - "type": "string", - "description": "Server-side debug stack trace." - } - } - }, - "LogMessageRequest": { - "id": "LogMessageRequest", - "type": "object", - "description": "Request message for LogClientMessage.", - "properties": { - "requestMetadata": { - "$ref": "RequestMetadata", - "description": "Current request metadata." - }, - "level": { - "type": "string", - "description": "Message level of client message.", - "enum": [ - "MESSAGE_LEVEL_UNSPECIFIED", - "ML_FINE", - "ML_INFO", - "ML_WARNING", - "ML_SEVERE" - ] - }, - "details": { - "type": "string", - "description": "Details about the client message." - }, - "clientInfo": { - "type": "object", - "description": "Map of client info, such as URL, browser navigator, browser platform, etc.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "LogMessageResponse": { - "id": "LogMessageResponse", - "type": "object", - "description": "Response message for LogClientMessage.", - "properties": { - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." - } - } - }, - "ListUserStatesResponse": { - "id": "ListUserStatesResponse", - "type": "object", - "description": "Response message for ListUserStates.", - "properties": { - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." - }, - "userStates": { - "type": "array", - "description": "User's states.", - "enumDescriptions": [ - "Unchosen.", - "User must pass reCaptcha to contact a Partner via Google Partner Search." - ], - "items": { - "type": "string", - "enum": [ - "USER_STATE_UNSPECIFIED", - "US_REQUIRES_RECAPTCHA_FOR_GPS_CONTACT" - ] - } - } - } - }, - "GetCompanyResponse": { - "id": "GetCompanyResponse", - "type": "object", - "description": "Response message for GetCompany.", - "properties": { - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." - }, - "company": { - "$ref": "Company", - "description": "The company." - } - } - }, - "Company": { - "id": "Company", - "type": "object", - "description": "A company resource in the Google Partners API. Once certified, it qualifies for being searched by advertisers.", - "properties": { - "id": { - "type": "string", - "description": "The ID of the company." - }, - "name": { - "type": "string", - "description": "The name of the company." - }, - "localizedInfos": { - "type": "array", - "description": "The list of localized info for the company.", - "items": { - "$ref": "LocalizedCompanyInfo" - } - }, - "locations": { - "type": "array", - "description": "The list of company locations.", - "items": { - "$ref": "Location" - } - }, - "convertedMinMonthlyBudget": { - "$ref": "Money", - "description": "The minimum monthly budget that the company accepts for partner business, converted to the requested currency code." - }, - "originalMinMonthlyBudget": { - "$ref": "Money", - "description": "The unconverted minimum monthly budget that the company accepts for partner business." - }, - "publicProfile": { - "$ref": "PublicProfile", - "description": "Basic information from the company's public profile." - }, - "certificationStatuses": { - "type": "array", - "description": "The list of Google Partners certification statuses for the company.", - "items": { - "$ref": "CertificationStatus" - } - }, - "ranks": { - "type": "array", - "description": "Information related to the ranking of the company within the list of companies.", - "items": { - "$ref": "Rank" - } - }, - "websiteUrl": { - "type": "string", - "description": "URL of the company's website." - }, - "industries": { - "type": "array", - "description": "Industries the company can help with.", - "enumDescriptions": [ - "Unchosen.", - "The automotive industry.", - "The business-to-business industry.", - "The consumer packaged goods industry.", - "The education industry.", - "The finance industry.", - "The healthcare industry.", - "The media and entertainment industry.", - "The retail industry.", - "The technology industry.", - "The travel industry." - ], - "items": { - "type": "string", - "enum": [ - "INDUSTRY_UNSPECIFIED", - "I_AUTOMOTIVE", - "I_BUSINESS_TO_BUSINESS", - "I_CONSUMER_PACKAGED_GOODS", - "I_EDUCATION", - "I_FINANCE", - "I_HEALTHCARE", - "I_MEDIA_AND_ENTERTAINMENT", - "I_RETAIL", - "I_TECHNOLOGY", - "I_TRAVEL" - ] - } - }, - "services": { - "type": "array", - "description": "Services the company can help with.", - "enumDescriptions": [ - "Unchosen.", - "Help with advanced AdWords support.", - "Help with advertising on Google.", - "Help with an enhanced website.", - "Help with an online marketing plan.", - "Help with mobile and video ads." - ], - "items": { - "type": "string", - "enum": [ - "SERVICE_UNSPECIFIED", - "S_ADVANCED_ADWORDS_SUPPORT", - "S_ADVERTISING_ON_GOOGLE", - "S_AN_ENHANCED_WEBSITE", - "S_AN_ONLINE_MARKETING_PLAN", - "S_MOBILE_AND_VIDEO_ADS" - ] - } - } - } - }, - "LocalizedCompanyInfo": { - "id": "LocalizedCompanyInfo", - "type": "object", - "description": "The localized company information.", - "properties": { - "languageCode": { - "type": "string", - "description": "Language code of the localized company info, as defined by BCP 47 (IETF BCP 47, \"Tags for Identifying Languages\")." - }, - "displayName": { - "type": "string", - "description": "Localized display name." - }, - "overview": { - "type": "string", - "description": "Localized brief description that the company uses to advertise themselves." - }, - "countryCodes": { - "type": "array", - "description": "List of country codes for the localized company info.", - "items": { - "type": "string" - } - } - } - }, - "Location": { - "id": "Location", - "type": "object", - "description": "A location with address and geographic coordinates.", - "properties": { - "address": { - "type": "string", - "description": "The complete address of the location." - }, - "latLng": { - "$ref": "LatLng", - "description": "The latitude and longitude of the location, in degrees." - } - } - }, - "LatLng": { - "id": "LatLng", - "type": "object", - "description": "An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. Example of normalization code in Python: def NormalizeLongitude(longitude): \"\"\"Wrapsdecimal degrees longitude to [-180.0, 180.0].\"\"\" q, r = divmod(longitude, 360.0) if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0): return r - 360.0 return r def NormalizeLatLng(latitude, longitude): \"\"\"Wraps decimal degrees latitude and longitude to [-180.0, 180.0] and [-90.0, 90.0], respectively.\"\"\" r = latitude % 360.0 if r = 270.0: return r - 360, NormalizeLongitude(longitude) else: return 180 - r, NormalizeLongitude(longitude + 180.0) assert 180.0 == NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0) assert -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "properties": { - "latitude": { - "type": "number", - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "format": "double" - }, - "longitude": { - "type": "number", - "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", - "format": "double" - } - } - }, - "PublicProfile": { - "id": "PublicProfile", - "type": "object", - "description": "Basic information from a public profile.", - "properties": { - "id": { - "type": "string", - "description": "The ID which can be used to retrieve more details about the public profile." - }, - "displayName": { - "type": "string", - "description": "The display name of the public profile." - }, - "url": { - "type": "string", - "description": "The URL of the public profile." - }, - "displayImageUrl": { - "type": "string", - "description": "The URL to the main display image of the public profile." - } - } - }, - "CertificationStatus": { - "id": "CertificationStatus", - "type": "object", - "description": "Google Partners certification status.", - "properties": { - "type": { - "type": "string", - "description": "The type of the certification.", - "enum": [ - "CERTIFICATION_TYPE_UNSPECIFIED", - "CT_ADWORDS", - "CT_YOUTUBE", - "CT_VIDEOADS", - "CT_ANALYTICS", - "CT_DOUBLECLICK", - "CT_SHOPPING", - "CT_MOBILE" - ] - }, - "examStatuses": { - "type": "array", - "description": "List of certification exam statuses.", - "items": { - "$ref": "CertificationExamStatus" - } - }, - "isCertified": { - "type": "boolean", - "description": "Whether certification is passing." - } - } - }, - "CertificationExamStatus": { - "id": "CertificationExamStatus", - "type": "object", - "description": "Status for a Google Partners certification exam.", - "properties": { - "type": { - "type": "string", - "description": "The type of certification exam.", - "enum": [ - "CERTIFICATION_EXAM_TYPE_UNSPECIFIED", - "CET_ADWORDS_ADVANCED_SEARCH", - "CET_ADWORDS_ADVANCED_DISPLAY", - "CET_VIDEO_ADS", - "CET_ANALYTICS", - "CET_DOUBLECLICK", - "CET_SHOPPING", - "CET_MOBILE" - ] - }, - "numberUsersPass": { - "type": "integer", - "description": "The number of people who have passed the certification exam.", - "format": "int32" - } - } - }, - "Rank": { - "id": "Rank", - "type": "object", - "description": "Information related to ranking of results.", - "properties": { - "type": { - "type": "string", - "description": "The type of rank.", - "enum": [ - "RANK_TYPE_UNSPECIFIED", - "RT_FINAL_SCORE" - ] - }, - "value": { - "type": "number", - "description": "The numerical value of the rank.", - "format": "double" - } - } - }, - "ListCompaniesResponse": { - "id": "ListCompaniesResponse", - "type": "object", - "description": "Response message for ListCompanies.", - "properties": { - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." + "basePath": "", + "ownerDomain": "google.com", + "name": "partners", + "batchPath": "batch", + "revision": "20170503", + "documentationLink": "https://developers.google.com/partners/", + "id": "partners:v2", + "title": "Google Partners API", + "discoveryVersion": "v1", + "ownerName": "Google", + "version_module": "True", + "resources": { + "users": { + "methods": { + "createCompanyRelation": { + "response": { + "$ref": "CompanyRelation" + }, + "parameterOrder": [ + "userId" + ], + "httpMethod": "PUT", + "parameters": { + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, + "requestMetadata.userOverrides.ipAddress": { + "location": "query", + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string" + }, + "requestMetadata.experimentIds": { + "location": "query", + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true + }, + "userId": { + "location": "path", + "description": "The ID of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean\nthe currently authenticated user.", + "required": true, + "type": "string" + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/users/{userId}/companyRelation", + "path": "v2/users/{userId}/companyRelation", + "id": "partners.users.createCompanyRelation", + "description": "Creates a user's company relation. Affiliates the user to a company.", + "request": { + "$ref": "CompanyRelation" + } + }, + "deleteCompanyRelation": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "userId" + ], + "httpMethod": "DELETE", + "parameters": { + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "userId": { + "location": "path", + "description": "The ID of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean\nthe currently authenticated user.", + "required": true, + "type": "string" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/users/{userId}/companyRelation", + "path": "v2/users/{userId}/companyRelation", + "id": "partners.users.deleteCompanyRelation", + "description": "Deletes a user's company relation. Unaffiliaites the user from a company." + }, + "get": { + "flatPath": "v2/users/{userId}", + "id": "partners.users.get", + "path": "v2/users/{userId}", + "description": "Gets a user.", + "httpMethod": "GET", + "parameterOrder": [ + "userId" + ], + "response": { + "$ref": "User" + }, + "parameters": { + "requestMetadata.experimentIds": { + "location": "query", + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "userId": { + "description": "Identifier of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean the currently\nauthenticated user.", + "required": true, + "type": "string", + "location": "path" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "userView": { + "location": "query", + "enum": [ + "BASIC", + "PROFILE", + "PUBLIC_PROFILE" + ], + "description": "Specifies what parts of the user information to return.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "location": "query", + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string" + } + } + }, + "updateProfile": { + "httpMethod": "PATCH", + "parameterOrder": [], + "response": { + "$ref": "UserProfile" + }, + "parameters": { + "requestMetadata.experimentIds": { + "location": "query", + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/users/profile", + "id": "partners.users.updateProfile", + "path": "v2/users/profile", + "description": "Updates a user's profile. A user can only update their own profile and\nshould only be called within the context of a logged in user.", + "request": { + "$ref": "UserProfile" + } + } + } }, "companies": { - "type": "array", - "description": "The list of companies.", - "items": { - "$ref": "Company" - } - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve next page of results. Pass this value in the `ListCompaniesRequest.page_token` field in the subsequent call to ListCompanies to retrieve the next page of results." - } - } - }, - "CreateLeadRequest": { - "id": "CreateLeadRequest", - "type": "object", - "description": "Request message for CreateLead.", - "properties": { - "requestMetadata": { - "$ref": "RequestMetadata", - "description": "Current request metadata." - }, - "lead": { - "$ref": "Lead", - "description": "The lead resource. The `LeadType` must not be `LEAD_TYPE_UNSPECIFIED` and either `email` or `phone_number` must be provided." - }, - "recaptchaChallenge": { - "$ref": "RecaptchaChallenge", - "description": "reCaptcha challenge info." - } - } - }, - "RecaptchaChallenge": { - "id": "RecaptchaChallenge", - "type": "object", - "description": "reCaptcha challenge info.", - "properties": { - "id": { - "type": "string", - "description": "The ID of the reCaptcha challenge." - }, - "response": { - "type": "string", - "description": "The response to the reCaptcha challenge." - } - } - }, - "CreateLeadResponse": { - "id": "CreateLeadResponse", - "type": "object", - "description": "Response message for CreateLead. Debug information about this request.", - "properties": { - "responseMetadata": { - "$ref": "ResponseMetadata", - "description": "Current response metadata." - }, - "lead": { - "$ref": "Lead", - "description": "Lead that was created depending on the outcome of reCaptcha validation." - }, - "recaptchaStatus": { - "type": "string", - "description": "The outcome of reCaptcha validation.", - "enum": [ - "RECAPTCHA_STATUS_UNSPECIFIED", - "RS_NOT_NEEDED", - "RS_PASSED", - "RS_FAILED" - ] - } - } - } - }, - "resources": { - "userEvents": { - "methods": { - "log": { - "id": "partners.userEvents.log", - "path": "v2/userEvents:log", - "httpMethod": "POST", - "description": "Logs a user event.", - "request": { - "$ref": "LogUserEventRequest" - }, - "response": { - "$ref": "LogUserEventResponse" - } - } - } - }, - "clientMessages": { - "methods": { - "log": { - "id": "partners.clientMessages.log", - "path": "v2/clientMessages:log", - "httpMethod": "POST", - "description": "Logs a generic message from the client, such as `Failed to render component`, `Profile page is running slow`, `More than 500 users have accessed this result.`, etc.", - "request": { - "$ref": "LogMessageRequest" - }, - "response": { - "$ref": "LogMessageResponse" - } - } - } - }, - "userStates": { - "methods": { - "list": { - "id": "partners.userStates.list", - "path": "v2/userStates", - "httpMethod": "GET", - "description": "Lists states for current user.", - "parameters": { - "requestMetadata.userOverrides.ipAddress": { - "type": "string", - "description": "IP address to use instead of the user's geo-located IP address.", - "location": "query" - }, - "requestMetadata.userOverrides.userId": { - "type": "string", - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "location": "query" - }, - "requestMetadata.locale": { - "type": "string", - "description": "Locale to use for the current request.", - "location": "query" - }, - "requestMetadata.partnersSessionId": { - "type": "string", - "description": "Google Partners session ID.", - "location": "query" - }, - "requestMetadata.experimentIds": { - "type": "string", - "description": "Experiment IDs the current request belongs to.", - "repeated": true, - "location": "query" - }, - "requestMetadata.trafficSource.trafficSourceId": { - "type": "string", - "description": "Identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us.", - "location": "query" - }, - "requestMetadata.trafficSource.trafficSubId": { - "type": "string", - "description": "Second level identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us.", - "location": "query" - } - }, - "response": { - "$ref": "ListUserStatesResponse" - } - } - } - }, - "companies": { - "methods": { - "get": { - "id": "partners.companies.get", - "path": "v2/companies/{companyId}", - "httpMethod": "GET", - "description": "Gets a company.", - "parameters": { - "companyId": { - "type": "string", - "description": "The ID of the company to retrieve.", - "required": true, - "location": "path" - }, - "requestMetadata.userOverrides.ipAddress": { - "type": "string", - "description": "IP address to use instead of the user's geo-located IP address.", - "location": "query" - }, - "requestMetadata.userOverrides.userId": { - "type": "string", - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "location": "query" - }, - "requestMetadata.locale": { - "type": "string", - "description": "Locale to use for the current request.", - "location": "query" - }, - "requestMetadata.partnersSessionId": { - "type": "string", - "description": "Google Partners session ID.", - "location": "query" - }, - "requestMetadata.experimentIds": { - "type": "string", - "description": "Experiment IDs the current request belongs to.", - "repeated": true, - "location": "query" - }, - "requestMetadata.trafficSource.trafficSourceId": { - "type": "string", - "description": "Identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us.", - "location": "query" - }, - "requestMetadata.trafficSource.trafficSubId": { - "type": "string", - "description": "Second level identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us.", - "location": "query" - }, - "view": { - "type": "string", - "description": "The view of `Company` resource to be returned. This must not be `COMPANY_VIEW_UNSPECIFIED`.", - "enum": [ - "COMPANY_VIEW_UNSPECIFIED", - "CV_GOOGLE_PARTNER_SEARCH" - ], - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "How to order addresses within the returned company. Currently, only `address` and `address desc` is supported which will sorted by closest to farthest in distance from given address and farthest to closest distance from given address respectively.", - "location": "query" - }, - "currencyCode": { - "type": "string", - "description": "If the company's budget is in a different currency code than this one, then the converted budget is converted to this currency code.", - "location": "query" - }, - "address": { - "type": "string", - "description": "The address to use for sorting the company's addresses by proximity. If not given, the geo-located address of the request is used. Used when order_by is set.", - "location": "query" - } - }, - "parameterOrder": [ - "companyId" - ], - "response": { - "$ref": "GetCompanyResponse" - } - }, - "list": { - "id": "partners.companies.list", - "path": "v2/companies", - "httpMethod": "GET", - "description": "Lists companies.", - "parameters": { - "requestMetadata.userOverrides.ipAddress": { - "type": "string", - "description": "IP address to use instead of the user's geo-located IP address.", - "location": "query" - }, - "requestMetadata.userOverrides.userId": { - "type": "string", - "description": "Logged-in user ID to impersonate instead of the user's ID.", - "location": "query" - }, - "requestMetadata.locale": { - "type": "string", - "description": "Locale to use for the current request.", - "location": "query" - }, - "requestMetadata.partnersSessionId": { - "type": "string", - "description": "Google Partners session ID.", - "location": "query" - }, - "requestMetadata.experimentIds": { - "type": "string", - "description": "Experiment IDs the current request belongs to.", - "repeated": true, - "location": "query" - }, - "requestMetadata.trafficSource.trafficSourceId": { - "type": "string", - "description": "Identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us.", - "location": "query" - }, - "requestMetadata.trafficSource.trafficSubId": { - "type": "string", - "description": "Second level identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Requested page size. Server may return fewer companies than requested. If unspecified, server picks an appropriate default.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A token identifying a page of results that the server returns. Typically, this is the value of `ListCompaniesResponse.next_page_token` returned from the previous call to ListCompanies.", - "location": "query" - }, - "companyName": { - "type": "string", - "description": "Company name to search for.", - "location": "query" - }, - "view": { - "type": "string", - "description": "The view of the `Company` resource to be returned. This must not be `COMPANY_VIEW_UNSPECIFIED`.", - "enum": [ - "COMPANY_VIEW_UNSPECIFIED", - "CV_GOOGLE_PARTNER_SEARCH" - ], - "location": "query" - }, - "minMonthlyBudget.currencyCode": { - "type": "string", - "description": "The 3-letter currency code defined in ISO 4217.", - "location": "query" - }, - "minMonthlyBudget.units": { - "type": "string", - "description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", - "format": "int64", - "location": "query" - }, - "minMonthlyBudget.nanos": { - "type": "integer", - "description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", - "format": "int32", - "location": "query" - }, - "maxMonthlyBudget.currencyCode": { - "type": "string", - "description": "The 3-letter currency code defined in ISO 4217.", - "location": "query" - }, - "maxMonthlyBudget.units": { - "type": "string", - "description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", - "format": "int64", - "location": "query" - }, - "maxMonthlyBudget.nanos": { - "type": "integer", - "description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", - "format": "int32", - "location": "query" - }, - "industries": { - "type": "string", - "description": "List of industries the company can help with.", - "enum": [ - "INDUSTRY_UNSPECIFIED", - "I_AUTOMOTIVE", - "I_BUSINESS_TO_BUSINESS", - "I_CONSUMER_PACKAGED_GOODS", - "I_EDUCATION", - "I_FINANCE", - "I_HEALTHCARE", - "I_MEDIA_AND_ENTERTAINMENT", - "I_RETAIL", - "I_TECHNOLOGY", - "I_TRAVEL" - ], - "repeated": true, - "location": "query" - }, - "services": { - "type": "string", - "description": "List of services the company can help with.", - "enum": [ - "SERVICE_UNSPECIFIED", - "S_ADVANCED_ADWORDS_SUPPORT", - "S_ADVERTISING_ON_GOOGLE", - "S_AN_ENHANCED_WEBSITE", - "S_AN_ONLINE_MARKETING_PLAN", - "S_MOBILE_AND_VIDEO_ADS" - ], - "repeated": true, - "location": "query" - }, - "languageCodes": { - "type": "string", - "description": "List of language codes that company can support. Only primary language subtags are accepted as defined by BCP 47 (IETF BCP 47, \"Tags for Identifying Languages\").", - "repeated": true, - "location": "query" - }, - "address": { - "type": "string", - "description": "The address to use when searching for companies. If not given, the geo-located address of the request is used.", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "How to order addresses within the returned companies. Currently, only `address` and `address desc` is supported which will sorted by closest to farthest in distance from given address and farthest to closest distance from given address respectively.", - "location": "query" - }, - "gpsMotivations": { - "type": "string", - "description": "List of reasons for using Google Partner Search to get companies.", - "enum": [ - "GPS_MOTIVATION_UNSPECIFIED", - "GPSM_HELP_WITH_ADVERTISING", - "GPSM_HELP_WITH_WEBSITE", - "GPSM_NO_WEBSITE" - ], - "repeated": true, - "location": "query" - }, - "websiteUrl": { - "type": "string", - "description": "Website URL that will help to find a better matched company. .", - "location": "query" - } - }, - "response": { - "$ref": "ListCompaniesResponse" - } - } - }, - "resources": { - "leads": { - "methods": { - "create": { - "id": "partners.companies.leads.create", - "path": "v2/companies/{companyId}/leads", - "httpMethod": "POST", - "description": "Creates an advertiser lead for the given company ID.", - "parameters": { - "companyId": { - "type": "string", - "description": "The ID of the company to contact.", - "required": true, - "location": "path" + "methods": { + "get": { + "flatPath": "v2/companies/{companyId}", + "id": "partners.companies.get", + "path": "v2/companies/{companyId}", + "description": "Gets a company.", + "httpMethod": "GET", + "parameterOrder": [ + "companyId" + ], + "response": { + "$ref": "GetCompanyResponse" + }, + "parameters": { + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "location": "query", + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string" + }, + "companyId": { + "location": "path", + "description": "The ID of the company to retrieve.", + "required": true, + "type": "string" + }, + "currencyCode": { + "location": "query", + "description": "If the company's budget is in a different currency code than this one, then\nthe converted budget is converted to this currency code.", + "type": "string" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "orderBy": { + "description": "How to order addresses within the returned company. Currently, only\n`address` and `address desc` is supported which will sorted by closest to\nfarthest in distance from given address and farthest to closest distance\nfrom given address respectively.", + "type": "string", + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "view": { + "description": "The view of `Company` resource to be returned. This must not be\n`COMPANY_VIEW_UNSPECIFIED`.", + "type": "string", + "location": "query", + "enum": [ + "COMPANY_VIEW_UNSPECIFIED", + "CV_GOOGLE_PARTNER_SEARCH" + ] + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "address": { + "description": "The address to use for sorting the company's addresses by proximity.\nIf not given, the geo-located address of the request is used.\nUsed when order_by is set.", + "type": "string", + "location": "query" + } + } + }, + "list": { + "description": "Lists companies.", + "response": { + "$ref": "ListCompaniesResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, + "companyName": { + "description": "Company name to search for.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListCompaniesResponse.next_page_token`\nreturned from the previous call to\nListCompanies.", + "type": "string" + }, + "industries": { + "location": "query", + "enum": [ + "INDUSTRY_UNSPECIFIED", + "I_AUTOMOTIVE", + "I_BUSINESS_TO_BUSINESS", + "I_CONSUMER_PACKAGED_GOODS", + "I_EDUCATION", + "I_FINANCE", + "I_HEALTHCARE", + "I_MEDIA_AND_ENTERTAINMENT", + "I_RETAIL", + "I_TECHNOLOGY", + "I_TRAVEL" + ], + "description": "List of industries the company can help with.", + "type": "string", + "repeated": true + }, + "websiteUrl": { + "location": "query", + "description": "Website URL that will help to find a better matched company.\n.", + "type": "string" + }, + "gpsMotivations": { + "description": "List of reasons for using Google Partner Search to get companies.", + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "GPS_MOTIVATION_UNSPECIFIED", + "GPSM_HELP_WITH_ADVERTISING", + "GPSM_HELP_WITH_WEBSITE", + "GPSM_NO_WEBSITE" + ] + }, + "languageCodes": { + "description": "List of language codes that company can support. Only primary language\nsubtags are accepted as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", + "type": "string", + "repeated": true, + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Requested page size. Server may return fewer companies than requested.\nIf unspecified, server picks an appropriate default.", + "format": "int32", + "type": "integer" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "orderBy": { + "description": "How to order addresses within the returned companies. Currently, only\n`address` and `address desc` is supported which will sorted by closest to\nfarthest in distance from given address and farthest to closest distance\nfrom given address respectively.", + "type": "string", + "location": "query" + }, + "specializations": { + "description": "List of specializations that the returned agencies should provide. If this\nis not empty, any returned agency must have at least one of these\nspecializations, or one of the services in the \"services\" field.", + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "BADGE_SPECIALIZATION_UNKNOWN", + "BADGE_SPECIALIZATION_ADWORDS_SEARCH", + "BADGE_SPECIALIZATION_ADWORDS_DISPLAY", + "BADGE_SPECIALIZATION_ADWORDS_MOBILE", + "BADGE_SPECIALIZATION_ADWORDS_VIDEO", + "BADGE_SPECIALIZATION_ADWORDS_SHOPPING" + ] + }, + "maxMonthlyBudget.currencyCode": { + "location": "query", + "description": "The 3-letter currency code defined in ISO 4217.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "minMonthlyBudget.currencyCode": { + "description": "The 3-letter currency code defined in ISO 4217.", + "type": "string", + "location": "query" + }, + "view": { + "description": "The view of the `Company` resource to be returned. This must not be\n`COMPANY_VIEW_UNSPECIFIED`.", + "type": "string", + "location": "query", + "enum": [ + "COMPANY_VIEW_UNSPECIFIED", + "CV_GOOGLE_PARTNER_SEARCH" + ] + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "address": { + "description": "The address to use when searching for companies.\nIf not given, the geo-located address of the request is used.", + "type": "string", + "location": "query" + }, + "minMonthlyBudget.units": { + "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", + "format": "int64", + "type": "string", + "location": "query" + }, + "maxMonthlyBudget.nanos": { + "location": "query", + "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "format": "int32", + "type": "integer" + }, + "services": { + "location": "query", + "enum": [ + "SERVICE_UNSPECIFIED", + "S_ADVANCED_ADWORDS_SUPPORT", + "S_ADVERTISING_ON_GOOGLE", + "S_AN_ENHANCED_WEBSITE", + "S_AN_ONLINE_MARKETING_PLAN", + "S_MOBILE_AND_VIDEO_ADS", + "S_MOBILE_WEBSITE_SERVICES" + ], + "description": "List of services that the returned agencies should provide. If this is\nnot empty, any returned agency must have at least one of these services,\nor one of the specializations in the \"specializations\" field.", + "type": "string", + "repeated": true + }, + "maxMonthlyBudget.units": { + "location": "query", + "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", + "format": "int64", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "minMonthlyBudget.nanos": { + "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v2/companies", + "path": "v2/companies", + "id": "partners.companies.list" + } + }, + "resources": { + "leads": { + "methods": { + "create": { + "request": { + "$ref": "CreateLeadRequest" + }, + "description": "Creates an advertiser lead for the given company ID.", + "httpMethod": "POST", + "parameterOrder": [ + "companyId" + ], + "response": { + "$ref": "CreateLeadResponse" + }, + "parameters": { + "companyId": { + "description": "The ID of the company to contact.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v2/companies/{companyId}/leads", + "id": "partners.companies.leads.create", + "path": "v2/companies/{companyId}/leads" + } + } + } + } + }, + "userEvents": { + "methods": { + "log": { + "flatPath": "v2/userEvents:log", + "path": "v2/userEvents:log", + "id": "partners.userEvents.log", + "request": { + "$ref": "LogUserEventRequest" + }, + "description": "Logs a user event.", + "response": { + "$ref": "LogUserEventResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {} + } + } + }, + "clientMessages": { + "methods": { + "log": { + "response": { + "$ref": "LogMessageResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "flatPath": "v2/clientMessages:log", + "path": "v2/clientMessages:log", + "id": "partners.clientMessages.log", + "request": { + "$ref": "LogMessageRequest" + }, + "description": "Logs a generic message from the client, such as\n`Failed to render component`, `Profile page is running slow`,\n`More than 500 users have accessed this result.`, etc." + } + } + }, + "exams": { + "methods": { + "getToken": { + "description": "Gets an Exam Token for a Partner's user to take an exam in the Exams System", + "response": { + "$ref": "ExamToken" + }, + "parameterOrder": [ + "examType" + ], + "httpMethod": "GET", + "parameters": { + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "examType": { + "location": "path", + "enum": [ + "CERTIFICATION_EXAM_TYPE_UNSPECIFIED", + "CET_ADWORDS_FUNDAMENTALS", + "CET_ADWORDS_ADVANCED_SEARCH", + "CET_ADWORDS_ADVANCED_DISPLAY", + "CET_VIDEO_ADS", + "CET_DOUBLECLICK", + "CET_ANALYTICS", + "CET_SHOPPING", + "CET_MOBILE", + "CET_DIGITAL_SALES", + "CET_MOBILE_SITES" + ], + "description": "The exam type we are requesting a token for.", + "required": true, + "type": "string" + } + }, + "flatPath": "v2/exams/{examType}/token", + "path": "v2/exams/{examType}/token", + "id": "partners.exams.getToken" + } + } + }, + "leads": { + "methods": { + "list": { + "description": "Lists advertiser leads for a user's associated company.\nShould only be called within the context of an authorized logged in user.", + "response": { + "$ref": "ListLeadsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "description": "Requested page size. Server may return fewer leads than requested.\nIf unspecified, server picks an appropriate default.", + "format": "int32", + "type": "integer" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "location": "query", + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true + }, + "orderBy": { + "description": "How to order Leads. Currently, only `create_time`\nand `create_time desc` are supported", + "type": "string", + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "pageToken": { + "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListLeadsResponse.next_page_token`\nreturned from the previous call to\nListLeads.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/leads", + "path": "v2/leads", + "id": "partners.leads.list" + } + } + }, + "offers": { + "methods": { + "list": { + "response": { + "$ref": "ListOffersResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/offers", + "path": "v2/offers", + "id": "partners.offers.list", + "description": "Lists the Offers available for the current user" + } + }, + "resources": { + "history": { + "methods": { + "list": { + "description": "Lists the Historical Offers for the current user (or user's entire company)", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListOffersHistoryResponse" + }, + "parameters": { + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "Token to retrieve a specific page.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of rows to return per page.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "entireCompany": { + "location": "query", + "description": "if true, show history for the entire company. Requires user to be admin.", + "type": "boolean" + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "orderBy": { + "description": "Comma-separated list of fields to order by, e.g.: \"foo,bar,baz\".\nUse \"foo desc\" to sort descending.\nList of valid field names is: name, offer_code, expiration_time, status,\n last_modified_time, sender_name, creation_time, country_code,\n offer_type.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/offers/history", + "id": "partners.offers.history.list", + "path": "v2/offers/history" + } + } + } + } + }, + "userStates": { + "methods": { + "list": { + "description": "Lists states for current user.", + "response": { + "$ref": "ListUserStatesResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "location": "query", + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v2/userStates", + "path": "v2/userStates", + "id": "partners.userStates.list" + } + } + }, + "analytics": { + "methods": { + "list": { + "flatPath": "v2/analytics", + "path": "v2/analytics", + "id": "partners.analytics.list", + "description": "Lists analytics data for a user's associated company.\nShould only be called within the context of an authorized logged in user.", + "response": { + "$ref": "ListAnalyticsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "requestMetadata.experimentIds": { + "location": "query", + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListAnalyticsResponse.next_page_token`\nreturned from the previous call to\nListAnalytics.\nWill be a date string in `YYYY-MM-DD` format representing the end date\nof the date range of results to return.\nIf unspecified or set to \"\", default value is the current date.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Requested page size. Server may return fewer analytics than requested.\nIf unspecified or set to 0, default value is 30.\nSpecifies the number of days in the date range when querying analytics.\nThe `page_token` represents the end date of the date range\nand the start date is calculated using the `page_size` as the number\nof days BEFORE the end date.\nMust be a non-negative integer.", + "format": "int32", + "type": "integer" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "location": "query", + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string" + } + } + } + } + }, + "v2": { + "methods": { + "getPartnersstatus": { + "flatPath": "v2/partnersstatus", + "path": "v2/partnersstatus", + "id": "partners.getPartnersstatus", + "description": "Gets Partners Status of the logged in user's agency.\nShould only be called if the logged in user is the admin of the agency.", + "response": { + "$ref": "GetPartnersStatusResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, + "requestMetadata.userOverrides.ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + } + } + }, + "updateLeads": { + "flatPath": "v2/leads", + "path": "v2/leads", + "id": "partners.updateLeads", + "request": { + "$ref": "Lead" + }, + "description": "Updates the specified lead.", + "response": { + "$ref": "Lead" + }, + "parameterOrder": [], + "httpMethod": "PATCH", + "parameters": { + "updateMask": { + "location": "query", + "description": "Standard field mask for the set of fields to be updated.\nRequired with at least 1 value in FieldMask's paths.\nOnly `state` and `adwords_customer_id` are currently supported.", + "format": "google-fieldmask", + "type": "string" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.userId": { + "location": "query", + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + }, + "requestMetadata.trafficSource.trafficSourceId": { + "location": "query", + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.locale": { + "description": "Locale to use for the current request.", + "type": "string", + "location": "query" + }, + "requestMetadata.userOverrides.ipAddress": { + "location": "query", + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string" + } + } + }, + "updateCompanies": { + "description": "Update company.\nShould only be called within the context of an authorized logged in user.", + "request": { + "$ref": "Company" + }, + "httpMethod": "PATCH", + "parameterOrder": [], + "response": { + "$ref": "Company" + }, + "parameters": { + "requestMetadata.trafficSource.trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string", + "location": "query" + }, + "requestMetadata.locale": { + "location": "query", + "description": "Locale to use for the current request.", + "type": "string" + }, + "requestMetadata.userOverrides.ipAddress": { + "location": "query", + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string" + }, + "updateMask": { + "description": "Standard field mask for the set of fields to be updated.\nRequired with at least 1 value in FieldMask's paths.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + }, + "requestMetadata.experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "string", + "repeated": true, + "location": "query" + }, + "requestMetadata.trafficSource.trafficSubId": { + "location": "query", + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "requestMetadata.userOverrides.userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string", + "location": "query" + }, + "requestMetadata.partnersSessionId": { + "location": "query", + "description": "Google Partners session ID.", + "type": "string" + } + }, + "flatPath": "v2/companies", + "id": "partners.updateCompanies", + "path": "v2/companies" } - }, - "parameterOrder": [ - "companyId" - ], - "request": { - "$ref": "CreateLeadRequest" - }, - "response": { - "$ref": "CreateLeadResponse" - } } - } } - } - } - } + }, + "parameters": { + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "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", + "location": "query" + }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + } + }, + "schemas": { + "Certification": { + "description": "A user's information on a specific certification.", + "type": "object", + "properties": { + "achieved": { + "description": "Whether this certification has been achieved.", + "type": "boolean" + }, + "expiration": { + "description": "Date this certification is due to expire.", + "format": "google-datetime", + "type": "string" + }, + "warning": { + "description": "Whether this certification is in the state of warning.", + "type": "boolean" + }, + "certificationType": { + "description": "The type of certification, the area of expertise.", + "type": "string", + "enumDescriptions": [ + "Unchosen.", + "AdWords certified.", + "YouTube certified.", + "VideoAds certified.", + "Analytics certified.", + "DoubleClick certified.", + "Shopping certified.", + "Mobile certified.", + "Digital sales certified.", + "AdWords Search certified.", + "AdWords Display certified.", + "Mobile Sites certified." + ], + "enum": [ + "CERTIFICATION_TYPE_UNSPECIFIED", + "CT_ADWORDS", + "CT_YOUTUBE", + "CT_VIDEOADS", + "CT_ANALYTICS", + "CT_DOUBLECLICK", + "CT_SHOPPING", + "CT_MOBILE", + "CT_DIGITAL_SALES", + "CT_ADWORDS_SEARCH", + "CT_ADWORDS_DISPLAY", + "CT_MOBILE_SITES" + ] + }, + "lastAchieved": { + "description": "The date the user last achieved certification.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "Certification" + }, + "User": { + "description": "A resource representing a user of the Partners platform.", + "type": "object", + "properties": { + "publicProfile": { + "description": "Information about a user's external public profile outside Google Partners.", + "$ref": "PublicProfile" + }, + "companyVerificationEmail": { + "description": "The email address used by the user used for company verification.\n@OutputOnly", + "type": "string" + }, + "certificationStatus": { + "description": "The list of achieved certifications. These are calculated based on exam\nresults and other requirements.\n@OutputOnly", + "type": "array", + "items": { + "$ref": "Certification" + } + }, + "company": { + "description": "The company that the user is associated with.\nIf not present, the user is not associated with any company.", + "$ref": "CompanyRelation" + }, + "profile": { + "description": "The profile information of a Partners user, contains all the directly\neditable user information.", + "$ref": "UserProfile" + }, + "lastAccessTime": { + "description": "The most recent time the user interacted with the Partners site.\n@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "availableAdwordsManagerAccounts": { + "description": "This is the list of AdWords Manager Accounts the user has edit access to.\nIf the user has edit access to multiple accounts, the user can choose the\npreferred account and we use this when a personal account is needed. Can\nbe empty meaning the user has access to no accounts.\n@OutputOnly", + "type": "array", + "items": { + "$ref": "AdWordsManagerAccountInfo" + } + }, + "primaryEmails": { + "description": "The list of emails the user has access to/can select as primary.\n@OutputOnly", + "type": "array", + "items": { + "type": "string" + } + }, + "examStatus": { + "description": "The list of exams the user ever taken. For each type of exam, only one\nentry is listed.", + "type": "array", + "items": { + "$ref": "ExamStatus" + } + }, + "id": { + "description": "The ID of the user.", + "type": "string" + } + }, + "id": "User" + }, + "ListAnalyticsResponse": { + "description": "Response message for\nListAnalytics.", + "type": "object", + "properties": { + "analytics": { + "description": "The list of analytics.\nSorted in ascending order of\nAnalytics.event_date.", + "type": "array", + "items": { + "$ref": "Analytics" + } + }, + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the `ListAnalyticsRequest.page_token` field in the\nsubsequent call to\nListAnalytics to retrieve the\nnext page of results.", + "type": "string" + }, + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + }, + "analyticsSummary": { + "description": "Aggregated information across the response's\nanalytics.", + "$ref": "AnalyticsSummary" + } + }, + "id": "ListAnalyticsResponse" + }, + "ListLeadsResponse": { + "description": "Response message for ListLeads.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the `ListLeadsRequest.page_token` field in the\nsubsequent call to\nListLeads to retrieve the\nnext page of results.", + "type": "string" + }, + "responseMetadata": { + "description": "Current response metadata.", + "$ref": "ResponseMetadata" + }, + "totalSize": { + "description": "The total count of leads for the given company.", + "format": "int32", + "type": "integer" + }, + "leads": { + "description": "The list of leads.", + "type": "array", + "items": { + "$ref": "Lead" + } + } + }, + "id": "ListLeadsResponse" + }, + "Company": { + "description": "A company resource in the Google Partners API. Once certified, it qualifies\nfor being searched by advertisers.", + "type": "object", + "properties": { + "publicProfile": { + "$ref": "PublicProfile", + "description": "Basic information from the company's public profile." + }, + "primaryLocation": { + "description": "The primary location of the company.", + "$ref": "Location" + }, + "services": { + "enumDescriptions": [ + "Unchosen.", + "Help with advanced AdWords support.", + "Help with advertising on Google.", + "Help with an enhanced website.", + "Help with an online marketing plan.", + "Help with mobile and video ads.", + "Help with mobile websites." + ], + "description": "Services the company can help with.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "SERVICE_UNSPECIFIED", + "S_ADVANCED_ADWORDS_SUPPORT", + "S_ADVERTISING_ON_GOOGLE", + "S_AN_ENHANCED_WEBSITE", + "S_AN_ONLINE_MARKETING_PLAN", + "S_MOBILE_AND_VIDEO_ADS", + "S_MOBILE_WEBSITE_SERVICES" + ] + } + }, + "originalMinMonthlyBudget": { + "description": "The unconverted minimum monthly budget that the company accepts for partner\nbusiness.", + "$ref": "Money" + }, + "ranks": { + "description": "Information related to the ranking of the company within the list of\ncompanies.", + "type": "array", + "items": { + "$ref": "Rank" + } + }, + "badgeTier": { + "enumDescriptions": [ + "Tier badge is not set.", + "Agency has regular partner badge.", + "Agency has premier badge." + ], + "enum": [ + "BADGE_TIER_NONE", + "BADGE_TIER_REGULAR", + "BADGE_TIER_PREMIER" + ], + "description": "Partner badge tier", + "type": "string" + }, + "specializationStatus": { + "description": "The list of Google Partners specialization statuses for the company.", + "type": "array", + "items": { + "$ref": "SpecializationStatus" + } + }, + "companyTypes": { + "description": "Company type labels listed on the company's profile.", + "type": "array", + "items": { + "enum": [ + "COMPANY_TYPE_UNSPECIFIED", + "FULL_SERVICE_AGENCY", + "MEDIA_AGENCY", + "CREATIVE_AGENCY", + "CDIGITAL_AGENCY", + "SEM_SEO", + "PERFORMANCE_MARKETING", + "ADVERTISING_TOOL_DEVELOPMENT", + "PR", + "SELF_MANAGED", + "RESELLER" + ], + "type": "string" + }, + "enumDescriptions": [ + "Unchosen.", + "Handles all aspects of the advertising process.", + "Focuses solely on an advertiser's media placement.", + "Plans/executes advertising campaigns.", + "Like a\nFULL_SERVICE_AGENCY,\nbut specializing in digital.", + "Increases visibility in search engine result pages.", + "Drives promotional efforts for immediate impact.", + "Focuses on bid management, conversion, reporting.", + "Establishes favorable relationship with public through low/no-cost\ncommunications.", + "Does not manage other company's accounts, manages own marketing programs.", + "Full-service AdWords account management for local businesses." + ] + }, + "autoApprovalEmailDomains": { + "description": "Email domains that allow users with a matching email address to get\nauto-approved for associating with this company.", + "type": "array", + "items": { + "type": "string" + } + }, + "primaryLanguageCode": { + "description": "The primary language code of the company, as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", + "type": "string" + }, + "profileStatus": { + "enumDescriptions": [ + "Unchosen.", + "Company profile does not show up publicly.", + "Company profile can only be viewed by the profile's URL\nand not by Google Partner Search.", + "Company profile can be viewed by the profile's URL\nand by Google Partner Search." + ], + "enum": [ + "COMPANY_PROFILE_STATUS_UNSPECIFIED", + "HIDDEN", + "PUBLISHED", + "SEARCHABLE" + ], + "description": "The public viewability status of the company's profile.", + "type": "string" + }, + "locations": { + "description": "The list of all company locations.\nIf set, must include the\nprimary_location\nin the list.", + "type": "array", + "items": { + "$ref": "Location" + } + }, + "convertedMinMonthlyBudget": { + "description": "The minimum monthly budget that the company accepts for partner business,\nconverted to the requested currency code.", + "$ref": "Money" + }, + "industries": { + "enumDescriptions": [ + "Unchosen.", + "The automotive industry.", + "The business-to-business industry.", + "The consumer packaged goods industry.", + "The education industry.", + "The finance industry.", + "The healthcare industry.", + "The media and entertainment industry.", + "The retail industry.", + "The technology industry.", + "The travel industry." + ], + "description": "Industries the company can help with.", + "type": "array", + "items": { + "enum": [ + "INDUSTRY_UNSPECIFIED", + "I_AUTOMOTIVE", + "I_BUSINESS_TO_BUSINESS", + "I_CONSUMER_PACKAGED_GOODS", + "I_EDUCATION", + "I_FINANCE", + "I_HEALTHCARE", + "I_MEDIA_AND_ENTERTAINMENT", + "I_RETAIL", + "I_TECHNOLOGY", + "I_TRAVEL" + ], + "type": "string" + } + }, + "websiteUrl": { + "description": "URL of the company's website.", + "type": "string" + }, + "additionalWebsites": { + "description": "URL of the company's additional websites used to verify the dynamic badges.\nThese are stored as full URLs as entered by the user, but only the TLD will\nbe used for the actual verification.", + "type": "array", + "items": { + "type": "string" + } + }, + "primaryAdwordsManagerAccountId": { + "description": "The Primary AdWords Manager Account id.", + "format": "int64", + "type": "string" + }, + "name": { + "description": "The name of the company.", + "type": "string" + }, + "localizedInfos": { + "description": "The list of localized info for the company.", + "type": "array", + "items": { + "$ref": "LocalizedCompanyInfo" + } + }, + "id": { + "description": "The ID of the company.", + "type": "string" + }, + "certificationStatuses": { + "description": "The list of Google Partners certification statuses for the company.", + "type": "array", + "items": { + "$ref": "CertificationStatus" + } + } + }, + "id": "Company" + }, + "CreateLeadResponse": { + "description": "Response message for CreateLead.", + "type": "object", + "properties": { + "lead": { + "$ref": "Lead", + "description": "Lead that was created depending on the outcome of\n\u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e validation." + }, + "recaptchaStatus": { + "enumDescriptions": [ + "Unchosen.", + "No reCaptcha validation needed.", + "reCaptcha challenge passed.", + "reCaptcha challenge failed." + ], + "enum": [ + "RECAPTCHA_STATUS_UNSPECIFIED", + "RS_NOT_NEEDED", + "RS_PASSED", + "RS_FAILED" + ], + "description": "The outcome of \u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e\nvalidation.", + "type": "string" + }, + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + } + }, + "id": "CreateLeadResponse" + }, + "GetCompanyResponse": { + "description": "Response message for GetCompany.", + "type": "object", + "properties": { + "company": { + "description": "The company.", + "$ref": "Company" + }, + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + } + }, + "id": "GetCompanyResponse" + }, + "Location": { + "description": "A location with address and geographic coordinates. May optionally contain a\ndetailed (multi-field) version of the address.", + "type": "object", + "properties": { + "administrativeArea": { + "description": "Top-level administrative subdivision of this country.", + "type": "string" + }, + "locality": { + "description": "Generally refers to the city/town portion of an address.", + "type": "string" + }, + "latLng": { + "$ref": "LatLng", + "description": "The latitude and longitude of the location, in degrees." + }, + "address": { + "description": "The single string version of the address.", + "type": "string" + }, + "dependentLocality": { + "description": "Dependent locality or sublocality. Used for UK dependent localities, or\nneighborhoods or boroughs in other locations.", + "type": "string" + }, + "regionCode": { + "description": "CLDR (Common Locale Data Repository) region code .", + "type": "string" + }, + "postalCode": { + "description": "Values are frequently alphanumeric.", + "type": "string" + }, + "sortingCode": { + "description": "Use of this code is very country-specific, but will refer to a secondary\nclassification code for sorting mail.", + "type": "string" + }, + "languageCode": { + "description": "Language code of the address. Should be in BCP 47 format.", + "type": "string" + }, + "addressLine": { + "description": "The following address lines represent the most specific part of any\naddress.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "Location" + }, + "ExamToken": { + "description": "A token that allows a user to take an exam.", + "type": "object", + "properties": { + "examId": { + "description": "The id of the exam the token is for.", + "format": "int64", + "type": "string" + }, + "token": { + "description": "The token, only present if the user has access to the exam.", + "type": "string" + }, + "examType": { + "description": "The type of the exam the token belongs to.", + "type": "string", + "enumDescriptions": [ + "Unchosen.", + "Adwords Fundamentals exam.", + "AdWords advanced search exam.", + "AdWords advanced display exam.", + "VideoAds exam.", + "DoubleClick exam.", + "Analytics exam.", + "Shopping exam.", + "Mobile exam.", + "Digital Sales exam.", + "Mobile Sites exam." + ], + "enum": [ + "CERTIFICATION_EXAM_TYPE_UNSPECIFIED", + "CET_ADWORDS_FUNDAMENTALS", + "CET_ADWORDS_ADVANCED_SEARCH", + "CET_ADWORDS_ADVANCED_DISPLAY", + "CET_VIDEO_ADS", + "CET_DOUBLECLICK", + "CET_ANALYTICS", + "CET_SHOPPING", + "CET_MOBILE", + "CET_DIGITAL_SALES", + "CET_MOBILE_SITES" + ] + } + }, + "id": "ExamToken" + }, + "CertificationExamStatus": { + "description": "Status for a Google Partners certification exam.", + "type": "object", + "properties": { + "numberUsersPass": { + "description": "The number of people who have passed the certification exam.", + "format": "int32", + "type": "integer" + }, + "type": { + "description": "The type of certification exam.", + "type": "string", + "enumDescriptions": [ + "Unchosen.", + "Adwords Fundamentals exam.", + "AdWords advanced search exam.", + "AdWords advanced display exam.", + "VideoAds exam.", + "DoubleClick exam.", + "Analytics exam.", + "Shopping exam.", + "Mobile exam.", + "Digital Sales exam.", + "Mobile Sites exam." + ], + "enum": [ + "CERTIFICATION_EXAM_TYPE_UNSPECIFIED", + "CET_ADWORDS_FUNDAMENTALS", + "CET_ADWORDS_ADVANCED_SEARCH", + "CET_ADWORDS_ADVANCED_DISPLAY", + "CET_VIDEO_ADS", + "CET_DOUBLECLICK", + "CET_ANALYTICS", + "CET_SHOPPING", + "CET_MOBILE", + "CET_DIGITAL_SALES", + "CET_MOBILE_SITES" + ] + } + }, + "id": "CertificationExamStatus" + }, + "OptIns": { + "description": "A set of opt-ins for a user.", + "type": "object", + "properties": { + "specialOffers": { + "description": "An opt-in about receiving email regarding new features and products.", + "type": "boolean" + }, + "performanceSuggestions": { + "description": "An opt-in about receiving email with customized AdWords campaign management\ntips.", + "type": "boolean" + }, + "physicalMail": { + "description": "An opt-in to receive special promotional gifts and material in the mail.", + "type": "boolean" + }, + "phoneContact": { + "description": "An opt-in to allow recieivng phone calls about their Partners account.", + "type": "boolean" + }, + "marketComm": { + "description": "An opt-in about receiving email from Partners marketing teams. Includes\nmember-only events and special promotional offers for Google products.", + "type": "boolean" + } + }, + "id": "OptIns" + }, + "Rank": { + "description": "Information related to ranking of results.", + "type": "object", + "properties": { + "type": { + "enumDescriptions": [ + "Unchosen.", + "Total final score." + ], + "enum": [ + "RANK_TYPE_UNSPECIFIED", + "RT_FINAL_SCORE" + ], + "description": "The type of rank.", + "type": "string" + }, + "value": { + "description": "The numerical value of the rank.", + "format": "double", + "type": "number" + } + }, + "id": "Rank" + }, + "UserProfile": { + "description": "The profile information of a Partners user.", + "type": "object", + "properties": { + "phoneNumber": { + "description": "The user's phone number.", + "type": "string" + }, + "adwordsManagerAccount": { + "description": "If the user has edit access to multiple accounts, the user can choose the\npreferred account and it is used when a personal account is needed. Can\nbe empty.", + "format": "int64", + "type": "string" + }, + "primaryCountryCode": { + "description": "The user's primary country, an ISO 2-character code.", + "type": "string" + }, + "emailAddress": { + "description": "The email address the user has selected on the Partners site as primary.", + "type": "string" + }, + "channels": { + "description": "A list of ids representing which channels the user selected they were in.", + "type": "array", + "items": { + "type": "string" + } + }, + "profilePublic": { + "description": "Whether the user's public profile is visible to anyone with the URL.", + "type": "boolean" + }, + "jobFunctions": { + "description": "A list of ids represnting which job categories the user selected.", + "type": "array", + "items": { + "type": "string" + } + }, + "givenName": { + "description": "The user's given name.", + "type": "string" + }, + "address": { + "$ref": "Location", + "description": "The user's mailing address, contains multiple fields." + }, + "industries": { + "description": "A list of ids representing which industries the user selected.", + "type": "array", + "items": { + "type": "string" + } + }, + "familyName": { + "description": "The user's family name.", + "type": "string" + }, + "emailOptIns": { + "$ref": "OptIns", + "description": "The list of opt-ins for the user, related to communication preferences." + }, + "languages": { + "description": "The list of languages this user understands.", + "type": "array", + "items": { + "type": "string" + } + }, + "markets": { + "description": "A list of ids representing which markets the user was interested in.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "UserProfile" + }, + "GetPartnersStatusResponse": { + "description": "Response message for\nGetPartnersStatus.", + "type": "object", + "properties": { + "responseMetadata": { + "description": "Current response metadata.", + "$ref": "ResponseMetadata" + } + }, + "id": "GetPartnersStatusResponse" + }, + "HistoricalOffer": { + "description": "Historical information about a Google Partners Offer.", + "type": "object", + "properties": { + "creationTime": { + "description": "Time offer was first created.", + "format": "google-datetime", + "type": "string" + }, + "clientEmail": { + "description": "Email address for client.", + "type": "string" + }, + "status": { + "enumDescriptions": [ + "Unset.", + "Offer distributed.", + "Offer redeemed.", + "Offer awarded.", + "Offer expired." + ], + "enum": [ + "OFFER_STATUS_UNSPECIFIED", + "OFFER_STATUS_DISTRIBUTED", + "OFFER_STATUS_REDEEMED", + "OFFER_STATUS_AWARDED", + "OFFER_STATUS_EXPIRED" + ], + "description": "Status of the offer.", + "type": "string" + }, + "clientId": { + "description": "ID of client.", + "format": "int64", + "type": "string" + }, + "clientName": { + "description": "Name of the client.", + "type": "string" + }, + "lastModifiedTime": { + "description": "Time last action was taken.", + "format": "google-datetime", + "type": "string" + }, + "adwordsUrl": { + "description": "Client's AdWords page URL.", + "type": "string" + }, + "offerType": { + "enumDescriptions": [ + "Unset.", + "AdWords spend X get Y.", + "Youtube video.", + "Spend Match up to Y." + ], + "enum": [ + "OFFER_TYPE_UNSPECIFIED", + "OFFER_TYPE_SPEND_X_GET_Y", + "OFFER_TYPE_VIDEO", + "OFFER_TYPE_SPEND_MATCH" + ], + "description": "Type of offer.", + "type": "string" + }, + "senderName": { + "description": "Name (First + Last) of the partners user to whom the incentive is allocated.", + "type": "string" + }, + "offerCountryCode": { + "description": "Country Code for the offer country.", + "type": "string" + }, + "expirationTime": { + "description": "Time this offer expires.", + "format": "google-datetime", + "type": "string" + }, + "offerCode": { + "description": "Offer code.", + "type": "string" + } + }, + "id": "HistoricalOffer" + }, + "UserOverrides": { + "description": "Values to use instead of the user's respective defaults. These are only\nhonored by whitelisted products.", + "type": "object", + "properties": { + "ipAddress": { + "description": "IP address to use instead of the user's geo-located IP address.", + "type": "string" + }, + "userId": { + "description": "Logged-in user ID to impersonate instead of the user's ID.", + "type": "string" + } + }, + "id": "UserOverrides" + }, + "LogUserEventRequest": { + "description": "Request message for\nLogUserEvent.", + "type": "object", + "properties": { + "url": { + "description": "The URL where the event occurred.", + "type": "string" + }, + "requestMetadata": { + "$ref": "RequestMetadata", + "description": "Current request metadata." + }, + "eventDatas": { + "description": "List of event data for the event.", + "type": "array", + "items": { + "$ref": "EventData" + } + }, + "eventScope": { + "enumDescriptions": [ + "Unchosen.", + "Based on visitor.", + "Based on session.", + "Based on page visit." + ], + "enum": [ + "EVENT_SCOPE_UNSPECIFIED", + "VISITOR", + "SESSION", + "PAGE" + ], + "description": "The scope of the event.", + "type": "string" + }, + "eventCategory": { + "description": "The category the action belongs to.", + "type": "string", + "enumDescriptions": [ + "Unchosen.", + "Google Partner Search category.", + "Google Partner sign-up flow category.", + "Google Partner portal category.", + "Google Partner portal my-profile category.", + "Google Partner portal certifications category.", + "Google Partner portal community category.", + "Google Partner portal insights category.", + "Google Partner portal clients category.", + "Google Partner portal public user profile category.", + "Google Partner panel category.", + "Google Partner portal last admin dialog category.", + "Google Partner client category.", + "Google Partner portal company profile category.", + "External links category.", + "Google Partner landing category." + ], + "enum": [ + "EVENT_CATEGORY_UNSPECIFIED", + "GOOGLE_PARTNER_SEARCH", + "GOOGLE_PARTNER_SIGNUP_FLOW", + "GOOGLE_PARTNER_PORTAL", + "GOOGLE_PARTNER_PORTAL_MY_PROFILE", + "GOOGLE_PARTNER_PORTAL_CERTIFICATIONS", + "GOOGLE_PARTNER_PORTAL_COMMUNITY", + "GOOGLE_PARTNER_PORTAL_INSIGHTS", + "GOOGLE_PARTNER_PORTAL_CLIENTS", + "GOOGLE_PARTNER_PUBLIC_USER_PROFILE", + "GOOGLE_PARTNER_PANEL", + "GOOGLE_PARTNER_PORTAL_LAST_ADMIN_DIALOG", + "GOOGLE_PARTNER_CLIENT", + "GOOGLE_PARTNER_PORTAL_COMPANY_PROFILE", + "EXTERNAL_LINKS", + "GOOGLE_PARTNER_LANDING" + ] + }, + "lead": { + "description": "Advertiser lead information.", + "$ref": "Lead" + }, + "eventAction": { + "enumDescriptions": [ + "Unchosen.", + "Advertiser clicked `Find a partner` bottom button.", + "Advertiser clicked `Find a partner` top button.", + "Agency clicked `Join now` bottom button.", + "Agency clicked `Join now` top button.", + "Advertiser canceled partner contact form.", + "Advertiser started partner contact form.", + "Advertiser completed partner contact form.", + "Advertiser entered email in contact form.", + "Advertiser entered name in contact form.", + "Advertiser entered phone in contact form.", + "Advertiser failed \u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e\nin contact form.", + "Company viewed by advertiser.", + "Advertiser canceled partner contact form on Google Partner Search.", + "Advertiser changed a top search parameter.", + "Advertiser started partner contact form on Google Partner Search.", + "Advertiser clicked `Show more partners` bottom button.", + "Advertiser completed partner contact form on Google Partner Search.", + "Advertiser saw no partners available with search criteria.", + "Advertiser performed search on Google Partner Search.", + "Advertiser viewed a partner on Google Partner Search.", + "Advertiser canceled partner contact form on profile page.", + "Advertiser started partner contact form on profile page.", + "Advertiser clicked partner website.", + "Advertiser completed contact form on profile page.", + "Advertiser viewed a partner profile.", + "Agency clicked `accept Terms Of Service` button.", + "Agency changed Terms Of Service country.", + "Agency added address in profile portal.", + "Agency added phone number in profile portal.", + "Agency changed primary account association.", + "Agency changed primary country association.", + "Agency clicked `affiliate` button in profile portal.", + "Agency clicked `give edit access` in profile portal.", + "Agency clicked `log out` in profile portal.", + "Agency clicked profile portal left nav.", + "Agency clicked `save and continue` at bottom of complete profile.", + "Agency clicked `unaffiliate` in profile portal.", + "Agency filled out company affiliation in profile portal.", + "Agency successfully connected with company in profile portal.", + "Agency clicked create MCC in profile portal.", + "Agency did not have an MCC associated on profile portal.", + "Agency had an MCC associated on profile portal.", + "Agency added job function in profile portal.", + "Agency looked at job function drop-down.", + "Agency selected `account manage` as job function.", + "Agency selected `account planner` as job function.", + "Agency selected `Analytics` as job function.", + "Agency selected `creative` as job function.", + "Agency selected `media buyer` as job function.", + "Agency selected `media planner` as job function.", + "Agency selected `other` as job function.", + "Agency selected `production` as job function.", + "Agency selected `SEO` as job function.", + "Agency selected `sales rep` as job function.", + "Agency selected `search specialist` as job function.", + "Agency added channels in profile portal.", + "Agency looked at `add channel` drop-down.", + "Agency selected `cross channel` from add channel drop-down.", + "Agency selected `display` from add channel drop-down.", + "Agency selected `mobile` from add channel drop-down.", + "Agency selected `search` from add channel drop-down.", + "Agency selected `social` from add channel drop-down.", + "Agency selected `tools` from add channel drop-down.", + "Agency selected `YouTube` from add channel drop-down.", + "Agency added industries in profile portal.", + "Agency changed `add industries` drop-down.", + "Agency added markets in profile portal.", + "Agency changed `add markets` drop-down.", + "Agency checked `recieve mail promotions` in profile portal.", + "Agency checked `recieve mail promotions` in sign-up.", + "Agency selected `opt-in beta tests and market research`.", + "Agency selected `opt-in beta tests` in profile portal.", + "Agency selected `opt-in news` in profile portal.", + "Agency selected `opt-in news invitations and promotions`.", + "Agency selected `opt-in performance SUG` in profile portal.", + "Agency selected `opt-in performance suggestions`.", + "Agency selected `opt-in select all email notifications`.", + "Agency selected `select all opt-ins` in profile portal.", + "Agency clicked back button on `connect with company`.", + "Agency clicked continue to overview on `connect with company`.", + "Agency clicked `create MCC connect with company not found`.", + "Agency clicked `give edit access connect with company not found`.", + "Agency clicked `log out connect with company not found`.", + "Agency clicked `skip for now on connect with company page`.", + "Agency closed connection to company.", + "Agency completed field connect with company.", + "Agency found company to connect with.", + "Agency successfully created company.", + "Agency added new company location.", + "Agency clicked community `join now link` in portal notifications.", + "Agency clicked `connect to company` link in portal notifications.", + "Agency cliecked `get certified` link in portal notifications.", + "Agency clicked `get VideoAds certified` link in portal notifications.", + "Agency clicked `link to MCC` link in portal notifications.", + "Agency clicked `insight content` in portal.", + "Agency clicked `insights view now pitch decks` in portal.", + "Agency clicked `insights` left nav in portal.", + "Agency clicked `insights upload content`.", + "Agency clicked `insights viewed deprecated`.", + "Agency clicked `community` left nav in portal.", + "Agency clicked `join community` button in community portal.", + "Agency clicked `certifications` left nav in portal.", + "Agency clicked `certifications product` left nav in portal.", + "Agency clicked `partner status` left nav in portal.", + "Agency clicked `partner status product` left nav in portal.", + "Agency clicked `offers` left nav in portal.", + "Agency clicked `send` button on offers page.", + "Agency clicked `exam details` on certifications AdWords page.", + "Agency clicked `see exams` certifications main page.", + "Agency clicked `take exam` on certifications exam page.", + "Agency opened `last admin` dialog.", + "Agency opened dialog with no users.", + "Agency promoted user to admin.", + "Agency unaffiliated.", + "Agency changed roles.", + "Advertiser clicked `company name` link to profile.", + "Advertiser viewed AdWords certificate.", + "Advertiser viewed AdWords Search certificate.", + "Advertiser viewed AdWords Display certificate.", + "Advertiser clicked AdWords certificate help icon.", + "Advertiser viewed Analytics certificate.", + "Advertiser viewed DoubleClick certificate.", + "Advertiser viewed Mobile Sites certificate.", + "Advertiser viewed VideoAds certificate.", + "Advertiser clicked Shopping certificate help icon.", + "Advertiser clicked VideoAds certificate help icon.", + "Clicked `help` at bottom.", + "Clicked `help` at top.", + "Client error occurred.", + "Agency clicked left nav `stories`.", + "Click occured.", + "Advertiser clicked Mobile certificate help icon.", + "Agency failed the company verification.", + "User visited the landing portion of Google Partners.", + "User visited the Google Partner Search portion of Google Partners.", + "User visited the agency portal portion of Google Partners.", + "User cancelled signing up.", + "User cancelled signing up their company.", + "Agency clicked `Sign in` top button.", + "Agency clicked `save and continue` at bottom of incomplete profile.", + "Agency unselected `opt-in news invitations and promotions`.", + "Agency unselected `opt-in beta tests and market research`.", + "Agency unselected `opt-in performance suggestions`.", + "Agency selected `opt-out unselect all email notifications`.", + "Agency linked their individual MCC.", + "Agency was suggested to user for affiliation.", + "Agency ignored suggested agencies and begin searching.", + "Agency picked a suggested agency.", + "Agency searched for agencies.", + "Agency picked a searched agency.", + "Agency dismissed affiliation widget.", + "Agency clicked on the download link for downloading content.", + "Agency user is maklingg progress viewing a content item.", + "Agency clicked `cancel Terms Of Service` button.", + "Advertiser entered website in contact form." + ], + "enum": [ + "EVENT_ACTION_UNSPECIFIED", + "SMB_CLICKED_FIND_A_PARTNER_BUTTON_BOTTOM", + "SMB_CLICKED_FIND_A_PARTNER_BUTTON_TOP", + "AGENCY_CLICKED_JOIN_NOW_BUTTON_BOTTOM", + "AGENCY_CLICKED_JOIN_NOW_BUTTON_TOP", + "SMB_CANCELED_PARTNER_CONTACT_FORM", + "SMB_CLICKED_CONTACT_A_PARTNER", + "SMB_COMPLETED_PARTNER_CONTACT_FORM", + "SMB_ENTERED_EMAIL_IN_CONTACT_PARTNER_FORM", + "SMB_ENTERED_NAME_IN_CONTACT_PARTNER_FORM", + "SMB_ENTERED_PHONE_IN_CONTACT_PARTNER_FORM", + "SMB_FAILED_RECAPTCHA_IN_CONTACT_PARTNER_FORM", + "PARTNER_VIEWED_BY_SMB", + "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_GPS", + "SMB_CHANGED_A_SEARCH_PARAMETER_TOP", + "SMB_CLICKED_CONTACT_A_PARTNER_ON_GPS", + "SMB_CLICKED_SHOW_MORE_PARTNERS_BUTTON_BOTTOM", + "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_GPS", + "SMB_NO_PARTNERS_AVAILABLE_WITH_SEARCH_CRITERIA", + "SMB_PERFORMED_SEARCH_ON_GPS", + "SMB_VIEWED_A_PARTNER_ON_GPS", + "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE", + "SMB_CLICKED_CONTACT_A_PARTNER_ON_PROFILE_PAGE", + "SMB_CLICKED_PARTNER_WEBSITE", + "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE", + "SMB_VIEWED_A_PARTNER_PROFILE", + "AGENCY_CLICKED_ACCEPT_TOS_BUTTON", + "AGENCY_CHANGED_TOS_COUNTRY", + "AGENCY_ADDED_ADDRESS_IN_MY_PROFILE_PORTAL", + "AGENCY_ADDED_PHONE_NUMBER_IN_MY_PROFILE_PORTAL", + "AGENCY_CHANGED_PRIMARY_ACCOUNT_ASSOCIATION", + "AGENCY_CHANGED_PRIMARY_COUNTRY_ASSOCIATION", + "AGENCY_CLICKED_AFFILIATE_BUTTON_IN_MY_PROFILE_IN_PORTAL", + "AGENCY_CLICKED_GIVE_EDIT_ACCESS_IN_MY_PROFILE_PORTAL", + "AGENCY_CLICKED_LOG_OUT_IN_MY_PROFILE_PORTAL", + "AGENCY_CLICKED_MY_PROFILE_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_COMPLETE_PROFILE", + "AGENCY_CLICKED_UNAFFILIATE_IN_MY_PROFILE_PORTAL", + "AGENCY_FILLED_OUT_COMP_AFFILIATION_IN_MY_PROFILE_PORTAL", + "AGENCY_SUCCESSFULLY_CONNECTED_WITH_COMPANY_IN_MY_PROFILE", + "AGENCY_CLICKED_CREATE_MCC_IN_MY_PROFILE_PORTAL", + "AGENCY_DIDNT_HAVE_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE", + "AGENCY_HAD_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE", + "AGENCY_ADDED_JOB_FUNCTION_IN_MY_PROFILE_PORTAL", + "AGENCY_LOOKED_AT_JOB_FUNCTION_DROP_DOWN", + "AGENCY_SELECTED_ACCOUNT_MANAGER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_ACCOUNT_PLANNER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_ANALYTICS_AS_JOB_FUNCTION", + "AGENCY_SELECTED_CREATIVE_AS_JOB_FUNCTION", + "AGENCY_SELECTED_MEDIA_BUYER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_MEDIA_PLANNER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_OTHER_AS_JOB_FUNCTION", + "AGENCY_SELECTED_PRODUCTION_AS_JOB_FUNCTION", + "AGENCY_SELECTED_SEO_AS_JOB_FUNCTION", + "AGENCY_SELECTED_SALES_REP_AS_JOB_FUNCTION", + "AGENCY_SELECTED_SEARCH_SPECIALIST_AS_JOB_FUNCTION", + "AGENCY_ADDED_CHANNELS_IN_MY_PROFILE_PORTAL", + "AGENCY_LOOKED_AT_ADD_CHANNEL_DROP_DOWN", + "AGENCY_SELECTED_CROSS_CHANNEL_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_DISPLAY_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_MOBILE_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_SEARCH_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_SOCIAL_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_TOOLS_FROM_ADD_CHANNEL", + "AGENCY_SELECTED_YOUTUBE_FROM_ADD_CHANNEL", + "AGENCY_ADDED_INDUSTRIES_IN_MY_PROFILE_PORTAL", + "AGENCY_CHANGED_ADD_INDUSTRIES_DROP_DOWN", + "AGENCY_ADDED_MARKETS_IN_MY_PROFILE_PORTAL", + "AGENCY_CHANGED_ADD_MARKETS_DROP_DOWN", + "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_MYPROFILE", + "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_SIGNUP", + "AGENCY_SELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH", + "AGENCY_SELECTED_OPT_IN_BETA_TESTS_IN_MY_PROFILE_PORTAL", + "AGENCY_SELECTED_OPT_IN_NEWS_IN_MY_PROFILE_PORTAL", + "AGENCY_SELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS", + "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUG_IN_MY_PROFILE_PORTAL", + "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS", + "AGENCY_SELECTED_OPT_IN_SELECT_ALL_EMAIL_NOTIFICATIONS", + "AGENCY_SELECTED_SELECT_ALL_OPT_INS_IN_MY_PROFILE_PORTAL", + "AGENCY_CLICKED_BACK_BUTTON_ON_CONNECT_WITH_COMPANY", + "AGENCY_CLICKED_CONTINUE_TO_OVERVIEW_ON_CONNECT_WITH_COMPANY", + "AGECNY_CLICKED_CREATE_MCC_CONNECT_WITH_COMPANY_NOT_FOUND", + "AGECNY_CLICKED_GIVE_EDIT_ACCESS_CONNECT_WITH_COMPANY_NOT_FOUND", + "AGECNY_CLICKED_LOG_OUT_CONNECT_WITH_COMPANY_NOT_FOUND", + "AGENCY_CLICKED_SKIP_FOR_NOW_ON_CONNECT_WITH_COMPANY_PAGE", + "AGENCY_CLOSED_CONNECTED_TO_COMPANY_X_BUTTON_WRONG_COMPANY", + "AGENCY_COMPLETED_FIELD_CONNECT_WITH_COMPANY", + "AGECNY_FOUND_COMPANY_TO_CONNECT_WITH", + "AGENCY_SUCCESSFULLY_CREATED_COMPANY", + "AGENCY_ADDED_NEW_COMPANY_LOCATION", + "AGENCY_CLICKED_COMMUNITY_JOIN_NOW_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_CONNECT_TO_COMPANY_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_GET_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_GET_VIDEO_ADS_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_LINK_TO_MCC_LINK_IN_PORTAL_NOTIFICATIONS", + "AGENCY_CLICKED_INSIGHT_CONTENT_IN_PORTAL", + "AGENCY_CLICKED_INSIGHTS_VIEW_NOW_PITCH_DECKS_IN_PORTAL", + "AGENCY_CLICKED_INSIGHTS_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_INSIGHTS_UPLOAD_CONTENT", + "AGENCY_CLICKED_INSIGHTS_VIEWED_DEPRECATED", + "AGENCY_CLICKED_COMMUNITY_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_JOIN_COMMUNITY_BUTTON_COMMUNITY_PORTAL", + "AGENCY_CLICKED_CERTIFICATIONS_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_CERTIFICATIONS_PRODUCT_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_PARTNER_STATUS_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_PARTNER_STATUS_PRODUCT_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_OFFERS_LEFT_NAV_IN_PORTAL", + "AGENCY_CLICKED_SEND_BUTTON_ON_OFFERS_PAGE", + "AGENCY_CLICKED_EXAM_DETAILS_ON_CERT_ADWORDS_PAGE", + "AGENCY_CLICKED_SEE_EXAMS_CERTIFICATION_MAIN_PAGE", + "AGENCY_CLICKED_TAKE_EXAM_ON_CERT_EXAM_PAGE", + "AGENCY_OPENED_LAST_ADMIN_DIALOG", + "AGENCY_OPENED_DIALOG_WITH_NO_USERS", + "AGENCY_PROMOTED_USER_TO_ADMIN", + "AGENCY_UNAFFILIATED", + "AGENCY_CHANGED_ROLES", + "SMB_CLICKED_COMPANY_NAME_LINK_TO_PROFILE", + "SMB_VIEWED_ADWORDS_CERTIFICATE", + "SMB_VIEWED_ADWORDS_SEARCH_CERTIFICATE", + "SMB_VIEWED_ADWORDS_DISPLAY_CERTIFICATE", + "SMB_CLICKED_ADWORDS_CERTIFICATE_HELP_ICON", + "SMB_VIEWED_ANALYTICS_CERTIFICATE", + "SMB_VIEWED_DOUBLECLICK_CERTIFICATE", + "SMB_VIEWED_MOBILE_SITES_CERTIFICATE", + "SMB_VIEWED_VIDEO_ADS_CERTIFICATE", + "SMB_VIEWED_SHOPPING_CERTIFICATE", + "SMB_CLICKED_VIDEO_ADS_CERTIFICATE_HELP_ICON", + "CLICKED_HELP_AT_BOTTOM", + "CLICKED_HELP_AT_TOP", + "CLIENT_ERROR", + "AGENCY_CLICKED_LEFT_NAV_STORIES", + "CLICKED", + "SMB_VIEWED_MOBILE_CERTIFICATE", + "AGENCY_FAILED_COMPANY_VERIFICATION", + "VISITED_LANDING", + "VISITED_GPS", + "VISITED_AGENCY_PORTAL", + "CANCELLED_INDIVIDUAL_SIGN_UP", + "CANCELLED_COMPANY_SIGN_UP", + "AGENCY_CLICKED_SIGN_IN_BUTTON_TOP", + "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_INCOMPLETE_PROFILE", + "AGENCY_UNSELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS", + "AGENCY_UNSELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH", + "AGENCY_UNSELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS", + "AGENCY_SELECTED_OPT_OUT_UNSELECT_ALL_EMAIL_NOTIFICATIONS", + "AGENCY_LINKED_INDIVIDUAL_MCC", + "AGENCY_SUGGESTED_TO_USER", + "AGENCY_IGNORED_SUGGESTED_AGENCIES_AND_SEARCHED", + "AGENCY_PICKED_SUGGESTED_AGENCY", + "AGENCY_SEARCHED_FOR_AGENCIES", + "AGENCY_PICKED_SEARCHED_AGENCY", + "AGENCY_DISMISSED_AFFILIATION_WIDGET", + "AGENCY_CLICKED_INSIGHTS_DOWNLOAD_CONTENT", + "AGENCY_PROGRESS_INSIGHTS_VIEW_CONTENT", + "AGENCY_CLICKED_CANCEL_ACCEPT_TOS_BUTTON", + "SMB_ENTERED_WEBSITE_IN_CONTACT_PARTNER_FORM" + ], + "description": "The action that occurred.", + "type": "string" + } + }, + "id": "LogUserEventRequest" + }, + "AnalyticsDataPoint": { + "description": "Details of the analytics events for a `Company` within a single day.", + "type": "object", + "properties": { + "eventCount": { + "description": "Number of times the type of event occurred.\nMeaning depends on context (e.g. profile views, contacts, etc.).", + "format": "int32", + "type": "integer" + }, + "eventLocations": { + "description": "Location information of where these events occurred.", + "type": "array", + "items": { + "$ref": "LatLng" + } + } + }, + "id": "AnalyticsDataPoint" + }, + "Analytics": { + "description": "Analytics data for a `Company` within a single day.", + "type": "object", + "properties": { + "eventDate": { + "description": "Date on which these events occurred.", + "$ref": "Date" + }, + "profileViews": { + "$ref": "AnalyticsDataPoint", + "description": "Instances of users viewing the `Company` profile\non the specified date." + }, + "searchViews": { + "$ref": "AnalyticsDataPoint", + "description": "Instances of users seeing the `Company` in Google Partners Search results\non the specified date." + }, + "contacts": { + "$ref": "AnalyticsDataPoint", + "description": "Instances of users contacting the `Company`\non the specified date." + } + }, + "id": "Analytics" + }, + "AdWordsManagerAccountInfo": { + "description": "Information about a particular AdWords Manager Account.\nRead more at https://support.google.com/adwords/answer/6139186", + "type": "object", + "properties": { + "id": { + "description": "The AdWords Manager Account id.", + "format": "int64", + "type": "string" + }, + "customerName": { + "description": "Name of the customer this account represents.", + "type": "string" + } + }, + "id": "AdWordsManagerAccountInfo" + }, + "PublicProfile": { + "description": "Basic information from a public profile.", + "type": "object", + "properties": { + "profileImage": { + "description": "The URL to the main profile image of the public profile.", + "type": "string" + }, + "displayName": { + "description": "The display name of the public profile.", + "type": "string" + }, + "displayImageUrl": { + "description": "The URL to the main display image of the public profile. Being deprecated.", + "type": "string" + }, + "id": { + "description": "The ID which can be used to retrieve more details about the public profile.", + "type": "string" + }, + "url": { + "description": "The URL of the public profile.", + "type": "string" + } + }, + "id": "PublicProfile" + }, + "ResponseMetadata": { + "description": "Common data that is in each API response.", + "type": "object", + "properties": { + "debugInfo": { + "description": "Debug information about this request.", + "$ref": "DebugInfo" + } + }, + "id": "ResponseMetadata" + }, + "RecaptchaChallenge": { + "description": "\u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e challenge info.", + "type": "object", + "properties": { + "id": { + "description": "The ID of the reCaptcha challenge.", + "type": "string" + }, + "response": { + "description": "The response to the reCaptcha challenge.", + "type": "string" + } + }, + "id": "RecaptchaChallenge" + }, + "AvailableOffer": { + "description": "Available Offers to be distributed.", + "type": "object", + "properties": { + "countryOfferInfos": { + "description": "Offer info by country.", + "type": "array", + "items": { + "$ref": "CountryOfferInfo" + } + }, + "offerType": { + "description": "Type of offer.", + "type": "string", + "enumDescriptions": [ + "Unset.", + "AdWords spend X get Y.", + "Youtube video.", + "Spend Match up to Y." + ], + "enum": [ + "OFFER_TYPE_UNSPECIFIED", + "OFFER_TYPE_SPEND_X_GET_Y", + "OFFER_TYPE_VIDEO", + "OFFER_TYPE_SPEND_MATCH" + ] + }, + "maxAccountAge": { + "description": "The maximum age of an account [in days] to be eligible.", + "format": "int32", + "type": "integer" + }, + "qualifiedCustomer": { + "description": "Customers who qualify for this offer.", + "type": "array", + "items": { + "$ref": "OfferCustomer" + } + }, + "terms": { + "description": "Terms of the offer.", + "type": "string" + }, + "showSpecialOfferCopy": { + "description": "Should special text be shown on the offers page.", + "type": "boolean" + }, + "available": { + "description": "The number of codes for this offer that are available for distribution.", + "format": "int32", + "type": "integer" + }, + "description": { + "description": "Description of the offer.", + "type": "string" + }, + "offerLevel": { + "enumDescriptions": [ + "Unset.", + "Users/Agencies that have no offers because of a problem.", + "Users/Agencies that have no offers due to contractural agreements.", + "Users/Agencies that have a manually-configured limit.", + "Some Agencies don't get any offers.", + "Basic level gets 5 per month.", + "Agencies with adequate AHI and spend get 15/month.", + "Badged partners (even in grace) get 50 per month." + ], + "enum": [ + "OFFER_LEVEL_UNSPECIFIED", + "OFFER_LEVEL_DENY_PROBLEM", + "OFFER_LEVEL_DENY_CONTRACT", + "OFFER_LEVEL_MANUAL", + "OFFER_LEVEL_LIMIT_0", + "OFFER_LEVEL_LIMIT_5", + "OFFER_LEVEL_LIMIT_15", + "OFFER_LEVEL_LIMIT_50" + ], + "description": "Level of this offer.", + "type": "string" + }, + "name": { + "description": "Name of the offer.", + "type": "string" + }, + "qualifiedCustomersComplete": { + "description": "Whether or not the list of qualified customers is definitely complete.", + "type": "boolean" + }, + "id": { + "description": "ID of this offer.", + "format": "int64", + "type": "string" + } + }, + "id": "AvailableOffer" + }, + "LatLng": { + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)\n\nThe code in logs/storage/validator/logs_validator_traits.cc treats this type\nas if it were annotated as ST_LOCATION.", + "type": "object", + "properties": { + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" + }, + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "type": "number" + } + }, + "id": "LatLng" + }, + "Money": { + "description": "Represents an amount of money with its currency type.", + "type": "object", + "properties": { + "currencyCode": { + "description": "The 3-letter currency code defined in ISO 4217.", + "type": "string" + }, + "nanos": { + "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "format": "int32", + "type": "integer" + }, + "units": { + "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", + "format": "int64", + "type": "string" + } + }, + "id": "Money" + }, + "AnalyticsSummary": { + "description": "Analytics aggregated data for a `Company` for a given date range.", + "type": "object", + "properties": { + "contactsCount": { + "description": "Aggregated number of times users contacted the `Company`\nfor given date range.", + "format": "int32", + "type": "integer" + }, + "profileViewsCount": { + "description": "Aggregated number of profile views for the `Company` for given date range.", + "format": "int32", + "type": "integer" + }, + "searchViewsCount": { + "description": "Aggregated number of times users saw the `Company`\nin Google Partners Search results for given date range.", + "format": "int32", + "type": "integer" + } + }, + "id": "AnalyticsSummary" + }, + "LogMessageRequest": { + "description": "Request message for\nLogClientMessage.", + "type": "object", + "properties": { + "clientInfo": { + "description": "Map of client info, such as URL, browser navigator, browser platform, etc.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "requestMetadata": { + "$ref": "RequestMetadata", + "description": "Current request metadata." + }, + "level": { + "enumDescriptions": [ + "Unchosen.", + "Message level for tracing information.", + "Message level for informational messages.", + "Message level for potential problems.", + "Message level for serious failures." + ], + "enum": [ + "MESSAGE_LEVEL_UNSPECIFIED", + "ML_FINE", + "ML_INFO", + "ML_WARNING", + "ML_SEVERE" + ], + "description": "Message level of client message.", + "type": "string" + }, + "details": { + "description": "Details about the client message.", + "type": "string" + } + }, + "id": "LogMessageRequest" + }, + "DebugInfo": { + "description": "Debug information about this request.", + "type": "object", + "properties": { + "serviceUrl": { + "description": "URL of the service that handled this request.", + "type": "string" + }, + "serverInfo": { + "description": "Info about the server that serviced this request.", + "type": "string" + }, + "serverTraceInfo": { + "description": "Server-side debug stack trace.", + "type": "string" + } + }, + "id": "DebugInfo" + }, + "Lead": { + "description": "A lead resource that represents an advertiser contact for a `Company`. These\nare usually generated via Google Partner Search (the advertiser portal).", + "type": "object", + "properties": { + "minMonthlyBudget": { + "$ref": "Money", + "description": "The minimum monthly budget lead source is willing to spend." + }, + "givenName": { + "description": "First name of lead source.", + "type": "string" + }, + "websiteUrl": { + "description": "Website URL of lead source.", + "type": "string" + }, + "languageCode": { + "description": "Language code of the lead's language preference, as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "Unchosen.", + "Lead not yet contacted.", + "Lead has been contacted.", + "Lead has become a client.", + "Lead in a state not covered by other options." + ], + "enum": [ + "LEAD_STATE_UNSPECIFIED", + "LEAD", + "CONTACTED", + "CLIENT", + "OTHER" + ], + "description": "The lead's state in relation to the company.", + "type": "string" + }, + "gpsMotivations": { + "enumDescriptions": [ + "Unchosen.", + "Advertiser needs help with their advertising.", + "Advertiser needs help with their website.", + "Advertiser does not have a website." + ], + "description": "List of reasons for using Google Partner Search and creating a lead.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "GPS_MOTIVATION_UNSPECIFIED", + "GPSM_HELP_WITH_ADVERTISING", + "GPSM_HELP_WITH_WEBSITE", + "GPSM_NO_WEBSITE" + ] + } + }, + "email": { + "description": "Email address of lead source.", + "type": "string" + }, + "familyName": { + "description": "Last name of lead source.", + "type": "string" + }, + "comments": { + "description": "Comments lead source gave.", + "type": "string" + }, + "id": { + "description": "ID of the lead.", + "type": "string" + }, + "phoneNumber": { + "description": "Phone number of lead source.", + "type": "string" + }, + "adwordsCustomerId": { + "description": "The AdWords Customer ID of the lead.", + "format": "int64", + "type": "string" + }, + "createTime": { + "description": "Timestamp of when this lead was created.", + "format": "google-datetime", + "type": "string" + }, + "marketingOptIn": { + "description": "Whether or not the lead signed up for marketing emails", + "type": "boolean" + }, + "type": { + "description": "Type of lead.", + "type": "string", + "enumDescriptions": [ + "Unchosen.", + "Google Partner Search." + ], + "enum": [ + "LEAD_TYPE_UNSPECIFIED", + "LT_GPS" + ] + } + }, + "id": "Lead" + }, + "ListUserStatesResponse": { + "description": "Response message for\nListUserStates.", + "type": "object", + "properties": { + "responseMetadata": { + "description": "Current response metadata.", + "$ref": "ResponseMetadata" + }, + "userStates": { + "enumDescriptions": [ + "Unchosen.", + "User must pass \u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e to\ncontact a Partner via Google Partner Search." + ], + "description": "User's states.", + "type": "array", + "items": { + "enum": [ + "USER_STATE_UNSPECIFIED", + "US_REQUIRES_RECAPTCHA_FOR_GPS_CONTACT" + ], + "type": "string" + } + } + }, + "id": "ListUserStatesResponse" + }, + "CompanyRelation": { + "description": "A CompanyRelation resource representing information about a user's\naffiliation and standing with a company in Partners.", + "type": "object", + "properties": { + "companyAdmin": { + "description": "Indicates if the user is an admin for this company.", + "type": "boolean" + }, + "address": { + "description": "The primary address for this company.", + "type": "string" + }, + "isPending": { + "description": "The flag that indicates if the company is pending verification.", + "type": "boolean" + }, + "creationTime": { + "description": "The timestamp of when affiliation was requested.\n@OutputOnly", + "format": "google-datetime", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "Default unspecified value.", + "User has filled in a request to be associated with an company.\nNow waiting email confirmation.", + "Pending approval from company.\nEmail confirmation will not approve this one.", + "Approved by company." + ], + "enum": [ + "USER_COMPANY_REATION_STATE_NONE_SPECIFIED", + "USER_COMPANY_RELATION_STATE_AWAIT_EMAIL", + "USER_COMPANY_RELATION_STATE_AWAIT_ADMIN", + "USER_COMPANY_RELATION_STATE_APPROVED" + ], + "description": "The state of relationship, in terms of approvals.", + "type": "string" + }, + "name": { + "description": "The name (in the company's primary language) for the company.", + "type": "string" + }, + "managerAccount": { + "description": "The AdWords manager account # associated this company.", + "format": "int64", + "type": "string" + }, + "segment": { + "description": "The segment the company is classified as.", + "type": "array", + "items": { + "enum": [ + "COMPANY_SEGMENT_UNKNOWN", + "COMPANY_SEGMENT_NAL", + "COMPANY_SEGMENT_PSP", + "COMPANY_SEGMENT_PPSP" + ], + "type": "string" + }, + "enumDescriptions": [ + "Default segment indicates an unknown.", + "Segment representing a selected group of Partners", + "Segment representing Premier SMB Partners, an AdWords partnership program.", + "A segment of Premier SMB Partners that have relationship with Google." + ] + }, + "specializationStatus": { + "description": "The list of Google Partners specialization statuses for the company.", + "type": "array", + "items": { + "$ref": "SpecializationStatus" + } + }, + "badgeTier": { + "enumDescriptions": [ + "Tier badge is not set.", + "Agency has regular partner badge.", + "Agency has premier badge." + ], + "enum": [ + "BADGE_TIER_NONE", + "BADGE_TIER_REGULAR", + "BADGE_TIER_PREMIER" + ], + "description": "Whether the company is a Partner.", + "type": "string" + }, + "phoneNumber": { + "description": "The phone number for the company's primary address.", + "type": "string" + }, + "website": { + "description": "The website URL for this company.", + "type": "string" + }, + "companyId": { + "description": "The ID of the company. There may be no id if this is a\npending company.5", + "type": "string" + }, + "logoUrl": { + "description": "A URL to a profile photo, e.g. a G+ profile photo.", + "type": "string" + }, + "resolvedTimestamp": { + "description": "The timestamp when the user was approved.\n@OutputOnly", + "format": "google-datetime", + "type": "string" + } + }, + "id": "CompanyRelation" + }, + "Date": { + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "year": { + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "format": "int32", + "type": "integer" + }, + "day": { + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of year. Must be from 1 to 12.", + "format": "int32", + "type": "integer" + } + }, + "id": "Date" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "TrafficSource": { + "description": "Source of traffic for the current request.", + "type": "object", + "properties": { + "trafficSourceId": { + "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + }, + "trafficSubId": { + "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.", + "type": "string" + } + }, + "id": "TrafficSource" + }, + "RequestMetadata": { + "description": "Common data that is in each API request.", + "type": "object", + "properties": { + "locale": { + "description": "Locale to use for the current request.", + "type": "string" + }, + "userOverrides": { + "description": "Values to use instead of the user's respective defaults for the current\nrequest. These are only honored by whitelisted products.", + "$ref": "UserOverrides" + }, + "partnersSessionId": { + "description": "Google Partners session ID.", + "type": "string" + }, + "experimentIds": { + "description": "Experiment IDs the current request belongs to.", + "type": "array", + "items": { + "type": "string" + } + }, + "trafficSource": { + "description": "Source of traffic for the current request.", + "$ref": "TrafficSource" + } + }, + "id": "RequestMetadata" + }, + "CreateLeadRequest": { + "description": "Request message for CreateLead.", + "type": "object", + "properties": { + "requestMetadata": { + "description": "Current request metadata.", + "$ref": "RequestMetadata" + }, + "lead": { + "description": "The lead resource. The `LeadType` must not be `LEAD_TYPE_UNSPECIFIED`\nand either `email` or `phone_number` must be provided.", + "$ref": "Lead" + }, + "recaptchaChallenge": { + "$ref": "RecaptchaChallenge", + "description": "\u003ca href=\"https://www.google.com/recaptcha/\"\u003ereCaptcha\u003c/a\u003e challenge info." + } + }, + "id": "CreateLeadRequest" + }, + "EventData": { + "description": "Key value data pair for an event.", + "type": "object", + "properties": { + "key": { + "enumDescriptions": [ + "Unchosen.", + "Action data.", + "Agency ID data.", + "Agency name data.", + "Agency phone number data.", + "Agency website data.", + "Budget data.", + "Center-point data.", + "Certification data.", + "Comment data.", + "Country data.", + "Currency data.", + "Currently viewed agency ID data.", + "Distance data.", + "Distance type data.", + "Exam data.", + "History token data.", + "Identifier data.", + "Industry data.", + "Insight tag data.", + "Language data.", + "Location data.", + "Marketing opt-in data.", + "Query data.", + "Search start index data.", + "Service data.", + "Show vow data.", + "Solution data.", + "Traffic source ID data.", + "Traffic sub ID data.", + "Viewport data.", + "Website data.", + "Details data.", + "Experiment ID data.", + "Google Partner Search motivation data.", + "URL data.", + "Element we wanted user to focus on.", + "Progress when viewing an item \\[0-100\\]." + ], + "enum": [ + "EVENT_DATA_TYPE_UNSPECIFIED", + "ACTION", + "AGENCY_ID", + "AGENCY_NAME", + "AGENCY_PHONE_NUMBER", + "AGENCY_WEBSITE", + "BUDGET", + "CENTER_POINT", + "CERTIFICATION", + "COMMENT", + "COUNTRY", + "CURRENCY", + "CURRENTLY_VIEWED_AGENCY_ID", + "DISTANCE", + "DISTANCE_TYPE", + "EXAM", + "HISTORY_TOKEN", + "ID", + "INDUSTRY", + "INSIGHT_TAG", + "LANGUAGE", + "LOCATION", + "MARKETING_OPT_IN", + "QUERY", + "SEARCH_START_INDEX", + "SERVICE", + "SHOW_VOW", + "SOLUTION", + "TRAFFIC_SOURCE_ID", + "TRAFFIC_SUB_ID", + "VIEW_PORT", + "WEBSITE", + "DETAILS", + "EXPERIMENT_ID", + "GPS_MOTIVATION", + "URL", + "ELEMENT_FOCUS", + "PROGRESS" + ], + "description": "Data type.", + "type": "string" + }, + "values": { + "description": "Data values.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "EventData" + }, + "ExamStatus": { + "description": "A user's information on a specific exam.", + "type": "object", + "properties": { + "warning": { + "description": "Whether this exam is in the state of warning.", + "type": "boolean" + }, + "expiration": { + "description": "Date this exam is due to expire.", + "format": "google-datetime", + "type": "string" + }, + "lastPassed": { + "description": "The date the user last passed this exam.", + "format": "google-datetime", + "type": "string" + }, + "examType": { + "enumDescriptions": [ + "Unchosen.", + "Adwords Fundamentals exam.", + "AdWords advanced search exam.", + "AdWords advanced display exam.", + "VideoAds exam.", + "DoubleClick exam.", + "Analytics exam.", + "Shopping exam.", + "Mobile exam.", + "Digital Sales exam.", + "Mobile Sites exam." + ], + "enum": [ + "CERTIFICATION_EXAM_TYPE_UNSPECIFIED", + "CET_ADWORDS_FUNDAMENTALS", + "CET_ADWORDS_ADVANCED_SEARCH", + "CET_ADWORDS_ADVANCED_DISPLAY", + "CET_VIDEO_ADS", + "CET_DOUBLECLICK", + "CET_ANALYTICS", + "CET_SHOPPING", + "CET_MOBILE", + "CET_DIGITAL_SALES", + "CET_MOBILE_SITES" + ], + "description": "The type of the exam.", + "type": "string" + }, + "taken": { + "description": "The date the user last taken this exam.", + "format": "google-datetime", + "type": "string" + }, + "passed": { + "description": "Whether this exam has been passed and not expired.", + "type": "boolean" + } + }, + "id": "ExamStatus" + }, + "ListOffersResponse": { + "description": "Response for ListOffer.", + "type": "object", + "properties": { + "responseMetadata": { + "description": "Current response metadata.", + "$ref": "ResponseMetadata" + }, + "noOfferReason": { + "description": "Reason why no Offers are available.", + "type": "string", + "enumDescriptions": [ + "Unset.", + "Not an MCC.", + "Offer limit has been reached.", + "Ineligible for offers." + ], + "enum": [ + "NO_OFFER_REASON_UNSPECIFIED", + "NO_OFFER_REASON_NO_MCC", + "NO_OFFER_REASON_LIMIT_REACHED", + "NO_OFFER_REASON_INELIGIBLE" + ] + }, + "availableOffers": { + "description": "Available Offers to be distributed.", + "type": "array", + "items": { + "$ref": "AvailableOffer" + } + } + }, + "id": "ListOffersResponse" + }, + "CountryOfferInfo": { + "description": "Offer info by country.", + "type": "object", + "properties": { + "offerCountryCode": { + "description": "Country code for which offer codes may be requested.", + "type": "string" + }, + "spendXAmount": { + "description": "(localized) Spend X amount for that country's offer.", + "type": "string" + }, + "offerType": { + "enumDescriptions": [ + "Unset.", + "AdWords spend X get Y.", + "Youtube video.", + "Spend Match up to Y." + ], + "enum": [ + "OFFER_TYPE_UNSPECIFIED", + "OFFER_TYPE_SPEND_X_GET_Y", + "OFFER_TYPE_VIDEO", + "OFFER_TYPE_SPEND_MATCH" + ], + "description": "Type of offer country is eligible for.", + "type": "string" + }, + "getYAmount": { + "description": "(localized) Get Y amount for that country's offer.", + "type": "string" + } + }, + "id": "CountryOfferInfo" + }, + "ListCompaniesResponse": { + "description": "Response message for\nListCompanies.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the `ListCompaniesRequest.page_token` field in the\nsubsequent call to\nListCompanies to retrieve the\nnext page of results.", + "type": "string" + }, + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + }, + "companies": { + "description": "The list of companies.", + "type": "array", + "items": { + "$ref": "Company" + } + } + }, + "id": "ListCompaniesResponse" + }, + "OfferCustomer": { + "description": "Customers qualified for an offer.", + "type": "object", + "properties": { + "getYAmount": { + "description": "Formatted Get Y amount with currency code.", + "type": "string" + }, + "name": { + "description": "Name of the customer.", + "type": "string" + }, + "spendXAmount": { + "description": "Formatted Spend X amount with currency code.", + "type": "string" + }, + "adwordsUrl": { + "description": "URL to the customer's AdWords page.", + "type": "string" + }, + "countryCode": { + "description": "Country code of the customer.", + "type": "string" + }, + "creationTime": { + "description": "Time the customer was created.", + "format": "google-datetime", + "type": "string" + }, + "eligibilityDaysLeft": { + "description": "Days the customer is still eligible.", + "format": "int32", + "type": "integer" + }, + "offerType": { + "description": "Type of the offer", + "type": "string", + "enumDescriptions": [ + "Unset.", + "AdWords spend X get Y.", + "Youtube video.", + "Spend Match up to Y." + ], + "enum": [ + "OFFER_TYPE_UNSPECIFIED", + "OFFER_TYPE_SPEND_X_GET_Y", + "OFFER_TYPE_VIDEO", + "OFFER_TYPE_SPEND_MATCH" + ] + }, + "externalCid": { + "description": "External CID for the customer.", + "format": "int64", + "type": "string" + } + }, + "id": "OfferCustomer" + }, + "CertificationStatus": { + "description": "Google Partners certification status.", + "type": "object", + "properties": { + "isCertified": { + "description": "Whether certification is passing.", + "type": "boolean" + }, + "examStatuses": { + "description": "List of certification exam statuses.", + "type": "array", + "items": { + "$ref": "CertificationExamStatus" + } + }, + "type": { + "description": "The type of the certification.", + "type": "string", + "enumDescriptions": [ + "Unchosen.", + "AdWords certified.", + "YouTube certified.", + "VideoAds certified.", + "Analytics certified.", + "DoubleClick certified.", + "Shopping certified.", + "Mobile certified.", + "Digital sales certified.", + "AdWords Search certified.", + "AdWords Display certified.", + "Mobile Sites certified." + ], + "enum": [ + "CERTIFICATION_TYPE_UNSPECIFIED", + "CT_ADWORDS", + "CT_YOUTUBE", + "CT_VIDEOADS", + "CT_ANALYTICS", + "CT_DOUBLECLICK", + "CT_SHOPPING", + "CT_MOBILE", + "CT_DIGITAL_SALES", + "CT_ADWORDS_SEARCH", + "CT_ADWORDS_DISPLAY", + "CT_MOBILE_SITES" + ] + }, + "userCount": { + "description": "Number of people who are certified,", + "format": "int32", + "type": "integer" + } + }, + "id": "CertificationStatus" + }, + "LocalizedCompanyInfo": { + "description": "The localized company information.", + "type": "object", + "properties": { + "displayName": { + "description": "Localized display name.", + "type": "string" + }, + "languageCode": { + "description": "Language code of the localized company info, as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").", + "type": "string" + }, + "countryCodes": { + "description": "List of country codes for the localized company info.", + "type": "array", + "items": { + "type": "string" + } + }, + "overview": { + "description": "Localized brief description that the company uses to advertise themselves.", + "type": "string" + } + }, + "id": "LocalizedCompanyInfo" + }, + "LogUserEventResponse": { + "description": "Response message for\nLogUserEvent.", + "type": "object", + "properties": { + "responseMetadata": { + "description": "Current response metadata.", + "$ref": "ResponseMetadata" + } + }, + "id": "LogUserEventResponse" + }, + "ListOffersHistoryResponse": { + "description": "Response for ListOfferHistory.", + "type": "object", + "properties": { + "canShowEntireCompany": { + "description": "True if the user has the option to show entire company history.", + "type": "boolean" + }, + "totalResults": { + "description": "Number of results across all pages.", + "format": "int32", + "type": "integer" + }, + "showingEntireCompany": { + "description": "True if this response is showing entire company history.", + "type": "boolean" + }, + "offers": { + "description": "Historical offers meeting request.", + "type": "array", + "items": { + "$ref": "HistoricalOffer" + } + }, + "nextPageToken": { + "description": "Supply this token in a ListOffersHistoryRequest to retrieve the next page.", + "type": "string" + }, + "responseMetadata": { + "description": "Current response metadata.", + "$ref": "ResponseMetadata" + } + }, + "id": "ListOffersHistoryResponse" + }, + "LogMessageResponse": { + "description": "Response message for\nLogClientMessage.", + "type": "object", + "properties": { + "responseMetadata": { + "$ref": "ResponseMetadata", + "description": "Current response metadata." + } + }, + "id": "LogMessageResponse" + }, + "SpecializationStatus": { + "description": "Agency specialization status", + "type": "object", + "properties": { + "badgeSpecialization": { + "description": "The specialization this status is for.", + "type": "string", + "enumDescriptions": [ + "Unknown specialization", + "AdWords Search specialization", + "AdWords Display specialization", + "AdWords Mobile specialization", + "AdWords Video specialization", + "AdWords Shopping specialization" + ], + "enum": [ + "BADGE_SPECIALIZATION_UNKNOWN", + "BADGE_SPECIALIZATION_ADWORDS_SEARCH", + "BADGE_SPECIALIZATION_ADWORDS_DISPLAY", + "BADGE_SPECIALIZATION_ADWORDS_MOBILE", + "BADGE_SPECIALIZATION_ADWORDS_VIDEO", + "BADGE_SPECIALIZATION_ADWORDS_SHOPPING" + ] + }, + "badgeSpecializationState": { + "description": "State of agency specialization.", + "type": "string", + "enumDescriptions": [ + "Unknown state", + "Specialization passed", + "Specialization not passed", + "Specialization in grace" + ], + "enum": [ + "BADGE_SPECIALIZATION_STATE_UNKNOWN", + "BADGE_SPECIALIZATION_STATE_PASSED", + "BADGE_SPECIALIZATION_STATE_NOT_PASSED", + "BADGE_SPECIALIZATION_STATE_IN_GRACE" + ] + } + }, + "id": "SpecializationStatus" + } + }, + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest", + "version": "v2", + "baseUrl": "https://partners.googleapis.com/", + "canonicalName": "Partners", + "kind": "discovery#restDescription", + "servicePath": "", + "description": "Searches certified companies and creates contact leads with them, and also audits the usage of clients.", + "rootUrl": "https://partners.googleapis.com/" } diff --git a/etc/api/people/v1/people-api.json b/etc/api/people/v1/people-api.json index f0faac44dc..f312d14202 100644 --- a/etc/api/people/v1/people-api.json +++ b/etc/api/people/v1/people-api.json @@ -1,1256 +1,1439 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/tzwJjoO4XDFgwNQjmiM8lPsFMzA\"", - "discoveryVersion": "v1", - "id": "people:v1", - "name": "people", - "version": "v1", - "revision": "20160210", - "title": "Google People API", - "description": "The Google People API service gives access to information about profiles and contacts.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/people/", - "protocol": "rest", - "baseUrl": "https://people.googleapis.com/", - "basePath": "", - "rootUrl": "https://people.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "version_module": true, - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/contacts": { - "description": "Manage your contacts" - }, - "https://www.googleapis.com/auth/contacts.readonly": { - "description": "View your contacts" - }, - "https://www.googleapis.com/auth/plus.login": { - "description": "Know your basic profile info and list of people in your circles." - }, - "https://www.googleapis.com/auth/user.addresses.read": { - "description": "View your street addresses" - }, - "https://www.googleapis.com/auth/user.birthday.read": { - "description": "View your complete date of birth" - }, - "https://www.googleapis.com/auth/user.emails.read": { - "description": "View your email addresses" - }, - "https://www.googleapis.com/auth/user.phonenumbers.read": { - "description": "View your phone numbers" - }, - "https://www.googleapis.com/auth/userinfo.email": { - "description": "View your email address" - }, - "https://www.googleapis.com/auth/userinfo.profile": { - "description": "View your basic profile info" - } - } - } - }, - "schemas": { - "Person": { - "id": "Person", - "type": "object", - "description": "Information about a person merged from various data sources such as the authenticated user's contacts and profile data. Fields other than IDs, metadata, and group memberships are user-edited. Most fields can have multiple items. The items in a field have no guaranteed order, but each non-empty field is guaranteed to have exactly one field with `metadata.primary` set to true.", - "properties": { - "resourceName": { - "type": "string", - "description": "The resource name for the person, assigned by the server. An ASCII string with a max length of 27 characters. Always starts with `people/`." - }, - "etag": { - "type": "string", - "description": "The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the resource. Used for web cache validation." - }, - "metadata": { - "$ref": "PersonMetadata", - "description": "Metadata about the person." - }, - "locales": { - "type": "array", - "description": "The person's locale preferences.", - "items": { - "$ref": "Locale" - } - }, - "names": { - "type": "array", - "description": "The person's names.", - "items": { - "$ref": "Name" - } - }, - "nicknames": { - "type": "array", - "description": "The person's nicknames.", - "items": { - "$ref": "Nickname" - } - }, - "coverPhotos": { - "type": "array", - "description": "The person's cover photos.", - "items": { - "$ref": "CoverPhoto" - } - }, - "photos": { - "type": "array", - "description": "The person's photos.", - "items": { - "$ref": "Photo" - } - }, - "genders": { - "type": "array", - "description": "The person's genders.", - "items": { - "$ref": "Gender" - } - }, - "ageRange": { - "type": "string", - "description": "The person's age range.", - "enum": [ - "AGE_RANGE_UNSPECIFIED", - "LESS_THAN_EIGHTEEN", - "EIGHTEEN_TO_TWENTY", - "TWENTY_ONE_OR_OLDER" - ] - }, - "birthdays": { - "type": "array", - "description": "The person's birthdays.", - "items": { - "$ref": "Birthday" - } - }, - "events": { - "type": "array", - "description": "The person's events.", - "items": { - "$ref": "Event" - } - }, - "addresses": { - "type": "array", - "description": "The person's street addresses.", - "items": { - "$ref": "Address" - } - }, - "residences": { - "type": "array", - "description": "The person's residences.", - "items": { - "$ref": "Residence" - } - }, - "emailAddresses": { - "type": "array", - "description": "The person's email addresses.", - "items": { - "$ref": "EmailAddress" - } - }, - "phoneNumbers": { - "type": "array", - "description": "The person's phone numbers.", - "items": { - "$ref": "PhoneNumber" - } - }, - "imClients": { - "type": "array", - "description": "The person's instant messaging clients.", - "items": { - "$ref": "ImClient" - } - }, - "taglines": { - "type": "array", - "description": "The person's taglines.", - "items": { - "$ref": "Tagline" - } - }, - "biographies": { - "type": "array", - "description": "The person's biographies.", - "items": { - "$ref": "Biography" - } - }, - "urls": { - "type": "array", - "description": "The person's associated URLs.", - "items": { - "$ref": "Url" - } - }, - "organizations": { - "type": "array", - "description": "The person's past or current organizations.", - "items": { - "$ref": "Organization" - } - }, - "occupations": { - "type": "array", - "description": "The person's occupations.", - "items": { - "$ref": "Occupation" - } - }, - "interests": { - "type": "array", - "description": "The person's interests.", - "items": { - "$ref": "Interest" - } - }, - "skills": { - "type": "array", - "description": "The person's skills.", - "items": { - "$ref": "Skill" - } - }, - "braggingRights": { - "type": "array", - "description": "The person's bragging rights.", - "items": { - "$ref": "BraggingRights" - } - }, - "relations": { - "type": "array", - "description": "The person's relations.", - "items": { - "$ref": "Relation" - } - }, - "relationshipInterests": { - "type": "array", - "description": "The kind of relationship the person is looking for.", - "items": { - "$ref": "RelationshipInterest" - } - }, - "relationshipStatuses": { - "type": "array", - "description": "The person's relationship statuses.", - "items": { - "$ref": "RelationshipStatus" - } - }, - "memberships": { - "type": "array", - "description": "The person's group memberships.", - "items": { - "$ref": "Membership" - } - } - } - }, - "PersonMetadata": { - "id": "PersonMetadata", - "type": "object", - "description": "Metadata about a person.", - "properties": { - "sources": { - "type": "array", - "description": "The sources of data for the person.", - "items": { - "$ref": "Source" - } - }, - "previousResourceNames": { - "type": "array", - "description": "Any former resource names this person has had. Populated only for [`connections.list`](/people/api/rest/v1/people.connections/list) requests that include a sync token. The resource name may change when adding or removing fields that link a contact and profile such as a verified email, verified phone number, or profile URL.", - "items": { - "type": "string" - } - }, - "deleted": { - "type": "boolean", - "description": "True if the person resource has been deleted. Populated only for [`connections.list`](/people/api/rest/v1/people.connections/list) requests that include a sync token." - }, - "objectType": { - "type": "string", - "description": "The type of the person object.", - "enum": [ - "OBJECT_TYPE_UNSPECIFIED", - "PERSON", - "PAGE" - ] - } - } - }, - "Source": { - "id": "Source", - "type": "object", - "description": "The source of a field.", - "properties": { - "type": { - "type": "string", - "description": "The source type.", - "enum": [ - "OTHER", - "ACCOUNT", - "PROFILE", - "DOMAIN_PROFILE", - "CONTACT" - ] - }, - "id": { - "type": "string", - "description": "A unique identifier within the source type generated by the server." - } - } - }, - "Locale": { - "id": "Locale", - "type": "object", - "description": "A person's locale preference.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the locale." - }, - "value": { - "type": "string", - "description": "The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) language tag representing the locale." - } - } - }, - "FieldMetadata": { - "id": "FieldMetadata", - "type": "object", - "description": "Metadata about a field.", - "properties": { - "primary": { - "type": "boolean", - "description": "True if the field is the primary field; false if the field is a secondary field." - }, - "verified": { - "type": "boolean", - "description": "True if the field is verified; false if the field is unverified. A verified field is typically a name, email address, phone number, or website that has been confirmed to be owned by the person." - }, - "source": { - "$ref": "Source", - "description": "The source of the field." - } - } - }, - "Name": { - "id": "Name", - "type": "object", - "description": "A person's name. If the name is a mononym, the family name is empty.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the name." - }, - "displayName": { - "type": "string", - "description": "The display name formatted according to the locale specified by the viewer's account or the Accept-Language HTTP header." - }, - "familyName": { - "type": "string", - "description": "The family name." - }, - "givenName": { - "type": "string", - "description": "The given name." - }, - "middleName": { - "type": "string", - "description": "The middle name(s)." - }, - "honorificPrefix": { - "type": "string", - "description": "The honorific prefixes, such as `Mrs.` or `Dr.`" - }, - "honorificSuffix": { - "type": "string", - "description": "The honorific suffixes, such as `Jr.`" - }, - "phoneticFamilyName": { - "type": "string", - "description": "The family name spelled as it sounds." - }, - "phoneticGivenName": { - "type": "string", - "description": "The given name spelled as it sounds." - }, - "phoneticMiddleName": { - "type": "string", - "description": "The middle name(s) spelled as they sound." - }, - "phoneticHonorificPrefix": { - "type": "string", - "description": "The honorific prefixes spelled as they sound." - }, - "phoneticHonorificSuffix": { - "type": "string", - "description": "The honorific suffixes spelled as they sound." - } - } - }, - "Nickname": { - "id": "Nickname", - "type": "object", - "description": "A person's nickname.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the nickname." - }, - "value": { - "type": "string", - "description": "The nickname." - }, - "type": { - "type": "string", - "description": "The type of the nickname.", - "enum": [ - "DEFAULT", - "MAIDEN_NAME", - "INITIALS", - "GPLUS", - "OTHER_NAME" - ] - } - } - }, - "CoverPhoto": { - "id": "CoverPhoto", - "type": "object", - "description": "A person's cover photo. A large image shown on the person's profile page that represents who they are or what they care about.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the cover photo." - }, - "url": { - "type": "string", - "description": "The URL of the cover photo." - }, - "default": { - "type": "boolean", - "description": "True if the cover photo is the default cover photo; false if the cover photo is a user-provided cover photo." - } - } - }, - "Photo": { - "id": "Photo", - "type": "object", - "description": "A person's photo. A picture shown next to the person's name to help others recognize the person.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the photo." - }, - "url": { - "type": "string", - "description": "The URL of the photo." - } - } - }, - "Gender": { - "id": "Gender", - "type": "object", - "description": "A person's gender.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the gender." - }, - "value": { - "type": "string", - "description": "The gender for the person. The gender can be custom or predefined. Possible values include, but are not limited to, the following: * `male` * `female` * `other` * `unknown`" - }, - "formattedValue": { - "type": "string", - "description": "The read-only value of the gender translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - } - } - }, - "Birthday": { - "id": "Birthday", - "type": "object", - "description": "A person's birthday. At least one of the `date` and `text` fields are specified. The `date` and `text` fields typically represent the same date, but are not guaranteed to.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the birthday." - }, - "date": { - "$ref": "Date", - "description": "The date of the birthday." - }, - "text": { - "type": "string", - "description": "A free-form string representing the user's birthday." - } - } - }, - "Date": { - "id": "Date", - "type": "object", - "description": "Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The day may be 0 to represent a year and month where the day is not significant. The year may be 0 to represent a month and day independent of year; for example, anniversary date.", - "properties": { - "year": { - "type": "integer", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.", - "format": "int32" - }, - "month": { - "type": "integer", - "description": "Month of year. Must be from 1 to 12.", - "format": "int32" - }, - "day": { - "type": "integer", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant.", - "format": "int32" - } - } - }, - "Event": { - "id": "Event", - "type": "object", - "description": "An event related to the person.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the event." - }, - "date": { - "$ref": "Date", - "description": "The date of the event." - }, - "type": { - "type": "string", - "description": "The type of the event. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `anniversary` * `other`" - }, - "formattedType": { - "type": "string", - "description": "The read-only type of the event translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - } - } - }, - "Address": { - "id": "Address", - "type": "object", - "description": "A person's physical address. May be a P.O. box or street address. All fields are optional.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the address." - }, - "formattedValue": { - "type": "string", - "description": "The read-only value of the address formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - }, - "type": { - "type": "string", - "description": "The type of the address. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `other`" - }, - "formattedType": { - "type": "string", - "description": "The read-only type of the address translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - }, - "poBox": { - "type": "string", - "description": "The P.O. box of the address." - }, - "streetAddress": { - "type": "string", - "description": "The street address." - }, - "extendedAddress": { - "type": "string", - "description": "The extended address of the address; for example, the apartment number." - }, - "city": { - "type": "string", - "description": "The city of the address." - }, - "region": { - "type": "string", - "description": "The region of the address; for example, the state or province." - }, - "postalCode": { - "type": "string", - "description": "The postal code of the address." - }, - "country": { - "type": "string", - "description": "The country of the address." - }, - "countryCode": { - "type": "string", - "description": "The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country code of the address." - } - } - }, - "Residence": { - "id": "Residence", - "type": "object", - "description": "A person's past or current residence.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the residence." - }, - "value": { - "type": "string", - "description": "The address of the residence." - }, - "current": { - "type": "boolean", - "description": "True if the residence is the person's current residence; false if the residence is a past residence." - } - } - }, - "EmailAddress": { - "id": "EmailAddress", - "type": "object", - "description": "A person's email address.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the email address." - }, - "value": { - "type": "string", - "description": "The email address." - }, - "type": { - "type": "string", - "description": "The type of the email address. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `other`" - }, - "formattedType": { - "type": "string", - "description": "The read-only type of the email address translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - } - } - }, - "PhoneNumber": { - "id": "PhoneNumber", - "type": "object", - "description": "A person's phone number.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the phone number." - }, - "value": { - "type": "string", - "description": "The phone number." - }, - "canonicalForm": { - "type": "string", - "description": "The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf) form of the phone number." - }, - "type": { - "type": "string", - "description": "The type of the phone number. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `mobile` * `homeFax` * `workFax` * `otherFax` * `pager` * `workMobile` * `workPager` * `main` * `googleVoice` * `other`" - }, - "formattedType": { - "type": "string", - "description": "The read-only type of the phone number translated and formatted in the viewer's account locale or the the `Accept-Language` HTTP header locale." - } - } - }, - "ImClient": { - "id": "ImClient", - "type": "object", - "description": "A person's instant messaging client.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the IM client." - }, - "username": { - "type": "string", - "description": "The user name used in the IM client." - }, - "type": { - "type": "string", - "description": "The type of the IM client. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `other`" - }, - "formattedType": { - "type": "string", - "description": "The read-only type of the IM client translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - }, - "protocol": { - "type": "string", - "description": "The protocol of the IM client. The protocol can be custom or predefined. Possible values include, but are not limited to, the following: * `aim` * `msn` * `yahoo` * `skype` * `qq` * `googleTalk` * `icq` * `jabber` * `netMeeting`" - }, - "formattedProtocol": { - "type": "string", - "description": "The read-only protocol of the IM client formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - } - } - }, - "Tagline": { - "id": "Tagline", - "type": "object", - "description": "A brief one-line description of the person.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the tagline." - }, - "value": { - "type": "string", - "description": "The tagline." - } - } - }, - "Biography": { - "id": "Biography", - "type": "object", - "description": "A person's short biography.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the biography." - }, - "value": { - "type": "string", - "description": "The short biography." - } - } - }, - "Url": { - "id": "Url", - "type": "object", - "description": "A person's associated URLs.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the URL." - }, - "value": { - "type": "string", - "description": "The URL." - }, - "type": { - "type": "string", - "description": "The type of the URL. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `blog` * `profile` * `homePage` * `ftp` * `reservations` * `appInstallPage`: website for a Google+ application. * `other`" - }, - "formattedType": { - "type": "string", - "description": "The read-only type of the URL translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - } - } - }, - "Organization": { - "id": "Organization", - "type": "object", - "description": "A person's past or current organization. Overlapping date ranges are permitted.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the organization." - }, - "type": { - "type": "string", - "description": "The type of the organization. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `work` * `school`" - }, - "formattedType": { - "type": "string", - "description": "The read-only type of the organization translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - }, - "startDate": { - "$ref": "Date", - "description": "The start date when the person joined the organization." - }, - "endDate": { - "$ref": "Date", - "description": "The end date when the person left the organization." - }, - "current": { - "type": "boolean", - "description": "True if the organization is the person's current organization; false if the organization is a past organization." - }, - "name": { - "type": "string", - "description": "The name of the organization." - }, - "phoneticName": { - "type": "string", - "description": "The phonetic name of the organization." - }, - "department": { - "type": "string", - "description": "The person's department at the organization." - }, - "title": { - "type": "string", - "description": "The person's job title at the organization." - }, - "jobDescription": { - "type": "string", - "description": "The person's job description at the organization." - }, - "symbol": { - "type": "string", - "description": "The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym." - }, - "domain": { - "type": "string", - "description": "The domain name associated with the organization; for example, `google.com`." - }, - "location": { - "type": "string", - "description": "The location of the organization office the person works at." - } - } - }, - "Occupation": { - "id": "Occupation", - "type": "object", - "description": "A person's occupation.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the occupation." - }, - "value": { - "type": "string", - "description": "The occupation; for example, `carpenter`." - } - } - }, - "Interest": { - "id": "Interest", - "type": "object", - "description": "One of the person's interests.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the interest." - }, - "value": { - "type": "string", - "description": "The interest; for example, `stargazing`." - } - } - }, - "Skill": { - "id": "Skill", - "type": "object", - "description": "A skill that the person has.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the skill." - }, - "value": { - "type": "string", - "description": "The skill; for example, `underwater basket weaving`." - } - } - }, - "BraggingRights": { - "id": "BraggingRights", - "type": "object", - "description": "A person's bragging rights.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the bragging rights." - }, - "value": { - "type": "string", - "description": "The bragging rights; for example, `climbed mount everest`." - } - } - }, - "Relation": { - "id": "Relation", - "type": "object", - "description": "A person's relation to another person.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the relation." - }, - "person": { - "type": "string", - "description": "The name of the other person this relation refers to." - }, - "type": { - "type": "string", - "description": "The person's relation to the other person. The type can be custom or predefined. Possible values include, but are not limited to, the following values: * `spouse` * `child` * `mother` * `father` * `parent` * `brother` * `sister` * `friend` * `relative` * `domesticPartner` * `manager` * `assistant` * `referredBy` * `partner`" - }, - "formattedType": { - "type": "string", - "description": "The type of the relation translated and formatted in the viewer's account locale or the locale specified in the Accept-Language HTTP header." - } - } - }, - "RelationshipInterest": { - "id": "RelationshipInterest", - "type": "object", - "description": "The kind of relationship the person is looking for.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the relationship interest." - }, - "value": { - "type": "string", - "description": "The kind of relationship the person is looking for. The value can be custom or predefined. Possible values include, but are not limited to, the following values: * `friend` * `date` * `relationship` * `networking`" - }, - "formattedValue": { - "type": "string", - "description": "The value of the relationship interest translated and formatted in the viewer's account locale or the locale specified in the Accept-Language HTTP header." - } - } - }, - "RelationshipStatus": { - "id": "RelationshipStatus", - "type": "object", - "description": "A person's relationship status.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the relationship status." - }, - "value": { - "type": "string", - "description": "The relationship status. The value can be custom or predefined. Possible values include, but are not limited to, the following: * `single` * `inARelationship` * `engaged` * `married` * `itsComplicated` * `openRelationship` * `widowed` * `inDomesticPartnership` * `inCivilUnion`" - }, - "formattedValue": { - "type": "string", - "description": "The read-only value of the relationship status translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale." - } - } - }, - "Membership": { - "id": "Membership", - "type": "object", - "description": "A person's membership in a group.", - "properties": { - "metadata": { - "$ref": "FieldMetadata", - "description": "Metadata about the membership." - }, - "contactGroupMembership": { - "$ref": "ContactGroupMembership", - "description": "The contact group membership." - }, - "domainMembership": { - "$ref": "DomainMembership", - "description": "The domain membership." - } - } - }, - "ContactGroupMembership": { - "id": "ContactGroupMembership", - "type": "object", - "description": "A Google contact group membership.", - "properties": { - "contactGroupId": { - "type": "string", - "description": "The contact group ID for the contact group membership. The contact group ID can be custom or predefined. Possible values include, but are not limited to, the following: * `myContacts` * `starred` * A numerical ID for user-created groups." - } - } - }, - "DomainMembership": { - "id": "DomainMembership", - "type": "object", - "description": "A Google Apps Domain membership.", - "properties": { - "inViewerDomain": { - "type": "boolean", - "description": "True if the person is in the viewer's Google Apps domain." - } - } - }, - "GetPeopleResponse": { - "id": "GetPeopleResponse", - "type": "object", - "properties": { - "responses": { - "type": "array", - "description": "The response for each requested resource name.", - "items": { - "$ref": "PersonResponse" - } - } - } - }, - "PersonResponse": { - "id": "PersonResponse", - "type": "object", - "description": "The response for a single person", - "properties": { - "httpStatusCode": { - "type": "integer", - "description": "[HTTP 1.1 status code](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).", - "format": "int32" - }, - "person": { - "$ref": "Person", - "description": "The person." - }, - "requestedResourceName": { - "type": "string", - "description": "The original requested resource name. May be different than the resource name on the returned person. The resource name can change when adding or removing fields that link a contact and profile such as a verified email, verified phone number, or a profile URL." - } - } - }, - "ListConnectionsResponse": { - "id": "ListConnectionsResponse", - "type": "object", - "properties": { - "connections": { - "type": "array", - "description": "The list of people that the requestor is connected to.", - "items": { - "$ref": "Person" - } - }, - "nextPageToken": { - "type": "string", - "description": "The token that can be used to retrieve the next page of results." - }, - "nextSyncToken": { - "type": "string", - "description": "The token that can be used to retrieve changes since the last request." - } - } - } - }, - "resources": { - "people": { - "methods": { - "get": { - "id": "people.people.get", - "path": "v1/{+resourceName}", - "httpMethod": "GET", - "description": "Provides information about a person resource for a resource name. Use `people/me` to indicate the authenticated user.", - "parameters": { - "resourceName": { - "type": "string", - "description": "The resource name of the person to provide information about. - To get information about the authenticated user, specify `people/me`. - To get information about any user, specify the resource name that identifies the user, such as the resource names returned by [`people.connections.list`](/people/api/rest/v1/people.connections/list).", - "required": true, - "pattern": "^people/[^/]*$", - "location": "path" - }, - "requestMask.includeField": { - "type": "string", - "description": "Comma-separated list of fields to be included in the response. Omitting this field will include all fields. Each path should start with `person.`: for example, `person.names` or `person.photos`.", - "location": "query" - } - }, - "parameterOrder": [ - "resourceName" - ], - "response": { - "$ref": "Person" - }, - "scopes": [ - "https://www.googleapis.com/auth/contacts", - "https://www.googleapis.com/auth/contacts.readonly", - "https://www.googleapis.com/auth/plus.login", - "https://www.googleapis.com/auth/user.addresses.read", - "https://www.googleapis.com/auth/user.birthday.read", - "https://www.googleapis.com/auth/user.emails.read", - "https://www.googleapis.com/auth/user.phonenumbers.read", - "https://www.googleapis.com/auth/userinfo.email", - "https://www.googleapis.com/auth/userinfo.profile" - ] - }, - "getBatchGet": { - "id": "people.people.getBatchGet", - "path": "v1/people:batchGet", - "httpMethod": "GET", - "description": "Provides information about a list of specific people by specifying a list of requested resource names. Use `people/me` to indicate the authenticated user.", - "parameters": { - "resourceNames": { - "type": "string", - "description": "The resource name, such as one returned by [`people.connections.list`](/people/api/rest/v1/people.connections/list), of one of the people to provide information about. You can include this parameter up to 50 times in one request.", - "repeated": true, - "location": "query" - }, - "requestMask.includeField": { - "type": "string", - "description": "Comma-separated list of fields to be included in the response. Omitting this field will include all fields. Each path should start with `person.`: for example, `person.names` or `person.photos`.", - "location": "query" - } - }, - "response": { - "$ref": "GetPeopleResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/contacts", - "https://www.googleapis.com/auth/contacts.readonly", - "https://www.googleapis.com/auth/plus.login", - "https://www.googleapis.com/auth/user.addresses.read", - "https://www.googleapis.com/auth/user.birthday.read", - "https://www.googleapis.com/auth/user.emails.read", - "https://www.googleapis.com/auth/user.phonenumbers.read", - "https://www.googleapis.com/auth/userinfo.email", - "https://www.googleapis.com/auth/userinfo.profile" - ] - } - }, - "resources": { - "connections": { - "methods": { - "list": { - "id": "people.people.connections.list", - "path": "v1/{+resourceName}/connections", - "httpMethod": "GET", - "description": "Provides a list of the authenticated user's contacts merged with any linked profiles.", - "parameters": { - "resourceName": { - "type": "string", - "description": "The resource name to return connections for. Only `people/me` is valid.", - "required": true, - "pattern": "^people/[^/]*$", - "location": "path" + "baseUrl": "https://people.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Provides access to information about profiles and contacts.", + "servicePath": "", + "basePath": "", + "id": "people:v1", + "documentationLink": "https://developers.google.com/people/", + "revision": "20170518", + "discoveryVersion": "v1", + "version_module": "True", + "schemas": { + "RelationshipStatus": { + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the relationship status." }, - "pageToken": { - "type": "string", - "description": "The token of the page to be returned.", - "location": "query" + "value": { + "description": "The relationship status. The value can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `single`\n* `inARelationship`\n* `engaged`\n* `married`\n* `itsComplicated`\n* `openRelationship`\n* `widowed`\n* `inDomesticPartnership`\n* `inCivilUnion`", + "type": "string" }, - "pageSize": { - "type": "integer", - "description": "The number of connections to include in the response. Valid values are between 1 and 500, inclusive. Defaults to 100.", - "format": "int32", - "location": "query" - }, - "sortOrder": { - "type": "string", - "description": "The order in which the connections should be sorted. Defaults to `LAST_MODIFIED_ASCENDING`.", - "enum": [ - "LAST_MODIFIED_ASCENDING", - "FIRST_NAME_ASCENDING", - "LAST_NAME_ASCENDING" - ], - "location": "query" - }, - "syncToken": { - "type": "string", - "description": "A sync token, returned by a previous call to `people.connections.list`. Only resources changed since the sync token was created are returned.", - "location": "query" - }, - "requestMask.includeField": { - "type": "string", - "description": "Comma-separated list of fields to be included in the response. Omitting this field will include all fields. Each path should start with `person.`: for example, `person.names` or `person.photos`.", - "location": "query" + "formattedValue": { + "description": "The read-only value of the relationship status translated and formatted in\nthe viewer's account locale or the `Accept-Language` HTTP header locale.", + "type": "string" } - }, - "parameterOrder": [ - "resourceName" - ], - "response": { - "$ref": "ListConnectionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/contacts", - "https://www.googleapis.com/auth/contacts.readonly" - ] - } - } + }, + "id": "RelationshipStatus", + "description": "A person's read-only relationship status.", + "type": "object" + }, + "Tagline": { + "description": "A read-only brief one-line description of the person.", + "type": "object", + "properties": { + "metadata": { + "description": "Metadata about the tagline.", + "$ref": "FieldMetadata" + }, + "value": { + "description": "The tagline.", + "type": "string" + } + }, + "id": "Tagline" + }, + "Date": { + "description": "Represents a whole calendar date, for example a date of birth. The time\nof day and time zone are either specified elsewhere or are not\nsignificant. The date is relative to the\n[Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar).\nThe day may be 0 to represent a year and month where the day is not\nsignificant. The year may be 0 to represent a month and day independent\nof year; for example, anniversary date.", + "type": "object", + "properties": { + "month": { + "description": "Month of year. Must be from 1 to 12.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "format": "int32", + "type": "integer" + }, + "day": { + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "format": "int32", + "type": "integer" + } + }, + "id": "Date" + }, + "Name": { + "description": "A person's name. If the name is a mononym, the family name is empty.", + "type": "object", + "properties": { + "phoneticFullName": { + "description": "The full name spelled as it sounds.", + "type": "string" + }, + "displayNameLastFirst": { + "description": "The read-only display name with the last name first formatted according to\nthe locale specified by the viewer's account or the\n\u003ccode\u003eAccept-Language\u003c/code\u003e HTTP header.", + "type": "string" + }, + "displayName": { + "description": "The read-only display name formatted according to the locale specified by\nthe viewer's account or the \u003ccode\u003eAccept-Language\u003c/code\u003e HTTP header.", + "type": "string" + }, + "honorificSuffix": { + "description": "The honorific suffixes, such as `Jr.`", + "type": "string" + }, + "honorificPrefix": { + "description": "The honorific prefixes, such as `Mrs.` or `Dr.`", + "type": "string" + }, + "phoneticHonorificSuffix": { + "description": "The honorific suffixes spelled as they sound.", + "type": "string" + }, + "middleName": { + "description": "The middle name(s).", + "type": "string" + }, + "givenName": { + "description": "The given name.", + "type": "string" + }, + "phoneticHonorificPrefix": { + "description": "The honorific prefixes spelled as they sound.", + "type": "string" + }, + "phoneticGivenName": { + "description": "The given name spelled as it sounds.", + "type": "string" + }, + "phoneticFamilyName": { + "description": "The family name spelled as it sounds.", + "type": "string" + }, + "familyName": { + "description": "The family name.", + "type": "string" + }, + "phoneticMiddleName": { + "description": "The middle name(s) spelled as they sound.", + "type": "string" + }, + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the name." + } + }, + "id": "Name" + }, + "BraggingRights": { + "description": "A person's bragging rights.", + "type": "object", + "properties": { + "metadata": { + "description": "Metadata about the bragging rights.", + "$ref": "FieldMetadata" + }, + "value": { + "description": "The bragging rights; for example, `climbed mount everest`.", + "type": "string" + } + }, + "id": "BraggingRights" + }, + "Locale": { + "description": "A person's locale preference.", + "type": "object", + "properties": { + "metadata": { + "description": "Metadata about the locale.", + "$ref": "FieldMetadata" + }, + "value": { + "description": "The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47)\nlanguage tag representing the locale.", + "type": "string" + } + }, + "id": "Locale" + }, + "Organization": { + "description": "A person's past or current organization. Overlapping date ranges are\npermitted.", + "type": "object", + "properties": { + "phoneticName": { + "description": "The phonetic name of the organization.", + "type": "string" + }, + "type": { + "description": "The type of the organization. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `work`\n* `school`", + "type": "string" + }, + "jobDescription": { + "description": "The person's job description at the organization.", + "type": "string" + }, + "endDate": { + "$ref": "Date", + "description": "The end date when the person left the organization." + }, + "symbol": { + "description": "The symbol associated with the organization; for example, a stock ticker\nsymbol, abbreviation, or acronym.", + "type": "string" + }, + "name": { + "description": "The name of the organization.", + "type": "string" + }, + "metadata": { + "description": "Metadata about the organization.", + "$ref": "FieldMetadata" + }, + "location": { + "description": "The location of the organization office the person works at.", + "type": "string" + }, + "title": { + "description": "The person's job title at the organization.", + "type": "string" + }, + "current": { + "description": "True if the organization is the person's current organization;\nfalse if the organization is a past organization.", + "type": "boolean" + }, + "formattedType": { + "description": "The read-only type of the organization translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", + "type": "string" + }, + "startDate": { + "$ref": "Date", + "description": "The start date when the person joined the organization." + }, + "domain": { + "description": "The domain name associated with the organization; for example, `google.com`.", + "type": "string" + }, + "department": { + "description": "The person's department at the organization.", + "type": "string" + } + }, + "id": "Organization" + }, + "Biography": { + "description": "A person's short biography.", + "type": "object", + "properties": { + "contentType": { + "description": "The content type of the biography.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Plain text.", + "HTML text." + ], + "enum": [ + "CONTENT_TYPE_UNSPECIFIED", + "TEXT_PLAIN", + "TEXT_HTML" + ] + }, + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the biography." + }, + "value": { + "description": "The short biography.", + "type": "string" + } + }, + "id": "Biography" + }, + "AgeRangeType": { + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the age range." + }, + "ageRange": { + "enum": [ + "AGE_RANGE_UNSPECIFIED", + "LESS_THAN_EIGHTEEN", + "EIGHTEEN_TO_TWENTY", + "TWENTY_ONE_OR_OLDER" + ], + "description": "The age range.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Younger than eighteen.", + "Between eighteen and twenty.", + "Twenty-one and older." + ] + } + }, + "id": "AgeRangeType", + "description": "A person's age range.", + "type": "object" + }, + "FieldMetadata": { + "description": "Metadata about a field.", + "type": "object", + "properties": { + "primary": { + "description": "True if the field is the primary field; false if the field is a secondary\nfield.", + "type": "boolean" + }, + "source": { + "$ref": "Source", + "description": "The source of the field." + }, + "verified": { + "description": "True if the field is verified; false if the field is unverified. A\nverified field is typically a name, email address, phone number, or\nwebsite that has been confirmed to be owned by the person.", + "type": "boolean" + } + }, + "id": "FieldMetadata" + }, + "Source": { + "description": "The source of a field.", + "type": "object", + "properties": { + "profileMetadata": { + "description": "Metadata about a source of type PROFILE.", + "$ref": "ProfileMetadata" + }, + "type": { + "enumDescriptions": [ + "Unspecified.", + "[Google Account](https://accounts.google.com).", + "[Google profile](https://profiles.google.com). You can view the\nprofile at https://profiles.google.com/\u003cid\u003e where \u003cid\u003e is the source\nid.", + "[Google Apps domain profile](https://admin.google.com).", + "[Google contact](https://contacts.google.com). You can view the\ncontact at https://contact.google.com/\u003cid\u003e where \u003cid\u003e is the source\nid." + ], + "enum": [ + "SOURCE_TYPE_UNSPECIFIED", + "ACCOUNT", + "PROFILE", + "DOMAIN_PROFILE", + "CONTACT" + ], + "description": "The source type.", + "type": "string" + }, + "etag": { + "description": "The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the\nsource. Used for web cache validation. Only populated in\nperson.metadata.sources.", + "type": "string" + }, + "id": { + "description": "The unique identifier within the source type generated by the server.", + "type": "string" + } + }, + "id": "Source" + }, + "RelationshipInterest": { + "description": "A person's read-only relationship interest .", + "type": "object", + "properties": { + "value": { + "description": "The kind of relationship the person is looking for. The value can be custom\nor predefined. Possible values include, but are not limited to, the\nfollowing values:\n\n* `friend`\n* `date`\n* `relationship`\n* `networking`", + "type": "string" + }, + "formattedValue": { + "description": "The value of the relationship interest translated and formatted in the\nviewer's account locale or the locale specified in the Accept-Language\nHTTP header.", + "type": "string" + }, + "metadata": { + "description": "Metadata about the relationship interest.", + "$ref": "FieldMetadata" + } + }, + "id": "RelationshipInterest" + }, + "PersonResponse": { + "properties": { + "person": { + "description": "The person.", + "$ref": "Person" + }, + "status": { + "description": "The status of the response.", + "$ref": "Status" + }, + "httpStatusCode": { + "description": "DEPRECATED(Please use status instead).\n[HTTP 1.1 status\ncode](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).", + "format": "int32", + "type": "integer" + }, + "requestedResourceName": { + "description": "The original requested resource name. May be different than the resource\nname on the returned person.\n\nThe resource name can change when adding or removing fields that link a\ncontact and profile such as a verified email, verified phone number, or a\nprofile URL.", + "type": "string" + } + }, + "id": "PersonResponse", + "description": "The response for a single person", + "type": "object" + }, + "Relation": { + "description": "A person's relation to another person.", + "type": "object", + "properties": { + "person": { + "description": "The name of the other person this relation refers to.", + "type": "string" + }, + "formattedType": { + "description": "The type of the relation translated and formatted in the viewer's account\nlocale or the locale specified in the Accept-Language HTTP header.", + "type": "string" + }, + "metadata": { + "description": "Metadata about the relation.", + "$ref": "FieldMetadata" + }, + "type": { + "description": "The person's relation to the other person. The type can be custom or predefined.\nPossible values include, but are not limited to, the following values:\n\n* `spouse`\n* `child`\n* `mother`\n* `father`\n* `parent`\n* `brother`\n* `sister`\n* `friend`\n* `relative`\n* `domesticPartner`\n* `manager`\n* `assistant`\n* `referredBy`\n* `partner`", + "type": "string" + } + }, + "id": "Relation" + }, + "Occupation": { + "description": "A person's occupation.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the occupation." + }, + "value": { + "description": "The occupation; for example, `carpenter`.", + "type": "string" + } + }, + "id": "Occupation" + }, + "Person": { + "description": "Information about a person merged from various data sources such as the\nauthenticated user's contacts and profile data.\n\nMost fields can have multiple items. The items in a field have no guaranteed\norder, but each non-empty field is guaranteed to have exactly one field with\n`metadata.primary` set to true.", + "type": "object", + "properties": { + "addresses": { + "description": "The person's street addresses.", + "type": "array", + "items": { + "$ref": "Address" + } + }, + "events": { + "description": "The person's events.", + "type": "array", + "items": { + "$ref": "Event" + } + }, + "memberships": { + "description": "The person's group memberships.", + "type": "array", + "items": { + "$ref": "Membership" + } + }, + "phoneNumbers": { + "description": "The person's phone numbers.", + "type": "array", + "items": { + "$ref": "PhoneNumber" + } + }, + "coverPhotos": { + "description": "The person's cover photos.", + "type": "array", + "items": { + "$ref": "CoverPhoto" + } + }, + "imClients": { + "description": "The person's instant messaging clients.", + "type": "array", + "items": { + "$ref": "ImClient" + } + }, + "birthdays": { + "description": "The person's birthdays.", + "type": "array", + "items": { + "$ref": "Birthday" + } + }, + "locales": { + "description": "The person's locale preferences.", + "type": "array", + "items": { + "$ref": "Locale" + } + }, + "relationshipInterests": { + "description": "The kind of relationship the person is looking for.", + "type": "array", + "items": { + "$ref": "RelationshipInterest" + } + }, + "urls": { + "description": "The person's associated URLs.", + "type": "array", + "items": { + "$ref": "Url" + } + }, + "nicknames": { + "description": "The person's nicknames.", + "type": "array", + "items": { + "$ref": "Nickname" + } + }, + "names": { + "description": "The person's names.", + "type": "array", + "items": { + "$ref": "Name" + } + }, + "relations": { + "description": "The person's relations.", + "type": "array", + "items": { + "$ref": "Relation" + } + }, + "occupations": { + "description": "The person's occupations.", + "type": "array", + "items": { + "$ref": "Occupation" + } + }, + "emailAddresses": { + "description": "The person's email addresses.", + "type": "array", + "items": { + "$ref": "EmailAddress" + } + }, + "organizations": { + "description": "The person's past or current organizations.", + "type": "array", + "items": { + "$ref": "Organization" + } + }, + "etag": { + "description": "The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the\nresource. Used for web cache validation.", + "type": "string" + }, + "braggingRights": { + "description": "The person's bragging rights.", + "type": "array", + "items": { + "$ref": "BraggingRights" + } + }, + "metadata": { + "description": "Metadata about the person.", + "$ref": "PersonMetadata" + }, + "residences": { + "description": "The person's residences.", + "type": "array", + "items": { + "$ref": "Residence" + } + }, + "genders": { + "description": "The person's genders.", + "type": "array", + "items": { + "$ref": "Gender" + } + }, + "interests": { + "description": "The person's interests.", + "type": "array", + "items": { + "$ref": "Interest" + } + }, + "resourceName": { + "description": "The resource name for the person, assigned by the server. An ASCII string\nwith a max length of 27 characters, in the form of `people/\u003cperson_id\u003e`.", + "type": "string" + }, + "biographies": { + "description": "The person's biographies.", + "type": "array", + "items": { + "$ref": "Biography" + } + }, + "skills": { + "description": "The person's skills.", + "type": "array", + "items": { + "$ref": "Skill" + } + }, + "relationshipStatuses": { + "description": "The person's relationship statuses.", + "type": "array", + "items": { + "$ref": "RelationshipStatus" + } + }, + "photos": { + "description": "The person's photos.", + "type": "array", + "items": { + "$ref": "Photo" + } + }, + "ageRange": { + "enumDescriptions": [ + "Unspecified.", + "Younger than eighteen.", + "Between eighteen and twenty.", + "Twenty-one and older." + ], + "enum": [ + "AGE_RANGE_UNSPECIFIED", + "LESS_THAN_EIGHTEEN", + "EIGHTEEN_TO_TWENTY", + "TWENTY_ONE_OR_OLDER" + ], + "description": "DEPRECATED(Please read person.age_ranges instead). The person's age range.", + "type": "string" + }, + "taglines": { + "description": "The person's taglines.", + "type": "array", + "items": { + "$ref": "Tagline" + } + }, + "ageRanges": { + "description": "The person's age ranges.", + "type": "array", + "items": { + "$ref": "AgeRangeType" + } + } + }, + "id": "Person" + }, + "GetPeopleResponse": { + "type": "object", + "properties": { + "responses": { + "description": "The response for each requested resource name.", + "type": "array", + "items": { + "$ref": "PersonResponse" + } + } + }, + "id": "GetPeopleResponse" + }, + "Photo": { + "description": "A person's read-only photo. A picture shown next to the person's name to\nhelp others recognize the person.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the photo." + }, + "url": { + "description": "The URL of the photo.", + "type": "string" + } + }, + "id": "Photo" + }, + "PhoneNumber": { + "description": "A person's phone number.", + "type": "object", + "properties": { + "metadata": { + "description": "Metadata about the phone number.", + "$ref": "FieldMetadata" + }, + "type": { + "description": "The type of the phone number. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `mobile`\n* `homeFax`\n* `workFax`\n* `otherFax`\n* `pager`\n* `workMobile`\n* `workPager`\n* `main`\n* `googleVoice`\n* `other`", + "type": "string" + }, + "value": { + "description": "The phone number.", + "type": "string" + }, + "formattedType": { + "description": "The read-only type of the phone number translated and formatted in the\nviewer's account locale or the the `Accept-Language` HTTP header locale.", + "type": "string" + }, + "canonicalForm": { + "description": "The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf)\nform of the phone number.", + "type": "string" + } + }, + "id": "PhoneNumber" + }, + "ListConnectionsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "The token that can be used to retrieve the next page of results.", + "type": "string" + }, + "connections": { + "description": "The list of people that the requestor is connected to.", + "type": "array", + "items": { + "$ref": "Person" + } + }, + "nextSyncToken": { + "description": "The token that can be used to retrieve changes since the last request.", + "type": "string" + }, + "totalItems": { + "description": "The total number of items in the list without pagination.", + "format": "int32", + "type": "integer" + }, + "totalPeople": { + "description": "DEPRECATED(Please use total_items). The total number of people in the list\nwithout pagination.", + "format": "int32", + "type": "integer" + } + }, + "id": "ListConnectionsResponse" + }, + "Birthday": { + "description": "A person's birthday. At least one of the `date` and `text` fields are\nspecified. The `date` and `text` fields typically represent the same\ndate, but are not guaranteed to.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the birthday." + }, + "text": { + "description": "A free-form string representing the user's birthday.", + "type": "string" + }, + "date": { + "description": "The date of the birthday.", + "$ref": "Date" + } + }, + "id": "Birthday" + }, + "Residence": { + "description": "A person's past or current residence.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the residence." + }, + "current": { + "description": "True if the residence is the person's current residence;\nfalse if the residence is a past residence.", + "type": "boolean" + }, + "value": { + "description": "The address of the residence.", + "type": "string" + } + }, + "id": "Residence" + }, + "Address": { + "description": "A person's physical address. May be a P.O. box or street address. All fields\nare optional.", + "type": "object", + "properties": { + "poBox": { + "description": "The P.O. box of the address.", + "type": "string" + }, + "postalCode": { + "description": "The postal code of the address.", + "type": "string" + }, + "region": { + "description": "The region of the address; for example, the state or province.", + "type": "string" + }, + "streetAddress": { + "description": "The street address.", + "type": "string" + }, + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the address." + }, + "countryCode": { + "description": "The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country\ncode of the address.", + "type": "string" + }, + "formattedType": { + "description": "The read-only type of the address translated and formatted in the viewer's\naccount locale or the `Accept-Language` HTTP header locale.", + "type": "string" + }, + "city": { + "description": "The city of the address.", + "type": "string" + }, + "formattedValue": { + "description": "The unstructured value of the address. If this is not set by the user it\nwill be automatically constructed from structured values.", + "type": "string" + }, + "country": { + "description": "The country of the address.", + "type": "string" + }, + "type": { + "description": "The type of the address. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `other`", + "type": "string" + }, + "extendedAddress": { + "description": "The extended address of the address; for example, the apartment number.", + "type": "string" + } + }, + "id": "Address" + }, + "ContactGroupMembership": { + "description": "A Google contact group membership.", + "type": "object", + "properties": { + "contactGroupId": { + "description": "The contact group ID for the contact group membership. The contact group\nID can be custom or predefined. Possible values include, but are not\nlimited to, the following:\n\n* `myContacts`\n* `starred`\n* A numerical ID for user-created groups.", + "type": "string" + } + }, + "id": "ContactGroupMembership" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + } + }, + "id": "Status" + }, + "Event": { + "description": "An event related to the person.", + "type": "object", + "properties": { + "formattedType": { + "description": "The read-only type of the event translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", + "type": "string" + }, + "metadata": { + "description": "Metadata about the event.", + "$ref": "FieldMetadata" + }, + "type": { + "description": "The type of the event. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `anniversary`\n* `other`", + "type": "string" + }, + "date": { + "$ref": "Date", + "description": "The date of the event." + } + }, + "id": "Event" + }, + "PersonMetadata": { + "properties": { + "sources": { + "description": "The sources of data for the person.", + "type": "array", + "items": { + "$ref": "Source" + } + }, + "previousResourceNames": { + "description": "Any former resource names this person has had. Populated only for\n[`connections.list`](/people/api/rest/v1/people.connections/list) requests\nthat include a sync token.\n\nThe resource name may change when adding or removing fields that link a\ncontact and profile such as a verified email, verified phone number, or\nprofile URL.", + "type": "array", + "items": { + "type": "string" + } + }, + "deleted": { + "description": "True if the person resource has been deleted. Populated only for\n[`connections.list`](/people/api/rest/v1/people.connections/list) requests\nthat include a sync token.", + "type": "boolean" + }, + "objectType": { + "description": "DEPRECATED(Please read person.metadata.sources.profile_metadata instead).\nThe type of the person object.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Person.", + "[Google+ Page.](http://www.google.com/+/brands/)" + ], + "enum": [ + "OBJECT_TYPE_UNSPECIFIED", + "PERSON", + "PAGE" + ] + }, + "linkedPeopleResourceNames": { + "description": "Resource names of people linked to this resource.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "PersonMetadata", + "description": "The read-only metadata about a person.", + "type": "object" + }, + "ProfileMetadata": { + "properties": { + "objectType": { + "description": "The profile object type.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Person.", + "[Google+ Page.](http://www.google.com/+/brands/)" + ], + "enum": [ + "OBJECT_TYPE_UNSPECIFIED", + "PERSON", + "PAGE" + ] + } + }, + "id": "ProfileMetadata", + "description": "The read-only metadata about a profile.", + "type": "object" + }, + "Gender": { + "description": "A person's gender.", + "type": "object", + "properties": { + "formattedValue": { + "description": "The read-only value of the gender translated and formatted in the viewer's\naccount locale or the `Accept-Language` HTTP header locale.", + "type": "string" + }, + "metadata": { + "description": "Metadata about the gender.", + "$ref": "FieldMetadata" + }, + "value": { + "description": "The gender for the person. The gender can be custom or predefined.\nPossible values include, but are not limited to, the\nfollowing:\n\n* `male`\n* `female`\n* `other`\n* `unknown`", + "type": "string" + } + }, + "id": "Gender" + }, + "Url": { + "properties": { + "metadata": { + "description": "Metadata about the URL.", + "$ref": "FieldMetadata" + }, + "type": { + "description": "The type of the URL. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `blog`\n* `profile`\n* `homePage`\n* `ftp`\n* `reservations`\n* `appInstallPage`: website for a Google+ application.\n* `other`", + "type": "string" + }, + "value": { + "description": "The URL.", + "type": "string" + }, + "formattedType": { + "description": "The read-only type of the URL translated and formatted in the viewer's\naccount locale or the `Accept-Language` HTTP header locale.", + "type": "string" + } + }, + "id": "Url", + "description": "A person's associated URLs.", + "type": "object" + }, + "CoverPhoto": { + "description": "A person's read-only cover photo. A large image shown on the person's\nprofile page that represents who they are or what they care about.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the cover photo." + }, + "default": { + "description": "True if the cover photo is the default cover photo;\nfalse if the cover photo is a user-provided cover photo.", + "type": "boolean" + }, + "url": { + "description": "The URL of the cover photo.", + "type": "string" + } + }, + "id": "CoverPhoto" + }, + "ImClient": { + "description": "A person's instant messaging client.", + "type": "object", + "properties": { + "formattedType": { + "description": "The read-only type of the IM client translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", + "type": "string" + }, + "protocol": { + "description": "The protocol of the IM client. The protocol can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `aim`\n* `msn`\n* `yahoo`\n* `skype`\n* `qq`\n* `googleTalk`\n* `icq`\n* `jabber`\n* `netMeeting`", + "type": "string" + }, + "metadata": { + "description": "Metadata about the IM client.", + "$ref": "FieldMetadata" + }, + "type": { + "description": "The type of the IM client. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `other`", + "type": "string" + }, + "username": { + "description": "The user name used in the IM client.", + "type": "string" + }, + "formattedProtocol": { + "description": "The read-only protocol of the IM client formatted in the viewer's account\nlocale or the `Accept-Language` HTTP header locale.", + "type": "string" + } + }, + "id": "ImClient" + }, + "Interest": { + "description": "One of the person's interests.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the interest." + }, + "value": { + "description": "The interest; for example, `stargazing`.", + "type": "string" + } + }, + "id": "Interest" + }, + "Nickname": { + "properties": { + "metadata": { + "description": "Metadata about the nickname.", + "$ref": "FieldMetadata" + }, + "type": { + "enumDescriptions": [ + "Generic nickname.", + "Maiden name or birth family name. Used when the person's family name has\nchanged as a result of marriage.", + "Initials.", + "Google+ profile nickname.", + "A professional affiliation or other name; for example, `Dr. Smith.`" + ], + "enum": [ + "DEFAULT", + "MAIDEN_NAME", + "INITIALS", + "GPLUS", + "OTHER_NAME" + ], + "description": "The type of the nickname.", + "type": "string" + }, + "value": { + "description": "The nickname.", + "type": "string" + } + }, + "id": "Nickname", + "description": "A person's nickname.", + "type": "object" + }, + "EmailAddress": { + "description": "A person's email address.", + "type": "object", + "properties": { + "displayName": { + "description": "The display name of the email.", + "type": "string" + }, + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the email address." + }, + "type": { + "description": "The type of the email address. The type can be custom or predefined.\nPossible values include, but are not limited to, the following:\n\n* `home`\n* `work`\n* `other`", + "type": "string" + }, + "value": { + "description": "The email address.", + "type": "string" + }, + "formattedType": { + "description": "The read-only type of the email address translated and formatted in the\nviewer's account locale or the `Accept-Language` HTTP header locale.", + "type": "string" + } + }, + "id": "EmailAddress" + }, + "Skill": { + "description": "A skill that the person has.", + "type": "object", + "properties": { + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the skill." + }, + "value": { + "description": "The skill; for example, `underwater basket weaving`.", + "type": "string" + } + }, + "id": "Skill" + }, + "DomainMembership": { + "description": "A Google Apps Domain membership.", + "type": "object", + "properties": { + "inViewerDomain": { + "description": "True if the person is in the viewer's Google Apps domain.", + "type": "boolean" + } + }, + "id": "DomainMembership" + }, + "Membership": { + "description": "A person's read-only membership in a group.", + "type": "object", + "properties": { + "contactGroupMembership": { + "$ref": "ContactGroupMembership", + "description": "The contact group membership." + }, + "domainMembership": { + "description": "The domain membership.", + "$ref": "DomainMembership" + }, + "metadata": { + "$ref": "FieldMetadata", + "description": "Metadata about the membership." + } + }, + "id": "Membership" } - } - } - } + }, + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "canonicalName": "People Service", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/plus.login": { + "description": "Know the list of people in your circles, your age range, and language" + }, + "https://www.googleapis.com/auth/userinfo.profile": { + "description": "View your basic profile info" + }, + "https://www.googleapis.com/auth/user.emails.read": { + "description": "View your email addresses" + }, + "https://www.googleapis.com/auth/contacts": { + "description": "Manage your contacts" + }, + "https://www.googleapis.com/auth/user.addresses.read": { + "description": "View your street addresses" + }, + "https://www.googleapis.com/auth/userinfo.email": { + "description": "View your email address" + }, + "https://www.googleapis.com/auth/user.phonenumbers.read": { + "description": "View your phone numbers" + }, + "https://www.googleapis.com/auth/user.birthday.read": { + "description": "View your complete date of birth" + }, + "https://www.googleapis.com/auth/contacts.readonly": { + "description": "View your contacts" + } + } + } + }, + "rootUrl": "https://people.googleapis.com/", + "ownerDomain": "google.com", + "name": "people", + "batchPath": "batch", + "title": "Google People API", + "ownerName": "Google", + "resources": { + "people": { + "methods": { + "getBatchGet": { + "httpMethod": "GET", + "response": { + "$ref": "GetPeopleResponse" + }, + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/contacts", + "https://www.googleapis.com/auth/contacts.readonly", + "https://www.googleapis.com/auth/plus.login", + "https://www.googleapis.com/auth/user.addresses.read", + "https://www.googleapis.com/auth/user.birthday.read", + "https://www.googleapis.com/auth/user.emails.read", + "https://www.googleapis.com/auth/user.phonenumbers.read", + "https://www.googleapis.com/auth/userinfo.email", + "https://www.googleapis.com/auth/userinfo.profile" + ], + "parameters": { + "requestMask.includeField": { + "description": "Comma-separated list of fields to be included in the response. Omitting\nthis field will include all fields except for connections.list requests,\nwhich have a default mask that includes common fields like metadata, name,\nphoto, and profile url.\nEach path should start with `person.`: for example, `person.names` or\n`person.photos`.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + }, + "resourceNames": { + "description": "The resource name, such as one returned by\n[`people.connections.list`](/people/api/rest/v1/people.connections/list),\nof one of the people to provide information about. You can include this\nparameter up to 50 times in one request.", + "type": "string", + "repeated": true, + "location": "query" + } + }, + "flatPath": "v1/people:batchGet", + "id": "people.people.getBatchGet", + "path": "v1/people:batchGet", + "description": "Provides information about a list of specific people by specifying a list\nof requested resource names. Use `people/me` to indicate the authenticated\nuser." + }, + "get": { + "flatPath": "v1/people/{peopleId}", + "path": "v1/{+resourceName}", + "id": "people.people.get", + "description": "Provides information about a person for a resource name. Use\n`people/me` to indicate the authenticated user.", + "parameterOrder": [ + "resourceName" + ], + "httpMethod": "GET", + "response": { + "$ref": "Person" + }, + "parameters": { + "resourceName": { + "description": "The resource name of the person to provide information about.\n\n- To get information about the authenticated user, specify `people/me`.\n- To get information about any user, specify the resource name that\n identifies the user, such as the resource names returned by\n [`people.connections.list`](/people/api/rest/v1/people.connections/list).", + "required": true, + "type": "string", + "pattern": "^people/[^/]+$", + "location": "path" + }, + "requestMask.includeField": { + "description": "Comma-separated list of fields to be included in the response. Omitting\nthis field will include all fields except for connections.list requests,\nwhich have a default mask that includes common fields like metadata, name,\nphoto, and profile url.\nEach path should start with `person.`: for example, `person.names` or\n`person.photos`.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts", + "https://www.googleapis.com/auth/contacts.readonly", + "https://www.googleapis.com/auth/plus.login", + "https://www.googleapis.com/auth/user.addresses.read", + "https://www.googleapis.com/auth/user.birthday.read", + "https://www.googleapis.com/auth/user.emails.read", + "https://www.googleapis.com/auth/user.phonenumbers.read", + "https://www.googleapis.com/auth/userinfo.email", + "https://www.googleapis.com/auth/userinfo.profile" + ] + } + }, + "resources": { + "connections": { + "methods": { + "list": { + "flatPath": "v1/people/{peopleId}/connections", + "id": "people.people.connections.list", + "path": "v1/{+resourceName}/connections", + "description": "Provides a list of the authenticated user's contacts merged with any\nlinked profiles.", + "httpMethod": "GET", + "parameterOrder": [ + "resourceName" + ], + "response": { + "$ref": "ListConnectionsResponse" + }, + "parameters": { + "syncToken": { + "description": "A sync token, returned by a previous call to `people.connections.list`.\nOnly resources changed since the sync token was created will be returned.", + "type": "string", + "location": "query" + }, + "sortOrder": { + "location": "query", + "enum": [ + "LAST_MODIFIED_ASCENDING", + "FIRST_NAME_ASCENDING", + "LAST_NAME_ASCENDING" + ], + "description": "The order in which the connections should be sorted. Defaults to\n`LAST_MODIFIED_ASCENDING`.", + "type": "string" + }, + "requestSyncToken": { + "location": "query", + "description": "Whether the response should include a sync token, which can be used to get\nall changes since the last request.", + "type": "boolean" + }, + "pageToken": { + "description": "The token of the page to be returned.", + "type": "string", + "location": "query" + }, + "resourceName": { + "location": "path", + "description": "The resource name to return connections for. Only `people/me` is valid.", + "required": true, + "type": "string", + "pattern": "^people/[^/]+$" + }, + "pageSize": { + "location": "query", + "description": "The number of connections to include in the response. Valid values are\nbetween 1 and 2000, inclusive. Defaults to 100.", + "format": "int32", + "type": "integer" + }, + "requestMask.includeField": { + "description": "Comma-separated list of fields to be included in the response. Omitting\nthis field will include all fields except for connections.list requests,\nwhich have a default mask that includes common fields like metadata, name,\nphoto, and profile url.\nEach path should start with `person.`: for example, `person.names` or\n`person.photos`.", + "format": "google-fieldmask", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts", + "https://www.googleapis.com/auth/contacts.readonly" + ] + } + } + } + } + } + }, + "parameters": { + "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" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + } + }, + "version": "v1" } diff --git a/etc/api/playmoviespartner/v1/playmoviespartner-api.json b/etc/api/playmoviespartner/v1/playmoviespartner-api.json index 9aa4eb53cc..888eca184e 100644 --- a/etc/api/playmoviespartner/v1/playmoviespartner-api.json +++ b/etc/api/playmoviespartner/v1/playmoviespartner-api.json @@ -1,1559 +1,1031 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/nOdrkDPVE_ecVVN74uINxtcznYM\"", - "discoveryVersion": "v1", - "id": "playmoviespartner:v1", - "name": "playmoviespartner", - "canonicalName": "Play Movies", - "version": "v1", - "revision": "20160518", - "title": "Google Play Movies Partner API", - "description": "Gets the delivery status of titles for Google Play Movies Partners.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/playmoviespartner/", - "protocol": "rest", - "baseUrl": "https://playmoviespartner.googleapis.com/", - "basePath": "", - "rootUrl": "https://playmoviespartner.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/playmovies_partner.readonly": { - "description": "View the digital assets you publish on Google Play Movies and TV" - } - } - } - }, - "schemas": { - "Avail": { - "id": "Avail", - "type": "object", - "description": "An Avail describes the Availability Window of a specific Edit in a given country, which means the period Google is allowed to sell or rent the Edit. Avails are exposed in EMA format Version 1.6b (available at http://www.movielabs.com/md/avails/) Studios can see the Avails for the Titles they own. Post-production houses cannot see any Avails.", - "properties": { - "availId": { - "type": "string", - "description": "ID internally generated by Google to uniquely identify an Avail. Not part of EMA Specs." - }, - "displayName": { - "type": "string", - "description": "The name of the studio that owns the Edit referred in the Avail. This is the equivalent of `studio_name` in other resources, but it follows the EMA nomenclature. Example: \"Google Films\"." - }, - "storeLanguage": { - "type": "string", - "description": "Spoken language of the intended audience. Language shall be encoded in accordance with RFC 5646. Example: \"fr\"." - }, - "territory": { - "type": "string", - "description": "ISO 3166-1 alpha-2 country code for the country or territory of this Avail. For Avails, we use Territory in lieu of Country to comply with EMA specifications. But please note that Territory and Country identify the same thing. Example: \"US\"." - }, - "workType": { - "type": "string", - "description": "Work type as enumerated in EMA.", - "enum": [ - "TITLE_TYPE_UNSPECIFIED", - "MOVIE", - "SEASON", - "EPISODE", - "BUNDLE" - ] - }, - "seriesTitleInternalAlias": { - "type": "string", - "description": "Title used by involved parties to refer to this series. Only available on TV Avails. Example: \"Googlers, The\"." - }, - "seasonNumber": { - "type": "string", - "description": "The number assigned to the season within a series. Only available on TV Avails. Example: \"1\"." - }, - "episodeNumber": { - "type": "string", - "description": "The number assigned to the episode within a season. Only available on TV Avails. Example: \"3\"." - }, - "seasonTitleInternalAlias": { - "type": "string", - "description": "Title used by involved parties to refer to this season. Only available on TV Avails. Example: \"Googlers, The\"." - }, - "episodeTitleInternalAlias": { - "type": "string", - "description": "OPTIONAL.TV Only. Title used by involved parties to refer to this episode. Only available on TV Avails. Example: \"Coding at Google\"." - }, - "titleInternalAlias": { - "type": "string", - "description": "Title used by involved parties to refer to this content. Example: \"Googlers, The\". Only available on Movie Avails." - }, - "licenseType": { - "type": "string", - "description": "Type of transaction.", - "enum": [ - "LICENSE_TYPE_UNSPECIFIED", - "EST", - "VOD", - "SVOD", - "POEST" - ] - }, - "formatProfile": { - "type": "string", - "description": "Indicates the format profile covered by the transaction.", - "enum": [ - "FORMAT_PROFILE_UNSPECIFIED", - "SD", - "HD" - ] - }, - "start": { - "type": "string", - "description": "Start of term in YYYY-MM-DD format in the timezone of the country of the Avail. Example: \"2013-05-14\"." - }, - "end": { - "type": "string", - "description": "End of term in YYYY-MM-DD format in the timezone of the country of the Avail. \"Open\" if no end date is available. Example: \"2019-02-17\"" - }, - "priceType": { - "type": "string", - "description": "Type of pricing that should be applied to this Avail based on how the partner classify them. Example: \"Tier\", \"WSP\", \"SRP\", or \"Category\"." - }, - "priceValue": { - "type": "string", - "description": "Value to be applied to the pricing type. Example: \"4\" or \"2.99\"" - }, - "contentId": { - "type": "string", - "description": "Title Identifier. This should be the Title Level EIDR. Example: \"10.5240/1489-49A2-3956-4B2D-FE16-5\"." - }, - "productId": { - "type": "string", - "description": "Edit Identifier. This should be the Edit Level EIDR. Example: \"10.2340/1489-49A2-3956-4B2D-FE16-6\"" - }, - "encodeId": { - "type": "string", - "description": "Manifestation Identifier. This should be the Manifestation Level EIDR. Example: \"10.2340/1489-49A2-3956-4B2D-FE16-7\"" - }, - "seriesAltId": { - "type": "string", - "description": "Other identifier referring to the series, as defined by partner. Only available on TV avails. Example: \"rs_googlers\"." - }, - "seasonAltId": { - "type": "string", - "description": "Other identifier referring to the season, as defined by partner. Only available on TV avails. Example: \"rs_googlers_s1\"." - }, - "episodeAltId": { - "type": "string", - "description": "Other identifier referring to the episode, as defined by partner. Only available on TV avails. Example: \"rs_googlers_s1_3\"." - }, - "altId": { - "type": "string", - "description": "Other identifier referring to the Edit, as defined by partner. Example: \"GOOGLER_2006\"" - }, - "suppressionLiftDate": { - "type": "string", - "description": "First date an Edit could be publically announced as becoming available at a specific future date in territory of Avail. *Not* the Avail start date or pre-order start date. Format is YYYY-MM-DD. Only available for pre-orders. Example: \"2012-12-10\"" - }, - "releaseDate": { - "type": "string", - "description": "Release date of the Title in earliest released territory. Typically it is just the year, but it is free-form as per EMA spec. Examples: \"1979\", \"Oct 2014\"" - }, - "ratingSystem": { - "type": "string", - "description": "Rating system applied to the version of title within territory of Avail. Rating systems should be formatted as per [EMA ratings spec](http://www.movielabs.com/md/ratings/) Example: \"MPAA\"" - }, - "ratingValue": { - "type": "string", - "description": "Value representing the rating. Ratings should be formatted as per http://www.movielabs.com/md/ratings/ Example: \"PG\"" - }, - "ratingReason": { - "type": "string", - "description": "Value representing the rating reason. Rating reasons should be formatted as per [EMA ratings spec](http://www.movielabs.com/md/ratings/) and comma-separated for inclusion of multiple reasons. Example: \"L, S, V\"" - }, - "captionIncluded": { - "type": "boolean", - "description": "Communicating if caption file will be delivered." - }, - "captionExemption": { - "type": "string", - "description": "Communicating an exempt category as defined by FCC regulations. It is not required for non-US Avails. Example: \"1\"" - }, - "videoId": { - "type": "string", - "description": "Google-generated ID identifying the video linked to this Avail, once delivered. Not part of EMA Specs. Example: 'gtry456_xc'" - }, - "pphNames": { - "type": "array", - "description": "Name of the post-production houses that manage the Avail. Not part of EMA Specs.", - "items": { - "type": "string" - } - } - } - }, - "ListAvailsResponse": { - "id": "ListAvailsResponse", - "type": "object", - "description": "Response to the 'ListAvails' method.", - "properties": { - "avails": { - "type": "array", - "description": "List of Avails that match the request criteria.", - "items": { - "$ref": "Avail" - } - }, - "nextPageToken": { - "type": "string", - "description": "See _List methods rules_ for info about this field." - }, - "totalSize": { - "type": "integer", - "description": "See _List methods rules_ for more information about this field.", - "format": "int32" - } - } - }, - "Order": { - "id": "Order", - "type": "object", - "description": "An Order tracks the fulfillment of an Edit when delivered using the legacy, non-component-based delivery. Each Order is uniquely identified by an `order_id`, which is generated by Google. Externally, Orders can also be identified by partners using its `custom_id` (when provided).", - "properties": { - "orderId": { - "type": "string", - "description": "ID internally generated by Google to uniquely identify an Order. Example: 'abcde12_x'" - }, - "customId": { - "type": "string", - "description": "ID that can be used to externally identify an Order. This ID is provided by partners when submitting the Avails. Example: 'GOOGLER_2006'" - }, - "videoId": { - "type": "string", - "description": "Google-generated ID identifying the video linked to this Order, once delivered. Example: 'gtry456_xc'." - }, - "countries": { - "type": "array", - "description": "Countries where the Order is available, using the \"ISO 3166-1 alpha-2\" format (example: \"US\").", - "items": { - "type": "string" - } - }, - "type": { - "type": "string", - "description": "Type of the Edit linked to the Order.", - "enum": [ - "TITLE_TYPE_UNSPECIFIED", - "MOVIE", - "SEASON", - "EPISODE", - "BUNDLE" - ] - }, - "name": { - "type": "string", - "description": "Default Edit name, usually in the language of the country of origin. Example: \"Googlers, The\"." - }, - "episodeName": { - "type": "string", - "description": "Default Episode name, usually in the language of the country of origin. Only available for TV Edits Example: \"Googlers, The - Pilot\"." - }, - "seasonName": { - "type": "string", - "description": "Default Season name, usually in the language of the country of origin. Only available for TV Edits Example: \"Googlers, The - A Brave New World\"." - }, - "showName": { - "type": "string", - "description": "Default Show name, usually in the language of the country of origin. Only available for TV Edits Example: \"Googlers, The\"." - }, - "status": { - "type": "string", - "description": "High-level status of the order.", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_APPROVED", - "STATUS_FAILED", - "STATUS_PROCESSING", - "STATUS_UNFULFILLED", - "STATUS_NOT_AVAILABLE" - ] - }, - "statusDetail": { - "type": "string", - "description": "Detailed status of the order", - "enum": [ - "ORDER_STATUS_UNSPECIFIED", - "ORDER_STATUS_QC_APPROVED", - "ORDER_STATUS_QC_REJECTION", - "ORDER_STATUS_INTERNAL_FIX", - "ORDER_STATUS_OPEN_ORDER", - "ORDER_STATUS_NOT_AVAILABLE", - "ORDER_STATUS_AWAITING_REDELIVERY", - "ORDER_STATUS_READY_FOR_QC", - "ORDER_STATUS_FILE_PROCESSING" - ] - }, - "rejectionNote": { - "type": "string", - "description": "Field explaining why an Order has been rejected. Example: \"Trailer audio is 2ch mono, please re-deliver in stereo\"." - }, - "orderedTime": { - "type": "string", - "description": "Timestamp when the Order was created." - }, - "approvedTime": { - "type": "string", - "description": "Timestamp when the Order was approved." - }, - "receivedTime": { - "type": "string", - "description": "Timestamp when the Order was fulfilled." - }, - "earliestAvailStartTime": { - "type": "string", - "description": "Timestamp of the earliest start date of the Avails linked to this Order." - }, - "priority": { - "type": "number", - "description": "Order priority, as defined by Google. The higher the value, the higher the priority. Example: 90", - "format": "double" - }, - "legacyPriority": { - "type": "string", - "description": "Legacy Order priority, as defined by Google. Example: 'P0'" - }, - "channelId": { - "type": "string", - "description": "YouTube Channel ID that should be used to fulfill the Order. Example: \"UCRG64darCZhb\"." - }, - "channelName": { - "type": "string", - "description": "YouTube Channel Name that should be used to fulfill the Order. Example: \"Google_channel\"." - }, - "studioName": { - "type": "string", - "description": "Name of the studio that owns the Edit ordered." - }, - "pphName": { - "type": "string", - "description": "Name of the post-production house that manages the Edit ordered." - }, - "normalizedPriority": { - "type": "string", - "description": "A simpler representation of the priority.", - "enum": [ - "NORMALIZED_PRIORITY_UNSPECIFIED", - "LOW_PRIORITY", - "HIGH_PRIORITY" - ] - } - } - }, - "ListOrdersResponse": { - "id": "ListOrdersResponse", - "type": "object", - "description": "Response to the 'ListOrders' method.", - "properties": { - "orders": { - "type": "array", - "description": "List of Orders that match the request criteria.", - "items": { - "$ref": "Order" - } - }, - "nextPageToken": { - "type": "string", - "description": "See _List methods rules_ for info about this field." - }, - "totalSize": { - "type": "integer", - "description": "See _List methods rules_ for more information about this field.", - "format": "int32" - } - } - }, - "ExperienceLocale": { - "id": "ExperienceLocale", - "type": "object", - "description": "An ExperienceLocale tracks the fulfillment of a Title in a country using a specific language, when delivered using component-based delivery. For example, a Title in Switzerland might have 3 ExperienceLocales: they both share the same country (\"CH\"), but each has different languages (\"de\", \"fr\", and \"it\"). Each ExperienceLocale is uniquely identified by an `el_id`, which is generated by Google. Externally, an ExperienceLocale can also be identified by partners using its EIDR IDs, AltCutID or `custom_id` (when provided).", - "properties": { - "elId": { - "type": "string", - "description": "ID internally generated by Google to uniquely identify a ExperienceLocale. Example: 'KRZiVjY9h7t'" - }, - "country": { - "type": "string", - "description": "Country where the ExperienceLocale is available, using the \"ISO 3166-1 alpha-2\" format. Example: \"US\"." - }, - "language": { - "type": "string", - "description": "Language of the ExperienceLocale, using the \"BCP 47\" format. Examples: \"en\", \"en-US\", \"es\", \"es-419\"." - }, - "videoId": { - "type": "string", - "description": "Video ID, as defined by Google, linked to the feature video in the ExperienceLocale. Example: 'gtry456_xc'." - }, - "trailerId": { - "type": "string", - "description": "Trailer ID, as defined by Google, linked to the trailer video in the ExperienceLocale. Example: 'gtry457_tr'." - }, - "titleLevelEidr": { - "type": "string", - "description": "Title-level EIDR ID. Example: \"10.5240/1489-49A2-3956-4B2D-FE16-5\"." - }, - "editLevelEidr": { - "type": "string", - "description": "Edit-level EIDR ID. Example: \"10.5240/1489-49A2-3956-4B2D-FE16-6\"." - }, - "altCutId": { - "type": "string", - "description": "Alternative Cut ID, sometimes available in lieu of the main Edit-level EIDR ID. This is not an EIDR ID, but a Partner-provided ID. Example: \"206346_79838\"." - }, - "customIds": { - "type": "array", - "description": "List of custom IDs (defined by the partner) linked to this ExperienceLocale. Example: \"R86241\"", - "items": { - "type": "string" - } - }, - "presentationId": { - "type": "string", - "description": "PresentationID as defined in the EMA specs." - }, - "inventoryId": { - "type": "string", - "description": "InventoryID as defined in the EMA specs." - }, - "playableSequenceId": { - "type": "string", - "description": "PlayableSequenceID as defined in the EMA specs." - }, - "type": { - "type": "string", - "description": "Type of the Edit linked to the ExperienceLocale.", - "enum": [ - "TITLE_TYPE_UNSPECIFIED", - "MOVIE", - "SEASON", - "EPISODE", - "BUNDLE" - ] - }, - "name": { - "type": "string", - "description": "Default Edit name, usually in the language of the country of origin. Example: \"Googlers, The\"." - }, - "status": { - "type": "string", - "description": "High-level status of the ExperienceLocale.", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_APPROVED", - "STATUS_FAILED", - "STATUS_PROCESSING", - "STATUS_UNFULFILLED", - "STATUS_NOT_AVAILABLE" - ] - }, - "priority": { - "type": "number", - "description": "ExperienceLocale priority, as defined by Google. The higher the value, the higher the priority. Example: 90", - "format": "double" - }, - "createdTime": { - "type": "string", - "description": "Timestamp when the ExperienceLocale was created." - }, - "approvedTime": { - "type": "string", - "description": "Timestamp when the ExperienceLocale was approved." - }, - "earliestAvailStartTime": { - "type": "string", - "description": "Timestamp of the earliest start date of the Avails linked to this ExperienceLocale." - }, - "channelId": { - "type": "string", - "description": "YouTube Channel ID linked to the ExperienceLocale. Example: \"UCRG64darCZhb\"." - }, - "studioName": { - "type": "string", - "description": "Name of the studio that owns the ExperienceLocale." - }, - "pphNames": { - "type": "array", - "description": "Name of the post-production houses that manage the ExperienceLocale.", - "items": { - "type": "string" - } - }, - "normalizedPriority": { - "type": "string", - "description": "A simpler representation of the priority.", - "enum": [ - "NORMALIZED_PRIORITY_UNSPECIFIED", - "LOW_PRIORITY", - "HIGH_PRIORITY" - ] - } - } - }, - "ListExperienceLocalesResponse": { - "id": "ListExperienceLocalesResponse", - "type": "object", - "description": "Response to the 'ListExperienceLocales' method.", - "properties": { - "experienceLocales": { - "type": "array", - "description": "List of ExperienceLocales that match the request criteria.", - "items": { - "$ref": "ExperienceLocale" - } - }, - "nextPageToken": { - "type": "string", - "description": "See _List methods rules_ for info about this field." - }, - "totalSize": { - "type": "integer", - "description": "See _List methods rules_ for more information about this field.", - "format": "int32" - } - } - }, - "Component": { - "id": "Component", - "type": "object", - "description": "A Component is an element (audio, video, subtitle, artwork, trailer, etc...) that is used in a set of ExperienceLocales. A Component is owned by a Studio and managed either by the Studio itself or by one Post-Production House. Each Component is identified by a `component_id` and its `type`.", - "properties": { - "componentId": { - "type": "string", - "description": "ID internally generated by Google to uniquely identify the Component. Example: 'wteyrc_647xc'" - }, - "type": { - "type": "string", - "description": "Type of the Component. Example: AUDIO_51", - "enum": [ - "COMPONENT_TYPE_UNSPECIFIED", - "VIDEO", - "AUDIO_20", - "AUDIO_51", - "SUBTITLE", - "ARTWORK", - "METADATA" - ] - }, - "elIds": { - "type": "array", - "description": "IDs internally generated by Google to uniquely identify the ExperienceLocales for which the Component is used. Example: 'KRZiVjY9h7t'", - "items": { - "type": "string" - } - }, - "language": { - "type": "string", - "description": "Language of the component, using the \"BCP 47\" format. Examples: \"en\", \"en-US\", \"es\", \"es-419\"." - }, - "titleLevelEidrs": { - "type": "array", - "description": "List of Title-level EIDR IDs. Example: \"10.5240/1489-49A2-3956-4B2D-FE16-5\".", - "items": { - "type": "string" - } - }, - "editLevelEidrs": { - "type": "array", - "description": "List of Edit-level EIDR IDs. Example: \"10.5240/1489-49A2-3956-4B2D-FE16-6\".", - "items": { - "type": "string" - } - }, - "altCutIds": { - "type": "array", - "description": "List of Alternative Cut IDs, sometimes available in lieu of the main Edit-level EIDR IDs. This is not an EIDR ID, but a Partner-provided ID. Example: \"206346_79838\".", - "items": { - "type": "string" - } - }, - "customIds": { - "type": "array", - "description": "List of custom IDs (defined by the partner) linked to the ExperienceLocale using this Component. Example: \"R86241\"", - "items": { - "type": "string" - } - }, - "componentDetailType": { - "type": "string", - "description": "Detail about the type of the Component.", - "enum": [ - "COMPONENT_DETAIL_TYPE_UNSPECIFIED", - "COMPONENT_DETAIL_TYPE_NORMAL", - "COMPONENT_DETAIL_TYPE_POSTER", - "COMPONENT_DETAIL_TYPE_PRIMARY", - "COMPONENT_DETAIL_TYPE_FORCED", - "COMPONENT_DETAIL_TYPE_DUBBED", - "COMPONENT_DETAIL_TYPE_SDH" - ] - }, - "playableUnitType": { - "type": "string", - "description": "Type of the playable unit for which the Component is intended.", - "enum": [ - "PLAYABLE_UNIT_TYPE_UNSPECIFIED", - "PLAYABLE_UNIT_TYPE_FEATURE", - "PLAYABLE_UNIT_TYPE_TRAILER", - "PLAYBLE_UNIT_TYPE_BONUS_CONTENT" - ] - }, - "status": { - "type": "string", - "description": "High-level status of the Component.", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_APPROVED", - "STATUS_FAILED", - "STATUS_PROCESSING", - "STATUS_UNFULFILLED", - "STATUS_NOT_AVAILABLE" - ] - }, - "statusDetail": { - "type": "string", - "description": "Detailed status of the Component", - "enum": [ - "COMPONENT_STATUS_UNSPECIFIED", - "COMPONENT_STATUS_QC_APPROVED", - "COMPONENT_STATUS_QC_REJECTION", - "COMPONENT_STATUS_FILE_REJECTION", - "COMPONENT_STATUS_FILE_PROCESSING", - "COMPONENT_STATUS_READY_FOR_QC" - ] - }, - "rejectionNote": { - "type": "string", - "description": "Notes explaining why a Component has been rejected." - }, - "approvedTime": { - "type": "string", - "description": "Timestamp when the Component was approved." - }, - "name": { - "type": "string", - "description": "Default Edit name, usually in the language of the country of origin. Example: \"Googlers, The\"." - }, - "processingErrors": { - "type": "array", - "description": "Processing errors during XML file parsing. Example: 'Invalid input file'", - "items": { - "type": "string" - } - }, - "priority": { - "type": "number", - "description": "Component priority, as defined by Google. The higher the value, the higher the priority.", - "format": "double" - }, - "receivedTime": { - "type": "string", - "description": "Timestamp when the Component was received." - }, - "filename": { - "type": "string", - "description": "File name of the Component when delivered." - }, - "studioName": { - "type": "string", - "description": "Name of the studio that owns the Component." - }, - "pphName": { - "type": "string", - "description": "Name of the post-production house that manages the Component." - }, - "normalizedPriority": { - "type": "string", - "description": "A simpler representation of the priority.", - "enum": [ - "NORMALIZED_PRIORITY_UNSPECIFIED", - "LOW_PRIORITY", - "HIGH_PRIORITY" - ] - } - } - }, - "ListComponentsResponse": { - "id": "ListComponentsResponse", - "type": "object", - "description": "Response to the 'ListComponents' method.", - "properties": { - "components": { - "type": "array", - "description": "List of Components that match the request criteria.", - "items": { - "$ref": "Component" - } - }, - "nextPageToken": { - "type": "string", - "description": "See _List methods rules_ for info about this field." - }, - "totalSize": { - "type": "integer", - "description": "See _List methods rules_ for more information about this field.", - "format": "int32" - } - } - }, - "StoreInfo": { - "id": "StoreInfo", - "type": "object", - "description": "Information about a playable sequence (video) associated with an Edit and available at the Google Play Store. Internally, each StoreInfo is uniquely identified by a `video_id` and `country`. Externally, Title-level EIDR or Edit-level EIDR, if provided, can also be used to identify a specific title or edit in a country.", - "properties": { - "videoId": { - "type": "string", - "description": "Google-generated ID identifying the video linked to the Edit. Example: 'gtry456_xc'" - }, - "seasonId": { - "type": "string", - "description": "Google-generated ID identifying the season linked to the Edit. Only available for TV Edits. Example: 'ster23ex'" - }, - "showId": { - "type": "string", - "description": "Google-generated ID identifying the show linked to the Edit. Only available for TV Edits. Example: 'et2hsue_x'" - }, - "country": { - "type": "string", - "description": "Country where Edit is available in ISO 3166-1 alpha-2 country code. Example: \"US\"." - }, - "liveTime": { - "type": "string", - "description": "Timestamp when the Edit went live on the Store." - }, - "type": { - "type": "string", - "description": "Edit type, like Movie, Episode or Season.", - "enum": [ - "TITLE_TYPE_UNSPECIFIED", - "MOVIE", - "SEASON", - "EPISODE", - "BUNDLE" - ] - }, - "name": { - "type": "string", - "description": "Default Edit name, usually in the language of the country of origin. Example: \"Googlers, The\"." - }, - "titleLevelEidr": { - "type": "string", - "description": "Title-level EIDR ID. Example: \"10.5240/1489-49A2-3956-4B2D-FE16-5\"." - }, - "editLevelEidr": { - "type": "string", - "description": "Edit-level EIDR ID. Example: \"10.5240/1489-49A2-3956-4B2D-FE16-6\"." - }, - "seasonName": { - "type": "string", - "description": "Default Season name, usually in the language of the country of origin. Only available for TV Edits Example: \"Googlers, The - A Brave New World\"." - }, - "showName": { - "type": "string", - "description": "Default Show name, usually in the language of the country of origin. Only available for TV Edits Example: \"Googlers, The\"." - }, - "seasonNumber": { - "type": "string", - "description": "The number assigned to the season within a show. Only available on TV Edits. Example: \"1\"." - }, - "episodeNumber": { - "type": "string", - "description": "The number assigned to the episode within a season. Only available on TV Edits. Example: \"1\"." - }, - "hasSdOffer": { - "type": "boolean", - "description": "Whether the Edit has a SD offer." - }, - "hasHdOffer": { - "type": "boolean", - "description": "Whether the Edit has a HD offer." - }, - "hasVodOffer": { - "type": "boolean", - "description": "Whether the Edit has a VOD offer." - }, - "hasEstOffer": { - "type": "boolean", - "description": "Whether the Edit has a EST offer." - }, - "hasAudio51": { - "type": "boolean", - "description": "Whether the Edit has a 5.1 channel audio track." - }, - "audioTracks": { - "type": "array", - "description": "Audio tracks available for this Edit.", - "items": { - "type": "string" - } - }, - "subtitles": { - "type": "array", - "description": "Subtitles available for this Edit.", - "items": { - "type": "string" - } - }, - "hasInfoCards": { - "type": "boolean", - "description": "Whether the Edit has info cards." - }, - "mid": { - "type": "string", - "description": "Knowledge Graph ID associated to this Edit, if available. This ID links the Edit to its knowledge entity, externally accessible at http://freebase.com. In the absense of Title EIDR or Edit EIDR, this ID helps link together multiple Edits across countries. Example: '/m/0ffx29'" - }, - "trailerId": { - "type": "string", - "description": "Google-generated ID identifying the trailer linked to the Edit. Example: 'bhd_4e_cx'" - }, - "studioName": { - "type": "string", - "description": "Name of the studio that owns the Edit ordered." - }, - "pphNames": { - "type": "array", - "description": "Name of the post-production houses that manage the Edit.", - "items": { - "type": "string" - } - } - } - }, - "ListStoreInfosResponse": { - "id": "ListStoreInfosResponse", - "type": "object", - "description": "Response to the 'ListStoreInfos' method.", - "properties": { - "storeInfos": { - "type": "array", - "description": "List of StoreInfos that match the request criteria.", - "items": { - "$ref": "StoreInfo" - } - }, - "nextPageToken": { - "type": "string", - "description": "See 'List methods rules' for info about this field." - }, - "totalSize": { - "type": "integer", - "description": "See _List methods rules_ for more information about this field.", - "format": "int32" - } - } - } - }, - "resources": { - "accounts": { - "resources": { - "avails": { - "methods": { - "get": { - "id": "playmoviespartner.accounts.avails.get", - "path": "v1/accounts/{accountId}/avails/{availId}", - "httpMethod": "GET", - "description": "Get an Avail given its avail group id and avail id.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" - }, - "availId": { - "type": "string", - "description": "REQUIRED. Avail ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "accountId", - "availId" - ], - "response": { - "$ref": "Avail" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] - }, - "list": { - "id": "playmoviespartner.accounts.avails.list", - "path": "v1/accounts/{accountId}/avails", - "httpMethod": "GET", - "description": "List Avails owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "See _List methods rules_ for info about this field.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "location": "query" - }, - "pphNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" - }, - "studioNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" - }, - "title": { - "type": "string", - "description": "Filter that matches Avails with a `title_internal_alias`, `series_title_internal_alias`, `season_title_internal_alias`, or `episode_title_internal_alias` that contains the given case-insensitive title.", - "location": "query" - }, - "territories": { - "type": "string", - "description": "Filter Avails that match (case-insensitive) any of the given country codes, using the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").", - "repeated": true, - "location": "query" - }, - "altId": { - "type": "string", - "description": "Filter Avails that match a case-insensitive, partner-specific custom id. NOTE: this field is deprecated and will be removed on V2; `alt_ids` should be used instead.", - "location": "query" - }, - "videoIds": { - "type": "string", - "description": "Filter Avails that match any of the given `video_id`s.", - "repeated": true, - "location": "query" - }, - "altIds": { - "type": "string", - "description": "Filter Avails that match (case-insensitive) any of the given partner-specific custom ids.", - "repeated": true, - "location": "query" - } - }, - "parameterOrder": [ - "accountId" - ], - "response": { - "$ref": "ListAvailsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] - } - } - }, - "orders": { - "methods": { - "get": { - "id": "playmoviespartner.accounts.orders.get", - "path": "v1/accounts/{accountId}/orders/{orderId}", - "httpMethod": "GET", - "description": "Get an Order given its id. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" + "schemas": { + "Order": { + "description": "An Order tracks the fulfillment of an Edit when delivered using the\nlegacy, non-component-based delivery.\n\nEach Order is uniquely identified by an `order_id`, which is generated\nby Google.\n\nExternally, Orders can also be identified by partners using its `custom_id`\n(when provided).", + "type": "object", + "properties": { + "normalizedPriority": { + "description": "A simpler representation of the priority.", + "type": "string", + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "A low-priority asset, typically from a library movie.", + "A high-priority asset, typically from a new release or box office hit." + ], + "enum": [ + "NORMALIZED_PRIORITY_UNSPECIFIED", + "LOW_PRIORITY", + "HIGH_PRIORITY" + ] }, "orderId": { - "type": "string", - "description": "REQUIRED. Order ID.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "accountId", - "orderId" - ], - "response": { - "$ref": "Order" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] - }, - "list": { - "id": "playmoviespartner.accounts.orders.list", - "path": "v1/accounts/{accountId}/orders", - "httpMethod": "GET", - "description": "List Orders owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" + "description": "ID internally generated by Google to uniquely identify an Order.\nExample: 'abcde12_x'", + "type": "string" }, - "pageSize": { - "type": "integer", - "description": "See _List methods rules_ for info about this field.", - "format": "int32", - "location": "query" + "type": { + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "A movie picture.", + "A season of a TV show.", + "An episode of a TV show.", + "A collection of movies, i.e. \"Googlers 1 and Googlers, the return\"" + ], + "enum": [ + "TITLE_TYPE_UNSPECIFIED", + "MOVIE", + "SEASON", + "EPISODE", + "BUNDLE" + ], + "description": "Type of the Edit linked to the Order.", + "type": "string" }, - "pageToken": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "location": "query" + "rejectionNote": { + "description": "Field explaining why an Order has been rejected.\nExample: \"Trailer audio is 2ch mono, please re-deliver in stereo\".", + "type": "string" }, - "pphNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" + "channelId": { + "description": "YouTube Channel ID that should be used to fulfill the Order.\nExample: \"UCRG64darCZhb\".", + "type": "string" }, - "studioNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" + "legacyPriority": { + "description": "Legacy Order priority, as defined by Google.\nExample: 'P0'", + "type": "string" }, - "name": { - "type": "string", - "description": "Filter that matches Orders with a `name`, `show`, `season` or `episode` that contains the given case-insensitive name.", - "location": "query" + "pphName": { + "description": "Name of the post-production house that manages the Edit ordered.", + "type": "string" }, - "status": { - "type": "string", - "description": "Filter Orders that match one of the given status.", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_APPROVED", - "STATUS_FAILED", - "STATUS_PROCESSING", - "STATUS_UNFULFILLED", - "STATUS_NOT_AVAILABLE" - ], - "repeated": true, - "location": "query" + "orderedTime": { + "description": "Timestamp when the Order was created.", + "format": "google-datetime", + "type": "string" }, - "customId": { - "type": "string", - "description": "Filter Orders that match a case-insensitive, partner-specific custom id.", - "location": "query" - }, - "videoIds": { - "type": "string", - "description": "Filter Orders that match any of the given `video_id`s.", - "repeated": true, - "location": "query" - } - }, - "parameterOrder": [ - "accountId" - ], - "response": { - "$ref": "ListOrdersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] - } - } - }, - "experienceLocales": { - "methods": { - "get": { - "id": "playmoviespartner.accounts.experienceLocales.get", - "path": "v1/accounts/{accountId}/experienceLocales/{elId}", - "httpMethod": "GET", - "description": "Get an ExperienceLocale given its id. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" - }, - "elId": { - "type": "string", - "description": "REQUIRED. ExperienceLocale ID, as defined by Google.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "accountId", - "elId" - ], - "response": { - "$ref": "ExperienceLocale" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] - }, - "list": { - "id": "playmoviespartner.accounts.experienceLocales.list", - "path": "v1/accounts/{accountId}/experienceLocales", - "httpMethod": "GET", - "description": "List ExperienceLocales owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "See _List methods rules_ for info about this field.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "location": "query" - }, - "pphNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" - }, - "studioNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" - }, - "titleLevelEidr": { - "type": "string", - "description": "Filter ExperienceLocales that match a given title-level EIDR.", - "location": "query" - }, - "editLevelEidr": { - "type": "string", - "description": "Filter ExperienceLocales that match a given edit-level EIDR.", - "location": "query" - }, - "status": { - "type": "string", - "description": "Filter ExperienceLocales that match one of the given status.", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_APPROVED", - "STATUS_FAILED", - "STATUS_PROCESSING", - "STATUS_UNFULFILLED", - "STATUS_NOT_AVAILABLE" - ], - "repeated": true, - "location": "query" - }, - "customId": { - "type": "string", - "description": "Filter ExperienceLocales that match a case-insensitive, partner-specific custom id.", - "location": "query" - }, - "altCutId": { - "type": "string", - "description": "Filter ExperienceLocales that match a case-insensitive, partner-specific Alternative Cut ID.", - "location": "query" - } - }, - "parameterOrder": [ - "accountId" - ], - "response": { - "$ref": "ListExperienceLocalesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] - } - } - }, - "components": { - "methods": { - "list": { - "id": "playmoviespartner.accounts.components.list", - "path": "v1/accounts/{accountId}/components", - "httpMethod": "GET", - "description": "List Components owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "See _List methods rules_ for info about this field.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "location": "query" - }, - "pphNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" - }, - "studioNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" - }, - "titleLevelEidr": { - "type": "string", - "description": "Filter Components that match a given title-level EIDR.", - "location": "query" - }, - "editLevelEidr": { - "type": "string", - "description": "Filter Components that match a given edit-level EIDR.", - "location": "query" - }, - "status": { - "type": "string", - "description": "Filter Components that match one of the given status.", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_APPROVED", - "STATUS_FAILED", - "STATUS_PROCESSING", - "STATUS_UNFULFILLED", - "STATUS_NOT_AVAILABLE" - ], - "repeated": true, - "location": "query" - }, - "customId": { - "type": "string", - "description": "Filter Components that match a case-insensitive partner-specific custom id.", - "location": "query" - }, - "inventoryId": { - "type": "string", - "description": "InventoryID available in Common Manifest.", - "location": "query" - }, - "presentationId": { - "type": "string", - "description": "PresentationID available in Common Manifest.", - "location": "query" - }, - "playableSequenceId": { - "type": "string", - "description": "PlayableSequenceID available in Common Manifest.", - "location": "query" - }, - "elId": { - "type": "string", - "description": "Experience ID, as defined by Google.", - "location": "query" - }, - "altCutId": { - "type": "string", - "description": "Filter Components that match a case-insensitive, partner-specific Alternative Cut ID.", - "location": "query" - }, - "filename": { - "type": "string", - "description": "Filter Components that match a case-insensitive substring of the physical name of the delivered file.", - "location": "query" - } - }, - "parameterOrder": [ - "accountId" - ], - "response": { - "$ref": "ListComponentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] - } - }, - "resources": { - "type": { - "methods": { - "get": { - "id": "playmoviespartner.accounts.components.type.get", - "path": "v1/accounts/{accountId}/components/{componentId}/type/{type}", - "httpMethod": "GET", - "description": "Get a Component given its id.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" - }, - "componentId": { - "type": "string", - "description": "REQUIRED. Component ID.", - "required": true, - "location": "path" - }, - "type": { - "type": "string", - "description": "REQUIRED. Component Type.", - "required": true, - "enum": [ - "COMPONENT_TYPE_UNSPECIFIED", - "VIDEO", - "AUDIO_20", - "AUDIO_51", - "SUBTITLE", - "ARTWORK", - "METADATA" - ], - "location": "path" - } - }, - "parameterOrder": [ - "accountId", - "componentId", - "type" - ], - "response": { - "$ref": "Component" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] - } - } - } - } - }, - "storeInfos": { - "methods": { - "list": { - "id": "playmoviespartner.accounts.storeInfos.list", - "path": "v1/accounts/{accountId}/storeInfos", - "httpMethod": "GET", - "description": "List StoreInfos owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "See _List methods rules_ for info about this field.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "location": "query" - }, - "pphNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" - }, - "studioNames": { - "type": "string", - "description": "See _List methods rules_ for info about this field.", - "repeated": true, - "location": "query" + "priority": { + "description": "Order priority, as defined by Google.\nThe higher the value, the higher the priority.\nExample: 90", + "format": "double", + "type": "number" }, "videoId": { - "type": "string", - "description": "Filter StoreInfos that match a given `video_id`. NOTE: this field is deprecated and will be removed on V2; `video_ids` should be used instead.", - "location": "query" + "description": "Google-generated ID identifying the video linked to this Order, once\ndelivered.\nExample: 'gtry456_xc'.", + "type": "string" + }, + "episodeName": { + "description": "Default Episode name,\nusually in the language of the country of origin.\nOnly available for TV Edits\nExample: \"Googlers, The - Pilot\".", + "type": "string" }, "countries": { - "type": "string", - "description": "Filter StoreInfos that match (case-insensitive) any of the given country codes, using the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").", - "repeated": true, - "location": "query" + "description": "Countries where the Order is available,\nusing the \"ISO 3166-1 alpha-2\" format (example: \"US\").", + "type": "array", + "items": { + "type": "string" + } + }, + "statusDetail": { + "description": "Detailed status of the order", + "type": "string", + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "Approved by Google's Quality Control team.", + "Rejected by Google's Quality Control team, pending partner redelivery.", + "Internal error while processing the Order.", + "Waiting for initial delivery from partner.", + "Used on Orders that do not have Status, like TV Seasons.", + "Waiting for re-delivery from partner.", + "Asset was delivered by partner, but is being reviewed by Google's\nQuality Control team.", + "Waiting for Google to process the asset." + ], + "enum": [ + "ORDER_STATUS_UNSPECIFIED", + "ORDER_STATUS_QC_APPROVED", + "ORDER_STATUS_QC_REJECTION", + "ORDER_STATUS_INTERNAL_FIX", + "ORDER_STATUS_OPEN_ORDER", + "ORDER_STATUS_NOT_AVAILABLE", + "ORDER_STATUS_AWAITING_REDELIVERY", + "ORDER_STATUS_READY_FOR_QC", + "ORDER_STATUS_FILE_PROCESSING" + ] + }, + "status": { + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "Approved by Google.", + "Waiting for partner to re-deliver the asset after a rejection by Google.", + "Waiting for Google to process the asset.", + "Waiting for partner to deliver the asset.", + "Used when Status is not available (i.e: Orders for TV Seasons)." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_APPROVED", + "STATUS_FAILED", + "STATUS_PROCESSING", + "STATUS_UNFULFILLED", + "STATUS_NOT_AVAILABLE" + ], + "description": "High-level status of the order.", + "type": "string" + }, + "earliestAvailStartTime": { + "description": "Timestamp of the earliest start date of the Avails\nlinked to this Order.", + "format": "google-datetime", + "type": "string" }, "name": { - "type": "string", - "description": "Filter that matches StoreInfos with a `name` or `show_name` that contains the given case-insensitive name.", - "location": "query" + "description": "Default Edit name,\nusually in the language of the country of origin.\nExample: \"Googlers, The\".", + "type": "string" }, - "videoIds": { - "type": "string", - "description": "Filter StoreInfos that match any of the given `video_id`s.", - "repeated": true, - "location": "query" + "studioName": { + "description": "Name of the studio that owns the Edit ordered.", + "type": "string" }, - "mids": { - "type": "string", - "description": "Filter StoreInfos that match any of the given `mid`s.", - "repeated": true, - "location": "query" + "receivedTime": { + "description": "Timestamp when the Order was fulfilled.", + "format": "google-datetime", + "type": "string" }, - "seasonIds": { - "type": "string", - "description": "Filter StoreInfos that match any of the given `season_id`s.", - "repeated": true, - "location": "query" + "seasonName": { + "description": "Default Season name,\nusually in the language of the country of origin.\nOnly available for TV Edits\nExample: \"Googlers, The - A Brave New World\".", + "type": "string" + }, + "customId": { + "description": "ID that can be used to externally identify an Order.\nThis ID is provided by partners when submitting the Avails.\nExample: 'GOOGLER_2006'", + "type": "string" + }, + "channelName": { + "description": "YouTube Channel Name that should be used to fulfill the Order.\nExample: \"Google_channel\".", + "type": "string" + }, + "approvedTime": { + "description": "Timestamp when the Order was approved.", + "format": "google-datetime", + "type": "string" + }, + "showName": { + "description": "Default Show name,\nusually in the language of the country of origin.\nOnly available for TV Edits\nExample: \"Googlers, The\".", + "type": "string" } - }, - "parameterOrder": [ - "accountId" - ], - "response": { - "$ref": "ListStoreInfosResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] - } - }, - "resources": { - "country": { - "methods": { - "get": { - "id": "playmoviespartner.accounts.storeInfos.country.get", - "path": "v1/accounts/{accountId}/storeInfos/{videoId}/country/{country}", - "httpMethod": "GET", - "description": "Get a StoreInfo given its video id and country. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method.", - "parameters": { - "accountId": { - "type": "string", - "description": "REQUIRED. See _General rules_ for more information about this field.", - "required": true, - "location": "path" - }, - "videoId": { - "type": "string", - "description": "REQUIRED. Video ID.", - "required": true, - "location": "path" - }, - "country": { - "type": "string", - "description": "REQUIRED. Edit country.", - "required": true, - "location": "path" + }, + "id": "Order" + }, + "ListStoreInfosResponse": { + "description": "Response to the 'ListStoreInfos' method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "See 'List methods rules' for info about this field.", + "type": "string" + }, + "storeInfos": { + "description": "List of StoreInfos that match the request criteria.", + "type": "array", + "items": { + "$ref": "StoreInfo" } - }, - "parameterOrder": [ - "accountId", - "videoId", - "country" - ], - "response": { - "$ref": "StoreInfo" - }, - "scopes": [ - "https://www.googleapis.com/auth/playmovies_partner.readonly" - ] + }, + "totalSize": { + "description": "See _List methods rules_ for more information about this field.", + "format": "int32", + "type": "integer" } - } - } - } + }, + "id": "ListStoreInfosResponse" + }, + "ListAvailsResponse": { + "description": "Response to the 'ListAvails' method.", + "type": "object", + "properties": { + "avails": { + "description": "List of Avails that match the request criteria.", + "type": "array", + "items": { + "$ref": "Avail" + } + }, + "nextPageToken": { + "description": "See _List methods rules_ for info about this field.", + "type": "string" + }, + "totalSize": { + "description": "See _List methods rules_ for more information about this field.", + "format": "int32", + "type": "integer" + } + }, + "id": "ListAvailsResponse" + }, + "StoreInfo": { + "description": "Information about a playable sequence (video) associated with an Edit\nand available at the Google Play Store.\n\nInternally, each StoreInfo is uniquely identified by a `video_id`\nand `country`.\n\nExternally, Title-level EIDR or Edit-level EIDR, if provided,\ncan also be used to identify a specific title or edit in a country.", + "type": "object", + "properties": { + "country": { + "description": "Country where Edit is available in ISO 3166-1 alpha-2 country\ncode.\nExample: \"US\".", + "type": "string" + }, + "showId": { + "description": "Google-generated ID identifying the show linked to the Edit.\nOnly available for TV Edits.\nExample: 'et2hsue_x'", + "type": "string" + }, + "type": { + "description": "Edit type, like Movie, Episode or Season.", + "type": "string", + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "A movie picture.", + "A season of a TV show.", + "An episode of a TV show.", + "A collection of movies, i.e. \"Googlers 1 and Googlers, the return\"" + ], + "enum": [ + "TITLE_TYPE_UNSPECIFIED", + "MOVIE", + "SEASON", + "EPISODE", + "BUNDLE" + ] + }, + "trailerId": { + "description": "Google-generated ID identifying the trailer linked to the Edit.\nExample: 'bhd_4e_cx'", + "type": "string" + }, + "hasHdOffer": { + "description": "Whether the Edit has a HD offer.", + "type": "boolean" + }, + "mid": { + "description": "Knowledge Graph ID associated to this Edit, if available.\nThis ID links the Edit to its knowledge entity, externally accessible\nat http://freebase.com.\nIn the absense of Title EIDR or Edit EIDR, this ID helps link together\nmultiple Edits across countries.\nExample: '/m/0ffx29'", + "type": "string" + }, + "hasAudio51": { + "description": "Whether the Edit has a 5.1 channel audio track.", + "type": "boolean" + }, + "name": { + "description": "Default Edit name, usually in the language of the country of\norigin.\nExample: \"Googlers, The\".", + "type": "string" + }, + "seasonId": { + "description": "Google-generated ID identifying the season linked to the Edit.\nOnly available for TV Edits.\nExample: 'ster23ex'", + "type": "string" + }, + "titleLevelEidr": { + "description": "Title-level EIDR ID.\nExample: \"10.5240/1489-49A2-3956-4B2D-FE16-5\".", + "type": "string" + }, + "seasonName": { + "description": "Default Season name, usually in the language of the country of\norigin.\nOnly available for TV Edits\nExample: \"Googlers, The - A Brave New World\".", + "type": "string" + }, + "seasonNumber": { + "description": "The number assigned to the season within a show.\nOnly available on TV Edits.\nExample: \"1\".", + "type": "string" + }, + "hasEstOffer": { + "description": "Whether the Edit has a EST offer.", + "type": "boolean" + }, + "editLevelEidr": { + "description": "Edit-level EIDR ID.\nExample: \"10.5240/1489-49A2-3956-4B2D-FE16-6\".", + "type": "string" + }, + "hasSdOffer": { + "description": "Whether the Edit has a SD offer.", + "type": "boolean" + }, + "liveTime": { + "description": "Timestamp when the Edit went live on the Store.", + "format": "google-datetime", + "type": "string" + }, + "videoId": { + "description": "Google-generated ID identifying the video linked to the Edit.\nExample: 'gtry456_xc'", + "type": "string" + }, + "hasInfoCards": { + "description": "Whether the Edit has info cards.", + "type": "boolean" + }, + "hasVodOffer": { + "description": "Whether the Edit has a VOD offer.", + "type": "boolean" + }, + "pphNames": { + "description": "Name of the post-production houses that manage the Edit.", + "type": "array", + "items": { + "type": "string" + } + }, + "episodeNumber": { + "description": "The number assigned to the episode within a season.\nOnly available on TV Edits.\nExample: \"1\".", + "type": "string" + }, + "studioName": { + "description": "Name of the studio that owns the Edit ordered.", + "type": "string" + }, + "subtitles": { + "description": "Subtitles available for this Edit.", + "type": "array", + "items": { + "type": "string" + } + }, + "audioTracks": { + "description": "Audio tracks available for this Edit.", + "type": "array", + "items": { + "type": "string" + } + }, + "showName": { + "description": "Default Show name, usually in the language of the country of\norigin.\nOnly available for TV Edits\nExample: \"Googlers, The\".", + "type": "string" + } + }, + "id": "StoreInfo" + }, + "Avail": { + "description": "An Avail describes the Availability Window of a specific Edit in a given\ncountry, which means the period Google is allowed to sell or rent the Edit.\n\nAvails are exposed in EMA format Version 1.6b (available at\nhttp://www.movielabs.com/md/avails/)\n\nStudios can see the Avails for the Titles they own.\nPost-production houses cannot see any Avails.", + "type": "object", + "properties": { + "contentId": { + "description": "Title Identifier. This should be the Title Level EIDR.\nExample: \"10.5240/1489-49A2-3956-4B2D-FE16-5\".", + "type": "string" + }, + "titleInternalAlias": { + "description": "Title used by involved parties to refer to this content.\nExample: \"Googlers, The\".\nOnly available on Movie Avails.", + "type": "string" + }, + "ratingValue": { + "description": "Value representing the rating.\nRatings should be formatted as per http://www.movielabs.com/md/ratings/\nExample: \"PG\"", + "type": "string" + }, + "storeLanguage": { + "description": "Spoken language of the intended audience.\nLanguage shall be encoded in accordance with RFC 5646.\nExample: \"fr\".", + "type": "string" + }, + "productId": { + "description": "Edit Identifier. This should be the Edit Level EIDR.\nExample: \"10.2340/1489-49A2-3956-4B2D-FE16-6\"", + "type": "string" + }, + "displayName": { + "description": "The name of the studio that owns the Edit referred in the Avail.\nThis is the equivalent of `studio_name` in other resources, but it follows\nthe EMA nomenclature.\nExample: \"Google Films\".", + "type": "string" + }, + "captionExemption": { + "description": "Communicating an exempt category as defined by FCC regulations.\nIt is not required for non-US Avails.\nExample: \"1\"", + "type": "string" + }, + "seasonTitleInternalAlias": { + "description": "Title used by involved parties to refer to this season.\nOnly available on TV Avails.\nExample: \"Googlers, The\".", + "type": "string" + }, + "episodeAltId": { + "description": "Other identifier referring to the episode, as defined by partner.\nOnly available on TV avails.\nExample: \"rs_googlers_s1_3\".", + "type": "string" + }, + "priceValue": { + "description": "Value to be applied to the pricing type.\nExample: \"4\" or \"2.99\"", + "type": "string" + }, + "territory": { + "description": "ISO 3166-1 alpha-2 country code for the country or territory\nof this Avail.\nFor Avails, we use Territory in lieu of Country to comply with\nEMA specifications.\nBut please note that Territory and Country identify the same thing.\nExample: \"US\".", + "type": "string" + }, + "workType": { + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "A movie picture.", + "A season of a TV show.", + "An episode of a TV show.", + "A collection of movies, i.e. \"Googlers 1 and Googlers, the return\"" + ], + "enum": [ + "TITLE_TYPE_UNSPECIFIED", + "MOVIE", + "SEASON", + "EPISODE", + "BUNDLE" + ], + "description": "Work type as enumerated in EMA.", + "type": "string" + }, + "availId": { + "description": "ID internally generated by Google to uniquely identify an Avail.\nNot part of EMA Specs.", + "type": "string" + }, + "ratingReason": { + "description": "Value representing the rating reason.\nRating reasons should be formatted as per\n[EMA ratings spec](http://www.movielabs.com/md/ratings/)\nand comma-separated for inclusion of multiple reasons.\nExample: \"L, S, V\"", + "type": "string" + }, + "episodeTitleInternalAlias": { + "description": "OPTIONAL.TV Only. Title used by involved parties to refer to this episode.\nOnly available on TV Avails.\nExample: \"Coding at Google\".", + "type": "string" + }, + "suppressionLiftDate": { + "description": "First date an Edit could be publically announced as becoming\navailable at a specific future date in territory of Avail.\n*Not* the Avail start date or pre-order start date.\nFormat is YYYY-MM-DD.\nOnly available for pre-orders.\nExample: \"2012-12-10\"", + "type": "string" + }, + "seasonAltId": { + "description": "Other identifier referring to the season, as defined by partner.\nOnly available on TV avails.\nExample: \"rs_googlers_s1\".", + "type": "string" + }, + "encodeId": { + "description": "Manifestation Identifier. This should be the Manifestation\nLevel EIDR.\nExample: \"10.2340/1489-49A2-3956-4B2D-FE16-7\"", + "type": "string" + }, + "priceType": { + "description": "Type of pricing that should be applied to this Avail\nbased on how the partner classify them.\nExample: \"Tier\", \"WSP\", \"SRP\", or \"Category\".", + "type": "string" + }, + "captionIncluded": { + "description": "Communicating if caption file will be delivered.", + "type": "boolean" + }, + "seasonNumber": { + "description": "The number assigned to the season within a series.\nOnly available on TV Avails.\nExample: \"1\".", + "type": "string" + }, + "licenseType": { + "description": "Type of transaction.", + "type": "string", + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "Electronic Sell Through - purchase policy for unlimited viewing.", + "Video On Demand - rental policy for temporary viewing.", + "Subscription Video On Demand - used for subscription platforms.\nNot supported on Google Play.", + "Pre-order Electronic Sell Through - pre-order purchase only window." + ], + "enum": [ + "LICENSE_TYPE_UNSPECIFIED", + "EST", + "VOD", + "SVOD", + "POEST" + ] + }, + "releaseDate": { + "description": "Release date of the Title in earliest released territory.\nTypically it is just the year, but it is free-form as per EMA spec.\nExamples: \"1979\", \"Oct 2014\"", + "type": "string" + }, + "end": { + "description": "End of term in YYYY-MM-DD format in the timezone of the country\nof the Avail.\n\"Open\" if no end date is available.\nExample: \"2019-02-17\"", + "type": "string" + }, + "videoId": { + "description": "Google-generated ID identifying the video linked to this Avail, once\ndelivered.\nNot part of EMA Specs.\nExample: 'gtry456_xc'", + "type": "string" + }, + "start": { + "description": "Start of term in YYYY-MM-DD format in the timezone of the\ncountry of the Avail.\nExample: \"2013-05-14\".", + "type": "string" + }, + "pphNames": { + "description": "Name of the post-production houses that manage the Avail.\nNot part of EMA Specs.", + "type": "array", + "items": { + "type": "string" + } + }, + "ratingSystem": { + "description": "Rating system applied to the version of title within territory\nof Avail.\nRating systems should be formatted as per\n[EMA ratings spec](http://www.movielabs.com/md/ratings/)\nExample: \"MPAA\"", + "type": "string" + }, + "seriesAltId": { + "description": "Other identifier referring to the series, as defined by partner.\nOnly available on TV avails.\nExample: \"rs_googlers\".", + "type": "string" + }, + "altId": { + "description": "Other identifier referring to the Edit, as defined by partner.\nExample: \"GOOGLER_2006\"", + "type": "string" + }, + "episodeNumber": { + "description": "The number assigned to the episode within a season.\nOnly available on TV Avails.\nExample: \"3\".", + "type": "string" + }, + "seriesTitleInternalAlias": { + "description": "Title used by involved parties to refer to this series.\nOnly available on TV Avails.\nExample: \"Googlers, The\".", + "type": "string" + }, + "formatProfile": { + "enumDescriptions": [ + "Value could not be determined, please contact technical support if\nit should.", + "Standard-definition format.", + "High-definition format.", + "4K UHD." + ], + "enum": [ + "FORMAT_PROFILE_UNSPECIFIED", + "SD", + "HD", + "UHD" + ], + "description": "Indicates the format profile covered by the transaction.", + "type": "string" + } + }, + "id": "Avail" + }, + "ListOrdersResponse": { + "description": "Response to the 'ListOrders' method.", + "type": "object", + "properties": { + "orders": { + "description": "List of Orders that match the request criteria.", + "type": "array", + "items": { + "$ref": "Order" + } + }, + "nextPageToken": { + "description": "See _List methods rules_ for info about this field.", + "type": "string" + }, + "totalSize": { + "description": "See _List methods rules_ for more information about this field.", + "format": "int32", + "type": "integer" + } + }, + "id": "ListOrdersResponse" + } + }, + "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "version": "v1", + "baseUrl": "https://playmoviespartner.googleapis.com/", + "canonicalName": "Play Movies", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/playmovies_partner.readonly": { + "description": "View the digital assets you publish on Google Play Movies and TV" + } + } + } + }, + "servicePath": "", + "description": "Gets the delivery status of titles for Google Play Movies Partners.", + "kind": "discovery#restDescription", + "rootUrl": "https://playmoviespartner.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "playmoviespartner", + "batchPath": "batch", + "id": "playmoviespartner:v1", + "documentationLink": "https://developers.google.com/playmoviespartner/", + "revision": "20170516", + "title": "Google Play Movies Partner API", + "discoveryVersion": "v1", + "ownerName": "Google", + "resources": { + "accounts": { + "resources": { + "avails": { + "methods": { + "get": { + "description": "Get an Avail given its avail group id and avail id.", + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "availId" + ], + "response": { + "$ref": "Avail" + }, + "parameters": { + "accountId": { + "description": "REQUIRED. See _General rules_ for more information about this field.", + "required": true, + "type": "string", + "location": "path" + }, + "availId": { + "description": "REQUIRED. Avail ID.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ], + "flatPath": "v1/accounts/{accountId}/avails/{availId}", + "id": "playmoviespartner.accounts.avails.get", + "path": "v1/accounts/{accountId}/avails/{availId}" + }, + "list": { + "flatPath": "v1/accounts/{accountId}/avails", + "id": "playmoviespartner.accounts.avails.list", + "path": "v1/accounts/{accountId}/avails", + "description": "List Avails owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method.", + "httpMethod": "GET", + "parameterOrder": [ + "accountId" + ], + "response": { + "$ref": "ListAvailsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ], + "parameters": { + "pageSize": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "format": "int32", + "type": "integer" + }, + "altIds": { + "description": "Filter Avails that match (case-insensitive) any of the given partner-specific custom ids.", + "type": "string", + "repeated": true, + "location": "query" + }, + "pphNames": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true + }, + "altId": { + "location": "query", + "description": "Filter Avails that match a case-insensitive, partner-specific custom id.\nNOTE: this field is deprecated and will be removed on V2; `alt_ids`\nshould be used instead.", + "type": "string" + }, + "studioNames": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true + }, + "accountId": { + "description": "REQUIRED. See _General rules_ for more information about this field.", + "required": true, + "type": "string", + "location": "path" + }, + "territories": { + "description": "Filter Avails that match (case-insensitive) any of the given country codes,\nusing the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").", + "type": "string", + "repeated": true, + "location": "query" + }, + "title": { + "location": "query", + "description": "Filter that matches Avails with a `title_internal_alias`,\n`series_title_internal_alias`, `season_title_internal_alias`,\nor `episode_title_internal_alias` that contains the given\ncase-insensitive title.", + "type": "string" + }, + "videoIds": { + "location": "query", + "description": "Filter Avails that match any of the given `video_id`s.", + "type": "string", + "repeated": true + }, + "pageToken": { + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "location": "query" + } + } + } + } + }, + "orders": { + "methods": { + "get": { + "description": "Get an Order given its id.\n\nSee _Authentication and Authorization rules_ and\n_Get methods rules_ for more information about this method.", + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "orderId" + ], + "response": { + "$ref": "Order" + }, + "parameters": { + "accountId": { + "location": "path", + "description": "REQUIRED. See _General rules_ for more information about this field.", + "required": true, + "type": "string" + }, + "orderId": { + "location": "path", + "description": "REQUIRED. Order ID.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ], + "flatPath": "v1/accounts/{accountId}/orders/{orderId}", + "id": "playmoviespartner.accounts.orders.get", + "path": "v1/accounts/{accountId}/orders/{orderId}" + }, + "list": { + "response": { + "$ref": "ListOrdersResponse" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "GET", + "parameters": { + "accountId": { + "location": "path", + "description": "REQUIRED. See _General rules_ for more information about this field.", + "required": true, + "type": "string" + }, + "pageToken": { + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "location": "query" + }, + "customId": { + "description": "Filter Orders that match a case-insensitive, partner-specific custom id.", + "type": "string", + "location": "query" + }, + "videoIds": { + "description": "Filter Orders that match any of the given `video_id`s.", + "type": "string", + "repeated": true, + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "format": "int32", + "type": "integer" + }, + "pphNames": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true + }, + "status": { + "description": "Filter Orders that match one of the given status.", + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_APPROVED", + "STATUS_FAILED", + "STATUS_PROCESSING", + "STATUS_UNFULFILLED", + "STATUS_NOT_AVAILABLE" + ] + }, + "name": { + "description": "Filter that matches Orders with a `name`, `show`, `season` or `episode`\nthat contains the given case-insensitive name.", + "type": "string", + "location": "query" + }, + "studioNames": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ], + "flatPath": "v1/accounts/{accountId}/orders", + "path": "v1/accounts/{accountId}/orders", + "id": "playmoviespartner.accounts.orders.list", + "description": "List Orders owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method." + } + } + }, + "storeInfos": { + "methods": { + "list": { + "description": "List StoreInfos owned or managed by the partner.\n\nSee _Authentication and Authorization rules_ and\n_List methods rules_ for more information about this method.", + "response": { + "$ref": "ListStoreInfosResponse" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ], + "parameters": { + "pageSize": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "format": "int32", + "type": "integer" + }, + "mids": { + "description": "Filter StoreInfos that match any of the given `mid`s.", + "type": "string", + "repeated": true, + "location": "query" + }, + "pphNames": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true + }, + "countries": { + "description": "Filter StoreInfos that match (case-insensitive) any of the given country\ncodes, using the \"ISO 3166-1 alpha-2\" format (examples: \"US\", \"us\", \"Us\").", + "type": "string", + "repeated": true, + "location": "query" + }, + "studioNames": { + "location": "query", + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "repeated": true + }, + "name": { + "location": "query", + "description": "Filter that matches StoreInfos with a `name` or `show_name`\nthat contains the given case-insensitive name.", + "type": "string" + }, + "accountId": { + "description": "REQUIRED. See _General rules_ for more information about this field.", + "required": true, + "type": "string", + "location": "path" + }, + "seasonIds": { + "location": "query", + "description": "Filter StoreInfos that match any of the given `season_id`s.", + "type": "string", + "repeated": true + }, + "pageToken": { + "description": "See _List methods rules_ for info about this field.", + "type": "string", + "location": "query" + }, + "videoId": { + "location": "query", + "description": "Filter StoreInfos that match a given `video_id`.\nNOTE: this field is deprecated and will be removed on V2; `video_ids`\nshould be used instead.", + "type": "string" + }, + "videoIds": { + "location": "query", + "description": "Filter StoreInfos that match any of the given `video_id`s.", + "type": "string", + "repeated": true + } + }, + "flatPath": "v1/accounts/{accountId}/storeInfos", + "path": "v1/accounts/{accountId}/storeInfos", + "id": "playmoviespartner.accounts.storeInfos.list" + } + }, + "resources": { + "country": { + "methods": { + "get": { + "description": "Get a StoreInfo given its video id and country.\n\nSee _Authentication and Authorization rules_ and\n_Get methods rules_ for more information about this method.", + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "videoId", + "country" + ], + "response": { + "$ref": "StoreInfo" + }, + "parameters": { + "videoId": { + "location": "path", + "description": "REQUIRED. Video ID.", + "required": true, + "type": "string" + }, + "country": { + "location": "path", + "description": "REQUIRED. Edit country.", + "required": true, + "type": "string" + }, + "accountId": { + "description": "REQUIRED. See _General rules_ for more information about this field.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/playmovies_partner.readonly" + ], + "flatPath": "v1/accounts/{accountId}/storeInfos/{videoId}/country/{country}", + "id": "playmoviespartner.accounts.storeInfos.country.get", + "path": "v1/accounts/{accountId}/storeInfos/{videoId}/country/{country}" + } + } + } + } + } + } + } + }, + "parameters": { + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "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" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" } - } } - } } diff --git a/etc/api/plus/v1/plus-api.json b/etc/api/plus/v1/plus-api.json index 3b3b1c1ee3..bd026e89c0 100644 --- a/etc/api/plus/v1/plus-api.json +++ b/etc/api/plus/v1/plus-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/xaQr2pnQDxzH6xeIeMPv71BcAKc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/kNuG-iOwAwwZbZ2LOdsW4iZeeSo\"", "discoveryVersion": "v1", "id": "plus:v1", "name": "plus", "version": "v1", - "revision": "20161214", + "revision": "20170410", "title": "Google+ API", "description": "Builds on top of the Google+ platform.", "ownerDomain": "google.com", diff --git a/etc/api/plusdomains/v1/plusdomains-api.json b/etc/api/plusdomains/v1/plusdomains-api.json index 8e6df74c00..10e342cb3a 100644 --- a/etc/api/plusdomains/v1/plusdomains-api.json +++ b/etc/api/plusdomains/v1/plusdomains-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/rwMKGZYRPxKqocmh79dh6HG7FrI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/nRr68spNLglqnTLvRRGTS20kwyQ\"", "discoveryVersion": "v1", "id": "plusDomains:v1", "name": "plusDomains", "version": "v1", - "revision": "20161214", + "revision": "20170410", "title": "Google+ Domains API", "description": "Builds on top of the Google+ platform for Google Apps Domains.", "ownerDomain": "google.com", diff --git a/etc/api/prediction/v1.2/prediction-api.json b/etc/api/prediction/v1.2/prediction-api.json index d1242e63b9..c7d3b78c31 100644 --- a/etc/api/prediction/v1.2/prediction-api.json +++ b/etc/api/prediction/v1.2/prediction-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/y6-9S-Lx_Izdv2KpEj-E5-XRo7s\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/y6-9S-Lx_Izdv2KpEj-E5-XRo7s\"", "discoveryVersion": "v1", "id": "prediction:v1.2", "name": "prediction", diff --git a/etc/api/prediction/v1.3/prediction-api.json b/etc/api/prediction/v1.3/prediction-api.json index d525e0a5c4..465e6bd6af 100644 --- a/etc/api/prediction/v1.3/prediction-api.json +++ b/etc/api/prediction/v1.3/prediction-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/cYlCW_mo2Sbrsx6lIgVnF3W-L9s\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/cYlCW_mo2Sbrsx6lIgVnF3W-L9s\"", "discoveryVersion": "v1", "id": "prediction:v1.3", "name": "prediction", diff --git a/etc/api/prediction/v1.4/prediction-api.json b/etc/api/prediction/v1.4/prediction-api.json index a9eed17307..9d73050435 100644 --- a/etc/api/prediction/v1.4/prediction-api.json +++ b/etc/api/prediction/v1.4/prediction-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/UWwWpdkeaK4ZVhf_4VB1iBPZ3Lo\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/UWwWpdkeaK4ZVhf_4VB1iBPZ3Lo\"", "discoveryVersion": "v1", "id": "prediction:v1.4", "name": "prediction", diff --git a/etc/api/prediction/v1.5/prediction-api.json b/etc/api/prediction/v1.5/prediction-api.json index fcebc9f050..48e48bdedd 100644 --- a/etc/api/prediction/v1.5/prediction-api.json +++ b/etc/api/prediction/v1.5/prediction-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/B0qrlmHp5fl-zt3tPCgucMogpLQ\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/B0qrlmHp5fl-zt3tPCgucMogpLQ\"", "discoveryVersion": "v1", "id": "prediction:v1.5", "name": "prediction", diff --git a/etc/api/prediction/v1.6/prediction-api.json b/etc/api/prediction/v1.6/prediction-api.json index 573dfb21bb..d11b6f7bc4 100644 --- a/etc/api/prediction/v1.6/prediction-api.json +++ b/etc/api/prediction/v1.6/prediction-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/YsFEJnq5UeoemkjE7DFhTi6r2Gw\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/YsFEJnq5UeoemkjE7DFhTi6r2Gw\"", "discoveryVersion": "v1", "id": "prediction:v1.6", "name": "prediction", diff --git a/etc/api/proximitybeacon/v1beta1/proximitybeacon-api.json b/etc/api/proximitybeacon/v1beta1/proximitybeacon-api.json index f9591e2843..237c45c4fa 100644 --- a/etc/api/proximitybeacon/v1beta1/proximitybeacon-api.json +++ b/etc/api/proximitybeacon/v1beta1/proximitybeacon-api.json @@ -1,1053 +1,1146 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/InJfaYgEs4kvxVpfe1cZDPrjhv0\"", - "discoveryVersion": "v1", - "id": "proximitybeacon:v1beta1", - "name": "proximitybeacon", - "version": "v1beta1", - "revision": "20160429", - "title": "Google Proximity Beacon API", - "description": "Registers, manages, indexes, and searches beacons.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/beacons/proximity/", - "protocol": "rest", - "baseUrl": "https://proximitybeacon.googleapis.com/", - "basePath": "", - "rootUrl": "https://proximitybeacon.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "version_module": true, - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/userlocation.beacon.registry": { - "description": "View and modify your beacons" - } - } - } - }, - "schemas": { - "Beacon": { - "id": "Beacon", - "type": "object", - "description": "Details of a beacon device.", - "properties": { - "beaconName": { - "type": "string", - "description": "Resource name of this beacon. A beacon name has the format \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. This field must be left empty when registering. After reading a beacon, clients can use the name for future operations." + "rootUrl": "https://proximitybeacon.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "proximitybeacon", + "batchPath": "batch", + "revision": "20170517", + "documentationLink": "https://developers.google.com/beacons/proximity/", + "id": "proximitybeacon:v1beta1", + "title": "Google Proximity Beacon API", + "discoveryVersion": "v1", + "ownerName": "Google", + "version_module": "True", + "resources": { + "beaconinfo": { + "methods": { + "getforobserved": { + "path": "v1beta1/beaconinfo:getforobserved", + "id": "proximitybeacon.beaconinfo.getforobserved", + "request": { + "$ref": "GetInfoForObservedBeaconsRequest" + }, + "description": "Given one or more beacon observations, returns any beacon information\nand attachments accessible to your application. Authorize by using the\n[API key](https://developers.google.com/beacons/proximity/get-started#request_a_browser_api_key)\nfor the application.", + "response": { + "$ref": "GetInfoForObservedBeaconsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "flatPath": "v1beta1/beaconinfo:getforobserved" + } + } }, - "advertisedId": { - "$ref": "AdvertisedId", - "description": "The identifier of a beacon as advertised by it. This field must be populated when registering. It may be empty when updating a beacon record because it is ignored in updates. When registering a beacon that broadcasts Eddystone-EID, this field should contain a \"stable\" Eddystone-UID that identifies the beacon and links it to its attachments. The stable Eddystone-UID is only used for administering the beacon." - }, - "status": { - "type": "string", - "description": "Current status of the beacon. Required.", - "enum": [ - "STATUS_UNSPECIFIED", - "ACTIVE", - "DECOMMISSIONED", - "INACTIVE" - ] - }, - "placeId": { - "type": "string", - "description": "The [Google Places API](/places/place-id) Place ID of the place where the beacon is deployed. This is given when the beacon is registered or updated, not automatically detected in any way. Optional." - }, - "latLng": { - "$ref": "LatLng", - "description": "The location of the beacon, expressed as a latitude and longitude pair. This location is given when the beacon is registered or updated. It does not necessarily indicate the actual current location of the beacon. Optional." - }, - "indoorLevel": { - "$ref": "IndoorLevel", - "description": "The indoor level information for this beacon, if known. As returned by the Google Maps API. Optional." - }, - "expectedStability": { - "type": "string", - "description": "Expected location stability. This is set when the beacon is registered or updated, not automatically detected in any way. Optional.", - "enum": [ - "STABILITY_UNSPECIFIED", - "STABLE", - "PORTABLE", - "MOBILE", - "ROVING" - ] - }, - "description": { - "type": "string", - "description": "Free text used to identify and describe the beacon. Maximum length 140 characters. Optional." - }, - "properties": { - "type": "object", - "description": "Properties of the beacon device, for example battery type or firmware version. Optional.", - "additionalProperties": { - "type": "string" - } - }, - "ephemeralIdRegistration": { - "$ref": "EphemeralIdRegistration", - "description": "Write-only registration parameters for beacons using Eddystone-EID (remotely resolved ephemeral ID) format. This information will not be populated in API responses. When submitting this data, the `advertised_id` field must contain an ID of type Eddystone-UID. Any other ID type will result in an error." - }, - "provisioningKey": { - "type": "string", - "description": "Some beacons may require a user to provide an authorization key before changing any of its configuration (e.g. broadcast frames, transmit power). This field provides a place to store and control access to that key. This field is populated in responses to `GET /v1beta1/beacons/3!beaconId` from users with write access to the given beacon. That is to say: If the user is authorized to write the beacon's confidential data in the service, the service considers them authorized to configure the beacon. Note that this key grants nothing on the service, only on the beacon itself.", - "format": "byte" - } - } - }, - "AdvertisedId": { - "id": "AdvertisedId", - "type": "object", - "description": "Defines a unique identifier of a beacon as broadcast by the device.", - "properties": { - "type": { - "type": "string", - "description": "Specifies the identifier type. Required.", - "enum": [ - "TYPE_UNSPECIFIED", - "EDDYSTONE", - "IBEACON", - "ALTBEACON", - "EDDYSTONE_EID" - ] - }, - "id": { - "type": "string", - "description": "The actual beacon identifier, as broadcast by the beacon hardware. Must be [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP requests, and will be so encoded (with padding) in responses. The base64 encoding should be of the binary byte-stream and not any textual (such as hex) representation thereof. Required.", - "format": "byte" - } - } - }, - "LatLng": { - "id": "LatLng", - "type": "object", - "description": "An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. Example of normalization code in Python: def NormalizeLongitude(longitude): \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\" q, r = divmod(longitude, 360.0) if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0): return r - 360.0 return r def NormalizeLatLng(latitude, longitude): \"\"\"Wraps decimal degrees latitude and longitude to [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\" r = latitude % 360.0 if r = 270.0: return r - 360, NormalizeLongitude(longitude) else: return 180 - r, NormalizeLongitude(longitude + 180.0) assert 180.0 == NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0) assert -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "properties": { - "latitude": { - "type": "number", - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "format": "double" - }, - "longitude": { - "type": "number", - "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", - "format": "double" - } - } - }, - "IndoorLevel": { - "id": "IndoorLevel", - "type": "object", - "description": "Indoor level, a human-readable string as returned by Google Maps APIs, useful to indicate which floor of a building a beacon is located on.", - "properties": { - "name": { - "type": "string", - "description": "The name of this level." - } - } - }, - "EphemeralIdRegistration": { - "id": "EphemeralIdRegistration", - "type": "object", - "description": "Write-only registration parameters for beacons using Eddystone-EID format. Two ways of securely registering an Eddystone-EID beacon with the service are supported: 1. Perform an ECDH key exchange via this API, including a previous call to `GET /v1beta1/eidparams`. In this case the fields `beacon_ecdh_public_key` and `service_ecdh_public_key` should be populated and `beacon_identity_key` should not be populated. This method ensures that only the two parties in the ECDH key exchange can compute the identity key, which becomes a secret between them. 2. Derive or obtain the beacon's identity key via other secure means (perhaps an ECDH key exchange between the beacon and a mobile device or any other secure method), and then submit the resulting identity key to the service. In this case `beacon_identity_key` field should be populated, and neither of `beacon_ecdh_public_key` nor `service_ecdh_public_key` fields should be. The security of this method depends on how securely the parties involved (in particular the bluetooth client) handle the identity key, and obviously on how securely the identity key was generated. See [the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub.", - "properties": { - "beaconEcdhPublicKey": { - "type": "string", - "description": "The beacon's public key used for the Elliptic curve Diffie-Hellman key exchange. When this field is populated, `service_ecdh_public_key` must also be populated, and `beacon_identity_key` must not be.", - "format": "byte" - }, - "serviceEcdhPublicKey": { - "type": "string", - "description": "The service's public key used for the Elliptic curve Diffie-Hellman key exchange. When this field is populated, `beacon_ecdh_public_key` must also be populated, and `beacon_identity_key` must not be.", - "format": "byte" - }, - "beaconIdentityKey": { - "type": "string", - "description": "The private key of the beacon. If this field is populated, `beacon_ecdh_public_key` and `service_ecdh_public_key` must not be populated.", - "format": "byte" - }, - "rotationPeriodExponent": { - "type": "integer", - "description": "Indicates the nominal period between each rotation of the beacon's ephemeral ID. \"Nominal\" because the beacon should randomize the actual interval. See [the spec at github](https://github.com/google/eddystone/tree/master/eddystone-eid) for details. This value corresponds to a power-of-two scaler on the beacon's clock: when the scaler value is K, the beacon will begin broadcasting a new ephemeral ID on average every 2^K seconds.", - "format": "uint32" - }, - "initialClockValue": { - "type": "string", - "description": "The initial clock value of the beacon. The beacon's clock must have begun counting at this value immediately prior to transmitting this value to the resolving service. Significant delay in transmitting this value to the service risks registration or resolution failures. If a value is not provided, the default is zero.", - "format": "uint64" - }, - "initialEid": { - "type": "string", - "description": "An initial ephemeral ID calculated using the clock value submitted as `initial_clock_value`, and the secret key generated by the Diffie-Hellman key exchange using `service_ecdh_public_key` and `service_ecdh_public_key`. This initial EID value will be used by the service to confirm that the key exchange process was successful.", - "format": "byte" - } - } - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "ListBeaconsResponse": { - "id": "ListBeaconsResponse", - "type": "object", - "description": "Response that contains list beacon results and pagination help.", - "properties": { - "beacons": { - "type": "array", - "description": "The beacons that matched the search criteria.", - "items": { - "$ref": "Beacon" - } - }, - "nextPageToken": { - "type": "string", - "description": "An opaque pagination token that the client may provide in their next request to retrieve the next page of results." - }, - "totalCount": { - "type": "string", - "description": "Estimate of the total number of beacons matched by the query. Higher values may be less accurate.", - "format": "int64" - } - } - }, - "BeaconAttachment": { - "id": "BeaconAttachment", - "type": "object", - "description": "Project-specific data associated with a beacon.", - "properties": { - "attachmentName": { - "type": "string", - "description": "Resource name of this attachment. Attachment names have the format: beacons/beacon_id/attachments/attachment_id. Leave this empty on creation." - }, - "namespacedType": { - "type": "string", - "description": "Specifies what kind of attachment this is. Tells a client how to interpret the `data` field. Format is namespace/type. Namespace provides type separation between clients. Type describes the type of `data`, for use by the client when parsing the `data` field. Required." - }, - "data": { - "type": "string", - "description": "An opaque data container for client-provided data. Must be [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP requests, and will be so encoded (with padding) in responses. Required.", - "format": "byte" - } - } - }, - "ListBeaconAttachmentsResponse": { - "id": "ListBeaconAttachmentsResponse", - "type": "object", - "description": "Response to ListBeaconAttachments that contains the requested attachments.", - "properties": { - "attachments": { - "type": "array", - "description": "The attachments that corresponded to the request params.", - "items": { - "$ref": "BeaconAttachment" - } - } - } - }, - "DeleteAttachmentsResponse": { - "id": "DeleteAttachmentsResponse", - "type": "object", - "description": "Response for a request to delete attachments.", - "properties": { - "numDeleted": { - "type": "integer", - "description": "The number of attachments that were deleted.", - "format": "int32" - } - } - }, - "ListNamespacesResponse": { - "id": "ListNamespacesResponse", - "type": "object", - "description": "Response to ListNamespacesRequest that contains all the project's namespaces.", - "properties": { "namespaces": { - "type": "array", - "description": "The attachments that corresponded to the request params.", - "items": { - "$ref": "Namespace" - } - } - } - }, - "Namespace": { - "id": "Namespace", - "type": "object", - "description": "An attachment namespace defines read and write access for all the attachments created under it. Each namespace is globally unique, and owned by one project which is the only project that can create attachments under it.", - "properties": { - "namespaceName": { - "type": "string", - "description": "Resource name of this namespace. Namespaces names have the format: namespaces/namespace." + "methods": { + "list": { + "response": { + "$ref": "ListNamespacesResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "projectId": { + "location": "query", + "description": "The project id to list namespaces under.\nOptional.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/namespaces", + "path": "v1beta1/namespaces", + "id": "proximitybeacon.namespaces.list", + "description": "Lists all attachment namespaces owned by your Google Developers Console\nproject. Attachment data associated with a beacon must include a\nnamespaced type, and the namespace must be owned by your project.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project." + }, + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "namespaceName" + ], + "response": { + "$ref": "Namespace" + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "namespaceName": { + "description": "Resource name of this namespace. Namespaces names have the format:\n\u003ccode\u003enamespaces/\u003cvar\u003enamespace\u003c/var\u003e\u003c/code\u003e.", + "required": true, + "type": "string", + "pattern": "^namespaces/[^/]+$", + "location": "path" + }, + "projectId": { + "location": "query", + "description": "The project id of the namespace to update. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/namespaces/{namespacesId}", + "id": "proximitybeacon.namespaces.update", + "path": "v1beta1/{+namespaceName}", + "description": "Updates the information about the specified namespace. Only the namespace\nvisibility can be updated.", + "request": { + "$ref": "Namespace" + } + } + } }, - "servingVisibility": { - "type": "string", - "description": "Specifies what clients may receive attachments under this namespace via `beaconinfo.getforobserved`.", - "enum": [ - "VISIBILITY_UNSPECIFIED", - "UNLISTED", - "PUBLIC" - ] - } - } - }, - "EphemeralIdRegistrationParams": { - "id": "EphemeralIdRegistrationParams", - "type": "object", - "description": "Information a client needs to provision and register beacons that broadcast Eddystone-EID format beacon IDs, using Elliptic curve Diffie-Hellman key exchange. See [the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub.", - "properties": { - "serviceEcdhPublicKey": { - "type": "string", - "description": "The beacon service's public key for use by a beacon to derive its Identity Key using Elliptic Curve Diffie-Hellman key exchange.", - "format": "byte" + "v1beta1": { + "methods": { + "getEidparams": { + "httpMethod": "GET", + "response": { + "$ref": "EphemeralIdRegistrationParams" + }, + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": {}, + "flatPath": "v1beta1/eidparams", + "id": "proximitybeacon.getEidparams", + "path": "v1beta1/eidparams", + "description": "Gets the Proximity Beacon API's current public key and associated\nparameters used to initiate the Diffie-Hellman key exchange required to\nregister a beacon that broadcasts the Eddystone-EID format. This key\nchanges periodically; clients may cache it and re-use the same public key\nto provision and register multiple beacons. However, clients should be\nprepared to refresh this key when they encounter an error registering an\nEddystone-EID beacon." + } + } }, - "minRotationPeriodExponent": { - "type": "integer", - "description": "Indicates the minimum rotation period supported by the service. See EddystoneEidRegistration.rotation_period_exponent", - "format": "uint32" - }, - "maxRotationPeriodExponent": { - "type": "integer", - "description": "Indicates the maximum rotation period supported by the service. See EddystoneEidRegistration.rotation_period_exponent", - "format": "uint32" - } - } - }, - "ListDiagnosticsResponse": { - "id": "ListDiagnosticsResponse", - "type": "object", - "description": "Response that contains the requested diagnostics.", - "properties": { - "diagnostics": { - "type": "array", - "description": "The diagnostics matching the given request.", - "items": { - "$ref": "Diagnostics" - } - }, - "nextPageToken": { - "type": "string", - "description": "Token that can be used for pagination. Returned only if the request matches more beacons than can be returned in this response." - } - } - }, - "Diagnostics": { - "id": "Diagnostics", - "type": "object", - "description": "Diagnostics for a single beacon.", - "properties": { - "beaconName": { - "type": "string", - "description": "Resource name of the beacon. For Eddystone-EID beacons, this may be the beacon's current EID, or the beacon's \"stable\" Eddystone-UID." - }, - "estimatedLowBatteryDate": { - "$ref": "Date", - "description": "The date when the battery is expected to be low. If the value is missing then there is no estimate for when the battery will be low. This value is only an estimate, not an exact date." - }, - "alerts": { - "type": "array", - "description": "An unordered list of Alerts that the beacon has.", - "enumDescriptions": [ - "Invalid value. Should never appear.", - "The beacon has been reported in a location different than its registered location. This may indicate that the beacon has been moved. This signal is not 100% accurate, but indicates that further investigation is worth while.", - "The battery level for the beacon is low enough that, given the beacon's current use, its battery will run out with in the next 60 days. This indicates that the battery should be replaced soon." - ], - "items": { - "type": "string", - "enum": [ - "ALERT_UNSPECIFIED", - "WRONG_LOCATION", - "LOW_BATTERY" - ] - } - } - } - }, - "Date": { - "id": "Date", - "type": "object", - "description": "Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.", - "properties": { - "year": { - "type": "integer", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.", - "format": "int32" - }, - "month": { - "type": "integer", - "description": "Month of year. Must be from 1 to 12.", - "format": "int32" - }, - "day": { - "type": "integer", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant.", - "format": "int32" - } - } - }, - "GetInfoForObservedBeaconsRequest": { - "id": "GetInfoForObservedBeaconsRequest", - "type": "object", - "description": "Request for beacon and attachment information about beacons that a mobile client has encountered \"in the wild\".", - "properties": { - "observations": { - "type": "array", - "description": "The beacons that the client has encountered. At least one must be given.", - "items": { - "$ref": "Observation" - } - }, - "namespacedTypes": { - "type": "array", - "description": "Specifies what kind of attachments to include in the response. When given, the response will include only attachments of the given types. When empty, no attachments will be returned. Must be in the format namespace/type. Accepts `*` to specify all types in all namespaces. Optional.", - "items": { - "type": "string" - } - } - } - }, - "Observation": { - "id": "Observation", - "type": "object", - "description": "Represents one beacon observed once.", - "properties": { - "advertisedId": { - "$ref": "AdvertisedId", - "description": "The ID advertised by the beacon the client has encountered. Clients may submit an Eddystone-EID `advertised_id`. If the client is not authorized to resolve the given Eddystone-EID, no data will be returned for that beacon. Required." - }, - "telemetry": { - "type": "string", - "description": "The array of telemetry bytes received from the beacon. The server is responsible for parsing it. This field may frequently be empty, as with a beacon that transmits telemetry only occasionally.", - "format": "byte" - }, - "timestampMs": { - "type": "string", - "description": "Time when the beacon was observed." - } - } - }, - "GetInfoForObservedBeaconsResponse": { - "id": "GetInfoForObservedBeaconsResponse", - "type": "object", - "description": "Information about the requested beacons, optionally including attachment data.", - "properties": { "beacons": { - "type": "array", - "description": "Public information about beacons. May be empty if the request matched no beacons.", - "items": { - "$ref": "BeaconInfo" - } - } - } - }, - "BeaconInfo": { - "id": "BeaconInfo", - "type": "object", - "description": "A subset of beacon information served via the `beaconinfo.getforobserved` method, which you call when users of your app encounter your beacons.", - "properties": { - "advertisedId": { - "$ref": "AdvertisedId", - "description": "The ID advertised by the beacon." - }, - "beaconName": { - "type": "string", - "description": "The name under which the beacon is registered." - }, - "attachments": { - "type": "array", - "description": "Attachments matching the type(s) requested. May be empty if no attachment types were requested, or if none matched.", - "items": { - "$ref": "AttachmentInfo" - } - } - } - }, - "AttachmentInfo": { - "id": "AttachmentInfo", - "type": "object", - "description": "A subset of attachment information served via the `beaconinfo.getforobserved` method, used when your users encounter your beacons.", - "properties": { - "namespacedType": { - "type": "string", - "description": "Specifies what kind of attachment this is. Tells a client how to interpret the `data` field. Format is namespace/type, for example scrupulous-wombat-12345/welcome-message" - }, - "data": { - "type": "string", - "description": "An opaque data container for client-provided data.", - "format": "byte" - } - } - } - }, - "resources": { - "beacons": { - "methods": { - "register": { - "id": "proximitybeacon.beacons.register", - "path": "v1beta1/beacons:register", - "httpMethod": "POST", - "description": "Registers a previously unregistered beacon given its `advertisedId`. These IDs are unique within the system. An ID can be registered only once. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project id of the project the beacon will be registered to. If the project id is not specified then the project making the request is used. Optional.", - "location": "query" - } - }, - "request": { - "$ref": "Beacon" - }, - "response": { - "$ref": "Beacon" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "decommission": { - "id": "proximitybeacon.beacons.decommission", - "path": "v1beta1/{+beaconName}:decommission", - "httpMethod": "POST", - "description": "Decommissions the specified beacon in the service. This beacon will no longer be returned from `beaconinfo.getforobserved`. This operation is permanent -- you will not be able to re-register a beacon with this ID again. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "beaconName": { - "type": "string", - "description": "Beacon that should be decommissioned. A beacon name has the format \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID of the beacon's \"stable\" UID. Required.", - "required": true, - "pattern": "^beacons/[^/]*$", - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The project id of the beacon to decommission. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional.", - "location": "query" - } - }, - "parameterOrder": [ - "beaconName" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "get": { - "id": "proximitybeacon.beacons.get", - "path": "v1beta1/{+beaconName}", - "httpMethod": "GET", - "description": "Returns detailed information about the specified beacon. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. Requests may supply an Eddystone-EID beacon name in the form: `beacons/4!beaconId` where the `beaconId` is the base16 ephemeral ID broadcast by the beacon. The returned `Beacon` object will contain the beacon's stable Eddystone-UID. Clients not authorized to resolve the beacon's ephemeral Eddystone-EID broadcast will receive an error.", - "parameters": { - "beaconName": { - "type": "string", - "description": "Resource name of this beacon. A beacon name has the format \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's \"stable\" UID. Required.", - "required": true, - "pattern": "^beacons/[^/]*$", - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The project id of the beacon to request. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional.", - "location": "query" - } - }, - "parameterOrder": [ - "beaconName" - ], - "response": { - "$ref": "Beacon" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "list": { - "id": "proximitybeacon.beacons.list", - "path": "v1beta1/beacons", - "httpMethod": "GET", - "description": "Searches the beacon registry for beacons that match the given search criteria. Only those beacons that the client has permission to list will be returned. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "q": { - "type": "string", - "description": "Filter query string that supports the following field filters: * `description:\"\"` For example: `description:\"Room 3\"` Returns beacons whose description matches tokens in the string \"Room 3\" (not necessarily that exact string). The string must be double-quoted. * `status:` For example: `status:active` Returns beacons whose status matches the given value. Values must be one of the Beacon.Status enum values (case insensitive). Accepts multiple filters which will be combined with OR logic. * `stability:` For example: `stability:mobile` Returns beacons whose expected stability matches the given value. Values must be one of the Beacon.Stability enum values (case insensitive). Accepts multiple filters which will be combined with OR logic. * `place_id:\"\"` For example: `place_id:\"ChIJVSZzVR8FdkgRXGmmm6SslKw=\"` Returns beacons explicitly registered at the given place, expressed as a Place ID obtained from [Google Places API](/places/place-id). Does not match places inside the given place. Does not consider the beacon's actual location (which may be different from its registered place). Accepts multiple filters that will be combined with OR logic. The place ID must be double-quoted. * `registration_time[|=]` For example: `registration_time\u003e=1433116800` Returns beacons whose registration time matches the given filter. Supports the operators: , =. Timestamp must be expressed as an integer number of seconds since midnight January 1, 1970 UTC. Accepts at most two filters that will be combined with AND logic, to support \"between\" semantics. If more than two are supplied, the latter ones are ignored. * `lat: lng: radius:` For example: `lat:51.1232343 lng:-1.093852 radius:1000` Returns beacons whose registered location is within the given circle. When any of these fields are given, all are required. Latitude and longitude must be decimal degrees between -90.0 and 90.0 and between -180.0 and 180.0 respectively. Radius must be an integer number of meters between 10 and 1,000,000 (1000 km). * `property:\"=\"` For example: `property:\"battery-type=CR2032\"` Returns beacons which have a property of the given name and value. Supports multiple filters which will be combined with OR logic. The entire name=value string must be double-quoted as one string. * `attachment_type:\"\"` For example: `attachment_type:\"my-namespace/my-type\"` Returns beacons having at least one attachment of the given namespaced type. Supports \"any within this namespace\" via the partial wildcard syntax: \"my-namespace/*\". Supports multiple filters which will be combined with OR logic. The string must be double-quoted. Multiple filters on the same field are combined with OR logic (except registration_time which is combined with AND logic). Multiple filters on different fields are combined with AND logic. Filters should be separated by spaces. As with any HTTP query string parameter, the whole filter expression must be URL-encoded. Example REST request: `GET /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000`", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A pagination token obtained from a previous request to list beacons.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The maximum number of records to return for this request, up to a server-defined upper limit.", - "format": "int32", - "location": "query" - }, - "projectId": { - "type": "string", - "description": "The project id to list beacons under. If not present then the project credential that made the request is used as the project. Optional.", - "location": "query" - } - }, - "response": { - "$ref": "ListBeaconsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "update": { - "id": "proximitybeacon.beacons.update", - "path": "v1beta1/{+beaconName}", - "httpMethod": "PUT", - "description": "Updates the information about the specified beacon. **Any field that you do not populate in the submitted beacon will be permanently erased**, so you should follow the \"read, modify, write\" pattern to avoid inadvertently destroying data. Changes to the beacon status via this method will be silently ignored. To update beacon status, use the separate methods on this API for activation, deactivation, and decommissioning. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "beaconName": { - "type": "string", - "description": "Resource name of this beacon. A beacon name has the format \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. This field must be left empty when registering. After reading a beacon, clients can use the name for future operations.", - "required": true, - "pattern": "^beacons/[^/]*$", - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The project id of the beacon to update. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional.", - "location": "query" - } - }, - "parameterOrder": [ - "beaconName" - ], - "request": { - "$ref": "Beacon" - }, - "response": { - "$ref": "Beacon" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "activate": { - "id": "proximitybeacon.beacons.activate", - "path": "v1beta1/{+beaconName}:activate", - "httpMethod": "POST", - "description": "Activates a beacon. A beacon that is active will return information and attachment data when queried via `beaconinfo.getforobserved`. Calling this method on an already active beacon will do nothing (but will return a successful response code). Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "beaconName": { - "type": "string", - "description": "Beacon that should be activated. A beacon name has the format \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's \"stable\" UID. Required.", - "required": true, - "pattern": "^beacons/[^/]*$", - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The project id of the beacon to activate. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional.", - "location": "query" - } - }, - "parameterOrder": [ - "beaconName" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "deactivate": { - "id": "proximitybeacon.beacons.deactivate", - "path": "v1beta1/{+beaconName}:deactivate", - "httpMethod": "POST", - "description": "Deactivates a beacon. Once deactivated, the API will not return information nor attachment data for the beacon when queried via `beaconinfo.getforobserved`. Calling this method on an already inactive beacon will do nothing (but will return a successful response code). Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "beaconName": { - "type": "string", - "description": "Beacon that should be deactivated. A beacon name has the format \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's \"stable\" UID. Required.", - "required": true, - "pattern": "^beacons/[^/]*$", - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The project id of the beacon to deactivate. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional.", - "location": "query" - } - }, - "parameterOrder": [ - "beaconName" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - } - }, - "resources": { - "attachments": { - "methods": { - "create": { - "id": "proximitybeacon.beacons.attachments.create", - "path": "v1beta1/{+beaconName}/attachments", - "httpMethod": "POST", - "description": "Associates the given data with the specified beacon. Attachment data must contain two parts: \n- A namespaced type. \n- The actual attachment data itself. The namespaced type consists of two parts, the namespace and the type. The namespace must be one of the values returned by the `namespaces` endpoint, while the type can be a string of any characters except for the forward slash (`/`) up to 100 characters in length. Attachment data can be up to 1024 bytes long. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "beaconName": { - "type": "string", - "description": "Beacon on which the attachment should be created. A beacon name has the format \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's \"stable\" UID. Required.", - "required": true, - "pattern": "^beacons/[^/]*$", - "location": "path" + "resources": { + "attachments": { + "methods": { + "delete": { + "description": "Deletes the specified attachment for the given beacon. Each attachment has\na unique attachment name (`attachmentName`) which is returned when you\nfetch the attachment data via this API. You specify this with the delete\nrequest to control which attachment is removed. This operation cannot be\nundone.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "attachmentName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "attachmentName": { + "pattern": "^beacons/[^/]+/attachments/[^/]+$", + "location": "path", + "description": "The attachment name (`attachmentName`) of\nthe attachment to remove. For example:\n`beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`. For\nEddystone-EID beacons, the beacon ID portion (`3!893737abc9`) may be the\nbeacon's current EID, or its \"stable\" Eddystone-UID.\nRequired.", + "required": true, + "type": "string" + }, + "projectId": { + "location": "query", + "description": "The project id of the attachment to delete. If not provided, the project\nthat is making the request is used.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/beacons/{beaconsId}/attachments/{attachmentsId}", + "path": "v1beta1/{+attachmentName}", + "id": "proximitybeacon.beacons.attachments.delete" + }, + "list": { + "response": { + "$ref": "ListBeaconAttachmentsResponse" + }, + "parameterOrder": [ + "beaconName" + ], + "httpMethod": "GET", + "parameters": { + "namespacedType": { + "location": "query", + "description": "Specifies the namespace and type of attachment to include in response in\n\u003cvar\u003enamespace/type\u003c/var\u003e format. Accepts `*/*` to specify\n\"all types in all namespaces\".", + "type": "string" + }, + "beaconName": { + "description": "Beacon whose attachments should be fetched. A beacon name has the\nformat \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast\nby the beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "required": true, + "type": "string", + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { + "location": "query", + "description": "The project id to list beacon attachments under. This field can be\nused when \"*\" is specified to mean all attachment namespaces. Projects\nmay have multiple attachments with multiple namespaces. If \"*\" is\nspecified and the projectId string is empty, then the project\nmaking the request is used.\nOptional.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/beacons/{beaconsId}/attachments", + "path": "v1beta1/{+beaconName}/attachments", + "id": "proximitybeacon.beacons.attachments.list", + "description": "Returns the attachments for the specified beacon that match the specified\nnamespaced-type pattern.\n\nTo control which namespaced types are returned, you add the\n`namespacedType` query parameter to the request. You must either use\n`*/*`, to return all attachments, or the namespace must be one of\nthe ones returned from the `namespaces` endpoint.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project." + }, + "create": { + "response": { + "$ref": "BeaconAttachment" + }, + "parameterOrder": [ + "beaconName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "beaconName": { + "pattern": "^beacons/[^/]+$", + "location": "path", + "description": "Beacon on which the attachment should be created. A beacon name has the\nformat \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast\nby the beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "The project id of the project the attachment will belong to. If\nthe project id is not specified then the project making the request\nis used.\nOptional.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta1/beacons/{beaconsId}/attachments", + "path": "v1beta1/{+beaconName}/attachments", + "id": "proximitybeacon.beacons.attachments.create", + "description": "Associates the given data with the specified beacon. Attachment data must\ncontain two parts:\n\u003cul\u003e\n\u003cli\u003eA namespaced type.\u003c/li\u003e\n\u003cli\u003eThe actual attachment data itself.\u003c/li\u003e\n\u003c/ul\u003e\nThe namespaced type consists of two parts, the namespace and the type.\nThe namespace must be one of the values returned by the `namespaces`\nendpoint, while the type can be a string of any characters except for the\nforward slash (`/`) up to 100 characters in length.\n\nAttachment data can be up to 1024 bytes long.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "request": { + "$ref": "BeaconAttachment" + } + }, + "batchDelete": { + "response": { + "$ref": "DeleteAttachmentsResponse" + }, + "parameterOrder": [ + "beaconName" + ], + "httpMethod": "POST", + "parameters": { + "beaconName": { + "description": "The beacon whose attachments should be deleted. A beacon name has the\nformat \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast\nby the beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "required": true, + "type": "string", + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { + "location": "query", + "description": "The project id to delete beacon attachments under. This field can be\nused when \"*\" is specified to mean all attachment namespaces. Projects\nmay have multiple attachments with multiple namespaces. If \"*\" is\nspecified and the projectId string is empty, then the project\nmaking the request is used.\nOptional.", + "type": "string" + }, + "namespacedType": { + "location": "query", + "description": "Specifies the namespace and type of attachments to delete in\n`namespace/type` format. Accepts `*/*` to specify\n\"all types in all namespaces\".\nOptional.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/beacons/{beaconsId}/attachments:batchDelete", + "path": "v1beta1/{+beaconName}/attachments:batchDelete", + "id": "proximitybeacon.beacons.attachments.batchDelete", + "description": "Deletes multiple attachments on a given beacon. This operation is\npermanent and cannot be undone.\n\nYou can optionally specify `namespacedType` to choose which attachments\nshould be deleted. If you do not specify `namespacedType`, all your\nattachments on the given beacon will be deleted. You also may explicitly\nspecify `*/*` to delete all.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project." + } + } }, - "projectId": { - "type": "string", - "description": "The project id of the project the attachment will belong to. If the project id is not specified then the project making the request is used. Optional.", - "location": "query" + "diagnostics": { + "methods": { + "list": { + "response": { + "$ref": "ListDiagnosticsResponse" + }, + "parameterOrder": [ + "beaconName" + ], + "httpMethod": "GET", + "parameters": { + "beaconName": { + "pattern": "^beacons/[^/]+$", + "location": "path", + "description": "Beacon that the diagnostics are for.", + "required": true, + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Requests results that occur after the `page_token`, obtained from the\nresponse to a previous request. Optional.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Specifies the maximum number of results to return. Defaults to\n10. Maximum 1000. Optional.", + "format": "int32", + "type": "integer" + }, + "alertFilter": { + "enum": [ + "ALERT_UNSPECIFIED", + "WRONG_LOCATION", + "LOW_BATTERY" + ], + "description": "Requests only beacons that have the given alert. For example, to find\nbeacons that have low batteries use `alert_filter=LOW_BATTERY`.", + "type": "string", + "location": "query" + }, + "projectId": { + "description": "Requests only diagnostic records for the given project id. If not set,\nthen the project making the request will be used for looking up\ndiagnostic records. Optional.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/beacons/{beaconsId}/diagnostics", + "path": "v1beta1/{+beaconName}/diagnostics", + "id": "proximitybeacon.beacons.diagnostics.list", + "description": "List the diagnostics for a single beacon. You can also list diagnostics for\nall the beacons owned by your Google Developers Console project by using\nthe beacon name `beacons/-`.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project." + } + } } - }, - "parameterOrder": [ - "beaconName" - ], - "request": { - "$ref": "BeaconAttachment" - }, - "response": { - "$ref": "BeaconAttachment" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] }, - "list": { - "id": "proximitybeacon.beacons.attachments.list", - "path": "v1beta1/{+beaconName}/attachments", - "httpMethod": "GET", - "description": "Returns the attachments for the specified beacon that match the specified namespaced-type pattern. To control which namespaced types are returned, you add the `namespacedType` query parameter to the request. You must either use `*/*`, to return all attachments, or the namespace must be one of the ones returned from the `namespaces` endpoint. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "beaconName": { - "type": "string", - "description": "Beacon whose attachments should be fetched. A beacon name has the format \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's \"stable\" UID. Required.", - "required": true, - "pattern": "^beacons/[^/]*$", - "location": "path" + "methods": { + "update": { + "response": { + "$ref": "Beacon" + }, + "parameterOrder": [ + "beaconName" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "beaconName": { + "description": "Resource name of this beacon. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon.\n\nThis field must be left empty when registering. After reading a beacon,\nclients can use the name for future operations.", + "required": true, + "type": "string", + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { + "location": "query", + "description": "The project id of the beacon to update. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/beacons/{beaconsId}", + "path": "v1beta1/{+beaconName}", + "id": "proximitybeacon.beacons.update", + "description": "Updates the information about the specified beacon. **Any field that you do\nnot populate in the submitted beacon will be permanently erased**, so you\nshould follow the \"read, modify, write\" pattern to avoid inadvertently\ndestroying data.\n\nChanges to the beacon status via this method will be silently ignored.\nTo update beacon status, use the separate methods on this API for\nactivation, deactivation, and decommissioning.\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "request": { + "$ref": "Beacon" + } }, - "namespacedType": { - "type": "string", - "description": "Specifies the namespace and type of attachment to include in response in namespace/type format. Accepts `*/*` to specify \"all types in all namespaces\".", - "location": "query" + "decommission": { + "httpMethod": "POST", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "beaconName" + ], + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "beaconName": { + "description": "Beacon that should be decommissioned. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID of the beacon's \"stable\" UID.\nRequired.", + "required": true, + "type": "string", + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { + "location": "query", + "description": "The project id of the beacon to decommission. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/beacons/{beaconsId}:decommission", + "id": "proximitybeacon.beacons.decommission", + "path": "v1beta1/{+beaconName}:decommission", + "description": "Decommissions the specified beacon in the service. This beacon will no\nlonger be returned from `beaconinfo.getforobserved`. This operation is\npermanent -- you will not be able to re-register a beacon with this ID\nagain.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project." }, - "projectId": { - "type": "string", - "description": "The project id to list beacon attachments under. This field can be used when \"*\" is specified to mean all attachment namespaces. Projects may have multiple attachments with multiple namespaces. If \"*\" is specified and the projectId string is empty, then the project making the request is used. Optional.", - "location": "query" + "delete": { + "id": "proximitybeacon.beacons.delete", + "path": "v1beta1/{+beaconName}", + "description": "Deletes the specified beacon including all diagnostics data for the beacon\nas well as any attachments on the beacon (including those belonging to\nother projects). This operation cannot be undone.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "beaconName" + ], + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "beaconName": { + "description": "Beacon that should be deleted. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "required": true, + "type": "string", + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { + "description": "The project id of the beacon to delete. If not provided, the project\nthat is making the request is used.\nOptional.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta1/beacons/{beaconsId}" + }, + "deactivate": { + "description": "Deactivates a beacon. Once deactivated, the API will not return\ninformation nor attachment data for the beacon when queried via\n`beaconinfo.getforobserved`. Calling this method on an already inactive\nbeacon will do nothing (but will return a successful response code).\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "httpMethod": "POST", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "beaconName" + ], + "parameters": { + "beaconName": { + "pattern": "^beacons/[^/]+$", + "location": "path", + "description": "Beacon that should be deactivated. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "The project id of the beacon to deactivate. If the project id is not\nspecified then the project making the request is used. The project id must\nmatch the project that owns the beacon.\nOptional.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/beacons/{beaconsId}:deactivate", + "id": "proximitybeacon.beacons.deactivate", + "path": "v1beta1/{+beaconName}:deactivate" + }, + "register": { + "path": "v1beta1/beacons:register", + "id": "proximitybeacon.beacons.register", + "description": "Registers a previously unregistered beacon given its `advertisedId`.\nThese IDs are unique within the system. An ID can be registered only once.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project.", + "request": { + "$ref": "Beacon" + }, + "response": { + "$ref": "Beacon" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "projectId": { + "location": "query", + "description": "The project id of the project the beacon will be registered to. If\nthe project id is not specified then the project making the request\nis used.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/beacons:register" + }, + "list": { + "id": "proximitybeacon.beacons.list", + "path": "v1beta1/beacons", + "description": "Searches the beacon registry for beacons that match the given search\ncriteria. Only those beacons that the client has permission to list\nwill be returned.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project.", + "httpMethod": "GET", + "response": { + "$ref": "ListBeaconsResponse" + }, + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "parameters": { + "pageToken": { + "description": "A pagination token obtained from a previous request to list beacons.", + "type": "string", + "location": "query" + }, + "q": { + "location": "query", + "description": "Filter query string that supports the following field filters:\n\n* **description:`\"\u003cstring\u003e\"`**\n For example: **description:\"Room 3\"**\n Returns beacons whose description matches tokens in the string \"Room 3\"\n (not necessarily that exact string).\n The string must be double-quoted.\n* **status:`\u003cenum\u003e`**\n For example: **status:active**\n Returns beacons whose status matches the given value. Values must be\n one of the Beacon.Status enum values (case insensitive). Accepts\n multiple filters which will be combined with OR logic.\n* **stability:`\u003cenum\u003e`**\n For example: **stability:mobile**\n Returns beacons whose expected stability matches the given value.\n Values must be one of the Beacon.Stability enum values (case\n insensitive). Accepts multiple filters which will be combined with\n OR logic.\n* **place\\_id:`\"\u003cstring\u003e\"`**\n For example: **place\\_id:\"ChIJVSZzVR8FdkgRXGmmm6SslKw=\"**\n Returns beacons explicitly registered at the given place, expressed as\n a Place ID obtained from [Google Places API](/places/place-id). Does not\n match places inside the given place. Does not consider the beacon's\n actual location (which may be different from its registered place).\n Accepts multiple filters that will be combined with OR logic. The place\n ID must be double-quoted.\n* **registration\\_time`[\u003c|\u003e|\u003c=|\u003e=]\u003cinteger\u003e`**\n For example: **registration\\_time\u003e=1433116800**\n Returns beacons whose registration time matches the given filter.\n Supports the operators: \u003c, \u003e, \u003c=, and \u003e=. Timestamp must be expressed as\n an integer number of seconds since midnight January 1, 1970 UTC. Accepts\n at most two filters that will be combined with AND logic, to support\n \"between\" semantics. If more than two are supplied, the latter ones are\n ignored.\n* **lat:`\u003cdouble\u003e lng:\u003cdouble\u003e radius:\u003cinteger\u003e`**\n For example: **lat:51.1232343 lng:-1.093852 radius:1000**\n Returns beacons whose registered location is within the given circle.\n When any of these fields are given, all are required. Latitude and\n longitude must be decimal degrees between -90.0 and 90.0 and between\n -180.0 and 180.0 respectively. Radius must be an integer number of\n meters between 10 and 1,000,000 (1000 km).\n* **property:`\"\u003cstring\u003e=\u003cstring\u003e\"`**\n For example: **property:\"battery-type=CR2032\"**\n Returns beacons which have a property of the given name and value.\n Supports multiple filters which will be combined with OR logic.\n The entire name=value string must be double-quoted as one string.\n* **attachment\\_type:`\"\u003cstring\u003e\"`**\n For example: **attachment_type:\"my-namespace/my-type\"**\n Returns beacons having at least one attachment of the given namespaced\n type. Supports \"any within this namespace\" via the partial wildcard\n syntax: \"my-namespace/*\". Supports multiple filters which will be\n combined with OR logic. The string must be double-quoted.\n* **indoor\\_level:`\"\u003cstring\u003e\"`**\n For example: **indoor\\_level:\"1\"**\n Returns beacons which are located on the given indoor level. Accepts\n multiple filters that will be combined with OR logic.\n\nMultiple filters on the same field are combined with OR logic (except\nregistration_time which is combined with AND logic).\nMultiple filters on different fields are combined with AND logic.\nFilters should be separated by spaces.\n\nAs with any HTTP query string parameter, the whole filter expression must\nbe URL-encoded.\n\nExample REST request:\n`GET /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000`", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of records to return for this request, up to a\nserver-defined upper limit.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "projectId": { + "location": "query", + "description": "The project id to list beacons under. If not present then the project\ncredential that made the request is used as the project.\nOptional.", + "type": "string" + } + }, + "flatPath": "v1beta1/beacons" + }, + "activate": { + "parameterOrder": [ + "beaconName" + ], + "httpMethod": "POST", + "response": { + "$ref": "Empty" + }, + "parameters": { + "beaconName": { + "description": "Beacon that should be activated. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "required": true, + "type": "string", + "pattern": "^beacons/[^/]+$", + "location": "path" + }, + "projectId": { + "description": "The project id of the beacon to activate. If the project id is not\nspecified then the project making the request is used. The project id\nmust match the project that owns the beacon.\nOptional.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/beacons/{beaconsId}:activate", + "path": "v1beta1/{+beaconName}:activate", + "id": "proximitybeacon.beacons.activate", + "description": "Activates a beacon. A beacon that is active will return information\nand attachment data when queried via `beaconinfo.getforobserved`.\nCalling this method on an already active beacon will do nothing (but\nwill return a successful response code).\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **Is owner** or **Can edit** permissions in the\nGoogle Developers Console project." + }, + "get": { + "description": "Returns detailed information about the specified beacon.\n\nAuthenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2)\nfrom a signed-in user with **viewer**, **Is owner** or **Can edit**\npermissions in the Google Developers Console project.\n\nRequests may supply an Eddystone-EID beacon name in the form:\n`beacons/4!beaconId` where the `beaconId` is the base16 ephemeral ID\nbroadcast by the beacon. The returned `Beacon` object will contain the\nbeacon's stable Eddystone-UID. Clients not authorized to resolve the\nbeacon's ephemeral Eddystone-EID broadcast will receive an error.", + "response": { + "$ref": "Beacon" + }, + "parameterOrder": [ + "beaconName" + ], + "httpMethod": "GET", + "parameters": { + "beaconName": { + "pattern": "^beacons/[^/]+$", + "location": "path", + "description": "Resource name of this beacon. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5`\nfor AltBeacon. For Eddystone-EID beacons, you may use either the\ncurrent EID or the beacon's \"stable\" UID.\nRequired.", + "required": true, + "type": "string" + }, + "projectId": { + "description": "The project id of the beacon to request. If the project id is not specified\nthen the project making the request is used. The project id must match the\nproject that owns the beacon.\nOptional.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/userlocation.beacon.registry" + ], + "flatPath": "v1beta1/beacons/{beaconsId}", + "path": "v1beta1/{+beaconName}", + "id": "proximitybeacon.beacons.get" + } + } + } + }, + "parameters": { + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "key": { + "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", + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + } + }, + "schemas": { + "DeleteAttachmentsResponse": { + "description": "Response for a request to delete attachments.", + "type": "object", + "properties": { + "numDeleted": { + "description": "The number of attachments that were deleted.", + "format": "int32", + "type": "integer" } - }, - "parameterOrder": [ - "beaconName" - ], - "response": { - "$ref": "ListBeaconAttachmentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] }, - "delete": { - "id": "proximitybeacon.beacons.attachments.delete", - "path": "v1beta1/{+attachmentName}", - "httpMethod": "DELETE", - "description": "Deletes the specified attachment for the given beacon. Each attachment has a unique attachment name (`attachmentName`) which is returned when you fetch the attachment data via this API. You specify this with the delete request to control which attachment is removed. This operation cannot be undone. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { + "id": "DeleteAttachmentsResponse" + }, + "EphemeralIdRegistrationParams": { + "properties": { + "minRotationPeriodExponent": { + "description": "Indicates the minimum rotation period supported by the service.\nSee EddystoneEidRegistration.rotation_period_exponent", + "format": "uint32", + "type": "integer" + }, + "maxRotationPeriodExponent": { + "description": "Indicates the maximum rotation period supported by the service.\nSee EddystoneEidRegistration.rotation_period_exponent", + "format": "uint32", + "type": "integer" + }, + "serviceEcdhPublicKey": { + "description": "The beacon service's public key for use by a beacon to derive its\nIdentity Key using Elliptic Curve Diffie-Hellman key exchange.", + "format": "byte", + "type": "string" + } + }, + "id": "EphemeralIdRegistrationParams", + "description": "Information a client needs to provision and register beacons that\nbroadcast Eddystone-EID format beacon IDs, using Elliptic curve\nDiffie-Hellman key exchange. See\n[the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub.", + "type": "object" + }, + "Observation": { + "properties": { + "telemetry": { + "description": "The array of telemetry bytes received from the beacon. The server is\nresponsible for parsing it. This field may frequently be empty, as\nwith a beacon that transmits telemetry only occasionally.", + "format": "byte", + "type": "string" + }, + "timestampMs": { + "description": "Time when the beacon was observed.", + "format": "google-datetime", + "type": "string" + }, + "advertisedId": { + "$ref": "AdvertisedId", + "description": "The ID advertised by the beacon the client has encountered.\n\nIf the submitted `advertised_id` type is Eddystone-EID, then the client\nmust be authorized to resolve the given beacon. Otherwise no data will be\nreturned for that beacon.\nRequired." + } + }, + "id": "Observation", + "description": "Represents one beacon observed once.", + "type": "object" + }, + "ListDiagnosticsResponse": { + "properties": { + "diagnostics": { + "description": "The diagnostics matching the given request.", + "type": "array", + "items": { + "$ref": "Diagnostics" + } + }, + "nextPageToken": { + "description": "Token that can be used for pagination. Returned only if the\nrequest matches more beacons than can be returned in this response.", + "type": "string" + } + }, + "id": "ListDiagnosticsResponse", + "description": "Response that contains the requested diagnostics.", + "type": "object" + }, + "GetInfoForObservedBeaconsResponse": { + "properties": { + "beacons": { + "description": "Public information about beacons.\nMay be empty if the request matched no beacons.", + "type": "array", + "items": { + "$ref": "BeaconInfo" + } + } + }, + "id": "GetInfoForObservedBeaconsResponse", + "description": "Information about the requested beacons, optionally including attachment\ndata.", + "type": "object" + }, + "Beacon": { + "properties": { + "provisioningKey": { + "description": "Some beacons may require a user to provide an authorization key before\nchanging any of its configuration (e.g. broadcast frames, transmit power).\nThis field provides a place to store and control access to that key.\nThis field is populated in responses to `GET /v1beta1/beacons/3!beaconId`\nfrom users with write access to the given beacon. That is to say: If the\nuser is authorized to write the beacon's confidential data in the service,\nthe service considers them authorized to configure the beacon. Note\nthat this key grants nothing on the service, only on the beacon itself.", + "format": "byte", + "type": "string" + }, + "ephemeralIdRegistration": { + "description": "Write-only registration parameters for beacons using Eddystone-EID\n(remotely resolved ephemeral ID) format. This information will not be\npopulated in API responses. When submitting this data, the `advertised_id`\nfield must contain an ID of type Eddystone-UID. Any other ID type will\nresult in an error.", + "$ref": "EphemeralIdRegistration" + }, + "latLng": { + "description": "The location of the beacon, expressed as a latitude and longitude pair.\nThis location is given when the beacon is registered or updated. It does\nnot necessarily indicate the actual current location of the beacon.\nOptional.", + "$ref": "LatLng" + }, + "placeId": { + "description": "The [Google Places API](/places/place-id) Place ID of the place where\nthe beacon is deployed. This is given when the beacon is registered or\nupdated, not automatically detected in any way.\nOptional.", + "type": "string" + }, + "description": { + "description": "Free text used to identify and describe the beacon. Maximum length 140\ncharacters.\nOptional.", + "type": "string" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Properties of the beacon device, for example battery type or firmware\nversion.\nOptional.", + "type": "object" + }, + "indoorLevel": { + "description": "The indoor level information for this beacon, if known. As returned by the\nGoogle Maps API.\nOptional.", + "$ref": "IndoorLevel" + }, + "status": { + "enum": [ + "STATUS_UNSPECIFIED", + "ACTIVE", + "DECOMMISSIONED", + "INACTIVE" + ], + "description": "Current status of the beacon.\nRequired.", + "type": "string", + "enumDescriptions": [ + "Do not use this value.", + "The \"normal\" in-use state of a beacon.", + "Beacon should no longer be used for any purpose. This is irreversible.", + "The beacon should not be visible to mobile devices. This is reversible." + ] + }, + "beaconName": { + "description": "Resource name of this beacon. A beacon name has the format\n\"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by\nthe beacon and N is a code for the beacon's type. Possible values are\n`3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon.\n\nThis field must be left empty when registering. After reading a beacon,\nclients can use the name for future operations.", + "type": "string" + }, + "expectedStability": { + "enumDescriptions": [ + "Do not use this value.", + "Not expected to move, for example a store's front door.", + "Usually stable but may move rarely, usually within a single place,\nfor example a store display.", + "Moves frequently, for example a personal item or food truck.", + "Moves continuously in service, for example a bus or train." + ], + "enum": [ + "STABILITY_UNSPECIFIED", + "STABLE", + "PORTABLE", + "MOBILE", + "ROVING" + ], + "description": "Expected location stability. This is set when the beacon is registered or\nupdated, not automatically detected in any way.\nOptional.", + "type": "string" + }, + "advertisedId": { + "$ref": "AdvertisedId", + "description": "The identifier of a beacon as advertised by it. This field must be\npopulated when registering. It may be empty when updating a beacon\nrecord because it is ignored in updates.\n\nWhen registering a beacon that broadcasts Eddystone-EID, this field\nshould contain a \"stable\" Eddystone-UID that identifies the beacon and\nlinks it to its attachments. The stable Eddystone-UID is only used for\nadministering the beacon." + } + }, + "id": "Beacon", + "description": "Details of a beacon device.", + "type": "object" + }, + "AdvertisedId": { + "properties": { + "id": { + "description": "The actual beacon identifier, as broadcast by the beacon hardware. Must be\n[base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP\nrequests, and will be so encoded (with padding) in responses. The base64\nencoding should be of the binary byte-stream and not any textual (such as\nhex) representation thereof.\nRequired.", + "format": "byte", + "type": "string" + }, + "type": { + "enumDescriptions": [ + "Do not use this value.", + "Eddystone, an open beacon format that supports Android and iOS devices\nhttps://github.com/google/eddystone/wiki/Beacon-Specification", + "Apple iBeacon compatible beacon", + "See http://altbeacon.org and/or https://github.com/AltBeacon/spec.", + "Eddystone Ephemeral ID" + ], + "enum": [ + "TYPE_UNSPECIFIED", + "EDDYSTONE", + "IBEACON", + "ALTBEACON", + "EDDYSTONE_EID" + ], + "description": "Specifies the identifier type.\nRequired.", + "type": "string" + } + }, + "id": "AdvertisedId", + "description": "Defines a unique identifier of a beacon as broadcast by the device.", + "type": "object" + }, + "IndoorLevel": { + "description": "Indoor level, a human-readable string as returned by Google Maps APIs,\nuseful to indicate which floor of a building a beacon is located on.", + "type": "object", + "properties": { + "name": { + "description": "The name of this level.", + "type": "string" + } + }, + "id": "IndoorLevel" + }, + "Date": { + "properties": { + "year": { + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "format": "int32", + "type": "integer" + }, + "day": { + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of year. Must be from 1 to 12.", + "format": "int32", + "type": "integer" + } + }, + "id": "Date", + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", + "type": "object" + }, + "ListNamespacesResponse": { + "description": "Response to ListNamespacesRequest that contains all the project's namespaces.", + "type": "object", + "properties": { + "namespaces": { + "description": "The attachments that corresponded to the request params.", + "type": "array", + "items": { + "$ref": "Namespace" + } + } + }, + "id": "ListNamespacesResponse" + }, + "ListBeaconsResponse": { + "description": "Response that contains list beacon results and pagination help.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "An opaque pagination token that the client may provide in their next\nrequest to retrieve the next page of results.", + "type": "string" + }, + "beacons": { + "description": "The beacons that matched the search criteria.", + "type": "array", + "items": { + "$ref": "Beacon" + } + }, + "totalCount": { + "description": "Estimate of the total number of beacons matched by the query. Higher\nvalues may be less accurate.", + "format": "int64", + "type": "string" + } + }, + "id": "ListBeaconsResponse" + }, + "Diagnostics": { + "properties": { + "beaconName": { + "description": "Resource name of the beacon. For Eddystone-EID beacons, this may\nbe the beacon's current EID, or the beacon's \"stable\" Eddystone-UID.", + "type": "string" + }, + "alerts": { + "description": "An unordered list of Alerts that the beacon has.", + "type": "array", + "items": { + "enum": [ + "ALERT_UNSPECIFIED", + "WRONG_LOCATION", + "LOW_BATTERY" + ], + "type": "string" + }, + "enumDescriptions": [ + "Invalid value. Should never appear.", + "The beacon has been reported in a location different than its registered\nlocation. This may indicate that the beacon has been moved. This signal\nis not 100% accurate, but indicates that further investigation is worth\nwhile.", + "The battery level for the beacon is low enough that, given the beacon's\ncurrent use, its battery will run out with in the next 60 days. This\nindicates that the battery should be replaced soon." + ] + }, + "estimatedLowBatteryDate": { + "$ref": "Date", + "description": "The date when the battery is expected to be low. If the value is missing\nthen there is no estimate for when the battery will be low.\nThis value is only an estimate, not an exact date." + } + }, + "id": "Diagnostics", + "description": "Diagnostics for a single beacon.", + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "GetInfoForObservedBeaconsRequest": { + "properties": { + "observations": { + "description": "The beacons that the client has encountered.\nAt least one must be given.", + "type": "array", + "items": { + "$ref": "Observation" + } + }, + "namespacedTypes": { + "description": "Specifies what kind of attachments to include in the response.\nWhen given, the response will include only attachments of the given types.\nWhen empty, no attachments will be returned. Must be in the format\n\u003cvar\u003enamespace/type\u003c/var\u003e. Accepts `*` to specify all types in\nall namespaces owned by the client.\nOptional.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "GetInfoForObservedBeaconsRequest", + "description": "Request for beacon and attachment information about beacons that\na mobile client has encountered \"in the wild\".", + "type": "object" + }, + "BeaconAttachment": { + "description": "Project-specific data associated with a beacon.", + "type": "object", + "properties": { "attachmentName": { - "type": "string", - "description": "The attachment name (`attachmentName`) of the attachment to remove. For example: `beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`. For Eddystone-EID beacons, the beacon ID portion (`3!893737abc9`) may be the beacon's current EID, or its \"stable\" Eddystone-UID. Required.", - "required": true, - "pattern": "^beacons/[^/]*/attachments/[^/]*$", - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The project id of the attachment to delete. If not provided, the project that is making the request is used. Optional.", - "location": "query" - } - }, - "parameterOrder": [ - "attachmentName" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "batchDelete": { - "id": "proximitybeacon.beacons.attachments.batchDelete", - "path": "v1beta1/{+beaconName}/attachments:batchDelete", - "httpMethod": "POST", - "description": "Deletes multiple attachments on a given beacon. This operation is permanent and cannot be undone. You can optionally specify `namespacedType` to choose which attachments should be deleted. If you do not specify `namespacedType`, all your attachments on the given beacon will be deleted. You also may explicitly specify `*/*` to delete all. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "beaconName": { - "type": "string", - "description": "The beacon whose attachments should be deleted. A beacon name has the format \"beacons/N!beaconId\" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's \"stable\" UID. Required.", - "required": true, - "pattern": "^beacons/[^/]*$", - "location": "path" + "description": "Resource name of this attachment. Attachment names have the format:\n\u003ccode\u003ebeacons/\u003cvar\u003ebeacon_id\u003c/var\u003e/attachments/\u003cvar\u003eattachment_id\u003c/var\u003e\u003c/code\u003e.\nLeave this empty on creation.", + "type": "string" }, "namespacedType": { - "type": "string", - "description": "Specifies the namespace and type of attachments to delete in `namespace/type` format. Accepts `*/*` to specify \"all types in all namespaces\". Optional.", - "location": "query" + "description": "Specifies what kind of attachment this is. Tells a client how to\ninterpret the `data` field. Format is \u003cvar\u003enamespace/type\u003c/var\u003e. Namespace\nprovides type separation between clients. Type describes the type of\n`data`, for use by the client when parsing the `data` field.\nRequired.", + "type": "string" }, - "projectId": { - "type": "string", - "description": "The project id to delete beacon attachments under. This field can be used when \"*\" is specified to mean all attachment namespaces. Projects may have multiple attachments with multiple namespaces. If \"*\" is specified and the projectId string is empty, then the project making the request is used. Optional.", - "location": "query" + "data": { + "description": "An opaque data container for client-provided data. Must be\n[base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP\nrequests, and will be so encoded (with padding) in responses.\nRequired.", + "format": "byte", + "type": "string" + }, + "creationTimeMs": { + "description": "The UTC time when this attachment was created, in milliseconds since the\nUNIX epoch.", + "format": "google-datetime", + "type": "string" } - }, - "parameterOrder": [ - "beaconName" - ], - "response": { - "$ref": "DeleteAttachmentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - } - } - }, - "diagnostics": { - "methods": { - "list": { - "id": "proximitybeacon.beacons.diagnostics.list", - "path": "v1beta1/{+beaconName}/diagnostics", - "httpMethod": "GET", - "description": "List the diagnostics for a single beacon. You can also list diagnostics for all the beacons owned by your Google Developers Console project by using the beacon name `beacons/-`. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "beaconName": { - "type": "string", - "description": "Beacon that the diagnostics are for.", - "required": true, - "pattern": "^beacons/[^/]*$", - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Specifies the maximum number of results to return. Defaults to 10. Maximum 1000. Optional.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Requests results that occur after the `page_token`, obtained from the response to a previous request. Optional.", - "location": "query" - }, - "alertFilter": { - "type": "string", - "description": "Requests only beacons that have the given alert. For example, to find beacons that have low batteries use `alert_filter=LOW_BATTERY`.", - "enum": [ - "ALERT_UNSPECIFIED", - "WRONG_LOCATION", - "LOW_BATTERY" - ], - "location": "query" - }, - "projectId": { - "type": "string", - "description": "Requests only diagnostic records for the given project id. If not set, then the project making the request will be used for looking up diagnostic records. Optional.", - "location": "query" - } - }, - "parameterOrder": [ - "beaconName" - ], - "response": { - "$ref": "ListDiagnosticsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - } - } - } - } - }, - "namespaces": { - "methods": { - "list": { - "id": "proximitybeacon.namespaces.list", - "path": "v1beta1/namespaces", - "httpMethod": "GET", - "description": "Lists all attachment namespaces owned by your Google Developers Console project. Attachment data associated with a beacon must include a namespaced type, and the namespace must be owned by your project. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project.", - "parameters": { - "projectId": { - "type": "string", - "description": "The project id to list namespaces under. Optional.", - "location": "query" - } - }, - "response": { - "$ref": "ListNamespacesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - }, - "update": { - "id": "proximitybeacon.namespaces.update", - "path": "v1beta1/{+namespaceName}", - "httpMethod": "PUT", - "description": "Updates the information about the specified namespace. Only the namespace visibility can be updated.", - "parameters": { - "namespaceName": { - "type": "string", - "description": "Resource name of this namespace. Namespaces names have the format: namespaces/namespace.", - "required": true, - "pattern": "^namespaces/[^/]*$", - "location": "path" }, - "projectId": { - "type": "string", - "description": "The project id of the namespace to update. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional.", - "location": "query" + "id": "BeaconAttachment" + }, + "EphemeralIdRegistration": { + "properties": { + "beaconEcdhPublicKey": { + "description": "The beacon's public key used for the Elliptic curve Diffie-Hellman\nkey exchange. When this field is populated, `service_ecdh_public_key`\nmust also be populated, and `beacon_identity_key` must not be.", + "format": "byte", + "type": "string" + }, + "initialClockValue": { + "description": "The initial clock value of the beacon. The beacon's clock must have\nbegun counting at this value immediately prior to transmitting this\nvalue to the resolving service. Significant delay in transmitting this\nvalue to the service risks registration or resolution failures. If a\nvalue is not provided, the default is zero.", + "format": "uint64", + "type": "string" + }, + "rotationPeriodExponent": { + "description": "Indicates the nominal period between each rotation of the beacon's\nephemeral ID. \"Nominal\" because the beacon should randomize the\nactual interval. See [the spec at github](https://github.com/google/eddystone/tree/master/eddystone-eid)\nfor details. This value corresponds to a power-of-two scaler on the\nbeacon's clock: when the scaler value is K, the beacon will begin\nbroadcasting a new ephemeral ID on average every 2^K seconds.", + "format": "uint32", + "type": "integer" + }, + "serviceEcdhPublicKey": { + "description": "The service's public key used for the Elliptic curve Diffie-Hellman\nkey exchange. When this field is populated, `beacon_ecdh_public_key`\nmust also be populated, and `beacon_identity_key` must not be.", + "format": "byte", + "type": "string" + }, + "beaconIdentityKey": { + "description": "The private key of the beacon. If this field is populated,\n`beacon_ecdh_public_key` and `service_ecdh_public_key` must not be\npopulated.", + "format": "byte", + "type": "string" + }, + "initialEid": { + "description": "An initial ephemeral ID calculated using the clock value submitted as\n`initial_clock_value`, and the secret key generated by the\nDiffie-Hellman key exchange using `service_ecdh_public_key` and\n`service_ecdh_public_key`. This initial EID value will be used by the\nservice to confirm that the key exchange process was successful.", + "format": "byte", + "type": "string" + } + }, + "id": "EphemeralIdRegistration", + "description": "Write-only registration parameters for beacons using Eddystone-EID format.\nTwo ways of securely registering an Eddystone-EID beacon with the service\nare supported:\n\n1. Perform an ECDH key exchange via this API, including a previous call\n to `GET /v1beta1/eidparams`. In this case the fields\n `beacon_ecdh_public_key` and `service_ecdh_public_key` should be\n populated and `beacon_identity_key` should not be populated. This\n method ensures that only the two parties in the ECDH key exchange can\n compute the identity key, which becomes a secret between them.\n2. Derive or obtain the beacon's identity key via other secure means\n (perhaps an ECDH key exchange between the beacon and a mobile device\n or any other secure method), and then submit the resulting identity key\n to the service. In this case `beacon_identity_key` field should be\n populated, and neither of `beacon_ecdh_public_key` nor\n `service_ecdh_public_key` fields should be. The security of this method\n depends on how securely the parties involved (in particular the\n bluetooth client) handle the identity key, and obviously on how\n securely the identity key was generated.\n\nSee [the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub.", + "type": "object" + }, + "LatLng": { + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", + "type": "object", + "properties": { + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "type": "number" + }, + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" + } + }, + "id": "LatLng" + }, + "ListBeaconAttachmentsResponse": { + "properties": { + "attachments": { + "description": "The attachments that corresponded to the request params.", + "type": "array", + "items": { + "$ref": "BeaconAttachment" + } + } + }, + "id": "ListBeaconAttachmentsResponse", + "description": "Response to `ListBeaconAttachments` that contains the requested attachments.", + "type": "object" + }, + "Namespace": { + "properties": { + "namespaceName": { + "description": "Resource name of this namespace. Namespaces names have the format:\n\u003ccode\u003enamespaces/\u003cvar\u003enamespace\u003c/var\u003e\u003c/code\u003e.", + "type": "string" + }, + "servingVisibility": { + "enumDescriptions": [ + "Do not use this value.", + "Served only to the project that owns the namespace.", + "Any project can subscribe to attachments under the namespace." + ], + "enum": [ + "VISIBILITY_UNSPECIFIED", + "UNLISTED", + "PUBLIC" + ], + "description": "Specifies what clients may receive attachments under this namespace\nvia `beaconinfo.getforobserved`.", + "type": "string" + } + }, + "id": "Namespace", + "description": "An attachment namespace defines read and write access for all the attachments\ncreated under it. Each namespace is globally unique, and owned by one\nproject which is the only project that can create attachments under it.", + "type": "object" + }, + "AttachmentInfo": { + "properties": { + "data": { + "description": "An opaque data container for client-provided data.", + "format": "byte", + "type": "string" + }, + "namespacedType": { + "description": "Specifies what kind of attachment this is. Tells a client how to\ninterpret the `data` field. Format is \u003cvar\u003enamespace/type\u003c/var\u003e, for\nexample \u003ccode\u003escrupulous-wombat-12345/welcome-message\u003c/code\u003e", + "type": "string" + } + }, + "id": "AttachmentInfo", + "description": "A subset of attachment information served via the\n`beaconinfo.getforobserved` method, used when your users encounter your\nbeacons.", + "type": "object" + }, + "BeaconInfo": { + "properties": { + "beaconName": { + "description": "The name under which the beacon is registered.", + "type": "string" + }, + "advertisedId": { + "$ref": "AdvertisedId", + "description": "The ID advertised by the beacon." + }, + "attachments": { + "description": "Attachments matching the type(s) requested.\nMay be empty if no attachment types were requested.", + "type": "array", + "items": { + "$ref": "AttachmentInfo" + } + } + }, + "id": "BeaconInfo", + "description": "A subset of beacon information served via the `beaconinfo.getforobserved`\nmethod, which you call when users of your app encounter your beacons.", + "type": "object" + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "version": "v1beta1", + "baseUrl": "https://proximitybeacon.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/userlocation.beacon.registry": { + "description": "View and modify your beacons" + } } - }, - "parameterOrder": [ - "namespaceName" - ], - "request": { - "$ref": "Namespace" - }, - "response": { - "$ref": "Namespace" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] } - } }, - "v1beta1": { - "methods": { - "getEidparams": { - "id": "proximitybeacon.getEidparams", - "path": "v1beta1/eidparams", - "httpMethod": "GET", - "description": "Gets the Proximity Beacon API's current public key and associated parameters used to initiate the Diffie-Hellman key exchange required to register a beacon that broadcasts the Eddystone-EID format. This key changes periodically; clients may cache it and re-use the same public key to provision and register multiple beacons. However, clients should be prepared to refresh this key when they encounter an error registering an Eddystone-EID beacon.", - "response": { - "$ref": "EphemeralIdRegistrationParams" - }, - "scopes": [ - "https://www.googleapis.com/auth/userlocation.beacon.registry" - ] - } - } - }, - "beaconinfo": { - "methods": { - "getforobserved": { - "id": "proximitybeacon.beaconinfo.getforobserved", - "path": "v1beta1/beaconinfo:getforobserved", - "httpMethod": "POST", - "description": "Given one or more beacon observations, returns any beacon information and attachments accessible to your application. Authorize by using the [API key](https://developers.google.com/beacons/proximity/how-tos/authorizing#APIKey) for the application.", - "request": { - "$ref": "GetInfoForObservedBeaconsRequest" - }, - "response": { - "$ref": "GetInfoForObservedBeaconsResponse" - } - } - } - } - } + "servicePath": "", + "description": "Registers, manages, indexes, and searches beacons.", + "kind": "discovery#restDescription" } diff --git a/etc/api/pubsub/v1/pubsub-api.json b/etc/api/pubsub/v1/pubsub-api.json index e4c7b90d49..e77d2b8149 100644 --- a/etc/api/pubsub/v1/pubsub-api.json +++ b/etc/api/pubsub/v1/pubsub-api.json @@ -1,1018 +1,798 @@ { + "rootUrl": "https://pubsub.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "pubsub", + "batchPath": "batch", + "revision": "20170502", + "documentationLink": "https://cloud.google.com/pubsub/docs", "id": "pubsub:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/pubsub": { - "description": "View and manage Pub/Sub topics and subscriptions" - } - } - } - }, - "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n", - "protocol": "rest", "title": "Google Cloud Pub/Sub API", + "discoveryVersion": "v1", + "ownerName": "Google", "resources": { "projects": { "resources": { "subscriptions": { "methods": { - "modifyPushConfig": { - "id": "pubsub.projects.subscriptions.modifyPushConfig", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Modifies the `PushConfig` for a specified subscription.\n\nThis may be used to change a push subscription to a pull one (signified by\nan empty `PushConfig`) or vice versa, or change the endpoint URL and other\nattributes of a push subscription. Messages will accumulate for delivery\ncontinuously through the call regardless of changes to the `PushConfig`.", - "request": { - "$ref": "ModifyPushConfigRequest" - }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig", - "httpMethod": "POST", - "parameters": { - "subscription": { - "description": "The name of the subscription.\nFormat is `projects/{project}/subscriptions/{sub}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+subscription}:modifyPushConfig", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "getIamPolicy": { - "id": "pubsub.projects.subscriptions.getIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", - "httpMethod": "GET", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "pull": { - "id": "pubsub.projects.subscriptions.pull", - "response": { - "$ref": "PullResponse" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The server may return `UNAVAILABLE` if\nthere are too many concurrent pull requests pending for the given\nsubscription.", - "request": { - "$ref": "PullRequest" - }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", - "httpMethod": "POST", - "parameters": { - "subscription": { - "description": "The subscription from which messages should be pulled.\nFormat is `projects/{project}/subscriptions/{sub}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+subscription}:pull", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, "list": { - "id": "pubsub.projects.subscriptions.list", + "httpMethod": "GET", "response": { "$ref": "ListSubscriptionsResponse" }, "parameterOrder": [ "project" ], - "description": "Lists matching subscriptions.", - "flatPath": "v1/projects/{projectsId}/subscriptions", - "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], "parameters": { - "pageSize": { - "description": "Maximum number of subscriptions to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, "project": { "description": "The name of the cloud project that subscriptions belong to.\nFormat is `projects/{project}`.", "required": true, + "type": "string", "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" + "location": "path" }, "pageToken": { - "description": "The value returned by the last `ListSubscriptionsResponse`; indicates that\nthis is a continuation of a prior `ListSubscriptions` call, and that the\nsystem should return the next page of data.", "location": "query", + "description": "The value returned by the last `ListSubscriptionsResponse`; indicates that\nthis is a continuation of a prior `ListSubscriptions` call, and that the\nsystem should return the next page of data.", "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Maximum number of subscriptions to return.", + "format": "int32", + "type": "integer" } }, + "flatPath": "v1/projects/{projectsId}/subscriptions", + "id": "pubsub.projects.subscriptions.list", "path": "v1/{+project}/subscriptions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] + "description": "Lists matching subscriptions." }, - "get": { - "id": "pubsub.projects.subscriptions.get", + "setIamPolicy": { "response": { - "$ref": "Subscription" + "$ref": "Policy" }, "parameterOrder": [ - "subscription" + "resource" ], - "description": "Gets the configuration details of a subscription.", - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", - "httpMethod": "GET", - "parameters": { - "subscription": { - "description": "The name of the subscription to get.\nFormat is `projects/{project}/subscriptions/{sub}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+subscription}", + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" - ] + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "pubsub.projects.subscriptions.setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + } }, "create": { + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", + "path": "v1/{+name}", "id": "pubsub.projects.subscriptions.create", + "description": "Creates a subscription to a given topic.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Subscription object.\nNote that for REST API requests, you must specify a name in the request.", + "request": { + "$ref": "Subscription" + }, "response": { "$ref": "Subscription" }, "parameterOrder": [ "name" ], - "description": "Creates a subscription to a given topic.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Subscription object.\nNote that for REST API requests, you must specify a name in the request.", - "request": { - "$ref": "Subscription" - }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], "parameters": { "name": { "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`.", "required": true, + "type": "string", "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" + "location": "path" } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] + } }, "modifyAckDeadline": { - "id": "pubsub.projects.subscriptions.modifyAckDeadline", "response": { "$ref": "Empty" }, "parameterOrder": [ "subscription" ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "The name of the subscription.\nFormat is `projects/{project}/subscriptions/{sub}`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", + "path": "v1/{+subscription}:modifyAckDeadline", + "id": "pubsub.projects.subscriptions.modifyAckDeadline", "description": "Modifies the ack deadline for a specific message. This method is useful\nto indicate that more time is needed to process a message by the\nsubscriber, or to make the message available for redelivery if the\nprocessing was interrupted. Note that this does not modify the\nsubscription-level `ackDeadlineSeconds` used for subsequent messages.", "request": { "$ref": "ModifyAckDeadlineRequest" - }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", - "httpMethod": "POST", - "parameters": { - "subscription": { - "description": "The name of the subscription.\nFormat is `projects/{project}/subscriptions/{sub}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+subscription}:modifyAckDeadline", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "setIamPolicy": { - "id": "pubsub.projects.subscriptions.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "delete": { - "id": "pubsub.projects.subscriptions.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Deletes an existing subscription. All messages retained in the subscription\nare immediately dropped. Calls to `Pull` after deletion will return\n`NOT_FOUND`. After a subscription is deleted, a new one may be created with\nthe same name, but the new one has no association with the old\nsubscription or its topic unless the same topic is specified.", - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", - "httpMethod": "DELETE", - "parameters": { - "subscription": { - "description": "The subscription to delete.\nFormat is `projects/{project}/subscriptions/{sub}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+subscription}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "testIamPermissions": { - "id": "pubsub.projects.subscriptions.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] + } }, "acknowledge": { - "id": "pubsub.projects.subscriptions.acknowledge", - "response": { - "$ref": "Empty" - }, + "httpMethod": "POST", "parameterOrder": [ "subscription" ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "The subscription whose message is being acknowledged.\nFormat is `projects/{project}/subscriptions/{sub}`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:acknowledge", + "id": "pubsub.projects.subscriptions.acknowledge", + "path": "v1/{+subscription}:acknowledge", "description": "Acknowledges the messages associated with the `ack_ids` in the\n`AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages\nfrom the subscription.\n\nAcknowledging a message whose ack deadline has expired may succeed,\nbut such a message may be redelivered later. Acknowledging a message more\nthan once will not result in an error.", "request": { "$ref": "AcknowledgeRequest" + } + }, + "getIamPolicy": { + "httpMethod": "GET", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" }, - "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:acknowledge", - "httpMethod": "POST", "parameters": { - "subscription": { - "description": "The subscription whose message is being acknowledged.\nFormat is `projects/{project}/subscriptions/{sub}`.", - "required": true, + "resource": { "pattern": "^projects/[^/]+/subscriptions/[^/]+$", "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, "type": "string" } }, - "path": "v1/{+subscription}:acknowledge", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" - ] + ], + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", + "id": "pubsub.projects.subscriptions.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset." + }, + "get": { + "description": "Gets the configuration details of a subscription.", + "parameterOrder": [ + "subscription" + ], + "httpMethod": "GET", + "response": { + "$ref": "Subscription" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "The name of the subscription to get.\nFormat is `projects/{project}/subscriptions/{sub}`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", + "path": "v1/{+subscription}", + "id": "pubsub.projects.subscriptions.get" + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", + "id": "pubsub.projects.subscriptions.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + } + }, + "modifyPushConfig": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "POST", + "parameters": { + "subscription": { + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "The name of the subscription.\nFormat is `projects/{project}/subscriptions/{sub}`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig", + "path": "v1/{+subscription}:modifyPushConfig", + "id": "pubsub.projects.subscriptions.modifyPushConfig", + "request": { + "$ref": "ModifyPushConfigRequest" + }, + "description": "Modifies the `PushConfig` for a specified subscription.\n\nThis may be used to change a push subscription to a pull one (signified by\nan empty `PushConfig`) or vice versa, or change the endpoint URL and other\nattributes of a push subscription. Messages will accumulate for delivery\ncontinuously through the call regardless of changes to the `PushConfig`." + }, + "pull": { + "request": { + "$ref": "PullRequest" + }, + "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The server may return `UNAVAILABLE` if\nthere are too many concurrent pull requests pending for the given\nsubscription.", + "response": { + "$ref": "PullResponse" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "POST", + "parameters": { + "subscription": { + "location": "path", + "description": "The subscription from which messages should be pulled.\nFormat is `projects/{project}/subscriptions/{sub}`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", + "path": "v1/{+subscription}:pull", + "id": "pubsub.projects.subscriptions.pull" + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "subscription" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "subscription": { + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path", + "description": "The subscription to delete.\nFormat is `projects/{project}/subscriptions/{sub}`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", + "id": "pubsub.projects.subscriptions.delete", + "path": "v1/{+subscription}", + "description": "Deletes an existing subscription. All messages retained in the subscription\nare immediately dropped. Calls to `Pull` after deletion will return\n`NOT_FOUND`. After a subscription is deleted, a new one may be created with\nthe same name, but the new one has no association with the old\nsubscription or its topic unless the same topic is specified." + } + } + }, + "snapshots": { + "methods": { + "setIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/snapshots/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:setIamPolicy", + "id": "pubsub.projects.snapshots.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy." + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/snapshots/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:testIamPermissions", + "id": "pubsub.projects.snapshots.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + } + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/snapshots/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "id": "pubsub.projects.snapshots.getIamPolicy" } } }, "topics": { - "resources": { - "subscriptions": { - "methods": { - "list": { - "id": "pubsub.projects.topics.subscriptions.list", - "response": { - "$ref": "ListTopicSubscriptionsResponse" - }, - "parameterOrder": [ - "topic" - ], - "description": "Lists the name of the subscriptions for this topic.", - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}/subscriptions", - "httpMethod": "GET", - "parameters": { - "topic": { - "description": "The name of the topic that subscriptions are attached to.\nFormat is `projects/{project}/topics/{topic}`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - }, - "pageSize": { - "description": "Maximum number of subscription names to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "pageToken": { - "description": "The value returned by the last `ListTopicSubscriptionsResponse`; indicates\nthat this is a continuation of a prior `ListTopicSubscriptions` call, and\nthat the system should return the next page of data.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+topic}/subscriptions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - } - } - } - }, "methods": { + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "topic" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "topic": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path", + "description": "Name of the topic to delete.\nFormat is `projects/{project}/topics/{topic}`." + } + }, + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", + "id": "pubsub.projects.topics.delete", + "path": "v1/{+topic}", + "description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic\ndoes not exist. After a topic is deleted, a new topic may be created with\nthe same name; this is an entirely new topic with none of the old\nconfiguration or subscriptions. Existing subscriptions to this topic are\nnot deleted, but their `topic` field is set to `_deleted-topic_`." + }, + "list": { + "path": "v1/{+project}/topics", + "id": "pubsub.projects.topics.list", + "description": "Lists matching topics.", + "parameterOrder": [ + "project" + ], + "httpMethod": "GET", + "response": { + "$ref": "ListTopicsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListTopicsResponse`; indicates that this is\na continuation of a prior `ListTopics` call, and that the system should\nreturn the next page of data.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of topics to return.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "project": { + "location": "path", + "description": "The name of the cloud project that topics belong to.\nFormat is `projects/{project}`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/topics" + }, + "setIamPolicy": { + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:setIamPolicy", + "id": "pubsub.projects.topics.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy" + }, + "create": { + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", + "id": "pubsub.projects.topics.create", + "path": "v1/{+name}", + "request": { + "$ref": "Topic" + }, + "description": "Creates the given topic with the given name.", + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Topic" + }, + "parameters": { + "name": { + "location": "path", + "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + }, "getIamPolicy": { + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:getIamPolicy", "id": "pubsub.projects.topics.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "httpMethod": "GET", "response": { "$ref": "Policy" }, "parameterOrder": [ "resource" ], - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:getIamPolicy", - "httpMethod": "GET", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" - ] + ], + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string" + } + } + }, + "get": { + "parameters": { + "topic": { + "description": "The name of the topic to get.\nFormat is `projects/{project}/topics/{topic}`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", + "path": "v1/{+topic}", + "id": "pubsub.projects.topics.get", + "description": "Gets the configuration of a topic.", + "response": { + "$ref": "Topic" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "GET" }, "publish": { - "id": "pubsub.projects.topics.publish", "response": { "$ref": "PublishResponse" }, "parameterOrder": [ "topic" ], - "description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic\ndoes not exist. The message payload must not be empty; it must contain\n either a non-empty data field, or at least one attribute.", - "request": { - "$ref": "PublishRequest" - }, - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:publish", "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], "parameters": { "topic": { "description": "The messages in the request will be published on this topic.\nFormat is `projects/{project}/topics/{topic}`.", "required": true, + "type": "string", "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" + "location": "path" } }, + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:publish", "path": "v1/{+topic}:publish", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "list": { - "id": "pubsub.projects.topics.list", - "response": { - "$ref": "ListTopicsResponse" - }, - "parameterOrder": [ - "project" - ], - "description": "Lists matching topics.", - "flatPath": "v1/projects/{projectsId}/topics", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Maximum number of topics to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "project": { - "description": "The name of the cloud project that topics belong to.\nFormat is `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "The value returned by the last `ListTopicsResponse`; indicates that this is\na continuation of a prior `ListTopics` call, and that the system should\nreturn the next page of data.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+project}/topics", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "get": { - "id": "pubsub.projects.topics.get", - "response": { - "$ref": "Topic" - }, - "parameterOrder": [ - "topic" - ], - "description": "Gets the configuration of a topic.", - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", - "httpMethod": "GET", - "parameters": { - "topic": { - "description": "The name of the topic to get.\nFormat is `projects/{project}/topics/{topic}`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+topic}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "create": { - "id": "pubsub.projects.topics.create", - "response": { - "$ref": "Topic" - }, - "parameterOrder": [ - "name" - ], - "description": "Creates the given topic with the given name.", + "id": "pubsub.projects.topics.publish", + "description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic\ndoes not exist. The message payload must not be empty; it must contain\n either a non-empty data field, or at least one attribute.", "request": { - "$ref": "Topic" - }, - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] + "$ref": "PublishRequest" + } }, - "setIamPolicy": { - "id": "pubsub.projects.topics.setIamPolicy", - "response": { - "$ref": "Policy" - }, + "testIamPermissions": { + "httpMethod": "POST", "parameterOrder": [ "resource" ], - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "delete": { - "id": "pubsub.projects.topics.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "topic" - ], - "description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic\ndoes not exist. After a topic is deleted, a new topic may be created with\nthe same name; this is an entirely new topic with none of the old\nconfiguration or subscriptions. Existing subscriptions to this topic are\nnot deleted, but their `topic` field is set to `_deleted-topic_`.", - "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", - "httpMethod": "DELETE", - "parameters": { - "topic": { - "description": "Name of the topic to delete.\nFormat is `projects/{project}/topics/{topic}`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+topic}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "testIamPermissions": { - "id": "pubsub.projects.topics.testIamPermissions", "response": { "$ref": "TestIamPermissionsResponse" }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.", - "request": { - "$ref": "TestIamPermissionsRequest" + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string" + } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], "flatPath": "v1/projects/{projectsId}/topics/{topicsId}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, + "id": "pubsub.projects.topics.testIamPermissions", "path": "v1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - } - } - }, - "snapshots": { - "methods": { - "testIamPermissions": { - "id": "pubsub.projects.snapshots.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.", "request": { "$ref": "TestIamPermissionsRequest" }, - "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/snapshots/[^/]+$", - "location": "path", - "type": "string" + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning." + } + }, + "resources": { + "subscriptions": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListTopicSubscriptionsResponse" + }, + "parameterOrder": [ + "topic" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "pageSize": { + "type": "integer", + "location": "query", + "description": "Maximum number of subscription names to return.", + "format": "int32" + }, + "topic": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path", + "description": "The name of the topic that subscriptions are attached to.\nFormat is `projects/{project}/topics/{topic}`." + }, + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListTopicSubscriptionsResponse`; indicates\nthat this is a continuation of a prior `ListTopicSubscriptions` call, and\nthat the system should return the next page of data.", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/topics/{topicsId}/subscriptions", + "id": "pubsub.projects.topics.subscriptions.list", + "path": "v1/{+topic}/subscriptions", + "description": "Lists the name of the subscriptions for this topic." } - }, - "path": "v1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "setIamPolicy": { - "id": "pubsub.projects.snapshots.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/snapshots/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "getIamPolicy": { - "id": "pubsub.projects.snapshots.getIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:getIamPolicy", - "httpMethod": "GET", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/snapshots/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] + } } } } } } }, + "parameters": { + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "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", + "location": "query" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + } + }, "schemas": { - "Topic": { - "description": "A topic resource.", - "type": "object", - "properties": { - "name": { - "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", - "type": "string" - } - }, - "id": "Topic" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "policy": { - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", - "$ref": "Policy" - } - }, - "id": "SetIamPolicyRequest" - }, - "ReceivedMessage": { - "description": "A message and its corresponding acknowledgment ID.", - "type": "object", - "properties": { - "ackId": { - "description": "This ID can be used to acknowledge the received message.", - "type": "string" - }, - "message": { - "description": "The message.", - "$ref": "PubsubMessage" - } - }, - "id": "ReceivedMessage" - }, - "PublishRequest": { - "description": "Request for the Publish method.", - "type": "object", - "properties": { - "messages": { - "description": "The messages to publish.", - "type": "array", - "items": { - "$ref": "PubsubMessage" - } - } - }, - "id": "PublishRequest" - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "TestIamPermissionsResponse" - }, - "PublishResponse": { - "description": "Response for the `Publish` method.", - "type": "object", - "properties": { - "messageIds": { - "description": "The server-assigned ID of each published message, in the same order as\nthe messages in the request. IDs are guaranteed to be unique within\nthe topic.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "PublishResponse" - }, - "ListSubscriptionsResponse": { - "description": "Response for the `ListSubscriptions` method.", - "type": "object", - "properties": { - "subscriptions": { - "description": "The subscriptions that match the request.", - "type": "array", - "items": { - "$ref": "Subscription" - } - }, - "nextPageToken": { - "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListSubscriptionsRequest` to get more subscriptions.", - "type": "string" - } - }, - "id": "ListSubscriptionsResponse" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "bindings": { - "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", - "type": "array", - "items": { - "$ref": "Binding" - } - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string", - "format": "byte" - }, - "version": { - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer", - "format": "int32" - } - }, - "id": "Policy" - }, - "ListTopicSubscriptionsResponse": { - "description": "Response for the `ListTopicSubscriptions` method.", - "type": "object", - "properties": { - "subscriptions": { - "description": "The names of the subscriptions that match the request.", - "type": "array", - "items": { - "type": "string" - } - }, - "nextPageToken": { - "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListTopicSubscriptionsRequest` to get more subscriptions.", - "type": "string" - } - }, - "id": "ListTopicSubscriptionsResponse" - }, - "Subscription": { - "description": "A subscription resource.", - "type": "object", - "properties": { - "pushConfig": { - "description": "If push delivery is used with this subscription, this field is\nused to configure it. An empty `pushConfig` signifies that the subscriber\nwill pull and ack messages using API methods.", - "$ref": "PushConfig" - }, - "topic": { - "description": "The name of the topic from which this subscription is receiving messages.\nFormat is `projects/{project}/topics/{topic}`.\nThe value of this field will be `_deleted-topic_` if the topic has been\ndeleted.", - "type": "string" - }, - "ackDeadlineSeconds": { - "description": "This value is the maximum time after a subscriber receives a message\nbefore the subscriber should acknowledge the message. After message\ndelivery but before the ack deadline expires and before the message is\nacknowledged, it is an outstanding message and will not be delivered\nagain during that time (on a best-effort basis).\n\nFor pull subscriptions, this value is used as the initial value for the ack\ndeadline. To override this value for a given message, call\n`ModifyAckDeadline` with the corresponding `ack_id` if using\npull.\nThe minimum custom deadline you can specify is 10 seconds.\nThe maximum custom deadline you can specify is 600 seconds (10 minutes).\nIf this parameter is 0, a default value of 10 seconds is used.\n\nFor push delivery, this value is also used to set the request timeout for\nthe call to the push endpoint.\n\nIf the subscriber never acknowledges the message, the Pub/Sub\nsystem will eventually redeliver the message.", - "type": "integer", - "format": "int32" - }, - "name": { - "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`.", - "type": "string" - } - }, - "id": "Subscription" - }, - "ModifyAckDeadlineRequest": { - "description": "Request for the ModifyAckDeadline method.", - "type": "object", - "properties": { - "ackDeadlineSeconds": { - "description": "The new ack deadline with respect to the time this request was sent to\nthe Pub/Sub system. Must be \u003e= 0. For example, if the value is 10, the new\nack deadline will expire 10 seconds after the `ModifyAckDeadline` call\nwas made. Specifying zero may immediately make the message available for\nanother pull request.", - "type": "integer", - "format": "int32" - }, - "ackIds": { - "description": "List of acknowledgment IDs.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "ModifyAckDeadlineRequest" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "TestIamPermissionsRequest" - }, - "PushConfig": { - "description": "Configuration for a push delivery endpoint.", - "type": "object", - "properties": { - "attributes": { - "description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the push message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the envelope (i.e. its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub\nAPI.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "pushEndpoint": { - "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\".", - "type": "string" - } - }, - "id": "PushConfig" - }, - "PullRequest": { - "description": "Request for the `Pull` method.", - "type": "object", - "properties": { - "returnImmediately": { - "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the `Pull` response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning no messages. The client may cancel the request if it does\nnot wish to wait any longer for the response.", - "type": "boolean" - }, - "maxMessages": { - "description": "The maximum number of messages returned for this request. The Pub/Sub\nsystem may return fewer than the number specified.", - "type": "integer", - "format": "int32" - } - }, - "id": "PullRequest" - }, - "ModifyPushConfigRequest": { - "description": "Request for the ModifyPushConfig method.", - "type": "object", - "properties": { - "pushConfig": { - "description": "The push configuration for future deliveries.\n\nAn empty `pushConfig` indicates that the Pub/Sub system should\nstop pushing messages from the given subscription and allow\nmessages to be pulled and acknowledged - effectively pausing\nthe subscription if `Pull` is not called.", - "$ref": "PushConfig" - } - }, - "id": "ModifyPushConfigRequest" - }, - "PullResponse": { - "description": "Response for the `Pull` method.", - "type": "object", - "properties": { - "receivedMessages": { - "description": "Received Pub/Sub messages. The Pub/Sub system will return zero messages if\nthere are no more available in the backlog. The Pub/Sub system may return\nfewer than the `maxMessages` requested even if there are more messages\navailable in the backlog.", - "type": "array", - "items": { - "$ref": "ReceivedMessage" - } - } - }, - "id": "PullResponse" - }, - "PubsubMessage": { - "description": "A message data and its attributes. The message payload must not be empty;\nit must contain either a non-empty data field, or at least one attribute.", - "type": "object", - "properties": { - "data": { - "description": "The message payload.", - "type": "string", - "format": "byte" - }, - "attributes": { - "description": "Optional attributes for this message.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "messageId": { - "description": "ID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic. This value may be read by a\nsubscriber that receives a `PubsubMessage` via a `Pull` call or a push\ndelivery. It must not be populated by the publisher in a `Publish` call.", - "type": "string" - }, - "publishTime": { - "description": "The time at which the message was published, populated by the server when\nit receives the `Publish` call. It must not be populated by the\npublisher in a `Publish` call.", - "type": "string", - "format": "google-datetime" - } - }, - "id": "PubsubMessage" - }, - "AcknowledgeRequest": { - "description": "Request for the Acknowledge method.", - "type": "object", - "properties": { - "ackIds": { - "description": "The acknowledgment ID for the messages being acknowledged that was returned\nby the Pub/Sub system in the `Pull` response. Must not be empty.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "AcknowledgeRequest" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, "ListTopicsResponse": { "description": "Response for the `ListTopics` method.", "type": "object", @@ -1031,128 +811,349 @@ }, "id": "ListTopicsResponse" }, - "Binding": { - "description": "Associates `members` with a `role`.", + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "AcknowledgeRequest": { + "properties": { + "ackIds": { + "description": "The acknowledgment ID for the messages being acknowledged that was returned\nby the Pub/Sub system in the `Pull` response. Must not be empty.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "AcknowledgeRequest", + "description": "Request for the Acknowledge method.", + "type": "object" + }, + "ListTopicSubscriptionsResponse": { + "id": "ListTopicSubscriptionsResponse", + "description": "Response for the `ListTopicSubscriptions` method.", "type": "object", "properties": { + "nextPageToken": { + "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListTopicSubscriptionsRequest` to get more subscriptions.", + "type": "string" + }, + "subscriptions": { + "description": "The names of the subscriptions that match the request.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "PullResponse": { + "type": "object", + "properties": { + "receivedMessages": { + "description": "Received Pub/Sub messages. The Pub/Sub system will return zero messages if\nthere are no more available in the backlog. The Pub/Sub system may return\nfewer than the `maxMessages` requested even if there are more messages\navailable in the backlog.", + "type": "array", + "items": { + "$ref": "ReceivedMessage" + } + } + }, + "id": "PullResponse", + "description": "Response for the `Pull` method." + }, + "ReceivedMessage": { + "description": "A message and its corresponding acknowledgment ID.", + "type": "object", + "properties": { + "ackId": { + "description": "This ID can be used to acknowledge the received message.", + "type": "string" + }, + "message": { + "description": "The message.", + "$ref": "PubsubMessage" + } + }, + "id": "ReceivedMessage" + }, + "PushConfig": { + "description": "Configuration for a push delivery endpoint.", + "type": "object", + "properties": { + "pushEndpoint": { + "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\".", + "type": "string" + }, + "attributes": { + "description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the pushed message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the pushed message (i.e., its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub API.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "id": "PushConfig" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsResponse" + }, + "PullRequest": { + "description": "Request for the `Pull` method.", + "type": "object", + "properties": { + "maxMessages": { + "description": "The maximum number of messages returned for this request. The Pub/Sub\nsystem may return fewer than the number specified.", + "format": "int32", + "type": "integer" + }, + "returnImmediately": { + "description": "If this field set to true, the system will respond immediately even if\nit there are no messages available to return in the `Pull` response.\nOtherwise, the system may wait (for a bounded amount of time) until at\nleast one message is available, rather than returning no messages. The\nclient may cancel the request if it does not wish to wait any longer for\nthe response.", + "type": "boolean" + } + }, + "id": "PullRequest" + }, + "ListSubscriptionsResponse": { + "id": "ListSubscriptionsResponse", + "description": "Response for the `ListSubscriptions` method.", + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListSubscriptionsRequest` to get more subscriptions." + }, + "subscriptions": { + "description": "The subscriptions that match the request.", + "type": "array", + "items": { + "$ref": "Subscription" + } + } + } + }, + "PublishRequest": { + "description": "Request for the Publish method.", + "type": "object", + "properties": { + "messages": { + "description": "The messages to publish.", + "type": "array", + "items": { + "$ref": "PubsubMessage" + } + } + }, + "id": "PublishRequest" + }, + "PublishResponse": { + "properties": { + "messageIds": { + "description": "The server-assigned ID of each published message, in the same order as\nthe messages in the request. IDs are guaranteed to be unique within\nthe topic.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "PublishResponse", + "description": "Response for the `Publish` method.", + "type": "object" + }, + "Subscription": { + "description": "A subscription resource.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`." + }, + "topic": { + "description": "The name of the topic from which this subscription is receiving messages.\nFormat is `projects/{project}/topics/{topic}`.\nThe value of this field will be `_deleted-topic_` if the topic has been\ndeleted.", + "type": "string" + }, + "pushConfig": { + "$ref": "PushConfig", + "description": "If push delivery is used with this subscription, this field is\nused to configure it. An empty `pushConfig` signifies that the subscriber\nwill pull and ack messages using API methods." + }, + "ackDeadlineSeconds": { + "description": "This value is the maximum time after a subscriber receives a message\nbefore the subscriber should acknowledge the message. After message\ndelivery but before the ack deadline expires and before the message is\nacknowledged, it is an outstanding message and will not be delivered\nagain during that time (on a best-effort basis).\n\nFor pull subscriptions, this value is used as the initial value for the ack\ndeadline. To override this value for a given message, call\n`ModifyAckDeadline` with the corresponding `ack_id` if using\npull.\nThe minimum custom deadline you can specify is 10 seconds.\nThe maximum custom deadline you can specify is 600 seconds (10 minutes).\nIf this parameter is 0, a default value of 10 seconds is used.\n\nFor push delivery, this value is also used to set the request timeout for\nthe call to the push endpoint.\n\nIf the subscriber never acknowledges the message, the Pub/Sub\nsystem will eventually redeliver the message.", + "format": "int32", + "type": "integer" + } + }, + "id": "Subscription" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsRequest" + }, + "Topic": { + "type": "object", + "properties": { + "name": { + "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", + "type": "string" + } + }, + "id": "Topic", + "description": "A topic resource." + }, + "Policy": { + "type": "object", + "properties": { + "bindings": { + "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", + "type": "array", + "items": { + "$ref": "Binding" + } + }, + "etag": { + "type": "string", + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "format": "byte" + }, + "version": { + "description": "Version of the `Policy`. The default version is 0.", + "format": "int32", + "type": "integer" + } + }, + "id": "Policy", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam)." + }, + "ModifyAckDeadlineRequest": { + "description": "Request for the ModifyAckDeadline method.", + "type": "object", + "properties": { + "ackDeadlineSeconds": { + "type": "integer", + "description": "The new ack deadline with respect to the time this request was sent to\nthe Pub/Sub system. For example, if the value is 10, the new\nack deadline will expire 10 seconds after the `ModifyAckDeadline` call\nwas made. Specifying zero may immediately make the message available for\nanother pull request.\nThe minimum deadline you can specify is 0 seconds.\nThe maximum deadline you can specify is 600 seconds (10 minutes).", + "format": "int32" + }, + "ackIds": { + "description": "List of acknowledgment IDs.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ModifyAckDeadlineRequest" + }, + "SetIamPolicyRequest": { + "type": "object", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + } + }, + "id": "SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method." + }, + "PubsubMessage": { + "properties": { + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional attributes for this message.", + "type": "object" + }, + "messageId": { + "description": "ID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic. This value may be read by a\nsubscriber that receives a `PubsubMessage` via a `Pull` call or a push\ndelivery. It must not be populated by the publisher in a `Publish` call.", + "type": "string" + }, + "publishTime": { + "description": "The time at which the message was published, populated by the server when\nit receives the `Publish` call. It must not be populated by the\npublisher in a `Publish` call.", + "format": "google-datetime", + "type": "string" + }, + "data": { + "description": "The message payload.", + "format": "byte", + "type": "string" + } + }, + "id": "PubsubMessage", + "description": "A message data and its attributes. The message payload must not be empty;\nit must contain either a non-empty data field, or at least one attribute.", + "type": "object" + }, + "ModifyPushConfigRequest": { + "type": "object", + "properties": { + "pushConfig": { + "$ref": "PushConfig", + "description": "The push configuration for future deliveries.\n\nAn empty `pushConfig` indicates that the Pub/Sub system should\nstop pushing messages from the given subscription and allow\nmessages to be pulled and acknowledged - effectively pausing\nthe subscription if `Pull` is not called." + } + }, + "id": "ModifyPushConfigRequest", + "description": "Request for the ModifyPushConfig method." + }, + "Binding": { + "properties": { + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + }, "members": { "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "type": "array", "items": { "type": "string" } - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" } }, - "id": "Binding" + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object" } }, - "revision": "20161122", - "basePath": "", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "discoveryVersion": "v1", + "protocol": "rest", + "version": "v1", "baseUrl": "https://pubsub.googleapis.com/", - "name": "pubsub", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "canonicalName": "Pubsub", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/pubsub": { + "description": "View and manage Pub/Sub topics and subscriptions" + } + } } }, - "documentationLink": "https://cloud.google.com/pubsub/docs", - "ownerDomain": "google.com", - "batchPath": "batch", + "kind": "discovery#restDescription", "servicePath": "", - "ownerName": "Google", - "version": "v1", - "rootUrl": "https://pubsub.googleapis.com/", - "kind": "discovery#restDescription" + "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n" } diff --git a/etc/api/pubsub/v1beta1a/pubsub-api.json b/etc/api/pubsub/v1beta1a/pubsub-api.json index 0bfed50829..901c3ff873 100644 --- a/etc/api/pubsub/v1beta1a/pubsub-api.json +++ b/etc/api/pubsub/v1beta1a/pubsub-api.json @@ -1,372 +1,588 @@ { - "id": "pubsub:v1beta1a", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/pubsub": { - "description": "View and manage Pub/Sub topics and subscriptions" - } - } - } - }, - "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n", - "protocol": "rest", - "title": "Google Cloud Pub/Sub API", "resources": { "subscriptions": { "methods": { - "modifyPushConfig": { - "id": "pubsub.subscriptions.modifyPushConfig", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [], - "description": "Modifies the \u003ccode\u003ePushConfig\u003c/code\u003e for a specified subscription.\nThis method can be used to suspend the flow of messages to an endpoint\nby clearing the \u003ccode\u003ePushConfig\u003c/code\u003e field in the request. Messages\nwill be accumulated for delivery even if no push configuration is\ndefined or while the configuration is modified.", - "request": { - "$ref": "ModifyPushConfigRequest" - }, - "flatPath": "v1beta1a/subscriptions/modifyPushConfig", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1a/subscriptions/modifyPushConfig", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "pull": { - "id": "pubsub.subscriptions.pull", - "response": { - "$ref": "PullResponse" - }, - "parameterOrder": [], - "description": "Pulls a single message from the server.\nIf return_immediately is true, and no messages are available in the\nsubscription, this method returns FAILED_PRECONDITION. The system is free\nto return an UNAVAILABLE error if no messages are available in a\nreasonable amount of time (to reduce system load).", - "request": { - "$ref": "PullRequest" - }, - "flatPath": "v1beta1a/subscriptions/pull", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1a/subscriptions/pull", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, "list": { - "id": "pubsub.subscriptions.list", - "response": { - "$ref": "ListSubscriptionsResponse" - }, - "parameterOrder": [], - "description": "Lists matching subscriptions.", - "flatPath": "v1beta1a/subscriptions", - "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], "parameters": { "query": { - "description": "A valid label query expression.", + "type": "string", "location": "query", - "type": "string" + "description": "A valid label query expression." }, "maxResults": { - "description": "Maximum number of subscriptions to return.", "location": "query", - "type": "integer", - "format": "int32" + "description": "Maximum number of subscriptions to return.", + "format": "int32", + "type": "integer" }, "pageToken": { - "description": "The value obtained in the last \u003ccode\u003eListSubscriptionsResponse\u003c/code\u003e\nfor continuation.", "location": "query", + "description": "The value obtained in the last \u003ccode\u003eListSubscriptionsResponse\u003c/code\u003e\nfor continuation.", "type": "string" } }, - "path": "v1beta1a/subscriptions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "get": { - "id": "pubsub.subscriptions.get", - "response": { - "$ref": "Subscription" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Gets the configuration details of a subscription.", - "flatPath": "v1beta1a/subscriptions/{subscriptionsId}", - "httpMethod": "GET", - "parameters": { - "subscription": { - "description": "The name of the subscription to get.", - "required": true, - "pattern": "^.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1a/subscriptions/{+subscription}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "pullBatch": { - "id": "pubsub.subscriptions.pullBatch", - "response": { - "$ref": "PullBatchResponse" - }, - "parameterOrder": [], - "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The system is free to return UNAVAILABLE\nif there are too many pull requests outstanding for the given subscription.", - "request": { - "$ref": "PullBatchRequest" - }, - "flatPath": "v1beta1a/subscriptions/pullBatch", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1a/subscriptions/pullBatch", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "create": { - "id": "pubsub.subscriptions.create", - "response": { - "$ref": "Subscription" - }, - "parameterOrder": [], - "description": "Creates a subscription on a given topic for a given subscriber.\nIf the subscription already exists, returns ALREADY_EXISTS.\nIf the corresponding topic doesn't exist, returns NOT_FOUND.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic.", - "request": { - "$ref": "Subscription" - }, "flatPath": "v1beta1a/subscriptions", - "httpMethod": "POST", - "parameters": {}, + "id": "pubsub.subscriptions.list", "path": "v1beta1a/subscriptions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "modifyAckDeadline": { - "id": "pubsub.subscriptions.modifyAckDeadline", - "response": { - "$ref": "Empty" - }, + "description": "Lists matching subscriptions.", + "httpMethod": "GET", "parameterOrder": [], - "description": "Modifies the Ack deadline for a message received from a pull request.", - "request": { - "$ref": "ModifyAckDeadlineRequest" - }, - "flatPath": "v1beta1a/subscriptions/modifyAckDeadline", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1a/subscriptions/modifyAckDeadline", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "delete": { - "id": "pubsub.subscriptions.delete", "response": { - "$ref": "Empty" + "$ref": "ListSubscriptionsResponse" + } + }, + "create": { + "flatPath": "v1beta1a/subscriptions", + "id": "pubsub.subscriptions.create", + "path": "v1beta1a/subscriptions", + "request": { + "$ref": "Subscription" }, - "parameterOrder": [ - "subscription" - ], - "description": "Deletes an existing subscription. All pending messages in the subscription\nare immediately dropped. Calls to Pull after deletion will return\nNOT_FOUND.", - "flatPath": "v1beta1a/subscriptions/{subscriptionsId}", - "httpMethod": "DELETE", - "parameters": { - "subscription": { - "description": "The subscription to delete.", - "required": true, - "pattern": "^.+$", - "location": "path", - "type": "string" - } + "description": "Creates a subscription on a given topic for a given subscriber.\nIf the subscription already exists, returns ALREADY_EXISTS.\nIf the corresponding topic doesn't exist, returns NOT_FOUND.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Subscription" }, - "path": "v1beta1a/subscriptions/{+subscription}", + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" ] }, "acknowledge": { - "id": "pubsub.subscriptions.acknowledge", "response": { "$ref": "Empty" }, "parameterOrder": [], - "description": "Acknowledges a particular received message: the Pub/Sub system can remove\nthe given message from the subscription. Acknowledging a message whose\nAck deadline has expired may succeed, but the message could have been\nalready redelivered. Acknowledging a message more than once will not\nresult in an error. This is only used for messages received via pull.", - "request": { - "$ref": "AcknowledgeRequest" - }, - "flatPath": "v1beta1a/subscriptions/acknowledge", "httpMethod": "POST", "parameters": {}, - "path": "v1beta1a/subscriptions/acknowledge", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" - ] + ], + "flatPath": "v1beta1a/subscriptions/acknowledge", + "path": "v1beta1a/subscriptions/acknowledge", + "id": "pubsub.subscriptions.acknowledge", + "request": { + "$ref": "AcknowledgeRequest" + }, + "description": "Acknowledges a particular received message: the Pub/Sub system can remove\nthe given message from the subscription. Acknowledging a message whose\nAck deadline has expired may succeed, but the message could have been\nalready redelivered. Acknowledging a message more than once will not\nresult in an error. This is only used for messages received via pull." + }, + "modifyAckDeadline": { + "description": "Modifies the Ack deadline for a message received from a pull request.", + "request": { + "$ref": "ModifyAckDeadlineRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": {}, + "flatPath": "v1beta1a/subscriptions/modifyAckDeadline", + "path": "v1beta1a/subscriptions/modifyAckDeadline", + "id": "pubsub.subscriptions.modifyAckDeadline" + }, + "pullBatch": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "PullBatchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": {}, + "flatPath": "v1beta1a/subscriptions/pullBatch", + "id": "pubsub.subscriptions.pullBatch", + "path": "v1beta1a/subscriptions/pullBatch", + "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The system is free to return UNAVAILABLE\nif there are too many pull requests outstanding for the given subscription.", + "request": { + "$ref": "PullBatchRequest" + } + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "subscription" + ], + "response": { + "$ref": "Subscription" + }, + "parameters": { + "subscription": { + "pattern": "^.+$", + "location": "path", + "description": "The name of the subscription to get.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta1a/subscriptions/{subscriptionsId}", + "id": "pubsub.subscriptions.get", + "path": "v1beta1a/subscriptions/{+subscription}", + "description": "Gets the configuration details of a subscription." + }, + "modifyPushConfig": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Empty" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta1a/subscriptions/modifyPushConfig", + "id": "pubsub.subscriptions.modifyPushConfig", + "path": "v1beta1a/subscriptions/modifyPushConfig", + "request": { + "$ref": "ModifyPushConfigRequest" + }, + "description": "Modifies the \u003ccode\u003ePushConfig\u003c/code\u003e for a specified subscription.\nThis method can be used to suspend the flow of messages to an endpoint\nby clearing the \u003ccode\u003ePushConfig\u003c/code\u003e field in the request. Messages\nwill be accumulated for delivery even if no push configuration is\ndefined or while the configuration is modified." + }, + "delete": { + "flatPath": "v1beta1a/subscriptions/{subscriptionsId}", + "id": "pubsub.subscriptions.delete", + "path": "v1beta1a/subscriptions/{+subscription}", + "description": "Deletes an existing subscription. All pending messages in the subscription\nare immediately dropped. Calls to Pull after deletion will return\nNOT_FOUND.", + "httpMethod": "DELETE", + "parameterOrder": [ + "subscription" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "pattern": "^.+$", + "location": "path", + "description": "The subscription to delete.", + "required": true, + "type": "string" + } + } + }, + "pull": { + "response": { + "$ref": "PullResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": {}, + "flatPath": "v1beta1a/subscriptions/pull", + "path": "v1beta1a/subscriptions/pull", + "id": "pubsub.subscriptions.pull", + "description": "Pulls a single message from the server.\nIf return_immediately is true, and no messages are available in the\nsubscription, this method returns FAILED_PRECONDITION. The system is free\nto return an UNAVAILABLE error if no messages are available in a\nreasonable amount of time (to reduce system load).", + "request": { + "$ref": "PullRequest" + } } } }, "topics": { "methods": { - "publish": { - "id": "pubsub.topics.publish", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [], - "description": "Adds a message to the topic. Returns NOT_FOUND if the topic does not\nexist.", - "request": { - "$ref": "PublishRequest" - }, - "flatPath": "v1beta1a/topics/publish", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1a/topics/publish", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "list": { - "id": "pubsub.topics.list", - "response": { - "$ref": "ListTopicsResponse" - }, - "parameterOrder": [], - "description": "Lists matching topics.", - "flatPath": "v1beta1a/topics", - "httpMethod": "GET", - "parameters": { - "query": { - "description": "A valid label query expression.", - "location": "query", - "type": "string" - }, - "maxResults": { - "description": "Maximum number of topics to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "pageToken": { - "description": "The value obtained in the last \u003ccode\u003eListTopicsResponse\u003c/code\u003e\nfor continuation.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1a/topics", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "get": { - "id": "pubsub.topics.get", - "response": { - "$ref": "Topic" - }, + "delete": { + "description": "Deletes the topic with the given name. Returns NOT_FOUND if the topic does\nnot exist. After a topic is deleted, a new topic may be created with the\nsame name.", + "httpMethod": "DELETE", "parameterOrder": [ "topic" ], - "description": "Gets the configuration of a topic. Since the topic only has the name\nattribute, this method is only useful to check the existence of a topic.\nIf other attributes are added in the future, they will be returned here.", - "flatPath": "v1beta1a/topics/{topicsId}", - "httpMethod": "GET", - "parameters": { - "topic": { - "description": "The name of the topic to get.", - "required": true, - "pattern": "^.+$", - "location": "path", - "type": "string" - } + "response": { + "$ref": "Empty" }, - "path": "v1beta1a/topics/{+topic}", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" - ] + ], + "parameters": { + "topic": { + "pattern": "^.+$", + "location": "path", + "description": "Name of the topic to delete.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta1a/topics/{topicsId}", + "id": "pubsub.topics.delete", + "path": "v1beta1a/topics/{+topic}" }, "publishBatch": { + "flatPath": "v1beta1a/topics/publishBatch", "id": "pubsub.topics.publishBatch", - "response": { - "$ref": "PublishBatchResponse" - }, - "parameterOrder": [], + "path": "v1beta1a/topics/publishBatch", "description": "Adds one or more messages to the topic. Returns NOT_FOUND if the topic does\nnot exist.", "request": { "$ref": "PublishBatchRequest" }, - "flatPath": "v1beta1a/topics/publishBatch", "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1a/topics/publishBatch", + "parameterOrder": [], + "response": { + "$ref": "PublishBatchResponse" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" - ] + ], + "parameters": {} + }, + "list": { + "description": "Lists matching topics.", + "httpMethod": "GET", + "response": { + "$ref": "ListTopicsResponse" + }, + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "query": { + "location": "query", + "description": "A valid label query expression.", + "type": "string" + }, + "maxResults": { + "description": "Maximum number of topics to return.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The value obtained in the last \u003ccode\u003eListTopicsResponse\u003c/code\u003e\nfor continuation.", + "type": "string" + } + }, + "flatPath": "v1beta1a/topics", + "id": "pubsub.topics.list", + "path": "v1beta1a/topics" }, "create": { - "id": "pubsub.topics.create", "response": { "$ref": "Topic" }, "parameterOrder": [], - "description": "Creates the given topic with the given name.", - "request": { - "$ref": "Topic" - }, - "flatPath": "v1beta1a/topics", "httpMethod": "POST", "parameters": {}, - "path": "v1beta1a/topics", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" - ] + ], + "flatPath": "v1beta1a/topics", + "path": "v1beta1a/topics", + "id": "pubsub.topics.create", + "request": { + "$ref": "Topic" + }, + "description": "Creates the given topic with the given name." }, - "delete": { - "id": "pubsub.topics.delete", + "get": { "response": { - "$ref": "Empty" + "$ref": "Topic" }, "parameterOrder": [ "topic" ], - "description": "Deletes the topic with the given name. Returns NOT_FOUND if the topic does\nnot exist. After a topic is deleted, a new topic may be created with the\nsame name.", - "flatPath": "v1beta1a/topics/{topicsId}", - "httpMethod": "DELETE", - "parameters": { - "topic": { - "description": "Name of the topic to delete.", - "required": true, - "pattern": "^.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1a/topics/{+topic}", + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub" - ] + ], + "parameters": { + "topic": { + "description": "The name of the topic to get.", + "required": true, + "type": "string", + "pattern": "^.+$", + "location": "path" + } + }, + "flatPath": "v1beta1a/topics/{topicsId}", + "path": "v1beta1a/topics/{+topic}", + "id": "pubsub.topics.get", + "description": "Gets the configuration of a topic. Since the topic only has the name\nattribute, this method is only useful to check the existence of a topic.\nIf other attributes are added in the future, they will be returned here." + }, + "publish": { + "id": "pubsub.topics.publish", + "path": "v1beta1a/topics/publish", + "request": { + "$ref": "PublishRequest" + }, + "description": "Adds a message to the topic. Returns NOT_FOUND if the topic does not\nexist.", + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Empty" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta1a/topics/publish" } } } }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ] + }, + "key": { + "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", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + } + }, "schemas": { + "ModifyAckDeadlineRequest": { + "type": "object", + "properties": { + "subscription": { + "description": "Next Index: 5\nThe name of the subscription from which messages are being pulled.", + "type": "string" + }, + "ackId": { + "description": "The acknowledgment ID. Either this or ack_ids must be populated,\nnot both.", + "type": "string" + }, + "ackDeadlineSeconds": { + "description": "The new ack deadline with respect to the time this request was sent to the\nPub/Sub system. Must be \u003e= 0. For example, if the value is 10, the new ack\ndeadline will expire 10 seconds after the ModifyAckDeadline call was made.\nSpecifying zero may immediately make the message available for another pull\nrequest.", + "format": "int32", + "type": "integer" + }, + "ackIds": { + "description": "List of acknowledgment IDs. Either this field or ack_id\nshould be populated, not both.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ModifyAckDeadlineRequest", + "description": "Request for the ModifyAckDeadline method." + }, + "PullBatchRequest": { + "description": "Request for the PullBatch method.", + "type": "object", + "properties": { + "subscription": { + "description": "The subscription from which messages should be pulled.", + "type": "string" + }, + "returnImmediately": { + "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the Pull response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning no messages. The client may cancel the request if it does\nnot wish to wait any longer for the response.", + "type": "boolean" + }, + "maxEvents": { + "description": "The maximum number of PubsubEvents returned for this request. The Pub/Sub\nsystem may return fewer than the number of events specified.", + "format": "int32", + "type": "integer" + } + }, + "id": "PullBatchRequest" + }, + "PubsubMessage": { + "description": "A message data and its labels.", + "type": "object", + "properties": { + "messageId": { + "description": "ID of this message assigned by the server at publication time. Guaranteed\nto be unique within the topic. This value may be read by a subscriber\nthat receives a PubsubMessage via a Pull call or a push delivery. It must\nnot be populated by a publisher in a Publish call.", + "type": "string" + }, + "label": { + "description": "Optional list of labels for this message. Keys in this collection must\nbe unique.", + "type": "array", + "items": { + "$ref": "Label" + } + }, + "publishTime": { + "description": "The time at which the message was published.\nThe time is milliseconds since the UNIX epoch.", + "format": "int64", + "type": "string" + }, + "data": { + "description": "The message payload.", + "format": "byte", + "type": "string" + } + }, + "id": "PubsubMessage" + }, + "ModifyPushConfigRequest": { + "type": "object", + "properties": { + "pushConfig": { + "$ref": "PushConfig", + "description": "An empty \u003ccode\u003epush_config\u003c/code\u003e indicates that the Pub/Sub system should\npause pushing messages from the given subscription." + }, + "subscription": { + "description": "The name of the subscription.", + "type": "string" + } + }, + "id": "ModifyPushConfigRequest", + "description": "Request for the ModifyPushConfig method." + }, + "AcknowledgeRequest": { + "properties": { + "subscription": { + "description": "The subscription whose message is being acknowledged.", + "type": "string" + }, + "ackId": { + "description": "The acknowledgment ID for the message being acknowledged. This was\nreturned by the Pub/Sub system in the Pull response.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "AcknowledgeRequest", + "description": "Request for the Acknowledge method.", + "type": "object" + }, + "PublishBatchRequest": { + "description": "Request for the PublishBatch method.", + "type": "object", + "properties": { + "messages": { + "description": "The messages to publish.", + "type": "array", + "items": { + "$ref": "PubsubMessage" + } + }, + "topic": { + "description": "The messages in the request will be published on this topic.", + "type": "string" + } + }, + "id": "PublishBatchRequest" + }, + "ListTopicsResponse": { + "description": "Response for the ListTopics method.", + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "If not empty, indicates that there are more topics that match the request,\nand this value should be passed to the next \u003ccode\u003eListTopicsRequest\u003c/code\u003e\nto continue." + }, + "topic": { + "description": "The resulting topics.", + "type": "array", + "items": { + "$ref": "Topic" + } + } + }, + "id": "ListTopicsResponse" + }, "PullBatchResponse": { "description": "Response for the PullBatch method.", "type": "object", @@ -381,45 +597,52 @@ }, "id": "PullBatchResponse" }, - "Topic": { - "description": "A topic resource.", + "Empty": { + "description": "An empty message that you can re-use to avoid defining duplicated empty\nmessages in your project. A typical example is to use it as argument or the\nreturn value of a service API. For instance:\n\n service Foo {\n rpc Bar (proto2.Empty) returns (proto2.Empty) { };\n };\n\nBEGIN GOOGLE-INTERNAL\nThe difference between this one and net/rpc/empty-message.proto is that\n1) The generated message here is in proto2 C++ API.\n2) The proto2.Empty has minimum dependencies\n (no message_set or net/rpc dependencies)\nEND GOOGLE-INTERNAL", "type": "object", - "properties": { - "name": { - "description": "Name of the topic.", - "type": "string" - } - }, - "id": "Topic" + "properties": {}, + "id": "Empty" }, - "PublishBatchResponse": { - "description": "Response for the PublishBatch method.", - "type": "object", + "PullResponse": { "properties": { - "messageIds": { - "description": "The server-assigned ID of each published message, in the same order as\nthe messages in the request. IDs are guaranteed to be unique within\nthe topic.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "PublishBatchResponse" - }, - "PublishRequest": { - "description": "Request for the Publish method.", - "type": "object", - "properties": { - "topic": { - "description": "The message in the request will be published on this topic.", + "ackId": { + "description": "This ID must be used to acknowledge the received event or message.", "type": "string" }, - "message": { - "description": "The message to publish.", - "$ref": "PubsubMessage" + "pubsubEvent": { + "description": "A pubsub message or truncation event.", + "$ref": "PubsubEvent" } }, - "id": "PublishRequest" + "id": "PullResponse", + "description": "Either a \u003ccode\u003ePubsubMessage\u003c/code\u003e or a truncation event. One of these two\nmust be populated.", + "type": "object" + }, + "PushConfig": { + "properties": { + "pushEndpoint": { + "type": "string", + "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\"." + } + }, + "id": "PushConfig", + "description": "Configuration for a push delivery endpoint.", + "type": "object" + }, + "PullRequest": { + "description": "Request for the Pull method.", + "type": "object", + "properties": { + "subscription": { + "description": "The subscription from which a message should be pulled.", + "type": "string" + }, + "returnImmediately": { + "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the Pull response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning FAILED_PRECONDITION. The client may cancel the request if\nit does not wish to wait any longer for the response.", + "type": "boolean" + } + }, + "id": "PullRequest" }, "ListSubscriptionsResponse": { "description": "Response for the ListSubscriptions method.", @@ -439,224 +662,7 @@ }, "id": "ListSubscriptionsResponse" }, - "Subscription": { - "description": "A subscription resource.", - "type": "object", - "properties": { - "pushConfig": { - "description": "If push delivery is used with this subscription, this field is\nused to configure it.", - "$ref": "PushConfig" - }, - "topic": { - "description": "The name of the topic from which this subscription is receiving messages.", - "type": "string" - }, - "ackDeadlineSeconds": { - "description": "For either push or pull delivery, the value is the maximum time after a\nsubscriber receives a message before the subscriber should acknowledge or\nNack the message. If the Ack deadline for a message passes without an\nAck or a Nack, the Pub/Sub system will eventually redeliver the message.\nIf a subscriber acknowledges after the deadline, the Pub/Sub system may\naccept the Ack, but it is possible that the message has been already\ndelivered again. Multiple Acks to the message are allowed and will\nsucceed.\n\nFor push delivery, this value is used to set the request timeout for\nthe call to the push endpoint.\n\nFor pull delivery, this value is used as the initial value for the Ack\ndeadline. It may be overridden for each message using its corresponding\nack_id with \u003ccode\u003eModifyAckDeadline\u003c/code\u003e.\nWhile a message is outstanding (i.e. it has been delivered to a pull\nsubscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub\nsystem will not deliver that message to another pull subscriber\n(on a best-effort basis).", - "type": "integer", - "format": "int32" - }, - "name": { - "description": "Name of the subscription.", - "type": "string" - } - }, - "id": "Subscription" - }, - "Label": { - "description": "A key-value pair applied to a given object.", - "type": "object", - "properties": { - "strValue": { - "description": "A string value.", - "type": "string" - }, - "key": { - "description": "The key of a label is a syntactically valid URL (as per RFC 1738) with\nthe \"scheme\" and initial slashes omitted and with the additional\nrestrictions noted below. Each key should be globally unique. The\n\"host\" portion is called the \"namespace\" and is not necessarily\nresolvable to a network endpoint. Instead, the namespace indicates what\nsystem or entity defines the semantics of the label. Namespaces do not\nrestrict the set of objects to which a label may be associated.\n\nKeys are defined by the following grammar:\n\n key = hostname \"/\" kpath\n kpath = ksegment *[ \"/\" ksegment ]\n ksegment = alphadigit | *[ alphadigit | \"-\" | \"_\" | \".\" ]\n\nwhere \"hostname\" and \"alphadigit\" are defined as in RFC 1738.\n\nExample key:\n spanner.google.com/universe", - "type": "string" - }, - "numValue": { - "description": "An integer value.", - "type": "string", - "format": "int64" - } - }, - "id": "Label" - }, - "ModifyAckDeadlineRequest": { - "description": "Request for the ModifyAckDeadline method.", - "type": "object", - "properties": { - "ackDeadlineSeconds": { - "description": "The new ack deadline with respect to the time this request was sent to the\nPub/Sub system. Must be \u003e= 0. For example, if the value is 10, the new ack\ndeadline will expire 10 seconds after the ModifyAckDeadline call was made.\nSpecifying zero may immediately make the message available for another pull\nrequest.", - "type": "integer", - "format": "int32" - }, - "ackId": { - "description": "The acknowledgment ID. Either this or ack_ids must be populated,\nnot both.", - "type": "string" - }, - "subscription": { - "description": "Next Index: 5\nThe name of the subscription from which messages are being pulled.", - "type": "string" - }, - "ackIds": { - "description": "List of acknowledgment IDs. Either this field or ack_id\nshould be populated, not both.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "ModifyAckDeadlineRequest" - }, - "PushConfig": { - "description": "Configuration for a push delivery endpoint.", - "type": "object", - "properties": { - "pushEndpoint": { - "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\".", - "type": "string" - } - }, - "id": "PushConfig" - }, - "PullRequest": { - "description": "Request for the Pull method.", - "type": "object", - "properties": { - "returnImmediately": { - "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the Pull response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning FAILED_PRECONDITION. The client may cancel the request if\nit does not wish to wait any longer for the response.", - "type": "boolean" - }, - "subscription": { - "description": "The subscription from which a message should be pulled.", - "type": "string" - } - }, - "id": "PullRequest" - }, - "ModifyPushConfigRequest": { - "description": "Request for the ModifyPushConfig method.", - "type": "object", - "properties": { - "pushConfig": { - "description": "An empty \u003ccode\u003epush_config\u003c/code\u003e indicates that the Pub/Sub system should\npause pushing messages from the given subscription.", - "$ref": "PushConfig" - }, - "subscription": { - "description": "The name of the subscription.", - "type": "string" - } - }, - "id": "ModifyPushConfigRequest" - }, - "PullResponse": { - "description": "Either a \u003ccode\u003ePubsubMessage\u003c/code\u003e or a truncation event. One of these two\nmust be populated.", - "type": "object", - "properties": { - "pubsubEvent": { - "description": "A pubsub message or truncation event.", - "$ref": "PubsubEvent" - }, - "ackId": { - "description": "This ID must be used to acknowledge the received event or message.", - "type": "string" - } - }, - "id": "PullResponse" - }, - "PubsubMessage": { - "description": "A message data and its labels.", - "type": "object", - "properties": { - "data": { - "description": "The message payload.", - "type": "string", - "format": "byte" - }, - "messageId": { - "description": "ID of this message assigned by the server at publication time. Guaranteed\nto be unique within the topic. This value may be read by a subscriber\nthat receives a PubsubMessage via a Pull call or a push delivery. It must\nnot be populated by a publisher in a Publish call.", - "type": "string" - }, - "publishTime": { - "description": "The time at which the message was published.\nThe time is milliseconds since the UNIX epoch.", - "type": "string", - "format": "int64" - }, - "label": { - "description": "Optional list of labels for this message. Keys in this collection must\nbe unique.", - "type": "array", - "items": { - "$ref": "Label" - } - } - }, - "id": "PubsubMessage" - }, - "PublishBatchRequest": { - "description": "Request for the PublishBatch method.", - "type": "object", - "properties": { - "topic": { - "description": "The messages in the request will be published on this topic.", - "type": "string" - }, - "messages": { - "description": "The messages to publish.", - "type": "array", - "items": { - "$ref": "PubsubMessage" - } - } - }, - "id": "PublishBatchRequest" - }, - "AcknowledgeRequest": { - "description": "Request for the Acknowledge method.", - "type": "object", - "properties": { - "ackId": { - "description": "The acknowledgment ID for the message being acknowledged. This was\nreturned by the Pub/Sub system in the Pull response.", - "type": "array", - "items": { - "type": "string" - } - }, - "subscription": { - "description": "The subscription whose message is being acknowledged.", - "type": "string" - } - }, - "id": "AcknowledgeRequest" - }, - "Empty": { - "description": "An empty message that you can re-use to avoid defining duplicated empty\nmessages in your project. A typical example is to use it as argument or the\nreturn value of a service API. For instance:\n\n service Foo {\n rpc Bar (proto2.Empty) returns (proto2.Empty) { };\n };\n\nBEGIN GOOGLE-INTERNAL\nThe difference between this one and net/rpc/empty-message.proto is that\n1) The generated message here is in proto2 C++ API.\n2) The proto2.Empty has minimum dependencies\n (no message_set or net/rpc dependencies)\nEND GOOGLE-INTERNAL", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "ListTopicsResponse": { - "description": "Response for the ListTopics method.", - "type": "object", - "properties": { - "topic": { - "description": "The resulting topics.", - "type": "array", - "items": { - "$ref": "Topic" - } - }, - "nextPageToken": { - "description": "If not empty, indicates that there are more topics that match the request,\nand this value should be passed to the next \u003ccode\u003eListTopicsRequest\u003c/code\u003e\nto continue.", - "type": "string" - } - }, - "id": "ListTopicsResponse" - }, "PubsubEvent": { - "description": "An event indicating a received message or truncation event.", - "type": "object", "properties": { "truncated": { "description": "Indicates that this subscription has been truncated.", @@ -666,141 +672,136 @@ "description": "Indicates that this subscription has been deleted. (Note that pull\nsubscribers will always receive NOT_FOUND in response in their pull\nrequest on the subscription, rather than seeing this boolean.)", "type": "boolean" }, + "message": { + "$ref": "PubsubMessage", + "description": "A received message." + }, "subscription": { "description": "The subscription that received the event.", "type": "string" - }, - "message": { - "description": "A received message.", - "$ref": "PubsubMessage" } }, - "id": "PubsubEvent" + "id": "PubsubEvent", + "description": "An event indicating a received message or truncation event.", + "type": "object" }, - "PullBatchRequest": { - "description": "Request for the PullBatch method.", + "PublishRequest": { "type": "object", "properties": { - "maxEvents": { - "description": "The maximum number of PubsubEvents returned for this request. The Pub/Sub\nsystem may return fewer than the number of events specified.", - "type": "integer", - "format": "int32" + "message": { + "$ref": "PubsubMessage", + "description": "The message to publish." }, - "returnImmediately": { - "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the Pull response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning no messages. The client may cancel the request if it does\nnot wish to wait any longer for the response.", - "type": "boolean" - }, - "subscription": { - "description": "The subscription from which messages should be pulled.", + "topic": { + "description": "The message in the request will be published on this topic.", "type": "string" } }, - "id": "PullBatchRequest" + "id": "PublishRequest", + "description": "Request for the Publish method." + }, + "PublishBatchResponse": { + "properties": { + "messageIds": { + "description": "The server-assigned ID of each published message, in the same order as\nthe messages in the request. IDs are guaranteed to be unique within\nthe topic.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "PublishBatchResponse", + "description": "Response for the PublishBatch method.", + "type": "object" + }, + "Subscription": { + "type": "object", + "properties": { + "topic": { + "description": "The name of the topic from which this subscription is receiving messages.", + "type": "string" + }, + "pushConfig": { + "description": "If push delivery is used with this subscription, this field is\nused to configure it.", + "$ref": "PushConfig" + }, + "ackDeadlineSeconds": { + "description": "For either push or pull delivery, the value is the maximum time after a\nsubscriber receives a message before the subscriber should acknowledge or\nNack the message. If the Ack deadline for a message passes without an\nAck or a Nack, the Pub/Sub system will eventually redeliver the message.\nIf a subscriber acknowledges after the deadline, the Pub/Sub system may\naccept the Ack, but it is possible that the message has been already\ndelivered again. Multiple Acks to the message are allowed and will\nsucceed.\n\nFor push delivery, this value is used to set the request timeout for\nthe call to the push endpoint.\n\nFor pull delivery, this value is used as the initial value for the Ack\ndeadline. It may be overridden for each message using its corresponding\nack_id with \u003ccode\u003eModifyAckDeadline\u003c/code\u003e.\nWhile a message is outstanding (i.e. it has been delivered to a pull\nsubscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub\nsystem will not deliver that message to another pull subscriber\n(on a best-effort basis).", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Name of the subscription.", + "type": "string" + } + }, + "id": "Subscription", + "description": "A subscription resource." + }, + "Topic": { + "id": "Topic", + "description": "A topic resource.", + "type": "object", + "properties": { + "name": { + "description": "Name of the topic.", + "type": "string" + } + } + }, + "Label": { + "description": "A key-value pair applied to a given object.", + "type": "object", + "properties": { + "strValue": { + "description": "A string value.", + "type": "string" + }, + "numValue": { + "description": "An integer value.", + "format": "int64", + "type": "string" + }, + "key": { + "description": "The key of a label is a syntactically valid URL (as per RFC 1738) with\nthe \"scheme\" and initial slashes omitted and with the additional\nrestrictions noted below. Each key should be globally unique. The\n\"host\" portion is called the \"namespace\" and is not necessarily\nresolvable to a network endpoint. Instead, the namespace indicates what\nsystem or entity defines the semantics of the label. Namespaces do not\nrestrict the set of objects to which a label may be associated.\n\nKeys are defined by the following grammar:\n\n key = hostname \"/\" kpath\n kpath = ksegment *[ \"/\" ksegment ]\n ksegment = alphadigit | *[ alphadigit | \"-\" | \"_\" | \".\" ]\n\nwhere \"hostname\" and \"alphadigit\" are defined as in RFC 1738.\n\nExample key:\n spanner.google.com/universe", + "type": "string" + } + }, + "id": "Label" } }, - "revision": "20161122", - "basePath": "", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "discoveryVersion": "v1", + "protocol": "rest", + "version": "v1beta1a", "baseUrl": "https://pubsub.googleapis.com/", - "name": "pubsub", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "canonicalName": "Pubsub", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/pubsub": { + "description": "View and manage Pub/Sub topics and subscriptions" + } + } } }, - "documentationLink": "https://cloud.google.com/pubsub/docs", - "ownerDomain": "google.com", - "batchPath": "batch", "servicePath": "", - "ownerName": "Google", - "version": "v1beta1a", + "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n", + "kind": "discovery#restDescription", "rootUrl": "https://pubsub.googleapis.com/", - "kind": "discovery#restDescription" + "basePath": "", + "ownerDomain": "google.com", + "name": "pubsub", + "batchPath": "batch", + "id": "pubsub:v1beta1a", + "documentationLink": "https://cloud.google.com/pubsub/docs", + "revision": "20170502", + "title": "Google Cloud Pub/Sub API", + "discoveryVersion": "v1", + "ownerName": "Google" } diff --git a/etc/api/pubsub/v1beta2/pubsub-api.json b/etc/api/pubsub/v1beta2/pubsub-api.json index 57bdbff6c0..454a70b305 100644 --- a/etc/api/pubsub/v1beta2/pubsub-api.json +++ b/etc/api/pubsub/v1beta2/pubsub-api.json @@ -1,724 +1,5 @@ { - "id": "pubsub:v1beta2", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/pubsub": { - "description": "View and manage Pub/Sub topics and subscriptions" - } - } - } - }, - "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n", - "protocol": "rest", - "title": "Google Cloud Pub/Sub API", - "resources": { - "projects": { - "resources": { - "subscriptions": { - "methods": { - "modifyPushConfig": { - "id": "pubsub.projects.subscriptions.modifyPushConfig", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Modifies the `PushConfig` for a specified subscription.\n\nThis may be used to change a push subscription to a pull one (signified by\nan empty `PushConfig`) or vice versa, or change the endpoint URL and other\nattributes of a push subscription. Messages will accumulate for delivery\ncontinuously through the call regardless of changes to the `PushConfig`.", - "request": { - "$ref": "ModifyPushConfigRequest" - }, - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig", - "httpMethod": "POST", - "parameters": { - "subscription": { - "description": "The name of the subscription.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+subscription}:modifyPushConfig", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "getIamPolicy": { - "id": "pubsub.projects.subscriptions.getIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", - "httpMethod": "GET", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "pull": { - "id": "pubsub.projects.subscriptions.pull", - "response": { - "$ref": "PullResponse" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The server may return `UNAVAILABLE` if\nthere are too many concurrent pull requests pending for the given\nsubscription.", - "request": { - "$ref": "PullRequest" - }, - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", - "httpMethod": "POST", - "parameters": { - "subscription": { - "description": "The subscription from which messages should be pulled.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+subscription}:pull", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "list": { - "id": "pubsub.projects.subscriptions.list", - "response": { - "$ref": "ListSubscriptionsResponse" - }, - "parameterOrder": [ - "project" - ], - "description": "Lists matching subscriptions.", - "flatPath": "v1beta2/projects/{projectsId}/subscriptions", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Maximum number of subscriptions to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "project": { - "description": "The name of the cloud project that subscriptions belong to.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "The value returned by the last `ListSubscriptionsResponse`; indicates that\nthis is a continuation of a prior `ListSubscriptions` call, and that the\nsystem should return the next page of data.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta2/{+project}/subscriptions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "get": { - "id": "pubsub.projects.subscriptions.get", - "response": { - "$ref": "Subscription" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Gets the configuration details of a subscription.", - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", - "httpMethod": "GET", - "parameters": { - "subscription": { - "description": "The name of the subscription to get.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+subscription}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "create": { - "id": "pubsub.projects.subscriptions.create", - "response": { - "$ref": "Subscription" - }, - "parameterOrder": [ - "name" - ], - "description": "Creates a subscription to a given topic.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic. Note that\nfor REST API requests, you must specify a name.", - "request": { - "$ref": "Subscription" - }, - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "modifyAckDeadline": { - "id": "pubsub.projects.subscriptions.modifyAckDeadline", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Modifies the ack deadline for a specific message. This method is useful\nto indicate that more time is needed to process a message by the\nsubscriber, or to make the message available for redelivery if the\nprocessing was interrupted. Note that this does not modify the\nsubscription-level `ackDeadlineSeconds` used for subsequent messages.", - "request": { - "$ref": "ModifyAckDeadlineRequest" - }, - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", - "httpMethod": "POST", - "parameters": { - "subscription": { - "description": "The name of the subscription.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+subscription}:modifyAckDeadline", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "setIamPolicy": { - "id": "pubsub.projects.subscriptions.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "delete": { - "id": "pubsub.projects.subscriptions.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Deletes an existing subscription. All pending messages in the subscription\nare immediately dropped. Calls to `Pull` after deletion will return\n`NOT_FOUND`. After a subscription is deleted, a new one may be created with\nthe same name, but the new one has no association with the old\nsubscription, or its topic unless the same topic is specified.", - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", - "httpMethod": "DELETE", - "parameters": { - "subscription": { - "description": "The subscription to delete.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+subscription}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "testIamPermissions": { - "id": "pubsub.projects.subscriptions.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "acknowledge": { - "id": "pubsub.projects.subscriptions.acknowledge", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "subscription" - ], - "description": "Acknowledges the messages associated with the `ack_ids` in the\n`AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages\nfrom the subscription.\n\nAcknowledging a message whose ack deadline has expired may succeed,\nbut such a message may be redelivered later. Acknowledging a message more\nthan once will not result in an error.", - "request": { - "$ref": "AcknowledgeRequest" - }, - "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:acknowledge", - "httpMethod": "POST", - "parameters": { - "subscription": { - "description": "The subscription whose message is being acknowledged.", - "required": true, - "pattern": "^projects/[^/]+/subscriptions/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+subscription}:acknowledge", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - } - } - }, - "topics": { - "resources": { - "subscriptions": { - "methods": { - "list": { - "id": "pubsub.projects.topics.subscriptions.list", - "response": { - "$ref": "ListTopicSubscriptionsResponse" - }, - "parameterOrder": [ - "topic" - ], - "description": "Lists the name of the subscriptions for this topic.", - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}/subscriptions", - "httpMethod": "GET", - "parameters": { - "topic": { - "description": "The name of the topic that subscriptions are attached to.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - }, - "pageSize": { - "description": "Maximum number of subscription names to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "pageToken": { - "description": "The value returned by the last `ListTopicSubscriptionsResponse`; indicates\nthat this is a continuation of a prior `ListTopicSubscriptions` call, and\nthat the system should return the next page of data.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta2/{+topic}/subscriptions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - } - } - } - }, - "methods": { - "getIamPolicy": { - "id": "pubsub.projects.topics.getIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:getIamPolicy", - "httpMethod": "GET", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "publish": { - "id": "pubsub.projects.topics.publish", - "response": { - "$ref": "PublishResponse" - }, - "parameterOrder": [ - "topic" - ], - "description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic\ndoes not exist. The message payload must not be empty; it must contain\n either a non-empty data field, or at least one attribute.", - "request": { - "$ref": "PublishRequest" - }, - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:publish", - "httpMethod": "POST", - "parameters": { - "topic": { - "description": "The messages in the request will be published on this topic.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+topic}:publish", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "list": { - "id": "pubsub.projects.topics.list", - "response": { - "$ref": "ListTopicsResponse" - }, - "parameterOrder": [ - "project" - ], - "description": "Lists matching topics.", - "flatPath": "v1beta2/projects/{projectsId}/topics", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Maximum number of topics to return.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "project": { - "description": "The name of the cloud project that topics belong to.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "The value returned by the last `ListTopicsResponse`; indicates that this is\na continuation of a prior `ListTopics` call, and that the system should\nreturn the next page of data.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta2/{+project}/topics", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "get": { - "id": "pubsub.projects.topics.get", - "response": { - "$ref": "Topic" - }, - "parameterOrder": [ - "topic" - ], - "description": "Gets the configuration of a topic.", - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", - "httpMethod": "GET", - "parameters": { - "topic": { - "description": "The name of the topic to get.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+topic}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "create": { - "id": "pubsub.projects.topics.create", - "response": { - "$ref": "Topic" - }, - "parameterOrder": [ - "name" - ], - "description": "Creates the given topic with the given name.", - "request": { - "$ref": "Topic" - }, - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "setIamPolicy": { - "id": "pubsub.projects.topics.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "delete": { - "id": "pubsub.projects.topics.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "topic" - ], - "description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic\ndoes not exist. After a topic is deleted, a new topic may be created with\nthe same name; this is an entirely new topic with none of the old\nconfiguration or subscriptions. Existing subscriptions to this topic are\nnot deleted, but their `topic` field is set to `_deleted-topic_`.", - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", - "httpMethod": "DELETE", - "parameters": { - "topic": { - "description": "Name of the topic to delete.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+topic}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - }, - "testIamPermissions": { - "id": "pubsub.projects.topics.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/topics/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta2/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/pubsub" - ] - } - } - } - } - } - }, "schemas": { - "Topic": { - "description": "A topic resource.", - "type": "object", - "properties": { - "name": { - "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", - "type": "string" - } - }, - "id": "Topic" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "policy": { - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", - "$ref": "Policy" - } - }, - "id": "SetIamPolicyRequest" - }, - "ReceivedMessage": { - "description": "A message and its corresponding acknowledgment ID.", - "type": "object", - "properties": { - "ackId": { - "description": "This ID can be used to acknowledge the received message.", - "type": "string" - }, - "message": { - "description": "The message.", - "$ref": "PubsubMessage" - } - }, - "id": "ReceivedMessage" - }, - "PublishRequest": { - "description": "Request for the Publish method.", - "type": "object", - "properties": { - "messages": { - "description": "The messages to publish.", - "type": "array", - "items": { - "$ref": "PubsubMessage" - } - } - }, - "id": "PublishRequest" - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "TestIamPermissionsResponse" - }, - "PublishResponse": { - "description": "Response for the `Publish` method.", - "type": "object", - "properties": { - "messageIds": { - "description": "The server-assigned ID of each published message, in the same order as\nthe messages in the request. IDs are guaranteed to be unique within\nthe topic.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "PublishResponse" - }, - "ListSubscriptionsResponse": { - "description": "Response for the `ListSubscriptions` method.", - "type": "object", - "properties": { - "subscriptions": { - "description": "The subscriptions that match the request.", - "type": "array", - "items": { - "$ref": "Subscription" - } - }, - "nextPageToken": { - "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListSubscriptionsRequest` to get more subscriptions.", - "type": "string" - } - }, - "id": "ListSubscriptionsResponse" - }, "Policy": { "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", "type": "object", @@ -732,72 +13,41 @@ }, "etag": { "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string", - "format": "byte" + "format": "byte", + "type": "string" }, "version": { "description": "Version of the `Policy`. The default version is 0.", - "type": "integer", - "format": "int32" + "format": "int32", + "type": "integer" } }, "id": "Policy" }, - "ListTopicSubscriptionsResponse": { - "description": "Response for the `ListTopicSubscriptions` method.", + "Topic": { + "description": "A topic resource.", "type": "object", "properties": { - "subscriptions": { - "description": "The names of the subscriptions that match the request.", - "type": "array", - "items": { - "type": "string" - } - }, - "nextPageToken": { - "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListTopicSubscriptionsRequest` to get more subscriptions.", - "type": "string" - } - }, - "id": "ListTopicSubscriptionsResponse" - }, - "Subscription": { - "description": "A subscription resource.", - "type": "object", - "properties": { - "pushConfig": { - "description": "If push delivery is used with this subscription, this field is\nused to configure it. An empty `pushConfig` signifies that the subscriber\nwill pull and ack messages using API methods.", - "$ref": "PushConfig" - }, - "topic": { - "description": "The name of the topic from which this subscription is receiving messages.\nThe value of this field will be `_deleted-topic_` if the topic has been\ndeleted.", - "type": "string" - }, - "ackDeadlineSeconds": { - "description": "This value is the maximum time after a subscriber receives a message\nbefore the subscriber should acknowledge the message. After message\ndelivery but before the ack deadline expires and before the message is\nacknowledged, it is an outstanding message and will not be delivered\nagain during that time (on a best-effort basis).\n\nFor pull subscriptions, this value is used as the initial value for the ack\ndeadline. To override this value for a given message, call\n`ModifyAckDeadline` with the corresponding `ack_id` if using pull.\nThe maximum custom deadline you can specify is 600 seconds (10 minutes).\n\nFor push delivery, this value is also used to set the request timeout for\nthe call to the push endpoint.\n\nIf the subscriber never acknowledges the message, the Pub/Sub\nsystem will eventually redeliver the message.\n\nIf this parameter is 0, a default value of 10 seconds is used.", - "type": "integer", - "format": "int32" - }, "name": { - "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`.", + "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", "type": "string" } }, - "id": "Subscription" + "id": "Topic" }, "ModifyAckDeadlineRequest": { "description": "Request for the ModifyAckDeadline method.", "type": "object", "properties": { - "ackDeadlineSeconds": { - "description": "The new ack deadline with respect to the time this request was sent to\nthe Pub/Sub system. Must be \u003e= 0. For example, if the value is 10, the new\nack deadline will expire 10 seconds after the `ModifyAckDeadline` call\nwas made. Specifying zero may immediately make the message available for\nanother pull request.", - "type": "integer", - "format": "int32" - }, "ackId": { "description": "The acknowledgment ID. Either this or ack_ids must be populated, but not\nboth.", "type": "string" }, + "ackDeadlineSeconds": { + "description": "The new ack deadline with respect to the time this request was sent to\nthe Pub/Sub system. Must be \u003e= 0. For example, if the value is 10, the new\nack deadline will expire 10 seconds after the `ModifyAckDeadline` call\nwas made. Specifying zero may immediately make the message available for\nanother pull request.", + "format": "int32", + "type": "integer" + }, "ackIds": { "description": "List of acknowledgment IDs.", "type": "array", @@ -808,53 +58,44 @@ }, "id": "ModifyAckDeadlineRequest" }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", "type": "object", "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "type": "array", - "items": { - "type": "string" - } + "policy": { + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", + "$ref": "Policy" } }, - "id": "TestIamPermissionsRequest" + "id": "SetIamPolicyRequest" }, - "PushConfig": { - "description": "Configuration for a push delivery endpoint.", + "PubsubMessage": { + "description": "A message data and its attributes. The message payload must not be empty;\nit must contain either a non-empty data field, or at least one attribute.", "type": "object", "properties": { + "data": { + "description": "The message payload. For JSON requests, the value of this field must be\n[base64-encoded](https://tools.ietf.org/html/rfc4648).", + "format": "byte", + "type": "string" + }, "attributes": { - "description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the push message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the envelope (i.e. its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub\nAPI.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.", "additionalProperties": { "type": "string" }, + "description": "Optional attributes for this message.", "type": "object" }, - "pushEndpoint": { - "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\".", + "messageId": { + "description": "ID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic. This value may be read by a\nsubscriber that receives a `PubsubMessage` via a `Pull` call or a push\ndelivery. It must not be populated by the publisher in a `Publish` call.", + "type": "string" + }, + "publishTime": { + "description": "The time at which the message was published, populated by the server when\nit receives the `Publish` call. It must not be populated by the\npublisher in a `Publish` call.", + "format": "google-datetime", "type": "string" } }, - "id": "PushConfig" - }, - "PullRequest": { - "description": "Request for the `Pull` method.", - "type": "object", - "properties": { - "returnImmediately": { - "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the `Pull` response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning no messages. The client may cancel the request if it does\nnot wish to wait any longer for the response.", - "type": "boolean" - }, - "maxMessages": { - "description": "The maximum number of messages returned for this request. The Pub/Sub\nsystem may return fewer than the number specified.", - "type": "integer", - "format": "int32" - } - }, - "id": "PullRequest" + "id": "PubsubMessage" }, "ModifyPushConfigRequest": { "description": "Request for the ModifyPushConfig method.", @@ -867,47 +108,23 @@ }, "id": "ModifyPushConfigRequest" }, - "PullResponse": { - "description": "Response for the `Pull` method.", + "Binding": { + "description": "Associates `members` with a `role`.", "type": "object", "properties": { - "receivedMessages": { - "description": "Received Pub/Sub messages. The Pub/Sub system will return zero messages if\nthere are no more available in the backlog. The Pub/Sub system may return\nfewer than the `maxMessages` requested even if there are more messages\navailable in the backlog.", + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "type": "array", "items": { - "$ref": "ReceivedMessage" - } - } - }, - "id": "PullResponse" - }, - "PubsubMessage": { - "description": "A message data and its attributes. The message payload must not be empty;\nit must contain either a non-empty data field, or at least one attribute.", - "type": "object", - "properties": { - "data": { - "description": "The message payload. For JSON requests, the value of this field must be\n[base64-encoded](https://tools.ietf.org/html/rfc4648).", - "type": "string", - "format": "byte" - }, - "attributes": { - "description": "Optional attributes for this message.", - "additionalProperties": { "type": "string" - }, - "type": "object" + } }, - "messageId": { - "description": "ID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic. This value may be read by a\nsubscriber that receives a `PubsubMessage` via a `Pull` call or a push\ndelivery. It must not be populated by the publisher in a `Publish` call.", + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", "type": "string" - }, - "publishTime": { - "description": "The time at which the message was published, populated by the server when\nit receives the `Publish` call. It must not be populated by the\npublisher in a `Publish` call.", - "type": "string", - "format": "google-datetime" } }, - "id": "PubsubMessage" + "id": "Binding" }, "AcknowledgeRequest": { "description": "Request for the Acknowledge method.", @@ -947,51 +164,827 @@ }, "id": "ListTopicsResponse" }, - "Binding": { - "description": "Associates `members` with a `role`.", + "ListTopicSubscriptionsResponse": { + "description": "Response for the `ListTopicSubscriptions` method.", "type": "object", "properties": { - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "nextPageToken": { + "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListTopicSubscriptionsRequest` to get more subscriptions.", + "type": "string" + }, + "subscriptions": { + "description": "The names of the subscriptions that match the request.", "type": "array", "items": { "type": "string" } - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" } }, - "id": "Binding" + "id": "ListTopicSubscriptionsResponse" + }, + "PullResponse": { + "description": "Response for the `Pull` method.", + "type": "object", + "properties": { + "receivedMessages": { + "description": "Received Pub/Sub messages. The Pub/Sub system will return zero messages if\nthere are no more available in the backlog. The Pub/Sub system may return\nfewer than the `maxMessages` requested even if there are more messages\navailable in the backlog.", + "type": "array", + "items": { + "$ref": "ReceivedMessage" + } + } + }, + "id": "PullResponse" + }, + "ReceivedMessage": { + "description": "A message and its corresponding acknowledgment ID.", + "type": "object", + "properties": { + "ackId": { + "description": "This ID can be used to acknowledge the received message.", + "type": "string" + }, + "message": { + "$ref": "PubsubMessage", + "description": "The message." + } + }, + "id": "ReceivedMessage" + }, + "PushConfig": { + "description": "Configuration for a push delivery endpoint.", + "type": "object", + "properties": { + "pushEndpoint": { + "description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\".", + "type": "string" + }, + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the push message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the envelope (i.e. its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub\nAPI.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.", + "type": "object" + } + }, + "id": "PushConfig" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsResponse" + }, + "PullRequest": { + "description": "Request for the `Pull` method.", + "type": "object", + "properties": { + "returnImmediately": { + "description": "If this is specified as true the system will respond immediately even if\nit is not able to return a message in the `Pull` response. Otherwise the\nsystem is allowed to wait until at least one message is available rather\nthan returning no messages. The client may cancel the request if it does\nnot wish to wait any longer for the response.", + "type": "boolean" + }, + "maxMessages": { + "description": "The maximum number of messages returned for this request. The Pub/Sub\nsystem may return fewer than the number specified.", + "format": "int32", + "type": "integer" + } + }, + "id": "PullRequest" + }, + "ListSubscriptionsResponse": { + "description": "Response for the `ListSubscriptions` method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "If not empty, indicates that there may be more subscriptions that match\nthe request; this value should be passed in a new\n`ListSubscriptionsRequest` to get more subscriptions.", + "type": "string" + }, + "subscriptions": { + "description": "The subscriptions that match the request.", + "type": "array", + "items": { + "$ref": "Subscription" + } + } + }, + "id": "ListSubscriptionsResponse" + }, + "PublishRequest": { + "description": "Request for the Publish method.", + "type": "object", + "properties": { + "messages": { + "description": "The messages to publish.", + "type": "array", + "items": { + "$ref": "PubsubMessage" + } + } + }, + "id": "PublishRequest" + }, + "PublishResponse": { + "description": "Response for the `Publish` method.", + "type": "object", + "properties": { + "messageIds": { + "description": "The server-assigned ID of each published message, in the same order as\nthe messages in the request. IDs are guaranteed to be unique within\nthe topic.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "PublishResponse" + }, + "Subscription": { + "description": "A subscription resource.", + "type": "object", + "properties": { + "ackDeadlineSeconds": { + "description": "This value is the maximum time after a subscriber receives a message\nbefore the subscriber should acknowledge the message. After message\ndelivery but before the ack deadline expires and before the message is\nacknowledged, it is an outstanding message and will not be delivered\nagain during that time (on a best-effort basis).\n\nFor pull subscriptions, this value is used as the initial value for the ack\ndeadline. To override this value for a given message, call\n`ModifyAckDeadline` with the corresponding `ack_id` if using pull.\nThe maximum custom deadline you can specify is 600 seconds (10 minutes).\n\nFor push delivery, this value is also used to set the request timeout for\nthe call to the push endpoint.\n\nIf the subscriber never acknowledges the message, the Pub/Sub\nsystem will eventually redeliver the message.\n\nIf this parameter is 0, a default value of 10 seconds is used.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`.", + "type": "string" + }, + "topic": { + "description": "The name of the topic from which this subscription is receiving messages.\nThe value of this field will be `_deleted-topic_` if the topic has been\ndeleted.", + "type": "string" + }, + "pushConfig": { + "$ref": "PushConfig", + "description": "If push delivery is used with this subscription, this field is\nused to configure it. An empty `pushConfig` signifies that the subscriber\nwill pull and ack messages using API methods." + } + }, + "id": "Subscription" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsRequest" } }, - "revision": "20161122", - "basePath": "", + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "discoveryVersion": "v1", + "version": "v1beta2", "baseUrl": "https://pubsub.googleapis.com/", + "canonicalName": "Pubsub", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/pubsub": { + "description": "View and manage Pub/Sub topics and subscriptions" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "kind": "discovery#restDescription", + "description": "Provides reliable, many-to-many, asynchronous messaging between applications.\n", + "servicePath": "", + "rootUrl": "https://pubsub.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", "name": "pubsub", + "batchPath": "batch", + "revision": "20170502", + "documentationLink": "https://cloud.google.com/pubsub/docs", + "id": "pubsub:v1beta2", + "title": "Google Cloud Pub/Sub API", + "discoveryVersion": "v1", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "topics": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "GET", + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:getIamPolicy", + "path": "v1beta2/{+resource}:getIamPolicy", + "id": "pubsub.projects.topics.getIamPolicy" + }, + "get": { + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", + "id": "pubsub.projects.topics.get", + "path": "v1beta2/{+topic}", + "description": "Gets the configuration of a topic.", + "httpMethod": "GET", + "parameterOrder": [ + "topic" + ], + "response": { + "$ref": "Topic" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "topic": { + "description": "The name of the topic to get.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + } + }, + "publish": { + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:publish", + "path": "v1beta2/{+topic}:publish", + "id": "pubsub.projects.topics.publish", + "description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic\ndoes not exist. The message payload must not be empty; it must contain\n either a non-empty data field, or at least one attribute.", + "request": { + "$ref": "PublishRequest" + }, + "response": { + "$ref": "PublishResponse" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "topic": { + "description": "The messages in the request will be published on this topic.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + } + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:testIamPermissions", + "id": "pubsub.projects.topics.testIamPermissions", + "path": "v1beta2/{+resource}:testIamPermissions" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "topic" + ], + "httpMethod": "DELETE", + "parameters": { + "topic": { + "description": "Name of the topic to delete.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", + "path": "v1beta2/{+topic}", + "id": "pubsub.projects.topics.delete", + "description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic\ndoes not exist. After a topic is deleted, a new topic may be created with\nthe same name; this is an entirely new topic with none of the old\nconfiguration or subscriptions. Existing subscriptions to this topic are\nnot deleted, but their `topic` field is set to `_deleted-topic_`." + }, + "list": { + "description": "Lists matching topics.", + "response": { + "$ref": "ListTopicsResponse" + }, + "parameterOrder": [ + "project" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of topics to return.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "project": { + "location": "path", + "description": "The name of the cloud project that topics belong to.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + }, + "pageToken": { + "description": "The value returned by the last `ListTopicsResponse`; indicates that this is\na continuation of a prior `ListTopics` call, and that the system should\nreturn the next page of data.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/topics", + "path": "v1beta2/{+project}/topics", + "id": "pubsub.projects.topics.list" + }, + "setIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:setIamPolicy", + "path": "v1beta2/{+resource}:setIamPolicy", + "id": "pubsub.projects.topics.setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + } + }, + "create": { + "response": { + "$ref": "Topic" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "parameters": { + "name": { + "description": "The name of the topic. It must have the format\n`\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter,\nand contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),\nunderscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent\nsigns (`%`). It must be between 3 and 255 characters in length, and it\nmust not start with `\"goog\"`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", + "path": "v1beta2/{+name}", + "id": "pubsub.projects.topics.create", + "request": { + "$ref": "Topic" + }, + "description": "Creates the given topic with the given name." + } + }, + "resources": { + "subscriptions": { + "methods": { + "list": { + "description": "Lists the name of the subscriptions for this topic.", + "httpMethod": "GET", + "parameterOrder": [ + "topic" + ], + "response": { + "$ref": "ListTopicSubscriptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of subscription names to return.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "topic": { + "location": "path", + "description": "The name of the topic that subscriptions are attached to.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/topics/[^/]+$" + }, + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListTopicSubscriptionsResponse`; indicates\nthat this is a continuation of a prior `ListTopicSubscriptions` call, and\nthat the system should return the next page of data.", + "type": "string" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}/subscriptions", + "id": "pubsub.projects.topics.subscriptions.list", + "path": "v1beta2/{+topic}/subscriptions" + } + } + } + } + }, + "subscriptions": { + "methods": { + "acknowledge": { + "description": "Acknowledges the messages associated with the `ack_ids` in the\n`AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages\nfrom the subscription.\n\nAcknowledging a message whose ack deadline has expired may succeed,\nbut such a message may be redelivered later. Acknowledging a message more\nthan once will not result in an error.", + "request": { + "$ref": "AcknowledgeRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "location": "path", + "description": "The subscription whose message is being acknowledged.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:acknowledge", + "path": "v1beta2/{+subscription}:acknowledge", + "id": "pubsub.projects.subscriptions.acknowledge" + }, + "modifyAckDeadline": { + "request": { + "$ref": "ModifyAckDeadlineRequest" + }, + "description": "Modifies the ack deadline for a specific message. This method is useful\nto indicate that more time is needed to process a message by the\nsubscriber, or to make the message available for redelivery if the\nprocessing was interrupted. Note that this does not modify the\nsubscription-level `ackDeadlineSeconds` used for subsequent messages.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "POST", + "parameters": { + "subscription": { + "location": "path", + "description": "The name of the subscription.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", + "path": "v1beta2/{+subscription}:modifyAckDeadline", + "id": "pubsub.projects.subscriptions.modifyAckDeadline" + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", + "path": "v1beta2/{+resource}:getIamPolicy", + "id": "pubsub.projects.subscriptions.getIamPolicy" + }, + "get": { + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", + "id": "pubsub.projects.subscriptions.get", + "path": "v1beta2/{+subscription}", + "description": "Gets the configuration details of a subscription.", + "httpMethod": "GET", + "parameterOrder": [ + "subscription" + ], + "response": { + "$ref": "Subscription" + }, + "parameters": { + "subscription": { + "location": "path", + "description": "The name of the subscription to get.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + }, + "testIamPermissions": { + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", + "path": "v1beta2/{+resource}:testIamPermissions", + "id": "pubsub.projects.subscriptions.testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + } + }, + "modifyPushConfig": { + "description": "Modifies the `PushConfig` for a specified subscription.\n\nThis may be used to change a push subscription to a pull one (signified by\nan empty `PushConfig`) or vice versa, or change the endpoint URL and other\nattributes of a push subscription. Messages will accumulate for delivery\ncontinuously through the call regardless of changes to the `PushConfig`.", + "request": { + "$ref": "ModifyPushConfigRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "subscription" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "description": "The name of the subscription.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig", + "id": "pubsub.projects.subscriptions.modifyPushConfig", + "path": "v1beta2/{+subscription}:modifyPushConfig" + }, + "delete": { + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", + "id": "pubsub.projects.subscriptions.delete", + "path": "v1beta2/{+subscription}", + "description": "Deletes an existing subscription. All pending messages in the subscription\nare immediately dropped. Calls to `Pull` after deletion will return\n`NOT_FOUND`. After a subscription is deleted, a new one may be created with\nthe same name, but the new one has no association with the old\nsubscription, or its topic unless the same topic is specified.", + "httpMethod": "DELETE", + "parameterOrder": [ + "subscription" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "subscription": { + "location": "path", + "description": "The subscription to delete.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + } + }, + "pull": { + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", + "path": "v1beta2/{+subscription}:pull", + "id": "pubsub.projects.subscriptions.pull", + "request": { + "$ref": "PullRequest" + }, + "description": "Pulls messages from the server. Returns an empty list if there are no\nmessages available in the backlog. The server may return `UNAVAILABLE` if\nthere are too many concurrent pull requests pending for the given\nsubscription.", + "response": { + "$ref": "PullResponse" + }, + "parameterOrder": [ + "subscription" + ], + "httpMethod": "POST", + "parameters": { + "subscription": { + "description": "The subscription from which messages should be pulled.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + }, + "list": { + "description": "Lists matching subscriptions.", + "httpMethod": "GET", + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "ListSubscriptionsResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListSubscriptionsResponse`; indicates that\nthis is a continuation of a prior `ListSubscriptions` call, and that the\nsystem should return the next page of data.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Maximum number of subscriptions to return.", + "format": "int32", + "type": "integer" + }, + "project": { + "location": "path", + "description": "The name of the cloud project that subscriptions belong to.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/subscriptions", + "id": "pubsub.projects.subscriptions.list", + "path": "v1beta2/{+project}/subscriptions" + }, + "create": { + "response": { + "$ref": "Subscription" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the subscription. It must have the format\n`\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must\nstart with a letter, and contain only letters (`[A-Za-z]`), numbers\n(`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),\nplus (`+`) or percent signs (`%`). It must be between 3 and 255 characters\nin length, and it must not start with `\"goog\"`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", + "path": "v1beta2/{+name}", + "id": "pubsub.projects.subscriptions.create", + "description": "Creates a subscription to a given topic.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic. Note that\nfor REST API requests, you must specify a name.", + "request": { + "$ref": "Subscription" + } + }, + "setIamPolicy": { + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/subscriptions/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ], + "flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", + "path": "v1beta2/{+resource}:setIamPolicy", + "id": "pubsub.projects.subscriptions.setIamPolicy" + } + } + } + } + } + }, "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, "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", @@ -999,52 +992,29 @@ }, "pp": { "description": "Pretty-print response.", - "default": "true", "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", + "default": "true", "location": "query" }, "oauth_token": { + "location": "query", "description": "OAuth 2.0 token for the current user.", - "type": "string", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", "location": "query" }, "uploadType": { @@ -1052,23 +1022,54 @@ "type": "string", "location": "query" }, - "bearer_token": { - "description": "OAuth bearer token.", + "fields": { + "description": "Selector specifying which fields to include in a partial response.", "type": "string", "location": "query" }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "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" + }, + "access_token": { + "description": "OAuth access token.", "type": "string", "location": "query" } - }, - "documentationLink": "https://cloud.google.com/pubsub/docs", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v1beta2", - "rootUrl": "https://pubsub.googleapis.com/", - "kind": "discovery#restDescription" + } } diff --git a/etc/api/qpxexpress/v1/qpxexpress-api.json b/etc/api/qpxexpress/v1/qpxexpress-api.json index 075e71efa0..dcde139919 100644 --- a/etc/api/qpxexpress/v1/qpxexpress-api.json +++ b/etc/api/qpxexpress/v1/qpxexpress-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/2IuExnuYIfWTklADntnFv6u9T0g\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/2IuExnuYIfWTklADntnFv6u9T0g\"", "discoveryVersion": "v1", "id": "qpxExpress:v1", "name": "qpxExpress", diff --git a/etc/api/replicapool/v1beta1/replicapool-api.json b/etc/api/replicapool/v1beta1/replicapool-api.json index 6ec1fc44db..f45c833c99 100644 --- a/etc/api/replicapool/v1beta1/replicapool-api.json +++ b/etc/api/replicapool/v1beta1/replicapool-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/jlteK0NbZ8atlXF9lM-OU-ZamcA\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/jlteK0NbZ8atlXF9lM-OU-ZamcA\"", "discoveryVersion": "v1", "id": "replicapool:v1beta1", "name": "replicapool", diff --git a/etc/api/replicapool/v1beta2/replicapool-api.json b/etc/api/replicapool/v1beta2/replicapool-api.json index 19a1ee5f62..035368bc31 100644 --- a/etc/api/replicapool/v1beta2/replicapool-api.json +++ b/etc/api/replicapool/v1beta2/replicapool-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/TeJ87k5AaNhxSfkpXHKHkISW9Dw\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/TeJ87k5AaNhxSfkpXHKHkISW9Dw\"", "discoveryVersion": "v1", "id": "replicapool:v1beta2", "name": "replicapool", diff --git a/etc/api/replicapoolupdater/v1beta1/replicapoolupdater-api.json b/etc/api/replicapoolupdater/v1beta1/replicapoolupdater-api.json index 63a099ac1d..1f771a5bca 100644 --- a/etc/api/replicapoolupdater/v1beta1/replicapoolupdater-api.json +++ b/etc/api/replicapoolupdater/v1beta1/replicapoolupdater-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/UEKDxDt-gBRW5wBq_kkcVGVpuQc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/UEKDxDt-gBRW5wBq_kkcVGVpuQc\"", "discoveryVersion": "v1", "id": "replicapoolupdater:v1beta1", "name": "replicapoolupdater", diff --git a/etc/api/reseller/v1/reseller-api.json b/etc/api/reseller/v1/reseller-api.json index d97ad040f0..0d9997fc99 100644 --- a/etc/api/reseller/v1/reseller-api.json +++ b/etc/api/reseller/v1/reseller-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/n63v3jbq0NMxEV0nJ3he6mTRpog\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/X8_Q_t3uaU1QrzrqghkL9l2OAyo\"", "discoveryVersion": "v1", "id": "reseller:v1", "name": "reseller", "version": "v1", - "revision": "20160329", + "revision": "20170228", "title": "Enterprise Apps Reseller API", "description": "Creates and manages your customers and their subscriptions.", "ownerDomain": "google.com", @@ -89,44 +89,44 @@ "properties": { "addressLine1": { "type": "string", - "description": "Address line 1 of the address." + "description": "A customer's physical address. An address can be composed of one to three lines. The addressline2 and addressLine3 are optional." }, "addressLine2": { "type": "string", - "description": "Address line 2 of the address." + "description": "Line 2 of the address." }, "addressLine3": { "type": "string", - "description": "Address line 3 of the address." + "description": "Line 3 of the address." }, "contactName": { "type": "string", - "description": "Name of the contact person." + "description": "The customer contact's name. This is required." }, "countryCode": { "type": "string", - "description": "ISO 3166 country code." + "description": "For countryCode information, see the ISO 3166 country code elements. Verify that country is approved for resale of Google products. This property is required when creating a new customer." }, "kind": { "type": "string", - "description": "Identifies the resource as a customer address.", + "description": "Identifies the resource as a customer address. Value: customers#address", "default": "customers#address" }, "locality": { "type": "string", - "description": "Name of the locality. This is in accordance with - http://portablecontacts.net/draft-spec.html#address_element." + "description": "An example of a locality value is the city of San Francisco." }, "organizationName": { "type": "string", - "description": "Name of the organization." + "description": "The company or company division name. This is required." }, "postalCode": { "type": "string", - "description": "The postal code. This is in accordance with - http://portablecontacts.net/draft-spec.html#address_element." + "description": "A postalCode example is a postal zip code such as 94043. This property is required when creating a new customer." }, "region": { "type": "string", - "description": "Name of the region. This is in accordance with - http://portablecontacts.net/draft-spec.html#address_element." + "description": "An example of a region value is CA for the state of California." } } }, @@ -137,24 +137,24 @@ "properties": { "dealCode": { "type": "string", - "description": "External name of the deal code applicable for the subscription. This field is optional. If missing, the deal price plan won't be used." + "description": "Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in changePlan request in order to receive discounted rate. This property is optional. If a deal code has already been added to a subscription, this property may be left empty and the existing discounted rate will still apply (if not empty, only provide the deal code that is already present on the subscription). If a deal code has never been added to a subscription and this property is left blank, regular pricing will apply." }, "kind": { "type": "string", - "description": "Identifies the resource as a subscription change plan request.", + "description": "Identifies the resource as a subscription change plan request. Value: subscriptions#changePlanRequest", "default": "subscriptions#changePlanRequest" }, "planName": { "type": "string", - "description": "Name of the plan to change to." + "description": "The planName property is required. This is the name of the subscription's payment plan. For more information about the Google payment plans, see API concepts.\n\nPossible values are: \n- ANNUAL_MONTHLY_PAY - The annual commitment plan with monthly payments \n- ANNUAL_YEARLY_PAY - The annual commitment plan with yearly payments \n- FLEXIBLE - The flexible plan \n- TRIAL - The 30-day free trial plan" }, "purchaseOrderId": { "type": "string", - "description": "Purchase order id for your order tracking purposes." + "description": "This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters." }, "seats": { "$ref": "Seats", - "description": "Number/Limit of seats in the new plan." + "description": "This is a required property. The seats property is the number of user seat licenses." } } }, @@ -165,11 +165,11 @@ "properties": { "alternateEmail": { "type": "string", - "description": "The alternate email of the customer." + "description": "Like the \"Customer email\" in the reseller tools, this email is the secondary contact used if something happens to the customer's service such as service outage or a security issue. This property is required when creating a new customer and should not use the same domain as customerDomain." }, "customerDomain": { "type": "string", - "description": "The domain name of the customer." + "description": "The customer's primary domain name string. customerDomain is required when creating a new customer. Do not include the www prefix in the domain when adding a customer." }, "customerDomainVerified": { "type": "boolean", @@ -177,24 +177,24 @@ }, "customerId": { "type": "string", - "description": "The id of the customer." + "description": "This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google." }, "kind": { "type": "string", - "description": "Identifies the resource as a customer.", + "description": "Identifies the resource as a customer. Value: reseller#customer", "default": "reseller#customer" }, "phoneNumber": { "type": "string", - "description": "The phone number of the customer." + "description": "Customer contact phone number. This can be continuous numbers, with spaces, etc. But it must be a real phone number and not, for example, \"123\". See phone local format conventions." }, "postalAddress": { "$ref": "Address", - "description": "The postal address of the customer." + "description": "A customer's address information. Each field has a limit of 255 charcters." }, "resourceUiUrl": { "type": "string", - "description": "Ui url for customer resource." + "description": "URL to customer's Admin console dashboard. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task in the Admin console." } } }, @@ -205,12 +205,41 @@ "properties": { "kind": { "type": "string", - "description": "Identifies the resource as a subscription renewal setting.", + "description": "Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings", "default": "subscriptions#renewalSettings" }, "renewalType": { "type": "string", - "description": "Subscription renewal type." + "description": "Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property." + } + } + }, + "ResellernotifyGetwatchdetailsResponse": { + "id": "ResellernotifyGetwatchdetailsResponse", + "type": "object", + "description": "JSON template for resellernotify getwatchdetails response.", + "properties": { + "serviceAccountEmailAddresses": { + "type": "array", + "description": "List of registered service accounts.", + "items": { + "type": "string" + } + }, + "topicName": { + "type": "string", + "description": "Topic name of the PubSub" + } + } + }, + "ResellernotifyResource": { + "id": "ResellernotifyResource", + "type": "object", + "description": "JSON template for resellernotify response.", + "properties": { + "topicName": { + "type": "string", + "description": "Topic name of the PubSub" } } }, @@ -221,7 +250,7 @@ "properties": { "kind": { "type": "string", - "description": "Identifies the resource as a subscription change plan request.", + "description": "Identifies the resource as a subscription change plan request. Value: subscriptions#seats", "default": "subscriptions#seats" }, "licensedNumberOfSeats": { @@ -231,12 +260,12 @@ }, "maximumNumberOfSeats": { "type": "integer", - "description": "Maximum number of seats that can be purchased. This needs to be provided only for a non-commitment plan. For a commitment plan it is decided by the contract.", + "description": "The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan: \n- annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response. \n- flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account. \n- 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.", "format": "int32" }, "numberOfSeats": { "type": "integer", - "description": "Number of seats to purchase. This is applicable only for a commitment plan.", + "description": "The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan: \n- annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users. \n- flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers. \n- 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.", "format": "int32" } } @@ -248,11 +277,11 @@ "properties": { "billingMethod": { "type": "string", - "description": "Billing method of this subscription." + "description": "Read-only field that returns the current billing method for a subscription." }, "creationTime": { "type": "string", - "description": "Creation time of this subscription in milliseconds since Unix epoch.", + "description": "The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.", "format": "int64" }, "customerDomain": { @@ -261,108 +290,113 @@ }, "customerId": { "type": "string", - "description": "The id of the customer to whom the subscription belongs." + "description": "This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google." }, "dealCode": { "type": "string", - "description": "External name of the deal, if this subscription was provisioned under one. Otherwise this field will be empty." + "description": "Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty." }, "kind": { "type": "string", - "description": "Identifies the resource as a Subscription.", + "description": "Identifies the resource as a Subscription. Value: reseller#subscription", "default": "reseller#subscription" }, "plan": { "type": "object", - "description": "Plan details of the subscription", + "description": "The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API\"s payment plans, see the API concepts.", "properties": { "commitmentInterval": { "type": "object", - "description": "Interval of the commitment if it is a commitment plan.", + "description": "In this version of the API, annual commitment plan's interval is one year.", "properties": { "endTime": { "type": "string", - "description": "End time of the commitment interval in milliseconds since Unix epoch.", + "description": "An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.", "format": "int64" }, "startTime": { "type": "string", - "description": "Start time of the commitment interval in milliseconds since Unix epoch.", + "description": "An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.", "format": "int64" } } }, "isCommitmentPlan": { "type": "boolean", - "description": "Whether the plan is a commitment plan or not." + "description": "The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:\n- true — The subscription's plan is an annual commitment plan.\n- false — The plan is not an annual commitment plan." }, "planName": { "type": "string", - "description": "The plan name of this subscription's plan." + "description": "The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.\n\nPossible values are: \n- ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments \n- ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments \n- FLEXIBLE — The flexible plan \n- TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService." } } }, "purchaseOrderId": { "type": "string", - "description": "Purchase order id for your order tracking purposes." + "description": "This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters." }, "renewalSettings": { "$ref": "RenewalSettings", - "description": "Renewal settings of the subscription." + "description": "Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center." }, "resourceUiUrl": { "type": "string", - "description": "Ui url for subscription resource." + "description": "URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console." }, "seats": { "$ref": "Seats", - "description": "Number/Limit of seats in the new plan." + "description": "This is a required property. The number and limit of user seat licenses in the plan." }, "skuId": { "type": "string", - "description": "Name of the sku for which this subscription is purchased." + "description": "A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs." + }, + "skuName": { + "type": "string", + "description": "Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs." }, "status": { "type": "string", - "description": "Status of the subscription." + "description": "This is an optional property." }, "subscriptionId": { "type": "string", - "description": "The id of the subscription." + "description": "The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions." }, "suspensionReasons": { "type": "array", - "description": "Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed. Possible options include: \n- PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the Google Apps Resold Terms of Services. \n- RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term. \n- RESELLER_INITIATED - A manual suspension invoked by a Reseller. \n- TRIAL_ENDED - The customer's trial expired without a plan selected. \n- OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).", + "description": "Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.\n\nPossible options include: \n- PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services. \n- RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term. \n- RESELLER_INITIATED - A manual suspension invoked by a Reseller. \n- TRIAL_ENDED - The customer's trial expired without a plan selected. \n- OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).", "items": { "type": "string" } }, "transferInfo": { "type": "object", - "description": "Transfer related information for the subscription.", + "description": "Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.", "properties": { "minimumTransferableSeats": { "type": "integer", + "description": "When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.", "format": "int32" }, "transferabilityExpirationTime": { "type": "string", - "description": "Time when transfer token or intent to transfer will expire.", + "description": "The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.", "format": "int64" } } }, "trialSettings": { "type": "object", - "description": "Trial Settings of the subscription.", + "description": "The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.", "properties": { "isInTrial": { "type": "boolean", - "description": "Whether the subscription is in trial." + "description": "Determines if a subscription's plan is in a 30-day free trial or not:\n- true — The plan is in trial.\n- false — The plan is not in trial." }, "trialEndTime": { "type": "string", - "description": "End time of the trial in milliseconds since Unix epoch.", + "description": "Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.", "format": "int64" } } @@ -376,7 +410,7 @@ "properties": { "kind": { "type": "string", - "description": "Identifies the resource as a collection of subscriptions.", + "description": "Identifies the resource as a collection of subscriptions. Value: reseller#subscriptions", "default": "reseller#subscriptions" }, "nextPageToken": { @@ -400,11 +434,11 @@ "id": "reseller.customers.get", "path": "customers/{customerId}", "httpMethod": "GET", - "description": "Gets a customer resource if one exists and is owned by the reseller.", + "description": "Get a customer account.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" } @@ -424,11 +458,11 @@ "id": "reseller.customers.insert", "path": "customers", "httpMethod": "POST", - "description": "Creates a customer resource if one does not already exist.", + "description": "Order a new customer's account.", "parameters": { "customerAuthToken": { "type": "string", - "description": "An auth token needed for inserting a customer for which domain already exists. Can be generated at https://admin.google.com/TransferToken. Optional.", + "description": "The customerAuthToken query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.", "location": "query" } }, @@ -446,11 +480,11 @@ "id": "reseller.customers.patch", "path": "customers/{customerId}", "httpMethod": "PATCH", - "description": "Update a customer resource if one it exists and is owned by the reseller. This method supports patch semantics.", + "description": "Update a customer account's settings. This method supports patch semantics.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" } @@ -472,11 +506,11 @@ "id": "reseller.customers.update", "path": "customers/{customerId}", "httpMethod": "PUT", - "description": "Update a customer resource if one it exists and is owned by the reseller.", + "description": "Update a customer account's settings.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" } @@ -496,6 +530,61 @@ } } }, + "resellernotify": { + "methods": { + "getwatchdetails": { + "id": "reseller.resellernotify.getwatchdetails", + "path": "resellernotify/getwatchdetails", + "httpMethod": "GET", + "description": "Returns all the details of the watch corresponding to the reseller.", + "response": { + "$ref": "ResellernotifyGetwatchdetailsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order", + "https://www.googleapis.com/auth/apps.order.readonly" + ] + }, + "register": { + "id": "reseller.resellernotify.register", + "path": "resellernotify/register", + "httpMethod": "POST", + "description": "Registers a Reseller for receiving notifications.", + "parameters": { + "serviceAccountEmailAddress": { + "type": "string", + "description": "The service account which will own the created Cloud-PubSub topic.", + "location": "query" + } + }, + "response": { + "$ref": "ResellernotifyResource" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "unregister": { + "id": "reseller.resellernotify.unregister", + "path": "resellernotify/unregister", + "httpMethod": "POST", + "description": "Unregisters a Reseller for receiving notifications.", + "parameters": { + "serviceAccountEmailAddress": { + "type": "string", + "description": "The service account which owns the Cloud-PubSub topic.", + "location": "query" + } + }, + "response": { + "$ref": "ResellernotifyResource" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + } + } + }, "subscriptions": { "methods": { "activate": { @@ -506,13 +595,13 @@ "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" }, "subscriptionId": { "type": "string", - "description": "Id of the subscription, which is unique for a customer", + "description": "This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.", "required": true, "location": "path" } @@ -532,17 +621,17 @@ "id": "reseller.subscriptions.changePlan", "path": "customers/{customerId}/subscriptions/{subscriptionId}/changePlan", "httpMethod": "POST", - "description": "Changes the plan of a subscription", + "description": "Update a subscription plan. Use this method to update a plan for a 30-day trial or a flexible plan subscription to an annual commitment plan with monthly or yearly payments.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" }, "subscriptionId": { "type": "string", - "description": "Id of the subscription, which is unique for a customer", + "description": "This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.", "required": true, "location": "path" } @@ -565,17 +654,17 @@ "id": "reseller.subscriptions.changeRenewalSettings", "path": "customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings", "httpMethod": "POST", - "description": "Changes the renewal settings of a subscription", + "description": "Update a user license's renewal settings. This is applicable for accounts with annual commitment plans only.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" }, "subscriptionId": { "type": "string", - "description": "Id of the subscription, which is unique for a customer", + "description": "This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.", "required": true, "location": "path" } @@ -598,17 +687,17 @@ "id": "reseller.subscriptions.changeSeats", "path": "customers/{customerId}/subscriptions/{subscriptionId}/changeSeats", "httpMethod": "POST", - "description": "Changes the seats configuration of a subscription", + "description": "Update a subscription's user license settings.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" }, "subscriptionId": { "type": "string", - "description": "Id of the subscription, which is unique for a customer", + "description": "This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.", "required": true, "location": "path" } @@ -631,17 +720,17 @@ "id": "reseller.subscriptions.delete", "path": "customers/{customerId}/subscriptions/{subscriptionId}", "httpMethod": "DELETE", - "description": "Cancels/Downgrades a subscription.", + "description": "Cancel, suspend or transfer a subscription to direct.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" }, "deletionType": { "type": "string", - "description": "Whether the subscription is to be fully cancelled or downgraded", + "description": "The deletionType query string enables the cancellation, downgrade, or suspension of a subscription.", "required": true, "enum": [ "cancel", @@ -650,16 +739,16 @@ "transfer_to_direct" ], "enumDescriptions": [ - "Cancels the subscription immediately", - "Downgrades a Google Apps for Business subscription to Google Apps", - "Suspends the subscriptions for 4 days before cancelling it", - "Transfers a subscription directly to Google" + "Cancels the subscription immediately. This does not apply to a G Suite subscription.", + "Downgrades a G Suite subscription to a Google Apps Free edition subscription only if the customer was initially subscribed to a Google Apps Free edition (also known as the Standard edition). Once downgraded, the customer no longer has access to the previous G Suite subscription and is no longer managed by the reseller.\n\nA G Suite subscription's downgrade cannot be invoked if an active or suspended Google Drive or Google Vault subscription is present. The Google Drive or Google Vault subscription must be cancelled before the G Suite subscription's downgrade is invoked.\n\nThe downgrade deletionType does not apply to other products or G Suite SKUs.", + "(DEPRECATED) The G Suite account is suspended for four days and then cancelled. Once suspended, an administrator has access to the suspended account, but the account users can not access their services. A suspension can be lifted, using the reseller tools.\n\nA G Suite subscription's suspension can not be invoked if an active or suspended Google Drive or Google Vault subscription is present. The Google Drive or Google Vault subscription must be cancelled before the G Suite subscription's suspension is invoked.", + "Transfers a subscription directly to Google.  The customer is immediately transferred to a direct billing relationship with Google and is given a short amount of time with no service interruption. The customer can then choose to set up billing directly with Google by using a credit card, or they can transfer to another reseller." ], "location": "query" }, "subscriptionId": { "type": "string", - "description": "Id of the subscription, which is unique for a customer", + "description": "This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.", "required": true, "location": "path" } @@ -677,17 +766,17 @@ "id": "reseller.subscriptions.get", "path": "customers/{customerId}/subscriptions/{subscriptionId}", "httpMethod": "GET", - "description": "Gets a subscription of the customer.", + "description": "Get a specific subscription.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" }, "subscriptionId": { "type": "string", - "description": "Id of the subscription, which is unique for a customer", + "description": "This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.", "required": true, "location": "path" } @@ -708,16 +797,16 @@ "id": "reseller.subscriptions.insert", "path": "customers/{customerId}/subscriptions", "httpMethod": "POST", - "description": "Creates/Transfers a subscription for the customer.", + "description": "Create or transfer a subscription.", "parameters": { "customerAuthToken": { "type": "string", - "description": "An auth token needed for transferring a subscription. Can be generated at https://www.google.com/a/cpanel/customer-domain/TransferToken. Optional.", + "description": "The customerAuthToken query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.", "location": "query" }, "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" } @@ -739,26 +828,26 @@ "id": "reseller.subscriptions.list", "path": "subscriptions", "httpMethod": "GET", - "description": "Lists subscriptions of a reseller, optionally filtered by a customer name prefix.", + "description": "List of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions.", "parameters": { "customerAuthToken": { "type": "string", - "description": "An auth token needed if the customer is not a resold customer of this reseller. Can be generated at https://www.google.com/a/cpanel/customer-domain/TransferToken.Optional.", + "description": "The customerAuthToken query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.", "location": "query" }, "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "location": "query" }, "customerNamePrefix": { "type": "string", - "description": "Prefix of the customer's domain name by which the subscriptions should be filtered. Optional", + "description": "When retrieving all of your subscriptions and filtering for specific customers, you can enter a prefix for a customer name. Using an example customer group that includes exam.com, example20.com and example.com: \n- exa -- Returns all customer names that start with 'exa' which could include exam.com, example20.com, and example.com. A name prefix is similar to using a regular expression's asterisk, exa*. \n- example -- Returns example20.com and example.com.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Maximum number of results to return", + "description": "When retrieving a large list, the maxResults is the maximum number of results per page. The nextPageToken value takes you to the next page. The default is 20.", "format": "uint32", "minimum": "1", "maximum": "100", @@ -782,17 +871,17 @@ "id": "reseller.subscriptions.startPaidService", "path": "customers/{customerId}/subscriptions/{subscriptionId}/startPaidService", "httpMethod": "POST", - "description": "Starts paid service of a trial subscription", + "description": "Immediately move a 30-day free trial subscription to a paid service subscription.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" }, "subscriptionId": { "type": "string", - "description": "Id of the subscription, which is unique for a customer", + "description": "This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.", "required": true, "location": "path" } @@ -812,17 +901,17 @@ "id": "reseller.subscriptions.suspend", "path": "customers/{customerId}/subscriptions/{subscriptionId}/suspend", "httpMethod": "POST", - "description": "Suspends an active subscription", + "description": "Suspends an active subscription.", "parameters": { "customerId": { "type": "string", - "description": "Id of the Customer", + "description": "Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.", "required": true, "location": "path" }, "subscriptionId": { "type": "string", - "description": "Id of the subscription, which is unique for a customer", + "description": "This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method.", "required": true, "location": "path" } diff --git a/etc/api/resourceviews/v1beta1/resourceviews-api.json b/etc/api/resourceviews/v1beta1/resourceviews-api.json index 2c53f99e43..3e8602b694 100644 --- a/etc/api/resourceviews/v1beta1/resourceviews-api.json +++ b/etc/api/resourceviews/v1beta1/resourceviews-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/HxZRDFK7f86Z7kwjlvcp4S6C4Oc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/HxZRDFK7f86Z7kwjlvcp4S6C4Oc\"", "discoveryVersion": "v1", "id": "resourceviews:v1beta1", "name": "resourceviews", diff --git a/etc/api/resourceviews/v1beta2/resourceviews-api.json b/etc/api/resourceviews/v1beta2/resourceviews-api.json index 863f48530c..049ffe69ca 100644 --- a/etc/api/resourceviews/v1beta2/resourceviews-api.json +++ b/etc/api/resourceviews/v1beta2/resourceviews-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/lDspG_RuIpldIEGq_lxUn6PFZOk\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/lDspG_RuIpldIEGq_lxUn6PFZOk\"", "discoveryVersion": "v1", "id": "resourceviews:v1beta2", "name": "resourceviews", diff --git a/etc/api/runtimeconfig/v1/runtimeconfig-api.json b/etc/api/runtimeconfig/v1/runtimeconfig-api.json index eb858f7e6e..ae2fb0ce9d 100644 --- a/etc/api/runtimeconfig/v1/runtimeconfig-api.json +++ b/etc/api/runtimeconfig/v1/runtimeconfig-api.json @@ -1,124 +1,40 @@ { - "id": "runtimeconfig:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloudruntimeconfig": { - "description": "Manage your Google Cloud Platform services' runtime configuration" - } - } - } - }, - "description": "Provides capabilities for dynamic configuration and coordination for applications running on Google Cloud Platform.\n", - "protocol": "rest", - "title": "Google Cloud RuntimeConfig API", - "resources": { - "operations": { - "methods": { - "list": { - "id": "runtimeconfig.operations.list", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "name" - ], - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`.", - "flatPath": "v1/operations", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "The standard list page size.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation collection.", - "required": true, - "pattern": "^operations$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "delete": { - "id": "runtimeconfig.operations.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", - "flatPath": "v1/operations/{operationsId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "The name of the operation resource to be deleted.", - "required": true, - "pattern": "^operations/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "cancel": { - "id": "runtimeconfig.operations.cancel", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "request": { - "$ref": "CancelOperationRequest" - }, - "flatPath": "v1/operations/{operationsId}:cancel", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "required": true, - "pattern": "^operations/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}:cancel", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - } - } - } - }, + "discoveryVersion": "v1", + "version_module": "True", "schemas": { + "CancelOperationRequest": { + "properties": {}, + "id": "CancelOperationRequest", + "description": "The request message for Operations.CancelOperation.", + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "type": "object", @@ -137,108 +53,229 @@ }, "id": "ListOperationsResponse" }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "response": { + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + } + }, + "id": "Operation" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", "properties": {}, "id": "Empty" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - } - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - } - }, - "id": "Operation" - }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "type": "object", - "properties": {}, - "id": "CancelOperationRequest" } }, - "revision": "20161213", - "basePath": "", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", + "protocol": "rest", "canonicalName": "Cloud RuntimeConfig", - "discoveryVersion": "v1", - "baseUrl": "https://runtimeconfig.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloudruntimeconfig": { + "description": "Manage your Google Cloud Platform services' runtime configuration" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://runtimeconfig.googleapis.com/", + "ownerDomain": "google.com", "name": "runtimeconfig", + "batchPath": "batch", + "title": "Google Cloud Runtime Configuration API", + "ownerName": "Google", + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string", + "pattern": "^operations/.+$", + "location": "path" + } + }, + "flatPath": "v1/operations/{operationsId}:cancel", + "path": "v1/{+name}:cancel", + "id": "runtimeconfig.operations.cancel" + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "required": true, + "type": "string", + "pattern": "^operations/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1/operations/{operationsId}", + "id": "runtimeconfig.operations.delete", + "path": "v1/{+name}", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "description": "The name of the operation collection.", + "required": true, + "type": "string", + "pattern": "^operations$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + } + }, + "flatPath": "v1/operations", + "id": "runtimeconfig.operations.list", + "path": "v1/{+name}" + } + } + } + }, "parameters": { + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, "access_token": { "description": "OAuth access token.", "type": "string", "location": "query" }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, "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", - "location": "query" + "type": "string" }, "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.", @@ -247,47 +284,8 @@ }, "pp": { "description": "Pretty-print response.", - "default": "true", "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", + "default": "true", "location": "query" }, "oauth_token": { @@ -295,11 +293,6 @@ "type": "string", "location": "query" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, "bearer_token": { "description": "OAuth bearer token.", "type": "string", @@ -309,14 +302,21 @@ "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" } }, - "documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v1", - "rootUrl": "https://runtimeconfig.googleapis.com/", - "kind": "discovery#restDescription" + "baseUrl": "https://runtimeconfig.googleapis.com/", + "servicePath": "", + "kind": "discovery#restDescription", + "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.", + "basePath": "", + "revision": "20170429", + "documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", + "id": "runtimeconfig:v1" } diff --git a/etc/api/runtimeconfig/v1beta1/runtimeconfig-api.json b/etc/api/runtimeconfig/v1beta1/runtimeconfig-api.json index 688bd6ba0f..eb610f573f 100644 --- a/etc/api/runtimeconfig/v1beta1/runtimeconfig-api.json +++ b/etc/api/runtimeconfig/v1beta1/runtimeconfig-api.json @@ -1,725 +1,62 @@ { - "id": "runtimeconfig:v1beta1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloudruntimeconfig": { - "description": "Manage your Google Cloud Platform services' runtime configuration" - } - } - } - }, - "description": "Provides capabilities for dynamic configuration and coordination for applications running on Google Cloud Platform.\n", - "protocol": "rest", - "title": "Google Cloud RuntimeConfig API", - "resources": { - "projects": { - "resources": { - "configs": { - "resources": { - "variables": { - "methods": { - "watch": { - "id": "runtimeconfig.projects.configs.variables.watch", - "response": { - "$ref": "Variable" - }, - "parameterOrder": [ - "name" - ], - "description": "Watches a specific variable and waits for a change in the variable's value.\nWhen there is a change, this method returns the new value or times out.\n\nIf a variable is deleted while being watched, the `variableState` state is\nset to `DELETED` and the method returns the last known variable `value`.\n\nIf you set the deadline for watching to a larger value than internal timeout\n(60 seconds), the current variable value is returned and the `variableState`\nwill be `VARIABLE_STATE_UNSPECIFIED`.\n\nTo learn more about creating a watcher, read the\n[Watching a Variable for Changes](/deployment-manager/runtime-configurator/watching-a-variable)\ndocumentation.", - "request": { - "$ref": "WatchVariableRequest" - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:watch", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The name of the variable to watch, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}:watch", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "list": { - "id": "runtimeconfig.projects.configs.variables.list", - "response": { - "$ref": "ListVariablesResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists variables within given a configuration, matching any provided filters.\nThis only lists variable names, not the values.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "Filters variables by matching the specified filter. For example:\n\n`projects/example-project/config/[CONFIG_NAME]/variables/example-variable`.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The path to the RuntimeConfig resource for which you want to list variables.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/variables", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "get": { - "id": "runtimeconfig.projects.configs.variables.get", - "response": { - "$ref": "Variable" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets information about a single variable.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the variable to return, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIBLE_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "create": { - "id": "runtimeconfig.projects.configs.variables.create", - "response": { - "$ref": "Variable" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a variable within the given configuration. You cannot create\na variable with a name that is a prefix of an existing variable name, or a\nname that has an existing variable name as a prefix.\n\nTo learn more about creating a variable, read the\n[Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-get-variables)\ndocumentation.", - "request": { - "$ref": "Variable" - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables", - "httpMethod": "POST", - "parameters": { - "requestId": { - "description": "An optional but recommended unique \u003ccode\u003erequest_id\u003c/code\u003e. If the server\nreceives two \u003ccode\u003ecreate()\u003c/code\u003e requests with the same\n\u003ccode\u003erequest_id\u003c/code\u003e, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty \u003ccode\u003erequest_id\u003c/code\u003e fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n\u003ccode\u003erequest_id\u003c/code\u003e strings.\n\n\u003ccode\u003erequest_id\u003c/code\u003e strings are limited to 64 characters.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The path to the RutimeConfig resource that this variable should belong to.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/variables", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "update": { - "id": "runtimeconfig.projects.configs.variables.update", - "response": { - "$ref": "Variable" - }, - "parameterOrder": [ - "name" - ], - "description": "Updates an existing variable with a new value.", - "request": { - "$ref": "Variable" - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "The name of the variable to update, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "delete": { - "id": "runtimeconfig.projects.configs.variables.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Deletes a variable or multiple variables.\n\nIf you specify a variable name, then that variable is deleted. If you\nspecify a prefix and `recursive` is true, then all variables with that\nprefix are deleted. You must set a `recursive` to true if you delete\nvariables by prefix.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", - "httpMethod": "DELETE", - "parameters": { - "recursive": { - "description": "Set to `true` to recursively delete multiple variables with the same\nprefix.", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "The name of the variable to delete, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "testIamPermissions": { - "id": "runtimeconfig.projects.configs.variables.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:testIamPermissions", - "httpMethod": "GET", - "parameters": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "repeated": true, - "location": "query", - "type": "string" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - } - } - }, - "waiters": { - "methods": { - "get": { - "id": "runtimeconfig.projects.configs.waiters.get", - "response": { - "$ref": "Waiter" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets information about a single waiter.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The fully-qualified name of the Waiter resource object to retrieve, in the\nformat:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "create": { - "id": "runtimeconfig.projects.configs.waiters.create", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a Waiter resource. This operation returns a long-running Operation\nresource which can be polled for completion. However, a waiter with the\ngiven name will exist (and can be retrieved) prior to the operation\ncompleting. If the operation fails, the failed Waiter resource will\nstill exist and must be deleted prior to subsequent creation attempts.", - "request": { - "$ref": "Waiter" - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters", - "httpMethod": "POST", - "parameters": { - "requestId": { - "description": "An optional but recommended unique \u003ccode\u003erequest_id\u003c/code\u003e. If the server\nreceives two \u003ccode\u003ecreate()\u003c/code\u003e requests with the same\n\u003ccode\u003erequest_id\u003c/code\u003e, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty \u003ccode\u003erequest_id\u003c/code\u003e fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n\u003ccode\u003erequest_id\u003c/code\u003e strings.\n\n\u003ccode\u003erequest_id\u003c/code\u003e strings are limited to 64 characters.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The path to the configuration that will own the waiter.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`.", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/waiters", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "testIamPermissions": { - "id": "runtimeconfig.projects.configs.waiters.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}:testIamPermissions", - "httpMethod": "GET", - "parameters": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "repeated": true, - "location": "query", - "type": "string" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "list": { - "id": "runtimeconfig.projects.configs.waiters.list", - "response": { - "$ref": "ListWaitersResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "List waiters within the given configuration.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "The path to the configuration for which you want to get a list of waiters.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/waiters", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "delete": { - "id": "runtimeconfig.projects.configs.waiters.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Deletes the waiter with the specified name.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "The Waiter resource to delete, in the format:\n\n `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - } - } - }, - "operations": { - "methods": { - "get": { - "id": "runtimeconfig.projects.configs.operations.get", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/operations/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "testIamPermissions": { - "id": "runtimeconfig.projects.configs.operations.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}:testIamPermissions", - "httpMethod": "GET", - "parameters": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "repeated": true, - "location": "query", - "type": "string" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+/operations/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - } - } - } - }, - "methods": { - "getIamPolicy": { - "id": "runtimeconfig.projects.configs.getIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:getIamPolicy", - "httpMethod": "GET", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "list": { - "id": "runtimeconfig.projects.configs.list", - "response": { - "$ref": "ListConfigsResponse" - }, - "parameterOrder": [ - "parent" - ], - "description": "Lists all the RuntimeConfig resources within project.", - "flatPath": "v1beta1/projects/{projectsId}/configs", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "parent": { - "description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)\nfor this request, in the format `projects/[PROJECT_ID]`.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/configs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "get": { - "id": "runtimeconfig.projects.configs.get", - "response": { - "$ref": "RuntimeConfig" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets information about a RuntimeConfig resource.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the RuntimeConfig resource to retrieve, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "create": { - "id": "runtimeconfig.projects.configs.create", - "response": { - "$ref": "RuntimeConfig" - }, - "parameterOrder": [ - "parent" - ], - "description": "Creates a new RuntimeConfig resource. The configuration name must be\nunique within project.", - "request": { - "$ref": "RuntimeConfig" - }, - "flatPath": "v1beta1/projects/{projectsId}/configs", - "httpMethod": "POST", - "parameters": { - "requestId": { - "description": "An optional but recommended unique \u003ccode\u003erequest_id\u003c/code\u003e. If the server\nreceives two \u003ccode\u003ecreate()\u003c/code\u003e requests with the same\n\u003ccode\u003erequest_id\u003c/code\u003e, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty \u003ccode\u003erequest_id\u003c/code\u003e fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n\u003ccode\u003erequest_id\u003c/code\u003e strings.\n\n\u003ccode\u003erequest_id\u003c/code\u003e strings are limited to 64 characters.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)\nfor this request, in the format `projects/[PROJECT_ID]`.", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/configs", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "update": { - "id": "runtimeconfig.projects.configs.update", - "response": { - "$ref": "RuntimeConfig" - }, - "parameterOrder": [ - "name" - ], - "description": "Updates a RuntimeConfig resource. The configuration must exist beforehand.", - "request": { - "$ref": "RuntimeConfig" - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", - "httpMethod": "PUT", - "parameters": { - "name": { - "description": "The name of the RuntimeConfig resource to update, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "setIamPolicy": { - "id": "runtimeconfig.projects.configs.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "delete": { - "id": "runtimeconfig.projects.configs.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Deletes a RuntimeConfig resource.", - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "The RuntimeConfig resource to delete, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - }, - "testIamPermissions": { - "id": "runtimeconfig.projects.configs.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^projects/[^/]+/configs/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudruntimeconfig" - ] - } - } - } - } - } - }, + "version_module": "True", "schemas": { - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", + "properties": { + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + } + }, + "id": "Operation" + }, + "SetIamPolicyRequest": { + "properties": { + "policy": { + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", + "$ref": "Policy" + } + }, + "id": "SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method.", + "type": "object" + }, + "Status": { "properties": { "code": { "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" }, "details": { "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", @@ -731,116 +68,80 @@ }, "type": "object" } + } + }, + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object" + }, + "Binding": { + "properties": { + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "type": "array", + "items": { + "type": "string" + } }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", "type": "string" } }, - "id": "Status" + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object" }, - "Variable": { - "description": "Describes a single variable within a RuntimeConfig resource.\nThe name denotes the hierarchical variable name. For example,\n`ports/serving_port` is a valid variable name. The variable value is an\nopaque string and only leaf variables can have values (that is, variables\nthat do not have any child variables).", + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "Cardinality": { + "description": "A Cardinality condition for the Waiter resource. A cardinality condition is\nmet when the number of variables under a specified path prefix reaches a\npredefined number. For example, if you set a Cardinality condition where\nthe `path` is set to `/foo` and the number of paths is set to 2, the\nfollowing variables would meet the condition in a RuntimeConfig resource:\n\n+ `/foo/variable1 = \"value1\"`\n+ `/foo/variable2 = \"value2\"`\n+ `/bar/variable3 = \"value3\"`\n\nIt would not would not satisify the same condition with the `number` set to\n3, however, because there is only 2 paths that start with `/foo`.\nCardinality conditions are recursive; all subtrees under the specific\npath prefix are counted.", "type": "object", "properties": { - "value": { - "description": "The binary value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. The value must be\nbase64 encoded. Only one of `value` or `text` can be set.", - "type": "string", - "format": "byte" - }, - "text": { - "description": "The string value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. For example,\n\u003ccode\u003etext: \"my text value\"\u003c/code\u003e.", + "path": { + "description": "The root of the variable subtree to monitor. For example, `/foo`.", "type": "string" }, - "updateTime": { - "description": "[Output Only] The time of the last variable update.", - "type": "string", - "format": "google-datetime" - }, - "state": { - "description": "[Ouput only] The current state of the variable. The variable state indicates\nthe outcome of the `variables().watch` call and is visible through the\n`get` and `list` calls.", - "enum": [ - "VARIABLE_STATE_UNSPECIFIED", - "UPDATED", - "DELETED" - ], - "enumDescriptions": [ - "Default variable state.", - "The variable was updated, while `variables().watch` was executing.", - "The variable was deleted, while `variables().watch` was executing." - ], - "type": "string" - }, - "name": { - "description": "The name of the variable resource, in the format:\n\n projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]\n\nThe `[PROJECT_ID]` must be a valid project ID, `[CONFIG_NAME]` must be a\nvalid RuntimeConfig reource and `[VARIABLE_NAME]` follows Unix file system\nfile path naming.\n\nThe `[VARIABLE_NAME]` can contain ASCII letters, numbers, slashes and\ndashes. Slashes are used as path element separators and are not part of the\n`[VARIABLE_NAME]` itself, so `[VARIABLE_NAME]` must contain at least one\nnon-slash character. Multiple slashes are coalesced into single slash\ncharacter. Each path segment should follow RFC 1035 segment specification.\nThe length of a `[VARIABLE_NAME]` must be less than 256 bytes.\n\nOnce you create a variable, you cannot change the variable name.", - "type": "string" + "number": { + "description": "The number variables under the `path` that must exist to meet this\ncondition. Defaults to 1 if not specified.", + "format": "int32", + "type": "integer" } }, - "id": "Variable" + "id": "Cardinality" }, "ListConfigsResponse": { - "description": "`ListConfigs()` returns the following response. The order of returned\nobjects is arbitrary; that is, it is not ordered in any particular way.", - "type": "object", "properties": { - "nextPageToken": { - "description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `pageSize`, use the `nextPageToken`\nas a value for the query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to continue\npaging through the results", - "type": "string" - }, "configs": { "description": "A list of the configurations in the project. The order of returned\nobjects is arbitrary; that is, it is not ordered in any particular way.", "type": "array", "items": { "$ref": "RuntimeConfig" } - } - }, - "id": "ListConfigsResponse" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "nextPageToken": { + "description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `pageSize`, use the `nextPageToken`\nas a value for the query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to continue\npaging through the results", "type": "string" } }, - "id": "Operation" + "id": "ListConfigsResponse", + "description": "`ListConfigs()` returns the following response. The order of returned\nobjects is arbitrary; that is, it is not ordered in any particular way.", + "type": "object" }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", + "EndCondition": { + "description": "The condition that a Waiter resource is waiting for.", "type": "object", "properties": { - "policy": { - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", - "$ref": "Policy" + "cardinality": { + "$ref": "Cardinality", + "description": "The cardinality of the `EndCondition`." } }, - "id": "SetIamPolicyRequest" + "id": "EndCondition" }, "TestIamPermissionsResponse": { "description": "Response message for `TestIamPermissions` method.", @@ -856,95 +157,50 @@ }, "id": "TestIamPermissionsResponse" }, - "Waiter": { - "description": "A Waiter resource waits for some end condition within a RuntimeConfig resource\nto be met before it returns. For example, assume you have a distributed\nsystem where each node writes to a Variable resource indidicating the node's\nreadiness as part of the startup process.\n\nYou then configure a Waiter resource with the success condition set to wait\nuntil some number of nodes have checked in. Afterwards, your application\nruns some arbitrary code after the condition has been met and the waiter\nreturns successfully.\n\nOnce created, a Waiter resource is immutable.\n\nTo learn more about using waiters, read the\n[Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter)\ndocumentation.", - "type": "object", + "ListVariablesResponse": { "properties": { - "timeout": { - "description": "[Required] Specifies the timeout of the waiter in seconds, beginning from\nthe instant that `waiters().create` method is called. If this time elapses\nbefore the success or failure conditions are met, the waiter fails and sets\nthe `error` code to `DEADLINE_EXCEEDED`.", - "type": "string", - "format": "google-duration" - }, - "success": { - "description": "[Required] The success condition. If this condition is met, `done` will be\nset to `true` and the `error` value will remain unset. The failure condition\ntakes precedence over the success condition. If both conditions are met, a\nfailure will be indicated.", - "$ref": "EndCondition" - }, - "failure": { - "description": "[Optional] The failure condition of this waiter. If this condition is met,\n`done` will be set to `true` and the `error` code will be set to `ABORTED`.\nThe failure condition takes precedence over the success condition. If both\nconditions are met, a failure will be indicated. This value is optional; if\nno failure condition is set, the only failure scenario will be a timeout.", - "$ref": "EndCondition" - }, - "createTime": { - "description": "[Output Only] The instant at which this Waiter resource was created. Adding\nthe value of `timeout` to this instant yields the timeout deadline for the\nwaiter.", - "type": "string", - "format": "google-datetime" - }, - "name": { - "description": "The name of the Waiter resource, in the format:\n\n projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]\n\nThe `[PROJECT_ID]` must be a valid Google Cloud project ID,\nthe `[CONFIG_NAME]` must be a valid RuntimeConfig resource, the\n`[WAITER_NAME]` must match RFC 1035 segment specification, and the length\nof `[WAITER_NAME]` must be less than 64 bytes.\n\nAfter you create a Waiter resource, you cannot change the resource name.", - "type": "string" - }, - "error": { - "description": "[Output Only] If the waiter ended due to a failure or timeout, this value\nwill be set.", - "$ref": "Status" - }, - "done": { - "description": "[Output Only] If the value is `false`, it means the waiter is still waiting\nfor one of its conditions to be met.\n\nIf true, the waiter has finished. If the waiter finished due to a timeout\nor failure, `error` will be set.", - "type": "boolean" - } - }, - "id": "Waiter" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "bindings": { - "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", + "variables": { + "description": "A list of variables and their values. The order of returned variable\nobjects is arbitrary.", "type": "array", "items": { - "$ref": "Binding" + "$ref": "Variable" } }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string", - "format": "byte" - }, - "version": { - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer", - "format": "int32" + "nextPageToken": { + "description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `pageSize`, use the `nextPageToken`\nas a value for the query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to continue\npaging through the results", + "type": "string" } }, - "id": "Policy" + "id": "ListVariablesResponse", + "description": "Response for the `ListVariables()` method.", + "type": "object" }, "RuntimeConfig": { - "description": "A RuntimeConfig resource is the primary resource in the Cloud RuntimeConfig\nservice. A RuntimeConfig resource consists of metadata and a hierarchy of\nvariables.", - "type": "object", "properties": { - "description": { - "description": "An optional description of the RuntimeConfig object.", - "type": "string" - }, "name": { "description": "The resource name of a runtime config. The name must have the format:\n\n projects/[PROJECT_ID]/configs/[CONFIG_NAME]\n\nThe `[PROJECT_ID]` must be a valid project ID, and `[CONFIG_NAME]` is an\narbitrary name that matches RFC 1035 segment specification. The length of\n`[CONFIG_NAME]` must be less than 64 bytes.\n\nYou pick the RuntimeConfig resource name, but the server will validate that\nthe name adheres to this format. After you create the resource, you cannot\nchange the resource's name.", "type": "string" + }, + "description": { + "description": "An optional description of the RuntimeConfig object.", + "type": "string" } }, - "id": "RuntimeConfig" + "id": "RuntimeConfig", + "description": "A RuntimeConfig resource is the primary resource in the Cloud RuntimeConfig\nservice. A RuntimeConfig resource consists of metadata and a hierarchy of\nvariables.", + "type": "object" }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", + "WatchVariableRequest": { + "description": "Request for the `WatchVariable()` method.", "type": "object", "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "type": "array", - "items": { - "type": "string" - } + "newerThan": { + "description": "If specified, checks the current timestamp of the variable and if the\ncurrent timestamp is newer than `newerThan` timestamp, the method returns\nimmediately.\n\nIf not specified or the variable has an older timestamp, the watcher waits\nfor a the value to change before returning.", + "format": "google-datetime", + "type": "string" } }, - "id": "TestIamPermissionsRequest" + "id": "WatchVariableRequest" }, "ListWaitersResponse": { "description": "Response for the `ListWaiters()` method.\nOrder of returned waiter objects is arbitrary.", @@ -964,113 +220,900 @@ }, "id": "ListWaitersResponse" }, - "EndCondition": { - "description": "The condition that a Waiter resource is waiting for.", + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", "type": "object", "properties": { - "cardinality": { - "description": "The cardinality of the `EndCondition`.", - "$ref": "Cardinality" - } - }, - "id": "EndCondition" - }, - "Cardinality": { - "description": "A Cardinality condition for the Waiter resource. A cardinality condition is\nmet when the number of variables under a specified path prefix reaches a\npredefined number. For example, if you set a Cardinality condition where\nthe `path` is set to `/foo` and the number of paths is set to 2, the\nfollowing variables would meet the condition in a RuntimeConfig resource:\n\n+ `/foo/variable1 = \"value1\"`\n+ `/foo/variable2 = \"value2\"`\n+ `/bar/variable3 = \"value3\"`\n\nIt would not would not satisify the same condition with the `number` set to\n3, however, because there is only 2 paths that start with `/foo`.\nCardinality conditions are recursive; all subtrees under the specific\npath prefix are counted.", - "type": "object", - "properties": { - "path": { - "description": "The root of the variable subtree to monitor. For example, `/foo`.", - "type": "string" - }, - "number": { - "description": "The number variables under the `path` that must exist to meet this\ncondition. Defaults to 1 if not specified.", - "type": "integer", - "format": "int32" - } - }, - "id": "Cardinality" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "WatchVariableRequest": { - "description": "Request for the `WatchVariable()` method.", - "type": "object", - "properties": { - "newerThan": { - "description": "If specified, checks the current timestamp of the variable and if the\ncurrent timestamp is newer than `newerThan` timestamp, the method returns\nimmediately.\n\nIf not specified or the variable has an older timestamp, the watcher waits\nfor a the value to change before returning.", - "type": "string", - "format": "google-datetime" - } - }, - "id": "WatchVariableRequest" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", "type": "array", "items": { "type": "string" } - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" } }, - "id": "Binding" + "id": "TestIamPermissionsRequest" }, - "ListVariablesResponse": { - "description": "Response for the `ListVariables()` method.", + "Waiter": { + "description": "A Waiter resource waits for some end condition within a RuntimeConfig resource\nto be met before it returns. For example, assume you have a distributed\nsystem where each node writes to a Variable resource indidicating the node's\nreadiness as part of the startup process.\n\nYou then configure a Waiter resource with the success condition set to wait\nuntil some number of nodes have checked in. Afterwards, your application\nruns some arbitrary code after the condition has been met and the waiter\nreturns successfully.\n\nOnce created, a Waiter resource is immutable.\n\nTo learn more about using waiters, read the\n[Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter)\ndocumentation.", "type": "object", "properties": { - "variables": { - "description": "A list of variables and their values. The order of returned variable\nobjects is arbitrary.", + "done": { + "description": "[Output Only] If the value is `false`, it means the waiter is still waiting\nfor one of its conditions to be met.\n\nIf true, the waiter has finished. If the waiter finished due to a timeout\nor failure, `error` will be set.", + "type": "boolean" + }, + "createTime": { + "description": "[Output Only] The instant at which this Waiter resource was created. Adding\nthe value of `timeout` to this instant yields the timeout deadline for the\nwaiter.", + "format": "google-datetime", + "type": "string" + }, + "timeout": { + "description": "[Required] Specifies the timeout of the waiter in seconds, beginning from\nthe instant that `waiters().create` method is called. If this time elapses\nbefore the success or failure conditions are met, the waiter fails and sets\nthe `error` code to `DEADLINE_EXCEEDED`.", + "format": "google-duration", + "type": "string" + }, + "name": { + "description": "The name of the Waiter resource, in the format:\n\n projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]\n\nThe `[PROJECT_ID]` must be a valid Google Cloud project ID,\nthe `[CONFIG_NAME]` must be a valid RuntimeConfig resource, the\n`[WAITER_NAME]` must match RFC 1035 segment specification, and the length\nof `[WAITER_NAME]` must be less than 64 bytes.\n\nAfter you create a Waiter resource, you cannot change the resource name.", + "type": "string" + }, + "error": { + "description": "[Output Only] If the waiter ended due to a failure or timeout, this value\nwill be set.", + "$ref": "Status" + }, + "failure": { + "$ref": "EndCondition", + "description": "[Optional] The failure condition of this waiter. If this condition is met,\n`done` will be set to `true` and the `error` code will be set to `ABORTED`.\nThe failure condition takes precedence over the success condition. If both\nconditions are met, a failure will be indicated. This value is optional; if\nno failure condition is set, the only failure scenario will be a timeout." + }, + "success": { + "$ref": "EndCondition", + "description": "[Required] The success condition. If this condition is met, `done` will be\nset to `true` and the `error` value will remain unset. The failure condition\ntakes precedence over the success condition. If both conditions are met, a\nfailure will be indicated." + } + }, + "id": "Waiter" + }, + "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Version of the `Policy`. The default version is 0.", + "format": "int32", + "type": "integer" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", "type": "array", "items": { - "$ref": "Variable" + "$ref": "Binding" } + } + }, + "id": "Policy" + }, + "Variable": { + "description": "Describes a single variable within a RuntimeConfig resource.\nThe name denotes the hierarchical variable name. For example,\n`ports/serving_port` is a valid variable name. The variable value is an\nopaque string and only leaf variables can have values (that is, variables\nthat do not have any child variables).", + "type": "object", + "properties": { + "text": { + "description": "The string value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. For example,\n`text: \"my text value\"`. The string must be valid UTF-8.", + "type": "string" }, - "nextPageToken": { - "description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `pageSize`, use the `nextPageToken`\nas a value for the query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to continue\npaging through the results", + "value": { + "description": "The binary value of the variable. The length of the value must be less\nthan 4096 bytes. Empty values are also accepted. The value must be\nbase64 encoded. Only one of `value` or `text` can be set.", + "format": "byte", + "type": "string" + }, + "updateTime": { + "description": "[Output Only] The time of the last variable update.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "enum": [ + "VARIABLE_STATE_UNSPECIFIED", + "UPDATED", + "DELETED" + ], + "description": "[Ouput only] The current state of the variable. The variable state indicates\nthe outcome of the `variables().watch` call and is visible through the\n`get` and `list` calls.", + "type": "string", + "enumDescriptions": [ + "Default variable state.", + "The variable was updated, while `variables().watch` was executing.", + "The variable was deleted, while `variables().watch` was executing." + ] + }, + "name": { + "description": "The name of the variable resource, in the format:\n\n projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]\n\nThe `[PROJECT_ID]` must be a valid project ID, `[CONFIG_NAME]` must be a\nvalid RuntimeConfig reource and `[VARIABLE_NAME]` follows Unix file system\nfile path naming.\n\nThe `[VARIABLE_NAME]` can contain ASCII letters, numbers, slashes and\ndashes. Slashes are used as path element separators and are not part of the\n`[VARIABLE_NAME]` itself, so `[VARIABLE_NAME]` must contain at least one\nnon-slash character. Multiple slashes are coalesced into single slash\ncharacter. Each path segment should follow RFC 1035 segment specification.\nThe length of a `[VARIABLE_NAME]` must be less than 256 bytes.\n\nOnce you create a variable, you cannot change the variable name.", "type": "string" } }, - "id": "ListVariablesResponse" + "id": "Variable" } }, - "revision": "20161213", - "basePath": "", + "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", "canonicalName": "Cloud RuntimeConfig", - "discoveryVersion": "v1", - "baseUrl": "https://runtimeconfig.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloudruntimeconfig": { + "description": "Manage your Google Cloud Platform services' runtime configuration" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://runtimeconfig.googleapis.com/", + "ownerDomain": "google.com", "name": "runtimeconfig", + "batchPath": "batch", + "title": "Google Cloud Runtime Configuration API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "configs": { + "methods": { + "get": { + "httpMethod": "GET", + "response": { + "$ref": "RuntimeConfig" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path", + "description": "The name of the RuntimeConfig resource to retrieve, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", + "id": "runtimeconfig.projects.configs.get", + "path": "v1beta1/{+name}", + "description": "Gets information about a RuntimeConfig resource." + }, + "update": { + "response": { + "$ref": "RuntimeConfig" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path", + "description": "The name of the RuntimeConfig resource to update, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", + "path": "v1beta1/{+name}", + "id": "runtimeconfig.projects.configs.update", + "request": { + "$ref": "RuntimeConfig" + }, + "description": "Updates a RuntimeConfig resource. The configuration must exist beforehand." + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:testIamPermissions", + "id": "runtimeconfig.projects.configs.testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning." + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "location": "path", + "description": "The RuntimeConfig resource to delete, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", + "id": "runtimeconfig.projects.configs.delete", + "path": "v1beta1/{+name}", + "description": "Deletes a RuntimeConfig resource." + }, + "list": { + "description": "Lists all the RuntimeConfig resources within project.", + "response": { + "$ref": "ListConfigsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", + "format": "int32", + "type": "integer" + }, + "parent": { + "description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)\nfor this request, in the format `projects/[PROJECT_ID]`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs", + "path": "v1beta1/{+parent}/configs", + "id": "runtimeconfig.projects.configs.list" + }, + "create": { + "description": "Creates a new RuntimeConfig resource. The configuration name must be\nunique within project.", + "request": { + "$ref": "RuntimeConfig" + }, + "response": { + "$ref": "RuntimeConfig" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "requestId": { + "location": "query", + "description": "An optional but recommended unique `request_id`. If the server\nreceives two `create()` requests with the same\n`request_id`, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty `request_id` fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n`request_id` strings.\n\n`request_id` strings are limited to 64 characters.", + "type": "string" + }, + "parent": { + "description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)\nfor this request, in the format `projects/[PROJECT_ID]`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs", + "path": "v1beta1/{+parent}/configs", + "id": "runtimeconfig.projects.configs.create" + }, + "setIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:setIamPolicy", + "id": "runtimeconfig.projects.configs.setIamPolicy", + "path": "v1beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy." + }, + "getIamPolicy": { + "id": "runtimeconfig.projects.configs.getIamPolicy", + "path": "v1beta1/{+resource}:getIamPolicy", + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "httpMethod": "GET", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:getIamPolicy" + } + }, + "resources": { + "variables": { + "methods": { + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Variable" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the variable to update, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", + "id": "runtimeconfig.projects.configs.variables.update", + "path": "v1beta1/{+name}", + "description": "Updates an existing variable with a new value.", + "request": { + "$ref": "Variable" + } + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:testIamPermissions", + "id": "runtimeconfig.projects.configs.variables.testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + } + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "recursive": { + "description": "Set to `true` to recursively delete multiple variables with the same\nprefix.", + "type": "boolean", + "location": "query" + }, + "name": { + "location": "path", + "description": "The name of the variable to delete, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", + "id": "runtimeconfig.projects.configs.variables.delete", + "path": "v1beta1/{+name}", + "description": "Deletes a variable or multiple variables.\n\nIf you specify a variable name, then that variable is deleted. If you\nspecify a prefix and `recursive` is true, then all variables with that\nprefix are deleted. You must set a `recursive` to true if you delete\nvariables by prefix." + }, + "list": { + "description": "Lists variables within given a configuration, matching any provided filters.\nThis only lists variable names, not the values, unless `return_values` is\ntrue, in which case only variables that user has IAM permission to GetVariable\nwill be returned.", + "response": { + "$ref": "ListVariablesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "pageSize": { + "location": "query", + "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", + "format": "int32", + "type": "integer" + }, + "parent": { + "description": "The path to the RuntimeConfig resource for which you want to list variables.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path" + }, + "filter": { + "location": "query", + "description": "Filters variables by matching the specified filter. For example:\n\n`projects/example-project/config/[CONFIG_NAME]/variables/example-variable`.", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", + "type": "string", + "location": "query" + }, + "returnValues": { + "location": "query", + "description": "The flag indicates whether the user wants to return values of variables.\nIf true, then only those variables that user has IAM GetVariable permission\nwill be returned along with their values.", + "type": "boolean" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables", + "path": "v1beta1/{+parent}/variables", + "id": "runtimeconfig.projects.configs.variables.list" + }, + "create": { + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables", + "path": "v1beta1/{+parent}/variables", + "id": "runtimeconfig.projects.configs.variables.create", + "description": "Creates a variable within the given configuration. You cannot create\na variable with a name that is a prefix of an existing variable name, or a\nname that has an existing variable name as a prefix.\n\nTo learn more about creating a variable, read the\n[Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-get-variables)\ndocumentation.", + "request": { + "$ref": "Variable" + }, + "response": { + "$ref": "Variable" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "requestId": { + "description": "An optional but recommended unique `request_id`. If the server\nreceives two `create()` requests with the same\n`request_id`, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty `request_id` fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n`request_id` strings.\n\n`request_id` strings are limited to 64 characters.", + "type": "string", + "location": "query" + }, + "parent": { + "description": "The path to the RutimeConfig resource that this variable should belong to.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path" + } + } + }, + "get": { + "id": "runtimeconfig.projects.configs.variables.get", + "path": "v1beta1/{+name}", + "description": "Gets information about a single variable.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Variable" + }, + "parameters": { + "name": { + "description": "The name of the variable to return, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIBLE_NAME]`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}" + }, + "watch": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Variable" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/configs/[^/]+/variables/.+$", + "location": "path", + "description": "The name of the variable to watch, in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "required": true, + "type": "string" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:watch", + "id": "runtimeconfig.projects.configs.variables.watch", + "path": "v1beta1/{+name}:watch", + "description": "Watches a specific variable and waits for a change in the variable's value.\nWhen there is a change, this method returns the new value or times out.\n\nIf a variable is deleted while being watched, the `variableState` state is\nset to `DELETED` and the method returns the last known variable `value`.\n\nIf you set the deadline for watching to a larger value than internal timeout\n(60 seconds), the current variable value is returned and the `variableState`\nwill be `VARIABLE_STATE_UNSPECIFIED`.\n\nTo learn more about creating a watcher, read the\n[Watching a Variable for Changes](/deployment-manager/runtime-configurator/watching-a-variable)\ndocumentation.", + "request": { + "$ref": "WatchVariableRequest" + } + } + } + }, + "operations": { + "methods": { + "testIamPermissions": { + "id": "runtimeconfig.projects.configs.operations.testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+/operations/.+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}:testIamPermissions" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "name": { + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+/operations/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}", + "id": "runtimeconfig.projects.configs.operations.get", + "path": "v1beta1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + } + } + }, + "waiters": { + "methods": { + "list": { + "description": "List waiters within the given configuration.", + "response": { + "$ref": "ListWaitersResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "pageSize": { + "location": "query", + "description": "Specifies the number of results to return per page. If there are fewer\nelements than the specified number, returns all elements.", + "format": "int32", + "type": "integer" + }, + "parent": { + "description": "The path to the configuration for which you want to get a list of waiters.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken`\nreturned by a previous list request to get the next page of results.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters", + "path": "v1beta1/{+parent}/waiters", + "id": "runtimeconfig.projects.configs.waiters.list" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Waiter" + }, + "parameters": { + "name": { + "description": "The fully-qualified name of the Waiter resource object to retrieve, in the\nformat:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}", + "id": "runtimeconfig.projects.configs.waiters.get", + "path": "v1beta1/{+name}", + "description": "Gets information about a single waiter." + }, + "create": { + "request": { + "$ref": "Waiter" + }, + "description": "Creates a Waiter resource. This operation returns a long-running Operation\nresource which can be polled for completion. However, a waiter with the\ngiven name will exist (and can be retrieved) prior to the operation\ncompleting. If the operation fails, the failed Waiter resource will\nstill exist and must be deleted prior to subsequent creation attempts.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "requestId": { + "location": "query", + "description": "An optional but recommended unique `request_id`. If the server\nreceives two `create()` requests with the same\n`request_id`, then the second request will be ignored and the\nfirst resource created and stored in the backend is returned.\nEmpty `request_id` fields are ignored.\n\nIt is responsibility of the client to ensure uniqueness of the\n`request_id` strings.\n\n`request_id` strings are limited to 64 characters.", + "type": "string" + }, + "parent": { + "location": "path", + "description": "The path to the configuration that will own the waiter.\nThe configuration must exist beforehand; the path must by in the format:\n\n`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters", + "path": "v1beta1/{+parent}/waiters", + "id": "runtimeconfig.projects.configs.waiters.create" + }, + "testIamPermissions": { + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}:testIamPermissions", + "id": "runtimeconfig.projects.configs.waiters.testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", + "location": "path" + } + } + }, + "delete": { + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "description": "The Waiter resource to delete, in the format:\n\n `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudruntimeconfig" + ], + "flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}", + "path": "v1beta1/{+name}", + "id": "runtimeconfig.projects.configs.waiters.delete", + "description": "Deletes the waiter with the specified name." + } + } + } + } + } + } + } + }, "parameters": { - "access_token": { - "description": "OAuth access token.", + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", - "default": "true", "type": "boolean", + "default": "true" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", "location": "query" }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, "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" + }, + "access_token": { + "description": "OAuth access token.", "type": "string", "location": "query" }, @@ -1080,77 +1123,30 @@ "location": "query" }, "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" }, "oauth_token": { + "location": "query", "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "bearer_token": { + "location": "query", "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" } }, - "documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v1beta1", - "rootUrl": "https://runtimeconfig.googleapis.com/", - "kind": "discovery#restDescription" + "baseUrl": "https://runtimeconfig.googleapis.com/", + "kind": "discovery#restDescription", + "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.", + "servicePath": "", + "basePath": "", + "documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", + "revision": "20170429", + "id": "runtimeconfig:v1beta1", + "discoveryVersion": "v1" } diff --git a/etc/api/safebrowsing/v4/safebrowsing-api.json b/etc/api/safebrowsing/v4/safebrowsing-api.json index 630df9ce58..d0116f9d54 100644 --- a/etc/api/safebrowsing/v4/safebrowsing-api.json +++ b/etc/api/safebrowsing/v4/safebrowsing-api.json @@ -1,804 +1,1040 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/Yoew02BLq1-_QyzwsVjtSdddocY\"", - "discoveryVersion": "v1", - "id": "safebrowsing:v4", - "name": "safebrowsing", - "version": "v4", - "revision": "20160520", - "title": "Safe Browsing APIs", - "description": "Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/safe-browsing/", - "protocol": "rest", - "baseUrl": "https://safebrowsing.googleapis.com/", - "basePath": "", - "rootUrl": "https://safebrowsing.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "schemas": { - "FindThreatMatchesRequest": { - "id": "FindThreatMatchesRequest", - "type": "object", - "description": "Request to check entries against lists.", - "properties": { - "client": { - "$ref": "ClientInfo", - "description": "The client metadata." + "basePath": "", + "ownerDomain": "google.com", + "name": "safebrowsing", + "batchPath": "batch", + "id": "safebrowsing:v4", + "documentationLink": "https://developers.google.com/safe-browsing/", + "revision": "20170509", + "title": "Google Safe Browsing API", + "discoveryVersion": "v1", + "ownerName": "Google", + "resources": { + "fullHashes": { + "methods": { + "find": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "FindFullHashesResponse" + }, + "parameters": {}, + "flatPath": "v4/fullHashes:find", + "id": "safebrowsing.fullHashes.find", + "path": "v4/fullHashes:find", + "request": { + "$ref": "FindFullHashesRequest" + }, + "description": "Finds the full hashes that match the requested hash prefixes." + } + } }, - "threatInfo": { - "$ref": "ThreatInfo", - "description": "The lists and entries to be checked for matches." - } - } - }, - "ClientInfo": { - "id": "ClientInfo", - "type": "object", - "description": "The client metadata associated with Safe Browsing API requests.", - "properties": { - "clientId": { - "type": "string", - "description": "A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API." + "encodedUpdates": { + "methods": { + "get": { + "response": { + "$ref": "FetchThreatListUpdatesResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "encodedRequest" + ], + "parameters": { + "clientId": { + "location": "query", + "description": "A client ID that uniquely identifies the client implementation of the Safe\nBrowsing API.", + "type": "string" + }, + "clientVersion": { + "description": "The version of the client implementation.", + "type": "string", + "location": "query" + }, + "encodedRequest": { + "description": "A serialized FetchThreatListUpdatesRequest proto.", + "format": "byte", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v4/encodedUpdates/{encodedRequest}", + "path": "v4/encodedUpdates/{encodedRequest}", + "id": "safebrowsing.encodedUpdates.get", + "description": "" + } + } }, - "clientVersion": { - "type": "string", - "description": "The version of the client implementation." - } - } - }, - "ThreatInfo": { - "id": "ThreatInfo", - "type": "object", - "description": "The information regarding one or more threats that a client submits when checking for matches in threat lists.", - "properties": { - "threatTypes": { - "type": "array", - "description": "The threat types to be checked.", - "enumDescriptions": [ - "Unknown.", - "Malware threat type.", - "Social engineering threat type.", - "Unwanted software threat type.", - "Potentially harmful application threat type." - ], - "items": { - "type": "string", - "enum": [ - "THREAT_TYPE_UNSPECIFIED", - "MALWARE", - "SOCIAL_ENGINEERING", - "UNWANTED_SOFTWARE", - "POTENTIALLY_HARMFUL_APPLICATION" - ] - } + "threatListUpdates": { + "methods": { + "fetch": { + "request": { + "$ref": "FetchThreatListUpdatesRequest" + }, + "description": "Fetches the most recent threat list updates. A client can request updates\nfor multiple lists at once.", + "response": { + "$ref": "FetchThreatListUpdatesResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "flatPath": "v4/threatListUpdates:fetch", + "path": "v4/threatListUpdates:fetch", + "id": "safebrowsing.threatListUpdates.fetch" + } + } }, - "platformTypes": { - "type": "array", - "description": "The platform types to be checked.", - "enumDescriptions": [ - "Unknown platform.", - "Threat posed to Windows.", - "Threat posed to Linux.", - "Threat posed to Android.", - "Threat posed to OS X.", - "Threat posed to iOS.", - "Threat posed to at least one of the defined platforms.", - "Threat posed to all defined platforms.", - "Threat posed to Chrome." - ], - "items": { - "type": "string", - "enum": [ - "PLATFORM_TYPE_UNSPECIFIED", - "WINDOWS", - "LINUX", - "ANDROID", - "OSX", - "IOS", - "ANY_PLATFORM", - "ALL_PLATFORMS", - "CHROME" - ] - } + "encodedFullHashes": { + "methods": { + "get": { + "parameters": { + "clientId": { + "type": "string", + "location": "query", + "description": "A client ID that (hopefully) uniquely identifies the client implementation\nof the Safe Browsing API." + }, + "clientVersion": { + "location": "query", + "description": "The version of the client implementation.", + "type": "string" + }, + "encodedRequest": { + "location": "path", + "description": "A serialized FindFullHashesRequest proto.", + "format": "byte", + "required": true, + "type": "string" + } + }, + "flatPath": "v4/encodedFullHashes/{encodedRequest}", + "path": "v4/encodedFullHashes/{encodedRequest}", + "id": "safebrowsing.encodedFullHashes.get", + "description": "", + "response": { + "$ref": "FindFullHashesResponse" + }, + "parameterOrder": [ + "encodedRequest" + ], + "httpMethod": "GET" + } + } }, - "threatEntryTypes": { - "type": "array", - "description": "The entry types to be checked.", - "enumDescriptions": [ - "Unspecified.", - "A URL.", - "An executable program.", - "An IP range." - ], - "items": { - "type": "string", - "enum": [ - "THREAT_ENTRY_TYPE_UNSPECIFIED", - "URL", - "EXECUTABLE", - "IP_RANGE" - ] - } - }, - "threatEntries": { - "type": "array", - "description": "The threat entries to be checked.", - "items": { - "$ref": "ThreatEntry" - } - } - } - }, - "ThreatEntry": { - "id": "ThreatEntry", - "type": "object", - "description": "An individual threat; for example, a malicious URL or its hash representation. Only one of these fields should be set.", - "properties": { - "hash": { - "type": "string", - "description": "A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash. This field is in binary format.", - "format": "byte" - }, - "url": { - "type": "string", - "description": "A URL." - }, - "digest": { - "type": "string", - "description": "The digest of an executable in SHA256 format. The API supports both binary and hex digests.", - "format": "byte" - } - } - }, - "FindThreatMatchesResponse": { - "id": "FindThreatMatchesResponse", - "type": "object", - "properties": { - "matches": { - "type": "array", - "description": "The threat list matches.", - "items": { - "$ref": "ThreatMatch" - } - } - } - }, - "ThreatMatch": { - "id": "ThreatMatch", - "type": "object", - "description": "A match when checking a threat entry in the Safe Browsing threat lists.", - "properties": { - "threatType": { - "type": "string", - "description": "The threat type matching this threat.", - "enum": [ - "THREAT_TYPE_UNSPECIFIED", - "MALWARE", - "SOCIAL_ENGINEERING", - "UNWANTED_SOFTWARE", - "POTENTIALLY_HARMFUL_APPLICATION" - ] - }, - "platformType": { - "type": "string", - "description": "The platform type matching this threat.", - "enum": [ - "PLATFORM_TYPE_UNSPECIFIED", - "WINDOWS", - "LINUX", - "ANDROID", - "OSX", - "IOS", - "ANY_PLATFORM", - "ALL_PLATFORMS", - "CHROME" - ] - }, - "threatEntryType": { - "type": "string", - "description": "The threat entry type matching this threat.", - "enum": [ - "THREAT_ENTRY_TYPE_UNSPECIFIED", - "URL", - "EXECUTABLE", - "IP_RANGE" - ] - }, - "threat": { - "$ref": "ThreatEntry", - "description": "The threat matching this threat." - }, - "threatEntryMetadata": { - "$ref": "ThreatEntryMetadata", - "description": "Optional metadata associated with this threat." - }, - "cacheDuration": { - "type": "string", - "description": "The cache lifetime for the returned match. Clients must not cache this response for more than this duration to avoid false positives." - } - } - }, - "ThreatEntryMetadata": { - "id": "ThreatEntryMetadata", - "type": "object", - "description": "The metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type.", - "properties": { - "entries": { - "type": "array", - "description": "The metadata entries.", - "items": { - "$ref": "MetadataEntry" - } - } - } - }, - "MetadataEntry": { - "id": "MetadataEntry", - "type": "object", - "description": "A single metadata entry.", - "properties": { - "key": { - "type": "string", - "description": "The metadata entry key.", - "format": "byte" - }, - "value": { - "type": "string", - "description": "The metadata entry value.", - "format": "byte" - } - } - }, - "FetchThreatListUpdatesRequest": { - "id": "FetchThreatListUpdatesRequest", - "type": "object", - "description": "Describes a Safe Browsing API update request. Clients can request updates for multiple lists in a single request. NOTE: Field index 2 is unused. NEXT: 4", - "properties": { - "client": { - "$ref": "ClientInfo", - "description": "The client metadata." - }, - "listUpdateRequests": { - "type": "array", - "description": "The requested threat list updates.", - "items": { - "$ref": "ListUpdateRequest" - } - } - } - }, - "ListUpdateRequest": { - "id": "ListUpdateRequest", - "type": "object", - "description": "A single list update request.", - "properties": { - "threatType": { - "type": "string", - "description": "The type of threat posed by entries present in the list.", - "enum": [ - "THREAT_TYPE_UNSPECIFIED", - "MALWARE", - "SOCIAL_ENGINEERING", - "UNWANTED_SOFTWARE", - "POTENTIALLY_HARMFUL_APPLICATION" - ] - }, - "platformType": { - "type": "string", - "description": "The type of platform at risk by entries present in the list.", - "enum": [ - "PLATFORM_TYPE_UNSPECIFIED", - "WINDOWS", - "LINUX", - "ANDROID", - "OSX", - "IOS", - "ANY_PLATFORM", - "ALL_PLATFORMS", - "CHROME" - ] - }, - "threatEntryType": { - "type": "string", - "description": "The types of entries present in the list.", - "enum": [ - "THREAT_ENTRY_TYPE_UNSPECIFIED", - "URL", - "EXECUTABLE", - "IP_RANGE" - ] - }, - "state": { - "type": "string", - "description": "The current state of the client for the requested list (the encrypted client state that was received from the last successful list update).", - "format": "byte" - }, - "constraints": { - "$ref": "Constraints", - "description": "The constraints associated with this request." - } - } - }, - "Constraints": { - "id": "Constraints", - "type": "object", - "description": "The constraints for this update.", - "properties": { - "maxUpdateEntries": { - "type": "integer", - "description": "The maximum size in number of entries. The update will not contain more entries than this value. This should be a power of 2 between 2**10 and 2**20. If zero, no update size limit is set.", - "format": "int32" - }, - "maxDatabaseEntries": { - "type": "integer", - "description": "Sets the maximum number of entries that the client is willing to have in the local database. This should be a power of 2 between 2**10 and 2**20. If zero, no database size limit is set.", - "format": "int32" - }, - "region": { - "type": "string", - "description": "Requests the list for a specific geographic location. If not set the server may pick that value based on the user's IP address. Expects ISO 3166-1 alpha-2 format." - }, - "supportedCompressions": { - "type": "array", - "description": "The compression types supported by the client.", - "enumDescriptions": [ - "Unknown.", - "Raw, uncompressed data.", - "Rice-Golomb encoded data." - ], - "items": { - "type": "string", - "enum": [ - "COMPRESSION_TYPE_UNSPECIFIED", - "RAW", - "RICE" - ] - } - } - } - }, - "FetchThreatListUpdatesResponse": { - "id": "FetchThreatListUpdatesResponse", - "type": "object", - "properties": { - "listUpdateResponses": { - "type": "array", - "description": "The list updates requested by the clients.", - "items": { - "$ref": "ListUpdateResponse" - } - }, - "minimumWaitDuration": { - "type": "string", - "description": "The minimum duration the client must wait before issuing any update request. If this field is not set clients may update as soon as they want." - } - } - }, - "ListUpdateResponse": { - "id": "ListUpdateResponse", - "type": "object", - "description": "An update to an individual list.", - "properties": { - "threatType": { - "type": "string", - "description": "The threat type for which data is returned.", - "enum": [ - "THREAT_TYPE_UNSPECIFIED", - "MALWARE", - "SOCIAL_ENGINEERING", - "UNWANTED_SOFTWARE", - "POTENTIALLY_HARMFUL_APPLICATION" - ] - }, - "threatEntryType": { - "type": "string", - "description": "The format of the threats.", - "enum": [ - "THREAT_ENTRY_TYPE_UNSPECIFIED", - "URL", - "EXECUTABLE", - "IP_RANGE" - ] - }, - "platformType": { - "type": "string", - "description": "The platform type for which data is returned.", - "enum": [ - "PLATFORM_TYPE_UNSPECIFIED", - "WINDOWS", - "LINUX", - "ANDROID", - "OSX", - "IOS", - "ANY_PLATFORM", - "ALL_PLATFORMS", - "CHROME" - ] - }, - "responseType": { - "type": "string", - "description": "The type of response. This may indicate that an action is required by the client when the response is received.", - "enum": [ - "RESPONSE_TYPE_UNSPECIFIED", - "PARTIAL_UPDATE", - "FULL_UPDATE" - ] - }, - "additions": { - "type": "array", - "description": "A set of entries to add to a local threat type's list. Repeated to allow for a combination of compressed and raw data to be sent in a single response.", - "items": { - "$ref": "ThreatEntrySet" - } - }, - "removals": { - "type": "array", - "description": "A set of entries to remove from a local threat type's list. Repeated for the same reason as above.", - "items": { - "$ref": "ThreatEntrySet" - } - }, - "newClientState": { - "type": "string", - "description": "The new client state, in encrypted format. Opaque to clients.", - "format": "byte" - }, - "checksum": { - "$ref": "Checksum", - "description": "The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided update. If the client state doesn't match the expected state, the client must disregard this update and retry later." - } - } - }, - "ThreatEntrySet": { - "id": "ThreatEntrySet", - "type": "object", - "description": "A set of threats that should be added or removed from a client's local database.", - "properties": { - "compressionType": { - "type": "string", - "description": "The compression type for the entries in this set.", - "enum": [ - "COMPRESSION_TYPE_UNSPECIFIED", - "RAW", - "RICE" - ] - }, - "rawHashes": { - "$ref": "RawHashes", - "description": "The raw SHA256-formatted entries." - }, - "rawIndices": { - "$ref": "RawIndices", - "description": "The raw removal indices for a local list." - }, - "riceHashes": { - "$ref": "RiceDeltaEncoding", - "description": "The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding." - }, - "riceIndices": { - "$ref": "RiceDeltaEncoding", - "description": "The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices." - } - } - }, - "RawHashes": { - "id": "RawHashes", - "type": "object", - "description": "The uncompressed threat entries in hash format of a particular prefix length. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URL. Used for sending ThreatEntrySet to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.", - "properties": { - "prefixSize": { - "type": "integer", - "description": "The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).", - "format": "int32" - }, - "rawHashes": { - "type": "string", - "description": "The hashes, all concatenated into one long string. Each hash has a prefix size of |prefix_size| above. Hashes are sorted in lexicographic order.", - "format": "byte" - } - } - }, - "RawIndices": { - "id": "RawIndices", - "type": "object", - "description": "A set of raw indices to remove from a local list.", - "properties": { - "indices": { - "type": "array", - "description": "The indices to remove from a lexicographically-sorted local list.", - "items": { - "type": "integer", - "format": "int32" - } - } - } - }, - "RiceDeltaEncoding": { - "id": "RiceDeltaEncoding", - "type": "object", - "description": "The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.", - "properties": { - "firstValue": { - "type": "string", - "description": "The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value.", - "format": "int64" - }, - "riceParameter": { - "type": "integer", - "description": "The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if `num_entries` is zero.", - "format": "int32" - }, - "numEntries": { - "type": "integer", - "description": "The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in `first_value`.", - "format": "int32" - }, - "encodedData": { - "type": "string", - "description": "The encoded deltas that are encoded using the Golomb-Rice coder.", - "format": "byte" - } - } - }, - "Checksum": { - "id": "Checksum", - "type": "object", - "description": "The expected state of a client's local database.", - "properties": { - "sha256": { - "type": "string", - "description": "The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database.", - "format": "byte" - } - } - }, - "FindFullHashesRequest": { - "id": "FindFullHashesRequest", - "type": "object", - "description": "Request to return full hashes matched by the provided hash prefixes.", - "properties": { - "client": { - "$ref": "ClientInfo", - "description": "The client metadata." - }, - "clientStates": { - "type": "array", - "description": "The current client states for each of the client's local threat lists.", - "items": { - "type": "string", - "format": "byte" - } - }, - "threatInfo": { - "$ref": "ThreatInfo", - "description": "The lists and hashes to be checked." - } - } - }, - "FindFullHashesResponse": { - "id": "FindFullHashesResponse", - "type": "object", - "properties": { - "matches": { - "type": "array", - "description": "The full hashes that matched the requested prefixes.", - "items": { - "$ref": "ThreatMatch" - } - }, - "minimumWaitDuration": { - "type": "string", - "description": "The minimum duration the client must wait before issuing any find hashes request. If this field is not set, clients can issue a request as soon as they want." - }, - "negativeCacheDuration": { - "type": "string", - "description": "For requested entities that did not match the threat list, how long to cache the response." - } - } - }, - "ListThreatListsResponse": { - "id": "ListThreatListsResponse", - "type": "object", - "properties": { "threatLists": { - "type": "array", - "description": "The lists available for download by the client.", - "items": { - "$ref": "ThreatListDescriptor" - } - } - } - }, - "ThreatListDescriptor": { - "id": "ThreatListDescriptor", - "type": "object", - "description": "Describes an individual threat list. A list is defined by three parameters: the type of threat posed, the type of platform targeted by the threat, and the type of entries in the list.", - "properties": { - "threatType": { - "type": "string", - "description": "The threat type posed by the list's entries.", - "enum": [ - "THREAT_TYPE_UNSPECIFIED", - "MALWARE", - "SOCIAL_ENGINEERING", - "UNWANTED_SOFTWARE", - "POTENTIALLY_HARMFUL_APPLICATION" - ] + "methods": { + "list": { + "response": { + "$ref": "ListThreatListsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": {}, + "flatPath": "v4/threatLists", + "path": "v4/threatLists", + "id": "safebrowsing.threatLists.list", + "description": "Lists the Safe Browsing threat lists available for download." + } + } }, - "platformType": { - "type": "string", - "description": "The platform type targeted by the list's entries.", - "enum": [ - "PLATFORM_TYPE_UNSPECIFIED", - "WINDOWS", - "LINUX", - "ANDROID", - "OSX", - "IOS", - "ANY_PLATFORM", - "ALL_PLATFORMS", - "CHROME" - ] + "threatMatches": { + "methods": { + "find": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "FindThreatMatchesResponse" + }, + "parameters": {}, + "flatPath": "v4/threatMatches:find", + "id": "safebrowsing.threatMatches.find", + "path": "v4/threatMatches:find", + "description": "Finds the threat entries that match the Safe Browsing lists.", + "request": { + "$ref": "FindThreatMatchesRequest" + } + } + } + } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" }, - "threatEntryType": { - "type": "string", - "description": "The entry types contained in the list.", - "enum": [ - "THREAT_ENTRY_TYPE_UNSPECIFIED", - "URL", - "EXECUTABLE", - "IP_RANGE" - ] + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "type": "string", + "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." + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." } - } - } - }, - "resources": { - "threatMatches": { - "methods": { - "find": { - "id": "safebrowsing.threatMatches.find", - "path": "v4/threatMatches:find", - "httpMethod": "POST", - "description": "Finds the threat entries that match the Safe Browsing lists.", - "request": { - "$ref": "FindThreatMatchesRequest" - }, - "response": { - "$ref": "FindThreatMatchesResponse" - } - } - } }, - "threatListUpdates": { - "methods": { - "fetch": { - "id": "safebrowsing.threatListUpdates.fetch", - "path": "v4/threatListUpdates:fetch", - "httpMethod": "POST", - "description": "Fetches the most recent threat list updates. A client can request updates for multiple lists at once.", - "request": { - "$ref": "FetchThreatListUpdatesRequest" - }, - "response": { - "$ref": "FetchThreatListUpdatesResponse" - } + "schemas": { + "ThreatEntryMetadata": { + "id": "ThreatEntryMetadata", + "description": "The metadata associated with a specific threat entry. The client is expected\nto know the metadata key/value pairs associated with each threat type.", + "type": "object", + "properties": { + "entries": { + "description": "The metadata entries.", + "type": "array", + "items": { + "$ref": "MetadataEntry" + } + } + } + }, + "RawIndices": { + "type": "object", + "properties": { + "indices": { + "description": "The indices to remove from a lexicographically-sorted local list.", + "type": "array", + "items": { + "format": "int32", + "type": "integer" + } + } + }, + "id": "RawIndices", + "description": "A set of raw indices to remove from a local list." + }, + "RawHashes": { + "description": "The uncompressed threat entries in hash format of a particular prefix length.\nHashes can be anywhere from 4 to 32 bytes in size. A large majority are 4\nbytes, but some hashes are lengthened if they collide with the hash of a\npopular URL.\n\nUsed for sending ThreatEntrySet to clients that do not support compression,\nor when sending non-4-byte hashes to clients that do support compression.", + "type": "object", + "properties": { + "rawHashes": { + "description": "The hashes, in binary format, concatenated into one long string. Hashes are\nsorted in lexicographic order. For JSON API users, hashes are\nbase64-encoded.", + "format": "byte", + "type": "string" + }, + "prefixSize": { + "description": "The number of bytes for each prefix encoded below. This field can be\nanywhere from 4 (shortest prefix) to 32 (full SHA256 hash).", + "format": "int32", + "type": "integer" + } + }, + "id": "RawHashes" + }, + "FetchThreatListUpdatesResponse": { + "type": "object", + "properties": { + "listUpdateResponses": { + "description": "The list updates requested by the clients.", + "type": "array", + "items": { + "$ref": "ListUpdateResponse" + } + }, + "minimumWaitDuration": { + "description": "The minimum duration the client must wait before issuing any update\nrequest. If this field is not set clients may update as soon as they want.", + "format": "google-duration", + "type": "string" + } + }, + "id": "FetchThreatListUpdatesResponse" + }, + "Checksum": { + "description": "The expected state of a client's local database.", + "type": "object", + "properties": { + "sha256": { + "description": "The SHA256 hash of the client state; that is, of the sorted list of all\nhashes present in the database.", + "format": "byte", + "type": "string" + } + }, + "id": "Checksum" + }, + "FindFullHashesResponse": { + "id": "FindFullHashesResponse", + "type": "object", + "properties": { + "minimumWaitDuration": { + "description": "The minimum duration the client must wait before issuing any find hashes\nrequest. If this field is not set, clients can issue a request as soon as\nthey want.", + "format": "google-duration", + "type": "string" + }, + "matches": { + "description": "The full hashes that matched the requested prefixes.", + "type": "array", + "items": { + "$ref": "ThreatMatch" + } + }, + "negativeCacheDuration": { + "type": "string", + "description": "For requested entities that did not match the threat list, how long to\ncache the response.", + "format": "google-duration" + } + } + }, + "ThreatEntrySet": { + "description": "A set of threats that should be added or removed from a client's local\ndatabase.", + "type": "object", + "properties": { + "compressionType": { + "enumDescriptions": [ + "Unknown.", + "Raw, uncompressed data.", + "Rice-Golomb encoded data." + ], + "enum": [ + "COMPRESSION_TYPE_UNSPECIFIED", + "RAW", + "RICE" + ], + "description": "The compression type for the entries in this set.", + "type": "string" + }, + "riceIndices": { + "$ref": "RiceDeltaEncoding", + "description": "The encoded local, lexicographically-sorted list indices, using a\nGolomb-Rice encoding. Used for sending compressed removal indices. The\nremoval indices (uint32) are sorted in ascending order, then delta encoded\nand stored as encoded_data." + }, + "rawIndices": { + "$ref": "RawIndices", + "description": "The raw removal indices for a local list." + }, + "rawHashes": { + "$ref": "RawHashes", + "description": "The raw SHA256-formatted entries." + }, + "riceHashes": { + "description": "The encoded 4-byte prefixes of SHA256-formatted entries, using a\nGolomb-Rice encoding. The hashes are converted to uint32, sorted in\nascending order, then delta encoded and stored as encoded_data.", + "$ref": "RiceDeltaEncoding" + } + }, + "id": "ThreatEntrySet" + }, + "FindFullHashesRequest": { + "properties": { + "client": { + "description": "The client metadata.", + "$ref": "ClientInfo" + }, + "threatInfo": { + "description": "The lists and hashes to be checked.", + "$ref": "ThreatInfo" + }, + "apiClient": { + "$ref": "ClientInfo", + "description": "Client metadata associated with callers of higher-level APIs built on top\nof the client's implementation." + }, + "clientStates": { + "description": "The current client states for each of the client's local threat lists.", + "type": "array", + "items": { + "format": "byte", + "type": "string" + } + } + }, + "id": "FindFullHashesRequest", + "description": "Request to return full hashes matched by the provided hash prefixes.", + "type": "object" + }, + "ListUpdateRequest": { + "description": "A single list update request.", + "type": "object", + "properties": { + "state": { + "description": "The current state of the client for the requested list (the encrypted\nclient state that was received from the last successful list update).", + "format": "byte", + "type": "string" + }, + "platformType": { + "enumDescriptions": [ + "Unknown platform.", + "Threat posed to Windows.", + "Threat posed to Linux.", + "Threat posed to Android.", + "Threat posed to OS X.", + "Threat posed to iOS.", + "Threat posed to at least one of the defined platforms.", + "Threat posed to all defined platforms.", + "Threat posed to Chrome." + ], + "enum": [ + "PLATFORM_TYPE_UNSPECIFIED", + "WINDOWS", + "LINUX", + "ANDROID", + "OSX", + "IOS", + "ANY_PLATFORM", + "ALL_PLATFORMS", + "CHROME" + ], + "description": "The type of platform at risk by entries present in the list.", + "type": "string" + }, + "threatType": { + "enum": [ + "THREAT_TYPE_UNSPECIFIED", + "MALWARE", + "SOCIAL_ENGINEERING", + "UNWANTED_SOFTWARE", + "POTENTIALLY_HARMFUL_APPLICATION" + ], + "description": "The type of threat posed by entries present in the list.", + "type": "string", + "enumDescriptions": [ + "Unknown.", + "Malware threat type.", + "Social engineering threat type.", + "Unwanted software threat type.", + "Potentially harmful application threat type." + ] + }, + "constraints": { + "$ref": "Constraints", + "description": "The constraints associated with this request." + }, + "threatEntryType": { + "enumDescriptions": [ + "Unspecified.", + "A URL.", + "An executable program.", + "An IP range.", + "Chrome extension.", + "Filename.", + "CERT" + ], + "enum": [ + "THREAT_ENTRY_TYPE_UNSPECIFIED", + "URL", + "EXECUTABLE", + "IP_RANGE", + "CHROME_EXTENSION", + "FILENAME", + "CERT" + ], + "description": "The types of entries present in the list.", + "type": "string" + } + }, + "id": "ListUpdateRequest" + }, + "FetchThreatListUpdatesRequest": { + "type": "object", + "properties": { + "client": { + "description": "The client metadata.", + "$ref": "ClientInfo" + }, + "listUpdateRequests": { + "type": "array", + "items": { + "$ref": "ListUpdateRequest" + }, + "description": "The requested threat list updates." + } + }, + "id": "FetchThreatListUpdatesRequest", + "description": "Describes a Safe Browsing API update request. Clients can request updates for\nmultiple lists in a single request.\nNOTE: Field index 2 is unused.\nNEXT: 5" + }, + "ListUpdateResponse": { + "description": "An update to an individual list.", + "type": "object", + "properties": { + "platformType": { + "description": "The platform type for which data is returned.", + "type": "string", + "enumDescriptions": [ + "Unknown platform.", + "Threat posed to Windows.", + "Threat posed to Linux.", + "Threat posed to Android.", + "Threat posed to OS X.", + "Threat posed to iOS.", + "Threat posed to at least one of the defined platforms.", + "Threat posed to all defined platforms.", + "Threat posed to Chrome." + ], + "enum": [ + "PLATFORM_TYPE_UNSPECIFIED", + "WINDOWS", + "LINUX", + "ANDROID", + "OSX", + "IOS", + "ANY_PLATFORM", + "ALL_PLATFORMS", + "CHROME" + ] + }, + "threatEntryType": { + "enumDescriptions": [ + "Unspecified.", + "A URL.", + "An executable program.", + "An IP range.", + "Chrome extension.", + "Filename.", + "CERT" + ], + "enum": [ + "THREAT_ENTRY_TYPE_UNSPECIFIED", + "URL", + "EXECUTABLE", + "IP_RANGE", + "CHROME_EXTENSION", + "FILENAME", + "CERT" + ], + "description": "The format of the threats.", + "type": "string" + }, + "additions": { + "description": "A set of entries to add to a local threat type's list. Repeated to allow\nfor a combination of compressed and raw data to be sent in a single\nresponse.", + "type": "array", + "items": { + "$ref": "ThreatEntrySet" + } + }, + "checksum": { + "$ref": "Checksum", + "description": "The expected SHA256 hash of the client state; that is, of the sorted list\nof all hashes present in the database after applying the provided update.\nIf the client state doesn't match the expected state, the client must\ndisregard this update and retry later." + }, + "responseType": { + "type": "string", + "enumDescriptions": [ + "Unknown.", + "Partial updates are applied to the client's existing local database.", + "Full updates replace the client's entire local database. This means\nthat either the client was seriously out-of-date or the client is\nbelieved to be corrupt." + ], + "enum": [ + "RESPONSE_TYPE_UNSPECIFIED", + "PARTIAL_UPDATE", + "FULL_UPDATE" + ], + "description": "The type of response. This may indicate that an action is required by the\nclient when the response is received." + }, + "threatType": { + "description": "The threat type for which data is returned.", + "type": "string", + "enumDescriptions": [ + "Unknown.", + "Malware threat type.", + "Social engineering threat type.", + "Unwanted software threat type.", + "Potentially harmful application threat type." + ], + "enum": [ + "THREAT_TYPE_UNSPECIFIED", + "MALWARE", + "SOCIAL_ENGINEERING", + "UNWANTED_SOFTWARE", + "POTENTIALLY_HARMFUL_APPLICATION" + ] + }, + "removals": { + "description": "A set of entries to remove from a local threat type's list. In practice,\nthis field is empty or contains exactly one ThreatEntrySet.", + "type": "array", + "items": { + "$ref": "ThreatEntrySet" + } + }, + "newClientState": { + "description": "The new client state, in encrypted format. Opaque to clients.", + "format": "byte", + "type": "string" + } + }, + "id": "ListUpdateResponse" + }, + "Constraints": { + "properties": { + "maxDatabaseEntries": { + "description": "Sets the maximum number of entries that the client is willing to have\nin the local database. This should be a power of 2 between 2**10 and\n2**20. If zero, no database size limit is set.", + "format": "int32", + "type": "integer" + }, + "region": { + "description": "Requests the list for a specific geographic location. If not set the\nserver may pick that value based on the user's IP address. Expects ISO\n3166-1 alpha-2 format.", + "type": "string" + }, + "supportedCompressions": { + "description": "The compression types supported by the client.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "COMPRESSION_TYPE_UNSPECIFIED", + "RAW", + "RICE" + ] + }, + "enumDescriptions": [ + "Unknown.", + "Raw, uncompressed data.", + "Rice-Golomb encoded data." + ] + }, + "maxUpdateEntries": { + "description": "The maximum size in number of entries. The update will not contain more\nentries than this value. This should be a power of 2 between 2**10 and\n2**20. If zero, no update size limit is set.", + "format": "int32", + "type": "integer" + } + }, + "id": "Constraints", + "description": "The constraints for this update.", + "type": "object" + }, + "ThreatMatch": { + "properties": { + "threat": { + "$ref": "ThreatEntry", + "description": "The threat matching this threat." + }, + "platformType": { + "enumDescriptions": [ + "Unknown platform.", + "Threat posed to Windows.", + "Threat posed to Linux.", + "Threat posed to Android.", + "Threat posed to OS X.", + "Threat posed to iOS.", + "Threat posed to at least one of the defined platforms.", + "Threat posed to all defined platforms.", + "Threat posed to Chrome." + ], + "enum": [ + "PLATFORM_TYPE_UNSPECIFIED", + "WINDOWS", + "LINUX", + "ANDROID", + "OSX", + "IOS", + "ANY_PLATFORM", + "ALL_PLATFORMS", + "CHROME" + ], + "description": "The platform type matching this threat.", + "type": "string" + }, + "threatEntryType": { + "description": "The threat entry type matching this threat.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "A URL.", + "An executable program.", + "An IP range.", + "Chrome extension.", + "Filename.", + "CERT" + ], + "enum": [ + "THREAT_ENTRY_TYPE_UNSPECIFIED", + "URL", + "EXECUTABLE", + "IP_RANGE", + "CHROME_EXTENSION", + "FILENAME", + "CERT" + ] + }, + "cacheDuration": { + "description": "The cache lifetime for the returned match. Clients must not cache this\nresponse for more than this duration to avoid false positives.", + "format": "google-duration", + "type": "string" + }, + "threatEntryMetadata": { + "$ref": "ThreatEntryMetadata", + "description": "Optional metadata associated with this threat." + }, + "threatType": { + "description": "The threat type matching this threat.", + "type": "string", + "enumDescriptions": [ + "Unknown.", + "Malware threat type.", + "Social engineering threat type.", + "Unwanted software threat type.", + "Potentially harmful application threat type." + ], + "enum": [ + "THREAT_TYPE_UNSPECIFIED", + "MALWARE", + "SOCIAL_ENGINEERING", + "UNWANTED_SOFTWARE", + "POTENTIALLY_HARMFUL_APPLICATION" + ] + } + }, + "id": "ThreatMatch", + "description": "A match when checking a threat entry in the Safe Browsing threat lists.", + "type": "object" + }, + "ListThreatListsResponse": { + "properties": { + "threatLists": { + "type": "array", + "items": { + "$ref": "ThreatListDescriptor" + }, + "description": "The lists available for download by the client." + } + }, + "id": "ListThreatListsResponse", + "type": "object" + }, + "RiceDeltaEncoding": { + "description": "The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or\ncompressed removal indices.", + "type": "object", + "properties": { + "firstValue": { + "description": "The offset of the first entry in the encoded data, or, if only a single\ninteger was encoded, that single integer's value.", + "format": "int64", + "type": "string" + }, + "encodedData": { + "type": "string", + "description": "The encoded deltas that are encoded using the Golomb-Rice coder.", + "format": "byte" + }, + "numEntries": { + "description": "The number of entries that are delta encoded in the encoded data. If only a\nsingle integer was encoded, this will be zero and the single value will be\nstored in `first_value`.", + "format": "int32", + "type": "integer" + }, + "riceParameter": { + "description": "The Golomb-Rice parameter, which is a number between 2 and 28. This field\nis missing (that is, zero) if `num_entries` is zero.", + "format": "int32", + "type": "integer" + } + }, + "id": "RiceDeltaEncoding" + }, + "ThreatEntry": { + "properties": { + "digest": { + "description": "The digest of an executable in SHA256 format. The API supports both\nbinary and hex digests. For JSON requests, digests are base64-encoded.", + "format": "byte", + "type": "string" + }, + "hash": { + "description": "A hash prefix, consisting of the most significant 4-32 bytes of a SHA256\nhash. This field is in binary format. For JSON requests, hashes are\nbase64-encoded.", + "format": "byte", + "type": "string" + }, + "url": { + "description": "A URL.", + "type": "string" + } + }, + "id": "ThreatEntry", + "description": "An individual threat; for example, a malicious URL or its hash\nrepresentation. Only one of these fields should be set.", + "type": "object" + }, + "FindThreatMatchesResponse": { + "type": "object", + "properties": { + "matches": { + "description": "The threat list matches.", + "type": "array", + "items": { + "$ref": "ThreatMatch" + } + } + }, + "id": "FindThreatMatchesResponse" + }, + "ThreatListDescriptor": { + "id": "ThreatListDescriptor", + "description": "Describes an individual threat list. A list is defined by three parameters:\nthe type of threat posed, the type of platform targeted by the threat, and\nthe type of entries in the list.", + "type": "object", + "properties": { + "platformType": { + "description": "The platform type targeted by the list's entries.", + "type": "string", + "enumDescriptions": [ + "Unknown platform.", + "Threat posed to Windows.", + "Threat posed to Linux.", + "Threat posed to Android.", + "Threat posed to OS X.", + "Threat posed to iOS.", + "Threat posed to at least one of the defined platforms.", + "Threat posed to all defined platforms.", + "Threat posed to Chrome." + ], + "enum": [ + "PLATFORM_TYPE_UNSPECIFIED", + "WINDOWS", + "LINUX", + "ANDROID", + "OSX", + "IOS", + "ANY_PLATFORM", + "ALL_PLATFORMS", + "CHROME" + ] + }, + "threatType": { + "enumDescriptions": [ + "Unknown.", + "Malware threat type.", + "Social engineering threat type.", + "Unwanted software threat type.", + "Potentially harmful application threat type." + ], + "enum": [ + "THREAT_TYPE_UNSPECIFIED", + "MALWARE", + "SOCIAL_ENGINEERING", + "UNWANTED_SOFTWARE", + "POTENTIALLY_HARMFUL_APPLICATION" + ], + "description": "The threat type posed by the list's entries.", + "type": "string" + }, + "threatEntryType": { + "description": "The entry types contained in the list.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "A URL.", + "An executable program.", + "An IP range.", + "Chrome extension.", + "Filename.", + "CERT" + ], + "enum": [ + "THREAT_ENTRY_TYPE_UNSPECIFIED", + "URL", + "EXECUTABLE", + "IP_RANGE", + "CHROME_EXTENSION", + "FILENAME", + "CERT" + ] + } + } + }, + "MetadataEntry": { + "description": "A single metadata entry.", + "type": "object", + "properties": { + "value": { + "description": "The metadata entry value. For JSON requests, the value is base64-encoded.", + "format": "byte", + "type": "string" + }, + "key": { + "description": "The metadata entry key. For JSON requests, the key is base64-encoded.", + "format": "byte", + "type": "string" + } + }, + "id": "MetadataEntry" + }, + "ClientInfo": { + "type": "object", + "properties": { + "clientId": { + "description": "A client ID that (hopefully) uniquely identifies the client implementation\nof the Safe Browsing API.", + "type": "string" + }, + "clientVersion": { + "description": "The version of the client implementation.", + "type": "string" + } + }, + "id": "ClientInfo", + "description": "The client metadata associated with Safe Browsing API requests." + }, + "ThreatInfo": { + "description": "The information regarding one or more threats that a client submits when\nchecking for matches in threat lists.", + "type": "object", + "properties": { + "threatEntryTypes": { + "description": "The entry types to be checked.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "THREAT_ENTRY_TYPE_UNSPECIFIED", + "URL", + "EXECUTABLE", + "IP_RANGE", + "CHROME_EXTENSION", + "FILENAME", + "CERT" + ] + }, + "enumDescriptions": [ + "Unspecified.", + "A URL.", + "An executable program.", + "An IP range.", + "Chrome extension.", + "Filename.", + "CERT" + ] + }, + "threatTypes": { + "description": "The threat types to be checked.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "THREAT_TYPE_UNSPECIFIED", + "MALWARE", + "SOCIAL_ENGINEERING", + "UNWANTED_SOFTWARE", + "POTENTIALLY_HARMFUL_APPLICATION" + ] + }, + "enumDescriptions": [ + "Unknown.", + "Malware threat type.", + "Social engineering threat type.", + "Unwanted software threat type.", + "Potentially harmful application threat type." + ] + }, + "platformTypes": { + "enumDescriptions": [ + "Unknown platform.", + "Threat posed to Windows.", + "Threat posed to Linux.", + "Threat posed to Android.", + "Threat posed to OS X.", + "Threat posed to iOS.", + "Threat posed to at least one of the defined platforms.", + "Threat posed to all defined platforms.", + "Threat posed to Chrome." + ], + "description": "The platform types to be checked.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "PLATFORM_TYPE_UNSPECIFIED", + "WINDOWS", + "LINUX", + "ANDROID", + "OSX", + "IOS", + "ANY_PLATFORM", + "ALL_PLATFORMS", + "CHROME" + ] + } + }, + "threatEntries": { + "description": "The threat entries to be checked.", + "type": "array", + "items": { + "$ref": "ThreatEntry" + } + } + }, + "id": "ThreatInfo" + }, + "FindThreatMatchesRequest": { + "description": "Request to check entries against lists.", + "type": "object", + "properties": { + "client": { + "$ref": "ClientInfo", + "description": "The client metadata." + }, + "threatInfo": { + "$ref": "ThreatInfo", + "description": "The lists and entries to be checked for matches." + } + }, + "id": "FindThreatMatchesRequest" } - } }, - "fullHashes": { - "methods": { - "find": { - "id": "safebrowsing.fullHashes.find", - "path": "v4/fullHashes:find", - "httpMethod": "POST", - "description": "Finds the full hashes that match the requested hash prefixes.", - "request": { - "$ref": "FindFullHashesRequest" - }, - "response": { - "$ref": "FindFullHashesResponse" - } - } - } + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "threatLists": { - "methods": { - "list": { - "id": "safebrowsing.threatLists.list", - "path": "v4/threatLists", - "httpMethod": "GET", - "description": "Lists the Safe Browsing threat lists available for download.", - "response": { - "$ref": "ListThreatListsResponse" - } - } - } - } - } + "protocol": "rest", + "version": "v4", + "baseUrl": "https://safebrowsing.googleapis.com/", + "description": "The Safe Browsing API is an experimental API that allows client applications to check URLs against Google's constantly-updated blacklists of suspected phishing and malware pages. Your client application can use the API to download an encrypted table for local, client-side lookups of URLs.", + "servicePath": "", + "kind": "discovery#restDescription", + "rootUrl": "https://safebrowsing.googleapis.com/" } diff --git a/etc/api/script/v1/script-api.json b/etc/api/script/v1/script-api.json index 721262d461..38f20ab7e9 100644 --- a/etc/api/script/v1/script-api.json +++ b/etc/api/script/v1/script-api.json @@ -1,330 +1,369 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/FcNWZezE05ypidUunx03uCyJR70\"", - "discoveryVersion": "v1", - "id": "script:v1", - "name": "script", - "version": "v1", - "revision": "20160801", - "title": "Google Apps Script Execution API", - "description": "Executes Google Apps Script projects.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/apps-script/execution/rest/v1/scripts/run", - "protocol": "rest", - "baseUrl": "https://script.googleapis.com/", - "basePath": "", - "rootUrl": "https://script.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://mail.google.com/": { - "description": "View and manage your mail" - }, - "https://www.google.com/calendar/feeds": { - "description": "Manage your calendars" - }, - "https://www.google.com/m8/feeds": { - "description": "Manage your contacts" - }, - "https://www.googleapis.com/auth/admin.directory.group": { - "description": "View and manage the provisioning of groups on your domain" - }, - "https://www.googleapis.com/auth/admin.directory.user": { - "description": "View and manage the provisioning of users on your domain" - }, - "https://www.googleapis.com/auth/drive": { - "description": "View and manage the files in your Google Drive" - }, - "https://www.googleapis.com/auth/forms": { - "description": "View and manage your forms in Google Drive" - }, - "https://www.googleapis.com/auth/forms.currentonly": { - "description": "View and manage forms that this application has been installed in" - }, - "https://www.googleapis.com/auth/groups": { - "description": "View and manage your Google Groups" - }, - "https://www.googleapis.com/auth/spreadsheets": { - "description": "View and manage your spreadsheets in Google Drive" - }, - "https://www.googleapis.com/auth/userinfo.email": { - "description": "View your email address" + "revision": "20170509", + "id": "script:v1", + "documentationLink": "https://developers.google.com/apps-script/execution/rest/v1/scripts/run", + "title": "Google Apps Script Execution API", + "discoveryVersion": "v1", + "ownerName": "Google", + "resources": { + "scripts": { + "methods": { + "run": { + "request": { + "$ref": "ExecutionRequest" + }, + "description": "Runs a function in an Apps Script project. The project must be deployed\nfor use with the Apps Script Execution API.\n\nThis method requires authorization with an OAuth 2.0 token that includes at\nleast one of the scopes listed in the [Authorization](#authorization)\nsection; script projects that do not require authorization cannot be\nexecuted through this API. To find the correct scopes to include in the\nauthentication token, open the project in the script editor, then select\n**File \u003e Project properties** and click the **Scopes** tab.", + "httpMethod": "POST", + "parameterOrder": [ + "scriptId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "scriptId": { + "location": "path", + "description": "The project key of the script to be executed. To find the project key, open\nthe project in the script editor and select **File \u003e Project properties**.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://mail.google.com/", + "https://www.google.com/calendar/feeds", + "https://www.google.com/m8/feeds", + "https://www.googleapis.com/auth/admin.directory.group", + "https://www.googleapis.com/auth/admin.directory.user", + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/forms", + "https://www.googleapis.com/auth/forms.currentonly", + "https://www.googleapis.com/auth/groups", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1/scripts/{scriptId}:run", + "id": "script.scripts.run", + "path": "v1/scripts/{scriptId}:run" + } + } } - } - } - }, - "schemas": { - "ExecutionRequest": { - "id": "ExecutionRequest", - "type": "object", - "description": "A request to run the function in a script. The script is identified by the specified `script_id`. Executing a function on a script will return results based on the implementation of the script.", - "properties": { - "function": { - "type": "string", - "description": "The name of the function to execute in the given script. The name does not include parentheses or parameters." - }, - "parameters": { - "type": "array", - "description": "The parameters to be passed to the function being executed. The type for each parameter should match the expected type in Apps Script. Parameters cannot be Apps Script-specific objects (such as a `Document` or `Calendar`); they can only be primitive types such as a `string`, `number`, `array`, `object`, or `boolean`. Optional.", - "items": { - "type": "any" - } - }, - "sessionState": { - "type": "string", - "description": "This field is not used." - }, - "devMode": { - "type": "boolean", - "description": "If `true` and the user is an owner of the script, the script runs at the most recently saved version rather than the version deployed for use with the Execution API. Optional; default is `false`." - } - } }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "The response will not arrive until the function finishes executing. The maximum runtime is listed in the guide to [limitations in Apps Script](https://developers.google.com/apps-script/guides/services/quotas#current_limitations).\nIf the script function returns successfully, the `response` field will contain an `ExecutionResponse` object with the function's return value in the object's `result` field.\n\nIf the script function (or Apps Script itself) throws an exception, the `error` field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error.\n\nIf the `run` call itself fails (for example, because of a malformed request or an authorization error), the method will return an HTTP response code in the 4XX range with a different format for the response body. Client libraries will automatically convert a 4XX response into an exception class.", - "properties": { - "name": { - "type": "string", - "description": "This field is not used." + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" }, - "metadata": { - "type": "object", - "description": "This field is not used.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" }, - "done": { - "type": "boolean", - "description": "This field is not used." + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" }, - "error": { - "$ref": "Status", - "description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, this field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error." + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" }, - "response": { - "type": "object", - "description": "If the script function returns successfully, this field will contain an `ExecutionResponse` object with the function's return value as the object's `result` field.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "key": { + "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", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" } - } }, - "Status": { - "id": "Status", - "type": "object", - "description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's `error` field will contain this `Status` object.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." - }, - "details": { - "type": "array", - "description": "An array that contains a single `ExecutionError` object that provides information about the nature of the error.", - "items": { + "schemas": { + "ScriptStackTraceElement": { + "description": "A stack trace through the script that shows where the execution failed.", "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "properties": { + "function": { + "description": "The name of the function that failed.", + "type": "string" + }, + "lineNumber": { + "description": "The line number where the script failed.", + "format": "int32", + "type": "integer" + } + }, + "id": "ScriptStackTraceElement" + }, + "ExecutionError": { + "description": "An object that provides information about the nature of an error in the Apps\nScript Execution API. If an\n`run` call succeeds but the\nscript function (or Apps Script itself) throws an exception, the response\nbody's `error` field contains a\n`Status` object. The `Status` object's `details` field\ncontains an array with a single one of these `ExecutionError` objects.", + "type": "object", + "properties": { + "errorMessage": { + "description": "The error message thrown by Apps Script, usually localized into the user's\nlanguage.", + "type": "string" + }, + "scriptStackTraceElements": { + "description": "An array of objects that provide a stack trace through the script to show\nwhere the execution failed, with the deepest call first.", + "type": "array", + "items": { + "$ref": "ScriptStackTraceElement" + } + }, + "errorType": { + "description": "The error type, for example `TypeError` or `ReferenceError`. If the error\ntype is unavailable, this field is not included.", + "type": "string" + } + }, + "id": "ExecutionError" + }, + "Status": { + "description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's `error` field will contain this `Status` object.", + "type": "object", + "properties": { + "message": { + "description": "A developer-facing error message, which is in English. Any user-facing error message is localized and sent in the [`google.rpc.Status.details`](google.rpc.Status.details) field, or localized by the client.", + "type": "string" + }, + "details": { + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "description": "An array that contains a single `ExecutionError` object that provides information about the nature of the error." + }, + "code": { + "description": "The status code. For this API, this value will always be 3, corresponding to an INVALID_ARGUMENT error.", + "format": "int32", + "type": "integer" + } + }, + "id": "Status" + }, + "ExecutionRequest": { + "id": "ExecutionRequest", + "description": "A request to run the function in a script. The script is identified by the\nspecified `script_id`. Executing a function on a script returns results\nbased on the implementation of the script.", + "type": "object", + "properties": { + "parameters": { + "description": "The parameters to be passed to the function being executed. The object type\nfor each parameter should match the expected type in Apps Script.\nParameters cannot be Apps Script-specific object types (such as a\n`Document` or a `Calendar`); they can only be primitive types such as\n`string`, `number`, `array`, `object`, or `boolean`. Optional.", + "type": "array", + "items": { + "type": "any" + } + }, + "sessionState": { + "description": "For Android add-ons only. An ID that represents the user's current session\nin the Android app for Google Docs or Sheets, included as extra data in the\n[`Intent`](https://developer.android.com/guide/components/intents-filters.html)\nthat launches the add-on. When an Android add-on is run with a session\nstate, it gains the privileges of a\n[bound](https://developers.google.com/apps-script/guides/bound) script —\nthat is, it can access information like the user's current cursor position\n(in Docs) or selected cell (in Sheets). To retrieve the state, call\n`Intent.getStringExtra(\"com.google.android.apps.docs.addons.SessionState\")`.\nOptional.", + "type": "string" + }, + "function": { + "description": "The name of the function to execute in the given script. The name does not\ninclude parentheses or parameters.", + "type": "string" + }, + "devMode": { + "description": "If `true` and the user is an owner of the script, the script runs at the\nmost recently saved version rather than the version deployed for use with\nthe Execution API. Optional; default is `false`.", + "type": "boolean" + } } - } + }, + "JoinAsyncRequest": { + "description": "A request to retrieve the results from a collection of requests,\nspecified by the operation resource names.", + "type": "object", + "properties": { + "scriptId": { + "type": "string", + "description": "The script id which specifies the script which all processes in the names\nfield must be from." + }, + "names": { + "description": "List of operation resource names that we want to join,\nas returned from a call to RunAsync.", + "type": "array", + "items": { + "type": "string" + } + }, + "timeout": { + "description": "Timeout for information retrieval in milliseconds.", + "format": "google-duration", + "type": "string" + } + }, + "id": "JoinAsyncRequest" + }, + "ExecutionResponse": { + "description": "An object that provides the return value of a function executed through the\nApps Script Execution API. If a\n`run` call succeeds and the\nscript function returns successfully, the response body's\n`response` field contains this\n`ExecutionResponse` object.", + "type": "object", + "properties": { + "result": { + "description": "The return value of the script function. The type matches the object type\nreturned in Apps Script. Functions called through the Execution API cannot\nreturn Apps Script-specific objects (such as a `Document` or a `Calendar`);\nthey can only return primitive types such as a `string`, `number`, `array`,\n`object`, or `boolean`.", + "type": "any" + } + }, + "id": "ExecutionResponse" + }, + "Operation": { + "description": "The response will not arrive until the function finishes executing. The maximum runtime is listed in the guide to [limitations in Apps Script](https://developers.google.com/apps-script/guides/services/quotas#current_limitations).\n\u003cp\u003eIf the script function returns successfully, the `response` field will contain an `ExecutionResponse` object with the function's return value in the object's `result` field.\u003c/p\u003e\n\u003cp\u003eIf the script function (or Apps Script itself) throws an exception, the `error` field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error.\u003c/p\u003e\n\u003cp\u003eIf the `run` call itself fails (for example, because of a malformed request or an authorization error), the method will return an HTTP response code in the 4XX range with a different format for the response body. Client libraries will automatically convert a 4XX response into an exception class.\u003c/p\u003e", + "type": "object", + "properties": { + "response": { + "description": "If the script function returns successfully, this field will contain an `ExecutionResponse` object with the function's return value as the object's `result` field.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "name": { + "description": "This field is not used.", + "type": "string" + }, + "error": { + "description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, this field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error.", + "$ref": "Status" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "This field is not used." + }, + "done": { + "description": "This field is not used.", + "type": "boolean" + } + }, + "id": "Operation" + }, + "JoinAsyncResponse": { + "type": "object", + "properties": { + "results": { + "additionalProperties": { + "$ref": "Operation" + }, + "description": "The return values for each script function, in a map of operation resource\nnames to the Operation containing the result of the process. The response\nwill contain either an error or the result of the script function.", + "type": "object" + } + }, + "id": "JoinAsyncResponse", + "description": "An object that provides the return value for the JoinAsync method." } - } }, - "ExecutionError": { - "id": "ExecutionError", - "type": "object", - "description": "An object that provides information about the nature of an error in the Apps Script Execution API. If an `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's `error` field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single one of these `ExecutionError` objects.", - "properties": { - "scriptStackTraceElements": { - "type": "array", - "description": "An array of objects that provide a stack trace through the script to show where the execution failed, with the deepest call first.", - "items": { - "$ref": "ScriptStackTraceElement" - } - }, - "errorMessage": { - "type": "string", - "description": "The error message thrown by Apps Script, usually localized into the user's language." - }, - "errorType": { - "type": "string", - "description": "The error type, for example `TypeError` or `ReferenceError`. If the error type is unavailable, this field is not included." - } - } + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "ScriptStackTraceElement": { - "id": "ScriptStackTraceElement", - "type": "object", - "description": "A stack trace through the script that shows where the execution failed.", - "properties": { - "function": { - "type": "string", - "description": "The name of the function that failed." - }, - "lineNumber": { - "type": "integer", - "description": "The line number where the script failed.", - "format": "int32" - } - } - }, - "ExecutionResponse": { - "id": "ExecutionResponse", - "type": "object", - "description": "An object that provides the return value of a function executed through the Apps Script Execution API. If an `run` call succeeds and the script function returns successfully, the response body's `response` field will contain this `ExecutionResponse` object.", - "properties": { - "result": { - "type": "any", - "description": "The return value of the script function. The type will match the type returned in Apps Script. Functions called through the Execution API cannot return Apps Script-specific objects (such as a `Document` or `Calendar`); they can only return primitive types such as a `string`, `number`, `array`, `object`, or `boolean`." - }, - "status": { - "type": "string", - "enum": [ - "SUCCESS", - "CANCELED" - ] - } - } - } - }, - "resources": { - "scripts": { - "methods": { - "run": { - "id": "script.scripts.run", - "path": "v1/scripts/{scriptId}:run", - "httpMethod": "POST", - "description": "Runs a function in an Apps Script project that has been deployed for use with the Apps Script Execution API. This method requires authorization with an OAuth 2.0 token that includes at least one of the scopes listed in the [Authentication](#authentication) section; script projects that do not require authorization cannot be executed through this API. To find the correct scopes to include in the authentication token, open the project in the script editor, then select **File \u003e Project properties** and click the **Scopes** tab.", - "parameters": { - "scriptId": { - "type": "string", - "description": "The project key of the script to be executed. To find the project key, open the project in the script editor, then select **File \u003e Project properties**.", - "required": true, - "location": "path" + "version": "v1", + "baseUrl": "https://script.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.google.com/calendar/feeds": { + "description": "Manage your calendars" + }, + "https://www.googleapis.com/auth/groups": { + "description": "View and manage your Google Groups" + }, + "https://www.googleapis.com/auth/forms.currentonly": { + "description": "View and manage forms that this application has been installed in" + }, + "https://www.googleapis.com/auth/drive": { + "description": "View and manage the files in your Google Drive" + }, + "https://www.googleapis.com/auth/spreadsheets": { + "description": "View and manage your spreadsheets in Google Drive" + }, + "https://www.googleapis.com/auth/admin.directory.user": { + "description": "View and manage the provisioning of users on your domain" + }, + "https://mail.google.com/": { + "description": "Read, send, delete, and manage your email" + }, + "https://www.googleapis.com/auth/admin.directory.group": { + "description": "View and manage the provisioning of groups on your domain" + }, + "https://www.googleapis.com/auth/forms": { + "description": "View and manage your forms in Google Drive" + }, + "https://www.google.com/m8/feeds": { + "description": "Manage your contacts" + }, + "https://www.googleapis.com/auth/userinfo.email": { + "description": "View your email address" + } } - }, - "parameterOrder": [ - "scriptId" - ], - "request": { - "$ref": "ExecutionRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://mail.google.com/", - "https://www.google.com/calendar/feeds", - "https://www.google.com/m8/feeds", - "https://www.googleapis.com/auth/admin.directory.group", - "https://www.googleapis.com/auth/admin.directory.user", - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/forms", - "https://www.googleapis.com/auth/forms.currentonly", - "https://www.googleapis.com/auth/groups", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/userinfo.email" - ] } - } - } - } + }, + "kind": "discovery#restDescription", + "description": "Executes Google Apps Script projects.", + "servicePath": "", + "rootUrl": "https://script.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "script", + "batchPath": "batch" } diff --git a/etc/api/searchconsole/v1/searchconsole-api.json b/etc/api/searchconsole/v1/searchconsole-api.json new file mode 100644 index 0000000000..dda04857a6 --- /dev/null +++ b/etc/api/searchconsole/v1/searchconsole-api.json @@ -0,0 +1,292 @@ +{ + "version": "v1", + "baseUrl": "https://searchconsole.googleapis.com/", + "canonicalName": "Search Console", + "servicePath": "", + "description": "Provides tools for running validation tests against single URLs", + "kind": "discovery#restDescription", + "rootUrl": "https://searchconsole.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "searchconsole", + "batchPath": "batch", + "documentationLink": "https://developers.google.com/webmaster-tools/search-console-api/", + "id": "searchconsole:v1", + "revision": "20170520", + "title": "Google Search Console URL Testing Tools API", + "discoveryVersion": "v1", + "ownerName": "Google", + "version_module": "True", + "resources": { + "urlTestingTools": { + "resources": { + "mobileFriendlyTest": { + "methods": { + "run": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "RunMobileFriendlyTestResponse" + }, + "parameters": {}, + "flatPath": "v1/urlTestingTools/mobileFriendlyTest:run", + "path": "v1/urlTestingTools/mobileFriendlyTest:run", + "id": "searchconsole.urlTestingTools.mobileFriendlyTest.run", + "description": "Runs Mobile-Friendly Test for a given URL.", + "request": { + "$ref": "RunMobileFriendlyTestRequest" + } + } + } + } + } + } + }, + "parameters": { + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "key": { + "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", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + } + }, + "schemas": { + "MobileFriendlyIssue": { + "description": "Mobile-friendly issue.", + "type": "object", + "properties": { + "rule": { + "enum": [ + "MOBILE_FRIENDLY_RULE_UNSPECIFIED", + "USES_INCOMPATIBLE_PLUGINS", + "CONFIGURE_VIEWPORT", + "FIXED_WIDTH_VIEWPORT", + "SIZE_CONTENT_TO_VIEWPORT", + "USE_LEGIBLE_FONT_SIZES", + "TAP_TARGETS_TOO_CLOSE" + ], + "description": "Rule violated.", + "type": "string", + "enumDescriptions": [ + "Unknown rule. Sorry, we don't have any description for the rule that was\nbroken.", + "Plugins incompatible with mobile devices are being used. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#flash_usage).", + "Viewsport is not specified using the meta viewport tag. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#viewport_not_configured).", + "Viewport defined to a fixed width. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#fixed-width_viewport).", + "Content not sized to viewport. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#content_not_sized_to_viewport).", + "Font size is too small for easy reading on a small screen. [Learn More]\n(https://support.google.com/webmasters/answer/6352293#small_font_size).", + "Touch elements are too close to each other. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#touch_elements_too_close)." + ] + } + }, + "id": "MobileFriendlyIssue" + }, + "RunMobileFriendlyTestResponse": { + "properties": { + "resourceIssues": { + "description": "Information about embedded resources issues.", + "items": { + "$ref": "ResourceIssue" + }, + "type": "array" + }, + "testStatus": { + "$ref": "TestStatus", + "description": "Final state of the test, can be either complete or an error." + }, + "mobileFriendliness": { + "enum": [ + "MOBILE_FRIENDLY_TEST_RESULT_UNSPECIFIED", + "MOBILE_FRIENDLY", + "NOT_MOBILE_FRIENDLY" + ], + "description": "Test verdict, whether the page is mobile friendly or not.", + "type": "string", + "enumDescriptions": [ + "Internal error when running this test. Please try running the test again.", + "The page is mobile friendly.", + "The page is not mobile friendly." + ] + }, + "mobileFriendlyIssues": { + "description": "List of mobile-usability issues.", + "items": { + "$ref": "MobileFriendlyIssue" + }, + "type": "array" + }, + "screenshot": { + "description": "Screenshot of the requested URL.", + "$ref": "Image" + } + }, + "id": "RunMobileFriendlyTestResponse", + "description": "Mobile-friendly test response, including mobile-friendly issues and resource\nissues.", + "type": "object" + }, + "ResourceIssue": { + "description": "Information about a resource with issue.", + "type": "object", + "properties": { + "blockedResource": { + "$ref": "BlockedResource", + "description": "Describes a blocked resource issue." + } + }, + "id": "ResourceIssue" + }, + "BlockedResource": { + "description": "Blocked resource.", + "type": "object", + "properties": { + "url": { + "description": "URL of the blocked resource.", + "type": "string" + } + }, + "id": "BlockedResource" + }, + "TestStatus": { + "description": "Final state of the test, including error details if necessary.", + "type": "object", + "properties": { + "status": { + "enum": [ + "TEST_STATUS_UNSPECIFIED", + "COMPLETE", + "INTERNAL_ERROR", + "PAGE_UNREACHABLE" + ], + "description": "Status of the test.", + "type": "string", + "enumDescriptions": [ + "Internal error when running this test. Please try running the test again.", + "Inspection has completed without errors.", + "Inspection terminated in an error state. This indicates a problem in\nGoogle's infrastructure, not a user error. Please try again later.", + "Google can not access the URL because of a user error such as a robots.txt\nblockage, a 403 or 500 code etc. Please make sure that the URL provided is\naccessible by Googlebot and is not password protected." + ] + }, + "details": { + "description": "Error details if applicable.", + "type": "string" + } + }, + "id": "TestStatus" + }, + "Image": { + "description": "Describe image data.", + "type": "object", + "properties": { + "mimeType": { + "description": "The mime-type of the image data.", + "type": "string" + }, + "data": { + "format": "byte", + "description": "Image data in format determined by the mime type. Currently, the format\nwill always be \"image/png\", but this might change in the future.", + "type": "string" + } + }, + "id": "Image" + }, + "RunMobileFriendlyTestRequest": { + "description": "Mobile-friendly test request.", + "type": "object", + "properties": { + "url": { + "description": "URL for inspection.", + "type": "string" + }, + "requestScreenshot": { + "description": "Whether or not screenshot is requested. Default is false.", + "type": "boolean" + } + }, + "id": "RunMobileFriendlyTestRequest" + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest" +} diff --git a/etc/api/servicecontrol/v1/servicecontrol-api.json b/etc/api/servicecontrol/v1/servicecontrol-api.json index 52ba9942c6..e57f10f49e 100644 --- a/etc/api/servicecontrol/v1/servicecontrol-api.json +++ b/etc/api/servicecontrol/v1/servicecontrol-api.json @@ -1,244 +1,168 @@ { + "revision": "20170515", + "documentationLink": "https://cloud.google.com/service-control/", "id": "servicecontrol:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/servicecontrol": { - "description": "Manage your Google Service Control data" - } - } - } - }, - "description": "Google Service Control provides control plane functionality to managed services, such as logging, monitoring, and status checks.", - "protocol": "rest", - "title": "Google Service Control API", - "resources": { - "services": { - "methods": { - "check": { - "id": "servicecontrol.services.check", - "response": { - "$ref": "CheckResponse" - }, - "parameterOrder": [ - "serviceName" - ], - "description": "Checks an operation with Google Service Control to decide whether\nthe given operation should proceed. It should be called before the\noperation is executed.\n\nIf feasible, the client should cache the check results and reuse them for\n60 seconds. In case of server errors, the client can rely on the cached\nresults for longer time.\n\nNOTE: the `CheckRequest` has the size limit of 1MB.\n\nThis method requires the `servicemanagement.services.check` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", - "request": { - "$ref": "CheckRequest" - }, - "flatPath": "v1/services/{serviceName}:check", - "httpMethod": "POST", - "parameters": { - "serviceName": { - "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/services/{serviceName}:check", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ] - }, - "report": { - "id": "servicecontrol.services.report", - "response": { - "$ref": "ReportResponse" - }, - "parameterOrder": [ - "serviceName" - ], - "description": "Reports operation results to Google Service Control, such as logs and\nmetrics. It should be called after an operation is completed.\n\nIf feasible, the client should aggregate reporting data for up to 5\nseconds to reduce API traffic. Limiting aggregation to 5 seconds is to\nreduce data loss during client crashes. Clients should carefully choose\nthe aggregation time window to avoid data loss risk more than 0.01%\nfor business and compliance reasons.\n\nNOTE: the `ReportRequest` has the size limit of 1MB.\n\nThis method requires the `servicemanagement.services.report` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", - "request": { - "$ref": "ReportRequest" - }, - "flatPath": "v1/services/{serviceName}:report", - "httpMethod": "POST", - "parameters": { - "serviceName": { - "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/services/{serviceName}:report", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ] - } - } - } - }, + "discoveryVersion": "v1", + "version_module": "True", "schemas": { - "CheckError": { - "description": "Defines the errors to be returned in\ngoogle.api.servicecontrol.v1.CheckResponse.check_errors.", + "CheckRequest": { + "description": "Request message for the Check method.", "type": "object", "properties": { - "code": { - "description": "The error code.", - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "NOT_FOUND", - "PERMISSION_DENIED", - "RESOURCE_EXHAUSTED", - "SERVICE_NOT_ACTIVATED", - "BILLING_DISABLED", - "PROJECT_DELETED", - "PROJECT_INVALID", - "IP_ADDRESS_BLOCKED", - "REFERER_BLOCKED", - "CLIENT_APP_BLOCKED", - "API_KEY_INVALID", - "API_KEY_EXPIRED", - "API_KEY_NOT_FOUND", - "NAMESPACE_LOOKUP_UNAVAILABLE", - "SERVICE_STATUS_UNAVAILABLE", - "BILLING_STATUS_UNAVAILABLE" - ], - "enumDescriptions": [ - "This is never used in `CheckResponse`.", - "The consumer's project id was not found.\nSame as google.rpc.Code.NOT_FOUND.", - "The consumer doesn't have access to the specified resource.\nSame as google.rpc.Code.PERMISSION_DENIED.", - "Quota check failed. Same as google.rpc.Code.RESOURCE_EXHAUSTED.", - "The consumer hasn't activated the service.", - "The consumer cannot access the service because billing is disabled.", - "The consumer's project has been marked as deleted (soft deletion).", - "The consumer's project number or id does not represent a valid project.", - "The IP address of the consumer is invalid for the specific consumer\nproject.", - "The referer address of the consumer request is invalid for the specific\nconsumer project.", - "The client application of the consumer request is invalid for the\nspecific consumer project.", - "The consumer's API key is invalid.", - "The consumer's API Key has expired.", - "The consumer's API Key was not found in config record.", - "The backend server for looking up project id/number is unavailable.", - "The backend server for checking service status is unavailable.", - "The backend server for checking billing status is unavailable." - ], + "operation": { + "$ref": "Operation", + "description": "The operation to be checked." + }, + "requestProjectSettings": { + "description": "Requests the project settings to be returned as part of the check response.", + "type": "boolean" + }, + "serviceConfigId": { + "description": "Specifies which version of service configuration should be used to process\nthe request.\n\nIf unspecified or no matching version can be found, the\nlatest one will be used.", "type": "string" }, - "detail": { - "description": "Free-form text providing details on the error cause of the error.", - "type": "string" + "skipActivationCheck": { + "description": "Indicates if service activation check should be skipped for this request.\nDefault behavior is to perform the check and apply relevant quota.", + "type": "boolean" } }, - "id": "CheckError" + "id": "CheckRequest" }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "QuotaOperation": { + "description": "Represents information regarding a quota operation.", "type": "object", "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Labels describing the operation." }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "consumerId": { + "description": "Identity of the consumer for whom this quota operation is being performed.\n\nThis can be in one of the following formats:\n project:\u003cproject_id\u003e,\n project_number:\u003cproject_number\u003e,\n api_key:\u003capi_key\u003e.", + "type": "string" + }, + "operationId": { + "description": "Identity of the operation. This must be unique within the scope of the\nservice that generated the operation. If the service calls AllocateQuota\nand ReleaseQuota on the same operation, the two calls should carry the\nsame ID.\n\nUUID version 4 is recommended, though not required. In scenarios where an\noperation is computed from existing information and an idempotent id is\ndesirable for deduplication purpose, UUID version 5 is recommended. See\nRFC 4122 for details.", + "type": "string" + }, + "methodName": { + "description": "Fully qualified name of the API method for which this quota operation is\nrequested. This name is used for matching quota rules or metric rules and\nbilling status rules defined in service configuration. This field is not\nrequired if the quota operation is performed on non-API resources.\n\nExample of an RPC method name:\n google.example.library.v1.LibraryService.CreateShelf", + "type": "string" + }, + "quotaMode": { + "enumDescriptions": [ + "", + "For AllocateQuota request, allocates quota for the amount specified in\nthe service configuration or specified using the quota metrics. If the\namount is higher than the available quota, allocation error will be\nreturned and no quota will be allocated.\nFor ReleaseQuota request, this mode is supported only for precise quota\nlimits. In this case, this operation releases quota for the amount\nspecified in the service configuration or specified using the quota\nmetrics. If the release can make used quota negative, release error\nwill be returned and no quota will be released.", + "For AllocateQuota request, this mode is supported only for imprecise\nquota limits. In this case, the operation allocates quota for the amount\nspecified in the service configuration or specified using the quota\nmetrics. If the amount is higher than the available quota, request does\nnot fail but all available quota will be allocated.\nFor ReleaseQuota request, this mode is supported for both precise quota\nlimits and imprecise quota limits. In this case, this operation releases\nquota for the amount specified in the service configuration or specified\nusing the quota metrics. If the release can make used quota\nnegative, request does not fail but only the used quota will be\nreleased. After the ReleaseQuota request completes, the used quota\nwill be 0, and never goes to negative.", + "For AllocateQuota request, only checks if there is enough quota\navailable and does not change the available quota. No lock is placed on\nthe available quota either. Not supported for ReleaseQuota request." + ], + "enum": [ + "UNSPECIFIED", + "NORMAL", + "BEST_EFFORT", + "CHECK_ONLY" + ], + "description": "Quota mode for this operation.", + "type": "string" + }, + "quotaMetrics": { + "description": "Represents information about this operation. Each MetricValueSet\ncorresponds to a metric defined in the service configuration.\nThe data type used in the MetricValueSet must agree with\nthe data type specified in the metric definition.\n\nWithin a single operation, it is not allowed to have more than one\nMetricValue instances that have the same metric names and identical\nlabel value combinations. If a request has such duplicated MetricValue\ninstances, the entire request is rejected with\nan invalid argument error.", "type": "array", "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" + "$ref": "MetricValueSet" } - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" } }, - "id": "Status" + "id": "QuotaOperation" }, - "ReportError": { - "description": "Represents the processing error of one `Operation` in the request.", + "EndReconciliationRequest": { "type": "object", "properties": { + "serviceConfigId": { + "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used.", + "type": "string" + }, + "reconciliationOperation": { + "description": "Operation that describes the quota reconciliation.", + "$ref": "QuotaOperation" + } + }, + "id": "EndReconciliationRequest" + }, + "ReportInfo": { + "properties": { + "quotaInfo": { + "description": "Quota usage info when processing the `Operation`.", + "$ref": "QuotaInfo" + }, "operationId": { "description": "The Operation.operation_id value from the request.", "type": "string" - }, - "status": { - "description": "Details of the error when processing the `Operation`.", - "$ref": "Status" } }, - "id": "ReportError" + "id": "ReportInfo", + "type": "object" }, - "ExponentialBuckets": { - "description": "Describing buckets with exponentially growing width.", + "ReportResponse": { + "description": "Response message for the Report method.", "type": "object", "properties": { - "growthFactor": { - "description": "The i'th exponential bucket covers the interval\n [scale * growth_factor^(i-1), scale * growth_factor^i)\nwhere i ranges from 1 to num_finite_buckets inclusive.\nMust be larger than 1.0.", - "type": "number", - "format": "double" + "serviceConfigId": { + "description": "The actual config id used to process the request.", + "type": "string" }, - "scale": { - "description": "The i'th exponential bucket covers the interval\n [scale * growth_factor^(i-1), scale * growth_factor^i)\nwhere i ranges from 1 to num_finite_buckets inclusive.\nMust be \u003e 0.", - "type": "number", - "format": "double" + "reportErrors": { + "description": "Partial failures, one for each `Operation` in the request that failed\nprocessing. There are three possible combinations of the RPC status:\n\n1. The combination of a successful RPC status and an empty `report_errors`\n list indicates a complete success where all `Operations` in the\n request are processed successfully.\n2. The combination of a successful RPC status and a non-empty\n `report_errors` list indicates a partial success where some\n `Operations` in the request succeeded. Each\n `Operation` that failed processing has a corresponding item\n in this list.\n3. A failed RPC status indicates a general non-deterministic failure.\n When this happens, it's impossible to know which of the\n 'Operations' in the request succeeded or failed.", + "type": "array", + "items": { + "$ref": "ReportError" + } }, - "numFiniteBuckets": { - "description": "The number of finite buckets. With the underflow and overflow buckets,\nthe total number of buckets is `num_finite_buckets` + 2.\nSee comments on `bucket_options` for details.", - "type": "integer", - "format": "int32" + "reportInfos": { + "description": "Quota usage for each quota release `Operation` request.\n\nFully or partially failed quota release request may or may not be present\nin `report_quota_info`. For example, a failed quota release request will\nhave the current quota usage info when precise quota library returns the\ninfo. A deadline exceeded quota request will not have quota usage info.\n\nIf there is no quota release request, report_quota_info will be empty.\n", + "type": "array", + "items": { + "$ref": "ReportInfo" + } } }, - "id": "ExponentialBuckets" + "id": "ReportResponse" }, "Operation": { "description": "Represents information regarding an operation.", "type": "object", "properties": { - "operationName": { - "description": "Fully qualified name of the operation. Reserved for future use.", + "startTime": { + "description": "Required. Start time of the operation.", + "format": "google-datetime", "type": "string" }, - "operationId": { - "description": "Identity of the operation. This must be unique within the scope of the\nservice that generated the operation. If the service calls\nCheck() and Report() on the same operation, the two calls should carry\nthe same id.\n\nUUID version 4 is recommended, though not required.\nIn scenarios where an operation is computed from existing information\nand an idempotent id is desirable for deduplication purpose, UUID version 5\nis recommended. See RFC 4122 for details.", - "type": "string" - }, - "endTime": { - "description": "End time of the operation.\nRequired when the operation is used in ServiceController.Report,\nbut optional when the operation is used in ServiceController.Check.", + "importance": { + "enum": [ + "LOW", + "HIGH", + "DEBUG" + ], + "description": "DO NOT USE. This is an experimental field.", "type": "string", - "format": "google-datetime" + "enumDescriptions": [ + "The API implementation may cache and aggregate the data.\nThe data may be lost when rare and unexpected system failures occur.", + "The API implementation doesn't cache and aggregate the data.\nIf the method returns successfully, it's guaranteed that the data has\nbeen persisted in durable storage.", + "In addition to the behavior described in HIGH, DEBUG enables\nadditional validation logic that is only useful during the onboarding\nprocess. This is only available to Google internal services and\nthe service must be whitelisted by chemist-dev@google.com in order\nto use this level." + ] + }, + "resourceContainer": { + "description": "The resource name of the parent of a resource in the resource hierarchy.\n\nThis can be in one of the following formats:\n - “projects/\u003cproject-id or project-number\u003e”\n - “folders/\u003cfolder-id\u003e”\n - “organizations/\u003corganization-id\u003e”", + "type": "string" }, "labels": { "description": "Labels describing the operation. Only the following labels are allowed:\n\n- Labels describing monitored resources as defined in\n the service configuration.\n- Default labels of metric values. When specified, labels defined in the\n metric value override these default.\n- The following labels defined by Google Cloud Platform:\n - `cloud.googleapis.com/location` describing the location where the\n operation happened,\n - `servicecontrol.googleapis.com/user_agent` describing the user agent\n of the API request,\n - `servicecontrol.googleapis.com/service_agent` describing the service\n used to handle the API request (e.g. ESP),\n - `servicecontrol.googleapis.com/platform` describing the platform\n where the API is served (e.g. GAE, GCE, GKE).", + "type": "object", "additionalProperties": { "type": "string" - }, - "type": "object" - }, - "importance": { - "description": "DO NOT USE. This is an experimental field.", - "enum": [ - "LOW", - "HIGH" - ], - "enumDescriptions": [ - "The API implementation may cache and aggregate the data.\nThe data may be lost when rare and unexpected system failures occur.", - "The API implementation doesn't cache and aggregate the data.\nIf the method returns successfully, it's guaranteed that the data has\nbeen persisted in durable storage." - ], - "type": "string" - }, - "consumerId": { - "description": "Identity of the consumer who is using the service.\nThis field should be filled in for the operations initiated by a\nconsumer, but not for service-initiated operations that are\nnot related to a specific consumer.\n\nThis can be in one of the following formats:\n project:\u003cproject_id\u003e,\n project_number:\u003cproject_number\u003e,\n api_key:\u003capi_key\u003e.", - "type": "string" - }, - "startTime": { - "description": "Required. Start time of the operation.", - "type": "string", - "format": "google-datetime" + } }, "logEntries": { "description": "Represents information to be logged.", @@ -247,103 +171,100 @@ "$ref": "LogEntry" } }, + "userLabels": { + "description": "User defined labels for the resource that this operation is associated\nwith.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "metricValueSets": { "description": "Represents information about this operation. Each MetricValueSet\ncorresponds to a metric defined in the service configuration.\nThe data type used in the MetricValueSet must agree with\nthe data type specified in the metric definition.\n\nWithin a single operation, it is not allowed to have more than one\nMetricValue instances that have the same metric names and identical\nlabel value combinations. If a request has such duplicated MetricValue\ninstances, the entire request is rejected with\nan invalid argument error.", "type": "array", "items": { "$ref": "MetricValueSet" } + }, + "quotaProperties": { + "$ref": "QuotaProperties", + "description": "Represents the properties needed for quota check. Applicable only if this\noperation is for a quota check request." + }, + "consumerId": { + "description": "Identity of the consumer who is using the service.\nThis field should be filled in for the operations initiated by a\nconsumer, but not for service-initiated operations that are\nnot related to a specific consumer.\n\nThis can be in one of the following formats:\n project:\u003cproject_id\u003e,\n project_number:\u003cproject_number\u003e,\n api_key:\u003capi_key\u003e.", + "type": "string" + }, + "operationId": { + "type": "string", + "description": "Identity of the operation. This must be unique within the scope of the\nservice that generated the operation. If the service calls\nCheck() and Report() on the same operation, the two calls should carry\nthe same id.\n\nUUID version 4 is recommended, though not required.\nIn scenarios where an operation is computed from existing information\nand an idempotent id is desirable for deduplication purpose, UUID version 5\nis recommended. See RFC 4122 for details." + }, + "endTime": { + "description": "End time of the operation.\nRequired when the operation is used in ServiceController.Report,\nbut optional when the operation is used in ServiceController.Check.", + "format": "google-datetime", + "type": "string" + }, + "operationName": { + "description": "Fully qualified name of the operation. Reserved for future use.", + "type": "string" } }, "id": "Operation" }, - "CheckRequest": { - "description": "Request message for the Check method.", + "CheckResponse": { + "description": "Response message for the Check method.", "type": "object", "properties": { - "operation": { - "description": "The operation to be checked.", - "$ref": "Operation" + "operationId": { + "description": "The same operation_id value used in the CheckRequest.\nUsed for logging and diagnostics purposes.", + "type": "string" + }, + "checkErrors": { + "description": "Indicate the decision of the check.\n\nIf no check errors are present, the service should process the operation.\nOtherwise the service should use the list of errors to determine the\nappropriate action.", + "type": "array", + "items": { + "$ref": "CheckError" + } + }, + "checkInfo": { + "description": "Feedback data returned from the server during processing a Check request.", + "$ref": "CheckInfo" + }, + "quotaInfo": { + "$ref": "QuotaInfo", + "description": "Quota information for the check request associated with this response.\n" }, "serviceConfigId": { - "description": "Specifies which version of service configuration should be used to process\nthe request.\n\nIf unspecified or no matching version can be found, the\nlatest one will be used.", - "type": "string" + "type": "string", + "description": "The actual config id used to process the request." } }, - "id": "CheckRequest" + "id": "CheckResponse" }, - "LogEntry": { - "description": "An individual log entry.", + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "textPayload": { - "description": "The log entry payload, represented as a Unicode string (UTF-8).", - "type": "string" + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } }, - "structPayload": { - "description": "The log entry payload, represented as a structure that\nis expressed as a JSON object.", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "type": "object" + "code": { + "type": "integer", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32" }, - "labels": { - "description": "A set of user-defined (key, value) data that provides additional\ninformation about the log entry.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "severity": { - "description": "The severity of the log entry. The default value is\n`LogSeverity.DEFAULT`.", - "enum": [ - "DEFAULT", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ], - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or\na configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], - "type": "string" - }, - "name": { - "description": "Required. The log to which this log entry belongs. Examples: `\"syslog\"`,\n`\"book_log\"`.", - "type": "string" - }, - "protoPayload": { - "description": "The log entry payload, represented as a protocol buffer that is\nexpressed as a JSON object. You can only pass `protoPayload`\nvalues that belong to a set of approved types.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "timestamp": { - "description": "The time the event described by the log entry occurred. If\nomitted, defaults to operation start time.", - "type": "string", - "format": "google-datetime" - }, - "insertId": { - "description": "A unique ID for the log entry used for deduplication. If omitted,\nthe implementation will generate one based on operation_id.", + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" } }, - "id": "LogEntry" + "id": "Status" }, "ReportRequest": { "description": "Request message for the Report method.", @@ -363,6 +284,640 @@ }, "id": "ReportRequest" }, + "AuditLog": { + "description": "Common audit log format for Google Cloud Platform API operations.\n\n", + "type": "object", + "properties": { + "resourceName": { + "description": "The resource or collection that is the target of the operation.\nThe name is a scheme-less URI, not including the API service name.\nFor example:\n\n \"shelves/SHELF_ID/books\"\n \"shelves/SHELF_ID/books/BOOK_ID\"", + "type": "string" + }, + "authorizationInfo": { + "description": "Authorization information. If there are multiple\nresources or permissions involved, then there is\none AuthorizationInfo element for each {resource, permission} tuple.", + "type": "array", + "items": { + "$ref": "AuthorizationInfo" + } + }, + "request": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The operation request. This may not include all request parameters,\nsuch as those that are too large, privacy-sensitive, or duplicated\nelsewhere in the log record.\nIt should never include user-generated data, such as file contents.\nWhen the JSON object represented here has a proto equivalent, the proto\nname will be indicated in the `@type` property.", + "type": "object" + }, + "serviceData": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Other service-specific data about the request, response, and other\nactivities." + }, + "requestMetadata": { + "description": "Metadata about the operation.", + "$ref": "RequestMetadata" + }, + "numResponseItems": { + "description": "The number of items returned from a List or Query API method,\nif applicable.", + "format": "int64", + "type": "string" + }, + "authenticationInfo": { + "description": "Authentication information.", + "$ref": "AuthenticationInfo" + }, + "status": { + "description": "The status of the overall operation.", + "$ref": "Status" + }, + "serviceName": { + "description": "The name of the API service performing the operation. For example,\n`\"datastore.googleapis.com\"`.", + "type": "string" + }, + "response": { + "description": "The operation response. This may not include all response elements,\nsuch as those that are too large, privacy-sensitive, or duplicated\nelsewhere in the log record.\nIt should never include user-generated data, such as file contents.\nWhen the JSON object represented here has a proto equivalent, the proto\nname will be indicated in the `@type` property.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + }, + "methodName": { + "description": "The name of the service method or operation.\nFor API calls, this should be the name of the API method.\nFor example,\n\n \"google.datastore.v1.Datastore.RunQuery\"\n \"google.logging.v1.LoggingService.DeleteLog\"", + "type": "string" + } + }, + "id": "AuditLog" + }, + "LogEntry": { + "id": "LogEntry", + "description": "An individual log entry.", + "type": "object", + "properties": { + "structPayload": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The log entry payload, represented as a structure that\nis expressed as a JSON object." + }, + "textPayload": { + "type": "string", + "description": "The log entry payload, represented as a Unicode string (UTF-8)." + }, + "protoPayload": { + "description": "The log entry payload, represented as a protocol buffer that is\nexpressed as a JSON object. You can only pass `protoPayload`\nvalues that belong to a set of approved types.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "timestamp": { + "description": "The time the event described by the log entry occurred. If\nomitted, defaults to operation start time.", + "format": "google-datetime", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "A set of user-defined (key, value) data that provides additional\ninformation about the log entry.", + "type": "object" + }, + "severity": { + "enumDescriptions": [ + "(0) The log entry has no assigned severity level.", + "(100) Debug or trace information.", + "(200) Routine information, such as ongoing status or performance.", + "(300) Normal but significant events, such as start up, shut down, or\na configuration change.", + "(400) Warning events might cause problems.", + "(500) Error events are likely to cause problems.", + "(600) Critical events cause more severe problems or outages.", + "(700) A person must take an action immediately.", + "(800) One or more systems are unusable." + ], + "enum": [ + "DEFAULT", + "DEBUG", + "INFO", + "NOTICE", + "WARNING", + "ERROR", + "CRITICAL", + "ALERT", + "EMERGENCY" + ], + "description": "The severity of the log entry. The default value is\n`LogSeverity.DEFAULT`.", + "type": "string" + }, + "name": { + "type": "string", + "description": "Required. The log to which this log entry belongs. Examples: `\"syslog\"`,\n`\"book_log\"`." + }, + "insertId": { + "type": "string", + "description": "A unique ID for the log entry used for deduplication. If omitted,\nthe implementation will generate one based on operation_id." + } + } + }, + "MetricValue": { + "properties": { + "startTime": { + "description": "The start of the time period over which this metric value's measurement\napplies. The time period has different semantics for different metric\ntypes (cumulative, delta, and gauge). See the metric definition\ndocumentation in the service configuration for details.", + "format": "google-datetime", + "type": "string" + }, + "moneyValue": { + "description": "A money value.", + "$ref": "Money" + }, + "stringValue": { + "description": "A text string value.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The labels describing the metric value.\nSee comments on google.api.servicecontrol.v1.Operation.labels for\nthe overriding relationship.", + "type": "object" + }, + "doubleValue": { + "type": "number", + "description": "A double precision floating point value.", + "format": "double" + }, + "int64Value": { + "description": "A signed 64-bit integer value.", + "format": "int64", + "type": "string" + }, + "distributionValue": { + "$ref": "Distribution", + "description": "A distribution value." + }, + "boolValue": { + "description": "A boolean value.", + "type": "boolean" + }, + "endTime": { + "description": "The end of the time period over which this metric value's measurement\napplies.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "MetricValue", + "description": "Represents a single metric value.", + "type": "object" + }, + "Money": { + "properties": { + "currencyCode": { + "description": "The 3-letter currency code defined in ISO 4217.", + "type": "string" + }, + "nanos": { + "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "format": "int32", + "type": "integer" + }, + "units": { + "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", + "format": "int64", + "type": "string" + } + }, + "id": "Money", + "description": "Represents an amount of money with its currency type.", + "type": "object" + }, + "EndReconciliationResponse": { + "type": "object", + "properties": { + "operationId": { + "description": "The same operation_id value used in the EndReconciliationRequest. Used for\nlogging and diagnostics purposes.", + "type": "string" + }, + "reconciliationErrors": { + "description": "Indicates the decision of the reconciliation end.", + "type": "array", + "items": { + "$ref": "QuotaError" + } + }, + "serviceConfigId": { + "description": "ID of the actual config used to process the request.", + "type": "string" + }, + "quotaMetrics": { + "description": "Metric values as tracked by One Platform before the adjustment was made.\nThe following metrics will be included:\n\n1. Per quota metric total usage will be specified using the following gauge\nmetric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n2. Value for each quota limit associated with the metrics will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"\n\n3. Delta value of the usage after the reconciliation for limits associated\nwith the metrics will be specified using the following metric:\n \"serviceruntime.googleapis.com/allocation/reconciliation_delta\"\nThe delta value is defined as:\n new_usage_from_client - existing_value_in_spanner.\nThis metric is not defined in serviceruntime.yaml or in Cloud Monarch.\nThis metric is meant for callers' use only. Since this metric is not\ndefined in the monitoring backend, reporting on this metric will result in\nan error.", + "type": "array", + "items": { + "$ref": "MetricValueSet" + } + } + }, + "id": "EndReconciliationResponse" + }, + "ExplicitBuckets": { + "type": "object", + "properties": { + "bounds": { + "type": "array", + "items": { + "format": "double", + "type": "number" + }, + "description": "'bound' is a list of strictly increasing boundaries between\nbuckets. Note that a list of length N-1 defines N buckets because\nof fenceposting. See comments on `bucket_options` for details.\n\nThe i'th finite bucket covers the interval\n [bound[i-1], bound[i])\nwhere i ranges from 1 to bound_size() - 1. Note that there are no\nfinite buckets at all if 'bound' only contains a single element; in\nthat special case the single bound defines the boundary between the\nunderflow and overflow buckets.\n\nbucket number lower bound upper bound\n i == 0 (underflow) -inf bound[i]\n 0 \u003c i \u003c bound_size() bound[i-1] bound[i]\n i == bound_size() (overflow) bound[i-1] +inf" + } + }, + "id": "ExplicitBuckets", + "description": "Describing buckets with arbitrary user-provided width." + }, + "Distribution": { + "description": "Distribution represents a frequency distribution of double-valued sample\npoints. It contains the size of the population of sample points plus\nadditional optional information:\n\n - the arithmetic mean of the samples\n - the minimum and maximum of the samples\n - the sum-squared-deviation of the samples, used to compute variance\n - a histogram of the values of the sample points", + "type": "object", + "properties": { + "explicitBuckets": { + "$ref": "ExplicitBuckets", + "description": "Buckets with arbitrary user-provided width." + }, + "maximum": { + "description": "The maximum of the population of values. Ignored if `count` is zero.", + "format": "double", + "type": "number" + }, + "sumOfSquaredDeviation": { + "description": "The sum of squared deviations from the mean:\n Sum[i=1..count]((x_i - mean)^2)\nwhere each x_i is a sample values. If `count` is zero then this field\nmust be zero, otherwise validation of the request fails.", + "format": "double", + "type": "number" + }, + "exponentialBuckets": { + "$ref": "ExponentialBuckets", + "description": "Buckets with exponentially growing width." + }, + "linearBuckets": { + "description": "Buckets with constant width.", + "$ref": "LinearBuckets" + }, + "minimum": { + "description": "The minimum of the population of values. Ignored if `count` is zero.", + "format": "double", + "type": "number" + }, + "count": { + "type": "string", + "description": "The total number of samples in the distribution. Must be \u003e= 0.", + "format": "int64" + }, + "mean": { + "description": "The arithmetic mean of the samples in the distribution. If `count` is\nzero then this field must be zero.", + "format": "double", + "type": "number" + }, + "bucketCounts": { + "description": "The number of samples in each histogram bucket. `bucket_counts` are\noptional. If present, they must sum to the `count` value.\n\nThe buckets are defined below in `bucket_option`. There are N buckets.\n`bucket_counts[0]` is the number of samples in the underflow bucket.\n`bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples\nin each of the finite buckets. And `bucket_counts[N] is the number\nof samples in the overflow bucket. See the comments of `bucket_option`\nbelow for more details.\n\nAny suffix of trailing zeros may be omitted.", + "type": "array", + "items": { + "format": "int64", + "type": "string" + } + } + }, + "id": "Distribution" + }, + "ExponentialBuckets": { + "description": "Describing buckets with exponentially growing width.", + "type": "object", + "properties": { + "scale": { + "description": "The i'th exponential bucket covers the interval\n [scale * growth_factor^(i-1), scale * growth_factor^i)\nwhere i ranges from 1 to num_finite_buckets inclusive.\nMust be \u003e 0.", + "format": "double", + "type": "number" + }, + "numFiniteBuckets": { + "description": "The number of finite buckets. With the underflow and overflow buckets,\nthe total number of buckets is `num_finite_buckets` + 2.\nSee comments on `bucket_options` for details.", + "format": "int32", + "type": "integer" + }, + "growthFactor": { + "description": "The i'th exponential bucket covers the interval\n [scale * growth_factor^(i-1), scale * growth_factor^i)\nwhere i ranges from 1 to num_finite_buckets inclusive.\nMust be larger than 1.0.", + "format": "double", + "type": "number" + } + }, + "id": "ExponentialBuckets" + }, + "AuthorizationInfo": { + "id": "AuthorizationInfo", + "description": "Authorization information for the operation.", + "type": "object", + "properties": { + "resource": { + "description": "The resource being accessed, as a REST-style string. For example:\n\n bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID", + "type": "string" + }, + "granted": { + "type": "boolean", + "description": "Whether or not authorization for `resource` and `permission`\nwas granted." + }, + "permission": { + "description": "The required IAM permission.", + "type": "string" + } + } + }, + "StartReconciliationResponse": { + "type": "object", + "properties": { + "quotaMetrics": { + "description": "Metric values as tracked by One Platform before the start of\nreconciliation. The following metrics will be included:\n\n1. Per quota metric total usage will be specified using the following gauge\nmetric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n2. Value for each quota limit associated with the metrics will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"", + "type": "array", + "items": { + "$ref": "MetricValueSet" + } + }, + "operationId": { + "description": "The same operation_id value used in the StartReconciliationRequest. Used\nfor logging and diagnostics purposes.", + "type": "string" + }, + "reconciliationErrors": { + "type": "array", + "items": { + "$ref": "QuotaError" + }, + "description": "Indicates the decision of the reconciliation start." + }, + "serviceConfigId": { + "description": "ID of the actual config used to process the request.", + "type": "string" + } + }, + "id": "StartReconciliationResponse" + }, + "QuotaProperties": { + "description": "Represents the properties needed for quota operations.", + "type": "object", + "properties": { + "limitByIds": { + "additionalProperties": { + "type": "string" + }, + "description": "LimitType IDs that should be used for checking quota. Key in this map\nshould be a valid LimitType string, and the value is the ID to be used. For\nexample, an entry \u003cUSER, 123\u003e will cause all user quota limits to use 123\nas the user ID. See google/api/quota.proto for the definition of LimitType.\nCLIENT_PROJECT: Not supported.\nUSER: Value of this entry will be used for enforcing user-level quota\n limits. If none specified, caller IP passed in the\n servicecontrol.googleapis.com/caller_ip label will be used instead.\n If the server cannot resolve a value for this LimitType, an error\n will be thrown. No validation will be performed on this ID.\nDeprecated: use servicecontrol.googleapis.com/user label to send user ID.", + "type": "object" + }, + "quotaMode": { + "enum": [ + "ACQUIRE", + "ACQUIRE_BEST_EFFORT", + "CHECK", + "RELEASE" + ], + "description": "Quota mode for this operation.", + "type": "string", + "enumDescriptions": [ + "Decreases available quota by the cost specified for the operation.\nIf cost is higher than available quota, operation fails and returns\nerror.", + "Decreases available quota by the cost specified for the operation.\nIf cost is higher than available quota, operation does not fail and\navailable quota goes down to zero but it returns error.", + "Does not change any available quota. Only checks if there is enough\nquota.\nNo lock is placed on the checked tokens neither.", + "Increases available quota by the operation cost specified for the\noperation." + ] + } + }, + "id": "QuotaProperties" + }, + "LinearBuckets": { + "description": "Describing buckets with constant width.", + "type": "object", + "properties": { + "numFiniteBuckets": { + "description": "The number of finite buckets. With the underflow and overflow buckets,\nthe total number of buckets is `num_finite_buckets` + 2.\nSee comments on `bucket_options` for details.", + "format": "int32", + "type": "integer" + }, + "width": { + "description": "The i'th linear bucket covers the interval\n [offset + (i-1) * width, offset + i * width)\nwhere i ranges from 1 to num_finite_buckets, inclusive.\nMust be strictly positive.", + "format": "double", + "type": "number" + }, + "offset": { + "description": "The i'th linear bucket covers the interval\n [offset + (i-1) * width, offset + i * width)\nwhere i ranges from 1 to num_finite_buckets, inclusive.", + "format": "double", + "type": "number" + } + }, + "id": "LinearBuckets" + }, + "AuthenticationInfo": { + "description": "Authentication information for the operation.", + "type": "object", + "properties": { + "principalEmail": { + "description": "The email address of the authenticated user making the request.", + "type": "string" + }, + "authoritySelector": { + "description": "The authority selector specified by the requestor, if any.\nIt is not guaranteed that the principal was allowed to use this authority.", + "type": "string" + } + }, + "id": "AuthenticationInfo" + }, + "AllocateQuotaResponse": { + "description": "Response message for the AllocateQuota method.", + "type": "object", + "properties": { + "quotaMetrics": { + "description": "Quota metrics to indicate the result of allocation. Depending on the\nrequest, one or more of the following metrics will be included:\n\n1. For rate quota, per quota group or per quota metric incremental usage\nwill be specified using the following delta metric:\n \"serviceruntime.googleapis.com/api/consumer/quota_used_count\"\n\n2. For allocation quota, per quota metric total usage will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n3. For both rate quota and allocation quota, the quota limit reached\ncondition will be specified using the following boolean metric:\n \"serviceruntime.googleapis.com/quota/exceeded\"\n\n4. For allocation quota, value for each quota limit associated with\nthe metrics will be specified using the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"", + "type": "array", + "items": { + "$ref": "MetricValueSet" + } + }, + "operationId": { + "description": "The same operation_id value used in the AllocateQuotaRequest. Used for\nlogging and diagnostics purposes.", + "type": "string" + }, + "serviceConfigId": { + "type": "string", + "description": "ID of the actual config used to process the request." + }, + "allocateErrors": { + "description": "Indicates the decision of the allocate.", + "type": "array", + "items": { + "$ref": "QuotaError" + } + } + }, + "id": "AllocateQuotaResponse" + }, + "ReleaseQuotaRequest": { + "properties": { + "serviceConfigId": { + "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used.", + "type": "string" + }, + "releaseOperation": { + "$ref": "QuotaOperation", + "description": "Operation that describes the quota release." + } + }, + "id": "ReleaseQuotaRequest", + "description": "Request message for the ReleaseQuota method.", + "type": "object" + }, + "QuotaError": { + "type": "object", + "properties": { + "subject": { + "description": "Subject to whom this error applies. See the specific enum for more details\non this field. For example, \"clientip:\u003cip address of client\u003e\" or\n\"project:\u003cGoogle developer project id\u003e\".", + "type": "string" + }, + "description": { + "description": "Free-form text that provides details on the cause of the error.", + "type": "string" + }, + "code": { + "enum": [ + "UNSPECIFIED", + "RESOURCE_EXHAUSTED", + "PROJECT_SUSPENDED", + "SERVICE_NOT_ENABLED", + "BILLING_NOT_ACTIVE", + "PROJECT_DELETED", + "PROJECT_INVALID", + "IP_ADDRESS_BLOCKED", + "REFERER_BLOCKED", + "CLIENT_APP_BLOCKED", + "API_KEY_INVALID", + "API_KEY_EXPIRED", + "SPATULA_HEADER_INVALID", + "LOAS_ROLE_INVALID", + "NO_LOAS_PROJECT", + "PROJECT_STATUS_UNAVAILABLE", + "SERVICE_STATUS_UNAVAILABLE", + "BILLING_STATUS_UNAVAILABLE", + "QUOTA_SYSTEM_UNAVAILABLE" + ], + "description": "Error code.", + "type": "string", + "enumDescriptions": [ + "This is never used.", + "Quota allocation failed.\nSame as google.rpc.Code.RESOURCE_EXHAUSTED.", + "Consumer project has been suspended.", + "Consumer has not enabled the service.", + "Consumer cannot access the service because billing is disabled.", + "Consumer's project has been marked as deleted (soft deletion).", + "Consumer's project number or ID does not represent a valid project.", + "IP address of the consumer is invalid for the specific consumer\nproject.", + "Referer address of the consumer request is invalid for the specific\nconsumer project.", + "Client application of the consumer request is invalid for the\nspecific consumer project.", + "Specified API key is invalid.", + "Specified API Key has expired.", + "Consumer's spatula header is invalid.", + "The consumer's LOAS role is invalid.", + "The consumer's LOAS role has no associated project.", + "The backend server for looking up project id/number is unavailable.", + "The backend server for checking service status is unavailable.", + "The backend server for checking billing status is unavailable.", + "The backend server for checking quota limits is unavailable." + ] + } + }, + "id": "QuotaError" + }, + "RequestMetadata": { + "description": "Metadata about the request.", + "type": "object", + "properties": { + "callerIp": { + "description": "The IP address of the caller.", + "type": "string" + }, + "callerSuppliedUserAgent": { + "description": "The user agent of the caller.\nThis information is not authenticated and should be treated accordingly.\nFor example:\n\n+ `google-api-python-client/1.4.0`:\n The request was made by the Google API client for Python.\n+ `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:\n The request was made by the Google Cloud SDK CLI (gcloud).\n+ `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`:\n The request was made from the `my-project` App Engine app.", + "type": "string" + } + }, + "id": "RequestMetadata" + }, + "CheckInfo": { + "type": "object", + "properties": { + "unusedArguments": { + "description": "A list of fields and label keys that are ignored by the server.\nThe client doesn't need to send them for following requests to improve\nperformance and allow better aggregation.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "CheckInfo" + }, + "ReleaseQuotaResponse": { + "description": "Response message for the ReleaseQuota method.", + "type": "object", + "properties": { + "quotaMetrics": { + "description": "Quota metrics to indicate the result of release. Depending on the\nrequest, one or more of the following metrics will be included:\n\n1. For rate quota, per quota group or per quota metric released amount\nwill be specified using the following delta metric:\n \"serviceruntime.googleapis.com/api/consumer/quota_refund_count\"\n\n2. For allocation quota, per quota metric total usage will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n3. For allocation quota, value for each quota limit associated with\nthe metrics will be specified using the following gauge metric:\n \"serviceruntime.googleapis.com/quota/limit\"", + "type": "array", + "items": { + "$ref": "MetricValueSet" + } + }, + "operationId": { + "description": "The same operation_id value used in the ReleaseQuotaRequest. Used for\nlogging and diagnostics purposes.", + "type": "string" + }, + "serviceConfigId": { + "description": "ID of the actual config used to process the request.", + "type": "string" + }, + "releaseErrors": { + "description": "Indicates the decision of the release.", + "type": "array", + "items": { + "$ref": "QuotaError" + } + } + }, + "id": "ReleaseQuotaResponse" + }, + "AllocateQuotaRequest": { + "id": "AllocateQuotaRequest", + "description": "Request message for the AllocateQuota method.", + "type": "object", + "properties": { + "allocationMode": { + "enumDescriptions": [ + "", + "Allocates quota for the amount specified in the service configuration or\nspecified using the quota_metrics. If the amount is higher than the\navailable quota, allocation error will be returned and no quota will be\nallocated.", + "Allocates quota for the amount specified in the service configuration or\nspecified using the quota_metrics. If the amount is higher than the\navailable quota, request does not fail but all available quota will be\nallocated.", + "Only checks if there is enough quota available and does not change the\navailable quota. No lock is placed on the available quota either." + ], + "enum": [ + "UNSPECIFIED", + "NORMAL", + "BEST_EFFORT", + "CHECK_ONLY" + ], + "description": "Allocation mode for this operation.\nDeprecated: use QuotaMode inside the QuotaOperation.", + "type": "string" + }, + "serviceConfigId": { + "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used.", + "type": "string" + }, + "allocateOperation": { + "description": "Operation that describes the quota allocation.", + "$ref": "QuotaOperation" + } + } + }, "MetricValueSet": { "description": "Represents a set of metric values in the same metric.\nEach metric value in the set should have a unique combination of start time,\nend time, and label values.", "type": "object", @@ -381,219 +936,408 @@ }, "id": "MetricValueSet" }, - "LinearBuckets": { - "description": "Describing buckets with constant width.", + "ReportError": { + "id": "ReportError", + "description": "Represents the processing error of one `Operation` in the request.", "type": "object", "properties": { - "width": { - "description": "The i'th linear bucket covers the interval\n [offset + (i-1) * width, offset + i * width)\nwhere i ranges from 1 to num_finite_buckets, inclusive.\nMust be strictly positive.", - "type": "number", - "format": "double" - }, - "offset": { - "description": "The i'th linear bucket covers the interval\n [offset + (i-1) * width, offset + i * width)\nwhere i ranges from 1 to num_finite_buckets, inclusive.", - "type": "number", - "format": "double" - }, - "numFiniteBuckets": { - "description": "The number of finite buckets. With the underflow and overflow buckets,\nthe total number of buckets is `num_finite_buckets` + 2.\nSee comments on `bucket_options` for details.", - "type": "integer", - "format": "int32" - } - }, - "id": "LinearBuckets" - }, - "CheckResponse": { - "description": "Response message for the Check method.", - "type": "object", - "properties": { - "checkErrors": { - "description": "Indicate the decision of the check.\n\nIf no check errors are present, the service should process the operation.\nOtherwise the service should use the list of errors to determine the\nappropriate action.", - "type": "array", - "items": { - "$ref": "CheckError" - } + "status": { + "description": "Details of the error when processing the `Operation`.", + "$ref": "Status" }, "operationId": { - "description": "The same operation_id value used in the CheckRequest.\nUsed for logging and diagnostics purposes.", + "description": "The Operation.operation_id value from the request.", "type": "string" + } + } + }, + "CheckError": { + "description": "Defines the errors to be returned in\ngoogle.api.servicecontrol.v1.CheckResponse.check_errors.", + "type": "object", + "properties": { + "detail": { + "description": "Free-form text providing details on the error cause of the error.", + "type": "string" + }, + "code": { + "enumDescriptions": [ + "This is never used in `CheckResponse`.", + "The consumer's project id was not found.\nSame as google.rpc.Code.NOT_FOUND.", + "The consumer doesn't have access to the specified resource.\nSame as google.rpc.Code.PERMISSION_DENIED.", + "Quota check failed. Same as google.rpc.Code.RESOURCE_EXHAUSTED.", + "Budget check failed.", + "The consumer's request has been flagged as a DoS attack.", + "The consumer's request should be rejected in order to protect the service\nfrom being overloaded.", + "The consumer has been flagged as an abuser.", + "The consumer hasn't activated the service.", + "The consumer cannot access the service due to visibility configuration.", + "The consumer cannot access the service because billing is disabled.", + "The consumer's project has been marked as deleted (soft deletion).", + "The consumer's project number or id does not represent a valid project.", + "The IP address of the consumer is invalid for the specific consumer\nproject.", + "The referer address of the consumer request is invalid for the specific\nconsumer project.", + "The client application of the consumer request is invalid for the\nspecific consumer project.", + "The API targeted by this request is invalid for the specified consumer\nproject.", + "The consumer's API key is invalid.", + "The consumer's API Key has expired.", + "The consumer's API Key was not found in config record.", + "The consumer's spatula header is invalid.", + "The consumer's LOAS role is invalid.", + "The consumer's LOAS role has no associated project.", + "The consumer's LOAS project is not `ACTIVE` in LoquatV2.", + "Request is not allowed as per security policies defined in Org Policy.", + "The backend server for looking up project id/number is unavailable.", + "The backend server for checking service status is unavailable.", + "The backend server for checking billing status is unavailable.", + "The backend server for checking quota limits is unavailable.", + "The Spanner for looking up LOAS project is unavailable.", + "Cloud Resource Manager backend server is unavailable.", + "Backend server for evaluating security policy is unavailable." + ], + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "NOT_FOUND", + "PERMISSION_DENIED", + "RESOURCE_EXHAUSTED", + "BUDGET_EXCEEDED", + "DENIAL_OF_SERVICE_DETECTED", + "LOAD_SHEDDING", + "ABUSER_DETECTED", + "SERVICE_NOT_ACTIVATED", + "VISIBILITY_DENIED", + "BILLING_DISABLED", + "PROJECT_DELETED", + "PROJECT_INVALID", + "IP_ADDRESS_BLOCKED", + "REFERER_BLOCKED", + "CLIENT_APP_BLOCKED", + "API_TARGET_BLOCKED", + "API_KEY_INVALID", + "API_KEY_EXPIRED", + "API_KEY_NOT_FOUND", + "SPATULA_HEADER_INVALID", + "LOAS_ROLE_INVALID", + "NO_LOAS_PROJECT", + "LOAS_PROJECT_DISABLED", + "SECURITY_POLICY_VIOLATED", + "NAMESPACE_LOOKUP_UNAVAILABLE", + "SERVICE_STATUS_UNAVAILABLE", + "BILLING_STATUS_UNAVAILABLE", + "QUOTA_CHECK_UNAVAILABLE", + "LOAS_PROJECT_LOOKUP_UNAVAILABLE", + "CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE", + "SECURITY_POLICY_BACKEND_UNAVAILABLE" + ], + "description": "The error code.", + "type": "string" + } + }, + "id": "CheckError" + }, + "StartReconciliationRequest": { + "type": "object", + "properties": { + "reconciliationOperation": { + "description": "Operation that describes the quota reconciliation.", + "$ref": "QuotaOperation" }, "serviceConfigId": { - "description": "The actual config id used to process the request.", + "description": "Specifies which version of service configuration should be used to process\nthe request. If unspecified or no matching version can be found, the latest\none will be used.", "type": "string" } }, - "id": "CheckResponse" + "id": "StartReconciliationRequest" }, - "ReportResponse": { - "description": "Response message for the Report method.", + "QuotaInfo": { + "id": "QuotaInfo", + "description": "Contains the quota information for a quota check response.", "type": "object", "properties": { - "reportErrors": { - "description": "Partial failures, one for each `Operation` in the request that failed\nprocessing. There are three possible combinations of the RPC status:\n\n1. The combination of a successful RPC status and an empty `report_errors`\n list indicates a complete success where all `Operations` in the\n request are processed successfully.\n2. The combination of a successful RPC status and a non-empty\n `report_errors` list indicates a partial success where some\n `Operations` in the request succeeded. Each\n `Operation` that failed processing has a corresponding item\n in this list.\n3. A failed RPC status indicates a general non-deterministic failure.\n When this happens, it's impossible to know which of the\n 'Operations' in the request succeeded or failed.", + "limitExceeded": { "type": "array", "items": { - "$ref": "ReportError" - } - }, - "serviceConfigId": { - "description": "The actual config id used to process the request.", - "type": "string" - } - }, - "id": "ReportResponse" - }, - "Distribution": { - "description": "Distribution represents a frequency distribution of double-valued sample\npoints. It contains the size of the population of sample points plus\nadditional optional information:\n\n - the arithmetic mean of the samples\n - the minimum and maximum of the samples\n - the sum-squared-deviation of the samples, used to compute variance\n - a histogram of the values of the sample points", - "type": "object", - "properties": { - "bucketCounts": { - "description": "The number of samples in each histogram bucket. `bucket_counts` are\noptional. If present, they must sum to the `count` value.\n\nThe buckets are defined below in `bucket_option`. There are N buckets.\n`bucket_counts[0]` is the number of samples in the underflow bucket.\n`bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples\nin each of the finite buckets. And `bucket_counts[N] is the number\nof samples in the overflow bucket. See the comments of `bucket_option`\nbelow for more details.\n\nAny suffix of trailing zeros may be omitted.", - "type": "array", - "items": { - "type": "string", - "format": "int64" - } - }, - "exponentialBuckets": { - "description": "Buckets with exponentially growing width.", - "$ref": "ExponentialBuckets" - }, - "explicitBuckets": { - "description": "Buckets with arbitrary user-provided width.", - "$ref": "ExplicitBuckets" - }, - "maximum": { - "description": "The maximum of the population of values. Ignored if `count` is zero.", - "type": "number", - "format": "double" - }, - "count": { - "description": "The total number of samples in the distribution. Must be \u003e= 0.", - "type": "string", - "format": "int64" - }, - "linearBuckets": { - "description": "Buckets with constant width.", - "$ref": "LinearBuckets" - }, - "sumOfSquaredDeviation": { - "description": "The sum of squared deviations from the mean:\n Sum[i=1..count]((x_i - mean)^2)\nwhere each x_i is a sample values. If `count` is zero then this field\nmust be zero, otherwise validation of the request fails.", - "type": "number", - "format": "double" - }, - "minimum": { - "description": "The minimum of the population of values. Ignored if `count` is zero.", - "type": "number", - "format": "double" - }, - "mean": { - "description": "The arithmetic mean of the samples in the distribution. If `count` is\nzero then this field must be zero.", - "type": "number", - "format": "double" - } - }, - "id": "Distribution" - }, - "ExplicitBuckets": { - "description": "Describing buckets with arbitrary user-provided width.", - "type": "object", - "properties": { - "bounds": { - "description": "'bound' is a list of strictly increasing boundaries between\nbuckets. Note that a list of length N-1 defines N buckets because\nof fenceposting. See comments on `bucket_options` for details.\n\nThe i'th finite bucket covers the interval\n [bound[i-1], bound[i])\nwhere i ranges from 1 to bound_size() - 1. Note that there are no\nfinite buckets at all if 'bound' only contains a single element; in\nthat special case the single bound defines the boundary between the\nunderflow and overflow buckets.\n\nbucket number lower bound upper bound\n i == 0 (underflow) -inf bound[i]\n 0 \u003c i \u003c bound_size() bound[i-1] bound[i]\n i == bound_size() (overflow) bound[i-1] +inf", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - }, - "id": "ExplicitBuckets" - }, - "MetricValue": { - "description": "Represents a single metric value.", - "type": "object", - "properties": { - "stringValue": { - "description": "A text string value.", - "type": "string" - }, - "doubleValue": { - "description": "A double precision floating point value.", - "type": "number", - "format": "double" - }, - "boolValue": { - "description": "A boolean value.", - "type": "boolean" - }, - "endTime": { - "description": "The end of the time period over which this metric value's measurement\napplies.", - "type": "string", - "format": "google-datetime" - }, - "labels": { - "description": "The labels describing the metric value.\nSee comments on google.api.servicecontrol.v1.Operation.labels for\nthe overriding relationship.", - "additionalProperties": { "type": "string" }, - "type": "object" + "description": "Quota Metrics that have exceeded quota limits.\nFor QuotaGroup-based quota, this is QuotaGroup.name\nFor QuotaLimit-based quota, this is QuotaLimit.name\nSee: google.api.Quota\nDeprecated: Use quota_metrics to get per quota group limit exceeded status." }, - "distributionValue": { - "description": "A distribution value.", - "$ref": "Distribution" + "quotaConsumed": { + "type": "object", + "additionalProperties": { + "format": "int32", + "type": "integer" + }, + "description": "Map of quota group name to the actual number of tokens consumed. If the\nquota check was not successful, then this will not be populated due to no\nquota consumption.\nDeprecated: Use quota_metrics to get per quota group usage." }, - "startTime": { - "description": "The start of the time period over which this metric value's measurement\napplies. The time period has different semantics for different metric\ntypes (cumulative, delta, and gauge). See the metric definition\ndocumentation in the service configuration for details.", - "type": "string", - "format": "google-datetime" - }, - "int64Value": { - "description": "A signed 64-bit integer value.", - "type": "string", - "format": "int64" + "quotaMetrics": { + "type": "array", + "items": { + "$ref": "MetricValueSet" + }, + "description": "Quota metrics to indicate the usage. Depending on the check request, one or\nmore of the following metrics will be included:\n\n1. For rate quota, per quota group or per quota metric incremental usage\nwill be specified using the following delta metric:\n \"serviceruntime.googleapis.com/api/consumer/quota_used_count\"\n\n2. For allocation quota, per quota metric total usage will be specified\nusing the following gauge metric:\n \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\"\n\n3. For both rate quota and allocation quota, the quota limit reached\ncondition will be specified using the following boolean metric:\n \"serviceruntime.googleapis.com/quota/exceeded\"" } - }, - "id": "MetricValue" + } } }, - "revision": "20161212", - "basePath": "", + "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", "canonicalName": "Service Control", - "discoveryVersion": "v1", - "baseUrl": "https://servicecontrol.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/servicecontrol": { + "description": "Manage your Google Service Control data" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://servicecontrol.googleapis.com/", + "ownerDomain": "google.com", "name": "servicecontrol", + "batchPath": "batch", + "title": "Google Service Control API", + "ownerName": "Google", + "resources": { + "services": { + "methods": { + "allocateQuota": { + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "AllocateQuotaResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/services/{serviceName}:allocateQuota", + "id": "servicecontrol.services.allocateQuota", + "path": "v1/services/{serviceName}:allocateQuota", + "description": "Attempts to allocate quota for the specified consumer. It should be called\nbefore the operation is executed.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).\n\n**NOTE:** the client code **must** fail-open if the server returns one\nof the following quota errors:\n- `PROJECT_STATUS_UNAVAILABLE`\n- `SERVICE_STATUS_UNAVAILABLE`\n- `BILLING_STATUS_UNAVAILABLE`\n- `QUOTA_SYSTEM_UNAVAILABLE`\n\nThe server may inject above errors to prohibit any hard dependency\non the quota system.", + "request": { + "$ref": "AllocateQuotaRequest" + } + }, + "startReconciliation": { + "flatPath": "v1/services/{serviceName}:startReconciliation", + "id": "servicecontrol.services.startReconciliation", + "path": "v1/services/{serviceName}:startReconciliation", + "description": "Unlike rate quota, allocation quota does not get refilled periodically.\nSo, it is possible that the quota usage as seen by the service differs from\nwhat the One Platform considers the usage is. This is expected to happen\nonly rarely, but over time this can accumulate. Services can invoke\nStartReconciliation and EndReconciliation to correct this usage drift, as\ndescribed below:\n1. Service sends StartReconciliation with a timestamp in future for each\n metric that needs to be reconciled. The timestamp being in future allows\n to account for in-flight AllocateQuota and ReleaseQuota requests for the\n same metric.\n2. One Platform records this timestamp and starts tracking subsequent\n AllocateQuota and ReleaseQuota requests until EndReconciliation is\n called.\n3. At or after the time specified in the StartReconciliation, service\n sends EndReconciliation with the usage that needs to be reconciled to.\n4. One Platform adjusts its own record of usage for that metric to the\n value specified in EndReconciliation by taking in to account any\n allocation or release between StartReconciliation and EndReconciliation.\n\nSignals the quota controller that the service wants to perform a usage\nreconciliation as specified in the request.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", + "request": { + "$ref": "StartReconciliationRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "StartReconciliationResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + "required": true, + "type": "string" + } + } + }, + "check": { + "response": { + "$ref": "CheckResponse" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "parameters": { + "serviceName": { + "required": true, + "type": "string", + "location": "path", + "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name." + } + }, + "flatPath": "v1/services/{serviceName}:check", + "path": "v1/services/{serviceName}:check", + "id": "servicecontrol.services.check", + "description": "Checks an operation with Google Service Control to decide whether\nthe given operation should proceed. It should be called before the\noperation is executed.\n\nIf feasible, the client should cache the check results and reuse them for\n60 seconds. In case of server errors, the client can rely on the cached\nresults for longer time.\n\nNOTE: the `CheckRequest` has the size limit of 64KB.\n\nThis method requires the `servicemanagement.services.check` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", + "request": { + "$ref": "CheckRequest" + } + }, + "releaseQuota": { + "request": { + "$ref": "ReleaseQuotaRequest" + }, + "description": "Releases previously allocated quota done through AllocateQuota method.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).\n\n**NOTE:** the client code **must** fail-open if the server returns one\nof the following quota errors:\n- `PROJECT_STATUS_UNAVAILABLE`\n- `SERVICE_STATUS_UNAVAILABLE`\n- `BILLING_STATUS_UNAVAILABLE`\n- `QUOTA_SYSTEM_UNAVAILABLE`\n\nThe server may inject above errors to prohibit any hard dependency\non the quota system.", + "response": { + "$ref": "ReleaseQuotaResponse" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "flatPath": "v1/services/{serviceName}:releaseQuota", + "path": "v1/services/{serviceName}:releaseQuota", + "id": "servicecontrol.services.releaseQuota" + }, + "endReconciliation": { + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service as specified in the service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "flatPath": "v1/services/{serviceName}:endReconciliation", + "path": "v1/services/{serviceName}:endReconciliation", + "id": "servicecontrol.services.endReconciliation", + "request": { + "$ref": "EndReconciliationRequest" + }, + "description": "Signals the quota controller that service ends the ongoing usage\nreconciliation.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).", + "response": { + "$ref": "EndReconciliationResponse" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST" + }, + "report": { + "response": { + "$ref": "ReportResponse" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "parameters": { + "serviceName": { + "description": "The service name as specified in its service configuration. For example,\n`\"pubsub.googleapis.com\"`.\n\nSee google.api.Service for the definition of a service name.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ], + "flatPath": "v1/services/{serviceName}:report", + "path": "v1/services/{serviceName}:report", + "id": "servicecontrol.services.report", + "request": { + "$ref": "ReportRequest" + }, + "description": "Reports operation results to Google Service Control, such as logs and\nmetrics. It should be called after an operation is completed.\n\nIf feasible, the client should aggregate reporting data for up to 5\nseconds to reduce API traffic. Limiting aggregation to 5 seconds is to\nreduce data loss during client crashes. Clients should carefully choose\nthe aggregation time window to avoid data loss risk more than 0.01%\nfor business and compliance reasons.\n\nNOTE: the `ReportRequest` has the size limit of 1MB.\n\nThis method requires the `servicemanagement.services.report` permission\non the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam)." + } + } + } + }, "parameters": { - "access_token": { - "description": "OAuth access token.", + "alt": { "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] }, "key": { "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", "location": "query" }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, "quotaUser": { + "location": "query", "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" + "type": "string" }, "pp": { "description": "Pretty-print response.", - "default": "true", "type": "boolean", + "default": "true", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", "location": "query" }, "fields": { @@ -601,67 +1345,29 @@ "type": "string", "location": "query" }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, "callback": { "description": "JSONP", "type": "string", "location": "query" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", + "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ] } }, - "documentationLink": "https://cloud.google.com/service-control/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v1", - "rootUrl": "https://servicecontrol.googleapis.com/", - "kind": "discovery#restDescription" + "baseUrl": "https://servicecontrol.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Google Service Control provides control plane functionality to managed services, such as logging, monitoring, and status checks.", + "servicePath": "", + "basePath": "" } diff --git a/etc/api/servicemanagement/v1/servicemanagement-api.json b/etc/api/servicemanagement/v1/servicemanagement-api.json index 0d4c820833..5c0f4c433f 100644 --- a/etc/api/servicemanagement/v1/servicemanagement-api.json +++ b/etc/api/servicemanagement/v1/servicemanagement-api.json @@ -1,195 +1,460 @@ { + "basePath": "", + "ownerDomain": "google.com", + "name": "servicemanagement", + "batchPath": "batch", + "revision": "20170512", "id": "servicemanagement:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/service.management": { - "description": "Manage your Google API service configuration" - }, - "https://www.googleapis.com/auth/service.management.readonly": { - "description": "View your Google API service configuration" - } - } - } - }, - "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.", - "protocol": "rest", + "documentationLink": "https://cloud.google.com/service-management/", "title": "Google Service Management API", + "discoveryVersion": "v1", + "ownerName": "Google", "resources": { - "operations": { + "services": { "methods": { "get": { - "id": "servicemanagement.operations.get", + "description": "Gets a managed service. Authentication is required unless the service is\npublic.", + "httpMethod": "GET", + "response": { + "$ref": "ManagedService" + }, + "parameterOrder": [ + "serviceName" + ], + "parameters": { + "serviceName": { + "description": "The name of the service. See the `ServiceManager` overview for naming\nrequirements. For example: `example.googleapis.com`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{serviceName}", + "id": "servicemanagement.services.get", + "path": "v1/services/{serviceName}" + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "required": true, + "type": "string", + "pattern": "^services/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{servicesId}:testIamPermissions", + "id": "servicemanagement.services.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning." + }, + "getConfig": { + "httpMethod": "GET", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "Service" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "serviceName": { + "required": true, + "type": "string", + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`." + }, + "configId": { + "location": "query", + "description": "The id of the service configuration resource.", + "type": "string" + }, + "view": { + "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", + "type": "string", + "location": "query", + "enum": [ + "BASIC", + "FULL" + ] + } + }, + "flatPath": "v1/services/{serviceName}/config", + "id": "servicemanagement.services.getConfig", + "path": "v1/services/{serviceName}/config", + "description": "Gets a service configuration (version) for a managed service." + }, + "delete": { + "httpMethod": "DELETE", "response": { "$ref": "Operation" }, "parameterOrder": [ - "name" + "serviceName" ], - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "flatPath": "v1/operations/{operationsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "required": true, - "pattern": "^operations/.+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+name}", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/service.management" - ] - } - } - }, - "services": { - "resources": { - "rollouts": { - "methods": { - "get": { - "id": "servicemanagement.services.rollouts.get", - "response": { - "$ref": "Rollout" - }, - "parameterOrder": [ - "serviceName", - "rolloutId" - ], - "description": "Gets a service configuration rollout.", - "flatPath": "v1/services/{serviceName}/rollouts/{rolloutId}", - "httpMethod": "GET", - "parameters": { - "rolloutId": { - "description": "The id of the rollout resource.", - "required": true, - "location": "path", - "type": "string" - }, - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/services/{serviceName}/rollouts/{rolloutId}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ] + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/services/{serviceName}", + "id": "servicemanagement.services.delete", + "path": "v1/services/{serviceName}", + "description": "Deletes a managed service. This method will change the service to the\n`Soft-Delete` state for 30 days. Within this period, service producers may\ncall UndeleteService to restore the service.\nAfter 30 days, the service will be permanently deleted.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e" + }, + "enable": { + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service to enable. Specifying an unknown service name will\ncause the request to fail.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{serviceName}:enable", + "id": "servicemanagement.services.enable", + "path": "v1/services/{serviceName}:enable", + "request": { + "$ref": "EnableServiceRequest" + }, + "description": "Enables a service for a project, so it can be used\nfor the project. See\n[Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: EnableServiceResponse\u003e", + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "Operation" + } + }, + "setIamPolicy": { + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^services/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{servicesId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "servicemanagement.services.setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST" + }, + "disable": { + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "serviceName": { + "location": "path", + "description": "Name of the service to disable. Specifying an unknown service name\nwill cause the request to fail.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{serviceName}:disable", + "id": "servicemanagement.services.disable", + "path": "v1/services/{serviceName}:disable", + "request": { + "$ref": "DisableServiceRequest" + }, + "description": "Disables a service for a project, so it can no longer be\nbe used for the project. It prevents accidental usage that may cause\nunexpected billing charges or security leaks.\n\nOperation\u003cresponse: DisableServiceResponse\u003e" + }, + "getIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^services/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/services/{servicesId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "id": "servicemanagement.services.getIamPolicy", + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "request": { + "$ref": "GetIamPolicyRequest" + } + }, + "undelete": { + "description": "Revives a previously deleted managed service. The method restores the\nservice using the configuration at the time the service was deleted.\nThe target service must exist and must have been deleted within the\nlast 30 days.\n\nOperation\u003cresponse: UndeleteServiceResponse\u003e", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/services/{serviceName}:undelete", + "path": "v1/services/{serviceName}:undelete", + "id": "servicemanagement.services.undelete" + }, + "list": { + "flatPath": "v1/services", + "id": "servicemanagement.services.list", + "path": "v1/services", + "description": "Lists managed services.\n\nReturns all public services. For authenticated users, also returns all\nservices the calling user has \"servicemanagement.services.get\" permission\nfor.\n\n**BETA:** If the caller specifies the `consumer_id`, it returns only the\nservices enabled on the consumer. The `consumer_id` must have the format\nof \"project:{PROJECT-ID}\".", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "pageSize": { + "description": "Requested size of the next page of data.", + "format": "int32", + "type": "integer", + "location": "query" }, - "create": { - "id": "servicemanagement.services.rollouts.create", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "serviceName" - ], - "description": "Creates a new service configuration rollout. Based on rollout, the\nGoogle Service Management will roll out the service configurations to\ndifferent backend services. For example, the logging configuration will be\npushed to Google Cloud Logging.\n\nPlease note that any previous pending and running Rollouts and associated\nOperations will be automatically cancelled so that the latest Rollout will\nnot be blocked by previous Rollouts.\n\nOperation\u003cresponse: Rollout\u003e", - "request": { - "$ref": "Rollout" - }, - "flatPath": "v1/services/{serviceName}/rollouts", - "httpMethod": "POST", - "parameters": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/services/{serviceName}/rollouts", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] + "producerProjectId": { + "location": "query", + "description": "Include services produced by the specified project.", + "type": "string" }, - "list": { - "id": "servicemanagement.services.rollouts.list", - "response": { - "$ref": "ListServiceRolloutsResponse" - }, - "parameterOrder": [ - "serviceName" - ], - "description": "Lists the history of the service configuration rollouts for a managed\nservice, from the newest to the oldest.", - "flatPath": "v1/services/{serviceName}/rollouts", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "The max number of items to include in the response list.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "required": true, - "location": "path", - "type": "string" - }, - "pageToken": { - "description": "The token of the page to retrieve.", - "location": "query", - "type": "string" - } - }, - "path": "v1/services/{serviceName}/rollouts", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ] + "consumerId": { + "description": "Include services consumed by the specified consumer.\n\nThe Google Service Management implementation accepts the following\nforms:\n- project:\u003cproject_id\u003e", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "Token identifying which result to start with; returned by a previous list\ncall.", + "type": "string" } } }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services", + "path": "v1/services", + "id": "servicemanagement.services.create", + "request": { + "$ref": "ManagedService" + }, + "description": "Creates a new managed service.\nPlease note one producer project can own no more than 20 services.\n\nOperation\u003cresponse: ManagedService\u003e" + }, + "generateConfigReport": { + "description": "Generates and returns a report (errors, warnings and changes from\nexisting configurations) associated with\nGenerateConfigReportRequest.new_value\n\nIf GenerateConfigReportRequest.old_value is specified,\nGenerateConfigReportRequest will contain a single ChangeReport based on the\ncomparison between GenerateConfigReportRequest.new_value and\nGenerateConfigReportRequest.old_value.\nIf GenerateConfigReportRequest.old_value is not specified, this method\nwill compare GenerateConfigReportRequest.new_value with the last pushed\nservice configuration.", + "request": { + "$ref": "GenerateConfigReportRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "GenerateConfigReportResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": {}, + "flatPath": "v1/services:generateConfigReport", + "id": "servicemanagement.services.generateConfigReport", + "path": "v1/services:generateConfigReport" + } + }, + "resources": { "configs": { "methods": { - "submit": { - "id": "servicemanagement.services.configs.submit", - "response": { - "$ref": "Operation" - }, + "create": { + "httpMethod": "POST", "parameterOrder": [ "serviceName" ], + "response": { + "$ref": "Service" + }, + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{serviceName}/configs", + "id": "servicemanagement.services.configs.create", + "path": "v1/services/{serviceName}/configs", + "request": { + "$ref": "Service" + }, + "description": "Creates a new service configuration (version) for a managed service.\nThis method only stores the service configuration. To roll out the service\nconfiguration to backend systems please call\nCreateServiceRollout." + }, + "submit": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/services/{serviceName}/configs:submit", + "id": "servicemanagement.services.configs.submit", + "path": "v1/services/{serviceName}/configs:submit", "description": "Creates a new service configuration (version) for a managed service based\non\nuser-supplied configuration source files (for example: OpenAPI\nSpecification). This method stores the source configurations as well as the\ngenerated service configuration. To rollout the service configuration to\nother services,\nplease call CreateServiceRollout.\n\nOperation\u003cresponse: SubmitConfigSourceResponse\u003e", "request": { "$ref": "SubmitConfigSourceRequest" }, - "flatPath": "v1/services/{serviceName}/configs:submit", "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "Operation" + } + }, + "list": { + "response": { + "$ref": "ListServiceConfigsResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "serviceName" + ], "parameters": { "serviceName": { + "location": "path", "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", "required": true, - "location": "path", "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The token of the page to retrieve.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "The max number of items to include in the response list.", + "format": "int32", + "type": "integer" } }, - "path": "v1/services/{serviceName}/configs:submit", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{serviceName}/configs", + "path": "v1/services/{serviceName}/configs", + "id": "servicemanagement.services.configs.list", + "description": "Lists the history of the service configuration for a managed service,\nfrom the newest to the oldest." }, "get": { - "id": "servicemanagement.services.configs.get", + "httpMethod": "GET", "response": { "$ref": "Service" }, @@ -197,887 +462,406 @@ "serviceName", "configId" ], - "description": "Gets a service configuration (version) for a managed service.", - "flatPath": "v1/services/{serviceName}/configs/{configId}", - "httpMethod": "GET", "parameters": { + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "required": true, + "type": "string", + "location": "path" + }, "configId": { "description": "The id of the service configuration resource.", "required": true, - "location": "path", - "type": "string" + "type": "string", + "location": "path" }, - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "required": true, - "location": "path", + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", "type": "string" } }, - "path": "v1/services/{serviceName}/configs/{configId}", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/service.management", "https://www.googleapis.com/auth/service.management.readonly" - ] - }, - "create": { - "id": "servicemanagement.services.configs.create", - "response": { - "$ref": "Service" - }, - "parameterOrder": [ - "serviceName" ], - "description": "Creates a new service configuration (version) for a managed service.\nThis method only stores the service configuration. To roll out the service\nconfiguration to backend systems please call\nCreateServiceRollout.", + "flatPath": "v1/services/{serviceName}/configs/{configId}", + "id": "servicemanagement.services.configs.get", + "path": "v1/services/{serviceName}/configs/{configId}", + "description": "Gets a service configuration (version) for a managed service." + } + } + }, + "consumers": { + "methods": { + "testIamPermissions": { "request": { - "$ref": "Service" + "$ref": "TestIamPermissionsRequest" }, - "flatPath": "v1/services/{serviceName}/configs", + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, "parameters": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "required": true, + "resource": { + "pattern": "^services/[^/]+/consumers/[^/]+$", "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:testIamPermissions", + "id": "servicemanagement.services.consumers.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions" + }, + "getIamPolicy": { + "path": "v1/{+resource}:getIamPolicy", + "id": "servicemanagement.services.consumers.getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "required": true, + "type": "string", + "pattern": "^services/[^/]+/consumers/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:getIamPolicy" + }, + "setIamPolicy": { + "parameters": { + "resource": { + "pattern": "^services/[^/]+/consumers/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "required": true, "type": "string" } }, - "path": "v1/services/{serviceName}/configs", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/service.management" - ] - }, - "list": { - "id": "servicemanagement.services.configs.list", - "response": { - "$ref": "ListServiceConfigsResponse" + ], + "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:setIamPolicy", + "id": "servicemanagement.services.consumers.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + } + } + } + }, + "rollouts": { + "methods": { + "list": { + "httpMethod": "GET", "parameterOrder": [ "serviceName" ], - "description": "Lists the history of the service configuration for a managed service,\nfrom the newest to the oldest.", - "flatPath": "v1/services/{serviceName}/configs", - "httpMethod": "GET", + "response": { + "$ref": "ListServiceRolloutsResponse" + }, "parameters": { - "pageSize": { - "description": "The max number of items to include in the response list.", - "location": "query", - "type": "integer", - "format": "int32" - }, "serviceName": { + "location": "path", "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", "required": true, - "location": "path", "type": "string" }, "pageToken": { - "description": "The token of the page to retrieve.", "location": "query", + "description": "The token of the page to retrieve.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "The max number of items to include in the response list.", + "format": "int32", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "Use `filter` to return subset of rollouts.\nThe following filters are supported:\n -- To limit the results to only those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',\n use filter='status=SUCCESS'\n -- To limit the results to those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'\n or 'FAILED', use filter='status=CANCELLED OR status=FAILED'", "type": "string" } }, - "path": "v1/services/{serviceName}/configs", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", "https://www.googleapis.com/auth/service.management", "https://www.googleapis.com/auth/service.management.readonly" - ] + ], + "flatPath": "v1/services/{serviceName}/rollouts", + "id": "servicemanagement.services.rollouts.list", + "path": "v1/services/{serviceName}/rollouts", + "description": "Lists the history of the service configuration rollouts for a managed\nservice, from the newest to the oldest." + }, + "get": { + "response": { + "$ref": "Rollout" + }, + "parameterOrder": [ + "serviceName", + "rolloutId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "required": true, + "type": "string" + }, + "rolloutId": { + "description": "The id of the rollout resource.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/services/{serviceName}/rollouts/{rolloutId}", + "path": "v1/services/{serviceName}/rollouts/{rolloutId}", + "id": "servicemanagement.services.rollouts.get", + "description": "Gets a service configuration rollout." + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "required": true, + "type": "string", + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`." + } + }, + "flatPath": "v1/services/{serviceName}/rollouts", + "path": "v1/services/{serviceName}/rollouts", + "id": "servicemanagement.services.rollouts.create", + "description": "Creates a new service configuration rollout. Based on rollout, the\nGoogle Service Management will roll out the service configurations to\ndifferent backend services. For example, the logging configuration will be\npushed to Google Cloud Logging.\n\nPlease note that any previous pending and running Rollouts and associated\nOperations will be automatically cancelled so that the latest Rollout will\nnot be blocked by previous Rollouts.\n\nOperation\u003cresponse: Rollout\u003e", + "request": { + "$ref": "Rollout" + } } } } - }, + } + }, + "operations": { "methods": { - "getIamPolicy": { - "id": "servicemanagement.services.getIamPolicy", + "list": { + "flatPath": "v1/operations", + "id": "servicemanagement.operations.list", + "path": "v1/operations", + "description": "Lists service operations that match the specified filter in the request.", + "httpMethod": "GET", "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "flatPath": "v1/services/{servicesId}:getIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^services/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "disable": { - "id": "servicemanagement.services.disable", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "serviceName" - ], - "description": "Disable a managed service for a project.\n\nOperation\u003cresponse: DisableServiceResponse\u003e", - "request": { - "$ref": "DisableServiceRequest" - }, - "flatPath": "v1/services/{serviceName}:disable", - "httpMethod": "POST", - "parameters": { - "serviceName": { - "description": "Name of the service to disable. Specifying an unknown service name\nwill cause the request to fail.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/services/{serviceName}:disable", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "generateConfigReport": { - "id": "servicemanagement.services.generateConfigReport", - "response": { - "$ref": "GenerateConfigReportResponse" + "$ref": "ListOperationsResponse" }, "parameterOrder": [], - "description": "Generates and returns a report (errors, warnings and changes from\nexisting configurations) associated with\nGenerateConfigReportRequest.new_value\n\nIf GenerateConfigReportRequest.old_value is specified,\nGenerateConfigReportRequest will contain a single ChangeReport based on the\ncomparison between GenerateConfigReportRequest.new_value and\nGenerateConfigReportRequest.old_value.\nIf GenerateConfigReportRequest.old_value is not specified, this method\nwill compare GenerateConfigReportRequest.new_value with the last pushed\nservice configuration.", - "request": { - "$ref": "GenerateConfigReportRequest" - }, - "flatPath": "v1/services:generateConfigReport", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/services:generateConfigReport", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "getConfig": { - "id": "servicemanagement.services.getConfig", - "response": { - "$ref": "Service" - }, - "parameterOrder": [ - "serviceName" - ], - "description": "Gets a service configuration (version) for a managed service.", - "flatPath": "v1/services/{serviceName}/config", - "httpMethod": "GET", "parameters": { - "configId": { - "description": "The id of the service configuration resource.", + "filter": { "location": "query", + "description": "A string for filtering Operations.\n The following filter fields are supported:\n\n * serviceName: Required. Only `=` operator is allowed.\n * startTime: The time this job was started, in ISO 8601 format.\n Allowed operators are `\u003e=`, `\u003e`, `\u003c=`, and `\u003c`.\n * status: Can be `done`, `in_progress`, or `failed`. Allowed\n operators are `=`, and `!=`.\n\n Filter expression supports conjunction (AND) and disjunction (OR)\n logical operators. However, the serviceName restriction must be at the\n top-level and can only be combined with other restrictions via the AND\n logical operator.\n\n Examples:\n\n * `serviceName={some-service}.googleapis.com`\n * `serviceName={some-service}.googleapis.com AND startTime\u003e=\"2017-02-01\"`\n * `serviceName={some-service}.googleapis.com AND status=done`\n * `serviceName={some-service}.googleapis.com AND (status=done OR startTime\u003e=\"2017-02-01\")`", "type": "string" }, - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "required": true, - "location": "path", + "name": { + "location": "query", + "description": "Not used.", "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The maximum number of operations to return. If unspecified, defaults to\n50. The maximum value is 100.", + "format": "int32", + "type": "integer" } }, - "path": "v1/services/{serviceName}/config", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ] - }, - "undelete": { - "id": "servicemanagement.services.undelete", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "serviceName" - ], - "description": "Revives a previously deleted managed service. The method restores the\nservice using the configuration at the time the service was deleted.\nThe target service must exist and must have been deleted within the\nlast 30 days.\n\nOperation\u003cresponse: UndeleteServiceResponse\u003e", - "flatPath": "v1/services/{serviceName}:undelete", - "httpMethod": "POST", - "parameters": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/services/{serviceName}:undelete", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/service.management" ] }, "get": { - "id": "servicemanagement.services.get", - "response": { - "$ref": "ManagedService" - }, - "parameterOrder": [ - "serviceName" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" ], - "description": "Gets a managed service. Authentication is required unless the service is\npublic.", - "flatPath": "v1/services/{serviceName}", + "parameters": { + "name": { + "required": true, + "type": "string", + "pattern": "^operations/.+$", + "location": "path", + "description": "The name of the operation resource." + } + }, + "flatPath": "v1/operations/{operationsId}", + "id": "servicemanagement.operations.get", + "path": "v1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", "httpMethod": "GET", - "parameters": { - "serviceName": { - "description": "The name of the service. See the `ServiceManager` overview for naming\nrequirements. For example: `example.googleapis.com`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/services/{serviceName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ] - }, - "list": { - "id": "servicemanagement.services.list", - "response": { - "$ref": "ListServicesResponse" - }, - "parameterOrder": [], - "description": "Lists all managed services. The result is limited to services that the\ncaller has \"servicemanagement.services.get\" permission for. If the request\nis made without authentication, it returns only public services that are\navailable to everyone.", - "flatPath": "v1/services", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Requested size of the next page of data.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "producerProjectId": { - "description": "Include services produced by the specified project.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Token identifying which result to start with; returned by a previous list\ncall.", - "location": "query", - "type": "string" - }, - "consumerId": { - "description": "Include services consumed by the specified consumer.\n\nThe Google Service Management implementation accepts the following\nforms:\n- project:\u003cproject_id\u003e", - "location": "query", - "type": "string" - } - }, - "path": "v1/services", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ] - }, - "create": { - "id": "servicemanagement.services.create", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "description": "Creates a new managed service.\nPlease note one producer project can own no more than 20 services.\n\nOperation\u003cresponse: ManagedService\u003e", - "request": { - "$ref": "ManagedService" - }, - "flatPath": "v1/services", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/services", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "enable": { - "id": "servicemanagement.services.enable", "response": { "$ref": "Operation" }, "parameterOrder": [ - "serviceName" - ], - "description": "Enable a managed service for a project with default setting.\n\nOperation\u003cresponse: EnableServiceResponse\u003e\n\ngoogle.rpc.Status errors may contain a\ngoogle.rpc.PreconditionFailure error detail.", - "request": { - "$ref": "EnableServiceRequest" - }, - "flatPath": "v1/services/{serviceName}:enable", - "httpMethod": "POST", - "parameters": { - "serviceName": { - "description": "Name of the service to enable. Specifying an unknown service name will\ncause the request to fail.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/services/{serviceName}:enable", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "setIamPolicy": { - "id": "servicemanagement.services.setIamPolicy", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "flatPath": "v1/services/{servicesId}:setIamPolicy", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^services/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "delete": { - "id": "servicemanagement.services.delete", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "serviceName" - ], - "description": "Deletes a managed service. This method will change the service to the\n`Soft-Delete` state for 30 days. Within this period, service producers may\ncall UndeleteService to restore the service.\nAfter 30 days, the service will be permanently deleted.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e", - "flatPath": "v1/services/{serviceName}", - "httpMethod": "DELETE", - "parameters": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/services/{serviceName}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "testIamPermissions": { - "id": "servicemanagement.services.testIamPermissions", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "flatPath": "v1/services/{servicesId}:testIamPermissions", - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\n`resource` is usually specified as a path. For example, a Project\nresource is specified as `projects/{project}`.", - "required": true, - "pattern": "^services/[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" + "name" ] } } } }, + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + }, + "quotaUser": { + "type": "string", + "location": "query", + "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." + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + } + }, "schemas": { - "Api": { - "description": "Api is a light-weight descriptor for a protocol buffer service.", - "type": "object", - "properties": { - "methods": { - "description": "The methods of this api, in unspecified order.", - "type": "array", - "items": { - "$ref": "Method" - } - }, - "options": { - "description": "Any metadata attached to the API.", - "type": "array", - "items": { - "$ref": "Option" - } - }, - "sourceContext": { - "description": "Source context for the protocol buffer service represented by this\nmessage.", - "$ref": "SourceContext" - }, - "name": { - "description": "The fully qualified name of this api, including package name\nfollowed by the api's simple name.", - "type": "string" - }, - "syntax": { - "description": "The source syntax of the service.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "type": "string" - }, - "version": { - "description": "A version string for this api. If specified, must have the form\n`major-version.minor-version`, as in `1.10`. If the minor version\nis omitted, it defaults to zero. If the entire version field is\nempty, the major version is derived from the package name, as\noutlined below. If the field is not empty, the version in the\npackage name will be verified to be consistent with what is\nprovided here.\n\nThe versioning schema uses [semantic\nversioning](http://semver.org) where the major version number\nindicates a breaking change and the minor version an additive,\nnon-breaking change. Both version numbers are signals to users\nwhat to expect from different versions, and should be carefully\nchosen based on the product plan.\n\nThe major version is also reflected in the package name of the\nAPI, which must end in `v\u003cmajor-version\u003e`, as in\n`google.feature.v1`. For major versions 0 and 1, the suffix can\nbe omitted. Zero major versions must only be used for\nexperimental, none-GA apis.\n", - "type": "string" - }, - "mixins": { - "description": "Included APIs. See Mixin.", - "type": "array", - "items": { - "$ref": "Mixin" - } - } - }, - "id": "Api" - }, - "SystemParameterRule": { - "description": "Define a system parameter rule mapping system parameter definitions to\nmethods.", - "type": "object", - "properties": { - "parameters": { - "description": "Define parameters. Multiple names may be defined for a parameter.\nFor a given method call, only one of them should be used. If multiple\nnames are used the behavior is implementation-dependent.\nIf none of the specified names are present the behavior is\nparameter-dependent.", - "type": "array", - "items": { - "$ref": "SystemParameter" - } - }, - "selector": { - "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", - "type": "string" - } - }, - "id": "SystemParameterRule" - }, - "Diagnostic": { - "description": "Represents a diagnostic message (error or warning)", - "type": "object", - "properties": { - "location": { - "description": "File name and line number of the error or warning.", - "type": "string" - }, - "kind": { - "description": "The kind of diagnostic information provided.", - "enum": [ - "WARNING", - "ERROR" - ], - "enumDescriptions": [ - "Warnings and errors", - "Only errors" - ], - "type": "string" - }, - "message": { - "description": "Message describing the error or warning.", - "type": "string" - } - }, - "id": "Diagnostic" - }, - "ChangeReport": { - "description": "Change report associated with a particular service configuration.\n\nIt contains a list of ConfigChanges based on the comparison between\ntwo service configurations.", - "type": "object", - "properties": { - "configChanges": { - "description": "List of changes between two service configurations.\nThe changes will be alphabetically sorted based on the identifier\nof each change.\nA ConfigChange identifier is a dot separated path to the configuration.\nExample: visibility.rules[selector='LibraryService.CreateBook'].restriction", - "type": "array", - "items": { - "$ref": "ConfigChange" - } - } - }, - "id": "ChangeReport" - }, - "MonitoredResourceDescriptor": { - "description": "An object that describes the schema of a MonitoredResource object using a\ntype name and a set of labels. For example, the monitored resource\ndescriptor for Google Compute Engine VM instances has a type of\n`\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and\n`\"zone\"` to identify particular VM instances.\n\nDifferent APIs can support different monitored resource types. APIs generally\nprovide a `list` method that returns the monitored resource descriptors used\nby the API.", - "type": "object", - "properties": { - "displayName": { - "description": "Optional. A concise name for the monitored resource type that might be\ndisplayed in user interfaces. It should be a Title Cased Noun Phrase,\nwithout any article or other determiners. For example,\n`\"Google Cloud SQL Database\"`.", - "type": "string" - }, - "description": { - "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation.", - "type": "string" - }, - "labels": { - "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified by values for the labels `\"database_id\"` and `\"zone\"`.", - "type": "array", - "items": { - "$ref": "LabelDescriptor" - } - }, - "type": { - "description": "Required. The monitored resource type. For example, the type\n`\"cloudsql_database\"` represents databases in Google Cloud SQL.\nThe maximum length of this value is 256 characters.", - "type": "string" - }, - "name": { - "description": "Optional. The resource name of the monitored resource descriptor:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`.", - "type": "string" - } - }, - "id": "MonitoredResourceDescriptor" - }, - "LogConfig": { - "description": "Specifies what kind of log the caller must write\nIncrement a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only,\nand end in \"_count\". Field names should not contain an initial slash.\nThe actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are\ntheir respective values.\n\nAt present the only supported field names are\n - \"iam_principal\", corresponding to IAMContext.principal;\n - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples:\n counter { metric: \"/debug_access_count\" field: \"iam_principal\" }\n ==\u003e increment counter /iam/policy/backend_debug_access_count\n {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support:\n* multiple field names (though this may be supported in the future)\n* decrementing the counter\n* incrementing it by anything other than 1", - "type": "object", - "properties": { - "dataAccess": { - "description": "Data access options.", - "$ref": "DataAccessOptions" - }, - "counter": { - "description": "Counter options.", - "$ref": "CounterOptions" - }, - "cloudAudit": { - "description": "Cloud audit options.", - "$ref": "CloudAuditOptions" - } - }, - "id": "LogConfig" - }, - "Mixin": { - "description": "Declares an API to be included in this API. The including API must\nredeclare all the methods from the included API, but documentation\nand options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including API plus the root path if specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }", - "type": "object", - "properties": { - "root": { - "description": "If non-empty specifies a path under which inherited HTTP paths\nare rooted.", - "type": "string" - }, - "name": { - "description": "The fully qualified name of the API which is included.", - "type": "string" - } - }, - "id": "Mixin" - }, - "Service": { - "description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", - "type": "object", - "properties": { - "id": { - "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead.", - "type": "string" - }, - "enums": { - "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum", - "type": "array", - "items": { - "$ref": "Enum" - } - }, - "usage": { - "description": "Configuration controlling usage of this service.", - "$ref": "Usage" - }, - "control": { - "description": "Configuration for the service control plane.", - "$ref": "Control" - }, - "title": { - "description": "The product title associated with this service.", - "type": "string" - }, - "http": { - "description": "HTTP configuration.", - "$ref": "Http" - }, - "systemTypes": { - "description": "A list of all proto message types included in this API service.\nIt serves similar purpose as [google.api.Service.types], except that\nthese types are not needed by user-defined APIs. Therefore, they will not\nshow up in the generated discovery doc. This field should only be used\nto define system APIs in ESF.", - "type": "array", - "items": { - "$ref": "Type" - } - }, - "configVersion": { - "description": "The version of the service configuration. The config version may\ninfluence interpretation of the configuration, for example, to\ndetermine defaults. This is documented together with applicable\noptions. The current default for the config version itself is `3`.", - "type": "integer", - "format": "uint32" - }, - "backend": { - "description": "API backend configuration.", - "$ref": "Backend" - }, - "monitoring": { - "description": "Monitoring configuration.", - "$ref": "Monitoring" - }, - "visibility": { - "description": "API visibility configuration.", - "$ref": "Visibility" - }, - "logging": { - "description": "Logging configuration.", - "$ref": "Logging" - }, - "customError": { - "description": "Custom error configuration.", - "$ref": "CustomError" - }, - "context": { - "description": "Context configuration.", - "$ref": "Context" - }, - "apis": { - "description": "A list of API interfaces exported by this service. Only the `name` field\nof the google.protobuf.Api needs to be provided by the configuration\nauthor, as the remaining fields will be derived from the IDL during the\nnormalization process. It is an error to specify an API interface here\nwhich cannot be resolved against the associated IDL files.", - "type": "array", - "items": { - "$ref": "Api" - } - }, - "metrics": { - "description": "Defines the metrics used by this service.", - "type": "array", - "items": { - "$ref": "MetricDescriptor" - } - }, - "systemParameters": { - "description": "System parameter configuration.", - "$ref": "SystemParameters" - }, - "endpoints": { - "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs.", - "type": "array", - "items": { - "$ref": "Endpoint" - } - }, - "name": { - "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`.", - "type": "string" - }, - "producerProjectId": { - "description": "The id of the Google developer project that owns the service.\nMembers of this project can manage the service configuration,\nmanage consumption of the service, etc.", - "type": "string" - }, - "documentation": { - "description": "Additional API documentation.", - "$ref": "Documentation" - }, - "monitoredResources": { - "description": "Defines the monitored resources used by this service. This is required\nby the Service.monitoring and Service.logging configurations.", - "type": "array", - "items": { - "$ref": "MonitoredResourceDescriptor" - } - }, - "types": { - "description": "A list of all proto message types included in this API service.\nTypes referenced directly or indirectly by the `apis` are\nautomatically included. Messages which are not referenced but\nshall be included, such as types used by the `google.protobuf.Any` type,\nshould be listed here by name. Example:\n\n types:\n - name: google.protobuf.Int32", - "type": "array", - "items": { - "$ref": "Type" - } - }, - "logs": { - "description": "Defines the logs used by this service.", - "type": "array", - "items": { - "$ref": "LogDescriptor" - } - }, - "authentication": { - "description": "Auth configuration.", - "$ref": "Authentication" - } - }, - "id": "Service" - }, - "SubmitConfigSourceResponse": { - "description": "Response message for SubmitConfigSource method.", - "type": "object", - "properties": { - "serviceConfig": { - "description": "The generated service configuration.", - "$ref": "Service" - } - }, - "id": "SubmitConfigSourceResponse" - }, - "Documentation": { - "description": "`Documentation` provides the information for describing a service.\n\nExample:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages;\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\u003c/code\u003e\u003c/pre\u003e\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n\u003cpre\u003e\u003ccode\u003e[fully.qualified.proto.name][]\u003c/code\u003e\u003c/pre\u003e\nTo override the display text used for the link, this can be used:\n\u003cpre\u003e\u003ccode\u003e[display text][fully.qualified.proto.name]\u003c/code\u003e\u003c/pre\u003e\nText can be excluded from doc using the following notation:\n\u003cpre\u003e\u003ccode\u003e(-- internal comment --)\u003c/code\u003e\u003c/pre\u003e\nComments can be made conditional using a visibility label. The below\ntext will be only rendered if the `BETA` label is available:\n\u003cpre\u003e\u003ccode\u003e(--BETA: comment for BETA users --)\u003c/code\u003e\u003c/pre\u003e\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n\u003cpre\u003e\u003ccode\u003e(== include path/to/file ==)\u003c/code\u003e\u003c/pre\u003e\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n\u003cpre\u003e\u003ccode\u003e(== resource_for v1.shelves.books ==)\u003c/code\u003e\u003c/pre\u003e\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation.", - "type": "object", - "properties": { - "overview": { - "description": "Declares a single overview page. For example:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n overview: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nThis is a shortcut for the following declaration (using pages style):\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n pages:\n - name: Overview\n content: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nNote: you cannot specify both `overview` field and `pages` field.", - "type": "string" - }, - "documentationRootUrl": { - "description": "The URL to the root of documentation.", - "type": "string" - }, - "pages": { - "description": "The top level pages for the documentation set.", - "type": "array", - "items": { - "$ref": "Page" - } - }, - "summary": { - "description": "A short summary of what the service does. Can only be provided by\nplain text.", - "type": "string" - }, - "rules": { - "description": "A list of documentation rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "type": "array", - "items": { - "$ref": "DocumentationRule" - } - } - }, - "id": "Documentation" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "auditConfigs": { - "description": "Specifies audit logging configs for \"data access\".\n\"data access\": generally refers to data reads/writes and admin reads.\n\"admin activity\": generally refers to admin writes.\n\nNote: `AuditConfig` doesn't apply to \"admin activity\", which always\nenables audit logging.", - "type": "array", - "items": { - "$ref": "AuditConfig" - } - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", - "type": "array", - "items": { - "$ref": "Rule" - } - }, - "bindings": { - "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", - "type": "array", - "items": { - "$ref": "Binding" - } - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string", - "format": "byte" - }, - "iamOwned": { - "type": "boolean" - }, - "version": { - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer", - "format": "int32" - } - }, - "id": "Policy" - }, - "OAuthRequirements": { - "description": "OAuth scopes are a way to define data and permissions on data. For example,\nthere are scopes defined for \"Read-only access to Google Calendar\" and\n\"Access to Cloud Platform\". Users can consent to a scope for an application,\ngiving it permission to access that data on their behalf.\n\nOAuth scope specifications should be fairly coarse grained; a user will need\nto see and understand the text description of what your scope means.\n\nIn most cases: use one or at most two OAuth scopes for an entire family of\nproducts. If your product has multiple APIs, you should probably be sharing\nthe OAuth scope across all of those APIs.\n\nWhen you need finer grained OAuth consent screens: talk with your product\nmanagement about how developers will use them in practice.\n\nPlease note that even though each of the canonical scopes is enough for a\nrequest to be accepted and passed to the backend, a request can still fail\ndue to the backend requiring additional scopes or permissions.", - "type": "object", - "properties": { - "canonicalScopes": { - "description": "The list of publicly documented OAuth scopes that are allowed access. An\nOAuth token containing any of these scopes will be accepted.\n\nExample:\n\n canonical_scopes: https://www.googleapis.com/auth/calendar,\n https://www.googleapis.com/auth/calendar.read", - "type": "string" - } - }, - "id": "OAuthRequirements" - }, - "ListServicesResponse": { - "description": "Response message for `ListServices` method.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Token that can be passed to `ListServices` to resume a paginated query.", - "type": "string" - }, - "services": { - "description": "The returned services will only have the name field set.", - "type": "array", - "items": { - "$ref": "ManagedService" - } - } - }, - "id": "ListServicesResponse" - }, - "Step": { - "description": "Represents the status of one operation step.", - "type": "object", - "properties": { - "description": { - "description": "The short description of the step.", - "type": "string" - }, - "status": { - "description": "The status code.", - "enum": [ - "STATUS_UNSPECIFIED", - "DONE", - "NOT_STARTED", - "IN_PROGRESS", - "FAILED", - "CANCELLED" - ], - "enumDescriptions": [ - "Unspecifed code.", - "The step has completed without errors.", - "The step has not started yet.", - "The step is in progress.", - "The step has completed with errors.", - "The step has completed with cancellation." - ], - "type": "string" - } - }, - "id": "Step" - }, "Context": { "description": "`Context` defines which contexts an API requests.\n\nExample:\n\n context:\n rules:\n - selector: \"*\"\n requested:\n - google.rpc.context.ProjectContext\n - google.rpc.context.OriginContext\n\nThe above specifies that all methods in the API request\n`google.rpc.context.ProjectContext` and\n`google.rpc.context.OriginContext`.\n\nAvailable context types are defined in package\n`google.rpc.context`.", "type": "object", @@ -1092,26 +876,328 @@ }, "id": "Context" }, - "Monitoring": { - "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count", + "Rule": { + "description": "A rule to be applied in a Policy.", "type": "object", "properties": { - "producerDestinations": { - "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination.", + "notIn": { "type": "array", "items": { - "$ref": "MonitoringDestination" + "type": "string" + }, + "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto)." + }, + "description": { + "description": "Human-readable description of the rule.", + "type": "string" + }, + "conditions": { + "description": "Additional restrictions that must be met", + "type": "array", + "items": { + "$ref": "Condition" } }, - "consumerDestinations": { - "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination.", + "logConfig": { "type": "array", "items": { - "$ref": "MonitoringDestination" + "$ref": "LogConfig" + }, + "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action." + }, + "in": { + "description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", + "type": "array", + "items": { + "type": "string" + } + }, + "permissions": { + "description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", + "type": "array", + "items": { + "type": "string" + } + }, + "action": { + "enumDescriptions": [ + "Default no action.", + "Matching 'Entries' grant access.", + "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", + "Matching 'Entries' deny access.", + "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", + "Matching 'Entries' tell IAM.Check callers to generate logs." + ], + "enum": [ + "NO_ACTION", + "ALLOW", + "ALLOW_WITH_LOG", + "DENY", + "DENY_WITH_LOG", + "LOG" + ], + "description": "Required", + "type": "string" + } + }, + "id": "Rule" + }, + "LogConfig": { + "description": "Specifies what kind of log the caller must write", + "type": "object", + "properties": { + "dataAccess": { + "description": "Data access options.", + "$ref": "DataAccessOptions" + }, + "cloudAudit": { + "description": "Cloud audit options.", + "$ref": "CloudAuditOptions" + }, + "counter": { + "description": "Counter options.", + "$ref": "CounterOptions" + } + }, + "id": "LogConfig" + }, + "LogDescriptor": { + "description": "A description of a log type. Example in YAML format:\n\n - name: library.googleapis.com/activity_history\n description: The history of borrowing and returning library items.\n display_name: Activity\n labels:\n - key: /customer_id\n description: Identifier of a library customer", + "type": "object", + "properties": { + "labels": { + "description": "The set of labels that are available to describe a specific log entry.\nRuntime requests that contain labels not specified here are\nconsidered invalid.", + "type": "array", + "items": { + "$ref": "LabelDescriptor" + } + }, + "name": { + "description": "The name of the log. It must be less than 512 characters long and can\ninclude the following characters: upper- and lower-case alphanumeric\ncharacters [A-Za-z0-9], and punctuation characters including\nslash, underscore, hyphen, period [/_-.].", + "type": "string" + }, + "description": { + "description": "A human-readable description of this log. This information appears in\nthe documentation and can contain details.", + "type": "string" + }, + "displayName": { + "type": "string", + "description": "The human-readable name for this log. This information appears on\nthe user interface and should be concise." + } + }, + "id": "LogDescriptor" + }, + "ConfigFile": { + "description": "Generic specification of a source configuration file", + "type": "object", + "properties": { + "fileContents": { + "description": "The bytes that constitute the file.", + "format": "byte", + "type": "string" + }, + "filePath": { + "description": "The file name of the configuration file (full or relative path).", + "type": "string" + }, + "fileType": { + "enum": [ + "FILE_TYPE_UNSPECIFIED", + "SERVICE_CONFIG_YAML", + "OPEN_API_JSON", + "OPEN_API_YAML", + "FILE_DESCRIPTOR_SET_PROTO" + ], + "description": "The type of configuration file this represents.", + "type": "string", + "enumDescriptions": [ + "Unknown file type.", + "YAML-specification of service.", + "OpenAPI specification, serialized in JSON.", + "OpenAPI specification, serialized in YAML.", + "FileDescriptorSet, generated by protoc.\n\nTo generate, use protoc with imports and source info included.\nFor an example test.proto file, the following command would put the value\nin a new file named out.pb.\n\n$protoc --include_imports --include_source_info test.proto -o out.pb" + ] + } + }, + "id": "ConfigFile" + }, + "CustomErrorRule": { + "description": "A custom error rule.", + "type": "object", + "properties": { + "isErrorType": { + "description": "Mark this message as possible payload in error response. Otherwise,\nobjects of this type will be filtered when they appear in error payload.", + "type": "boolean" + }, + "selector": { + "description": "Selects messages to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + } + }, + "id": "CustomErrorRule" + }, + "MonitoredResourceDescriptor": { + "description": "An object that describes the schema of a MonitoredResource object using a\ntype name and a set of labels. For example, the monitored resource\ndescriptor for Google Compute Engine VM instances has a type of\n`\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and\n`\"zone\"` to identify particular VM instances.\n\nDifferent APIs can support different monitored resource types. APIs generally\nprovide a `list` method that returns the monitored resource descriptors used\nby the API.", + "type": "object", + "properties": { + "labels": { + "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified by values for the labels `\"database_id\"` and `\"zone\"`.", + "type": "array", + "items": { + "$ref": "LabelDescriptor" + } + }, + "name": { + "description": "Optional. The resource name of the monitored resource descriptor:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`.", + "type": "string" + }, + "displayName": { + "description": "Optional. A concise name for the monitored resource type that might be\ndisplayed in user interfaces. It should be a Title Cased Noun Phrase,\nwithout any article or other determiners. For example,\n`\"Google Cloud SQL Database\"`.", + "type": "string" + }, + "description": { + "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation.", + "type": "string" + }, + "type": { + "description": "Required. The monitored resource type. For example, the type\n`\"cloudsql_database\"` represents databases in Google Cloud SQL.\nThe maximum length of this value is 256 characters.", + "type": "string" + } + }, + "id": "MonitoredResourceDescriptor" + }, + "CustomAuthRequirements": { + "properties": { + "provider": { + "description": "A configuration string containing connection information for the\nauthentication provider, typically formatted as a SmartService string\n(go/smartservice).", + "type": "string" + } + }, + "id": "CustomAuthRequirements", + "description": "Configuration for a custom authentication provider.", + "type": "object" + }, + "MediaDownload": { + "properties": { + "completeNotification": { + "description": "A boolean that determines whether a notification for the completion of a\ndownload should be sent to the backend.", + "type": "boolean" + }, + "enabled": { + "description": "Whether download is enabled.", + "type": "boolean" + }, + "downloadService": { + "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the download service if one is used for download.", + "type": "string" + }, + "maxDirectDownloadSize": { + "description": "Optional maximum acceptable size for direct download.\nThe size is specified in bytes.", + "format": "int64", + "type": "string" + }, + "dropzone": { + "description": "Name of the Scotty dropzone to use for the current API.", + "type": "string" + }, + "useDirectDownload": { + "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", + "type": "boolean" + } + }, + "id": "MediaDownload", + "description": "Defines the Media configuration for a service in case of a download.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", + "type": "object" + }, + "ChangeReport": { + "type": "object", + "properties": { + "configChanges": { + "description": "List of changes between two service configurations.\nThe changes will be alphabetically sorted based on the identifier\nof each change.\nA ConfigChange identifier is a dot separated path to the configuration.\nExample: visibility.rules[selector='LibraryService.CreateBook'].restriction", + "type": "array", + "items": { + "$ref": "ConfigChange" } } }, - "id": "Monitoring" + "id": "ChangeReport", + "description": "Change report associated with a particular service configuration.\n\nIt contains a list of ConfigChanges based on the comparison between\ntwo service configurations." + }, + "DisableServiceRequest": { + "description": "Request message for DisableService method.", + "type": "object", + "properties": { + "consumerId": { + "type": "string", + "description": "The identity of consumer resource which service disablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id." + } + }, + "id": "DisableServiceRequest" + }, + "SubmitConfigSourceResponse": { + "id": "SubmitConfigSourceResponse", + "description": "Response message for SubmitConfigSource method.", + "type": "object", + "properties": { + "serviceConfig": { + "$ref": "Service", + "description": "The generated service configuration." + } + } + }, + "MediaUpload": { + "description": "Defines the Media configuration for a service in case of an upload.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", + "type": "object", + "properties": { + "mimeTypes": { + "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns.", + "type": "array", + "items": { + "type": "string" + } + }, + "maxSize": { + "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes.", + "format": "int64", + "type": "string" + }, + "completeNotification": { + "description": "A boolean that determines whether a notification for the completion of an\nupload should be sent to the backend. These notifications will not be seen\nby the client and will not consume quota.", + "type": "boolean" + }, + "progressNotification": { + "description": "Whether to receive a notification for progress changes of media upload.", + "type": "boolean" + }, + "enabled": { + "description": "Whether upload is enabled.", + "type": "boolean" + }, + "dropzone": { + "description": "Name of the Scotty dropzone to use for the current API.", + "type": "string" + }, + "startNotification": { + "type": "boolean", + "description": "Whether to receive a notification on the start of media upload." + }, + "uploadService": { + "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the upload service if one is used for upload.", + "type": "string" + } + }, + "id": "MediaUpload" + }, + "Advice": { + "description": "Generated advice about this change, used for providing more\ninformation about how a change will affect the existing service.", + "type": "object", + "properties": { + "description": { + "description": "Useful description for why this advice was applied and what actions should\nbe taken to mitigate any implied risks.", + "type": "string" + } + }, + "id": "Advice" }, "ManagedService": { "description": "The full representation of a Service that is managed by\nGoogle Service Management.", @@ -1128,119 +1214,393 @@ }, "id": "ManagedService" }, - "ConfigFile": { - "description": "Generic specification of a source configuration file", - "type": "object", + "UsageRule": { "properties": { - "filePath": { - "description": "The file name of the configuration file (full or relative path).", + "selector": { + "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", "type": "string" }, - "fileType": { - "description": "The type of configuration file this represents.", - "enum": [ - "FILE_TYPE_UNSPECIFIED", - "SERVICE_CONFIG_YAML", - "OPEN_API_JSON", - "OPEN_API_YAML", - "FILE_DESCRIPTOR_SET_PROTO" - ], - "enumDescriptions": [ - "Unknown file type.", - "YAML-specification of service.", - "OpenAPI specification, serialized in JSON.", - "OpenAPI specification, serialized in YAML.", - "FileDescriptorSet, generated by protoc.\n\nTo generate, use protoc with imports and source info included.\nFor an example test.proto file, the following command would put the value\nin a new file named out.pb.\n\n$protoc --include_imports --include_source_info test.proto -o out.pb" - ], - "type": "string" - }, - "fileContents": { - "description": "The bytes that constitute the file.", - "type": "string", - "format": "byte" + "allowUnregisteredCalls": { + "description": "True, if the method allows unregistered calls; false otherwise.", + "type": "boolean" } }, - "id": "ConfigFile" + "id": "UsageRule", + "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true", + "type": "object" }, - "ListServiceConfigsResponse": { - "description": "Response message for ListServiceConfigs method.", + "AuthRequirement": { + "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", "type": "object", "properties": { - "nextPageToken": { - "description": "The token of the next page of results.", - "type": "string" + "audiences": { + "type": "string", + "description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is\nimplemented and accepted in all the runtime components.\n\nThe list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com" }, - "serviceConfigs": { - "description": "The list of service configuration resources.", - "type": "array", - "items": { - "$ref": "Service" - } + "providerId": { + "description": "id from authentication provider.\n\nExample:\n\n provider_id: bookstore_auth", + "type": "string" } }, - "id": "ListServiceConfigsResponse" + "id": "AuthRequirement" }, "TrafficPercentStrategy": { "description": "Strategy that specifies how Google Service Control should select\ndifferent\nversions of service configurations based on traffic percentage.\n\nOne example of how to gradually rollout a new service configuration using\nthis\nstrategy:\nDay 1\n\n Rollout {\n id: \"example.googleapis.com/rollout_20160206\"\n traffic_percent_strategy {\n percentages: {\n \"example.googleapis.com/20160201\": 70.00\n \"example.googleapis.com/20160206\": 30.00\n }\n }\n }\n\nDay 2\n\n Rollout {\n id: \"example.googleapis.com/rollout_20160207\"\n traffic_percent_strategy: {\n percentages: {\n \"example.googleapis.com/20160206\": 100.00\n }\n }\n }", "type": "object", "properties": { "percentages": { - "description": "Maps service configuration IDs to their corresponding traffic percentage.\nKey is the service configuration ID, Value is the traffic percentage\nwhich must be greater than 0.0 and the sum must equal to 100.0.", "additionalProperties": { - "type": "number", - "format": "double" + "format": "double", + "type": "number" }, + "description": "Maps service configuration IDs to their corresponding traffic percentage.\nKey is the service configuration ID, Value is the traffic percentage\nwhich must be greater than 0.0 and the sum must equal to 100.0.", "type": "object" } }, "id": "TrafficPercentStrategy" }, - "GenerateConfigReportRequest": { - "description": "Request message for GenerateConfigReport method.", + "Documentation": { + "id": "Documentation", + "description": "`Documentation` provides the information for describing a service.\n\nExample:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages;\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\u003c/code\u003e\u003c/pre\u003e\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n\u003cpre\u003e\u003ccode\u003e[fully.qualified.proto.name][]\u003c/code\u003e\u003c/pre\u003e\nTo override the display text used for the link, this can be used:\n\u003cpre\u003e\u003ccode\u003e[display text][fully.qualified.proto.name]\u003c/code\u003e\u003c/pre\u003e\nText can be excluded from doc using the following notation:\n\u003cpre\u003e\u003ccode\u003e(-- internal comment --)\u003c/code\u003e\u003c/pre\u003e\nComments can be made conditional using a visibility label. The below\ntext will be only rendered if the `BETA` label is available:\n\u003cpre\u003e\u003ccode\u003e(--BETA: comment for BETA users --)\u003c/code\u003e\u003c/pre\u003e\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n\u003cpre\u003e\u003ccode\u003e(== include path/to/file ==)\u003c/code\u003e\u003c/pre\u003e\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n\u003cpre\u003e\u003ccode\u003e(== resource_for v1.shelves.books ==)\u003c/code\u003e\u003c/pre\u003e\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation.", "type": "object", "properties": { - "oldConfig": { - "description": "Service configuration against which the comparison will be done.\nFor this version of API, the supported types are\ngoogle.api.servicemanagement.v1.ConfigRef,\ngoogle.api.servicemanagement.v1.ConfigSource,\nand google.api.Service", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "newConfig": { - "description": "Service configuration for which we want to generate the report.\nFor this version of API, the supported types are\ngoogle.api.servicemanagement.v1.ConfigRef,\ngoogle.api.servicemanagement.v1.ConfigSource,\nand google.api.Service", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - } - }, - "id": "GenerateConfigReportRequest" - }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", - "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" - }, - "LoggingDestination": { - "description": "Configuration of a specific logging destination (the producer project\nor the consumer project).", - "type": "object", - "properties": { - "monitoredResource": { - "description": "The monitored resource type. The type must be defined in the\nService.monitored_resources section.", + "summary": { + "description": "A short summary of what the service does. Can only be provided by\nplain text.", "type": "string" }, - "logs": { - "description": "Names of the logs to be sent to this destination. Each name must\nbe defined in the Service.logs section. If the log name is\nnot a domain scoped name, it will be automatically prefixed with\nthe service name followed by \"/\".", + "documentationRootUrl": { + "description": "The URL to the root of documentation.", + "type": "string" + }, + "rules": { + "description": "A list of documentation rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "type": "array", + "items": { + "$ref": "DocumentationRule" + } + }, + "overview": { + "description": "Declares a single overview page. For example:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n overview: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nThis is a shortcut for the following declaration (using pages style):\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n pages:\n - name: Overview\n content: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nNote: you cannot specify both `overview` field and `pages` field.", + "type": "string" + }, + "pages": { + "description": "The top level pages for the documentation set.", + "type": "array", + "items": { + "$ref": "Page" + } + } + } + }, + "Condition": { + "description": "A condition to be met.", + "type": "object", + "properties": { + "svc": { + "description": "Trusted attributes discharged by the service.", + "type": "string" + }, + "sys": { + "enumDescriptions": [ + "Default non-attribute type", + "Region of the resource", + "Service name", + "Resource name", + "IP address of the caller" + ], + "enum": [ + "NO_ATTR", + "REGION", + "SERVICE", + "NAME", + "IP" + ], + "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", + "type": "string" + }, + "value": { + "description": "DEPRECATED. Use 'values' instead.", + "type": "string" + }, + "values": { + "description": "The objects of the condition. This is mutually exclusive with 'value'.", "type": "array", "items": { "type": "string" } + }, + "iam": { + "description": "Trusted attributes supplied by the IAM system.", + "type": "string", + "enumDescriptions": [ + "Default non-attribute.", + "Either principal or (if present) authority selector.", + "The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization.", + "An approver (distinct from the requester) that has authorized this\nrequest.\nWhen used with IN, the condition indicates that one of the approvers\nassociated with the request matches the specified principal, or is a\nmember of the specified group. Approvers can only grant additional\naccess, and are thus only used in a strictly positive context\n(e.g. ALLOW/IN or DENY/NOT_IN).\nSee: go/rpc-security-policy-dynamicauth.", + "What types of justifications have been supplied with this request.\nString values should match enum names from tech.iam.JustificationType,\ne.g. \"MANUAL_STRING\". It is not permitted to grant access based on\nthe *absence* of a justification, so justification conditions can only\nbe used in a \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).\n\nMultiple justifications, e.g., a Buganizer ID and a manually-entered\nreason, are normal and supported." + ], + "enum": [ + "NO_ATTR", + "AUTHORITY", + "ATTRIBUTION", + "APPROVER", + "JUSTIFICATION_TYPE" + ] + }, + "op": { + "enumDescriptions": [ + "Default no-op.", + "DEPRECATED. Use IN instead.", + "DEPRECATED. Use NOT_IN instead.", + "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", + "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", + "Subject is discharged" + ], + "enum": [ + "NO_OP", + "EQUALS", + "NOT_EQUALS", + "IN", + "NOT_IN", + "DISCHARGED" + ], + "description": "An operator to apply the subject with.", + "type": "string" } }, - "id": "LoggingDestination" + "id": "Condition" + }, + "AuditLogConfig": { + "type": "object", + "properties": { + "logType": { + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "description": "The log type that this config enables.", + "type": "string" + }, + "exemptedMembers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members." + } + }, + "id": "AuditLogConfig", + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging." + }, + "ConfigSource": { + "id": "ConfigSource", + "description": "Represents a source file which is used to generate the service configuration\ndefined by `google.api.Service`.", + "type": "object", + "properties": { + "id": { + "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead.", + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "ConfigFile" + }, + "description": "Set of source configuration files that are used to generate a service\nconfiguration (`google.api.Service`)." + } + } + }, + "BackendRule": { + "description": "A backend rule provides configuration for an individual API element.", + "type": "object", + "properties": { + "minDeadline": { + "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", + "format": "double", + "type": "number" + }, + "address": { + "description": "The address of the API backend.", + "type": "string" + }, + "selector": { + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "deadline": { + "description": "The number of seconds to wait for a response from a request. The\ndefault depends on the deployment context.", + "format": "double", + "type": "number" + } + }, + "id": "BackendRule" + }, + "AuthenticationRule": { + "description": "Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored.", + "type": "object", + "properties": { + "requirements": { + "description": "Requirements for additional authentication providers.", + "type": "array", + "items": { + "$ref": "AuthRequirement" + } + }, + "selector": { + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "allowWithoutCredential": { + "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject.", + "type": "boolean" + }, + "oauth": { + "$ref": "OAuthRequirements", + "description": "The requirements for OAuth credentials." + }, + "customAuth": { + "$ref": "CustomAuthRequirements", + "description": "Configuration for custom authentication." + } + }, + "id": "AuthenticationRule" + }, + "UndeleteServiceResponse": { + "description": "Response message for UndeleteService method.", + "type": "object", + "properties": { + "service": { + "$ref": "ManagedService", + "description": "Revived service resource." + } + }, + "id": "UndeleteServiceResponse" + }, + "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "iamOwned": { + "type": "boolean" + }, + "rules": { + "type": "array", + "items": { + "$ref": "Rule" + }, + "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied." + }, + "version": { + "description": "Version of the `Policy`. The default version is 0.", + "format": "int32", + "type": "integer" + }, + "auditConfigs": { + "type": "array", + "items": { + "$ref": "AuditConfig" + }, + "description": "Specifies cloud audit logging configuration for this policy." + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\nMultiple `bindings` must not be specified for the same `role`.\n`bindings` with no members will result in an error.", + "type": "array", + "items": { + "$ref": "Binding" + } + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "format": "byte", + "type": "string" + } + }, + "id": "Policy" + }, + "Api": { + "description": "Api is a light-weight descriptor for a protocol buffer service.", + "type": "object", + "properties": { + "methods": { + "type": "array", + "items": { + "$ref": "Method" + }, + "description": "The methods of this api, in unspecified order." + }, + "name": { + "description": "The fully qualified name of this api, including package name\nfollowed by the api's simple name.", + "type": "string" + }, + "sourceContext": { + "$ref": "SourceContext", + "description": "Source context for the protocol buffer service represented by this\nmessage." + }, + "syntax": { + "description": "The source syntax of the service.", + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ], + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ] + }, + "version": { + "description": "A version string for this api. If specified, must have the form\n`major-version.minor-version`, as in `1.10`. If the minor version\nis omitted, it defaults to zero. If the entire version field is\nempty, the major version is derived from the package name, as\noutlined below. If the field is not empty, the version in the\npackage name will be verified to be consistent with what is\nprovided here.\n\nThe versioning schema uses [semantic\nversioning](http://semver.org) where the major version number\nindicates a breaking change and the minor version an additive,\nnon-breaking change. Both version numbers are signals to users\nwhat to expect from different versions, and should be carefully\nchosen based on the product plan.\n\nThe major version is also reflected in the package name of the\nAPI, which must end in `v\u003cmajor-version\u003e`, as in\n`google.feature.v1`. For major versions 0 and 1, the suffix can\nbe omitted. Zero major versions must only be used for\nexperimental, none-GA apis.\n", + "type": "string" + }, + "mixins": { + "description": "Included APIs. See Mixin.", + "type": "array", + "items": { + "$ref": "Mixin" + } + }, + "options": { + "description": "Any metadata attached to the API.", + "type": "array", + "items": { + "$ref": "Option" + } + } + }, + "id": "Api" + }, + "DataAccessOptions": { + "description": "Write a Data Access (Gin) log", + "type": "object", + "properties": {}, + "id": "DataAccessOptions" + }, + "MetricRule": { + "description": "Bind API methods to metrics. Binding a method to a metric causes that\nmetric's configured quota, billing, and monitoring behaviors to apply to the\nmethod call.\n\nUsed by metric-based quotas only.", + "type": "object", + "properties": { + "selector": { + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "metricCosts": { + "additionalProperties": { + "type": "string", + "format": "int64" + }, + "description": "Metrics to update when the selected methods are called, and the associated\ncost applied to each metric.\n\nThe key of the map is the metric name, and the values are the amount\nincreased for the metric against which the quota limits are defined.\nThe value must not be negative.", + "type": "object" + } + }, + "id": "MetricRule" }, "Authentication": { "description": "`Authentication` defines the authentication configuration for an API.\n\nExample for an API targeted for external use:\n\n name: calendar.googleapis.com\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", @@ -1263,939 +1623,329 @@ }, "id": "Authentication" }, - "Type": { - "description": "A protocol buffer message type.", - "type": "object", - "properties": { - "oneofs": { - "description": "The list of types appearing in `oneof` definitions in this type.", - "type": "array", - "items": { - "type": "string" - } - }, - "options": { - "description": "The protocol buffer options.", - "type": "array", - "items": { - "$ref": "Option" - } - }, - "sourceContext": { - "description": "The source context.", - "$ref": "SourceContext" - }, - "fields": { - "description": "The list of fields.", - "type": "array", - "items": { - "$ref": "Field" - } - }, - "name": { - "description": "The fully qualified message name.", - "type": "string" - }, - "syntax": { - "description": "The source syntax.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "type": "string" - } - }, - "id": "Type" - }, - "Backend": { - "description": "`Backend` defines the backend configuration for a service.", - "type": "object", - "properties": { - "rules": { - "description": "A list of API backend rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "type": "array", - "items": { - "$ref": "BackendRule" - } - } - }, - "id": "Backend" - }, - "AuditConfig": { - "description": "Provides the configuration for non-admin_activity logging for a service.\nControls exemptions and specific log sub-types.", - "type": "object", - "properties": { - "service": { - "description": "Specifies a service that will be enabled for audit logging.\nFor example, `resourcemanager`, `storage`, `compute`.\n`allServices` is a special value that covers all services.", - "type": "string" - }, - "auditLogConfigs": { - "description": "The configuration for each type of logging\nNext ID: 4", - "type": "array", - "items": { - "$ref": "AuditLogConfig" - } - }, - "exemptedMembers": { - "description": "Specifies the identities that are exempted from \"data access\" audit\nlogging for the `service` specified above.\nFollows the same format of Binding.members.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "AuditConfig" - }, - "ListServiceRolloutsResponse": { - "description": "Response message for ListServiceRollouts method.", - "type": "object", - "properties": { - "rollouts": { - "description": "The list of rollout resources.", - "type": "array", - "items": { - "$ref": "Rollout" - } - }, - "nextPageToken": { - "description": "The token of the next page of results.", - "type": "string" - } - }, - "id": "ListServiceRolloutsResponse" - }, - "Rollout": { - "description": "A rollout resource that defines how service configuration versions are pushed\nto control plane systems. Typically, you create a new version of the\nservice config, and then create a Rollout to push the service config.", - "type": "object", - "properties": { - "createdBy": { - "description": "The user who created the Rollout. Readonly.", - "type": "string" - }, - "trafficPercentStrategy": { - "description": "Google Service Control selects service configurations based on\ntraffic percentage.", - "$ref": "TrafficPercentStrategy" - }, - "status": { - "description": "The status of this rollout. Readonly. In case of a failed rollout,\nthe system will automatically rollback to the current Rollout\nversion. Readonly.", - "enum": [ - "ROLLOUT_STATUS_UNSPECIFIED", - "IN_PROGRESS", - "SUCCESS", - "CANCELLED", - "FAILED", - "PENDING" - ], - "enumDescriptions": [ - "No status specified.", - "The Rollout is in progress.", - "The Rollout has completed successfully.", - "The Rollout has been cancelled. This can happen if you have overlapping\nRollout pushes, and the previous ones will be cancelled.", - "The Rollout has failed. It is typically caused by configuration errors.", - "The Rollout has not started yet and is pending for execution." - ], - "type": "string" - }, - "deleteServiceStrategy": { - "description": "The strategy associated with a rollout to delete a `ManagedService`.\nReadonly.", - "$ref": "DeleteServiceStrategy" - }, - "createTime": { - "description": "Creation time of the rollout. Readonly.", - "type": "string", - "format": "google-datetime" - }, - "serviceName": { - "description": "The name of the service associated with this Rollout.", - "type": "string" - }, - "rolloutId": { - "description": "Optional unique identifier of this Rollout. Only lower case letters, digits\n and '-' are allowed.\n\nIf not specified by client, the server will generate one. The generated id\nwill have the form of \u003cdate\u003e\u003crevision number\u003e, where \"date\" is the create\ndate in ISO 8601 format. \"revision number\" is a monotonically increasing\npositive number that is reset every day for each service.\nAn example of the generated rollout_id is '2016-02-16r1'", - "type": "string" - } - }, - "id": "Rollout" - }, - "ConfigSource": { - "description": "Represents a source file which is used to generate the service configuration\ndefined by `google.api.Service`.", - "type": "object", - "properties": { - "files": { - "description": "Set of source configuration files that are used to generate a service\nconfiguration (`google.api.Service`).", - "type": "array", - "items": { - "$ref": "ConfigFile" - } - }, - "id": { - "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead.", - "type": "string" - } - }, - "id": "ConfigSource" - }, - "Method": { - "description": "Method represents a method of an api.", - "type": "object", - "properties": { - "requestStreaming": { - "description": "If true, the request is streamed.", - "type": "boolean" - }, - "options": { - "description": "Any metadata attached to the method.", - "type": "array", - "items": { - "$ref": "Option" - } - }, - "requestTypeUrl": { - "description": "A URL of the input message type.", - "type": "string" - }, - "name": { - "description": "The simple name of this method.", - "type": "string" - }, - "syntax": { - "description": "The source syntax of this method.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "type": "string" - }, - "responseTypeUrl": { - "description": "The URL of the output message type.", - "type": "string" - }, - "responseStreaming": { - "description": "If true, the response is streamed.", - "type": "boolean" - } - }, - "id": "Method" - }, "Operation": { "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, "done": { "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, "response": { "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "type": "object" + } }, "name": { "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" } }, "id": "Operation" }, - "Rule": { - "description": "A rule to be applied in a Policy.", - "type": "object", - "properties": { - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "in": { - "description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", - "type": "array", - "items": { - "type": "string" - } - }, - "action": { - "description": "Required", - "enum": [ - "NO_ACTION", - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG" - ], - "enumDescriptions": [ - "Default no action.", - "Matching 'Entries' grant access.", - "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' deny access.", - "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' tell IAM.Check callers to generate logs." - ], - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "type": "array", - "items": { - "$ref": "Condition" - } - }, - "notIn": { - "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", - "type": "array", - "items": { - "type": "string" - } - }, - "logConfig": { - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action.", - "type": "array", - "items": { - "$ref": "LogConfig" - } - }, - "permissions": { - "description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "Rule" - }, - "MetricDescriptor": { - "description": "Defines a metric type and its schema. Once a metric descriptor is created,\ndeleting or altering it stops data collection and makes the metric type's\nexisting data unusable.", - "type": "object", - "properties": { - "description": { - "description": "A detailed description of the metric, which can be used in documentation.", - "type": "string" - }, - "unit": { - "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", - "type": "string" - }, - "labels": { - "description": "The set of labels that can be used to describe a specific\ninstance of this metric type. For example, the\n`appengine.googleapis.com/http/server/response_latencies` metric\ntype has a label for the HTTP response code, `response_code`, so\nyou can look at latencies for successful responses or just\nfor responses that failed.", - "type": "array", - "items": { - "$ref": "LabelDescriptor" - } - }, - "metricKind": { - "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ], - "enumDescriptions": [ - "Do not use this default value.", - "An instantaneous measurement of a value.", - "The change in a value during a time interval.", - "A value accumulated over a time interval. Cumulative\nmeasurements in a time series should have the same start time\nand increasing end times, until an event resets the cumulative\nvalue to zero and sets a new start time for the following\npoints." - ], - "type": "string" - }, - "valueType": { - "description": "Whether the measurement is an integer, a floating-point number, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The value is a boolean.\nThis value type can be used only if the metric kind is `GAUGE`.", - "The value is a signed 64-bit integer.", - "The value is a double precision floating point number.", - "The value is a text string.\nThis value type can be used only if the metric kind is `GAUGE`.", - "The value is a `Distribution`.", - "The value is money." - ], - "type": "string" - }, - "displayName": { - "description": "A concise name for the metric, which can be displayed in user interfaces.\nUse sentence case without an ending period, for example \"Request count\".", - "type": "string" - }, - "name": { - "description": "The resource name of the metric descriptor. Depending on the\nimplementation, the name typically includes: (1) the parent resource name\nthat defines the scope of the metric type or of its data; and (2) the\nmetric's URL-encoded type, which also appears in the `type` field of this\ndescriptor. For example, following is the resource name of a custom\nmetric within the GCP project 123456789:\n\n \"projects/123456789/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"", - "type": "string" - }, - "type": { - "description": "The metric type, including its DNS name prefix. The type is not\nURL-encoded. All user-defined metric types have the DNS name\n`custom.googleapis.com`. Metric types should use a natural hierarchical\ngrouping. For example:\n\n \"custom.googleapis.com/invoice/paid/amount\"\n \"appengine.googleapis.com/http/server/response_latencies\"", - "type": "string" - } - }, - "id": "MetricDescriptor" - }, - "EnableServiceRequest": { - "description": "Request message for EnableService method.", - "type": "object", - "properties": { - "consumerId": { - "description": "The identity of consumer resource which service enablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id.", - "type": "string" - } - }, - "id": "EnableServiceRequest" - }, - "DocumentationRule": { - "description": "A documentation rule provides information about individual API elements.", - "type": "object", - "properties": { - "description": { - "description": "Description of the selected API(s).", - "type": "string" - }, - "deprecationDescription": { - "description": "Deprecation description of the selected element(s). It can be provided if an\nelement is marked as `deprecated`.", - "type": "string" - }, - "selector": { - "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used.", - "type": "string" - } - }, - "id": "DocumentationRule" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "policy": { - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", - "$ref": "Policy" - } - }, - "id": "SetIamPolicyRequest" - }, - "CounterOptions": { - "description": "Options for counters", - "type": "object", - "properties": { - "metric": { - "description": "The metric to update.", - "type": "string" - }, - "field": { - "description": "The field value to attribute.", - "type": "string" - } - }, - "id": "CounterOptions" - }, - "Condition": { - "description": "A condition to be met.", - "type": "object", - "properties": { - "sys": { - "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", - "enum": [ - "NO_ATTR", - "REGION", - "SERVICE", - "NAME", - "IP" - ], - "enumDescriptions": [ - "Default non-attribute type", - "Region of the resource", - "Service name", - "Resource name", - "IP address of the caller" - ], - "type": "string" - }, - "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "type": "array", - "items": { - "type": "string" - } - }, - "iam": { - "description": "Trusted attributes supplied by the IAM system.", - "enum": [ - "NO_ATTR", - "AUTHORITY", - "ATTRIBUTION" - ], - "enumDescriptions": [ - "Default non-attribute.", - "Either principal or (if present) authority selector.", - "The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization." - ], - "type": "string" - }, - "op": { - "description": "An operator to apply the subject with.", - "enum": [ - "NO_OP", - "EQUALS", - "NOT_EQUALS", - "IN", - "NOT_IN", - "DISCHARGED" - ], - "enumDescriptions": [ - "Default no-op.", - "DEPRECATED. Use IN instead.", - "DEPRECATED. Use NOT_IN instead.", - "Set-inclusion check.", - "Set-exclusion check.", - "Subject is discharged" - ], - "type": "string" - }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" - }, - "svc": { - "description": "Trusted attributes discharged by the service.", - "type": "string" - } - }, - "id": "Condition" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - } - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status" - }, - "Endpoint": { - "description": "`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true", - "type": "object", - "properties": { - "apis": { - "description": "The list of APIs served by this endpoint.", - "type": "array", - "items": { - "type": "string" - } - }, - "allowCors": { - "description": "Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed.", - "type": "boolean" - }, - "name": { - "description": "The canonical name of this endpoint.", - "type": "string" - }, - "aliases": { - "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on.", - "type": "array", - "items": { - "type": "string" - } - }, - "features": { - "description": "The list of features enabled on this endpoint.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "Endpoint" - }, "Page": { - "description": "Represents a documentation page. A page can contain subpages to represent\nnested documentation set structure.", "type": "object", "properties": { + "name": { + "description": "The name of the page. It will be used as an identity of the page to\ngenerate URI of the page, text of the link to this page in navigation,\netc. The full page name (start from the root page name to this page\nconcatenated with `.`) can be used as reference to the page in your\ndocumentation. For example:\n\u003cpre\u003e\u003ccode\u003epages:\n- name: Tutorial\n content: (== include tutorial.md ==)\n subpages:\n - name: Java\n content: (== include tutorial_java.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nYou can reference `Java` page using Markdown reference link syntax:\n`Java`.", + "type": "string" + }, + "content": { + "description": "The Markdown content of the page. You can use \u003ccode\u003e(== include {path} ==)\u003c/code\u003e\nto include content from a Markdown file.", + "type": "string" + }, "subpages": { "description": "Subpages of this page. The order of subpages specified here will be\nhonored in the generated docset.", "type": "array", "items": { "$ref": "Page" } - }, - "content": { - "description": "The Markdown content of the page. You can use \u003ccode\u003e(== include {path} ==)\u003c/code\u003e\nto include content from a Markdown file.", - "type": "string" - }, - "name": { - "description": "The name of the page. It will be used as an identity of the page to\ngenerate URI of the page, text of the link to this page in navigation,\netc. The full page name (start from the root page name to this page\nconcatenated with `.`) can be used as reference to the page in your\ndocumentation. For example:\n\u003cpre\u003e\u003ccode\u003epages:\n- name: Tutorial\n content: (== include tutorial.md ==)\n subpages:\n - name: Java\n content: (== include tutorial_java.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nYou can reference `Java` page using Markdown reference link syntax:\n`Java`.", - "type": "string" } }, - "id": "Page" + "id": "Page", + "description": "Represents a documentation page. A page can contain subpages to represent\nnested documentation set structure." }, - "CustomErrorRule": { - "description": "A custom error rule.", - "type": "object", + "Status": { "properties": { - "isErrorType": { - "description": "Mark this message as possible payload in error response. Otherwise,\nobjects of this type will be filtered when they appear in error payload.", - "type": "boolean" + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" }, - "selector": { - "description": "Selects messages to which this rule applies.\n\nRefer to selector for syntax details.", + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" - } - }, - "id": "CustomErrorRule" - }, - "Option": { - "description": "A protocol buffer option, which can be attached to a message, field,\nenumeration, etc.", - "type": "object", - "properties": { - "value": { - "description": "The option's value packed in an Any message. If the value is a primitive,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } }, - "type": "object" - }, - "name": { - "description": "The option's name. For protobuf built-in options (options defined in\ndescriptor.proto), this is the short name. For example, `\"map_entry\"`.\nFor custom options, it should be the fully-qualified name. For example,\n`\"google.api.http\"`.", - "type": "string" + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use." } }, - "id": "Option" + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object" }, - "HttpRule": { - "description": "`HttpRule` defines the mapping of an RPC method to one or more HTTP\nREST APIs. The mapping determines what portions of the request\nmessage are populated from the path, query parameters, or body of\nthe HTTP request. The mapping is typically specified as an\n`google.api.http` annotation, see \"google/api/annotations.proto\"\nfor details.\n\nThe mapping consists of a field specifying the path template and\nmethod kind. The path template can refer to fields in the request\nmessage, as in the example below which describes a REST GET\noperation on a resource collection of messages:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}/{sub.subfield}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n SubMessage sub = 2; // `sub.subfield` is url-mapped\n }\n message Message {\n string text = 1; // content of the resource\n }\n\nThe same http annotation can alternatively be expressed inside the\n`GRPC API Configuration` YAML file.\n\n http:\n rules:\n - selector: \u003cproto_package_name\u003e.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\nThis definition enables an automatic, bidrectional mapping of HTTP\nJSON to RPC. Example:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456/foo` | `GetMessage(message_id: \"123456\" sub: SubMessage(subfield: \"foo\"))`\n\nIn general, not only fields but also field paths can be referenced\nfrom a path pattern. Fields mapped to the path pattern cannot be\nrepeated and must have a primitive (non-message) type.\n\nAny fields in the request message which are not bound by the path\npattern automatically become (optional) HTTP query\nparameters. Assume the following definition of the request message:\n\n\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n int64 revision = 2; // becomes a parameter\n SubMessage sub = 3; // `sub.subfield` becomes a parameter\n }\n\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to HTTP parameters must have a\nprimitive type or a repeated primitive type. Message types are not\nallowed. In the case of a repeated type, the parameter can be\nrepeated in the URL, as in `...?param=A¶m=B`.\n\nFor HTTP method kinds which allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice of\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\n\nThis enables the following two alternative HTTP JSON to RPC\nmappings:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n# Rules for HTTP mapping\n\nThe rules for mapping HTTP path, query parameters, and body fields\nto the request message are as follows:\n\n1. The `body` field specifies either `*` or a field path, or is\n omitted. If omitted, it assumes there is no HTTP body.\n2. Leaf fields (recursive expansion of nested messages in the\n request) can be classified into three types:\n (a) Matched in the URL template.\n (b) Covered by body (if body is `*`, everything except (a) fields;\n else everything under the body field)\n (c) All other fields.\n3. URL query parameters found in the HTTP request are mapped to (c) fields.\n4. Any body sent with an HTTP request can contain only (b) fields.\n\nThe syntax of the path template is as follows:\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single path segment. It follows the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\nExpansion.\n\nThe syntax `**` matches zero or more path segments. It follows the semantics\nof [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved\nExpansion. NOTE: it must be the last segment in the path except the Verb.\n\nThe syntax `LITERAL` matches literal text in the URL path.\n\nThe syntax `Variable` matches the entire path as specified by its template;\nthis nested template must not contain further variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nNOTE: the field paths in variables and in the `body` must not refer to\nrepeated fields or map fields.\n\nUse CustomHttpPattern to specify any HTTP method that is not included in the\n`pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for\na given URL path rule. The wild-card rule is useful for services that provide\ncontent to Web (HTML) clients.", + "Binding": { + "description": "Associates `members` with a `role`.", "type": "object", "properties": { - "custom": { - "description": "Custom pattern is used for defining custom verbs.", - "$ref": "CustomHttpPattern" - }, - "responseBody": { - "description": "The name of the response field whose value is mapped to the HTTP body of\nresponse. Other response fields are ignored. This field is optional. When\nnot set, the response message will be used as HTTP body of response.\nNOTE: the referred field must be not a repeated field and must be present\nat the top-level of response message type.", - "type": "string" - }, - "additionalBindings": { - "description": "Additional HTTP bindings for the selector. Nested bindings must\nnot contain an `additional_bindings` field themselves (that is,\nthe nesting may only be one level deep).", - "type": "array", - "items": { - "$ref": "HttpRule" - } - }, - "mediaDownload": { - "description": "Do not use this. For media support, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration.", - "$ref": "MediaDownload" - }, - "body": { - "description": "The name of the request field whose value is mapped to the HTTP body, or\n`*` for mapping all fields not captured by the path pattern to the HTTP\nbody. NOTE: the referred field must not be a repeated field and must be\npresent at the top-level of request message type.", - "type": "string" - }, - "put": { - "description": "Used for updating a resource.", - "type": "string" - }, - "get": { - "description": "Used for listing and getting information about resources.", - "type": "string" - }, - "selector": { - "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - }, - "post": { - "description": "Used for creating a resource.", - "type": "string" - }, - "patch": { - "description": "Used for updating a resource.", - "type": "string" - }, - "delete": { - "description": "Used for deleting a resource.", - "type": "string" - }, - "mediaUpload": { - "description": "Do not use this. For media support, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration.", - "$ref": "MediaUpload" - } - }, - "id": "HttpRule" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "TestIamPermissionsRequest" - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "TestIamPermissionsResponse" - }, - "CustomError": { - "description": "Customize service error responses. For example, list any service\nspecific protobuf types that can appear in error detail lists of\nerror responses.\n\nExample:\n\n custom_error:\n types:\n - google.foo.v1.CustomError\n - google.foo.v1.AnotherError", - "type": "object", - "properties": { - "types": { - "description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "type": "array", "items": { "type": "string" } }, - "rules": { - "description": "The list of custom error rules that apply to individual API messages.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "type": "array", - "items": { - "$ref": "CustomErrorRule" - } - } - }, - "id": "CustomError" - }, - "MediaDownload": { - "description": "Do not use this. For media support, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether download is enabled.", - "type": "boolean" - } - }, - "id": "MediaDownload" - }, - "SubmitConfigSourceRequest": { - "description": "Request message for SubmitConfigSource method.", - "type": "object", - "properties": { - "configSource": { - "description": "The source configuration for the service.", - "$ref": "ConfigSource" - }, - "validateOnly": { - "description": "Optional. If set, this will result in the generation of a\n`google.api.Service` configuration based on the `ConfigSource` provided,\nbut the generated config and the sources will NOT be persisted.", - "type": "boolean" - } - }, - "id": "SubmitConfigSourceRequest" - }, - "AuthenticationRule": { - "description": "Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored.", - "type": "object", - "properties": { - "oauth": { - "description": "The requirements for OAuth credentials.", - "$ref": "OAuthRequirements" - }, - "allowWithoutCredential": { - "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject.", - "type": "boolean" - }, - "requirements": { - "description": "Requirements for additional authentication providers.", - "type": "array", - "items": { - "$ref": "AuthRequirement" - } - }, - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", "type": "string" } }, - "id": "AuthenticationRule" + "id": "Binding" }, - "Logging": { - "description": "Logging configuration of the service.\n\nThe following example shows how to configure logs to be sent to the\nproducer and consumer projects. In the example, the `activity_history`\nlog is sent to both the producer and consumer projects, whereas the\n`purchase_history` log is only sent to the producer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n logs:\n - name: activity_history\n labels:\n - key: /customer_id\n - name: purchase_history\n logging:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history\n - purchase_history\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history", - "type": "object", + "AuthProvider": { "properties": { - "producerDestinations": { - "description": "Logging configurations for sending logs to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none producer destination.", - "type": "array", - "items": { - "$ref": "LoggingDestination" - } - }, - "consumerDestinations": { - "description": "Logging configurations for sending logs to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none consumer destination.", - "type": "array", - "items": { - "$ref": "LoggingDestination" - } - } - }, - "id": "Logging" - }, - "SystemParameter": { - "description": "Define a parameter's name and location. The parameter may be passed as either\nan HTTP header or a URL query parameter, and if both are passed the behavior\nis implementation-dependent.", - "type": "object", - "properties": { - "urlQueryParameter": { - "description": "Define the URL query parameter name to use for the parameter. It is case\nsensitive.", + "jwksUri": { + "description": "URL of the provider's public key set to validate signature of the JWT. See\n[OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).\nOptional if the key set document:\n - can be retrieved from\n [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html\n of the issuer.\n - can be inferred from the email domain of the issuer (e.g. a Google service account).\n\nExample: https://www.googleapis.com/oauth2/v1/certs", "type": "string" }, - "name": { - "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", - "type": "string" - }, - "httpHeader": { - "description": "Define the HTTP header name to use for the parameter. It is case\ninsensitive.", - "type": "string" - } - }, - "id": "SystemParameter" - }, - "Enum": { - "description": "Enum type definition.", - "type": "object", - "properties": { - "syntax": { - "description": "The source syntax.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "type": "string" - }, - "enumvalue": { - "description": "Enum value definitions.", - "type": "array", - "items": { - "$ref": "EnumValue" - } - }, - "options": { - "description": "Protocol buffer options.", - "type": "array", - "items": { - "$ref": "Option" - } - }, - "sourceContext": { - "description": "The source context.", - "$ref": "SourceContext" - }, - "name": { - "description": "Enum type name.", - "type": "string" - } - }, - "id": "Enum" - }, - "GenerateConfigReportResponse": { - "description": "Response message for GenerateConfigReport method.", - "type": "object", - "properties": { - "serviceName": { - "description": "Name of the service this report belongs to.", + "audiences": { + "description": "The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", "type": "string" }, "id": { - "description": "ID of the service configuration this report belongs to.", - "type": "string" + "type": "string", + "description": "The unique identifier of the auth provider. It will be referred to by\n`AuthRequirement.provider_id`.\n\nExample: \"bookstore_auth\"." }, - "changeReports": { - "description": "list of ChangeReport, each corresponding to comparison between two\nservice configurations.", + "issuer": { + "description": "Identifies the principal that issued the JWT. See\nhttps://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1\nUsually a URL or an email address.\n\nExample: https://securetoken.google.com\nExample: 1234567-compute@developer.gserviceaccount.com", + "type": "string" + } + }, + "id": "AuthProvider", + "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", + "type": "object" + }, + "Service": { + "description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", + "type": "object", + "properties": { + "usage": { + "$ref": "Usage", + "description": "Configuration controlling usage of this service." + }, + "metrics": { + "description": "Defines the metrics used by this service.", "type": "array", "items": { - "$ref": "ChangeReport" + "$ref": "MetricDescriptor" } }, - "diagnostics": { - "description": "Errors / Linter warnings associated with the service definition this\nreport\nbelongs to.", + "authentication": { + "$ref": "Authentication", + "description": "Auth configuration." + }, + "experimental": { + "$ref": "Experimental", + "description": "Experimental configuration." + }, + "control": { + "description": "Configuration for the service control plane.", + "$ref": "Control" + }, + "configVersion": { + "type": "integer", + "description": "The version of the service configuration. The config version may\ninfluence interpretation of the configuration, for example, to\ndetermine defaults. This is documented together with applicable\noptions. The current default for the config version itself is `3`.", + "format": "uint32" + }, + "monitoring": { + "description": "Monitoring configuration.", + "$ref": "Monitoring" + }, + "systemTypes": { + "description": "A list of all proto message types included in this API service.\nIt serves similar purpose as [google.api.Service.types], except that\nthese types are not needed by user-defined APIs. Therefore, they will not\nshow up in the generated discovery doc. This field should only be used\nto define system APIs in ESF.", "type": "array", "items": { - "$ref": "Diagnostic" + "$ref": "Type" + } + }, + "producerProjectId": { + "description": "The id of the Google developer project that owns the service.\nMembers of this project can manage the service configuration,\nmanage consumption of the service, etc.", + "type": "string" + }, + "visibility": { + "description": "API visibility configuration.", + "$ref": "Visibility" + }, + "quota": { + "description": "Quota configuration.", + "$ref": "Quota" + }, + "name": { + "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`.", + "type": "string" + }, + "customError": { + "$ref": "CustomError", + "description": "Custom error configuration." + }, + "title": { + "description": "The product title associated with this service.", + "type": "string" + }, + "endpoints": { + "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs.", + "type": "array", + "items": { + "$ref": "Endpoint" + } + }, + "logs": { + "description": "Defines the logs used by this service.", + "type": "array", + "items": { + "$ref": "LogDescriptor" + } + }, + "apis": { + "description": "A list of API interfaces exported by this service. Only the `name` field\nof the google.protobuf.Api needs to be provided by the configuration\nauthor, as the remaining fields will be derived from the IDL during the\nnormalization process. It is an error to specify an API interface here\nwhich cannot be resolved against the associated IDL files.", + "type": "array", + "items": { + "$ref": "Api" + } + }, + "types": { + "description": "A list of all proto message types included in this API service.\nTypes referenced directly or indirectly by the `apis` are\nautomatically included. Messages which are not referenced but\nshall be included, such as types used by the `google.protobuf.Any` type,\nshould be listed here by name. Example:\n\n types:\n - name: google.protobuf.Int32", + "type": "array", + "items": { + "$ref": "Type" + } + }, + "sourceInfo": { + "description": "Output only. The source information for this configuration if available.", + "$ref": "SourceInfo" + }, + "http": { + "$ref": "Http", + "description": "HTTP configuration." + }, + "backend": { + "description": "API backend configuration.", + "$ref": "Backend" + }, + "systemParameters": { + "$ref": "SystemParameters", + "description": "System parameter configuration." + }, + "documentation": { + "description": "Additional API documentation.", + "$ref": "Documentation" + }, + "logging": { + "description": "Logging configuration.", + "$ref": "Logging" + }, + "monitoredResources": { + "type": "array", + "items": { + "$ref": "MonitoredResourceDescriptor" + }, + "description": "Defines the monitored resources used by this service. This is required\nby the Service.monitoring and Service.logging configurations." + }, + "enums": { + "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum", + "type": "array", + "items": { + "$ref": "Enum" + } + }, + "context": { + "description": "Context configuration.", + "$ref": "Context" + }, + "id": { + "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead.", + "type": "string" + } + }, + "id": "Service" + }, + "EnumValue": { + "description": "Enum value definition.", + "type": "object", + "properties": { + "name": { + "description": "Enum value name.", + "type": "string" + }, + "options": { + "type": "array", + "items": { + "$ref": "Option" + }, + "description": "Protocol buffer options." + }, + "number": { + "description": "Enum value number.", + "format": "int32", + "type": "integer" + } + }, + "id": "EnumValue" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" } } }, - "id": "GenerateConfigReportResponse" - }, - "DeleteServiceStrategy": { - "description": "Strategy used to delete a service. This strategy is a placeholder only\nused by the system generated rollout to delete a service.", - "type": "object", - "properties": {}, - "id": "DeleteServiceStrategy" + "id": "ListOperationsResponse" }, "OperationMetadata": { "description": "The metadata associated with a long running operation resource.", "type": "object", "properties": { - "steps": { - "description": "Detailed status information for each step. The order is undetermined.", - "type": "array", - "items": { - "$ref": "Step" - } + "progressPercentage": { + "description": "Percentage of completion of this operation, ranging from 0 to 100.", + "format": "int32", + "type": "integer" }, "startTime": { "description": "The start time of the operation.", - "type": "string", - "format": "google-datetime" + "format": "google-datetime", + "type": "string" }, "resourceNames": { "description": "The full name of the resources that this operation is directly\nassociated with.", @@ -2204,25 +1954,16 @@ "type": "string" } }, - "progressPercentage": { - "description": "Percentage of completion of this operation, ranging from 0 to 100.", - "type": "integer", - "format": "int32" + "steps": { + "description": "Detailed status information for each step. The order is undetermined.", + "type": "array", + "items": { + "$ref": "Step" + } } }, "id": "OperationMetadata" }, - "DisableServiceRequest": { - "description": "Request message for DisableService method.", - "type": "object", - "properties": { - "consumerId": { - "description": "The identity of consumer resource which service disablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id.", - "type": "string" - } - }, - "id": "DisableServiceRequest" - }, "CustomHttpPattern": { "description": "A custom pattern is used for defining custom HTTP verb.", "type": "object", @@ -2238,35 +1979,102 @@ }, "id": "CustomHttpPattern" }, - "LogDescriptor": { - "description": "A description of a log type. Example in YAML format:\n\n - name: library.googleapis.com/activity_history\n description: The history of borrowing and returning library items.\n display_name: Activity\n labels:\n - key: /customer_id\n description: Identifier of a library customer", + "SystemParameterRule": { + "description": "Define a system parameter rule mapping system parameter definitions to\nmethods.", "type": "object", "properties": { - "labels": { - "description": "The set of labels that are available to describe a specific log entry.\nRuntime requests that contain labels not specified here are\nconsidered invalid.", + "selector": { + "type": "string", + "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details." + }, + "parameters": { + "description": "Define parameters. Multiple names may be defined for a parameter.\nFor a given method call, only one of them should be used. If multiple\nnames are used the behavior is implementation-dependent.\nIf none of the specified names are present the behavior is\nparameter-dependent.", "type": "array", "items": { - "$ref": "LabelDescriptor" + "$ref": "SystemParameter" + } + } + }, + "id": "SystemParameterRule" + }, + "VisibilityRule": { + "id": "VisibilityRule", + "description": "A visibility rule provides visibility configuration for an individual API\nelement.", + "type": "object", + "properties": { + "restriction": { + "type": "string", + "description": "A comma-separated list of visibility labels that apply to the `selector`.\nAny of the listed labels can be used to grant the visibility.\n\nIf a rule has multiple labels, removing one of the labels but not all of\nthem can break clients.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: GOOGLE_INTERNAL, TRUSTED_TESTER\n\nRemoving GOOGLE_INTERNAL from this restriction will break clients that\nrely on this method and only had access to it through GOOGLE_INTERNAL." + }, + "selector": { + "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + } + } + }, + "HttpRule": { + "description": "`HttpRule` defines the mapping of an RPC method to one or more HTTP\nREST APIs. The mapping determines what portions of the request\nmessage are populated from the path, query parameters, or body of\nthe HTTP request. The mapping is typically specified as an\n`google.api.http` annotation, see \"google/api/annotations.proto\"\nfor details.\n\nThe mapping consists of a field specifying the path template and\nmethod kind. The path template can refer to fields in the request\nmessage, as in the example below which describes a REST GET\noperation on a resource collection of messages:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}/{sub.subfield}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n SubMessage sub = 2; // `sub.subfield` is url-mapped\n }\n message Message {\n string text = 1; // content of the resource\n }\n\nThe same http annotation can alternatively be expressed inside the\n`GRPC API Configuration` YAML file.\n\n http:\n rules:\n - selector: \u003cproto_package_name\u003e.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\nThis definition enables an automatic, bidrectional mapping of HTTP\nJSON to RPC. Example:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456/foo` | `GetMessage(message_id: \"123456\" sub: SubMessage(subfield: \"foo\"))`\n\nIn general, not only fields but also field paths can be referenced\nfrom a path pattern. Fields mapped to the path pattern cannot be\nrepeated and must have a primitive (non-message) type.\n\nAny fields in the request message which are not bound by the path\npattern automatically become (optional) HTTP query\nparameters. Assume the following definition of the request message:\n\n\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n int64 revision = 2; // becomes a parameter\n SubMessage sub = 3; // `sub.subfield` becomes a parameter\n }\n\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to HTTP parameters must have a\nprimitive type or a repeated primitive type. Message types are not\nallowed. In the case of a repeated type, the parameter can be\nrepeated in the URL, as in `...?param=A¶m=B`.\n\nFor HTTP method kinds which allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice of\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\n\nThis enables the following two alternative HTTP JSON to RPC\nmappings:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n# Rules for HTTP mapping\n\nThe rules for mapping HTTP path, query parameters, and body fields\nto the request message are as follows:\n\n1. The `body` field specifies either `*` or a field path, or is\n omitted. If omitted, it assumes there is no HTTP body.\n2. Leaf fields (recursive expansion of nested messages in the\n request) can be classified into three types:\n (a) Matched in the URL template.\n (b) Covered by body (if body is `*`, everything except (a) fields;\n else everything under the body field)\n (c) All other fields.\n3. URL query parameters found in the HTTP request are mapped to (c) fields.\n4. Any body sent with an HTTP request can contain only (b) fields.\n\nThe syntax of the path template is as follows:\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single path segment. It follows the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\nExpansion.\n\nThe syntax `**` matches zero or more path segments. It follows the semantics\nof [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved\nExpansion. NOTE: it must be the last segment in the path except the Verb.\n\nThe syntax `LITERAL` matches literal text in the URL path.\n\nThe syntax `Variable` matches the entire path as specified by its template;\nthis nested template must not contain further variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nNOTE: the field paths in variables and in the `body` must not refer to\nrepeated fields or map fields.\n\nUse CustomHttpPattern to specify any HTTP method that is not included in the\n`pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for\na given URL path rule. The wild-card rule is useful for services that provide\ncontent to Web (HTML) clients.", + "type": "object", + "properties": { + "put": { + "description": "Used for updating a resource.", + "type": "string" + }, + "delete": { + "description": "Used for deleting a resource.", + "type": "string" + }, + "body": { + "description": "The name of the request field whose value is mapped to the HTTP body, or\n`*` for mapping all fields not captured by the path pattern to the HTTP\nbody. NOTE: the referred field must not be a repeated field and must be\npresent at the top-level of request message type.", + "type": "string" + }, + "mediaDownload": { + "description": "Use this only for Scotty Requests. Do not use this for bytestream methods.\nFor media support, add instead [][google.bytestream.RestByteStream] as an\nAPI to your configuration.", + "$ref": "MediaDownload" + }, + "post": { + "description": "Used for creating a resource.", + "type": "string" + }, + "additionalBindings": { + "description": "Additional HTTP bindings for the selector. Nested bindings must\nnot contain an `additional_bindings` field themselves (that is,\nthe nesting may only be one level deep).", + "type": "array", + "items": { + "$ref": "HttpRule" } }, - "description": { - "description": "A human-readable description of this log. This information appears in\nthe documentation and can contain details.", + "restCollection": { + "description": "Optional. The REST collection name is by default derived from the URL\npattern. If specified, this field overrides the default collection name.\nExample:\n\n rpc AddressesAggregatedList(AddressesAggregatedListRequest)\n returns (AddressesAggregatedListResponse) {\n option (google.api.http) = {\n get: \"/v1/projects/{project_id}/aggregated/addresses\"\n rest_collection: \"projects.addresses\"\n };\n }\n\nThis method has the automatically derived collection name\n\"projects.aggregated\". Because, semantically, this rpc is actually an\noperation on the \"projects.addresses\" collection, the `rest_collection`\nfield is configured to override the derived collection name.", "type": "string" }, - "displayName": { - "description": "The human-readable name for this log. This information appears on\nthe user interface and should be concise.", + "responseBody": { + "description": "The name of the response field whose value is mapped to the HTTP body of\nresponse. Other response fields are ignored. This field is optional. When\nnot set, the response message will be used as HTTP body of response.\nNOTE: the referred field must be not a repeated field and must be present\nat the top-level of response message type.", "type": "string" }, - "name": { - "description": "The name of the log. It must be less than 512 characters long and can\ninclude the following characters: upper- and lower-case alphanumeric\ncharacters [A-Za-z0-9], and punctuation characters including\nslash, underscore, hyphen, period [/_-.].", + "mediaUpload": { + "description": "Use this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration for Bytestream methods.", + "$ref": "MediaUpload" + }, + "selector": { + "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "custom": { + "$ref": "CustomHttpPattern", + "description": "Custom pattern is used for defining custom verbs." + }, + "patch": { + "description": "Used for updating a resource.", + "type": "string" + }, + "get": { + "description": "Used for listing and getting information about resources.", "type": "string" } }, - "id": "LogDescriptor" + "id": "HttpRule" }, "MonitoringDestination": { - "description": "Configuration of a specific monitoring destination (the producer project\nor the consumer project).", - "type": "object", "properties": { "monitoredResource": { "description": "The monitored resource type. The type must be defined in\nService.monitored_resources section.", @@ -2280,88 +2088,611 @@ } } }, - "id": "MonitoringDestination" + "id": "MonitoringDestination", + "description": "Configuration of a specific monitoring destination (the producer project\nor the consumer project).", + "type": "object" }, - "Field": { - "description": "A single field of a message type.", + "Visibility": { + "id": "Visibility", + "description": "`Visibility` defines restrictions for the visibility of service\nelements. Restrictions are specified using visibility labels\n(e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.\n\nUsers and projects can have access to more than one visibility label. The\neffective visibility for multiple labels is the union of each label's\nelements, plus any unrestricted elements.\n\nIf an element and its parents have no restrictions, visibility is\nunconditionally granted.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: TRUSTED_TESTER\n - selector: google.calendar.Calendar.Delegate\n restriction: GOOGLE_INTERNAL\n\nHere, all methods are publicly visible except for the restricted methods\nEnhancedSearch and Delegate.", "type": "object", "properties": { - "defaultValue": { - "description": "The string value of the default value of this field. Proto2 syntax only.", + "rules": { + "type": "array", + "items": { + "$ref": "VisibilityRule" + }, + "description": "A list of visibility rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." + } + } + }, + "SystemParameters": { + "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters.", + "type": "object", + "properties": { + "rules": { + "description": "Define system parameters.\n\nThe parameters defined here will override the default parameters\nimplemented by the system. If this field is missing from the service\nconfig, default system parameters will be used. Default system parameters\nand names is implementation-dependent.\n\nExample: define api key for all methods\n\n system_parameters\n rules:\n - selector: \"*\"\n parameters:\n - name: api_key\n url_query_parameter: api_key\n\n\nExample: define 2 api key names for a specific method.\n\n system_parameters\n rules:\n - selector: \"/ListShelves\"\n parameters:\n - name: api_key\n http_header: Api-Key1\n - name: api_key\n http_header: Api-Key2\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "type": "array", + "items": { + "$ref": "SystemParameterRule" + } + } + }, + "id": "SystemParameters" + }, + "ConfigChange": { + "description": "Output generated from semantically comparing two versions of a service\nconfiguration.\n\nIncludes detailed information about a field that have changed with\napplicable advice about potential consequences for the change, such as\nbackwards-incompatibility.", + "type": "object", + "properties": { + "newValue": { + "description": "Value of the changed object in the new Service configuration,\nin JSON format. This field will not be populated if ChangeType == REMOVED.", "type": "string" }, - "jsonName": { - "description": "The field JSON name.", + "changeType": { + "enumDescriptions": [ + "No value was provided.", + "The changed object exists in the 'new' service configuration, but not\nin the 'old' service configuration.", + "The changed object exists in the 'old' service configuration, but not\nin the 'new' service configuration.", + "The changed object exists in both service configurations, but its value\nis different." + ], + "enum": [ + "CHANGE_TYPE_UNSPECIFIED", + "ADDED", + "REMOVED", + "MODIFIED" + ], + "description": "The type for this change, either ADDED, REMOVED, or MODIFIED.", + "type": "string" + }, + "element": { + "type": "string", + "description": "Object hierarchy path to the change, with levels separated by a '.'\ncharacter. For repeated fields, an applicable unique identifier field is\nused for the index (usually selector, name, or id). For maps, the term\n'key' is used. If the field has no unique identifier, the numeric index\nis used.\nExamples:\n- visibility.rules[selector==\"google.LibraryService.CreateBook\"].restriction\n- quota.metric_rules[selector==\"google\"].metric_costs[key==\"reads\"].value\n- logging.producer_destinations[0]" + }, + "oldValue": { + "description": "Value of the changed object in the old Service configuration,\nin JSON format. This field will not be populated if ChangeType == ADDED.", + "type": "string" + }, + "advices": { + "description": "Collection of advice provided for this change, useful for determining the\npossible impact of this change.", + "type": "array", + "items": { + "$ref": "Advice" + } + } + }, + "id": "ConfigChange" + }, + "Quota": { + "properties": { + "metricRules": { + "description": "List of `MetricRule` definitions, each one mapping a selected method to one\nor more metrics.\n\nUsed by metric-based quotas only.", + "type": "array", + "items": { + "$ref": "MetricRule" + } + }, + "limits": { + "description": "List of `QuotaLimit` definitions for the service.\n\nUsed by metric-based quotas only.", + "type": "array", + "items": { + "$ref": "QuotaLimit" + } + } + }, + "id": "Quota", + "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", + "type": "object" + }, + "Rollout": { + "description": "A rollout resource that defines how service configuration versions are pushed\nto control plane systems. Typically, you create a new version of the\nservice config, and then create a Rollout to push the service config.", + "type": "object", + "properties": { + "createTime": { + "description": "Creation time of the rollout. Readonly.", + "format": "google-datetime", + "type": "string" + }, + "status": { + "enumDescriptions": [ + "No status specified.", + "The Rollout is in progress.", + "The Rollout has completed successfully.", + "The Rollout has been cancelled. This can happen if you have overlapping\nRollout pushes, and the previous ones will be cancelled.", + "The Rollout has failed and the rollback attempt has failed too.", + "The Rollout has not started yet and is pending for execution.", + "The Rollout has failed and rolled back to the previous successful\nRollout." + ], + "enum": [ + "ROLLOUT_STATUS_UNSPECIFIED", + "IN_PROGRESS", + "SUCCESS", + "CANCELLED", + "FAILED", + "PENDING", + "FAILED_ROLLED_BACK" + ], + "description": "The status of this rollout. Readonly. In case of a failed rollout,\nthe system will automatically rollback to the current Rollout\nversion. Readonly.", + "type": "string" + }, + "serviceName": { + "description": "The name of the service associated with this Rollout.", + "type": "string" + }, + "createdBy": { + "description": "The user who created the Rollout. Readonly.", + "type": "string" + }, + "trafficPercentStrategy": { + "$ref": "TrafficPercentStrategy", + "description": "Google Service Control selects service configurations based on\ntraffic percentage." + }, + "rolloutId": { + "description": "Optional unique identifier of this Rollout. Only lower case letters, digits\n and '-' are allowed.\n\nIf not specified by client, the server will generate one. The generated id\nwill have the form of \u003cdate\u003e\u003crevision number\u003e, where \"date\" is the create\ndate in ISO 8601 format. \"revision number\" is a monotonically increasing\npositive number that is reset every day for each service.\nAn example of the generated rollout_id is '2016-02-16r1'", + "type": "string" + }, + "deleteServiceStrategy": { + "description": "The strategy associated with a rollout to delete a `ManagedService`.\nReadonly.", + "$ref": "DeleteServiceStrategy" + } + }, + "id": "Rollout" + }, + "GenerateConfigReportRequest": { + "description": "Request message for GenerateConfigReport method.", + "type": "object", + "properties": { + "oldConfig": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service configuration against which the comparison will be done.\nFor this version of API, the supported types are\ngoogle.api.servicemanagement.v1.ConfigRef,\ngoogle.api.servicemanagement.v1.ConfigSource,\nand google.api.Service", + "type": "object" + }, + "newConfig": { + "description": "Service configuration for which we want to generate the report.\nFor this version of API, the supported types are\ngoogle.api.servicemanagement.v1.ConfigRef,\ngoogle.api.servicemanagement.v1.ConfigSource,\nand google.api.Service", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "GenerateConfigReportRequest" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "format": "google-fieldmask", + "type": "string" + } + }, + "id": "SetIamPolicyRequest" + }, + "Step": { + "description": "Represents the status of one operation step.", + "type": "object", + "properties": { + "status": { + "description": "The status code.", + "type": "string", + "enumDescriptions": [ + "Unspecifed code.", + "The operation or step has completed without errors.", + "The operation or step has not started yet.", + "The operation or step is in progress.", + "The operation or step has completed with errors. If the operation is\nrollbackable, the rollback completed with errors too.", + "The operation or step has completed with cancellation." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "DONE", + "NOT_STARTED", + "IN_PROGRESS", + "FAILED", + "CANCELLED" + ] + }, + "description": { + "description": "The short description of the step.", + "type": "string" + } + }, + "id": "Step" + }, + "DeleteServiceStrategy": { + "type": "object", + "properties": {}, + "id": "DeleteServiceStrategy", + "description": "Strategy used to delete a service. This strategy is a placeholder only\nused by the system generated rollout to delete a service." + }, + "LoggingDestination": { + "id": "LoggingDestination", + "description": "Configuration of a specific logging destination (the producer project\nor the consumer project).", + "type": "object", + "properties": { + "logs": { + "description": "Names of the logs to be sent to this destination. Each name must\nbe defined in the Service.logs section. If the log name is\nnot a domain scoped name, it will be automatically prefixed with\nthe service name followed by \"/\".", + "type": "array", + "items": { + "type": "string" + } + }, + "monitoredResource": { + "description": "The monitored resource type. The type must be defined in the\nService.monitored_resources section.", + "type": "string" + } + } + }, + "Option": { + "description": "A protocol buffer option, which can be attached to a message, field,\nenumeration, etc.", + "type": "object", + "properties": { + "name": { + "description": "The option's name. For protobuf built-in options (options defined in\ndescriptor.proto), this is the short name. For example, `\"map_entry\"`.\nFor custom options, it should be the fully-qualified name. For example,\n`\"google.api.http\"`.", + "type": "string" + }, + "value": { + "description": "The option's value packed in an Any message. If the value is a primitive,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + }, + "id": "Option" + }, + "Logging": { + "id": "Logging", + "description": "Logging configuration of the service.\n\nThe following example shows how to configure logs to be sent to the\nproducer and consumer projects. In the example, the `activity_history`\nlog is sent to both the producer and consumer projects, whereas the\n`purchase_history` log is only sent to the producer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n logs:\n - name: activity_history\n labels:\n - key: /customer_id\n - name: purchase_history\n logging:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history\n - purchase_history\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history", + "type": "object", + "properties": { + "consumerDestinations": { + "type": "array", + "items": { + "$ref": "LoggingDestination" + }, + "description": "Logging configurations for sending logs to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none consumer destination." + }, + "producerDestinations": { + "description": "Logging configurations for sending logs to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none producer destination.", + "type": "array", + "items": { + "$ref": "LoggingDestination" + } + } + } + }, + "QuotaLimit": { + "id": "QuotaLimit", + "description": "`QuotaLimit` defines a specific limit that applies over a specified duration\nfor a limit type. There can be at most one limit for a duration and limit\ntype combination defined within a `QuotaGroup`.", + "type": "object", + "properties": { + "duration": { + "description": "Duration of this limit in textual notation. Example: \"100s\", \"24h\", \"1d\".\nFor duration longer than a day, only multiple of days is supported. We\nsupport only \"100s\" and \"1d\" for now. Additional support will be added in\nthe future. \"0\" indicates indefinite duration.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "freeTier": { + "description": "Free tier value displayed in the Developers Console for this limit.\nThe free tier is the number of tokens that will be subtracted from the\nbilled amount when billing is enabled.\nThis field can only be set on a limit with duration \"1d\", in a billable\ngroup; it is invalid on any other limit. If this field is not set, it\ndefaults to 0, indicating that there is no free tier for this service.\n\nUsed by group-based quotas only.", + "format": "int64", + "type": "string" + }, + "defaultLimit": { + "description": "Default number of tokens that can be consumed during the specified\nduration. This is the number of tokens assigned when a client\napplication developer activates the service for his/her project.\n\nSpecifying a value of 0 will block all requests. This can be used if you\nare provisioning quota to selected consumers and blocking others.\nSimilarly, a value of -1 will indicate an unlimited quota. No other\nnegative values are allowed.\n\nUsed by group-based quotas only.", + "format": "int64", + "type": "string" + }, + "description": { + "description": "Optional. User-visible, extended description for this quota limit.\nShould be used only when more context is needed to understand this limit\nthan provided by the limit's display name (see: `display_name`).", + "type": "string" + }, + "displayName": { + "description": "User-visible display name for this limit.\nOptional. If not set, the UI will provide a default display name based on\nthe quota configuration. This field can be used to override the default\ndisplay name generated from the configuration.", + "type": "string" + }, + "metric": { + "description": "The name of the metric this quota limit applies to. The quota limits with\nthe same metric will be checked together during runtime. The metric must be\ndefined within the service config.\n\nUsed by metric-based quotas only.", + "type": "string" + }, + "values": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "Tiered limit values. Also allows for regional or zone overrides for these\nvalues if \"/{region}\" or \"/{zone}\" is specified in the unit field.\n\nCurrently supported tiers from low to high:\nVERY_LOW, LOW, STANDARD, HIGH, VERY_HIGH\n\nTo apply different limit values for users according to their tiers, specify\nthe values for the tiers you want to differentiate. For example:\n{LOW:100, STANDARD:500, HIGH:1000, VERY_HIGH:5000}\n\nThe limit value for each tier is optional except for the tier STANDARD.\nThe limit value for an unspecified tier falls to the value of its next\ntier towards tier STANDARD. For the above example, the limit value for tier\nSTANDARD is 500.\n\nTo apply the same limit value for all users, just specify limit value for\ntier STANDARD. For example: {STANDARD:500}.\n\nTo apply a regional overide for a tier, add a map entry with key\n\"\u003cTIER\u003e/\u003cregion\u003e\", where \u003cregion\u003e is a region name. Similarly, for a zone\noverride, add a map entry with key \"\u003cTIER\u003e/{zone}\".\nFurther, a wildcard can be used at the end of a zone name in order to\nspecify zone level overrides. For example:\nLOW: 10, STANDARD: 50, HIGH: 100,\nLOW/us-central1: 20, STANDARD/us-central1: 60, HIGH/us-central1: 200,\nLOW/us-central1-*: 10, STANDARD/us-central1-*: 20, HIGH/us-central1-*: 80\n\nThe regional overrides tier set for each region must be the same as\nthe tier set for default limit values. Same rule applies for zone overrides\ntier as well.\n\nUsed by metric-based quotas only.", + "type": "object" + }, + "unit": { + "description": "Specify the unit of the quota limit. It uses the same syntax as\nMetric.unit. The supported unit kinds are determined by the quota\nbackend system.\n\nThe [Google Service Control](https://cloud.google.com/service-control)\nsupports the following unit components:\n* One of the time intevals:\n * \"/min\" for quota every minute.\n * \"/d\" for quota every 24 hours, starting 00:00 US Pacific Time.\n * Otherwise the quota won't be reset by time, such as storage limit.\n* One and only one of the granted containers:\n * \"/{organization}\" quota for an organization.\n * \"/{project}\" quota for a project.\n * \"/{folder}\" quota for a folder.\n * \"/{resource}\" quota for a universal resource.\n* Zero or more quota segmentation dimension. Not all combos are valid.\n * \"/{region}\" quota for every region. Not to be used with time intervals.\n * Otherwise the resources granted on the target is not segmented.\n * \"/{zone}\" quota for every zone. Not to be used with time intervals.\n * Otherwise the resources granted on the target is not segmented.\n * \"/{resource}\" quota for a resource associated with a project or org.\n\nHere are some examples:\n* \"1/min/{project}\" for quota per minute per project.\n* \"1/min/{user}\" for quota per minute per user.\n* \"1/min/{organization}\" for quota per minute per organization.\n\nNote: the order of unit components is insignificant.\nThe \"1\" at the beginning is required to follow the metric unit syntax.\n\nUsed by metric-based quotas only.", + "type": "string" + }, + "maxLimit": { + "description": "Maximum number of tokens that can be consumed during the specified\nduration. Client application developers can override the default limit up\nto this maximum. If specified, this value cannot be set to a value less\nthan the default limit. If not specified, it is set to the default limit.\n\nTo allow clients to apply overrides with no upper bound, set this to -1,\nindicating unlimited maximum quota.\n\nUsed by group-based quotas only.", + "format": "int64", + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the quota limit. The name is used to refer to the limit when\noverriding the default limit on per-consumer basis.\n\nFor group-based quota limits, the name must be unique within the quota\ngroup. If a name is not provided, it will be generated from the limit_by\nand duration fields.\n\nFor metric-based quota limits, the name must be provided, and it must be\nunique within the service. The name can only include alphanumeric\ncharacters as well as '-'.\n\nThe maximum length of the limit name is 64 characters.\n\nThe name of a limit is used as a unique identifier for this limit.\nTherefore, once a limit has been put into use, its name should be\nimmutable. You can use the display_name field to provide a user-friendly\nname for the limit. The display name can be evolved over time without\naffecting the identity of the limit." + } + } + }, + "Method": { + "description": "Method represents a method of an api.", + "type": "object", + "properties": { + "responseTypeUrl": { + "description": "The URL of the output message type.", "type": "string" }, "options": { - "description": "The protocol buffer options.", + "description": "Any metadata attached to the method.", "type": "array", "items": { "$ref": "Option" } }, - "oneofIndex": { - "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.", - "type": "integer", - "format": "int32" + "responseStreaming": { + "type": "boolean", + "description": "If true, the response is streamed." }, - "cardinality": { - "description": "The field cardinality.", - "enum": [ - "CARDINALITY_UNKNOWN", - "CARDINALITY_OPTIONAL", - "CARDINALITY_REQUIRED", - "CARDINALITY_REPEATED" - ], - "enumDescriptions": [ - "For fields with unknown cardinality.", - "For optional fields.", - "For required fields. Proto2 syntax only.", - "For repeated fields." - ], + "name": { + "description": "The simple name of this method.", "type": "string" }, + "requestTypeUrl": { + "description": "A URL of the input message type.", + "type": "string" + }, + "requestStreaming": { + "description": "If true, the request is streamed.", + "type": "boolean" + }, + "syntax": { + "description": "The source syntax of this method.", + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ], + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ] + } + }, + "id": "Method" + }, + "ListServiceRolloutsResponse": { + "description": "Response message for ListServiceRollouts method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The token of the next page of results.", + "type": "string" + }, + "rollouts": { + "description": "The list of rollout resources.", + "type": "array", + "items": { + "$ref": "Rollout" + } + } + }, + "id": "ListServiceRolloutsResponse" + }, + "ConfigRef": { + "description": "Represents a service configuration with its name and id.", + "type": "object", + "properties": { + "name": { + "description": "Resource name of a service config. It must have the following\nformat: \"services/{service name}/configs/{config id}\".", + "type": "string" + } + }, + "id": "ConfigRef" + }, + "Mixin": { + "type": "object", + "properties": { + "name": { + "description": "The fully qualified name of the API which is included.", + "type": "string" + }, + "root": { + "description": "If non-empty specifies a path under which inherited HTTP paths\nare rooted.", + "type": "string" + } + }, + "id": "Mixin", + "description": "Declares an API to be included in this API. The including API must\nredeclare all the methods from the included API, but documentation\nand options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including API plus the root path if specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }" + }, + "FlowOperationMetadata": { + "description": "The metadata associated with a long running operation resource.", + "type": "object", + "properties": { + "cancelState": { + "enumDescriptions": [ + "Default state, cancellable but not cancelled.", + "The operation has proceeded past the point of no return and cannot\nbe cancelled.", + "The operation has been cancelled, work should cease\nand any needed rollback steps executed." + ], + "enum": [ + "RUNNING", + "UNCANCELLABLE", + "CANCELLED" + ], + "description": "The state of the operation with respect to cancellation.", + "type": "string" + }, + "deadline": { + "type": "string", + "description": "Deadline for the flow to complete, to prevent orphaned Operations.\n\nIf the flow has not completed by this time, it may be terminated by\nthe engine, or force-failed by Operation lookup.\n\nNote that this is not a hard deadline after which the Flow will\ndefinitely be failed, rather it is a deadline after which it is reasonable\nto suspect a problem and other parts of the system may kill operation\nto ensure we don't have orphans.\nsee also: go/prevent-orphaned-operations", + "format": "google-datetime" + }, + "startTime": { + "description": "The start time of the operation.", + "format": "google-datetime", + "type": "string" + }, + "flowName": { + "description": "The name of the top-level flow corresponding to this operation.\nMust be equal to the \"name\" field for a FlowName enum.", + "type": "string" + }, + "resourceNames": { + "description": "The full name of the resources that this flow is directly associated with.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "FlowOperationMetadata" + }, + "CustomError": { + "properties": { + "types": { + "description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", + "type": "array", + "items": { + "type": "string" + } + }, + "rules": { + "description": "The list of custom error rules that apply to individual API messages.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "type": "array", + "items": { + "$ref": "CustomErrorRule" + } + } + }, + "id": "CustomError", + "description": "Customize service error responses. For example, list any service\nspecific protobuf types that can appear in error detail lists of\nerror responses.\n\nExample:\n\n custom_error:\n types:\n - google.foo.v1.CustomError\n - google.foo.v1.AnotherError", + "type": "object" + }, + "CounterOptions": { + "description": "Options for counters", + "type": "object", + "properties": { + "metric": { + "description": "The metric to update.", + "type": "string" + }, + "field": { + "description": "The field value to attribute.", + "type": "string" + } + }, + "id": "CounterOptions" + }, + "Http": { + "description": "Defines the HTTP configuration for a service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods.", + "type": "object", + "properties": { + "fullyDecodeReservedExpansion": { + "description": "When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.", + "type": "boolean" + }, + "rules": { + "type": "array", + "items": { + "$ref": "HttpRule" + }, + "description": "A list of HTTP configuration rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." + } + }, + "id": "Http" + }, + "SourceInfo": { + "description": "Source information used to create a Service Config", + "type": "object", + "properties": { + "sourceFiles": { + "description": "All files used during config generation.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + } + }, + "id": "SourceInfo" + }, + "Control": { + "description": "Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc.", + "type": "object", + "properties": { + "environment": { + "description": "The service control environment to use. If empty, no control plane\nfeature (like quota and billing) will be enabled.", + "type": "string" + } + }, + "id": "Control" + }, + "SystemParameter": { + "description": "Define a parameter's name and location. The parameter may be passed as either\nan HTTP header or a URL query parameter, and if both are passed the behavior\nis implementation-dependent.", + "type": "object", + "properties": { + "name": { + "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", + "type": "string" + }, + "urlQueryParameter": { + "description": "Define the URL query parameter name to use for the parameter. It is case\nsensitive.", + "type": "string" + }, + "httpHeader": { + "description": "Define the HTTP header name to use for the parameter. It is case\ninsensitive.", + "type": "string" + } + }, + "id": "SystemParameter" + }, + "Monitoring": { + "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count", + "type": "object", + "properties": { + "consumerDestinations": { + "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination.", + "type": "array", + "items": { + "$ref": "MonitoringDestination" + } + }, + "producerDestinations": { + "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination.", + "type": "array", + "items": { + "$ref": "MonitoringDestination" + } + } + }, + "id": "Monitoring" + }, + "Field": { + "type": "object", + "properties": { "typeUrl": { "description": "The field type URL, without the scheme, for message or enumeration\ntypes. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", "type": "string" }, - "name": { - "description": "The field name.", - "type": "string" - }, - "packed": { - "description": "Whether to use alternative packed wire representation.", - "type": "boolean" - }, "number": { "description": "The field number.", - "type": "integer", - "format": "int32" + "format": "int32", + "type": "integer" }, "kind": { - "description": "The field type.", - "enum": [ - "TYPE_UNKNOWN", - "TYPE_DOUBLE", - "TYPE_FLOAT", - "TYPE_INT64", - "TYPE_UINT64", - "TYPE_INT32", - "TYPE_FIXED64", - "TYPE_FIXED32", - "TYPE_BOOL", - "TYPE_STRING", - "TYPE_GROUP", - "TYPE_MESSAGE", - "TYPE_BYTES", - "TYPE_UINT32", - "TYPE_ENUM", - "TYPE_SFIXED32", - "TYPE_SFIXED64", - "TYPE_SINT32", - "TYPE_SINT64" - ], "enumDescriptions": [ "Field type unknown.", "Field type double.", @@ -2383,142 +2714,93 @@ "Field type sint32.", "Field type sint64." ], - "type": "string" - } - }, - "id": "Field" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", - "type": "array", - "items": { - "type": "string" - } - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" - } - }, - "id": "Binding" - }, - "ConfigRef": { - "description": "Represents a service configuration with its name and id.", - "type": "object", - "properties": { - "name": { - "description": "Resource name of a service config. It must have the following\nformat: \"services/{service name}/configs/{config id}\".", - "type": "string" - } - }, - "id": "ConfigRef" - }, - "DataAccessOptions": { - "description": "Write a Data Access (Gin) log", - "type": "object", - "properties": {}, - "id": "DataAccessOptions" - }, - "AuthProvider": { - "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", - "type": "object", - "properties": { - "audiences": { - "description": "The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", - "type": "string" - }, - "jwksUri": { - "description": "URL of the provider's public key set to validate signature of the JWT. See\n[OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).\nOptional if the key set document:\n - can be retrieved from\n [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html\n of the issuer.\n - can be inferred from the email domain of the issuer (e.g. a Google service account).\n\nExample: https://www.googleapis.com/oauth2/v1/certs", - "type": "string" - }, - "id": { - "description": "The unique identifier of the auth provider. It will be referred to by\n`AuthRequirement.provider_id`.\n\nExample: \"bookstore_auth\".", - "type": "string" - }, - "issuer": { - "description": "Identifies the principal that issued the JWT. See\nhttps://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1\nUsually a URL or an email address.\n\nExample: https://securetoken.google.com\nExample: 1234567-compute@developer.gserviceaccount.com", - "type": "string" - } - }, - "id": "AuthProvider" - }, - "VisibilityRule": { - "description": "A visibility rule provides visibility configuration for an individual API\nelement.", - "type": "object", - "properties": { - "restriction": { - "description": "A comma-separated list of visibility labels that apply to the `selector`.\nAny of the listed labels can be used to grant the visibility.\n\nIf a rule has multiple labels, removing one of the labels but not all of\nthem can break clients.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: GOOGLE_INTERNAL, TRUSTED_TESTER\n\nRemoving GOOGLE_INTERNAL from this restriction will break clients that\nrely on this method and only had access to it through GOOGLE_INTERNAL.", - "type": "string" - }, - "selector": { - "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - } - }, - "id": "VisibilityRule" - }, - "AuditLogConfig": { - "description": "Provides the configuration for a sub-type of logging.", - "type": "object", - "properties": { - "logType": { - "description": "The log type that this config enables.", "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "enumDescriptions": [ - "Default case. Should never be this.", - "Log admin reads", - "Log data writes", - "Log data reads" + "TYPE_UNKNOWN", + "TYPE_DOUBLE", + "TYPE_FLOAT", + "TYPE_INT64", + "TYPE_UINT64", + "TYPE_INT32", + "TYPE_FIXED64", + "TYPE_FIXED32", + "TYPE_BOOL", + "TYPE_STRING", + "TYPE_GROUP", + "TYPE_MESSAGE", + "TYPE_BYTES", + "TYPE_UINT32", + "TYPE_ENUM", + "TYPE_SFIXED32", + "TYPE_SFIXED64", + "TYPE_SINT32", + "TYPE_SINT64" ], + "description": "The field type.", "type": "string" }, - "exemptedMembers": { - "description": "Specifies the identities that are exempted from this type of logging\nFollows the same format of Binding.members.", + "jsonName": { + "description": "The field JSON name.", + "type": "string" + }, + "options": { + "description": "The protocol buffer options.", "type": "array", "items": { - "type": "string" + "$ref": "Option" } - } - }, - "id": "AuditLogConfig" - }, - "UndeleteServiceResponse": { - "description": "Response message for UndeleteService method.", - "type": "object", - "properties": { - "service": { - "description": "Revived service resource.", - "$ref": "ManagedService" - } - }, - "id": "UndeleteServiceResponse" - }, - "UsageRule": { - "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true", - "type": "object", - "properties": { - "allowUnregisteredCalls": { - "description": "True, if the method allows unregistered calls; false otherwise.", + }, + "oneofIndex": { + "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.", + "format": "int32", + "type": "integer" + }, + "cardinality": { + "enumDescriptions": [ + "For fields with unknown cardinality.", + "For optional fields.", + "For required fields. Proto2 syntax only.", + "For repeated fields." + ], + "enum": [ + "CARDINALITY_UNKNOWN", + "CARDINALITY_OPTIONAL", + "CARDINALITY_REQUIRED", + "CARDINALITY_REPEATED" + ], + "description": "The field cardinality.", + "type": "string" + }, + "packed": { + "description": "Whether to use alternative packed wire representation.", "type": "boolean" }, - "selector": { - "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", + "defaultValue": { + "description": "The string value of the default value of this field. Proto2 syntax only.", + "type": "string" + }, + "name": { + "description": "The field name.", "type": "string" } }, - "id": "UsageRule" + "id": "Field", + "description": "A single field of a message type." }, - "EnumValue": { - "description": "Enum value definition.", + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "TestIamPermissionsRequest" + }, + "Enum": { "type": "object", "properties": { "options": { @@ -2528,254 +2810,410 @@ "$ref": "Option" } }, + "sourceContext": { + "$ref": "SourceContext", + "description": "The source context." + }, + "syntax": { + "description": "The source syntax.", + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ], + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ] + }, "name": { - "description": "Enum value name.", - "type": "string" + "type": "string", + "description": "Enum type name." }, - "number": { - "description": "Enum value number.", - "type": "integer", - "format": "int32" + "enumvalue": { + "description": "Enum value definitions.", + "type": "array", + "items": { + "$ref": "EnumValue" + } } }, - "id": "EnumValue" + "id": "Enum", + "description": "Enum type definition." }, - "MediaUpload": { - "description": "Do not use this. For media support, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration.", + "EnableServiceRequest": { + "description": "Request message for EnableService method.", "type": "object", "properties": { - "enabled": { - "description": "Whether upload is enabled.", - "type": "boolean" - } - }, - "id": "MediaUpload" - }, - "BackendRule": { - "description": "A backend rule provides configuration for an individual API element.", - "type": "object", - "properties": { - "address": { - "description": "The address of the API backend.", - "type": "string" - }, - "deadline": { - "description": "The number of seconds to wait for a response from a request. The\ndefault depends on the deployment context.", - "type": "number", - "format": "double" - }, - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "consumerId": { + "description": "The identity of consumer resource which service enablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id.", "type": "string" } }, - "id": "BackendRule" + "id": "EnableServiceRequest" }, - "ContextRule": { - "description": "A context rule provides information about the context for an individual API\nelement.", + "Diagnostic": { + "description": "Represents a diagnostic message (error or warning)", "type": "object", "properties": { - "provided": { - "description": "A list of full type names of provided contexts.", + "message": { + "description": "Message describing the error or warning.", + "type": "string" + }, + "location": { + "description": "File name and line number of the error or warning.", + "type": "string" + }, + "kind": { + "enum": [ + "WARNING", + "ERROR" + ], + "description": "The kind of diagnostic information provided.", + "type": "string", + "enumDescriptions": [ + "Warnings and errors", + "Only errors" + ] + } + }, + "id": "Diagnostic" + }, + "LabelDescriptor": { + "description": "A description of a label.", + "type": "object", + "properties": { + "valueType": { + "enum": [ + "STRING", + "BOOL", + "INT64" + ], + "description": "The type of data that can be assigned to the label.", + "type": "string", + "enumDescriptions": [ + "A variable-length string. This is the default.", + "Boolean; true or false.", + "A 64-bit signed integer." + ] + }, + "key": { + "description": "The label key.", + "type": "string" + }, + "description": { + "type": "string", + "description": "A human-readable description for the label." + } + }, + "id": "LabelDescriptor" + }, + "GenerateConfigReportResponse": { + "id": "GenerateConfigReportResponse", + "description": "Response message for GenerateConfigReport method.", + "type": "object", + "properties": { + "id": { + "description": "ID of the service configuration this report belongs to.", + "type": "string" + }, + "diagnostics": { + "description": "Errors / Linter warnings associated with the service definition this\nreport\nbelongs to.", + "type": "array", + "items": { + "$ref": "Diagnostic" + } + }, + "serviceName": { + "description": "Name of the service this report belongs to.", + "type": "string" + }, + "changeReports": { + "description": "list of ChangeReport, each corresponding to comparison between two\nservice configurations.", + "type": "array", + "items": { + "$ref": "ChangeReport" + } + } + } + }, + "Type": { + "description": "A protocol buffer message type.", + "type": "object", + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "Option" + }, + "description": "The protocol buffer options." + }, + "fields": { + "description": "The list of fields.", + "type": "array", + "items": { + "$ref": "Field" + } + }, + "name": { + "type": "string", + "description": "The fully qualified message name." + }, + "oneofs": { + "description": "The list of types appearing in `oneof` definitions in this type.", "type": "array", "items": { "type": "string" } }, - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "syntax": { + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax.", + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ] + }, + "sourceContext": { + "$ref": "SourceContext", + "description": "The source context." + } + }, + "id": "Type" + }, + "Experimental": { + "description": "Experimental service configuration. These configuration options can\nonly be used by whitelisted users.", + "type": "object", + "properties": { + "authorization": { + "description": "Authorization configuration.", + "$ref": "AuthorizationConfig" + } + }, + "id": "Experimental" + }, + "ListServiceConfigsResponse": { + "description": "Response message for ListServiceConfigs method.", + "type": "object", + "properties": { + "serviceConfigs": { + "description": "The list of service configuration resources.", + "type": "array", + "items": { + "$ref": "Service" + } + }, + "nextPageToken": { + "description": "The token of the next page of results.", + "type": "string" + } + }, + "id": "ListServiceConfigsResponse" + }, + "AuditConfig": { + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", + "type": "object", + "properties": { + "service": { + "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", "type": "string" }, + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "type": "array", + "items": { + "$ref": "AuditLogConfig" + } + }, + "exemptedMembers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "AuditConfig" + }, + "Backend": { + "description": "`Backend` defines the backend configuration for a service.", + "type": "object", + "properties": { + "rules": { + "description": "A list of API backend rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "type": "array", + "items": { + "$ref": "BackendRule" + } + } + }, + "id": "Backend" + }, + "SubmitConfigSourceRequest": { + "description": "Request message for SubmitConfigSource method.", + "type": "object", + "properties": { + "configSource": { + "$ref": "ConfigSource", + "description": "The source configuration for the service." + }, + "validateOnly": { + "description": "Optional. If set, this will result in the generation of a\n`google.api.Service` configuration based on the `ConfigSource` provided,\nbut the generated config and the sources will NOT be persisted.", + "type": "boolean" + } + }, + "id": "SubmitConfigSourceRequest" + }, + "AuthorizationConfig": { + "description": "Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com", + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "The name of the authorization provider, such as\nfirebaserules.googleapis.com." + } + }, + "id": "AuthorizationConfig" + }, + "DocumentationRule": { + "description": "A documentation rule provides information about individual API elements.", + "type": "object", + "properties": { + "selector": { + "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used.", + "type": "string" + }, + "description": { + "description": "Description of the selected API(s).", + "type": "string" + }, + "deprecationDescription": { + "description": "Deprecation description of the selected element(s). It can be provided if an\nelement is marked as `deprecated`.", + "type": "string" + } + }, + "id": "DocumentationRule" + }, + "CloudAuditOptions": { + "description": "Write a Cloud Audit log", + "type": "object", + "properties": { + "logName": { + "enum": [ + "UNSPECIFIED_LOG_NAME", + "ADMIN_ACTIVITY", + "DATA_ACCESS" + ], + "description": "The log_name to populate in the Cloud Audit Record.", + "type": "string", + "enumDescriptions": [ + "Default. Should not be used.", + "Corresponds to \"cloudaudit.googleapis.com/activity\"", + "Corresponds to \"cloudaudit.googleapis.com/data_access\"" + ] + } + }, + "id": "CloudAuditOptions" + }, + "ContextRule": { + "properties": { "requested": { "description": "A list of full type names of requested contexts.", "type": "array", "items": { "type": "string" } - } - }, - "id": "ContextRule" - }, - "Http": { - "description": "Defines the HTTP configuration for a service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods.", - "type": "object", - "properties": { - "rules": { - "description": "A list of HTTP configuration rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "type": "array", - "items": { - "$ref": "HttpRule" - } - } - }, - "id": "Http" - }, - "Visibility": { - "description": "`Visibility` defines restrictions for the visibility of service\nelements. Restrictions are specified using visibility labels\n(e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.\n\nUsers and projects can have access to more than one visibility label. The\neffective visibility for multiple labels is the union of each label's\nelements, plus any unrestricted elements.\n\nIf an element and its parents have no restrictions, visibility is\nunconditionally granted.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: TRUSTED_TESTER\n - selector: google.calendar.Calendar.Delegate\n restriction: GOOGLE_INTERNAL\n\nHere, all methods are publicly visible except for the restricted methods\nEnhancedSearch and Delegate.", - "type": "object", - "properties": { - "rules": { - "description": "A list of visibility rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "type": "array", - "items": { - "$ref": "VisibilityRule" - } - } - }, - "id": "Visibility" - }, - "ConfigChange": { - "description": "Output generated from semantically comparing two versions of a service\nconfiguration.\n\nIncludes detailed information about a field that have changed with\napplicable advice about potential consequences for the change, such as\nbackwards-incompatibility.", - "type": "object", - "properties": { - "newValue": { - "description": "Value of the changed object in the new Service configuration,\nin JSON format. This field will not be populated if ChangeType == REMOVED.", - "type": "string" }, - "oldValue": { - "description": "Value of the changed object in the old Service configuration,\nin JSON format. This field will not be populated if ChangeType == ADDED.", - "type": "string" + "selector": { + "type": "string", + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details." }, - "element": { - "description": "Object hierarchy path to the change, with levels separated by a '.'\ncharacter. For repeated fields, an applicable unique identifier field is\nused for the index (usually selector, name, or id). For maps, the term\n'key' is used. If the field has no unique identifier, the numeric index\nis used.\nExamples:\n- visibility.rules[selector==\"google.LibraryService.CreateBook\"].restriction\n- quota.metric_rules[selector==\"google\"].metric_costs[key==\"reads\"].value\n- logging.producer_destinations[0]", - "type": "string" - }, - "changeType": { - "description": "The type for this change, either ADDED, REMOVED, or MODIFIED.", - "enum": [ - "CHANGE_TYPE_UNSPECIFIED", - "ADDED", - "REMOVED", - "MODIFIED" - ], - "enumDescriptions": [ - "No value was provided.", - "The changed object exists in the 'new' service configuration, but not\nin the 'old' service configuration.", - "The changed object exists in the 'old' service configuration, but not\nin the 'new' service configuration.", - "The changed object exists in both service configurations, but its value\nis different." - ], - "type": "string" - }, - "advices": { - "description": "Collection of advice provided for this change, useful for determining the\npossible impact of this change.", - "type": "array", - "items": { - "$ref": "Advice" - } - } - }, - "id": "ConfigChange" - }, - "SystemParameters": { - "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters.", - "type": "object", - "properties": { - "rules": { - "description": "Define system parameters.\n\nThe parameters defined here will override the default parameters\nimplemented by the system. If this field is missing from the service\nconfig, default system parameters will be used. Default system parameters\nand names is implementation-dependent.\n\nExample: define api key for all methods\n\n system_parameters\n rules:\n - selector: \"*\"\n parameters:\n - name: api_key\n url_query_parameter: api_key\n\n\nExample: define 2 api key names for a specific method.\n\n system_parameters\n rules:\n - selector: \"/ListShelves\"\n parameters:\n - name: api_key\n http_header: Api-Key1\n - name: api_key\n http_header: Api-Key2\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "type": "array", - "items": { - "$ref": "SystemParameterRule" - } - } - }, - "id": "SystemParameters" - }, - "LabelDescriptor": { - "description": "A description of a label.", - "type": "object", - "properties": { - "description": { - "description": "A human-readable description for the label.", - "type": "string" - }, - "valueType": { - "description": "The type of data that can be assigned to the label.", - "enum": [ - "STRING", - "BOOL", - "INT64" - ], - "enumDescriptions": [ - "A variable-length string. This is the default.", - "Boolean; true or false.", - "A 64-bit signed integer." - ], - "type": "string" - }, - "key": { - "description": "The label key.", - "type": "string" - } - }, - "id": "LabelDescriptor" - }, - "Usage": { - "description": "Configuration controlling usage of a service.", - "type": "object", - "properties": { - "producerNotificationChannel": { - "description": "The full resource name of a channel used for sending notifications to the\nservice producer.\n\nGoogle Service Management currently only supports\n[Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification\nchannel. To use Google Cloud Pub/Sub as the channel, this must be the name\nof a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format\ndocumented in https://cloud.google.com/pubsub/docs/overview.", - "type": "string" - }, - "requirements": { - "description": "Requirements that must be satisfied before a consumer project can use the\nservice. Each requirement is of the form \u003cservice.name\u003e/\u003crequirement-id\u003e;\nfor example 'serviceusage.googleapis.com/billing-enabled'.", + "provided": { + "description": "A list of full type names of provided contexts.", "type": "array", "items": { "type": "string" } + } + }, + "id": "ContextRule", + "description": "A context rule provides information about the context for an individual API\nelement.", + "type": "object" + }, + "MetricDescriptor": { + "properties": { + "unit": { + "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", + "type": "string" }, - "rules": { - "description": "A list of usage rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "labels": { + "description": "The set of labels that can be used to describe a specific\ninstance of this metric type. For example, the\n`appengine.googleapis.com/http/server/response_latencies` metric\ntype has a label for the HTTP response code, `response_code`, so\nyou can look at latencies for successful responses or just\nfor responses that failed.", "type": "array", "items": { - "$ref": "UsageRule" + "$ref": "LabelDescriptor" } - } - }, - "id": "Usage" - }, - "Advice": { - "description": "Generated advice about this change, used for providing more\ninformation about how a change will affect the existing service.", - "type": "object", - "properties": { - "description": { - "description": "Useful description for why this advice was applied and what actions should\nbe taken to mitigate any implied risks.", - "type": "string" - } - }, - "id": "Advice" - }, - "CloudAuditOptions": { - "description": "Write a Cloud Audit log", - "type": "object", - "properties": {}, - "id": "CloudAuditOptions" - }, - "AuthRequirement": { - "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", - "type": "object", - "properties": { - "audiences": { - "description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is\nimplemented and accepted in all the runtime components.\n\nThe list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", + }, + "name": { + "type": "string", + "description": "The resource name of the metric descriptor. Depending on the\nimplementation, the name typically includes: (1) the parent resource name\nthat defines the scope of the metric type or of its data; and (2) the\nmetric's URL-encoded type, which also appears in the `type` field of this\ndescriptor. For example, following is the resource name of a custom\nmetric within the GCP project `my-project-id`:\n\n \"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"" + }, + "type": { + "description": "The metric type, including its DNS name prefix. The type is not\nURL-encoded. All user-defined custom metric types have the DNS name\n`custom.googleapis.com`. Metric types should use a natural hierarchical\ngrouping. For example:\n\n \"custom.googleapis.com/invoice/paid/amount\"\n \"appengine.googleapis.com/http/server/response_latencies\"", "type": "string" }, - "providerId": { - "description": "id from authentication provider.\n\nExample:\n\n provider_id: bookstore_auth", + "valueType": { + "enum": [ + "VALUE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "DOUBLE", + "STRING", + "DISTRIBUTION", + "MONEY" + ], + "description": "Whether the measurement is an integer, a floating-point number, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", + "type": "string", + "enumDescriptions": [ + "Do not use this default value.", + "The value is a boolean.\nThis value type can be used only if the metric kind is `GAUGE`.", + "The value is a signed 64-bit integer.", + "The value is a double precision floating point number.", + "The value is a text string.\nThis value type can be used only if the metric kind is `GAUGE`.", + "The value is a `Distribution`.", + "The value is money." + ] + }, + "metricKind": { + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ], + "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", + "type": "string", + "enumDescriptions": [ + "Do not use this default value.", + "An instantaneous measurement of a value.", + "The change in a value during a time interval.", + "A value accumulated over a time interval. Cumulative\nmeasurements in a time series should have the same start time\nand increasing end times, until an event resets the cumulative\nvalue to zero and sets a new start time for the following\npoints." + ] + }, + "displayName": { + "description": "A concise name for the metric, which can be displayed in user interfaces.\nUse sentence case without an ending period, for example \"Request count\".", + "type": "string" + }, + "description": { + "description": "A detailed description of the metric, which can be used in documentation.", "type": "string" } }, - "id": "AuthRequirement" - }, - "Control": { - "description": "Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc.", - "type": "object", - "properties": { - "environment": { - "description": "The service control environment to use. If empty, no control plane\nfeature (like quota and billing) will be enabled.", - "type": "string" - } - }, - "id": "Control" + "id": "MetricDescriptor", + "description": "Defines a metric type and its schema. Once a metric descriptor is created,\ndeleting or altering it stops data collection and makes the metric type's\nexisting data unusable.", + "type": "object" }, "SourceContext": { "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined.", @@ -2787,112 +3225,150 @@ } }, "id": "SourceContext" + }, + "ListServicesResponse": { + "description": "Response message for `ListServices` method.", + "type": "object", + "properties": { + "services": { + "description": "The returned services will only have the name field set.", + "type": "array", + "items": { + "$ref": "ManagedService" + } + }, + "nextPageToken": { + "description": "Token that can be passed to `ListServices` to resume a paginated query.", + "type": "string" + } + }, + "id": "ListServicesResponse" + }, + "Endpoint": { + "description": "`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true", + "type": "object", + "properties": { + "apis": { + "description": "The list of APIs served by this endpoint.\n\nIf no APIs are specified this translates to \"all APIs\" exported by the\nservice, as defined in the top-level service configuration.", + "type": "array", + "items": { + "type": "string" + } + }, + "allowCors": { + "description": "Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed.", + "type": "boolean" + }, + "aliases": { + "type": "array", + "items": { + "type": "string" + }, + "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on." + }, + "target": { + "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\".", + "type": "string" + }, + "name": { + "description": "The canonical name of this endpoint.", + "type": "string" + }, + "features": { + "description": "The list of features enabled on this endpoint.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "Endpoint" + }, + "OAuthRequirements": { + "description": "OAuth scopes are a way to define data and permissions on data. For example,\nthere are scopes defined for \"Read-only access to Google Calendar\" and\n\"Access to Cloud Platform\". Users can consent to a scope for an application,\ngiving it permission to access that data on their behalf.\n\nOAuth scope specifications should be fairly coarse grained; a user will need\nto see and understand the text description of what your scope means.\n\nIn most cases: use one or at most two OAuth scopes for an entire family of\nproducts. If your product has multiple APIs, you should probably be sharing\nthe OAuth scope across all of those APIs.\n\nWhen you need finer grained OAuth consent screens: talk with your product\nmanagement about how developers will use them in practice.\n\nPlease note that even though each of the canonical scopes is enough for a\nrequest to be accepted and passed to the backend, a request can still fail\ndue to the backend requiring additional scopes or permissions.", + "type": "object", + "properties": { + "canonicalScopes": { + "description": "The list of publicly documented OAuth scopes that are allowed access. An\nOAuth token containing any of these scopes will be accepted.\n\nExample:\n\n canonical_scopes: https://www.googleapis.com/auth/calendar,\n https://www.googleapis.com/auth/calendar.read", + "type": "string" + } + }, + "id": "OAuthRequirements" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed." + } + }, + "id": "TestIamPermissionsResponse" + }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, + "Usage": { + "description": "Configuration controlling usage of a service.", + "type": "object", + "properties": { + "requirements": { + "description": "Requirements that must be satisfied before a consumer project can use the\nservice. Each requirement is of the form \u003cservice.name\u003e/\u003crequirement-id\u003e;\nfor example 'serviceusage.googleapis.com/billing-enabled'.", + "type": "array", + "items": { + "type": "string" + } + }, + "producerNotificationChannel": { + "description": "The full resource name of a channel used for sending notifications to the\nservice producer.\n\nGoogle Service Management currently only supports\n[Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification\nchannel. To use Google Cloud Pub/Sub as the channel, this must be the name\nof a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format\ndocumented in https://cloud.google.com/pubsub/docs/overview.", + "type": "string" + }, + "rules": { + "description": "A list of usage rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "type": "array", + "items": { + "$ref": "UsageRule" + } + } + }, + "id": "Usage" } }, - "revision": "20161205", - "basePath": "", + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "canonicalName": "Service Management", - "discoveryVersion": "v1", + "version": "v1", "baseUrl": "https://servicemanagement.googleapis.com/", - "name": "servicemanagement", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "canonicalName": "Service Management", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/service.management": { + "description": "Manage your Google API service configuration" + }, + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/service.management.readonly": { + "description": "View your Google API service configuration" + } + } } }, - "documentationLink": "https://cloud.google.com/service-management/", - "ownerDomain": "google.com", - "batchPath": "batch", + "kind": "discovery#restDescription", "servicePath": "", - "ownerName": "Google", - "version": "v1", - "rootUrl": "https://servicemanagement.googleapis.com/", - "kind": "discovery#restDescription" + "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.", + "rootUrl": "https://servicemanagement.googleapis.com/" } diff --git a/etc/api/shared.yaml b/etc/api/shared.yaml index d508284636..ba13e237b5 100644 --- a/etc/api/shared.yaml +++ b/etc/api/shared.yaml @@ -34,6 +34,8 @@ api: - consumersurveys - script - oauth2 + # Recursive type - we don't handle cycles yet it appears + - slides terms: # how to actually do something with the API action: doit diff --git a/etc/api/sheets/v4/sheets-api.json b/etc/api/sheets/v4/sheets-api.json index cb6acb68c8..3ba4126b70 100644 --- a/etc/api/sheets/v4/sheets-api.json +++ b/etc/api/sheets/v4/sheets-api.json @@ -1,33 +1,436 @@ { - "id": "sheets:v4", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/drive.readonly": { - "description": "View the files in your Google Drive" - }, - "https://www.googleapis.com/auth/spreadsheets.readonly": { - "description": "View your Google Spreadsheets" - }, - "https://www.googleapis.com/auth/drive": { - "description": "View and manage the files in your Google Drive" - }, - "https://www.googleapis.com/auth/spreadsheets": { - "description": "View and manage your spreadsheets in Google Drive" - } - } - } - }, - "description": "Reads and writes Google Sheets.", - "protocol": "rest", "title": "Google Sheets API", + "ownerName": "Google", "resources": { "spreadsheets": { + "methods": { + "get": { + "flatPath": "v4/spreadsheets/{spreadsheetId}", + "path": "v4/spreadsheets/{spreadsheetId}", + "id": "sheets.spreadsheets.get", + "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nURL parameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.\n\nTo retrieve only subsets of the spreadsheet, use the\nranges URL parameter.\nMultiple ranges can be specified. Limiting the range will\nreturn only the portions of the spreadsheet that intersect the requested\nranges. Ranges are specified using A1 notation.", + "response": { + "$ref": "Spreadsheet" + }, + "parameterOrder": [ + "spreadsheetId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/spreadsheets.readonly" + ], + "parameters": { + "ranges": { + "location": "query", + "description": "The ranges to retrieve from the spreadsheet.", + "type": "string", + "repeated": true + }, + "includeGridData": { + "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.", + "type": "boolean", + "location": "query" + }, + "spreadsheetId": { + "location": "path", + "description": "The spreadsheet to request.", + "required": true, + "type": "string" + } + } + }, + "create": { + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "parameters": {}, + "flatPath": "v4/spreadsheets", + "id": "sheets.spreadsheets.create", + "path": "v4/spreadsheets", + "description": "Creates a spreadsheet, returning the newly created spreadsheet.", + "request": { + "$ref": "Spreadsheet" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Spreadsheet" + } + }, + "batchUpdate": { + "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate", + "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate", + "id": "sheets.spreadsheets.batchUpdate", + "request": { + "$ref": "BatchUpdateSpreadsheetRequest" + }, + "description": "Applies one or more updates to the spreadsheet.\n\nEach request is validated before\nbeing applied. If any request is not valid then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how\nthey are applied. The replies will mirror the requests. For example,\nif you applied 4 updates and the 3rd one had a reply, then the\nresponse will have 2 empty replies, the actual reply, and another empty\nreply, in that order.\n\nDue to the collaborative nature of spreadsheets, it is not guaranteed that\nthe spreadsheet will reflect exactly your changes after this completes,\nhowever it is guaranteed that the updates in the request will be\napplied together atomically. Your changes may be altered with respect to\ncollaborator changes. If there are no collaborators, the spreadsheet\nshould reflect your changes.", + "response": { + "$ref": "BatchUpdateSpreadsheetResponse" + }, + "parameterOrder": [ + "spreadsheetId" + ], + "httpMethod": "POST", + "parameters": { + "spreadsheetId": { + "required": true, + "type": "string", + "location": "path", + "description": "The spreadsheet to apply the updates to." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ] + } + }, "resources": { "values": { "methods": { + "append": { + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "parameters": { + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to update.", + "required": true, + "type": "string" + }, + "responseValueRenderOption": { + "type": "string", + "location": "query", + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" + ], + "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE." + }, + "insertDataOption": { + "location": "query", + "enum": [ + "OVERWRITE", + "INSERT_ROWS" + ], + "description": "How the input data should be inserted.", + "type": "string" + }, + "valueInputOption": { + "location": "query", + "enum": [ + "INPUT_VALUE_OPTION_UNSPECIFIED", + "RAW", + "USER_ENTERED" + ], + "description": "How the input data should be interpreted.", + "type": "string" + }, + "responseDateTimeRenderOption": { + "location": "query", + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ], + "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", + "type": "string" + }, + "includeValuesInResponse": { + "location": "query", + "description": "Determines if the update response should include the values\nof the cells that were appended. By default, responses\ndo not include the updated values.", + "type": "boolean" + }, + "range": { + "location": "path", + "description": "The A1 notation of a range to search for a logical table of data.\nValues will be appended after the last row of the table.", + "required": true, + "type": "string" + } + }, + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", + "id": "sheets.spreadsheets.values.append", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", + "description": "Appends values to a spreadsheet. The input range is used to search for\nexisting data and find a \"table\" within that range. Values will be\nappended to the next row of the table, starting with the first column of\nthe table. See the\n[guide](/sheets/api/guides/values#appending_values)\nand\n[sample code](/sheets/api/samples/writing#append_values)\nfor specific details of how tables are detected and data is appended.\n\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption. The `valueInputOption` only\ncontrols how the input data will be added to the sheet (column-wise or\nrow-wise), it does not influence what cell the data starts being written\nto.", + "request": { + "$ref": "ValueRange" + }, + "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId", + "range" + ], + "response": { + "$ref": "AppendValuesResponse" + } + }, + "batchClear": { + "parameters": { + "spreadsheetId": { + "required": true, + "type": "string", + "location": "path", + "description": "The ID of the spreadsheet to update." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear", + "id": "sheets.spreadsheets.values.batchClear", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear", + "request": { + "$ref": "BatchClearValuesRequest" + }, + "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", + "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId" + ], + "response": { + "$ref": "BatchClearValuesResponse" + } + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "spreadsheetId", + "range" + ], + "response": { + "$ref": "ValueRange" + }, + "parameters": { + "range": { + "location": "path", + "description": "The A1 notation of the values to retrieve.", + "required": true, + "type": "string" + }, + "valueRenderOption": { + "location": "query", + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" + ], + "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string" + }, + "dateTimeRenderOption": { + "type": "string", + "location": "query", + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ], + "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]." + }, + "majorDimension": { + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", + "type": "string", + "location": "query" + }, + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to retrieve data from.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/spreadsheets.readonly" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", + "id": "sheets.spreadsheets.values.get", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", + "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range." + }, + "update": { + "id": "sheets.spreadsheets.values.update", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", + "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.", + "request": { + "$ref": "ValueRange" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "spreadsheetId", + "range" + ], + "response": { + "$ref": "UpdateValuesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "parameters": { + "valueInputOption": { + "description": "How the input data should be interpreted.", + "type": "string", + "location": "query", + "enum": [ + "INPUT_VALUE_OPTION_UNSPECIFIED", + "RAW", + "USER_ENTERED" + ] + }, + "responseDateTimeRenderOption": { + "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", + "type": "string", + "location": "query", + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ] + }, + "includeValuesInResponse": { + "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values.\nIf the range to write was larger than than the range actually written,\nthe response will include all values in the requested range (excluding\ntrailing empty rows and columns).", + "type": "boolean", + "location": "query" + }, + "range": { + "location": "path", + "description": "The A1 notation of the values to update.", + "required": true, + "type": "string" + }, + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to update.", + "required": true, + "type": "string" + }, + "responseValueRenderOption": { + "type": "string", + "location": "query", + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" + ], + "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE." + } + }, + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}" + }, + "batchUpdate": { + "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges.", + "request": { + "$ref": "BatchUpdateValuesRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId" + ], + "response": { + "$ref": "BatchUpdateValuesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "parameters": { + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to update.", + "required": true, + "type": "string" + } + }, + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", + "id": "sheets.spreadsheets.values.batchUpdate", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate" + }, + "batchGet": { + "httpMethod": "GET", + "response": { + "$ref": "BatchGetValuesResponse" + }, + "parameterOrder": [ + "spreadsheetId" + ], + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/spreadsheets.readonly" + ], + "parameters": { + "valueRenderOption": { + "location": "query", + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" + ], + "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string" + }, + "dateTimeRenderOption": { + "location": "query", + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ], + "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", + "type": "string" + }, + "ranges": { + "description": "The A1 notation of the values to retrieve.", + "type": "string", + "repeated": true, + "location": "query" + }, + "majorDimension": { + "location": "query", + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", + "type": "string" + }, + "spreadsheetId": { + "description": "The ID of the spreadsheet to retrieve data from.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", + "id": "sheets.spreadsheets.values.batchGet", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", + "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges." + }, "clear": { - "id": "sheets.spreadsheets.values.clear", "response": { "$ref": "ClearValuesResponse" }, @@ -35,493 +438,1683 @@ "spreadsheetId", "range" ], - "description": "Clears values from a spreadsheet.\nThe caller must specify the spreadsheet ID and range.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", + "httpMethod": "POST", + "parameters": { + "range": { + "location": "path", + "description": "The A1 notation of the values to clear.", + "required": true, + "type": "string" + }, + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to update.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", + "id": "sheets.spreadsheets.values.clear", "request": { "$ref": "ClearValuesRequest" }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", - "httpMethod": "POST", - "parameters": { - "spreadsheetId": { - "description": "The ID of the spreadsheet to update.", - "required": true, - "location": "path", - "type": "string" - }, - "range": { - "description": "The A1 notation of the values to clear.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/spreadsheets" - ] - }, - "batchGet": { - "id": "sheets.spreadsheets.values.batchGet", - "response": { - "$ref": "BatchGetValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId" - ], - "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.", - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", - "httpMethod": "GET", - "parameters": { - "spreadsheetId": { - "description": "The ID of the spreadsheet to retrieve data from.", - "required": true, - "location": "path", - "type": "string" - }, - "ranges": { - "description": "The A1 notation of the values to retrieve.", - "repeated": true, - "location": "query", - "type": "string" - }, - "valueRenderOption": { - "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ], - "location": "query", - "type": "string" - }, - "dateTimeRenderOption": { - "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ], - "location": "query", - "type": "string" - }, - "majorDimension": { - "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "location": "query", - "type": "string" - } - }, - "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/spreadsheets.readonly" - ] - }, - "batchUpdate": { - "id": "sheets.spreadsheets.values.batchUpdate", - "response": { - "$ref": "BatchUpdateValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId" - ], - "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges.", - "request": { - "$ref": "BatchUpdateValuesRequest" - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", - "httpMethod": "POST", - "parameters": { - "spreadsheetId": { - "description": "The ID of the spreadsheet to update.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/spreadsheets" - ] - }, - "get": { - "id": "sheets.spreadsheets.values.get", - "response": { - "$ref": "ValueRange" - }, - "parameterOrder": [ - "spreadsheetId", - "range" - ], - "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.", - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "httpMethod": "GET", - "parameters": { - "spreadsheetId": { - "description": "The ID of the spreadsheet to retrieve data from.", - "required": true, - "location": "path", - "type": "string" - }, - "valueRenderOption": { - "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ], - "location": "query", - "type": "string" - }, - "dateTimeRenderOption": { - "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ], - "location": "query", - "type": "string" - }, - "range": { - "description": "The A1 notation of the values to retrieve.", - "required": true, - "location": "path", - "type": "string" - }, - "majorDimension": { - "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "location": "query", - "type": "string" - } - }, - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/spreadsheets.readonly" - ] - }, - "append": { - "id": "sheets.spreadsheets.values.append", - "response": { - "$ref": "AppendValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId", - "range" - ], - "description": "Appends values to a spreadsheet. The input range is used to search for\nexisting data and find a \"table\" within that range. Values will be\nappended to the next row of the table, starting with the first column of\nthe table. See the\n[guide](/sheets/guides/values#appending_values)\nand\n[sample code](/sheets/samples/writing#append_values)\nfor specific details of how tables are detected and data is appended.\n\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption. The `valueInputOption` only\ncontrols how the input data will be added to the sheet (column-wise or\nrow-wise), it does not influence what cell the data starts being written\nto.", - "request": { - "$ref": "ValueRange" - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", - "httpMethod": "POST", - "parameters": { - "responseValueRenderOption": { - "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ], - "location": "query", - "type": "string" - }, - "valueInputOption": { - "description": "How the input data should be interpreted.", - "enum": [ - "INPUT_VALUE_OPTION_UNSPECIFIED", - "RAW", - "USER_ENTERED" - ], - "location": "query", - "type": "string" - }, - "responseDateTimeRenderOption": { - "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ], - "location": "query", - "type": "string" - }, - "includeValuesInResponse": { - "description": "Determines if the update response should include the values\nof the cells that were appended. By default, responses\ndo not include the updated values.", - "location": "query", - "type": "boolean" - }, - "spreadsheetId": { - "description": "The ID of the spreadsheet to update.", - "required": true, - "location": "path", - "type": "string" - }, - "range": { - "description": "The A1 notation of a range to search for a logical table of data.\nValues will be appended after the last row of the table.", - "required": true, - "location": "path", - "type": "string" - }, - "insertDataOption": { - "description": "How the input data should be inserted.", - "enum": [ - "OVERWRITE", - "INSERT_ROWS" - ], - "location": "query", - "type": "string" - } - }, - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/spreadsheets" - ] - }, - "update": { - "id": "sheets.spreadsheets.values.update", - "response": { - "$ref": "UpdateValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId", - "range" - ], - "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.", - "request": { - "$ref": "ValueRange" - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "httpMethod": "PUT", - "parameters": { - "responseValueRenderOption": { - "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ], - "location": "query", - "type": "string" - }, - "valueInputOption": { - "description": "How the input data should be interpreted.", - "enum": [ - "INPUT_VALUE_OPTION_UNSPECIFIED", - "RAW", - "USER_ENTERED" - ], - "location": "query", - "type": "string" - }, - "responseDateTimeRenderOption": { - "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ], - "location": "query", - "type": "string" - }, - "includeValuesInResponse": { - "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values.\nIf the range to write was larger than than the range actually written,\nthe response will include all values in the requested range (excluding\ntrailing empty rows and columns).", - "location": "query", - "type": "boolean" - }, - "spreadsheetId": { - "description": "The ID of the spreadsheet to update.", - "required": true, - "location": "path", - "type": "string" - }, - "range": { - "description": "The A1 notation of the values to update.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/spreadsheets" - ] - }, - "batchClear": { - "id": "sheets.spreadsheets.values.batchClear", - "response": { - "$ref": "BatchClearValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId" - ], - "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", - "request": { - "$ref": "BatchClearValuesRequest" - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear", - "httpMethod": "POST", - "parameters": { - "spreadsheetId": { - "description": "The ID of the spreadsheet to update.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/spreadsheets" - ] + "description": "Clears values from a spreadsheet.\nThe caller must specify the spreadsheet ID and range.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept." } } }, "sheets": { "methods": { "copyTo": { + "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", "id": "sheets.spreadsheets.sheets.copyTo", - "response": { - "$ref": "SheetProperties" - }, - "parameterOrder": [ - "spreadsheetId", - "sheetId" - ], + "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", "description": "Copies a single sheet from a spreadsheet to another spreadsheet.\nReturns the properties of the newly created sheet.", "request": { "$ref": "CopySheetToAnotherSpreadsheetRequest" }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId", + "sheetId" + ], + "response": { + "$ref": "SheetProperties" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], "parameters": { "sheetId": { "description": "The ID of the sheet to copy.", + "format": "int32", "required": true, - "location": "path", "type": "integer", - "format": "int32" + "location": "path" }, "spreadsheetId": { - "description": "The ID of the spreadsheet containing the sheet to copy.", "required": true, + "type": "string", "location": "path", - "type": "string" + "description": "The ID of the spreadsheet containing the sheet to copy." } - }, - "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/spreadsheets" - ] + } } } } - }, - "methods": { - "create": { - "id": "sheets.spreadsheets.create", - "response": { - "$ref": "Spreadsheet" - }, - "parameterOrder": [], - "description": "Creates a spreadsheet, returning the newly created spreadsheet.", - "request": { - "$ref": "Spreadsheet" - }, - "flatPath": "v4/spreadsheets", - "httpMethod": "POST", - "parameters": {}, - "path": "v4/spreadsheets", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/spreadsheets" - ] - }, - "get": { - "id": "sheets.spreadsheets.get", - "response": { - "$ref": "Spreadsheet" - }, - "parameterOrder": [ - "spreadsheetId" - ], - "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nURL parameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.\n\nTo retrieve only subsets of the spreadsheet, use the\nranges URL parameter.\nMultiple ranges can be specified. Limiting the range will\nreturn only the portions of the spreadsheet that intersect the requested\nranges. Ranges are specified using A1 notation.", - "flatPath": "v4/spreadsheets/{spreadsheetId}", - "httpMethod": "GET", - "parameters": { - "spreadsheetId": { - "description": "The spreadsheet to request.", - "required": true, - "location": "path", - "type": "string" - }, - "ranges": { - "description": "The ranges to retrieve from the spreadsheet.", - "repeated": true, - "location": "query", - "type": "string" - }, - "includeGridData": { - "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.", - "location": "query", - "type": "boolean" - } - }, - "path": "v4/spreadsheets/{spreadsheetId}", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/spreadsheets.readonly" - ] - }, - "batchUpdate": { - "id": "sheets.spreadsheets.batchUpdate", - "response": { - "$ref": "BatchUpdateSpreadsheetResponse" - }, - "parameterOrder": [ - "spreadsheetId" - ], - "description": "Applies one or more updates to the spreadsheet.\n\nEach request is validated before\nbeing applied. If any request is not valid then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how\nthey are applied. The replies will mirror the requests. For example,\nif you applied 4 updates and the 3rd one had a reply, then the\nresponse will have 2 empty replies, the actual reply, and another empty\nreply, in that order.\n\nDue to the collaborative nature of spreadsheets, it is not guaranteed that\nthe spreadsheet will reflect exactly your changes after this completes,\nhowever it is guaranteed that the updates in the request will be\napplied together atomically. Your changes may be altered with respect to\ncollaborator changes. If there are no collaborators, the spreadsheet\nshould reflect your changes.", - "request": { - "$ref": "BatchUpdateSpreadsheetRequest" - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate", - "httpMethod": "POST", - "parameters": { - "spreadsheetId": { - "description": "The spreadsheet to apply the updates to.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/spreadsheets" - ] - } } } }, + "parameters": { + "upload_protocol": { + "type": "string", + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "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" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + } + }, + "version": "v4", + "baseUrl": "https://sheets.googleapis.com/", + "servicePath": "", + "kind": "discovery#restDescription", + "description": "Reads and writes Google Sheets.", + "basePath": "", + "id": "sheets:v4", + "documentationLink": "https://developers.google.com/sheets/", + "revision": "20170510", + "discoveryVersion": "v1", + "version_module": "True", "schemas": { + "CopySheetToAnotherSpreadsheetRequest": { + "id": "CopySheetToAnotherSpreadsheetRequest", + "description": "The request to copy a sheet across spreadsheets.", + "type": "object", + "properties": { + "destinationSpreadsheetId": { + "description": "The ID of the spreadsheet to copy the sheet to.", + "type": "string" + } + } + }, + "PivotGroupSortValueBucket": { + "properties": { + "valuesIndex": { + "description": "The offset in the PivotTable.values list which the values in this\ngrouping should be sorted by.", + "format": "int32", + "type": "integer" + }, + "buckets": { + "description": "Determines the bucket from which values are chosen to sort.\n\nFor example, in a pivot table with one row group & two column groups,\nthe row group can list up to two values. The first value corresponds\nto a value within the first column group, and the second value\ncorresponds to a value in the second column group. If no values\nare listed, this would indicate that the row should be sorted according\nto the \"Grand Total\" over the column groups. If a single value is listed,\nthis would correspond to using the \"Total\" of that bucket.", + "type": "array", + "items": { + "$ref": "ExtendedValue" + } + } + }, + "id": "PivotGroupSortValueBucket", + "description": "Information about which values in a pivot group should be used for sorting.", + "type": "object" + }, + "EmbeddedObjectPosition": { + "properties": { + "newSheet": { + "description": "If true, the embedded object will be put on a new sheet whose ID\nis chosen for you. Used only when writing.", + "type": "boolean" + }, + "sheetId": { + "description": "The sheet this is on. Set only if the embedded object\nis on its own sheet. Must be non-negative.", + "format": "int32", + "type": "integer" + }, + "overlayPosition": { + "description": "The position at which the object is overlaid on top of a grid.", + "$ref": "OverlayPosition" + } + }, + "id": "EmbeddedObjectPosition", + "description": "The position of an embedded object such as a chart.", + "type": "object" + }, + "DeleteProtectedRangeRequest": { + "type": "object", + "properties": { + "protectedRangeId": { + "description": "The ID of the protected range to delete.", + "format": "int32", + "type": "integer" + } + }, + "id": "DeleteProtectedRangeRequest", + "description": "Deletes the protected range with the given ID." + }, + "AutoFillRequest": { + "description": "Fills in more data based on existing data.", + "type": "object", + "properties": { + "range": { + "$ref": "GridRange", + "description": "The range to autofill. This will examine the range and detect\nthe location that has data and automatically fill that data\nin to the rest of the range." + }, + "useAlternateSeries": { + "description": "True if we should generate data with the \"alternate\" series.\nThis differs based on the type and amount of source data.", + "type": "boolean" + }, + "sourceAndDestination": { + "$ref": "SourceAndDestination", + "description": "The source and destination areas to autofill.\nThis explicitly lists the source of the autofill and where to\nextend that data." + } + }, + "id": "AutoFillRequest" + }, + "GradientRule": { + "type": "object", + "properties": { + "minpoint": { + "$ref": "InterpolationPoint", + "description": "The starting interpolation point." + }, + "maxpoint": { + "$ref": "InterpolationPoint", + "description": "The final interpolation point." + }, + "midpoint": { + "description": "An optional midway interpolation point.", + "$ref": "InterpolationPoint" + } + }, + "id": "GradientRule", + "description": "A rule that applies a gradient color scale format, based on\nthe interpolation points listed. The format of a cell will vary\nbased on its contents as compared to the values of the interpolation\npoints." + }, + "SetBasicFilterRequest": { + "description": "Sets the basic filter associated with a sheet.", + "type": "object", + "properties": { + "filter": { + "$ref": "BasicFilter", + "description": "The filter to set." + } + }, + "id": "SetBasicFilterRequest" + }, + "ClearValuesRequest": { + "description": "The request for clearing a range of values in a spreadsheet.", + "type": "object", + "properties": {}, + "id": "ClearValuesRequest" + }, + "InterpolationPoint": { + "properties": { + "color": { + "$ref": "Color", + "description": "The color this interpolation point should use." + }, + "type": { + "enumDescriptions": [ + "The default value, do not use.", + "The interpolation point will use the minimum value in the\ncells over the range of the conditional format.", + "The interpolation point will use the maximum value in the\ncells over the range of the conditional format.", + "The interpolation point will use exactly the value in\nInterpolationPoint.value.", + "The interpolation point will be the given percentage over\nall the cells in the range of the conditional format.\nThis is equivalent to NUMBER if the value was:\n`=(MAX(FLATTEN(range)) * (value / 100))\n + (MIN(FLATTEN(range)) * (1 - (value / 100)))`\n(where errors in the range are ignored when flattening).", + "The interpolation point will be the given percentile\nover all the cells in the range of the conditional format.\nThis is equivalent to NUMBER if the value was:\n`=PERCENTILE(FLATTEN(range), value / 100)`\n(where errors in the range are ignored when flattening)." + ], + "enum": [ + "INTERPOLATION_POINT_TYPE_UNSPECIFIED", + "MIN", + "MAX", + "NUMBER", + "PERCENT", + "PERCENTILE" + ], + "description": "How the value should be interpreted.", + "type": "string" + }, + "value": { + "description": "The value this interpolation point uses. May be a formula.\nUnused if type is MIN or\nMAX.", + "type": "string" + } + }, + "id": "InterpolationPoint", + "description": "A single interpolation point on a gradient conditional format.\nThese pin the gradient color scale according to the color,\ntype and value chosen.", + "type": "object" + }, + "FindReplaceResponse": { + "properties": { + "rowsChanged": { + "description": "The number of rows changed.", + "format": "int32", + "type": "integer" + }, + "sheetsChanged": { + "description": "The number of sheets changed.", + "format": "int32", + "type": "integer" + }, + "formulasChanged": { + "type": "integer", + "description": "The number of formula cells changed.", + "format": "int32" + }, + "valuesChanged": { + "description": "The number of non-formula cells changed.", + "format": "int32", + "type": "integer" + }, + "occurrencesChanged": { + "description": "The number of occurrences (possibly multiple within a cell) changed.\nFor example, if replacing `\"e\"` with `\"o\"` in `\"Google Sheets\"`, this would\nbe `\"3\"` because `\"Google Sheets\"` -\u003e `\"Googlo Shoots\"`.", + "format": "int32", + "type": "integer" + } + }, + "id": "FindReplaceResponse", + "description": "The result of the find/replace.", + "type": "object" + }, + "DeleteEmbeddedObjectRequest": { + "description": "Deletes the embedded object with the given ID.", + "type": "object", + "properties": { + "objectId": { + "description": "The ID of the embedded object to delete.", + "format": "int32", + "type": "integer" + } + }, + "id": "DeleteEmbeddedObjectRequest" + }, + "DuplicateFilterViewRequest": { + "properties": { + "filterId": { + "description": "The ID of the filter being duplicated.", + "format": "int32", + "type": "integer" + } + }, + "id": "DuplicateFilterViewRequest", + "description": "Duplicates a particular filter view.", + "type": "object" + }, + "DeleteSheetRequest": { + "properties": { + "sheetId": { + "description": "The ID of the sheet to delete.", + "format": "int32", + "type": "integer" + } + }, + "id": "DeleteSheetRequest", + "description": "Deletes the requested sheet.", + "type": "object" + }, + "UpdateConditionalFormatRuleResponse": { + "description": "The result of updating a conditional format rule.", + "type": "object", + "properties": { + "newIndex": { + "description": "The index of the new rule.", + "format": "int32", + "type": "integer" + }, + "oldIndex": { + "description": "The old index of the rule. Not set if a rule was replaced\n(because it is the same as new_index).", + "format": "int32", + "type": "integer" + }, + "newRule": { + "description": "The new rule that replaced the old rule (if replacing),\nor the rule that was moved (if moved)", + "$ref": "ConditionalFormatRule" + }, + "oldRule": { + "description": "The old (deleted) rule. Not set if a rule was moved\n(because it is the same as new_rule).", + "$ref": "ConditionalFormatRule" + } + }, + "id": "UpdateConditionalFormatRuleResponse" + }, + "DuplicateSheetRequest": { + "id": "DuplicateSheetRequest", + "description": "Duplicates the contents of a sheet.", + "type": "object", + "properties": { + "sourceSheetId": { + "description": "The sheet to duplicate.", + "format": "int32", + "type": "integer" + }, + "newSheetId": { + "description": "If set, the ID of the new sheet. If not set, an ID is chosen.\nIf set, the ID must not conflict with any existing sheet ID.\nIf set, it must be non-negative.", + "format": "int32", + "type": "integer" + }, + "insertSheetIndex": { + "description": "The zero-based index where the new sheet should be inserted.\nThe index of all sheets after this are incremented.", + "format": "int32", + "type": "integer" + }, + "newSheetName": { + "type": "string", + "description": "The name of the new sheet. If empty, a new name is chosen for you." + } + } + }, + "ConditionValue": { + "description": "The value of the condition.", + "type": "object", + "properties": { + "relativeDate": { + "enumDescriptions": [ + "Default value, do not use.", + "The value is one year before today.", + "The value is one month before today.", + "The value is one week before today.", + "The value is yesterday.", + "The value is today.", + "The value is tomorrow." + ], + "enum": [ + "RELATIVE_DATE_UNSPECIFIED", + "PAST_YEAR", + "PAST_MONTH", + "PAST_WEEK", + "YESTERDAY", + "TODAY", + "TOMORROW" + ], + "description": "A relative date (based on the current date).\nValid only if the type is\nDATE_BEFORE,\nDATE_AFTER,\nDATE_ON_OR_BEFORE or\nDATE_ON_OR_AFTER.\n\nRelative dates are not supported in data validation.\nThey are supported only in conditional formatting and\nconditional filters.", + "type": "string" + }, + "userEnteredValue": { + "description": "A value the condition is based on.\nThe value will be parsed as if the user typed into a cell.\nFormulas are supported (and must begin with an `=`).", + "type": "string" + } + }, + "id": "ConditionValue" + }, + "ExtendedValue": { + "description": "The kinds of value that a cell in a spreadsheet can have.", + "type": "object", + "properties": { + "numberValue": { + "description": "Represents a double value.\nNote: Dates, Times and DateTimes are represented as doubles in\n\"serial number\" format.", + "format": "double", + "type": "number" + }, + "errorValue": { + "$ref": "ErrorValue", + "description": "Represents an error.\nThis field is read-only." + }, + "stringValue": { + "description": "Represents a string value.\nLeading single quotes are not included. For example, if the user typed\n`'123` into the UI, this would be represented as a `stringValue` of\n`\"123\"`.", + "type": "string" + }, + "boolValue": { + "description": "Represents a boolean value.", + "type": "boolean" + }, + "formulaValue": { + "description": "Represents a formula.", + "type": "string" + } + }, + "id": "ExtendedValue" + }, + "AddChartRequest": { + "properties": { + "chart": { + "$ref": "EmbeddedChart", + "description": "The chart that should be added to the spreadsheet, including the position\nwhere it should be placed. The chartId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a chart that already exists.)" + } + }, + "id": "AddChartRequest", + "description": "Adds a chart to a sheet in the spreadsheet.", + "type": "object" + }, + "Spreadsheet": { + "description": "Resource that represents a spreadsheet.", + "type": "object", + "properties": { + "properties": { + "$ref": "SpreadsheetProperties", + "description": "Overall properties of a spreadsheet." + }, + "spreadsheetId": { + "description": "The ID of the spreadsheet.\nThis field is read-only.", + "type": "string" + }, + "sheets": { + "description": "The sheets that are part of a spreadsheet.", + "type": "array", + "items": { + "$ref": "Sheet" + } + }, + "namedRanges": { + "description": "The named ranges defined in a spreadsheet.", + "type": "array", + "items": { + "$ref": "NamedRange" + } + }, + "spreadsheetUrl": { + "description": "The url of the spreadsheet.\nThis field is read-only.", + "type": "string" + } + }, + "id": "Spreadsheet" + }, + "BatchClearValuesResponse": { + "description": "The response when clearing a range of values in a spreadsheet.", + "type": "object", + "properties": { + "clearedRanges": { + "description": "The ranges that were cleared, in A1 notation.\n(If the requests were for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual ranges\n that were cleared, bounded to the sheet's limits.)", + "type": "array", + "items": { + "type": "string" + } + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + } + }, + "id": "BatchClearValuesResponse" + }, + "BandedRange": { + "description": "A banded (alternating colors) range in a sheet.", + "type": "object", + "properties": { + "rowProperties": { + "$ref": "BandingProperties", + "description": "Properties for row bands. These properties will be applied on a row-by-row\nbasis throughout all the rows in the range. At least one of\nrow_properties or column_properties must be specified." + }, + "columnProperties": { + "description": "Properties for column bands. These properties will be applied on a column-\nby-column basis throughout all the columns in the range. At least one of\nrow_properties or column_properties must be specified.", + "$ref": "BandingProperties" + }, + "range": { + "$ref": "GridRange", + "description": "The range over which these properties are applied." + }, + "bandedRangeId": { + "description": "The id of the banded range.", + "format": "int32", + "type": "integer" + } + }, + "id": "BandedRange" + }, + "UpdateProtectedRangeRequest": { + "description": "Updates an existing protected range with the specified\nprotectedRangeId.", + "type": "object", + "properties": { + "protectedRange": { + "$ref": "ProtectedRange", + "description": "The protected range to update with the new properties." + }, + "fields": { + "description": "The fields that should be updated. At least one field must be specified.\nThe root `protectedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "id": "UpdateProtectedRangeRequest" + }, + "TextFormat": { + "description": "The format of a run of text in a cell.\nAbsent values indicate that the field isn't specified.", + "type": "object", + "properties": { + "italic": { + "description": "True if the text is italicized.", + "type": "boolean" + }, + "strikethrough": { + "description": "True if the text has a strikethrough.", + "type": "boolean" + }, + "fontSize": { + "description": "The size of the font.", + "format": "int32", + "type": "integer" + }, + "underline": { + "description": "True if the text is underlined.", + "type": "boolean" + }, + "foregroundColor": { + "$ref": "Color", + "description": "The foreground color of the text." + }, + "bold": { + "description": "True if the text is bold.", + "type": "boolean" + }, + "fontFamily": { + "description": "The font family.", + "type": "string" + } + }, + "id": "TextFormat" + }, + "AddSheetResponse": { + "description": "The result of adding a sheet.", + "type": "object", + "properties": { + "properties": { + "$ref": "SheetProperties", + "description": "The properties of the newly added sheet." + } + }, + "id": "AddSheetResponse" + }, + "AddFilterViewResponse": { + "type": "object", + "properties": { + "filter": { + "$ref": "FilterView", + "description": "The newly added filter view." + } + }, + "id": "AddFilterViewResponse", + "description": "The result of adding a filter view." + }, + "IterativeCalculationSettings": { + "description": "Settings to control how circular dependencies are resolved with iterative\ncalculation.", + "type": "object", + "properties": { + "maxIterations": { + "description": "When iterative calculation is enabled, the maximum number of calculation\nrounds to perform.", + "format": "int32", + "type": "integer" + }, + "convergenceThreshold": { + "description": "When iterative calculation is enabled and successive results differ by\nless than this threshold value, the calculation rounds stop.", + "format": "double", + "type": "number" + } + }, + "id": "IterativeCalculationSettings" + }, + "SpreadsheetProperties": { + "description": "Properties of a spreadsheet.", + "type": "object", + "properties": { + "defaultFormat": { + "description": "The default format of all cells in the spreadsheet.\nCellData.effectiveFormat will not be set if the\ncell's format is equal to this default format.\nThis field is read-only.", + "$ref": "CellFormat" + }, + "autoRecalc": { + "enumDescriptions": [ + "Default value. This value must not be used.", + "Volatile functions are updated on every change.", + "Volatile functions are updated on every change and every minute.", + "Volatile functions are updated on every change and hourly." + ], + "enum": [ + "RECALCULATION_INTERVAL_UNSPECIFIED", + "ON_CHANGE", + "MINUTE", + "HOUR" + ], + "description": "The amount of time to wait before volatile functions are recalculated.", + "type": "string" + }, + "title": { + "description": "The title of the spreadsheet.", + "type": "string" + }, + "timeZone": { + "description": "The time zone of the spreadsheet, in CLDR format such as\n`America/New_York`. If the time zone isn't recognized, this may\nbe a custom time zone such as `GMT-07:00`.", + "type": "string" + }, + "locale": { + "description": "The locale of the spreadsheet in one of the following formats:\n\n* an ISO 639-1 language code such as `en`\n\n* an ISO 639-2 language code such as `fil`, if no 639-1 code exists\n\n* a combination of the ISO language code and country code, such as `en_US`\n\nNote: when updating this field, not all locales/languages are supported.", + "type": "string" + }, + "iterativeCalculationSettings": { + "description": "Determines whether and how circular references are resolved with iterative\ncalculation. Absence of this field means that circular references will\nresult in calculation errors.", + "$ref": "IterativeCalculationSettings" + } + }, + "id": "SpreadsheetProperties" + }, + "OverlayPosition": { + "description": "The location an object is overlaid on top of a grid.", + "type": "object", + "properties": { + "anchorCell": { + "$ref": "GridCoordinate", + "description": "The cell the object is anchored to." + }, + "offsetYPixels": { + "description": "The vertical offset, in pixels, that the object is offset\nfrom the anchor cell.", + "format": "int32", + "type": "integer" + }, + "heightPixels": { + "description": "The height of the object, in pixels. Defaults to 371.", + "format": "int32", + "type": "integer" + }, + "widthPixels": { + "description": "The width of the object, in pixels. Defaults to 600.", + "format": "int32", + "type": "integer" + }, + "offsetXPixels": { + "type": "integer", + "description": "The horizontal offset, in pixels, that the object is offset\nfrom the anchor cell.", + "format": "int32" + } + }, + "id": "OverlayPosition" + }, + "RepeatCellRequest": { + "id": "RepeatCellRequest", + "description": "Updates all cells in the range to the values in the given Cell object.\nOnly the fields listed in the fields field are updated; others are\nunchanged.\n\nIf writing a cell with a formula, the formula's ranges will automatically\nincrement for each field in the range.\nFor example, if writing a cell with formula `=A1` into range B2:C4,\nB2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,\nC2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.\n\nTo keep the formula's ranges static, use the `$` indicator.\nFor example, use the formula `=$A$1` to prevent both the row and the\ncolumn from incrementing.", + "type": "object", + "properties": { + "range": { + "description": "The range to repeat the cell in.", + "$ref": "GridRange" + }, + "fields": { + "description": "The fields that should be updated. At least one field must be specified.\nThe root `cell` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", + "type": "string" + }, + "cell": { + "$ref": "CellData", + "description": "The data to write." + } + } + }, + "AddChartResponse": { + "description": "The result of adding a chart to a spreadsheet.", + "type": "object", + "properties": { + "chart": { + "description": "The newly added chart.", + "$ref": "EmbeddedChart" + } + }, + "id": "AddChartResponse" + }, + "InsertDimensionRequest": { + "id": "InsertDimensionRequest", + "description": "Inserts rows or columns in a sheet at a particular index.", + "type": "object", + "properties": { + "inheritFromBefore": { + "description": "Whether dimension properties should be extended from the dimensions\nbefore or after the newly inserted dimensions.\nTrue to inherit from the dimensions before (in which case the start\nindex must be greater than 0), and false to inherit from the dimensions\nafter.\n\nFor example, if row index 0 has red background and row index 1\nhas a green background, then inserting 2 rows at index 1 can inherit\neither the green or red background. If `inheritFromBefore` is true,\nthe two new rows will be red (because the row before the insertion point\nwas red), whereas if `inheritFromBefore` is false, the two new rows will\nbe green (because the row after the insertion point was green).", + "type": "boolean" + }, + "range": { + "description": "The dimensions to insert. Both the start and end indexes must be bounded.", + "$ref": "DimensionRange" + } + } + }, + "UpdateSpreadsheetPropertiesRequest": { + "description": "Updates properties of a spreadsheet.", + "type": "object", + "properties": { + "properties": { + "$ref": "SpreadsheetProperties", + "description": "The properties to update." + }, + "fields": { + "description": "The fields that should be updated. At least one field must be specified.\nThe root 'properties' is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "id": "UpdateSpreadsheetPropertiesRequest" + }, + "ProtectedRange": { + "description": "A protected range.", + "type": "object", + "properties": { + "unprotectedRanges": { + "description": "The list of unprotected ranges within a protected sheet.\nUnprotected ranges are only supported on protected sheets.", + "type": "array", + "items": { + "$ref": "GridRange" + } + }, + "namedRangeId": { + "description": "The named range this protected range is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", + "type": "string" + }, + "protectedRangeId": { + "description": "The ID of the protected range.\nThis field is read-only.", + "format": "int32", + "type": "integer" + }, + "warningOnly": { + "description": "True if this protected range will show a warning when editing.\nWarning-based protection means that every user can edit data in the\nprotected range, except editing will prompt a warning asking the user\nto confirm the edit.\n\nWhen writing: if this field is true, then editors is ignored.\nAdditionally, if this field is changed from true to false and the\n`editors` field is not set (nor included in the field mask), then\nthe editors will be set to all the editors in the document.", + "type": "boolean" + }, + "requestingUserCanEdit": { + "description": "True if the user who requested this protected range can edit the\nprotected area.\nThis field is read-only.", + "type": "boolean" + }, + "range": { + "description": "The range that is being protected.\nThe range may be fully unbounded, in which case this is considered\na protected sheet.\n\nWhen writing, only one of range or named_range_id\nmay be set.", + "$ref": "GridRange" + }, + "editors": { + "$ref": "Editors", + "description": "The users and groups with edit access to the protected range.\nThis field is only visible to users with edit access to the protected\nrange and the document.\nEditors are not supported with warning_only protection." + }, + "description": { + "description": "The description of this protected range.", + "type": "string" + } + }, + "id": "ProtectedRange" + }, + "BatchUpdateValuesRequest": { + "description": "The request for updating more than one range of values in a spreadsheet.", + "type": "object", + "properties": { + "responseValueRenderOption": { + "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string", + "enumDescriptions": [ + "Values will be calculated & formatted in the reply according to the\ncell's formatting. Formatting is based on the spreadsheet's locale,\nnot the requesting user's locale.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return `\"$1.23\"`.", + "Values will be calculated, but not formatted in the reply.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return the number `1.23`.", + "Values will not be calculated. The reply will include the formulas.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen A2 would return `\"=A1\"`." + ], + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" + ] + }, + "includeValuesInResponse": { + "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values. The `updatedData` field within\neach of the BatchUpdateValuesResponse.responses will contain\nthe updated values. If the range to write was larger than than the range\nactually written, the response will include all values in the requested\nrange (excluding trailing empty rows and columns).", + "type": "boolean" + }, + "valueInputOption": { + "description": "How the input data should be interpreted.", + "type": "string", + "enumDescriptions": [ + "Default input value. This value must not be used.", + "The values the user has entered will not be parsed and will be stored\nas-is.", + "The values will be parsed as if the user typed them into the UI.\nNumbers will stay as numbers, but strings may be converted to numbers,\ndates, etc. following the same rules that are applied when entering\ntext into a cell via the Google Sheets UI." + ], + "enum": [ + "INPUT_VALUE_OPTION_UNSPECIFIED", + "RAW", + "USER_ENTERED" + ] + }, + "data": { + "description": "The new values to apply to the spreadsheet.", + "type": "array", + "items": { + "$ref": "ValueRange" + } + }, + "responseDateTimeRenderOption": { + "enumDescriptions": [ + "Instructs date, time, datetime, and duration fields to be output\nas doubles in \"serial number\" format, as popularized by Lotus 1-2-3.\nThe whole number portion of the value (left of the decimal) counts\nthe days since December 30th 1899. The fractional portion (right of\nthe decimal) counts the time as a fraction of the day. For example,\nJanuary 1st 1900 at noon would be 2.5, 2 because it's 2 days after\nDecember 30st 1899, and .5 because noon is half a day. February 1st\n1900 at 3pm would be 33.625. This correctly treats the year 1900 as\nnot a leap year.", + "Instructs date, time, datetime, and duration fields to be output\nas strings in their given number format (which is dependent\non the spreadsheet locale)." + ], + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ], + "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", + "type": "string" + } + }, + "id": "BatchUpdateValuesRequest" + }, + "DimensionProperties": { + "id": "DimensionProperties", + "description": "Properties about a dimension.", + "type": "object", + "properties": { + "pixelSize": { + "description": "The height (if a row) or width (if a column) of the dimension in pixels.", + "format": "int32", + "type": "integer" + }, + "hiddenByFilter": { + "description": "True if this dimension is being filtered.\nThis field is read-only.", + "type": "boolean" + }, + "hiddenByUser": { + "description": "True if this dimension is explicitly hidden.", + "type": "boolean" + } + } + }, + "DimensionRange": { + "description": "A range along a single dimension on a sheet.\nAll indexes are zero-based.\nIndexes are half open: the start index is inclusive\nand the end index is exclusive.\nMissing indexes indicate the range is unbounded on that side.", + "type": "object", + "properties": { + "startIndex": { + "type": "integer", + "description": "The start (inclusive) of the span, or not set if unbounded.", + "format": "int32" + }, + "endIndex": { + "description": "The end (exclusive) of the span, or not set if unbounded.", + "format": "int32", + "type": "integer" + }, + "sheetId": { + "description": "The sheet this span is on.", + "format": "int32", + "type": "integer" + }, + "dimension": { + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The dimension of the span.", + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ] + } + }, + "id": "DimensionRange" + }, + "NamedRange": { + "id": "NamedRange", + "description": "A named range.", + "type": "object", + "properties": { + "name": { + "description": "The name of the named range.", + "type": "string" + }, + "namedRangeId": { + "description": "The ID of the named range.", + "type": "string" + }, + "range": { + "description": "The range this represents.", + "$ref": "GridRange" + } + } + }, + "CutPasteRequest": { + "id": "CutPasteRequest", + "description": "Moves data from the source to the destination.", + "type": "object", + "properties": { + "source": { + "description": "The source data to cut.", + "$ref": "GridRange" + }, + "pasteType": { + "enum": [ + "PASTE_NORMAL", + "PASTE_VALUES", + "PASTE_FORMAT", + "PASTE_NO_BORDERS", + "PASTE_FORMULA", + "PASTE_DATA_VALIDATION", + "PASTE_CONDITIONAL_FORMATTING" + ], + "description": "What kind of data to paste. All the source data will be cut, regardless\nof what is pasted.", + "type": "string", + "enumDescriptions": [ + "Paste values, formulas, formats, and merges.", + "Paste the values ONLY without formats, formulas, or merges.", + "Paste the format and data validation only.", + "Like PASTE_NORMAL but without borders.", + "Paste the formulas only.", + "Paste the data validation only.", + "Paste the conditional formatting rules only." + ] + }, + "destination": { + "$ref": "GridCoordinate", + "description": "The top-left coordinate where the data should be pasted." + } + } + }, + "BasicChartSeries": { + "description": "A single series of data in a chart.\nFor example, if charting stock prices over time, multiple series may exist,\none for the \"Open Price\", \"High Price\", \"Low Price\" and \"Close Price\".", + "type": "object", + "properties": { + "targetAxis": { + "description": "The minor axis that will specify the range of values for this series.\nFor example, if charting stocks over time, the \"Volume\" series\nmay want to be pinned to the right with the prices pinned to the left,\nbecause the scale of trading volume is different than the scale of\nprices.\nIt is an error to specify an axis that isn't a valid minor axis\nfor the chart's type.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", + "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", + "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." + ], + "enum": [ + "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", + "BOTTOM_AXIS", + "LEFT_AXIS", + "RIGHT_AXIS" + ] + }, + "series": { + "$ref": "ChartData", + "description": "The data being visualized in this chart series." + }, + "type": { + "enumDescriptions": [ + "Default value, do not use.", + "A \u003ca href=\"/chart/interactive/docs/gallery/barchart\"\u003ebar chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/linechart\"\u003eline chart\u003c/a\u003e.", + "An \u003ca href=\"/chart/interactive/docs/gallery/areachart\"\u003earea chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/columnchart\"\u003ecolumn chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/scatterchart\"\u003escatter chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/combochart\"\u003ecombo chart\u003c/a\u003e." + ], + "enum": [ + "BASIC_CHART_TYPE_UNSPECIFIED", + "BAR", + "LINE", + "AREA", + "COLUMN", + "SCATTER", + "COMBO" + ], + "description": "The type of this series. Valid only if the\nchartType is\nCOMBO.\nDifferent types will change the way the series is visualized.\nOnly LINE, AREA,\nand COLUMN are supported.", + "type": "string" + } + }, + "id": "BasicChartSeries" + }, + "Borders": { + "description": "The borders of the cell.", + "type": "object", + "properties": { + "bottom": { + "$ref": "Border", + "description": "The bottom border of the cell." + }, + "top": { + "$ref": "Border", + "description": "The top border of the cell." + }, + "left": { + "$ref": "Border", + "description": "The left border of the cell." + }, + "right": { + "description": "The right border of the cell.", + "$ref": "Border" + } + }, + "id": "Borders" + }, + "AutoResizeDimensionsRequest": { + "properties": { + "dimensions": { + "$ref": "DimensionRange", + "description": "The dimensions to automatically resize.\nOnly COLUMNS are supported." + } + }, + "id": "AutoResizeDimensionsRequest", + "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension.", + "type": "object" + }, + "UpdateBordersRequest": { + "description": "Updates the borders of a range.\nIf a field is not set in the request, that means the border remains as-is.\nFor example, with two subsequent UpdateBordersRequest:\n\n 1. range: A1:A5 `{ top: RED, bottom: WHITE }`\n 2. range: A1:A5 `{ left: BLUE }`\n\nThat would result in A1:A5 having a borders of\n`{ top: RED, bottom: WHITE, left: BLUE }`.\nIf you want to clear a border, explicitly set the style to\nNONE.", + "type": "object", + "properties": { + "innerVertical": { + "$ref": "Border", + "description": "The vertical border to put within the range." + }, + "right": { + "description": "The border to put at the right of the range.", + "$ref": "Border" + }, + "range": { + "$ref": "GridRange", + "description": "The range whose borders should be updated." + }, + "innerHorizontal": { + "$ref": "Border", + "description": "The horizontal border to put within the range." + }, + "top": { + "$ref": "Border", + "description": "The border to put at the top of the range." + }, + "left": { + "$ref": "Border", + "description": "The border to put at the left of the range." + }, + "bottom": { + "$ref": "Border", + "description": "The border to put at the bottom of the range." + } + }, + "id": "UpdateBordersRequest" + }, + "CellFormat": { + "properties": { + "textRotation": { + "$ref": "TextRotation", + "description": "The rotation applied to text in a cell" + }, + "wrapStrategy": { + "enumDescriptions": [ + "The default value, do not use.", + "Lines that are longer than the cell width will be written in the next\ncell over, so long as that cell is empty. If the next cell over is\nnon-empty, this behaves the same as CLIP. The text will never wrap\nto the next line unless the user manually inserts a new line.\nExample:\n\n | First sentence. |\n | Manual newline that is very long. \u003c- Text continues into next cell\n | Next newline. |", + "This wrap strategy represents the old Google Sheets wrap strategy where\nwords that are longer than a line are clipped rather than broken. This\nstrategy is not supported on all platforms and is being phased out.\nExample:\n\n | Cell has a |\n | loooooooooo| \u003c- Word is clipped.\n | word. |", + "Lines that are longer than the cell width will be clipped.\nThe text will never wrap to the next line unless the user manually\ninserts a new line.\nExample:\n\n | First sentence. |\n | Manual newline t| \u003c- Text is clipped\n | Next newline. |", + "Words that are longer than a line are wrapped at the character level\nrather than clipped.\nExample:\n\n | Cell has a |\n | loooooooooo| \u003c- Word is broken.\n | ong word. |" + ], + "enum": [ + "WRAP_STRATEGY_UNSPECIFIED", + "OVERFLOW_CELL", + "LEGACY_WRAP", + "CLIP", + "WRAP" + ], + "description": "The wrap strategy for the value in the cell.", + "type": "string" + }, + "numberFormat": { + "$ref": "NumberFormat", + "description": "A format describing how number values should be represented to the user." + }, + "hyperlinkDisplayType": { + "enumDescriptions": [ + "The default value: the hyperlink is rendered. Do not use this.", + "A hyperlink should be explicitly rendered.", + "A hyperlink should not be rendered." + ], + "enum": [ + "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED", + "LINKED", + "PLAIN_TEXT" + ], + "description": "How a hyperlink, if it exists, should be displayed in the cell.", + "type": "string" + }, + "horizontalAlignment": { + "type": "string", + "enumDescriptions": [ + "The horizontal alignment is not specified. Do not use this.", + "The text is explicitly aligned to the left of the cell.", + "The text is explicitly aligned to the center of the cell.", + "The text is explicitly aligned to the right of the cell." + ], + "enum": [ + "HORIZONTAL_ALIGN_UNSPECIFIED", + "LEFT", + "CENTER", + "RIGHT" + ], + "description": "The horizontal alignment of the value in the cell." + }, + "textFormat": { + "description": "The format of the text in the cell (unless overridden by a format run).", + "$ref": "TextFormat" + }, + "backgroundColor": { + "description": "The background color of the cell.", + "$ref": "Color" + }, + "padding": { + "description": "The padding of the cell.", + "$ref": "Padding" + }, + "verticalAlignment": { + "description": "The vertical alignment of the value in the cell.", + "type": "string", + "enumDescriptions": [ + "The vertical alignment is not specified. Do not use this.", + "The text is explicitly aligned to the top of the cell.", + "The text is explicitly aligned to the middle of the cell.", + "The text is explicitly aligned to the bottom of the cell." + ], + "enum": [ + "VERTICAL_ALIGN_UNSPECIFIED", + "TOP", + "MIDDLE", + "BOTTOM" + ] + }, + "borders": { + "$ref": "Borders", + "description": "The borders of the cell." + }, + "textDirection": { + "description": "The direction of the text in the cell.", + "type": "string", + "enumDescriptions": [ + "The text direction is not specified. Do not use this.", + "The text direction of left-to-right was set by the user.", + "The text direction of right-to-left was set by the user." + ], + "enum": [ + "TEXT_DIRECTION_UNSPECIFIED", + "LEFT_TO_RIGHT", + "RIGHT_TO_LEFT" + ] + } + }, + "id": "CellFormat", + "description": "The format of a cell.", + "type": "object" + }, + "ClearValuesResponse": { + "description": "The response when clearing a range of values in a spreadsheet.", + "type": "object", + "properties": { + "clearedRange": { + "description": "The range (in A1 notation) that was cleared.\n(If the request was for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual range\n that was cleared, bounded to the sheet's limits.)", + "type": "string" + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + } + }, + "id": "ClearValuesResponse" + }, + "DeleteConditionalFormatRuleRequest": { + "description": "Deletes a conditional format rule at the given index.\nAll subsequent rules' indexes are decremented.", + "type": "object", + "properties": { + "sheetId": { + "description": "The sheet the rule is being deleted from.", + "format": "int32", + "type": "integer" + }, + "index": { + "description": "The zero-based index of the rule to be deleted.", + "format": "int32", + "type": "integer" + } + }, + "id": "DeleteConditionalFormatRuleRequest" + }, + "AddBandingResponse": { + "description": "The result of adding a banded range.", + "type": "object", + "properties": { + "bandedRange": { + "$ref": "BandedRange", + "description": "The banded range that was added." + } + }, + "id": "AddBandingResponse" + }, + "DeleteNamedRangeRequest": { + "description": "Removes the named range with the given ID from the spreadsheet.", + "type": "object", + "properties": { + "namedRangeId": { + "description": "The ID of the named range to delete.", + "type": "string" + } + }, + "id": "DeleteNamedRangeRequest" + }, + "ChartData": { + "description": "The data included in a domain or series.", + "type": "object", + "properties": { + "sourceRange": { + "$ref": "ChartSourceRange", + "description": "The source ranges of the data." + } + }, + "id": "ChartData" + }, + "BatchGetValuesResponse": { + "description": "The response when retrieving more than one range of values in a spreadsheet.", + "type": "object", + "properties": { + "valueRanges": { + "description": "The requested values. The order of the ValueRanges is the same as the\norder of the requested ranges.", + "type": "array", + "items": { + "$ref": "ValueRange" + } + }, + "spreadsheetId": { + "description": "The ID of the spreadsheet the data was retrieved from.", + "type": "string" + } + }, + "id": "BatchGetValuesResponse" + }, + "UpdateBandingRequest": { + "id": "UpdateBandingRequest", + "description": "Updates properties of the supplied banded range.", + "type": "object", + "properties": { + "fields": { + "description": "The fields that should be updated. At least one field must be specified.\nThe root `bandedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", + "type": "string" + }, + "bandedRange": { + "$ref": "BandedRange", + "description": "The banded range to update with the new properties." + } + } + }, + "Color": { + "description": "Represents a color in the RGBA color space. This representation is designed\nfor simplicity of conversion to/from color representations in various\nlanguages over compactness; for example, the fields of this representation\ncan be trivially provided to the constructor of \"java.awt.Color\" in Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily formatted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha \u003c= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(red, green, blue) {\n var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i \u003c missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...", + "type": "object", + "properties": { + "green": { + "description": "The amount of green in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "blue": { + "type": "number", + "description": "The amount of blue in the color as a value in the interval [0, 1].", + "format": "float" + }, + "alpha": { + "description": "The fraction of this color that should be applied to the pixel. That is,\nthe final pixel color is defined by the equation:\n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color. This\nuses a wrapper message rather than a simple float scalar so that it is\npossible to distinguish between a default value and the value being unset.\nIf omitted, this color object is to be rendered as a solid color\n(as if the alpha value had been explicitly given with a value of 1.0).", + "format": "float", + "type": "number" + }, + "red": { + "description": "The amount of red in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + } + }, + "id": "Color" + }, + "PivotGroup": { + "description": "A single grouping (either row or column) in a pivot table.", + "type": "object", + "properties": { + "sortOrder": { + "enum": [ + "SORT_ORDER_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ], + "description": "The order the values in this group should be sorted.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use this.", + "Sort ascending.", + "Sort descending." + ] + }, + "valueBucket": { + "description": "The bucket of the opposite pivot group to sort by.\nIf not specified, sorting is alphabetical by this group's values.", + "$ref": "PivotGroupSortValueBucket" + }, + "sourceColumnOffset": { + "description": "The column offset of the source range that this grouping is based on.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this group refers to column `C`, whereas the offset `1` would refer\nto column `D`.", + "format": "int32", + "type": "integer" + }, + "showTotals": { + "description": "True if the pivot table should include the totals for this grouping.", + "type": "boolean" + }, + "valueMetadata": { + "description": "Metadata about values in the grouping.", + "type": "array", + "items": { + "$ref": "PivotGroupValueMetadata" + } + } + }, + "id": "PivotGroup" + }, + "PivotTable": { + "description": "A pivot table.", + "type": "object", + "properties": { + "criteria": { + "additionalProperties": { + "$ref": "PivotFilterCriteria" + }, + "description": "An optional mapping of filters per source column offset.\n\nThe filters will be applied before aggregating data into the pivot table.\nThe map's key is the column offset of the source range that you want to\nfilter, and the value is the criteria for that column.\n\nFor example, if the source was `C10:E15`, a key of `0` will have the filter\nfor column `C`, whereas the key `1` is for column `D`.", + "type": "object" + }, + "rows": { + "description": "Each row grouping in the pivot table.", + "type": "array", + "items": { + "$ref": "PivotGroup" + } + }, + "valueLayout": { + "enumDescriptions": [ + "Values are laid out horizontally (as columns).", + "Values are laid out vertically (as rows)." + ], + "enum": [ + "HORIZONTAL", + "VERTICAL" + ], + "description": "Whether values should be listed horizontally (as columns)\nor vertically (as rows).", + "type": "string" + }, + "source": { + "$ref": "GridRange", + "description": "The range the pivot table is reading data from." + }, + "columns": { + "type": "array", + "items": { + "$ref": "PivotGroup" + }, + "description": "Each column grouping in the pivot table." + }, + "values": { + "description": "A list of values to include in the pivot table.", + "type": "array", + "items": { + "$ref": "PivotValue" + } + } + }, + "id": "PivotTable" + }, + "ChartSourceRange": { + "properties": { + "sources": { + "description": "The ranges of data for a series or domain.\nExactly one dimension must have a length of 1,\nand all sources in the list must have the same dimension\nwith length 1.\nThe domain (if it exists) & all series must have the same number\nof source ranges. If using more than one source range, then the source\nrange at a given offset must be contiguous across the domain and series.\n\nFor example, these are valid configurations:\n\n domain sources: A1:A5\n series1 sources: B1:B5\n series2 sources: D6:D10\n\n domain sources: A1:A5, C10:C12\n series1 sources: B1:B5, D10:D12\n series2 sources: C1:C5, E10:E12", + "type": "array", + "items": { + "$ref": "GridRange" + } + } + }, + "id": "ChartSourceRange", + "description": "Source ranges for a chart.", + "type": "object" + }, + "AppendCellsRequest": { + "description": "Adds new cells after the last row with data in a sheet,\ninserting new rows into the sheet if necessary.", + "type": "object", + "properties": { + "rows": { + "description": "The data to append.", + "type": "array", + "items": { + "$ref": "RowData" + } + }, + "fields": { + "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", + "type": "string" + }, + "sheetId": { + "description": "The sheet ID to append the data to.", + "format": "int32", + "type": "integer" + } + }, + "id": "AppendCellsRequest" + }, + "ValueRange": { + "id": "ValueRange", + "description": "Data within a range of the spreadsheet.", + "type": "object", + "properties": { + "majorDimension": { + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The major dimension of the values.\n\nFor output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.\n\nFor input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`\nwill set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`\nthen `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.\n\nWhen writing, if this field is not set, it defaults to ROWS.", + "type": "string" + }, + "values": { + "description": "The data that was read or to be written. This is an array of arrays,\nthe outer array representing all the data and each inner array\nrepresenting a major dimension. Each item in the inner array\ncorresponds with one cell.\n\nFor output, empty trailing rows and columns will not be included.\n\nFor input, supported value types are: bool, string, and double.\nNull values will be skipped.\nTo set a cell to an empty value, set the string value to an empty string.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "any" + } + } + }, + "range": { + "description": "The range the values cover, in A1 notation.\nFor output, this range indicates the entire requested range,\neven though the values will exclude trailing rows and columns.\nWhen appending values, this field represents the range to search for a\ntable, after which values will be appended.", + "type": "string" + } + } + }, + "AddBandingRequest": { + "id": "AddBandingRequest", + "description": "Adds a new banded range to the spreadsheet.", + "type": "object", + "properties": { + "bandedRange": { + "description": "The banded range to add. The bandedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)", + "$ref": "BandedRange" + } + } + }, + "Response": { + "description": "A single response from an update.", + "type": "object", + "properties": { + "addSheet": { + "$ref": "AddSheetResponse", + "description": "A reply from adding a sheet." + }, + "updateConditionalFormatRule": { + "description": "A reply from updating a conditional format rule.", + "$ref": "UpdateConditionalFormatRuleResponse" + }, + "addNamedRange": { + "description": "A reply from adding a named range.", + "$ref": "AddNamedRangeResponse" + }, + "addFilterView": { + "description": "A reply from adding a filter view.", + "$ref": "AddFilterViewResponse" + }, + "addBanding": { + "description": "A reply from adding a banded range.", + "$ref": "AddBandingResponse" + }, + "addProtectedRange": { + "description": "A reply from adding a protected range.", + "$ref": "AddProtectedRangeResponse" + }, + "duplicateSheet": { + "description": "A reply from duplicating a sheet.", + "$ref": "DuplicateSheetResponse" + }, + "updateEmbeddedObjectPosition": { + "$ref": "UpdateEmbeddedObjectPositionResponse", + "description": "A reply from updating an embedded object's position." + }, + "deleteConditionalFormatRule": { + "$ref": "DeleteConditionalFormatRuleResponse", + "description": "A reply from deleting a conditional format rule." + }, + "duplicateFilterView": { + "$ref": "DuplicateFilterViewResponse", + "description": "A reply from duplicating a filter view." + }, + "addChart": { + "description": "A reply from adding a chart.", + "$ref": "AddChartResponse" + }, + "findReplace": { + "$ref": "FindReplaceResponse", + "description": "A reply from doing a find/replace." + } + }, + "id": "Response" + }, + "InsertRangeRequest": { + "description": "Inserts cells into a range, shifting the existing cells over or down.", + "type": "object", + "properties": { + "range": { + "$ref": "GridRange", + "description": "The range to insert new cells into." + }, + "shiftDimension": { + "description": "The dimension which will be shifted when inserting cells.\nIf ROWS, existing cells will be shifted down.\nIf COLUMNS, existing cells will be shifted right.", + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ] + } + }, + "id": "InsertRangeRequest" + }, + "TextFormatRun": { + "id": "TextFormatRun", + "description": "A run of a text format. The format of this run continues until the start\nindex of the next run.\nWhen updating, all fields must be set.", + "type": "object", + "properties": { + "format": { + "description": "The format of this run. Absent values inherit the cell's format.", + "$ref": "TextFormat" + }, + "startIndex": { + "description": "The character index where this run starts.", + "format": "int32", + "type": "integer" + } + } + }, + "EmbeddedChart": { + "description": "A chart embedded in a sheet.", + "type": "object", + "properties": { + "chartId": { + "description": "The ID of the chart.", + "format": "int32", + "type": "integer" + }, + "position": { + "description": "The position of the chart.", + "$ref": "EmbeddedObjectPosition" + }, + "spec": { + "description": "The specification of the chart.", + "$ref": "ChartSpec" + } + }, + "id": "EmbeddedChart" + }, "AddNamedRangeResponse": { "description": "The result of adding a named range.", "type": "object", @@ -533,84 +2126,427 @@ }, "id": "AddNamedRangeResponse" }, - "UpdateProtectedRangeRequest": { - "description": "Updates an existing protected range with the specified\nprotectedRangeId.", + "RowData": { + "description": "Data about each cell in a row.", "type": "object", "properties": { - "protectedRange": { - "description": "The protected range to update with the new properties.", - "$ref": "ProtectedRange" + "values": { + "description": "The values in the row, one per column.", + "type": "array", + "items": { + "$ref": "CellData" + } + } + }, + "id": "RowData" + }, + "Border": { + "description": "A border along a cell.", + "type": "object", + "properties": { + "color": { + "$ref": "Color", + "description": "The color of the border." }, - "fields": { - "description": "The fields that should be updated. At least one field must be specified.\nThe root `protectedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "width": { + "description": "The width of the border, in pixels.\nDeprecated; the width is determined by the \"style\" field.", + "format": "int32", + "type": "integer" + }, + "style": { + "description": "The style of the border.", "type": "string", - "format": "google-fieldmask" - } - }, - "id": "UpdateProtectedRangeRequest" - }, - "Padding": { - "description": "The amount of padding around the cell, in pixels.\nWhen updating padding, every field must be specified.", - "type": "object", - "properties": { - "right": { - "description": "The right padding of the cell.", - "type": "integer", - "format": "int32" - }, - "left": { - "description": "The left padding of the cell.", - "type": "integer", - "format": "int32" - }, - "top": { - "description": "The top padding of the cell.", - "type": "integer", - "format": "int32" - }, - "bottom": { - "description": "The bottom padding of the cell.", - "type": "integer", - "format": "int32" - } - }, - "id": "Padding" - }, - "MergeCellsRequest": { - "description": "Merges all cells in the range.", - "type": "object", - "properties": { - "mergeType": { - "description": "How the cells should be merged.", - "enum": [ - "MERGE_ALL", - "MERGE_COLUMNS", - "MERGE_ROWS" - ], "enumDescriptions": [ - "Create a single merge from the range", - "Create a merge for each column in the range", - "Create a merge for each row in the range" + "The style is not specified. Do not use this.", + "The border is dotted.", + "The border is dashed.", + "The border is a thin solid line.", + "The border is a medium solid line.", + "The border is a thick solid line.", + "No border.\nUsed only when updating a border in order to erase it.", + "The border is two solid lines." ], + "enum": [ + "STYLE_UNSPECIFIED", + "DOTTED", + "DASHED", + "SOLID", + "SOLID_MEDIUM", + "SOLID_THICK", + "NONE", + "DOUBLE" + ] + } + }, + "id": "Border" + }, + "GridData": { + "description": "Data in the grid, as well as metadata about the dimensions.", + "type": "object", + "properties": { + "columnMetadata": { + "description": "Metadata about the requested columns in the grid, starting with the column\nin start_column.", + "type": "array", + "items": { + "$ref": "DimensionProperties" + } + }, + "startColumn": { + "type": "integer", + "description": "The first column this GridData refers to, zero-based.", + "format": "int32" + }, + "rowMetadata": { + "description": "Metadata about the requested rows in the grid, starting with the row\nin start_row.", + "type": "array", + "items": { + "$ref": "DimensionProperties" + } + }, + "rowData": { + "description": "The data in the grid, one entry per row,\nstarting with the row in startRow.\nThe values in RowData will correspond to columns starting\nat start_column.", + "type": "array", + "items": { + "$ref": "RowData" + } + }, + "startRow": { + "type": "integer", + "description": "The first row this GridData refers to, zero-based.", + "format": "int32" + } + }, + "id": "GridData" + }, + "FindReplaceRequest": { + "type": "object", + "properties": { + "searchByRegex": { + "description": "True if the find value is a regex.\nThe regular expression and replacement should follow Java regex rules\nat https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.\nThe replacement string is allowed to refer to capturing groups.\nFor example, if one cell has the contents `\"Google Sheets\"` and another\nhas `\"Google Docs\"`, then searching for `\"o.* (.*)\"` with a replacement of\n`\"$1 Rocks\"` would change the contents of the cells to\n`\"GSheets Rocks\"` and `\"GDocs Rocks\"` respectively.", + "type": "boolean" + }, + "find": { + "description": "The value to search.", + "type": "string" + }, + "replacement": { + "description": "The value to use as the replacement.", "type": "string" }, "range": { - "description": "The range of cells to merge.", - "$ref": "GridRange" + "$ref": "GridRange", + "description": "The range to find/replace over." + }, + "sheetId": { + "description": "The sheet to find/replace over.", + "format": "int32", + "type": "integer" + }, + "allSheets": { + "description": "True to find/replace over all sheets.", + "type": "boolean" + }, + "matchCase": { + "description": "True if the search is case sensitive.", + "type": "boolean" + }, + "includeFormulas": { + "description": "True if the search should include cells with formulas.\nFalse to skip cells with formulas.", + "type": "boolean" + }, + "matchEntireCell": { + "description": "True if the find value should match the entire cell.", + "type": "boolean" } }, - "id": "MergeCellsRequest" + "id": "FindReplaceRequest", + "description": "Finds and replaces data in cells over a range, sheet, or all sheets." }, - "AddSheetResponse": { - "description": "The result of adding a sheet.", + "UpdateNamedRangeRequest": { + "type": "object", + "properties": { + "namedRange": { + "$ref": "NamedRange", + "description": "The named range to update with the new properties." + }, + "fields": { + "description": "The fields that should be updated. At least one field must be specified.\nThe root `namedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "id": "UpdateNamedRangeRequest", + "description": "Updates properties of the named range with the specified\nnamedRangeId." + }, + "AddSheetRequest": { + "description": "Adds a new sheet.\nWhen a sheet is added at a given index,\nall subsequent sheets' indexes are incremented.\nTo add an object sheet, use AddChartRequest instead and specify\nEmbeddedObjectPosition.sheetId or\nEmbeddedObjectPosition.newSheet.", "type": "object", "properties": { "properties": { - "description": "The properties of the newly added sheet.", + "description": "The properties the new sheet should have.\nAll properties are optional.\nThe sheetId field is optional; if one is not\nset, an id will be randomly generated. (It is an error to specify the ID\nof a sheet that already exists.)", "$ref": "SheetProperties" } }, - "id": "AddSheetResponse" + "id": "AddSheetRequest" + }, + "UpdateCellsRequest": { + "type": "object", + "properties": { + "start": { + "description": "The coordinate to start writing data at.\nAny number of rows and columns (including a different number of\ncolumns per row) may be written.", + "$ref": "GridCoordinate" + }, + "range": { + "description": "The range to write data to.\n\nIf the data in rows does not cover the entire requested range,\nthe fields matching those set in fields will be cleared.", + "$ref": "GridRange" + }, + "rows": { + "description": "The data to write.", + "type": "array", + "items": { + "$ref": "RowData" + } + }, + "fields": { + "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", + "type": "string" + } + }, + "id": "UpdateCellsRequest", + "description": "Updates all cells in a range with new data." + }, + "DeleteConditionalFormatRuleResponse": { + "description": "The result of deleting a conditional format rule.", + "type": "object", + "properties": { + "rule": { + "$ref": "ConditionalFormatRule", + "description": "The rule that was deleted." + } + }, + "id": "DeleteConditionalFormatRuleResponse" + }, + "DeleteRangeRequest": { + "properties": { + "shiftDimension": { + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The dimension from which deleted cells will be replaced with.\nIf ROWS, existing cells will be shifted upward to\nreplace the deleted cells. If COLUMNS, existing cells\nwill be shifted left to replace the deleted cells.", + "type": "string" + }, + "range": { + "$ref": "GridRange", + "description": "The range of cells to delete." + } + }, + "id": "DeleteRangeRequest", + "description": "Deletes a range of cells, shifting other cells into the deleted area.", + "type": "object" + }, + "GridCoordinate": { + "id": "GridCoordinate", + "description": "A coordinate in a sheet.\nAll indexes are zero-based.", + "type": "object", + "properties": { + "rowIndex": { + "description": "The row index of the coordinate.", + "format": "int32", + "type": "integer" + }, + "columnIndex": { + "description": "The column index of the coordinate.", + "format": "int32", + "type": "integer" + }, + "sheetId": { + "description": "The sheet this coordinate is on.", + "format": "int32", + "type": "integer" + } + } + }, + "UpdateSheetPropertiesRequest": { + "description": "Updates properties of the sheet with the specified\nsheetId.", + "type": "object", + "properties": { + "fields": { + "description": "The fields that should be updated. At least one field must be specified.\nThe root `properties` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", + "type": "string" + }, + "properties": { + "$ref": "SheetProperties", + "description": "The properties to update." + } + }, + "id": "UpdateSheetPropertiesRequest" + }, + "UnmergeCellsRequest": { + "description": "Unmerges cells in the given range.", + "type": "object", + "properties": { + "range": { + "$ref": "GridRange", + "description": "The range within which all cells should be unmerged.\nIf the range spans multiple merges, all will be unmerged.\nThe range must not partially span any merge." + } + }, + "id": "UnmergeCellsRequest" + }, + "GridProperties": { + "description": "Properties of a grid.", + "type": "object", + "properties": { + "frozenRowCount": { + "type": "integer", + "description": "The number of rows that are frozen in the grid.", + "format": "int32" + }, + "hideGridlines": { + "description": "True if the grid isn't showing gridlines in the UI.", + "type": "boolean" + }, + "columnCount": { + "description": "The number of columns in the grid.", + "format": "int32", + "type": "integer" + }, + "frozenColumnCount": { + "description": "The number of columns that are frozen in the grid.", + "format": "int32", + "type": "integer" + }, + "rowCount": { + "description": "The number of rows in the grid.", + "format": "int32", + "type": "integer" + } + }, + "id": "GridProperties" + }, + "SortSpec": { + "properties": { + "dimensionIndex": { + "description": "The dimension the sort should be applied to.", + "format": "int32", + "type": "integer" + }, + "sortOrder": { + "description": "The order data should be sorted.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use this.", + "Sort ascending.", + "Sort descending." + ], + "enum": [ + "SORT_ORDER_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ] + } + }, + "id": "SortSpec", + "description": "A sort order associated with a specific column or row.", + "type": "object" + }, + "UpdateEmbeddedObjectPositionResponse": { + "properties": { + "position": { + "$ref": "EmbeddedObjectPosition", + "description": "The new position of the embedded object." + } + }, + "id": "UpdateEmbeddedObjectPositionResponse", + "description": "The result of updating an embedded object's position.", + "type": "object" + }, + "Sheet": { + "description": "A sheet in a spreadsheet.", + "type": "object", + "properties": { + "basicFilter": { + "$ref": "BasicFilter", + "description": "The filter on this sheet, if any." + }, + "merges": { + "description": "The ranges that are merged together.", + "type": "array", + "items": { + "$ref": "GridRange" + } + }, + "data": { + "description": "Data in the grid, if this is a grid sheet.\nThe number of GridData objects returned is dependent on the number of\nranges requested on this sheet. For example, if this is representing\n`Sheet1`, and the spreadsheet was requested with ranges\n`Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a\nstartRow/startColumn of `0`,\nwhile the second one will have `startRow 14` (zero-based row 15),\nand `startColumn 3` (zero-based column D).", + "type": "array", + "items": { + "$ref": "GridData" + } + }, + "bandedRanges": { + "description": "The banded (i.e. alternating colors) ranges on this sheet.", + "type": "array", + "items": { + "$ref": "BandedRange" + } + }, + "charts": { + "description": "The specifications of every chart on this sheet.", + "type": "array", + "items": { + "$ref": "EmbeddedChart" + } + }, + "properties": { + "description": "The properties of the sheet.", + "$ref": "SheetProperties" + }, + "filterViews": { + "description": "The filter views in this sheet.", + "type": "array", + "items": { + "$ref": "FilterView" + } + }, + "conditionalFormats": { + "description": "The conditional format rules in this sheet.", + "type": "array", + "items": { + "$ref": "ConditionalFormatRule" + } + }, + "protectedRanges": { + "description": "The protected ranges in this sheet.", + "type": "array", + "items": { + "$ref": "ProtectedRange" + } + } + }, + "id": "Sheet" + }, + "BooleanRule": { + "id": "BooleanRule", + "description": "A rule that may or may not match, depending on the condition.", + "type": "object", + "properties": { + "format": { + "description": "The format to apply.\nConditional formatting can only apply a subset of formatting:\nbold, italic,\nstrikethrough,\nforeground color &\nbackground color.", + "$ref": "CellFormat" + }, + "condition": { + "$ref": "BooleanCondition", + "description": "The condition of the rule. If the condition evaluates to true,\nthe format will be applied." + } + } }, "PivotGroupValueMetadata": { "description": "Metadata about a value in a pivot grouping.", @@ -627,422 +2563,577 @@ }, "id": "PivotGroupValueMetadata" }, - "UpdateEmbeddedObjectPositionResponse": { - "description": "The result of updating an embedded object's position.", - "type": "object", + "FilterCriteria": { "properties": { - "position": { - "description": "The new position of the embedded object.", - "$ref": "EmbeddedObjectPosition" - } - }, - "id": "UpdateEmbeddedObjectPositionResponse" - }, - "ClearValuesResponse": { - "description": "The response when clearing a range of values in a spreadsheet.", - "type": "object", - "properties": { - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" + "hiddenValues": { + "description": "Values that should be hidden.", + "type": "array", + "items": { + "type": "string" + } }, - "clearedRange": { - "description": "The range (in A1 notation) that was cleared.\n(If the request was for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual range\n that was cleared, bounded to the sheet's limits.)", - "type": "string" + "condition": { + "$ref": "BooleanCondition", + "description": "A condition that must be true for values to be shown.\n(This does not override hiddenValues -- if a value is listed there,\n it will still be hidden.)" } }, - "id": "ClearValuesResponse" + "id": "FilterCriteria", + "description": "Criteria for showing/hiding rows in a filter or filter view.", + "type": "object" + }, + "Editors": { + "properties": { + "users": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The email addresses of users with edit access to the protected range." + }, + "groups": { + "description": "The email addresses of groups with edit access to the protected range.", + "type": "array", + "items": { + "type": "string" + } + }, + "domainUsersCanEdit": { + "description": "True if anyone in the document's domain has edit access to the protected\nrange. Domain protection is only supported on documents within a domain.", + "type": "boolean" + } + }, + "id": "Editors", + "description": "The editors of a protected range.", + "type": "object" }, "UpdateConditionalFormatRuleRequest": { - "description": "Updates a conditional format rule at the given index,\nor moves a conditional format rule to another index.", "type": "object", "properties": { + "index": { + "description": "The zero-based index of the rule that should be replaced or moved.", + "format": "int32", + "type": "integer" + }, "sheetId": { "description": "The sheet of the rule to move. Required if new_index is set,\nunused otherwise.", - "type": "integer", - "format": "int32" + "format": "int32", + "type": "integer" + }, + "newIndex": { + "description": "The zero-based new index the rule should end up at.", + "format": "int32", + "type": "integer" }, "rule": { "description": "The rule that should replace the rule at the given index.", "$ref": "ConditionalFormatRule" - }, - "index": { - "description": "The zero-based index of the rule that should be replaced or moved.", - "type": "integer", - "format": "int32" - }, - "newIndex": { - "description": "The zero-based new index the rule should end up at.", - "type": "integer", - "format": "int32" } }, - "id": "UpdateConditionalFormatRuleRequest" + "id": "UpdateConditionalFormatRuleRequest", + "description": "Updates a conditional format rule at the given index,\nor moves a conditional format rule to another index." }, - "TextFormat": { - "description": "The format of a run of text in a cell.\nAbsent values indicate that the field isn't specified.", - "type": "object", + "DataValidationRule": { "properties": { - "bold": { - "description": "True if the text is bold.", + "showCustomUi": { + "description": "True if the UI should be customized based on the kind of condition.\nIf true, \"List\" conditions will show a dropdown.", "type": "boolean" }, - "italic": { - "description": "True if the text is italicized.", + "strict": { + "description": "True if invalid data should be rejected.", "type": "boolean" }, - "foregroundColor": { - "description": "The foreground color of the text.", - "$ref": "Color" - }, - "fontFamily": { - "description": "The font family.", + "inputMessage": { + "description": "A message to show the user when adding data to the cell.", "type": "string" }, - "strikethrough": { - "description": "True if the text has a strikethrough.", - "type": "boolean" - }, - "fontSize": { - "description": "The size of the font.", - "type": "integer", - "format": "int32" - }, - "underline": { - "description": "True if the text is underlined.", - "type": "boolean" + "condition": { + "$ref": "BooleanCondition", + "description": "The condition that data in the cell must match." } }, - "id": "TextFormat" + "id": "DataValidationRule", + "description": "A data validation rule.", + "type": "object" }, - "UpdateChartSpecRequest": { - "description": "Updates a chart's specifications.\n(This does not move or resize a chart. To move or resize a chart, use\n UpdateEmbeddedObjectPositionRequest.)", + "BasicChartDomain": { + "description": "The domain of a chart.\nFor example, if charting stock prices over time, this would be the date.", "type": "object", "properties": { - "chartId": { - "description": "The ID of the chart to update.", - "type": "integer", - "format": "int32" - }, - "spec": { - "description": "The specification to apply to the chart.", - "$ref": "ChartSpec" + "domain": { + "description": "The data of the domain. For example, if charting stock prices over time,\nthis is the data representing the dates.", + "$ref": "ChartData" } }, - "id": "UpdateChartSpecRequest" + "id": "BasicChartDomain" }, - "GridCoordinate": { - "description": "A coordinate in a sheet.\nAll indexes are zero-based.", + "PasteDataRequest": { + "properties": { + "html": { + "description": "True if the data is HTML.", + "type": "boolean" + }, + "coordinate": { + "description": "The coordinate at which the data should start being inserted.", + "$ref": "GridCoordinate" + }, + "data": { + "description": "The data to insert.", + "type": "string" + }, + "delimiter": { + "description": "The delimiter in the data.", + "type": "string" + }, + "type": { + "enumDescriptions": [ + "Paste values, formulas, formats, and merges.", + "Paste the values ONLY without formats, formulas, or merges.", + "Paste the format and data validation only.", + "Like PASTE_NORMAL but without borders.", + "Paste the formulas only.", + "Paste the data validation only.", + "Paste the conditional formatting rules only." + ], + "enum": [ + "PASTE_NORMAL", + "PASTE_VALUES", + "PASTE_FORMAT", + "PASTE_NO_BORDERS", + "PASTE_FORMULA", + "PASTE_DATA_VALIDATION", + "PASTE_CONDITIONAL_FORMATTING" + ], + "description": "How the data should be pasted.", + "type": "string" + } + }, + "id": "PasteDataRequest", + "description": "Inserts data into the spreadsheet starting at the specified coordinate.", + "type": "object" + }, + "AppendDimensionRequest": { + "description": "Appends rows or columns to the end of a sheet.", "type": "object", "properties": { "sheetId": { - "description": "The sheet this coordinate is on.", - "type": "integer", - "format": "int32" + "description": "The sheet to append rows or columns to.", + "format": "int32", + "type": "integer" }, - "rowIndex": { - "description": "The row index of the coordinate.", - "type": "integer", - "format": "int32" - }, - "columnIndex": { - "description": "The column index of the coordinate.", - "type": "integer", - "format": "int32" - } - }, - "id": "GridCoordinate" - }, - "DeleteFilterViewRequest": { - "description": "Deletes a particular filter view.", - "type": "object", - "properties": { - "filterId": { - "description": "The ID of the filter to delete.", - "type": "integer", - "format": "int32" - } - }, - "id": "DeleteFilterViewRequest" - }, - "BatchUpdateValuesResponse": { - "description": "The response when updating a range of values in a spreadsheet.", - "type": "object", - "properties": { - "totalUpdatedSheets": { - "description": "The total number of sheets where at least one cell in the sheet was\nupdated.", - "type": "integer", - "format": "int32" - }, - "totalUpdatedColumns": { - "description": "The total number of columns where at least one cell in the column was\nupdated.", - "type": "integer", - "format": "int32" - }, - "responses": { - "description": "One UpdateValuesResponse per requested range, in the same order as\nthe requests appeared.", - "type": "array", - "items": { - "$ref": "UpdateValuesResponse" - } - }, - "totalUpdatedCells": { - "description": "The total number of cells updated.", - "type": "integer", - "format": "int32" - }, - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", + "dimension": { + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "Whether rows or columns should be appended.", "type": "string" }, - "totalUpdatedRows": { - "description": "The total number of rows where at least one cell in the row was updated.", + "length": { "type": "integer", + "description": "The number of rows or columns to append.", "format": "int32" } }, - "id": "BatchUpdateValuesResponse" + "id": "AppendDimensionRequest" }, - "UpdateNamedRangeRequest": { - "description": "Updates properties of the named range with the specified\nnamedRangeId.", + "AddNamedRangeRequest": { "type": "object", "properties": { - "fields": { - "description": "The fields that should be updated. At least one field must be specified.\nThe root `namedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - }, "namedRange": { - "description": "The named range to update with the new properties.", - "$ref": "NamedRange" + "$ref": "NamedRange", + "description": "The named range to add. The namedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)" } }, - "id": "UpdateNamedRangeRequest" + "id": "AddNamedRangeRequest", + "description": "Adds a named range to the spreadsheet." }, - "UpdateValuesResponse": { - "description": "The response when updating a range of values in a spreadsheet.", + "UpdateEmbeddedObjectPositionRequest": { + "description": "Update an embedded object's position (such as a moving or resizing a\nchart or image).", "type": "object", "properties": { - "updatedColumns": { - "description": "The number of columns where at least one cell in the column was updated.", - "type": "integer", - "format": "int32" + "newPosition": { + "$ref": "EmbeddedObjectPosition", + "description": "An explicit position to move the embedded object to.\nIf newPosition.sheetId is set,\na new sheet with that ID will be created.\nIf newPosition.newSheet is set to true,\na new sheet will be created with an ID that will be chosen for you." }, - "updatedCells": { - "description": "The number of cells updated.", - "type": "integer", - "format": "int32" - }, - "updatedData": { - "description": "The values of the cells after updates were applied.\nThis is only included if the request's `includeValuesInResponse` field\nwas `true`.", - "$ref": "ValueRange" - }, - "updatedRange": { - "description": "The range (in A1 notation) that updates were applied to.", + "fields": { + "description": "The fields of OverlayPosition\nthat should be updated when setting a new position. Used only if\nnewPosition.overlayPosition\nis set, in which case at least one field must\nbe specified. The root `newPosition.overlayPosition` is implied and\nshould not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", "type": "string" }, - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - }, - "updatedRows": { - "description": "The number of rows where at least one cell in the row was updated.", - "type": "integer", - "format": "int32" + "objectId": { + "description": "The ID of the object to moved.", + "format": "int32", + "type": "integer" } }, - "id": "UpdateValuesResponse" + "id": "UpdateEmbeddedObjectPositionRequest" }, - "SpreadsheetProperties": { - "description": "Properties of a spreadsheet.", - "type": "object", + "TextRotation": { "properties": { - "timeZone": { - "description": "The time zone of the spreadsheet, in CLDR format such as\n`America/New_York`. If the time zone isn't recognized, this may\nbe a custom time zone such as `GMT-07:00`.", - "type": "string" + "angle": { + "description": "The angle between the standard orientation and the desired orientation.\nMeasured in degrees. Valid values are between -90 and 90. Positive\nangles are angled upwards, negative are angled downwards.\n\nNote: For LTR text direction positive angles are in the counterclockwise\ndirection, whereas for RTL they are in the clockwise direction", + "format": "int32", + "type": "integer" }, - "autoRecalc": { - "description": "The amount of time to wait before volatile functions are recalculated.", - "enum": [ - "RECALCULATION_INTERVAL_UNSPECIFIED", - "ON_CHANGE", - "MINUTE", - "HOUR" - ], + "vertical": { + "description": "If true, text reads top to bottom, but the orientation of individual\ncharacters is unchanged.\nFor example:\n\n | V |\n | e |\n | r |\n | t |\n | i |\n | c |\n | a |\n | l |", + "type": "boolean" + } + }, + "id": "TextRotation", + "description": "The rotation applied to text in a cell.", + "type": "object" + }, + "PieChartSpec": { + "properties": { + "domain": { + "$ref": "ChartData", + "description": "The data that covers the domain of the pie chart." + }, + "threeDimensional": { + "description": "True if the pie is three dimensional.", + "type": "boolean" + }, + "series": { + "$ref": "ChartData", + "description": "The data that covers the one and only series of the pie chart." + }, + "legendPosition": { + "description": "Where the legend of the pie chart should be drawn.", + "type": "string", "enumDescriptions": [ - "Default value. This value must not be used.", - "Volatile functions are updated on every change.", - "Volatile functions are updated on every change and every minute.", - "Volatile functions are updated on every change and hourly." + "Default value, do not use.", + "The legend is rendered on the bottom of the chart.", + "The legend is rendered on the left of the chart.", + "The legend is rendered on the right of the chart.", + "The legend is rendered on the top of the chart.", + "No legend is rendered.", + "Each pie slice has a label attached to it." ], - "type": "string" + "enum": [ + "PIE_CHART_LEGEND_POSITION_UNSPECIFIED", + "BOTTOM_LEGEND", + "LEFT_LEGEND", + "RIGHT_LEGEND", + "TOP_LEGEND", + "NO_LEGEND", + "LABELED_LEGEND" + ] }, - "locale": { - "description": "The locale of the spreadsheet in one of the following formats:\n\n* an ISO 639-1 language code such as `en`\n\n* an ISO 639-2 language code such as `fil`, if no 639-1 code exists\n\n* a combination of the ISO language code and country code, such as `en_US`\n\nNote: when updating this field, not all locales/languages are supported.", - "type": "string" - }, - "title": { - "description": "The title of the spreadsheet.", - "type": "string" - }, - "defaultFormat": { - "description": "The default format of all cells in the spreadsheet.\nCellData.effectiveFormat will not be set if the\ncell's format is equal to this default format.\nThis field is read-only.", - "$ref": "CellFormat" + "pieHole": { + "description": "The size of the hole in the pie chart.", + "format": "double", + "type": "number" } }, - "id": "SpreadsheetProperties" + "id": "PieChartSpec", + "description": "A \u003ca href=\"/chart/interactive/docs/gallery/piechart\"\u003epie chart\u003c/a\u003e.", + "type": "object" }, - "CellData": { - "description": "Data about a specific cell.", + "UpdateFilterViewRequest": { + "description": "Updates properties of the filter view.", "type": "object", "properties": { - "hyperlink": { - "description": "A hyperlink this cell points to, if any.\nThis field is read-only. (To set it, use a `=HYPERLINK` formula.)", + "filter": { + "$ref": "FilterView", + "description": "The new properties of the filter view." + }, + "fields": { + "description": "The fields that should be updated. At least one field must be specified.\nThe root `filter` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "format": "google-fieldmask", "type": "string" + } + }, + "id": "UpdateFilterViewRequest" + }, + "ConditionalFormatRule": { + "description": "A rule describing a conditional format.", + "type": "object", + "properties": { + "booleanRule": { + "description": "The formatting is either \"on\" or \"off\" according to the rule.", + "$ref": "BooleanRule" }, - "effectiveFormat": { - "description": "The effective format being used by the cell.\nThis includes the results of applying any conditional formatting and,\nif the cell contains a formula, the computed number format.\nIf the effective format is the default format, effective format will\nnot be written.\nThis field is read-only.", - "$ref": "CellFormat" - }, - "note": { - "description": "Any note on the cell.", - "type": "string" - }, - "formattedValue": { - "description": "The formatted value of the cell.\nThis is the value as it's shown to the user.\nThis field is read-only.", - "type": "string" - }, - "userEnteredValue": { - "description": "The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`\nNote: Dates, Times and DateTimes are represented as doubles in\nserial number format.", - "$ref": "ExtendedValue" - }, - "dataValidation": { - "description": "A data validation rule on the cell, if any.\n\nWhen writing, the new data validation rule will overwrite any prior rule.", - "$ref": "DataValidationRule" - }, - "userEnteredFormat": { - "description": "The format the user entered for the cell.\n\nWhen writing, the new format will be merged with the existing format.", - "$ref": "CellFormat" - }, - "pivotTable": { - "description": "A pivot table anchored at this cell. The size of pivot table itself\nis computed dynamically based on its data, grouping, filters, values,\netc. Only the top-left cell of the pivot table contains the pivot table\ndefinition. The other cells will contain the calculated values of the\nresults of the pivot in their effective_value fields.", - "$ref": "PivotTable" - }, - "textFormatRuns": { - "description": "Runs of rich text applied to subsections of the cell. Runs are only valid\non user entered strings, not formulas, bools, or numbers.\nRuns start at specific indexes in the text and continue until the next\nrun. Properties of a run will continue unless explicitly changed\nin a subsequent run (and properties of the first run will continue\nthe properties of the cell unless explicitly changed).\n\nWhen writing, the new runs will overwrite any prior runs. When writing a\nnew user_entered_value, previous runs will be erased.", + "ranges": { + "description": "The ranges that will be formatted if the condition is true.\nAll the ranges must be on the same grid.", "type": "array", "items": { - "$ref": "TextFormatRun" + "$ref": "GridRange" } }, - "effectiveValue": { - "description": "The effective value of the cell. For cells with formulas, this will be\nthe calculated value. For cells with literals, this will be\nthe same as the user_entered_value.\nThis field is read-only.", - "$ref": "ExtendedValue" + "gradientRule": { + "$ref": "GradientRule", + "description": "The formatting will vary based on the gradients in the rule." } }, - "id": "CellData" + "id": "ConditionalFormatRule" }, - "UnmergeCellsRequest": { - "description": "Unmerges cells in the given range.", + "CopyPasteRequest": { + "description": "Copies data from the source to the destination.", "type": "object", "properties": { - "range": { - "description": "The range within which all cells should be unmerged.\nIf the range spans multiple merges, all will be unmerged.\nThe range must not partially span any merge.", - "$ref": "GridRange" - } - }, - "id": "UnmergeCellsRequest" - }, - "TextToColumnsRequest": { - "description": "Splits a column of text into multiple columns,\nbased on a delimiter in each cell.", - "type": "object", - "properties": { - "source": { - "description": "The source data range. This must span exactly one column.", - "$ref": "GridRange" + "destination": { + "$ref": "GridRange", + "description": "The location to paste to. If the range covers a span that's\na multiple of the source's height or width, then the\ndata will be repeated to fill in the destination range.\nIf the range is smaller than the source range, the entire\nsource data will still be copied (beyond the end of the destination range)." }, - "delimiter": { - "description": "The delimiter to use. Used only if delimiterType is\nCUSTOM.", - "type": "string" - }, - "delimiterType": { - "description": "The delimiter type to use.", - "enum": [ - "DELIMITER_TYPE_UNSPECIFIED", - "COMMA", - "SEMICOLON", - "PERIOD", - "SPACE", - "CUSTOM" - ], + "pasteOrientation": { "enumDescriptions": [ - "Default value. This value must not be used.", - "\",\"", - "\";\"", - "\".\"", - "\" \"", - "A custom value as defined in delimiter." + "Paste normally.", + "Paste transposed, where all rows become columns and vice versa." ], + "enum": [ + "NORMAL", + "TRANSPOSE" + ], + "description": "How that data should be oriented when pasting.", + "type": "string" + }, + "source": { + "description": "The source range to copy.", + "$ref": "GridRange" + }, + "pasteType": { + "enumDescriptions": [ + "Paste values, formulas, formats, and merges.", + "Paste the values ONLY without formats, formulas, or merges.", + "Paste the format and data validation only.", + "Like PASTE_NORMAL but without borders.", + "Paste the formulas only.", + "Paste the data validation only.", + "Paste the conditional formatting rules only." + ], + "enum": [ + "PASTE_NORMAL", + "PASTE_VALUES", + "PASTE_FORMAT", + "PASTE_NO_BORDERS", + "PASTE_FORMULA", + "PASTE_DATA_VALIDATION", + "PASTE_CONDITIONAL_FORMATTING" + ], + "description": "What kind of data to paste.", "type": "string" } }, - "id": "TextToColumnsRequest" + "id": "CopyPasteRequest" }, - "AddProtectedRangeResponse": { - "description": "The result of adding a new protected range.", + "Request": { + "description": "A single kind of update to apply to a spreadsheet.", "type": "object", "properties": { - "protectedRange": { - "description": "The newly added protected range.", - "$ref": "ProtectedRange" + "deleteRange": { + "description": "Deletes a range of cells from a sheet, shifting the remaining cells.", + "$ref": "DeleteRangeRequest" + }, + "deleteBanding": { + "$ref": "DeleteBandingRequest", + "description": "Removes a banded range" + }, + "addFilterView": { + "$ref": "AddFilterViewRequest", + "description": "Adds a filter view." + }, + "setDataValidation": { + "$ref": "SetDataValidationRequest", + "description": "Sets data validation for one or more cells." + }, + "updateBorders": { + "$ref": "UpdateBordersRequest", + "description": "Updates the borders in a range of cells." + }, + "deleteConditionalFormatRule": { + "description": "Deletes an existing conditional format rule.", + "$ref": "DeleteConditionalFormatRuleRequest" + }, + "repeatCell": { + "$ref": "RepeatCellRequest", + "description": "Repeats a single cell across a range." + }, + "clearBasicFilter": { + "$ref": "ClearBasicFilterRequest", + "description": "Clears the basic filter on a sheet." + }, + "appendDimension": { + "description": "Appends dimensions to the end of a sheet.", + "$ref": "AppendDimensionRequest" + }, + "updateConditionalFormatRule": { + "$ref": "UpdateConditionalFormatRuleRequest", + "description": "Updates an existing conditional format rule." + }, + "insertRange": { + "description": "Inserts new cells in a sheet, shifting the existing cells.", + "$ref": "InsertRangeRequest" + }, + "moveDimension": { + "description": "Moves rows or columns to another location in a sheet.", + "$ref": "MoveDimensionRequest" + }, + "updateBanding": { + "description": "Updates a banded range", + "$ref": "UpdateBandingRequest" + }, + "addProtectedRange": { + "$ref": "AddProtectedRangeRequest", + "description": "Adds a protected range." + }, + "deleteNamedRange": { + "$ref": "DeleteNamedRangeRequest", + "description": "Deletes a named range." + }, + "duplicateSheet": { + "description": "Duplicates a sheet.", + "$ref": "DuplicateSheetRequest" + }, + "deleteSheet": { + "$ref": "DeleteSheetRequest", + "description": "Deletes a sheet." + }, + "unmergeCells": { + "$ref": "UnmergeCellsRequest", + "description": "Unmerges merged cells." + }, + "updateEmbeddedObjectPosition": { + "$ref": "UpdateEmbeddedObjectPositionRequest", + "description": "Updates an embedded object's (e.g. chart, image) position." + }, + "updateDimensionProperties": { + "$ref": "UpdateDimensionPropertiesRequest", + "description": "Updates dimensions' properties." + }, + "pasteData": { + "$ref": "PasteDataRequest", + "description": "Pastes data (HTML or delimited) into a sheet." + }, + "setBasicFilter": { + "$ref": "SetBasicFilterRequest", + "description": "Sets the basic filter on a sheet." + }, + "addConditionalFormatRule": { + "$ref": "AddConditionalFormatRuleRequest", + "description": "Adds a new conditional format rule." + }, + "addNamedRange": { + "description": "Adds a named range.", + "$ref": "AddNamedRangeRequest" + }, + "updateCells": { + "description": "Updates many cells at once.", + "$ref": "UpdateCellsRequest" + }, + "updateSpreadsheetProperties": { + "$ref": "UpdateSpreadsheetPropertiesRequest", + "description": "Updates the spreadsheet's properties." + }, + "deleteEmbeddedObject": { + "$ref": "DeleteEmbeddedObjectRequest", + "description": "Deletes an embedded object (e.g, chart, image) in a sheet." + }, + "updateFilterView": { + "$ref": "UpdateFilterViewRequest", + "description": "Updates the properties of a filter view." + }, + "addBanding": { + "description": "Adds a new banded range", + "$ref": "AddBandingRequest" + }, + "autoResizeDimensions": { + "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension.", + "$ref": "AutoResizeDimensionsRequest" + }, + "appendCells": { + "description": "Appends cells after the last row with data in a sheet.", + "$ref": "AppendCellsRequest" + }, + "cutPaste": { + "$ref": "CutPasteRequest", + "description": "Cuts data from one area and pastes it to another." + }, + "mergeCells": { + "$ref": "MergeCellsRequest", + "description": "Merges cells together." + }, + "updateNamedRange": { + "description": "Updates a named range.", + "$ref": "UpdateNamedRangeRequest" + }, + "updateSheetProperties": { + "$ref": "UpdateSheetPropertiesRequest", + "description": "Updates a sheet's properties." + }, + "autoFill": { + "description": "Automatically fills in more data based on existing data.", + "$ref": "AutoFillRequest" + }, + "deleteDimension": { + "$ref": "DeleteDimensionRequest", + "description": "Deletes rows or columns in a sheet." + }, + "sortRange": { + "description": "Sorts data in a range.", + "$ref": "SortRangeRequest" + }, + "deleteProtectedRange": { + "$ref": "DeleteProtectedRangeRequest", + "description": "Deletes a protected range." + }, + "duplicateFilterView": { + "$ref": "DuplicateFilterViewRequest", + "description": "Duplicates a filter view." + }, + "addChart": { + "$ref": "AddChartRequest", + "description": "Adds a chart." + }, + "findReplace": { + "$ref": "FindReplaceRequest", + "description": "Finds and replaces occurrences of some text with other text." + }, + "updateChartSpec": { + "$ref": "UpdateChartSpecRequest", + "description": "Updates a chart's specifications." + }, + "textToColumns": { + "description": "Converts a column of text into many columns of text.", + "$ref": "TextToColumnsRequest" + }, + "addSheet": { + "description": "Adds a sheet.", + "$ref": "AddSheetRequest" + }, + "updateProtectedRange": { + "$ref": "UpdateProtectedRangeRequest", + "description": "Updates a protected range." + }, + "deleteFilterView": { + "description": "Deletes a filter view from a sheet.", + "$ref": "DeleteFilterViewRequest" + }, + "copyPaste": { + "description": "Copies data from one area and pastes it to another.", + "$ref": "CopyPasteRequest" + }, + "insertDimension": { + "$ref": "InsertDimensionRequest", + "description": "Inserts new rows or columns in a sheet." } }, - "id": "AddProtectedRangeResponse" + "id": "Request" }, "BooleanCondition": { + "id": "BooleanCondition", "description": "A condition that can evaluate to true or false.\nBooleanConditions are used by conditional formatting,\ndata validation, and the criteria in filters.", "type": "object", "properties": { - "values": { - "description": "The values of the condition. The number of supported values depends\non the condition type. Some support zero values,\nothers one or two values,\nand ConditionType.ONE_OF_LIST supports an arbitrary number of values.", - "type": "array", - "items": { - "$ref": "ConditionValue" - } - }, "type": { "description": "The type of condition.", - "enum": [ - "CONDITION_TYPE_UNSPECIFIED", - "NUMBER_GREATER", - "NUMBER_GREATER_THAN_EQ", - "NUMBER_LESS", - "NUMBER_LESS_THAN_EQ", - "NUMBER_EQ", - "NUMBER_NOT_EQ", - "NUMBER_BETWEEN", - "NUMBER_NOT_BETWEEN", - "TEXT_CONTAINS", - "TEXT_NOT_CONTAINS", - "TEXT_STARTS_WITH", - "TEXT_ENDS_WITH", - "TEXT_EQ", - "TEXT_IS_EMAIL", - "TEXT_IS_URL", - "DATE_EQ", - "DATE_BEFORE", - "DATE_AFTER", - "DATE_ON_OR_BEFORE", - "DATE_ON_OR_AFTER", - "DATE_BETWEEN", - "DATE_NOT_BETWEEN", - "DATE_IS_VALID", - "ONE_OF_RANGE", - "ONE_OF_LIST", - "BLANK", - "NOT_BLANK", - "CUSTOM_FORMULA" - ], + "type": "string", "enumDescriptions": [ "The default value, do not use.", "The cell's value must be greater than the condition's value.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue.", @@ -1074,1047 +3165,234 @@ "The cell's value must not be empty.\nSupported by conditional formatting and filters.\nRequires no ConditionValues.", "The condition's formula must evaluate to true.\nSupported by data validation, conditional formatting and filters.\nRequires a single ConditionValue." ], - "type": "string" - } - }, - "id": "BooleanCondition" - }, - "DeleteProtectedRangeRequest": { - "description": "Deletes the protected range with the given ID.", - "type": "object", - "properties": { - "protectedRangeId": { - "description": "The ID of the protected range to delete.", - "type": "integer", - "format": "int32" - } - }, - "id": "DeleteProtectedRangeRequest" - }, - "BasicChartDomain": { - "description": "The domain of a chart.\nFor example, if charting stock prices over time, this would be the date.", - "type": "object", - "properties": { - "domain": { - "description": "The data of the domain. For example, if charting stock prices over time,\nthis is the data representing the dates.", - "$ref": "ChartData" - } - }, - "id": "BasicChartDomain" - }, - "DimensionRange": { - "description": "A range along a single dimension on a sheet.\nAll indexes are zero-based.\nIndexes are half open: the start index is inclusive\nand the end index is exclusive.\nMissing indexes indicate the range is unbounded on that side.", - "type": "object", - "properties": { - "sheetId": { - "description": "The sheet this span is on.", - "type": "integer", - "format": "int32" - }, - "endIndex": { - "description": "The end (exclusive) of the span, or not set if unbounded.", - "type": "integer", - "format": "int32" - }, - "startIndex": { - "description": "The start (inclusive) of the span, or not set if unbounded.", - "type": "integer", - "format": "int32" - }, - "dimension": { - "description": "The dimension of the span.", "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], - "type": "string" + "CONDITION_TYPE_UNSPECIFIED", + "NUMBER_GREATER", + "NUMBER_GREATER_THAN_EQ", + "NUMBER_LESS", + "NUMBER_LESS_THAN_EQ", + "NUMBER_EQ", + "NUMBER_NOT_EQ", + "NUMBER_BETWEEN", + "NUMBER_NOT_BETWEEN", + "TEXT_CONTAINS", + "TEXT_NOT_CONTAINS", + "TEXT_STARTS_WITH", + "TEXT_ENDS_WITH", + "TEXT_EQ", + "TEXT_IS_EMAIL", + "TEXT_IS_URL", + "DATE_EQ", + "DATE_BEFORE", + "DATE_AFTER", + "DATE_ON_OR_BEFORE", + "DATE_ON_OR_AFTER", + "DATE_BETWEEN", + "DATE_NOT_BETWEEN", + "DATE_IS_VALID", + "ONE_OF_RANGE", + "ONE_OF_LIST", + "BLANK", + "NOT_BLANK", + "CUSTOM_FORMULA" + ] + }, + "values": { + "type": "array", + "items": { + "$ref": "ConditionValue" + }, + "description": "The values of the condition. The number of supported values depends\non the condition type. Some support zero values,\nothers one or two values,\nand ConditionType.ONE_OF_LIST supports an arbitrary number of values." } - }, - "id": "DimensionRange" + } }, - "Response": { - "description": "A single response from an update.", + "GridRange": { + "id": "GridRange", + "description": "A range on a sheet.\nAll indexes are zero-based.\nIndexes are half open, e.g the start index is inclusive\nand the end index is exclusive -- [start_index, end_index).\nMissing indexes indicate the range is unbounded on that side.\n\nFor example, if `\"Sheet1\"` is sheet ID 0, then:\n\n `Sheet1!A1:A1 == sheet_id: 0,\n start_row_index: 0, end_row_index: 1,\n start_column_index: 0, end_column_index: 1`\n\n `Sheet1!A3:B4 == sheet_id: 0,\n start_row_index: 2, end_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A:B == sheet_id: 0,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A5:B == sheet_id: 0,\n start_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1 == sheet_id:0`\n\nThe start index must always be less than or equal to the end index.\nIf the start index equals the end index, then the range is empty.\nEmpty ranges are typically not meaningful and are usually rendered in the\nUI as `#REF!`.", "type": "object", "properties": { - "updateEmbeddedObjectPosition": { - "description": "A reply from updating an embedded object's position.", - "$ref": "UpdateEmbeddedObjectPositionResponse" + "endRowIndex": { + "description": "The end row (exclusive) of the range, or not set if unbounded.", + "format": "int32", + "type": "integer" }, - "addFilterView": { - "description": "A reply from adding a filter view.", - "$ref": "AddFilterViewResponse" + "endColumnIndex": { + "type": "integer", + "description": "The end column (exclusive) of the range, or not set if unbounded.", + "format": "int32" }, - "addSheet": { - "description": "A reply from adding a sheet.", - "$ref": "AddSheetResponse" + "startRowIndex": { + "description": "The start row (inclusive) of the range, or not set if unbounded.", + "format": "int32", + "type": "integer" }, - "findReplace": { - "description": "A reply from doing a find/replace.", - "$ref": "FindReplaceResponse" + "startColumnIndex": { + "description": "The start column (inclusive) of the range, or not set if unbounded.", + "format": "int32", + "type": "integer" }, - "addProtectedRange": { - "description": "A reply from adding a protected range.", - "$ref": "AddProtectedRangeResponse" + "sheetId": { + "description": "The sheet this range is on.", + "format": "int32", + "type": "integer" + } + } + }, + "BasicChartSpec": { + "description": "The specification for a basic chart. See BasicChartType for the list\nof charts this supports.", + "type": "object", + "properties": { + "headerCount": { + "description": "The number of rows or columns in the data that are \"headers\".\nIf not set, Google Sheets will guess how many rows are headers based\non the data.\n\n(Note that BasicChartAxis.title may override the axis title\n inferred from the header values.)", + "format": "int32", + "type": "integer" }, - "updateConditionalFormatRule": { - "description": "A reply from updating a conditional format rule.", - "$ref": "UpdateConditionalFormatRuleResponse" + "axis": { + "description": "The axis on the chart.", + "type": "array", + "items": { + "$ref": "BasicChartAxis" + } }, - "addChart": { - "description": "A reply from adding a chart.", - "$ref": "AddChartResponse" + "chartType": { + "enum": [ + "BASIC_CHART_TYPE_UNSPECIFIED", + "BAR", + "LINE", + "AREA", + "COLUMN", + "SCATTER", + "COMBO" + ], + "description": "The type of the chart.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "A \u003ca href=\"/chart/interactive/docs/gallery/barchart\"\u003ebar chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/linechart\"\u003eline chart\u003c/a\u003e.", + "An \u003ca href=\"/chart/interactive/docs/gallery/areachart\"\u003earea chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/columnchart\"\u003ecolumn chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/scatterchart\"\u003escatter chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/combochart\"\u003ecombo chart\u003c/a\u003e." + ] }, - "deleteConditionalFormatRule": { - "description": "A reply from deleting a conditional format rule.", - "$ref": "DeleteConditionalFormatRuleResponse" + "series": { + "description": "The data this chart is visualizing.", + "type": "array", + "items": { + "$ref": "BasicChartSeries" + } }, - "addBanding": { - "description": "A reply from adding a banded range.", - "$ref": "AddBandingResponse" + "legendPosition": { + "enum": [ + "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED", + "BOTTOM_LEGEND", + "LEFT_LEGEND", + "RIGHT_LEGEND", + "TOP_LEGEND", + "NO_LEGEND" + ], + "description": "The position of the chart legend.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The legend is rendered on the bottom of the chart.", + "The legend is rendered on the left of the chart.", + "The legend is rendered on the right of the chart.", + "The legend is rendered on the top of the chart.", + "No legend is rendered." + ] }, - "duplicateSheet": { - "description": "A reply from duplicating a sheet.", - "$ref": "DuplicateSheetResponse" - }, - "duplicateFilterView": { - "description": "A reply from duplicating a filter view.", - "$ref": "DuplicateFilterViewResponse" - }, - "addNamedRange": { - "description": "A reply from adding a named range.", - "$ref": "AddNamedRangeResponse" + "domains": { + "description": "The domain of data this is charting.\nOnly a single domain is supported.", + "type": "array", + "items": { + "$ref": "BasicChartDomain" + } } }, - "id": "Response" + "id": "BasicChartSpec" }, - "AddConditionalFormatRuleRequest": { - "description": "Adds a new conditional format rule at the given index.\nAll subsequent rules' indexes are incremented.", + "SetDataValidationRequest": { + "description": "Sets a data validation rule to every cell in the range.\nTo clear validation in a range, call this with no rule specified.", "type": "object", "properties": { "rule": { - "description": "The rule to add.", - "$ref": "ConditionalFormatRule" - }, - "index": { - "description": "The zero-based index where the rule should be inserted.", - "type": "integer", - "format": "int32" - } - }, - "id": "AddConditionalFormatRuleRequest" - }, - "FilterView": { - "description": "A filter view.", - "type": "object", - "properties": { - "title": { - "description": "The name of the filter view.", - "type": "string" - }, - "namedRangeId": { - "description": "The named range this filter view is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", - "type": "string" - }, - "sortSpecs": { - "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", - "type": "array", - "items": { - "$ref": "SortSpec" - } + "description": "The data validation rule to set on each cell in the range,\nor empty to clear the data validation in the range.", + "$ref": "DataValidationRule" }, "range": { - "description": "The range this filter view covers.\n\nWhen writing, only one of range or named_range_id\nmay be set.", - "$ref": "GridRange" - }, - "criteria": { - "description": "The criteria for showing/hiding values per column.\nThe map's key is the column index, and the value is the criteria for\nthat column.", - "additionalProperties": { - "$ref": "FilterCriteria" - }, - "type": "object" - }, - "filterViewId": { - "description": "The ID of the filter view.", - "type": "integer", - "format": "int32" + "$ref": "GridRange", + "description": "The range the data validation rule should apply to." } }, - "id": "FilterView" + "id": "SetDataValidationRequest" }, - "SortRangeRequest": { - "description": "Sorts data in rows based on a sort order per column.", + "CellData": { + "description": "Data about a specific cell.", "type": "object", "properties": { - "range": { - "description": "The range to sort.", - "$ref": "GridRange" + "pivotTable": { + "$ref": "PivotTable", + "description": "A pivot table anchored at this cell. The size of pivot table itself\nis computed dynamically based on its data, grouping, filters, values,\netc. Only the top-left cell of the pivot table contains the pivot table\ndefinition. The other cells will contain the calculated values of the\nresults of the pivot in their effective_value fields." }, - "sortSpecs": { - "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", + "userEnteredFormat": { + "$ref": "CellFormat", + "description": "The format the user entered for the cell.\n\nWhen writing, the new format will be merged with the existing format." + }, + "effectiveFormat": { + "$ref": "CellFormat", + "description": "The effective format being used by the cell.\nThis includes the results of applying any conditional formatting and,\nif the cell contains a formula, the computed number format.\nIf the effective format is the default format, effective format will\nnot be written.\nThis field is read-only." + }, + "note": { + "description": "Any note on the cell.", + "type": "string" + }, + "userEnteredValue": { + "$ref": "ExtendedValue", + "description": "The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`\nNote: Dates, Times and DateTimes are represented as doubles in\nserial number format." + }, + "dataValidation": { + "description": "A data validation rule on the cell, if any.\n\nWhen writing, the new data validation rule will overwrite any prior rule.", + "$ref": "DataValidationRule" + }, + "effectiveValue": { + "description": "The effective value of the cell. For cells with formulas, this will be\nthe calculated value. For cells with literals, this will be\nthe same as the user_entered_value.\nThis field is read-only.", + "$ref": "ExtendedValue" + }, + "textFormatRuns": { + "description": "Runs of rich text applied to subsections of the cell. Runs are only valid\non user entered strings, not formulas, bools, or numbers.\nRuns start at specific indexes in the text and continue until the next\nrun. Properties of a run will continue unless explicitly changed\nin a subsequent run (and properties of the first run will continue\nthe properties of the cell unless explicitly changed).\n\nWhen writing, the new runs will overwrite any prior runs. When writing a\nnew user_entered_value, previous runs will be erased.", "type": "array", "items": { - "$ref": "SortSpec" - } - } - }, - "id": "SortRangeRequest" - }, - "AddBandingResponse": { - "description": "The result of adding a banded range.", - "type": "object", - "properties": { - "bandedRange": { - "description": "The banded range that was added.", - "$ref": "BandedRange" - } - }, - "id": "AddBandingResponse" - }, - "TextFormatRun": { - "description": "A run of a text format. The format of this run continues until the start\nindex of the next run.\nWhen updating, all fields must be set.", - "type": "object", - "properties": { - "startIndex": { - "description": "The character index where this run starts.", - "type": "integer", - "format": "int32" - }, - "format": { - "description": "The format of this run. Absent values inherit the cell's format.", - "$ref": "TextFormat" - } - }, - "id": "TextFormatRun" - }, - "UpdateFilterViewRequest": { - "description": "Updates properties of the filter view.", - "type": "object", - "properties": { - "filter": { - "description": "The new properties of the filter view.", - "$ref": "FilterView" - }, - "fields": { - "description": "The fields that should be updated. At least one field must be specified.\nThe root `filter` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - } - }, - "id": "UpdateFilterViewRequest" - }, - "UpdateConditionalFormatRuleResponse": { - "description": "The result of updating a conditional format rule.", - "type": "object", - "properties": { - "oldIndex": { - "description": "The old index of the rule. Not set if a rule was replaced\n(because it is the same as new_index).", - "type": "integer", - "format": "int32" - }, - "newRule": { - "description": "The new rule that replaced the old rule (if replacing),\nor the rule that was moved (if moved)", - "$ref": "ConditionalFormatRule" - }, - "oldRule": { - "description": "The old (deleted) rule. Not set if a rule was moved\n(because it is the same as new_rule).", - "$ref": "ConditionalFormatRule" - }, - "newIndex": { - "description": "The index of the new rule.", - "type": "integer", - "format": "int32" - } - }, - "id": "UpdateConditionalFormatRuleResponse" - }, - "FilterCriteria": { - "description": "Criteria for showing/hiding rows in a filter or filter view.", - "type": "object", - "properties": { - "condition": { - "description": "A condition that must be true for values to be shown.\n(This does not override hiddenValues -- if a value is listed there,\n it will still be hidden.)", - "$ref": "BooleanCondition" - }, - "hiddenValues": { - "description": "Values that should be hidden.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "FilterCriteria" - }, - "DeleteDimensionRequest": { - "description": "Deletes the dimensions from the sheet.", - "type": "object", - "properties": { - "range": { - "description": "The dimensions to delete from the sheet.", - "$ref": "DimensionRange" - } - }, - "id": "DeleteDimensionRequest" - }, - "PivotTable": { - "description": "A pivot table.", - "type": "object", - "properties": { - "valueLayout": { - "description": "Whether values should be listed horizontally (as columns)\nor vertically (as rows).", - "enum": [ - "HORIZONTAL", - "VERTICAL" - ], - "enumDescriptions": [ - "Values are laid out horizontally (as columns).", - "Values are laid out vertically (as rows)." - ], - "type": "string" - }, - "columns": { - "description": "Each column grouping in the pivot table.", - "type": "array", - "items": { - "$ref": "PivotGroup" + "$ref": "TextFormatRun" } }, - "source": { - "description": "The range the pivot table is reading data from.", - "$ref": "GridRange" - }, - "rows": { - "description": "Each row grouping in the pivot table.", - "type": "array", - "items": { - "$ref": "PivotGroup" - } - }, - "values": { - "description": "A list of values to include in the pivot table.", - "type": "array", - "items": { - "$ref": "PivotValue" - } - }, - "criteria": { - "description": "An optional mapping of filters per source column offset.\n\nThe filters will be applied before aggregating data into the pivot table.\nThe map's key is the column offset of the source range that you want to\nfilter, and the value is the criteria for that column.\n\nFor example, if the source was `C10:E15`, a key of `0` will have the filter\nfor column `C`, whereas the key `1` is for column `D`.", - "additionalProperties": { - "$ref": "PivotFilterCriteria" - }, - "type": "object" - } - }, - "id": "PivotTable" - }, - "DataValidationRule": { - "description": "A data validation rule.", - "type": "object", - "properties": { - "condition": { - "description": "The condition that data in the cell must match.", - "$ref": "BooleanCondition" - }, - "inputMessage": { - "description": "A message to show the user when adding data to the cell.", + "formattedValue": { + "description": "The formatted value of the cell.\nThis is the value as it's shown to the user.\nThis field is read-only.", "type": "string" }, - "showCustomUi": { - "description": "True if the UI should be customized based on the kind of condition.\nIf true, \"List\" conditions will show a dropdown.", - "type": "boolean" - }, - "strict": { - "description": "True if invalid data should be rejected.", - "type": "boolean" - } - }, - "id": "DataValidationRule" - }, - "UpdateSpreadsheetPropertiesRequest": { - "description": "Updates properties of a spreadsheet.", - "type": "object", - "properties": { - "fields": { - "description": "The fields that should be updated. At least one field must be specified.\nThe root 'properties' is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - }, - "properties": { - "description": "The properties to update.", - "$ref": "SpreadsheetProperties" - } - }, - "id": "UpdateSpreadsheetPropertiesRequest" - }, - "ChartSourceRange": { - "description": "Source ranges for a chart.", - "type": "object", - "properties": { - "sources": { - "description": "The ranges of data for a series or domain.\nExactly one dimension must have a length of 1,\nand all sources in the list must have the same dimension\nwith length 1.\nThe domain (if it exists) & all series must have the same number\nof source ranges. If using more than one source range, then the source\nrange at a given offset must be contiguous across the domain and series.\n\nFor example, these are valid configurations:\n\n domain sources: A1:A5\n series1 sources: B1:B5\n series2 sources: D6:D10\n\n domain sources: A1:A5, C10:C12\n series1 sources: B1:B5, D10:D12\n series2 sources: C1:C5, E10:E12", - "type": "array", - "items": { - "$ref": "GridRange" - } - } - }, - "id": "ChartSourceRange" - }, - "BatchUpdateValuesRequest": { - "description": "The request for updating more than one range of values in a spreadsheet.", - "type": "object", - "properties": { - "valueInputOption": { - "description": "How the input data should be interpreted.", - "enum": [ - "INPUT_VALUE_OPTION_UNSPECIFIED", - "RAW", - "USER_ENTERED" - ], - "enumDescriptions": [ - "Default input value. This value must not be used.", - "The values the user has entered will not be parsed and will be stored\nas-is.", - "The values will be parsed as if the user typed them into the UI.\nNumbers will stay as numbers, but strings may be converted to numbers,\ndates, etc. following the same rules that are applied when entering\ntext into a cell via the Google Sheets UI." - ], - "type": "string" - }, - "data": { - "description": "The new values to apply to the spreadsheet.", - "type": "array", - "items": { - "$ref": "ValueRange" - } - }, - "responseValueRenderOption": { - "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ], - "enumDescriptions": [ - "Values will be calculated & formatted in the reply according to the\ncell's formatting. Formatting is based on the spreadsheet's locale,\nnot the requesting user's locale.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return `\"$1.23\"`.", - "Values will be calculated, but not formatted in the reply.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return the number `1.23`.", - "Values will not be calculated. The reply will include the formulas.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen A2 would return `\"=A1\"`." - ], - "type": "string" - }, - "responseDateTimeRenderOption": { - "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ], - "enumDescriptions": [ - "Instructs date, time, datetime, and duration fields to be output\nas doubles in \"serial number\" format, as popularized by Lotus 1-2-3.\nDays are counted from December 31st 1899 and are incremented by 1,\nand times are fractions of a day. For example, January 1st 1900 at noon\nwould be 1.5, 1 because it's 1 day offset from December 31st 1899,\nand .5 because noon is half a day. February 1st 1900 at 3pm would\nbe 32.625. This correctly treats the year 1900 as not a leap year.", - "Instructs date, time, datetime, and duration fields to be output\nas strings in their given number format (which is dependent\non the spreadsheet locale)." - ], - "type": "string" - }, - "includeValuesInResponse": { - "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values. The `updatedData` field within\neach of the BatchUpdateValuesResponse.responses will contain\nthe updated values. If the range to write was larger than than the range\nactually written, the response will include all values in the requested\nrange (excluding trailing empty rows and columns).", - "type": "boolean" - } - }, - "id": "BatchUpdateValuesRequest" - }, - "ClearBasicFilterRequest": { - "description": "Clears the basic filter, if any exists on the sheet.", - "type": "object", - "properties": { - "sheetId": { - "description": "The sheet ID on which the basic filter should be cleared.", - "type": "integer", - "format": "int32" - } - }, - "id": "ClearBasicFilterRequest" - }, - "BatchClearValuesResponse": { - "description": "The response when updating a range of values in a spreadsheet.", - "type": "object", - "properties": { - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - }, - "clearedRanges": { - "description": "The ranges that were cleared, in A1 notation.\n(If the requests were for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual ranges\n that were cleared, bounded to the sheet's limits.)", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "BatchClearValuesResponse" - }, - "ConditionalFormatRule": { - "description": "A rule describing a conditional format.", - "type": "object", - "properties": { - "gradientRule": { - "description": "The formatting will vary based on the gradients in the rule.", - "$ref": "GradientRule" - }, - "booleanRule": { - "description": "The formatting is either \"on\" or \"off\" according to the rule.", - "$ref": "BooleanRule" - }, - "ranges": { - "description": "The ranges that will be formatted if the condition is true.\nAll the ranges must be on the same grid.", - "type": "array", - "items": { - "$ref": "GridRange" - } - } - }, - "id": "ConditionalFormatRule" - }, - "UpdateBordersRequest": { - "description": "Updates the borders of a range.\nIf a field is not set in the request, that means the border remains as-is.\nFor example, with two subsequent UpdateBordersRequest:\n\n 1. range: A1:A5 `{ top: RED, bottom: WHITE }`\n 2. range: A1:A5 `{ left: BLUE }`\n\nThat would result in A1:A5 having a borders of\n`{ top: RED, bottom: WHITE, left: BLUE }`.\nIf you want to clear a border, explicitly set the style to\nNONE.", - "type": "object", - "properties": { - "right": { - "description": "The border to put at the right of the range.", - "$ref": "Border" - }, - "innerVertical": { - "description": "The vertical border to put within the range.", - "$ref": "Border" - }, - "top": { - "description": "The border to put at the top of the range.", - "$ref": "Border" - }, - "innerHorizontal": { - "description": "The horizontal border to put within the range.", - "$ref": "Border" - }, - "range": { - "description": "The range whose borders should be updated.", - "$ref": "GridRange" - }, - "bottom": { - "description": "The border to put at the bottom of the range.", - "$ref": "Border" - }, - "left": { - "description": "The border to put at the left of the range.", - "$ref": "Border" - } - }, - "id": "UpdateBordersRequest" - }, - "PivotFilterCriteria": { - "description": "Criteria for showing/hiding rows in a pivot table.", - "type": "object", - "properties": { - "visibleValues": { - "description": "Values that should be included. Values not listed here are excluded.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "PivotFilterCriteria" - }, - "Borders": { - "description": "The borders of the cell.", - "type": "object", - "properties": { - "left": { - "description": "The left border of the cell.", - "$ref": "Border" - }, - "right": { - "description": "The right border of the cell.", - "$ref": "Border" - }, - "top": { - "description": "The top border of the cell.", - "$ref": "Border" - }, - "bottom": { - "description": "The bottom border of the cell.", - "$ref": "Border" - } - }, - "id": "Borders" - }, - "EmbeddedChart": { - "description": "A chart embedded in a sheet.", - "type": "object", - "properties": { - "chartId": { - "description": "The ID of the chart.", - "type": "integer", - "format": "int32" - }, - "position": { - "description": "The position of the chart.", - "$ref": "EmbeddedObjectPosition" - }, - "spec": { - "description": "The specification of the chart.", - "$ref": "ChartSpec" - } - }, - "id": "EmbeddedChart" - }, - "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed\nfor simplicity of conversion to/from color representations in various\nlanguages over compactness; for example, the fields of this representation\ncan be trivially provided to the constructor of \"java.awt.Color\" in Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily formatted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha \u003c= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(red, green, blue) {\n var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i \u003c missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...", - "type": "object", - "properties": { - "green": { - "description": "The amount of green in the color as a value in the interval [0, 1].", - "type": "number", - "format": "float" - }, - "blue": { - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "type": "number", - "format": "float" - }, - "red": { - "description": "The amount of red in the color as a value in the interval [0, 1].", - "type": "number", - "format": "float" - }, - "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is,\nthe final pixel color is defined by the equation:\n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color. This\nuses a wrapper message rather than a simple float scalar so that it is\npossible to distinguish between a default value and the value being unset.\nIf omitted, this color object is to be rendered as a solid color\n(as if the alpha value had been explicitly given with a value of 1.0).", - "type": "number", - "format": "float" - } - }, - "id": "Color" - }, - "AddSheetRequest": { - "description": "Adds a new sheet.\nWhen a sheet is added at a given index,\nall subsequent sheets' indexes are incremented.\nTo add an object sheet, use AddChartRequest instead and specify\nEmbeddedObjectPosition.sheetId or\nEmbeddedObjectPosition.newSheet.", - "type": "object", - "properties": { - "properties": { - "description": "The properties the new sheet should have.\nAll properties are optional.\nThe sheetId field is optional; if one is not\nset, an id will be randomly generated. (It is an error to specify the ID\nof a sheet that already exists.)", - "$ref": "SheetProperties" - } - }, - "id": "AddSheetRequest" - }, - "AddProtectedRangeRequest": { - "description": "Adds a new protected range.", - "type": "object", - "properties": { - "protectedRange": { - "description": "The protected range to be added. The\nprotectedRangeId field is optional; if\none is not set, an id will be randomly generated. (It is an error to\nspecify the ID of a range that already exists.)", - "$ref": "ProtectedRange" - } - }, - "id": "AddProtectedRangeRequest" - }, - "ValueRange": { - "description": "Data within a range of the spreadsheet.", - "type": "object", - "properties": { - "values": { - "description": "The data that was read or to be written. This is an array of arrays,\nthe outer array representing all the data and each inner array\nrepresenting a major dimension. Each item in the inner array\ncorresponds with one cell.\n\nFor output, empty trailing rows and columns will not be included.\n\nFor input, supported value types are: bool, string, and double.\nNull values will be skipped.\nTo set a cell to an empty value, set the string value to an empty string.", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "any" - } - } - }, - "range": { - "description": "The range the values cover, in A1 notation.\nFor output, this range indicates the entire requested range,\neven though the values will exclude trailing rows and columns.\nWhen appending values, this field represents the range to search for a\ntable, after which values will be appended.", - "type": "string" - }, - "majorDimension": { - "description": "The major dimension of the values.\n\nFor output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.\n\nFor input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`\nwill set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`\nthen `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.\n\nWhen writing, if this field is not set, it defaults to ROWS.", - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], + "hyperlink": { + "description": "A hyperlink this cell points to, if any.\nThis field is read-only. (To set it, use a `=HYPERLINK` formula\nin the userEnteredValue.formulaValue\nfield.)", "type": "string" } }, - "id": "ValueRange" - }, - "FindReplaceResponse": { - "description": "The result of the find/replace.", - "type": "object", - "properties": { - "valuesChanged": { - "description": "The number of non-formula cells changed.", - "type": "integer", - "format": "int32" - }, - "rowsChanged": { - "description": "The number of rows changed.", - "type": "integer", - "format": "int32" - }, - "occurrencesChanged": { - "description": "The number of occurrences (possibly multiple within a cell) changed.\nFor example, if replacing `\"e\"` with `\"o\"` in `\"Google Sheets\"`, this would\nbe `\"3\"` because `\"Google Sheets\"` -\u003e `\"Googlo Shoots\"`.", - "type": "integer", - "format": "int32" - }, - "formulasChanged": { - "description": "The number of formula cells changed.", - "type": "integer", - "format": "int32" - }, - "sheetsChanged": { - "description": "The number of sheets changed.", - "type": "integer", - "format": "int32" - } - }, - "id": "FindReplaceResponse" - }, - "AppendValuesResponse": { - "description": "The response when updating a range of values in a spreadsheet.", - "type": "object", - "properties": { - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - }, - "tableRange": { - "description": "The range (in A1 notation) of the table that values are being appended to\n(before the values were appended).\nEmpty if no table was found.", - "type": "string" - }, - "updates": { - "description": "Information about the updates that were applied.", - "$ref": "UpdateValuesResponse" - } - }, - "id": "AppendValuesResponse" - }, - "CellFormat": { - "description": "The format of a cell.", - "type": "object", - "properties": { - "horizontalAlignment": { - "description": "The horizontal alignment of the value in the cell.", - "enum": [ - "HORIZONTAL_ALIGN_UNSPECIFIED", - "LEFT", - "CENTER", - "RIGHT" - ], - "enumDescriptions": [ - "The horizontal alignment is not specified. Do not use this.", - "The text is explicitly aligned to the left of the cell.", - "The text is explicitly aligned to the center of the cell.", - "The text is explicitly aligned to the right of the cell." - ], - "type": "string" - }, - "hyperlinkDisplayType": { - "description": "How a hyperlink, if it exists, should be displayed in the cell.", - "enum": [ - "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED", - "LINKED", - "PLAIN_TEXT" - ], - "enumDescriptions": [ - "The default value: the hyperlink is rendered. Do not use this.", - "A hyperlink should be explicitly rendered.", - "A hyperlink should not be rendered." - ], - "type": "string" - }, - "borders": { - "description": "The borders of the cell.", - "$ref": "Borders" - }, - "textDirection": { - "description": "The direction of the text in the cell.", - "enum": [ - "TEXT_DIRECTION_UNSPECIFIED", - "LEFT_TO_RIGHT", - "RIGHT_TO_LEFT" - ], - "enumDescriptions": [ - "The text direction is not specified. Do not use this.", - "The text direction of left-to-right was set by the user.", - "The text direction of right-to-left was set by the user." - ], - "type": "string" - }, - "textFormat": { - "description": "The format of the text in the cell (unless overridden by a format run).", - "$ref": "TextFormat" - }, - "padding": { - "description": "The padding of the cell.", - "$ref": "Padding" - }, - "numberFormat": { - "description": "A format describing how number values should be represented to the user.", - "$ref": "NumberFormat" - }, - "wrapStrategy": { - "description": "The wrap strategy for the value in the cell.", - "enum": [ - "WRAP_STRATEGY_UNSPECIFIED", - "OVERFLOW_CELL", - "LEGACY_WRAP", - "CLIP", - "WRAP" - ], - "enumDescriptions": [ - "The default value, do not use.", - "Lines that are longer than the cell width will be written in the next\ncell over, so long as that cell is empty. If the next cell over is\nnon-empty, this behaves the same as CLIP. The text will never wrap\nto the next line unless the user manually inserts a new line.\nExample:\n\n | First sentence. |\n | Manual newline that is very long. \u003c- Text continues into next cell\n | Next newline. |", - "This wrap strategy represents the old Google Sheets wrap strategy where\nwords that are longer than a line are clipped rather than broken. This\nstrategy is not supported on all platforms and is being phased out.\nExample:\n\n | Cell has a |\n | loooooooooo| \u003c- Word is clipped.\n | word. |", - "Lines that are longer than the cell width will be clipped.\nThe text will never wrap to the next line unless the user manually\ninserts a new line.\nExample:\n\n | First sentence. |\n | Manual newline t| \u003c- Text is clipped\n | Next newline. |", - "Words that are longer than a line are wrapped at the character level\nrather than clipped.\nExample:\n\n | Cell has a |\n | loooooooooo| \u003c- Word is broken.\n | ong word. |" - ], - "type": "string" - }, - "backgroundColor": { - "description": "The background color of the cell.", - "$ref": "Color" - }, - "verticalAlignment": { - "description": "The vertical alignment of the value in the cell.", - "enum": [ - "VERTICAL_ALIGN_UNSPECIFIED", - "TOP", - "MIDDLE", - "BOTTOM" - ], - "enumDescriptions": [ - "The vertical alignment is not specified. Do not use this.", - "The text is explicitly aligned to the top of the cell.", - "The text is explicitly aligned to the middle of the cell.", - "The text is explicitly aligned to the bottom of the cell." - ], - "type": "string" - } - }, - "id": "CellFormat" - }, - "MoveDimensionRequest": { - "description": "Moves one or more rows or columns.", - "type": "object", - "properties": { - "source": { - "description": "The source dimensions to move.", - "$ref": "DimensionRange" - }, - "destinationIndex": { - "description": "The zero-based start index of where to move the source data to,\nbased on the coordinates *before* the source data is removed\nfrom the grid. Existing data will be shifted down or right\n(depending on the dimension) to make room for the moved dimensions.\nThe source dimensions are removed from the grid, so the\nthe data may end up in a different index than specified.\n\nFor example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move\n`\"1\"` and `\"2\"` to between `\"3\"` and `\"4\"`, the source would be\n`ROWS [1..3)`,and the destination index would be `\"4\"`\n(the zero-based index of row 5).\nThe end result would be `A1..A5` of `0, 3, 1, 2, 4`.", - "type": "integer", - "format": "int32" - } - }, - "id": "MoveDimensionRequest" - }, - "BasicChartAxis": { - "description": "An axis of the chart.\nA chart may not have more than one axis per\naxis position.", - "type": "object", - "properties": { - "position": { - "description": "The position of this axis.", - "enum": [ - "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", - "BOTTOM_AXIS", - "LEFT_AXIS", - "RIGHT_AXIS" - ], - "enumDescriptions": [ - "Default value, do not use.", - "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", - "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", - "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." - ], - "type": "string" - }, - "title": { - "description": "The title of this axis. If set, this overrides any title inferred\nfrom headers of the data.", - "type": "string" - }, - "format": { - "description": "The format of the title.\nOnly valid if the axis is not associated with the domain.", - "$ref": "TextFormat" - } - }, - "id": "BasicChartAxis" - }, - "PivotGroupSortValueBucket": { - "description": "Information about which values in a pivot group should be used for sorting.", - "type": "object", - "properties": { - "buckets": { - "description": "Determines the bucket from which values are chosen to sort.\n\nFor example, in a pivot table with one row group & two column groups,\nthe row group can list up to two values. The first value corresponds\nto a value within the first column group, and the second value\ncorresponds to a value in the second column group. If no values\nare listed, this would indicate that the row should be sorted according\nto the \"Grand Total\" over the column groups. If a single value is listed,\nthis would correspond to using the \"Total\" of that bucket.", - "type": "array", - "items": { - "$ref": "ExtendedValue" - } - }, - "valuesIndex": { - "description": "The offset in the PivotTable.values list which the values in this\ngrouping should be sorted by.", - "type": "integer", - "format": "int32" - } - }, - "id": "PivotGroupSortValueBucket" - }, - "DimensionProperties": { - "description": "Properties about a dimension.", - "type": "object", - "properties": { - "hiddenByUser": { - "description": "True if this dimension is explicitly hidden.", - "type": "boolean" - }, - "pixelSize": { - "description": "The height (if a row) or width (if a column) of the dimension in pixels.", - "type": "integer", - "format": "int32" - }, - "hiddenByFilter": { - "description": "True if this dimension is being filtered.\nThis field is read-only.", - "type": "boolean" - } - }, - "id": "DimensionProperties" - }, - "EmbeddedObjectPosition": { - "description": "The position of an embedded object such as a chart.", - "type": "object", - "properties": { - "sheetId": { - "description": "The sheet this is on. Set only if the embedded object\nis on its own sheet. Must be non-negative.", - "type": "integer", - "format": "int32" - }, - "overlayPosition": { - "description": "The position at which the object is overlaid on top of a grid.", - "$ref": "OverlayPosition" - }, - "newSheet": { - "description": "If true, the embedded object will be put on a new sheet whose ID\nis chosen for you. Used only when writing.", - "type": "boolean" - } - }, - "id": "EmbeddedObjectPosition" - }, - "InterpolationPoint": { - "description": "A single interpolation point on a gradient conditional format.\nThese pin the gradient color scale according to the color,\ntype and value chosen.", - "type": "object", - "properties": { - "value": { - "description": "The value this interpolation point uses. May be a formula.\nUnused if type is MIN or\nMAX.", - "type": "string" - }, - "color": { - "description": "The color this interpolation point should use.", - "$ref": "Color" - }, - "type": { - "description": "How the value should be interpreted.", - "enum": [ - "INTERPOLATION_POINT_TYPE_UNSPECIFIED", - "MIN", - "MAX", - "NUMBER", - "PERCENT", - "PERCENTILE" - ], - "enumDescriptions": [ - "The default value, do not use.", - "The interpolation point will use the minimum value in the\ncells over the range of the conditional format.", - "The interpolation point will use the maximum value in the\ncells over the range of the conditional format.", - "The interpolation point will use exactly the value in\nInterpolationPoint.value.", - "The interpolation point will be the given percentage over\nall the cells in the range of the conditional format.\nThis is equivalent to NUMBER if the value was:\n`=(MAX(FLATTEN(range)) * (value / 100))\n + (MIN(FLATTEN(range)) * (1 - (value / 100)))`\n(where errors in the range are ignored when flattening).", - "The interpolation point will be the given percentile\nover all the cells in the range of the conditional format.\nThis is equivalent to NUMBER if the value was:\n`=PERCENTILE(FLATTEN(range), value / 100)`\n(where errors in the range are ignored when flattening)." - ], - "type": "string" - } - }, - "id": "InterpolationPoint" - }, - "ErrorValue": { - "description": "An error in a cell.", - "type": "object", - "properties": { - "type": { - "description": "The type of error.", - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "ERROR", - "NULL_VALUE", - "DIVIDE_BY_ZERO", - "VALUE", - "REF", - "NAME", - "NUM", - "N_A", - "LOADING" - ], - "enumDescriptions": [ - "The default error type, do not use this.", - "Corresponds to the `#ERROR!` error.", - "Corresponds to the `#NULL!` error.", - "Corresponds to the `#DIV/0` error.", - "Corresponds to the `#VALUE!` error.", - "Corresponds to the `#REF!` error.", - "Corresponds to the `#NAME?` error.", - "Corresponds to the `#NUM`! error.", - "Corresponds to the `#N/A` error.", - "Corresponds to the `Loading...` state." - ], - "type": "string" - }, - "message": { - "description": "A message with more information about the error\n(in the spreadsheet's locale).", - "type": "string" - } - }, - "id": "ErrorValue" - }, - "DuplicateFilterViewRequest": { - "description": "Duplicates a particular filter view.", - "type": "object", - "properties": { - "filterId": { - "description": "The ID of the filter being duplicated.", - "type": "integer", - "format": "int32" - } - }, - "id": "DuplicateFilterViewRequest" + "id": "CellData" }, "BatchUpdateSpreadsheetRequest": { "description": "The request for updating any aspect of a spreadsheet.", "type": "object", "properties": { - "includeSpreadsheetInResponse": { - "description": "Determines if the update response should include the spreadsheet\nresource.", - "type": "boolean" - }, "requests": { - "description": "A list of updates to apply to the spreadsheet.", + "description": "A list of updates to apply to the spreadsheet.\nRequests will be applied in the order they are specified.\nIf any request is not valid, no requests will be applied.", "type": "array", "items": { "$ref": "Request" } }, + "includeSpreadsheetInResponse": { + "description": "Determines if the update response should include the spreadsheet\nresource.", + "type": "boolean" + }, "responseRanges": { "description": "Limits the ranges included in the response spreadsheet.\nMeaningful only if include_spreadsheet_response is 'true'.", "type": "array", @@ -2129,385 +3407,194 @@ }, "id": "BatchUpdateSpreadsheetRequest" }, - "SheetProperties": { - "description": "Properties of a sheet.", + "BasicChartAxis": { + "description": "An axis of the chart.\nA chart may not have more than one axis per\naxis position.", "type": "object", "properties": { - "title": { - "description": "The name of the sheet.", - "type": "string" + "format": { + "$ref": "TextFormat", + "description": "The format of the title.\nOnly valid if the axis is not associated with the domain." }, - "index": { - "description": "The index of the sheet within the spreadsheet.\nWhen adding or updating sheet properties, if this field\nis excluded then the sheet will be added or moved to the end\nof the sheet list. When updating sheet indices or inserting\nsheets, movement is considered in \"before the move\" indexes.\nFor example, if there were 3 sheets (S1, S2, S3) in order to\nmove S1 ahead of S2 the index would have to be set to 2. A sheet\nindex update request will be ignored if the requested index is\nidentical to the sheets current index or if the requested new\nindex is equal to the current sheet index + 1.", - "type": "integer", - "format": "int32" - }, - "hidden": { - "description": "True if the sheet is hidden in the UI, false if it's visible.", - "type": "boolean" - }, - "gridProperties": { - "description": "Additional properties of the sheet if this sheet is a grid.\n(If the sheet is an object sheet, containing a chart or image, then\nthis field will be absent.)\nWhen writing it is an error to set any grid properties on non-grid sheets.", - "$ref": "GridProperties" - }, - "sheetId": { - "description": "The ID of the sheet. Must be non-negative.\nThis field cannot be changed once set.", - "type": "integer", - "format": "int32" - }, - "rightToLeft": { - "description": "True if the sheet is an RTL sheet instead of an LTR sheet.", - "type": "boolean" - }, - "tabColor": { - "description": "The color of the tab in the UI.", - "$ref": "Color" - }, - "sheetType": { - "description": "The type of sheet. Defaults to GRID.\nThis field cannot be changed once set.", + "position": { "enum": [ - "SHEET_TYPE_UNSPECIFIED", - "GRID", - "OBJECT" + "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", + "BOTTOM_AXIS", + "LEFT_AXIS", + "RIGHT_AXIS" ], + "description": "The position of this axis.", + "type": "string", "enumDescriptions": [ "Default value, do not use.", - "The sheet is a grid.", - "The sheet has no grid and instead has an object like a chart or image." - ], + "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", + "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", + "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." + ] + }, + "title": { + "description": "The title of this axis. If set, this overrides any title inferred\nfrom headers of the data.", "type": "string" } }, - "id": "SheetProperties" + "id": "BasicChartAxis" }, - "ClearValuesRequest": { - "description": "The request for clearing a range of values in a spreadsheet.", - "type": "object", - "properties": {}, - "id": "ClearValuesRequest" - }, - "ProtectedRange": { - "description": "A protected range.", + "Padding": { + "description": "The amount of padding around the cell, in pixels.\nWhen updating padding, every field must be specified.", "type": "object", "properties": { - "unprotectedRanges": { - "description": "The list of unprotected ranges within a protected sheet.\nUnprotected ranges are only supported on protected sheets.", + "top": { + "description": "The top padding of the cell.", + "format": "int32", + "type": "integer" + }, + "left": { + "description": "The left padding of the cell.", + "format": "int32", + "type": "integer" + }, + "right": { + "description": "The right padding of the cell.", + "format": "int32", + "type": "integer" + }, + "bottom": { + "description": "The bottom padding of the cell.", + "format": "int32", + "type": "integer" + } + }, + "id": "Padding" + }, + "DeleteDimensionRequest": { + "id": "DeleteDimensionRequest", + "description": "Deletes the dimensions from the sheet.", + "type": "object", + "properties": { + "range": { + "$ref": "DimensionRange", + "description": "The dimensions to delete from the sheet." + } + } + }, + "UpdateChartSpecRequest": { + "description": "Updates a chart's specifications.\n(This does not move or resize a chart. To move or resize a chart, use\n UpdateEmbeddedObjectPositionRequest.)", + "type": "object", + "properties": { + "chartId": { + "description": "The ID of the chart to update.", + "format": "int32", + "type": "integer" + }, + "spec": { + "$ref": "ChartSpec", + "description": "The specification to apply to the chart." + } + }, + "id": "UpdateChartSpecRequest" + }, + "DeleteFilterViewRequest": { + "description": "Deletes a particular filter view.", + "type": "object", + "properties": { + "filterId": { + "description": "The ID of the filter to delete.", + "format": "int32", + "type": "integer" + } + }, + "id": "DeleteFilterViewRequest" + }, + "BatchUpdateValuesResponse": { + "description": "The response when updating a range of values in a spreadsheet.", + "type": "object", + "properties": { + "totalUpdatedRows": { + "description": "The total number of rows where at least one cell in the row was updated.", + "format": "int32", + "type": "integer" + }, + "responses": { + "description": "One UpdateValuesResponse per requested range, in the same order as\nthe requests appeared.", "type": "array", "items": { - "$ref": "GridRange" + "$ref": "UpdateValuesResponse" } }, - "description": { - "description": "The description of this protected range.", - "type": "string" + "totalUpdatedSheets": { + "description": "The total number of sheets where at least one cell in the sheet was\nupdated.", + "format": "int32", + "type": "integer" }, - "namedRangeId": { - "description": "The named range this protected range is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", - "type": "string" + "totalUpdatedCells": { + "description": "The total number of cells updated.", + "format": "int32", + "type": "integer" }, - "requestingUserCanEdit": { - "description": "True if the user who requested this protected range can edit the\nprotected area.\nThis field is read-only.", - "type": "boolean" - }, - "editors": { - "description": "The users and groups with edit access to the protected range.\nThis field is only visible to users with edit access to the protected\nrange and the document.\nEditors are not supported with warning_only protection.", - "$ref": "Editors" - }, - "protectedRangeId": { - "description": "The ID of the protected range.\nThis field is read-only.", + "totalUpdatedColumns": { "type": "integer", + "description": "The total number of columns where at least one cell in the column was\nupdated.", "format": "int32" }, - "warningOnly": { - "description": "True if this protected range will show a warning when editing.\nWarning-based protection means that every user can edit data in the\nprotected range, except editing will prompt a warning asking the user\nto confirm the edit.\n\nWhen writing: if this field is true, then editors is ignored.\nAdditionally, if this field is changed from true to false and the\n`editors` field is not set (nor included in the field mask), then\nthe editors will be set to all the editors in the document.", - "type": "boolean" - }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + } + }, + "id": "BatchUpdateValuesResponse" + }, + "SortRangeRequest": { + "description": "Sorts data in rows based on a sort order per column.", + "type": "object", + "properties": { "range": { - "description": "The range that is being protected.\nThe range may be fully unbounded, in which case this is considered\na protected sheet.\n\nWhen writing, only one of range or named_range_id\nmay be set.", - "$ref": "GridRange" + "$ref": "GridRange", + "description": "The range to sort." + }, + "sortSpecs": { + "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", + "type": "array", + "items": { + "$ref": "SortSpec" + } } }, - "id": "ProtectedRange" + "id": "SortRangeRequest" }, - "DeleteConditionalFormatRuleRequest": { - "description": "Deletes a conditional format rule at the given index.\nAll subsequent rules' indexes are decremented.", - "type": "object", + "MergeCellsRequest": { "properties": { - "sheetId": { - "description": "The sheet the rule is being deleted from.", - "type": "integer", - "format": "int32" - }, - "index": { - "description": "The zero-based index of the rule to be deleted.", - "type": "integer", - "format": "int32" - } - }, - "id": "DeleteConditionalFormatRuleRequest" - }, - "ChartSpec": { - "description": "The specifications of a chart.", - "type": "object", - "properties": { - "hiddenDimensionStrategy": { - "description": "Determines how the charts will use hidden rows or columns.", - "enum": [ - "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED", - "SKIP_HIDDEN_ROWS_AND_COLUMNS", - "SKIP_HIDDEN_ROWS", - "SKIP_HIDDEN_COLUMNS", - "SHOW_ALL" - ], - "enumDescriptions": [ - "Default value, do not use.", - "Charts will skip hidden rows and columns.", - "Charts will skip hidden rows only.", - "Charts will skip hidden columns only.", - "Charts will not skip any hidden rows or columns." - ], - "type": "string" - }, - "basicChart": { - "description": "A basic chart specification, can be one of many kinds of charts.\nSee BasicChartType for the list of all\ncharts this supports.", - "$ref": "BasicChartSpec" - }, - "title": { - "description": "The title of the chart.", - "type": "string" - }, - "pieChart": { - "description": "A pie chart specification.", - "$ref": "PieChartSpec" - } - }, - "id": "ChartSpec" - }, - "SourceAndDestination": { - "description": "A combination of a source range and how to extend that source.", - "type": "object", - "properties": { - "source": { - "description": "The location of the data to use as the source of the autofill.", - "$ref": "GridRange" - }, - "fillLength": { - "description": "The number of rows or columns that data should be filled into.\nPositive numbers expand beyond the last row or last column\nof the source. Negative numbers expand before the first row\nor first column of the source.", - "type": "integer", - "format": "int32" - }, - "dimension": { - "description": "The dimension that data should be filled into.", - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], - "type": "string" - } - }, - "id": "SourceAndDestination" - }, - "ConditionValue": { - "description": "The value of the condition.", - "type": "object", - "properties": { - "relativeDate": { - "description": "A relative date (based on the current date).\nValid only if the type is\nDATE_BEFORE,\nDATE_AFTER,\nDATE_ON_OR_BEFORE or\nDATE_ON_OR_AFTER.\n\nRelative dates are not supported in data validation.\nThey are supported only in conditional formatting and\nconditional filters.", - "enum": [ - "RELATIVE_DATE_UNSPECIFIED", - "PAST_YEAR", - "PAST_MONTH", - "PAST_WEEK", - "YESTERDAY", - "TODAY", - "TOMORROW" - ], - "enumDescriptions": [ - "Default value, do not use.", - "The value is one year before today.", - "The value is one month before today.", - "The value is one week before today.", - "The value is yesterday.", - "The value is today.", - "The value is tomorrow." - ], - "type": "string" - }, - "userEnteredValue": { - "description": "A value the condition is based on.\nThe value will be parsed as if the user typed into a cell.\nFormulas are supported (and must begin with an `=`).", - "type": "string" - } - }, - "id": "ConditionValue" - }, - "PasteDataRequest": { - "description": "Inserts data into the spreadsheet starting at the specified coordinate.", - "type": "object", - "properties": { - "data": { - "description": "The data to insert.", - "type": "string" - }, - "coordinate": { - "description": "The coordinate at which the data should start being inserted.", - "$ref": "GridCoordinate" - }, - "delimiter": { - "description": "The delimiter in the data.", - "type": "string" - }, - "type": { - "description": "How the data should be pasted.", - "enum": [ - "PASTE_NORMAL", - "PASTE_VALUES", - "PASTE_FORMAT", - "PASTE_NO_BORDERS", - "PASTE_FORMULA", - "PASTE_DATA_VALIDATION", - "PASTE_CONDITIONAL_FORMATTING" - ], - "enumDescriptions": [ - "Paste values, formulas, formats, and merges.", - "Paste the values ONLY without formats, formulas, or merges.", - "Paste the format and data validation only.", - "Like PASTE_NORMAL but without borders.", - "Paste the formulas only.", - "Paste the data validation only.", - "Paste the conditional formatting rules only." - ], - "type": "string" - }, - "html": { - "description": "True if the data is HTML.", - "type": "boolean" - } - }, - "id": "PasteDataRequest" - }, - "FindReplaceRequest": { - "description": "Finds and replaces data in cells over a range, sheet, or all sheets.", - "type": "object", - "properties": { - "find": { - "description": "The value to search.", - "type": "string" - }, - "replacement": { - "description": "The value to use as the replacement.", - "type": "string" - }, - "searchByRegex": { - "description": "True if the find value is a regex.\nThe regular expression and replacement should follow Java regex rules\nat https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.\nThe replacement string is allowed to refer to capturing groups.\nFor example, if one cell has the contents `\"Google Sheets\"` and another\nhas `\"Google Docs\"`, then searching for `\"o.* (.*)\"` with a replacement of\n`\"$1 Rocks\"` would change the contents of the cells to\n`\"GSheets Rocks\"` and `\"GDocs Rocks\"` respectively.", - "type": "boolean" - }, - "sheetId": { - "description": "The sheet to find/replace over.", - "type": "integer", - "format": "int32" - }, - "allSheets": { - "description": "True to find/replace over all sheets.", - "type": "boolean" - }, - "matchCase": { - "description": "True if the search is case sensitive.", - "type": "boolean" - }, - "includeFormulas": { - "description": "True if the search should include cells with formulas.\nFalse to skip cells with formulas.", - "type": "boolean" - }, "range": { - "description": "The range to find/replace over.", - "$ref": "GridRange" + "$ref": "GridRange", + "description": "The range of cells to merge." }, - "matchEntireCell": { - "description": "True if the find value should match the entire cell.", - "type": "boolean" - } - }, - "id": "FindReplaceRequest" - }, - "SortSpec": { - "description": "A sort order associated with a specific column or row.", - "type": "object", - "properties": { - "sortOrder": { - "description": "The order data should be sorted.", - "enum": [ - "SORT_ORDER_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], + "mergeType": { "enumDescriptions": [ - "Default value, do not use this.", - "Sort ascending.", - "Sort descending." + "Create a single merge from the range", + "Create a merge for each column in the range", + "Create a merge for each row in the range" ], - "type": "string" - }, - "dimensionIndex": { - "description": "The dimension the sort should be applied to.", - "type": "integer", - "format": "int32" - } - }, - "id": "SortSpec" - }, - "CopySheetToAnotherSpreadsheetRequest": { - "description": "The request to copy a sheet across spreadsheets.", - "type": "object", - "properties": { - "destinationSpreadsheetId": { - "description": "The ID of the spreadsheet to copy the sheet to.", - "type": "string" - } - }, - "id": "CopySheetToAnotherSpreadsheetRequest" - }, - "NumberFormat": { - "description": "The number format of a cell.", - "type": "object", - "properties": { - "pattern": { - "description": "Pattern string used for formatting. If not set, a default pattern based on\nthe user's locale will be used if necessary for the given type.\nSee the [Date and Number Formats guide](/sheets/guides/formats) for more\ninformation about the supported patterns.", - "type": "string" - }, - "type": { - "description": "The type of the number format.\nWhen writing, this field must be set.", "enum": [ - "NUMBER_FORMAT_TYPE_UNSPECIFIED", - "TEXT", - "NUMBER", - "PERCENT", - "CURRENCY", - "DATE", - "TIME", - "DATE_TIME", - "SCIENTIFIC" - ], - "enumDescriptions": [ - "The number format is not specified\nand is based on the contents of the cell.\nDo not explicitly use this.", - "Text formatting, e.g `1000.12`", - "Number formatting, e.g, `1,000.12`", - "Percent formatting, e.g `10.12%`", - "Currency formatting, e.g `$1,000.12`", - "Date formatting, e.g `9/26/2008`", - "Time formatting, e.g `3:59:00 PM`", - "Date+Time formatting, e.g `9/26/08 15:59:00`", - "Scientific number formatting, e.g `1.01E+03`" + "MERGE_ALL", + "MERGE_COLUMNS", + "MERGE_ROWS" ], + "description": "How the cells should be merged.", "type": "string" } }, - "id": "NumberFormat" + "id": "MergeCellsRequest", + "description": "Merges all cells in the range.", + "type": "object" + }, + "AddProtectedRangeRequest": { + "properties": { + "protectedRange": { + "$ref": "ProtectedRange", + "description": "The protected range to be added. The\nprotectedRangeId field is optional; if\none is not set, an id will be randomly generated. (It is an error to\nspecify the ID of a range that already exists.)" + } + }, + "id": "AddProtectedRangeRequest", + "description": "Adds a new protected range.", + "type": "object" }, "BatchClearValuesRequest": { "description": "The request for clearing more than one range of values in a spreadsheet.", @@ -2523,154 +3610,498 @@ }, "id": "BatchClearValuesRequest" }, + "DuplicateFilterViewResponse": { + "description": "The result of a filter view being duplicated.", + "type": "object", + "properties": { + "filter": { + "$ref": "FilterView", + "description": "The newly created filter." + } + }, + "id": "DuplicateFilterViewResponse" + }, + "DuplicateSheetResponse": { + "id": "DuplicateSheetResponse", + "description": "The result of duplicating a sheet.", + "type": "object", + "properties": { + "properties": { + "description": "The properties of the duplicate sheet.", + "$ref": "SheetProperties" + } + } + }, + "ClearBasicFilterRequest": { + "description": "Clears the basic filter, if any exists on the sheet.", + "type": "object", + "properties": { + "sheetId": { + "description": "The sheet ID on which the basic filter should be cleared.", + "format": "int32", + "type": "integer" + } + }, + "id": "ClearBasicFilterRequest" + }, + "TextToColumnsRequest": { + "description": "Splits a column of text into multiple columns,\nbased on a delimiter in each cell.", + "type": "object", + "properties": { + "delimiter": { + "description": "The delimiter to use. Used only if delimiterType is\nCUSTOM.", + "type": "string" + }, + "source": { + "description": "The source data range. This must span exactly one column.", + "$ref": "GridRange" + }, + "delimiterType": { + "description": "The delimiter type to use.", + "type": "string", + "enumDescriptions": [ + "Default value. This value must not be used.", + "\",\"", + "\";\"", + "\".\"", + "\" \"", + "A custom value as defined in delimiter." + ], + "enum": [ + "DELIMITER_TYPE_UNSPECIFIED", + "COMMA", + "SEMICOLON", + "PERIOD", + "SPACE", + "CUSTOM" + ] + } + }, + "id": "TextToColumnsRequest" + }, + "DeleteBandingRequest": { + "description": "Removes the banded range with the given ID from the spreadsheet.", + "type": "object", + "properties": { + "bandedRangeId": { + "description": "The ID of the banded range to delete.", + "format": "int32", + "type": "integer" + } + }, + "id": "DeleteBandingRequest" + }, + "BatchUpdateSpreadsheetResponse": { + "description": "The reply for batch updating a spreadsheet.", + "type": "object", + "properties": { + "replies": { + "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", + "type": "array", + "items": { + "$ref": "Response" + } + }, + "updatedSpreadsheet": { + "$ref": "Spreadsheet", + "description": "The spreadsheet after updates were applied. This is only set if\n[BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is `true`." + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + } + }, + "id": "BatchUpdateSpreadsheetResponse" + }, + "AppendValuesResponse": { + "description": "The response when updating a range of values in a spreadsheet.", + "type": "object", + "properties": { + "updates": { + "$ref": "UpdateValuesResponse", + "description": "Information about the updates that were applied." + }, + "tableRange": { + "description": "The range (in A1 notation) of the table that values are being appended to\n(before the values were appended).\nEmpty if no table was found.", + "type": "string" + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + } + }, + "id": "AppendValuesResponse" + }, + "AddFilterViewRequest": { + "description": "Adds a filter view.", + "type": "object", + "properties": { + "filter": { + "$ref": "FilterView", + "description": "The filter to add. The filterViewId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a filter that already exists.)" + } + }, + "id": "AddFilterViewRequest" + }, + "PivotFilterCriteria": { + "description": "Criteria for showing/hiding rows in a pivot table.", + "type": "object", + "properties": { + "visibleValues": { + "description": "Values that should be included. Values not listed here are excluded.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "PivotFilterCriteria" + }, + "MoveDimensionRequest": { + "description": "Moves one or more rows or columns.", + "type": "object", + "properties": { + "destinationIndex": { + "type": "integer", + "description": "The zero-based start index of where to move the source data to,\nbased on the coordinates *before* the source data is removed\nfrom the grid. Existing data will be shifted down or right\n(depending on the dimension) to make room for the moved dimensions.\nThe source dimensions are removed from the grid, so the\nthe data may end up in a different index than specified.\n\nFor example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move\n`\"1\"` and `\"2\"` to between `\"3\"` and `\"4\"`, the source would be\n`ROWS [1..3)`,and the destination index would be `\"4\"`\n(the zero-based index of row 5).\nThe end result would be `A1..A5` of `0, 3, 1, 2, 4`.", + "format": "int32" + }, + "source": { + "$ref": "DimensionRange", + "description": "The source dimensions to move." + } + }, + "id": "MoveDimensionRequest" + }, + "AddConditionalFormatRuleRequest": { + "id": "AddConditionalFormatRuleRequest", + "description": "Adds a new conditional format rule at the given index.\nAll subsequent rules' indexes are incremented.", + "type": "object", + "properties": { + "rule": { + "description": "The rule to add.", + "$ref": "ConditionalFormatRule" + }, + "index": { + "description": "The zero-based index where the rule should be inserted.", + "format": "int32", + "type": "integer" + } + } + }, + "ChartSpec": { + "type": "object", + "properties": { + "basicChart": { + "$ref": "BasicChartSpec", + "description": "A basic chart specification, can be one of many kinds of charts.\nSee BasicChartType for the list of all\ncharts this supports." + }, + "hiddenDimensionStrategy": { + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "Charts will skip hidden rows and columns.", + "Charts will skip hidden rows only.", + "Charts will skip hidden columns only.", + "Charts will not skip any hidden rows or columns." + ], + "enum": [ + "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED", + "SKIP_HIDDEN_ROWS_AND_COLUMNS", + "SKIP_HIDDEN_ROWS", + "SKIP_HIDDEN_COLUMNS", + "SHOW_ALL" + ], + "description": "Determines how the charts will use hidden rows or columns." + }, + "title": { + "description": "The title of the chart.", + "type": "string" + }, + "pieChart": { + "$ref": "PieChartSpec", + "description": "A pie chart specification." + } + }, + "id": "ChartSpec", + "description": "The specifications of a chart." + }, + "NumberFormat": { + "type": "object", + "properties": { + "type": { + "description": "The type of the number format.\nWhen writing, this field must be set.", + "type": "string", + "enumDescriptions": [ + "The number format is not specified\nand is based on the contents of the cell.\nDo not explicitly use this.", + "Text formatting, e.g `1000.12`", + "Number formatting, e.g, `1,000.12`", + "Percent formatting, e.g `10.12%`", + "Currency formatting, e.g `$1,000.12`", + "Date formatting, e.g `9/26/2008`", + "Time formatting, e.g `3:59:00 PM`", + "Date+Time formatting, e.g `9/26/08 15:59:00`", + "Scientific number formatting, e.g `1.01E+03`" + ], + "enum": [ + "NUMBER_FORMAT_TYPE_UNSPECIFIED", + "TEXT", + "NUMBER", + "PERCENT", + "CURRENCY", + "DATE", + "TIME", + "DATE_TIME", + "SCIENTIFIC" + ] + }, + "pattern": { + "description": "Pattern string used for formatting. If not set, a default pattern based on\nthe user's locale will be used if necessary for the given type.\nSee the [Date and Number Formats guide](/sheets/api/guides/formats) for more\ninformation about the supported patterns.", + "type": "string" + } + }, + "id": "NumberFormat", + "description": "The number format of a cell." + }, + "SheetProperties": { + "description": "Properties of a sheet.", + "type": "object", + "properties": { + "title": { + "description": "The name of the sheet.", + "type": "string" + }, + "tabColor": { + "$ref": "Color", + "description": "The color of the tab in the UI." + }, + "index": { + "description": "The index of the sheet within the spreadsheet.\nWhen adding or updating sheet properties, if this field\nis excluded then the sheet will be added or moved to the end\nof the sheet list. When updating sheet indices or inserting\nsheets, movement is considered in \"before the move\" indexes.\nFor example, if there were 3 sheets (S1, S2, S3) in order to\nmove S1 ahead of S2 the index would have to be set to 2. A sheet\nindex update request will be ignored if the requested index is\nidentical to the sheets current index or if the requested new\nindex is equal to the current sheet index + 1.", + "format": "int32", + "type": "integer" + }, + "sheetId": { + "description": "The ID of the sheet. Must be non-negative.\nThis field cannot be changed once set.", + "format": "int32", + "type": "integer" + }, + "rightToLeft": { + "description": "True if the sheet is an RTL sheet instead of an LTR sheet.", + "type": "boolean" + }, + "hidden": { + "description": "True if the sheet is hidden in the UI, false if it's visible.", + "type": "boolean" + }, + "sheetType": { + "enum": [ + "SHEET_TYPE_UNSPECIFIED", + "GRID", + "OBJECT" + ], + "description": "The type of sheet. Defaults to GRID.\nThis field cannot be changed once set.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The sheet is a grid.", + "The sheet has no grid and instead has an object like a chart or image." + ] + }, + "gridProperties": { + "$ref": "GridProperties", + "description": "Additional properties of the sheet if this sheet is a grid.\n(If the sheet is an object sheet, containing a chart or image, then\nthis field will be absent.)\nWhen writing it is an error to set any grid properties on non-grid sheets." + } + }, + "id": "SheetProperties" + }, "UpdateDimensionPropertiesRequest": { "description": "Updates properties of dimensions within the specified range.", "type": "object", "properties": { + "range": { + "$ref": "DimensionRange", + "description": "The rows or columns to update." + }, "fields": { "description": "The fields that should be updated. At least one field must be specified.\nThe root `properties` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - }, - "range": { - "description": "The rows or columns to update.", - "$ref": "DimensionRange" + "format": "google-fieldmask", + "type": "string" }, "properties": { - "description": "Properties to update.", - "$ref": "DimensionProperties" + "$ref": "DimensionProperties", + "description": "Properties to update." } }, "id": "UpdateDimensionPropertiesRequest" }, - "Editors": { - "description": "The editors of a protected range.", + "SourceAndDestination": { + "description": "A combination of a source range and how to extend that source.", "type": "object", "properties": { - "users": { - "description": "The email addresses of users with edit access to the protected range.", - "type": "array", - "items": { - "type": "string" - } + "source": { + "description": "The location of the data to use as the source of the autofill.", + "$ref": "GridRange" }, - "groups": { - "description": "The email addresses of groups with edit access to the protected range.", - "type": "array", - "items": { - "type": "string" - } + "dimension": { + "description": "The dimension that data should be filled into.", + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ] }, - "domainUsersCanEdit": { - "description": "True if anyone in the document's domain has edit access to the protected\nrange. Domain protection is only supported on documents within a domain.", - "type": "boolean" + "fillLength": { + "description": "The number of rows or columns that data should be filled into.\nPositive numbers expand beyond the last row or last column\nof the source. Negative numbers expand before the first row\nor first column of the source.", + "format": "int32", + "type": "integer" } }, - "id": "Editors" + "id": "SourceAndDestination" }, - "Spreadsheet": { - "description": "Resource that represents a spreadsheet.", + "FilterView": { + "description": "A filter view.", "type": "object", "properties": { + "range": { + "$ref": "GridRange", + "description": "The range this filter view covers.\n\nWhen writing, only one of range or named_range_id\nmay be set." + }, + "criteria": { + "additionalProperties": { + "$ref": "FilterCriteria" + }, + "description": "The criteria for showing/hiding values per column.\nThe map's key is the column index, and the value is the criteria for\nthat column.", + "type": "object" + }, + "title": { + "description": "The name of the filter view.", + "type": "string" + }, + "sortSpecs": { + "type": "array", + "items": { + "$ref": "SortSpec" + }, + "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications." + }, + "namedRangeId": { + "description": "The named range this filter view is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", + "type": "string" + }, + "filterViewId": { + "description": "The ID of the filter view.", + "format": "int32", + "type": "integer" + } + }, + "id": "FilterView" + }, + "BandingProperties": { + "id": "BandingProperties", + "description": "Properties referring a single dimension (either row or column). If both\nBandedRange.row_properties and BandedRange.column_properties are\nset, the fill colors are applied to cells according to the following rules:\n\n* header_color and footer_color take priority over band colors.\n* first_band_color takes priority over second_band_color.\n* row_properties takes priority over column_properties.\n\nFor example, the first row color takes priority over the first column\ncolor, but the first column color takes priority over the second row color.\nSimilarly, the row header takes priority over the column header in the\ntop left cell, but the column header takes priority over the first row\ncolor if the row header is not set.", + "type": "object", + "properties": { + "firstBandColor": { + "$ref": "Color", + "description": "The first color that is alternating. (Required)" + }, + "secondBandColor": { + "description": "The second color that is alternating. (Required)", + "$ref": "Color" + }, + "footerColor": { + "$ref": "Color", + "description": "The color of the last row or column. If this field is not set, the last\nrow or column will be filled with either first_band_color or\nsecond_band_color, depending on the color of the previous row or\ncolumn." + }, + "headerColor": { + "$ref": "Color", + "description": "The color of the first row or column. If this field is set, the first\nrow or column will be filled with this color and the colors will\nalternate between first_band_color and second_band_color starting\nfrom the second row or column. Otherwise, the first row or column will be\nfilled with first_band_color and the colors will proceed to alternate\nas they normally would." + } + } + }, + "AddProtectedRangeResponse": { + "description": "The result of adding a new protected range.", + "type": "object", + "properties": { + "protectedRange": { + "$ref": "ProtectedRange", + "description": "The newly added protected range." + } + }, + "id": "AddProtectedRangeResponse" + }, + "BasicFilter": { + "description": "The default filter associated with a sheet.", + "type": "object", + "properties": { + "range": { + "$ref": "GridRange", + "description": "The range the filter covers." + }, + "criteria": { + "description": "The criteria for showing/hiding values per column.\nThe map's key is the column index, and the value is the criteria for\nthat column.", + "type": "object", + "additionalProperties": { + "$ref": "FilterCriteria" + } + }, + "sortSpecs": { + "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", + "type": "array", + "items": { + "$ref": "SortSpec" + } + } + }, + "id": "BasicFilter" + }, + "UpdateValuesResponse": { + "description": "The response when updating a range of values in a spreadsheet.", + "type": "object", + "properties": { + "updatedColumns": { + "description": "The number of columns where at least one cell in the column was updated.", + "format": "int32", + "type": "integer" + }, "spreadsheetId": { - "description": "The ID of the spreadsheet.\nThis field is read-only.", + "description": "The spreadsheet the updates were applied to.", "type": "string" }, - "properties": { - "description": "Overall properties of a spreadsheet.", - "$ref": "SpreadsheetProperties" - }, - "spreadsheetUrl": { - "description": "The url of the spreadsheet.\nThis field is read-only.", + "updatedRange": { + "description": "The range (in A1 notation) that updates were applied to.", "type": "string" }, - "sheets": { - "description": "The sheets that are part of a spreadsheet.", - "type": "array", - "items": { - "$ref": "Sheet" - } + "updatedCells": { + "description": "The number of cells updated.", + "format": "int32", + "type": "integer" }, - "namedRanges": { - "description": "The named ranges defined in a spreadsheet.", - "type": "array", - "items": { - "$ref": "NamedRange" - } + "updatedRows": { + "description": "The number of rows where at least one cell in the row was updated.", + "format": "int32", + "type": "integer" + }, + "updatedData": { + "$ref": "ValueRange", + "description": "The values of the cells after updates were applied.\nThis is only included if the request's `includeValuesInResponse` field\nwas `true`." } }, - "id": "Spreadsheet" - }, - "GridData": { - "description": "Data in the grid, as well as metadata about the dimensions.", - "type": "object", - "properties": { - "columnMetadata": { - "description": "Metadata about the requested columns in the grid, starting with the column\nin start_column.", - "type": "array", - "items": { - "$ref": "DimensionProperties" - } - }, - "rowData": { - "description": "The data in the grid, one entry per row,\nstarting with the row in startRow.\nThe values in RowData will correspond to columns starting\nat start_column.", - "type": "array", - "items": { - "$ref": "RowData" - } - }, - "startRow": { - "description": "The first row this GridData refers to, zero-based.", - "type": "integer", - "format": "int32" - }, - "rowMetadata": { - "description": "Metadata about the requested rows in the grid, starting with the row\nin start_row.", - "type": "array", - "items": { - "$ref": "DimensionProperties" - } - }, - "startColumn": { - "description": "The first column this GridData refers to, zero-based.", - "type": "integer", - "format": "int32" - } - }, - "id": "GridData" + "id": "UpdateValuesResponse" }, "PivotValue": { - "description": "The definition of how a value in a pivot table should be calculated.", - "type": "object", "properties": { "formula": { "description": "A custom formula to calculate the value. The formula must start\nwith an `=` character.", "type": "string" }, - "sourceColumnOffset": { - "description": "The column offset of the source range that this value reads from.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this value refers to column `C`, whereas the offset `1` would\nrefer to column `D`.", - "type": "integer", - "format": "int32" - }, "summarizeFunction": { - "description": "A function to summarize the value.\nIf formula is set, the only supported values are\nSUM and\nCUSTOM.\nIf sourceColumnOffset is set, then `CUSTOM`\nis not supported.", - "enum": [ - "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED", - "SUM", - "COUNTA", - "COUNT", - "COUNTUNIQUE", - "AVERAGE", - "MAX", - "MIN", - "MEDIAN", - "PRODUCT", - "STDEV", - "STDEVP", - "VAR", - "VARP", - "CUSTOM" - ], "enumDescriptions": [ "The default, do not use.", "Corresponds to the `SUM` function.", @@ -2688,1427 +4119,109 @@ "Corresponds to the `VARP` function.", "Indicates the formula should be used as-is.\nOnly valid if PivotValue.formula was set." ], + "enum": [ + "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED", + "SUM", + "COUNTA", + "COUNT", + "COUNTUNIQUE", + "AVERAGE", + "MAX", + "MIN", + "MEDIAN", + "PRODUCT", + "STDEV", + "STDEVP", + "VAR", + "VARP", + "CUSTOM" + ], + "description": "A function to summarize the value.\nIf formula is set, the only supported values are\nSUM and\nCUSTOM.\nIf sourceColumnOffset is set, then `CUSTOM`\nis not supported.", "type": "string" }, + "sourceColumnOffset": { + "description": "The column offset of the source range that this value reads from.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this value refers to column `C`, whereas the offset `1` would\nrefer to column `D`.", + "format": "int32", + "type": "integer" + }, "name": { "description": "A name to use for the value. This is only used if formula was set.\nOtherwise, the column name is used.", "type": "string" } }, - "id": "PivotValue" + "id": "PivotValue", + "description": "The definition of how a value in a pivot table should be calculated.", + "type": "object" }, - "DeleteBandingRequest": { - "description": "Removes the banded range with the given ID from the spreadsheet.", + "ErrorValue": { + "description": "An error in a cell.", "type": "object", "properties": { - "bandedRangeId": { - "description": "The ID of the banded range to delete.", - "type": "integer", - "format": "int32" - } - }, - "id": "DeleteBandingRequest" - }, - "BasicFilter": { - "description": "The default filter associated with a sheet.", - "type": "object", - "properties": { - "criteria": { - "description": "The criteria for showing/hiding values per column.\nThe map's key is the column index, and the value is the criteria for\nthat column.", - "additionalProperties": { - "$ref": "FilterCriteria" - }, - "type": "object" - }, - "range": { - "description": "The range the filter covers.", - "$ref": "GridRange" - }, - "sortSpecs": { - "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", - "type": "array", - "items": { - "$ref": "SortSpec" - } - } - }, - "id": "BasicFilter" - }, - "DuplicateSheetRequest": { - "description": "Duplicates the contents of a sheet.", - "type": "object", - "properties": { - "sourceSheetId": { - "description": "The sheet to duplicate.", - "type": "integer", - "format": "int32" - }, - "newSheetId": { - "description": "If set, the ID of the new sheet. If not set, an ID is chosen.\nIf set, the ID must not conflict with any existing sheet ID.\nIf set, it must be non-negative.", - "type": "integer", - "format": "int32" - }, - "insertSheetIndex": { - "description": "The zero-based index where the new sheet should be inserted.\nThe index of all sheets after this are incremented.", - "type": "integer", - "format": "int32" - }, - "newSheetName": { - "description": "The name of the new sheet. If empty, a new name is chosen for you.", - "type": "string" - } - }, - "id": "DuplicateSheetRequest" - }, - "AddFilterViewResponse": { - "description": "The result of adding a filter view.", - "type": "object", - "properties": { - "filter": { - "description": "The newly added filter view.", - "$ref": "FilterView" - } - }, - "id": "AddFilterViewResponse" - }, - "DuplicateSheetResponse": { - "description": "The result of duplicating a sheet.", - "type": "object", - "properties": { - "properties": { - "description": "The properties of the duplicate sheet.", - "$ref": "SheetProperties" - } - }, - "id": "DuplicateSheetResponse" - }, - "Border": { - "description": "A border along a cell.", - "type": "object", - "properties": { - "style": { - "description": "The style of the border.", - "enum": [ - "STYLE_UNSPECIFIED", - "DOTTED", - "DASHED", - "SOLID", - "SOLID_MEDIUM", - "SOLID_THICK", - "NONE", - "DOUBLE" - ], - "enumDescriptions": [ - "The style is not specified. Do not use this.", - "The border is dotted.", - "The border is dashed.", - "The border is a thin solid line.", - "The border is a medium solid line.", - "The border is a thick solid line.", - "No border.\nUsed only when updating a border in order to erase it.", - "The border is two solid lines." - ], - "type": "string" - }, - "width": { - "description": "The width of the border, in pixels.\nDeprecated; the width is determined by the \"style\" field.", - "type": "integer", - "format": "int32" - }, - "color": { - "description": "The color of the border.", - "$ref": "Color" - } - }, - "id": "Border" - }, - "AddNamedRangeRequest": { - "description": "Adds a named range to the spreadsheet.", - "type": "object", - "properties": { - "namedRange": { - "description": "The named range to add. The namedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)", - "$ref": "NamedRange" - } - }, - "id": "AddNamedRangeRequest" - }, - "AddChartResponse": { - "description": "The result of adding a chart to a spreadsheet.", - "type": "object", - "properties": { - "chart": { - "description": "The newly added chart.", - "$ref": "EmbeddedChart" - } - }, - "id": "AddChartResponse" - }, - "AddBandingRequest": { - "description": "Adds a new banded range to the spreadsheet.", - "type": "object", - "properties": { - "bandedRange": { - "description": "The banded range to add. The bandedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)", - "$ref": "BandedRange" - } - }, - "id": "AddBandingRequest" - }, - "AppendCellsRequest": { - "description": "Adds new cells after the last row with data in a sheet,\ninserting new rows into the sheet if necessary.", - "type": "object", - "properties": { - "sheetId": { - "description": "The sheet ID to append the data to.", - "type": "integer", - "format": "int32" - }, - "rows": { - "description": "The data to append.", - "type": "array", - "items": { - "$ref": "RowData" - } - }, - "fields": { - "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - } - }, - "id": "AppendCellsRequest" - }, - "RowData": { - "description": "Data about each cell in a row.", - "type": "object", - "properties": { - "values": { - "description": "The values in the row, one per column.", - "type": "array", - "items": { - "$ref": "CellData" - } - } - }, - "id": "RowData" - }, - "BasicChartSeries": { - "description": "A single series of data in a chart.\nFor example, if charting stock prices over time, multiple series may exist,\none for the \"Open Price\", \"High Price\", \"Low Price\" and \"Close Price\".", - "type": "object", - "properties": { - "series": { - "description": "The data being visualized in this chart series.", - "$ref": "ChartData" - }, - "targetAxis": { - "description": "The minor axis that will specify the range of values for this series.\nFor example, if charting stocks over time, the \"Volume\" series\nmay want to be pinned to the right with the prices pinned to the left,\nbecause the scale of trading volume is different than the scale of\nprices.\nIt is an error to specify an axis that isn't a valid minor axis\nfor the chart's type.", - "enum": [ - "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", - "BOTTOM_AXIS", - "LEFT_AXIS", - "RIGHT_AXIS" - ], - "enumDescriptions": [ - "Default value, do not use.", - "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", - "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", - "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." - ], - "type": "string" - }, "type": { - "description": "The type of this series. Valid only if the\nchartType is\nCOMBO.\nDifferent types will change the way the series is visualized.\nOnly LINE, AREA,\nand COLUMN are supported.", - "enum": [ - "BASIC_CHART_TYPE_UNSPECIFIED", - "BAR", - "LINE", - "AREA", - "COLUMN", - "SCATTER", - "COMBO" - ], "enumDescriptions": [ - "Default value, do not use.", - "A \u003ca href=\"/chart/interactive/docs/gallery/barchart\"\u003ebar chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/linechart\"\u003eline chart\u003c/a\u003e.", - "An \u003ca href=\"/chart/interactive/docs/gallery/areachart\"\u003earea chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/columnchart\"\u003ecolumn chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/scatterchart\"\u003escatter chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/combochart\"\u003ecombo chart\u003c/a\u003e." + "The default error type, do not use this.", + "Corresponds to the `#ERROR!` error.", + "Corresponds to the `#NULL!` error.", + "Corresponds to the `#DIV/0` error.", + "Corresponds to the `#VALUE!` error.", + "Corresponds to the `#REF!` error.", + "Corresponds to the `#NAME?` error.", + "Corresponds to the `#NUM`! error.", + "Corresponds to the `#N/A` error.", + "Corresponds to the `Loading...` state." ], - "type": "string" - } - }, - "id": "BasicChartSeries" - }, - "RepeatCellRequest": { - "description": "Updates all cells in the range to the values in the given Cell object.\nOnly the fields listed in the fields field are updated; others are\nunchanged.\n\nIf writing a cell with a formula, the formula's ranges will automatically\nincrement for each field in the range.\nFor example, if writing a cell with formula `=A1` into range B2:C4,\nB2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,\nC2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.\n\nTo keep the formula's ranges static, use the `$` indicator.\nFor example, use the formula `=$A$1` to prevent both the row and the\ncolumn from incrementing.", - "type": "object", - "properties": { - "cell": { - "description": "The data to write.", - "$ref": "CellData" - }, - "fields": { - "description": "The fields that should be updated. At least one field must be specified.\nThe root `cell` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - }, - "range": { - "description": "The range to repeat the cell in.", - "$ref": "GridRange" - } - }, - "id": "RepeatCellRequest" - }, - "BasicChartSpec": { - "description": "The specification for a basic chart. See BasicChartType for the list\nof charts this supports.", - "type": "object", - "properties": { - "chartType": { - "description": "The type of the chart.", "enum": [ - "BASIC_CHART_TYPE_UNSPECIFIED", - "BAR", - "LINE", - "AREA", - "COLUMN", - "SCATTER", - "COMBO" - ], - "enumDescriptions": [ - "Default value, do not use.", - "A \u003ca href=\"/chart/interactive/docs/gallery/barchart\"\u003ebar chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/linechart\"\u003eline chart\u003c/a\u003e.", - "An \u003ca href=\"/chart/interactive/docs/gallery/areachart\"\u003earea chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/columnchart\"\u003ecolumn chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/scatterchart\"\u003escatter chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/combochart\"\u003ecombo chart\u003c/a\u003e." + "ERROR_TYPE_UNSPECIFIED", + "ERROR", + "NULL_VALUE", + "DIVIDE_BY_ZERO", + "VALUE", + "REF", + "NAME", + "NUM", + "N_A", + "LOADING" ], + "description": "The type of error.", "type": "string" }, - "domains": { - "description": "The domain of data this is charting.\nOnly a single domain is currently supported.", - "type": "array", - "items": { - "$ref": "BasicChartDomain" - } - }, - "headerCount": { - "description": "The number of rows or columns in the data that are \"headers\".\nIf not set, Google Sheets will guess how many rows are headers based\non the data.\n\n(Note that BasicChartAxis.title may override the axis title\n inferred from the header values.)", - "type": "integer", - "format": "int32" - }, - "series": { - "description": "The data this chart is visualizing.", - "type": "array", - "items": { - "$ref": "BasicChartSeries" - } - }, - "legendPosition": { - "description": "The position of the chart legend.", - "enum": [ - "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED", - "BOTTOM_LEGEND", - "LEFT_LEGEND", - "RIGHT_LEGEND", - "TOP_LEGEND", - "NO_LEGEND" - ], - "enumDescriptions": [ - "Default value, do not use.", - "The legend is rendered on the bottom of the chart.", - "The legend is rendered on the left of the chart.", - "The legend is rendered on the right of the chart.", - "The legend is rendered on the top of the chart.", - "No legend is rendered." - ], - "type": "string" - }, - "axis": { - "description": "The axis on the chart.", - "type": "array", - "items": { - "$ref": "BasicChartAxis" - } - } - }, - "id": "BasicChartSpec" - }, - "NamedRange": { - "description": "A named range.", - "type": "object", - "properties": { - "namedRangeId": { - "description": "The ID of the named range.", - "type": "string" - }, - "range": { - "description": "The range this represents.", - "$ref": "GridRange" - }, - "name": { - "description": "The name of the named range.", + "message": { + "description": "A message with more information about the error\n(in the spreadsheet's locale).", "type": "string" } }, - "id": "NamedRange" - }, - "UpdateEmbeddedObjectPositionRequest": { - "description": "Update an embedded object's position (such as a moving or resizing a\nchart or image).", - "type": "object", - "properties": { - "newPosition": { - "description": "An explicit position to move the embedded object to.\nIf newPosition.sheetId is set,\na new sheet with that ID will be created.\nIf newPosition.newSheet is set to true,\na new sheet will be created with an ID that will be chosen for you.", - "$ref": "EmbeddedObjectPosition" - }, - "objectId": { - "description": "The ID of the object to moved.", - "type": "integer", - "format": "int32" - }, - "fields": { - "description": "The fields of OverlayPosition\nthat should be updated when setting a new position. Used only if\nnewPosition.overlayPosition\nis set, in which case at least one field must\nbe specified. The root `newPosition.overlayPosition` is implied and\nshould not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - } - }, - "id": "UpdateEmbeddedObjectPositionRequest" - }, - "SetBasicFilterRequest": { - "description": "Sets the basic filter associated with a sheet.", - "type": "object", - "properties": { - "filter": { - "description": "The filter to set.", - "$ref": "BasicFilter" - } - }, - "id": "SetBasicFilterRequest" - }, - "AutoResizeDimensionsRequest": { - "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension.", - "type": "object", - "properties": { - "dimensions": { - "description": "The dimensions to automatically resize.\nOnly COLUMNS are supported.", - "$ref": "DimensionRange" - } - }, - "id": "AutoResizeDimensionsRequest" - }, - "DuplicateFilterViewResponse": { - "description": "The result of a filter view being duplicated.", - "type": "object", - "properties": { - "filter": { - "description": "The newly created filter.", - "$ref": "FilterView" - } - }, - "id": "DuplicateFilterViewResponse" - }, - "BandingProperties": { - "description": "Properties referring a single dimension (either row or column). If both\nBandedRange.row_properties and BandedRange.column_properties are\nset, the fill colors are applied to cells according to the following rules:\n\n* header_color and footer_color take priority over band colors.\n* first_band_color takes priority over second_band_color.\n* row_properties takes priority over column_properties.\n\nFor example, the first row color takes priority over the first column\ncolor, but the first column color takes priority over the second row color.\nSimilarly, the row header takes priority over the column header in the\ntop left cell, but the column header takes priority over the first row\ncolor if the row header is not set.", - "type": "object", - "properties": { - "footerColor": { - "description": "The color of the last row or column. If this field is not set, the last\nrow or column will be filled with either first_row_color or\nsecond_row_color, depending on the color of the previous row or\ncolumn.", - "$ref": "Color" - }, - "headerColor": { - "description": "The color of the first row or column. If this field is set, the first\nrow or column will be filled with this color and the colors will\nalternate between first_band_color and [second_band_color[] starting\nfrom the second row or column. Otherwise, the first row or column will be\nfilled with first_band_color and the colors will proceed to alternate\nas they normally would.", - "$ref": "Color" - }, - "secondBandColor": { - "description": "The second color that is alternating. (Required)", - "$ref": "Color" - }, - "firstBandColor": { - "description": "The first color that is alternating. (Required)", - "$ref": "Color" - } - }, - "id": "BandingProperties" - }, - "PivotGroup": { - "description": "A single grouping (either row or column) in a pivot table.", - "type": "object", - "properties": { - "sortOrder": { - "description": "The order the values in this group should be sorted.", - "enum": [ - "SORT_ORDER_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], - "enumDescriptions": [ - "Default value, do not use this.", - "Sort ascending.", - "Sort descending." - ], - "type": "string" - }, - "sourceColumnOffset": { - "description": "The column offset of the source range that this grouping is based on.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this group refers to column `C`, whereas the offset `1` would refer\nto column `D`.", - "type": "integer", - "format": "int32" - }, - "showTotals": { - "description": "True if the pivot table should include the totals for this grouping.", - "type": "boolean" - }, - "valueBucket": { - "description": "The bucket of the opposite pivot group to sort by.\nIf not specified, sorting is alphabetical by this group's values.", - "$ref": "PivotGroupSortValueBucket" - }, - "valueMetadata": { - "description": "Metadata about values in the grouping.", - "type": "array", - "items": { - "$ref": "PivotGroupValueMetadata" - } - } - }, - "id": "PivotGroup" - }, - "GridRange": { - "description": "A range on a sheet.\nAll indexes are zero-based.\nIndexes are half open, e.g the start index is inclusive\nand the end index is exclusive -- [start_index, end_index).\nMissing indexes indicate the range is unbounded on that side.\n\nFor example, if `\"Sheet1\"` is sheet ID 0, then:\n\n `Sheet1!A1:A1 == sheet_id: 0,\n start_row_index: 0, end_row_index: 1,\n start_column_index: 0, end_column_index: 1`\n\n `Sheet1!A3:B4 == sheet_id: 0,\n start_row_index: 2, end_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A:B == sheet_id: 0,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A5:B == sheet_id: 0,\n start_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1 == sheet_id:0`\n\nThe start index must always be less than or equal to the end index.\nIf the start index equals the end index, then the range is empty.\nEmpty ranges are typically not meaningful and are usually rendered in the\nUI as `#REF!`.", - "type": "object", - "properties": { - "sheetId": { - "description": "The sheet this range is on.", - "type": "integer", - "format": "int32" - }, - "startColumnIndex": { - "description": "The start column (inclusive) of the range, or not set if unbounded.", - "type": "integer", - "format": "int32" - }, - "startRowIndex": { - "description": "The start row (inclusive) of the range, or not set if unbounded.", - "type": "integer", - "format": "int32" - }, - "endRowIndex": { - "description": "The end row (exclusive) of the range, or not set if unbounded.", - "type": "integer", - "format": "int32" - }, - "endColumnIndex": { - "description": "The end column (exclusive) of the range, or not set if unbounded.", - "type": "integer", - "format": "int32" - } - }, - "id": "GridRange" - }, - "DeleteSheetRequest": { - "description": "Deletes the requested sheet.", - "type": "object", - "properties": { - "sheetId": { - "description": "The ID of the sheet to delete.", - "type": "integer", - "format": "int32" - } - }, - "id": "DeleteSheetRequest" - }, - "UpdateBandingRequest": { - "description": "Updates properties of the supplied banded range.", - "type": "object", - "properties": { - "bandedRange": { - "description": "The banded range to update with the new properties.", - "$ref": "BandedRange" - }, - "fields": { - "description": "The fields that should be updated. At least one field must be specified.\nThe root `bandedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - } - }, - "id": "UpdateBandingRequest" - }, - "ChartData": { - "description": "The data included in a domain or series.", - "type": "object", - "properties": { - "sourceRange": { - "description": "The source ranges of the data.", - "$ref": "ChartSourceRange" - } - }, - "id": "ChartData" - }, - "Sheet": { - "description": "A sheet in a spreadsheet.", - "type": "object", - "properties": { - "properties": { - "description": "The properties of the sheet.", - "$ref": "SheetProperties" - }, - "charts": { - "description": "The specifications of every chart on this sheet.", - "type": "array", - "items": { - "$ref": "EmbeddedChart" - } - }, - "filterViews": { - "description": "The filter views in this sheet.", - "type": "array", - "items": { - "$ref": "FilterView" - } - }, - "conditionalFormats": { - "description": "The conditional format rules in this sheet.", - "type": "array", - "items": { - "$ref": "ConditionalFormatRule" - } - }, - "protectedRanges": { - "description": "The protected ranges in this sheet.", - "type": "array", - "items": { - "$ref": "ProtectedRange" - } - }, - "basicFilter": { - "description": "The filter on this sheet, if any.", - "$ref": "BasicFilter" - }, - "merges": { - "description": "The ranges that are merged together.", - "type": "array", - "items": { - "$ref": "GridRange" - } - }, - "data": { - "description": "Data in the grid, if this is a grid sheet.\nThe number of GridData objects returned is dependent on the number of\nranges requested on this sheet. For example, if this is representing\n`Sheet1`, and the spreadsheet was requested with ranges\n`Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a\nstartRow/startColumn of `0`,\nwhile the second one will have `startRow 14` (zero-based row 15),\nand `startColumn 3` (zero-based column D).", - "type": "array", - "items": { - "$ref": "GridData" - } - }, - "bandedRanges": { - "description": "The banded (i.e. alternating colors) ranges on this sheet.", - "type": "array", - "items": { - "$ref": "BandedRange" - } - } - }, - "id": "Sheet" - }, - "CopyPasteRequest": { - "description": "Copies data from the source to the destination.", - "type": "object", - "properties": { - "pasteType": { - "description": "What kind of data to paste.", - "enum": [ - "PASTE_NORMAL", - "PASTE_VALUES", - "PASTE_FORMAT", - "PASTE_NO_BORDERS", - "PASTE_FORMULA", - "PASTE_DATA_VALIDATION", - "PASTE_CONDITIONAL_FORMATTING" - ], - "enumDescriptions": [ - "Paste values, formulas, formats, and merges.", - "Paste the values ONLY without formats, formulas, or merges.", - "Paste the format and data validation only.", - "Like PASTE_NORMAL but without borders.", - "Paste the formulas only.", - "Paste the data validation only.", - "Paste the conditional formatting rules only." - ], - "type": "string" - }, - "pasteOrientation": { - "description": "How that data should be oriented when pasting.", - "enum": [ - "NORMAL", - "TRANSPOSE" - ], - "enumDescriptions": [ - "Paste normally.", - "Paste transposed, where all rows become columns and vice versa." - ], - "type": "string" - }, - "source": { - "description": "The source range to copy.", - "$ref": "GridRange" - }, - "destination": { - "description": "The location to paste to. If the range covers a span that's\na multiple of the source's height or width, then the\ndata will be repeated to fill in the destination range.\nIf the range is smaller than the source range, the entire\nsource data will still be copied (beyond the end of the destination range).", - "$ref": "GridRange" - } - }, - "id": "CopyPasteRequest" - }, - "UpdateCellsRequest": { - "description": "Updates all cells in a range with new data.", - "type": "object", - "properties": { - "rows": { - "description": "The data to write.", - "type": "array", - "items": { - "$ref": "RowData" - } - }, - "fields": { - "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - }, - "start": { - "description": "The coordinate to start writing data at.\nAny number of rows and columns (including a different number of\ncolumns per row) may be written.", - "$ref": "GridCoordinate" - }, - "range": { - "description": "The range to write data to.\n\nIf the data in rows does not cover the entire requested range,\nthe fields matching those set in fields will be cleared.", - "$ref": "GridRange" - } - }, - "id": "UpdateCellsRequest" - }, - "ExtendedValue": { - "description": "The kinds of value that a cell in a spreadsheet can have.", - "type": "object", - "properties": { - "formulaValue": { - "description": "Represents a formula.", - "type": "string" - }, - "errorValue": { - "description": "Represents an error.\nThis field is read-only.", - "$ref": "ErrorValue" - }, - "boolValue": { - "description": "Represents a boolean value.", - "type": "boolean" - }, - "numberValue": { - "description": "Represents a double value.\nNote: Dates, Times and DateTimes are represented as doubles in\n\"serial number\" format.", - "type": "number", - "format": "double" - }, - "stringValue": { - "description": "Represents a string value.\nLeading single quotes are not included. For example, if the user typed\n`'123` into the UI, this would be represented as a `stringValue` of\n`\"123\"`.", - "type": "string" - } - }, - "id": "ExtendedValue" - }, - "BatchUpdateSpreadsheetResponse": { - "description": "The reply for batch updating a spreadsheet.", - "type": "object", - "properties": { - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - }, - "updatedSpreadsheet": { - "description": "The spreadsheet after updates were applied. This is only set if\n[BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is `true`.", - "$ref": "Spreadsheet" - }, - "replies": { - "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", - "type": "array", - "items": { - "$ref": "Response" - } - } - }, - "id": "BatchUpdateSpreadsheetResponse" - }, - "GradientRule": { - "description": "A rule that applies a gradient color scale format, based on\nthe interpolation points listed. The format of a cell will vary\nbased on its contents as compared to the values of the interpolation\npoints.", - "type": "object", - "properties": { - "maxpoint": { - "description": "The final interpolation point.", - "$ref": "InterpolationPoint" - }, - "midpoint": { - "description": "An optional midway interpolation point.", - "$ref": "InterpolationPoint" - }, - "minpoint": { - "description": "The starting interpolation point.", - "$ref": "InterpolationPoint" - } - }, - "id": "GradientRule" - }, - "CutPasteRequest": { - "description": "Moves data from the source to the destination.", - "type": "object", - "properties": { - "pasteType": { - "description": "What kind of data to paste. All the source data will be cut, regardless\nof what is pasted.", - "enum": [ - "PASTE_NORMAL", - "PASTE_VALUES", - "PASTE_FORMAT", - "PASTE_NO_BORDERS", - "PASTE_FORMULA", - "PASTE_DATA_VALIDATION", - "PASTE_CONDITIONAL_FORMATTING" - ], - "enumDescriptions": [ - "Paste values, formulas, formats, and merges.", - "Paste the values ONLY without formats, formulas, or merges.", - "Paste the format and data validation only.", - "Like PASTE_NORMAL but without borders.", - "Paste the formulas only.", - "Paste the data validation only.", - "Paste the conditional formatting rules only." - ], - "type": "string" - }, - "source": { - "description": "The source data to cut.", - "$ref": "GridRange" - }, - "destination": { - "description": "The top-left coordinate where the data should be pasted.", - "$ref": "GridCoordinate" - } - }, - "id": "CutPasteRequest" - }, - "OverlayPosition": { - "description": "The location an object is overlaid on top of a grid.", - "type": "object", - "properties": { - "widthPixels": { - "description": "The width of the object, in pixels. Defaults to 600.", - "type": "integer", - "format": "int32" - }, - "anchorCell": { - "description": "The cell the object is anchored to.", - "$ref": "GridCoordinate" - }, - "offsetXPixels": { - "description": "The horizontal offset, in pixels, that the object is offset\nfrom the anchor cell.", - "type": "integer", - "format": "int32" - }, - "heightPixels": { - "description": "The height of the object, in pixels. Defaults to 371.", - "type": "integer", - "format": "int32" - }, - "offsetYPixels": { - "description": "The vertical offset, in pixels, that the object is offset\nfrom the anchor cell.", - "type": "integer", - "format": "int32" - } - }, - "id": "OverlayPosition" - }, - "AutoFillRequest": { - "description": "Fills in more data based on existing data.", - "type": "object", - "properties": { - "useAlternateSeries": { - "description": "True if we should generate data with the \"alternate\" series.\nThis differs based on the type and amount of source data.", - "type": "boolean" - }, - "range": { - "description": "The range to autofill. This will examine the range and detect\nthe location that has data and automatically fill that data\nin to the rest of the range.", - "$ref": "GridRange" - }, - "sourceAndDestination": { - "description": "The source and destination areas to autofill.\nThis explicitly lists the source of the autofill and where to\nextend that data.", - "$ref": "SourceAndDestination" - } - }, - "id": "AutoFillRequest" - }, - "PieChartSpec": { - "description": "A \u003ca href=\"/chart/interactive/docs/gallery/piechart\"\u003epie chart\u003c/a\u003e.", - "type": "object", - "properties": { - "legendPosition": { - "description": "Where the legend of the pie chart should be drawn.", - "enum": [ - "PIE_CHART_LEGEND_POSITION_UNSPECIFIED", - "BOTTOM_LEGEND", - "LEFT_LEGEND", - "RIGHT_LEGEND", - "TOP_LEGEND", - "NO_LEGEND", - "LABELED_LEGEND" - ], - "enumDescriptions": [ - "Default value, do not use.", - "The legend is rendered on the bottom of the chart.", - "The legend is rendered on the left of the chart.", - "The legend is rendered on the right of the chart.", - "The legend is rendered on the top of the chart.", - "No legend is rendered.", - "Each pie slice has a label attached to it." - ], - "type": "string" - }, - "series": { - "description": "The data that covers the one and only series of the pie chart.", - "$ref": "ChartData" - }, - "pieHole": { - "description": "The size of the hole in the pie chart.", - "type": "number", - "format": "double" - }, - "threeDimensional": { - "description": "True if the pie is three dimensional.", - "type": "boolean" - }, - "domain": { - "description": "The data that covers the domain of the pie chart.", - "$ref": "ChartData" - } - }, - "id": "PieChartSpec" - }, - "UpdateSheetPropertiesRequest": { - "description": "Updates properties of the sheet with the specified\nsheetId.", - "type": "object", - "properties": { - "fields": { - "description": "The fields that should be updated. At least one field must be specified.\nThe root `properties` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string", - "format": "google-fieldmask" - }, - "properties": { - "description": "The properties to update.", - "$ref": "SheetProperties" - } - }, - "id": "UpdateSheetPropertiesRequest" - }, - "BooleanRule": { - "description": "A rule that may or may not match, depending on the condition.", - "type": "object", - "properties": { - "condition": { - "description": "The condition of the rule. If the condition evaluates to true,\nthe format will be applied.", - "$ref": "BooleanCondition" - }, - "format": { - "description": "The format to apply.\nConditional formatting can only apply a subset of formatting:\nbold, italic,\nstrikethrough,\nforeground color &\nbackground color.", - "$ref": "CellFormat" - } - }, - "id": "BooleanRule" - }, - "AppendDimensionRequest": { - "description": "Appends rows or columns to the end of a sheet.", - "type": "object", - "properties": { - "sheetId": { - "description": "The sheet to append rows or columns to.", - "type": "integer", - "format": "int32" - }, - "length": { - "description": "The number of rows or columns to append.", - "type": "integer", - "format": "int32" - }, - "dimension": { - "description": "Whether rows or columns should be appended.", - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], - "type": "string" - } - }, - "id": "AppendDimensionRequest" - }, - "AddFilterViewRequest": { - "description": "Adds a filter view.", - "type": "object", - "properties": { - "filter": { - "description": "The filter to add. The filterViewId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a filter that already exists.)", - "$ref": "FilterView" - } - }, - "id": "AddFilterViewRequest" - }, - "GridProperties": { - "description": "Properties of a grid.", - "type": "object", - "properties": { - "rowCount": { - "description": "The number of rows in the grid.", - "type": "integer", - "format": "int32" - }, - "columnCount": { - "description": "The number of columns in the grid.", - "type": "integer", - "format": "int32" - }, - "frozenRowCount": { - "description": "The number of rows that are frozen in the grid.", - "type": "integer", - "format": "int32" - }, - "frozenColumnCount": { - "description": "The number of columns that are frozen in the grid.", - "type": "integer", - "format": "int32" - }, - "hideGridlines": { - "description": "True if the grid isn't showing gridlines in the UI.", - "type": "boolean" - } - }, - "id": "GridProperties" - }, - "DeleteNamedRangeRequest": { - "description": "Removes the named range with the given ID from the spreadsheet.", - "type": "object", - "properties": { - "namedRangeId": { - "description": "The ID of the named range to delete.", - "type": "string" - } - }, - "id": "DeleteNamedRangeRequest" - }, - "AddChartRequest": { - "description": "Adds a chart to a sheet in the spreadsheet.", - "type": "object", - "properties": { - "chart": { - "description": "The chart that should be added to the spreadsheet, including the position\nwhere it should be placed. The chartId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a chart that already exists.)", - "$ref": "EmbeddedChart" - } - }, - "id": "AddChartRequest" - }, - "SetDataValidationRequest": { - "description": "Sets a data validation rule to every cell in the range.\nTo clear validation in a range, call this with no rule specified.", - "type": "object", - "properties": { - "rule": { - "description": "The data validation rule to set on each cell in the range,\nor empty to clear the data validation in the range.", - "$ref": "DataValidationRule" - }, - "range": { - "description": "The range the data validation rule should apply to.", - "$ref": "GridRange" - } - }, - "id": "SetDataValidationRequest" - }, - "Request": { - "description": "A single kind of update to apply to a spreadsheet.", - "type": "object", - "properties": { - "updateEmbeddedObjectPosition": { - "description": "Updates an embedded object's (e.g. chart, image) position.", - "$ref": "UpdateEmbeddedObjectPositionRequest" - }, - "deleteNamedRange": { - "description": "Deletes a named range.", - "$ref": "DeleteNamedRangeRequest" - }, - "updateNamedRange": { - "description": "Updates a named range.", - "$ref": "UpdateNamedRangeRequest" - }, - "addFilterView": { - "description": "Adds a filter view.", - "$ref": "AddFilterViewRequest" - }, - "updateSpreadsheetProperties": { - "description": "Updates the spreadsheet's properties.", - "$ref": "UpdateSpreadsheetPropertiesRequest" - }, - "appendDimension": { - "description": "Appends dimensions to the end of a sheet.", - "$ref": "AppendDimensionRequest" - }, - "unmergeCells": { - "description": "Unmerges merged cells.", - "$ref": "UnmergeCellsRequest" - }, - "updateProtectedRange": { - "description": "Updates a protected range.", - "$ref": "UpdateProtectedRangeRequest" - }, - "deleteFilterView": { - "description": "Deletes a filter view from a sheet.", - "$ref": "DeleteFilterViewRequest" - }, - "clearBasicFilter": { - "description": "Clears the basic filter on a sheet.", - "$ref": "ClearBasicFilterRequest" - }, - "sortRange": { - "description": "Sorts data in a range.", - "$ref": "SortRangeRequest" - }, - "repeatCell": { - "description": "Repeats a single cell across a range.", - "$ref": "RepeatCellRequest" - }, - "setDataValidation": { - "description": "Sets data validation for one or more cells.", - "$ref": "SetDataValidationRequest" - }, - "updateCells": { - "description": "Updates many cells at once.", - "$ref": "UpdateCellsRequest" - }, - "addSheet": { - "description": "Adds a sheet.", - "$ref": "AddSheetRequest" - }, - "updateFilterView": { - "description": "Updates the properties of a filter view.", - "$ref": "UpdateFilterViewRequest" - }, - "updateSheetProperties": { - "description": "Updates a sheet's properties.", - "$ref": "UpdateSheetPropertiesRequest" - }, - "updateDimensionProperties": { - "description": "Updates dimensions' properties.", - "$ref": "UpdateDimensionPropertiesRequest" - }, - "deleteSheet": { - "description": "Deletes a sheet.", - "$ref": "DeleteSheetRequest" - }, - "findReplace": { - "description": "Finds and replaces occurrences of some text with other text.", - "$ref": "FindReplaceRequest" - }, - "addProtectedRange": { - "description": "Adds a protected range.", - "$ref": "AddProtectedRangeRequest" - }, - "deleteProtectedRange": { - "description": "Deletes a protected range.", - "$ref": "DeleteProtectedRangeRequest" - }, - "updateConditionalFormatRule": { - "description": "Updates an existing conditional format rule.", - "$ref": "UpdateConditionalFormatRuleRequest" - }, - "setBasicFilter": { - "description": "Sets the basic filter on a sheet.", - "$ref": "SetBasicFilterRequest" - }, - "mergeCells": { - "description": "Merges cells together.", - "$ref": "MergeCellsRequest" - }, - "updateBanding": { - "description": "Updates a banded range", - "$ref": "UpdateBandingRequest" - }, - "addChart": { - "description": "Adds a chart.", - "$ref": "AddChartRequest" - }, - "deleteConditionalFormatRule": { - "description": "Deletes an existing conditional format rule.", - "$ref": "DeleteConditionalFormatRuleRequest" - }, - "addBanding": { - "description": "Adds a new banded range", - "$ref": "AddBandingRequest" - }, - "deleteBanding": { - "description": "Removes a banded range", - "$ref": "DeleteBandingRequest" - }, - "updateChartSpec": { - "description": "Updates a chart's specifications.", - "$ref": "UpdateChartSpecRequest" - }, - "deleteDimension": { - "description": "Deletes rows or columns in a sheet.", - "$ref": "DeleteDimensionRequest" - }, - "deleteEmbeddedObject": { - "description": "Deletes an embedded object (e.g, chart, image) in a sheet.", - "$ref": "DeleteEmbeddedObjectRequest" - }, - "pasteData": { - "description": "Pastes data (HTML or delimited) into a sheet.", - "$ref": "PasteDataRequest" - }, - "addConditionalFormatRule": { - "description": "Adds a new conditional format rule.", - "$ref": "AddConditionalFormatRuleRequest" - }, - "updateBorders": { - "description": "Updates the borders in a range of cells.", - "$ref": "UpdateBordersRequest" - }, - "autoResizeDimensions": { - "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension.", - "$ref": "AutoResizeDimensionsRequest" - }, - "duplicateSheet": { - "description": "Duplicates a sheet.", - "$ref": "DuplicateSheetRequest" - }, - "duplicateFilterView": { - "description": "Duplicates a filter view.", - "$ref": "DuplicateFilterViewRequest" - }, - "cutPaste": { - "description": "Cuts data from one area and pastes it to another.", - "$ref": "CutPasteRequest" - }, - "appendCells": { - "description": "Appends cells after the last row with data in a sheet.", - "$ref": "AppendCellsRequest" - }, - "addNamedRange": { - "description": "Adds a named range.", - "$ref": "AddNamedRangeRequest" - }, - "autoFill": { - "description": "Automatically fills in more data based on existing data.", - "$ref": "AutoFillRequest" - }, - "moveDimension": { - "description": "Moves rows or columns to another location in a sheet.", - "$ref": "MoveDimensionRequest" - }, - "textToColumns": { - "description": "Converts a column of text into many columns of text.", - "$ref": "TextToColumnsRequest" - }, - "insertDimension": { - "description": "Inserts new rows or columns in a sheet.", - "$ref": "InsertDimensionRequest" - }, - "copyPaste": { - "description": "Copies data from one area and pastes it to another.", - "$ref": "CopyPasteRequest" - } - }, - "id": "Request" - }, - "BatchGetValuesResponse": { - "description": "The response when retrieving more than one range of values in a spreadsheet.", - "type": "object", - "properties": { - "valueRanges": { - "description": "The requested values. The order of the ValueRanges is the same as the\norder of the requested ranges.", - "type": "array", - "items": { - "$ref": "ValueRange" - } - }, - "spreadsheetId": { - "description": "The ID of the spreadsheet the data was retrieved from.", - "type": "string" - } - }, - "id": "BatchGetValuesResponse" - }, - "InsertDimensionRequest": { - "description": "Inserts rows or columns in a sheet at a particular index.", - "type": "object", - "properties": { - "inheritFromBefore": { - "description": "Whether dimension properties should be extended from the dimensions\nbefore or after the newly inserted dimensions.\nTrue to inherit from the dimensions before (in which case the start\nindex must be greater than 0), and false to inherit from the dimensions\nafter.\n\nFor example, if row index 0 has red background and row index 1\nhas a green background, then inserting 2 rows at index 1 can inherit\neither the green or red background. If `inheritFromBefore` is true,\nthe two new rows will be red (because the row before the insertion point\nwas red), whereas if `inheritFromBefore` is false, the two new rows will\nbe green (because the row after the insertion point was green).", - "type": "boolean" - }, - "range": { - "description": "The dimensions to insert. Both the start and end indexes must be bounded.", - "$ref": "DimensionRange" - } - }, - "id": "InsertDimensionRequest" - }, - "DeleteEmbeddedObjectRequest": { - "description": "Deletes the embedded object with the given ID.", - "type": "object", - "properties": { - "objectId": { - "description": "The ID of the embedded object to delete.", - "type": "integer", - "format": "int32" - } - }, - "id": "DeleteEmbeddedObjectRequest" - }, - "BandedRange": { - "description": "A banded (alternating colors) range in a sheet.", - "type": "object", - "properties": { - "bandedRangeId": { - "description": "The id of the banded range.", - "type": "integer", - "format": "int32" - }, - "rowProperties": { - "description": "Properties for row bands. These properties will be applied on a row-by-row\nbasis throughout all the rows in the range. At least one of\nrow_properties or column_properties must be specified.", - "$ref": "BandingProperties" - }, - "columnProperties": { - "description": "Properties for column bands. These properties will be applied on a column-\nby-column basis throughout all the columns in the range. At least one of\nrow_properties or column_properties must be specified.", - "$ref": "BandingProperties" - }, - "range": { - "description": "The range over which these properties are applied.", - "$ref": "GridRange" - } - }, - "id": "BandedRange" - }, - "DeleteConditionalFormatRuleResponse": { - "description": "The result of deleting a conditional format rule.", - "type": "object", - "properties": { - "rule": { - "description": "The rule that was deleted.", - "$ref": "ConditionalFormatRule" - } - }, - "id": "DeleteConditionalFormatRuleResponse" + "id": "ErrorValue" } }, - "revision": "20161209", - "basePath": "", + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version_module": "True", "canonicalName": "Sheets", - "discoveryVersion": "v1", - "baseUrl": "https://sheets.googleapis.com/", - "name": "sheets", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/drive.file": { + "description": "View and manage Google Drive files and folders that you have opened or created with this app" + }, + "https://www.googleapis.com/auth/drive": { + "description": "View and manage the files in your Google Drive" + }, + "https://www.googleapis.com/auth/drive.readonly": { + "description": "View the files in your Google Drive" + }, + "https://www.googleapis.com/auth/spreadsheets.readonly": { + "description": "View your Google Spreadsheets" + }, + "https://www.googleapis.com/auth/spreadsheets": { + "description": "View and manage your spreadsheets in Google Drive" + } + } } }, - "documentationLink": "https://developers.google.com/sheets/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v4", "rootUrl": "https://sheets.googleapis.com/", - "kind": "discovery#restDescription" + "ownerDomain": "google.com", + "name": "sheets", + "batchPath": "batch" } diff --git a/etc/api/siteverification/v1/siteverification-api.json b/etc/api/siteverification/v1/siteverification-api.json index a4a22a9fa0..15200ea1ba 100644 --- a/etc/api/siteverification/v1/siteverification-api.json +++ b/etc/api/siteverification/v1/siteverification-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/i7yRN5hkF8eVOTb2OSGCp8ZAiJE\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/91cCbhq1cUXIPKUTmb8zwBITGqo\"", "discoveryVersion": "v1", "id": "siteVerification:v1", "name": "siteVerification", "version": "v1", - "revision": "20160228", + "revision": "20161114", "title": "Google Site Verification API", "description": "Verifies ownership of websites or domains with Google.", "ownerDomain": "google.com", diff --git a/etc/api/slides/v1/slides-api.json b/etc/api/slides/v1/slides-api.json index 3a313483c7..34412a739b 100644 --- a/etc/api/slides/v1/slides-api.json +++ b/etc/api/slides/v1/slides-api.json @@ -1,295 +1,349 @@ { - "id": "slides:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/drive": { - "description": "View and manage the files in your Google Drive" - }, - "https://www.googleapis.com/auth/spreadsheets.readonly": { - "description": "View your Google Spreadsheets" - }, - "https://www.googleapis.com/auth/presentations": { - "description": "View and manage your Google Slides presentations" - }, - "https://www.googleapis.com/auth/presentations.readonly": { - "description": "View your Google Slides presentations" - }, - "https://www.googleapis.com/auth/drive.readonly": { - "description": "View the files in your Google Drive" - }, - "https://www.googleapis.com/auth/spreadsheets": { - "description": "View and manage your spreadsheets in Google Drive" - } - } - } - }, - "description": "An API for creating and editing Google Slides presentations.", - "protocol": "rest", - "title": "Google Slides API", - "resources": { - "presentations": { - "resources": { - "pages": { - "methods": { - "get": { - "id": "slides.presentations.pages.get", - "response": { - "$ref": "Page" - }, - "parameterOrder": [ - "presentationId", - "pageObjectId" - ], - "description": "Gets the latest version of the specified page in the presentation.", - "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}", - "httpMethod": "GET", - "parameters": { - "presentationId": { - "description": "The ID of the presentation to retrieve.", - "required": true, - "location": "path", - "type": "string" - }, - "pageObjectId": { - "description": "The object ID of the page to retrieve.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/presentations/{presentationId}/pages/{pageObjectId}", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/presentations", - "https://www.googleapis.com/auth/presentations.readonly" - ] - } - } - } - }, - "methods": { - "get": { - "id": "slides.presentations.get", - "response": { - "$ref": "Presentation" - }, - "parameterOrder": [ - "presentationId" - ], - "description": "Gets the latest version of the specified presentation.", - "flatPath": "v1/presentations/{presentationsId}", - "httpMethod": "GET", - "parameters": { - "presentationId": { - "description": "The ID of the presentation to retrieve.", - "required": true, - "pattern": "^[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1/presentations/{+presentationId}", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/presentations", - "https://www.googleapis.com/auth/presentations.readonly" - ] - }, - "create": { - "id": "slides.presentations.create", - "response": { - "$ref": "Presentation" - }, - "parameterOrder": [], - "description": "Creates a new presentation using the title given in the request. Other\nfields in the request are ignored.\nReturns the created presentation.", - "request": { - "$ref": "Presentation" - }, - "flatPath": "v1/presentations", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/presentations", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/presentations" - ] - }, - "batchUpdate": { - "id": "slides.presentations.batchUpdate", - "response": { - "$ref": "BatchUpdatePresentationResponse" - }, - "parameterOrder": [ - "presentationId" - ], - "description": "Applies one or more updates to the presentation.\n\nEach request is validated before\nbeing applied. If any request is not valid, then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how they are applied. Other requests do\nnot need to return information; these each return an empty reply.\nThe order of replies matches that of the requests.\n\nFor example, suppose you call batchUpdate with four updates, and only the\nthird one returns information. The response would have two empty replies:\nthe reply to the third request, and another empty reply, in that order.\n\nBecause other users may be editing the presentation, the presentation\nmight not exactly reflect your changes: your changes may\nbe altered with respect to collaborator changes. If there are no\ncollaborators, the presentation should reflect your changes. In any case,\nthe updates in your request are guaranteed to be applied together\natomically.", - "request": { - "$ref": "BatchUpdatePresentationRequest" - }, - "flatPath": "v1/presentations/{presentationId}:batchUpdate", - "httpMethod": "POST", - "parameters": { - "presentationId": { - "description": "The presentation to apply the updates to.", - "required": true, - "location": "path", - "type": "string" - } - }, - "path": "v1/presentations/{presentationId}:batchUpdate", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/presentations", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/spreadsheets.readonly" - ] - } - } - } - }, "schemas": { - "StretchedPictureFill": { - "description": "The stretched picture fill. The page or page element is filled entirely with\nthe specified picture. The picture is stretched to fit its container.", + "Shape": { + "id": "Shape", + "description": "A PageElement kind representing a\ngeneric shape that does not have a more specific classification.", "type": "object", "properties": { - "contentUrl": { - "description": "Reading the content_url:\n\nAn URL to a picture with a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the picture as the original requester. Access to the\npicture may be lost if the presentation's sharing settings change.\n\nWriting the content_url:\n\nThe picture is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Pictures must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.", + "shapeType": { + "enumDescriptions": [ + "The shape type that is not predefined.", + "Text box shape.", + "Rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'rect'.", + "Round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'roundRect'", + "Ellipse shape. Corresponds to ECMA-376 ST_ShapeType 'ellipse'", + "Curved arc shape. Corresponds to ECMA-376 ST_ShapeType 'arc'", + "Bent arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentArrow'", + "Bent up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentUpArrow'", + "Bevel shape. Corresponds to ECMA-376 ST_ShapeType 'bevel'", + "Block arc shape. Corresponds to ECMA-376 ST_ShapeType 'blockArc'", + "Brace pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracePair'", + "Bracket pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracketPair'", + "Can shape. Corresponds to ECMA-376 ST_ShapeType 'can'", + "Chevron shape. Corresponds to ECMA-376 ST_ShapeType 'chevron'", + "Chord shape. Corresponds to ECMA-376 ST_ShapeType 'chord'", + "Cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloud'", + "Corner shape. Corresponds to ECMA-376 ST_ShapeType 'corner'", + "Cube shape. Corresponds to ECMA-376 ST_ShapeType 'cube'", + "Curved down arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedDownArrow'", + "Curved left arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedLeftArrow'", + "Curved right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedRightArrow'", + "Curved up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedUpArrow'", + "Decagon shape. Corresponds to ECMA-376 ST_ShapeType 'decagon'", + "Diagonal stripe shape. Corresponds to ECMA-376 ST_ShapeType 'diagStripe'", + "Diamond shape. Corresponds to ECMA-376 ST_ShapeType 'diamond'", + "Dodecagon shape. Corresponds to ECMA-376 ST_ShapeType 'dodecagon'", + "Donut shape. Corresponds to ECMA-376 ST_ShapeType 'donut'", + "Double wave shape. Corresponds to ECMA-376 ST_ShapeType 'doubleWave'", + "Down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'downArrow'", + "Callout down arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'downArrowCallout'", + "Folded corner shape. Corresponds to ECMA-376 ST_ShapeType 'foldedCorner'", + "Frame shape. Corresponds to ECMA-376 ST_ShapeType 'frame'", + "Half frame shape. Corresponds to ECMA-376 ST_ShapeType 'halfFrame'", + "Heart shape. Corresponds to ECMA-376 ST_ShapeType 'heart'", + "Heptagon shape. Corresponds to ECMA-376 ST_ShapeType 'heptagon'", + "Hexagon shape. Corresponds to ECMA-376 ST_ShapeType 'hexagon'", + "Home plate shape. Corresponds to ECMA-376 ST_ShapeType 'homePlate'", + "Horizontal scroll shape. Corresponds to ECMA-376 ST_ShapeType\n'horizontalScroll'", + "Irregular seal 1 shape. Corresponds to ECMA-376 ST_ShapeType\n'irregularSeal1'", + "Irregular seal 2 shape. Corresponds to ECMA-376 ST_ShapeType\n'irregularSeal2'", + "Left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftArrow'", + "Callout left arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftArrowCallout'", + "Left brace shape. Corresponds to ECMA-376 ST_ShapeType 'leftBrace'", + "Left bracket shape. Corresponds to ECMA-376 ST_ShapeType 'leftBracket'", + "Left right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightArrow'", + "Callout left right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightArrowCallout'", + "Left right up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightUpArrow'", + "Left up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftUpArrow'", + "Lightning bolt shape. Corresponds to ECMA-376 ST_ShapeType\n'lightningBolt'", + "Divide math shape. Corresponds to ECMA-376 ST_ShapeType 'mathDivide'", + "Equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathEqual'", + "Minus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMinus'", + "Multiply math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMultiply'", + "Not equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathNotEqual'", + "Plus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathPlus'", + "Moon shape. Corresponds to ECMA-376 ST_ShapeType 'moon'", + "No smoking shape. Corresponds to ECMA-376 ST_ShapeType 'noSmoking'", + "Notched right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'notchedRightArrow'", + "Octagon shape. Corresponds to ECMA-376 ST_ShapeType 'octagon'", + "Parallelogram shape. Corresponds to ECMA-376 ST_ShapeType 'parallelogram'", + "Pentagon shape. Corresponds to ECMA-376 ST_ShapeType 'pentagon'", + "Pie shape. Corresponds to ECMA-376 ST_ShapeType 'pie'", + "Plaque shape. Corresponds to ECMA-376 ST_ShapeType 'plaque'", + "Plus shape. Corresponds to ECMA-376 ST_ShapeType 'plus'", + "Quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType 'quadArrow'", + "Callout quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'quadArrowCallout'", + "Ribbon shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon'", + "Ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon2'", + "Right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'rightArrow'", + "Callout right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'rightArrowCallout'", + "Right brace shape. Corresponds to ECMA-376 ST_ShapeType 'rightBrace'", + "Right bracket shape. Corresponds to ECMA-376 ST_ShapeType 'rightBracket'", + "One round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'round1Rect'", + "Two diagonal round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'round2DiagRect'", + "Two same-side round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'round2SameRect'", + "Right triangle shape. Corresponds to ECMA-376 ST_ShapeType 'rtTriangle'", + "Smiley face shape. Corresponds to ECMA-376 ST_ShapeType 'smileyFace'", + "One snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'snip1Rect'", + "Two diagonal snip corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snip2DiagRect'", + "Two same-side snip corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snip2SameRect'", + "One snip one round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snipRoundRect'", + "Ten pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star10'", + "Twelve pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star12'", + "Sixteen pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star16'", + "Twenty four pointed star shape. Corresponds to ECMA-376 ST_ShapeType\n'star24'", + "Thirty two pointed star shape. Corresponds to ECMA-376 ST_ShapeType\n'star32'", + "Four pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star4'", + "Five pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star5'", + "Six pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star6'", + "Seven pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star7'", + "Eight pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star8'", + "Striped right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'stripedRightArrow'", + "Sun shape. Corresponds to ECMA-376 ST_ShapeType 'sun'", + "Trapezoid shape. Corresponds to ECMA-376 ST_ShapeType 'trapezoid'", + "Triangle shape. Corresponds to ECMA-376 ST_ShapeType 'triangle'", + "Up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upArrow'", + "Callout up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'upArrowCallout'", + "Up down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upDownArrow'", + "U-turn arrow shape. Corresponds to ECMA-376 ST_ShapeType 'uturnArrow'", + "Vertical scroll shape. Corresponds to ECMA-376 ST_ShapeType\n'verticalScroll'", + "Wave shape. Corresponds to ECMA-376 ST_ShapeType 'wave'", + "Callout wedge ellipse shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeEllipseCallout'", + "Callout wedge rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeRectCallout'", + "Callout wedge round rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeRoundRectCallout'", + "Alternate process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartAlternateProcess'", + "Collate flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartCollate'", + "Connector flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartConnector'", + "Decision flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDecision'", + "Delay flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDelay'", + "Display flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDisplay'", + "Document flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDocument'", + "Extract flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartExtract'", + "Input output flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartInputOutput'", + "Internal storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartInternalStorage'", + "Magnetic disk flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticDisk'", + "Magnetic drum flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticDrum'", + "Magnetic tape flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticTape'", + "Manual input flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartManualInput'", + "Manual operation flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartManualOperation'", + "Merge flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMerge'", + "Multi-document flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMultidocument'", + "Offline storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOfflineStorage'", + "Off-page connector flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOffpageConnector'", + "Online storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOnlineStorage'", + "Or flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOr'", + "Predefined process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPredefinedProcess'", + "Preparation flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPreparation'", + "Process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartProcess'", + "Punched card flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPunchedCard'", + "Punched tape flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPunchedTape'", + "Sort flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartSort'", + "Summing junction flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartSummingJunction'", + "Terminator flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartTerminator'", + "East arrow shape.", + "Northeast arrow shape.", + "North arrow shape.", + "Speech shape.", + "Star burst shape.", + "Teardrop shape. Corresponds to ECMA-376 ST_ShapeType 'teardrop'", + "Ellipse ribbon shape. Corresponds to ECMA-376 ST_ShapeType\n'ellipseRibbon'", + "Ellipse ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType\n'ellipseRibbon2'", + "Callout cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloudCallout'", + "Custom shape." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "TEXT_BOX", + "RECTANGLE", + "ROUND_RECTANGLE", + "ELLIPSE", + "ARC", + "BENT_ARROW", + "BENT_UP_ARROW", + "BEVEL", + "BLOCK_ARC", + "BRACE_PAIR", + "BRACKET_PAIR", + "CAN", + "CHEVRON", + "CHORD", + "CLOUD", + "CORNER", + "CUBE", + "CURVED_DOWN_ARROW", + "CURVED_LEFT_ARROW", + "CURVED_RIGHT_ARROW", + "CURVED_UP_ARROW", + "DECAGON", + "DIAGONAL_STRIPE", + "DIAMOND", + "DODECAGON", + "DONUT", + "DOUBLE_WAVE", + "DOWN_ARROW", + "DOWN_ARROW_CALLOUT", + "FOLDED_CORNER", + "FRAME", + "HALF_FRAME", + "HEART", + "HEPTAGON", + "HEXAGON", + "HOME_PLATE", + "HORIZONTAL_SCROLL", + "IRREGULAR_SEAL_1", + "IRREGULAR_SEAL_2", + "LEFT_ARROW", + "LEFT_ARROW_CALLOUT", + "LEFT_BRACE", + "LEFT_BRACKET", + "LEFT_RIGHT_ARROW", + "LEFT_RIGHT_ARROW_CALLOUT", + "LEFT_RIGHT_UP_ARROW", + "LEFT_UP_ARROW", + "LIGHTNING_BOLT", + "MATH_DIVIDE", + "MATH_EQUAL", + "MATH_MINUS", + "MATH_MULTIPLY", + "MATH_NOT_EQUAL", + "MATH_PLUS", + "MOON", + "NO_SMOKING", + "NOTCHED_RIGHT_ARROW", + "OCTAGON", + "PARALLELOGRAM", + "PENTAGON", + "PIE", + "PLAQUE", + "PLUS", + "QUAD_ARROW", + "QUAD_ARROW_CALLOUT", + "RIBBON", + "RIBBON_2", + "RIGHT_ARROW", + "RIGHT_ARROW_CALLOUT", + "RIGHT_BRACE", + "RIGHT_BRACKET", + "ROUND_1_RECTANGLE", + "ROUND_2_DIAGONAL_RECTANGLE", + "ROUND_2_SAME_RECTANGLE", + "RIGHT_TRIANGLE", + "SMILEY_FACE", + "SNIP_1_RECTANGLE", + "SNIP_2_DIAGONAL_RECTANGLE", + "SNIP_2_SAME_RECTANGLE", + "SNIP_ROUND_RECTANGLE", + "STAR_10", + "STAR_12", + "STAR_16", + "STAR_24", + "STAR_32", + "STAR_4", + "STAR_5", + "STAR_6", + "STAR_7", + "STAR_8", + "STRIPED_RIGHT_ARROW", + "SUN", + "TRAPEZOID", + "TRIANGLE", + "UP_ARROW", + "UP_ARROW_CALLOUT", + "UP_DOWN_ARROW", + "UTURN_ARROW", + "VERTICAL_SCROLL", + "WAVE", + "WEDGE_ELLIPSE_CALLOUT", + "WEDGE_RECTANGLE_CALLOUT", + "WEDGE_ROUND_RECTANGLE_CALLOUT", + "FLOW_CHART_ALTERNATE_PROCESS", + "FLOW_CHART_COLLATE", + "FLOW_CHART_CONNECTOR", + "FLOW_CHART_DECISION", + "FLOW_CHART_DELAY", + "FLOW_CHART_DISPLAY", + "FLOW_CHART_DOCUMENT", + "FLOW_CHART_EXTRACT", + "FLOW_CHART_INPUT_OUTPUT", + "FLOW_CHART_INTERNAL_STORAGE", + "FLOW_CHART_MAGNETIC_DISK", + "FLOW_CHART_MAGNETIC_DRUM", + "FLOW_CHART_MAGNETIC_TAPE", + "FLOW_CHART_MANUAL_INPUT", + "FLOW_CHART_MANUAL_OPERATION", + "FLOW_CHART_MERGE", + "FLOW_CHART_MULTIDOCUMENT", + "FLOW_CHART_OFFLINE_STORAGE", + "FLOW_CHART_OFFPAGE_CONNECTOR", + "FLOW_CHART_ONLINE_STORAGE", + "FLOW_CHART_OR", + "FLOW_CHART_PREDEFINED_PROCESS", + "FLOW_CHART_PREPARATION", + "FLOW_CHART_PROCESS", + "FLOW_CHART_PUNCHED_CARD", + "FLOW_CHART_PUNCHED_TAPE", + "FLOW_CHART_SORT", + "FLOW_CHART_SUMMING_JUNCTION", + "FLOW_CHART_TERMINATOR", + "ARROW_EAST", + "ARROW_NORTH_EAST", + "ARROW_NORTH", + "SPEECH", + "STARBURST", + "TEARDROP", + "ELLIPSE_RIBBON", + "ELLIPSE_RIBBON_2", + "CLOUD_CALLOUT", + "CUSTOM" + ], + "description": "The type of the shape.", "type": "string" }, - "size": { - "description": "The original size of the picture fill. This field is read-only.", - "$ref": "Size" + "text": { + "$ref": "TextContent", + "description": "The text content of the shape." + }, + "placeholder": { + "description": "Placeholders are shapes that are inherit from corresponding placeholders on\nlayouts and masters.\n\nIf set, the shape is a placeholder shape and any inherited properties\ncan be resolved by looking at the parent placeholder identified by the\nPlaceholder.parent_object_id field.", + "$ref": "Placeholder" + }, + "shapeProperties": { + "$ref": "ShapeProperties", + "description": "The properties of the shape." } - }, - "id": "StretchedPictureFill" + } }, "Image": { "description": "A PageElement kind representing an\nimage.", "type": "object", "properties": { + "imageProperties": { + "$ref": "ImageProperties", + "description": "The properties of the image." + }, "contentUrl": { "description": "An URL to an image with a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the image as the original requester. Access to the\nimage may be lost if the presentation's sharing settings change.", "type": "string" - }, - "imageProperties": { - "description": "The properties of the image.", - "$ref": "ImageProperties" } }, "id": "Image" }, - "VideoProperties": { - "description": "The properties of the Video.", - "type": "object", - "properties": { - "outline": { - "description": "The outline of the video. The default outline matches the defaults for new\nvideos created in the Slides editor.", - "$ref": "Outline" - } - }, - "id": "VideoProperties" - }, - "CropProperties": { - "description": "The crop properties of an object enclosed in a container. For example, an\nImage.\n\nThe crop properties is represented by the offsets of four edges which define\na crop rectangle. The offsets are measured in percentage from the\ncorresponding edges of the object's original bounding rectangle towards\ninside, relative to the object's original dimensions.\n\n- If the offset is in the interval (0, 1), the corresponding edge of crop\nrectangle is positioned inside of the object's original bounding rectangle.\n- If the offset is negative or greater than 1, the corresponding edge of crop\nrectangle is positioned outside of the object's original bounding rectangle.\n- If the left edge of the crop rectangle is on the right side of its right\nedge, the object will be flipped horizontally.\n- If the top edge of the crop rectangle is below its bottom edge, the object\nwill be flipped vertically.\n- If all offsets and rotation angle is 0, the object is not cropped.\n\nAfter cropping, the content in the crop rectangle will be stretched to fit\nits container.", - "type": "object", - "properties": { - "rightOffset": { - "description": "The offset specifies the right edge of the crop rectangle that is located\nto the left of the original bounding rectangle right edge, relative to the\nobject's original width.", - "type": "number", - "format": "float" - }, - "angle": { - "description": "The rotation angle of the crop window around its center, in radians.\nRotation angle is applied after the offset.", - "type": "number", - "format": "float" - }, - "leftOffset": { - "description": "The offset specifies the left edge of the crop rectangle that is located to\nthe right of the original bounding rectangle left edge, relative to the\nobject's original width.", - "type": "number", - "format": "float" - }, - "topOffset": { - "description": "The offset specifies the top edge of the crop rectangle that is located\nbelow the original bounding rectangle top edge, relative to the object's\noriginal height.", - "type": "number", - "format": "float" - }, - "bottomOffset": { - "description": "The offset specifies the bottom edge of the crop rectangle that is located\nabove the original bounding rectangle bottom edge, relative to the object's\noriginal height.", - "type": "number", - "format": "float" - } - }, - "id": "CropProperties" - }, - "TableRange": { - "description": "A table range represents a reference to a subset of a table.\n\nIt's important to note that the cells specified by a table range do not\nnecessarily form a rectangle. For example, let's say we have a 3 x 3 table\nwhere all the cells of the last row are merged together. The table looks\nlike this:\n\n \n [ ]\n\nA table range with location = (0, 0), row span = 3 and column span = 2\nspecifies the following cells:\n\n x x \n [ x ]", - "type": "object", - "properties": { - "location": { - "description": "The starting location of the table range.", - "$ref": "TableCellLocation" - }, - "rowSpan": { - "description": "The row span of the table range.", - "type": "integer", - "format": "int32" - }, - "columnSpan": { - "description": "The column span of the table range.", - "type": "integer", - "format": "int32" - } - }, - "id": "TableRange" - }, - "UpdateTextStyleRequest": { - "description": "Update the styling of text in a Shape or\nTable.", - "type": "object", - "properties": { - "style": { - "description": "The style(s) to set on the text.\n\nIf the value for a particular style matches that of the parent, that style\nwill be set to inherit.\n\nCertain text style changes may cause other changes meant to mirror the\nbehavior of the Slides editor. See the documentation of\nTextStyle for more information.", - "$ref": "TextStyle" - }, - "objectId": { - "description": "The object ID of the shape or table with the text to be styled.", - "type": "string" - }, - "fields": { - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example to update the text style to bold, set `fields` to `\"bold\"`.\n\nTo reset a property to its default value,\ninclude its field name in the field mask but leave the field itself unset.", - "type": "string", - "format": "google-fieldmask" - }, - "textRange": { - "description": "The range of text to style.\n\nThe range may be extended to include adjacent newlines.\n\nIf the range fully contains a paragraph belonging to a list, the\nparagraph's bullet is also updated with the matching text style.", - "$ref": "Range" - }, - "cellLocation": { - "description": "The optional table cell location if the text to be styled is in a table\ncell. If present, the object_id must refer to a table.", - "$ref": "TableCellLocation" - } - }, - "id": "UpdateTextStyleRequest" - }, "InsertTextRequest": { "description": "Inserts text into a shape or a table cell.", "type": "object", "properties": { - "text": { - "description": "The text to be inserted.\n\nInserting a newline character will implicitly create a new\nParagraphMarker at that index.\nThe paragraph style of the new paragraph will be copied from the paragraph\nat the current insertion index, including lists and bullets.\n\nText styles for inserted text will be determined automatically, generally\npreserving the styling of neighboring text. In most cases, the text will be\nadded to the TextRun that exists at the\ninsertion index.\n\nSome control characters (U+0000-U+0008, U+000C-U+001F) and characters\nfrom the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF)\nwill be stripped out of the inserted text.", - "type": "string" - }, "objectId": { "description": "The object ID of the shape or table where the text will be inserted.", "type": "string" }, + "text": { + "description": "The text to be inserted.\n\nInserting a newline character will implicitly create a new\nParagraphMarker at that index.\nThe paragraph style of the new paragraph will be copied from the paragraph\nat the current insertion index, including lists and bullets.\n\nText styles for inserted text will be determined automatically, generally\npreserving the styling of neighboring text. In most cases, the text will be\nadded to the TextRun that exists at the\ninsertion index.\n\nSome control characters (U+0000-U+0008, U+000C-U+001F) and characters\nfrom the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF)\nwill be stripped out of the inserted text.", + "type": "string" + }, "insertionIndex": { "description": "The index where the text will be inserted, in Unicode code units, based\non TextElement indexes.\n\nThe index is zero-based and is computed from the start of the string.\nThe index may be adjusted to prevent insertions inside Unicode grapheme\nclusters. In these cases, the text will be inserted immediately after the\ngrapheme cluster.", - "type": "integer", - "format": "int32" + "format": "int32", + "type": "integer" }, "cellLocation": { "description": "The optional table cell location if the text is to be inserted into a table\ncell. If present, the object_id must refer to a table.", @@ -298,54 +352,102 @@ }, "id": "InsertTextRequest" }, - "RgbColor": { - "description": "An RGB color.", + "AffineTransform": { + "description": "AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ]\nto transform source coordinates (x,y) into destination coordinates (x', y')\naccording to:\n\n x' x = shear_y scale_y translate_y \n 1 [ 1 ]\n\nAfter transformation,\n\n x' = scale_x * x + shear_x * y + translate_x;\n y' = scale_y * y + shear_y * x + translate_y;\n\nThis message is therefore composed of these six matrix elements.", "type": "object", "properties": { - "green": { - "description": "The green component of the color, from 0.0 to 1.0.", + "translateX": { "type": "number", - "format": "float" + "description": "The X coordinate translation element.", + "format": "double" }, - "blue": { - "description": "The blue component of the color, from 0.0 to 1.0.", - "type": "number", - "format": "float" + "shearY": { + "description": "The Y coordinate shearing element.", + "format": "double", + "type": "number" }, - "red": { - "description": "The red component of the color, from 0.0 to 1.0.", - "type": "number", - "format": "float" - } - }, - "id": "RgbColor" - }, - "PageElementProperties": { - "description": "Common properties for a page element.\n\nNote: When you initially create a\nPageElement, the API may modify\nthe values of both `size` and `transform`, but the\nvisual size will be unchanged.", - "type": "object", - "properties": { - "size": { - "description": "The size of the element.", - "$ref": "Size" - }, - "pageObjectId": { - "description": "The object ID of the page where the element is located.", + "unit": { + "enumDescriptions": [ + "The units are unknown.", + "An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter\nand thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", + "A point, 1/72 of an inch." + ], + "enum": [ + "UNIT_UNSPECIFIED", + "EMU", + "PT" + ], + "description": "The units for translate elements.", "type": "string" }, - "transform": { - "description": "The transform for the element.", - "$ref": "AffineTransform" + "scaleX": { + "type": "number", + "description": "The X coordinate scaling element.", + "format": "double" + }, + "shearX": { + "description": "The X coordinate shearing element.", + "format": "double", + "type": "number" + }, + "scaleY": { + "description": "The Y coordinate scaling element.", + "format": "double", + "type": "number" + }, + "translateY": { + "description": "The Y coordinate translation element.", + "format": "double", + "type": "number" } }, - "id": "PageElementProperties" + "id": "AffineTransform" + }, + "AutoText": { + "description": "A TextElement kind that represents auto text.", + "type": "object", + "properties": { + "type": { + "description": "The type of this auto text.", + "type": "string", + "enumDescriptions": [ + "An unspecified autotext type.", + "Type for autotext that represents the current slide number." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "SLIDE_NUMBER" + ] + }, + "content": { + "description": "The rendered content of this auto text, if available.", + "type": "string" + }, + "style": { + "$ref": "TextStyle", + "description": "The styling applied to this auto text." + } + }, + "id": "AutoText" + }, + "CreateVideoResponse": { + "id": "CreateVideoResponse", + "description": "The result of creating a video.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created video.", + "type": "string" + } + } }, "DeleteTextRequest": { "description": "Deletes text from a shape or a table cell.", "type": "object", "properties": { "objectId": { - "description": "The object ID of the shape or table from which the text will be deleted.", - "type": "string" + "type": "string", + "description": "The object ID of the shape or table from which the text will be deleted." }, "textRange": { "description": "The range of text to delete, based on TextElement indexes.\n\nThere is always an implicit newline character at the end of a shape's or\ntable cell's text that cannot be deleted. `Range.Type.ALL` will use the\ncorrect bounds, but care must be taken when specifying explicit bounds for\nrange types `FROM_START_INDEX` and `FIXED_RANGE`. For example, if the text\nis \"ABC\", followed by an implicit newline, then the maximum value is 2 for\n`text_range.start_index` and 3 for `text_range.end_index`.\n\nDeleting text that crosses a paragraph boundary may result in changes\nto paragraph styles and lists as the two paragraphs are merged.\n\nRanges that include only one code unit of a surrogate pair are expanded to\ninclude both code units.", @@ -358,163 +460,184 @@ }, "id": "DeleteTextRequest" }, - "ParagraphStyle": { - "description": "Styles that apply to a whole paragraph.\n\nIf this text is contained in a shape with a parent placeholder, then these paragraph styles may be\ninherited from the parent. Which paragraph styles are inherited depend on the\nnesting level of lists:\n\n* A paragraph not in a list will inherit its paragraph style from the\n paragraph at the 0 nesting level of the list inside the parent placeholder.\n* A paragraph in a list will inherit its paragraph style from the paragraph\n at its corresponding nesting level of the list inside the parent\n placeholder.\n\nInherited paragraph styles are represented as unset fields in this message.", - "type": "object", + "UpdatePageElementTransformRequest": { "properties": { - "lineSpacing": { - "description": "The amount of space between lines, as a percentage of normal, where normal\nis represented as 100.0. If unset, the value is inherited from the parent.\nThis property is read-only.", - "type": "number", - "format": "float" - }, - "spacingMode": { - "description": "The spacing mode for the paragraph. This property is read-only.", - "enum": [ - "SPACING_MODE_UNSPECIFIED", - "NEVER_COLLAPSE", - "COLLAPSE_LISTS" - ], + "applyMode": { "enumDescriptions": [ - "The spacing mode is inherited from the parent.", - "Paragraph spacing is always rendered.", - "Paragraph spacing is skipped between list elements." + "Unspecified mode.", + "Applies the new AffineTransform matrix to the existing one, and\nreplaces the existing one with the resulting concatenation.", + "Replaces the existing AffineTransform matrix with the new one." ], - "type": "string" - }, - "alignment": { - "description": "The text alignment for this paragraph. This property is read-only.", "enum": [ - "ALIGNMENT_UNSPECIFIED", - "START", - "CENTER", - "END", - "JUSTIFIED" - ], - "enumDescriptions": [ - "The paragraph alignment is inherited from the parent.", - "The paragraph is aligned to the start of the line. Left-aligned for\nLTR text, right-aligned otherwise.", - "The paragraph is centered.", - "The paragraph is aligned to the end of the line. Right-aligned for\nLTR text, left-aligned otherwise.", - "The paragraph is justified." + "APPLY_MODE_UNSPECIFIED", + "RELATIVE", + "ABSOLUTE" ], + "description": "The apply mode of the transform update.", "type": "string" }, - "spaceAbove": { - "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent. This property is read-only.", - "$ref": "Dimension" - }, - "direction": { - "description": "The text direction of this paragraph. This property is read-only.", - "enum": [ - "TEXT_DIRECTION_UNSPECIFIED", - "LEFT_TO_RIGHT", - "RIGHT_TO_LEFT" - ], - "enumDescriptions": [ - "The text direction is inherited from the parent.", - "The text goes from left to right.", - "The text goes from right to left." - ], - "type": "string" - }, - "indentEnd": { - "description": "The amount indentation for the paragraph on the side that corresponds to\nthe end of the text, based on the current text direction. If unset, the\nvalue is inherited from the parent. This property is read-only.", - "$ref": "Dimension" - }, - "indentFirstLine": { - "description": "The amount of indentation for the start of the first line of the paragraph.\nIf unset, the value is inherited from the parent. This property is\nread-only.", - "$ref": "Dimension" - }, - "indentStart": { - "description": "The amount indentation for the paragraph on the side that corresponds to\nthe start of the text, based on the current text direction. If unset, the\nvalue is inherited from the parent. This property is read-only.", - "$ref": "Dimension" - }, - "spaceBelow": { - "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent. This property is read-only.", - "$ref": "Dimension" - } - }, - "id": "ParagraphStyle" - }, - "Page": { - "description": "A page in a presentation.", - "type": "object", - "properties": { - "slideProperties": { - "description": "Slide specific properties. Only set if page_type = SLIDE.", - "$ref": "SlideProperties" - }, - "pageType": { - "description": "The type of the page.", - "enum": [ - "SLIDE", - "MASTER", - "LAYOUT" - ], - "enumDescriptions": [ - "A slide page.", - "A master slide page.", - "A layout page." - ], - "type": "string" - }, - "pageElements": { - "description": "The page elements rendered on the page.", - "type": "array", - "items": { - "$ref": "PageElement" - } - }, - "pageProperties": { - "description": "The properties of the page.", - "$ref": "PageProperties" - }, - "layoutProperties": { - "description": "Layout specific properties. Only set if page_type = LAYOUT.", - "$ref": "LayoutProperties" - }, "objectId": { - "description": "The object ID for this page. Object IDs used by\nPage and\nPageElement share the same namespace.", + "description": "The object ID of the page element to update.", + "type": "string" + }, + "transform": { + "$ref": "AffineTransform", + "description": "The input transform matrix used to update the page element." + } + }, + "id": "UpdatePageElementTransformRequest", + "description": "Updates the transform of a page element.", + "type": "object" + }, + "DeleteObjectRequest": { + "description": "Deletes an object, either pages or\npage elements, from the\npresentation.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the page or page element to delete.\n\nIf after a delete operation a group contains\nonly 1 or no page elements, the group is also deleted.\n\nIf a placeholder is deleted on a layout, any empty inheriting shapes are\nalso deleted.", "type": "string" } }, - "id": "Page" + "id": "DeleteObjectRequest" }, - "UpdateShapePropertiesRequest": { - "description": "Update the properties of a Shape.", + "TextElement": { "type": "object", "properties": { - "shapeProperties": { - "description": "The shape properties to update.", - "$ref": "ShapeProperties" + "textRun": { + "$ref": "TextRun", + "description": "A TextElement representing a run of text where all of the characters\nin the run have the same TextStyle.\n\nThe `start_index` and `end_index` of TextRuns will always be fully\ncontained in the index range of a single `paragraph_marker` TextElement.\nIn other words, a TextRun will never span multiple paragraphs." }, - "objectId": { - "description": "The object ID of the shape the updates are applied to.", - "type": "string" + "autoText": { + "description": "A TextElement representing a spot in the text that is dynamically\nreplaced with content that can change over time.", + "$ref": "AutoText" }, - "fields": { - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `shapeProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the shape background solid fill color, set `fields`\nto `\"shapeBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "paragraphMarker": { + "$ref": "ParagraphMarker", + "description": "A marker representing the beginning of a new paragraph.\n\nThe `start_index` and `end_index` of this TextElement represent the\nrange of the paragraph. Other TextElements with an index range contained\ninside this paragraph's range are considered to be part of this\nparagraph. The range of indices of two separate paragraphs will never\noverlap." + }, + "startIndex": { + "description": "The zero-based start index of this text element, in Unicode code units.", + "format": "int32", + "type": "integer" + }, + "endIndex": { + "description": "The zero-based end index of this text element, exclusive, in Unicode code\nunits.", + "format": "int32", + "type": "integer" + } + }, + "id": "TextElement", + "description": "A TextElement describes the content of a range of indices in the text content\nof a Shape or TableCell." + }, + "Dimension": { + "description": "A magnitude in a single direction in the specified units.", + "type": "object", + "properties": { + "unit": { + "enum": [ + "UNIT_UNSPECIFIED", + "EMU", + "PT" + ], + "description": "The units for magnitude.", "type": "string", - "format": "google-fieldmask" + "enumDescriptions": [ + "The units are unknown.", + "An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter\nand thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", + "A point, 1/72 of an inch." + ] + }, + "magnitude": { + "description": "The magnitude.", + "format": "double", + "type": "number" } }, - "id": "UpdateShapePropertiesRequest" + "id": "Dimension" }, - "CreateLineResponse": { - "description": "The result of creating a line.", + "LineFill": { + "description": "The fill of the line.", "type": "object", "properties": { - "objectId": { - "description": "The object ID of the created line.", + "solidFill": { + "description": "Solid color fill.", + "$ref": "SolidFill" + } + }, + "id": "LineFill" + }, + "VideoProperties": { + "description": "The properties of the Video.", + "type": "object", + "properties": { + "outline": { + "$ref": "Outline", + "description": "The outline of the video. The default outline matches the defaults for new\nvideos created in the Slides editor." + } + }, + "id": "VideoProperties" + }, + "InsertTableRowsRequest": { + "description": "Inserts rows into a table.", + "type": "object", + "properties": { + "tableObjectId": { + "description": "The table to insert rows into.", + "type": "string" + }, + "insertBelow": { + "description": "Whether to insert new rows below the reference cell location.\n\n- `True`: insert below the cell.\n- `False`: insert above the cell.", + "type": "boolean" + }, + "number": { + "description": "The number of rows to be inserted. Maximum 20 per request.", + "format": "int32", + "type": "integer" + }, + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The reference table cell location from which rows will be inserted.\n\nA new row will be inserted above (or below) the row where the reference\ncell is. If the reference cell is a merged cell, a new row will be\ninserted above (or below) the merged cell." + } + }, + "id": "InsertTableRowsRequest" + }, + "LayoutProperties": { + "description": "The properties of Page are only\nrelevant for pages with page_type LAYOUT.", + "type": "object", + "properties": { + "masterObjectId": { + "description": "The object ID of the master that this layout is based on.", + "type": "string" + }, + "name": { + "description": "The name of the layout.", + "type": "string" + }, + "displayName": { + "description": "The human readable name of the layout in the presentation's locale.", "type": "string" } }, - "id": "CreateLineResponse" + "id": "LayoutProperties" }, "Presentation": { - "description": "A Google Slides presentation.", "type": "object", "properties": { + "revisionId": { + "description": "The revision ID of the presentation. Can be used in update requests\nto assert that the presentation revision hasn't changed since the last\nread operation. Only populated if the user has edit access to the\npresentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes.", + "type": "string" + }, + "notesMaster": { + "$ref": "Page", + "description": "The notes master in the presentation. It serves three purposes:\n\n- Placeholder shapes on a notes master contain the default text styles and\n shape properties of all placeholder shapes on notes pages. Specifically,\n a `SLIDE_IMAGE` placeholder shape contains the slide thumbnail, and a\n `BODY` placeholder shape contains the speaker notes.\n- The notes master page properties define the common page properties\n inherited by all notes pages.\n- Any other shapes on the notes master will appear on all notes pages.\n\nThe notes master is read-only." + }, + "layouts": { + "description": "The layouts in the presentation. A layout is a template that determines\nhow content is arranged and styled on the slides that inherit from that\nlayout.", + "type": "array", + "items": { + "$ref": "Page" + } + }, "title": { "description": "The title of the presentation.", "type": "string" @@ -523,13 +646,6 @@ "description": "The locale of the presentation, as an IETF BCP 47 language tag.", "type": "string" }, - "slides": { - "description": "The slides in the presentation.\nA slide inherits properties from a slide layout.", - "type": "array", - "items": { - "$ref": "Page" - } - }, "masters": { "description": "The slide masters in the presentation. A slide master contains all common\npage elements and the common properties for a set of layouts. They serve\nthree purposes:\n\n- Placeholder shapes on a master contain the default text styles and shape\n properties of all placeholder shapes on pages that use that master.\n- The master page properties define the common page properties inherited by\n its layouts.\n- Any other shapes on the master slide will appear on all slides using that\n master, regardless of their layout.", "type": "array", @@ -545,181 +661,123 @@ "description": "The ID of the presentation.", "type": "string" }, - "layouts": { - "description": "The layouts in the presentation. A layout is a template that determines\nhow content is arranged and styled on the slides that inherit from that\nlayout.", + "slides": { + "description": "The slides in the presentation.\nA slide inherits properties from a slide layout.", "type": "array", "items": { "$ref": "Page" } } }, - "id": "Presentation" + "id": "Presentation", + "description": "A Google Slides presentation." }, - "CreateImageRequest": { - "description": "Creates an image.", + "LineProperties": { + "description": "The properties of the Line.\n\nWhen unset, these fields default to values that match the appearance of\nnew lines created in the Slides editor.", "type": "object", "properties": { - "url": { - "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.", - "type": "string" + "link": { + "$ref": "Link", + "description": "The hyperlink destination of the line. If unset, there is no link." }, - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" - }, - "elementProperties": { - "description": "The element properties for the image.\n\nWhen the aspect ratio of the provided size does not match the image aspect\nratio, the image is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation.", - "$ref": "PageElementProperties" - } - }, - "id": "CreateImageRequest" - }, - "SlideProperties": { - "description": "The properties of Page that are only\nrelevant for pages with page_type SLIDE.", - "type": "object", - "properties": { - "layoutObjectId": { - "description": "The object ID of the layout that this slide is based on.", - "type": "string" - }, - "masterObjectId": { - "description": "The object ID of the master that this slide is based on.", - "type": "string" - } - }, - "id": "SlideProperties" - }, - "UpdatePageElementTransformRequest": { - "description": "Updates the transform of a page element.", - "type": "object", - "properties": { - "applyMode": { - "description": "The apply mode of the transform update.", - "enum": [ - "APPLY_MODE_UNSPECIFIED", - "RELATIVE", - "ABSOLUTE" - ], - "enumDescriptions": [ - "Unspecified mode.", - "Applies the new AffineTransform matrix to the existing one, and\nreplaces the existing one with the resulting concatenation.", - "Replaces the existing AffineTransform matrix with the new one." - ], - "type": "string" - }, - "objectId": { - "description": "The object ID of the page element to update.", - "type": "string" - }, - "transform": { - "description": "The input transform matrix used to update the page element.", - "$ref": "AffineTransform" - } - }, - "id": "UpdatePageElementTransformRequest" - }, - "List": { - "description": "A List describes the look and feel of bullets belonging to paragraphs\nassociated with a list. A paragraph that is part of a list has an implicit\nreference to that list's ID.", - "type": "object", - "properties": { - "nestingLevel": { - "description": "A map of nesting levels to the properties of bullets at the associated\nlevel. A list has at most nine levels of nesting, so the possible values\nfor the keys of this map are 0 through 8, inclusive.", - "additionalProperties": { - "$ref": "NestingLevel" - }, - "type": "object" - }, - "listId": { - "description": "The ID of the list.", - "type": "string" - } - }, - "id": "List" - }, - "CreateVideoResponse": { - "description": "The result of creating a video.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created video.", - "type": "string" - } - }, - "id": "CreateVideoResponse" - }, - "InsertTableRowsRequest": { - "description": "Inserts rows into a table.", - "type": "object", - "properties": { - "tableObjectId": { - "description": "The table to insert rows into.", - "type": "string" - }, - "insertBelow": { - "description": "Whether to insert new rows below the reference cell location.\n\n- `True`: insert below the cell.\n- `False`: insert above the cell.", - "type": "boolean" - }, - "cellLocation": { - "description": "The reference table cell location from which rows will be inserted.\n\nA new row will be inserted above (or below) the row where the reference\ncell is. If the reference cell is a merged cell, a new row will be\ninserted above (or below) the merged cell.", - "$ref": "TableCellLocation" - }, - "number": { - "description": "The number of rows to be inserted. Maximum 20 per request.", - "type": "integer", - "format": "int32" - } - }, - "id": "InsertTableRowsRequest" - }, - "UpdateVideoPropertiesRequest": { - "description": "Update the properties of a Video.", - "type": "object", - "properties": { - "videoProperties": { - "description": "The video properties to update.", - "$ref": "VideoProperties" - }, - "objectId": { - "description": "The object ID of the video the updates are applied to.", - "type": "string" - }, - "fields": { - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `videoProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the video outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "dashStyle": { + "description": "The dash style of the line.", "type": "string", - "format": "google-fieldmask" + "enumDescriptions": [ + "Unspecified dash style.", + "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", + "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", + "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", + "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", + "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", + "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." + ], + "enum": [ + "DASH_STYLE_UNSPECIFIED", + "SOLID", + "DOT", + "DASH", + "DASH_DOT", + "LONG_DASH", + "LONG_DASH_DOT" + ] + }, + "startArrow": { + "enumDescriptions": [ + "An unspecified arrow style.", + "No arrow.", + "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", + "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", + "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", + "Filled square.", + "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", + "Hollow arrow.", + "Hollow circle.", + "Hollow square.", + "Hollow diamond." + ], + "enum": [ + "ARROW_STYLE_UNSPECIFIED", + "NONE", + "STEALTH_ARROW", + "FILL_ARROW", + "FILL_CIRCLE", + "FILL_SQUARE", + "FILL_DIAMOND", + "OPEN_ARROW", + "OPEN_CIRCLE", + "OPEN_SQUARE", + "OPEN_DIAMOND" + ], + "description": "The style of the arrow at the beginning of the line.", + "type": "string" + }, + "endArrow": { + "enumDescriptions": [ + "An unspecified arrow style.", + "No arrow.", + "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", + "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", + "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", + "Filled square.", + "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", + "Hollow arrow.", + "Hollow circle.", + "Hollow square.", + "Hollow diamond." + ], + "enum": [ + "ARROW_STYLE_UNSPECIFIED", + "NONE", + "STEALTH_ARROW", + "FILL_ARROW", + "FILL_CIRCLE", + "FILL_SQUARE", + "FILL_DIAMOND", + "OPEN_ARROW", + "OPEN_CIRCLE", + "OPEN_SQUARE", + "OPEN_DIAMOND" + ], + "description": "The style of the arrow at the end of the line.", + "type": "string" + }, + "weight": { + "description": "The thickness of the line.", + "$ref": "Dimension" + }, + "lineFill": { + "$ref": "LineFill", + "description": "The fill of the line. The default line fill matches the defaults for new\nlines created in the Slides editor." } }, - "id": "UpdateVideoPropertiesRequest" + "id": "LineProperties" }, "OpaqueColor": { "description": "A themeable solid color value.", "type": "object", "properties": { - "rgbColor": { - "description": "An opaque RGB color.", - "$ref": "RgbColor" - }, "themeColor": { - "description": "An opaque theme color.", - "enum": [ - "THEME_COLOR_TYPE_UNSPECIFIED", - "DARK1", - "LIGHT1", - "DARK2", - "LIGHT2", - "ACCENT1", - "ACCENT2", - "ACCENT3", - "ACCENT4", - "ACCENT5", - "ACCENT6", - "HYPERLINK", - "FOLLOWED_HYPERLINK", - "TEXT1", - "BACKGROUND1", - "TEXT2", - "BACKGROUND2" - ], "enumDescriptions": [ "Unspecified theme color. This value should not be used.", "Represents the first dark color.", @@ -739,179 +797,413 @@ "Represents the second text color.", "Represents the second background color." ], + "enum": [ + "THEME_COLOR_TYPE_UNSPECIFIED", + "DARK1", + "LIGHT1", + "DARK2", + "LIGHT2", + "ACCENT1", + "ACCENT2", + "ACCENT3", + "ACCENT4", + "ACCENT5", + "ACCENT6", + "HYPERLINK", + "FOLLOWED_HYPERLINK", + "TEXT1", + "BACKGROUND1", + "TEXT2", + "BACKGROUND2" + ], + "description": "An opaque theme color.", "type": "string" + }, + "rgbColor": { + "description": "An opaque RGB color.", + "$ref": "RgbColor" } }, "id": "OpaqueColor" }, + "ImageProperties": { + "properties": { + "contrast": { + "description": "The contrast effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", + "format": "float", + "type": "number" + }, + "link": { + "$ref": "Link", + "description": "The hyperlink destination of the image. If unset, there is no link." + }, + "recolor": { + "$ref": "Recolor", + "description": "The recolor effect of the image. If not set, the image is not recolored.\nThis property is read-only." + }, + "cropProperties": { + "$ref": "CropProperties", + "description": "The crop properties of the image. If not set, the image is not cropped.\nThis property is read-only." + }, + "outline": { + "description": "The outline of the image. If not set, the the image has no outline.", + "$ref": "Outline" + }, + "brightness": { + "description": "The brightness effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", + "format": "float", + "type": "number" + }, + "transparency": { + "description": "The transparency effect of the image. The value should be in the interval\n[0.0, 1.0], where 0 means no effect and 1 means completely transparent.\nThis property is read-only.", + "format": "float", + "type": "number" + }, + "shadow": { + "$ref": "Shadow", + "description": "The shadow of the image. If not set, the image has no shadow. This property\nis read-only." + } + }, + "id": "ImageProperties", + "description": "The properties of the Image.", + "type": "object" + }, + "ReplaceAllShapesWithImageResponse": { + "description": "The result of replacing shapes with an image.", + "type": "object", + "properties": { + "occurrencesChanged": { + "description": "The number of shapes replaced with images.", + "format": "int32", + "type": "integer" + } + }, + "id": "ReplaceAllShapesWithImageResponse" + }, + "Line": { + "properties": { + "lineType": { + "enumDescriptions": [ + "An unspecified line type.", + "Straight connector 1 form. Corresponds to ECMA-376 ST_ShapeType\n'straightConnector1'.", + "Bent connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector2'.", + "Bent connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector3'.", + "Bent connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector4'.", + "Bent connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector5'.", + "Curved connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector2'.", + "Curved connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector3'.", + "Curved connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector4'.", + "Curved connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector5'." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "STRAIGHT_CONNECTOR_1", + "BENT_CONNECTOR_2", + "BENT_CONNECTOR_3", + "BENT_CONNECTOR_4", + "BENT_CONNECTOR_5", + "CURVED_CONNECTOR_2", + "CURVED_CONNECTOR_3", + "CURVED_CONNECTOR_4", + "CURVED_CONNECTOR_5" + ], + "description": "The type of the line.", + "type": "string" + }, + "lineProperties": { + "$ref": "LineProperties", + "description": "The properties of the line." + } + }, + "id": "Line", + "description": "A PageElement kind representing a\nline, curved connector, or bent connector.", + "type": "object" + }, + "CreateSheetsChartRequest": { + "properties": { + "objectId": { + "description": "A user-supplied object ID.\n\nIf specified, the ID must be unique among all pages and page elements in\nthe presentation. The ID should start with a word character [a-zA-Z0-9_]\nand then followed by any number of the following characters [a-zA-Z0-9_-:].\nThe length of the ID should not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", + "type": "string" + }, + "elementProperties": { + "$ref": "PageElementProperties", + "description": "The element properties for the chart.\n\nWhen the aspect ratio of the provided size does not match the chart aspect\nratio, the chart is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation." + }, + "spreadsheetId": { + "description": "The ID of the Google Sheets spreadsheet that contains the chart.", + "type": "string" + }, + "linkingMode": { + "enumDescriptions": [ + "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", + "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." + ], + "enum": [ + "NOT_LINKED_IMAGE", + "LINKED" + ], + "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked.", + "type": "string" + }, + "chartId": { + "description": "The ID of the specific chart in the Google Sheets spreadsheet.", + "format": "int32", + "type": "integer" + } + }, + "id": "CreateSheetsChartRequest", + "description": "Creates an embedded Google Sheets chart.\n\nNOTE: Chart creation requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes.", + "type": "object" + }, + "BatchUpdatePresentationResponse": { + "description": "Response message from a batch update.", + "type": "object", + "properties": { + "replies": { + "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", + "type": "array", + "items": { + "$ref": "Response" + } + }, + "presentationId": { + "description": "The presentation the updates were applied to.", + "type": "string" + } + }, + "id": "BatchUpdatePresentationResponse" + }, + "CreateImageResponse": { + "description": "The result of creating an image.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created image.", + "type": "string" + } + }, + "id": "CreateImageResponse" + }, + "SlideProperties": { + "id": "SlideProperties", + "description": "The properties of Page that are only\nrelevant for pages with page_type SLIDE.", + "type": "object", + "properties": { + "layoutObjectId": { + "description": "The object ID of the layout that this slide is based on.", + "type": "string" + }, + "masterObjectId": { + "description": "The object ID of the master that this slide is based on.", + "type": "string" + }, + "notesPage": { + "description": "The notes page that this slide is associated with. It defines the visual\nappearance of a notes page when printing or exporting slides with speaker\nnotes. A notes page inherits properties from the\nnotes master.\nThe placeholder shape with type BODY on the notes page contains the speaker\nnotes for this slide. The ID of this shape is identified by the\nspeakerNotesObjectId field.\nThe notes page is read-only except for the text content and styles of the\nspeaker notes shape.", + "$ref": "Page" + } + } + }, "Response": { "description": "A single response from an update.", "type": "object", "properties": { - "createTable": { - "description": "The result of creating a table.", - "$ref": "CreateTableResponse" - }, - "replaceAllText": { - "description": "The result of replacing text.", - "$ref": "ReplaceAllTextResponse" - }, - "createLine": { - "description": "The result of creating a line.", - "$ref": "CreateLineResponse" - }, - "createSheetsChart": { - "description": "The result of creating a Google Sheets chart.", - "$ref": "CreateSheetsChartResponse" - }, - "createSlide": { - "description": "The result of creating a slide.", - "$ref": "CreateSlideResponse" + "duplicateObject": { + "$ref": "DuplicateObjectResponse", + "description": "The result of duplicating an object." }, "createShape": { - "description": "The result of creating a shape.", - "$ref": "CreateShapeResponse" + "$ref": "CreateShapeResponse", + "description": "The result of creating a shape." }, - "replaceAllShapesWithImage": { - "description": "The result of replacing all shapes containing the specified text with\nan image.", - "$ref": "ReplaceAllShapesWithImageResponse" - }, - "createVideo": { - "description": "The result of creating a video.", - "$ref": "CreateVideoResponse" + "createLine": { + "$ref": "CreateLineResponse", + "description": "The result of creating a line." }, "createImage": { - "description": "The result of creating an image.", - "$ref": "CreateImageResponse" + "$ref": "CreateImageResponse", + "description": "The result of creating an image." }, - "duplicateObject": { - "description": "The result of duplicating an object.", - "$ref": "DuplicateObjectResponse" + "createVideo": { + "$ref": "CreateVideoResponse", + "description": "The result of creating a video." + }, + "createSheetsChart": { + "$ref": "CreateSheetsChartResponse", + "description": "The result of creating a Google Sheets chart." + }, + "replaceAllShapesWithSheetsChart": { + "$ref": "ReplaceAllShapesWithSheetsChartResponse", + "description": "The result of replacing all shapes matching some criteria with a Google\nSheets chart." + }, + "replaceAllShapesWithImage": { + "$ref": "ReplaceAllShapesWithImageResponse", + "description": "The result of replacing all shapes matching some criteria with an\nimage." + }, + "createTable": { + "$ref": "CreateTableResponse", + "description": "The result of creating a table." + }, + "replaceAllText": { + "$ref": "ReplaceAllTextResponse", + "description": "The result of replacing text." + }, + "createSlide": { + "$ref": "CreateSlideResponse", + "description": "The result of creating a slide." } }, "id": "Response" }, - "LineProperties": { - "description": "The properties of the Line.\n\nWhen unset, these fields default to values that match the appearance of\nnew lines created in the Slides editor.", + "TextRun": { + "description": "A TextElement kind that represents a run of text that all has the same\nstyling.", "type": "object", "properties": { - "weight": { - "description": "The thickness of the line.", - "$ref": "Dimension" - }, - "endArrow": { - "description": "The style of the arrow at the end of the line.", - "enum": [ - "ARROW_STYLE_UNSPECIFIED", - "NONE", - "STEALTH_ARROW", - "FILL_ARROW", - "FILL_CIRCLE", - "FILL_SQUARE", - "FILL_DIAMOND", - "OPEN_ARROW", - "OPEN_CIRCLE", - "OPEN_SQUARE", - "OPEN_DIAMOND" - ], - "enumDescriptions": [ - "An unspecified arrow style.", - "No arrow.", - "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", - "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", - "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", - "Filled square.", - "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", - "Hollow arrow.", - "Hollow circle.", - "Hollow square.", - "Hollow diamond." - ], + "content": { + "description": "The text of this run.", "type": "string" }, - "link": { - "description": "The hyperlink destination of the line. If unset, there is no link.", - "$ref": "Link" - }, - "lineFill": { - "description": "The fill of the line. The default line fill matches the defaults for new\nlines created in the Slides editor.", - "$ref": "LineFill" - }, - "dashStyle": { - "description": "The dash style of the line.", - "enum": [ - "DASH_STYLE_UNSPECIFIED", - "SOLID", - "DOT", - "DASH", - "DASH_DOT", - "LONG_DASH", - "LONG_DASH_DOT" - ], + "style": { + "$ref": "TextStyle", + "description": "The styling applied to this run." + } + }, + "id": "TextRun" + }, + "LayoutReference": { + "type": "object", + "properties": { + "predefinedLayout": { + "type": "string", "enumDescriptions": [ - "Unspecified dash style.", - "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", - "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", - "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", - "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", - "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", - "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." + "Unspecified layout.", + "Blank layout, with no placeholders.", + "Layout with a caption at the bottom.", + "Layout with a title and a subtitle.", + "Layout with a title and body.", + "Layout with a title and two columns.", + "Layout with only a title.", + "Layout with a section title.", + "Layout with a title and subtitle on one side and description on the other.", + "Layout with one title and one body, arranged in a single column.", + "Layout with a main point.", + "Layout with a big number heading." ], - "type": "string" - }, - "startArrow": { - "description": "The style of the arrow at the beginning of the line.", "enum": [ - "ARROW_STYLE_UNSPECIFIED", - "NONE", - "STEALTH_ARROW", - "FILL_ARROW", - "FILL_CIRCLE", - "FILL_SQUARE", - "FILL_DIAMOND", - "OPEN_ARROW", - "OPEN_CIRCLE", - "OPEN_SQUARE", - "OPEN_DIAMOND" - ], - "enumDescriptions": [ - "An unspecified arrow style.", - "No arrow.", - "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", - "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", - "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", - "Filled square.", - "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", - "Hollow arrow.", - "Hollow circle.", - "Hollow square.", - "Hollow diamond." + "PREDEFINED_LAYOUT_UNSPECIFIED", + "BLANK", + "CAPTION_ONLY", + "TITLE", + "TITLE_AND_BODY", + "TITLE_AND_TWO_COLUMNS", + "TITLE_ONLY", + "SECTION_HEADER", + "SECTION_TITLE_AND_DESCRIPTION", + "ONE_COLUMN_TEXT", + "MAIN_POINT", + "BIG_NUMBER" ], + "description": "Predefined layout." + }, + "layoutId": { + "description": "Layout ID: the object ID of one of the layouts in the presentation.", "type": "string" } }, - "id": "LineProperties" + "id": "LayoutReference", + "description": "Slide layout reference. This may reference either:\n\n- A predefined layout\n- One of the layouts in the presentation." + }, + "SubstringMatchCriteria": { + "properties": { + "text": { + "description": "The text to search for in the shape or table.", + "type": "string" + }, + "matchCase": { + "description": "Indicates whether the search should respect case:\n\n- `True`: the search is case sensitive.\n- `False`: the search is case insensitive.", + "type": "boolean" + } + }, + "id": "SubstringMatchCriteria", + "description": "A criteria that matches a specific string of text in a shape or table.", + "type": "object" + }, + "TableRange": { + "description": "A table range represents a reference to a subset of a table.\n\nIt's important to note that the cells specified by a table range do not\nnecessarily form a rectangle. For example, let's say we have a 3 x 3 table\nwhere all the cells of the last row are merged together. The table looks\nlike this:\n\n \n [ ]\n\nA table range with location = (0, 0), row span = 3 and column span = 2\nspecifies the following cells:\n\n x x \n [ x ]", + "type": "object", + "properties": { + "location": { + "$ref": "TableCellLocation", + "description": "The starting location of the table range." + }, + "rowSpan": { + "description": "The row span of the table range.", + "format": "int32", + "type": "integer" + }, + "columnSpan": { + "type": "integer", + "description": "The column span of the table range.", + "format": "int32" + } + }, + "id": "TableRange" + }, + "CreateTableResponse": { + "description": "The result of creating a table.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created table.", + "type": "string" + } + }, + "id": "CreateTableResponse" + }, + "CreateTableRequest": { + "description": "Creates a new table.", + "type": "object", + "properties": { + "objectId": { + "type": "string", + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated." + }, + "columns": { + "type": "integer", + "description": "Number of columns in the table.", + "format": "int32" + }, + "elementProperties": { + "description": "The element properties for the table.\n\nThe table will be created at the provided size, subject to a minimum size.\nIf no size is provided, the table will be automatically sized.\n\nTable transforms must have a scale of 1 and no shear components. If no\ntransform is provided, the table will be centered on the page.", + "$ref": "PageElementProperties" + }, + "rows": { + "description": "Number of rows in the table.", + "format": "int32", + "type": "integer" + } + }, + "id": "CreateTableRequest" }, "Table": { "description": "A PageElement kind representing a\ntable.", "type": "object", "properties": { - "columns": { - "description": "Number of columns in the table.", - "type": "integer", - "format": "int32" + "rows": { + "description": "Number of rows in the table.", + "format": "int32", + "type": "integer" }, "tableColumns": { - "description": "Properties of each column.", "type": "array", "items": { "$ref": "TableColumnProperties" - } + }, + "description": "Properties of each column." }, - "rows": { - "description": "Number of rows in the table.", - "type": "integer", - "format": "int32" + "columns": { + "description": "Number of columns in the table.", + "format": "int32", + "type": "integer" }, "tableRows": { "description": "Properties and contents of each row.\n\nCells that span multiple rows are contained in only one of these rows and\nhave a row_span greater\nthan 1.", @@ -923,27 +1215,800 @@ }, "id": "Table" }, - "NestingLevel": { - "description": "Contains properties describing the look and feel of a list bullet at a given\nlevel of nesting.", + "PageBackgroundFill": { + "description": "The page background fill.", "type": "object", "properties": { - "bulletStyle": { - "description": "The style of a bullet at this level of nesting.", - "$ref": "TextStyle" + "propertyState": { + "enumDescriptions": [ + "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", + "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", + "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." + ], + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ], + "description": "The background fill property state.\n\nUpdating the the fill on a page will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a page, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", + "type": "string" + }, + "stretchedPictureFill": { + "$ref": "StretchedPictureFill", + "description": "Stretched picture fill." + }, + "solidFill": { + "$ref": "SolidFill", + "description": "Solid color fill." } }, - "id": "NestingLevel" + "id": "PageBackgroundFill" }, - "DuplicateObjectResponse": { - "description": "The response of duplicating an object.", + "SheetsChart": { + "description": "A PageElement kind representing\na linked chart embedded from Google Sheets.", "type": "object", "properties": { - "objectId": { - "description": "The ID of the new duplicate object.", + "spreadsheetId": { + "description": "The ID of the Google Sheets spreadsheet that contains the source chart.", + "type": "string" + }, + "chartId": { + "description": "The ID of the specific chart in the Google Sheets spreadsheet that is\nembedded.", + "format": "int32", + "type": "integer" + }, + "sheetsChartProperties": { + "$ref": "SheetsChartProperties", + "description": "The properties of the Sheets chart." + }, + "contentUrl": { + "description": "The URL of an image of the embedded chart, with a default lifetime of 30\nminutes. This URL is tagged with the account of the requester. Anyone with\nthe URL effectively accesses the image as the original requester. Access to\nthe image may be lost if the presentation's sharing settings change.", "type": "string" } }, - "id": "DuplicateObjectResponse" + "id": "SheetsChart" + }, + "SolidFill": { + "description": "A solid color fill. The page or page element is filled entirely with the\nspecified color value.\n\nIf any field is unset, its value may be inherited from a parent placeholder\nif it exists.", + "type": "object", + "properties": { + "alpha": { + "type": "number", + "description": "The fraction of this `color` that should be applied to the pixel.\nThat is, the final pixel color is defined by the equation:\n\n pixel color = alpha * (color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color.", + "format": "float" + }, + "color": { + "description": "The color value of the solid fill.", + "$ref": "OpaqueColor" + } + }, + "id": "SolidFill" + }, + "ThemeColorPair": { + "description": "A pair mapping a theme color type to the concrete color it represents.", + "type": "object", + "properties": { + "color": { + "$ref": "RgbColor", + "description": "The concrete color corresponding to the theme color type above." + }, + "type": { + "enumDescriptions": [ + "Unspecified theme color. This value should not be used.", + "Represents the first dark color.", + "Represents the first light color.", + "Represents the second dark color.", + "Represents the second light color.", + "Represents the first accent color.", + "Represents the second accent color.", + "Represents the third accent color.", + "Represents the fourth accent color.", + "Represents the fifth accent color.", + "Represents the sixth accent color.", + "Represents the color to use for hyperlinks.", + "Represents the color to use for visited hyperlinks.", + "Represents the first text color.", + "Represents the first background color.", + "Represents the second text color.", + "Represents the second background color." + ], + "enum": [ + "THEME_COLOR_TYPE_UNSPECIFIED", + "DARK1", + "LIGHT1", + "DARK2", + "LIGHT2", + "ACCENT1", + "ACCENT2", + "ACCENT3", + "ACCENT4", + "ACCENT5", + "ACCENT6", + "HYPERLINK", + "FOLLOWED_HYPERLINK", + "TEXT1", + "BACKGROUND1", + "TEXT2", + "BACKGROUND2" + ], + "description": "The type of the theme color.", + "type": "string" + } + }, + "id": "ThemeColorPair" + }, + "OptionalColor": { + "description": "A color that can either be fully opaque or fully transparent.", + "type": "object", + "properties": { + "opaqueColor": { + "$ref": "OpaqueColor", + "description": "If set, this will be used as an opaque color. If unset, this represents\na transparent color." + } + }, + "id": "OptionalColor" + }, + "PageElementProperties": { + "description": "Common properties for a page element.\n\nNote: When you initially create a\nPageElement, the API may modify\nthe values of both `size` and `transform`, but the\nvisual size will be unchanged.", + "type": "object", + "properties": { + "transform": { + "$ref": "AffineTransform", + "description": "The transform for the element." + }, + "pageObjectId": { + "description": "The object ID of the page where the element is located.", + "type": "string" + }, + "size": { + "$ref": "Size", + "description": "The size of the element." + } + }, + "id": "PageElementProperties" + }, + "SheetsChartProperties": { + "description": "The properties of the SheetsChart.", + "type": "object", + "properties": { + "chartImageProperties": { + "description": "The properties of the embedded chart image.", + "$ref": "ImageProperties" + } + }, + "id": "SheetsChartProperties" + }, + "StretchedPictureFill": { + "properties": { + "contentUrl": { + "description": "Reading the content_url:\n\nAn URL to a picture with a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the picture as the original requester. Access to the\npicture may be lost if the presentation's sharing settings change.\n\nWriting the content_url:\n\nThe picture is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Pictures must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.", + "type": "string" + }, + "size": { + "description": "The original size of the picture fill. This field is read-only.", + "$ref": "Size" + } + }, + "id": "StretchedPictureFill", + "description": "The stretched picture fill. The page or page element is filled entirely with\nthe specified picture. The picture is stretched to fit its container.", + "type": "object" + }, + "UpdateTextStyleRequest": { + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the shape or table with the text to be styled.", + "type": "string" + }, + "textRange": { + "$ref": "Range", + "description": "The range of text to style.\n\nThe range may be extended to include adjacent newlines.\n\nIf the range fully contains a paragraph belonging to a list, the\nparagraph's bullet is also updated with the matching text style." + }, + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The location of the cell in the table containing the text to style. If\n`object_id` refers to a table, `cell_location` must have a value.\nOtherwise, it must not." + }, + "style": { + "$ref": "TextStyle", + "description": "The style(s) to set on the text.\n\nIf the value for a particular style matches that of the parent, that style\nwill be set to inherit.\n\nCertain text style changes may cause other changes meant to mirror the\nbehavior of the Slides editor. See the documentation of\nTextStyle for more information." + }, + "fields": { + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the text style to bold, set `fields` to `\"bold\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "format": "google-fieldmask", + "type": "string" + } + }, + "id": "UpdateTextStyleRequest", + "description": "Update the styling of text in a Shape or\nTable." + }, + "DeleteTableColumnRequest": { + "id": "DeleteTableColumnRequest", + "description": "Deletes a column from a table.", + "type": "object", + "properties": { + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The reference table cell location from which a column will be deleted.\n\nThe column this cell spans will be deleted. If this is a merged cell,\nmultiple columns will be deleted. If no columns remain in the table after\nthis deletion, the whole table is deleted." + }, + "tableObjectId": { + "type": "string", + "description": "The table to delete columns from." + } + } + }, + "List": { + "description": "A List describes the look and feel of bullets belonging to paragraphs\nassociated with a list. A paragraph that is part of a list has an implicit\nreference to that list's ID.", + "type": "object", + "properties": { + "nestingLevel": { + "description": "A map of nesting levels to the properties of bullets at the associated\nlevel. A list has at most nine levels of nesting, so the possible values\nfor the keys of this map are 0 through 8, inclusive.", + "type": "object", + "additionalProperties": { + "$ref": "NestingLevel" + } + }, + "listId": { + "type": "string", + "description": "The ID of the list." + } + }, + "id": "List" + }, + "WeightedFontFamily": { + "type": "object", + "properties": { + "fontFamily": { + "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.", + "type": "string" + }, + "weight": { + "description": "The rendered weight of the text. This field can have any value that is a\nmultiple of `100` between `100` and `900`, inclusive. This range\ncorresponds to the numerical values described in the CSS 2.1\nSpecification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness),\nwith non-numerical values disallowed. Weights greater than or equal to\n`700` are considered bold, and weights less than `700`are not bold. The\ndefault value is `400` (\"normal\").", + "format": "int32", + "type": "integer" + } + }, + "id": "WeightedFontFamily", + "description": "Represents a font family and weight used to style a TextRun." + }, + "PageElement": { + "description": "A visual element rendered on a page.", + "type": "object", + "properties": { + "title": { + "description": "The title of the page element. Combined with description to display alt\ntext.", + "type": "string" + }, + "sheetsChart": { + "description": "A linked chart embedded from Google Sheets. Unlinked charts are\nrepresented as images.", + "$ref": "SheetsChart" + }, + "video": { + "description": "A video page element.", + "$ref": "Video" + }, + "wordArt": { + "$ref": "WordArt", + "description": "A word art page element." + }, + "table": { + "$ref": "Table", + "description": "A table page element." + }, + "objectId": { + "description": "The object ID for this page element. Object IDs used by\ngoogle.apps.slides.v1.Page and\ngoogle.apps.slides.v1.PageElement share the same namespace.", + "type": "string" + }, + "transform": { + "description": "The transform of the page element.", + "$ref": "AffineTransform" + }, + "shape": { + "$ref": "Shape", + "description": "A generic shape." + }, + "line": { + "description": "A line page element.", + "$ref": "Line" + }, + "description": { + "description": "The description of the page element. Combined with title to display alt\ntext.", + "type": "string" + }, + "elementGroup": { + "$ref": "Group", + "description": "A collection of page elements joined as a single unit." + }, + "image": { + "$ref": "Image", + "description": "An image page element." + }, + "size": { + "description": "The size of the page element.", + "$ref": "Size" + } + }, + "id": "PageElement" + }, + "CreateImageRequest": { + "description": "Creates an image.", + "type": "object", + "properties": { + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "elementProperties": { + "description": "The element properties for the image.\n\nWhen the aspect ratio of the provided size does not match the image aspect\nratio, the image is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation.", + "$ref": "PageElementProperties" + }, + "url": { + "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.", + "type": "string" + } + }, + "id": "CreateImageRequest" + }, + "CreateParagraphBulletsRequest": { + "description": "Creates bullets for all of the paragraphs that overlap with the given\ntext index range.\n\nThe nesting level of each paragraph will be determined by counting leading\ntabs in front of each paragraph. To avoid excess space between the bullet and\nthe corresponding paragraph, these leading tabs are removed by this request.\nThis may change the indices of parts of the text.\n\nIf the paragraph immediately before paragraphs being updated is in a list\nwith a matching preset, the paragraphs being updated are added to that\npreceding list.", + "type": "object", + "properties": { + "bulletPreset": { + "enum": [ + "BULLET_DISC_CIRCLE_SQUARE", + "BULLET_DIAMONDX_ARROW3D_SQUARE", + "BULLET_CHECKBOX", + "BULLET_ARROW_DIAMOND_DISC", + "BULLET_STAR_CIRCLE_SQUARE", + "BULLET_ARROW3D_CIRCLE_SQUARE", + "BULLET_LEFTTRIANGLE_DIAMOND_DISC", + "BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE", + "BULLET_DIAMOND_CIRCLE_SQUARE", + "NUMBERED_DIGIT_ALPHA_ROMAN", + "NUMBERED_DIGIT_ALPHA_ROMAN_PARENS", + "NUMBERED_DIGIT_NESTED", + "NUMBERED_UPPERALPHA_ALPHA_ROMAN", + "NUMBERED_UPPERROMAN_UPPERALPHA_DIGIT", + "NUMBERED_ZERODIGIT_ALPHA_ROMAN" + ], + "description": "The kinds of bullet glyphs to be used. Defaults to the\n`BULLET_DISC_CIRCLE_SQUARE` preset.", + "type": "string", + "enumDescriptions": [ + "A bulleted list with a `DISC`, `CIRCLE` and `SQUARE` bullet glyph for the\nfirst 3 list nesting levels.", + "A bulleted list with a `DIAMONDX`, `ARROW3D` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with `CHECKBOX` bullet glyphs for all list nesting levels.", + "A bulleted list with a `ARROW`, `DIAMOND` and `DISC` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with a `STAR`, `CIRCLE` and `DISC` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with a `ARROW3D`, `CIRCLE` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with a `LEFTTRIANGLE`, `DIAMOND` and `DISC` bullet glyph\nfor the first 3 list nesting levels.", + "A bulleted list with a `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` bullet\nglyph for the first 3 list nesting levels.", + "A bulleted list with a `DIAMOND`, `CIRCLE` and `SQUARE` bullet glyph\nfor the first 3 list nesting levels.", + "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", + "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by parenthesis.", + "A numbered list with `DIGIT` numeric glyphs separated by periods, where\neach nesting level uses the previous nesting level's glyph as a prefix.\nFor example: '1.', '1.1.', '2.', '2.2.'.", + "A numbered list with `UPPERALPHA`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", + "A numbered list with `UPPERROMAN`, `UPPERALPHA` and `DIGIT` numeric glyphs\nfor the first 3 list nesting levels, followed by periods.", + "A numbered list with `ZERODIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods." + ] + }, + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table." + }, + "objectId": { + "description": "The object ID of the shape or table containing the text to add bullets to.", + "type": "string" + }, + "textRange": { + "description": "The range of text to apply the bullet presets to, based on TextElement indexes.", + "$ref": "Range" + } + }, + "id": "CreateParagraphBulletsRequest" + }, + "TextStyle": { + "id": "TextStyle", + "description": "Represents the styling that can be applied to a TextRun.\n\nIf this text is contained in a shape with a parent placeholder, then these text styles may be\ninherited from the parent. Which text styles are inherited depend on the\nnesting level of lists:\n\n* A text run in a paragraph that is not in a list will inherit its text style\n from the the newline character in the paragraph at the 0 nesting level of\n the list inside the parent placeholder.\n* A text run in a paragraph that is in a list will inherit its text style\n from the newline character in the paragraph at its corresponding nesting\n level of the list inside the parent placeholder.\n\nInherited text styles are represented as unset fields in this message. If\ntext is contained in a shape without a parent placeholder, unsetting these\nfields will revert the style to a value matching the defaults in the Slides\neditor.", + "type": "object", + "properties": { + "italic": { + "description": "Whether or not the text is italicized.", + "type": "boolean" + }, + "strikethrough": { + "description": "Whether or not the text is struck through.", + "type": "boolean" + }, + "fontSize": { + "description": "The size of the text's font. When read, the `font_size` will specified in\npoints.", + "$ref": "Dimension" + }, + "baselineOffset": { + "type": "string", + "enumDescriptions": [ + "The text's baseline offset is inherited from the parent.", + "The text is not vertically offset.", + "The text is vertically offset upwards (superscript).", + "The text is vertically offset downwards (subscript)." + ], + "enum": [ + "BASELINE_OFFSET_UNSPECIFIED", + "NONE", + "SUPERSCRIPT", + "SUBSCRIPT" + ], + "description": "The text's vertical offset from its normal position.\n\nText with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically\nrendered in a smaller font size, computed based on the `font_size` field.\nThe `font_size` itself is not affected by changes in this field." + }, + "weightedFontFamily": { + "$ref": "WeightedFontFamily", + "description": "The font family and rendered weight of the text.\n\nThis field is an extension of `font_family` meant to support explicit font\nweights without breaking backwards compatibility. As such, when reading the\nstyle of a range of text, the value of `weighted_font_family#font_family`\nwill always be equal to that of `font_family`. However, when writing, if\nboth fields are included in the field mask (either explicitly or through\nthe wildcard `\"*\"`), their values are reconciled as follows:\n\n* If `font_family` is set and `weighted_font_family` is not, the value of\n `font_family` is applied with weight `400` (\"normal\").\n* If both fields are set, the value of `font_family` must match that of\n `weighted_font_family#font_family`. If so, the font family and weight of\n `weighted_font_family` is applied. Otherwise, a 400 bad request error is\n returned.\n* If `weighted_font_family` is set and `font_family` is not, the font\n family and weight of `weighted_font_family` is applied.\n* If neither field is set, the font family and weight of the text inherit\n from the parent. Note that these properties cannot inherit separately\n from each other.\n\nIf an update request specifies values for both `weighted_font_family` and\n`bold`, the `weighted_font_family` is applied first, then `bold`.\n\nIf `weighted_font_family#weight` is not set, it defaults to `400`.\n\nIf `weighted_font_family` is set, then `weighted_font_family#font_family`\nmust also be set with a non-empty value. Otherwise, a 400 bad request error\nis returned." + }, + "smallCaps": { + "description": "Whether or not the text is in small capital letters.", + "type": "boolean" + }, + "backgroundColor": { + "$ref": "OptionalColor", + "description": "The background color of the text. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set." + }, + "link": { + "$ref": "Link", + "description": "The hyperlink destination of the text. If unset, there is no link. Links\nare not inherited from parent text.\n\nChanging the link in an update request causes some other changes to the\ntext style of the range:\n\n* When setting a link, the text foreground color will be set to\n ThemeColorType.HYPERLINK and the text will\n be underlined. If these fields are modified in the same\n request, those values will be used instead of the link defaults.\n* Setting a link on a text range that overlaps with an existing link will\n also update the existing link to point to the new URL.\n* Links are not settable on newline characters. As a result, setting a link\n on a text range that crosses a paragraph boundary, such as `\"ABC\\n123\"`,\n will separate the newline character(s) into their own text runs. The\n link will be applied separately to the runs before and after the newline.\n* Removing a link will update the text style of the range to match the\n style of the preceding text (or the default text styles if the preceding\n text is another link) unless different styles are being set in the same\n request." + }, + "underline": { + "description": "Whether or not the text is underlined.", + "type": "boolean" + }, + "bold": { + "description": "Whether or not the text is rendered as bold.", + "type": "boolean" + }, + "foregroundColor": { + "description": "The color of the text itself. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set.", + "$ref": "OptionalColor" + }, + "fontFamily": { + "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.\n\nSome fonts can affect the weight of the text. If an update request\nspecifies values for both `font_family` and `bold`, the explicitly-set\n`bold` value is used.", + "type": "string" + } + } + }, + "Size": { + "description": "A width and height.", + "type": "object", + "properties": { + "height": { + "description": "The height of the object.", + "$ref": "Dimension" + }, + "width": { + "$ref": "Dimension", + "description": "The width of the object." + } + }, + "id": "Size" + }, + "UpdateVideoPropertiesRequest": { + "description": "Update the properties of a Video.", + "type": "object", + "properties": { + "fields": { + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `videoProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the video outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "format": "google-fieldmask", + "type": "string" + }, + "objectId": { + "description": "The object ID of the video the updates are applied to.", + "type": "string" + }, + "videoProperties": { + "$ref": "VideoProperties", + "description": "The video properties to update." + } + }, + "id": "UpdateVideoPropertiesRequest" + }, + "Request": { + "description": "A single kind of update to apply to a presentation.", + "type": "object", + "properties": { + "replaceAllShapesWithImage": { + "$ref": "ReplaceAllShapesWithImageRequest", + "description": "Replaces all shapes matching some criteria with an image." + }, + "replaceAllText": { + "description": "Replaces all instances of specified text.", + "$ref": "ReplaceAllTextRequest" + }, + "updateImageProperties": { + "$ref": "UpdateImagePropertiesRequest", + "description": "Updates the properties of an Image." + }, + "insertTableRows": { + "$ref": "InsertTableRowsRequest", + "description": "Inserts rows into a table." + }, + "createSlide": { + "$ref": "CreateSlideRequest", + "description": "Creates a new slide." + }, + "updateLineProperties": { + "$ref": "UpdateLinePropertiesRequest", + "description": "Updates the properties of a Line." + }, + "updateSlidesPosition": { + "$ref": "UpdateSlidesPositionRequest", + "description": "Updates the position of a set of slides in the presentation." + }, + "deleteTableRow": { + "description": "Deletes a row from a table.", + "$ref": "DeleteTableRowRequest" + }, + "updateShapeProperties": { + "$ref": "UpdateShapePropertiesRequest", + "description": "Updates the properties of a Shape." + }, + "insertText": { + "description": "Inserts text into a shape or table cell.", + "$ref": "InsertTextRequest" + }, + "deleteText": { + "$ref": "DeleteTextRequest", + "description": "Deletes text from a shape or a table cell." + }, + "updatePageProperties": { + "description": "Updates the properties of a Page.", + "$ref": "UpdatePagePropertiesRequest" + }, + "createShape": { + "$ref": "CreateShapeRequest", + "description": "Creates a new shape." + }, + "deleteParagraphBullets": { + "description": "Deletes bullets from paragraphs.", + "$ref": "DeleteParagraphBulletsRequest" + }, + "insertTableColumns": { + "$ref": "InsertTableColumnsRequest", + "description": "Inserts columns into a table." + }, + "refreshSheetsChart": { + "$ref": "RefreshSheetsChartRequest", + "description": "Refreshes a Google Sheets chart." + }, + "createTable": { + "$ref": "CreateTableRequest", + "description": "Creates a new table." + }, + "updateTableCellProperties": { + "$ref": "UpdateTableCellPropertiesRequest", + "description": "Updates the properties of a TableCell." + }, + "deleteObject": { + "$ref": "DeleteObjectRequest", + "description": "Deletes a page or page element from the presentation." + }, + "updateParagraphStyle": { + "description": "Updates the styling of paragraphs within a Shape or Table.", + "$ref": "UpdateParagraphStyleRequest" + }, + "duplicateObject": { + "description": "Duplicates a slide or page element.", + "$ref": "DuplicateObjectRequest" + }, + "deleteTableColumn": { + "$ref": "DeleteTableColumnRequest", + "description": "Deletes a column from a table." + }, + "updateVideoProperties": { + "$ref": "UpdateVideoPropertiesRequest", + "description": "Updates the properties of a Video." + }, + "createLine": { + "$ref": "CreateLineRequest", + "description": "Creates a line." + }, + "createImage": { + "description": "Creates an image.", + "$ref": "CreateImageRequest" + }, + "createParagraphBullets": { + "description": "Creates bullets for paragraphs.", + "$ref": "CreateParagraphBulletsRequest" + }, + "createVideo": { + "description": "Creates a video.", + "$ref": "CreateVideoRequest" + }, + "createSheetsChart": { + "$ref": "CreateSheetsChartRequest", + "description": "Creates an embedded Google Sheets chart." + }, + "replaceAllShapesWithSheetsChart": { + "description": "Replaces all shapes matching some criteria with a Google Sheets chart.", + "$ref": "ReplaceAllShapesWithSheetsChartRequest" + }, + "updatePageElementTransform": { + "$ref": "UpdatePageElementTransformRequest", + "description": "Updates the transform of a page element." + }, + "updateTextStyle": { + "$ref": "UpdateTextStyleRequest", + "description": "Updates the styling of text within a Shape or Table." + } + }, + "id": "Request" + }, + "UpdateImagePropertiesRequest": { + "id": "UpdateImagePropertiesRequest", + "description": "Update the properties of an Image.", + "type": "object", + "properties": { + "fields": { + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `imageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the image outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "format": "google-fieldmask", + "type": "string" + }, + "imageProperties": { + "description": "The image properties to update.", + "$ref": "ImageProperties" + }, + "objectId": { + "description": "The object ID of the image the updates are applied to.", + "type": "string" + } + } + }, + "ParagraphStyle": { + "description": "Styles that apply to a whole paragraph.\n\nIf this text is contained in a shape with a parent placeholder, then these paragraph styles may be\ninherited from the parent. Which paragraph styles are inherited depend on the\nnesting level of lists:\n\n* A paragraph not in a list will inherit its paragraph style from the\n paragraph at the 0 nesting level of the list inside the parent placeholder.\n* A paragraph in a list will inherit its paragraph style from the paragraph\n at its corresponding nesting level of the list inside the parent\n placeholder.\n\nInherited paragraph styles are represented as unset fields in this message.", + "type": "object", + "properties": { + "spaceAbove": { + "$ref": "Dimension", + "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent." + }, + "indentFirstLine": { + "description": "The amount of indentation for the start of the first line of the paragraph.\nIf unset, the value is inherited from the parent.", + "$ref": "Dimension" + }, + "lineSpacing": { + "description": "The amount of space between lines, as a percentage of normal, where normal\nis represented as 100.0. If unset, the value is inherited from the parent.", + "format": "float", + "type": "number" + }, + "alignment": { + "enumDescriptions": [ + "The paragraph alignment is inherited from the parent.", + "The paragraph is aligned to the start of the line. Left-aligned for\nLTR text, right-aligned otherwise.", + "The paragraph is centered.", + "The paragraph is aligned to the end of the line. Right-aligned for\nLTR text, left-aligned otherwise.", + "The paragraph is justified." + ], + "enum": [ + "ALIGNMENT_UNSPECIFIED", + "START", + "CENTER", + "END", + "JUSTIFIED" + ], + "description": "The text alignment for this paragraph.", + "type": "string" + }, + "spaceBelow": { + "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent.", + "$ref": "Dimension" + }, + "direction": { + "enum": [ + "TEXT_DIRECTION_UNSPECIFIED", + "LEFT_TO_RIGHT", + "RIGHT_TO_LEFT" + ], + "description": "The text direction of this paragraph. If unset, the value defaults to\nLEFT_TO_RIGHT since\ntext direction is not inherited.", + "type": "string", + "enumDescriptions": [ + "The text direction is inherited from the parent.", + "The text goes from left to right.", + "The text goes from right to left." + ] + }, + "indentEnd": { + "$ref": "Dimension", + "description": "The amount indentation for the paragraph on the side that corresponds to\nthe end of the text, based on the current text direction. If unset, the\nvalue is inherited from the parent." + }, + "spacingMode": { + "enum": [ + "SPACING_MODE_UNSPECIFIED", + "NEVER_COLLAPSE", + "COLLAPSE_LISTS" + ], + "description": "The spacing mode for the paragraph.", + "type": "string", + "enumDescriptions": [ + "The spacing mode is inherited from the parent.", + "Paragraph spacing is always rendered.", + "Paragraph spacing is skipped between list elements." + ] + }, + "indentStart": { + "$ref": "Dimension", + "description": "The amount indentation for the paragraph on the side that corresponds to\nthe start of the text, based on the current text direction. If unset, the\nvalue is inherited from the parent." + } + }, + "id": "ParagraphStyle" + }, + "ReplaceAllShapesWithSheetsChartResponse": { + "description": "The result of replacing shapes with a Google Sheets chart.", + "type": "object", + "properties": { + "occurrencesChanged": { + "description": "The number of shapes replaced with charts.", + "format": "int32", + "type": "integer" + } + }, + "id": "ReplaceAllShapesWithSheetsChartResponse" + }, + "TableCellProperties": { + "description": "The properties of the TableCell.", + "type": "object", + "properties": { + "tableCellBackgroundFill": { + "$ref": "TableCellBackgroundFill", + "description": "The background fill of the table cell. The default fill matches the fill\nfor newly created table cells in the Slides editor." + } + }, + "id": "TableCellProperties" + }, + "Outline": { + "properties": { + "weight": { + "description": "The thickness of the outline.", + "$ref": "Dimension" + }, + "dashStyle": { + "enum": [ + "DASH_STYLE_UNSPECIFIED", + "SOLID", + "DOT", + "DASH", + "DASH_DOT", + "LONG_DASH", + "LONG_DASH_DOT" + ], + "description": "The dash style of the outline.", + "type": "string", + "enumDescriptions": [ + "Unspecified dash style.", + "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", + "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", + "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", + "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", + "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", + "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." + ] + }, + "propertyState": { + "description": "The outline property state.\n\nUpdating the the outline on a page element will implicitly update this\nfield to`RENDERED`, unless another value is specified in the same request.\nTo have no outline on a page element, set this field to `NOT_RENDERED`. In\nthis case, any other outline fields set in the same request will be\nignored.", + "type": "string", + "enumDescriptions": [ + "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", + "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", + "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." + ], + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ] + }, + "outlineFill": { + "$ref": "OutlineFill", + "description": "The fill of the outline." + } + }, + "id": "Outline", + "description": "The outline of a PageElement.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", + "type": "object" }, "RefreshSheetsChartRequest": { "description": "Refreshes an embedded Google Sheets chart by replacing it with the latest\nversion of the chart from Google Sheets.\n\nNOTE: Refreshing charts requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes.", @@ -956,127 +2021,78 @@ }, "id": "RefreshSheetsChartRequest" }, - "TableCellLocation": { - "description": "A location of a single table cell within a table.", + "TableColumnProperties": { + "description": "Properties of each column in a table.", "type": "object", "properties": { - "rowIndex": { - "description": "The 0-based row index.", - "type": "integer", - "format": "int32" - }, - "columnIndex": { - "description": "The 0-based column index.", - "type": "integer", - "format": "int32" + "columnWidth": { + "description": "Width of a column.", + "$ref": "Dimension" } }, - "id": "TableCellLocation" + "id": "TableColumnProperties" }, - "TextContent": { - "description": "The general text content. The text must reside in a compatible shape (e.g.\ntext box or rectangle) or a table cell in a page.", + "ShapeProperties": { + "description": "The properties of a Shape.\n\nIf the shape is a placeholder shape as determined by the\nplaceholder field, then these\nproperties may be inherited from a parent placeholder shape.\nDetermining the rendered value of the property depends on the corresponding\nproperty_state field value.", "type": "object", "properties": { - "lists": { - "description": "The bulleted lists contained in this text, keyed by list ID.", - "additionalProperties": { - "$ref": "List" - }, - "type": "object" + "outline": { + "$ref": "Outline", + "description": "The outline of the shape. If unset, the outline is inherited from a\nparent placeholder if it exists. If the shape has no parent, then the\ndefault outline depends on the shape type, matching the defaults for\nnew shapes created in the Slides editor." }, - "textElements": { - "description": "The text contents broken down into its component parts, including styling\ninformation. This property is read-only.", + "shapeBackgroundFill": { + "$ref": "ShapeBackgroundFill", + "description": "The background fill of the shape. If unset, the background fill is\ninherited from a parent placeholder if it exists. If the shape has no\nparent, then the default background fill depends on the shape type,\nmatching the defaults for new shapes created in the Slides editor." + }, + "shadow": { + "$ref": "Shadow", + "description": "The shadow properties of the shape. If unset, the shadow is inherited from\na parent placeholder if it exists. If the shape has no parent, then the\ndefault shadow matches the defaults for new shapes created in the Slides\neditor. This property is read-only." + }, + "link": { + "description": "The hyperlink destination of the shape. If unset, there is no link. Links\nare not inherited from parent placeholders.", + "$ref": "Link" + } + }, + "id": "ShapeProperties" + }, + "NotesProperties": { + "properties": { + "speakerNotesObjectId": { + "description": "The object ID of the shape on this notes page that contains the speaker\nnotes for the corresponding slide.\nThe actual shape may not always exist on the notes page. Inserting text\nusing this object ID will automatically create the shape. In this case, the\nactual shape may have different object ID. The `GetPresentation` or\n`GetPage` action will always return the latest object ID.", + "type": "string" + } + }, + "id": "NotesProperties", + "description": "The properties of Page that are only\nrelevant for pages with page_type NOTES.", + "type": "object" + }, + "TableRow": { + "description": "Properties and contents of each row in a table.", + "type": "object", + "properties": { + "rowHeight": { + "$ref": "Dimension", + "description": "Height of a row." + }, + "tableCells": { + "description": "Properties and contents of each cell.\n\nCells that span multiple columns are represented only once with a\ncolumn_span greater\nthan 1. As a result, the length of this collection does not always match\nthe number of columns of the entire table.", "type": "array", "items": { - "$ref": "TextElement" + "$ref": "TableCell" } } }, - "id": "TextContent" - }, - "PageElement": { - "description": "A visual element rendered on a page.", - "type": "object", - "properties": { - "description": { - "description": "The description of the page element. Combined with title to display alt\ntext.", - "type": "string" - }, - "title": { - "description": "The title of the page element. Combined with description to display alt\ntext.", - "type": "string" - }, - "transform": { - "description": "The transform of the page element.", - "$ref": "AffineTransform" - }, - "video": { - "description": "A video page element.", - "$ref": "Video" - }, - "sheetsChart": { - "description": "A linked chart embedded from Google Sheets. Unlinked charts are\nrepresented as images.", - "$ref": "SheetsChart" - }, - "line": { - "description": "A line page element.", - "$ref": "Line" - }, - "table": { - "description": "A table page element.", - "$ref": "Table" - }, - "wordArt": { - "description": "A word art page element.", - "$ref": "WordArt" - }, - "shape": { - "description": "A generic shape.", - "$ref": "Shape" - }, - "elementGroup": { - "description": "A collection of page elements joined as a single unit.", - "$ref": "Group" - }, - "image": { - "description": "An image page element.", - "$ref": "Image" - }, - "objectId": { - "description": "The object ID for this page element. Object IDs used by\ngoogle.apps.slides.v1.Page and\ngoogle.apps.slides.v1.PageElement share the same namespace.", - "type": "string" - }, - "size": { - "description": "The size of the page element.", - "$ref": "Size" - } - }, - "id": "PageElement" - }, - "UpdatePagePropertiesRequest": { - "description": "Updates the properties of a Page.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the page the update is applied to.", - "type": "string" - }, - "fields": { - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `pageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the page background solid fill color, set `fields`\nto `\"pageBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string", - "format": "google-fieldmask" - }, - "pageProperties": { - "description": "The page properties to update.", - "$ref": "PageProperties" - } - }, - "id": "UpdatePagePropertiesRequest" + "id": "TableRow" }, "UpdateTableCellPropertiesRequest": { "description": "Update the properties of a TableCell.", "type": "object", "properties": { + "fields": { + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `tableCellProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the table cell background solid fill color, set\n`fields` to `\"tableCellBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "format": "google-fieldmask", + "type": "string" + }, "objectId": { "description": "The object ID of the table.", "type": "string" @@ -1085,18 +2101,40 @@ "description": "The table range representing the subset of the table to which the updates\nare applied. If a table range is not specified, the updates will apply to\nthe entire table.", "$ref": "TableRange" }, - "fields": { - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `tableCellProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the table cell background solid fill color, set\n`fields` to `\"tableCellBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string", - "format": "google-fieldmask" - }, "tableCellProperties": { - "description": "The table cell properties to update.", - "$ref": "TableCellProperties" + "$ref": "TableCellProperties", + "description": "The table cell properties to update." } }, "id": "UpdateTableCellPropertiesRequest" }, + "CreateSlideRequest": { + "description": "Creates a new slide.", + "type": "object", + "properties": { + "slideLayoutReference": { + "description": "Layout reference of the slide to be inserted, based on the *current\nmaster*, which is one of the following:\n\n- The master of the previous slide index.\n- The master of the first slide, if the insertion_index is zero.\n- The first master in the presentation, if there are no slides.\n\nIf the LayoutReference is not found in the current master, a 400 bad\nrequest error is returned.\n\nIf you don't specify a layout reference, then the new slide will use the\npredefined layout `BLANK`.", + "$ref": "LayoutReference" + }, + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "insertionIndex": { + "description": "The optional zero-based index indicating where to insert the slides.\n\nIf you don't specify an index, the new slide is created at the end.", + "format": "int32", + "type": "integer" + }, + "placeholderIdMappings": { + "description": "An optional list of object ID mappings from the placeholder(s) on the layout to the placeholder(s)\nthat will be created on the new slide from that specified layout. Can only\nbe used when `slide_layout_reference` is specified.", + "type": "array", + "items": { + "$ref": "LayoutPlaceholderIdMapping" + } + } + }, + "id": "CreateSlideRequest" + }, "BatchUpdatePresentationRequest": { "description": "Request message for PresentationsService.BatchUpdatePresentation.", "type": "object", @@ -1107,66 +2145,874 @@ "items": { "$ref": "Request" } + }, + "writeControl": { + "$ref": "WriteControl", + "description": "Provides control over how write requests are executed." } }, "id": "BatchUpdatePresentationRequest" }, - "Dimension": { - "description": "A magnitude in a single direction in the specified units.", - "type": "object", + "TextContent": { "properties": { - "unit": { - "description": "The units for magnitude.", - "enum": [ - "UNIT_UNSPECIFIED", - "EMU", - "PT" - ], - "enumDescriptions": [ - "The units are unknown.", - "An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter\nand thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", - "A point, 1/72 of an inch." - ], - "type": "string" + "lists": { + "additionalProperties": { + "$ref": "List" + }, + "description": "The bulleted lists contained in this text, keyed by list ID.", + "type": "object" }, - "magnitude": { - "description": "The magnitude.", - "type": "number", - "format": "double" + "textElements": { + "description": "The text contents broken down into its component parts, including styling\ninformation. This property is read-only.", + "type": "array", + "items": { + "$ref": "TextElement" + } } }, - "id": "Dimension" + "id": "TextContent", + "description": "The general text content. The text must reside in a compatible shape (e.g.\ntext box or rectangle) or a table cell in a page.", + "type": "object" + }, + "CreateSheetsChartResponse": { + "description": "The result of creating an embedded Google Sheets chart.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created chart.", + "type": "string" + } + }, + "id": "CreateSheetsChartResponse" + }, + "WriteControl": { + "description": "Provides control over how write requests are executed.", + "type": "object", + "properties": { + "requiredRevisionId": { + "description": "The revision ID of the presentation required for the write request. If\nspecified and the `required_revision_id` doesn't exactly match the\npresentation's current `revision_id`, the request will not be processed and\nwill return a 400 bad request error.", + "type": "string" + } + }, + "id": "WriteControl" + }, + "DeleteParagraphBulletsRequest": { + "description": "Deletes bullets from all of the paragraphs that overlap with the given text\nindex range.\n\nThe nesting level of each paragraph will be visually preserved by adding\nindent to the start of the corresponding paragraph.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the shape or table containing the text to delete bullets\nfrom.", + "type": "string" + }, + "textRange": { + "$ref": "Range", + "description": "The range of text to delete bullets from, based on TextElement indexes." + }, + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table." + } + }, + "id": "DeleteParagraphBulletsRequest" + }, + "ParagraphMarker": { + "description": "A TextElement kind that represents the beginning of a new paragraph.", + "type": "object", + "properties": { + "bullet": { + "$ref": "Bullet", + "description": "The bullet for this paragraph. If not present, the paragraph does not\nbelong to a list." + }, + "style": { + "description": "The paragraph's style", + "$ref": "ParagraphStyle" + } + }, + "id": "ParagraphMarker" + }, + "Thumbnail": { + "properties": { + "width": { + "description": "The positive width in pixels of the thumbnail image.", + "format": "int32", + "type": "integer" + }, + "height": { + "description": "The positive height in pixels of the thumbnail image.", + "format": "int32", + "type": "integer" + }, + "contentUrl": { + "description": "The content URL of the thumbnail image.\n\nThe URL to the image has a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the image as the original requester. Access to the\nimage may be lost if the presentation's sharing settings change.\nThe mime type of the thumbnail image is the same as specified in the\n`GetPageThumbnailRequest`.", + "type": "string" + } + }, + "id": "Thumbnail", + "description": "The thumbnail of a page.", + "type": "object" + }, + "InsertTableColumnsRequest": { + "description": "Inserts columns into a table.\n\nOther columns in the table will be resized to fit the new column.", + "type": "object", + "properties": { + "number": { + "description": "The number of columns to be inserted. Maximum 20 per request.", + "format": "int32", + "type": "integer" + }, + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The reference table cell location from which columns will be inserted.\n\nA new column will be inserted to the left (or right) of the column where\nthe reference cell is. If the reference cell is a merged cell, a new\ncolumn will be inserted to the left (or right) of the merged cell." + }, + "insertRight": { + "type": "boolean", + "description": "Whether to insert new columns to the right of the reference cell location.\n\n- `True`: insert to the right.\n- `False`: insert to the left." + }, + "tableObjectId": { + "description": "The table to insert columns into.", + "type": "string" + } + }, + "id": "InsertTableColumnsRequest" + }, + "LayoutPlaceholderIdMapping": { + "type": "object", + "properties": { + "objectId": { + "description": "A user-supplied object ID for the placeholder identified above that to be\ncreated onto a slide.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "layoutPlaceholder": { + "$ref": "Placeholder", + "description": "The placeholder on a layout that will be applied to a slide. Only type and index are needed. For example, a\npredefined `TITLE_AND_BODY` layout may usually have a TITLE placeholder\nwith index 0 and a BODY placeholder with index 0." + }, + "layoutPlaceholderObjectId": { + "description": "The object ID of the placeholder on a layout that will be applied\nto a slide.", + "type": "string" + } + }, + "id": "LayoutPlaceholderIdMapping", + "description": "The user-specified ID mapping for a placeholder that will be created on a\nslide from a specified layout." + }, + "UpdateShapePropertiesRequest": { + "description": "Update the properties of a Shape.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the shape the updates are applied to.", + "type": "string" + }, + "shapeProperties": { + "$ref": "ShapeProperties", + "description": "The shape properties to update." + }, + "fields": { + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `shapeProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the shape background solid fill color, set `fields`\nto `\"shapeBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "format": "google-fieldmask", + "type": "string" + } + }, + "id": "UpdateShapePropertiesRequest" + }, + "WordArt": { + "type": "object", + "properties": { + "renderedText": { + "description": "The text rendered as word art.", + "type": "string" + } + }, + "id": "WordArt", + "description": "A PageElement kind representing\nword art." + }, + "Recolor": { + "description": "A recolor effect applied on an image.", + "type": "object", + "properties": { + "recolorStops": { + "description": "The recolor effect is represented by a gradient, which is a list of color\nstops.\n\nThe colors in the gradient will replace the corresponding colors at\nthe same position in the color palette and apply to the image. This\nproperty is read-only.", + "type": "array", + "items": { + "$ref": "ColorStop" + } + }, + "name": { + "enum": [ + "NONE", + "LIGHT1", + "LIGHT2", + "LIGHT3", + "LIGHT4", + "LIGHT5", + "LIGHT6", + "LIGHT7", + "LIGHT8", + "LIGHT9", + "LIGHT10", + "DARK1", + "DARK2", + "DARK3", + "DARK4", + "DARK5", + "DARK6", + "DARK7", + "DARK8", + "DARK9", + "DARK10", + "GRAYSCALE", + "NEGATIVE", + "SEPIA", + "CUSTOM" + ], + "description": "The name of the recolor effect.\n\nThe name is determined from the `recolor_stops` by matching the gradient\nagainst the colors in the page's current color scheme. This property is\nread-only.", + "type": "string", + "enumDescriptions": [ + "No recolor effect. The default value.", + "A recolor effect that lightens the image using the page's first available\ncolor from its color scheme.", + "A recolor effect that lightens the image using the page's second\navailable color from its color scheme.", + "A recolor effect that lightens the image using the page's third available\ncolor from its color scheme.", + "A recolor effect that lightens the image using the page's forth available\ncolor from its color scheme.", + "A recolor effect that lightens the image using the page's fifth available\ncolor from its color scheme.", + "A recolor effect that lightens the image using the page's sixth available\ncolor from its color scheme.", + "A recolor effect that lightens the image using the page's seventh\navailable color from its color scheme.e.", + "A recolor effect that lightens the image using the page's eighth\navailable color from its color scheme.", + "A recolor effect that lightens the image using the page's ninth available\ncolor from its color scheme.", + "A recolor effect that lightens the image using the page's tenth available\ncolor from its color scheme.", + "A recolor effect that darkens the image using the page's first available\ncolor from its color scheme.", + "A recolor effect that darkens the image using the page's second available\ncolor from its color scheme.", + "A recolor effect that darkens the image using the page's third available\ncolor from its color scheme.", + "A recolor effect that darkens the image using the page's fourth available\ncolor from its color scheme.", + "A recolor effect that darkens the image using the page's fifth available\ncolor from its color scheme.", + "A recolor effect that darkens the image using the page's sixth available\ncolor from its color scheme.", + "A recolor effect that darkens the image using the page's seventh\navailable color from its color scheme.", + "A recolor effect that darkens the image using the page's eighth available\ncolor from its color scheme.", + "A recolor effect that darkens the image using the page's ninth available\ncolor from its color scheme.", + "A recolor effect that darkens the image using the page's tenth available\ncolor from its color scheme.", + "A recolor effect that recolors the image to grayscale.", + "A recolor effect that recolors the image to negative grayscale.", + "A recolor effect that recolors the image using the sepia color.", + "Custom recolor effect. Refer to `recolor_stops` for the concrete\ngradient." + ] + } + }, + "id": "Recolor" + }, + "Link": { + "properties": { + "url": { + "description": "If set, indicates this is a link to the external web page at this URL.", + "type": "string" + }, + "relativeLink": { + "enum": [ + "RELATIVE_SLIDE_LINK_UNSPECIFIED", + "NEXT_SLIDE", + "PREVIOUS_SLIDE", + "FIRST_SLIDE", + "LAST_SLIDE" + ], + "description": "If set, indicates this is a link to a slide in this presentation,\naddressed by its position.", + "type": "string", + "enumDescriptions": [ + "An unspecified relative slide link.", + "A link to the next slide.", + "A link to the previous slide.", + "A link to the first slide in the presentation.", + "A link to the last slide in the presentation." + ] + }, + "slideIndex": { + "description": "If set, indicates this is a link to the slide at this zero-based index\nin the presentation. There may not be a slide at this index.", + "format": "int32", + "type": "integer" + }, + "pageObjectId": { + "description": "If set, indicates this is a link to the specific page in this\npresentation with this ID. A page with this ID may not exist.", + "type": "string" + } + }, + "id": "Link", + "description": "A hypertext link.", + "type": "object" + }, + "CreateShapeResponse": { + "description": "The result of creating a shape.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created shape.", + "type": "string" + } + }, + "id": "CreateShapeResponse" + }, + "RgbColor": { + "id": "RgbColor", + "description": "An RGB color.", + "type": "object", + "properties": { + "red": { + "description": "The red component of the color, from 0.0 to 1.0.", + "format": "float", + "type": "number" + }, + "green": { + "description": "The green component of the color, from 0.0 to 1.0.", + "format": "float", + "type": "number" + }, + "blue": { + "description": "The blue component of the color, from 0.0 to 1.0.", + "format": "float", + "type": "number" + } + } + }, + "CreateLineRequest": { + "description": "Creates a line.", + "type": "object", + "properties": { + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "elementProperties": { + "$ref": "PageElementProperties", + "description": "The element properties for the line." + }, + "lineCategory": { + "type": "string", + "enumDescriptions": [ + "Straight connectors, including straight connector 1. The is the default\ncategory when one is not specified.", + "Bent connectors, including bent connector 2 to 5.", + "Curved connectors, including curved connector 2 to 5." + ], + "enum": [ + "STRAIGHT", + "BENT", + "CURVED" + ], + "description": "The category of line to be created." + } + }, + "id": "CreateLineRequest" + }, + "CreateSlideResponse": { + "description": "The result of creating a slide.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created slide.", + "type": "string" + } + }, + "id": "CreateSlideResponse" + }, + "CreateShapeRequest": { + "type": "object", + "properties": { + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", + "type": "string" + }, + "shapeType": { + "enumDescriptions": [ + "The shape type that is not predefined.", + "Text box shape.", + "Rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'rect'.", + "Round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'roundRect'", + "Ellipse shape. Corresponds to ECMA-376 ST_ShapeType 'ellipse'", + "Curved arc shape. Corresponds to ECMA-376 ST_ShapeType 'arc'", + "Bent arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentArrow'", + "Bent up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentUpArrow'", + "Bevel shape. Corresponds to ECMA-376 ST_ShapeType 'bevel'", + "Block arc shape. Corresponds to ECMA-376 ST_ShapeType 'blockArc'", + "Brace pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracePair'", + "Bracket pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracketPair'", + "Can shape. Corresponds to ECMA-376 ST_ShapeType 'can'", + "Chevron shape. Corresponds to ECMA-376 ST_ShapeType 'chevron'", + "Chord shape. Corresponds to ECMA-376 ST_ShapeType 'chord'", + "Cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloud'", + "Corner shape. Corresponds to ECMA-376 ST_ShapeType 'corner'", + "Cube shape. Corresponds to ECMA-376 ST_ShapeType 'cube'", + "Curved down arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedDownArrow'", + "Curved left arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedLeftArrow'", + "Curved right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedRightArrow'", + "Curved up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedUpArrow'", + "Decagon shape. Corresponds to ECMA-376 ST_ShapeType 'decagon'", + "Diagonal stripe shape. Corresponds to ECMA-376 ST_ShapeType 'diagStripe'", + "Diamond shape. Corresponds to ECMA-376 ST_ShapeType 'diamond'", + "Dodecagon shape. Corresponds to ECMA-376 ST_ShapeType 'dodecagon'", + "Donut shape. Corresponds to ECMA-376 ST_ShapeType 'donut'", + "Double wave shape. Corresponds to ECMA-376 ST_ShapeType 'doubleWave'", + "Down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'downArrow'", + "Callout down arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'downArrowCallout'", + "Folded corner shape. Corresponds to ECMA-376 ST_ShapeType 'foldedCorner'", + "Frame shape. Corresponds to ECMA-376 ST_ShapeType 'frame'", + "Half frame shape. Corresponds to ECMA-376 ST_ShapeType 'halfFrame'", + "Heart shape. Corresponds to ECMA-376 ST_ShapeType 'heart'", + "Heptagon shape. Corresponds to ECMA-376 ST_ShapeType 'heptagon'", + "Hexagon shape. Corresponds to ECMA-376 ST_ShapeType 'hexagon'", + "Home plate shape. Corresponds to ECMA-376 ST_ShapeType 'homePlate'", + "Horizontal scroll shape. Corresponds to ECMA-376 ST_ShapeType\n'horizontalScroll'", + "Irregular seal 1 shape. Corresponds to ECMA-376 ST_ShapeType\n'irregularSeal1'", + "Irregular seal 2 shape. Corresponds to ECMA-376 ST_ShapeType\n'irregularSeal2'", + "Left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftArrow'", + "Callout left arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftArrowCallout'", + "Left brace shape. Corresponds to ECMA-376 ST_ShapeType 'leftBrace'", + "Left bracket shape. Corresponds to ECMA-376 ST_ShapeType 'leftBracket'", + "Left right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightArrow'", + "Callout left right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightArrowCallout'", + "Left right up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightUpArrow'", + "Left up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftUpArrow'", + "Lightning bolt shape. Corresponds to ECMA-376 ST_ShapeType\n'lightningBolt'", + "Divide math shape. Corresponds to ECMA-376 ST_ShapeType 'mathDivide'", + "Equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathEqual'", + "Minus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMinus'", + "Multiply math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMultiply'", + "Not equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathNotEqual'", + "Plus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathPlus'", + "Moon shape. Corresponds to ECMA-376 ST_ShapeType 'moon'", + "No smoking shape. Corresponds to ECMA-376 ST_ShapeType 'noSmoking'", + "Notched right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'notchedRightArrow'", + "Octagon shape. Corresponds to ECMA-376 ST_ShapeType 'octagon'", + "Parallelogram shape. Corresponds to ECMA-376 ST_ShapeType 'parallelogram'", + "Pentagon shape. Corresponds to ECMA-376 ST_ShapeType 'pentagon'", + "Pie shape. Corresponds to ECMA-376 ST_ShapeType 'pie'", + "Plaque shape. Corresponds to ECMA-376 ST_ShapeType 'plaque'", + "Plus shape. Corresponds to ECMA-376 ST_ShapeType 'plus'", + "Quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType 'quadArrow'", + "Callout quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'quadArrowCallout'", + "Ribbon shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon'", + "Ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon2'", + "Right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'rightArrow'", + "Callout right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'rightArrowCallout'", + "Right brace shape. Corresponds to ECMA-376 ST_ShapeType 'rightBrace'", + "Right bracket shape. Corresponds to ECMA-376 ST_ShapeType 'rightBracket'", + "One round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'round1Rect'", + "Two diagonal round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'round2DiagRect'", + "Two same-side round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'round2SameRect'", + "Right triangle shape. Corresponds to ECMA-376 ST_ShapeType 'rtTriangle'", + "Smiley face shape. Corresponds to ECMA-376 ST_ShapeType 'smileyFace'", + "One snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'snip1Rect'", + "Two diagonal snip corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snip2DiagRect'", + "Two same-side snip corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snip2SameRect'", + "One snip one round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snipRoundRect'", + "Ten pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star10'", + "Twelve pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star12'", + "Sixteen pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star16'", + "Twenty four pointed star shape. Corresponds to ECMA-376 ST_ShapeType\n'star24'", + "Thirty two pointed star shape. Corresponds to ECMA-376 ST_ShapeType\n'star32'", + "Four pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star4'", + "Five pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star5'", + "Six pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star6'", + "Seven pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star7'", + "Eight pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star8'", + "Striped right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'stripedRightArrow'", + "Sun shape. Corresponds to ECMA-376 ST_ShapeType 'sun'", + "Trapezoid shape. Corresponds to ECMA-376 ST_ShapeType 'trapezoid'", + "Triangle shape. Corresponds to ECMA-376 ST_ShapeType 'triangle'", + "Up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upArrow'", + "Callout up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'upArrowCallout'", + "Up down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upDownArrow'", + "U-turn arrow shape. Corresponds to ECMA-376 ST_ShapeType 'uturnArrow'", + "Vertical scroll shape. Corresponds to ECMA-376 ST_ShapeType\n'verticalScroll'", + "Wave shape. Corresponds to ECMA-376 ST_ShapeType 'wave'", + "Callout wedge ellipse shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeEllipseCallout'", + "Callout wedge rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeRectCallout'", + "Callout wedge round rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeRoundRectCallout'", + "Alternate process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartAlternateProcess'", + "Collate flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartCollate'", + "Connector flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartConnector'", + "Decision flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDecision'", + "Delay flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDelay'", + "Display flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDisplay'", + "Document flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDocument'", + "Extract flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartExtract'", + "Input output flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartInputOutput'", + "Internal storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartInternalStorage'", + "Magnetic disk flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticDisk'", + "Magnetic drum flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticDrum'", + "Magnetic tape flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticTape'", + "Manual input flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartManualInput'", + "Manual operation flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartManualOperation'", + "Merge flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMerge'", + "Multi-document flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMultidocument'", + "Offline storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOfflineStorage'", + "Off-page connector flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOffpageConnector'", + "Online storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOnlineStorage'", + "Or flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOr'", + "Predefined process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPredefinedProcess'", + "Preparation flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPreparation'", + "Process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartProcess'", + "Punched card flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPunchedCard'", + "Punched tape flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPunchedTape'", + "Sort flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartSort'", + "Summing junction flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartSummingJunction'", + "Terminator flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartTerminator'", + "East arrow shape.", + "Northeast arrow shape.", + "North arrow shape.", + "Speech shape.", + "Star burst shape.", + "Teardrop shape. Corresponds to ECMA-376 ST_ShapeType 'teardrop'", + "Ellipse ribbon shape. Corresponds to ECMA-376 ST_ShapeType\n'ellipseRibbon'", + "Ellipse ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType\n'ellipseRibbon2'", + "Callout cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloudCallout'", + "Custom shape." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "TEXT_BOX", + "RECTANGLE", + "ROUND_RECTANGLE", + "ELLIPSE", + "ARC", + "BENT_ARROW", + "BENT_UP_ARROW", + "BEVEL", + "BLOCK_ARC", + "BRACE_PAIR", + "BRACKET_PAIR", + "CAN", + "CHEVRON", + "CHORD", + "CLOUD", + "CORNER", + "CUBE", + "CURVED_DOWN_ARROW", + "CURVED_LEFT_ARROW", + "CURVED_RIGHT_ARROW", + "CURVED_UP_ARROW", + "DECAGON", + "DIAGONAL_STRIPE", + "DIAMOND", + "DODECAGON", + "DONUT", + "DOUBLE_WAVE", + "DOWN_ARROW", + "DOWN_ARROW_CALLOUT", + "FOLDED_CORNER", + "FRAME", + "HALF_FRAME", + "HEART", + "HEPTAGON", + "HEXAGON", + "HOME_PLATE", + "HORIZONTAL_SCROLL", + "IRREGULAR_SEAL_1", + "IRREGULAR_SEAL_2", + "LEFT_ARROW", + "LEFT_ARROW_CALLOUT", + "LEFT_BRACE", + "LEFT_BRACKET", + "LEFT_RIGHT_ARROW", + "LEFT_RIGHT_ARROW_CALLOUT", + "LEFT_RIGHT_UP_ARROW", + "LEFT_UP_ARROW", + "LIGHTNING_BOLT", + "MATH_DIVIDE", + "MATH_EQUAL", + "MATH_MINUS", + "MATH_MULTIPLY", + "MATH_NOT_EQUAL", + "MATH_PLUS", + "MOON", + "NO_SMOKING", + "NOTCHED_RIGHT_ARROW", + "OCTAGON", + "PARALLELOGRAM", + "PENTAGON", + "PIE", + "PLAQUE", + "PLUS", + "QUAD_ARROW", + "QUAD_ARROW_CALLOUT", + "RIBBON", + "RIBBON_2", + "RIGHT_ARROW", + "RIGHT_ARROW_CALLOUT", + "RIGHT_BRACE", + "RIGHT_BRACKET", + "ROUND_1_RECTANGLE", + "ROUND_2_DIAGONAL_RECTANGLE", + "ROUND_2_SAME_RECTANGLE", + "RIGHT_TRIANGLE", + "SMILEY_FACE", + "SNIP_1_RECTANGLE", + "SNIP_2_DIAGONAL_RECTANGLE", + "SNIP_2_SAME_RECTANGLE", + "SNIP_ROUND_RECTANGLE", + "STAR_10", + "STAR_12", + "STAR_16", + "STAR_24", + "STAR_32", + "STAR_4", + "STAR_5", + "STAR_6", + "STAR_7", + "STAR_8", + "STRIPED_RIGHT_ARROW", + "SUN", + "TRAPEZOID", + "TRIANGLE", + "UP_ARROW", + "UP_ARROW_CALLOUT", + "UP_DOWN_ARROW", + "UTURN_ARROW", + "VERTICAL_SCROLL", + "WAVE", + "WEDGE_ELLIPSE_CALLOUT", + "WEDGE_RECTANGLE_CALLOUT", + "WEDGE_ROUND_RECTANGLE_CALLOUT", + "FLOW_CHART_ALTERNATE_PROCESS", + "FLOW_CHART_COLLATE", + "FLOW_CHART_CONNECTOR", + "FLOW_CHART_DECISION", + "FLOW_CHART_DELAY", + "FLOW_CHART_DISPLAY", + "FLOW_CHART_DOCUMENT", + "FLOW_CHART_EXTRACT", + "FLOW_CHART_INPUT_OUTPUT", + "FLOW_CHART_INTERNAL_STORAGE", + "FLOW_CHART_MAGNETIC_DISK", + "FLOW_CHART_MAGNETIC_DRUM", + "FLOW_CHART_MAGNETIC_TAPE", + "FLOW_CHART_MANUAL_INPUT", + "FLOW_CHART_MANUAL_OPERATION", + "FLOW_CHART_MERGE", + "FLOW_CHART_MULTIDOCUMENT", + "FLOW_CHART_OFFLINE_STORAGE", + "FLOW_CHART_OFFPAGE_CONNECTOR", + "FLOW_CHART_ONLINE_STORAGE", + "FLOW_CHART_OR", + "FLOW_CHART_PREDEFINED_PROCESS", + "FLOW_CHART_PREPARATION", + "FLOW_CHART_PROCESS", + "FLOW_CHART_PUNCHED_CARD", + "FLOW_CHART_PUNCHED_TAPE", + "FLOW_CHART_SORT", + "FLOW_CHART_SUMMING_JUNCTION", + "FLOW_CHART_TERMINATOR", + "ARROW_EAST", + "ARROW_NORTH_EAST", + "ARROW_NORTH", + "SPEECH", + "STARBURST", + "TEARDROP", + "ELLIPSE_RIBBON", + "ELLIPSE_RIBBON_2", + "CLOUD_CALLOUT", + "CUSTOM" + ], + "description": "The shape type.", + "type": "string" + }, + "elementProperties": { + "description": "The element properties for the shape.", + "$ref": "PageElementProperties" + } + }, + "id": "CreateShapeRequest", + "description": "Creates a new shape." + }, + "Video": { + "properties": { + "url": { + "description": "An URL to a video. The URL is valid as long as the source video\nexists and sharing settings do not change.", + "type": "string" + }, + "id": { + "description": "The video source's unique identifier for this video.", + "type": "string" + }, + "videoProperties": { + "$ref": "VideoProperties", + "description": "The properties of the video." + }, + "source": { + "enumDescriptions": [ + "The video source is unspecified.", + "The video source is YouTube." + ], + "enum": [ + "SOURCE_UNSPECIFIED", + "YOUTUBE" + ], + "description": "The video source.", + "type": "string" + } + }, + "id": "Video", + "description": "A PageElement kind representing a\nvideo.", + "type": "object" + }, + "PageProperties": { + "description": "The properties of the Page.\n\nThe page will inherit properties from the parent page. Depending on the page\ntype the hierarchy is defined in either\nSlideProperties or\nLayoutProperties.", + "type": "object", + "properties": { + "colorScheme": { + "$ref": "ColorScheme", + "description": "The color scheme of the page. If unset, the color scheme is inherited from\na parent page. If the page has no parent, the color scheme uses a default\nSlides color scheme. This field is read-only." + }, + "pageBackgroundFill": { + "description": "The background fill of the page. If unset, the background fill is inherited\nfrom a parent page if it exists. If the page has no parent, then the\nbackground fill defaults to the corresponding fill in the Slides editor.", + "$ref": "PageBackgroundFill" + } + }, + "id": "PageProperties" + }, + "NestingLevel": { + "id": "NestingLevel", + "description": "Contains properties describing the look and feel of a list bullet at a given\nlevel of nesting.", + "type": "object", + "properties": { + "bulletStyle": { + "$ref": "TextStyle", + "description": "The style of a bullet at this level of nesting." + } + } + }, + "TableCell": { + "type": "object", + "properties": { + "location": { + "$ref": "TableCellLocation", + "description": "The location of the cell within the table." + }, + "rowSpan": { + "type": "integer", + "description": "Row span of the cell.", + "format": "int32" + }, + "columnSpan": { + "description": "Column span of the cell.", + "format": "int32", + "type": "integer" + }, + "text": { + "description": "The text content of the cell.", + "$ref": "TextContent" + }, + "tableCellProperties": { + "$ref": "TableCellProperties", + "description": "The properties of the table cell." + } + }, + "id": "TableCell", + "description": "Properties and contents of each table cell." + }, + "UpdateLinePropertiesRequest": { + "properties": { + "lineProperties": { + "description": "The line properties to update.", + "$ref": "LineProperties" + }, + "fields": { + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `lineProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the line solid fill color, set `fields` to\n`\"lineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "format": "google-fieldmask", + "type": "string" + }, + "objectId": { + "description": "The object ID of the line the update is applied to.", + "type": "string" + } + }, + "id": "UpdateLinePropertiesRequest", + "description": "Updates the properties of a Line.", + "type": "object" + }, + "UpdateSlidesPositionRequest": { + "properties": { + "insertionIndex": { + "description": "The index where the slides should be inserted, based on the slide\narrangement before the move takes place. Must be between zero and the\nnumber of slides in the presentation, inclusive.", + "format": "int32", + "type": "integer" + }, + "slideObjectIds": { + "description": "The IDs of the slides in the presentation that should be moved.\nThe slides in this list must be in existing presentation order, without\nduplicates.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "UpdateSlidesPositionRequest", + "description": "Updates the position of slides in the presentation.", + "type": "object" + }, + "TableCellBackgroundFill": { + "type": "object", + "properties": { + "solidFill": { + "description": "Solid color fill.", + "$ref": "SolidFill" + }, + "propertyState": { + "enumDescriptions": [ + "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", + "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", + "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." + ], + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ], + "description": "The background fill property state.\n\nUpdating the the fill on a table cell will implicitly update this field\nto `RENDERED`, unless another value is specified in the same request. To\nhave no fill on a table cell, set this field to `NOT_RENDERED`. In this\ncase, any other fill fields set in the same request will be ignored.", + "type": "string" + } + }, + "id": "TableCellBackgroundFill", + "description": "The table cell background fill." + }, + "UpdatePagePropertiesRequest": { + "properties": { + "fields": { + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `pageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the page background solid fill color, set `fields`\nto `\"pageBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "format": "google-fieldmask", + "type": "string" + }, + "objectId": { + "description": "The object ID of the page the update is applied to.", + "type": "string" + }, + "pageProperties": { + "$ref": "PageProperties", + "description": "The page properties to update." + } + }, + "id": "UpdatePagePropertiesRequest", + "description": "Updates the properties of a Page.", + "type": "object" + }, + "Group": { + "description": "A PageElement kind representing a\njoined collection of PageElements.", + "type": "object", + "properties": { + "children": { + "description": "The collection of elements in the group. The minimum size of a group is 2.", + "type": "array", + "items": { + "$ref": "PageElement" + } + } + }, + "id": "Group" }, "Placeholder": { "description": "The placeholder information that uniquely identifies a placeholder shape.", "type": "object", "properties": { "index": { - "description": "The index of the placeholder. If the same placeholder types are the present\nin the same page, they would have different index values.", - "type": "integer", - "format": "int32" + "description": "The index of the placeholder. If the same placeholder types are present in\nthe same page, they would have different index values.", + "format": "int32", + "type": "integer" }, "type": { "description": "The type of the placeholder.", - "enum": [ - "NONE", - "BODY", - "CHART", - "CLIP_ART", - "CENTERED_TITLE", - "DIAGRAM", - "DATE_AND_TIME", - "FOOTER", - "HEADER", - "MEDIA", - "OBJECT", - "PICTURE", - "SLIDE_NUMBER", - "SUBTITLE", - "TABLE", - "TITLE", - "SLIDE_IMAGE" - ], + "type": "string", "enumDescriptions": [ "Default value, signifies it is not a placeholder.", "Body text.", @@ -1186,7 +3032,25 @@ "Slide title.", "Slide image." ], - "type": "string" + "enum": [ + "NONE", + "BODY", + "CHART", + "CLIP_ART", + "CENTERED_TITLE", + "DIAGRAM", + "DATE_AND_TIME", + "FOOTER", + "HEADER", + "MEDIA", + "OBJECT", + "PICTURE", + "SLIDE_NUMBER", + "SUBTITLE", + "TABLE", + "TITLE", + "SLIDE_IMAGE" + ] }, "parentObjectId": { "description": "The object ID of this shape's parent placeholder.\nIf unset, the parent placeholder shape does not exist, so the shape does\nnot inherit properties from any other shape.", @@ -1195,1315 +3059,237 @@ }, "id": "Placeholder" }, - "CreateSheetsChartRequest": { - "description": "Creates an embedded Google Sheets chart.\n\nNOTE: Chart creation requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes.", + "DuplicateObjectRequest": { "type": "object", "properties": { - "chartId": { - "description": "The ID of the specific chart in the Google Sheets spreadsheet.", - "type": "integer", - "format": "int32" + "objectIds": { + "description": "The object being duplicated may contain other objects, for example when\nduplicating a slide or a group page element. This map defines how the IDs\nof duplicated objects are generated: the keys are the IDs of the original\nobjects and its values are the IDs that will be assigned to the\ncorresponding duplicate object. The ID of the source object's duplicate\nmay be specified in this map as well, using the same value of the\n`object_id` field as a key and the newly desired ID as the value.\n\nAll keys must correspond to existing IDs in the presentation. All values\nmust be unique in the presentation and must start with an alphanumeric\ncharacter or an underscore (matches regex `[a-zA-Z0-9_]`); remaining\ncharacters may include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`). The length of the new ID must not be less than 5 or\ngreater than 50.\n\nIf any IDs of source objects are omitted from the map, a new random ID will\nbe assigned. If the map is empty or unset, all duplicate objects will\nreceive a new random ID.", + "type": "object", + "additionalProperties": { + "type": "string" + } }, "objectId": { - "description": "A user-supplied object ID.\n\nIf specified, the ID must be unique among all pages and page elements in\nthe presentation. The ID should start with a word character [a-zA-Z0-9_]\nand then followed by any number of the following characters [a-zA-Z0-9_-:].\nThe length of the ID should not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", + "type": "string", + "description": "The ID of the object to duplicate." + } + }, + "id": "DuplicateObjectRequest", + "description": "Duplicates a slide or page element.\n\nWhen duplicating a slide, the duplicate slide will be created immediately\nfollowing the specified slide. When duplicating a page element, the duplicate\nwill be placed on the same page at the same position as the original." + }, + "ReplaceAllTextRequest": { + "id": "ReplaceAllTextRequest", + "description": "Replaces all instances of text matching a criteria with replace text.", + "type": "object", + "properties": { + "replaceText": { + "description": "The text that will replace the matched text.", "type": "string" }, - "spreadsheetId": { - "description": "The ID of the Google Sheets spreadsheet that contains the chart.", + "containsText": { + "$ref": "SubstringMatchCriteria", + "description": "Finds text in a shape matching this substring." + } + } + }, + "Page": { + "properties": { + "objectId": { + "description": "The object ID for this page. Object IDs used by\nPage and\nPageElement share the same namespace.", "type": "string" }, - "elementProperties": { - "description": "The element properties for the chart.\n\nWhen the aspect ratio of the provided size does not match the chart aspect\nratio, the chart is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation.", - "$ref": "PageElementProperties" + "revisionId": { + "description": "The revision ID of the presentation containing this page. Can be used in\nupdate requests to assert that the presentation revision hasn't changed\nsince the last read operation. Only populated if the user has edit access\nto the presentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes.", + "type": "string" }, - "linkingMode": { - "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked.", - "enum": [ - "NOT_LINKED_IMAGE", - "LINKED" - ], + "layoutProperties": { + "description": "Layout specific properties. Only set if page_type = LAYOUT.", + "$ref": "LayoutProperties" + }, + "pageType": { + "type": "string", "enumDescriptions": [ - "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", - "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." + "A slide page.", + "A master slide page.", + "A layout page.", + "A notes page.", + "A notes master page." ], - "type": "string" - } - }, - "id": "CreateSheetsChartRequest" - }, - "DeleteTableRowRequest": { - "description": "Deletes a row from a table.", - "type": "object", - "properties": { - "tableObjectId": { - "description": "The table to delete rows from.", - "type": "string" - }, - "cellLocation": { - "description": "The reference table cell location from which a row will be deleted.\n\nThe row this cell spans will be deleted. If this is a merged cell, multiple\nrows will be deleted. If no rows remain in the table after this deletion,\nthe whole table is deleted.", - "$ref": "TableCellLocation" - } - }, - "id": "DeleteTableRowRequest" - }, - "Video": { - "description": "A PageElement kind representing a\nvideo.", - "type": "object", - "properties": { - "url": { - "description": "An URL to a video. The URL is valid as long as the source video\nexists and sharing settings do not change.", - "type": "string" - }, - "videoProperties": { - "description": "The properties of the video.", - "$ref": "VideoProperties" - }, - "source": { - "description": "The video source.", "enum": [ - "SOURCE_UNSPECIFIED", - "YOUTUBE" + "SLIDE", + "MASTER", + "LAYOUT", + "NOTES", + "NOTES_MASTER" ], - "enumDescriptions": [ - "The video source is unspecified.", - "The video source is YouTube." - ], - "type": "string" + "description": "The type of the page." }, - "id": { - "description": "The video source's unique identifier for this video.", - "type": "string" + "pageElements": { + "description": "The page elements rendered on the page.", + "type": "array", + "items": { + "$ref": "PageElement" + } + }, + "notesProperties": { + "description": "Notes specific properties. Only set if page_type = NOTES.", + "$ref": "NotesProperties" + }, + "pageProperties": { + "description": "The properties of the page.", + "$ref": "PageProperties" + }, + "slideProperties": { + "$ref": "SlideProperties", + "description": "Slide specific properties. Only set if page_type = SLIDE." } }, - "id": "Video" + "id": "Page", + "description": "A page in a presentation.", + "type": "object" }, - "Link": { - "description": "A hypertext link.", + "ShapeBackgroundFill": { "type": "object", "properties": { - "url": { - "description": "If set, indicates this is a link to the external web page at this URL.", - "type": "string" - }, - "relativeLink": { - "description": "If set, indicates this is a link to a slide in this presentation,\naddressed by its position.", - "enum": [ - "RELATIVE_SLIDE_LINK_UNSPECIFIED", - "NEXT_SLIDE", - "PREVIOUS_SLIDE", - "FIRST_SLIDE", - "LAST_SLIDE" - ], - "enumDescriptions": [ - "An unspecified relative slide link.", - "A link to the next slide.", - "A link to the previous slide.", - "A link to the first slide in the presentation.", - "A link to the last slide in the presentation." - ], - "type": "string" - }, - "slideIndex": { - "description": "If set, indicates this is a link to the slide at this zero-based index\nin the presentation. There may not be a slide at this index.", - "type": "integer", - "format": "int32" - }, - "pageObjectId": { - "description": "If set, indicates this is a link to the specific page in this\npresentation with this ID. A page with this ID may not exist.", - "type": "string" - } - }, - "id": "Link" - }, - "PageBackgroundFill": { - "description": "The page background fill.", - "type": "object", - "properties": { - "stretchedPictureFill": { - "description": "Stretched picture fill.", - "$ref": "StretchedPictureFill" - }, "propertyState": { - "description": "The background fill property state.\n\nUpdating the the fill on a page will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a page, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" - ], "enumDescriptions": [ "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." ], + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ], + "description": "The background fill property state.\n\nUpdating the the fill on a shape will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a shape, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", "type": "string" }, "solidFill": { - "description": "Solid color fill.", - "$ref": "SolidFill" + "$ref": "SolidFill", + "description": "Solid color fill." } }, - "id": "PageBackgroundFill" + "id": "ShapeBackgroundFill", + "description": "The shape background fill." + }, + "CropProperties": { + "description": "The crop properties of an object enclosed in a container. For example, an\nImage.\n\nThe crop properties is represented by the offsets of four edges which define\na crop rectangle. The offsets are measured in percentage from the\ncorresponding edges of the object's original bounding rectangle towards\ninside, relative to the object's original dimensions.\n\n- If the offset is in the interval (0, 1), the corresponding edge of crop\nrectangle is positioned inside of the object's original bounding rectangle.\n- If the offset is negative or greater than 1, the corresponding edge of crop\nrectangle is positioned outside of the object's original bounding rectangle.\n- If the left edge of the crop rectangle is on the right side of its right\nedge, the object will be flipped horizontally.\n- If the top edge of the crop rectangle is below its bottom edge, the object\nwill be flipped vertically.\n- If all offsets and rotation angle is 0, the object is not cropped.\n\nAfter cropping, the content in the crop rectangle will be stretched to fit\nits container.", + "type": "object", + "properties": { + "bottomOffset": { + "description": "The offset specifies the bottom edge of the crop rectangle that is located\nabove the original bounding rectangle bottom edge, relative to the object's\noriginal height.", + "format": "float", + "type": "number" + }, + "angle": { + "description": "The rotation angle of the crop window around its center, in radians.\nRotation angle is applied after the offset.", + "format": "float", + "type": "number" + }, + "topOffset": { + "description": "The offset specifies the top edge of the crop rectangle that is located\nbelow the original bounding rectangle top edge, relative to the object's\noriginal height.", + "format": "float", + "type": "number" + }, + "leftOffset": { + "description": "The offset specifies the left edge of the crop rectangle that is located to\nthe right of the original bounding rectangle left edge, relative to the\nobject's original width.", + "format": "float", + "type": "number" + }, + "rightOffset": { + "description": "The offset specifies the right edge of the crop rectangle that is located\nto the left of the original bounding rectangle right edge, relative to the\nobject's original width.", + "format": "float", + "type": "number" + } + }, + "id": "CropProperties" + }, + "ReplaceAllShapesWithSheetsChartRequest": { + "description": "Replaces all shapes that match the given criteria with the provided Google\nSheets chart. The chart will be scaled and centered to fit within the bounds\nof the original shape.\n\nNOTE: Replacing shapes with a chart requires at least one of the\nspreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes.", + "type": "object", + "properties": { + "spreadsheetId": { + "type": "string", + "description": "The ID of the Google Sheets spreadsheet that contains the chart." + }, + "linkingMode": { + "enum": [ + "NOT_LINKED_IMAGE", + "LINKED" + ], + "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked.", + "type": "string", + "enumDescriptions": [ + "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", + "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." + ] + }, + "containsText": { + "description": "The criteria that the shapes must match in order to be replaced. The\nrequest will replace all of the shapes that contain the given text.", + "$ref": "SubstringMatchCriteria" + }, + "chartId": { + "description": "The ID of the specific chart in the Google Sheets spreadsheet.", + "format": "int32", + "type": "integer" + } + }, + "id": "ReplaceAllShapesWithSheetsChartRequest" }, "ColorStop": { "description": "A color and position in a gradient band.", "type": "object", "properties": { - "color": { - "description": "The color of the gradient stop.", - "$ref": "OpaqueColor" + "alpha": { + "description": "The alpha value of this color in the gradient band. Defaults to 1.0,\nfully opaque.", + "format": "float", + "type": "number" }, "position": { "description": "The relative position of the color stop in the gradient band measured\nin percentage. The value should be in the interval [0.0, 1.0].", - "type": "number", - "format": "float" + "format": "float", + "type": "number" }, - "alpha": { - "description": "The alpha value of this color in the gradient band. Defaults to 1.0,\nfully opaque.", - "type": "number", - "format": "float" + "color": { + "$ref": "OpaqueColor", + "description": "The color of the gradient stop." } }, "id": "ColorStop" }, - "ThemeColorPair": { - "description": "A pair mapping a theme color type to the concrete color it represents.", + "Range": { + "description": "Specifies a contiguous range of an indexed collection, such as characters in\ntext.", "type": "object", "properties": { - "color": { - "description": "The concrete color corresponding to the theme color type above.", - "$ref": "RgbColor" - }, - "type": { - "description": "The type of the theme color.", - "enum": [ - "THEME_COLOR_TYPE_UNSPECIFIED", - "DARK1", - "LIGHT1", - "DARK2", - "LIGHT2", - "ACCENT1", - "ACCENT2", - "ACCENT3", - "ACCENT4", - "ACCENT5", - "ACCENT6", - "HYPERLINK", - "FOLLOWED_HYPERLINK", - "TEXT1", - "BACKGROUND1", - "TEXT2", - "BACKGROUND2" - ], - "enumDescriptions": [ - "Unspecified theme color. This value should not be used.", - "Represents the first dark color.", - "Represents the first light color.", - "Represents the second dark color.", - "Represents the second light color.", - "Represents the first accent color.", - "Represents the second accent color.", - "Represents the third accent color.", - "Represents the fourth accent color.", - "Represents the fifth accent color.", - "Represents the sixth accent color.", - "Represents the color to use for hyperlinks.", - "Represents the color to use for visited hyperlinks.", - "Represents the first text color.", - "Represents the first background color.", - "Represents the second text color.", - "Represents the second background color." - ], - "type": "string" - } - }, - "id": "ThemeColorPair" - }, - "ReplaceAllShapesWithImageRequest": { - "description": "Replaces all shapes that match the given criteria with the provided image.", - "type": "object", - "properties": { - "replaceMethod": { - "description": "The replace method.", - "enum": [ - "CENTER_INSIDE", - "CENTER_CROP" - ], - "enumDescriptions": [ - "Scales and centers the image to fit within the bounds of the original\nshape and maintains the image's aspect ratio. The rendered size of the\nimage may be smaller than the size of the shape. This is the default\nmethod when one is not specified.", - "Scales and centers the image to fill the bounds of the original shape.\nThe image may be cropped in order to fill the shape. The rendered size of\nthe image will be the same as that of the original shape." - ], - "type": "string" - }, - "containsText": { - "description": "If set, this request will replace all of the shapes that contain the\ngiven text.", - "$ref": "SubstringMatchCriteria" - }, - "imageUrl": { - "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.", - "type": "string" - } - }, - "id": "ReplaceAllShapesWithImageRequest" - }, - "DeleteObjectRequest": { - "description": "Deletes an object, either pages or\npage elements, from the\npresentation.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the page or page element to delete.\n\nIf after a delete operation a group contains\nonly 1 or no page elements, the group is also deleted.\n\nIf a placeholder is deleted on a layout, any empty inheriting shapes are\nalso deleted.", - "type": "string" - } - }, - "id": "DeleteObjectRequest" - }, - "CreateImageResponse": { - "description": "The result of creating an image.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created image.", - "type": "string" - } - }, - "id": "CreateImageResponse" - }, - "Recolor": { - "description": "A recolor effect applied on an image.", - "type": "object", - "properties": { - "recolorStops": { - "description": "The recolor effect is represented by a gradient, which is a list of color\nstops. This property is read-only.", - "type": "array", - "items": { - "$ref": "ColorStop" - } - } - }, - "id": "Recolor" - }, - "TextStyle": { - "description": "Represents the styling that can be applied to a TextRun.\n\nIf this text is contained in a shape with a parent placeholder, then these text styles may be\ninherited from the parent. Which text styles are inherited depend on the\nnesting level of lists:\n\n* A text run in a paragraph that is not in a list will inherit its text style\n from the the newline character in the paragraph at the 0 nesting level of\n the list inside the parent placeholder.\n* A text run in a paragraph that is in a list will inherit its text style\n from the newline character in the paragraph at its corresponding nesting\n level of the list inside the parent placeholder.\n\nInherited text styles are represented as unset fields in this message. If\ntext is contained in a shape without a parent placeholder, unsetting these\nfields will revert the style to a value matching the defaults in the Slides\neditor.", - "type": "object", - "properties": { - "bold": { - "description": "Whether or not the text is bold.", - "type": "boolean" - }, - "italic": { - "description": "Whether or not the text is italicized.", - "type": "boolean" - }, - "baselineOffset": { - "description": "The text's vertical offset from its normal position.\n\nText with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically\nrendered in a smaller font size, computed based on the `font_size` field.\nThe `font_size` itself is not affected by changes in this field.", - "enum": [ - "BASELINE_OFFSET_UNSPECIFIED", - "NONE", - "SUPERSCRIPT", - "SUBSCRIPT" - ], - "enumDescriptions": [ - "The text's baseline offset is inherited from the parent.", - "The text is not vertically offset.", - "The text is vertically offset upwards (superscript).", - "The text is vertically offset downwards (subscript)." - ], - "type": "string" - }, - "foregroundColor": { - "description": "The color of the text itself. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set.", - "$ref": "OptionalColor" - }, - "fontFamily": { - "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.\n\nSome fonts can affect the weight of the text. If an update request\nspecifies values for both `font_family` and `bold`, the explicitly-set\n`bold` value is used.", - "type": "string" - }, - "strikethrough": { - "description": "Whether or not the text is struck through.", - "type": "boolean" - }, - "link": { - "description": "The hyperlink destination of the text. If unset, there is no link. Links\nare not inherited from parent text.\n\nChanging the link in an update request causes some other changes to the\ntext style of the range:\n\n* When setting a link, the text foreground color will be set to\n ThemeColorType.HYPERLINK and the text will\n be underlined. If these fields are modified in the same\n request, those values will be used instead of the link defaults.\n* Setting a link on a text range that overlaps with an existing link will\n also update the existing link to point to the new URL.\n* Links are not settable on newline characters. As a result, setting a link\n on a text range that crosses a paragraph boundary, such as `\"ABC\\n123\"`,\n will separate the newline character(s) into their own text runs. The\n link will be applied separately to the runs before and after the newline.\n* Removing a link will update the text style of the range to match the\n style of the preceding text (or the default text styles if the preceding\n text is another link) unless different styles are being set in the same\n request.", - "$ref": "Link" - }, - "smallCaps": { - "description": "Whether or not the text is in small capital letters.", - "type": "boolean" - }, - "backgroundColor": { - "description": "The background color of the text. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set.", - "$ref": "OptionalColor" - }, - "fontSize": { - "description": "The size of the text's font. When read, the `font_size` will specified in\npoints.", - "$ref": "Dimension" - }, - "underline": { - "description": "Whether or not the text is underlined.", - "type": "boolean" - } - }, - "id": "TextStyle" - }, - "UpdateLinePropertiesRequest": { - "description": "Updates the properties of a Line.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the line the update is applied to.", - "type": "string" - }, - "lineProperties": { - "description": "The line properties to update.", - "$ref": "LineProperties" - }, - "fields": { - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `lineProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the line solid fill color, set `fields` to\n`\"lineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string", - "format": "google-fieldmask" - } - }, - "id": "UpdateLinePropertiesRequest" - }, - "TableCellBackgroundFill": { - "description": "The table cell background fill.", - "type": "object", - "properties": { - "propertyState": { - "description": "The background fill property state.\n\nUpdating the the fill on a table cell will implicitly update this field\nto `RENDERED`, unless another value is specified in the same request. To\nhave no fill on a table cell, set this field to `NOT_RENDERED`. In this\ncase, any other fill fields set in the same request will be ignored.", - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" - ], - "enumDescriptions": [ - "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", - "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", - "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." - ], - "type": "string" - }, - "solidFill": { - "description": "Solid color fill.", - "$ref": "SolidFill" - } - }, - "id": "TableCellBackgroundFill" - }, - "SolidFill": { - "description": "A solid color fill. The page or page element is filled entirely with the\nspecified color value.\n\nIf any field is unset, its value may be inherited from a parent placeholder\nif it exists.", - "type": "object", - "properties": { - "color": { - "description": "The color value of the solid fill.", - "$ref": "OpaqueColor" - }, - "alpha": { - "description": "The fraction of this `color` that should be applied to the pixel.\nThat is, the final pixel color is defined by the equation:\n\n pixel color = alpha * (color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color.", - "type": "number", - "format": "float" - } - }, - "id": "SolidFill" - }, - "DuplicateObjectRequest": { - "description": "Duplicates a slide or page element.\n\nWhen duplicating a slide, the duplicate slide will be created immediately\nfollowing the specified slide. When duplicating a page element, the duplicate\nwill be placed on the same page at the same position as the original.", - "type": "object", - "properties": { - "objectId": { - "description": "The ID of the object to duplicate.", - "type": "string" - }, - "objectIds": { - "description": "The object being duplicated may contain other objects, for example when\nduplicating a slide or a group page element. This map defines how the IDs\nof duplicated objects are generated: the keys are the IDs of the original\nobjects and its values are the IDs that will be assigned to the\ncorresponding duplicate object. The ID of the source object's duplicate\nmay be specified in this map as well, using the same value of the\n`object_id` field as a key and the newly desired ID as the value.\n\nAll keys must correspond to existing IDs in the presentation. All values\nmust be unique in the presentation and must start with an alphanumeric\ncharacter or an underscore (matches regex `[a-zA-Z0-9_]`); remaining\ncharacters may include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`). The length of the new ID must not be less than 5 or\ngreater than 50.\n\nIf any IDs of source objects are omitted from the map, a new random ID will\nbe assigned. If the map is empty or unset, all duplicate objects will\nreceive a new random ID.", - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "id": "DuplicateObjectRequest" - }, - "SheetsChart": { - "description": "A PageElement kind representing\na linked chart embedded from Google Sheets.", - "type": "object", - "properties": { - "chartId": { - "description": "The ID of the specific chart in the Google Sheets spreadsheet that is\nembedded.", - "type": "integer", - "format": "int32" - }, - "spreadsheetId": { - "description": "The ID of the Google Sheets spreadsheet that contains the source chart.", - "type": "string" - }, - "sheetsChartProperties": { - "description": "The properties of the Sheets chart.", - "$ref": "SheetsChartProperties" - }, - "contentUrl": { - "description": "The URL of an image of the embedded chart, with a default lifetime of 30\nminutes. This URL is tagged with the account of the requester. Anyone with\nthe URL effectively accesses the image as the original requester. Access to\nthe image may be lost if the presentation's sharing settings change.", - "type": "string" - } - }, - "id": "SheetsChart" - }, - "PageProperties": { - "description": "The properties of the Page.\n\nThe page will inherit properties from the parent page. Depending on the page\ntype the hierarchy is defined in either\nSlideProperties or\nLayoutProperties.", - "type": "object", - "properties": { - "pageBackgroundFill": { - "description": "The background fill of the page. If unset, the background fill is inherited\nfrom a parent page if it exists. If the page has no parent, then the\nbackground fill defaults to the corresponding fill in the Slides editor.", - "$ref": "PageBackgroundFill" - }, - "colorScheme": { - "description": "The color scheme of the page. If unset, the color scheme is inherited from\na parent page. If the page has no parent, the color scheme uses a default\nSlides color scheme. This field is read-only.", - "$ref": "ColorScheme" - } - }, - "id": "PageProperties" - }, - "Shadow": { - "description": "The shadow properties of a page element.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", - "type": "object", - "properties": { - "alignment": { - "description": "The alignment point of the shadow, that sets the origin for translate,\nscale and skew of the shadow.", - "enum": [ - "RECTANGLE_POSITION_UNSPECIFIED", - "TOP_LEFT", - "TOP_CENTER", - "TOP_RIGHT", - "LEFT_CENTER", - "CENTER", - "RIGHT_CENTER", - "BOTTOM_LEFT", - "BOTTOM_CENTER", - "BOTTOM_RIGHT" - ], - "enumDescriptions": [ - "Unspecified.", - "Top left.", - "Top center.", - "Top right.", - "Left center.", - "Center.", - "Right center.", - "Bottom left.", - "Bottom center.", - "Bottom right." - ], - "type": "string" - }, - "rotateWithShape": { - "description": "Whether the shadow should rotate with the shape.", - "type": "boolean" - }, - "transform": { - "description": "Transform that encodes the translate, scale, and skew of the shadow,\nrelative to the alignment position.", - "$ref": "AffineTransform" - }, - "color": { - "description": "The shadow color value.", - "$ref": "OpaqueColor" - }, - "blurRadius": { - "description": "The radius of the shadow blur. The larger the radius, the more diffuse the\nshadow becomes.", - "$ref": "Dimension" - }, - "propertyState": { - "description": "The shadow property state.\n\nUpdating the the shadow on a page element will implicitly update this field\nto `RENDERED`, unless another value is specified in the same request. To\nhave no shadow on a page element, set this field to `NOT_RENDERED`. In this\ncase, any other shadow fields set in the same request will be ignored.", - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" - ], - "enumDescriptions": [ - "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", - "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", - "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." - ], - "type": "string" - }, - "alpha": { - "description": "The alpha of the shadow's color, from 0.0 to 1.0.", - "type": "number", - "format": "float" - }, - "type": { - "description": "The type of the shadow.", - "enum": [ - "SHADOW_TYPE_UNSPECIFIED", - "OUTER" - ], - "enumDescriptions": [ - "Unspecified shadow type.", - "Outer shadow." - ], - "type": "string" - } - }, - "id": "Shadow" - }, - "LayoutReference": { - "description": "Slide layout reference. This may reference either:\n\n- A predefined layout\n- One of the layouts in the presentation.", - "type": "object", - "properties": { - "predefinedLayout": { - "description": "Predefined layout.", - "enum": [ - "PREDEFINED_LAYOUT_UNSPECIFIED", - "BLANK", - "CAPTION_ONLY", - "TITLE", - "TITLE_AND_BODY", - "TITLE_AND_TWO_COLUMNS", - "TITLE_ONLY", - "SECTION_HEADER", - "SECTION_TITLE_AND_DESCRIPTION", - "ONE_COLUMN_TEXT", - "MAIN_POINT", - "BIG_NUMBER" - ], - "enumDescriptions": [ - "Unspecified layout.", - "Blank layout, with no placeholders.", - "Layout with a caption at the bottom.", - "Layout with a title and a subtitle.", - "Layout with a title and body.", - "Layout with a title and two columns.", - "Layout with only a title.", - "Layout with a section title.", - "Layout with a title and subtitle on one side and description on the other.", - "Layout with one title and one body, arranged in a single column.", - "Layout with a main point.", - "Layout with a big number heading." - ], - "type": "string" - }, - "layoutId": { - "description": "Layout ID: the object ID of one of the layouts in the presentation.", - "type": "string" - } - }, - "id": "LayoutReference" - }, - "CreateSheetsChartResponse": { - "description": "The result of creating an embedded Google Sheets chart.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created chart.", - "type": "string" - } - }, - "id": "CreateSheetsChartResponse" - }, - "ReplaceAllTextResponse": { - "description": "The result of replacing text.", - "type": "object", - "properties": { - "occurrencesChanged": { - "description": "The number of occurrences changed by replacing all text.", - "type": "integer", - "format": "int32" - } - }, - "id": "ReplaceAllTextResponse" - }, - "LayoutProperties": { - "description": "The properties of Page are only\nrelevant for pages with page_type LAYOUT.", - "type": "object", - "properties": { - "displayName": { - "description": "The human readable name of the layout in the presentation's locale.", - "type": "string" - }, - "masterObjectId": { - "description": "The object ID of the master that this layout is based on.", - "type": "string" - }, - "name": { - "description": "The name of the layout.", - "type": "string" - } - }, - "id": "LayoutProperties" - }, - "InsertTableColumnsRequest": { - "description": "Inserts columns into a table.\n\nOther columns in the table will be resized to fit the new column.", - "type": "object", - "properties": { - "tableObjectId": { - "description": "The table to insert columns into.", - "type": "string" - }, - "insertRight": { - "description": "Whether to insert new columns to the right of the reference cell location.\n\n- `True`: insert to the right.\n- `False`: insert to the left.", - "type": "boolean" - }, - "cellLocation": { - "description": "The reference table cell location from which columns will be inserted.\n\nA new column will be inserted to the left (or right) of the column where\nthe reference cell is. If the reference cell is a merged cell, a new\ncolumn will be inserted to the left (or right) of the merged cell.", - "$ref": "TableCellLocation" - }, - "number": { - "description": "The number of columns to be inserted. Maximum 20 per request.", - "type": "integer", - "format": "int32" - } - }, - "id": "InsertTableColumnsRequest" - }, - "DeleteTableColumnRequest": { - "description": "Deletes a column from a table.", - "type": "object", - "properties": { - "tableObjectId": { - "description": "The table to delete columns from.", - "type": "string" - }, - "cellLocation": { - "description": "The reference table cell location from which a column will be deleted.\n\nThe column this cell spans will be deleted. If this is a merged cell,\nmultiple columns will be deleted. If no columns remain in the table after\nthis deletion, the whole table is deleted.", - "$ref": "TableCellLocation" - } - }, - "id": "DeleteTableColumnRequest" - }, - "TableRow": { - "description": "Properties and contents of each row in a table.", - "type": "object", - "properties": { - "rowHeight": { - "description": "Height of a row.", - "$ref": "Dimension" - }, - "tableCells": { - "description": "Properties and contents of each cell.\n\nCells that span multiple columns are represented only once with a\ncolumn_span greater\nthan 1. As a result, the length of this collection does not always match\nthe number of columns of the entire table.", - "type": "array", - "items": { - "$ref": "TableCell" - } - } - }, - "id": "TableRow" - }, - "AffineTransform": { - "description": "AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ]\nto transform source coordinates (x,y) into destination coordinates (x', y')\naccording to:\n\n x' x = shear_y scale_y translate_y \n 1 [ 1 ]\n\nAfter transformation,\n\n x' = scale_x * x + shear_x * y + translate_x;\n y' = scale_y * y + shear_y * x + translate_y;\n\nThis message is therefore composed of these six matrix elements.", - "type": "object", - "properties": { - "unit": { - "description": "The units for translate elements.", - "enum": [ - "UNIT_UNSPECIFIED", - "EMU", - "PT" - ], - "enumDescriptions": [ - "The units are unknown.", - "An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter\nand thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", - "A point, 1/72 of an inch." - ], - "type": "string" - }, - "shearY": { - "description": "The Y coordinate shearing element.", - "type": "number", - "format": "double" - }, - "translateX": { - "description": "The X coordinate translation element.", - "type": "number", - "format": "double" - }, - "shearX": { - "description": "The X coordinate shearing element.", - "type": "number", - "format": "double" - }, - "scaleY": { - "description": "The Y coordinate scaling element.", - "type": "number", - "format": "double" - }, - "scaleX": { - "description": "The X coordinate scaling element.", - "type": "number", - "format": "double" - }, - "translateY": { - "description": "The Y coordinate translation element.", - "type": "number", - "format": "double" - } - }, - "id": "AffineTransform" - }, - "CreateShapeRequest": { - "description": "Creates a new shape.", - "type": "object", - "properties": { - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", - "type": "string" - }, - "shapeType": { - "description": "The shape type.", - "enum": [ - "TYPE_UNSPECIFIED", - "TEXT_BOX", - "RECTANGLE", - "ROUND_RECTANGLE", - "ELLIPSE", - "ARC", - "BENT_ARROW", - "BENT_UP_ARROW", - "BEVEL", - "BLOCK_ARC", - "BRACE_PAIR", - "BRACKET_PAIR", - "CAN", - "CHEVRON", - "CHORD", - "CLOUD", - "CORNER", - "CUBE", - "CURVED_DOWN_ARROW", - "CURVED_LEFT_ARROW", - "CURVED_RIGHT_ARROW", - "CURVED_UP_ARROW", - "DECAGON", - "DIAGONAL_STRIPE", - "DIAMOND", - "DODECAGON", - "DONUT", - "DOUBLE_WAVE", - "DOWN_ARROW", - "DOWN_ARROW_CALLOUT", - "FOLDED_CORNER", - "FRAME", - "HALF_FRAME", - "HEART", - "HEPTAGON", - "HEXAGON", - "HOME_PLATE", - "HORIZONTAL_SCROLL", - "IRREGULAR_SEAL_1", - "IRREGULAR_SEAL_2", - "LEFT_ARROW", - "LEFT_ARROW_CALLOUT", - "LEFT_BRACE", - "LEFT_BRACKET", - "LEFT_RIGHT_ARROW", - "LEFT_RIGHT_ARROW_CALLOUT", - "LEFT_RIGHT_UP_ARROW", - "LEFT_UP_ARROW", - "LIGHTNING_BOLT", - "MATH_DIVIDE", - "MATH_EQUAL", - "MATH_MINUS", - "MATH_MULTIPLY", - "MATH_NOT_EQUAL", - "MATH_PLUS", - "MOON", - "NO_SMOKING", - "NOTCHED_RIGHT_ARROW", - "OCTAGON", - "PARALLELOGRAM", - "PENTAGON", - "PIE", - "PLAQUE", - "PLUS", - "QUAD_ARROW", - "QUAD_ARROW_CALLOUT", - "RIBBON", - "RIBBON_2", - "RIGHT_ARROW", - "RIGHT_ARROW_CALLOUT", - "RIGHT_BRACE", - "RIGHT_BRACKET", - "ROUND_1_RECTANGLE", - "ROUND_2_DIAGONAL_RECTANGLE", - "ROUND_2_SAME_RECTANGLE", - "RIGHT_TRIANGLE", - "SMILEY_FACE", - "SNIP_1_RECTANGLE", - "SNIP_2_DIAGONAL_RECTANGLE", - "SNIP_2_SAME_RECTANGLE", - "SNIP_ROUND_RECTANGLE", - "STAR_10", - "STAR_12", - "STAR_16", - "STAR_24", - "STAR_32", - "STAR_4", - "STAR_5", - "STAR_6", - "STAR_7", - "STAR_8", - "STRIPED_RIGHT_ARROW", - "SUN", - "TRAPEZOID", - "TRIANGLE", - "UP_ARROW", - "UP_ARROW_CALLOUT", - "UP_DOWN_ARROW", - "UTURN_ARROW", - "VERTICAL_SCROLL", - "WAVE", - "WEDGE_ELLIPSE_CALLOUT", - "WEDGE_RECTANGLE_CALLOUT", - "WEDGE_ROUND_RECTANGLE_CALLOUT", - "FLOW_CHART_ALTERNATE_PROCESS", - "FLOW_CHART_COLLATE", - "FLOW_CHART_CONNECTOR", - "FLOW_CHART_DECISION", - "FLOW_CHART_DELAY", - "FLOW_CHART_DISPLAY", - "FLOW_CHART_DOCUMENT", - "FLOW_CHART_EXTRACT", - "FLOW_CHART_INPUT_OUTPUT", - "FLOW_CHART_INTERNAL_STORAGE", - "FLOW_CHART_MAGNETIC_DISK", - "FLOW_CHART_MAGNETIC_DRUM", - "FLOW_CHART_MAGNETIC_TAPE", - "FLOW_CHART_MANUAL_INPUT", - "FLOW_CHART_MANUAL_OPERATION", - "FLOW_CHART_MERGE", - "FLOW_CHART_MULTIDOCUMENT", - "FLOW_CHART_OFFLINE_STORAGE", - "FLOW_CHART_OFFPAGE_CONNECTOR", - "FLOW_CHART_ONLINE_STORAGE", - "FLOW_CHART_OR", - "FLOW_CHART_PREDEFINED_PROCESS", - "FLOW_CHART_PREPARATION", - "FLOW_CHART_PROCESS", - "FLOW_CHART_PUNCHED_CARD", - "FLOW_CHART_PUNCHED_TAPE", - "FLOW_CHART_SORT", - "FLOW_CHART_SUMMING_JUNCTION", - "FLOW_CHART_TERMINATOR", - "ARROW_EAST", - "ARROW_NORTH_EAST", - "ARROW_NORTH", - "SPEECH", - "STARBURST", - "TEARDROP", - "ELLIPSE_RIBBON", - "ELLIPSE_RIBBON_2", - "CLOUD_CALLOUT", - "CUSTOM" - ], - "enumDescriptions": [ - "The shape type that is not predefined.", - "Text box shape.", - "Rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'rect'.", - "Round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'roundRect'", - "Ellipse shape. Corresponds to ECMA-376 ST_ShapeType 'ellipse'", - "Curved arc shape. Corresponds to ECMA-376 ST_ShapeType 'arc'", - "Bent arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentArrow'", - "Bent up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentUpArrow'", - "Bevel shape. Corresponds to ECMA-376 ST_ShapeType 'bevel'", - "Block arc shape. Corresponds to ECMA-376 ST_ShapeType 'blockArc'", - "Brace pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracePair'", - "Bracket pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracketPair'", - "Can shape. Corresponds to ECMA-376 ST_ShapeType 'can'", - "Chevron shape. Corresponds to ECMA-376 ST_ShapeType 'chevron'", - "Chord shape. Corresponds to ECMA-376 ST_ShapeType 'chord'", - "Cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloud'", - "Corner shape. Corresponds to ECMA-376 ST_ShapeType 'corner'", - "Cube shape. Corresponds to ECMA-376 ST_ShapeType 'cube'", - "Curved down arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedDownArrow'", - "Curved left arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedLeftArrow'", - "Curved right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedRightArrow'", - "Curved up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedUpArrow'", - "Decagon shape. Corresponds to ECMA-376 ST_ShapeType 'decagon'", - "Diagonal stripe shape. Corresponds to ECMA-376 ST_ShapeType 'diagStripe'", - "Diamond shape. Corresponds to ECMA-376 ST_ShapeType 'diamond'", - "Dodecagon shape. Corresponds to ECMA-376 ST_ShapeType 'dodecagon'", - "Donut shape. Corresponds to ECMA-376 ST_ShapeType 'donut'", - "Double wave shape. Corresponds to ECMA-376 ST_ShapeType 'doubleWave'", - "Down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'downArrow'", - "Callout down arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'downArrowCallout'", - "Folded corner shape. Corresponds to ECMA-376 ST_ShapeType 'foldedCorner'", - "Frame shape. Corresponds to ECMA-376 ST_ShapeType 'frame'", - "Half frame shape. Corresponds to ECMA-376 ST_ShapeType 'halfFrame'", - "Heart shape. Corresponds to ECMA-376 ST_ShapeType 'heart'", - "Heptagon shape. Corresponds to ECMA-376 ST_ShapeType 'heptagon'", - "Hexagon shape. Corresponds to ECMA-376 ST_ShapeType 'hexagon'", - "Home plate shape. Corresponds to ECMA-376 ST_ShapeType 'homePlate'", - "Horizontal scroll shape. Corresponds to ECMA-376 ST_ShapeType\n'horizontalScroll'", - "Irregular seal 1 shape. Corresponds to ECMA-376 ST_ShapeType\n'irregularSeal1'", - "Irregular seal 2 shape. Corresponds to ECMA-376 ST_ShapeType\n'irregularSeal2'", - "Left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftArrow'", - "Callout left arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftArrowCallout'", - "Left brace shape. Corresponds to ECMA-376 ST_ShapeType 'leftBrace'", - "Left bracket shape. Corresponds to ECMA-376 ST_ShapeType 'leftBracket'", - "Left right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightArrow'", - "Callout left right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightArrowCallout'", - "Left right up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightUpArrow'", - "Left up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftUpArrow'", - "Lightning bolt shape. Corresponds to ECMA-376 ST_ShapeType\n'lightningBolt'", - "Divide math shape. Corresponds to ECMA-376 ST_ShapeType 'mathDivide'", - "Equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathEqual'", - "Minus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMinus'", - "Multiply math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMultiply'", - "Not equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathNotEqual'", - "Plus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathPlus'", - "Moon shape. Corresponds to ECMA-376 ST_ShapeType 'moon'", - "No smoking shape. Corresponds to ECMA-376 ST_ShapeType 'noSmoking'", - "Notched right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'notchedRightArrow'", - "Octagon shape. Corresponds to ECMA-376 ST_ShapeType 'octagon'", - "Parallelogram shape. Corresponds to ECMA-376 ST_ShapeType 'parallelogram'", - "Pentagon shape. Corresponds to ECMA-376 ST_ShapeType 'pentagon'", - "Pie shape. Corresponds to ECMA-376 ST_ShapeType 'pie'", - "Plaque shape. Corresponds to ECMA-376 ST_ShapeType 'plaque'", - "Plus shape. Corresponds to ECMA-376 ST_ShapeType 'plus'", - "Quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType 'quadArrow'", - "Callout quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'quadArrowCallout'", - "Ribbon shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon'", - "Ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon2'", - "Right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'rightArrow'", - "Callout right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'rightArrowCallout'", - "Right brace shape. Corresponds to ECMA-376 ST_ShapeType 'rightBrace'", - "Right bracket shape. Corresponds to ECMA-376 ST_ShapeType 'rightBracket'", - "One round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'round1Rect'", - "Two diagonal round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'round2DiagRect'", - "Two same-side round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'round2SameRect'", - "Right triangle shape. Corresponds to ECMA-376 ST_ShapeType 'rtTriangle'", - "Smiley face shape. Corresponds to ECMA-376 ST_ShapeType 'smileyFace'", - "One snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'snip1Rect'", - "Two diagonal snip corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snip2DiagRect'", - "Two same-side snip corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snip2SameRect'", - "One snip one round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snipRoundRect'", - "Ten pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star10'", - "Twelve pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star12'", - "Sixteen pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star16'", - "Twenty four pointed star shape. Corresponds to ECMA-376 ST_ShapeType\n'star24'", - "Thirty two pointed star shape. Corresponds to ECMA-376 ST_ShapeType\n'star32'", - "Four pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star4'", - "Five pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star5'", - "Six pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star6'", - "Seven pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star7'", - "Eight pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star8'", - "Striped right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'stripedRightArrow'", - "Sun shape. Corresponds to ECMA-376 ST_ShapeType 'sun'", - "Trapezoid shape. Corresponds to ECMA-376 ST_ShapeType 'trapezoid'", - "Triangle shape. Corresponds to ECMA-376 ST_ShapeType 'triangle'", - "Up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upArrow'", - "Callout up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'upArrowCallout'", - "Up down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upDownArrow'", - "U-turn arrow shape. Corresponds to ECMA-376 ST_ShapeType 'uturnArrow'", - "Vertical scroll shape. Corresponds to ECMA-376 ST_ShapeType\n'verticalScroll'", - "Wave shape. Corresponds to ECMA-376 ST_ShapeType 'wave'", - "Callout wedge ellipse shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeEllipseCallout'", - "Callout wedge rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeRectCallout'", - "Callout wedge round rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeRoundRectCallout'", - "Alternate process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartAlternateProcess'", - "Collate flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartCollate'", - "Connector flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartConnector'", - "Decision flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDecision'", - "Delay flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDelay'", - "Display flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDisplay'", - "Document flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDocument'", - "Extract flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartExtract'", - "Input output flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartInputOutput'", - "Internal storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartInternalStorage'", - "Magnetic disk flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticDisk'", - "Magnetic drum flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticDrum'", - "Magnetic tape flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticTape'", - "Manual input flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartManualInput'", - "Manual operation flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartManualOperation'", - "Merge flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMerge'", - "Multi-document flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMultidocument'", - "Offline storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOfflineStorage'", - "Off-page connector flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOffpageConnector'", - "Online storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOnlineStorage'", - "Or flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOr'", - "Predefined process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPredefinedProcess'", - "Preparation flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPreparation'", - "Process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartProcess'", - "Punched card flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPunchedCard'", - "Punched tape flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPunchedTape'", - "Sort flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartSort'", - "Summing junction flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartSummingJunction'", - "Terminator flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartTerminator'", - "East arrow shape.", - "Northeast arrow shape.", - "North arrow shape.", - "Speech shape.", - "Star burst shape.", - "Teardrop shape. Corresponds to ECMA-376 ST_ShapeType 'teardrop'", - "Ellipse ribbon shape. Corresponds to ECMA-376 ST_ShapeType\n'ellipseRibbon'", - "Ellipse ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType\n'ellipseRibbon2'", - "Callout cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloudCallout'", - "Custom shape." - ], - "type": "string" - }, - "elementProperties": { - "description": "The element properties for the shape.", - "$ref": "PageElementProperties" - } - }, - "id": "CreateShapeRequest" - }, - "ShapeBackgroundFill": { - "description": "The shape background fill.", - "type": "object", - "properties": { - "propertyState": { - "description": "The background fill property state.\n\nUpdating the the fill on a shape will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a shape, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" - ], - "enumDescriptions": [ - "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", - "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", - "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." - ], - "type": "string" - }, - "solidFill": { - "description": "Solid color fill.", - "$ref": "SolidFill" - } - }, - "id": "ShapeBackgroundFill" - }, - "Line": { - "description": "A PageElement kind representing a\nline, curved connector, or bent connector.", - "type": "object", - "properties": { - "lineProperties": { - "description": "The properties of the line.", - "$ref": "LineProperties" - }, - "lineType": { - "description": "The type of the line.", - "enum": [ - "TYPE_UNSPECIFIED", - "STRAIGHT_CONNECTOR_1", - "BENT_CONNECTOR_2", - "BENT_CONNECTOR_3", - "BENT_CONNECTOR_4", - "BENT_CONNECTOR_5", - "CURVED_CONNECTOR_2", - "CURVED_CONNECTOR_3", - "CURVED_CONNECTOR_4", - "CURVED_CONNECTOR_5" - ], - "enumDescriptions": [ - "An unspecified line type.", - "Straight connector 1 form. Corresponds to ECMA-376 ST_ShapeType\n'straightConnector1'.", - "Bent connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector2'.", - "Bent connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector3'.", - "Bent connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector4'.", - "Bent connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector5'.", - "Curved connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector2'.", - "Curved connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector3'.", - "Curved connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector4'.", - "Curved connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector5'." - ], - "type": "string" - } - }, - "id": "Line" - }, - "SheetsChartProperties": { - "description": "The properties of the SheetsChart.", - "type": "object", - "properties": { - "chartImageProperties": { - "description": "The properties of the embedded chart image.", - "$ref": "ImageProperties" - } - }, - "id": "SheetsChartProperties" - }, - "AutoText": { - "description": "A TextElement kind that represents auto text.", - "type": "object", - "properties": { - "style": { - "description": "The styling applied to this auto text.", - "$ref": "TextStyle" - }, - "type": { - "description": "The type of this auto text.", - "enum": [ - "TYPE_UNSPECIFIED", - "SLIDE_NUMBER" - ], - "enumDescriptions": [ - "An unspecified autotext type.", - "Type for autotext that represents the current slide number." - ], - "type": "string" - }, - "content": { - "description": "The rendered content of this auto text, if available.", - "type": "string" - } - }, - "id": "AutoText" - }, - "TextElement": { - "description": "A TextElement describes the content of a range of indices in the text content\nof a Shape or TableCell.", - "type": "object", - "properties": { - "endIndex": { - "description": "The zero-based end index of this text element, exclusive, in Unicode code\nunits.", - "type": "integer", - "format": "int32" - }, - "textRun": { - "description": "A TextElement representing a run of text where all of the characters\nin the run have the same TextStyle.\n\nThe `start_index` and `end_index` of TextRuns will always be fully\ncontained in the index range of a single `paragraph_marker` TextElement.\nIn other words, a TextRun will never span multiple paragraphs.", - "$ref": "TextRun" - }, "startIndex": { - "description": "The zero-based start index of this text element, in Unicode code units.", - "type": "integer", - "format": "int32" + "description": "The optional zero-based index of the beginning of the collection.\nRequired for `FIXED_RANGE` and `FROM_START_INDEX` ranges.", + "format": "int32", + "type": "integer" }, - "paragraphMarker": { - "description": "A marker representing the beginning of a new paragraph.\n\nThe `start_index` and `end_index` of this TextElement represent the\nrange of the paragraph. Other TextElements with an index range contained\ninside this paragraph's range are considered to be part of this\nparagraph. The range of indices of two separate paragraphs will never\noverlap.", - "$ref": "ParagraphMarker" + "endIndex": { + "description": "The optional zero-based index of the end of the collection.\nRequired for `FIXED_RANGE` ranges.", + "format": "int32", + "type": "integer" }, - "autoText": { - "description": "A TextElement representing a spot in the text that is dynamically\nreplaced with content that can change over time.", - "$ref": "AutoText" - } - }, - "id": "TextElement" - }, - "UpdateSlidesPositionRequest": { - "description": "Updates the position of slides in the presentation.", - "type": "object", - "properties": { - "insertionIndex": { - "description": "The index where the slides should be inserted, based on the slide\narrangement before the move takes place. Must be between zero and the\nnumber of slides in the presentation, inclusive.", - "type": "integer", - "format": "int32" - }, - "slideObjectIds": { - "description": "The IDs of the slides in the presentation that should be moved.\nThe slides in this list must be in existing presentation order, without\nduplicates.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "UpdateSlidesPositionRequest" - }, - "ReplaceAllTextRequest": { - "description": "Replaces all instances of text matching a criteria with replace text.", - "type": "object", - "properties": { - "containsText": { - "description": "Finds text in a shape matching this substring.", - "$ref": "SubstringMatchCriteria" - }, - "replaceText": { - "description": "The text that will replace the matched text.", - "type": "string" - } - }, - "id": "ReplaceAllTextRequest" - }, - "ShapeProperties": { - "description": "The properties of a Shape.\n\nIf the shape is a placeholder shape as determined by the\nplaceholder field, then these\nproperties may be inherited from a parent placeholder shape.\nDetermining the rendered value of the property depends on the corresponding\nproperty_state field value.", - "type": "object", - "properties": { - "outline": { - "description": "The outline of the shape. If unset, the outline is inherited from a\nparent placeholder if it exists. If the shape has no parent, then the\ndefault outline depends on the shape type, matching the defaults for\nnew shapes created in the Slides editor.", - "$ref": "Outline" - }, - "link": { - "description": "The hyperlink destination of the shape. If unset, there is no link. Links\nare not inherited from parent placeholders.", - "$ref": "Link" - }, - "shapeBackgroundFill": { - "description": "The background fill of the shape. If unset, the background fill is\ninherited from a parent placeholder if it exists. If the shape has no\nparent, then the default background fill depends on the shape type,\nmatching the defaults for new shapes created in the Slides editor.", - "$ref": "ShapeBackgroundFill" - }, - "shadow": { - "description": "The shadow properties of the shape. If unset, the shadow is inherited from\na parent placeholder if it exists. If the shape has no parent, then the\ndefault shadow matches the defaults for new shapes created in the Slides\neditor. This property is read-only.", - "$ref": "Shadow" - } - }, - "id": "ShapeProperties" - }, - "CreateLineRequest": { - "description": "Creates a line.", - "type": "object", - "properties": { - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" - }, - "elementProperties": { - "description": "The element properties for the line.", - "$ref": "PageElementProperties" - }, - "lineCategory": { - "description": "The category of line to be created.", - "enum": [ - "STRAIGHT", - "BENT", - "CURVED" - ], - "enumDescriptions": [ - "Straight connectors, including straight connector 1. The is the default\ncategory when one is not specified.", - "Bent connectors, including bent connector 2 to 5.", - "Curved connectors, including curved connector 2 to 5." - ], - "type": "string" - } - }, - "id": "CreateLineRequest" - }, - "CreateShapeResponse": { - "description": "The result of creating a shape.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created shape.", - "type": "string" - } - }, - "id": "CreateShapeResponse" - }, - "CreateSlideResponse": { - "description": "The result of creating a slide.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created slide.", - "type": "string" - } - }, - "id": "CreateSlideResponse" - }, - "UpdateImagePropertiesRequest": { - "description": "Update the properties of an Image.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the image the updates are applied to.", - "type": "string" - }, - "fields": { - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `imageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the image outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": { + "description": "The type of range.", "type": "string", - "format": "google-fieldmask" - }, - "imageProperties": { - "description": "The image properties to update.", - "$ref": "ImageProperties" + "enumDescriptions": [ + "Unspecified range type. This value must not be used.", + "A fixed range. Both the `start_index` and\n`end_index` must be specified.", + "Starts the range at `start_index` and continues until the\nend of the collection. The `end_index` must not be specified.", + "Sets the range to be the whole length of the collection. Both the\n`start_index` and the `end_index` must not be\nspecified." + ], + "enum": [ + "RANGE_TYPE_UNSPECIFIED", + "FIXED_RANGE", + "FROM_START_INDEX", + "ALL" + ] } }, - "id": "UpdateImagePropertiesRequest" + "id": "Range" }, "CreateVideoRequest": { "description": "Creates a video.", @@ -2514,16 +3300,16 @@ "type": "string" }, "source": { - "description": "The video source.", "enum": [ "SOURCE_UNSPECIFIED", "YOUTUBE" ], + "description": "The video source.", + "type": "string", "enumDescriptions": [ "The video source is unspecified.", "The video source is YouTube." - ], - "type": "string" + ] }, "elementProperties": { "description": "The element properties for the video.", @@ -2536,878 +3322,164 @@ }, "id": "CreateVideoRequest" }, - "CreateTableRequest": { - "description": "Creates a new table.", + "DuplicateObjectResponse": { "type": "object", "properties": { - "columns": { - "description": "Number of columns in the table.", - "type": "integer", - "format": "int32" - }, "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string", + "description": "The ID of the new duplicate object." + } + }, + "id": "DuplicateObjectResponse", + "description": "The response of duplicating an object." + }, + "ReplaceAllShapesWithImageRequest": { + "id": "ReplaceAllShapesWithImageRequest", + "description": "Replaces all shapes that match the given criteria with the provided image.", + "type": "object", + "properties": { + "containsText": { + "description": "If set, this request will replace all of the shapes that contain the\ngiven text.", + "$ref": "SubstringMatchCriteria" + }, + "imageUrl": { + "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.", "type": "string" }, - "rows": { - "description": "Number of rows in the table.", - "type": "integer", - "format": "int32" - }, - "elementProperties": { - "description": "The element properties for the table.\n\nThe table will be created at the provided size, subject to a minimum size.\nIf no size is provided, the table will be automatically sized.\n\nTable transforms must have a scale of 1 and no shear components. If no\ntransform is provided, the table will be centered on the page.", - "$ref": "PageElementProperties" - } - }, - "id": "CreateTableRequest" - }, - "OptionalColor": { - "description": "A color that can either be fully opaque or fully transparent.", - "type": "object", - "properties": { - "opaqueColor": { - "description": "If set, this will be used as an opaque color. If unset, this represents\na transparent color.", - "$ref": "OpaqueColor" - } - }, - "id": "OptionalColor" - }, - "TextRun": { - "description": "A TextElement kind that represents a run of text that all has the same\nstyling.", - "type": "object", - "properties": { - "style": { - "description": "The styling applied to this run.", - "$ref": "TextStyle" - }, - "content": { - "description": "The text of this run.", - "type": "string" - } - }, - "id": "TextRun" - }, - "Shape": { - "description": "A PageElement kind representing a\ngeneric shape that does not have a more specific classification.", - "type": "object", - "properties": { - "text": { - "description": "The text content of the shape.", - "$ref": "TextContent" - }, - "shapeProperties": { - "description": "The properties of the shape.", - "$ref": "ShapeProperties" - }, - "shapeType": { - "description": "The type of the shape.", - "enum": [ - "TYPE_UNSPECIFIED", - "TEXT_BOX", - "RECTANGLE", - "ROUND_RECTANGLE", - "ELLIPSE", - "ARC", - "BENT_ARROW", - "BENT_UP_ARROW", - "BEVEL", - "BLOCK_ARC", - "BRACE_PAIR", - "BRACKET_PAIR", - "CAN", - "CHEVRON", - "CHORD", - "CLOUD", - "CORNER", - "CUBE", - "CURVED_DOWN_ARROW", - "CURVED_LEFT_ARROW", - "CURVED_RIGHT_ARROW", - "CURVED_UP_ARROW", - "DECAGON", - "DIAGONAL_STRIPE", - "DIAMOND", - "DODECAGON", - "DONUT", - "DOUBLE_WAVE", - "DOWN_ARROW", - "DOWN_ARROW_CALLOUT", - "FOLDED_CORNER", - "FRAME", - "HALF_FRAME", - "HEART", - "HEPTAGON", - "HEXAGON", - "HOME_PLATE", - "HORIZONTAL_SCROLL", - "IRREGULAR_SEAL_1", - "IRREGULAR_SEAL_2", - "LEFT_ARROW", - "LEFT_ARROW_CALLOUT", - "LEFT_BRACE", - "LEFT_BRACKET", - "LEFT_RIGHT_ARROW", - "LEFT_RIGHT_ARROW_CALLOUT", - "LEFT_RIGHT_UP_ARROW", - "LEFT_UP_ARROW", - "LIGHTNING_BOLT", - "MATH_DIVIDE", - "MATH_EQUAL", - "MATH_MINUS", - "MATH_MULTIPLY", - "MATH_NOT_EQUAL", - "MATH_PLUS", - "MOON", - "NO_SMOKING", - "NOTCHED_RIGHT_ARROW", - "OCTAGON", - "PARALLELOGRAM", - "PENTAGON", - "PIE", - "PLAQUE", - "PLUS", - "QUAD_ARROW", - "QUAD_ARROW_CALLOUT", - "RIBBON", - "RIBBON_2", - "RIGHT_ARROW", - "RIGHT_ARROW_CALLOUT", - "RIGHT_BRACE", - "RIGHT_BRACKET", - "ROUND_1_RECTANGLE", - "ROUND_2_DIAGONAL_RECTANGLE", - "ROUND_2_SAME_RECTANGLE", - "RIGHT_TRIANGLE", - "SMILEY_FACE", - "SNIP_1_RECTANGLE", - "SNIP_2_DIAGONAL_RECTANGLE", - "SNIP_2_SAME_RECTANGLE", - "SNIP_ROUND_RECTANGLE", - "STAR_10", - "STAR_12", - "STAR_16", - "STAR_24", - "STAR_32", - "STAR_4", - "STAR_5", - "STAR_6", - "STAR_7", - "STAR_8", - "STRIPED_RIGHT_ARROW", - "SUN", - "TRAPEZOID", - "TRIANGLE", - "UP_ARROW", - "UP_ARROW_CALLOUT", - "UP_DOWN_ARROW", - "UTURN_ARROW", - "VERTICAL_SCROLL", - "WAVE", - "WEDGE_ELLIPSE_CALLOUT", - "WEDGE_RECTANGLE_CALLOUT", - "WEDGE_ROUND_RECTANGLE_CALLOUT", - "FLOW_CHART_ALTERNATE_PROCESS", - "FLOW_CHART_COLLATE", - "FLOW_CHART_CONNECTOR", - "FLOW_CHART_DECISION", - "FLOW_CHART_DELAY", - "FLOW_CHART_DISPLAY", - "FLOW_CHART_DOCUMENT", - "FLOW_CHART_EXTRACT", - "FLOW_CHART_INPUT_OUTPUT", - "FLOW_CHART_INTERNAL_STORAGE", - "FLOW_CHART_MAGNETIC_DISK", - "FLOW_CHART_MAGNETIC_DRUM", - "FLOW_CHART_MAGNETIC_TAPE", - "FLOW_CHART_MANUAL_INPUT", - "FLOW_CHART_MANUAL_OPERATION", - "FLOW_CHART_MERGE", - "FLOW_CHART_MULTIDOCUMENT", - "FLOW_CHART_OFFLINE_STORAGE", - "FLOW_CHART_OFFPAGE_CONNECTOR", - "FLOW_CHART_ONLINE_STORAGE", - "FLOW_CHART_OR", - "FLOW_CHART_PREDEFINED_PROCESS", - "FLOW_CHART_PREPARATION", - "FLOW_CHART_PROCESS", - "FLOW_CHART_PUNCHED_CARD", - "FLOW_CHART_PUNCHED_TAPE", - "FLOW_CHART_SORT", - "FLOW_CHART_SUMMING_JUNCTION", - "FLOW_CHART_TERMINATOR", - "ARROW_EAST", - "ARROW_NORTH_EAST", - "ARROW_NORTH", - "SPEECH", - "STARBURST", - "TEARDROP", - "ELLIPSE_RIBBON", - "ELLIPSE_RIBBON_2", - "CLOUD_CALLOUT", - "CUSTOM" - ], + "replaceMethod": { "enumDescriptions": [ - "The shape type that is not predefined.", - "Text box shape.", - "Rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'rect'.", - "Round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'roundRect'", - "Ellipse shape. Corresponds to ECMA-376 ST_ShapeType 'ellipse'", - "Curved arc shape. Corresponds to ECMA-376 ST_ShapeType 'arc'", - "Bent arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentArrow'", - "Bent up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentUpArrow'", - "Bevel shape. Corresponds to ECMA-376 ST_ShapeType 'bevel'", - "Block arc shape. Corresponds to ECMA-376 ST_ShapeType 'blockArc'", - "Brace pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracePair'", - "Bracket pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracketPair'", - "Can shape. Corresponds to ECMA-376 ST_ShapeType 'can'", - "Chevron shape. Corresponds to ECMA-376 ST_ShapeType 'chevron'", - "Chord shape. Corresponds to ECMA-376 ST_ShapeType 'chord'", - "Cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloud'", - "Corner shape. Corresponds to ECMA-376 ST_ShapeType 'corner'", - "Cube shape. Corresponds to ECMA-376 ST_ShapeType 'cube'", - "Curved down arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedDownArrow'", - "Curved left arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedLeftArrow'", - "Curved right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedRightArrow'", - "Curved up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'curvedUpArrow'", - "Decagon shape. Corresponds to ECMA-376 ST_ShapeType 'decagon'", - "Diagonal stripe shape. Corresponds to ECMA-376 ST_ShapeType 'diagStripe'", - "Diamond shape. Corresponds to ECMA-376 ST_ShapeType 'diamond'", - "Dodecagon shape. Corresponds to ECMA-376 ST_ShapeType 'dodecagon'", - "Donut shape. Corresponds to ECMA-376 ST_ShapeType 'donut'", - "Double wave shape. Corresponds to ECMA-376 ST_ShapeType 'doubleWave'", - "Down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'downArrow'", - "Callout down arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'downArrowCallout'", - "Folded corner shape. Corresponds to ECMA-376 ST_ShapeType 'foldedCorner'", - "Frame shape. Corresponds to ECMA-376 ST_ShapeType 'frame'", - "Half frame shape. Corresponds to ECMA-376 ST_ShapeType 'halfFrame'", - "Heart shape. Corresponds to ECMA-376 ST_ShapeType 'heart'", - "Heptagon shape. Corresponds to ECMA-376 ST_ShapeType 'heptagon'", - "Hexagon shape. Corresponds to ECMA-376 ST_ShapeType 'hexagon'", - "Home plate shape. Corresponds to ECMA-376 ST_ShapeType 'homePlate'", - "Horizontal scroll shape. Corresponds to ECMA-376 ST_ShapeType\n'horizontalScroll'", - "Irregular seal 1 shape. Corresponds to ECMA-376 ST_ShapeType\n'irregularSeal1'", - "Irregular seal 2 shape. Corresponds to ECMA-376 ST_ShapeType\n'irregularSeal2'", - "Left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftArrow'", - "Callout left arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftArrowCallout'", - "Left brace shape. Corresponds to ECMA-376 ST_ShapeType 'leftBrace'", - "Left bracket shape. Corresponds to ECMA-376 ST_ShapeType 'leftBracket'", - "Left right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightArrow'", - "Callout left right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightArrowCallout'", - "Left right up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'leftRightUpArrow'", - "Left up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftUpArrow'", - "Lightning bolt shape. Corresponds to ECMA-376 ST_ShapeType\n'lightningBolt'", - "Divide math shape. Corresponds to ECMA-376 ST_ShapeType 'mathDivide'", - "Equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathEqual'", - "Minus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMinus'", - "Multiply math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMultiply'", - "Not equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathNotEqual'", - "Plus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathPlus'", - "Moon shape. Corresponds to ECMA-376 ST_ShapeType 'moon'", - "No smoking shape. Corresponds to ECMA-376 ST_ShapeType 'noSmoking'", - "Notched right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'notchedRightArrow'", - "Octagon shape. Corresponds to ECMA-376 ST_ShapeType 'octagon'", - "Parallelogram shape. Corresponds to ECMA-376 ST_ShapeType 'parallelogram'", - "Pentagon shape. Corresponds to ECMA-376 ST_ShapeType 'pentagon'", - "Pie shape. Corresponds to ECMA-376 ST_ShapeType 'pie'", - "Plaque shape. Corresponds to ECMA-376 ST_ShapeType 'plaque'", - "Plus shape. Corresponds to ECMA-376 ST_ShapeType 'plus'", - "Quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType 'quadArrow'", - "Callout quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'quadArrowCallout'", - "Ribbon shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon'", - "Ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon2'", - "Right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'rightArrow'", - "Callout right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'rightArrowCallout'", - "Right brace shape. Corresponds to ECMA-376 ST_ShapeType 'rightBrace'", - "Right bracket shape. Corresponds to ECMA-376 ST_ShapeType 'rightBracket'", - "One round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'round1Rect'", - "Two diagonal round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'round2DiagRect'", - "Two same-side round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'round2SameRect'", - "Right triangle shape. Corresponds to ECMA-376 ST_ShapeType 'rtTriangle'", - "Smiley face shape. Corresponds to ECMA-376 ST_ShapeType 'smileyFace'", - "One snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'snip1Rect'", - "Two diagonal snip corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snip2DiagRect'", - "Two same-side snip corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snip2SameRect'", - "One snip one round corner rectangle shape. Corresponds to ECMA-376\nST_ShapeType 'snipRoundRect'", - "Ten pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star10'", - "Twelve pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star12'", - "Sixteen pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star16'", - "Twenty four pointed star shape. Corresponds to ECMA-376 ST_ShapeType\n'star24'", - "Thirty two pointed star shape. Corresponds to ECMA-376 ST_ShapeType\n'star32'", - "Four pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star4'", - "Five pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star5'", - "Six pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star6'", - "Seven pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star7'", - "Eight pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star8'", - "Striped right arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'stripedRightArrow'", - "Sun shape. Corresponds to ECMA-376 ST_ShapeType 'sun'", - "Trapezoid shape. Corresponds to ECMA-376 ST_ShapeType 'trapezoid'", - "Triangle shape. Corresponds to ECMA-376 ST_ShapeType 'triangle'", - "Up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upArrow'", - "Callout up arrow shape. Corresponds to ECMA-376 ST_ShapeType\n'upArrowCallout'", - "Up down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upDownArrow'", - "U-turn arrow shape. Corresponds to ECMA-376 ST_ShapeType 'uturnArrow'", - "Vertical scroll shape. Corresponds to ECMA-376 ST_ShapeType\n'verticalScroll'", - "Wave shape. Corresponds to ECMA-376 ST_ShapeType 'wave'", - "Callout wedge ellipse shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeEllipseCallout'", - "Callout wedge rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeRectCallout'", - "Callout wedge round rectangle shape. Corresponds to ECMA-376 ST_ShapeType\n'wedgeRoundRectCallout'", - "Alternate process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartAlternateProcess'", - "Collate flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartCollate'", - "Connector flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartConnector'", - "Decision flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDecision'", - "Delay flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDelay'", - "Display flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDisplay'", - "Document flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartDocument'", - "Extract flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartExtract'", - "Input output flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartInputOutput'", - "Internal storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartInternalStorage'", - "Magnetic disk flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticDisk'", - "Magnetic drum flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticDrum'", - "Magnetic tape flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMagneticTape'", - "Manual input flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartManualInput'", - "Manual operation flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartManualOperation'", - "Merge flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMerge'", - "Multi-document flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartMultidocument'", - "Offline storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOfflineStorage'", - "Off-page connector flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOffpageConnector'", - "Online storage flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartOnlineStorage'", - "Or flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOr'", - "Predefined process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPredefinedProcess'", - "Preparation flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPreparation'", - "Process flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartProcess'", - "Punched card flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPunchedCard'", - "Punched tape flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartPunchedTape'", - "Sort flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartSort'", - "Summing junction flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartSummingJunction'", - "Terminator flow shape. Corresponds to ECMA-376 ST_ShapeType\n'flowChartTerminator'", - "East arrow shape.", - "Northeast arrow shape.", - "North arrow shape.", - "Speech shape.", - "Star burst shape.", - "Teardrop shape. Corresponds to ECMA-376 ST_ShapeType 'teardrop'", - "Ellipse ribbon shape. Corresponds to ECMA-376 ST_ShapeType\n'ellipseRibbon'", - "Ellipse ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType\n'ellipseRibbon2'", - "Callout cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloudCallout'", - "Custom shape." + "Scales and centers the image to fit within the bounds of the original\nshape and maintains the image's aspect ratio. The rendered size of the\nimage may be smaller than the size of the shape. This is the default\nmethod when one is not specified.", + "Scales and centers the image to fill the bounds of the original shape.\nThe image may be cropped in order to fill the shape. The rendered size of\nthe image will be the same as that of the original shape." ], - "type": "string" - }, - "placeholder": { - "description": "Placeholders are shapes that are inherit from corresponding placeholders on\nlayouts and masters.\n\nIf set, the shape is a placeholder shape and any inherited properties\ncan be resolved by looking at the parent placeholder identified by the\nPlaceholder.parent_object_id field.", - "$ref": "Placeholder" - } - }, - "id": "Shape" - }, - "BatchUpdatePresentationResponse": { - "description": "Response message from a batch update.", - "type": "object", - "properties": { - "presentationId": { - "description": "The presentation the updates were applied to.", - "type": "string" - }, - "replies": { - "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", - "type": "array", - "items": { - "$ref": "Response" - } - } - }, - "id": "BatchUpdatePresentationResponse" - }, - "ImageProperties": { - "description": "The properties of the Image.", - "type": "object", - "properties": { - "cropProperties": { - "description": "The crop properties of the image. If not set, the image is not cropped.\nThis property is read-only.", - "$ref": "CropProperties" - }, - "outline": { - "description": "The outline of the image. If not set, the the image has no outline.", - "$ref": "Outline" - }, - "shadow": { - "description": "The shadow of the image. If not set, the image has no shadow. This property\nis read-only.", - "$ref": "Shadow" - }, - "transparency": { - "description": "The transparency effect of the image. The value should be in the interval\n[0.0, 1.0], where 0 means no effect and 1 means completely transparent.\nThis property is read-only.", - "type": "number", - "format": "float" - }, - "contrast": { - "description": "The contrast effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", - "type": "number", - "format": "float" - }, - "link": { - "description": "The hyperlink destination of the image. If unset, there is no link.", - "$ref": "Link" - }, - "recolor": { - "description": "The recolor effect of the image. If not set, the image is not recolored.\nThis property is read-only.", - "$ref": "Recolor" - }, - "brightness": { - "description": "The brightness effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", - "type": "number", - "format": "float" - } - }, - "id": "ImageProperties" - }, - "Group": { - "description": "A PageElement kind representing a\njoined collection of PageElements.", - "type": "object", - "properties": { - "children": { - "description": "The collection of elements in the group. The minimum size of a group is 2.", - "type": "array", - "items": { - "$ref": "PageElement" - } - } - }, - "id": "Group" - }, - "Outline": { - "description": "The outline of a PageElement.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", - "type": "object", - "properties": { - "weight": { - "description": "The thickness of the outline.", - "$ref": "Dimension" - }, - "dashStyle": { - "description": "The dash style of the outline.", "enum": [ - "DASH_STYLE_UNSPECIFIED", - "SOLID", - "DOT", - "DASH", - "DASH_DOT", - "LONG_DASH", - "LONG_DASH_DOT" - ], - "enumDescriptions": [ - "Unspecified dash style.", - "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", - "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", - "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", - "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", - "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", - "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." + "CENTER_INSIDE", + "CENTER_CROP" ], + "description": "The replace method.", "type": "string" + } + } + }, + "Shadow": { + "id": "Shadow", + "description": "The shadow properties of a page element.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", + "type": "object", + "properties": { + "rotateWithShape": { + "description": "Whether the shadow should rotate with the shape.", + "type": "boolean" }, "propertyState": { - "description": "The outline property state.\n\nUpdating the the outline on a page element will implicitly update this\nfield to`RENDERED`, unless another value is specified in the same request.\nTo have no outline on a page element, set this field to `NOT_RENDERED`. In\nthis case, any other outline fields set in the same request will be\nignored.", - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" - ], + "description": "The shadow property state.\n\nUpdating the the shadow on a page element will implicitly update this field\nto `RENDERED`, unless another value is specified in the same request. To\nhave no shadow on a page element, set this field to `NOT_RENDERED`. In this\ncase, any other shadow fields set in the same request will be ignored.", + "type": "string", "enumDescriptions": [ "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." ], - "type": "string" - }, - "outlineFill": { - "description": "The fill of the outline.", - "$ref": "OutlineFill" - } - }, - "id": "Outline" - }, - "TableCell": { - "description": "Properties and contents of each table cell.", - "type": "object", - "properties": { - "text": { - "description": "The text content of the cell.", - "$ref": "TextContent" - }, - "location": { - "description": "The location of the cell within the table.", - "$ref": "TableCellLocation" - }, - "rowSpan": { - "description": "Row span of the cell.", - "type": "integer", - "format": "int32" - }, - "tableCellProperties": { - "description": "The properties of the table cell.", - "$ref": "TableCellProperties" - }, - "columnSpan": { - "description": "Column span of the cell.", - "type": "integer", - "format": "int32" - } - }, - "id": "TableCell" - }, - "ReplaceAllShapesWithImageResponse": { - "description": "The result of replacing shapes with an image.", - "type": "object", - "properties": { - "occurrencesChanged": { - "description": "The number of shapes replaced with images.", - "type": "integer", - "format": "int32" - } - }, - "id": "ReplaceAllShapesWithImageResponse" - }, - "CreateSlideRequest": { - "description": "Creates a new slide.", - "type": "object", - "properties": { - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" - }, - "insertionIndex": { - "description": "The optional zero-based index indicating where to insert the slides.\n\nIf you don't specify an index, the new slide is created at the end.", - "type": "integer", - "format": "int32" - }, - "slideLayoutReference": { - "description": "Layout reference of the slide to be inserted, based on the *current\nmaster*, which is one of the following:\n\n- The master of the previous slide index.\n- The master of the first slide, if the insertion_index is zero.\n- The first master in the presentation, if there are no slides.\n\nIf the LayoutReference is not found in the current master, a 400 bad\nrequest error is returned.\n\nIf you don't specify a layout reference, then the new slide will use the\npredefined layout `BLANK`.", - "$ref": "LayoutReference" - } - }, - "id": "CreateSlideRequest" - }, - "TableCellProperties": { - "description": "The properties of the TableCell.", - "type": "object", - "properties": { - "tableCellBackgroundFill": { - "description": "The background fill of the table cell. The default fill matches the fill\nfor newly created table cells in the Slides editor.", - "$ref": "TableCellBackgroundFill" - } - }, - "id": "TableCellProperties" - }, - "CreateTableResponse": { - "description": "The result of creating a table.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created table.", - "type": "string" - } - }, - "id": "CreateTableResponse" - }, - "Size": { - "description": "A width and height.", - "type": "object", - "properties": { - "width": { - "description": "The width of the object.", - "$ref": "Dimension" - }, - "height": { - "description": "The height of the object.", - "$ref": "Dimension" - } - }, - "id": "Size" - }, - "ColorScheme": { - "description": "The palette of predefined colors for a page.", - "type": "object", - "properties": { - "colors": { - "description": "The ThemeColorType and corresponding concrete color pairs.", - "type": "array", - "items": { - "$ref": "ThemeColorPair" - } - } - }, - "id": "ColorScheme" - }, - "ParagraphMarker": { - "description": "A TextElement kind that represents the beginning of a new paragraph.", - "type": "object", - "properties": { - "style": { - "description": "The paragraph's style", - "$ref": "ParagraphStyle" - }, - "bullet": { - "description": "The bullet for this paragraph. If not present, the paragraph does not\nbelong to a list.", - "$ref": "Bullet" - } - }, - "id": "ParagraphMarker" - }, - "CreateParagraphBulletsRequest": { - "description": "Creates bullets for all of the paragraphs that overlap with the given\ntext index range.\n\nThe nesting level of each paragraph will be determined by counting leading\ntabs in front of each paragraph. To avoid excess space between the bullet and\nthe corresponding paragraph, these leading tabs are removed by this request.\nThis may change the indices of parts of the text.\n\nIf the paragraph immediately before paragraphs being updated is in a list\nwith a matching preset, the paragraphs being updated are added to that\npreceding list.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the shape or table containing the text to add bullets to.", - "type": "string" - }, - "textRange": { - "description": "The range of text to apply the bullet presets to, based on TextElement indexes.", - "$ref": "Range" - }, - "bulletPreset": { - "description": "The kinds of bullet glyphs to be used. Defaults to the\n`BULLET_DISC_CIRCLE_SQUARE` preset.", "enum": [ - "BULLET_DISC_CIRCLE_SQUARE", - "BULLET_DIAMONDX_ARROW3D_SQUARE", - "BULLET_CHECKBOX", - "BULLET_ARROW_DIAMOND_DISC", - "BULLET_STAR_CIRCLE_SQUARE", - "BULLET_ARROW3D_CIRCLE_SQUARE", - "BULLET_LEFTTRIANGLE_DIAMOND_DISC", - "BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE", - "BULLET_DIAMOND_CIRCLE_SQUARE", - "NUMBERED_DIGIT_ALPHA_ROMAN", - "NUMBERED_DIGIT_ALPHA_ROMAN_PARENS", - "NUMBERED_DIGIT_NESTED", - "NUMBERED_UPPERALPHA_ALPHA_ROMAN", - "NUMBERED_UPPERROMAN_UPPERALPHA_DIGIT", - "NUMBERED_ZERODIGIT_ALPHA_ROMAN" - ], - "enumDescriptions": [ - "A bulleted list with a `DISC`, `CIRCLE` and `SQUARE` bullet glyph for the\nfirst 3 list nesting levels.", - "A bulleted list with a `DIAMONDX`, `ARROW3D` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with `CHECKBOX` bullet glyphs for all list nesting levels.", - "A bulleted list with a `ARROW`, `DIAMOND` and `DISC` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with a `STAR`, `CIRCLE` and `DISC` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with a `ARROW3D`, `CIRCLE` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with a `LEFTTRIANGLE`, `DIAMOND` and `DISC` bullet glyph\nfor the first 3 list nesting levels.", - "A bulleted list with a `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` bullet\nglyph for the first 3 list nesting levels.", - "A bulleted list with a `DIAMOND`, `CIRCLE` and `SQUARE` bullet glyph\nfor the first 3 list nesting levels.", - "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", - "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by parenthesis.", - "A numbered list with `DIGIT` numeric glyphs separated by periods, where\neach nesting level uses the previous nesting level's glyph as a prefix.\nFor example: '1.', '1.1.', '2.', '2.2.'.", - "A numbered list with `UPPERALPHA`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", - "A numbered list with `UPPERROMAN`, `UPPERALPHA` and `DIGIT` numeric glyphs\nfor the first 3 list nesting levels, followed by periods.", - "A numbered list with `ZERODIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods." - ], - "type": "string" + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ] }, - "cellLocation": { - "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table.", - "$ref": "TableCellLocation" - } - }, - "id": "CreateParagraphBulletsRequest" - }, - "SubstringMatchCriteria": { - "description": "A criteria that matches a specific string of text in a shape or table.", - "type": "object", - "properties": { - "text": { - "description": "The text to search for in the shape or table.", - "type": "string" - }, - "matchCase": { - "description": "Indicates whether the search should respect case:\n\n- `True`: the search is case sensitive.\n- `False`: the search is case insensitive.", - "type": "boolean" - } - }, - "id": "SubstringMatchCriteria" - }, - "WordArt": { - "description": "A PageElement kind representing\nword art.", - "type": "object", - "properties": { - "renderedText": { - "description": "The text rendered as word art.", - "type": "string" - } - }, - "id": "WordArt" - }, - "Range": { - "description": "Specifies a contiguous range of an indexed collection, such as characters in\ntext.", - "type": "object", - "properties": { - "endIndex": { - "description": "The optional zero-based index of the end of the collection.\nRequired for `SPECIFIC_RANGE` delete mode.", - "type": "integer", - "format": "int32" - }, - "startIndex": { - "description": "The optional zero-based index of the beginning of the collection.\nRequired for `SPECIFIC_RANGE` and `FROM_START_INDEX` ranges.", - "type": "integer", - "format": "int32" + "blurRadius": { + "$ref": "Dimension", + "description": "The radius of the shadow blur. The larger the radius, the more diffuse the\nshadow becomes." }, "type": { - "description": "The type of range.", "enum": [ - "RANGE_TYPE_UNSPECIFIED", - "FIXED_RANGE", - "FROM_START_INDEX", - "ALL" + "SHADOW_TYPE_UNSPECIFIED", + "OUTER" ], + "description": "The type of the shadow.", + "type": "string", "enumDescriptions": [ - "Unspecified range type. This value must not be used.", - "A fixed range. Both the `start_index` and\n`end_index` must be specified.", - "Starts the range at `start_index` and continues until the\nend of the collection. The `end_index` must not be specified.", - "Sets the range to be the whole length of the collection. Both the\n`start_index` and the `end_index` must not be\nspecified." + "Unspecified shadow type.", + "Outer shadow." + ] + }, + "transform": { + "description": "Transform that encodes the translate, scale, and skew of the shadow,\nrelative to the alignment position.", + "$ref": "AffineTransform" + }, + "alignment": { + "enumDescriptions": [ + "Unspecified.", + "Top left.", + "Top center.", + "Top right.", + "Left center.", + "Center.", + "Right center.", + "Bottom left.", + "Bottom center.", + "Bottom right." ], + "enum": [ + "RECTANGLE_POSITION_UNSPECIFIED", + "TOP_LEFT", + "TOP_CENTER", + "TOP_RIGHT", + "LEFT_CENTER", + "CENTER", + "RIGHT_CENTER", + "BOTTOM_LEFT", + "BOTTOM_CENTER", + "BOTTOM_RIGHT" + ], + "description": "The alignment point of the shadow, that sets the origin for translate,\nscale and skew of the shadow.", + "type": "string" + }, + "alpha": { + "description": "The alpha of the shadow's color, from 0.0 to 1.0.", + "format": "float", + "type": "number" + }, + "color": { + "description": "The shadow color value.", + "$ref": "OpaqueColor" + } + } + }, + "DeleteTableRowRequest": { + "description": "Deletes a row from a table.", + "type": "object", + "properties": { + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The reference table cell location from which a row will be deleted.\n\nThe row this cell spans will be deleted. If this is a merged cell, multiple\nrows will be deleted. If no rows remain in the table after this deletion,\nthe whole table is deleted." + }, + "tableObjectId": { + "description": "The table to delete rows from.", "type": "string" } }, - "id": "Range" + "id": "DeleteTableRowRequest" }, - "TableColumnProperties": { - "description": "Properties of each column in a table.", + "Bullet": { + "description": "Describes the bullet of a paragraph.", "type": "object", "properties": { - "columnWidth": { - "description": "Width of a column.", - "$ref": "Dimension" + "listId": { + "description": "The ID of the list this paragraph belongs to.", + "type": "string" + }, + "glyph": { + "description": "The rendered bullet glyph for this paragraph.", + "type": "string" + }, + "nestingLevel": { + "description": "The nesting level of this paragraph in the list.", + "format": "int32", + "type": "integer" + }, + "bulletStyle": { + "$ref": "TextStyle", + "description": "The paragraph specific text style applied to this bullet." } }, - "id": "TableColumnProperties" - }, - "Request": { - "description": "A single kind of update to apply to a presentation.", - "type": "object", - "properties": { - "createParagraphBullets": { - "description": "Creates bullets for paragraphs.", - "$ref": "CreateParagraphBulletsRequest" - }, - "insertTableColumns": { - "description": "Inserts columns into a table.", - "$ref": "InsertTableColumnsRequest" - }, - "createTable": { - "description": "Creates a new table.", - "$ref": "CreateTableRequest" - }, - "deleteText": { - "description": "Deletes text from a shape or a table cell.", - "$ref": "DeleteTextRequest" - }, - "replaceAllText": { - "description": "Replaces all instances of specified text.", - "$ref": "ReplaceAllTextRequest" - }, - "updateVideoProperties": { - "description": "Updates the properties of a Video.", - "$ref": "UpdateVideoPropertiesRequest" - }, - "insertText": { - "description": "Inserts text into a shape or table cell.", - "$ref": "InsertTextRequest" - }, - "deleteTableRow": { - "description": "Deletes a row from a table.", - "$ref": "DeleteTableRowRequest" - }, - "createLine": { - "description": "Creates a line.", - "$ref": "CreateLineRequest" - }, - "updateTextStyle": { - "description": "Updates the styling of text within a Shape or Table.", - "$ref": "UpdateTextStyleRequest" - }, - "insertTableRows": { - "description": "Inserts rows into a table.", - "$ref": "InsertTableRowsRequest" - }, - "updateTableCellProperties": { - "description": "Updates the properties of a TableCell.", - "$ref": "UpdateTableCellPropertiesRequest" - }, - "refreshSheetsChart": { - "description": "Refreshes a Google Sheets chart.", - "$ref": "RefreshSheetsChartRequest" - }, - "createSheetsChart": { - "description": "Creates an embedded Google Sheets chart.", - "$ref": "CreateSheetsChartRequest" - }, - "updatePageProperties": { - "description": "Updates the properties of a Page.", - "$ref": "UpdatePagePropertiesRequest" - }, - "updateShapeProperties": { - "description": "Updates the properties of a Shape.", - "$ref": "UpdateShapePropertiesRequest" - }, - "createSlide": { - "description": "Creates a new slide.", - "$ref": "CreateSlideRequest" - }, - "deleteObject": { - "description": "Deletes a page or page element from the presentation.", - "$ref": "DeleteObjectRequest" - }, - "createShape": { - "description": "Creates a new shape.", - "$ref": "CreateShapeRequest" - }, - "updatePageElementTransform": { - "description": "Updates the transform of a page element.", - "$ref": "UpdatePageElementTransformRequest" - }, - "updateSlidesPosition": { - "description": "Updates the position of a set of slides in the presentation.", - "$ref": "UpdateSlidesPositionRequest" - }, - "replaceAllShapesWithImage": { - "description": "Replaces all shapes matching some criteria with an image.", - "$ref": "ReplaceAllShapesWithImageRequest" - }, - "updateImageProperties": { - "description": "Updates the properties of an Image.", - "$ref": "UpdateImagePropertiesRequest" - }, - "createVideo": { - "description": "Creates a video.", - "$ref": "CreateVideoRequest" - }, - "createImage": { - "description": "Creates an image.", - "$ref": "CreateImageRequest" - }, - "duplicateObject": { - "description": "Duplicates a slide or page element.", - "$ref": "DuplicateObjectRequest" - }, - "deleteTableColumn": { - "description": "Deletes a column from a table.", - "$ref": "DeleteTableColumnRequest" - }, - "updateLineProperties": { - "description": "Updates the properties of a Line.", - "$ref": "UpdateLinePropertiesRequest" - } - }, - "id": "Request" - }, - "LineFill": { - "description": "The fill of the line.", - "type": "object", - "properties": { - "solidFill": { - "description": "Solid color fill.", - "$ref": "SolidFill" - } - }, - "id": "LineFill" + "id": "Bullet" }, "OutlineFill": { "description": "The fill of the outline.", @@ -3420,112 +3492,310 @@ }, "id": "OutlineFill" }, - "Bullet": { - "description": "Describes the bullet of a paragraph.", - "type": "object", + "TableCellLocation": { "properties": { - "nestingLevel": { - "description": "The nesting level of this paragraph in the list.", - "type": "integer", - "format": "int32" + "rowIndex": { + "description": "The 0-based row index.", + "format": "int32", + "type": "integer" }, - "glyph": { - "description": "The rendered bullet glyph for this paragraph.", - "type": "string" - }, - "bulletStyle": { - "description": "The paragraph specific text style applied to this bullet.", - "$ref": "TextStyle" - }, - "listId": { - "description": "The ID of the list this paragraph belongs to.", - "type": "string" + "columnIndex": { + "description": "The 0-based column index.", + "format": "int32", + "type": "integer" } }, - "id": "Bullet" + "id": "TableCellLocation", + "description": "A location of a single table cell within a table.", + "type": "object" + }, + "CreateLineResponse": { + "description": "The result of creating a line.", + "type": "object", + "properties": { + "objectId": { + "type": "string", + "description": "The object ID of the created line." + } + }, + "id": "CreateLineResponse" + }, + "ReplaceAllTextResponse": { + "properties": { + "occurrencesChanged": { + "description": "The number of occurrences changed by replacing all text.", + "format": "int32", + "type": "integer" + } + }, + "id": "ReplaceAllTextResponse", + "description": "The result of replacing text.", + "type": "object" + }, + "UpdateParagraphStyleRequest": { + "type": "object", + "properties": { + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The location of the cell in the table containing the paragraph(s) to\nstyle. If `object_id` refers to a table, `cell_location` must have a value.\nOtherwise, it must not." + }, + "style": { + "$ref": "ParagraphStyle", + "description": "The paragraph's style." + }, + "fields": { + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the paragraph alignment, set `fields` to\n`\"alignment\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "format": "google-fieldmask", + "type": "string" + }, + "objectId": { + "description": "The object ID of the shape or table with the text to be styled.", + "type": "string" + }, + "textRange": { + "$ref": "Range", + "description": "The range of text containing the paragraph(s) to style." + } + }, + "id": "UpdateParagraphStyleRequest", + "description": "Updates the styling for all of the paragraphs within a Shape or Table that\noverlap with the given text index range." + }, + "ColorScheme": { + "id": "ColorScheme", + "description": "The palette of predefined colors for a page.", + "type": "object", + "properties": { + "colors": { + "description": "The ThemeColorType and corresponding concrete color pairs.", + "type": "array", + "items": { + "$ref": "ThemeColorPair" + } + } + } } }, - "revision": "20161213", - "basePath": "", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", + "protocol": "rest", "canonicalName": "Slides", - "discoveryVersion": "v1", - "baseUrl": "https://slides.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/presentations": { + "description": "View and manage your Google Slides presentations" + }, + "https://www.googleapis.com/auth/presentations.readonly": { + "description": "View your Google Slides presentations" + }, + "https://www.googleapis.com/auth/spreadsheets.readonly": { + "description": "View your Google Spreadsheets" + }, + "https://www.googleapis.com/auth/drive": { + "description": "View and manage the files in your Google Drive" + }, + "https://www.googleapis.com/auth/drive.readonly": { + "description": "View the files in your Google Drive" + }, + "https://www.googleapis.com/auth/spreadsheets": { + "description": "View and manage your spreadsheets in Google Drive" + } + } + } + }, + "rootUrl": "https://slides.googleapis.com/", + "ownerDomain": "google.com", "name": "slides", + "batchPath": "batch", + "title": "Google Slides API", + "ownerName": "Google", + "resources": { + "presentations": { + "methods": { + "get": { + "id": "slides.presentations.get", + "path": "v1/presentations/{+presentationId}", + "description": "Gets the latest version of the specified presentation.", + "httpMethod": "GET", + "parameterOrder": [ + "presentationId" + ], + "response": { + "$ref": "Presentation" + }, + "parameters": { + "presentationId": { + "description": "The ID of the presentation to retrieve.", + "required": true, + "type": "string", + "pattern": "^[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/presentations.readonly" + ], + "flatPath": "v1/presentations/{presentationsId}" + }, + "create": { + "response": { + "$ref": "Presentation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/presentations" + ], + "parameters": {}, + "flatPath": "v1/presentations", + "path": "v1/presentations", + "id": "slides.presentations.create", + "description": "Creates a new presentation using the title given in the request. Other\nfields in the request are ignored.\nReturns the created presentation.", + "request": { + "$ref": "Presentation" + } + }, + "batchUpdate": { + "response": { + "$ref": "BatchUpdatePresentationResponse" + }, + "parameterOrder": [ + "presentationId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/spreadsheets.readonly" + ], + "parameters": { + "presentationId": { + "location": "path", + "description": "The presentation to apply the updates to.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/presentations/{presentationId}:batchUpdate", + "path": "v1/presentations/{presentationId}:batchUpdate", + "id": "slides.presentations.batchUpdate", + "description": "Applies one or more updates to the presentation.\n\nEach request is validated before\nbeing applied. If any request is not valid, then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how they are applied. Other requests do\nnot need to return information; these each return an empty reply.\nThe order of replies matches that of the requests.\n\nFor example, suppose you call batchUpdate with four updates, and only the\nthird one returns information. The response would have two empty replies:\nthe reply to the third request, and another empty reply, in that order.\n\nBecause other users may be editing the presentation, the presentation\nmight not exactly reflect your changes: your changes may\nbe altered with respect to collaborator changes. If there are no\ncollaborators, the presentation should reflect your changes. In any case,\nthe updates in your request are guaranteed to be applied together\natomically.", + "request": { + "$ref": "BatchUpdatePresentationRequest" + } + } + }, + "resources": { + "pages": { + "methods": { + "get": { + "path": "v1/presentations/{presentationId}/pages/{pageObjectId}", + "id": "slides.presentations.pages.get", + "description": "Gets the latest version of the specified page in the presentation.", + "response": { + "$ref": "Page" + }, + "parameterOrder": [ + "presentationId", + "pageObjectId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/presentations.readonly" + ], + "parameters": { + "presentationId": { + "required": true, + "type": "string", + "location": "path", + "description": "The ID of the presentation to retrieve." + }, + "pageObjectId": { + "description": "The object ID of the page to retrieve.", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}" + }, + "getThumbnail": { + "parameterOrder": [ + "presentationId", + "pageObjectId" + ], + "response": { + "$ref": "Thumbnail" + }, + "httpMethod": "GET", + "parameters": { + "pageObjectId": { + "location": "path", + "description": "The object ID of the page whose thumbnail to retrieve.", + "required": true, + "type": "string" + }, + "thumbnailProperties.mimeType": { + "description": "The optional mime type of the thumbnail image.\n\nIf you don't specify the mime type, the default mime type will be PNG.", + "type": "string", + "location": "query", + "enum": [ + "PNG" + ] + }, + "thumbnailProperties.thumbnailSize": { + "location": "query", + "enum": [ + "THUMBNAIL_SIZE_UNSPECIFIED", + "LARGE" + ], + "description": "The optional thumbnail image size.\n\nIf you don't specify the size, the server chooses a default size of the\nimage.", + "type": "string" + }, + "presentationId": { + "description": "The ID of the presentation to retrieve.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/presentations.readonly" + ], + "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", + "path": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", + "id": "slides.presentations.pages.getThumbnail", + "description": "Generates a thumbnail of the latest version of the specified page in the\npresentation and returns a URL to the thumbnail image." + } + } + } + } + } + }, "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" }, "prettyPrint": { "description": "Returns response with indentations and line breaks.", - "default": "true", "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", "location": "query" }, "uploadType": { @@ -3533,23 +3803,86 @@ "type": "string", "location": "query" }, - "bearer_token": { - "description": "OAuth bearer token.", + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "key": { + "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", "location": "query" }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "access_token": { + "description": "OAuth access token.", "type": "string", "location": "query" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Pretty-print response." + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" } }, - "documentationLink": "https://developers.google.com/slides/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v1", - "rootUrl": "https://slides.googleapis.com/", - "kind": "discovery#restDescription" + "baseUrl": "https://slides.googleapis.com/", + "servicePath": "", + "kind": "discovery#restDescription", + "description": "An API for creating and editing Google Slides presentations.", + "basePath": "", + "revision": "20170509", + "documentationLink": "https://developers.google.com/slides/", + "id": "slides:v1", + "discoveryVersion": "v1", + "version_module": "True" } diff --git a/etc/api/spectrum/v1explorer/spectrum-api.json b/etc/api/spectrum/v1explorer/spectrum-api.json index b118ec86c2..36919c406d 100644 --- a/etc/api/spectrum/v1explorer/spectrum-api.json +++ b/etc/api/spectrum/v1explorer/spectrum-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/7jsu-YTTnbrRYkb7WAMMQ1iBhP4\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/wuXXb8IGofo72qEZZoPGmfkdIx0\"", "discoveryVersion": "v1", "id": "spectrum:v1explorer", "name": "spectrum", "version": "v1explorer", - "revision": "20161116", + "revision": "20170306", "title": "Google Spectrum Database API", "description": "API for spectrum-management functions.", "ownerDomain": "google.com", diff --git a/etc/api/speech/v1beta1/speech-api.json b/etc/api/speech/v1beta1/speech-api.json index a54e0b9c60..c4c62d69ff 100644 --- a/etc/api/speech/v1beta1/speech-api.json +++ b/etc/api/speech/v1beta1/speech-api.json @@ -1,357 +1,10 @@ { "id": "speech:v1beta1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "description": "Google Cloud Speech API.", - "protocol": "rest", - "title": "Google Cloud Speech API", - "resources": { - "operations": { - "methods": { - "get": { - "id": "speech.operations.get", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "flatPath": "v1beta1/operations/{operationsId}", - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "required": true, - "pattern": "^[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/operations/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "speech.operations.list", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [], - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`.", - "flatPath": "v1beta1/operations", - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "The standard list page size.", - "location": "query", - "type": "integer", - "format": "int32" - }, - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation collection.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/operations", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "speech.operations.delete", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", - "flatPath": "v1beta1/operations/{operationsId}", - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "The name of the operation resource to be deleted.", - "required": true, - "pattern": "^[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/operations/{+name}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "cancel": { - "id": "speech.operations.cancel", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "request": { - "$ref": "CancelOperationRequest" - }, - "flatPath": "v1beta1/operations/{operationsId}:cancel", - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "required": true, - "pattern": "^[^/]+$", - "location": "path", - "type": "string" - } - }, - "path": "v1beta1/operations/{+name}:cancel", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "speech": { - "methods": { - "syncrecognize": { - "id": "speech.speech.syncrecognize", - "response": { - "$ref": "SyncRecognizeResponse" - }, - "parameterOrder": [], - "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", - "request": { - "$ref": "SyncRecognizeRequest" - }, - "flatPath": "v1beta1/speech:syncrecognize", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1/speech:syncrecognize", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "asyncrecognize": { - "id": "speech.speech.asyncrecognize", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "description": "Performs asynchronous speech recognition: receive results via the\n[google.longrunning.Operations]\n(/speech/reference/rest/v1beta1/operations#Operation)\ninterface. Returns either an\n`Operation.error` or an `Operation.response` which contains\nan `AsyncRecognizeResponse` message.", - "request": { - "$ref": "AsyncRecognizeRequest" - }, - "flatPath": "v1beta1/speech:asyncrecognize", - "httpMethod": "POST", - "parameters": {}, - "path": "v1beta1/speech:asyncrecognize", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - }, + "documentationLink": "https://cloud.google.com/speech/", + "revision": "20170516", + "discoveryVersion": "v1", + "version_module": "True", "schemas": { - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - } - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status" - }, - "RecognitionAudio": { - "description": "Contains audio data in the encoding specified in the `RecognitionConfig`.\nEither `content` or `uri` must be supplied. Supplying both or neither\nreturns google.rpc.Code.INVALID_ARGUMENT. See\n[audio limits](https://cloud.google.com/speech/limits#content).", - "type": "object", - "properties": { - "content": { - "description": "The audio data bytes encoded as specified in\n`RecognitionConfig`. Note: as with all bytes fields, protobuffers use a\npure binary representation, whereas JSON representations use base64.", - "type": "string", - "format": "byte" - }, - "uri": { - "description": "URI that points to a file that contains audio data bytes as specified in\n`RecognitionConfig`. Currently, only Google Cloud Storage URIs are\nsupported, which must be specified in the following format:\n`gs://bucket_name/object_name` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](https://cloud.google.com/storage/docs/reference-uris).", - "type": "string" - } - }, - "id": "RecognitionAudio" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - } - }, - "id": "Operation" - }, - "SpeechRecognitionAlternative": { - "description": "Alternative hypotheses (a.k.a. n-best list).", - "type": "object", - "properties": { - "transcript": { - "description": "[Output-only] Transcript text representing the words that the user spoke.", - "type": "string" - }, - "confidence": { - "description": "[Output-only] The confidence estimate between 0.0 and 1.0. A higher number\nmeans the system is more confident that the recognition is correct.\nThis field is typically provided only for the top hypothesis, and only for\n`is_final=true` results.\nThe default of 0.0 is a sentinel value indicating confidence was not set.", - "type": "number", - "format": "float" - } - }, - "id": "SpeechRecognitionAlternative" - }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "type": "object", - "properties": {}, - "id": "CancelOperationRequest" - }, - "RecognitionConfig": { - "description": "The `RecognitionConfig` message provides information to the recognizer\nthat specifies how to process the request.", - "type": "object", - "properties": { - "maxAlternatives": { - "description": "[Optional] Maximum number of recognition hypotheses to be returned.\nSpecifically, the maximum number of `SpeechRecognitionAlternative` messages\nwithin each `SpeechRecognitionResult`.\nThe server may return fewer than `max_alternatives`.\nValid values are `0`-`30`. A value of `0` or `1` will return a maximum of\n`1`. If omitted, defaults to `1`.", - "type": "integer", - "format": "int32" - }, - "languageCode": { - "description": "[Optional] The language of the supplied audio as a BCP-47 language tag.\nExample: \"en-GB\" https://www.rfc-editor.org/rfc/bcp/bcp47.txt\nIf omitted, defaults to \"en-US\". See\n[Language Support](https://cloud.google.com/speech/docs/languages)\nfor a list of the currently supported language codes.", - "type": "string" - }, - "speechContext": { - "description": "[Optional] A means to provide context to assist the speech recognition.", - "$ref": "SpeechContext" - }, - "encoding": { - "description": "[Required] Encoding of audio data sent in all `RecognitionAudio` messages.", - "enum": [ - "ENCODING_UNSPECIFIED", - "LINEAR16", - "FLAC", - "MULAW", - "AMR", - "AMR_WB" - ], - "enumDescriptions": [ - "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", - "Uncompressed 16-bit signed little-endian samples (Linear PCM).\nThis is the only encoding that may be used by `AsyncRecognize`.", - "This is the recommended encoding for `SyncRecognize` and\n`StreamingRecognize` because it uses lossless compression; therefore\nrecognition accuracy is not compromised by a lossy codec.\n\nThe stream FLAC (Free Lossless Audio Codec) encoding is specified at:\nhttp://flac.sourceforge.net/documentation.html.\n16-bit and 24-bit samples are supported.\nNot all fields in STREAMINFO are supported.", - "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.", - "Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz.", - "Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz." - ], - "type": "string" - }, - "profanityFilter": { - "description": "[Optional] If set to `true`, the server will attempt to filter out\nprofanities, replacing all but the initial character in each filtered word\nwith asterisks, e.g. \"f***\". If set to `false` or omitted, profanities\nwon't be filtered out.", - "type": "boolean" - }, - "sampleRate": { - "description": "[Required] Sample rate in Hertz of the audio data sent in all\n`RecognitionAudio` messages. Valid values are: 8000-48000.\n16000 is optimal. For best results, set the sampling rate of the audio\nsource to 16000 Hz. If that's not possible, use the native sample rate of\nthe audio source (instead of re-sampling).", - "type": "integer", - "format": "int32" - } - }, - "id": "RecognitionConfig" - }, - "SyncRecognizeRequest": { - "description": "`SyncRecognizeRequest` is the top-level message sent by the client for\nthe `SyncRecognize` method.", - "type": "object", - "properties": { - "audio": { - "description": "[Required] The audio data to be recognized.", - "$ref": "RecognitionAudio" - }, - "config": { - "description": "[Required] The `config` message provides information to the recognizer\nthat specifies how to process the request.", - "$ref": "RecognitionConfig" - } - }, - "id": "SyncRecognizeRequest" - }, - "SpeechRecognitionResult": { - "description": "A speech recognition result corresponding to a portion of the audio.", - "type": "object", - "properties": { - "alternatives": { - "description": "[Output-only] May contain one or more recognition hypotheses (up to the\nmaximum specified in `max_alternatives`).", - "type": "array", - "items": { - "$ref": "SpeechRecognitionAlternative" - } - } - }, - "id": "SpeechRecognitionResult" - }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "type": "object", @@ -370,18 +23,213 @@ }, "id": "ListOperationsResponse" }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "SpeechContext": { + "properties": { + "phrases": { + "description": "*Optional* A list of strings containing words and phrases \"hints\" so that\nthe speech recognition is more likely to recognize them. This can be used\nto improve the accuracy for specific words and phrases, for example, if\nspecific commands are typically spoken by the user. This can also be used\nto add additional words to the vocabulary of the recognizer. See\n[usage limits](https://cloud.google.com/speech/limits#content).", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "SpeechContext", + "description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases\nin the results.", + "type": "object" + }, + "SpeechRecognitionAlternative": { + "id": "SpeechRecognitionAlternative", + "description": "Alternative hypotheses (a.k.a. n-best list).", "type": "object", - "properties": {}, - "id": "Empty" + "properties": { + "confidence": { + "type": "number", + "description": "*Output-only* The confidence estimate between 0.0 and 1.0. A higher number\nindicates an estimated greater likelihood that the recognized words are\ncorrect. This field is typically provided only for the top hypothesis, and\nonly for `is_final=true` results. Clients should not rely on the\n`confidence` field as it is not guaranteed to be accurate, or even set, in\nany of the results.\nThe default of 0.0 is a sentinel value indicating `confidence` was not set.", + "format": "float" + }, + "transcript": { + "description": "*Output-only* Transcript text representing the words that the user spoke.", + "type": "string" + } + } + }, + "SpeechRecognitionResult": { + "description": "A speech recognition result corresponding to a portion of the audio.", + "type": "object", + "properties": { + "alternatives": { + "description": "*Output-only* May contain one or more recognition hypotheses (up to the\nmaximum specified in `max_alternatives`).", + "type": "array", + "items": { + "$ref": "SpeechRecognitionAlternative" + } + } + }, + "id": "SpeechRecognitionResult" + }, + "RecognitionAudio": { + "description": "Contains audio data in the encoding specified in the `RecognitionConfig`.\nEither `content` or `uri` must be supplied. Supplying both or neither\nreturns google.rpc.Code.INVALID_ARGUMENT. See\n[audio limits](https://cloud.google.com/speech/limits#content).", + "type": "object", + "properties": { + "content": { + "description": "The audio data bytes encoded as specified in\n`RecognitionConfig`. Note: as with all bytes fields, protobuffers use a\npure binary representation, whereas JSON representations use base64.", + "format": "byte", + "type": "string" + }, + "uri": { + "description": "URI that points to a file that contains audio data bytes as specified in\n`RecognitionConfig`. Currently, only Google Cloud Storage URIs are\nsupported, which must be specified in the following format:\n`gs://bucket_name/object_name` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](https://cloud.google.com/storage/docs/reference-uris).", + "type": "string" + } + }, + "id": "RecognitionAudio" + }, + "AsyncRecognizeRequest": { + "description": "The top-level message sent by the client for the `AsyncRecognize` method.", + "type": "object", + "properties": { + "config": { + "$ref": "RecognitionConfig", + "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." + }, + "audio": { + "$ref": "RecognitionAudio", + "description": "*Required* The audio data to be recognized." + } + }, + "id": "AsyncRecognizeRequest" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any." + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + } + }, + "id": "Operation" + }, + "RecognitionConfig": { + "description": "Provides information to the recognizer that specifies how to process the\nrequest.", + "type": "object", + "properties": { + "maxAlternatives": { + "description": "*Optional* Maximum number of recognition hypotheses to be returned.\nSpecifically, the maximum number of `SpeechRecognitionAlternative` messages\nwithin each `SpeechRecognitionResult`.\nThe server may return fewer than `max_alternatives`.\nValid values are `0`-`30`. A value of `0` or `1` will return a maximum of\none. If omitted, will return a maximum of one.", + "format": "int32", + "type": "integer" + }, + "sampleRate": { + "description": "*Required* Sample rate in Hertz of the audio data sent in all\n`RecognitionAudio` messages. Valid values are: 8000-48000.\n16000 is optimal. For best results, set the sampling rate of the audio\nsource to 16000 Hz. If that's not possible, use the native sample rate of\nthe audio source (instead of re-sampling).", + "format": "int32", + "type": "integer" + }, + "languageCode": { + "description": "*Optional* The language of the supplied audio as a BCP-47 language tag.\nExample: \"en-GB\" https://www.rfc-editor.org/rfc/bcp/bcp47.txt\nIf omitted, defaults to \"en-US\". See\n[Language Support](https://cloud.google.com/speech/docs/languages)\nfor a list of the currently supported language codes.", + "type": "string" + }, + "encoding": { + "enum": [ + "ENCODING_UNSPECIFIED", + "LINEAR16", + "FLAC", + "MULAW", + "AMR", + "AMR_WB" + ], + "description": "*Required* Encoding of audio data sent in all `RecognitionAudio` messages.", + "type": "string", + "enumDescriptions": [ + "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", + "Uncompressed 16-bit signed little-endian samples (Linear PCM).\nThis is the only encoding that may be used by `AsyncRecognize`.", + "This is the recommended encoding for `SyncRecognize` and\n`StreamingRecognize` because it uses lossless compression; therefore\nrecognition accuracy is not compromised by a lossy codec.\n\nThe stream FLAC (Free Lossless Audio Codec) encoding is specified at:\nhttp://flac.sourceforge.net/documentation.html.\n16-bit and 24-bit samples are supported.\nNot all fields in STREAMINFO are supported.", + "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.", + "Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz.", + "Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz." + ] + }, + "profanityFilter": { + "description": "*Optional* If set to `true`, the server will attempt to filter out\nprofanities, replacing all but the initial character in each filtered word\nwith asterisks, e.g. \"f***\". If set to `false` or omitted, profanities\nwon't be filtered out.", + "type": "boolean" + }, + "speechContext": { + "description": "*Optional* A means to provide context to assist the speech recognition.", + "$ref": "SpeechContext" + } + }, + "id": "RecognitionConfig" + }, + "SyncRecognizeRequest": { + "properties": { + "config": { + "$ref": "RecognitionConfig", + "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." + }, + "audio": { + "$ref": "RecognitionAudio", + "description": "*Required* The audio data to be recognized." + } + }, + "id": "SyncRecognizeRequest", + "description": "The top-level message sent by the client for the `SyncRecognize` method.", + "type": "object" + }, + "Status": { + "properties": { + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object" }, "SyncRecognizeResponse": { - "description": "`SyncRecognizeResponse` is the only message returned to the client by\n`SyncRecognize`. It contains the result as zero or more sequential\n`SpeechRecognitionResult` messages.", + "description": "The only message returned to the client by `SyncRecognize`. method. It\ncontains the result as zero or more sequential `SpeechRecognitionResult`\nmessages.", "type": "object", "properties": { "results": { - "description": "[Output-only] Sequential list of transcription results corresponding to\nsequential portions of audio.", + "description": "*Output-only* Sequential list of transcription results corresponding to\nsequential portions of audio.", "type": "array", "items": { "$ref": "SpeechRecognitionResult" @@ -390,123 +238,219 @@ }, "id": "SyncRecognizeResponse" }, - "SpeechContext": { - "description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases\nin the results.", + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", - "properties": { - "phrases": { - "description": "[Optional] A list of strings containing words and phrases \"hints\" so that\nthe speech recognition is more likely to recognize them. This can be used\nto improve the accuracy for specific words and phrases, for example, if\nspecific commands are typically spoken by the user. This can also be used\nto add additional words to the vocabulary of the recognizer. See\n[usage limits](https://cloud.google.com/speech/limits#content).", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "SpeechContext" - }, - "AsyncRecognizeRequest": { - "description": "`AsyncRecognizeRequest` is the top-level message sent by the client for\nthe `AsyncRecognize` method.", - "type": "object", - "properties": { - "audio": { - "description": "[Required] The audio data to be recognized.", - "$ref": "RecognitionAudio" - }, - "config": { - "description": "[Required] The `config` message provides information to the recognizer\nthat specifies how to process the request.", - "$ref": "RecognitionConfig" - } - }, - "id": "AsyncRecognizeRequest" + "properties": {}, + "id": "Empty" } }, - "revision": "20161213", - "basePath": "", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "version_module": "True", - "discoveryVersion": "v1", - "baseUrl": "https://speech.googleapis.com/", + "protocol": "rest", + "canonicalName": "Speech", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://speech.googleapis.com/", + "ownerDomain": "google.com", "name": "speech", + "batchPath": "batch", + "title": "Google Cloud Speech API", + "ownerName": "Google", + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string", + "pattern": "^[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/operations/{operationsId}:cancel", + "id": "speech.operations.cancel", + "path": "v1beta1/operations/{+name}:cancel" + }, + "delete": { + "parameters": { + "name": { + "pattern": "^[^/]+$", + "location": "path", + "description": "The name of the operation resource to be deleted.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/operations/{operationsId}", + "path": "v1beta1/operations/{+name}", + "id": "speech.operations.delete", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE" + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageSize": { + "location": "query", + "description": "The standard list page size.", + "format": "int32", + "type": "integer" + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "name": { + "location": "query", + "description": "The name of the operation collection.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + } + }, + "flatPath": "v1beta1/operations", + "path": "v1beta1/operations", + "id": "speech.operations.list" + }, + "get": { + "flatPath": "v1beta1/operations/{operationsId}", + "path": "v1beta1/operations/{+name}", + "id": "speech.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^[^/]+$" + } + } + } + } + }, + "speech": { + "methods": { + "asyncrecognize": { + "id": "speech.speech.asyncrecognize", + "path": "v1beta1/speech:asyncrecognize", + "description": "Performs asynchronous speech recognition: receive results via the\n[google.longrunning.Operations]\n(/speech/reference/rest/v1beta1/operations#Operation)\ninterface. Returns either an\n`Operation.error` or an `Operation.response` which contains\nan `AsyncRecognizeResponse` message.", + "request": { + "$ref": "AsyncRecognizeRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1beta1/speech:asyncrecognize" + }, + "syncrecognize": { + "flatPath": "v1beta1/speech:syncrecognize", + "id": "speech.speech.syncrecognize", + "path": "v1beta1/speech:syncrecognize", + "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", + "request": { + "$ref": "SyncRecognizeRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "SyncRecognizeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {} + } + } + } + }, "parameters": { + "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" + }, "access_token": { "description": "OAuth access token.", "type": "string", "location": "query" }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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": "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" }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" }, "oauth_token": { "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, "bearer_token": { "description": "OAuth bearer token.", "type": "string", @@ -516,14 +460,62 @@ "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" + }, + "prettyPrint": { + "type": "boolean", + "default": "true", + "location": "query", + "description": "Returns response with indentations and line breaks." + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] } }, - "documentationLink": "https://cloud.google.com/speech/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", "version": "v1beta1", - "rootUrl": "https://speech.googleapis.com/", - "kind": "discovery#restDescription" + "baseUrl": "https://speech.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Converts audio to text by applying powerful neural network models.", + "servicePath": "", + "basePath": "" } diff --git a/etc/api/sqladmin/v1beta3/sqladmin-api.json b/etc/api/sqladmin/v1beta3/sqladmin-api.json index 4b962baa60..a662282a72 100644 --- a/etc/api/sqladmin/v1beta3/sqladmin-api.json +++ b/etc/api/sqladmin/v1beta3/sqladmin-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/BnNZo7KjDfKGhFIvKuQEw2fnFCo\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/4l5UEDko5lyNw14LTVbzTd2NbJo\"", "discoveryVersion": "v1", "id": "sqladmin:v1beta3", "name": "sqladmin", "canonicalName": "SQL Admin", "version": "v1beta3", - "revision": "20161213", + "revision": "20170502", "title": "Cloud SQL Administration API", "description": "Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.", "ownerDomain": "google.com", diff --git a/etc/api/sqladmin/v1beta4/sqladmin-api.json b/etc/api/sqladmin/v1beta4/sqladmin-api.json index bc7b76ef17..84d47e930b 100644 --- a/etc/api/sqladmin/v1beta4/sqladmin-api.json +++ b/etc/api/sqladmin/v1beta4/sqladmin-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/zyhp6b48ey3HpDh3VFAj4lFLBFo\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/vS6rayCgu04tWkxAcCer7mqEHaA\"", "discoveryVersion": "v1", "id": "sqladmin:v1beta4", "name": "sqladmin", "canonicalName": "SQL Admin", "version": "v1beta4", - "revision": "20161213", + "revision": "20170502", "title": "Cloud SQL Administration API", "description": "Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.", "ownerDomain": "google.com", @@ -736,6 +736,17 @@ } } }, + "InstancesTruncateLogRequest": { + "id": "InstancesTruncateLogRequest", + "type": "object", + "description": "Instance truncate log request.", + "properties": { + "truncateLogContext": { + "$ref": "TruncateLogContext", + "description": "Contains details about the truncate log operation." + } + } + }, "IpConfiguration": { "id": "IpConfiguration", "type": "object", @@ -778,6 +789,21 @@ } } }, + "Labels": { + "id": "Labels", + "type": "object", + "description": "Reserved for future use.", + "properties": { + "key": { + "type": "string", + "description": "Reserved for future use." + }, + "value": { + "type": "string", + "description": "Reserved for future use." + } + } + }, "LocationPreference": { "id": "LocationPreference", "type": "object", @@ -951,8 +977,7 @@ "description": "Name of the database instance related to this operation." }, "targetLink": { - "type": "string", - "description": "The URI of the instance related to the operation." + "type": "string" }, "targetProject": { "type": "string", @@ -1088,6 +1113,10 @@ "type": "string" } }, + "availabilityType": { + "type": "string", + "description": "Reserved for future use." + }, "backupConfiguration": { "$ref": "BackupConfiguration", "description": "The daily backup configuration for the instance." @@ -1125,6 +1154,13 @@ "description": "This is always sql#settings.", "default": "sql#settings" }, + "labels": { + "type": "array", + "description": "Reserved for future use.", + "items": { + "$ref": "Labels" + } + }, "locationPreference": { "$ref": "LocationPreference", "description": "The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance. App Engine co-location is only applicable to First Generation instances." @@ -1155,6 +1191,11 @@ "type": "boolean", "description": "Configuration to increase storage size automatically. The default value is false. Applies only to Second Generation instances." }, + "storageAutoResizeLimit": { + "type": "string", + "description": "The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Applies only to Second Generation instances.", + "format": "int64" + }, "tier": { "type": "string", "description": "The tier of service for this instance, for example D1, D2. For more information, see pricing.", @@ -1345,6 +1386,22 @@ } } }, + "TruncateLogContext": { + "id": "TruncateLogContext", + "type": "object", + "description": "Database Instance truncate log context.", + "properties": { + "kind": { + "type": "string", + "description": "This is always sql#truncateLogContext.", + "default": "sql#truncateLogContext" + }, + "logType": { + "type": "string", + "description": "The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE." + } + } + }, "User": { "id": "User", "type": "object", @@ -1798,6 +1855,13 @@ "path": "flags", "httpMethod": "GET", "description": "List all available database flags for Google Cloud SQL instances.", + "parameters": { + "databaseVersion": { + "type": "string", + "description": "Database version for flag retrieval. Flags are specific to the database version.", + "location": "query" + } + }, "response": { "$ref": "FlagsListResponse" }, @@ -2039,6 +2103,11 @@ "httpMethod": "GET", "description": "Lists instances under a given project in the alphabetical order of the instance name.", "parameters": { + "filter": { + "type": "string", + "description": "Reserved for future use.", + "location": "query" + }, "maxResults": { "type": "integer", "description": "The maximum number of results to return per response.", @@ -2303,20 +2372,6 @@ "required": true, "location": "path" }, - "logType": { - "type": "string", - "description": "The type of Log Table to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE", - "required": true, - "enum": [ - "MYSQL_GENERAL_TABLE", - "MYSQL_SLOW_TABLE" - ], - "enumDescriptions": [ - "Truncate mysql.general_log table", - "Truncate mysql.slow_log table" - ], - "location": "query" - }, "project": { "type": "string", "description": "Project ID of the Cloud SQL project.", @@ -2326,9 +2381,11 @@ }, "parameterOrder": [ "project", - "instance", - "logType" + "instance" ], + "request": { + "$ref": "InstancesTruncateLogRequest" + }, "response": { "$ref": "Operation" }, diff --git a/etc/api/storage/v1/storage-api.json b/etc/api/storage/v1/storage-api.json index d859b90452..14f3bdc048 100644 --- a/etc/api/storage/v1/storage-api.json +++ b/etc/api/storage/v1/storage-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/ZBb2iLoDHuz7Rvww5u_HoO9Br24\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/E9KKVdX2PbBgsyioMFSF6I1HKp8\"", "discoveryVersion": "v1", "id": "storage:v1", "name": "storage", "version": "v1", - "revision": "20161123", + "revision": "20170504", "title": "Cloud Storage JSON API", "description": "Stores and retrieves potentially large, immutable data objects.", "ownerDomain": "google.com", @@ -108,6 +108,16 @@ ] } }, + "billing": { + "type": "object", + "description": "The bucket's billing configuration.", + "properties": { + "requesterPays": { + "type": "boolean", + "description": "When set to true, bucket is requester pays." + } + } + }, "cors": { "type": "array", "description": "The bucket's Cross-Origin Resource Sharing (CORS) configuration.", @@ -156,13 +166,21 @@ }, "id": { "type": "string", - "description": "The ID of the bucket." + "description": "The ID of the bucket. For buckets, the id and name properities are the same." }, "kind": { "type": "string", "description": "The kind of item this is. For buckets, this is always storage#bucket.", "default": "storage#bucket" }, + "labels": { + "type": "object", + "description": "User-provided labels, in key/value pairs.", + "additionalProperties": { + "type": "string", + "description": "An individual label entry." + } + }, "lifecycle": { "type": "object", "description": "The bucket's lifecycle configuration. See lifecycle management for more information.", @@ -541,6 +559,81 @@ } } }, + "Notification": { + "id": "Notification", + "type": "object", + "description": "A subscription to receive Google PubSub notifications.", + "properties": { + "custom_attributes": { + "type": "object", + "description": "An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.", + "additionalProperties": { + "type": "string" + } + }, + "etag": { + "type": "string", + "description": "HTTP 1.1 Entity tag for this subscription notification." + }, + "event_types": { + "type": "array", + "description": "If present, only send notifications about listed event types. If empty, sent notifications for all event types.", + "items": { + "type": "string" + } + }, + "id": { + "type": "string", + "description": "The ID of the notification." + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For notifications, this is always storage#notification.", + "default": "storage#notification" + }, + "object_name_prefix": { + "type": "string", + "description": "If present, only apply this notification configuration to object names that begin with this prefix." + }, + "payload_format": { + "type": "string", + "description": "The desired content of the Payload.", + "default": "JSON_API_V1" + }, + "selfLink": { + "type": "string", + "description": "The canonical URL of this notification." + }, + "topic": { + "type": "string", + "description": "The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'", + "annotations": { + "required": [ + "storage.notifications.insert" + ] + } + } + } + }, + "Notifications": { + "id": "Notifications", + "type": "object", + "description": "A list of notification subscriptions.", + "properties": { + "items": { + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "Notification" + } + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For lists of notifications, this is always storage#notifications.", + "default": "storage#notifications" + } + } + }, "Object": { "id": "Object", "type": "object", @@ -616,7 +709,7 @@ }, "id": { "type": "string", - "description": "The ID of the object." + "description": "The ID of the object, including the bucket name, object name, and generation number." }, "kind": { "type": "string", @@ -646,7 +739,7 @@ }, "name": { "type": "string", - "description": "The name of this object. Required if not specified by URL parameter." + "description": "The name of the object. Required if not specified by URL parameter." }, "owner": { "type": "object", @@ -829,6 +922,65 @@ } } }, + "Policy": { + "id": "Policy", + "type": "object", + "description": "A bucket/object IAM policy.", + "properties": { + "bindings": { + "type": "array", + "description": "An association between a role, which comes with a set of permissions, and members who may assume that role.", + "items": { + "type": "object", + "properties": { + "members": { + "type": "array", + "description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers — A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid — An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project", + "items": { + "type": "string" + }, + "annotations": { + "required": [ + "storage.buckets.setIamPolicy", + "storage.objects.setIamPolicy" + ] + } + }, + "role": { + "type": "string", + "description": "The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.\nThe new IAM roles are: \n- roles/storage.admin — Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator — Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.", + "annotations": { + "required": [ + "storage.buckets.setIamPolicy", + "storage.objects.setIamPolicy" + ] + } + } + } + }, + "annotations": { + "required": [ + "storage.buckets.setIamPolicy", + "storage.objects.setIamPolicy" + ] + } + }, + "etag": { + "type": "string", + "description": "HTTP 1.1 Entity tag for the policy.", + "format": "byte" + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.", + "default": "storage#policy" + }, + "resourceId": { + "type": "string", + "description": "The ID of the resource to which this policy belongs. Will be of the form buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input." + } + } + }, "RewriteResponse": { "id": "RewriteResponse", "type": "object", @@ -846,7 +998,7 @@ "objectSize": { "type": "string", "description": "The total size of the object being copied in bytes. This property is always present in the response.", - "format": "uint64" + "format": "int64" }, "resource": { "$ref": "Object", @@ -859,7 +1011,42 @@ "totalBytesRewritten": { "type": "string", "description": "The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.", - "format": "uint64" + "format": "int64" + } + } + }, + "ServiceAccount": { + "id": "ServiceAccount", + "type": "object", + "description": "A subscription to receive Google PubSub notifications.", + "properties": { + "email_address": { + "type": "string", + "description": "The ID of the notification." + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For notifications, this is always storage#notification.", + "default": "storage#serviceAccount" + } + } + }, + "TestIamPermissionsResponse": { + "id": "TestIamPermissionsResponse", + "type": "object", + "description": "A storage.(buckets|objects).testIamPermissions response.", + "properties": { + "kind": { + "type": "string", + "description": "The kind of item this is.", + "default": "storage#testIamPermissionsResponse" + }, + "permissions": { + "type": "array", + "description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets or objects. The supported permissions are as follows: \n- storage.buckets.delete — Delete bucket. \n- storage.buckets.get — Read bucket metadata. \n- storage.buckets.getIamPolicy — Read bucket IAM policy. \n- storage.buckets.create — Create bucket. \n- storage.buckets.list — List buckets. \n- storage.buckets.setIamPolicy — Update bucket IAM policy. \n- storage.buckets.update — Update bucket metadata. \n- storage.objects.delete — Delete object. \n- storage.objects.get — Read object data and metadata. \n- storage.objects.getIamPolicy — Read object IAM policy. \n- storage.objects.create — Create object. \n- storage.objects.list — List objects. \n- storage.objects.setIamPolicy — Update object IAM policy. \n- storage.objects.update — Update object metadata.", + "items": { + "type": "string" + } } } } @@ -884,6 +1071,11 @@ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -912,6 +1104,11 @@ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -937,6 +1134,11 @@ "description": "Name of a bucket.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -964,6 +1166,11 @@ "description": "Name of a bucket.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -994,6 +1201,11 @@ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1028,6 +1240,11 @@ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1072,6 +1289,11 @@ "description": "If set, only deletes the bucket if its metageneration does not match this value.", "format": "int64", "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1119,6 +1341,11 @@ "Omit owner, acl and defaultObjectAcl properties." ], "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1135,6 +1362,38 @@ "https://www.googleapis.com/auth/devstorage.read_write" ] }, + "getIamPolicy": { + "id": "storage.buckets.getIamPolicy", + "path": "b/{bucket}/iam", + "httpMethod": "GET", + "description": "Returns an IAM policy for the specified bucket.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, "insert": { "id": "storage.buckets.insert", "path": "b", @@ -1224,7 +1483,8 @@ "parameters": { "maxResults": { "type": "integer", - "description": "Maximum number of buckets to return.", + "description": "Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.", + "default": "1000", "format": "uint32", "minimum": "0", "location": "query" @@ -1349,6 +1609,11 @@ "Omit owner, acl and defaultObjectAcl properties." ], "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1365,6 +1630,79 @@ "https://www.googleapis.com/auth/devstorage.full_control" ] }, + "setIamPolicy": { + "id": "storage.buckets.setIamPolicy", + "path": "b/{bucket}/iam", + "httpMethod": "PUT", + "description": "Updates an IAM policy for the specified bucket.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket" + ], + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "testIamPermissions": { + "id": "storage.buckets.testIamPermissions", + "path": "b/{bucket}/iam/testPermissions", + "httpMethod": "GET", + "description": "Tests a set of permissions on the given bucket to see which, if any, are held by the caller.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "permissions": { + "type": "string", + "description": "Permissions to test.", + "required": true, + "repeated": true, + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "permissions" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, "update": { "id": "storage.buckets.update", "path": "b/{bucket}", @@ -1441,6 +1779,11 @@ "Omit owner, acl and defaultObjectAcl properties." ], "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1499,6 +1842,11 @@ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1527,6 +1875,11 @@ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1552,6 +1905,11 @@ "description": "Name of a bucket.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1591,6 +1949,11 @@ "description": "If present, only return default ACL listing if the bucket's current metageneration does not match the given value.", "format": "int64", "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1621,6 +1984,11 @@ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1655,6 +2023,11 @@ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1674,6 +2047,148 @@ } } }, + "notifications": { + "methods": { + "delete": { + "id": "storage.notifications.delete", + "path": "b/{bucket}/notificationConfigs/{notification}", + "httpMethod": "DELETE", + "description": "Permanently deletes a notification subscription.", + "parameters": { + "bucket": { + "type": "string", + "description": "The parent bucket of the notification.", + "required": true, + "location": "path" + }, + "notification": { + "type": "string", + "description": "ID of the notification to delete.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "notification" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "get": { + "id": "storage.notifications.get", + "path": "b/{bucket}/notificationConfigs/{notification}", + "httpMethod": "GET", + "description": "View a notification configuration.", + "parameters": { + "bucket": { + "type": "string", + "description": "The parent bucket of the notification.", + "required": true, + "location": "path" + }, + "notification": { + "type": "string", + "description": "Notification ID", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "notification" + ], + "response": { + "$ref": "Notification" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "insert": { + "id": "storage.notifications.insert", + "path": "b/{bucket}/notificationConfigs", + "httpMethod": "POST", + "description": "Creates a notification subscription for a given bucket.", + "parameters": { + "bucket": { + "type": "string", + "description": "The parent bucket of the notification.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket" + ], + "request": { + "$ref": "Notification" + }, + "response": { + "$ref": "Notification" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "list": { + "id": "storage.notifications.list", + "path": "b/{bucket}/notificationConfigs", + "httpMethod": "GET", + "description": "Retrieves a list of notification subscriptions for a given bucket.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of a GCS bucket.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket" + ], + "response": { + "$ref": "Notifications" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + } + } + }, "objectAccessControls": { "methods": { "delete": { @@ -1705,6 +2220,11 @@ "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1746,6 +2266,11 @@ "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1784,6 +2309,11 @@ "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1824,6 +2354,11 @@ "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1867,6 +2402,11 @@ "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1914,6 +2454,11 @@ "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -1986,6 +2531,11 @@ "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", "format": "int64", "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -2123,6 +2673,11 @@ "description": "Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -2192,6 +2747,11 @@ "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -2264,6 +2824,11 @@ "Omit the owner, acl property." ], "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -2283,6 +2848,51 @@ "supportsMediaDownload": true, "useMediaDownloadService": true }, + "getIamPolicy": { + "id": "storage.objects.getIamPolicy", + "path": "b/{bucket}/o/{object}/iam", + "httpMethod": "GET", + "description": "Returns an IAM policy for the specified object.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "object" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, "insert": { "id": "storage.objects.insert", "path": "b/{bucket}/o", @@ -2362,6 +2972,11 @@ "Omit the owner, acl property." ], "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -2416,7 +3031,8 @@ }, "maxResults": { "type": "integer", - "description": "Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items.", + "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", + "default": "1000", "format": "uint32", "minimum": "0", "location": "query" @@ -2444,6 +3060,11 @@ ], "location": "query" }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + }, "versions": { "type": "boolean", "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", @@ -2546,6 +3167,11 @@ "Omit the owner, acl property." ], "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -2691,6 +3317,11 @@ "description": "Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", "required": true, "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -2711,6 +3342,105 @@ "https://www.googleapis.com/auth/devstorage.read_write" ] }, + "setIamPolicy": { + "id": "storage.objects.setIamPolicy", + "path": "b/{bucket}/o/{object}/iam", + "httpMethod": "PUT", + "description": "Updates an IAM policy for the specified object.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "object" + ], + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "testIamPermissions": { + "id": "storage.objects.testIamPermissions", + "path": "b/{bucket}/o/{object}/iam/testPermissions", + "httpMethod": "GET", + "description": "Tests a set of permissions on the given object to see which, if any, are held by the caller.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", + "required": true, + "location": "path" + }, + "permissions": { + "type": "string", + "description": "Permissions to test.", + "required": true, + "repeated": true, + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "object", + "permissions" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, "update": { "id": "storage.objects.update", "path": "b/{bucket}/o/{object}", @@ -2792,6 +3522,11 @@ "Omit the owner, acl property." ], "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" } }, "parameterOrder": [ @@ -2830,7 +3565,8 @@ }, "maxResults": { "type": "integer", - "description": "Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items.", + "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", + "default": "1000", "format": "uint32", "minimum": "0", "location": "query" @@ -2858,6 +3594,11 @@ ], "location": "query" }, + "userProject": { + "type": "string", + "description": "The project number to be billed for this request, for Requester Pays buckets.", + "location": "query" + }, "versions": { "type": "boolean", "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", @@ -2884,6 +3625,41 @@ "supportsSubscription": true } } + }, + "projects": { + "resources": { + "serviceAccount": { + "methods": { + "get": { + "id": "storage.projects.serviceAccount.get", + "path": "projects/{projectId}/serviceAccount", + "httpMethod": "GET", + "description": "Get the email address of this project's GCS service account.", + "parameters": { + "projectId": { + "type": "string", + "description": "Project ID", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ServiceAccount" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + } + } + } + } } } } diff --git a/etc/api/storage/v1beta1/storage-api.json b/etc/api/storage/v1beta1/storage-api.json index 3d18729e6a..2aaa30eaf6 100644 --- a/etc/api/storage/v1beta1/storage-api.json +++ b/etc/api/storage/v1beta1/storage-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/hHmFumE4Lpos1zYExrRPmmPIXog\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/jikgYIg7WHi_WqPxt3uQ44ROkr0\"", "discoveryVersion": "v1", "id": "storage:v1beta1", "name": "storage", "version": "v1beta1", - "revision": "20161123", + "revision": "20170504", "title": "Cloud Storage JSON API", "description": "Lets you store and retrieve potentially-large, immutable data objects.", "ownerDomain": "google.com", diff --git a/etc/api/storage/v1beta2/storage-api.json b/etc/api/storage/v1beta2/storage-api.json index 75e0c5d42c..1c52a6b70b 100644 --- a/etc/api/storage/v1beta2/storage-api.json +++ b/etc/api/storage/v1beta2/storage-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/HwvP9LO29WwMjJL7HrnyitnxVTc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/0kIaWvHqlQET4TuEh_GC4_E_fow\"", "discoveryVersion": "v1", "id": "storage:v1beta2", "name": "storage", "version": "v1beta2", - "revision": "20161123", + "revision": "20170504", "title": "Cloud Storage JSON API", "description": "Lets you store and retrieve potentially-large, immutable data objects.", "ownerDomain": "google.com", diff --git a/etc/api/storagetransfer/v1/storagetransfer-api.json b/etc/api/storagetransfer/v1/storagetransfer-api.json index c58c018184..b1c189621a 100644 --- a/etc/api/storagetransfer/v1/storagetransfer-api.json +++ b/etc/api/storagetransfer/v1/storagetransfer-api.json @@ -1,1034 +1,1077 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/fmXUMBI6Gn2x3crK-Doz-fh96kI\"", - "discoveryVersion": "v1", - "id": "storagetransfer:v1", - "name": "storagetransfer", - "version": "v1", - "revision": "20150811", - "title": "Google Storage Transfer API", - "description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/storage/transfer", - "protocol": "rest", - "baseUrl": "https://storagetransfer.googleapis.com/", - "basePath": "", - "rootUrl": "https://storagetransfer.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "version_module": true, - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "schemas": { - "GoogleServiceAccount": { - "id": "GoogleServiceAccount", - "type": "object", - "description": "Google service account", - "properties": { - "accountEmail": { - "type": "string", - "description": "Required." - } - } - }, - "TransferJob": { - "id": "TransferJob", - "type": "object", - "description": "This resource represents the configuration of a transfer job that runs periodically.", - "properties": { - "name": { - "type": "string", - "description": "A globally unique name assigned by Storage Transfer Service when the job is created. This field should be left empty in requests to create a new transfer job; otherwise, the requests result in an `INVALID_ARGUMENT` error." + "version_module": "True", + "resources": { + "googleServiceAccounts": { + "methods": { + "get": { + "path": "v1/googleServiceAccounts/{projectId}", + "id": "storagetransfer.googleServiceAccounts.get", + "description": "Returns the Google service account that is used by Storage Transfer\nService to access buckets in the project where transfers\nrun or in other projects. Each Google service account is associated\nwith one Google Cloud Platform Console project. Users\nshould add this service account to the Google Cloud Storage bucket\nACLs to grant access to Storage Transfer Service. This service\naccount is created and owned by Storage Transfer Service and can\nonly be used by Storage Transfer Service.", + "response": { + "$ref": "GoogleServiceAccount" + }, + "httpMethod": "GET", + "parameterOrder": [ + "projectId" + ], + "parameters": { + "projectId": { + "description": "The ID of the Google Cloud Platform Console project that the Google service\naccount is associated with.\nRequired.", + "required": true, + "type": "string", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/googleServiceAccounts/{projectId}" + } + } }, - "description": { - "type": "string", - "description": "A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded." - }, - "projectId": { - "type": "string", - "description": "The ID of the Google Developers Console project that owns the job. Required." - }, - "transferSpec": { - "$ref": "TransferSpec", - "description": "Transfer specification. Required." - }, - "schedule": { - "$ref": "Schedule", - "description": "Schedule specification. Required." - }, - "status": { - "type": "string", - "description": "Status of the job. This value MUST be specified for `CreateTransferJobRequests`. NOTE: The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from `ENABLED` to `DISABLED`, and an operation spawned by the transfer is running, the status change would not affect the current operation.", - "enum": [ - "STATUS_UNSPECIFIED", - "ENABLED", - "DISABLED", - "DELETED" - ] - }, - "creationTime": { - "type": "string", - "description": "This field cannot be changed by user requests." - }, - "lastModificationTime": { - "type": "string", - "description": "This field cannot be changed by user requests." - }, - "deletionTime": { - "type": "string", - "description": "This field cannot be changed by user requests." - } - } - }, - "TransferSpec": { - "id": "TransferSpec", - "type": "object", - "description": "Configuration for running a transfer.", - "properties": { - "gcsDataSource": { - "$ref": "GcsData", - "description": "A Google Cloud Storage data source." - }, - "awsS3DataSource": { - "$ref": "AwsS3Data", - "description": "An AWS S3 data source." - }, - "httpDataSource": { - "$ref": "HttpData", - "description": "An HTTP URL data source." - }, - "gcsDataSink": { - "$ref": "GcsData", - "description": "A Google Cloud Storage data sink." - }, - "objectConditions": { - "$ref": "ObjectConditions", - "description": "Only objects that satisfy these object conditions are included in the set of data source and data sink objects. Object conditions based on objects' `lastModificationTime` do not exclude objects in a data sink." - }, - "transferOptions": { - "$ref": "TransferOptions", - "description": "If the option `deleteObjectsUniqueInSink` is `true`, object conditions based on objects' `lastModificationTime` are ignored and do not exclude objects in a data source or a data sink." - } - } - }, - "GcsData": { - "id": "GcsData", - "type": "object", - "description": "In a GcsData, an object's name is the Google Cloud Storage object's name and its `lastModificationTime` refers to the object's updated time, which changes when the content or the metadata of the object is updated.", - "properties": { - "bucketName": { - "type": "string", - "description": "Google Cloud Storage bucket name (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Required." - } - } - }, - "AwsS3Data": { - "id": "AwsS3Data", - "type": "object", - "description": "An AwsS3Data can be a data source, but not a data sink. In an AwsS3Data, an object's name is the S3 object's key name.", - "properties": { - "bucketName": { - "type": "string", - "description": "S3 Bucket name (see [Creating a bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). Required." - }, - "awsAccessKey": { - "$ref": "AwsAccessKey", - "description": "AWS access key used to sign the API requests to the AWS S3 bucket. Permissions on the bucket must be granted to the access ID of the AWS access key. Required." - } - } - }, - "AwsAccessKey": { - "id": "AwsAccessKey", - "type": "object", - "description": "AWS access key (see [AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).", - "properties": { - "accessKeyId": { - "type": "string", - "description": "AWS access key ID. Required." - }, - "secretAccessKey": { - "type": "string", - "description": "AWS secret access key. This field is not returned in RPC responses. Required." - } - } - }, - "HttpData": { - "id": "HttpData", - "type": "object", - "description": "An HttpData specifies a list of objects on the web to be transferred over HTTP. The information of the objects to be transferred is contained in a file referenced by a URL. The first line in the file must be \"TsvHttpData-1.0\", which specifies the format of the file. Subsequent lines specify the information of the list of objects, one object per list entry. Each entry has the following tab-delimited fields: * HTTP URL * Length * MD5 - This field is a base64-encoded MD5 hash of the object An HTTP URL that points to the object to be transferred. It must be a valid URL with URL scheme HTTP or HTTPS. When an object with URL `http(s)://hostname:port/` is transferred to the data sink, the name of the object at the data sink is `/`. Length and MD5 provide the size and the base64-encoded MD5 hash of the object. If Length does not match the actual length of the object fetched, the object will not be transferred. If MD5 does not match the MD5 computed from the transferred bytes, the object transfer will fail. `lastModificationTime` is not available in HttpData objects. The objects that the URL list points to must allow public access. Storage Transfer Service obeys `robots.txt` rules and requires the HTTP server to support Range requests and to return a Content-Length header in each response.", - "properties": { - "listUrl": { - "type": "string", - "description": "The URL that points to the file that stores the object list entries. This file must allow public access. Currently, only URLs with HTTP and HTTPS schemes are supported. Required." - } - } - }, - "ObjectConditions": { - "id": "ObjectConditions", - "type": "object", - "description": "Conditions that determine which objects will be transferred.", - "properties": { - "minTimeElapsedSinceLastModification": { - "type": "string", - "description": "If unspecified, `minTimeElapsedSinceLastModification` takes a zero value and `maxTimeElapsedSinceLastModification` takes the maximum possible value of Duration. Objects that satisfy the object conditions must either have a `lastModificationTime` greater or equal to `NOW` - `maxTimeElapsedSinceLastModification` and less than `NOW` - `minTimeElapsedSinceLastModification`, or not have a `lastModificationTime`." - }, - "maxTimeElapsedSinceLastModification": { - "type": "string", - "description": "`maxTimeElapsedSinceLastModification` is the complement to `minTimeElapsedSinceLastModification`." - }, - "includePrefixes": { - "type": "array", - "description": "If `includePrefixes` is specified, objects that satisfy the object conditions must have names that start with one of the `includePrefixes` and that do not start with any of the `excludePrefixes`. If `includePrefixes` is not specified, all objects except those that have names starting with one of the `excludePrefixes` must satisfy the object conditions. Requirements: * Each include-prefix and exclude-prefix can contain any sequence of Unicode characters, of max length 1024 bytes when UTF8-encoded, and must not contain Carriage Return or Line Feed characters. Wildcard matching and regular expression matching are not supported. * None of the include-prefix or the exclude-prefix values can be empty, if specified. * Each include-prefix must include a distinct portion of the object namespace, i.e., no include-prefix may be a prefix of another include-prefix. * Each exclude-prefix must exclude a distinct portion of the object namespace, i.e., no exclude-prefix may be a prefix of another exclude-prefix. * If `includePrefixes` is specified, then each exclude-prefix must start with the value of a path explicitly included by `includePrefixes`. The max size of `includePrefixes` is 20.", - "items": { - "type": "string" - } - }, - "excludePrefixes": { - "type": "array", - "description": "`excludePrefixes` must follow the requirements described for `includePrefixes`. The max size of `excludePrefixes` is 20.", - "items": { - "type": "string" - } - } - } - }, - "TransferOptions": { - "id": "TransferOptions", - "type": "object", - "description": "TransferOptions uses three boolean parameters to define the actions to be performed on objects in a transfer.", - "properties": { - "overwriteObjectsAlreadyExistingInSink": { - "type": "boolean", - "description": "Whether overwriting objects that already exist in the sink is allowed." - }, - "deleteObjectsUniqueInSink": { - "type": "boolean", - "description": "Whether objects that exist only in the sink should be deleted." - }, - "deleteObjectsFromSourceAfterTransfer": { - "type": "boolean", - "description": "Whether objects should be deleted from the source after they are transferred to the sink." - } - } - }, - "Schedule": { - "id": "Schedule", - "type": "object", - "description": "Transfers can be scheduled to recur or to run just once.", - "properties": { - "scheduleStartDate": { - "$ref": "Date", - "description": "The first day the recurring transfer is scheduled to run. Required." - }, - "scheduleEndDate": { - "$ref": "Date", - "description": "The last day the recurring transfer will be run. If `scheduleEndDate` is the same as `scheduleStartDate`, the transfer will be executed only once." - }, - "startTimeOfDay": { - "$ref": "TimeOfDay", - "description": "The time in UTC at which the transfer will be scheduled to start in a day. Transfers may start later than this time. If not specified, transfers are scheduled to start at midnight UTC." - } - } - }, - "Date": { - "id": "Date", - "type": "object", - "description": "Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.", - "properties": { - "year": { - "type": "integer", - "description": "Year of date. Must be from 1 to 9,999, or 0 if specifying a date without a year.", - "format": "int32" - }, - "month": { - "type": "integer", - "description": "Month of year of date. Must be from 1 to 12.", - "format": "int32" - }, - "day": { - "type": "integer", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not sigificant.", - "format": "int32" - } - } - }, - "TimeOfDay": { - "id": "TimeOfDay", - "type": "object", - "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may chose to allow leap seconds. Related types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`.", - "properties": { - "hours": { - "type": "integer", - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", - "format": "int32" - }, - "minutes": { - "type": "integer", - "description": "Minutes of hour of day. Must be from 0 to 59.", - "format": "int32" - }, - "seconds": { - "type": "integer", - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", - "format": "int32" - }, - "nanos": { - "type": "integer", - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", - "format": "int32" - } - } - }, - "UpdateTransferJobRequest": { - "id": "UpdateTransferJobRequest", - "type": "object", - "description": "Request passed to UpdateTransferJob.", - "properties": { - "projectId": { - "type": "string", - "description": "The ID of the Google Developers Console project that owns the job. Required." - }, - "transferJob": { - "$ref": "TransferJob", - "description": "The job to update. Required." - }, - "updateTransferJobFieldMask": { - "type": "string", - "description": "The field mask of the fields in `transferJob` that are to be updated in this request. Fields in `transferJob` that can be updated are: `description`, `transferSpec`, and `status`. To update the `transferSpec` of the job, a complete transfer specification has to be provided. An incomplete specification which misses any required fields will be rejected with the error `INVALID_ARGUMENT`." - } - } - }, - "ListTransferJobsResponse": { - "id": "ListTransferJobsResponse", - "type": "object", - "description": "Response from ListTransferJobs.", - "properties": { "transferJobs": { - "type": "array", - "description": "A list of transfer jobs.", - "items": { - "$ref": "TransferJob" - } - }, - "nextPageToken": { - "type": "string", - "description": "The list next page token." - } - } - }, - "PauseTransferOperationRequest": { - "id": "PauseTransferOperationRequest", - "type": "object", - "description": "Request passed to PauseTransferOperation." - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "ResumeTransferOperationRequest": { - "id": "ResumeTransferOperationRequest", - "type": "object", - "description": "Request passed to ResumeTransferOperation." - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "properties": { - "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping above, the `name` should have the format of `operations/some/unique/name`." - }, - "metadata": { - "type": "object", - "description": "Represents the transfer operation object.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @ype with type URL." - } - }, - "done": { - "type": "boolean", - "description": "If the value is `false`, it means the operation is still in progress. If true, the operation is completed and the `result` is available." - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure." - }, - "response": { - "type": "object", - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @ype with type URL." - } - } - } - }, - "Status": { - "id": "Status", - "type": "object", - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", - "properties": { - "code": { - "type": "integer", - "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].", - "format": "int32" - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." - }, - "details": { - "type": "array", - "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @ype with type URL." + "methods": { + "patch": { + "request": { + "$ref": "UpdateTransferJobRequest" + }, + "description": "Updates a transfer job. Updating a job's transfer spec does not affect\ntransfer operations that are running already. Updating the scheduling\nof a job is not allowed.", + "httpMethod": "PATCH", + "parameterOrder": [ + "jobName" + ], + "response": { + "$ref": "TransferJob" + }, + "parameters": { + "jobName": { + "description": "The name of job to update.\nRequired.", + "required": true, + "type": "string", + "pattern": "^transferJobs/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferJobs/{transferJobsId}", + "id": "storagetransfer.transferJobs.patch", + "path": "v1/{+jobName}" + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "TransferJob" + }, + "parameterOrder": [ + "jobName" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "jobName": { + "description": "The job to get.\nRequired.", + "required": true, + "type": "string", + "pattern": "^transferJobs/.+$", + "location": "path" + }, + "projectId": { + "location": "query", + "description": "The ID of the Google Cloud Platform Console project that owns the job.\nRequired.", + "type": "string" + } + }, + "flatPath": "v1/transferJobs/{transferJobsId}", + "id": "storagetransfer.transferJobs.get", + "path": "v1/{+jobName}", + "description": "Gets a transfer job." + }, + "list": { + "description": "Lists transfer jobs.", + "response": { + "$ref": "ListTransferJobsResponse" + }, + "httpMethod": "GET", + "parameterOrder": [], + "parameters": { + "filter": { + "location": "query", + "description": "A list of query parameters specified as JSON text in the form of\n{\"project_id\":\"my_project_id\",\n\"job_names\":[\"jobid1\",\"jobid2\",...],\n\"job_statuses\":[\"status1\",\"status2\",...]}.\nSince `job_names` and `job_statuses` support multiple values, their values\nmust be specified with array notation. `project_id` is required. `job_names`\nand `job_statuses` are optional. The valid values for `job_statuses` are\ncase-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.", + "type": "string" + }, + "pageToken": { + "description": "The list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "The list page size. The max allowed value is 256.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferJobs", + "path": "v1/transferJobs", + "id": "storagetransfer.transferJobs.list" + }, + "create": { + "path": "v1/transferJobs", + "id": "storagetransfer.transferJobs.create", + "description": "Creates a transfer job that runs periodically.", + "request": { + "$ref": "TransferJob" + }, + "response": { + "$ref": "TransferJob" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1/transferJobs" + } + } + }, + "transferOperations": { + "methods": { + "pause": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "pattern": "^transferOperations/.+$", + "location": "path", + "description": "The name of the transfer operation.\nRequired.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferOperations/{transferOperationsId}:pause", + "path": "v1/{+name}:pause", + "id": "storagetransfer.transferOperations.pause", + "request": { + "$ref": "PauseTransferOperationRequest" + }, + "description": "Pauses a transfer operation." + }, + "delete": { + "description": "This method is not supported and the server returns `UNIMPLEMENTED`.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "required": true, + "type": "string", + "pattern": "^transferOperations/.+$", + "location": "path" + } + }, + "flatPath": "v1/transferOperations/{transferOperationsId}", + "id": "storagetransfer.transferOperations.delete", + "path": "v1/{+name}" + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "pattern": "^transferOperations$", + "location": "path", + "description": "The value `transferOperations`.", + "required": true, + "type": "string" + }, + "pageToken": { + "description": "The list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "The list page size. The max allowed value is 256.", + "format": "int32", + "type": "integer" + }, + "filter": { + "description": "A list of query parameters specified as JSON text in the form of {\\\"project_id\\\" : \\\"my_project_id\\\", \\\"job_names\\\" : [\\\"jobid1\\\", \\\"jobid2\\\",...], \\\"operation_names\\\" : [\\\"opid1\\\", \\\"opid2\\\",...], \\\"transfer_statuses\\\":[\\\"status1\\\", \\\"status2\\\",...]}. Since `job_names`, `operation_names`, and `transfer_statuses` support multiple values, they must be specified with array notation. `job_names`, `operation_names`, and `transfer_statuses` are optional.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferOperations", + "id": "storagetransfer.transferOperations.list", + "path": "v1/{+name}", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`." + }, + "resume": { + "id": "storagetransfer.transferOperations.resume", + "path": "v1/{+name}:resume", + "request": { + "$ref": "ResumeTransferOperationRequest" + }, + "description": "Resumes a transfer operation that is paused.", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "description": "The name of the transfer operation.\nRequired.", + "required": true, + "type": "string", + "pattern": "^transferOperations/.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferOperations/{transferOperationsId}:resume" + }, + "cancel": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^transferOperations/.+$", + "location": "path", + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/transferOperations/{transferOperationsId}:cancel", + "id": "storagetransfer.transferOperations.cancel", + "path": "v1/{+name}:cancel", + "description": "Cancels a transfer. Use the get method to check whether the cancellation succeeded or whether the operation completed despite cancellation." + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^transferOperations/.+$", + "location": "path", + "description": "The name of the operation resource.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/transferOperations/{transferOperationsId}", + "id": "storagetransfer.transferOperations.get", + "path": "v1/{+name}" + } } - } } - } }, - "ListOperationsResponse": { - "id": "ListOperationsResponse", - "type": "object", - "description": "The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].", - "properties": { - "operations": { - "type": "array", - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - } + "parameters": { + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" }, - "nextPageToken": { - "type": "string", - "description": "The standard List next-page token." - } - } - }, - "TransferOperation": { - "id": "TransferOperation", - "type": "object", - "description": "A description of the execution of a transfer.", - "properties": { - "name": { - "type": "string", - "description": "A globally unique ID assigned by the system." - }, - "projectId": { - "type": "string", - "description": "The ID of the Google Developers Console project that owns the operation. Required." - }, - "transferSpec": { - "$ref": "TransferSpec", - "description": "Transfer specification. Required." - }, - "startTime": { - "type": "string", - "description": "Start time of this transfer execution." - }, - "endTime": { - "type": "string", - "description": "End time of this transfer execution." - }, - "status": { - "type": "string", - "description": "Status of the transfer operation.", - "enum": [ - "STATUS_UNSPECIFIED", - "IN_PROGRESS", - "PAUSED", - "SUCCESS", - "FAILED", - "ABORTED" - ] - }, - "counters": { - "$ref": "TransferCounters", - "description": "Information about the progress of the transfer operation." - }, - "errorBreakdowns": { - "type": "array", - "description": "Summarizes errors encountered with sample error log entries.", - "items": { - "$ref": "ErrorSummary" - } - }, - "transferJobName": { - "type": "string", - "description": "The name of the transfer job that triggers this transfer operation." - } - } - }, - "TransferCounters": { - "id": "TransferCounters", - "type": "object", - "description": "A collection of counters that report the progress of a transfer operation.", - "properties": { - "objectsFoundFromSource": { - "type": "string", - "description": "Objects found in the data source that are scheduled to be transferred, which will be copied, excluded based on conditions, or skipped due to failures.", - "format": "int64" - }, - "bytesFoundFromSource": { - "type": "string", - "description": "Bytes found in the data source that are scheduled to be transferred, which will be copied, excluded based on conditions, or skipped due to failures.", - "format": "int64" - }, - "objectsFoundOnlyFromSink": { - "type": "string", - "description": "Objects found only in the data sink that are scheduled to be deleted.", - "format": "int64" - }, - "bytesFoundOnlyFromSink": { - "type": "string", - "description": "Bytes found only in the data sink that are scheduled to be deleted.", - "format": "int64" - }, - "objectsFromSourceSkippedBySync": { - "type": "string", - "description": "Objects in the data source that are not transferred because they already exist in the data sink.", - "format": "int64" - }, - "bytesFromSourceSkippedBySync": { - "type": "string", - "description": "Bytes in the data source that are not transferred because they already exist in the data sink.", - "format": "int64" - }, - "objectsCopiedToSink": { - "type": "string", - "description": "Objects that are copied to the data sink.", - "format": "int64" - }, - "bytesCopiedToSink": { - "type": "string", - "description": "Bytes that are copied to the data sink.", - "format": "int64" - }, - "objectsDeletedFromSource": { - "type": "string", - "description": "Objects that are deleted from the data source.", - "format": "int64" - }, - "bytesDeletedFromSource": { - "type": "string", - "description": "Bytes that are deleted from the data source.", - "format": "int64" - }, - "objectsDeletedFromSink": { - "type": "string", - "description": "Objects that are deleted from the data sink.", - "format": "int64" - }, - "bytesDeletedFromSink": { - "type": "string", - "description": "Bytes that are deleted from the data sink.", - "format": "int64" - }, - "objectsFromSourceFailed": { - "type": "string", - "description": "Objects in the data source that failed during the transfer.", - "format": "int64" - }, - "bytesFromSourceFailed": { - "type": "string", - "description": "Bytes in the data source that failed during the transfer.", - "format": "int64" - }, - "objectsFailedToDeleteFromSink": { - "type": "string", - "description": "Objects that failed to be deleted from the data sink.", - "format": "int64" - }, - "bytesFailedToDeleteFromSink": { - "type": "string", - "description": "Bytes that failed to be deleted from the data sink.", - "format": "int64" - } - } - }, - "ErrorSummary": { - "id": "ErrorSummary", - "type": "object", - "description": "A summary of errors by error code, plus a count and sample error log entries.", - "properties": { - "errorCode": { - "type": "string", - "description": "Required.", - "enum": [ - "OK", - "CANCELLED", - "UNKNOWN", - "INVALID_ARGUMENT", - "DEADLINE_EXCEEDED", - "NOT_FOUND", - "ALREADY_EXISTS", - "PERMISSION_DENIED", - "UNAUTHENTICATED", - "RESOURCE_EXHAUSTED", - "FAILED_PRECONDITION", - "ABORTED", - "OUT_OF_RANGE", - "UNIMPLEMENTED", - "INTERNAL", - "UNAVAILABLE", - "DATA_LOSS" - ] - }, - "errorCount": { - "type": "string", - "description": "Count of this type of error. Required.", - "format": "int64" - }, - "errorLogEntries": { - "type": "array", - "description": "Error samples.", - "items": { - "$ref": "ErrorLogEntry" - } - } - } - }, - "ErrorLogEntry": { - "id": "ErrorLogEntry", - "type": "object", - "description": "An entry describing an error that has occurred.", - "properties": { - "url": { - "type": "string", - "description": "A URL that refers to the target (a data source, a data sink, or an object) with which the error is associated. Required." - }, - "errorDetails": { - "type": "array", - "description": "A list of messages that carry the error details.", - "items": { + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", "type": "string" - } + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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" + }, + "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" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" } - } - } - }, - "resources": { - "googleServiceAccounts": { - "methods": { - "get": { - "id": "storagetransfer.googleServiceAccounts.get", - "path": "v1/googleServiceAccounts/{projectId}", - "httpMethod": "GET", - "description": "Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Developers Console project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service.", - "parameters": { - "projectId": { - "type": "string", - "description": "The ID of the Google Developers Console project that the Google service account is associated with. Required.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "GoogleServiceAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } }, - "v1": { - "methods": { - "getGoogleServiceAccount": { - "id": "storagetransfer.getGoogleServiceAccount", - "path": "v1:getGoogleServiceAccount", - "httpMethod": "GET", - "description": "Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Developers Console project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service.", - "parameters": { - "projectId": { - "type": "string", - "description": "The ID of the Google Developers Console project that the Google service account is associated with. Required.", - "location": "query" + "schemas": { + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "type": "array", + "items": { + "$ref": "Operation" + } + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListOperationsResponse" + }, + "GoogleServiceAccount": { + "description": "Google service account", + "type": "object", + "properties": { + "accountEmail": { + "description": "Required.", + "type": "string" + } + }, + "id": "GoogleServiceAccount" + }, + "TimeOfDay": { + "id": "TimeOfDay", + "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "minutes": { + "description": "Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + }, + "hours": { + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + } } - }, - "response": { - "$ref": "GoogleServiceAccount" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + }, + "ErrorLogEntry": { + "id": "ErrorLogEntry", + "description": "An entry describing an error that has occurred.", + "type": "object", + "properties": { + "url": { + "description": "A URL that refers to the target (a data source, a data sink,\nor an object) with which the error is associated.\nRequired.", + "type": "string" + }, + "errorDetails": { + "description": "A list of messages that carry the error details.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "TransferJob": { + "id": "TransferJob", + "description": "This resource represents the configuration of a transfer job that runs\nperiodically.", + "type": "object", + "properties": { + "name": { + "description": "A globally unique name assigned by Storage Transfer Service when the\njob is created. This field should be left empty in requests to create a new\ntransfer job; otherwise, the requests result in an `INVALID_ARGUMENT`\nerror.", + "type": "string" + }, + "deletionTime": { + "description": "This field cannot be changed by user requests.", + "format": "google-datetime", + "type": "string" + }, + "lastModificationTime": { + "description": "This field cannot be changed by user requests.", + "format": "google-datetime", + "type": "string" + }, + "projectId": { + "description": "The ID of the Google Cloud Platform Console project that owns the job.\nRequired.", + "type": "string" + }, + "description": { + "description": "A description provided by the user for the job. Its max length is 1024\nbytes when Unicode-encoded.", + "type": "string" + }, + "creationTime": { + "description": "This field cannot be changed by user requests.", + "format": "google-datetime", + "type": "string" + }, + "transferSpec": { + "$ref": "TransferSpec", + "description": "Transfer specification.\nRequired." + }, + "status": { + "enumDescriptions": [ + "Zero is an illegal value.", + "New transfers will be performed based on the schedule.", + "New transfers will not be scheduled.", + "This is a soft delete state. After a transfer job is set to this\nstate, the job and all the transfer executions are subject to\ngarbage collection." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "ENABLED", + "DISABLED", + "DELETED" + ], + "description": "Status of the job. This value MUST be specified for\n`CreateTransferJobRequests`.\n\nNOTE: The effect of the new job status takes place during a subsequent job\nrun. For example, if you change the job status from `ENABLED` to\n`DISABLED`, and an operation spawned by the transfer is running, the status\nchange would not affect the current operation.", + "type": "string" + }, + "schedule": { + "description": "Schedule specification.\nRequired.", + "$ref": "Schedule" + } + } + }, + "Schedule": { + "description": "Transfers can be scheduled to recur or to run just once.", + "type": "object", + "properties": { + "scheduleEndDate": { + "$ref": "Date", + "description": "The last day the recurring transfer will be run. If `scheduleEndDate`\nis the same as `scheduleStartDate`, the transfer will be executed only\nonce." + }, + "startTimeOfDay": { + "description": "The time in UTC at which the transfer will be scheduled to start in a day.\nTransfers may start later than this time. If not specified, recurring and\none-time transfers that are scheduled to run today will run immediately;\nrecurring transfers that are scheduled to run on a future date will start\nat approximately midnight UTC on that date. Note that when configuring a\ntransfer with the Cloud Platform Console, the transfer's start time in a\nday is specified in your local timezone.", + "$ref": "TimeOfDay" + }, + "scheduleStartDate": { + "$ref": "Date", + "description": "The first day the recurring transfer is scheduled to run. If\n`scheduleStartDate` is in the past, the transfer will run for the first\ntime on the following day.\nRequired." + } + }, + "id": "Schedule" + }, + "Date": { + "id": "Date", + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "year": { + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "format": "int32", + "type": "integer" + }, + "day": { + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of year. Must be from 1 to 12.", + "format": "int32", + "type": "integer" + } + } + }, + "TransferOperation": { + "description": "A description of the execution of a transfer.", + "type": "object", + "properties": { + "startTime": { + "description": "Start time of this transfer execution.", + "format": "google-datetime", + "type": "string" + }, + "transferJobName": { + "description": "The name of the transfer job that triggers this transfer operation.", + "type": "string" + }, + "transferSpec": { + "description": "Transfer specification.\nRequired.", + "$ref": "TransferSpec" + }, + "counters": { + "$ref": "TransferCounters", + "description": "Information about the progress of the transfer operation." + }, + "status": { + "enumDescriptions": [ + "Zero is an illegal value.", + "In progress.", + "Paused.", + "Completed successfully.", + "Terminated due to an unrecoverable failure.", + "Aborted by the user." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "IN_PROGRESS", + "PAUSED", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "description": "Status of the transfer operation.", + "type": "string" + }, + "errorBreakdowns": { + "description": "Summarizes errors encountered with sample error log entries.", + "type": "array", + "items": { + "$ref": "ErrorSummary" + } + }, + "name": { + "description": "A globally unique ID assigned by the system.", + "type": "string" + }, + "projectId": { + "description": "The ID of the Google Cloud Platform Console project that owns the operation.\nRequired.", + "type": "string" + }, + "endTime": { + "description": "End time of this transfer execution.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "TransferOperation" + }, + "AwsS3Data": { + "description": "An AwsS3Data can be a data source, but not a data sink.\nIn an AwsS3Data, an object's name is the S3 object's key name.", + "type": "object", + "properties": { + "bucketName": { + "description": "S3 Bucket name (see\n[Creating a bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).\nRequired.", + "type": "string" + }, + "awsAccessKey": { + "description": "AWS access key used to sign the API requests to the AWS S3 bucket.\nPermissions on the bucket must be granted to the access ID of the\nAWS access key.\nRequired.", + "$ref": "AwsAccessKey" + } + }, + "id": "AwsS3Data" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "AwsAccessKey": { + "description": "AWS access key (see\n[AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).", + "type": "object", + "properties": { + "secretAccessKey": { + "description": "AWS secret access key. This field is not returned in RPC responses.\nRequired.", + "type": "string" + }, + "accessKeyId": { + "description": "AWS access key ID.\nRequired.", + "type": "string" + } + }, + "id": "AwsAccessKey" + }, + "PauseTransferOperationRequest": { + "description": "Request passed to PauseTransferOperation.", + "type": "object", + "properties": {}, + "id": "PauseTransferOperationRequest" + }, + "TransferCounters": { + "id": "TransferCounters", + "description": "A collection of counters that report the progress of a transfer operation.", + "type": "object", + "properties": { + "bytesFoundOnlyFromSink": { + "description": "Bytes found only in the data sink that are scheduled to be deleted.", + "format": "int64", + "type": "string" + }, + "objectsDeletedFromSource": { + "description": "Objects that are deleted from the data source.", + "format": "int64", + "type": "string" + }, + "bytesCopiedToSink": { + "description": "Bytes that are copied to the data sink.", + "format": "int64", + "type": "string" + }, + "bytesFoundFromSource": { + "description": "Bytes found in the data source that are scheduled to be transferred,\nwhich will be copied, excluded based on conditions, or skipped due to\nfailures.", + "format": "int64", + "type": "string" + }, + "objectsFromSourceSkippedBySync": { + "description": "Objects in the data source that are not transferred because they already\nexist in the data sink.", + "format": "int64", + "type": "string" + }, + "bytesDeletedFromSource": { + "description": "Bytes that are deleted from the data source.", + "format": "int64", + "type": "string" + }, + "objectsFoundFromSource": { + "description": "Objects found in the data source that are scheduled to be transferred,\nwhich will be copied, excluded based on conditions, or skipped due to\nfailures.", + "format": "int64", + "type": "string" + }, + "objectsFailedToDeleteFromSink": { + "description": "Objects that failed to be deleted from the data sink.", + "format": "int64", + "type": "string" + }, + "objectsFoundOnlyFromSink": { + "description": "Objects found only in the data sink that are scheduled to be deleted.", + "format": "int64", + "type": "string" + }, + "objectsDeletedFromSink": { + "description": "Objects that are deleted from the data sink.", + "format": "int64", + "type": "string" + }, + "bytesFromSourceSkippedBySync": { + "description": "Bytes in the data source that are not transferred because they already\nexist in the data sink.", + "format": "int64", + "type": "string" + }, + "bytesFailedToDeleteFromSink": { + "description": "Bytes that failed to be deleted from the data sink.", + "format": "int64", + "type": "string" + }, + "bytesDeletedFromSink": { + "description": "Bytes that are deleted from the data sink.", + "format": "int64", + "type": "string" + }, + "bytesFromSourceFailed": { + "description": "Bytes in the data source that failed during the transfer.", + "format": "int64", + "type": "string" + }, + "objectsCopiedToSink": { + "description": "Objects that are copied to the data sink.", + "format": "int64", + "type": "string" + }, + "objectsFromSourceFailed": { + "description": "Objects in the data source that failed during the transfer.", + "format": "int64", + "type": "string" + } + } + }, + "ErrorSummary": { + "description": "A summary of errors by error code, plus a count and sample error log\nentries.", + "type": "object", + "properties": { + "errorCode": { + "description": "Required.", + "type": "string", + "enumDescriptions": [ + "Not an error; returned on success\n\nHTTP Mapping: 200 OK", + "The operation was cancelled, typically by the caller.\n\nHTTP Mapping: 499 Client Closed Request", + "Unknown error. For example, this error may be returned when\na `Status` value received from another address space belongs to\nan error space that is not known in this address space. Also\nerrors raised by APIs that do not return enough error information\nmay be converted to this error.\n\nHTTP Mapping: 500 Internal Server Error", + "The client specified an invalid argument. Note that this differs\nfrom `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments\nthat are problematic regardless of the state of the system\n(e.g., a malformed file name).\n\nHTTP Mapping: 400 Bad Request", + "The deadline expired before the operation could complete. For operations\nthat change the state of the system, this error may be returned\neven if the operation has completed successfully. For example, a\nsuccessful response from a server could have been delayed long\nenough for the deadline to expire.\n\nHTTP Mapping: 504 Gateway Timeout", + "Some requested entity (e.g., file or directory) was not found.\n\nNote to server developers: if a request is denied for an entire class\nof users, such as gradual feature rollout or undocumented whitelist,\n`NOT_FOUND` may be used. If a request is denied for some users within\na class of users, such as user-based access control, `PERMISSION_DENIED`\nmust be used.\n\nHTTP Mapping: 404 Not Found", + "The entity that a client attempted to create (e.g., file or directory)\nalready exists.\n\nHTTP Mapping: 409 Conflict", + "The caller does not have permission to execute the specified\noperation. `PERMISSION_DENIED` must not be used for rejections\ncaused by exhausting some resource (use `RESOURCE_EXHAUSTED`\ninstead for those errors). `PERMISSION_DENIED` must not be\nused if the caller can not be identified (use `UNAUTHENTICATED`\ninstead for those errors). This error code does not imply the\nrequest is valid or the requested entity exists or satisfies\nother pre-conditions.\n\nHTTP Mapping: 403 Forbidden", + "The request does not have valid authentication credentials for the\noperation.\n\nHTTP Mapping: 401 Unauthorized", + "Some resource has been exhausted, perhaps a per-user quota, or\nperhaps the entire file system is out of space.\n\nHTTP Mapping: 429 Too Many Requests", + "The operation was rejected because the system is not in a state\nrequired for the operation's execution. For example, the directory\nto be deleted is non-empty, an rmdir operation is applied to\na non-directory, etc.\n\nService implementors can use the following guidelines to decide\nbetween `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:\n (a) Use `UNAVAILABLE` if the client can retry just the failing call.\n (b) Use `ABORTED` if the client should retry at a higher level\n (e.g., when a client-specified test-and-set fails, indicating the\n client should restart a read-modify-write sequence).\n (c) Use `FAILED_PRECONDITION` if the client should not retry until\n the system state has been explicitly fixed. E.g., if an \"rmdir\"\n fails because the directory is non-empty, `FAILED_PRECONDITION`\n should be returned since the client should not retry unless\n the files are deleted from the directory.\n\nHTTP Mapping: 400 Bad Request", + "The operation was aborted, typically due to a concurrency issue such as\na sequencer check failure or transaction abort.\n\nSee the guidelines above for deciding between `FAILED_PRECONDITION`,\n`ABORTED`, and `UNAVAILABLE`.\n\nHTTP Mapping: 409 Conflict", + "The operation was attempted past the valid range. E.g., seeking or\nreading past end-of-file.\n\nUnlike `INVALID_ARGUMENT`, this error indicates a problem that may\nbe fixed if the system state changes. For example, a 32-bit file\nsystem will generate `INVALID_ARGUMENT` if asked to read at an\noffset that is not in the range [0,2^32-1], but it will generate\n`OUT_OF_RANGE` if asked to read from an offset past the current\nfile size.\n\nThere is a fair bit of overlap between `FAILED_PRECONDITION` and\n`OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific\nerror) when it applies so that callers who are iterating through\na space can easily look for an `OUT_OF_RANGE` error to detect when\nthey are done.\n\nHTTP Mapping: 400 Bad Request", + "The operation is not implemented or is not supported/enabled in this\nservice.\n\nHTTP Mapping: 501 Not Implemented", + "Internal errors. This means that some invariants expected by the\nunderlying system have been broken. This error code is reserved\nfor serious errors.\n\nHTTP Mapping: 500 Internal Server Error", + "The service is currently unavailable. This is most likely a\ntransient condition, which can be corrected by retrying with\na backoff.\n\nSee the guidelines above for deciding between `FAILED_PRECONDITION`,\n`ABORTED`, and `UNAVAILABLE`.\n\nHTTP Mapping: 503 Service Unavailable", + "Unrecoverable data loss or corruption.\n\nHTTP Mapping: 500 Internal Server Error" + ], + "enum": [ + "OK", + "CANCELLED", + "UNKNOWN", + "INVALID_ARGUMENT", + "DEADLINE_EXCEEDED", + "NOT_FOUND", + "ALREADY_EXISTS", + "PERMISSION_DENIED", + "UNAUTHENTICATED", + "RESOURCE_EXHAUSTED", + "FAILED_PRECONDITION", + "ABORTED", + "OUT_OF_RANGE", + "UNIMPLEMENTED", + "INTERNAL", + "UNAVAILABLE", + "DATA_LOSS" + ] + }, + "errorCount": { + "description": "Count of this type of error.\nRequired.", + "format": "int64", + "type": "string" + }, + "errorLogEntries": { + "description": "Error samples.", + "type": "array", + "items": { + "$ref": "ErrorLogEntry" + } + } + }, + "id": "ErrorSummary" + }, + "HttpData": { + "id": "HttpData", + "description": "An HttpData specifies a list of objects on the web to be transferred over\nHTTP. The information of the objects to be transferred is contained in a\nfile referenced by a URL. The first line in the file must be\n\"TsvHttpData-1.0\", which specifies the format of the file. Subsequent lines\nspecify the information of the list of objects, one object per list entry.\nEach entry has the following tab-delimited fields:\n\n* HTTP URL - The location of the object.\n\n* Length - The size of the object in bytes.\n\n* MD5 - The base64-encoded MD5 hash of the object.\n\nFor an example of a valid TSV file, see\n[Transferring data from URLs](https://cloud.google.com/storage/transfer/#urls)\n\nWhen transferring data based on a URL list, keep the following in mind:\n\n* When an object located at `http(s)://hostname:port/\u003cURL-path\u003e` is transferred\nto a data sink, the name of the object at the data sink is\n`\u003chostname\u003e/\u003cURL-path\u003e`.\n\n* If the specified size of an object does not match the actual size of the\nobject fetched, the object will not be transferred.\n\n* If the specified MD5 does not match the MD5 computed from the transferred\nbytes, the object transfer will fail. For more information, see\n[Generating MD5 hashes](https://cloud.google.com/storage/transfer/#md5)\n\n* Ensure that each URL you specify is publicly accessible. For\nexample, in Google Cloud Storage you can\n[share an object publicly]\n(https://cloud.google.com/storage/docs/cloud-console#_sharingdata) and get\na link to it.\n\n* Storage Transfer Service obeys `robots.txt` rules and requires the source\nHTTP server to support `Range` requests and to return a `Content-Length`\nheader in each response.\n\n* [ObjectConditions](#ObjectConditions) have no effect when filtering objects\nto transfer.", + "type": "object", + "properties": { + "listUrl": { + "description": "The URL that points to the file that stores the object list entries.\nThis file must allow public access. Currently, only URLs with HTTP and\nHTTPS schemes are supported.\nRequired.", + "type": "string" + } + } + }, + "GcsData": { + "description": "In a GcsData, an object's name is the Google Cloud Storage object's name and\nits `lastModificationTime` refers to the object's updated time, which changes\nwhen the content or the metadata of the object is updated.", + "type": "object", + "properties": { + "bucketName": { + "description": "Google Cloud Storage bucket name (see\n[Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nRequired.", + "type": "string" + } + }, + "id": "GcsData" + }, + "ListTransferJobsResponse": { + "description": "Response from ListTransferJobs.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The list next page token.", + "type": "string" + }, + "transferJobs": { + "description": "A list of transfer jobs.", + "type": "array", + "items": { + "$ref": "TransferJob" + } + } + }, + "id": "ListTransferJobsResponse" + }, + "UpdateTransferJobRequest": { + "id": "UpdateTransferJobRequest", + "description": "Request passed to UpdateTransferJob.", + "type": "object", + "properties": { + "transferJob": { + "description": "The job to update.\nRequired.", + "$ref": "TransferJob" + }, + "projectId": { + "description": "The ID of the Google Cloud Platform Console project that owns the job.\nRequired.", + "type": "string" + }, + "updateTransferJobFieldMask": { + "description": "The field mask of the fields in `transferJob` that are to be updated in\nthis request. Fields in `transferJob` that can be updated are:\n`description`, `transferSpec`, and `status`. To update the `transferSpec`\nof the job, a complete transfer specification has to be provided. An\nincomplete specification which misses any required fields will be rejected\nwith the error `INVALID_ARGUMENT`.", + "format": "google-fieldmask", + "type": "string" + } + } + }, + "ObjectConditions": { + "description": "Conditions that determine which objects will be transferred.", + "type": "object", + "properties": { + "minTimeElapsedSinceLastModification": { + "description": "If unspecified, `minTimeElapsedSinceLastModification` takes a zero value\nand `maxTimeElapsedSinceLastModification` takes the maximum possible\nvalue of Duration. Objects that satisfy the object conditions\nmust either have a `lastModificationTime` greater or equal to\n`NOW` - `maxTimeElapsedSinceLastModification` and less than\n`NOW` - `minTimeElapsedSinceLastModification`, or not have a\n`lastModificationTime`.", + "format": "google-duration", + "type": "string" + }, + "excludePrefixes": { + "description": "`excludePrefixes` must follow the requirements described for\n`includePrefixes`.\n\nThe max size of `excludePrefixes` is 1000.", + "type": "array", + "items": { + "type": "string" + } + }, + "maxTimeElapsedSinceLastModification": { + "description": "`maxTimeElapsedSinceLastModification` is the complement to\n`minTimeElapsedSinceLastModification`.", + "format": "google-duration", + "type": "string" + }, + "includePrefixes": { + "description": "If `includePrefixes` is specified, objects that satisfy the object\nconditions must have names that start with one of the `includePrefixes`\nand that do not start with any of the `excludePrefixes`. If `includePrefixes`\nis not specified, all objects except those that have names starting with\none of the `excludePrefixes` must satisfy the object conditions.\n\nRequirements:\n\n * Each include-prefix and exclude-prefix can contain any sequence of\n Unicode characters, of max length 1024 bytes when UTF8-encoded, and\n must not contain Carriage Return or Line Feed characters. Wildcard\n matching and regular expression matching are not supported.\n\n * Each include-prefix and exclude-prefix must omit the leading slash.\n For example, to include the `requests.gz` object in a transfer from\n `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the include\n prefix as `logs/y=2015/requests.gz`.\n\n * None of the include-prefix or the exclude-prefix values can be empty,\n if specified.\n\n * Each include-prefix must include a distinct portion of the object\n namespace, i.e., no include-prefix may be a prefix of another\n include-prefix.\n\n * Each exclude-prefix must exclude a distinct portion of the object\n namespace, i.e., no exclude-prefix may be a prefix of another\n exclude-prefix.\n\n * If `includePrefixes` is specified, then each exclude-prefix must start\n with the value of a path explicitly included by `includePrefixes`.\n\nThe max size of `includePrefixes` is 1000.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "ObjectConditions" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `transferOperations/some/unique/name`.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "description": "Represents the transfer operation object.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + } + }, + "id": "Operation" + }, + "TransferOptions": { + "description": "TransferOptions uses three boolean parameters to define the actions\nto be performed on objects in a transfer.", + "type": "object", + "properties": { + "deleteObjectsUniqueInSink": { + "description": "Whether objects that exist only in the sink should be deleted.", + "type": "boolean" + }, + "overwriteObjectsAlreadyExistingInSink": { + "description": "Whether overwriting objects that already exist in the sink is allowed.", + "type": "boolean" + }, + "deleteObjectsFromSourceAfterTransfer": { + "description": "Whether objects should be deleted from the source after they are\ntransferred to the sink.", + "type": "boolean" + } + }, + "id": "TransferOptions" + }, + "TransferSpec": { + "id": "TransferSpec", + "description": "Configuration for running a transfer.", + "type": "object", + "properties": { + "transferOptions": { + "description": "If the option `deleteObjectsUniqueInSink` is `true`, object conditions\nbased on objects' `lastModificationTime` are ignored and do not exclude\nobjects in a data source or a data sink.", + "$ref": "TransferOptions" + }, + "awsS3DataSource": { + "description": "An AWS S3 data source.", + "$ref": "AwsS3Data" + }, + "httpDataSource": { + "description": "An HTTP URL data source.", + "$ref": "HttpData" + }, + "objectConditions": { + "$ref": "ObjectConditions", + "description": "Only objects that satisfy these object conditions are included in the set\nof data source and data sink objects. Object conditions based on\nobjects' `lastModificationTime` do not exclude objects in a data sink." + }, + "gcsDataSink": { + "$ref": "GcsData", + "description": "A Google Cloud Storage data sink." + }, + "gcsDataSource": { + "description": "A Google Cloud Storage data source.", + "$ref": "GcsData" + } + } + }, + "Status": { + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + } + } + }, + "ResumeTransferOperationRequest": { + "id": "ResumeTransferOperationRequest", + "description": "Request passed to ResumeTransferOperation.", + "type": "object", + "properties": {} } - } }, - "transferJobs": { - "methods": { - "create": { - "id": "storagetransfer.transferJobs.create", - "path": "v1/transferJobs", - "httpMethod": "POST", - "description": "Creates a transfer job that runs periodically.", - "request": { - "$ref": "TransferJob" - }, - "response": { - "$ref": "TransferJob" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "id": "storagetransfer.transferJobs.patch", - "path": "v1/{+jobName}", - "httpMethod": "PATCH", - "description": "Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. Updating the scheduling of a job is not allowed.", - "parameters": { - "jobName": { - "type": "string", - "description": "The name of job to update. Required.", - "required": true, - "pattern": "^transferJobs/.*$", - "location": "path" - } - }, - "parameterOrder": [ - "jobName" - ], - "request": { - "$ref": "UpdateTransferJobRequest" - }, - "response": { - "$ref": "TransferJob" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "storagetransfer.transferJobs.get", - "path": "v1/{+jobName}", - "httpMethod": "GET", - "description": "Gets a transfer job.", - "parameters": { - "jobName": { - "type": "string", - "description": "The job to get. Required.", - "required": true, - "pattern": "^transferJobs/.*$", - "location": "path" - }, - "projectId": { - "type": "string", - "description": "The ID of the Google Developers Console project that owns the job. Required.", - "location": "query" - } - }, - "parameterOrder": [ - "jobName" - ], - "response": { - "$ref": "TransferJob" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "storagetransfer.transferJobs.list", - "path": "v1/transferJobs", - "httpMethod": "GET", - "description": "Lists transfer jobs.", - "parameters": { - "filter": { - "type": "string", - "description": "A list of query parameters specified as JSON text in the form of {\"`project_id`\":\"my_project_id\", \"`job_names`\":[\"jobid1\",\"jobid2\",...], \"`job_statuses`\":[\"status1\",\"status2\",...]}. Since `job_names` and `job_statuses` support multiple values, their values must be specified with array notation. `project_id` is required. `job_names` and `job_statuses` are optional. The valid values for `job_statuses` are case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The list page size. The max allowed value is 256.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The list page token.", - "location": "query" - } - }, - "response": { - "$ref": "ListTransferJobsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "transferOperations": { - "methods": { - "pause": { - "id": "storagetransfer.transferOperations.pause", - "path": "v1/{+name}:pause", - "httpMethod": "POST", - "description": "Pauses a transfer operation.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the transfer operation. Required.", - "required": true, - "pattern": "^transferOperations/.*$", - "location": "path" + "version": "v1", + "baseUrl": "https://storagetransfer.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "PauseTransferOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "resume": { - "id": "storagetransfer.transferOperations.resume", - "path": "v1/{+name}:resume", - "httpMethod": "POST", - "description": "Resumes a transfer operation that is paused.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the transfer operation. Required.", - "required": true, - "pattern": "^transferOperations/.*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "request": { - "$ref": "ResumeTransferOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "id": "storagetransfer.transferOperations.get", - "path": "v1/{+name}", - "httpMethod": "GET", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource.", - "required": true, - "pattern": "^transferOperations/.*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "storagetransfer.transferOperations.list", - "path": "v1/{+name}", - "httpMethod": "GET", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/*/operations`.", - "parameters": { - "name": { - "type": "string", - "description": "The value `transferOperations`.", - "required": true, - "pattern": "^transferOperations$", - "location": "path" - }, - "filter": { - "type": "string", - "description": "The standard list filter.", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "The standard list page size.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "The standard list page token.", - "location": "query" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "cancel": { - "id": "storagetransfer.transferOperations.cancel", - "path": "v1/{+name}:cancel", - "httpMethod": "POST", - "description": "Cancels a transfer. Use the get method to check whether the cancellation succeeded or whether the operation completed despite cancellation.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be cancelled.", - "required": true, - "pattern": "^transferOperations/.*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "id": "storagetransfer.transferOperations.delete", - "path": "v1/{+name}", - "httpMethod": "DELETE", - "description": "This method is not supported and the server returns `UNIMPLEMENTED`.", - "parameters": { - "name": { - "type": "string", - "description": "The name of the operation resource to be deleted.", - "required": true, - "pattern": "^transferOperations/.*$", - "location": "path" - } - }, - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } - } - } - } + }, + "kind": "discovery#restDescription", + "description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.", + "servicePath": "", + "rootUrl": "https://storagetransfer.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "storagetransfer", + "batchPath": "batch", + "revision": "20170515", + "documentationLink": "https://cloud.google.com/storage/transfer", + "id": "storagetransfer:v1", + "title": "Google Storage Transfer API", + "discoveryVersion": "v1", + "ownerName": "Google" } diff --git a/etc/api/surveys/v2/surveys-api.json b/etc/api/surveys/v2/surveys-api.json index fc39039531..73bc53192b 100644 --- a/etc/api/surveys/v2/surveys-api.json +++ b/etc/api/surveys/v2/surveys-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/tlViSJX3ylU_pw2F3DxMwdFrJio\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/v4y1albctEEy0b5g9DBMxLokUPs\"", "discoveryVersion": "v1", "id": "surveys:v2", "name": "surveys", "canonicalName": "Surveys", "version": "v2", - "revision": "20161103", + "revision": "20170407", "title": "Surveys API", "description": "Creates and conducts surveys, lists the surveys that an authenticated user owns, and retrieves survey results and information about specified surveys.", "ownerDomain": "google.com", @@ -539,10 +539,6 @@ "requestId": { "type": "string", "description": "Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests." - }, - "resource": { - "$ref": "Survey", - "description": "Survey object containing the specification of the started Survey." } } }, @@ -553,10 +549,6 @@ "requestId": { "type": "string", "description": "Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests." - }, - "resource": { - "$ref": "Survey", - "description": "Survey object containing the specification of the stopped Survey." } } }, diff --git a/etc/api/tagmanager/v1/tagmanager-api.json b/etc/api/tagmanager/v1/tagmanager-api.json index 6833b09c8e..8741e67d0c 100644 --- a/etc/api/tagmanager/v1/tagmanager-api.json +++ b/etc/api/tagmanager/v1/tagmanager-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/rRpL0Yww6KCNEEWca1YtyKw9Y48\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/rRpL0Yww6KCNEEWca1YtyKw9Y48\"", "discoveryVersion": "v1", "id": "tagmanager:v1", "name": "tagmanager", diff --git a/etc/api/taskqueue/v1beta1/taskqueue-api.json b/etc/api/taskqueue/v1beta1/taskqueue-api.json index a002d81bd0..bbe9b1badb 100644 --- a/etc/api/taskqueue/v1beta1/taskqueue-api.json +++ b/etc/api/taskqueue/v1beta1/taskqueue-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/UNHEtVyVE-POJmRW0SrDcBQE6KY\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/UNHEtVyVE-POJmRW0SrDcBQE6KY\"", "discoveryVersion": "v1", "id": "taskqueue:v1beta1", "name": "taskqueue", diff --git a/etc/api/taskqueue/v1beta2/taskqueue-api.json b/etc/api/taskqueue/v1beta2/taskqueue-api.json index 33b33a86f0..fe121d5f71 100644 --- a/etc/api/taskqueue/v1beta2/taskqueue-api.json +++ b/etc/api/taskqueue/v1beta2/taskqueue-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/rBU1z2tHcOAAx8ktsJNBvusBoYw\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/rBU1z2tHcOAAx8ktsJNBvusBoYw\"", "discoveryVersion": "v1", "id": "taskqueue:v1beta2", "name": "taskqueue", diff --git a/etc/api/tasks/v1/tasks-api.json b/etc/api/tasks/v1/tasks-api.json index 2aff5c4dab..c00b4ab844 100644 --- a/etc/api/tasks/v1/tasks-api.json +++ b/etc/api/tasks/v1/tasks-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/NWN6zUXbR398dbL3sE_mMEw339M\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/NWN6zUXbR398dbL3sE_mMEw339M\"", "discoveryVersion": "v1", "id": "tasks:v1", "name": "tasks", diff --git a/etc/api/toolresults/v1beta3/toolresults-api.json b/etc/api/toolresults/v1beta3/toolresults-api.json index 366faff012..a46cd608e1 100644 --- a/etc/api/toolresults/v1beta3/toolresults-api.json +++ b/etc/api/toolresults/v1beta3/toolresults-api.json @@ -1,21 +1,21 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/FTHpccTXwX59pwtPpjnvwTyvahc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/NluUu220nJwrFOBpPn0huE2Wpig\"", "discoveryVersion": "v1", "id": "toolresults:v1beta3", "name": "toolresults", "canonicalName": "Tool Results", "version": "v1beta3", - "revision": "20161214", + "revision": "20170519", "title": "Cloud Tool Results API", - "description": "Reads and publishes results from Cloud Test Lab.", + "description": "Reads and publishes results from Firebase Test Lab.", "ownerDomain": "google.com", "ownerName": "Google", "icons": { "x16": "https://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/", + "documentationLink": "https://firebase.google.com/docs/test-lab/", "protocol": "rest", "baseUrl": "https://www.googleapis.com/toolresults/v1beta3/projects/", "basePath": "/toolresults/v1beta3/projects/", @@ -80,7 +80,7 @@ "Any": { "id": "Any", "type": "object", - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\nFoo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }\n\nExample 2: Pack and unpack a message in Java.\n\nFoo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }\n\nExample 3: Pack and unpack a message in Python.\n\nfoo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...\n\nThe pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\".\n\n\n\nJSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:\n\npackage google.profile; message Person { string first_name = 1; string last_name = 2; }\n\n{ \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": }\n\nIf the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):\n\n{ \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }", + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\nFoo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }\n\nExample 2: Pack and unpack a message in Java.\n\nFoo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }\n\nExample 3: Pack and unpack a message in Python.\n\nfoo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...\n\nExample 4: Pack and unpack a message in Go\n\nfoo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... }\n\nThe pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\".\n\n\n\nJSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:\n\npackage google.profile; message Person { string first_name = 1; string last_name = 2; }\n\n{ \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": }\n\nIf the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):\n\n{ \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }", "properties": { "typeUrl": { "type": "string", @@ -93,10 +93,130 @@ } } }, + "BasicPerfSampleSeries": { + "id": "BasicPerfSampleSeries", + "type": "object", + "description": "Encapsulates the metadata for basic sample series represented by a line chart", + "properties": { + "perfMetricType": { + "type": "string", + "enum": [ + "cpu", + "graphics", + "memory", + "network", + "perfMetricTypeUnspecified" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ] + }, + "perfUnit": { + "type": "string", + "enum": [ + "bytesPerSecond", + "framesPerSecond", + "kibibyte", + "percent", + "perfUnitUnspecified" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ] + }, + "sampleSeriesLabel": { + "type": "string", + "enum": [ + "cpuKernel", + "cpuTotal", + "cpuUser", + "graphicsFrameRate", + "memoryRssPrivate", + "memoryRssShared", + "memoryRssTotal", + "memoryTotal", + "networkReceived", + "networkSent", + "ntBytesReceived", + "ntBytesTransferred", + "sampleSeriesTypeUnspecified" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + } + } + }, + "BatchCreatePerfSamplesRequest": { + "id": "BatchCreatePerfSamplesRequest", + "type": "object", + "description": "The request must provide up to a maximum of 5000 samples to be created; a larger sample size will cause an INVALID_ARGUMENT error", + "properties": { + "perfSamples": { + "type": "array", + "description": "The set of PerfSamples to create should not include existing timestamps", + "items": { + "$ref": "PerfSample" + } + } + } + }, + "BatchCreatePerfSamplesResponse": { + "id": "BatchCreatePerfSamplesResponse", + "type": "object", + "properties": { + "perfSamples": { + "type": "array", + "items": { + "$ref": "PerfSample" + } + } + } + }, + "CPUInfo": { + "id": "CPUInfo", + "type": "object", + "properties": { + "cpuProcessor": { + "type": "string", + "description": "description of the device processor ie '1.8 GHz hexa core 64-bit ARMv8-A'" + }, + "cpuSpeedInGhz": { + "type": "number", + "description": "the CPU clock speed in GHz", + "format": "float" + }, + "numberOfCores": { + "type": "integer", + "description": "the number of CPU cores", + "format": "int32" + } + } + }, "Duration": { "id": "Duration", "type": "object", - "description": "A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years.\n\nExample 1: Compute Duration from two Timestamps in pseudo code.\n\nTimestamp start = ...; Timestamp end = ...; Duration duration = ...;\n\nduration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos;\n\nif (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds \u003e 0 && duration.nanos \u003c 0) { duration.seconds -= 1; duration.nanos += 1000000000; }\n\nExample 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n\nTimestamp start = ...; Duration duration = ...; Timestamp end = ...;\n\nend.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos;\n\nif (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; }\n\nExample 3: Compute Duration from datetime.timedelta in Python.\n\ntd = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td)", + "description": "A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years.\n\n# Examples\n\nExample 1: Compute Duration from two Timestamps in pseudo code.\n\nTimestamp start = ...; Timestamp end = ...; Duration duration = ...;\n\nduration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos;\n\nif (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds \u003e 0 && duration.nanos \u003c 0) { duration.seconds -= 1; duration.nanos += 1000000000; }\n\nExample 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n\nTimestamp start = ...; Duration duration = ...; Timestamp end = ...;\n\nend.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos;\n\nif (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; }\n\nExample 3: Compute Duration from datetime.timedelta in Python.\n\ntd = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td)\n\n# JSON Mapping\n\nIn JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", "properties": { "nanos": { "type": "integer", @@ -105,7 +225,7 @@ }, "seconds": { "type": "string", - "description": "Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive.", + "description": "Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years", "format": "int64" } } @@ -281,6 +401,35 @@ } } }, + "ListPerfSampleSeriesResponse": { + "id": "ListPerfSampleSeriesResponse", + "type": "object", + "properties": { + "perfSampleSeries": { + "type": "array", + "description": "The resulting PerfSampleSeries sorted by id", + "items": { + "$ref": "PerfSampleSeries" + } + } + } + }, + "ListPerfSamplesResponse": { + "id": "ListPerfSamplesResponse", + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "Optional, returned if result size exceeds the page size specified in the request (or the default page size, 500, if unspecified). It indicates the last sample timestamp to be used as page_token in subsequent request" + }, + "perfSamples": { + "type": "array", + "items": { + "$ref": "PerfSample" + } + } + } + }, "ListStepThumbnailsResponse": { "id": "ListStepThumbnailsResponse", "type": "object", @@ -317,6 +466,22 @@ } } }, + "MemoryInfo": { + "id": "MemoryInfo", + "type": "object", + "properties": { + "memoryCapInKibibyte": { + "type": "string", + "description": "Maximum memory that can be allocated to the process in KiB", + "format": "int64" + }, + "memoryTotalInKibibyte": { + "type": "string", + "description": "Total memory available on the device in KiB", + "format": "int64" + } + } + }, "Outcome": { "id": "Outcome", "type": "object", @@ -358,6 +523,116 @@ } } }, + "PerfEnvironment": { + "id": "PerfEnvironment", + "type": "object", + "description": "Encapsulates performance environment info", + "properties": { + "cpuInfo": { + "$ref": "CPUInfo", + "description": "CPU related environment info" + }, + "memoryInfo": { + "$ref": "MemoryInfo", + "description": "Memory related environment info" + } + } + }, + "PerfMetricsSummary": { + "id": "PerfMetricsSummary", + "type": "object", + "description": "A summary of perf metrics collected and performance environment info", + "properties": { + "executionId": { + "type": "string", + "description": "A tool results execution ID." + }, + "historyId": { + "type": "string", + "description": "A tool results history ID." + }, + "perfEnvironment": { + "$ref": "PerfEnvironment", + "description": "Describes the environment in which the performance metrics were collected" + }, + "perfMetrics": { + "type": "array", + "description": "Set of resource collected", + "items": { + "type": "string", + "enum": [ + "cpu", + "graphics", + "memory", + "network", + "perfMetricTypeUnspecified" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ] + } + }, + "projectId": { + "type": "string", + "description": "The cloud project" + }, + "stepId": { + "type": "string", + "description": "A tool results step ID." + } + } + }, + "PerfSample": { + "id": "PerfSample", + "type": "object", + "description": "Resource representing a single performance measure or data point", + "properties": { + "sampleTime": { + "$ref": "Timestamp", + "description": "Timestamp of collection" + }, + "value": { + "type": "number", + "description": "Value observed", + "format": "double" + } + } + }, + "PerfSampleSeries": { + "id": "PerfSampleSeries", + "type": "object", + "description": "Resource representing a collection of performance samples (or data points)", + "properties": { + "basicPerfSampleSeries": { + "$ref": "BasicPerfSampleSeries", + "description": "Basic series represented by a line chart" + }, + "executionId": { + "type": "string", + "description": "A tool results execution ID." + }, + "historyId": { + "type": "string", + "description": "A tool results history ID." + }, + "projectId": { + "type": "string", + "description": "The cloud project" + }, + "sampleSeriesId": { + "type": "string", + "description": "A sample series id" + }, + "stepId": { + "type": "string", + "description": "A tool results step ID." + } + } + }, "ProjectSettings": { "id": "ProjectSettings", "type": "object", @@ -419,7 +694,7 @@ "Status": { "id": "Status", "type": "object", - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users - Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users - Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", "properties": { "code": { "type": "integer", @@ -692,7 +967,7 @@ "Timestamp": { "id": "Timestamp", "type": "object", - "description": "A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are \"smeared\" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).\n\nExample 1: Compute Timestamp from POSIX `time()`.\n\nTimestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0);\n\nExample 2: Compute Timestamp from POSIX `gettimeofday()`.\n\nstruct timeval tv; gettimeofday(&tv, NULL);\n\nTimestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000);\n\nExample 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\nFILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) \u003c\u003c 32) | ft.dwLowDateTime;\n\n// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\nExample 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\nlong millis = System.currentTimeMillis();\n\nTimestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n\n\nExample 5: Compute Timestamp from current time in Python.\n\ntimestamp = Timestamp() timestamp.GetCurrentTime()", + "description": "A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are \"smeared\" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).\n\n# Examples\n\nExample 1: Compute Timestamp from POSIX `time()`.\n\nTimestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0);\n\nExample 2: Compute Timestamp from POSIX `gettimeofday()`.\n\nstruct timeval tv; gettimeofday(&tv, NULL);\n\nTimestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000);\n\nExample 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\nFILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) \u003c\u003c 32) | ft.dwLowDateTime;\n\n// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\nExample 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\nlong millis = System.currentTimeMillis();\n\nTimestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n\n\nExample 5: Compute Timestamp from current time in Python.\n\ntimestamp = Timestamp() timestamp.GetCurrentTime()\n\n# JSON Mapping\n\nIn JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required, though only UTC (as indicated by \"Z\") is presently supported.\n\nFor example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017.\n\nIn JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format.", "properties": { "nanos": { "type": "integer", @@ -811,7 +1086,7 @@ "id": "toolresults.projects.initializeSettings", "path": "{projectId}:initializeSettings", "httpMethod": "POST", - "description": "Creates resources for settings which have not yet been set.\n\nCurrently, this creates a single resource: a Google Cloud Storage bucket, to be used as the default bucket for this project. The bucket is created in the name of the user calling. Except in rare cases, calling this method in parallel from multiple clients will only create a single bucket. In order to avoid unnecessary storage charges, the bucket is configured to automatically delete objects older than 90 days.\n\nThe bucket is created with the project-private ACL: All project team members are given permissions to the bucket and objects created within it according to their roles. Project owners have owners rights, and so on. The default ACL on objects created in the bucket is project-private as well. See Google Cloud Storage documentation for more details.\n\nIf there is already a default bucket set and the project can access the bucket, this call does nothing. However, if the project doesn't have the permission to access the bucket or the bucket is deteleted, a new bucket will be created.\n\nMay return any canonical error codes, including the following:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - Any error code raised by Google Cloud Storage", + "description": "Creates resources for settings which have not yet been set.\n\nCurrently, this creates a single resource: a Google Cloud Storage bucket, to be used as the default bucket for this project. The bucket is created in an FTL-own storage project. Except for in rare cases, calling this method in parallel from multiple clients will only create a single bucket. In order to avoid unnecessary storage charges, the bucket is configured to automatically delete objects older than 90 days.\n\nThe bucket is created with the following permissions: - Owner access for owners of central storage project (FTL-owned) - Writer access for owners/editors of customer project - Reader access for viewers of customer project The default ACL on objects created in the bucket is: - Owner access for owners of central storage project - Reader access for owners/editors/viewers of customer project See Google Cloud Storage documentation for more details.\n\nIf there is already a default bucket set and the project can access the bucket, this call does nothing. However, if the project doesn't have the permission to access the bucket or the bucket is deleted, a new bucket will be created.\n\nMay return any canonical error codes, including the following:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - Any error code raised by Google Cloud Storage", "parameters": { "projectId": { "type": "string", @@ -1192,6 +1467,50 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getPerfMetricsSummary": { + "id": "toolresults.projects.histories.executions.steps.getPerfMetricsSummary", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", + "httpMethod": "GET", + "description": "Retrieves a PerfMetricsSummary.\n\nMay return any of the following error code(s): - NOT_FOUND - The specified PerfMetricsSummary does not exist", + "parameters": { + "executionId": { + "type": "string", + "description": "A tool results execution ID.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A tool results history ID.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The cloud project", + "required": true, + "location": "path" + }, + "stepId": { + "type": "string", + "description": "A tool results step ID.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId", + "stepId" + ], + "response": { + "$ref": "PerfMetricsSummary" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "id": "toolresults.projects.histories.executions.steps.list", "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps", @@ -1341,6 +1660,345 @@ } }, "resources": { + "perfMetricsSummary": { + "methods": { + "create": { + "id": "toolresults.projects.histories.executions.steps.perfMetricsSummary.create", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", + "httpMethod": "POST", + "description": "Creates a PerfMetricsSummary resource.\n\nMay return any of the following error code(s): - ALREADY_EXISTS - A PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist", + "parameters": { + "executionId": { + "type": "string", + "description": "A tool results execution ID.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A tool results history ID.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The cloud project", + "required": true, + "location": "path" + }, + "stepId": { + "type": "string", + "description": "A tool results step ID.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId", + "stepId" + ], + "request": { + "$ref": "PerfMetricsSummary" + }, + "response": { + "$ref": "PerfMetricsSummary" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "perfSampleSeries": { + "methods": { + "create": { + "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.create", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", + "httpMethod": "POST", + "description": "Creates a PerfSampleSeries.\n\nMay return any of the following error code(s): - ALREADY_EXISTS - PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist", + "parameters": { + "executionId": { + "type": "string", + "description": "A tool results execution ID.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A tool results history ID.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The cloud project", + "required": true, + "location": "path" + }, + "stepId": { + "type": "string", + "description": "A tool results step ID.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId", + "stepId" + ], + "request": { + "$ref": "PerfSampleSeries" + }, + "response": { + "$ref": "PerfSampleSeries" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.get", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}", + "httpMethod": "GET", + "description": "Gets a PerfSampleSeries.\n\nMay return any of the following error code(s): - NOT_FOUND - The specified PerfSampleSeries does not exist", + "parameters": { + "executionId": { + "type": "string", + "description": "A tool results execution ID.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A tool results history ID.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The cloud project", + "required": true, + "location": "path" + }, + "sampleSeriesId": { + "type": "string", + "description": "A sample series id", + "required": true, + "location": "path" + }, + "stepId": { + "type": "string", + "description": "A tool results step ID.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId", + "stepId", + "sampleSeriesId" + ], + "response": { + "$ref": "PerfSampleSeries" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.list", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", + "httpMethod": "GET", + "description": "Lists PerfSampleSeries for a given Step.\n\nThe request provides an optional filter which specifies one or more PerfMetricsType to include in the result; if none returns all. The resulting PerfSampleSeries are sorted by ids.\n\nMay return any of the following canonical error codes: - NOT_FOUND - The containing Step does not exist", + "parameters": { + "executionId": { + "type": "string", + "description": "A tool results execution ID.", + "required": true, + "location": "path" + }, + "filter": { + "type": "string", + "description": "Specify one or more PerfMetricType values such as CPU to filter the result", + "enum": [ + "cpu", + "graphics", + "memory", + "network", + "perfMetricTypeUnspecified" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "repeated": true, + "location": "query" + }, + "historyId": { + "type": "string", + "description": "A tool results history ID.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The cloud project", + "required": true, + "location": "path" + }, + "stepId": { + "type": "string", + "description": "A tool results step ID.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId", + "stepId" + ], + "response": { + "$ref": "ListPerfSampleSeriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "samples": { + "methods": { + "batchCreate": { + "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.batchCreate", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples:batchCreate", + "httpMethod": "POST", + "description": "Creates a batch of PerfSamples - a client can submit multiple batches of Perf Samples through repeated calls to this method in order to split up a large request payload - duplicates and existing timestamp entries will be ignored. - the batch operation may partially succeed - the set of elements successfully inserted is returned in the response (omits items which already existed in the database).\n\nMay return any of the following canonical error codes: - NOT_FOUND - The containing PerfSampleSeries does not exist", + "parameters": { + "executionId": { + "type": "string", + "description": "A tool results execution ID.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A tool results history ID.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The cloud project", + "required": true, + "location": "path" + }, + "sampleSeriesId": { + "type": "string", + "description": "A sample series id", + "required": true, + "location": "path" + }, + "stepId": { + "type": "string", + "description": "A tool results step ID.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId", + "stepId", + "sampleSeriesId" + ], + "request": { + "$ref": "BatchCreatePerfSamplesRequest" + }, + "response": { + "$ref": "BatchCreatePerfSamplesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.list", + "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples", + "httpMethod": "GET", + "description": "Lists the Performance Samples of a given Sample Series - The list results are sorted by timestamps ascending - The default page size is 500 samples; and maximum size allowed 5000 - The response token indicates the last returned PerfSample timestamp - When the results size exceeds the page size, submit a subsequent request including the page token to return the rest of the samples up to the page limit\n\nMay return any of the following canonical error codes: - OUT_OF_RANGE - The specified request page_token is out of valid range - NOT_FOUND - The containing PerfSampleSeries does not exist", + "parameters": { + "executionId": { + "type": "string", + "description": "A tool results execution ID.", + "required": true, + "location": "path" + }, + "historyId": { + "type": "string", + "description": "A tool results history ID.", + "required": true, + "location": "path" + }, + "pageSize": { + "type": "integer", + "description": "The default page size is 500 samples, and the maximum size is 5000. If the page_size is greater than 5000, the effective page size will be 5000", + "format": "int32", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional, the next_page_token returned in the previous response", + "location": "query" + }, + "projectId": { + "type": "string", + "description": "The cloud project", + "required": true, + "location": "path" + }, + "sampleSeriesId": { + "type": "string", + "description": "A sample series id", + "required": true, + "location": "path" + }, + "stepId": { + "type": "string", + "description": "A tool results step ID.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "historyId", + "executionId", + "stepId", + "sampleSeriesId" + ], + "response": { + "$ref": "ListPerfSamplesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "thumbnails": { "methods": { "list": { diff --git a/etc/api/translate/v2/translate-api.json b/etc/api/translate/v2/translate-api.json index 16318bc290..4b4d2be974 100644 --- a/etc/api/translate/v2/translate-api.json +++ b/etc/api/translate/v2/translate-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/6s__cFeA5l1i01rONlu3TmUQEHs\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/6s__cFeA5l1i01rONlu3TmUQEHs\"", "discoveryVersion": "v1", "id": "translate:v2", "name": "translate", diff --git a/etc/api/type-cli.yaml b/etc/api/type-cli.yaml index 754dff00fd..dad9db6299 100644 --- a/etc/api/type-cli.yaml +++ b/etc/api/type-cli.yaml @@ -28,6 +28,6 @@ cargo: doc_base_url: http://byron.github.io/google-apis-rs dependencies: - strsim = "^0.5" - - hyper-rustls = "^0.3" + - hyper-rustls = "^0.6" - yup-hyper-mock = "^2.0" - clap = "^2.0" diff --git a/etc/api/urlshortener/v1/urlshortener-api.json b/etc/api/urlshortener/v1/urlshortener-api.json index 6b718d1c66..8e63e62d24 100644 --- a/etc/api/urlshortener/v1/urlshortener-api.json +++ b/etc/api/urlshortener/v1/urlshortener-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/OETTXb_C37OrYG6Z2ykB_lpjNQE\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/OETTXb_C37OrYG6Z2ykB_lpjNQE\"", "discoveryVersion": "v1", "id": "urlshortener:v1", "name": "urlshortener", diff --git a/etc/api/vision/v1/vision-api.json b/etc/api/vision/v1/vision-api.json index 7c9c0295bc..4d7e3a0805 100644 --- a/etc/api/vision/v1/vision-api.json +++ b/etc/api/vision/v1/vision-api.json @@ -1,86 +1,135 @@ { - "id": "vision:v1", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", - "protocol": "rest", "title": "Google Cloud Vision API", + "ownerName": "Google", "resources": { "images": { "methods": { "annotate": { + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/images:annotate", + "path": "v1/images:annotate", "id": "vision.images.annotate", + "request": { + "$ref": "BatchAnnotateImagesRequest" + }, + "description": "Run image detection and annotation for a batch of images.", "response": { "$ref": "BatchAnnotateImagesResponse" }, "parameterOrder": [], - "description": "Run image detection and annotation for a batch of images.", - "request": { - "$ref": "BatchAnnotateImagesRequest" - }, - "flatPath": "v1/images:annotate", - "httpMethod": "POST", - "parameters": {}, - "path": "v1/images:annotate", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "httpMethod": "POST" } } } }, + "parameters": { + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "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" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://vision.googleapis.com/", + "kind": "discovery#restDescription", + "servicePath": "", + "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", + "basePath": "", + "id": "vision:v1", + "documentationLink": "https://cloud.google.com/vision/", + "revision": "20170516", + "discoveryVersion": "v1", + "version_module": "True", "schemas": { - "ImageSource": { - "description": "External image source (Google Cloud Storage image location).", - "type": "object", - "properties": { - "gcsImageUri": { - "description": "Google Cloud Storage image URI, which must be in the following form:\n`gs://bucket_name/object_name` (for details, see\n[Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris)).\nNOTE: Cloud Storage object versioning is not supported.", - "type": "string" - } - }, - "id": "ImageSource" - }, - "AnnotateImageRequest": { - "description": "Request for performing Google Cloud Vision API tasks over a user-provided\nimage, with user-requested features.", - "type": "object", - "properties": { - "image": { - "description": "The image to be processed.", - "$ref": "Image" - }, - "imageContext": { - "description": "Additional context that may accompany the image.", - "$ref": "ImageContext" - }, - "features": { - "description": "Requested features.", - "type": "array", - "items": { - "$ref": "Feature" - } - } - }, - "id": "AnnotateImageRequest" - }, "AnnotateImageResponse": { + "id": "AnnotateImageResponse", "description": "Response to an image annotation request.", "type": "object", "properties": { - "labelAnnotations": { - "description": "If present, label detection has completed successfully.", - "type": "array", - "items": { - "$ref": "EntityAnnotation" - } - }, "landmarkAnnotations": { "description": "If present, landmark detection has completed successfully.", "type": "array", @@ -88,14 +137,6 @@ "$ref": "EntityAnnotation" } }, - "safeSearchAnnotation": { - "description": "If present, safe-search annotation has completed successfully.", - "$ref": "SafeSearchAnnotation" - }, - "imagePropertiesAnnotation": { - "description": "If present, image properties were extracted successfully.", - "$ref": "ImageProperties" - }, "textAnnotations": { "description": "If present, text (OCR) detection has completed successfully.", "type": "array", @@ -103,13 +144,6 @@ "$ref": "EntityAnnotation" } }, - "logoAnnotations": { - "description": "If present, logo detection has completed successfully.", - "type": "array", - "items": { - "$ref": "EntityAnnotation" - } - }, "faceAnnotations": { "description": "If present, face detection has completed successfully.", "type": "array", @@ -117,258 +151,242 @@ "$ref": "FaceAnnotation" } }, + "imagePropertiesAnnotation": { + "description": "If present, image properties were extracted successfully.", + "$ref": "ImageProperties" + }, + "logoAnnotations": { + "description": "If present, logo detection has completed successfully.", + "type": "array", + "items": { + "$ref": "EntityAnnotation" + } + }, + "webDetection": { + "$ref": "WebDetection", + "description": "If present, web detection has completed successfully." + }, + "cropHintsAnnotation": { + "description": "If present, crop hints have completed successfully.", + "$ref": "CropHintsAnnotation" + }, + "safeSearchAnnotation": { + "description": "If present, safe-search annotation has completed successfully.", + "$ref": "SafeSearchAnnotation" + }, + "labelAnnotations": { + "description": "If present, label detection has completed successfully.", + "type": "array", + "items": { + "$ref": "EntityAnnotation" + } + }, "error": { - "description": "If set, represents the error message for the operation.\nNote that filled-in image annotations are guaranteed to be\ncorrect, even when `error` is set.", - "$ref": "Status" + "$ref": "Status", + "description": "If set, represents the error message for the operation.\nNote that filled-in image annotations are guaranteed to be\ncorrect, even when `error` is set." + }, + "fullTextAnnotation": { + "description": "If present, text (OCR) detection or document (OCR) text detection has\ncompleted successfully.\nThis annotation provides the structural hierarchy for the OCR detected\ntext.", + "$ref": "TextAnnotation" } - }, - "id": "AnnotateImageResponse" + } }, - "LatLongRect": { - "description": "Rectangle determined by min and max `LatLng` pairs.", + "CropHintsParams": { + "description": "Parameters for crop hints annotation request.", "type": "object", "properties": { - "maxLatLng": { - "description": "Max lat/long pair.", - "$ref": "LatLng" - }, - "minLatLng": { - "description": "Min lat/long pair.", - "$ref": "LatLng" - } - }, - "id": "LatLongRect" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "aspectRatios": { + "description": "Aspect ratios in floats, representing the ratio of the width to the height\nof the image. For example, if the desired aspect ratio is 4/3, the\ncorresponding float value should be 1.33333. If not specified, the\nbest possible crop is returned. The number of provided aspect ratios is\nlimited to a maximum of 16; any aspect ratios provided after the 16th are\nignored.", "type": "array", "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" + "format": "float", + "type": "number" } - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" } }, - "id": "Status" + "id": "CropHintsParams" }, - "FaceAnnotation": { - "description": "A face annotation object contains the results of face detection.", + "Block": { + "description": "Logical element on the page.", "type": "object", "properties": { - "tiltAngle": { - "description": "Pitch angle, which indicates the upwards/downwards angle that the face is\npointing relative to the image's horizontal plane. Range [-180,180].", - "type": "number", - "format": "float" - }, - "underExposedLikelihood": { - "description": "Under-exposed likelihood.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "type": "string" - }, - "fdBoundingPoly": { - "description": "The `fd_bounding_poly` bounding polygon is tighter than the\n`boundingPoly`, and encloses only the skin part of the face. Typically, it\nis used to eliminate the face from any image analysis that detects the\n\"amount of skin\" visible in an image. It is not based on the\nlandmarker results, only on the initial face detection, hence\nthe \u003ccode\u003efd\u003c/code\u003e (face detection) prefix.", - "$ref": "BoundingPoly" - }, - "landmarkingConfidence": { - "description": "Face landmarking confidence. Range [0, 1].", - "type": "number", - "format": "float" - }, - "joyLikelihood": { - "description": "Joy likelihood.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "type": "string" - }, - "detectionConfidence": { - "description": "Detection confidence. Range [0, 1].", - "type": "number", - "format": "float" - }, - "surpriseLikelihood": { - "description": "Surprise likelihood.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "type": "string" - }, - "angerLikelihood": { - "description": "Anger likelihood.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "type": "string" - }, - "headwearLikelihood": { - "description": "Headwear likelihood.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "type": "string" - }, - "panAngle": { - "description": "Yaw angle, which indicates the leftward/rightward angle that the face is\npointing relative to the vertical plane perpendicular to the image. Range\n[-180,180].", - "type": "number", - "format": "float" - }, - "boundingPoly": { - "description": "The bounding polygon around the face. The coordinates of the bounding box\nare in the original image's scale, as returned in `ImageParams`.\nThe bounding box is computed to \"frame\" the face in accordance with human\nexpectations. It is based on the landmarker results.\nNote that one or more x and/or y coordinates may not be generated in the\n`BoundingPoly` (the polygon will be unbounded) if only a partial face\nappears in the image to be annotated.", - "$ref": "BoundingPoly" - }, - "landmarks": { - "description": "Detected face landmarks.", + "paragraphs": { + "description": "List of paragraphs in this block (if this blocks is of type text).", "type": "array", "items": { - "$ref": "Landmark" + "$ref": "Paragraph" } }, - "blurredLikelihood": { - "description": "Blurred likelihood.", + "property": { + "$ref": "TextProperty", + "description": "Additional information detected for the block." + }, + "blockType": { + "description": "Detected block type (text, image etc) for this block.", + "type": "string", + "enumDescriptions": [ + "Unknown block type.", + "Regular text block.", + "Table block.", + "Image block.", + "Horizontal/vertical line box.", + "Barcode block." + ], "enum": [ "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], + "TEXT", + "TABLE", + "PICTURE", + "RULER", + "BARCODE" + ] + }, + "boundingBox": { + "$ref": "BoundingPoly", + "description": "The bounding box for the block.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." + } + }, + "id": "Block" + }, + "Property": { + "description": "A `Property` consists of a user-supplied name/value pair.", + "type": "object", + "properties": { + "value": { + "description": "Value of the property.", "type": "string" }, - "rollAngle": { - "description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation\nof the face relative to the image vertical about the axis perpendicular to\nthe face. Range [-180,180].", - "type": "number", - "format": "float" + "uint64Value": { + "description": "Value of numeric properties.", + "format": "uint64", + "type": "string" }, - "sorrowLikelihood": { - "description": "Sorrow likelihood.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], + "name": { + "description": "Name of the property.", "type": "string" } }, - "id": "FaceAnnotation" + "id": "Property" }, - "Vertex": { - "description": "A vertex represents a 2D point in the image.\nNOTE: the vertex coordinates are in the same scale as the original image.", + "LocationInfo": { + "id": "LocationInfo", + "description": "Detected entity location information.", + "type": "object", + "properties": { + "latLng": { + "description": "lat/long location coordinates.", + "$ref": "LatLng" + } + } + }, + "WebDetection": { + "description": "Relevant information for the image from the Internet.", + "type": "object", + "properties": { + "webEntities": { + "description": "Deduced entities from similar images on the Internet.", + "type": "array", + "items": { + "$ref": "WebEntity" + } + }, + "pagesWithMatchingImages": { + "description": "Web pages containing the matching images from the Internet.", + "type": "array", + "items": { + "$ref": "WebPage" + } + }, + "partialMatchingImages": { + "description": "Partial matching images from the Internet.\nThose images are similar enough to share some key-point features. For\nexample an original image will likely have partial matching for its crops.", + "type": "array", + "items": { + "$ref": "WebImage" + } + }, + "visuallySimilarImages": { + "description": "The visually similar image results.", + "type": "array", + "items": { + "$ref": "WebImage" + } + }, + "fullMatchingImages": { + "description": "Fully matching images from the Internet.\nCan include resized copies of the query image.", + "type": "array", + "items": { + "$ref": "WebImage" + } + } + }, + "id": "WebDetection" + }, + "BatchAnnotateImagesResponse": { + "id": "BatchAnnotateImagesResponse", + "description": "Response to a batch image annotation request.", + "type": "object", + "properties": { + "responses": { + "description": "Individual responses to image annotation requests within the batch.", + "type": "array", + "items": { + "$ref": "AnnotateImageResponse" + } + } + } + }, + "ImageSource": { + "id": "ImageSource", + "description": "External image source (Google Cloud Storage image location).", + "type": "object", + "properties": { + "gcsImageUri": { + "description": "NOTE: For new code `image_uri` below is preferred.\nGoogle Cloud Storage image URI, which must be in the following form:\n`gs://bucket_name/object_name` (for details, see\n[Google Cloud Storage Request\nURIs](https://cloud.google.com/storage/docs/reference-uris)).\nNOTE: Cloud Storage object versioning is not supported.", + "type": "string" + }, + "imageUri": { + "description": "Image URI which supports:\n1) Google Cloud Storage image URI, which must be in the following form:\n`gs://bucket_name/object_name` (for details, see\n[Google Cloud Storage Request\nURIs](https://cloud.google.com/storage/docs/reference-uris)).\nNOTE: Cloud Storage object versioning is not supported.\n2) Publicly accessible image HTTP/HTTPS URL.\nThis is preferred over the legacy `gcs_image_uri` above. When both\n`gcs_image_uri` and `image_uri` are specified, `image_uri` takes\nprecedence.", + "type": "string" + } + } + }, + "Position": { + "id": "Position", + "description": "A 3D position in the image, used primarily for Face detection landmarks.\nA valid Position must have both x and y coordinates.\nThe position coordinates are in the same scale as the original image.", "type": "object", "properties": { "y": { "description": "Y coordinate.", - "type": "integer", - "format": "int32" + "format": "float", + "type": "number" }, "x": { "description": "X coordinate.", - "type": "integer", - "format": "int32" + "format": "float", + "type": "number" + }, + "z": { + "description": "Z coordinate (or depth).", + "format": "float", + "type": "number" } - }, - "id": "Vertex" + } + }, + "WebPage": { + "id": "WebPage", + "description": "Metadata for web pages.", + "type": "object", + "properties": { + "url": { + "description": "The result web page URL.", + "type": "string" + }, + "score": { + "description": "Overall relevancy score for the web page.\nNot normalized and not comparable across different image queries.", + "format": "float", + "type": "number" + } + } }, "ColorInfo": { "description": "Color information consists of RGB channels, score, and the fraction of\nthe image that the color occupies in the image.", @@ -376,82 +394,99 @@ "properties": { "pixelFraction": { "description": "The fraction of pixels the color occupies in the image.\nValue in range [0, 1].", - "type": "number", - "format": "float" + "format": "float", + "type": "number" }, "color": { - "description": "RGB components of the color.", - "$ref": "Color" + "$ref": "Color", + "description": "RGB components of the color." }, "score": { "description": "Image-specific score for this color. Value in range [0, 1].", - "type": "number", - "format": "float" + "format": "float", + "type": "number" } }, "id": "ColorInfo" }, - "BoundingPoly": { - "description": "A bounding polygon for the detected image annotation.", + "EntityAnnotation": { + "description": "Set of detected entity features.", "type": "object", "properties": { - "vertices": { - "description": "The bounding polygon vertices.", + "score": { + "description": "Overall score of the result. Range [0, 1].", + "format": "float", + "type": "number" + }, + "locations": { + "description": "The location information for the detected entity. Multiple\n`LocationInfo` elements can be present because one location may\nindicate the location of the scene in the image, and another location\nmay indicate the location of the place where the image was taken.\nLocation information is usually present for landmarks.", "type": "array", "items": { - "$ref": "Vertex" + "$ref": "LocationInfo" + } + }, + "mid": { + "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", + "type": "string" + }, + "confidence": { + "description": "The accuracy of the entity detection in an image.\nFor example, for an image in which the \"Eiffel Tower\" entity is detected,\nthis field represents the confidence that there is a tower in the query\nimage. Range [0, 1].", + "format": "float", + "type": "number" + }, + "boundingPoly": { + "description": "Image region to which this entity belongs. Currently not produced\nfor `LABEL_DETECTION` features. For `TEXT_DETECTION` (OCR), `boundingPoly`s\nare produced for the entire text detected in an image region, followed by\n`boundingPoly`s for each word within the detected text.", + "$ref": "BoundingPoly" + }, + "locale": { + "description": "The language code for the locale in which the entity textual\n`description` is expressed.", + "type": "string" + }, + "description": { + "description": "Entity textual description, expressed in its `locale` language.", + "type": "string" + }, + "topicality": { + "description": "The relevancy of the ICA (Image Content Annotation) label to the\nimage. For example, the relevancy of \"tower\" is likely higher to an image\ncontaining the detected \"Eiffel Tower\" than to an image containing a\ndetected distant towering building, even though the confidence that\nthere is a tower in each image may be the same. Range [0, 1].", + "format": "float", + "type": "number" + }, + "properties": { + "description": "Some entities may have optional user-supplied `Property` (name/value)\nfields, such a score or string that qualifies the entity.", + "type": "array", + "items": { + "$ref": "Property" } } }, - "id": "BoundingPoly" + "id": "EntityAnnotation" + }, + "CropHint": { + "description": "Single crop hint that is used to generate a new crop when serving an image.", + "type": "object", + "properties": { + "confidence": { + "description": "Confidence of this being a salient region. Range [0, 1].", + "format": "float", + "type": "number" + }, + "importanceFraction": { + "description": "Fraction of importance of this salient region with respect to the original\nimage.", + "format": "float", + "type": "number" + }, + "boundingPoly": { + "$ref": "BoundingPoly", + "description": "The bounding polygon for the crop region. The coordinates of the bounding\nbox are in the original image's scale, as returned in `ImageParams`." + } + }, + "id": "CropHint" }, "Landmark": { "description": "A face-specific landmark (for example, a face feature).\nLandmark positions may fall outside the bounds of the image\nif the face is near one or more edges of the image.\nTherefore it is NOT guaranteed that `0 \u003c= x \u003c width` or\n`0 \u003c= y \u003c height`.", "type": "object", "properties": { - "position": { - "description": "Face landmark position.", - "$ref": "Position" - }, "type": { - "description": "Face landmark type.", - "enum": [ - "UNKNOWN_LANDMARK", - "LEFT_EYE", - "RIGHT_EYE", - "LEFT_OF_LEFT_EYEBROW", - "RIGHT_OF_LEFT_EYEBROW", - "LEFT_OF_RIGHT_EYEBROW", - "RIGHT_OF_RIGHT_EYEBROW", - "MIDPOINT_BETWEEN_EYES", - "NOSE_TIP", - "UPPER_LIP", - "LOWER_LIP", - "MOUTH_LEFT", - "MOUTH_RIGHT", - "MOUTH_CENTER", - "NOSE_BOTTOM_RIGHT", - "NOSE_BOTTOM_LEFT", - "NOSE_BOTTOM_CENTER", - "LEFT_EYE_TOP_BOUNDARY", - "LEFT_EYE_RIGHT_CORNER", - "LEFT_EYE_BOTTOM_BOUNDARY", - "LEFT_EYE_LEFT_CORNER", - "RIGHT_EYE_TOP_BOUNDARY", - "RIGHT_EYE_RIGHT_CORNER", - "RIGHT_EYE_BOTTOM_BOUNDARY", - "RIGHT_EYE_LEFT_CORNER", - "LEFT_EYEBROW_UPPER_MIDPOINT", - "RIGHT_EYEBROW_UPPER_MIDPOINT", - "LEFT_EAR_TRAGION", - "RIGHT_EAR_TRAGION", - "LEFT_EYE_PUPIL", - "RIGHT_EYE_PUPIL", - "FOREHEAD_GLABELLA", - "CHIN_GNATHION", - "CHIN_LEFT_GONION", - "CHIN_RIGHT_GONION" - ], "enumDescriptions": [ "Unknown face landmark detected. Should not be filled.", "Left eye.", @@ -489,30 +524,318 @@ "Chin left gonion.", "Chin right gonion." ], + "enum": [ + "UNKNOWN_LANDMARK", + "LEFT_EYE", + "RIGHT_EYE", + "LEFT_OF_LEFT_EYEBROW", + "RIGHT_OF_LEFT_EYEBROW", + "LEFT_OF_RIGHT_EYEBROW", + "RIGHT_OF_RIGHT_EYEBROW", + "MIDPOINT_BETWEEN_EYES", + "NOSE_TIP", + "UPPER_LIP", + "LOWER_LIP", + "MOUTH_LEFT", + "MOUTH_RIGHT", + "MOUTH_CENTER", + "NOSE_BOTTOM_RIGHT", + "NOSE_BOTTOM_LEFT", + "NOSE_BOTTOM_CENTER", + "LEFT_EYE_TOP_BOUNDARY", + "LEFT_EYE_RIGHT_CORNER", + "LEFT_EYE_BOTTOM_BOUNDARY", + "LEFT_EYE_LEFT_CORNER", + "RIGHT_EYE_TOP_BOUNDARY", + "RIGHT_EYE_RIGHT_CORNER", + "RIGHT_EYE_BOTTOM_BOUNDARY", + "RIGHT_EYE_LEFT_CORNER", + "LEFT_EYEBROW_UPPER_MIDPOINT", + "RIGHT_EYEBROW_UPPER_MIDPOINT", + "LEFT_EAR_TRAGION", + "RIGHT_EAR_TRAGION", + "LEFT_EYE_PUPIL", + "RIGHT_EYE_PUPIL", + "FOREHEAD_GLABELLA", + "CHIN_GNATHION", + "CHIN_LEFT_GONION", + "CHIN_RIGHT_GONION" + ], + "description": "Face landmark type.", "type": "string" + }, + "position": { + "description": "Face landmark position.", + "$ref": "Position" } }, "id": "Landmark" }, - "ImageContext": { - "description": "Image context and/or feature-specific parameters.", + "WebImage": { + "id": "WebImage", + "description": "Metadata for online images.", "type": "object", "properties": { - "latLongRect": { - "description": "lat/long rectangle that specifies the location of the image.", - "$ref": "LatLongRect" + "url": { + "description": "The result image URL.", + "type": "string" }, - "languageHints": { - "description": "List of languages to use for TEXT_DETECTION. In most cases, an empty value\nyields the best results since it enables automatic language detection. For\nlanguages based on the Latin alphabet, setting `language_hints` is not\nneeded. In rare cases, when the language of the text in the image is known,\nsetting a hint will help get better results (although it will be a\nsignificant hindrance if the hint is wrong). Text detection returns an\nerror if one or more of the specified languages is not one of the\n[supported languages](/vision/docs/languages).", + "score": { + "description": "Overall relevancy score for the image.\nNot normalized and not comparable across different image queries.", + "format": "float", + "type": "number" + } + } + }, + "Word": { + "id": "Word", + "description": "A word representation.", + "type": "object", + "properties": { + "symbols": { + "description": "List of symbols in the word.\nThe order of the symbols follows the natural reading order.", "type": "array", "items": { - "type": "string" + "$ref": "Symbol" } + }, + "property": { + "$ref": "TextProperty", + "description": "Additional information detected for the word." + }, + "boundingBox": { + "$ref": "BoundingPoly", + "description": "The bounding box for the word.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." + } + } + }, + "Image": { + "description": "Client image to perform Google Cloud Vision API tasks over.", + "type": "object", + "properties": { + "content": { + "description": "Image content, represented as a stream of bytes.\nNote: as with all `bytes` fields, protobuffers use a pure binary\nrepresentation, whereas JSON representations use base64.", + "format": "byte", + "type": "string" + }, + "source": { + "$ref": "ImageSource", + "description": "Google Cloud Storage image location. If both `content` and `source`\nare provided for an image, `content` takes precedence and is\nused to perform the image annotation request." } }, - "id": "ImageContext" + "id": "Image" + }, + "Paragraph": { + "id": "Paragraph", + "description": "Structural unit of text representing a number of words in certain order.", + "type": "object", + "properties": { + "property": { + "$ref": "TextProperty", + "description": "Additional information detected for the paragraph." + }, + "boundingBox": { + "$ref": "BoundingPoly", + "description": "The bounding box for the paragraph.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." + }, + "words": { + "description": "List of words in this paragraph.", + "type": "array", + "items": { + "$ref": "Word" + } + } + } + }, + "FaceAnnotation": { + "description": "A face annotation object contains the results of face detection.", + "type": "object", + "properties": { + "underExposedLikelihood": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Under-exposed likelihood.", + "type": "string" + }, + "panAngle": { + "description": "Yaw angle, which indicates the leftward/rightward angle that the face is\npointing relative to the vertical plane perpendicular to the image. Range\n[-180,180].", + "format": "float", + "type": "number" + }, + "detectionConfidence": { + "description": "Detection confidence. Range [0, 1].", + "format": "float", + "type": "number" + }, + "blurredLikelihood": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Blurred likelihood.", + "type": "string" + }, + "headwearLikelihood": { + "description": "Headwear likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, + "boundingPoly": { + "description": "The bounding polygon around the face. The coordinates of the bounding box\nare in the original image's scale, as returned in `ImageParams`.\nThe bounding box is computed to \"frame\" the face in accordance with human\nexpectations. It is based on the landmarker results.\nNote that one or more x and/or y coordinates may not be generated in the\n`BoundingPoly` (the polygon will be unbounded) if only a partial face\nappears in the image to be annotated.", + "$ref": "BoundingPoly" + }, + "rollAngle": { + "description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation\nof the face relative to the image vertical about the axis perpendicular to\nthe face. Range [-180,180].", + "format": "float", + "type": "number" + }, + "sorrowLikelihood": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Sorrow likelihood.", + "type": "string" + }, + "tiltAngle": { + "description": "Pitch angle, which indicates the upwards/downwards angle that the face is\npointing relative to the image's horizontal plane. Range [-180,180].", + "format": "float", + "type": "number" + }, + "fdBoundingPoly": { + "$ref": "BoundingPoly", + "description": "The `fd_bounding_poly` bounding polygon is tighter than the\n`boundingPoly`, and encloses only the skin part of the face. Typically, it\nis used to eliminate the face from any image analysis that detects the\n\"amount of skin\" visible in an image. It is not based on the\nlandmarker results, only on the initial face detection, hence\nthe \u003ccode\u003efd\u003c/code\u003e (face detection) prefix." + }, + "landmarks": { + "description": "Detected face landmarks.", + "type": "array", + "items": { + "$ref": "Landmark" + } + }, + "surpriseLikelihood": { + "description": "Surprise likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, + "angerLikelihood": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Anger likelihood.", + "type": "string" + }, + "joyLikelihood": { + "description": "Joy likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, + "landmarkingConfidence": { + "description": "Face landmarking confidence. Range [0, 1].", + "format": "float", + "type": "number" + } + }, + "id": "FaceAnnotation" }, "BatchAnnotateImagesRequest": { + "id": "BatchAnnotateImagesRequest", "description": "Multiple image annotation requests are batched into a single service call.", "type": "object", "properties": { @@ -523,279 +846,229 @@ "$ref": "AnnotateImageRequest" } } - }, - "id": "BatchAnnotateImagesRequest" + } }, - "EntityAnnotation": { - "description": "Set of detected entity features.", - "type": "object", - "properties": { - "mid": { - "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", - "type": "string" - }, - "description": { - "description": "Entity textual description, expressed in its `locale` language.", - "type": "string" - }, - "topicality": { - "description": "The relevancy of the ICA (Image Content Annotation) label to the\nimage. For example, the relevancy of \"tower\" is likely higher to an image\ncontaining the detected \"Eiffel Tower\" than to an image containing a\ndetected distant towering building, even though the confidence that\nthere is a tower in each image may be the same. Range [0, 1].", - "type": "number", - "format": "float" - }, - "locale": { - "description": "The language code for the locale in which the entity textual\n`description` is expressed.", - "type": "string" - }, - "properties": { - "description": "Some entities may have optional user-supplied `Property` (name/value)\nfields, such a score or string that qualifies the entity.", - "type": "array", - "items": { - "$ref": "Property" - } - }, - "score": { - "description": "Overall score of the result. Range [0, 1].", - "type": "number", - "format": "float" - }, - "boundingPoly": { - "description": "Image region to which this entity belongs. Currently not produced\nfor `LABEL_DETECTION` features. For `TEXT_DETECTION` (OCR), `boundingPoly`s\nare produced for the entire text detected in an image region, followed by\n`boundingPoly`s for each word within the detected text.", - "$ref": "BoundingPoly" - }, - "locations": { - "description": "The location information for the detected entity. Multiple\n`LocationInfo` elements can be present because one location may\nindicate the location of the scene in the image, and another location\nmay indicate the location of the place where the image was taken.\nLocation information is usually present for landmarks.", - "type": "array", - "items": { - "$ref": "LocationInfo" - } - }, - "confidence": { - "description": "The accuracy of the entity detection in an image.\nFor example, for an image in which the \"Eiffel Tower\" entity is detected,\nthis field represents the confidence that there is a tower in the query\nimage. Range [0, 1].", - "type": "number", - "format": "float" - } - }, - "id": "EntityAnnotation" - }, - "Property": { - "description": "A `Property` consists of a user-supplied name/value pair.", - "type": "object", - "properties": { - "value": { - "description": "Value of the property.", - "type": "string" - }, - "name": { - "description": "Name of the property.", - "type": "string" - } - }, - "id": "Property" - }, - "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed\nfor simplicity of conversion to/from color representations in various\nlanguages over compactness; for example, the fields of this representation\ncan be trivially provided to the constructor of \"java.awt.Color\" in Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily formatted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha \u003c= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(red, green, blue) {\n var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i \u003c missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...", - "type": "object", - "properties": { - "green": { - "description": "The amount of green in the color as a value in the interval [0, 1].", - "type": "number", - "format": "float" - }, - "blue": { - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "type": "number", - "format": "float" - }, - "red": { - "description": "The amount of red in the color as a value in the interval [0, 1].", - "type": "number", - "format": "float" - }, - "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is,\nthe final pixel color is defined by the equation:\n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color. This\nuses a wrapper message rather than a simple float scalar so that it is\npossible to distinguish between a default value and the value being unset.\nIf omitted, this color object is to be rendered as a solid color\n(as if the alpha value had been explicitly given with a value of 1.0).", - "type": "number", - "format": "float" - } - }, - "id": "Color" - }, - "LocationInfo": { - "description": "Detected entity location information.", - "type": "object", - "properties": { - "latLng": { - "description": "lat/long location coordinates.", - "$ref": "LatLng" - } - }, - "id": "LocationInfo" - }, - "SafeSearchAnnotation": { - "type": "object", - "properties": { - "medical": { - "description": "Likelihood that this is a medical image.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "type": "string" - }, - "spoof": { - "description": "Spoof likelihood. The likelihood that an modification\nwas made to the image's canonical version to make it appear\nfunny or offensive.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "type": "string" - }, - "violence": { - "description": "Violence likelihood.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "type": "string" - }, - "adult": { - "description": "Represents the adult content likelihood for the image.", - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "type": "string" - } - }, - "id": "SafeSearchAnnotation" - }, - "Image": { - "description": "Client image to perform Google Cloud Vision API tasks over.", - "type": "object", - "properties": { - "source": { - "description": "Google Cloud Storage image location. If both `content` and `source`\nare provided for an image, `content` takes precedence and is\nused to perform the image annotation request.", - "$ref": "ImageSource" - }, - "content": { - "description": "Image content, represented as a stream of bytes.\nNote: as with all `bytes` fields, protobuffers use a pure binary\nrepresentation, whereas JSON representations use base64.", - "type": "string", - "format": "byte" - } - }, - "id": "Image" - }, - "DominantColorsAnnotation": { - "description": "Set of dominant colors and their corresponding scores.", - "type": "object", - "properties": { - "colors": { - "description": "RGB color values with their score and pixel fraction.", - "type": "array", - "items": { - "$ref": "ColorInfo" - } - } - }, - "id": "DominantColorsAnnotation" - }, - "Feature": { - "description": "Users describe the type of Google Cloud Vision API tasks to perform over\nimages by using *Feature*s. Each Feature indicates a type of image\ndetection task to perform. Features encode the Cloud Vision API\nvertical to operate on and the number of top-scoring results to return.", + "DetectedBreak": { + "description": "Detected start or end of a structural component.", "type": "object", "properties": { "type": { - "description": "The feature type.", - "enum": [ - "TYPE_UNSPECIFIED", - "FACE_DETECTION", - "LANDMARK_DETECTION", - "LOGO_DETECTION", - "LABEL_DETECTION", - "TEXT_DETECTION", - "SAFE_SEARCH_DETECTION", - "IMAGE_PROPERTIES" - ], "enumDescriptions": [ - "Unspecified feature type.", - "Run face detection.", - "Run landmark detection.", - "Run logo detection.", - "Run label detection.", - "Run OCR.", - "Run computer vision models to compute image safe-search properties.", - "Compute a set of image properties, such as the image's dominant colors." + "Unknown break label type.", + "Regular space.", + "Sure space (very wide).", + "Line-wrapping break.", + "End-line hyphen that is not present in text; does not co-occur with\n`SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", + "Line break that ends a paragraph." ], + "enum": [ + "UNKNOWN", + "SPACE", + "SURE_SPACE", + "EOL_SURE_SPACE", + "HYPHEN", + "LINE_BREAK" + ], + "description": "Detected break type.", "type": "string" }, - "maxResults": { - "description": "Maximum number of results of this type.", - "type": "integer", - "format": "int32" + "isPrefix": { + "description": "True if break prepends the element.", + "type": "boolean" } }, - "id": "Feature" + "id": "DetectedBreak" }, - "BatchAnnotateImagesResponse": { - "description": "Response to a batch image annotation request.", + "ImageContext": { + "id": "ImageContext", + "description": "Image context and/or feature-specific parameters.", "type": "object", "properties": { - "responses": { - "description": "Individual responses to image annotation requests within the batch.", + "languageHints": { + "description": "List of languages to use for TEXT_DETECTION. In most cases, an empty value\nyields the best results since it enables automatic language detection. For\nlanguages based on the Latin alphabet, setting `language_hints` is not\nneeded. In rare cases, when the language of the text in the image is known,\nsetting a hint will help get better results (although it will be a\nsignificant hindrance if the hint is wrong). Text detection returns an\nerror if one or more of the specified languages is not one of the\n[supported languages](/vision/docs/languages).", "type": "array", "items": { - "$ref": "AnnotateImageResponse" + "type": "string" } + }, + "latLongRect": { + "description": "lat/long rectangle that specifies the location of the image.", + "$ref": "LatLongRect" + }, + "cropHintsParams": { + "$ref": "CropHintsParams", + "description": "Parameters for crop hints annotation request." + } + } + }, + "Page": { + "id": "Page", + "description": "Detected page from OCR.", + "type": "object", + "properties": { + "blocks": { + "description": "List of blocks of text, images etc on this page.", + "type": "array", + "items": { + "$ref": "Block" + } + }, + "property": { + "$ref": "TextProperty", + "description": "Additional information detected on the page." + }, + "height": { + "description": "Page height in pixels.", + "format": "int32", + "type": "integer" + }, + "width": { + "description": "Page width in pixels.", + "format": "int32", + "type": "integer" + } + } + }, + "AnnotateImageRequest": { + "description": "Request for performing Google Cloud Vision API tasks over a user-provided\nimage, with user-requested features.", + "type": "object", + "properties": { + "image": { + "description": "The image to be processed.", + "$ref": "Image" + }, + "features": { + "description": "Requested features.", + "type": "array", + "items": { + "$ref": "Feature" + } + }, + "imageContext": { + "description": "Additional context that may accompany the image.", + "$ref": "ImageContext" } }, - "id": "BatchAnnotateImagesResponse" + "id": "AnnotateImageRequest" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + } + }, + "id": "Status" + }, + "Symbol": { + "id": "Symbol", + "description": "A single symbol representation.", + "type": "object", + "properties": { + "text": { + "description": "The actual UTF-8 representation of the symbol.", + "type": "string" + }, + "property": { + "$ref": "TextProperty", + "description": "Additional information detected for the symbol." + }, + "boundingBox": { + "description": "The bounding box for the symbol.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3).", + "$ref": "BoundingPoly" + } + } + }, + "LatLongRect": { + "id": "LatLongRect", + "description": "Rectangle determined by min and max `LatLng` pairs.", + "type": "object", + "properties": { + "minLatLng": { + "$ref": "LatLng", + "description": "Min lat/long pair." + }, + "maxLatLng": { + "$ref": "LatLng", + "description": "Max lat/long pair." + } + } + }, + "CropHintsAnnotation": { + "id": "CropHintsAnnotation", + "description": "Set of crop hints that are used to generate new crops when serving images.", + "type": "object", + "properties": { + "cropHints": { + "description": "Crop hint results.", + "type": "array", + "items": { + "$ref": "CropHint" + } + } + } + }, + "LatLng": { + "id": "LatLng", + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", + "type": "object", + "properties": { + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "type": "number" + }, + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" + } + } + }, + "Color": { + "id": "Color", + "description": "Represents a color in the RGBA color space. This representation is designed\nfor simplicity of conversion to/from color representations in various\nlanguages over compactness; for example, the fields of this representation\ncan be trivially provided to the constructor of \"java.awt.Color\" in Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily formatted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha \u003c= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(red, green, blue) {\n var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i \u003c missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...", + "type": "object", + "properties": { + "red": { + "description": "The amount of red in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "green": { + "description": "The amount of green in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "blue": { + "description": "The amount of blue in the color as a value in the interval [0, 1].", + "format": "float", + "type": "number" + }, + "alpha": { + "description": "The fraction of this color that should be applied to the pixel. That is,\nthe final pixel color is defined by the equation:\n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color. This\nuses a wrapper message rather than a simple float scalar so that it is\npossible to distinguish between a default value and the value being unset.\nIf omitted, this color object is to be rendered as a solid color\n(as if the alpha value had been explicitly given with a value of 1.0).", + "format": "float", + "type": "number" + } + } }, "ImageProperties": { "description": "Stores image properties, such as dominant colors.", @@ -808,151 +1081,270 @@ }, "id": "ImageProperties" }, - "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", + "Feature": { + "description": "Users describe the type of Google Cloud Vision API tasks to perform over\nimages by using *Feature*s. Each Feature indicates a type of image\ndetection task to perform. Features encode the Cloud Vision API\nvertical to operate on and the number of top-scoring results to return.", "type": "object", "properties": { - "latitude": { - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "type": "number", - "format": "double" + "type": { + "description": "The feature type.", + "type": "string", + "enumDescriptions": [ + "Unspecified feature type.", + "Run face detection.", + "Run landmark detection.", + "Run logo detection.", + "Run label detection.", + "Run OCR.", + "Run dense text document OCR. Takes precedence when both\nDOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.", + "Run computer vision models to compute image safe-search properties.", + "Compute a set of image properties, such as the image's dominant colors.", + "Run crop hints.", + "Run web detection." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "FACE_DETECTION", + "LANDMARK_DETECTION", + "LOGO_DETECTION", + "LABEL_DETECTION", + "TEXT_DETECTION", + "DOCUMENT_TEXT_DETECTION", + "SAFE_SEARCH_DETECTION", + "IMAGE_PROPERTIES", + "CROP_HINTS", + "WEB_DETECTION" + ] }, - "longitude": { - "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", - "type": "number", - "format": "double" + "maxResults": { + "description": "Maximum number of results of this type.", + "format": "int32", + "type": "integer" } }, - "id": "LatLng" + "id": "Feature" }, - "Position": { - "description": "A 3D position in the image, used primarily for Face detection landmarks.\nA valid Position must have both x and y coordinates.\nThe position coordinates are in the same scale as the original image.", + "SafeSearchAnnotation": { + "id": "SafeSearchAnnotation", + "description": "Set of features pertaining to the image, computed by computer vision\nmethods over safe-search verticals (for example, adult, spoof, medical,\nviolence).", "type": "object", "properties": { - "y": { - "description": "Y coordinate.", - "type": "number", - "format": "float" + "medical": { + "description": "Likelihood that this is a medical image.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] }, + "violence": { + "description": "Violence likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, + "adult": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Represents the adult content likelihood for the image.", + "type": "string" + }, + "spoof": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Spoof likelihood. The likelihood that an modification\nwas made to the image's canonical version to make it appear\nfunny or offensive.", + "type": "string" + } + } + }, + "DominantColorsAnnotation": { + "id": "DominantColorsAnnotation", + "description": "Set of dominant colors and their corresponding scores.", + "type": "object", + "properties": { + "colors": { + "description": "RGB color values with their score and pixel fraction.", + "type": "array", + "items": { + "$ref": "ColorInfo" + } + } + } + }, + "TextAnnotation": { + "id": "TextAnnotation", + "description": "TextAnnotation contains a structured representation of OCR extracted text.\nThe hierarchy of an OCR extracted text structure is like this:\n TextAnnotation -\u003e Page -\u003e Block -\u003e Paragraph -\u003e Word -\u003e Symbol\nEach structural component, starting from Page, may further have their own\nproperties. Properties describe detected languages, breaks etc.. Please\nrefer to the google.cloud.vision.v1.TextAnnotation.TextProperty message\ndefinition below for more detail.", + "type": "object", + "properties": { + "pages": { + "description": "List of pages detected by OCR.", + "type": "array", + "items": { + "$ref": "Page" + } + }, + "text": { + "description": "UTF-8 text detected on the pages.", + "type": "string" + } + } + }, + "DetectedLanguage": { + "id": "DetectedLanguage", + "description": "Detected language for a structural component.", + "type": "object", + "properties": { + "languageCode": { + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more\ninformation, see\nhttp://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "type": "string" + }, + "confidence": { + "description": "Confidence of detected language. Range [0, 1].", + "format": "float", + "type": "number" + } + } + }, + "Vertex": { + "description": "A vertex represents a 2D point in the image.\nNOTE: the vertex coordinates are in the same scale as the original image.", + "type": "object", + "properties": { "x": { "description": "X coordinate.", - "type": "number", - "format": "float" + "format": "int32", + "type": "integer" }, - "z": { - "description": "Z coordinate (or depth).", - "type": "number", - "format": "float" + "y": { + "description": "Y coordinate.", + "format": "int32", + "type": "integer" } }, - "id": "Position" + "id": "Vertex" + }, + "TextProperty": { + "id": "TextProperty", + "description": "Additional information detected on the structural component.", + "type": "object", + "properties": { + "detectedLanguages": { + "description": "A list of detected languages together with confidence.", + "type": "array", + "items": { + "$ref": "DetectedLanguage" + } + }, + "detectedBreak": { + "$ref": "DetectedBreak", + "description": "Detected start or end of a text segment." + } + } + }, + "BoundingPoly": { + "id": "BoundingPoly", + "description": "A bounding polygon for the detected image annotation.", + "type": "object", + "properties": { + "vertices": { + "description": "The bounding polygon vertices.", + "type": "array", + "items": { + "$ref": "Vertex" + } + } + } + }, + "WebEntity": { + "id": "WebEntity", + "description": "Entity deduced from similar images on the Internet.", + "type": "object", + "properties": { + "entityId": { + "description": "Opaque entity ID.", + "type": "string" + }, + "description": { + "description": "Canonical description of the entity, in English.", + "type": "string" + }, + "score": { + "description": "Overall relevancy score for the entity.\nNot normalized and not comparable across different image queries.", + "format": "float", + "type": "number" + } + } } }, - "revision": "20161128", - "basePath": "", + "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "version_module": "True", "canonicalName": "Vision", - "discoveryVersion": "v1", - "baseUrl": "https://vision.googleapis.com/", - "name": "vision", - "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "key": { - "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", - "location": "query" - }, - "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" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "location": "query", - "enum": [ - "json", - "media", - "proto" - ], - "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" - ], - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } } }, - "documentationLink": "https://cloud.google.com/vision/", - "ownerDomain": "google.com", - "batchPath": "batch", - "servicePath": "", - "ownerName": "Google", - "version": "v1", "rootUrl": "https://vision.googleapis.com/", - "kind": "discovery#restDescription" + "ownerDomain": "google.com", + "name": "vision", + "batchPath": "batch" } diff --git a/etc/api/webfonts/v1/webfonts-api.json b/etc/api/webfonts/v1/webfonts-api.json index 75c5f6eadc..747d2375dc 100644 --- a/etc/api/webfonts/v1/webfonts-api.json +++ b/etc/api/webfonts/v1/webfonts-api.json @@ -1,6 +1,6 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/Knx7w96lfDrwO6_VUi53vC5n2dE\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Knx7w96lfDrwO6_VUi53vC5n2dE\"", "discoveryVersion": "v1", "id": "webfonts:v1", "name": "webfonts", diff --git a/etc/api/webmasters/v3/webmasters-api.json b/etc/api/webmasters/v3/webmasters-api.json index fad61b1833..1e76c34103 100644 --- a/etc/api/webmasters/v3/webmasters-api.json +++ b/etc/api/webmasters/v3/webmasters-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/P1nSOVfcIgLwg7Nv_EHtJFN7Dbw\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/zUsMzrFTrcpSdcH8HPrJyBnjfUY\"", "discoveryVersion": "v1", "id": "webmasters:v3", "name": "webmasters", "version": "v3", - "revision": "20160317", + "revision": "20170517", "title": "Search Console API", "description": "View Google Search Console data for your verified sites.", "ownerDomain": "google.com", diff --git a/etc/api/youtube/v3/youtube-api.json b/etc/api/youtube/v3/youtube-api.json index 3f14a1f338..cbe78ed191 100644 --- a/etc/api/youtube/v3/youtube-api.json +++ b/etc/api/youtube/v3/youtube-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/4auVy5GLotTS3CICB9zLFhVaxUM\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/f81k8b4sv9uLeywfoj2KpL2xcPg\"", "discoveryVersion": "v1", "id": "youtube:v3", "name": "youtube", "canonicalName": "YouTube", "version": "v3", - "revision": "20161202", + "revision": "20170130", "title": "YouTube Data API", "description": "Supports core YouTube features, such as uploading videos, creating and managing playlists, searching for content, and much more.", "ownerDomain": "google.com", @@ -1480,6 +1480,13 @@ "type": "object", "description": "Freebase topic information related to the channel.", "properties": { + "topicCategories": { + "type": "array", + "description": "A list of Wikipedia URLs that describe the channel's content.", + "items": { + "type": "string" + } + }, "topicIds": { "type": "array", "description": "A list of Freebase topic IDs associated with the channel. You can retrieve information about each topic using the Freebase Topic API.", @@ -4454,7 +4461,7 @@ "properties": { "authorChannelId": { "type": "string", - "description": "The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action" + "description": "The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase" }, "displayMessage": { "type": "string", @@ -4494,6 +4501,10 @@ "description": "The date and time when the message was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.", "format": "date-time" }, + "superChatDetails": { + "$ref": "LiveChatSuperChatDetails", + "description": "Details about the Super Chat event, this is only set if the type is 'superChatEvent'." + }, "textMessageDetails": { "$ref": "LiveChatTextMessageDetails", "description": "Details about the text message, this is only set if the type is 'textMessageEvent'." @@ -4513,6 +4524,7 @@ "pollVotedEvent", "sponsorOnlyModeEndedEvent", "sponsorOnlyModeStartedEvent", + "superChatEvent", "textMessageEvent", "tombstone", "userBannedEvent" @@ -4531,6 +4543,7 @@ "", "", "", + "", "" ] }, @@ -4694,6 +4707,34 @@ } } }, + "LiveChatSuperChatDetails": { + "id": "LiveChatSuperChatDetails", + "type": "object", + "properties": { + "amountDisplayString": { + "type": "string", + "description": "A rendered string that displays the fund amount and currency to the user." + }, + "amountMicros": { + "type": "string", + "description": "The amount purchased by the user, in micros (1,750,000 micros = 1.75).", + "format": "uint64" + }, + "currency": { + "type": "string", + "description": "The currency in which the purchase was made." + }, + "tier": { + "type": "integer", + "description": "The tier in which the amount belongs to. Lower amounts belong to lower tiers. Starts at 1.", + "format": "uint32" + }, + "userComment": { + "type": "string", + "description": "The comment added by the user to this Super Chat event." + } + } + }, "LiveChatTextMessageDetails": { "id": "LiveChatTextMessageDetails", "type": "object", @@ -5948,6 +5989,111 @@ } } }, + "SuperChatEvent": { + "id": "SuperChatEvent", + "type": "object", + "description": "A superChatEvent resource represents a Super Chat purchase on a YouTube channel.", + "properties": { + "etag": { + "type": "string", + "description": "Etag of this resource." + }, + "id": { + "type": "string", + "description": "The ID that YouTube assigns to uniquely identify the Super Chat event." + }, + "kind": { + "type": "string", + "description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#superChatEvent\".", + "default": "youtube#superChatEvent" + }, + "snippet": { + "$ref": "SuperChatEventSnippet", + "description": "The snippet object contains basic details about the Super Chat event." + } + } + }, + "SuperChatEventListResponse": { + "id": "SuperChatEventListResponse", + "type": "object", + "properties": { + "etag": { + "type": "string", + "description": "Etag of this resource." + }, + "eventId": { + "type": "string", + "description": "Serialized EventId of the request which produced this response." + }, + "items": { + "type": "array", + "description": "A list of Super Chat purchases that match the request criteria.", + "items": { + "$ref": "SuperChatEvent" + } + }, + "kind": { + "type": "string", + "description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#superChatEventListResponse\".", + "default": "youtube#superChatEventListResponse" + }, + "nextPageToken": { + "type": "string", + "description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set." + }, + "pageInfo": { + "$ref": "PageInfo" + }, + "tokenPagination": { + "$ref": "TokenPagination" + }, + "visitorId": { + "type": "string", + "description": "The visitorId identifies the visitor." + } + } + }, + "SuperChatEventSnippet": { + "id": "SuperChatEventSnippet", + "type": "object", + "properties": { + "amountMicros": { + "type": "string", + "description": "The purchase amount, in micros of the purchase currency. e.g., 1 is represented as 1000000.", + "format": "uint64" + }, + "channelId": { + "type": "string", + "description": "Channel id where the event occurred." + }, + "commentText": { + "type": "string", + "description": "The text contents of the comment left by the user." + }, + "createdAt": { + "type": "string", + "description": "The date and time when the event occurred. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.", + "format": "date-time" + }, + "currency": { + "type": "string", + "description": "The currency in which the purchase was made. ISO 4217." + }, + "displayString": { + "type": "string", + "description": "A rendered string that displays the purchase amount and currency (e.g., \"$1.00\"). The string is rendered for the given language." + }, + "messageType": { + "type": "integer", + "description": "The tier for the paid message, which is based on the amount of money spent to purchase the message.", + "format": "uint32" + }, + "supporterDetails": { + "$ref": "ChannelProfileDetails", + "description": "Details about the supporter." + } + } + }, "Thumbnail": { "id": "Thumbnail", "type": "object", @@ -7141,7 +7287,8 @@ "docFile", "imageFile", "notAVideoFile", - "projectFile" + "projectFile", + "unsupportedSpatialAudioLayout" ], "enumDescriptions": [ "", @@ -7149,6 +7296,7 @@ "", "", "", + "", "" ] } @@ -7160,14 +7308,16 @@ "type": "string", "enum": [ "nonStreamableMov", - "procsesingHintSpatialAudio", - "procsesingHintSphericalVideo", - "sendBestQualityVideo" + "sendBestQualityVideo", + "spatialAudio", + "sphericalVideo", + "vrVideo" ], "enumDescriptions": [ "", "", "", + "", "" ] } @@ -7184,7 +7334,9 @@ "problematicVideoCodec", "unknownAudioCodec", "unknownContainer", - "unknownVideoCodec" + "unknownVideoCodec", + "unsupportedSphericalProjectionType", + "unsupportedVrStereoMode" ], "enumDescriptions": [ "", @@ -7193,6 +7345,8 @@ "", "", "", + "", + "", "" ] } @@ -7236,6 +7390,13 @@ "type": "string" } }, + "topicCategories": { + "type": "array", + "description": "A list of Wikipedia URLs that provide a high-level description of the video's content.", + "items": { + "type": "string" + } + }, "topicIds": { "type": "array", "description": "A list of Freebase topic IDs that are centrally associated with the video. These are topics that are centrally featured in the video, and it can be said that the video is mainly about each of these. You can retrieve information about each topic using the Freebase Topic API.", @@ -10112,6 +10273,54 @@ } } }, + "superChatEvents": { + "methods": { + "list": { + "id": "youtube.superChatEvents.list", + "path": "superChatEvents", + "httpMethod": "GET", + "description": "Lists Super Chat events for a channel.", + "parameters": { + "hl": { + "type": "string", + "description": "The hl parameter instructs the API to retrieve localized resource metadata for a specific application language that the YouTube website supports. The parameter value must be a language code included in the list returned by the i18nLanguages.list method.\n\nIf localized resource details are available in that language, the resource's snippet.localized object will contain the localized values. However, if localized details are not available, the snippet.localized object will contain resource details in the resource's default language.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maxResults parameter specifies the maximum number of items that should be returned in the result set.", + "default": "5", + "format": "uint32", + "minimum": "0", + "maximum": "50", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", + "location": "query" + }, + "part": { + "type": "string", + "description": "The part parameter specifies the superChatEvent resource parts that the API response will include. Supported values are id and snippet.", + "required": true, + "location": "query" + } + }, + "parameterOrder": [ + "part" + ], + "response": { + "$ref": "SuperChatEventListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/youtube", + "https://www.googleapis.com/auth/youtube.force-ssl", + "https://www.googleapis.com/auth/youtube.readonly" + ] + } + } + }, "thumbnails": { "methods": { "set": { diff --git a/etc/api/youtubeanalytics/v1/youtubeanalytics-api.json b/etc/api/youtubeanalytics/v1/youtubeanalytics-api.json index 0c5750b878..6276c153b3 100644 --- a/etc/api/youtubeanalytics/v1/youtubeanalytics-api.json +++ b/etc/api/youtubeanalytics/v1/youtubeanalytics-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/Kv4k8l-mDK-6OGsxLWV2P7-SUpY\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/tsPMnqp6qkeRW283IiZ3j0pIVgE\"", "discoveryVersion": "v1", "id": "youtubeAnalytics:v1", "name": "youtubeAnalytics", "canonicalName": "YouTube Analytics", "version": "v1", - "revision": "20161213", + "revision": "20170517", "title": "YouTube Analytics API", "description": "Retrieves your YouTube Analytics data.", "ownerDomain": "google.com", @@ -485,6 +485,11 @@ "pattern": "[a-zA-Z]+==[a-zA-Z0-9_+-]+", "location": "query" }, + "include-historical-channel-data": { + "type": "boolean", + "description": "If set to true historical data (i.e. channel data from before the linking of the channel to the content owner) will be retrieved.", + "location": "query" + }, "max-results": { "type": "integer", "description": "The maximum number of rows to include in the response.", diff --git a/etc/api/youtubeanalytics/v1beta1/youtubeanalytics-api.json b/etc/api/youtubeanalytics/v1beta1/youtubeanalytics-api.json index fdf53d89df..00ab952b17 100644 --- a/etc/api/youtubeanalytics/v1beta1/youtubeanalytics-api.json +++ b/etc/api/youtubeanalytics/v1beta1/youtubeanalytics-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/JnpH1YTisCB0AiXUbnKLhAt55UI\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Uftqe1sqjmX_hue0SDm3s9nlqZk\"", "discoveryVersion": "v1", "id": "youtubeAnalytics:v1beta1", "name": "youtubeAnalytics", "canonicalName": "YouTube Analytics", "version": "v1beta1", - "revision": "20161213", + "revision": "20170517", "title": "YouTube Analytics API", "description": "Retrieves your YouTube Analytics data.", "ownerDomain": "google.com", @@ -488,6 +488,11 @@ "pattern": "[a-zA-Z]+==[a-zA-Z0-9_+-]+", "location": "query" }, + "include-historical-channel-data": { + "type": "boolean", + "description": "If set to true historical data (i.e. channel data from before the linking of the channel to the content owner) will be retrieved.", + "location": "query" + }, "max-results": { "type": "integer", "description": "The maximum number of rows to include in the response.", diff --git a/etc/api/youtubereporting/v1/youtubereporting-api.json b/etc/api/youtubereporting/v1/youtubereporting-api.json index d6b5ef86cc..f4122e8165 100644 --- a/etc/api/youtubereporting/v1/youtubereporting-api.json +++ b/etc/api/youtubereporting/v1/youtubereporting-api.json @@ -1,567 +1,597 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/ym0RISeffUziZ77agVd4GWAEUYI\"", - "discoveryVersion": "v1", - "id": "youtubereporting:v1", - "name": "youtubereporting", - "canonicalName": "YouTube Reporting", - "version": "v1", - "revision": "20160719", - "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.", - "ownerDomain": "google.com", - "ownerName": "Google", - "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/youtube/reporting/v1/reports/", - "protocol": "rest", - "baseUrl": "https://youtubereporting.googleapis.com/", - "basePath": "", - "rootUrl": "https://youtubereporting.googleapis.com/", - "servicePath": "", - "batchPath": "batch", - "parameters": { - "access_token": { - "type": "string", - "description": "OAuth access token.", - "location": "query" - }, - "alt": { - "type": "string", - "description": "Data format for response.", - "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" - ], - "location": "query" - }, - "bearer_token": { - "type": "string", - "description": "OAuth bearer token.", - "location": "query" - }, - "callback": { - "type": "string", - "description": "JSONP", - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "pp": { - "type": "boolean", - "description": "Pretty-print response.", - "default": "true", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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.", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "description": "V1 error format.", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly": { - "description": "View monetary and non-monetary YouTube Analytics reports for your YouTube content" - }, - "https://www.googleapis.com/auth/yt-analytics.readonly": { - "description": "View YouTube Analytics reports for your YouTube content" + "baseUrl": "https://youtubereporting.googleapis.com/", + "canonicalName": "YouTube Reporting", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/yt-analytics.readonly": { + "description": "View YouTube Analytics reports for your YouTube content" + }, + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly": { + "description": "View monetary and non-monetary YouTube Analytics reports for your YouTube content" + } + } } - } - } - }, - "schemas": { - "Media": { - "id": "Media", - "type": "object", - "description": "Media resource.", - "properties": { - "resourceName": { - "type": "string", - "description": "Name of the media resource." - } - } }, - "ListReportTypesResponse": { - "id": "ListReportTypesResponse", - "type": "object", - "description": "Response message for ReportingService.ListReportTypes.", - "properties": { - "reportTypes": { - "type": "array", - "description": "The list of report types.", - "items": { - "$ref": "ReportType" - } - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve next page of results. Pass this value in the ListReportTypesRequest.page_token field in the subsequent call to `ListReportTypes` method to retrieve the next page of results." - } - } - }, - "ReportType": { - "id": "ReportType", - "type": "object", - "description": "A report type.", - "properties": { - "id": { - "type": "string", - "description": "The ID of the report type (max. 100 characters)." - }, - "name": { - "type": "string", - "description": "The name of the report type (max. 100 characters)." - }, - "deprecateTime": { - "type": "string", - "description": "The date/time when this report type was/will be deprecated." - }, - "systemManaged": { - "type": "boolean", - "description": "True if this a system-managed report type; otherwise false. Reporting jobs for system-managed report types are created automatically and can thus not be used in the `CreateJob` method." - } - } - }, - "Job": { - "id": "Job", - "type": "object", - "description": "A job creating reports of a specific type.", - "properties": { - "id": { - "type": "string", - "description": "The server-generated ID of the job (max. 40 characters)." - }, - "reportTypeId": { - "type": "string", - "description": "The type of reports this job creates. Corresponds to the ID of a ReportType." - }, - "name": { - "type": "string", - "description": "The name of the job (max. 100 characters)." - }, - "createTime": { - "type": "string", - "description": "The creation date/time of the job." - }, - "expireTime": { - "type": "string", - "description": "The date/time when this job will expire/expired. After a job expired, no new reports are generated." - }, - "systemManaged": { - "type": "boolean", - "description": "True if this a system-managed job that cannot be modified by the user; otherwise false." - } - } - }, - "ListJobsResponse": { - "id": "ListJobsResponse", - "type": "object", - "description": "Response message for ReportingService.ListJobs.", - "properties": { + "servicePath": "", + "kind": "discovery#restDescription", + "description": "Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.", + "rootUrl": "https://youtubereporting.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "youtubereporting", + "batchPath": "batch", + "id": "youtubereporting:v1", + "documentationLink": "https://developers.google.com/youtube/reporting/v1/reports/", + "revision": "20170520", + "title": "YouTube Reporting API", + "discoveryVersion": "v1", + "ownerName": "Google", + "resources": { "jobs": { - "type": "array", - "description": "The list of jobs.", - "items": { - "$ref": "Job" - } - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve next page of results. Pass this value in the ListJobsRequest.page_token field in the subsequent call to `ListJobs` method to retrieve the next page of results." - } - } - }, - "Empty": { - "id": "Empty", - "type": "object", - "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); } The JSON representation for `Empty` is empty JSON object `{}`." - }, - "ListReportsResponse": { - "id": "ListReportsResponse", - "type": "object", - "description": "Response message for ReportingService.ListReports.", - "properties": { - "reports": { - "type": "array", - "description": "The list of report types.", - "items": { - "$ref": "Report" - } - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve next page of results. Pass this value in the ListReportsRequest.page_token field in the subsequent call to `ListReports` method to retrieve the next page of results." - } - } - }, - "Report": { - "id": "Report", - "type": "object", - "description": "A report's metadata including the URL from which the report itself can be downloaded.", - "properties": { - "id": { - "type": "string", - "description": "The server-generated ID of the report." - }, - "jobId": { - "type": "string", - "description": "The ID of the job that created this report." - }, - "jobExpireTime": { - "type": "string", - "description": "The date/time when the job this report belongs to will expire/expired." - }, - "startTime": { - "type": "string", - "description": "The start of the time period that the report instance covers. The value is inclusive." - }, - "endTime": { - "type": "string", - "description": "The end of the time period that the report instance covers. The value is exclusive." - }, - "createTime": { - "type": "string", - "description": "The date/time when this report was created." - }, - "downloadUrl": { - "type": "string", - "description": "The URL from which the report can be downloaded (max. 1000 characters)." - } - } - } - }, - "resources": { - "media": { - "methods": { - "download": { - "id": "youtubereporting.media.download", - "path": "v1/media/{+resourceName}", - "httpMethod": "GET", - "description": "Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`.", - "parameters": { - "resourceName": { - "type": "string", - "description": "Name of the media that is being downloaded. See ReadRequest.resource_name.", - "required": true, - "pattern": "^.*$", - "location": "path" - } - }, - "parameterOrder": [ - "resourceName" - ], - "response": { - "$ref": "Media" - }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ], - "supportsMediaDownload": true - } - } - }, - "reportTypes": { - "methods": { - "list": { - "id": "youtubereporting.reportTypes.list", - "path": "v1/reportTypes", - "httpMethod": "GET", - "description": "Lists report types.", - "parameters": { - "onBehalfOfContentOwner": { - "type": "string", - "description": "The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Requested page size. Server may return fewer report types than requested. If unspecified, server will pick an appropriate default.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A token identifying a page of results the server should return. Typically, this is the value of ListReportTypesResponse.next_page_token returned in response to the previous call to the `ListReportTypes` method.", - "location": "query" - }, - "includeSystemManaged": { - "type": "boolean", - "description": "If set to true, also system-managed report types will be returned; otherwise only the report types that can be used to create new reporting jobs will be returned.", - "location": "query" - } - }, - "response": { - "$ref": "ListReportTypesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ] - } - } - }, - "jobs": { - "methods": { - "create": { - "id": "youtubereporting.jobs.create", - "path": "v1/jobs", - "httpMethod": "POST", - "description": "Creates a job and returns it.", - "parameters": { - "onBehalfOfContentOwner": { - "type": "string", - "description": "The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).", - "location": "query" - } - }, - "request": { - "$ref": "Job" - }, - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ] - }, - "list": { - "id": "youtubereporting.jobs.list", - "path": "v1/jobs", - "httpMethod": "GET", - "description": "Lists jobs.", - "parameters": { - "onBehalfOfContentOwner": { - "type": "string", - "description": "The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).", - "location": "query" - }, - "pageSize": { - "type": "integer", - "description": "Requested page size. Server may return fewer jobs than requested. If unspecified, server will pick an appropriate default.", - "format": "int32", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A token identifying a page of results the server should return. Typically, this is the value of ListReportTypesResponse.next_page_token returned in response to the previous call to the `ListJobs` method.", - "location": "query" - }, - "includeSystemManaged": { - "type": "boolean", - "description": "If set to true, also system-managed jobs will be returned; otherwise only user-created jobs will be returned. System-managed jobs can neither be modified nor deleted.", - "location": "query" - } - }, - "response": { - "$ref": "ListJobsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ] - }, - "get": { - "id": "youtubereporting.jobs.get", - "path": "v1/jobs/{jobId}", - "httpMethod": "GET", - "description": "Gets a job.", - "parameters": { - "jobId": { - "type": "string", - "description": "The ID of the job to retrieve.", - "required": true, - "location": "path" - }, - "onBehalfOfContentOwner": { - "type": "string", - "description": "The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).", - "location": "query" - } - }, - "parameterOrder": [ - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ] - }, - "delete": { - "id": "youtubereporting.jobs.delete", - "path": "v1/jobs/{jobId}", - "httpMethod": "DELETE", - "description": "Deletes a job.", - "parameters": { - "jobId": { - "type": "string", - "description": "The ID of the job to delete.", - "required": true, - "location": "path" - }, - "onBehalfOfContentOwner": { - "type": "string", - "description": "The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).", - "location": "query" - } - }, - "parameterOrder": [ - "jobId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ] - } - }, - "resources": { - "reports": { - "methods": { - "list": { - "id": "youtubereporting.jobs.reports.list", - "path": "v1/jobs/{jobId}/reports", - "httpMethod": "GET", - "description": "Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist.", - "parameters": { - "jobId": { - "type": "string", - "description": "The ID of the job.", - "required": true, - "location": "path" + "methods": { + "delete": { + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], + "parameters": { + "jobId": { + "location": "path", + "description": "The ID of the job to delete.", + "required": true, + "type": "string" + }, + "onBehalfOfContentOwner": { + "type": "string", + "location": "query", + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel)." + } + }, + "flatPath": "v1/jobs/{jobId}", + "id": "youtubereporting.jobs.delete", + "path": "v1/jobs/{jobId}", + "description": "Deletes a job.", + "httpMethod": "DELETE", + "parameterOrder": [ + "jobId" + ], + "response": { + "$ref": "Empty" + } }, - "onBehalfOfContentOwner": { - "type": "string", - "description": "The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).", - "location": "query" + "list": { + "flatPath": "v1/jobs", + "path": "v1/jobs", + "id": "youtubereporting.jobs.list", + "description": "Lists jobs.", + "response": { + "$ref": "ListJobsResponse" + }, + "httpMethod": "GET", + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportTypesResponse.next_page_token\nreturned in response to the previous call to the `ListJobs` method.", + "type": "string", + "location": "query" + }, + "includeSystemManaged": { + "description": "If set to true, also system-managed jobs will be returned; otherwise only\nuser-created jobs will be returned. System-managed jobs can neither be\nmodified nor deleted.", + "type": "boolean", + "location": "query" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "Requested page size. Server may return fewer jobs than requested.\nIf unspecified, server will pick an appropriate default.", + "format": "int32" + }, + "onBehalfOfContentOwner": { + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string", + "location": "query" + } + } }, - "pageSize": { - "type": "integer", - "description": "Requested page size. Server may return fewer report types than requested. If unspecified, server will pick an appropriate default.", - "format": "int32", - "location": "query" + "get": { + "id": "youtubereporting.jobs.get", + "path": "v1/jobs/{jobId}", + "description": "Gets a job.", + "httpMethod": "GET", + "parameterOrder": [ + "jobId" + ], + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], + "parameters": { + "onBehalfOfContentOwner": { + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string", + "location": "query" + }, + "jobId": { + "location": "path", + "description": "The ID of the job to retrieve.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/jobs/{jobId}" }, - "pageToken": { - "type": "string", - "description": "A token identifying a page of results the server should return. Typically, this is the value of ListReportsResponse.next_page_token returned in response to the previous call to the `ListReports` method.", - "location": "query" - }, - "createdAfter": { - "type": "string", - "description": "If set, only reports created after the specified date/time are returned.", - "location": "query" - }, - "startTimeAtOrAfter": { - "type": "string", - "description": "If set, only reports whose start time is greater than or equal the specified date/time are returned.", - "location": "query" - }, - "startTimeBefore": { - "type": "string", - "description": "If set, only reports whose start time is smaller than the specified date/time are returned.", - "location": "query" + "create": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], + "parameters": { + "onBehalfOfContentOwner": { + "type": "string", + "location": "query", + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel)." + } + }, + "flatPath": "v1/jobs", + "id": "youtubereporting.jobs.create", + "path": "v1/jobs", + "description": "Creates a job and returns it.", + "request": { + "$ref": "Job" + } } - }, - "parameterOrder": [ - "jobId" - ], - "response": { - "$ref": "ListReportsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ] }, - "get": { - "id": "youtubereporting.jobs.reports.get", - "path": "v1/jobs/{jobId}/reports/{reportId}", - "httpMethod": "GET", - "description": "Gets the metadata of a specific report.", - "parameters": { - "jobId": { - "type": "string", - "description": "The ID of the job.", - "required": true, - "location": "path" - }, - "reportId": { - "type": "string", - "description": "The ID of the report to retrieve.", - "required": true, - "location": "path" - }, - "onBehalfOfContentOwner": { - "type": "string", - "description": "The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).", - "location": "query" + "resources": { + "reports": { + "methods": { + "list": { + "response": { + "$ref": "ListReportsResponse" + }, + "parameterOrder": [ + "jobId" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "description": "Requested page size. Server may return fewer report types than requested.\nIf unspecified, server will pick an appropriate default.", + "format": "int32", + "type": "integer", + "location": "query" + }, + "onBehalfOfContentOwner": { + "location": "query", + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string" + }, + "startTimeBefore": { + "description": "If set, only reports whose start time is smaller than the specified\ndate/time are returned.", + "format": "google-datetime", + "type": "string", + "location": "query" + }, + "jobId": { + "location": "path", + "description": "The ID of the job.", + "required": true, + "type": "string" + }, + "createdAfter": { + "location": "query", + "description": "If set, only reports created after the specified date/time are returned.", + "format": "google-datetime", + "type": "string" + }, + "startTimeAtOrAfter": { + "description": "If set, only reports whose start time is greater than or equal the\nspecified date/time are returned.", + "format": "google-datetime", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportsResponse.next_page_token\nreturned in response to the previous call to the `ListReports` method.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], + "flatPath": "v1/jobs/{jobId}/reports", + "path": "v1/jobs/{jobId}/reports", + "id": "youtubereporting.jobs.reports.list", + "description": "Lists reports created by a specific job.\nReturns NOT_FOUND if the job does not exist." + }, + "get": { + "description": "Gets the metadata of a specific report.", + "httpMethod": "GET", + "parameterOrder": [ + "jobId", + "reportId" + ], + "response": { + "$ref": "Report" + }, + "parameters": { + "reportId": { + "required": true, + "type": "string", + "location": "path", + "description": "The ID of the report to retrieve." + }, + "jobId": { + "description": "The ID of the job.", + "required": true, + "type": "string", + "location": "path" + }, + "onBehalfOfContentOwner": { + "location": "query", + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], + "flatPath": "v1/jobs/{jobId}/reports/{reportId}", + "id": "youtubereporting.jobs.reports.get", + "path": "v1/jobs/{jobId}/reports/{reportId}" + } + } + } + } + }, + "reportTypes": { + "methods": { + "list": { + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListReportTypesResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportTypesResponse.next_page_token\nreturned in response to the previous call to the `ListReportTypes` method.", + "type": "string" + }, + "includeSystemManaged": { + "description": "If set to true, also system-managed report types will be returned;\notherwise only the report types that can be used to create new reporting\njobs will be returned.", + "type": "boolean", + "location": "query" + }, + "pageSize": { + "location": "query", + "description": "Requested page size. Server may return fewer report types than requested.\nIf unspecified, server will pick an appropriate default.", + "format": "int32", + "type": "integer" + }, + "onBehalfOfContentOwner": { + "location": "query", + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], + "flatPath": "v1/reportTypes", + "id": "youtubereporting.reportTypes.list", + "path": "v1/reportTypes", + "description": "Lists report types." + } + } + }, + "media": { + "methods": { + "download": { + "parameters": { + "resourceName": { + "description": "Name of the media that is being downloaded. See\nReadRequest.resource_name.", + "required": true, + "type": "string", + "pattern": "^.+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], + "flatPath": "v1/media/{mediaId}", + "id": "youtubereporting.media.download", + "path": "v1/media/{+resourceName}", + "description": "Method for media download. Download is supported\non the URI `/v1/media/{+name}?alt=media`.", + "supportsMediaDownload": true, + "httpMethod": "GET", + "parameterOrder": [ + "resourceName" + ], + "response": { + "$ref": "Media" + } } - }, - "parameterOrder": [ - "jobId", - "reportId" - ], - "response": { - "$ref": "Report" - }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ] } - } } - } - } - } + }, + "parameters": { + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ] + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "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" + }, + "quotaUser": { + "location": "query", + "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" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" + } + }, + "schemas": { + "ListJobsResponse": { + "properties": { + "nextPageToken": { + "type": "string", + "description": "A token to retrieve next page of results.\nPass this value in the\nListJobsRequest.page_token\nfield in the subsequent call to `ListJobs` method to retrieve the next\npage of results." + }, + "jobs": { + "description": "The list of jobs.", + "type": "array", + "items": { + "$ref": "Job" + } + } + }, + "id": "ListJobsResponse", + "description": "Response message for ReportingService.ListJobs.", + "type": "object" + }, + "Job": { + "description": "A job creating reports of a specific type.", + "type": "object", + "properties": { + "createTime": { + "type": "string", + "description": "The creation date/time of the job.", + "format": "google-datetime" + }, + "reportTypeId": { + "description": "The type of reports this job creates. Corresponds to the ID of a\nReportType.", + "type": "string" + }, + "expireTime": { + "description": "The date/time when this job will expire/expired. After a job expired, no\nnew reports are generated.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "The name of the job (max. 100 characters).", + "type": "string" + }, + "systemManaged": { + "description": "True if this a system-managed job that cannot be modified by the user;\notherwise false.", + "type": "boolean" + }, + "id": { + "description": "The server-generated ID of the job (max. 40 characters).", + "type": "string" + } + }, + "id": "Job" + }, + "ListReportsResponse": { + "description": "Response message for ReportingService.ListReports.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the\nListReportsRequest.page_token\nfield in the subsequent call to `ListReports` method to retrieve the next\npage of results.", + "type": "string" + }, + "reports": { + "description": "The list of report types.", + "type": "array", + "items": { + "$ref": "Report" + } + } + }, + "id": "ListReportsResponse" + }, + "Media": { + "description": "Media resource.", + "type": "object", + "properties": { + "resourceName": { + "description": "Name of the media resource.", + "type": "string" + } + }, + "id": "Media" + }, + "ReportType": { + "description": "A report type.", + "type": "object", + "properties": { + "name": { + "description": "The name of the report type (max. 100 characters).", + "type": "string" + }, + "id": { + "description": "The ID of the report type (max. 100 characters).", + "type": "string" + }, + "systemManaged": { + "type": "boolean", + "description": "True if this a system-managed report type; otherwise false. Reporting jobs\nfor system-managed report types are created automatically and can thus not\nbe used in the `CreateJob` method." + }, + "deprecateTime": { + "description": "The date/time when this report type was/will be deprecated.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "ReportType" + }, + "ListReportTypesResponse": { + "type": "object", + "properties": { + "reportTypes": { + "description": "The list of report types.", + "type": "array", + "items": { + "$ref": "ReportType" + } + }, + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the\nListReportTypesRequest.page_token\nfield in the subsequent call to `ListReportTypes` method to retrieve the next\npage of results.", + "type": "string" + } + }, + "id": "ListReportTypesResponse", + "description": "Response message for ReportingService.ListReportTypes." + }, + "Report": { + "description": "A report's metadata including the URL from which the report itself can be\ndownloaded.", + "type": "object", + "properties": { + "createTime": { + "description": "The date/time when this report was created.", + "format": "google-datetime", + "type": "string" + }, + "jobId": { + "description": "The ID of the job that created this report.", + "type": "string" + }, + "id": { + "description": "The server-generated ID of the report.", + "type": "string" + }, + "jobExpireTime": { + "description": "The date/time when the job this report belongs to will expire/expired.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "type": "string", + "description": "The end of the time period that the report instance covers. The value is\nexclusive.", + "format": "google-datetime" + }, + "downloadUrl": { + "description": "The URL from which the report can be downloaded (max. 1000 characters).", + "type": "string" + }, + "startTime": { + "description": "The start of the time period that the report instance covers. The value is\ninclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "Report" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "version": "v1" } diff --git a/gen/adexchangebuyer1d3-cli/Cargo.toml b/gen/adexchangebuyer1d3-cli/Cargo.toml index e26be4e689..6e8fcf6382 100644 --- a/gen/adexchangebuyer1d3-cli/Cargo.toml +++ b/gen/adexchangebuyer1d3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adexchangebuyer1d3-cli" -version = "1.0.4+20161020" +version = "1.0.4+20170504" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Buyer (protocol v1.3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d3-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-adexchangebuyer1d3] path = "../adexchangebuyer1d3" -version = "1.0.4+20161020" +version = "1.0.4+20170504" diff --git a/gen/adexchangebuyer1d3-cli/README.md b/gen/adexchangebuyer1d3-cli/README.md index 7221534f0c..e0c0054b51 100644 --- a/gen/adexchangebuyer1d3-cli/README.md +++ b/gen/adexchangebuyer1d3-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Ad Exchange Buyer* API at revision *20161020*. The CLI is at version *1.0.4*. +This documentation was generated from the *Ad Exchange Buyer* API at revision *20170504*. The CLI is at version *1.0.4*. ```bash adexchangebuyer1d3 [options] diff --git a/gen/adexchangebuyer1d3-cli/mkdocs.yml b/gen/adexchangebuyer1d3-cli/mkdocs.yml index 6e48eac064..5060973d72 100644 --- a/gen/adexchangebuyer1d3-cli/mkdocs.yml +++ b/gen/adexchangebuyer1d3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Ad Exchange Buyer v1.0.4+20161020 +site_name: Ad Exchange Buyer v1.0.4+20170504 site_url: http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3-cli site_description: A complete library to interact with Ad Exchange Buyer (protocol v1.3) diff --git a/gen/adexchangebuyer1d3-cli/src/main.rs b/gen/adexchangebuyer1d3-cli/src/main.rs index 47eb49b5e2..68839c7652 100644 --- a/gen/adexchangebuyer1d3-cli/src/main.rs +++ b/gen/adexchangebuyer1d3-cli/src/main.rs @@ -2304,7 +2304,7 @@ fn main() { let mut app = App::new("adexchangebuyer1d3") .author("Sebastian Thiel ") - .version("1.0.4+20161020") + .version("1.0.4+20170504") .about("Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_adexchangebuyer1d3_cli") .arg(Arg::with_name("url") diff --git a/gen/adexchangebuyer1d3/Cargo.toml b/gen/adexchangebuyer1d3/Cargo.toml index 960c41d0f1..44b0808f2d 100644 --- a/gen/adexchangebuyer1d3/Cargo.toml +++ b/gen/adexchangebuyer1d3/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-adexchangebuyer1d3" -version = "1.0.4+20161020" +version = "1.0.4+20170504" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Buyer (protocol v1.3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d3" homepage = "https://developers.google.com/ad-exchange/buyer-rest" -documentation = "https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020" +documentation = "https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504" license = "MIT" keywords = ["adexchangebuyer", "google", "protocol", "web", "api"] diff --git a/gen/adexchangebuyer1d3/README.md b/gen/adexchangebuyer1d3/README.md index 1cb2b595d3..5e2e693227 100644 --- a/gen/adexchangebuyer1d3/README.md +++ b/gen/adexchangebuyer1d3/README.md @@ -5,28 +5,28 @@ DO NOT EDIT ! --> The `google-adexchangebuyer1d3` library allows access to all features of the *Google Ad Exchange Buyer* service. -This documentation was generated from *Ad Exchange Buyer* crate version *1.0.4+20161020*, where *20161020* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Ad Exchange Buyer* crate version *1.0.4+20170504*, where *20170504* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Ad Exchange Buyer* *v1d3* API can be found at the [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.AdExchangeBuyer.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.AdExchangeBuyer.html) ... -* [accounts](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.Account.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.AccountGetCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.AccountListCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.AccountUpdateCall.html) -* [billing info](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.BillingInfo.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.BillingInfoGetCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.BillingInfoListCall.html) -* [budget](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.Budget.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.BudgetGetCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.BudgetPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.BudgetUpdateCall.html) -* [creatives](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.Creative.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.CreativeInsertCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.CreativeListCall.html) -* [direct deals](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.DirectDeal.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.DirectDealGetCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.DirectDealListCall.html) -* [performance report](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.PerformanceReport.html) - * [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.PerformanceReportListCall.html) -* [pretargeting config](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.PretargetingConfig.html) - * [*delete*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.PretargetingConfigDeleteCall.html), [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.PretargetingConfigGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.PretargetingConfigInsertCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.PretargetingConfigListCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.PretargetingConfigPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.PretargetingConfigUpdateCall.html) +* [accounts](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.Account.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.AccountGetCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.AccountListCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.AccountUpdateCall.html) +* [billing info](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.BillingInfo.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.BillingInfoGetCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.BillingInfoListCall.html) +* [budget](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.Budget.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.BudgetGetCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.BudgetPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.BudgetUpdateCall.html) +* [creatives](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.Creative.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.CreativeInsertCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.CreativeListCall.html) +* [direct deals](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.DirectDeal.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.DirectDealGetCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.DirectDealListCall.html) +* [performance report](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.PerformanceReport.html) + * [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.PerformanceReportListCall.html) +* [pretargeting config](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.PretargetingConfig.html) + * [*delete*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.PretargetingConfigDeleteCall.html), [*get*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.PretargetingConfigGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.PretargetingConfigInsertCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.PretargetingConfigListCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.PretargetingConfigPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.PretargetingConfigUpdateCall.html) @@ -35,17 +35,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/struct.AdExchangeBuyer.html)** +* **[Hub](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/struct.AdExchangeBuyer.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.Part.html)** + * **[Parts](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -136,17 +136,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.Delegate.html), 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-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.ResponseResult.html), 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")`. @@ -156,29 +156,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.CallBuilder.html) 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-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.RequestValue.html) and -[decodable](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.RequestValue.html) and +[decodable](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.CallBuilder.html), 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-adexchangebuyer1d3/1.0.4+20161020/google_adexchangebuyer1d3/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-adexchangebuyer1d3/1.0.4+20170504/google_adexchangebuyer1d3/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/adexchangebuyer1d3/src/lib.rs b/gen/adexchangebuyer1d3/src/lib.rs index 445981663d..a26add6ed5 100644 --- a/gen/adexchangebuyer1d3/src/lib.rs +++ b/gen/adexchangebuyer1d3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Ad Exchange Buyer* crate version *1.0.4+20161020*, where *20161020* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Ad Exchange Buyer* crate version *1.0.4+20170504*, where *20170504* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Ad Exchange Buyer* *v1d3* API can be found at the //! [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). diff --git a/gen/adexchangebuyer1d4-cli/Cargo.toml b/gen/adexchangebuyer1d4-cli/Cargo.toml index ee042cb8dd..877080ce4f 100644 --- a/gen/adexchangebuyer1d4-cli/Cargo.toml +++ b/gen/adexchangebuyer1d4-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adexchangebuyer1d4-cli" -version = "1.0.4+20161020" +version = "1.0.4+20170504" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Buyer (protocol v1.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d4-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-adexchangebuyer1d4] path = "../adexchangebuyer1d4" -version = "1.0.4+20161020" +version = "1.0.4+20170504" diff --git a/gen/adexchangebuyer1d4-cli/README.md b/gen/adexchangebuyer1d4-cli/README.md index dcfed45381..4060999edd 100644 --- a/gen/adexchangebuyer1d4-cli/README.md +++ b/gen/adexchangebuyer1d4-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Ad Exchange Buyer* API at revision *20161020*. The CLI is at version *1.0.4*. +This documentation was generated from the *Ad Exchange Buyer* API at revision *20170504*. The CLI is at version *1.0.4*. ```bash adexchangebuyer1d4 [options] diff --git a/gen/adexchangebuyer1d4-cli/mkdocs.yml b/gen/adexchangebuyer1d4-cli/mkdocs.yml index 25ad9330f6..874186276d 100644 --- a/gen/adexchangebuyer1d4-cli/mkdocs.yml +++ b/gen/adexchangebuyer1d4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Ad Exchange Buyer v1.0.4+20161020 +site_name: Ad Exchange Buyer v1.0.4+20170504 site_url: http://byron.github.io/google-apis-rs/google-adexchangebuyer1d4-cli site_description: A complete library to interact with Ad Exchange Buyer (protocol v1.4) diff --git a/gen/adexchangebuyer1d4-cli/src/main.rs b/gen/adexchangebuyer1d4-cli/src/main.rs index b725821f9e..b46e459cbf 100644 --- a/gen/adexchangebuyer1d4-cli/src/main.rs +++ b/gen/adexchangebuyer1d4-cli/src/main.rs @@ -1818,29 +1818,30 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "billing-id" => Some(("billingId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "languages" => Some(("languages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config-name" => Some(("configName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "excluded-geo-criteria-ids" => Some(("excludedGeoCriteriaIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "user-lists" => Some(("userLists", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "user-identifier-data-required" => Some(("userIdentifierDataRequired", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "excluded-verticals" => Some(("excludedVerticals", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "vendor-types" => Some(("vendorTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "excluded-content-labels" => Some(("excludedContentLabels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "verticals" => Some(("verticals", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "platforms" => Some(("platforms", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "config-id" => Some(("configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "excluded-verticals" => Some(("excludedVerticals", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "config-name" => Some(("configName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "excluded-geo-criteria-ids" => Some(("excludedGeoCriteriaIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "excluded-content-labels" => Some(("excludedContentLabels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "languages" => Some(("languages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "mobile-devices" => Some(("mobileDevices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "creative-type" => Some(("creativeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "mobile-carriers" => Some(("mobileCarriers", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "billing-id" => Some(("billingId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "geo-criteria-ids" => Some(("geoCriteriaIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "mobile-operating-system-versions" => Some(("mobileOperatingSystemVersions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "mobile-carriers" => Some(("mobileCarriers", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "config-id" => Some(("configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "excluded-user-lists" => Some(("excludedUserLists", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "is-active" => Some(("isActive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "minimum-viewability-decile" => Some(("minimumViewabilityDecile", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "supported-creative-attributes" => Some(("supportedCreativeAttributes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "user-identifier-data-required" => Some(("userIdentifierDataRequired", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "vendor-types" => Some(("vendorTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "user-lists" => Some(("userLists", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "creative-type" => Some(("creativeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["billing-id", "config-id", "config-name", "creative-type", "excluded-content-labels", "excluded-geo-criteria-ids", "excluded-user-lists", "excluded-verticals", "geo-criteria-ids", "is-active", "kind", "languages", "mobile-carriers", "mobile-devices", "mobile-operating-system-versions", "platforms", "supported-creative-attributes", "user-identifier-data-required", "user-lists", "vendor-types", "verticals"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["billing-id", "config-id", "config-name", "creative-type", "excluded-content-labels", "excluded-geo-criteria-ids", "excluded-user-lists", "excluded-verticals", "geo-criteria-ids", "is-active", "kind", "languages", "minimum-viewability-decile", "mobile-carriers", "mobile-devices", "mobile-operating-system-versions", "platforms", "supported-creative-attributes", "user-identifier-data-required", "user-lists", "vendor-types", "verticals"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1975,29 +1976,30 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "billing-id" => Some(("billingId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "languages" => Some(("languages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config-name" => Some(("configName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "excluded-geo-criteria-ids" => Some(("excludedGeoCriteriaIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "user-lists" => Some(("userLists", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "user-identifier-data-required" => Some(("userIdentifierDataRequired", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "excluded-verticals" => Some(("excludedVerticals", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "vendor-types" => Some(("vendorTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "excluded-content-labels" => Some(("excludedContentLabels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "verticals" => Some(("verticals", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "platforms" => Some(("platforms", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "config-id" => Some(("configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "excluded-verticals" => Some(("excludedVerticals", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "config-name" => Some(("configName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "excluded-geo-criteria-ids" => Some(("excludedGeoCriteriaIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "excluded-content-labels" => Some(("excludedContentLabels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "languages" => Some(("languages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "mobile-devices" => Some(("mobileDevices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "creative-type" => Some(("creativeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "mobile-carriers" => Some(("mobileCarriers", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "billing-id" => Some(("billingId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "geo-criteria-ids" => Some(("geoCriteriaIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "mobile-operating-system-versions" => Some(("mobileOperatingSystemVersions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "mobile-carriers" => Some(("mobileCarriers", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "config-id" => Some(("configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "excluded-user-lists" => Some(("excludedUserLists", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "is-active" => Some(("isActive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "minimum-viewability-decile" => Some(("minimumViewabilityDecile", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "supported-creative-attributes" => Some(("supportedCreativeAttributes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "user-identifier-data-required" => Some(("userIdentifierDataRequired", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "vendor-types" => Some(("vendorTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "user-lists" => Some(("userLists", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "creative-type" => Some(("creativeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["billing-id", "config-id", "config-name", "creative-type", "excluded-content-labels", "excluded-geo-criteria-ids", "excluded-user-lists", "excluded-verticals", "geo-criteria-ids", "is-active", "kind", "languages", "mobile-carriers", "mobile-devices", "mobile-operating-system-versions", "platforms", "supported-creative-attributes", "user-identifier-data-required", "user-lists", "vendor-types", "verticals"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["billing-id", "config-id", "config-name", "creative-type", "excluded-content-labels", "excluded-geo-criteria-ids", "excluded-user-lists", "excluded-verticals", "geo-criteria-ids", "is-active", "kind", "languages", "minimum-viewability-decile", "mobile-carriers", "mobile-devices", "mobile-operating-system-versions", "platforms", "supported-creative-attributes", "user-identifier-data-required", "user-lists", "vendor-types", "verticals"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2080,29 +2082,30 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "billing-id" => Some(("billingId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "languages" => Some(("languages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config-name" => Some(("configName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "excluded-geo-criteria-ids" => Some(("excludedGeoCriteriaIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "user-lists" => Some(("userLists", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "user-identifier-data-required" => Some(("userIdentifierDataRequired", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "excluded-verticals" => Some(("excludedVerticals", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "vendor-types" => Some(("vendorTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "excluded-content-labels" => Some(("excludedContentLabels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "verticals" => Some(("verticals", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "platforms" => Some(("platforms", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "config-id" => Some(("configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "excluded-verticals" => Some(("excludedVerticals", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "config-name" => Some(("configName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "excluded-geo-criteria-ids" => Some(("excludedGeoCriteriaIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "excluded-content-labels" => Some(("excludedContentLabels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "languages" => Some(("languages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "mobile-devices" => Some(("mobileDevices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "creative-type" => Some(("creativeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "mobile-carriers" => Some(("mobileCarriers", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "billing-id" => Some(("billingId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "geo-criteria-ids" => Some(("geoCriteriaIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "mobile-operating-system-versions" => Some(("mobileOperatingSystemVersions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "mobile-carriers" => Some(("mobileCarriers", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "config-id" => Some(("configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "excluded-user-lists" => Some(("excludedUserLists", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "is-active" => Some(("isActive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "minimum-viewability-decile" => Some(("minimumViewabilityDecile", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "supported-creative-attributes" => Some(("supportedCreativeAttributes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "user-identifier-data-required" => Some(("userIdentifierDataRequired", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "vendor-types" => Some(("vendorTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "user-lists" => Some(("userLists", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "creative-type" => Some(("creativeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["billing-id", "config-id", "config-name", "creative-type", "excluded-content-labels", "excluded-geo-criteria-ids", "excluded-user-lists", "excluded-verticals", "geo-criteria-ids", "is-active", "kind", "languages", "mobile-carriers", "mobile-devices", "mobile-operating-system-versions", "platforms", "supported-creative-attributes", "user-identifier-data-required", "user-lists", "vendor-types", "verticals"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["billing-id", "config-id", "config-name", "creative-type", "excluded-content-labels", "excluded-geo-criteria-ids", "excluded-user-lists", "excluded-verticals", "geo-criteria-ids", "is-active", "kind", "languages", "minimum-viewability-decile", "mobile-carriers", "mobile-devices", "mobile-operating-system-versions", "platforms", "supported-creative-attributes", "user-identifier-data-required", "user-lists", "vendor-types", "verticals"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -4083,7 +4086,7 @@ fn main() { let mut app = App::new("adexchangebuyer1d4") .author("Sebastian Thiel ") - .version("1.0.4+20161020") + .version("1.0.4+20170504") .about("Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4_cli") .arg(Arg::with_name("url") diff --git a/gen/adexchangebuyer1d4/Cargo.toml b/gen/adexchangebuyer1d4/Cargo.toml index f8597f5b3c..237260a2ed 100644 --- a/gen/adexchangebuyer1d4/Cargo.toml +++ b/gen/adexchangebuyer1d4/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-adexchangebuyer1d4" -version = "1.0.4+20161020" +version = "1.0.4+20170504" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Buyer (protocol v1.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d4" homepage = "https://developers.google.com/ad-exchange/buyer-rest" -documentation = "https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020" +documentation = "https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504" license = "MIT" keywords = ["adexchangebuyer", "google", "protocol", "web", "api"] diff --git a/gen/adexchangebuyer1d4/README.md b/gen/adexchangebuyer1d4/README.md index f826c5705a..41d8f27539 100644 --- a/gen/adexchangebuyer1d4/README.md +++ b/gen/adexchangebuyer1d4/README.md @@ -5,38 +5,38 @@ DO NOT EDIT ! --> The `google-adexchangebuyer1d4` library allows access to all features of the *Google Ad Exchange Buyer* service. -This documentation was generated from *Ad Exchange Buyer* crate version *1.0.4+20161020*, where *20161020* is the exact revision of the *adexchangebuyer:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Ad Exchange Buyer* crate version *1.0.4+20170504*, where *20170504* is the exact revision of the *adexchangebuyer:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Ad Exchange Buyer* *v1d4* API can be found at the [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.AdExchangeBuyer.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.AdExchangeBuyer.html) ... -* [accounts](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.Account.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.AccountGetCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.AccountListCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.AccountUpdateCall.html) -* [billing info](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.BillingInfo.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.BillingInfoGetCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.BillingInfoListCall.html) -* [budget](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.Budget.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.BudgetGetCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.BudgetPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.BudgetUpdateCall.html) -* [creatives](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.Creative.html) - * [*add deal*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.CreativeAddDealCall.html), [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.CreativeInsertCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.CreativeListCall.html), [*list deals*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.CreativeListDealCall.html) and [*remove deal*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.CreativeRemoveDealCall.html) +* [accounts](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.Account.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.AccountGetCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.AccountListCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.AccountUpdateCall.html) +* [billing info](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.BillingInfo.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.BillingInfoGetCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.BillingInfoListCall.html) +* [budget](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.Budget.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.BudgetGetCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.BudgetPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.BudgetUpdateCall.html) +* [creatives](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.Creative.html) + * [*add deal*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.CreativeAddDealCall.html), [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.CreativeInsertCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.CreativeListCall.html), [*list deals*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.CreativeListDealCall.html) and [*remove deal*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.CreativeRemoveDealCall.html) * marketplacedeals - * [*delete*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.MarketplacedealDeleteCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.MarketplacedealInsertCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.MarketplacedealListCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.MarketplacedealUpdateCall.html) + * [*delete*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.MarketplacedealDeleteCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.MarketplacedealInsertCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.MarketplacedealListCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.MarketplacedealUpdateCall.html) * marketplacenotes - * [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.MarketplacenoteInsertCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.MarketplacenoteListCall.html) + * [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.MarketplacenoteInsertCall.html) and [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.MarketplacenoteListCall.html) * marketplaceprivateauction - * [*updateproposal*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.MarketplaceprivateauctionUpdateproposalCall.html) -* [performance report](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PerformanceReport.html) - * [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PerformanceReportListCall.html) -* [pretargeting config](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PretargetingConfig.html) - * [*delete*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PretargetingConfigDeleteCall.html), [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PretargetingConfigGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PretargetingConfigInsertCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PretargetingConfigListCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PretargetingConfigPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PretargetingConfigUpdateCall.html) -* [products](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.Product.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.ProductGetCall.html) and [*search*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.ProductSearchCall.html) -* [proposals](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.Proposal.html) - * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.ProposalGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.ProposalInsertCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.ProposalPatchCall.html), [*search*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.ProposalSearchCall.html), [*setupcomplete*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.ProposalSetupcompleteCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.ProposalUpdateCall.html) + * [*updateproposal*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.MarketplaceprivateauctionUpdateproposalCall.html) +* [performance report](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PerformanceReport.html) + * [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PerformanceReportListCall.html) +* [pretargeting config](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PretargetingConfig.html) + * [*delete*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PretargetingConfigDeleteCall.html), [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PretargetingConfigGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PretargetingConfigInsertCall.html), [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PretargetingConfigListCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PretargetingConfigPatchCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PretargetingConfigUpdateCall.html) +* [products](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.Product.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.ProductGetCall.html) and [*search*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.ProductSearchCall.html) +* [proposals](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.Proposal.html) + * [*get*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.ProposalGetCall.html), [*insert*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.ProposalInsertCall.html), [*patch*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.ProposalPatchCall.html), [*search*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.ProposalSearchCall.html), [*setupcomplete*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.ProposalSetupcompleteCall.html) and [*update*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.ProposalUpdateCall.html) * pubprofiles - * [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.PubprofileListCall.html) + * [*list*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.PubprofileListCall.html) @@ -45,17 +45,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/struct.AdExchangeBuyer.html)** +* **[Hub](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/struct.AdExchangeBuyer.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.Part.html)** + * **[Parts](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -148,17 +148,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.Delegate.html), 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-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.ResponseResult.html), 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")`. @@ -168,29 +168,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.CallBuilder.html) 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-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.RequestValue.html) and -[decodable](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.RequestValue.html) and +[decodable](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.CallBuilder.html), 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-adexchangebuyer1d4/1.0.4+20161020/google_adexchangebuyer1d4/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-adexchangebuyer1d4/1.0.4+20170504/google_adexchangebuyer1d4/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/adexchangebuyer1d4/src/lib.rs b/gen/adexchangebuyer1d4/src/lib.rs index fe764b7955..7b19063c78 100644 --- a/gen/adexchangebuyer1d4/src/lib.rs +++ b/gen/adexchangebuyer1d4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Ad Exchange Buyer* crate version *1.0.4+20161020*, where *20161020* is the exact revision of the *adexchangebuyer:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Ad Exchange Buyer* crate version *1.0.4+20170504*, where *20170504* is the exact revision of the *adexchangebuyer:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Ad Exchange Buyer* *v1d4* API can be found at the //! [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). @@ -561,15 +561,15 @@ impl Part for CreativeDealIdsDealStatuses {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Creative { - /// Detected product categories, if any. Read-only. This field should not be set in requests. + /// Detected product categories, if any. Each category is represented by an integer as defined in ad-product-categories.txt. Read-only. This field should not be set in requests. #[serde(rename="productCategories")] pub product_categories: Option>, /// The agency id for this creative. #[serde(rename="agencyId")] pub agency_id: Option, - /// All attributes for the ads that may be shown from this snippet. + /// List of buyer selectable attributes for the ads that may be shown from this snippet. Each attribute is represented by an integer as defined in buyer-declarable-creative-attributes.txt. pub attribute: Option>, - /// All restricted categories for the ads that may be shown from this snippet. + /// All restricted categories for the ads that may be shown from this snippet. Each category is represented by an integer as defined in the ad-restricted-categories.txt. #[serde(rename="restrictedCategories")] pub restricted_categories: Option>, /// Detected domains for this creative. Read-only. This field should not be set in requests. @@ -601,7 +601,7 @@ pub struct Creative { /// Account id. #[serde(rename="accountId")] pub account_id: Option, - /// The name of the company being advertised in the creative. + /// The name of the company being advertised in the creative. The value provided must exist in the advertisers.txt file. #[serde(rename="advertiserName")] pub advertiser_name: Option, /// Resource type. @@ -612,7 +612,7 @@ pub struct Creative { /// The set of destination urls for the snippet. #[serde(rename="clickThroughUrl")] pub click_through_url: Option>, - /// The granular status of this ad in specific contexts. A context here relates to where something ultimately serves (for example, a physical location, a platform, an HTTPS vs HTTP request, or the type of auction). Read-only. This field should not be set in requests. + /// The granular status of this ad in specific contexts. A context here relates to where something ultimately serves (for example, a physical location, a platform, an HTTPS vs HTTP request, or the type of auction). Read-only. This field should not be set in requests. See the examples in the Creatives guide for more details. #[serde(rename="servingRestrictions")] pub serving_restrictions: Option>, /// Shows any corrections that were applied to this creative. Read-only. This field should not be set in requests. @@ -629,13 +629,13 @@ pub struct Creative { /// The last upload timestamp of this creative if it was uploaded via API. Read-only. The value of this field is generated, and will be ignored for uploads. (formatted RFC 3339 timestamp). #[serde(rename="apiUploadTimestamp")] pub api_upload_timestamp: Option, - /// All vendor types for the ads that may be shown from this snippet. + /// List of vendor types for the ads that may be shown from this snippet. Each vendor type is represented by an integer as defined in vendors.txt. #[serde(rename="vendorType")] pub vendor_type: Option>, /// The filtering reasons for the creative. Read-only. This field should not be set in requests. #[serde(rename="filteringReasons")] pub filtering_reasons: Option, - /// Detected sensitive categories, if any. Read-only. This field should not be set in requests. + /// Detected sensitive categories, if any. Each category is represented by an integer as defined in ad-sensitive-categories.txt. Read-only. This field should not be set in requests. #[serde(rename="sensitiveCategories")] pub sensitive_categories: Option>, } @@ -849,7 +849,7 @@ pub struct Proposal { /// True if the proposal is being renegotiated (readonly). #[serde(rename="isRenegotiating")] pub is_renegotiating: Option, - /// True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) + /// True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag. #[serde(rename="isSetupComplete")] pub is_setup_complete: Option, /// IDs of DBM advertisers permission to this proposal. @@ -922,9 +922,14 @@ pub struct Product { /// What exchange will provide this inventory (readonly, except on create). #[serde(rename="inventorySource")] pub inventory_source: Option, + /// The buyer that created the offer if this is a buyer initiated offer (readonly, except on create) + pub buyer: Option, /// Id of the publisher profile for a given seller. A (seller.account_id, publisher_profile_id) pair uniquely identifies a publisher profile. Buyers can call the PublisherProfiles::List endpoint to get a list of publisher profiles for a given seller. #[serde(rename="publisherProfileId")] pub publisher_profile_id: Option, + /// The role that created the offer. Set to BUYER for buyer initiated offers. + #[serde(rename="creatorRole")] + pub creator_role: Option, /// Time of last update in ms. since epoch (readonly) #[serde(rename="lastUpdateTimeMs")] pub last_update_time_ms: Option, @@ -936,11 +941,17 @@ pub struct Product { pub legacy_offer_id: Option, /// Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#product". pub kind: Option, + /// Marketplace publisher profile Id. This Id differs from the regular publisher_profile_id in that 1. This is a new id, the old Id will be deprecated in 2017. 2. This id uniquely identifies a publisher profile by itself. + #[serde(rename="marketplacePublisherProfileId")] + pub marketplace_publisher_profile_id: Option, /// The name for this product as set by the seller. (buyer-readonly) pub name: Option, /// The syndication product associated with the deal. (readonly, except on create) #[serde(rename="syndicationProduct")] pub syndication_product: Option, + /// The billed buyer corresponding to the buyer that created the offer. (readonly, except on create) + #[serde(rename="billedBuyer")] + pub billed_buyer: Option, /// Optional private auction id if this offer is a private auction offer. #[serde(rename="privateAuctionId")] pub private_auction_id: Option, @@ -1130,7 +1141,7 @@ pub struct CreativeServingRestrictionsContexts { /// Only set when contextType=AUCTION_TYPE. Represents the auction types this restriction applies to. #[serde(rename="auctionType")] pub auction_type: Option>, - /// Only set when contextType=LOCATION. Represents the geo criterias this restriction applies to. + /// Only set when contextType=LOCATION. Represents the geo criterias this restriction applies to. Impressions are considered to match a context if either the user location or publisher location matches a given geoCriteriaId. #[serde(rename="geoCriteriaId")] pub geo_criteria_id: Option>, } @@ -1174,7 +1185,7 @@ pub struct DealTermsGuaranteedFixedPriceTermsBillingInfo { /// The original contracted quantity (# impressions) for this deal. To ensure delivery, sometimes the publisher will book the deal with a impression buffer, such that guaranteed_looks is greater than the contracted quantity. However clients are billed using the original contracted quantity. #[serde(rename="originalContractedQuantity")] pub original_contracted_quantity: Option, - /// The timestamp (in ms since epoch) when the original reservation price for the deal was first converted to DFP currency. This is used to convert the contracted price into advertiser's currency without discrepancy. + /// The timestamp (in ms since epoch) when the original reservation price for the deal was first converted to DFP currency. This is used to convert the contracted price into buyer's currency without discrepancy. #[serde(rename="currencyConversionTimeMs")] pub currency_conversion_time_ms: Option, } @@ -1230,7 +1241,7 @@ pub struct CreativeFilteringReasonsReasons { /// The number of times the creative was filtered for the status. The count is aggregated across all publishers on the exchange. #[serde(rename="filteringCount")] pub filtering_count: Option, - /// The filtering status code. Please refer to the creative-status-codes.txt file for different statuses. + /// The filtering status code as defined in creative-status-codes.txt. #[serde(rename="filteringStatus")] pub filtering_status: Option, } @@ -1380,12 +1391,15 @@ pub struct AccountBidderLocation { /// - US_EAST /// - US_WEST pub region: Option, - /// The protocol that the bidder endpoint is using. By default, OpenRTB protocols use JSON, except PROTOCOL_OPENRTB_PROTOBUF. PROTOCOL_OPENRTB_PROTOBUF uses protobuf encoding over the latest OpenRTB protocol version, which is 2.4 right now. Allowed values: + /// The protocol that the bidder endpoint is using. OpenRTB protocols with prefix PROTOCOL_OPENRTB_PROTOBUF use proto buffer, otherwise use JSON. Allowed values: /// - PROTOCOL_ADX /// - PROTOCOL_OPENRTB_2_2 /// - PROTOCOL_OPENRTB_2_3 /// - PROTOCOL_OPENRTB_2_4 - /// - PROTOCOL_OPENRTB_PROTOBUF + /// - PROTOCOL_OPENRTB_2_5 + /// - PROTOCOL_OPENRTB_PROTOBUF_2_3 + /// - PROTOCOL_OPENRTB_PROTOBUF_2_4 + /// - PROTOCOL_OPENRTB_PROTOBUF_2_5 #[serde(rename="bidProtocol")] pub bid_protocol: Option, /// The maximum queries per second the Ad Exchange will send. @@ -1457,7 +1471,7 @@ impl Resource for Account {} impl ResponseResult for Account {} -/// The granular status of this ad in specific contexts. A context here relates to where something ultimately serves (for example, a physical location, a platform, an HTTPS vs HTTP request, or the type of auction). Read-only. This field should not be set in requests. +/// The granular status of this ad in specific contexts. A context here relates to where something ultimately serves (for example, a physical location, a platform, an HTTPS vs HTTP request, or the type of auction). Read-only. This field should not be set in requests. See the examples in the Creatives guide for more details. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -1794,6 +1808,9 @@ impl ResponseResult for GetOrderDealsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DealServingMetadata { + /// True if alcohol ads are allowed for this deal (read-only). This field is only populated when querying for finalized orders using the method GetFinalizedOrderDeals + #[serde(rename="alcoholAdsAllowed")] + pub alcohol_ads_allowed: Option, /// Tracks which parties (if any) have paused a deal. (readonly, except via PauseResumeOrderDeals action) #[serde(rename="dealPauseStatus")] pub deal_pause_status: Option, @@ -1885,10 +1902,13 @@ pub struct MarketplaceDeal { /// Metadata about the serving status of this deal (readonly, writes via custom actions) #[serde(rename="dealServingMetadata")] pub deal_serving_metadata: Option, + /// True, if the buyside inventory setup is complete for this deal. (readonly, except via OrderSetupCompleted action) + #[serde(rename="isSetupComplete")] + pub is_setup_complete: Option, /// The time (ms since epoch) of the deal creation. (readonly) #[serde(rename="creationTimeMs")] pub creation_time_ms: Option, - /// Description for the deal terms. (updatable) + /// Description for the deal terms. (buyer-readonly) #[serde(rename="inventoryDescription")] pub inventory_description: Option, /// The product-id from which this deal was created. (readonly, except on create) @@ -1950,6 +1970,9 @@ impl Part for Seller {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PretargetingConfig { + /// The name of the config. Must be unique. Required for all requests. + #[serde(rename="configName")] + pub config_name: Option, /// The kind of the resource, i.e. "adexchangebuyer#pretargetingConfig". pub kind: Option, /// Requests containing any of these vertical ids will match. @@ -1977,9 +2000,9 @@ pub struct PretargetingConfig { /// Whether this config is active. Required for all requests. #[serde(rename="isActive")] pub is_active: Option, - /// The name of the config. Must be unique. Required for all requests. - #[serde(rename="configName")] - pub config_name: Option, + /// Requests where the predicted viewability is below the specified decile will not match. E.g. if the buyer sets this value to 5, requests from slots where the predicted viewability is below 50% will not match. If the predicted viewability is unknown this field will be ignored. + #[serde(rename="minimumViewabilityDecile")] + pub minimum_viewability_decile: Option, /// Requests containing any of these vertical ids will not match. Values are from the publisher-verticals.txt file in the downloadable files section. #[serde(rename="excludedVerticals")] pub excluded_verticals: Option>, @@ -2148,7 +2171,7 @@ pub struct AddOrderDealsRequest { impl RequestValue for AddOrderDealsRequest {} -/// Used to specify pricing rules for buyers/advertisers. Each PricePerBuyer in an product can become [0,1] deals. To check if there is a PricePerBuyer for a particular buyer or buyer/advertiser pair, we look for the most specific matching rule - we first look for a rule matching the buyer and advertiser, next a rule with the buyer but an empty advertiser list, and otherwise look for a matching rule where no buyer is set. +/// Used to specify pricing rules for buyers. Each PricePerBuyer in a product can become [0,1] deals. To check if there is a PricePerBuyer for a particular buyer we look for the most specific matching rule - we first look for a rule matching the buyer and otherwise look for a matching rule where no buyer is set. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -2159,6 +2182,9 @@ pub struct PricePerBuyer { pub auction_tier: Option, /// The buyer who will pay this price. If unset, all buyers can pay this price (if the advertisers match, and there's no more specific rule matching the buyer). pub buyer: Option, + /// Reference to the buyer that will get billed. + #[serde(rename="billedBuyer")] + pub billed_buyer: Option, /// The specified price pub price: Option, } @@ -2378,6 +2404,9 @@ pub struct TargetingValueCreativeSize { /// The Creative size type. #[serde(rename="creativeSizeType")] pub creative_size_type: Option, + /// The native template for native ad. + #[serde(rename="nativeTemplate")] + pub native_template: Option, /// For video size type, the list of companion sizes. #[serde(rename="companionSizes")] pub companion_sizes: Option>, diff --git a/gen/adexchangeseller2-cli/Cargo.toml b/gen/adexchangeseller2-cli/Cargo.toml index b537a32839..53714a8b3e 100644 --- a/gen/adexchangeseller2-cli/Cargo.toml +++ b/gen/adexchangeseller2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/admin1_directory-cli/Cargo.toml b/gen/admin1_directory-cli/Cargo.toml index e718c5db03..33e903fbbf 100644 --- a/gen/admin1_directory-cli/Cargo.toml +++ b/gen/admin1_directory-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-admin1_directory-cli" -version = "1.0.4+20161124" +version = "1.0.4+20170419" authors = ["Sebastian Thiel "] description = "A complete library to interact with directory (protocol directory_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_directory-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-admin1_directory] path = "../admin1_directory" -version = "1.0.4+20161124" +version = "1.0.4+20170419" diff --git a/gen/admin1_directory-cli/README.md b/gen/admin1_directory-cli/README.md index 6f3d554c5a..8ef159e240 100644 --- a/gen/admin1_directory-cli/README.md +++ b/gen/admin1_directory-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *directory* API at revision *20161124*. The CLI is at version *1.0.4*. +This documentation was generated from the *directory* API at revision *20170419*. The CLI is at version *1.0.4*. ```bash admin1-directory [options] diff --git a/gen/admin1_directory-cli/mkdocs.yml b/gen/admin1_directory-cli/mkdocs.yml index 27b1f0d28c..a311667815 100644 --- a/gen/admin1_directory-cli/mkdocs.yml +++ b/gen/admin1_directory-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: directory v1.0.4+20161124 +site_name: directory v1.0.4+20170419 site_url: http://byron.github.io/google-apis-rs/google-admin1_directory-cli site_description: A complete library to interact with directory (protocol directory_v1) diff --git a/gen/admin1_directory-cli/src/main.rs b/gen/admin1_directory-cli/src/main.rs index fb9b64f4ac..38a0352ac7 100644 --- a/gen/admin1_directory-cli/src/main.rs +++ b/gen/admin1_directory-cli/src/main.rs @@ -5674,14 +5674,16 @@ impl<'n> Engine<'n> { "deletion-time" => Some(("deletionTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "suspension-reason" => Some(("suspensionReason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-photo-url" => Some(("thumbnailPhotoUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "is-admin" => Some(("isAdmin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "is-enrolled-in2-sv" => Some(("isEnrolledIn2Sv", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "include-in-global-address-list" => Some(("includeInGlobalAddressList", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "is-admin" => Some(("isAdmin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "last-login-time" => Some(("lastLoginTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "org-unit-path" => Some(("orgUnitPath", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "agreed-to-terms" => Some(("agreedToTerms", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "ip-whitelisted" => Some(("ipWhitelisted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "primary-email" => Some(("primaryEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-enforced-in2-sv" => Some(("isEnforcedIn2Sv", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "is-mailbox-setup" => Some(("isMailboxSetup", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "password" => Some(("password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -5693,7 +5695,7 @@ impl<'n> Engine<'n> { "change-password-at-next-login" => Some(("changePasswordAtNextLogin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "customer-id" => Some(("customerId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["agreed-to-terms", "aliases", "change-password-at-next-login", "creation-time", "customer-id", "deletion-time", "etag", "family-name", "full-name", "given-name", "hash-function", "id", "include-in-global-address-list", "ip-whitelisted", "is-admin", "is-delegated-admin", "is-mailbox-setup", "kind", "last-login-time", "name", "non-editable-aliases", "org-unit-path", "password", "primary-email", "suspended", "suspension-reason", "thumbnail-photo-etag", "thumbnail-photo-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["agreed-to-terms", "aliases", "change-password-at-next-login", "creation-time", "customer-id", "deletion-time", "etag", "family-name", "full-name", "given-name", "hash-function", "id", "include-in-global-address-list", "ip-whitelisted", "is-admin", "is-delegated-admin", "is-enforced-in2-sv", "is-enrolled-in2-sv", "is-mailbox-setup", "kind", "last-login-time", "name", "non-editable-aliases", "org-unit-path", "password", "primary-email", "suspended", "suspension-reason", "thumbnail-photo-etag", "thumbnail-photo-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -5951,14 +5953,16 @@ impl<'n> Engine<'n> { "deletion-time" => Some(("deletionTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "suspension-reason" => Some(("suspensionReason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-photo-url" => Some(("thumbnailPhotoUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "is-admin" => Some(("isAdmin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "is-enrolled-in2-sv" => Some(("isEnrolledIn2Sv", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "include-in-global-address-list" => Some(("includeInGlobalAddressList", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "is-admin" => Some(("isAdmin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "last-login-time" => Some(("lastLoginTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "org-unit-path" => Some(("orgUnitPath", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "agreed-to-terms" => Some(("agreedToTerms", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "ip-whitelisted" => Some(("ipWhitelisted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "primary-email" => Some(("primaryEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-enforced-in2-sv" => Some(("isEnforcedIn2Sv", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "is-mailbox-setup" => Some(("isMailboxSetup", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "password" => Some(("password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -5970,7 +5974,7 @@ impl<'n> Engine<'n> { "change-password-at-next-login" => Some(("changePasswordAtNextLogin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "customer-id" => Some(("customerId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["agreed-to-terms", "aliases", "change-password-at-next-login", "creation-time", "customer-id", "deletion-time", "etag", "family-name", "full-name", "given-name", "hash-function", "id", "include-in-global-address-list", "ip-whitelisted", "is-admin", "is-delegated-admin", "is-mailbox-setup", "kind", "last-login-time", "name", "non-editable-aliases", "org-unit-path", "password", "primary-email", "suspended", "suspension-reason", "thumbnail-photo-etag", "thumbnail-photo-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["agreed-to-terms", "aliases", "change-password-at-next-login", "creation-time", "customer-id", "deletion-time", "etag", "family-name", "full-name", "given-name", "hash-function", "id", "include-in-global-address-list", "ip-whitelisted", "is-admin", "is-delegated-admin", "is-enforced-in2-sv", "is-enrolled-in2-sv", "is-mailbox-setup", "kind", "last-login-time", "name", "non-editable-aliases", "org-unit-path", "password", "primary-email", "suspended", "suspension-reason", "thumbnail-photo-etag", "thumbnail-photo-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -6419,14 +6423,16 @@ impl<'n> Engine<'n> { "deletion-time" => Some(("deletionTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "suspension-reason" => Some(("suspensionReason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-photo-url" => Some(("thumbnailPhotoUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "is-admin" => Some(("isAdmin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "is-enrolled-in2-sv" => Some(("isEnrolledIn2Sv", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "include-in-global-address-list" => Some(("includeInGlobalAddressList", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "is-admin" => Some(("isAdmin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "last-login-time" => Some(("lastLoginTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "org-unit-path" => Some(("orgUnitPath", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "agreed-to-terms" => Some(("agreedToTerms", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "ip-whitelisted" => Some(("ipWhitelisted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "primary-email" => Some(("primaryEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-enforced-in2-sv" => Some(("isEnforcedIn2Sv", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "is-mailbox-setup" => Some(("isMailboxSetup", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "password" => Some(("password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -6438,7 +6444,7 @@ impl<'n> Engine<'n> { "change-password-at-next-login" => Some(("changePasswordAtNextLogin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "customer-id" => Some(("customerId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["agreed-to-terms", "aliases", "change-password-at-next-login", "creation-time", "customer-id", "deletion-time", "etag", "family-name", "full-name", "given-name", "hash-function", "id", "include-in-global-address-list", "ip-whitelisted", "is-admin", "is-delegated-admin", "is-mailbox-setup", "kind", "last-login-time", "name", "non-editable-aliases", "org-unit-path", "password", "primary-email", "suspended", "suspension-reason", "thumbnail-photo-etag", "thumbnail-photo-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["agreed-to-terms", "aliases", "change-password-at-next-login", "creation-time", "customer-id", "deletion-time", "etag", "family-name", "full-name", "given-name", "hash-function", "id", "include-in-global-address-list", "ip-whitelisted", "is-admin", "is-delegated-admin", "is-enforced-in2-sv", "is-enrolled-in2-sv", "is-mailbox-setup", "kind", "last-login-time", "name", "non-editable-aliases", "org-unit-path", "password", "primary-email", "suspended", "suspension-reason", "thumbnail-photo-etag", "thumbnail-photo-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -7397,13 +7403,13 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), (Some(r##"resource-id"##), None, - Some(r##"Immutable id of Chrome OS Device"##), + Some(r##"Immutable ID of Chrome OS Device"##), Some(true), Some(false)), @@ -7425,13 +7431,13 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), (Some(r##"device-id"##), None, - Some(r##"Immutable id of Chrome OS Device"##), + Some(r##"Immutable ID of Chrome OS Device"##), Some(true), Some(false)), @@ -7453,7 +7459,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -7475,13 +7481,13 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), (Some(r##"device-id"##), None, - Some(r##"Immutable id of Chrome OS Device"##), + Some(r##"Immutable ID of Chrome OS Device"##), Some(true), Some(false)), @@ -7509,13 +7515,13 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), (Some(r##"device-id"##), None, - Some(r##"Immutable id of Chrome OS Device"##), + Some(r##"Immutable ID of Chrome OS Device"##), Some(true), Some(false)), @@ -7627,7 +7633,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable id of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -7649,7 +7655,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable id of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -7677,7 +7683,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable id of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -7705,7 +7711,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable id of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -7730,7 +7736,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable id of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -7752,7 +7758,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable id of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -7780,7 +7786,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable id of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -7808,7 +7814,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable id of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -8211,13 +8217,13 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), (Some(r##"resource-id"##), None, - Some(r##"Immutable id of Mobile Device"##), + Some(r##"Immutable ID of Mobile Device"##), Some(true), Some(false)), @@ -8239,13 +8245,13 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), (Some(r##"resource-id"##), None, - Some(r##"Immutable id of Mobile Device"##), + Some(r##"Immutable ID of Mobile Device"##), Some(true), Some(false)), @@ -8261,13 +8267,13 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), (Some(r##"resource-id"##), None, - Some(r##"Immutable id of Mobile Device"##), + Some(r##"Immutable ID of Mobile Device"##), Some(true), Some(false)), @@ -8289,7 +8295,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -8314,7 +8320,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource."##), + Some(r##"The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource."##), Some(true), Some(false)), @@ -8336,7 +8342,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource."##), + Some(r##"The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource."##), Some(true), Some(false)), @@ -8364,7 +8370,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account."##), + Some(r##"The unique ID for the customer's G Suite account."##), Some(true), Some(false)), @@ -8386,7 +8392,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account."##), + Some(r##"The unique ID for the customer's G Suite account."##), Some(true), Some(false)), @@ -8420,7 +8426,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account."##), + Some(r##"The unique ID for the customer's G Suite account."##), Some(true), Some(false)), @@ -8457,7 +8463,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -8479,7 +8485,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -8507,7 +8513,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -8535,7 +8541,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -8557,7 +8563,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -8591,7 +8597,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -8628,7 +8634,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -8653,7 +8659,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), + Some(r##"The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), Some(true), Some(false)), @@ -8675,7 +8681,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), + Some(r##"The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), Some(true), Some(false)), @@ -8703,7 +8709,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), + Some(r##"The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), Some(true), Some(false)), @@ -8731,7 +8737,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), + Some(r##"The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), Some(true), Some(false)), @@ -8753,7 +8759,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), + Some(r##"The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), Some(true), Some(false)), @@ -8787,7 +8793,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), + Some(r##"The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID."##), Some(true), Some(false)), @@ -8824,7 +8830,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -8846,7 +8852,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -8874,7 +8880,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -8902,7 +8908,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -8927,7 +8933,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -8949,7 +8955,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -8977,7 +8983,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -9005,7 +9011,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable id of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -9027,7 +9033,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -9061,7 +9067,7 @@ fn main() { vec![ (Some(r##"customer"##), None, - Some(r##"Immutable ID of the Google Apps account."##), + Some(r##"Immutable ID of the G Suite account."##), Some(true), Some(false)), @@ -9098,7 +9104,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -9120,7 +9126,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -9148,7 +9154,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -9176,7 +9182,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -9198,7 +9204,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -9232,7 +9238,7 @@ fn main() { vec![ (Some(r##"customer-id"##), None, - Some(r##"Immutable id of the Google Apps account"##), + Some(r##"Immutable ID of the G Suite account"##), Some(true), Some(false)), @@ -9793,7 +9799,7 @@ fn main() { let mut app = App::new("admin1-directory") .author("Sebastian Thiel ") - .version("1.0.4+20161124") + .version("1.0.4+20170419") .about("The Admin SDK Directory API lets you view and manage enterprise resources such as users and groups, administrative notifications, security features, and more.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_admin1_directory_cli") .arg(Arg::with_name("url") diff --git a/gen/admin1_directory/Cargo.toml b/gen/admin1_directory/Cargo.toml index 22b5c1137f..9202d69705 100644 --- a/gen/admin1_directory/Cargo.toml +++ b/gen/admin1_directory/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-admin1_directory" -version = "1.0.4+20161124" +version = "1.0.4+20170419" authors = ["Sebastian Thiel "] description = "A complete library to interact with directory (protocol directory_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_directory" homepage = "https://developers.google.com/admin-sdk/directory/" -documentation = "https://docs.rs/google-admin1_directory/1.0.4+20161124" +documentation = "https://docs.rs/google-admin1_directory/1.0.4+20170419" license = "MIT" keywords = ["admin", "google", "protocol", "web", "api"] diff --git a/gen/admin1_directory/README.md b/gen/admin1_directory/README.md index bf62ed45d0..fd02da39fc 100644 --- a/gen/admin1_directory/README.md +++ b/gen/admin1_directory/README.md @@ -5,61 +5,61 @@ DO NOT EDIT ! --> The `google-admin1_directory` library allows access to all features of the *Google directory* service. -This documentation was generated from *directory* crate version *1.0.4+20161124*, where *20161124* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *directory* crate version *1.0.4+20170419*, where *20170419* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *directory* *v1_directory* API can be found at the [official documentation site](https://developers.google.com/admin-sdk/directory/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Directory.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Directory.html) ... -* [asps](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Asp.html) - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.AspDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.AspGetCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.AspListCall.html) -* [channels](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Channel.html) - * [*stop*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ChannelStopCall.html) +* [asps](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Asp.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.AspDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.AspGetCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.AspListCall.html) +* [channels](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Channel.html) + * [*stop*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ChannelStopCall.html) * chromeosdevices - * [*action*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ChromeosdeviceActionCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ChromeosdeviceGetCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ChromeosdeviceListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ChromeosdevicePatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ChromeosdeviceUpdateCall.html) -* [customers](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Customer.html) - * [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.CustomerGetCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.CustomerPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.CustomerUpdateCall.html) + * [*action*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ChromeosdeviceActionCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ChromeosdeviceGetCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ChromeosdeviceListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ChromeosdevicePatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ChromeosdeviceUpdateCall.html) +* [customers](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Customer.html) + * [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.CustomerGetCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.CustomerPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.CustomerUpdateCall.html) * domain aliases - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.DomainAliaseDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.DomainAliaseGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.DomainAliaseInsertCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.DomainAliaseListCall.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.DomainAliaseDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.DomainAliaseGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.DomainAliaseInsertCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.DomainAliaseListCall.html) * domains - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.DomainDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.DomainGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.DomainInsertCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.DomainListCall.html) -* [groups](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Group.html) - * [*aliases delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupAliaseDeleteCall.html), [*aliases insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupAliaseInsertCall.html), [*aliases list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupAliaseListCall.html), [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupUpdateCall.html) -* [members](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Member.html) - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MemberDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MemberGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MemberInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MemberListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MemberPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MemberUpdateCall.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.DomainDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.DomainGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.DomainInsertCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.DomainListCall.html) +* [groups](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Group.html) + * [*aliases delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupAliaseDeleteCall.html), [*aliases insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupAliaseInsertCall.html), [*aliases list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupAliaseListCall.html), [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupUpdateCall.html) +* [members](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Member.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MemberDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MemberGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MemberInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MemberListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MemberPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MemberUpdateCall.html) * mobiledevices - * [*action*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MobiledeviceActionCall.html), [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MobiledeviceDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MobiledeviceGetCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.MobiledeviceListCall.html) -* [notifications](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Notification.html) - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.NotificationDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.NotificationGetCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.NotificationListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.NotificationPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.NotificationUpdateCall.html) + * [*action*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MobiledeviceActionCall.html), [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MobiledeviceDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MobiledeviceGetCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.MobiledeviceListCall.html) +* [notifications](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Notification.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.NotificationDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.NotificationGetCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.NotificationListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.NotificationPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.NotificationUpdateCall.html) * orgunits - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.OrgunitDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.OrgunitGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.OrgunitInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.OrgunitListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.OrgunitPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.OrgunitUpdateCall.html) -* [privileges](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Privilege.html) - * [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.PrivilegeListCall.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.OrgunitDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.OrgunitGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.OrgunitInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.OrgunitListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.OrgunitPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.OrgunitUpdateCall.html) +* [privileges](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Privilege.html) + * [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.PrivilegeListCall.html) * resources - * [*calendars delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ResourceCalendarDeleteCall.html), [*calendars get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ResourceCalendarGetCall.html), [*calendars insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ResourceCalendarInsertCall.html), [*calendars list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ResourceCalendarListCall.html), [*calendars patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ResourceCalendarPatchCall.html) and [*calendars update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.ResourceCalendarUpdateCall.html) -* [role assignments](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleAssignment.html) - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleAssignmentDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleAssignmentGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleAssignmentInsertCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleAssignmentListCall.html) -* [roles](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Role.html) - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RolePatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.RoleUpdateCall.html) -* [schemas](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Schema.html) - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.SchemaDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.SchemaGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.SchemaInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.SchemaListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.SchemaPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.SchemaUpdateCall.html) -* [tokens](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Token.html) - * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.TokenDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.TokenGetCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.TokenListCall.html) -* [users](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.User.html) - * [*aliases delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserAliaseDeleteCall.html), [*aliases insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserAliaseInsertCall.html), [*aliases list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserAliaseListCall.html), [*aliases watch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserAliaseWatchCall.html), [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserListCall.html), [*make admin*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserMakeAdminCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserPatchCall.html), [*photos delete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserPhotoDeleteCall.html), [*photos get*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserPhotoGetCall.html), [*photos patch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserPhotoPatchCall.html), [*photos update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserPhotoUpdateCall.html), [*undelete*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserUndeleteCall.html), [*update*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserUpdateCall.html) and [*watch*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserWatchCall.html) -* [verification codes](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.VerificationCode.html) - * [*generate*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.VerificationCodeGenerateCall.html), [*invalidate*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.VerificationCodeInvalidateCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.VerificationCodeListCall.html) + * [*calendars delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ResourceCalendarDeleteCall.html), [*calendars get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ResourceCalendarGetCall.html), [*calendars insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ResourceCalendarInsertCall.html), [*calendars list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ResourceCalendarListCall.html), [*calendars patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ResourceCalendarPatchCall.html) and [*calendars update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.ResourceCalendarUpdateCall.html) +* [role assignments](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleAssignment.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleAssignmentDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleAssignmentGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleAssignmentInsertCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleAssignmentListCall.html) +* [roles](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Role.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RolePatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.RoleUpdateCall.html) +* [schemas](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Schema.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.SchemaDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.SchemaGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.SchemaInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.SchemaListCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.SchemaPatchCall.html) and [*update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.SchemaUpdateCall.html) +* [tokens](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Token.html) + * [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.TokenDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.TokenGetCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.TokenListCall.html) +* [users](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.User.html) + * [*aliases delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserAliaseDeleteCall.html), [*aliases insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserAliaseInsertCall.html), [*aliases list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserAliaseListCall.html), [*aliases watch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserAliaseWatchCall.html), [*delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserDeleteCall.html), [*get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserGetCall.html), [*insert*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserInsertCall.html), [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserListCall.html), [*make admin*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserMakeAdminCall.html), [*patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserPatchCall.html), [*photos delete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserPhotoDeleteCall.html), [*photos get*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserPhotoGetCall.html), [*photos patch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserPhotoPatchCall.html), [*photos update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserPhotoUpdateCall.html), [*undelete*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserUndeleteCall.html), [*update*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserUpdateCall.html) and [*watch*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserWatchCall.html) +* [verification codes](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.VerificationCode.html) + * [*generate*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.VerificationCodeGenerateCall.html), [*invalidate*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.VerificationCodeInvalidateCall.html) and [*list*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.VerificationCodeListCall.html) Subscription supported by ... -* [*list users*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserListCall.html) -* [*watch users*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserWatchCall.html) -* [*aliases watch users*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserAliaseWatchCall.html) -* [*aliases list users*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.UserAliaseListCall.html) -* [*aliases list groups*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.GroupAliaseListCall.html) +* [*list users*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserListCall.html) +* [*watch users*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserWatchCall.html) +* [*aliases watch users*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserAliaseWatchCall.html) +* [*aliases list users*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.UserAliaseListCall.html) +* [*aliases list groups*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.GroupAliaseListCall.html) @@ -67,17 +67,17 @@ Subscription supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/struct.Directory.html)** +* **[Hub](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/struct.Directory.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.Part.html)** + * **[Parts](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -193,17 +193,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.Delegate.html), 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-admin1_directory/1.0.4+20161124/google_admin1_directory/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.ResponseResult.html), 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")`. @@ -213,29 +213,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.CallBuilder.html) 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-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.RequestValue.html) and -[decodable](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.RequestValue.html) and +[decodable](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.CallBuilder.html), 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-admin1_directory/1.0.4+20161124/google_admin1_directory/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-admin1_directory/1.0.4+20170419/google_admin1_directory/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/admin1_directory/src/lib.rs b/gen/admin1_directory/src/lib.rs index 9f36405a96..845eeac78b 100644 --- a/gen/admin1_directory/src/lib.rs +++ b/gen/admin1_directory/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *directory* crate version *1.0.4+20161124*, where *20161124* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *directory* crate version *1.0.4+20170419*, where *20170419* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *directory* *v1_directory* API can be found at the //! [official documentation site](https://developers.google.com/admin-sdk/directory/). @@ -1320,7 +1320,7 @@ pub struct ChromeOsDevice { /// Chromebook serial number (Read-only) #[serde(rename="serialNumber")] pub serial_number: Option, - /// Date and time the device was last synchronized with the policy settings in the Google Apps administrator control panel (Read-only) + /// Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only) #[serde(rename="lastSync")] pub last_sync: Option, /// Chromebook order number (Read-only) @@ -1417,7 +1417,12 @@ pub struct User { /// no description provided pub addresses: Option, /// no description provided + #[serde(rename="posixAccounts")] + pub posix_accounts: Option, + /// no description provided pub phones: Option, + /// no description provided + pub locations: Option, /// Boolean indicating if the user is delegated admin (Read-only) #[serde(rename="isDelegatedAdmin")] pub is_delegated_admin: Option, @@ -1445,14 +1450,17 @@ pub struct User { /// Photo Url of the user (Read-only) #[serde(rename="thumbnailPhotoUrl")] pub thumbnail_photo_url: Option, - /// Boolean indicating if the user is admin (Read-only) - #[serde(rename="isAdmin")] - pub is_admin: Option, - /// no description provided - pub relations: Option, + /// Is enrolled in 2-step verification (Read-only) + #[serde(rename="isEnrolledIn2Sv")] + pub is_enrolled_in2_sv: Option, /// Boolean indicating if user is included in Global Address List #[serde(rename="includeInGlobalAddressList")] pub include_in_global_address_list: Option, + /// no description provided + pub relations: Option, + /// Boolean indicating if the user is admin (Read-only) + #[serde(rename="isAdmin")] + pub is_admin: Option, /// ETag of the resource. pub etag: Option, /// User's last login time. (Read-only) @@ -1470,8 +1478,14 @@ pub struct User { /// Boolean indicating if ip is whitelisted #[serde(rename="ipWhitelisted")] pub ip_whitelisted: Option, + /// no description provided + #[serde(rename="sshPublicKeys")] + pub ssh_public_keys: Option, /// Kind of resource this is. pub kind: Option, + /// Is 2-step verification enforced (Read-only) + #[serde(rename="isEnforcedIn2Sv")] + pub is_enforced_in2_sv: Option, /// Is mailbox setup (Read-only) #[serde(rename="isMailboxSetup")] pub is_mailbox_setup: Option, @@ -1491,7 +1505,7 @@ pub struct User { pub name: Option, /// no description provided pub notes: Option, - /// User's Google account creation time. (Read-only) + /// User's G Suite account creation time. (Read-only) #[serde(rename="creationTime")] pub creation_time: Option, /// no description provided @@ -1579,6 +1593,29 @@ impl NestedType for MobileDeviceApplications {} impl Part for MobileDeviceApplications {} +/// JSON response template to list aliases in Directory API. +/// +/// # 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*). +/// +/// * [aliases list users](struct.UserAliaseListCall.html) (response) +/// * [aliases list groups](struct.GroupAliaseListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Aliases { + /// Kind of resource this is. + pub kind: Option, + /// ETag of the resource. + pub etag: Option, + /// List of alias objects. + pub aliases: Option>, +} + +impl ResponseResult for Aliases {} + + /// JSON response template for List Members operation in Directory API. /// /// # Activities @@ -1638,7 +1675,7 @@ pub struct Customer { /// The customer's postal address information. #[serde(rename="postalAddress")] pub postal_address: Option, - /// The unique ID for the customer's Google account. (Readonly) + /// The unique ID for the customer's G Suite account. (Readonly) pub id: Option, } @@ -1781,6 +1818,35 @@ pub struct VerificationCodes { impl ResponseResult for VerificationCodes {} +/// JSON template for Alias object in Directory API. +/// +/// # 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*). +/// +/// * [aliases insert users](struct.UserAliaseInsertCall.html) (request|response) +/// * [aliases insert groups](struct.GroupAliaseInsertCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Alias { + /// A alias email + pub alias: Option, + /// Kind of resource this is. + pub kind: Option, + /// ETag of the resource. + pub etag: Option, + /// Group's primary email (Read-only) User's primary email (Read-only) + #[serde(rename="primaryEmail")] + pub primary_email: Option, + /// Unique id of the group (Read-only) Unique id of the user (Read-only) + pub id: Option, +} + +impl RequestValue for Alias {} +impl ResponseResult for Alias {} + + /// JSON response template for List Mobile Devices operation in Directory API. /// /// # Activities @@ -1806,21 +1872,26 @@ pub struct MobileDevices { impl ResponseResult for MobileDevices {} -/// List of active time ranges (Read-only) +/// JSON response template to list Domains in Directory API. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [list domains](struct.DomainListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ChromeOsDeviceActiveTimeRanges { - /// Date of usage - pub date: Option, - /// Duration in milliseconds - #[serde(rename="activeTime")] - pub active_time: Option, +pub struct Domains2 { + /// List of domain objects. + pub domains: Option>, + /// Kind of resource this is. + pub kind: Option, + /// ETag of the resource. + pub etag: Option, } -impl NestedType for ChromeOsDeviceActiveTimeRanges {} -impl Part for ChromeOsDeviceActiveTimeRanges {} +impl ResponseResult for Domains2 {} /// JSON template for Photo object in Directory API. @@ -1924,35 +1995,6 @@ pub struct Users { impl ResponseResult for Users {} -/// JSON template for Alias object in Directory API. -/// -/// # 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*). -/// -/// * [aliases insert users](struct.UserAliaseInsertCall.html) (request|response) -/// * [aliases insert groups](struct.GroupAliaseInsertCall.html) (request|response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Alias { - /// A alias email - pub alias: Option, - /// Kind of resource this is. - pub kind: Option, - /// ETag of the resource. - pub etag: Option, - /// Group's primary email (Read-only) User's primary email (Read-only) - #[serde(rename="primaryEmail")] - pub primary_email: Option, - /// Unique id of the group (Read-only) Unique id of the user (Read-only) - pub id: Option, -} - -impl RequestValue for Alias {} -impl ResponseResult for Alias {} - - /// JSON template for Mobile Device resource in Directory API. /// /// # Activities @@ -1964,7 +2006,7 @@ impl ResponseResult for Alias {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MobileDevice { - /// Date and time the device was last synchronized with the policy settings in the Google Apps administrator control panel (Read-only) + /// Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only) #[serde(rename="lastSync")] pub last_sync: Option, /// Mobile Device compromised status (Read-only) @@ -1981,7 +2023,7 @@ pub struct MobileDevice { /// Mobile Device user agent #[serde(rename="userAgent")] pub user_agent: Option, - /// Date and time the device was first synchronized with the policy settings in the Google Apps administrator control panel (Read-only) + /// Date and time the device was first synchronized with the policy settings in the G Suite administrator control panel (Read-only) #[serde(rename="firstSync")] pub first_sync: Option, /// List of accounts added on device (Read-only) @@ -2076,28 +2118,6 @@ impl Resource for MobileDevice {} impl ResponseResult for MobileDevice {} -/// JSON response template to list Domains in Directory API. -/// -/// # 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*). -/// -/// * [list domains](struct.DomainListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Domains2 { - /// List of domain objects. - pub domains: Option>, - /// Kind of resource this is. - pub kind: Option, - /// ETag of the resource. - pub etag: Option, -} - -impl ResponseResult for Domains2 {} - - /// JSON template for token resource in Directory API. /// /// # Activities @@ -2181,6 +2201,23 @@ impl Resource for OrgUnit {} impl ResponseResult for OrgUnit {} +/// List of active time ranges (Read-only) +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ChromeOsDeviceActiveTimeRanges { + /// Date of usage + pub date: Option, + /// Duration in milliseconds + #[serde(rename="activeTime")] + pub active_time: Option, +} + +impl NestedType for ChromeOsDeviceActiveTimeRanges {} +impl Part for ChromeOsDeviceActiveTimeRanges {} + + /// JSON template for verification codes in Directory API. /// /// # Activities @@ -2248,27 +2285,26 @@ impl NestedType for SchemaFieldSpecNumericIndexingSpec {} impl Part for SchemaFieldSpecNumericIndexingSpec {} -/// JSON response template to list aliases in Directory API. +/// JSON response template for List Schema operation in Directory API. /// /// # 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*). /// -/// * [aliases list users](struct.UserAliaseListCall.html) (response) -/// * [aliases list groups](struct.GroupAliaseListCall.html) (response) +/// * [list schemas](struct.SchemaListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Aliases { +pub struct Schemas { /// Kind of resource this is. pub kind: Option, /// ETag of the resource. pub etag: Option, - /// List of alias objects. - pub aliases: Option>, + /// List of UserSchema objects. + pub schemas: Option>, } -impl ResponseResult for Aliases {} +impl ResponseResult for Schemas {} /// JSON template for Calendar Resource List Response object in Directory API. @@ -2296,28 +2332,6 @@ pub struct CalendarResources { impl ResponseResult for CalendarResources {} -/// JSON response template for List Schema operation in Directory API. -/// -/// # 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*). -/// -/// * [list schemas](struct.SchemaListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Schemas { - /// Kind of resource this is. - pub kind: Option, - /// ETag of the resource. - pub etag: Option, - /// List of UserSchema objects. - pub schemas: Option>, -} - -impl ResponseResult for Schemas {} - - // ################### // MethodBuilders ### @@ -2555,7 +2569,7 @@ impl<'a, C, A> OrgunitMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account pub fn list(&self, customer_id: &str) -> OrgunitListCall<'a, C, A> { OrgunitListCall { hub: self.hub, @@ -2575,7 +2589,7 @@ impl<'a, C, A> OrgunitMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account pub fn insert(&self, request: OrgUnit, customer_id: &str) -> OrgunitInsertCall<'a, C, A> { OrgunitInsertCall { hub: self.hub, @@ -2594,7 +2608,7 @@ impl<'a, C, A> OrgunitMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account /// * `orgUnitPath` - Full path of the organization unit or its Id pub fn update(&self, request: OrgUnit, customer_id: &str, org_unit_path: &Vec) -> OrgunitUpdateCall<'a, C, A> { OrgunitUpdateCall { @@ -2614,7 +2628,7 @@ impl<'a, C, A> OrgunitMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account /// * `orgUnitPath` - Full path of the organization unit or its Id pub fn delete(&self, customer_id: &str, org_unit_path: &Vec) -> OrgunitDeleteCall<'a, C, A> { OrgunitDeleteCall { @@ -2633,7 +2647,7 @@ impl<'a, C, A> OrgunitMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account /// * `orgUnitPath` - Full path of the organization unit or its Id pub fn get(&self, customer_id: &str, org_unit_path: &Vec) -> OrgunitGetCall<'a, C, A> { OrgunitGetCall { @@ -2653,7 +2667,7 @@ impl<'a, C, A> OrgunitMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account /// * `orgUnitPath` - Full path of the organization unit or its Id pub fn patch(&self, request: OrgUnit, customer_id: &str, org_unit_path: &Vec) -> OrgunitPatchCall<'a, C, A> { OrgunitPatchCall { @@ -2875,7 +2889,7 @@ impl<'a, C, A> RoleMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `roleId` - Immutable ID of the role. pub fn update(&self, request: Role, customer: &str, role_id: &str) -> RoleUpdateCall<'a, C, A> { RoleUpdateCall { @@ -2895,7 +2909,7 @@ impl<'a, C, A> RoleMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `roleId` - Immutable ID of the role. pub fn get(&self, customer: &str, role_id: &str) -> RoleGetCall<'a, C, A> { RoleGetCall { @@ -2914,7 +2928,7 @@ impl<'a, C, A> RoleMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `roleId` - Immutable ID of the role. pub fn delete(&self, customer: &str, role_id: &str) -> RoleDeleteCall<'a, C, A> { RoleDeleteCall { @@ -2934,7 +2948,7 @@ impl<'a, C, A> RoleMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `roleId` - Immutable ID of the role. pub fn patch(&self, request: Role, customer: &str, role_id: &str) -> RolePatchCall<'a, C, A> { RolePatchCall { @@ -2955,7 +2969,7 @@ impl<'a, C, A> RoleMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. pub fn insert(&self, request: Role, customer: &str) -> RoleInsertCall<'a, C, A> { RoleInsertCall { hub: self.hub, @@ -2973,7 +2987,7 @@ impl<'a, C, A> RoleMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable id of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. pub fn list(&self, customer: &str) -> RoleListCall<'a, C, A> { RoleListCall { hub: self.hub, @@ -3033,7 +3047,7 @@ impl<'a, C, A> NotificationMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - The unique ID for the customer's Google account. + /// * `customer` - The unique ID for the customer's G Suite account. pub fn list(&self, customer: &str) -> NotificationListCall<'a, C, A> { NotificationListCall { hub: self.hub, @@ -3054,7 +3068,7 @@ impl<'a, C, A> NotificationMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - The unique ID for the customer's Google account. + /// * `customer` - The unique ID for the customer's G Suite account. /// * `notificationId` - The unique ID of the notification. pub fn update(&self, request: Notification, customer: &str, notification_id: &str) -> NotificationUpdateCall<'a, C, A> { NotificationUpdateCall { @@ -3074,7 +3088,7 @@ impl<'a, C, A> NotificationMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. + /// * `customer` - The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource. /// * `notificationId` - The unique ID of the notification. pub fn delete(&self, customer: &str, notification_id: &str) -> NotificationDeleteCall<'a, C, A> { NotificationDeleteCall { @@ -3093,7 +3107,7 @@ impl<'a, C, A> NotificationMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. + /// * `customer` - The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource. /// * `notificationId` - The unique ID of the notification. pub fn get(&self, customer: &str, notification_id: &str) -> NotificationGetCall<'a, C, A> { NotificationGetCall { @@ -3113,7 +3127,7 @@ impl<'a, C, A> NotificationMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - The unique ID for the customer's Google account. + /// * `customer` - The unique ID for the customer's G Suite account. /// * `notificationId` - The unique ID of the notification. pub fn patch(&self, request: Notification, customer: &str, notification_id: &str) -> NotificationPatchCall<'a, C, A> { NotificationPatchCall { @@ -3174,7 +3188,7 @@ impl<'a, C, A> PrivilegeMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. pub fn list(&self, customer: &str) -> PrivilegeListCall<'a, C, A> { PrivilegeListCall { hub: self.hub, @@ -3290,8 +3304,8 @@ impl<'a, C, A> MobiledeviceMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account - /// * `resourceId` - Immutable id of Mobile Device + /// * `customerId` - Immutable ID of the G Suite account + /// * `resourceId` - Immutable ID of Mobile Device pub fn get(&self, customer_id: &str, resource_id: &str) -> MobiledeviceGetCall<'a, C, A> { MobiledeviceGetCall { hub: self.hub, @@ -3310,7 +3324,7 @@ impl<'a, C, A> MobiledeviceMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account pub fn list(&self, customer_id: &str) -> MobiledeviceListCall<'a, C, A> { MobiledeviceListCall { hub: self.hub, @@ -3333,8 +3347,8 @@ impl<'a, C, A> MobiledeviceMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account - /// * `resourceId` - Immutable id of Mobile Device + /// * `customerId` - Immutable ID of the G Suite account + /// * `resourceId` - Immutable ID of Mobile Device pub fn delete(&self, customer_id: &str, resource_id: &str) -> MobiledeviceDeleteCall<'a, C, A> { MobiledeviceDeleteCall { hub: self.hub, @@ -3353,8 +3367,8 @@ impl<'a, C, A> MobiledeviceMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account - /// * `resourceId` - Immutable id of Mobile Device + /// * `customerId` - Immutable ID of the G Suite account + /// * `resourceId` - Immutable ID of Mobile Device pub fn action(&self, request: MobileDeviceAction, customer_id: &str, resource_id: &str) -> MobiledeviceActionCall<'a, C, A> { MobiledeviceActionCall { hub: self.hub, @@ -3511,7 +3525,7 @@ impl<'a, C, A> RoleAssignmentMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. pub fn insert(&self, request: RoleAssignment, customer: &str) -> RoleAssignmentInsertCall<'a, C, A> { RoleAssignmentInsertCall { hub: self.hub, @@ -3529,7 +3543,7 @@ impl<'a, C, A> RoleAssignmentMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `roleAssignmentId` - Immutable ID of the role assignment. pub fn get(&self, customer: &str, role_assignment_id: &str) -> RoleAssignmentGetCall<'a, C, A> { RoleAssignmentGetCall { @@ -3548,7 +3562,7 @@ impl<'a, C, A> RoleAssignmentMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `roleAssignmentId` - Immutable ID of the role assignment. pub fn delete(&self, customer: &str, role_assignment_id: &str) -> RoleAssignmentDeleteCall<'a, C, A> { RoleAssignmentDeleteCall { @@ -3567,7 +3581,7 @@ impl<'a, C, A> RoleAssignmentMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable ID of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. pub fn list(&self, customer: &str) -> RoleAssignmentListCall<'a, C, A> { RoleAssignmentListCall { hub: self.hub, @@ -3629,7 +3643,7 @@ impl<'a, C, A> ChromeosdeviceMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account pub fn list(&self, customer_id: &str) -> ChromeosdeviceListCall<'a, C, A> { ChromeosdeviceListCall { hub: self.hub, @@ -3653,8 +3667,8 @@ impl<'a, C, A> ChromeosdeviceMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account - /// * `deviceId` - Immutable id of Chrome OS Device + /// * `customerId` - Immutable ID of the G Suite account + /// * `deviceId` - Immutable ID of Chrome OS Device pub fn patch(&self, request: ChromeOsDevice, customer_id: &str, device_id: &str) -> ChromeosdevicePatchCall<'a, C, A> { ChromeosdevicePatchCall { hub: self.hub, @@ -3675,8 +3689,8 @@ impl<'a, C, A> ChromeosdeviceMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account - /// * `deviceId` - Immutable id of Chrome OS Device + /// * `customerId` - Immutable ID of the G Suite account + /// * `deviceId` - Immutable ID of Chrome OS Device pub fn update(&self, request: ChromeOsDevice, customer_id: &str, device_id: &str) -> ChromeosdeviceUpdateCall<'a, C, A> { ChromeosdeviceUpdateCall { hub: self.hub, @@ -3696,8 +3710,8 @@ impl<'a, C, A> ChromeosdeviceMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account - /// * `deviceId` - Immutable id of Chrome OS Device + /// * `customerId` - Immutable ID of the G Suite account + /// * `deviceId` - Immutable ID of Chrome OS Device pub fn get(&self, customer_id: &str, device_id: &str) -> ChromeosdeviceGetCall<'a, C, A> { ChromeosdeviceGetCall { hub: self.hub, @@ -3717,8 +3731,8 @@ impl<'a, C, A> ChromeosdeviceMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account - /// * `resourceId` - Immutable id of Chrome OS Device + /// * `customerId` - Immutable ID of the G Suite account + /// * `resourceId` - Immutable ID of Chrome OS Device pub fn action(&self, request: ChromeOsDeviceAction, customer_id: &str, resource_id: &str) -> ChromeosdeviceActionCall<'a, C, A> { ChromeosdeviceActionCall { hub: self.hub, @@ -4076,7 +4090,7 @@ impl<'a, C, A> DomainMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable id of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. pub fn list(&self, customer: &str) -> DomainListCall<'a, C, A> { DomainListCall { hub: self.hub, @@ -4093,7 +4107,7 @@ impl<'a, C, A> DomainMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable id of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `domainName` - Name of domain to be retrieved pub fn get(&self, customer: &str, domain_name: &str) -> DomainGetCall<'a, C, A> { DomainGetCall { @@ -4113,7 +4127,7 @@ impl<'a, C, A> DomainMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - Immutable id of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. pub fn insert(&self, request: Domains, customer: &str) -> DomainInsertCall<'a, C, A> { DomainInsertCall { hub: self.hub, @@ -4131,7 +4145,7 @@ impl<'a, C, A> DomainMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable id of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `domainName` - Name of domain to be deleted pub fn delete(&self, customer: &str, domain_name: &str) -> DomainDeleteCall<'a, C, A> { DomainDeleteCall { @@ -4192,7 +4206,7 @@ impl<'a, C, A> DomainAliaseMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - Immutable id of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. pub fn insert(&self, request: DomainAlias, customer: &str) -> DomainAliaseInsertCall<'a, C, A> { DomainAliaseInsertCall { hub: self.hub, @@ -4210,7 +4224,7 @@ impl<'a, C, A> DomainAliaseMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable id of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `domainAliasName` - Name of domain alias to be retrieved. pub fn get(&self, customer: &str, domain_alias_name: &str) -> DomainAliaseGetCall<'a, C, A> { DomainAliaseGetCall { @@ -4229,7 +4243,7 @@ impl<'a, C, A> DomainAliaseMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable id of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. pub fn list(&self, customer: &str) -> DomainAliaseListCall<'a, C, A> { DomainAliaseListCall { hub: self.hub, @@ -4247,7 +4261,7 @@ impl<'a, C, A> DomainAliaseMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - Immutable id of the Google Apps account. + /// * `customer` - Immutable ID of the G Suite account. /// * `domainAliasName` - Name of domain alias to be retrieved. pub fn delete(&self, customer: &str, domain_alias_name: &str) -> DomainAliaseDeleteCall<'a, C, A> { DomainAliaseDeleteCall { @@ -4307,7 +4321,7 @@ impl<'a, C, A> SchemaMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account /// * `schemaKey` - Name or immutable Id of the schema pub fn get(&self, customer_id: &str, schema_key: &str) -> SchemaGetCall<'a, C, A> { SchemaGetCall { @@ -4327,7 +4341,7 @@ impl<'a, C, A> SchemaMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account /// * `schemaKey` - Name or immutable Id of the schema. pub fn update(&self, request: Schema, customer_id: &str, schema_key: &str) -> SchemaUpdateCall<'a, C, A> { SchemaUpdateCall { @@ -4347,7 +4361,7 @@ impl<'a, C, A> SchemaMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account pub fn list(&self, customer_id: &str) -> SchemaListCall<'a, C, A> { SchemaListCall { hub: self.hub, @@ -4365,7 +4379,7 @@ impl<'a, C, A> SchemaMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account /// * `schemaKey` - Name or immutable Id of the schema. pub fn patch(&self, request: Schema, customer_id: &str, schema_key: &str) -> SchemaPatchCall<'a, C, A> { SchemaPatchCall { @@ -4385,7 +4399,7 @@ impl<'a, C, A> SchemaMethods<'a, C, A> { /// /// # Arguments /// - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account /// * `schemaKey` - Name or immutable Id of the schema pub fn delete(&self, customer_id: &str, schema_key: &str) -> SchemaDeleteCall<'a, C, A> { SchemaDeleteCall { @@ -4405,7 +4419,7 @@ impl<'a, C, A> SchemaMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customerId` - Immutable id of the Google Apps account + /// * `customerId` - Immutable ID of the G Suite account pub fn insert(&self, request: Schema, customer_id: &str) -> SchemaInsertCall<'a, C, A> { SchemaInsertCall { hub: self.hub, @@ -4464,7 +4478,7 @@ impl<'a, C, A> ResourceMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + /// * `customer` - The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. pub fn calendars_list(&self, customer: &str) -> ResourceCalendarListCall<'a, C, A> { ResourceCalendarListCall { hub: self.hub, @@ -4483,7 +4497,7 @@ impl<'a, C, A> ResourceMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + /// * `customer` - The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. /// * `calendarResourceId` - The unique ID of the calendar resource to retrieve. pub fn calendars_get(&self, customer: &str, calendar_resource_id: &str) -> ResourceCalendarGetCall<'a, C, A> { ResourceCalendarGetCall { @@ -4503,7 +4517,7 @@ impl<'a, C, A> ResourceMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + /// * `customer` - The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. pub fn calendars_insert(&self, request: CalendarResource, customer: &str) -> ResourceCalendarInsertCall<'a, C, A> { ResourceCalendarInsertCall { hub: self.hub, @@ -4522,7 +4536,7 @@ impl<'a, C, A> ResourceMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + /// * `customer` - The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. /// * `calendarResourceId` - The unique ID of the calendar resource to update. pub fn calendars_patch(&self, request: CalendarResource, customer: &str, calendar_resource_id: &str) -> ResourceCalendarPatchCall<'a, C, A> { ResourceCalendarPatchCall { @@ -4543,7 +4557,7 @@ impl<'a, C, A> ResourceMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `customer` - The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + /// * `customer` - The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. /// * `calendarResourceId` - The unique ID of the calendar resource to update. pub fn calendars_update(&self, request: CalendarResource, customer: &str, calendar_resource_id: &str) -> ResourceCalendarUpdateCall<'a, C, A> { ResourceCalendarUpdateCall { @@ -4563,7 +4577,7 @@ impl<'a, C, A> ResourceMethods<'a, C, A> { /// /// # Arguments /// - /// * `customer` - The unique ID for the customer's Google account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + /// * `customer` - The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID. /// * `calendarResourceId` - The unique ID of the calendar resource to delete. pub fn calendars_delete(&self, customer: &str, calendar_resource_id: &str) -> ResourceCalendarDeleteCall<'a, C, A> { ResourceCalendarDeleteCall { @@ -6590,7 +6604,7 @@ impl<'a, C, A> OrgunitListCall<'a, C, A> where C: BorrowMut, A: o } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -6870,7 +6884,7 @@ impl<'a, C, A> OrgunitInsertCall<'a, C, A> where C: BorrowMut, A: self._request = new_value; self } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -7142,7 +7156,7 @@ impl<'a, C, A> OrgunitUpdateCall<'a, C, A> where C: BorrowMut, A: self._request = new_value; self } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -7383,7 +7397,7 @@ impl<'a, C, A> OrgunitDeleteCall<'a, C, A> where C: BorrowMut, A: } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -7635,7 +7649,7 @@ impl<'a, C, A> OrgunitGetCall<'a, C, A> where C: BorrowMut, A: oa } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -7918,7 +7932,7 @@ impl<'a, C, A> OrgunitPatchCall<'a, C, A> where C: BorrowMut, A: self._request = new_value; self } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -9773,7 +9787,7 @@ impl<'a, C, A> RoleUpdateCall<'a, C, A> where C: BorrowMut, A: oa self._request = new_value; self } - /// Immutable ID of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -10020,7 +10034,7 @@ impl<'a, C, A> RoleGetCall<'a, C, A> where C: BorrowMut, A: oauth } - /// Immutable ID of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -10256,7 +10270,7 @@ impl<'a, C, A> RoleDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - /// Immutable ID of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -10534,7 +10548,7 @@ impl<'a, C, A> RolePatchCall<'a, C, A> where C: BorrowMut, A: oau self._request = new_value; self } - /// Immutable ID of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -10810,7 +10824,7 @@ impl<'a, C, A> RoleInsertCall<'a, C, A> where C: BorrowMut, A: oa self._request = new_value; self } - /// Immutable ID of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -11055,7 +11069,7 @@ impl<'a, C, A> RoleListCall<'a, C, A> where C: BorrowMut, A: oaut } - /// Immutable id of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -11319,7 +11333,7 @@ impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, } - /// The unique ID for the customer's Google account. + /// The unique ID for the customer's G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -11608,7 +11622,7 @@ impl<'a, C, A> NotificationUpdateCall<'a, C, A> where C: BorrowMut NotificationDeleteCall<'a, C, A> where C: BorrowMut NotificationGetCall<'a, C, A> where C: BorrowMut, } - /// The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. + /// The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource. /// /// Sets the *customer* path property to the given value. /// @@ -12369,7 +12383,7 @@ impl<'a, C, A> NotificationPatchCall<'a, C, A> where C: BorrowMut self._request = new_value; self } - /// The unique ID for the customer's Google account. + /// The unique ID for the customer's G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -12614,7 +12628,7 @@ impl<'a, C, A> PrivilegeListCall<'a, C, A> where C: BorrowMut, A: } - /// Immutable ID of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -13078,7 +13092,7 @@ impl<'a, C, A> MobiledeviceGetCall<'a, C, A> where C: BorrowMut, } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -13088,7 +13102,7 @@ impl<'a, C, A> MobiledeviceGetCall<'a, C, A> where C: BorrowMut, self._customer_id = new_value.to_string(); self } - /// Immutable id of Mobile Device + /// Immutable ID of Mobile Device /// /// Sets the *resource id* path property to the given value. /// @@ -13360,7 +13374,7 @@ impl<'a, C, A> MobiledeviceListCall<'a, C, A> where C: BorrowMut, } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -13628,7 +13642,7 @@ impl<'a, C, A> MobiledeviceDeleteCall<'a, C, A> where C: BorrowMut MobiledeviceDeleteCall<'a, C, A> where C: BorrowMut MobiledeviceActionCall<'a, C, A> where C: BorrowMut MobiledeviceActionCall<'a, C, A> where C: BorrowMut RoleAssignmentInsertCall<'a, C, A> where C: BorrowMut RoleAssignmentGetCall<'a, C, A> where C: BorrowMut } - /// Immutable ID of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -15362,7 +15376,7 @@ impl<'a, C, A> RoleAssignmentDeleteCall<'a, C, A> where C: BorrowMut RoleAssignmentListCall<'a, C, A> where C: BorrowMut ChromeosdeviceListCall<'a, C, A> where C: BorrowMut ChromeosdevicePatchCall<'a, C, A> where C: BorrowMut ChromeosdevicePatchCall<'a, C, A> where C: BorrowMut ChromeosdeviceUpdateCall<'a, C, A> where C: BorrowMut ChromeosdeviceUpdateCall<'a, C, A> where C: BorrowMut ChromeosdeviceGetCall<'a, C, A> where C: BorrowMut } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -16794,7 +16808,7 @@ impl<'a, C, A> ChromeosdeviceGetCall<'a, C, A> where C: BorrowMut self._customer_id = new_value.to_string(); self } - /// Immutable id of Chrome OS Device + /// Immutable ID of Chrome OS Device /// /// Sets the *device id* path property to the given value. /// @@ -17058,7 +17072,7 @@ impl<'a, C, A> ChromeosdeviceActionCall<'a, C, A> where C: BorrowMut ChromeosdeviceActionCall<'a, C, A> where C: BorrowMut GroupListCall<'a, C, A> where C: BorrowMut, A: oau self._domain = Some(new_value.to_string()); self } - /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain. + /// Immutable ID of the G Suite account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain. /// /// Sets the *customer* query property to the given value. pub fn customer(mut self, new_value: &str) -> GroupListCall<'a, C, A> { @@ -20244,7 +20258,7 @@ impl<'a, C, A> DomainListCall<'a, C, A> where C: BorrowMut, A: oa } - /// Immutable id of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -20481,7 +20495,7 @@ impl<'a, C, A> DomainGetCall<'a, C, A> where C: BorrowMut, A: oau } - /// Immutable id of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -20757,7 +20771,7 @@ impl<'a, C, A> DomainInsertCall<'a, C, A> where C: BorrowMut, A: self._request = new_value; self } - /// Immutable id of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -20983,7 +20997,7 @@ impl<'a, C, A> DomainDeleteCall<'a, C, A> where C: BorrowMut, A: } - /// Immutable id of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -21259,7 +21273,7 @@ impl<'a, C, A> DomainAliaseInsertCall<'a, C, A> where C: BorrowMut DomainAliaseGetCall<'a, C, A> where C: BorrowMut, } - /// Immutable id of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -21746,7 +21760,7 @@ impl<'a, C, A> DomainAliaseListCall<'a, C, A> where C: BorrowMut, } - /// Immutable id of the Google Apps account. + /// Immutable ID of the G Suite account. /// /// Sets the *customer* path property to the given value. /// @@ -21979,7 +21993,7 @@ impl<'a, C, A> DomainAliaseDeleteCall<'a, C, A> where C: BorrowMut SchemaGetCall<'a, C, A> where C: BorrowMut, A: oau } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -22504,7 +22518,7 @@ impl<'a, C, A> SchemaUpdateCall<'a, C, A> where C: BorrowMut, A: self._request = new_value; self } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -22749,7 +22763,7 @@ impl<'a, C, A> SchemaListCall<'a, C, A> where C: BorrowMut, A: oa } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -23017,7 +23031,7 @@ impl<'a, C, A> SchemaPatchCall<'a, C, A> where C: BorrowMut, A: o self._request = new_value; self } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -23253,7 +23267,7 @@ impl<'a, C, A> SchemaDeleteCall<'a, C, A> where C: BorrowMut, A: } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -23529,7 +23543,7 @@ impl<'a, C, A> SchemaInsertCall<'a, C, A> where C: BorrowMut, A: self._request = new_value; self } - /// Immutable id of the Google Apps account + /// Immutable ID of the G Suite account /// /// Sets the *customer id* path property to the given value. /// @@ -23774,7 +23788,7 @@ impl<'a, C, A> ResourceCalendarListCall<'a, C, A> where C: BorrowMut ResourceCalendarGetCall<'a, C, A> where C: BorrowMut ResourceCalendarInsertCall<'a, C, A> where C: BorrowMut ResourceCalendarPatchCall<'a, C, A> where C: BorrowMut ResourceCalendarUpdateCall<'a, C, A> where C: BorrowMut ResourceCalendarDeleteCall<'a, C, A> where C: BorrowMut UserWatchCall<'a, C, A> where C: BorrowMut, A: oau self._domain = Some(new_value.to_string()); self } - /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. + /// Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. /// /// Sets the *customer* query property to the given value. pub fn customer(mut self, new_value: &str) -> UserWatchCall<'a, C, A> { @@ -27835,7 +27849,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut self._domain = Some(new_value.to_string()); self } - /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. + /// Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. /// /// Sets the *customer* query property to the given value. pub fn customer(mut self, new_value: &str) -> UserListCall<'a, C, A> { diff --git a/gen/admin1_reports-cli/Cargo.toml b/gen/admin1_reports-cli/Cargo.toml index cd8c29e8de..bab8152c51 100644 --- a/gen/admin1_reports-cli/Cargo.toml +++ b/gen/admin1_reports-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-admin1_reports-cli" -version = "1.0.4+20160704" +version = "1.0.4+20170320" authors = ["Sebastian Thiel "] description = "A complete library to interact with reports (protocol reports_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_reports-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-admin1_reports] path = "../admin1_reports" -version = "1.0.4+20160704" +version = "1.0.4+20170320" diff --git a/gen/admin1_reports-cli/README.md b/gen/admin1_reports-cli/README.md index 7604cca73c..28140361d9 100644 --- a/gen/admin1_reports-cli/README.md +++ b/gen/admin1_reports-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *reports* API at revision *20160704*. The CLI is at version *1.0.4*. +This documentation was generated from the *reports* API at revision *20170320*. The CLI is at version *1.0.4*. ```bash admin1-reports [options] diff --git a/gen/admin1_reports-cli/mkdocs.yml b/gen/admin1_reports-cli/mkdocs.yml index bc7a53bedc..837a334454 100644 --- a/gen/admin1_reports-cli/mkdocs.yml +++ b/gen/admin1_reports-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: reports v1.0.4+20160704 +site_name: reports v1.0.4+20170320 site_url: http://byron.github.io/google-apis-rs/google-admin1_reports-cli site_description: A complete library to interact with reports (protocol reports_v1) diff --git a/gen/admin1_reports-cli/src/main.rs b/gen/admin1_reports-cli/src/main.rs index 9745a9e596..dcf275accd 100644 --- a/gen/admin1_reports-cli/src/main.rs +++ b/gen/admin1_reports-cli/src/main.rs @@ -736,8 +736,8 @@ fn main() { let mut app = App::new("admin1-reports") .author("Sebastian Thiel ") - .version("1.0.4+20160704") - .about("Fetches reports for the administrators of Google Apps customers about the usage, collaboration, security, and risk for their users.") + .version("1.0.4+20170320") + .about("Fetches reports for the administrators of G Suite customers about the usage, collaboration, security, and risk for their users.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_admin1_reports_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/admin1_reports/Cargo.toml b/gen/admin1_reports/Cargo.toml index 8bd39d7335..53dc66b85c 100644 --- a/gen/admin1_reports/Cargo.toml +++ b/gen/admin1_reports/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-admin1_reports" -version = "1.0.4+20160704" +version = "1.0.4+20170320" authors = ["Sebastian Thiel "] description = "A complete library to interact with reports (protocol reports_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_reports" homepage = "https://developers.google.com/admin-sdk/reports/" -documentation = "https://docs.rs/google-admin1_reports/1.0.4+20160704" +documentation = "https://docs.rs/google-admin1_reports/1.0.4+20170320" license = "MIT" keywords = ["admin", "google", "protocol", "web", "api"] diff --git a/gen/admin1_reports/README.md b/gen/admin1_reports/README.md index b2eda7cf0b..d453f030a0 100644 --- a/gen/admin1_reports/README.md +++ b/gen/admin1_reports/README.md @@ -5,28 +5,28 @@ DO NOT EDIT ! --> The `google-admin1_reports` library allows access to all features of the *Google reports* service. -This documentation was generated from *reports* crate version *1.0.4+20160704*, where *20160704* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *reports* crate version *1.0.4+20170320*, where *20170320* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *reports* *v1_reports* API can be found at the [official documentation site](https://developers.google.com/admin-sdk/reports/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.Reports.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.Reports.html) ... -* [activities](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.Activity.html) - * [*list*](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.ActivityListCall.html) and [*watch*](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.ActivityWatchCall.html) -* [channels](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.Channel.html) - * [*stop*](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.ChannelStopCall.html) +* [activities](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.Activity.html) + * [*list*](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.ActivityListCall.html) and [*watch*](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.ActivityWatchCall.html) +* [channels](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.Channel.html) + * [*stop*](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.ChannelStopCall.html) * customer usage reports - * [*get*](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.CustomerUsageReportGetCall.html) + * [*get*](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.CustomerUsageReportGetCall.html) * user usage report - * [*get*](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.UserUsageReportGetCall.html) + * [*get*](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.UserUsageReportGetCall.html) Subscription supported by ... -* [*watch activities*](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.ActivityWatchCall.html) -* [*list activities*](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.ActivityListCall.html) +* [*watch activities*](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.ActivityWatchCall.html) +* [*list activities*](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.ActivityListCall.html) @@ -34,17 +34,17 @@ Subscription supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/struct.Reports.html)** +* **[Hub](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/struct.Reports.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.Part.html)** + * **[Parts](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -141,17 +141,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.Delegate.html), 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-admin1_reports/1.0.4+20160704/google_admin1_reports/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.ResponseResult.html), 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")`. @@ -161,29 +161,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.CallBuilder.html) 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-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.RequestValue.html) and -[decodable](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.RequestValue.html) and +[decodable](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.CallBuilder.html), 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-admin1_reports/1.0.4+20160704/google_admin1_reports/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-admin1_reports/1.0.4+20170320/google_admin1_reports/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/admin1_reports/src/lib.rs b/gen/admin1_reports/src/lib.rs index 082e253cc0..c807e5f895 100644 --- a/gen/admin1_reports/src/lib.rs +++ b/gen/admin1_reports/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *reports* crate version *1.0.4+20160704*, where *20160704* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *reports* crate version *1.0.4+20170320*, where *20170320* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *reports* *v1_reports* API can be found at the //! [official documentation site](https://developers.google.com/admin-sdk/reports/). @@ -241,10 +241,10 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { - /// View audit reports of Google Apps for your domain + /// View audit reports for your G Suite domain ReportAuditReadonly, - /// View usage reports of Google Apps for your domain + /// View usage reports for your G Suite domain ReportUsageReadonly, } @@ -1485,7 +1485,7 @@ impl<'a, C, A> ActivityWatchCall<'a, C, A> where C: BorrowMut, A: self._application_name = new_value.to_string(); self } - /// Return events which occured at or after this time. + /// Return events which occurred at or after this time. /// /// Sets the *start time* query property to the given value. pub fn start_time(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { @@ -1520,7 +1520,7 @@ impl<'a, C, A> ActivityWatchCall<'a, C, A> where C: BorrowMut, A: self._event_name = Some(new_value.to_string()); self } - /// Return events which occured at or before this time. + /// Return events which occurred at or before this time. /// /// Sets the *end time* query property to the given value. pub fn end_time(mut self, new_value: &str) -> ActivityWatchCall<'a, C, A> { @@ -1828,7 +1828,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: self._application_name = new_value.to_string(); self } - /// Return events which occured at or after this time. + /// Return events which occurred at or after this time. /// /// Sets the *start time* query property to the given value. pub fn start_time(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { @@ -1863,7 +1863,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: self._event_name = Some(new_value.to_string()); self } - /// Return events which occured at or before this time. + /// Return events which occurred at or before this time. /// /// Sets the *end time* query property to the given value. pub fn end_time(mut self, new_value: &str) -> ActivityListCall<'a, C, A> { diff --git a/gen/adsense1d4-cli/Cargo.toml b/gen/adsense1d4-cli/Cargo.toml index 9e15568940..b0f5b03deb 100644 --- a/gen/adsense1d4-cli/Cargo.toml +++ b/gen/adsense1d4-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adsense1d4-cli" -version = "1.0.4+20161206" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with AdSense (protocol v1.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsense1d4-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-adsense1d4] path = "../adsense1d4" -version = "1.0.4+20161206" +version = "1.0.4+20170517" diff --git a/gen/adsense1d4-cli/README.md b/gen/adsense1d4-cli/README.md index 354e8ab15e..7af4047428 100644 --- a/gen/adsense1d4-cli/README.md +++ b/gen/adsense1d4-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *AdSense* API at revision *20161206*. The CLI is at version *1.0.4*. +This documentation was generated from the *AdSense* API at revision *20170517*. The CLI is at version *1.0.4*. ```bash adsense1d4 [options] diff --git a/gen/adsense1d4-cli/mkdocs.yml b/gen/adsense1d4-cli/mkdocs.yml index cb73a01601..16ce95776c 100644 --- a/gen/adsense1d4-cli/mkdocs.yml +++ b/gen/adsense1d4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: AdSense v1.0.4+20161206 +site_name: AdSense v1.0.4+20170517 site_url: http://byron.github.io/google-apis-rs/google-adsense1d4-cli site_description: A complete library to interact with AdSense (protocol v1.4) diff --git a/gen/adsense1d4-cli/src/main.rs b/gen/adsense1d4-cli/src/main.rs index a85b7093c9..7117348707 100644 --- a/gen/adsense1d4-cli/src/main.rs +++ b/gen/adsense1d4-cli/src/main.rs @@ -3481,7 +3481,7 @@ fn main() { let mut app = App::new("adsense1d4") .author("Sebastian Thiel ") - .version("1.0.4+20161206") + .version("1.0.4+20170517") .about("Accesses AdSense publishers' inventory and generates performance reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_adsense1d4_cli") .arg(Arg::with_name("url") diff --git a/gen/adsense1d4/Cargo.toml b/gen/adsense1d4/Cargo.toml index addf76137b..0bddfcc37f 100644 --- a/gen/adsense1d4/Cargo.toml +++ b/gen/adsense1d4/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-adsense1d4" -version = "1.0.4+20161206" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with AdSense (protocol v1.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsense1d4" homepage = "https://developers.google.com/adsense/management/" -documentation = "https://docs.rs/google-adsense1d4/1.0.4+20161206" +documentation = "https://docs.rs/google-adsense1d4/1.0.4+20170517" license = "MIT" keywords = ["adsense", "google", "protocol", "web", "api"] diff --git a/gen/adsense1d4/README.md b/gen/adsense1d4/README.md index 0ca0c4b63a..31f294943f 100644 --- a/gen/adsense1d4/README.md +++ b/gen/adsense1d4/README.md @@ -5,40 +5,40 @@ DO NOT EDIT ! --> The `google-adsense1d4` library allows access to all features of the *Google AdSense* service. -This documentation was generated from *AdSense* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *AdSense* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *AdSense* *v1d4* API can be found at the [official documentation site](https://developers.google.com/adsense/management/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AdSense.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AdSense.html) ... -* [accounts](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.Account.html) - * [*adclients list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountAdclientListCall.html), [*adunits customchannels list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountAdunitCustomchannelListCall.html), [*adunits get*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountAdunitGetCall.html), [*adunits get ad code*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountAdunitGetAdCodeCall.html), [*adunits list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountAdunitListCall.html), [*alerts delete*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountAlertDeleteCall.html), [*alerts list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountAlertListCall.html), [*customchannels adunits list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountCustomchannelAdunitListCall.html), [*customchannels get*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountCustomchannelGetCall.html), [*customchannels list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountCustomchannelListCall.html), [*get*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountGetCall.html), [*list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountListCall.html), [*payments list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountPaymentListCall.html), [*reports generate*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountReportGenerateCall.html), [*reports saved generate*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountReportSavedGenerateCall.html), [*reports saved list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountReportSavedListCall.html), [*savedadstyles get*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountSavedadstyleGetCall.html), [*savedadstyles list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountSavedadstyleListCall.html) and [*urlchannels list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountUrlchannelListCall.html) +* [accounts](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.Account.html) + * [*adclients list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountAdclientListCall.html), [*adunits customchannels list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountAdunitCustomchannelListCall.html), [*adunits get*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountAdunitGetCall.html), [*adunits get ad code*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountAdunitGetAdCodeCall.html), [*adunits list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountAdunitListCall.html), [*alerts delete*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountAlertDeleteCall.html), [*alerts list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountAlertListCall.html), [*customchannels adunits list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountCustomchannelAdunitListCall.html), [*customchannels get*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountCustomchannelGetCall.html), [*customchannels list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountCustomchannelListCall.html), [*get*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountGetCall.html), [*list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountListCall.html), [*payments list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountPaymentListCall.html), [*reports generate*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountReportGenerateCall.html), [*reports saved generate*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountReportSavedGenerateCall.html), [*reports saved list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountReportSavedListCall.html), [*savedadstyles get*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountSavedadstyleGetCall.html), [*savedadstyles list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountSavedadstyleListCall.html) and [*urlchannels list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountUrlchannelListCall.html) * adclients - * [*list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AdclientListCall.html) + * [*list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AdclientListCall.html) * adunits - * [*customchannels list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AdunitCustomchannelListCall.html), [*get*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AdunitGetCall.html), [*get ad code*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AdunitGetAdCodeCall.html) and [*list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AdunitListCall.html) -* [alerts](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.Alert.html) - * [*delete*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AlertDeleteCall.html) and [*list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AlertListCall.html) + * [*customchannels list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AdunitCustomchannelListCall.html), [*get*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AdunitGetCall.html), [*get ad code*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AdunitGetAdCodeCall.html) and [*list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AdunitListCall.html) +* [alerts](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.Alert.html) + * [*delete*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AlertDeleteCall.html) and [*list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AlertListCall.html) * customchannels - * [*adunits list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.CustomchannelAdunitListCall.html), [*get*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.CustomchannelGetCall.html) and [*list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.CustomchannelListCall.html) -* [metadata](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.Metadata.html) - * [*dimensions list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.MetadataDimensionListCall.html) and [*metrics list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.MetadataMetricListCall.html) -* [payments](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.Payment.html) - * [*list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.PaymentListCall.html) + * [*adunits list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.CustomchannelAdunitListCall.html), [*get*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.CustomchannelGetCall.html) and [*list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.CustomchannelListCall.html) +* [metadata](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.Metadata.html) + * [*dimensions list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.MetadataDimensionListCall.html) and [*metrics list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.MetadataMetricListCall.html) +* [payments](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.Payment.html) + * [*list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.PaymentListCall.html) * reports - * [*generate*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.ReportGenerateCall.html), [*saved generate*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.ReportSavedGenerateCall.html) and [*saved list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.ReportSavedListCall.html) + * [*generate*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.ReportGenerateCall.html), [*saved generate*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.ReportSavedGenerateCall.html) and [*saved list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.ReportSavedListCall.html) * savedadstyles - * [*get*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.SavedadstyleGetCall.html) and [*list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.SavedadstyleListCall.html) + * [*get*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.SavedadstyleGetCall.html) and [*list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.SavedadstyleListCall.html) * urlchannels - * [*list*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.UrlchannelListCall.html) + * [*list*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.UrlchannelListCall.html) Download supported by ... -* [*generate reports*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.ReportGenerateCall.html) -* [*reports generate accounts*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AccountReportGenerateCall.html) +* [*generate reports*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.ReportGenerateCall.html) +* [*reports generate accounts*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AccountReportGenerateCall.html) @@ -46,17 +46,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/struct.AdSense.html)** +* **[Hub](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/struct.AdSense.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.Part.html)** + * **[Parts](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -165,17 +165,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.Delegate.html), 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-adsense1d4/1.0.4+20161206/google_adsense1d4/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.ResponseResult.html), 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")`. @@ -185,29 +185,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.CallBuilder.html) 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-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.RequestValue.html) and -[decodable](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.RequestValue.html) and +[decodable](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.CallBuilder.html), 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-adsense1d4/1.0.4+20161206/google_adsense1d4/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-adsense1d4/1.0.4+20170517/google_adsense1d4/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/adsense1d4/src/lib.rs b/gen/adsense1d4/src/lib.rs index 151f1b4d64..a892b6a04d 100644 --- a/gen/adsense1d4/src/lib.rs +++ b/gen/adsense1d4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *AdSense* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *AdSense* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *AdSense* *v1d4* API can be found at the //! [official documentation site](https://developers.google.com/adsense/management/). diff --git a/gen/adsensehost4d1-cli/Cargo.toml b/gen/adsensehost4d1-cli/Cargo.toml index 364af81f76..ab8fbf6767 100644 --- a/gen/adsensehost4d1-cli/Cargo.toml +++ b/gen/adsensehost4d1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adsensehost4d1-cli" -version = "1.0.4+20161206" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with AdSense Host (protocol v4.1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsensehost4d1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-adsensehost4d1] path = "../adsensehost4d1" -version = "1.0.4+20161206" +version = "1.0.4+20170517" diff --git a/gen/adsensehost4d1-cli/README.md b/gen/adsensehost4d1-cli/README.md index 3d870f8d68..145796ab78 100644 --- a/gen/adsensehost4d1-cli/README.md +++ b/gen/adsensehost4d1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *AdSense Host* API at revision *20161206*. The CLI is at version *1.0.4*. +This documentation was generated from the *AdSense Host* API at revision *20170517*. The CLI is at version *1.0.4*. ```bash adsensehost4d1 [options] diff --git a/gen/adsensehost4d1-cli/mkdocs.yml b/gen/adsensehost4d1-cli/mkdocs.yml index 1fee6fc148..43c01fede0 100644 --- a/gen/adsensehost4d1-cli/mkdocs.yml +++ b/gen/adsensehost4d1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: AdSense Host v1.0.4+20161206 +site_name: AdSense Host v1.0.4+20170517 site_url: http://byron.github.io/google-apis-rs/google-adsensehost4d1-cli site_description: A complete library to interact with AdSense Host (protocol v4.1) diff --git a/gen/adsensehost4d1-cli/src/main.rs b/gen/adsensehost4d1-cli/src/main.rs index 5c179d404a..32ec723680 100644 --- a/gen/adsensehost4d1-cli/src/main.rs +++ b/gen/adsensehost4d1-cli/src/main.rs @@ -2762,7 +2762,7 @@ fn main() { let mut app = App::new("adsensehost4d1") .author("Sebastian Thiel ") - .version("1.0.4+20161206") + .version("1.0.4+20170517") .about("Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_adsensehost4d1_cli") .arg(Arg::with_name("url") diff --git a/gen/adsensehost4d1/Cargo.toml b/gen/adsensehost4d1/Cargo.toml index 07997e656a..e52a48297f 100644 --- a/gen/adsensehost4d1/Cargo.toml +++ b/gen/adsensehost4d1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-adsensehost4d1" -version = "1.0.4+20161206" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with AdSense Host (protocol v4.1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsensehost4d1" homepage = "https://developers.google.com/adsense/host/" -documentation = "https://docs.rs/google-adsensehost4d1/1.0.4+20161206" +documentation = "https://docs.rs/google-adsensehost4d1/1.0.4+20170517" license = "MIT" keywords = ["adsensehost", "google", "protocol", "web", "api"] diff --git a/gen/adsensehost4d1/README.md b/gen/adsensehost4d1/README.md index 56b7fb4291..6ea304f2d3 100644 --- a/gen/adsensehost4d1/README.md +++ b/gen/adsensehost4d1/README.md @@ -5,26 +5,26 @@ DO NOT EDIT ! --> The `google-adsensehost4d1` library allows access to all features of the *Google AdSense Host* service. -This documentation was generated from *AdSense Host* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *AdSense Host* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *AdSense Host* *v4d1* API can be found at the [official documentation site](https://developers.google.com/adsense/host/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AdSenseHost.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AdSenseHost.html) ... -* [accounts](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.Account.html) - * [*adclients get*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountAdclientGetCall.html), [*adclients list*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountAdclientListCall.html), [*adunits delete*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountAdunitDeleteCall.html), [*adunits get*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountAdunitGetCall.html), [*adunits get ad code*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountAdunitGetAdCodeCall.html), [*adunits insert*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountAdunitInsertCall.html), [*adunits list*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountAdunitListCall.html), [*adunits patch*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountAdunitPatchCall.html), [*adunits update*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountAdunitUpdateCall.html), [*get*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountGetCall.html), [*list*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountListCall.html) and [*reports generate*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AccountReportGenerateCall.html) +* [accounts](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.Account.html) + * [*adclients get*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountAdclientGetCall.html), [*adclients list*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountAdclientListCall.html), [*adunits delete*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountAdunitDeleteCall.html), [*adunits get*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountAdunitGetCall.html), [*adunits get ad code*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountAdunitGetAdCodeCall.html), [*adunits insert*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountAdunitInsertCall.html), [*adunits list*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountAdunitListCall.html), [*adunits patch*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountAdunitPatchCall.html), [*adunits update*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountAdunitUpdateCall.html), [*get*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountGetCall.html), [*list*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountListCall.html) and [*reports generate*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AccountReportGenerateCall.html) * adclients - * [*get*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AdclientGetCall.html) and [*list*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AdclientListCall.html) + * [*get*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AdclientGetCall.html) and [*list*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AdclientListCall.html) * associationsessions - * [*start*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AssociationsessionStartCall.html) and [*verify*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AssociationsessionVerifyCall.html) + * [*start*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AssociationsessionStartCall.html) and [*verify*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AssociationsessionVerifyCall.html) * customchannels - * [*delete*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.CustomchannelDeleteCall.html), [*get*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.CustomchannelGetCall.html), [*insert*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.CustomchannelInsertCall.html), [*list*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.CustomchannelListCall.html), [*patch*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.CustomchannelPatchCall.html) and [*update*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.CustomchannelUpdateCall.html) -* [reports](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.Report.html) - * [*generate*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.ReportGenerateCall.html) + * [*delete*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.CustomchannelDeleteCall.html), [*get*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.CustomchannelGetCall.html), [*insert*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.CustomchannelInsertCall.html), [*list*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.CustomchannelListCall.html), [*patch*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.CustomchannelPatchCall.html) and [*update*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.CustomchannelUpdateCall.html) +* [reports](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.Report.html) + * [*generate*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.ReportGenerateCall.html) * urlchannels - * [*delete*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.UrlchannelDeleteCall.html), [*insert*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.UrlchannelInsertCall.html) and [*list*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.UrlchannelListCall.html) + * [*delete*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.UrlchannelDeleteCall.html), [*insert*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.UrlchannelInsertCall.html) and [*list*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.UrlchannelListCall.html) @@ -33,17 +33,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/struct.AdSenseHost.html)** +* **[Hub](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/struct.AdSenseHost.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.Part.html)** + * **[Parts](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -143,17 +143,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.Delegate.html), 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-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.ResponseResult.html), 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")`. @@ -163,29 +163,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.CallBuilder.html) 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-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.CallBuilder.html), 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-adsensehost4d1/1.0.4+20161206/google_adsensehost4d1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-adsensehost4d1/1.0.4+20170517/google_adsensehost4d1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/adsensehost4d1/src/lib.rs b/gen/adsensehost4d1/src/lib.rs index bc52c24cb8..a3950ce8ef 100644 --- a/gen/adsensehost4d1/src/lib.rs +++ b/gen/adsensehost4d1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *AdSense Host* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *AdSense Host* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *AdSense Host* *v4d1* API can be found at the //! [official documentation site](https://developers.google.com/adsense/host/). diff --git a/gen/analytics3-cli/Cargo.toml b/gen/analytics3-cli/Cargo.toml index d6f574c938..91dc66f343 100644 --- a/gen/analytics3-cli/Cargo.toml +++ b/gen/analytics3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-analytics3-cli" -version = "1.0.4+20161004" +version = "1.0.4+20170321" authors = ["Sebastian Thiel "] description = "A complete library to interact with analytics (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/analytics3-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-analytics3] path = "../analytics3" -version = "1.0.4+20161004" +version = "1.0.4+20170321" diff --git a/gen/analytics3-cli/README.md b/gen/analytics3-cli/README.md index c81578f16e..42e2d14ba8 100644 --- a/gen/analytics3-cli/README.md +++ b/gen/analytics3-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *analytics* API at revision *20161004*. The CLI is at version *1.0.4*. +This documentation was generated from the *analytics* API at revision *20170321*. The CLI is at version *1.0.4*. ```bash analytics3 [options] @@ -84,6 +84,7 @@ analytics3 [options] profiles-list [-p ]... [-o ] profiles-patch (-r )... [-p ]... [-o ] profiles-update (-r )... [-p ]... [-o ] + remarketing-audience-delete [-p ]... remarketing-audience-get [-p ]... [-o ] remarketing-audience-insert (-r )... [-p ]... [-o ] remarketing-audience-list [-p ]... [-o ] diff --git a/gen/analytics3-cli/mkdocs.yml b/gen/analytics3-cli/mkdocs.yml index 63d92d10be..12018babb5 100644 --- a/gen/analytics3-cli/mkdocs.yml +++ b/gen/analytics3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: analytics v1.0.4+20161004 +site_name: analytics v1.0.4+20170321 site_url: http://byron.github.io/google-apis-rs/google-analytics3-cli site_description: A complete library to interact with analytics (protocol v3) @@ -62,6 +62,7 @@ pages: - ['management_profiles-list.md', 'Management', 'Profiles List'] - ['management_profiles-patch.md', 'Management', 'Profiles Patch'] - ['management_profiles-update.md', 'Management', 'Profiles Update'] +- ['management_remarketing-audience-delete.md', 'Management', 'Remarketing Audience Delete'] - ['management_remarketing-audience-get.md', 'Management', 'Remarketing Audience Get'] - ['management_remarketing-audience-insert.md', 'Management', 'Remarketing Audience Insert'] - ['management_remarketing-audience-list.md', 'Management', 'Remarketing Audience List'] diff --git a/gen/analytics3-cli/src/main.rs b/gen/analytics3-cli/src/main.rs index f0f154b7c7..994dd60949 100644 --- a/gen/analytics3-cli/src/main.rs +++ b/gen/analytics3-cli/src/main.rs @@ -4329,6 +4329,50 @@ impl<'n> Engine<'n> { } } + fn _management_remarketing_audience_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.management().remarketing_audience_delete(opt.value_of("account-id").unwrap_or(""), opt.value_of("web-property-id").unwrap_or(""), opt.value_of("remarketing-audience-id").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); + } + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok(mut response) => { + Ok(()) + } + } + } + } + fn _management_remarketing_audience_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.management().remarketing_audience_get(opt.value_of("account-id").unwrap_or(""), opt.value_of("web-property-id").unwrap_or(""), opt.value_of("remarketing-audience-id").unwrap_or("")); @@ -6877,6 +6921,9 @@ impl<'n> Engine<'n> { ("profiles-update", Some(opt)) => { call_result = self._management_profiles_update(opt, dry_run, &mut err); }, + ("remarketing-audience-delete", Some(opt)) => { + call_result = self._management_remarketing_audience_delete(opt, dry_run, &mut err); + }, ("remarketing-audience-get", Some(opt)) => { call_result = self._management_remarketing_audience_get(opt, dry_run, &mut err); }, @@ -7186,7 +7233,7 @@ fn main() { ]), ]), - ("management", "methods: 'account-summaries-list', 'account-user-links-delete', 'account-user-links-insert', 'account-user-links-list', 'account-user-links-update', 'accounts-list', 'custom-data-sources-list', 'custom-dimensions-get', 'custom-dimensions-insert', 'custom-dimensions-list', 'custom-dimensions-patch', 'custom-dimensions-update', 'custom-metrics-get', 'custom-metrics-insert', 'custom-metrics-list', 'custom-metrics-patch', 'custom-metrics-update', 'experiments-delete', 'experiments-get', 'experiments-insert', 'experiments-list', 'experiments-patch', 'experiments-update', 'filters-delete', 'filters-get', 'filters-insert', 'filters-list', 'filters-patch', 'filters-update', 'goals-get', 'goals-insert', 'goals-list', 'goals-patch', 'goals-update', 'profile-filter-links-delete', 'profile-filter-links-get', 'profile-filter-links-insert', 'profile-filter-links-list', 'profile-filter-links-patch', 'profile-filter-links-update', 'profile-user-links-delete', 'profile-user-links-insert', 'profile-user-links-list', 'profile-user-links-update', 'profiles-delete', 'profiles-get', 'profiles-insert', 'profiles-list', 'profiles-patch', 'profiles-update', 'remarketing-audience-get', 'remarketing-audience-insert', 'remarketing-audience-list', 'remarketing-audience-patch', 'remarketing-audience-update', 'segments-list', 'unsampled-reports-delete', 'unsampled-reports-get', 'unsampled-reports-insert', 'unsampled-reports-list', 'uploads-delete-upload-data', 'uploads-get', 'uploads-list', 'uploads-upload-data', 'web-property-ad-words-links-delete', 'web-property-ad-words-links-get', 'web-property-ad-words-links-insert', 'web-property-ad-words-links-list', 'web-property-ad-words-links-patch', 'web-property-ad-words-links-update', 'webproperties-get', 'webproperties-insert', 'webproperties-list', 'webproperties-patch', 'webproperties-update', 'webproperty-user-links-delete', 'webproperty-user-links-insert', 'webproperty-user-links-list' and 'webproperty-user-links-update'", vec![ + ("management", "methods: 'account-summaries-list', 'account-user-links-delete', 'account-user-links-insert', 'account-user-links-list', 'account-user-links-update', 'accounts-list', 'custom-data-sources-list', 'custom-dimensions-get', 'custom-dimensions-insert', 'custom-dimensions-list', 'custom-dimensions-patch', 'custom-dimensions-update', 'custom-metrics-get', 'custom-metrics-insert', 'custom-metrics-list', 'custom-metrics-patch', 'custom-metrics-update', 'experiments-delete', 'experiments-get', 'experiments-insert', 'experiments-list', 'experiments-patch', 'experiments-update', 'filters-delete', 'filters-get', 'filters-insert', 'filters-list', 'filters-patch', 'filters-update', 'goals-get', 'goals-insert', 'goals-list', 'goals-patch', 'goals-update', 'profile-filter-links-delete', 'profile-filter-links-get', 'profile-filter-links-insert', 'profile-filter-links-list', 'profile-filter-links-patch', 'profile-filter-links-update', 'profile-user-links-delete', 'profile-user-links-insert', 'profile-user-links-list', 'profile-user-links-update', 'profiles-delete', 'profiles-get', 'profiles-insert', 'profiles-list', 'profiles-patch', 'profiles-update', 'remarketing-audience-delete', 'remarketing-audience-get', 'remarketing-audience-insert', 'remarketing-audience-list', 'remarketing-audience-patch', 'remarketing-audience-update', 'segments-list', 'unsampled-reports-delete', 'unsampled-reports-get', 'unsampled-reports-insert', 'unsampled-reports-list', 'uploads-delete-upload-data', 'uploads-get', 'uploads-list', 'uploads-upload-data', 'web-property-ad-words-links-delete', 'web-property-ad-words-links-get', 'web-property-ad-words-links-insert', 'web-property-ad-words-links-list', 'web-property-ad-words-links-patch', 'web-property-ad-words-links-update', 'webproperties-get', 'webproperties-insert', 'webproperties-list', 'webproperties-patch', 'webproperties-update', 'webproperty-user-links-delete', 'webproperty-user-links-insert', 'webproperty-user-links-list' and 'webproperty-user-links-update'", vec![ ("account-summaries-list", Some(r##"Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access."##), "Details at http://byron.github.io/google-apis-rs/google_analytics3_cli/management_account-summaries-list", @@ -8923,6 +8970,34 @@ fn main() { Some(false), Some(false)), ]), + ("remarketing-audience-delete", + Some(r##"Delete a remarketing audience."##), + "Details at http://byron.github.io/google-apis-rs/google_analytics3_cli/management_remarketing-audience-delete", + vec![ + (Some(r##"account-id"##), + None, + Some(r##"Account ID to which the remarketing audience belongs."##), + Some(true), + Some(false)), + + (Some(r##"web-property-id"##), + None, + Some(r##"Web property ID to which the remarketing audience belongs."##), + Some(true), + Some(false)), + + (Some(r##"remarketing-audience-id"##), + None, + Some(r##"The ID of the remarketing audience to delete."##), + 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)), + ]), ("remarketing-audience-get", Some(r##"Gets a remarketing audience to which the user has access."##), "Details at http://byron.github.io/google-apis-rs/google_analytics3_cli/management_remarketing-audience-get", @@ -9947,7 +10022,7 @@ fn main() { let mut app = App::new("analytics3") .author("Sebastian Thiel ") - .version("1.0.4+20161004") + .version("1.0.4+20170321") .about("Views and manages your Google Analytics data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_analytics3_cli") .arg(Arg::with_name("url") diff --git a/gen/analytics3/Cargo.toml b/gen/analytics3/Cargo.toml index eb43d32528..5edace07b9 100644 --- a/gen/analytics3/Cargo.toml +++ b/gen/analytics3/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-analytics3" -version = "1.0.4+20161004" +version = "1.0.4+20170321" authors = ["Sebastian Thiel "] description = "A complete library to interact with analytics (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/analytics3" homepage = "https://developers.google.com/analytics/" -documentation = "https://docs.rs/google-analytics3/1.0.4+20161004" +documentation = "https://docs.rs/google-analytics3/1.0.4+20170321" license = "MIT" keywords = ["analytics", "google", "protocol", "web", "api"] diff --git a/gen/analytics3/README.md b/gen/analytics3/README.md index 6868c6ad22..4dd41432a1 100644 --- a/gen/analytics3/README.md +++ b/gen/analytics3/README.md @@ -5,27 +5,27 @@ DO NOT EDIT ! --> The `google-analytics3` library allows access to all features of the *Google analytics* service. -This documentation was generated from *analytics* crate version *1.0.4+20161004*, where *20161004* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *analytics* crate version *1.0.4+20170321*, where *20170321* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *analytics* *v3* API can be found at the [official documentation site](https://developers.google.com/analytics/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.Analytics.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.Analytics.html) ... * data - * [*ga get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.DataGaGetCall.html), [*mcf get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.DataMcfGetCall.html) and [*realtime get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.DataRealtimeGetCall.html) + * [*ga get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.DataGaGetCall.html), [*mcf get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.DataMcfGetCall.html) and [*realtime get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.DataRealtimeGetCall.html) * management - * [*account summaries list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementAccountSummaryListCall.html), [*account user links delete*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementAccountUserLinkDeleteCall.html), [*account user links insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementAccountUserLinkInsertCall.html), [*account user links list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementAccountUserLinkListCall.html), [*account user links update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementAccountUserLinkUpdateCall.html), [*accounts list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementAccountListCall.html), [*custom data sources list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomDataSourceListCall.html), [*custom dimensions get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomDimensionGetCall.html), [*custom dimensions insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomDimensionInsertCall.html), [*custom dimensions list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomDimensionListCall.html), [*custom dimensions patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomDimensionPatchCall.html), [*custom dimensions update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomDimensionUpdateCall.html), [*custom metrics get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomMetricGetCall.html), [*custom metrics insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomMetricInsertCall.html), [*custom metrics list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomMetricListCall.html), [*custom metrics patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomMetricPatchCall.html), [*custom metrics update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementCustomMetricUpdateCall.html), [*experiments delete*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementExperimentDeleteCall.html), [*experiments get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementExperimentGetCall.html), [*experiments insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementExperimentInsertCall.html), [*experiments list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementExperimentListCall.html), [*experiments patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementExperimentPatchCall.html), [*experiments update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementExperimentUpdateCall.html), [*filters delete*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementFilterDeleteCall.html), [*filters get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementFilterGetCall.html), [*filters insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementFilterInsertCall.html), [*filters list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementFilterListCall.html), [*filters patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementFilterPatchCall.html), [*filters update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementFilterUpdateCall.html), [*goals get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementGoalGetCall.html), [*goals insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementGoalInsertCall.html), [*goals list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementGoalListCall.html), [*goals patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementGoalPatchCall.html), [*goals update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementGoalUpdateCall.html), [*profile filter links delete*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileFilterLinkDeleteCall.html), [*profile filter links get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileFilterLinkGetCall.html), [*profile filter links insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileFilterLinkInsertCall.html), [*profile filter links list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileFilterLinkListCall.html), [*profile filter links patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileFilterLinkPatchCall.html), [*profile filter links update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileFilterLinkUpdateCall.html), [*profile user links delete*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileUserLinkDeleteCall.html), [*profile user links insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileUserLinkInsertCall.html), [*profile user links list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileUserLinkListCall.html), [*profile user links update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileUserLinkUpdateCall.html), [*profiles delete*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileDeleteCall.html), [*profiles get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileGetCall.html), [*profiles insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileInsertCall.html), [*profiles list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileListCall.html), [*profiles patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfilePatchCall.html), [*profiles update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementProfileUpdateCall.html), [*remarketing audience get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementRemarketingAudienceGetCall.html), [*remarketing audience insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementRemarketingAudienceInsertCall.html), [*remarketing audience list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementRemarketingAudienceListCall.html), [*remarketing audience patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementRemarketingAudiencePatchCall.html), [*remarketing audience update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementRemarketingAudienceUpdateCall.html), [*segments list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementSegmentListCall.html), [*unsampled reports delete*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementUnsampledReportDeleteCall.html), [*unsampled reports get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementUnsampledReportGetCall.html), [*unsampled reports insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementUnsampledReportInsertCall.html), [*unsampled reports list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementUnsampledReportListCall.html), [*uploads delete upload data*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementUploadDeleteUploadDataCall.html), [*uploads get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementUploadGetCall.html), [*uploads list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementUploadListCall.html), [*uploads upload data*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementUploadUploadDataCall.html), [*web property ad words links delete*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebPropertyAdWordsLinkDeleteCall.html), [*web property ad words links get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebPropertyAdWordsLinkGetCall.html), [*web property ad words links insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebPropertyAdWordsLinkInsertCall.html), [*web property ad words links list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebPropertyAdWordsLinkListCall.html), [*web property ad words links patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebPropertyAdWordsLinkPatchCall.html), [*web property ad words links update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebPropertyAdWordsLinkUpdateCall.html), [*webproperties get*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebpropertyGetCall.html), [*webproperties insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebpropertyInsertCall.html), [*webproperties list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebpropertyListCall.html), [*webproperties patch*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebpropertyPatchCall.html), [*webproperties update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebpropertyUpdateCall.html), [*webproperty user links delete*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebpropertyUserLinkDeleteCall.html), [*webproperty user links insert*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebpropertyUserLinkInsertCall.html), [*webproperty user links list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebpropertyUserLinkListCall.html) and [*webproperty user links update*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementWebpropertyUserLinkUpdateCall.html) + * [*account summaries list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementAccountSummaryListCall.html), [*account user links delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementAccountUserLinkDeleteCall.html), [*account user links insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementAccountUserLinkInsertCall.html), [*account user links list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementAccountUserLinkListCall.html), [*account user links update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementAccountUserLinkUpdateCall.html), [*accounts list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementAccountListCall.html), [*custom data sources list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomDataSourceListCall.html), [*custom dimensions get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomDimensionGetCall.html), [*custom dimensions insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomDimensionInsertCall.html), [*custom dimensions list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomDimensionListCall.html), [*custom dimensions patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomDimensionPatchCall.html), [*custom dimensions update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomDimensionUpdateCall.html), [*custom metrics get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomMetricGetCall.html), [*custom metrics insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomMetricInsertCall.html), [*custom metrics list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomMetricListCall.html), [*custom metrics patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomMetricPatchCall.html), [*custom metrics update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementCustomMetricUpdateCall.html), [*experiments delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementExperimentDeleteCall.html), [*experiments get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementExperimentGetCall.html), [*experiments insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementExperimentInsertCall.html), [*experiments list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementExperimentListCall.html), [*experiments patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementExperimentPatchCall.html), [*experiments update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementExperimentUpdateCall.html), [*filters delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementFilterDeleteCall.html), [*filters get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementFilterGetCall.html), [*filters insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementFilterInsertCall.html), [*filters list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementFilterListCall.html), [*filters patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementFilterPatchCall.html), [*filters update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementFilterUpdateCall.html), [*goals get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementGoalGetCall.html), [*goals insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementGoalInsertCall.html), [*goals list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementGoalListCall.html), [*goals patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementGoalPatchCall.html), [*goals update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementGoalUpdateCall.html), [*profile filter links delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileFilterLinkDeleteCall.html), [*profile filter links get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileFilterLinkGetCall.html), [*profile filter links insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileFilterLinkInsertCall.html), [*profile filter links list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileFilterLinkListCall.html), [*profile filter links patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileFilterLinkPatchCall.html), [*profile filter links update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileFilterLinkUpdateCall.html), [*profile user links delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileUserLinkDeleteCall.html), [*profile user links insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileUserLinkInsertCall.html), [*profile user links list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileUserLinkListCall.html), [*profile user links update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileUserLinkUpdateCall.html), [*profiles delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileDeleteCall.html), [*profiles get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileGetCall.html), [*profiles insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileInsertCall.html), [*profiles list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileListCall.html), [*profiles patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfilePatchCall.html), [*profiles update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementProfileUpdateCall.html), [*remarketing audience delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementRemarketingAudienceDeleteCall.html), [*remarketing audience get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementRemarketingAudienceGetCall.html), [*remarketing audience insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementRemarketingAudienceInsertCall.html), [*remarketing audience list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementRemarketingAudienceListCall.html), [*remarketing audience patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementRemarketingAudiencePatchCall.html), [*remarketing audience update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementRemarketingAudienceUpdateCall.html), [*segments list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementSegmentListCall.html), [*unsampled reports delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementUnsampledReportDeleteCall.html), [*unsampled reports get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementUnsampledReportGetCall.html), [*unsampled reports insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementUnsampledReportInsertCall.html), [*unsampled reports list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementUnsampledReportListCall.html), [*uploads delete upload data*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementUploadDeleteUploadDataCall.html), [*uploads get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementUploadGetCall.html), [*uploads list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementUploadListCall.html), [*uploads upload data*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementUploadUploadDataCall.html), [*web property ad words links delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebPropertyAdWordsLinkDeleteCall.html), [*web property ad words links get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebPropertyAdWordsLinkGetCall.html), [*web property ad words links insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebPropertyAdWordsLinkInsertCall.html), [*web property ad words links list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebPropertyAdWordsLinkListCall.html), [*web property ad words links patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebPropertyAdWordsLinkPatchCall.html), [*web property ad words links update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebPropertyAdWordsLinkUpdateCall.html), [*webproperties get*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebpropertyGetCall.html), [*webproperties insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebpropertyInsertCall.html), [*webproperties list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebpropertyListCall.html), [*webproperties patch*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebpropertyPatchCall.html), [*webproperties update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebpropertyUpdateCall.html), [*webproperty user links delete*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebpropertyUserLinkDeleteCall.html), [*webproperty user links insert*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebpropertyUserLinkInsertCall.html), [*webproperty user links list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebpropertyUserLinkListCall.html) and [*webproperty user links update*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementWebpropertyUserLinkUpdateCall.html) * metadata - * [*columns list*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.MetadataColumnListCall.html) + * [*columns list*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.MetadataColumnListCall.html) * provisioning - * [*create account ticket*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ProvisioningCreateAccountTicketCall.html) + * [*create account ticket*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ProvisioningCreateAccountTicketCall.html) Upload supported by ... -* [*uploads upload data management*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.ManagementUploadUploadDataCall.html) +* [*uploads upload data management*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.ManagementUploadUploadDataCall.html) @@ -33,17 +33,17 @@ Upload supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/struct.Analytics.html)** +* **[Hub](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/struct.Analytics.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.Part.html)** + * **[Parts](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -136,17 +136,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.Delegate.html), 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-analytics3/1.0.4+20161004/google_analytics3/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.ResponseResult.html), 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")`. @@ -156,29 +156,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.CallBuilder.html) 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-analytics3/1.0.4+20161004/google_analytics3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.RequestValue.html) and -[decodable](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.RequestValue.html) and +[decodable](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-analytics3/1.0.4+20161004/google_analytics3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.CallBuilder.html), 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-analytics3/1.0.4+20161004/google_analytics3/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-analytics3/1.0.4+20170321/google_analytics3/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/analytics3/src/lib.rs b/gen/analytics3/src/lib.rs index 72b7f54817..2e9bb62c73 100644 --- a/gen/analytics3/src/lib.rs +++ b/gen/analytics3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *analytics* crate version *1.0.4+20161004*, where *20161004* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *analytics* crate version *1.0.4+20170321*, where *20170321* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *analytics* *v3* API can be found at the //! [official documentation site](https://developers.google.com/analytics/). @@ -14,7 +14,7 @@ //! * data //! * [*ga get*](struct.DataGaGetCall.html), [*mcf get*](struct.DataMcfGetCall.html) and [*realtime get*](struct.DataRealtimeGetCall.html) //! * management -//! * [*account summaries list*](struct.ManagementAccountSummaryListCall.html), [*account user links delete*](struct.ManagementAccountUserLinkDeleteCall.html), [*account user links insert*](struct.ManagementAccountUserLinkInsertCall.html), [*account user links list*](struct.ManagementAccountUserLinkListCall.html), [*account user links update*](struct.ManagementAccountUserLinkUpdateCall.html), [*accounts list*](struct.ManagementAccountListCall.html), [*custom data sources list*](struct.ManagementCustomDataSourceListCall.html), [*custom dimensions get*](struct.ManagementCustomDimensionGetCall.html), [*custom dimensions insert*](struct.ManagementCustomDimensionInsertCall.html), [*custom dimensions list*](struct.ManagementCustomDimensionListCall.html), [*custom dimensions patch*](struct.ManagementCustomDimensionPatchCall.html), [*custom dimensions update*](struct.ManagementCustomDimensionUpdateCall.html), [*custom metrics get*](struct.ManagementCustomMetricGetCall.html), [*custom metrics insert*](struct.ManagementCustomMetricInsertCall.html), [*custom metrics list*](struct.ManagementCustomMetricListCall.html), [*custom metrics patch*](struct.ManagementCustomMetricPatchCall.html), [*custom metrics update*](struct.ManagementCustomMetricUpdateCall.html), [*experiments delete*](struct.ManagementExperimentDeleteCall.html), [*experiments get*](struct.ManagementExperimentGetCall.html), [*experiments insert*](struct.ManagementExperimentInsertCall.html), [*experiments list*](struct.ManagementExperimentListCall.html), [*experiments patch*](struct.ManagementExperimentPatchCall.html), [*experiments update*](struct.ManagementExperimentUpdateCall.html), [*filters delete*](struct.ManagementFilterDeleteCall.html), [*filters get*](struct.ManagementFilterGetCall.html), [*filters insert*](struct.ManagementFilterInsertCall.html), [*filters list*](struct.ManagementFilterListCall.html), [*filters patch*](struct.ManagementFilterPatchCall.html), [*filters update*](struct.ManagementFilterUpdateCall.html), [*goals get*](struct.ManagementGoalGetCall.html), [*goals insert*](struct.ManagementGoalInsertCall.html), [*goals list*](struct.ManagementGoalListCall.html), [*goals patch*](struct.ManagementGoalPatchCall.html), [*goals update*](struct.ManagementGoalUpdateCall.html), [*profile filter links delete*](struct.ManagementProfileFilterLinkDeleteCall.html), [*profile filter links get*](struct.ManagementProfileFilterLinkGetCall.html), [*profile filter links insert*](struct.ManagementProfileFilterLinkInsertCall.html), [*profile filter links list*](struct.ManagementProfileFilterLinkListCall.html), [*profile filter links patch*](struct.ManagementProfileFilterLinkPatchCall.html), [*profile filter links update*](struct.ManagementProfileFilterLinkUpdateCall.html), [*profile user links delete*](struct.ManagementProfileUserLinkDeleteCall.html), [*profile user links insert*](struct.ManagementProfileUserLinkInsertCall.html), [*profile user links list*](struct.ManagementProfileUserLinkListCall.html), [*profile user links update*](struct.ManagementProfileUserLinkUpdateCall.html), [*profiles delete*](struct.ManagementProfileDeleteCall.html), [*profiles get*](struct.ManagementProfileGetCall.html), [*profiles insert*](struct.ManagementProfileInsertCall.html), [*profiles list*](struct.ManagementProfileListCall.html), [*profiles patch*](struct.ManagementProfilePatchCall.html), [*profiles update*](struct.ManagementProfileUpdateCall.html), [*remarketing audience get*](struct.ManagementRemarketingAudienceGetCall.html), [*remarketing audience insert*](struct.ManagementRemarketingAudienceInsertCall.html), [*remarketing audience list*](struct.ManagementRemarketingAudienceListCall.html), [*remarketing audience patch*](struct.ManagementRemarketingAudiencePatchCall.html), [*remarketing audience update*](struct.ManagementRemarketingAudienceUpdateCall.html), [*segments list*](struct.ManagementSegmentListCall.html), [*unsampled reports delete*](struct.ManagementUnsampledReportDeleteCall.html), [*unsampled reports get*](struct.ManagementUnsampledReportGetCall.html), [*unsampled reports insert*](struct.ManagementUnsampledReportInsertCall.html), [*unsampled reports list*](struct.ManagementUnsampledReportListCall.html), [*uploads delete upload data*](struct.ManagementUploadDeleteUploadDataCall.html), [*uploads get*](struct.ManagementUploadGetCall.html), [*uploads list*](struct.ManagementUploadListCall.html), [*uploads upload data*](struct.ManagementUploadUploadDataCall.html), [*web property ad words links delete*](struct.ManagementWebPropertyAdWordsLinkDeleteCall.html), [*web property ad words links get*](struct.ManagementWebPropertyAdWordsLinkGetCall.html), [*web property ad words links insert*](struct.ManagementWebPropertyAdWordsLinkInsertCall.html), [*web property ad words links list*](struct.ManagementWebPropertyAdWordsLinkListCall.html), [*web property ad words links patch*](struct.ManagementWebPropertyAdWordsLinkPatchCall.html), [*web property ad words links update*](struct.ManagementWebPropertyAdWordsLinkUpdateCall.html), [*webproperties get*](struct.ManagementWebpropertyGetCall.html), [*webproperties insert*](struct.ManagementWebpropertyInsertCall.html), [*webproperties list*](struct.ManagementWebpropertyListCall.html), [*webproperties patch*](struct.ManagementWebpropertyPatchCall.html), [*webproperties update*](struct.ManagementWebpropertyUpdateCall.html), [*webproperty user links delete*](struct.ManagementWebpropertyUserLinkDeleteCall.html), [*webproperty user links insert*](struct.ManagementWebpropertyUserLinkInsertCall.html), [*webproperty user links list*](struct.ManagementWebpropertyUserLinkListCall.html) and [*webproperty user links update*](struct.ManagementWebpropertyUserLinkUpdateCall.html) +//! * [*account summaries list*](struct.ManagementAccountSummaryListCall.html), [*account user links delete*](struct.ManagementAccountUserLinkDeleteCall.html), [*account user links insert*](struct.ManagementAccountUserLinkInsertCall.html), [*account user links list*](struct.ManagementAccountUserLinkListCall.html), [*account user links update*](struct.ManagementAccountUserLinkUpdateCall.html), [*accounts list*](struct.ManagementAccountListCall.html), [*custom data sources list*](struct.ManagementCustomDataSourceListCall.html), [*custom dimensions get*](struct.ManagementCustomDimensionGetCall.html), [*custom dimensions insert*](struct.ManagementCustomDimensionInsertCall.html), [*custom dimensions list*](struct.ManagementCustomDimensionListCall.html), [*custom dimensions patch*](struct.ManagementCustomDimensionPatchCall.html), [*custom dimensions update*](struct.ManagementCustomDimensionUpdateCall.html), [*custom metrics get*](struct.ManagementCustomMetricGetCall.html), [*custom metrics insert*](struct.ManagementCustomMetricInsertCall.html), [*custom metrics list*](struct.ManagementCustomMetricListCall.html), [*custom metrics patch*](struct.ManagementCustomMetricPatchCall.html), [*custom metrics update*](struct.ManagementCustomMetricUpdateCall.html), [*experiments delete*](struct.ManagementExperimentDeleteCall.html), [*experiments get*](struct.ManagementExperimentGetCall.html), [*experiments insert*](struct.ManagementExperimentInsertCall.html), [*experiments list*](struct.ManagementExperimentListCall.html), [*experiments patch*](struct.ManagementExperimentPatchCall.html), [*experiments update*](struct.ManagementExperimentUpdateCall.html), [*filters delete*](struct.ManagementFilterDeleteCall.html), [*filters get*](struct.ManagementFilterGetCall.html), [*filters insert*](struct.ManagementFilterInsertCall.html), [*filters list*](struct.ManagementFilterListCall.html), [*filters patch*](struct.ManagementFilterPatchCall.html), [*filters update*](struct.ManagementFilterUpdateCall.html), [*goals get*](struct.ManagementGoalGetCall.html), [*goals insert*](struct.ManagementGoalInsertCall.html), [*goals list*](struct.ManagementGoalListCall.html), [*goals patch*](struct.ManagementGoalPatchCall.html), [*goals update*](struct.ManagementGoalUpdateCall.html), [*profile filter links delete*](struct.ManagementProfileFilterLinkDeleteCall.html), [*profile filter links get*](struct.ManagementProfileFilterLinkGetCall.html), [*profile filter links insert*](struct.ManagementProfileFilterLinkInsertCall.html), [*profile filter links list*](struct.ManagementProfileFilterLinkListCall.html), [*profile filter links patch*](struct.ManagementProfileFilterLinkPatchCall.html), [*profile filter links update*](struct.ManagementProfileFilterLinkUpdateCall.html), [*profile user links delete*](struct.ManagementProfileUserLinkDeleteCall.html), [*profile user links insert*](struct.ManagementProfileUserLinkInsertCall.html), [*profile user links list*](struct.ManagementProfileUserLinkListCall.html), [*profile user links update*](struct.ManagementProfileUserLinkUpdateCall.html), [*profiles delete*](struct.ManagementProfileDeleteCall.html), [*profiles get*](struct.ManagementProfileGetCall.html), [*profiles insert*](struct.ManagementProfileInsertCall.html), [*profiles list*](struct.ManagementProfileListCall.html), [*profiles patch*](struct.ManagementProfilePatchCall.html), [*profiles update*](struct.ManagementProfileUpdateCall.html), [*remarketing audience delete*](struct.ManagementRemarketingAudienceDeleteCall.html), [*remarketing audience get*](struct.ManagementRemarketingAudienceGetCall.html), [*remarketing audience insert*](struct.ManagementRemarketingAudienceInsertCall.html), [*remarketing audience list*](struct.ManagementRemarketingAudienceListCall.html), [*remarketing audience patch*](struct.ManagementRemarketingAudiencePatchCall.html), [*remarketing audience update*](struct.ManagementRemarketingAudienceUpdateCall.html), [*segments list*](struct.ManagementSegmentListCall.html), [*unsampled reports delete*](struct.ManagementUnsampledReportDeleteCall.html), [*unsampled reports get*](struct.ManagementUnsampledReportGetCall.html), [*unsampled reports insert*](struct.ManagementUnsampledReportInsertCall.html), [*unsampled reports list*](struct.ManagementUnsampledReportListCall.html), [*uploads delete upload data*](struct.ManagementUploadDeleteUploadDataCall.html), [*uploads get*](struct.ManagementUploadGetCall.html), [*uploads list*](struct.ManagementUploadListCall.html), [*uploads upload data*](struct.ManagementUploadUploadDataCall.html), [*web property ad words links delete*](struct.ManagementWebPropertyAdWordsLinkDeleteCall.html), [*web property ad words links get*](struct.ManagementWebPropertyAdWordsLinkGetCall.html), [*web property ad words links insert*](struct.ManagementWebPropertyAdWordsLinkInsertCall.html), [*web property ad words links list*](struct.ManagementWebPropertyAdWordsLinkListCall.html), [*web property ad words links patch*](struct.ManagementWebPropertyAdWordsLinkPatchCall.html), [*web property ad words links update*](struct.ManagementWebPropertyAdWordsLinkUpdateCall.html), [*webproperties get*](struct.ManagementWebpropertyGetCall.html), [*webproperties insert*](struct.ManagementWebpropertyInsertCall.html), [*webproperties list*](struct.ManagementWebpropertyListCall.html), [*webproperties patch*](struct.ManagementWebpropertyPatchCall.html), [*webproperties update*](struct.ManagementWebpropertyUpdateCall.html), [*webproperty user links delete*](struct.ManagementWebpropertyUserLinkDeleteCall.html), [*webproperty user links insert*](struct.ManagementWebpropertyUserLinkInsertCall.html), [*webproperty user links list*](struct.ManagementWebpropertyUserLinkListCall.html) and [*webproperty user links update*](struct.ManagementWebpropertyUserLinkUpdateCall.html) //! * metadata //! * [*columns list*](struct.MetadataColumnListCall.html) //! * provisioning @@ -3515,7 +3515,7 @@ impl Part for ProfileChildLink {} /// ::default(), None); /// let mut hub = Analytics::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `account_summaries_list(...)`, `account_user_links_delete(...)`, `account_user_links_insert(...)`, `account_user_links_list(...)`, `account_user_links_update(...)`, `accounts_list(...)`, `custom_data_sources_list(...)`, `custom_dimensions_get(...)`, `custom_dimensions_insert(...)`, `custom_dimensions_list(...)`, `custom_dimensions_patch(...)`, `custom_dimensions_update(...)`, `custom_metrics_get(...)`, `custom_metrics_insert(...)`, `custom_metrics_list(...)`, `custom_metrics_patch(...)`, `custom_metrics_update(...)`, `experiments_delete(...)`, `experiments_get(...)`, `experiments_insert(...)`, `experiments_list(...)`, `experiments_patch(...)`, `experiments_update(...)`, `filters_delete(...)`, `filters_get(...)`, `filters_insert(...)`, `filters_list(...)`, `filters_patch(...)`, `filters_update(...)`, `goals_get(...)`, `goals_insert(...)`, `goals_list(...)`, `goals_patch(...)`, `goals_update(...)`, `profile_filter_links_delete(...)`, `profile_filter_links_get(...)`, `profile_filter_links_insert(...)`, `profile_filter_links_list(...)`, `profile_filter_links_patch(...)`, `profile_filter_links_update(...)`, `profile_user_links_delete(...)`, `profile_user_links_insert(...)`, `profile_user_links_list(...)`, `profile_user_links_update(...)`, `profiles_delete(...)`, `profiles_get(...)`, `profiles_insert(...)`, `profiles_list(...)`, `profiles_patch(...)`, `profiles_update(...)`, `remarketing_audience_get(...)`, `remarketing_audience_insert(...)`, `remarketing_audience_list(...)`, `remarketing_audience_patch(...)`, `remarketing_audience_update(...)`, `segments_list(...)`, `unsampled_reports_delete(...)`, `unsampled_reports_get(...)`, `unsampled_reports_insert(...)`, `unsampled_reports_list(...)`, `uploads_delete_upload_data(...)`, `uploads_get(...)`, `uploads_list(...)`, `uploads_upload_data(...)`, `web_property_ad_words_links_delete(...)`, `web_property_ad_words_links_get(...)`, `web_property_ad_words_links_insert(...)`, `web_property_ad_words_links_list(...)`, `web_property_ad_words_links_patch(...)`, `web_property_ad_words_links_update(...)`, `webproperties_get(...)`, `webproperties_insert(...)`, `webproperties_list(...)`, `webproperties_patch(...)`, `webproperties_update(...)`, `webproperty_user_links_delete(...)`, `webproperty_user_links_insert(...)`, `webproperty_user_links_list(...)` and `webproperty_user_links_update(...)` +/// // like `account_summaries_list(...)`, `account_user_links_delete(...)`, `account_user_links_insert(...)`, `account_user_links_list(...)`, `account_user_links_update(...)`, `accounts_list(...)`, `custom_data_sources_list(...)`, `custom_dimensions_get(...)`, `custom_dimensions_insert(...)`, `custom_dimensions_list(...)`, `custom_dimensions_patch(...)`, `custom_dimensions_update(...)`, `custom_metrics_get(...)`, `custom_metrics_insert(...)`, `custom_metrics_list(...)`, `custom_metrics_patch(...)`, `custom_metrics_update(...)`, `experiments_delete(...)`, `experiments_get(...)`, `experiments_insert(...)`, `experiments_list(...)`, `experiments_patch(...)`, `experiments_update(...)`, `filters_delete(...)`, `filters_get(...)`, `filters_insert(...)`, `filters_list(...)`, `filters_patch(...)`, `filters_update(...)`, `goals_get(...)`, `goals_insert(...)`, `goals_list(...)`, `goals_patch(...)`, `goals_update(...)`, `profile_filter_links_delete(...)`, `profile_filter_links_get(...)`, `profile_filter_links_insert(...)`, `profile_filter_links_list(...)`, `profile_filter_links_patch(...)`, `profile_filter_links_update(...)`, `profile_user_links_delete(...)`, `profile_user_links_insert(...)`, `profile_user_links_list(...)`, `profile_user_links_update(...)`, `profiles_delete(...)`, `profiles_get(...)`, `profiles_insert(...)`, `profiles_list(...)`, `profiles_patch(...)`, `profiles_update(...)`, `remarketing_audience_delete(...)`, `remarketing_audience_get(...)`, `remarketing_audience_insert(...)`, `remarketing_audience_list(...)`, `remarketing_audience_patch(...)`, `remarketing_audience_update(...)`, `segments_list(...)`, `unsampled_reports_delete(...)`, `unsampled_reports_get(...)`, `unsampled_reports_insert(...)`, `unsampled_reports_list(...)`, `uploads_delete_upload_data(...)`, `uploads_get(...)`, `uploads_list(...)`, `uploads_upload_data(...)`, `web_property_ad_words_links_delete(...)`, `web_property_ad_words_links_get(...)`, `web_property_ad_words_links_insert(...)`, `web_property_ad_words_links_list(...)`, `web_property_ad_words_links_patch(...)`, `web_property_ad_words_links_update(...)`, `webproperties_get(...)`, `webproperties_insert(...)`, `webproperties_list(...)`, `webproperties_patch(...)`, `webproperties_update(...)`, `webproperty_user_links_delete(...)`, `webproperty_user_links_insert(...)`, `webproperty_user_links_list(...)` and `webproperty_user_links_update(...)` /// // to build up your call. /// let rb = hub.management(); /// # } @@ -4530,6 +4530,27 @@ impl<'a, C, A> ManagementMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Updates an existing web property. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to which the web property belongs + /// * `webPropertyId` - Web property ID + pub fn webproperties_patch(&self, request: Webproperty, account_id: &str, web_property_id: &str) -> ManagementWebpropertyPatchCall<'a, C, A> { + ManagementWebpropertyPatchCall { + hub: self.hub, + _request: request, + _account_id: account_id.to_string(), + _web_property_id: web_property_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// List uploads to which the user has access. @@ -4861,19 +4882,19 @@ impl<'a, C, A> ManagementMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing web property. This method supports patch semantics. + /// Delete a remarketing audience. /// /// # Arguments /// - /// * `request` - No description provided. - /// * `accountId` - Account ID to which the web property belongs - /// * `webPropertyId` - Web property ID - pub fn webproperties_patch(&self, request: Webproperty, account_id: &str, web_property_id: &str) -> ManagementWebpropertyPatchCall<'a, C, A> { - ManagementWebpropertyPatchCall { + /// * `accountId` - Account ID to which the remarketing audience belongs. + /// * `webPropertyId` - Web property ID to which the remarketing audience belongs. + /// * `remarketingAudienceId` - The ID of the remarketing audience to delete. + pub fn remarketing_audience_delete(&self, account_id: &str, web_property_id: &str, remarketing_audience_id: &str) -> ManagementRemarketingAudienceDeleteCall<'a, C, A> { + ManagementRemarketingAudienceDeleteCall { hub: self.hub, - _request: request, _account_id: account_id.to_string(), _web_property_id: web_property_id.to_string(), + _remarketing_audience_id: remarketing_audience_id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -18214,6 +18235,284 @@ impl<'a, C, A> ManagementCustomDimensionListCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Analytics::new(hyper::Client::new(), 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 = Webproperty::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.management().webproperties_patch(req, "accountId", "webPropertyId") +/// .doit(); +/// # } +/// ``` +pub struct ManagementWebpropertyPatchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Analytics, + _request: Webproperty, + _account_id: String, + _web_property_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ManagementWebpropertyPatchCall<'a, C, A> {} + +impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Webproperty)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "analytics.management.webproperties.patch", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("accountId", self._account_id.to_string())); + params.push(("webPropertyId", self._web_property_id.to_string())); + for &field in ["alt", "accountId", "webPropertyId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{accountId}", "accountId"), ("{webPropertyId}", "webPropertyId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["webPropertyId", "accountId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Webproperty) -> ManagementWebpropertyPatchCall<'a, C, A> { + self._request = new_value; + self + } + /// Account ID to which the web property belongs + /// + /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> ManagementWebpropertyPatchCall<'a, C, A> { + self._account_id = new_value.to_string(); + self + } + /// Web property ID + /// + /// Sets the *web property id* 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 web_property_id(mut self, new_value: &str) -> ManagementWebpropertyPatchCall<'a, C, A> { + self._web_property_id = 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. + /// + /// 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 Delegate) -> ManagementWebpropertyPatchCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ManagementWebpropertyPatchCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Edit`. + /// + /// 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: T) -> ManagementWebpropertyPatchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// List uploads to which the user has access. /// /// A builder for the *uploads.list* method supported by a *management* resource. @@ -18241,8 +18540,8 @@ impl<'a, C, A> ManagementCustomDimensionListCall<'a, C, A> where C: BorrowMut ManagementUploadListCall<'a, C, A> where C: BorrowMut ManagementGoalUpdateCall<'a, C, A> where C: BorrowMut ManagementCustomDataSourceListCall<'a, C, A> where C: BorrowMut ManagementCustomMetricListCall<'a, C, A> where C: BorrowMut ManagementRemarketingAudienceGetCall<'a, C, A> where C: BorrowMut } -/// Updates an existing web property. This method supports patch semantics. +/// Delete a remarketing audience. /// -/// A builder for the *webproperties.patch* method supported by a *management* resource. +/// A builder for the *remarketingAudience.delete* method supported by a *management* resource. /// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example @@ -22318,7 +22617,6 @@ impl<'a, C, A> ManagementRemarketingAudienceGetCall<'a, C, A> where C: BorrowMut /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_analytics3 as analytics3; -/// use analytics3::Webproperty; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -22329,37 +22627,32 @@ impl<'a, C, A> ManagementRemarketingAudienceGetCall<'a, C, A> where C: BorrowMut /// # hyper::Client::new(), /// # ::default(), None); /// # let mut hub = Analytics::new(hyper::Client::new(), 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 = Webproperty::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.management().webproperties_patch(req, "accountId", "webPropertyId") +/// let result = hub.management().remarketing_audience_delete("accountId", "webPropertyId", "remarketingAudienceId") /// .doit(); /// # } /// ``` -pub struct ManagementWebpropertyPatchCall<'a, C, A> +pub struct ManagementRemarketingAudienceDeleteCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Analytics, - _request: Webproperty, _account_id: String, _web_property_id: String, + _remarketing_audience_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ManagementWebpropertyPatchCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ManagementRemarketingAudienceDeleteCall<'a, C, A> {} -impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ManagementRemarketingAudienceDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Webproperty)> { + pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -22367,12 +22660,13 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "analytics.management.webproperties.patch", - http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "analytics.management.remarketingAudience.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("accountId", self._account_id.to_string())); params.push(("webPropertyId", self._web_property_id.to_string())); - for &field in ["alt", "accountId", "webPropertyId"].iter() { + params.push(("remarketingAudienceId", self._remarketing_audience_id.to_string())); + for &field in ["accountId", "webPropertyId", "remarketingAudienceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -22382,14 +22676,13 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -22400,8 +22693,8 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(2); - for param_name in ["webPropertyId", "accountId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["remarketingAudienceId", "webPropertyId", "accountId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -22416,17 +22709,6 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut Err(Error::BadRequest(serr)) } } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; + let result_value = res; dlg.finished(true); return Ok(result_value) @@ -22502,42 +22770,43 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut ManagementWebpropertyPatchCall<'a, C, A> { - self._request = new_value; - self - } - /// Account ID to which the web property belongs + /// Account ID to which the remarketing audience belongs. /// /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> ManagementWebpropertyPatchCall<'a, C, A> { + pub fn account_id(mut self, new_value: &str) -> ManagementRemarketingAudienceDeleteCall<'a, C, A> { self._account_id = new_value.to_string(); self } - /// Web property ID + /// Web property ID to which the remarketing audience belongs. /// /// Sets the *web property id* 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 web_property_id(mut self, new_value: &str) -> ManagementWebpropertyPatchCall<'a, C, A> { + pub fn web_property_id(mut self, new_value: &str) -> ManagementRemarketingAudienceDeleteCall<'a, C, A> { self._web_property_id = new_value.to_string(); self } + /// The ID of the remarketing audience to delete. + /// + /// Sets the *remarketing audience id* 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 remarketing_audience_id(mut self, new_value: &str) -> ManagementRemarketingAudienceDeleteCall<'a, C, A> { + self._remarketing_audience_id = 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. /// /// 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 Delegate) -> ManagementWebpropertyPatchCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ManagementRemarketingAudienceDeleteCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -22558,7 +22827,7 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ManagementWebpropertyPatchCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ManagementRemarketingAudienceDeleteCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -22575,7 +22844,7 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementWebpropertyPatchCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ManagementRemarketingAudienceDeleteCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -23994,8 +24263,8 @@ impl<'a, C, A> ManagementExperimentUpdateCall<'a, C, A> where C: BorrowMut ManagementFilterPatchCall<'a, C, A> where C: BorrowMut ManagementProfileInsertCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkListCall<'a, C, A> where C: BorrowMut ManagementRemarketingAudienceListCall<'a, C, A> where C: BorrowMu /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.data().mcf_get("ids", "start-date", "end-date", "metrics") -/// .start_index(-68) +/// .start_index(-47) /// .sort("aliquyam") -/// .sampling_level("nonumy") -/// .max_results(-47) -/// .filters("aliquyam") -/// .dimensions("sadipscing") +/// .sampling_level("sadipscing") +/// .max_results(-32) +/// .filters("gubergren") +/// .dimensions("sit") /// .doit(); /// # } /// ``` @@ -27621,15 +27890,15 @@ impl<'a, C, A> DataMcfGetCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.data().ga_get("ids", "start-date", "end-date", "metrics") -/// .start_index(-2) -/// .sort("amet") -/// .segment("eirmod") -/// .sampling_level("sanctus") -/// .output("Lorem") -/// .max_results(-1) +/// .start_index(-58) +/// .sort("Lorem") +/// .segment("amet.") +/// .sampling_level("diam") +/// .output("eirmod") +/// .max_results(-45) /// .include_empty_rows(true) -/// .filters("eirmod") -/// .dimensions("sadipscing") +/// .filters("sed") +/// .dimensions("sit") /// .doit(); /// # } /// ``` @@ -27979,10 +28248,10 @@ impl<'a, C, A> DataGaGetCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.data().realtime_get("ids", "metrics") -/// .sort("sit") -/// .max_results(-33) -/// .filters("et") -/// .dimensions("At") +/// .sort("At") +/// .max_results(-98) +/// .filters("ut") +/// .dimensions("diam") /// .doit(); /// # } /// ``` diff --git a/gen/androidenterprise1-cli/Cargo.toml b/gen/androidenterprise1-cli/Cargo.toml index 29ac73aab0..5bd325917e 100644 --- a/gen/androidenterprise1-cli/Cargo.toml +++ b/gen/androidenterprise1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-androidenterprise1-cli" -version = "1.0.4+20161207" +version = "1.0.4+20170516" authors = ["Sebastian Thiel "] description = "A complete library to interact with Android Enterprise (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidenterprise1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-androidenterprise1] path = "../androidenterprise1" -version = "1.0.4+20161207" +version = "1.0.4+20170516" diff --git a/gen/androidenterprise1-cli/README.md b/gen/androidenterprise1-cli/README.md index 116b9d4250..5733fdba2d 100644 --- a/gen/androidenterprise1-cli/README.md +++ b/gen/androidenterprise1-cli/README.md @@ -25,23 +25,10 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Android Enterprise* API at revision *20161207*. The CLI is at version *1.0.4*. +This documentation was generated from the *Android Enterprise* API at revision *20170516*. The CLI is at version *1.0.4*. ```bash androidenterprise1 [options] - collections - delete [-p ]... - get [-p ]... [-o ] - insert (-r )... [-p ]... [-o ] - list [-p ]... [-o ] - patch (-r )... [-p ]... [-o ] - update (-r )... [-p ]... [-o ] - collectionviewers - delete [-p ]... - get [-p ]... [-o ] - list [-p ]... [-o ] - patch (-r )... [-p ]... [-o ] - update (-r )... [-p ]... [-o ] devices get [-p ]... [-o ] get-state [-p ]... [-o ] @@ -103,7 +90,6 @@ androidenterprise1 [options] get-permissions [-p ]... [-o ] list [-p ]... [-o ] unapprove [-p ]... - update-permissions (-r )... [-p ]... [-o ] serviceaccountkeys delete [-p ]... insert (-r )... [-p ]... [-o ] diff --git a/gen/androidenterprise1-cli/mkdocs.yml b/gen/androidenterprise1-cli/mkdocs.yml index cd55ef72e9..fb709d698f 100644 --- a/gen/androidenterprise1-cli/mkdocs.yml +++ b/gen/androidenterprise1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Android Enterprise v1.0.4+20161207 +site_name: Android Enterprise v1.0.4+20170516 site_url: http://byron.github.io/google-apis-rs/google-androidenterprise1-cli site_description: A complete library to interact with Android Enterprise (protocol v1) @@ -9,17 +9,6 @@ site_dir: build_html pages: - ['index.md', 'Home'] -- ['collections_delete.md', 'Collections', 'Delete'] -- ['collections_get.md', 'Collections', 'Get'] -- ['collections_insert.md', 'Collections', 'Insert'] -- ['collections_list.md', 'Collections', 'List'] -- ['collections_patch.md', 'Collections', 'Patch'] -- ['collections_update.md', 'Collections', 'Update'] -- ['collectionviewers_delete.md', 'Collectionviewers', 'Delete'] -- ['collectionviewers_get.md', 'Collectionviewers', 'Get'] -- ['collectionviewers_list.md', 'Collectionviewers', 'List'] -- ['collectionviewers_patch.md', 'Collectionviewers', 'Patch'] -- ['collectionviewers_update.md', 'Collectionviewers', 'Update'] - ['devices_get.md', 'Devices', 'Get'] - ['devices_get-state.md', 'Devices', 'Get State'] - ['devices_list.md', 'Devices', 'List'] @@ -71,7 +60,6 @@ pages: - ['products_get-permissions.md', 'Products', 'Get Permissions'] - ['products_list.md', 'Products', 'List'] - ['products_unapprove.md', 'Products', 'Unapprove'] -- ['products_update-permissions.md', 'Products', 'Update Permissions'] - ['serviceaccountkeys_delete.md', 'Serviceaccountkeys', 'Delete'] - ['serviceaccountkeys_insert.md', 'Serviceaccountkeys', 'Insert'] - ['serviceaccountkeys_list.md', 'Serviceaccountkeys', 'List'] diff --git a/gen/androidenterprise1-cli/src/main.rs b/gen/androidenterprise1-cli/src/main.rs index 82d493cf33..3e78e569d4 100644 --- a/gen/androidenterprise1-cli/src/main.rs +++ b/gen/androidenterprise1-cli/src/main.rs @@ -46,751 +46,6 @@ struct Engine<'n> { impl<'n> Engine<'n> { - fn _collections_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.collections().delete(opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("collection-id").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); - } - match match protocol { - CallType::Standard => call.doit(), - _ => unreachable!() - } { - Err(api_err) => Err(DoitError::ApiError(api_err)), - Ok(mut response) => { - Ok(()) - } - } - } - } - - fn _collections_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.collections().get(opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("collection-id").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(), - _ => 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(()) - } - } - } - } - - fn _collections_insert(&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()[..] { - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "visibility" => Some(("visibility", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "collection-id" => Some(("collectionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["collection-id", "kind", "name", "product-id", "visibility"]); - 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::Collection = json::value::from_value(object).unwrap(); - let mut call = self.hub.collections().insert(request, opt.value_of("enterprise-id").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(), - _ => 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(()) - } - } - } - } - - fn _collections_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.collections().list(opt.value_of("enterprise-id").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(), - _ => 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(()) - } - } - } - } - - fn _collections_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()[..] { - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "visibility" => Some(("visibility", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "collection-id" => Some(("collectionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["collection-id", "kind", "name", "product-id", "visibility"]); - 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::Collection = json::value::from_value(object).unwrap(); - let mut call = self.hub.collections().patch(request, opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("collection-id").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(), - _ => 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(()) - } - } - } - } - - fn _collections_update(&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()[..] { - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "visibility" => Some(("visibility", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "collection-id" => Some(("collectionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["collection-id", "kind", "name", "product-id", "visibility"]); - 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::Collection = json::value::from_value(object).unwrap(); - let mut call = self.hub.collections().update(request, opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("collection-id").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(), - _ => 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(()) - } - } - } - } - - fn _collectionviewers_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.collectionviewers().delete(opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("collection-id").unwrap_or(""), opt.value_of("user-id").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); - } - match match protocol { - CallType::Standard => call.doit(), - _ => unreachable!() - } { - Err(api_err) => Err(DoitError::ApiError(api_err)), - Ok(mut response) => { - Ok(()) - } - } - } - } - - fn _collectionviewers_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.collectionviewers().get(opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("collection-id").unwrap_or(""), opt.value_of("user-id").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(), - _ => 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(()) - } - } - } - } - - fn _collectionviewers_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.collectionviewers().list(opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("collection-id").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(), - _ => 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(()) - } - } - } - } - - fn _collectionviewers_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()[..] { - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "account-identifier" => Some(("accountIdentifier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "management-type" => Some(("managementType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "primary-email" => Some(("primaryEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "account-type" => Some(("accountType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-identifier", "account-type", "display-name", "id", "kind", "management-type", "primary-email"]); - 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::User = json::value::from_value(object).unwrap(); - let mut call = self.hub.collectionviewers().patch(request, opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("collection-id").unwrap_or(""), opt.value_of("user-id").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(), - _ => 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(()) - } - } - } - } - - fn _collectionviewers_update(&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()[..] { - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "account-identifier" => Some(("accountIdentifier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "management-type" => Some(("managementType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "primary-email" => Some(("primaryEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "account-type" => Some(("accountType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-identifier", "account-type", "display-name", "id", "kind", "management-type", "primary-email"]); - 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::User = json::value::from_value(object).unwrap(); - let mut call = self.hub.collectionviewers().update(request, opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("collection-id").unwrap_or(""), opt.value_of("user-id").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(), - _ => 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(()) - } - } - } - } - fn _devices_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.devices().get(opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("user-id").unwrap_or(""), opt.value_of("device-id").unwrap_or("")); @@ -3569,10 +2824,11 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "approved-permissions" => Some(("approvedPermissions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "approval-url-info.kind" => Some(("approvalUrlInfo.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "approval-url-info.approval-url" => Some(("approvalUrlInfo.approvalUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["approval-url", "approval-url-info", "kind"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["approval-url", "approval-url-info", "approved-permissions", "kind"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -3956,92 +3212,6 @@ impl<'n> Engine<'n> { } } - fn _products_update_permissions(&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()[..] { - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["kind", "product-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::ProductPermissions = json::value::from_value(object).unwrap(); - let mut call = self.hub.products().update_permissions(request, opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("product-id").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(), - _ => 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(()) - } - } - } - } - fn _serviceaccountkeys_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.serviceaccountkeys().delete(opt.value_of("enterprise-id").unwrap_or(""), opt.value_of("key-id").unwrap_or("")); @@ -5761,55 +4931,6 @@ impl<'n> Engine<'n> { let mut call_result: Result<(), DoitError> = Ok(()); let mut err_opt: Option = None; match self.opt.subcommand() { - ("collections", Some(opt)) => { - match opt.subcommand() { - ("delete", Some(opt)) => { - call_result = self._collections_delete(opt, dry_run, &mut err); - }, - ("get", Some(opt)) => { - call_result = self._collections_get(opt, dry_run, &mut err); - }, - ("insert", Some(opt)) => { - call_result = self._collections_insert(opt, dry_run, &mut err); - }, - ("list", Some(opt)) => { - call_result = self._collections_list(opt, dry_run, &mut err); - }, - ("patch", Some(opt)) => { - call_result = self._collections_patch(opt, dry_run, &mut err); - }, - ("update", Some(opt)) => { - call_result = self._collections_update(opt, dry_run, &mut err); - }, - _ => { - err.issues.push(CLIError::MissingMethodError("collections".to_string())); - writeln!(io::stderr(), "{}\n", opt.usage()).ok(); - } - } - }, - ("collectionviewers", Some(opt)) => { - match opt.subcommand() { - ("delete", Some(opt)) => { - call_result = self._collectionviewers_delete(opt, dry_run, &mut err); - }, - ("get", Some(opt)) => { - call_result = self._collectionviewers_get(opt, dry_run, &mut err); - }, - ("list", Some(opt)) => { - call_result = self._collectionviewers_list(opt, dry_run, &mut err); - }, - ("patch", Some(opt)) => { - call_result = self._collectionviewers_patch(opt, dry_run, &mut err); - }, - ("update", Some(opt)) => { - call_result = self._collectionviewers_update(opt, dry_run, &mut err); - }, - _ => { - err.issues.push(CLIError::MissingMethodError("collectionviewers".to_string())); - writeln!(io::stderr(), "{}\n", opt.usage()).ok(); - } - } - }, ("devices", Some(opt)) => { match opt.subcommand() { ("get", Some(opt)) => { @@ -6037,9 +5158,6 @@ impl<'n> Engine<'n> { ("unapprove", Some(opt)) => { call_result = self._products_unapprove(opt, dry_run, &mut err); }, - ("update-permissions", Some(opt)) => { - call_result = self._products_update_permissions(opt, dry_run, &mut err); - }, _ => { err.issues.push(CLIError::MissingMethodError("products".to_string())); writeln!(io::stderr(), "{}\n", opt.usage()).ok(); @@ -6238,350 +5356,6 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ - ("collections", "methods: 'delete', 'get', 'insert', 'list', 'patch' and 'update'", vec![ - ("delete", - Some(r##"Deletes a collection."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collections_delete", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"collection-id"##), - None, - Some(r##"The ID of the collection."##), - 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)), - ]), - ("get", - Some(r##"Retrieves the details of a collection."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collections_get", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"collection-id"##), - None, - Some(r##"The ID of the collection."##), - 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)), - ]), - ("insert", - Some(r##"Creates a new collection."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collections_insert", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - 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)), - ]), - ("list", - Some(r##"Retrieves the IDs of all the collections for an enterprise."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collections_list", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - 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)), - ]), - ("patch", - Some(r##"Updates a collection. This method supports patch semantics."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collections_patch", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"collection-id"##), - None, - Some(r##"The ID of the collection."##), - 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)), - ]), - ("update", - Some(r##"Updates a collection."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collections_update", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"collection-id"##), - None, - Some(r##"The ID of the collection."##), - 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)), - ]), - ]), - - ("collectionviewers", "methods: 'delete', 'get', 'list', 'patch' and 'update'", vec![ - ("delete", - Some(r##"Removes the user from the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collectionviewers_delete", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"collection-id"##), - None, - Some(r##"The ID of the collection."##), - Some(true), - Some(false)), - - (Some(r##"user-id"##), - None, - Some(r##"The ID of the user."##), - 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)), - ]), - ("get", - Some(r##"Retrieves the ID of the user if they have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collectionviewers_get", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"collection-id"##), - None, - Some(r##"The ID of the collection."##), - Some(true), - Some(false)), - - (Some(r##"user-id"##), - None, - Some(r##"The ID of the user."##), - 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)), - ]), - ("list", - Some(r##"Retrieves the IDs of the users who have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collectionviewers_list", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"collection-id"##), - None, - Some(r##"The ID of the collection."##), - 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)), - ]), - ("patch", - Some(r##"Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. This method supports patch semantics."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collectionviewers_patch", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"collection-id"##), - None, - Some(r##"The ID of the collection."##), - Some(true), - Some(false)), - - (Some(r##"user-id"##), - None, - Some(r##"The ID of the user."##), - 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)), - ]), - ("update", - Some(r##"Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/collectionviewers_update", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"collection-id"##), - None, - Some(r##"The ID of the collection."##), - Some(true), - Some(false)), - - (Some(r##"user-id"##), - None, - Some(r##"The ID of the user."##), - 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)), - ]), - ]), - ("devices", "methods: 'get', 'get-state', 'list' and 'set-state'", vec![ ("get", Some(r##"Retrieves the details of a device."##), @@ -6749,7 +5523,7 @@ fn main() { Some(false)), ]), ("create-web-token", - Some(r##"Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the Play for Work javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information."##), + Some(r##"Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the managed Google Play javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/enterprises_create-web-token", vec![ (Some(r##"enterprise-id"##), @@ -6777,7 +5551,7 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes the binding between the EMM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call."##), + Some(r##"Deletes the binding between the EMM and enterprise. This is now deprecated. Use this method only to unenroll customers that were previously enrolled with the insert call, then enroll them again with the enroll call."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/enterprises_delete", vec![ (Some(r##"enterprise-id"##), @@ -6887,7 +5661,7 @@ fn main() { Some(false)), ]), ("get-store-layout", - Some(r##"Returns the store layout for the enterprise. If the store layout has not been set, or if the store layout has no homepageId set, returns a NOT_FOUND error."##), + Some(r##"Returns the store layout for the enterprise. If the store layout has not been set, returns "basic" as the store layout type and no homepage."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/enterprises_get-store-layout", vec![ (Some(r##"enterprise-id"##), @@ -6960,7 +5734,7 @@ fn main() { ]), ("pull-notification-set", Some(r##"Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending. - A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises​.AcknowledgeNotificationSet, unless the notification set is empty. + A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set is empty. Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy. Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending. If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available."##), @@ -7001,7 +5775,7 @@ fn main() { Some(false)), ]), ("set-account", - Some(r##"Set the account that will be used to authenticate to the API as the enterprise."##), + Some(r##"Sets the account that will be used to authenticate to the API as the enterprise."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/enterprises_set-account", vec![ (Some(r##"enterprise-id"##), @@ -7029,7 +5803,7 @@ fn main() { Some(false)), ]), ("set-store-layout", - Some(r##"Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only contains apps approved by the administrator, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom"), the basic store layout is disabled."##), + Some(r##"Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only contains apps approved by the admin, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom" and setting a homepage), the basic store layout is disabled."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/enterprises_set-store-layout", vec![ (Some(r##"enterprise-id"##), @@ -7076,7 +5850,7 @@ fn main() { ("entitlements", "methods: 'delete', 'get', 'list', 'patch' and 'update'", vec![ ("delete", - Some(r##"Removes an entitlement to an app for a user and uninstalls it."##), + Some(r##"Removes an entitlement to an app for a user."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/entitlements_delete", vec![ (Some(r##"enterprise-id"##), @@ -7138,7 +5912,7 @@ fn main() { Some(false)), ]), ("list", - Some(r##"List of all entitlements for the specified user. Only the ID is set."##), + Some(r##"Lists all entitlements for the specified user. Only the ID is set."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/entitlements_list", vec![ (Some(r##"enterprise-id"##), @@ -7441,7 +6215,7 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics."##), + Some(r##"Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. This method supports patch semantics."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/installs_patch", vec![ (Some(r##"enterprise-id"##), @@ -7487,7 +6261,7 @@ fn main() { Some(false)), ]), ("update", - Some(r##"Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary."##), + Some(r##"Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/installs_update", vec![ (Some(r##"enterprise-id"##), @@ -7935,11 +6709,11 @@ fn main() { ]), ]), - ("products", "methods: 'approve', 'generate-approval-url', 'get', 'get-app-restrictions-schema', 'get-permissions', 'list', 'unapprove' and 'update-permissions'", vec![ + ("products", "methods: 'approve', 'generate-approval-url', 'get', 'get-app-restrictions-schema', 'get-permissions', 'list' and 'unapprove'", vec![ ("approve", Some(r##"Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000. - To learn how to use Google Play for Work to design and create a store layout to display approved products to your users, see Store Layout Design."##), + To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/products_approve", vec![ (Some(r##"enterprise-id"##), @@ -8025,7 +6799,7 @@ fn main() { Some(false)), ]), ("get-app-restrictions-schema", - Some(r##"Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an administrator to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play."##), + Some(r##"Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/products_get-app-restrictions-schema", vec![ (Some(r##"enterprise-id"##), @@ -8124,42 +6898,6 @@ fn main() { Some(false), Some(true)), ]), - ("update-permissions", - Some(r##"This method has been deprecated. To programmatically approve applications, you must use the iframe mechanism via the generateApprovalUrl and approve methods of the Products resource. For more information, see the Play EMM API usage requirements. - - The updatePermissions method (deprecated) updates the set of Android app permissions for this app that have been accepted by the enterprise."##), - "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/products_update-permissions", - vec![ - (Some(r##"enterprise-id"##), - None, - Some(r##"The ID of the enterprise."##), - Some(true), - Some(false)), - - (Some(r##"product-id"##), - None, - Some(r##"The ID of the product."##), - 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)), - ]), ]), ("serviceaccountkeys", "methods: 'delete', 'insert' and 'list'", vec![ @@ -8671,7 +7409,7 @@ fn main() { Some(false)), ]), ("generate-token", - Some(r##"Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token. + Some(r##"Generates a token (activation code) to allow this user to configure their managed account in the Android Setup Wizard. Revokes any previously generated token. This call only works with Google managed accounts."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/users_generate-token", @@ -8874,7 +7612,7 @@ fn main() { Some(true)), ]), ("set-available-product-set", - Some(r##"Modifies the set of products a user is entitled to access."##), + Some(r##"Modifies the set of products that a user is entitled to access (referred to as whitelisted products). Only products that are approved or products that were previously approved (products with revoked approval) can be whitelisted."##), "Details at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli/users_set-available-product-set", vec![ (Some(r##"enterprise-id"##), @@ -8949,7 +7687,7 @@ fn main() { let mut app = App::new("androidenterprise1") .author("Sebastian Thiel ") - .version("1.0.4+20161207") + .version("1.0.4+20170516") .about("Manages the deployment of apps to Android for Work users.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli") .arg(Arg::with_name("url") diff --git a/gen/androidenterprise1/Cargo.toml b/gen/androidenterprise1/Cargo.toml index a0628bb385..2501ce0901 100644 --- a/gen/androidenterprise1/Cargo.toml +++ b/gen/androidenterprise1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-androidenterprise1" -version = "1.0.4+20161207" +version = "1.0.4+20170516" authors = ["Sebastian Thiel "] description = "A complete library to interact with Android Enterprise (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidenterprise1" homepage = "https://developers.google.com/android/work/play/emm-api" -documentation = "https://docs.rs/google-androidenterprise1/1.0.4+20161207" +documentation = "https://docs.rs/google-androidenterprise1/1.0.4+20170516" license = "MIT" keywords = ["androidenterprise", "google", "protocol", "web", "api"] diff --git a/gen/androidenterprise1/README.md b/gen/androidenterprise1/README.md index 881002a9d6..5249e26bc5 100644 --- a/gen/androidenterprise1/README.md +++ b/gen/androidenterprise1/README.md @@ -5,46 +5,42 @@ DO NOT EDIT ! --> The `google-androidenterprise1` library allows access to all features of the *Google Android Enterprise* service. -This documentation was generated from *Android Enterprise* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Android Enterprise* crate version *1.0.4+20170516*, where *20170516* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Android Enterprise* *v1* API can be found at the [official documentation site](https://developers.google.com/android/work/play/emm-api). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.AndroidEnterprise.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.AndroidEnterprise.html) ... -* [collections](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.Collection.html) - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionGetCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionInsertCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionUpdateCall.html) -* collectionviewers - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionviewerDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionviewerGetCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionviewerListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionviewerPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.CollectionviewerUpdateCall.html) -* [devices](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.Device.html) - * [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.DeviceGetCall.html), [*get state*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.DeviceGetStateCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.DeviceListCall.html) and [*set state*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.DeviceSetStateCall.html) -* [enterprises](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.Enterprise.html) - * [*acknowledge notification set*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseAcknowledgeNotificationSetCall.html), [*complete signup*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseCompleteSignupCall.html), [*create web token*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseCreateWebTokenCall.html), [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseDeleteCall.html), [*enroll*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseEnrollCall.html), [*generate signup url*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseGenerateSignupUrlCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseGetCall.html), [*get service account*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseGetServiceAccountCall.html), [*get store layout*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseGetStoreLayoutCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseInsertCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseListCall.html), [*pull notification set*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterprisePullNotificationSetCall.html), [*send test push notification*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseSendTestPushNotificationCall.html), [*set account*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseSetAccountCall.html), [*set store layout*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseSetStoreLayoutCall.html) and [*unenroll*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EnterpriseUnenrollCall.html) -* [entitlements](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.Entitlement.html) - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EntitlementDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EntitlementGetCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EntitlementListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EntitlementPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.EntitlementUpdateCall.html) +* [devices](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.Device.html) + * [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.DeviceGetCall.html), [*get state*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.DeviceGetStateCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.DeviceListCall.html) and [*set state*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.DeviceSetStateCall.html) +* [enterprises](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.Enterprise.html) + * [*acknowledge notification set*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseAcknowledgeNotificationSetCall.html), [*complete signup*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseCompleteSignupCall.html), [*create web token*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseCreateWebTokenCall.html), [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseDeleteCall.html), [*enroll*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseEnrollCall.html), [*generate signup url*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseGenerateSignupUrlCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseGetCall.html), [*get service account*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseGetServiceAccountCall.html), [*get store layout*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseGetStoreLayoutCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseInsertCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseListCall.html), [*pull notification set*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterprisePullNotificationSetCall.html), [*send test push notification*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseSendTestPushNotificationCall.html), [*set account*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseSetAccountCall.html), [*set store layout*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseSetStoreLayoutCall.html) and [*unenroll*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EnterpriseUnenrollCall.html) +* [entitlements](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.Entitlement.html) + * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EntitlementDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EntitlementGetCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EntitlementListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EntitlementPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.EntitlementUpdateCall.html) * grouplicenses - * [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.GrouplicenseGetCall.html) and [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.GrouplicenseListCall.html) + * [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.GrouplicenseGetCall.html) and [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.GrouplicenseListCall.html) * grouplicenseusers - * [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.GrouplicenseuserListCall.html) -* [installs](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.Install.html) - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.InstallDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.InstallGetCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.InstallListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.InstallPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.InstallUpdateCall.html) + * [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.GrouplicenseuserListCall.html) +* [installs](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.Install.html) + * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.InstallDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.InstallGetCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.InstallListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.InstallPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.InstallUpdateCall.html) * managedconfigurationsfordevice - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsfordeviceDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsfordeviceGetCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsfordeviceListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsfordevicePatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsfordeviceUpdateCall.html) + * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsfordeviceDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsfordeviceGetCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsfordeviceListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsfordevicePatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsfordeviceUpdateCall.html) * managedconfigurationsforuser - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsforuserDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsforuserGetCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsforuserListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsforuserPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ManagedconfigurationsforuserUpdateCall.html) -* [permissions](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.Permission.html) - * [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.PermissionGetCall.html) -* [products](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.Product.html) - * [*approve*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ProductApproveCall.html), [*generate approval url*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ProductGenerateApprovalUrlCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ProductGetCall.html), [*get app restrictions schema*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ProductGetAppRestrictionsSchemaCall.html), [*get permissions*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ProductGetPermissionCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ProductListCall.html), [*unapprove*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ProductUnapproveCall.html) and [*update permissions*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ProductUpdatePermissionCall.html) + * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsforuserDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsforuserGetCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsforuserListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsforuserPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ManagedconfigurationsforuserUpdateCall.html) +* [permissions](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.Permission.html) + * [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.PermissionGetCall.html) +* [products](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.Product.html) + * [*approve*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ProductApproveCall.html), [*generate approval url*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ProductGenerateApprovalUrlCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ProductGetCall.html), [*get app restrictions schema*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ProductGetAppRestrictionsSchemaCall.html), [*get permissions*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ProductGetPermissionCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ProductListCall.html) and [*unapprove*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ProductUnapproveCall.html) * serviceaccountkeys - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ServiceaccountkeyDeleteCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ServiceaccountkeyInsertCall.html) and [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.ServiceaccountkeyListCall.html) + * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ServiceaccountkeyDeleteCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ServiceaccountkeyInsertCall.html) and [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.ServiceaccountkeyListCall.html) * storelayoutclusters - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutclusterDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutclusterGetCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutclusterInsertCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutclusterListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutclusterPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutclusterUpdateCall.html) + * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutclusterDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutclusterGetCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutclusterInsertCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutclusterListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutclusterPatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutclusterUpdateCall.html) * storelayoutpages - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutpageDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutpageGetCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutpageInsertCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutpageListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutpagePatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.StorelayoutpageUpdateCall.html) -* [users](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.User.html) - * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserDeleteCall.html), [*generate authentication token*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserGenerateAuthenticationTokenCall.html), [*generate token*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserGenerateTokenCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserGetCall.html), [*get available product set*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserGetAvailableProductSetCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserInsertCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserPatchCall.html), [*revoke token*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserRevokeTokenCall.html), [*set available product set*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserSetAvailableProductSetCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.UserUpdateCall.html) + * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutpageDeleteCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutpageGetCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutpageInsertCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutpageListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutpagePatchCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.StorelayoutpageUpdateCall.html) +* [users](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.User.html) + * [*delete*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserDeleteCall.html), [*generate authentication token*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserGenerateAuthenticationTokenCall.html), [*generate token*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserGenerateTokenCall.html), [*get*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserGetCall.html), [*get available product set*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserGetAvailableProductSetCall.html), [*insert*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserInsertCall.html), [*list*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserListCall.html), [*patch*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserPatchCall.html), [*revoke token*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserRevokeTokenCall.html), [*set available product set*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserSetAvailableProductSetCall.html) and [*update*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.UserUpdateCall.html) @@ -53,17 +49,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/struct.AndroidEnterprise.html)** +* **[Hub](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/struct.AndroidEnterprise.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.Part.html)** + * **[Parts](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -161,17 +157,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.Delegate.html), 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-androidenterprise1/1.0.4+20161207/google_androidenterprise1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.ResponseResult.html), 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")`. @@ -181,29 +177,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.CallBuilder.html) 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-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.CallBuilder.html), 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-androidenterprise1/1.0.4+20161207/google_androidenterprise1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-androidenterprise1/1.0.4+20170516/google_androidenterprise1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/androidenterprise1/src/lib.rs b/gen/androidenterprise1/src/lib.rs index 34356574a7..a12135c9e2 100644 --- a/gen/androidenterprise1/src/lib.rs +++ b/gen/androidenterprise1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Android Enterprise* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Android Enterprise* crate version *1.0.4+20170516*, where *20170516* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Android Enterprise* *v1* API can be found at the //! [official documentation site](https://developers.google.com/android/work/play/emm-api). @@ -11,10 +11,6 @@ //! //! Handle the following *Resources* with ease from the central [hub](struct.AndroidEnterprise.html) ... //! -//! * [collections](struct.Collection.html) -//! * [*delete*](struct.CollectionDeleteCall.html), [*get*](struct.CollectionGetCall.html), [*insert*](struct.CollectionInsertCall.html), [*list*](struct.CollectionListCall.html), [*patch*](struct.CollectionPatchCall.html) and [*update*](struct.CollectionUpdateCall.html) -//! * collectionviewers -//! * [*delete*](struct.CollectionviewerDeleteCall.html), [*get*](struct.CollectionviewerGetCall.html), [*list*](struct.CollectionviewerListCall.html), [*patch*](struct.CollectionviewerPatchCall.html) and [*update*](struct.CollectionviewerUpdateCall.html) //! * [devices](struct.Device.html) //! * [*get*](struct.DeviceGetCall.html), [*get state*](struct.DeviceGetStateCall.html), [*list*](struct.DeviceListCall.html) and [*set state*](struct.DeviceSetStateCall.html) //! * [enterprises](struct.Enterprise.html) @@ -34,7 +30,7 @@ //! * [permissions](struct.Permission.html) //! * [*get*](struct.PermissionGetCall.html) //! * [products](struct.Product.html) -//! * [*approve*](struct.ProductApproveCall.html), [*generate approval url*](struct.ProductGenerateApprovalUrlCall.html), [*get*](struct.ProductGetCall.html), [*get app restrictions schema*](struct.ProductGetAppRestrictionsSchemaCall.html), [*get permissions*](struct.ProductGetPermissionCall.html), [*list*](struct.ProductListCall.html), [*unapprove*](struct.ProductUnapproveCall.html) and [*update permissions*](struct.ProductUpdatePermissionCall.html) +//! * [*approve*](struct.ProductApproveCall.html), [*generate approval url*](struct.ProductGenerateApprovalUrlCall.html), [*get*](struct.ProductGetCall.html), [*get app restrictions schema*](struct.ProductGetAppRestrictionsSchemaCall.html), [*get permissions*](struct.ProductGetPermissionCall.html), [*list*](struct.ProductListCall.html) and [*unapprove*](struct.ProductUnapproveCall.html) //! * serviceaccountkeys //! * [*delete*](struct.ServiceaccountkeyDeleteCall.html), [*insert*](struct.ServiceaccountkeyInsertCall.html) and [*list*](struct.ServiceaccountkeyListCall.html) //! * storelayoutclusters @@ -357,12 +353,6 @@ impl<'a, C, A> AndroidEnterprise } } - pub fn collections(&'a self) -> CollectionMethods<'a, C, A> { - CollectionMethods { hub: &self } - } - pub fn collectionviewers(&'a self) -> CollectionviewerMethods<'a, C, A> { - CollectionviewerMethods { hub: &self } - } pub fn devices(&'a self) -> DeviceMethods<'a, C, A> { DeviceMethods { hub: &self } } @@ -481,15 +471,15 @@ pub struct EnterprisesListResponse { impl ResponseResult for EnterprisesListResponse {} -/// The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise. +/// The presence of an Entitlements resource indicates that a user has the right to use a particular app. Entitlements are user specific, not device specific. This allows a user with an entitlement to an app to install the app on all their devices. It's also possible for a user to hold an entitlement to an app without installing the app on any device. /// -/// It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the EMM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails. +/// The API can be used to create an entitlement. As an option, you can also use the API to trigger the installation of an app on all a user's managed devices at the same time the entitlement is created. /// -/// Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices. +/// If the app is free, creating the entitlement also creates a group license for that app. For paid apps, creating the entitlement consumes one license, and that license remains consumed until the entitlement is removed. If the enterprise hasn't purchased enough licenses, then no entitlement is created and the installation fails. An entitlement is also not created for an app if the app requires permissions that the enterprise hasn't accepted. /// -/// The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted. +/// If an entitlement is deleted, the app may be uninstalled from a user's device. As a best practice, uninstall the app by calling Installs.delete() before deleting the entitlement. /// -/// Entitlements for paid apps that are due to purchases by the user on a non-managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API. +/// Entitlements for apps that a user pays for on an unmanaged profile have "userPurchase" as the entitlement reason. These entitlements cannot be removed via the API. /// /// # Activities /// @@ -506,9 +496,9 @@ impl ResponseResult for EnterprisesListResponse {} pub struct Entitlement { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement". pub kind: Option, - /// The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses. + /// The reason for the entitlement. For example, "free" for free apps. This property is temporary: it will be replaced by the acquisition kind field of group licenses. pub reason: Option, - /// The ID of the product that the entitlement is for, e.g. "app:com.google.android.gm". + /// The ID of the product that the entitlement is for. For example, "app:com.google.android.gm". #[serde(rename="productId")] pub product_id: Option, } @@ -576,7 +566,7 @@ pub struct ProductSet { /// The list of product IDs making up the set of products. #[serde(rename="productId")] pub product_id: Option>, - /// The interpretation of this product set. "unknown" should never be sent and ignored if received. "whitelist" means that this product set constitutes a whitelist. "includeAll" means that all products are accessible, including products that are approved, not approved, and even products where approval has been revoked. If the value is "includeAll", the value of the productId field is therefore ignored. If a value is not supplied, it is interpreted to be "whitelist" for backwards compatibility. + /// The interpretation of this product set. "unknown" should never be sent and is ignored if received. "whitelist" means that the user is entitled to access the product set. "includeAll" means that all products are accessible, including products that are approved, products with revoked approval, and products that have never been approved. "allApproved" means that the user is entitled to access all products that are approved for the enterprise. If the value is "allApproved" or "includeAll", the productId field is ignored. If no value is provided, it is interpreted as "whitelist" for backwards compatibility. #[serde(rename="productSetBehavior")] pub product_set_behavior: Option, } @@ -585,71 +575,31 @@ impl RequestValue for ProductSet {} impl ResponseResult for ProductSet {} -/// Information about the permissions required by a specific app and whether they have been accepted by the enterprise. +/// An event generated when a new device is ready to be managed. /// -/// # 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*). -/// -/// * [update permissions products](struct.ProductUpdatePermissionCall.html) (request|response) -/// * [get permissions products](struct.ProductGetPermissionCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ProductPermissions { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productPermissions". - pub kind: Option, - /// The permissions required by the app. - pub permission: Option>, - /// The ID of the app that the permissions relate to, e.g. "app:com.google.android.gm". - #[serde(rename="productId")] - pub product_id: Option, -} - -impl RequestValue for ProductPermissions {} -impl ResponseResult for ProductPermissions {} - - -/// A collection resource defines a named set of apps that is visible to a set of users in the Google Play Store app running on those users' managed devices. Those users can then install any of those apps if they wish (which will trigger creation of install and entitlement resources). A user cannot install an app on a managed device unless the app is listed in at least one collection that is visible to that user. -/// -/// Note that the API can be used to directly install an app regardless of whether it is in any collection - so an enterprise has a choice of either directly pushing apps to users, or allowing users to install apps if they want. Which is appropriate will depend on the enterprise's policies and the purpose of the apps concerned. -/// -/// # 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*). -/// -/// * [list collections](struct.CollectionListCall.html) (none) -/// * [patch collections](struct.CollectionPatchCall.html) (request|response) -/// * [insert collections](struct.CollectionInsertCall.html) (request|response) -/// * [get collections](struct.CollectionGetCall.html) (response) -/// * [delete collections](struct.CollectionDeleteCall.html) (none) -/// * [update collections](struct.CollectionUpdateCall.html) (request|response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Collection { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collection". - pub kind: Option, - /// Arbitrary unique ID, allocated by the API on creation. - #[serde(rename="collectionId")] - pub collection_id: Option, - /// A user-friendly name for the collection (should be unique), e.g. "Accounting apps". - pub name: Option, - /// Whether this collection is visible to all users, or only to the users that have been granted access through the "Collectionviewers" API. With the launch of the "setAvailableProductSet" API, this property should always be set to "viewersOnly", as the "allUsers" option will bypass the "availableProductSet" for all users within a domain. +pub struct NewDeviceEvent { + /// The ID of the user. This field will always be present. + #[serde(rename="userId")] + pub user_id: Option, + /// The Android ID of the device. This field will always be present. + #[serde(rename="deviceId")] + pub device_id: Option, + /// Identifies the extent to which the device is controlled by an Android EMM in various deployment configurations. /// - /// The "allUsers" setting is deprecated, and will be removed. - pub visibility: Option, - /// The IDs of the products in the collection, in the order in which they should be displayed. - #[serde(rename="productId")] - pub product_id: Option>, + /// Possible values include: + /// - "managedDevice", a device where the DPC is set as device owner, + /// - "managedProfile", a device where the DPC is set as profile owner. + #[serde(rename="managementType")] + pub management_type: Option, } -impl RequestValue for Collection {} -impl Resource for Collection {} -impl ResponseResult for Collection {} +impl Part for NewDeviceEvent {} -/// Definition of a Google Play for Work store page, made of a localized name and links to other pages. A page also contains clusters defined as a subcollection. +/// Definition of a managed Google Play store page, made of a localized name and links to other pages. A page also contains clusters defined as a subcollection. /// /// # Activities /// @@ -720,13 +670,13 @@ pub struct ProductPermission { impl Part for ProductPermission {} -/// This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store. +/// This represents an enterprise admin who can manage the enterprise in the managed Google Play store. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Administrator { - /// The administrator's email address. + /// The admin's email address. pub email: Option, } @@ -754,9 +704,9 @@ pub struct ManagedConfigurationsForDeviceListResponse { impl ResponseResult for ManagedConfigurationsForDeviceListResponse {} -/// A permission represents some extra capability, to be granted to an Android app, which requires explicit consent. An enterprise admin must consent to these permissions on behalf of their users before an entitlement for the app can be created. +/// A Permissions resource represents some extra capability, to be granted to an Android app, which requires explicit consent. An enterprise admin must consent to these permissions on behalf of their users before an entitlement for the app can be created. /// -/// The permissions collection is read-only. The information provided for each permission (localized name and description) is intended to be used in the EMM user interface when obtaining consent from the enterprise. +/// The permissions collection is read-only. The information provided for each permission (localized name and description) is intended to be used in the MDM user interface when obtaining consent from the enterprise. /// /// # Activities /// @@ -770,7 +720,7 @@ pub struct Permission { /// An opaque string uniquely identifying the permission. #[serde(rename="permissionId")] pub permission_id: Option, - /// A longer description of the permissions giving more details of what it affects. + /// A longer description of the Permissions resource, giving more details of what it affects. pub description: Option, /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#permission". pub kind: Option, @@ -837,6 +787,9 @@ pub struct Notification { /// Notifications about new app permissions. #[serde(rename="newPermissionsEvent")] pub new_permissions_event: Option, + /// Type of the notification. + #[serde(rename="notificationType")] + pub notification_type: Option, /// Notifications about product availability changes. #[serde(rename="productAvailabilityChangeEvent")] pub product_availability_change_event: Option, @@ -846,6 +799,9 @@ pub struct Notification { /// The ID of the enterprise for which the notification is sent. This will always be present. #[serde(rename="enterpriseId")] pub enterprise_id: Option, + /// Notifications about new devices. + #[serde(rename="newDeviceEvent")] + pub new_device_event: Option, /// Notifications about changes to a product's approval status. #[serde(rename="productApprovalEvent")] pub product_approval_event: Option, @@ -964,24 +920,40 @@ pub struct LocalizedText { impl Part for LocalizedText {} -/// An AuthenticationToken is used by the EMM's device policy client on a device to provision the given EMM-managed user on that device. +/// A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user. +/// +/// This collection cannot be modified via the API. It is automatically populated as devices are set up to be managed. /// /// # 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*). /// -/// * [generate authentication token users](struct.UserGenerateAuthenticationTokenCall.html) (response) +/// * [get devices](struct.DeviceGetCall.html) (response) +/// * [get state devices](struct.DeviceGetStateCall.html) (none) +/// * [list devices](struct.DeviceListCall.html) (none) +/// * [set state devices](struct.DeviceSetStateCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AuthenticationToken { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#authenticationToken". +pub struct Device { + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device". pub kind: Option, - /// The authentication token to be passed to the device policy client on the device where it can be used to provision the account for which this token was generated. - pub token: Option, + /// The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, "123456789abcdef0". + #[serde(rename="androidId")] + pub android_id: Option, + /// Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations. + /// + /// Possible values include: + /// - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner. + /// - "managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC. + /// - "containerApp", no longer used (deprecated). + /// - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC. + #[serde(rename="managementType")] + pub management_type: Option, } -impl ResponseResult for AuthenticationToken {} +impl Resource for Device {} +impl ResponseResult for Device {} /// There is no detailed description. @@ -1205,7 +1177,7 @@ impl Part for TokenPagination {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductsListResponse { - /// Information about a product (e.g. an app) in the Google Play Store, for display to an enterprise admin. + /// Information about a product (e.g. an app) in the Google Play store, for display to an enterprise admin. pub product: Option>, /// Pagination information for token pagination. #[serde(rename="tokenPagination")] @@ -1229,7 +1201,7 @@ pub struct AppVersion { /// Unique increasing identifier for the app version. #[serde(rename="versionCode")] pub version_code: Option, - /// The string used in the Play Store by the app developer to identify the version. The string is not necessarily unique or localized (for example, the string could be "1.4"). + /// The string used in the Play store by the app developer to identify the version. The string is not necessarily unique or localized (for example, the string could be "1.4"). #[serde(rename="versionString")] pub version_string: Option, } @@ -1237,40 +1209,24 @@ pub struct AppVersion { impl Part for AppVersion {} -/// A device resource represents a mobile device managed by the EMM and belonging to a specific enterprise user. -/// -/// This collection cannot be modified via the API; it is automatically populated as devices are set up to be managed. +/// An AuthenticationToken is used by the EMM's device policy client on a device to provision the given EMM-managed user on that device. /// /// # 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*). /// -/// * [get devices](struct.DeviceGetCall.html) (response) -/// * [get state devices](struct.DeviceGetStateCall.html) (none) -/// * [list devices](struct.DeviceListCall.html) (none) -/// * [set state devices](struct.DeviceSetStateCall.html) (none) +/// * [generate authentication token users](struct.UserGenerateAuthenticationTokenCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Device { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device". +pub struct AuthenticationToken { + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#authenticationToken". pub kind: Option, - /// The Google Play Services Android ID for the device encoded as a lowercase hex string, e.g. "123456789abcdef0". - #[serde(rename="androidId")] - pub android_id: Option, - /// Identifies the extent to which the device is controlled by an Android for Work EMM in various deployment configurations. - /// - /// Possible values include: - /// - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner, - /// - "managedProfile", a device that has a work profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC, - /// - "containerApp", a device running the Android for Work App. The Android for Work App is managed by the DPC, - /// - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use Android for Work apps or Google Apps for Work, but the profile is itself not owned by a DPC. - #[serde(rename="managementType")] - pub management_type: Option, + /// The authentication token to be passed to the device policy client on the device where it can be used to provision the account for which this token was generated. + pub token: Option, } -impl Resource for Device {} -impl ResponseResult for Device {} +impl ResponseResult for AuthenticationToken {} /// A resource returned by the GenerateSignupUrl API, which contains the Signup URL and Completion Token. @@ -1316,13 +1272,13 @@ pub struct DevicesListResponse { impl ResponseResult for DevicesListResponse {} -/// The existence of an install resource indicates that an app is installed on a particular device (or that an install is pending). +/// The existence of an Installs resource indicates that an app is installed on a particular device (or that an install is pending). /// -/// The API can be used to create an install resource using the update method. This triggers the actual install of the app on the device. If the user does not already have an entitlement for the app then an attempt is made to create one. If this fails (e.g. because the app is not free and there is no available license) then the creation of the install fails. +/// The API can be used to create an install resource using the update method. This triggers the actual install of the app on the device. If the user does not already have an entitlement for the app, then an attempt is made to create one. If this fails (for example, because the app is not free and there is no available license), then the creation of the install fails. /// -/// The API can also be used to update an installed app. If the update method is used on an existing install then the app will be updated to the latest available version. +/// The API can also be used to update an installed app. If the update method is used on an existing install, then the app will be updated to the latest available version. /// -/// Note that it is not possible to force the installation of a specific version of an app; the version code is read-only. +/// Note that it is not possible to force the installation of a specific version of an app: the version code is read-only. /// /// If a user installs an app themselves (as permitted by the enterprise), then again an install resource and possibly an entitlement resource are automatically created. /// @@ -1349,7 +1305,7 @@ pub struct Install { pub version_code: Option, /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#install". pub kind: Option, - /// The ID of the product that the install is for, e.g. "app:com.google.android.gm". + /// The ID of the product that the install is for. For example, "app:com.google.android.gm". #[serde(rename="productId")] pub product_id: Option, } @@ -1361,7 +1317,7 @@ impl ResponseResult for Install {} /// An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows: /// - For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process. -/// - For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details. +/// - For managed Google Play Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the managed Google Play sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details. /// /// # Activities /// @@ -1387,7 +1343,7 @@ impl ResponseResult for Install {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Enterprise { - /// Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow. + /// Admins of the enterprise. This is only supported for enterprises created via the EMM-initiated flow. pub administrator: Option>, /// The enterprise's primary domain, such as "example.com". #[serde(rename="primaryDomain")] @@ -1431,7 +1387,7 @@ pub struct InstallFailureEvent { impl Part for InstallFailureEvent {} -/// A UserToken is used by a user when setting up a managed device or profile with their work account on a device. When the user enters their email address and token (activation code) the appropriate EMM app can be automatically downloaded. +/// A UserToken is used by a user when setting up a managed device or profile with their managed Google Play account on a device. When the user enters their email address and token (activation code) the appropriate EMM app can be automatically downloaded. /// /// # Activities /// @@ -1490,7 +1446,7 @@ pub struct AppUpdateEvent { impl Part for AppUpdateEvent {} -/// A token authorizing an administrator to access an iframe. +/// A token authorizing an admin to access an iframe. /// /// # Activities /// @@ -1510,27 +1466,28 @@ pub struct AdministratorWebToken { impl ResponseResult for AdministratorWebToken {} -/// The user resources for the collection. +/// The grouplicense resources for the enterprise. /// /// # 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*). /// -/// * [list collectionviewers](struct.CollectionviewerListCall.html) (response) +/// * [list grouplicenses](struct.GrouplicenseListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CollectionViewersListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collectionViewersListResponse". +pub struct GroupLicensesListResponse { + /// A group license for a product approved for use in the enterprise. + #[serde(rename="groupLicense")] + pub group_license: Option>, + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicensesListResponse". pub kind: Option, - /// A user of an enterprise. - pub user: Option>, } -impl ResponseResult for CollectionViewersListResponse {} +impl ResponseResult for GroupLicensesListResponse {} -/// Definition of a Google Play for Work store cluster, a list of products displayed as part of a store page. +/// Definition of a managed Google Play store cluster, a list of products displayed as part of a store page. /// /// # Activities /// @@ -1584,7 +1541,7 @@ pub struct UsersListResponse { impl ResponseResult for UsersListResponse {} -/// General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened. +/// General setting for the managed Google Play store layout, currently only specifying the page to display the first time the store is opened. /// /// # Activities /// @@ -1596,16 +1553,14 @@ impl ResponseResult for UsersListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct StoreLayout { - /// The ID of the store page to be used as the homepage. The homepage will be used as the first page shown in the Google Play for Work store. + /// The ID of the store page to be used as the homepage. The homepage is the first page shown in the managed Google Play Store. /// - /// If a homepage has not been set, the Play store shown on devices will be empty. Not specifying a homepage on a store layout effectively empties the store. - /// - /// If there exists at least one page, this field must be set to the ID of a valid page. + /// Not specifying a homepage is equivalent to setting the store layout type to "basic". #[serde(rename="homepageId")] pub homepage_id: Option, /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#storeLayout". pub kind: Option, - /// The store layout type. By default, this value is set to "basic". If set to "custom", "homepageId" must be specified. If set to "basic", the layout will consist of all approved apps accessible by the user, split in pages of 100 each; in this case, "homepageId" must not be specified. The "basic" setting takes precedence over any existing collections setup for this enterprise (if any). Should the enterprise use collectionViewers for controlling access rights, these will still be respected. + /// The store layout type. By default, this value is set to "basic" if the homepageId field is not set, and to "custom" otherwise. If set to "basic", the layout will consist of all approved apps that have been whitelisted for the user. #[serde(rename="storeLayoutType")] pub store_layout_type: Option, } @@ -1644,7 +1599,7 @@ impl Resource for ServiceAccountKey {} impl ResponseResult for ServiceAccountKey {} -/// A Products resource represents an app in the Google Play Store that is available to at least some users in the enterprise. (Some apps are restricted to a single enterprise, and no information about them is made available outside that enterprise.) +/// A Products resource represents an app in the Google Play store that is available to at least some users in the enterprise. (Some apps are restricted to a single enterprise, and no information about them is made available outside that enterprise.) /// /// The information provided for each product (localized name, icon, link to the full Google Play details page) is intended to allow a basic representation of the product within an EMM user interface. /// @@ -1653,7 +1608,6 @@ impl ResponseResult for ServiceAccountKey {} /// 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*). /// -/// * [update permissions products](struct.ProductUpdatePermissionCall.html) (none) /// * [get permissions products](struct.ProductGetPermissionCall.html) (none) /// * [get products](struct.ProductGetCall.html) (response) /// * [approve products](struct.ProductApproveCall.html) (none) @@ -1669,12 +1623,12 @@ pub struct Product { pub small_icon_url: Option, /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#product". pub kind: Option, - /// How and to whom the package is made available. The value publicGoogleHosted means that the package is available through the Play Store and not restricted to a specific enterprise. The value privateGoogleHosted means that the package is a private app (restricted to an enterprise) but hosted by Google. The value privateSelfHosted means that the package is a private app (restricted to an enterprise) and is privately hosted. + /// How and to whom the package is made available. The value publicGoogleHosted means that the package is available through the Play store and not restricted to a specific enterprise. The value privateGoogleHosted means that the package is a private app (restricted to an enterprise) but hosted by Google. The value privateSelfHosted means that the package is a private app (restricted to an enterprise) and is privately hosted. #[serde(rename="distributionChannel")] pub distribution_channel: Option, /// The name of the product. pub title: Option, - /// A link to the Google Play for Work details page for the product, for use by an Enterprise administrator. + /// A link to the managed Google Play details page for the product, for use by an Enterprise admin. #[serde(rename="workDetailsUrl")] pub work_details_url: Option, /// App versions currently available for this product. The returned list contains only public versions. Alpha and beta versions are not included. @@ -1686,10 +1640,10 @@ pub struct Product { /// A link to an image that can be used as an icon for the product. This image is suitable for use at up to 512px x 512px. #[serde(rename="iconUrl")] pub icon_url: Option, - /// The name of the author of the product (e.g. the app developer). + /// The name of the author of the product (for example, the app developer). #[serde(rename="authorName")] pub author_name: Option, - /// Whether this app can only be installed on devices using the Android for Work container app. + /// Deprecated. #[serde(rename="requiresContainerApp")] pub requires_container_app: Option, /// A link to the (consumer) Google Play details page for the product. @@ -1715,6 +1669,9 @@ impl ResponseResult for Product {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductsApproveRequest { + /// Sets how new permission requests for the product are handled. "allPermissions" automatically approves all current and future permissions for the product. "currentPermissionsOnly" approves the current set of permissions for the product, but any future permissions added through updates will require manual reapproval. If not specified, only the current set of permissions will be approved. + #[serde(rename="approvedPermissions")] + pub approved_permissions: Option, /// The approval URL that was shown to the user. Only the permissions shown to the user with that URL will be accepted, which may not be the product's entire set of permissions. For example, the URL may only display new permissions from an update after the product was approved, or not include new permissions if the product was updated since the URL was generated. #[serde(rename="approvalUrlInfo")] pub approval_url_info: Option, @@ -1723,24 +1680,27 @@ pub struct ProductsApproveRequest { impl RequestValue for ProductsApproveRequest {} -/// The collection resources for the enterprise. +/// Information about the permissions required by a specific app and whether they have been accepted by the enterprise. /// /// # 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*). /// -/// * [list collections](struct.CollectionListCall.html) (response) +/// * [get permissions products](struct.ProductGetPermissionCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CollectionsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collectionsListResponse". +pub struct ProductPermissions { + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productPermissions". pub kind: Option, - /// An ordered collection of products which can be made visible on the Google Play Store to a selected group of users. - pub collection: Option>, + /// The permissions required by the app. + pub permission: Option>, + /// The ID of the app that the permissions relate to, e.g. "app:com.google.android.gm". + #[serde(rename="productId")] + pub product_id: Option, } -impl ResponseResult for CollectionsListResponse {} +impl ResponseResult for ProductPermissions {} /// A managed property of a managed configuration. The property must match one of the properties in the app restrictions schema of the product. Exactly one of the value fields must be populated, and it must match the property's type in the app restrictions schema. @@ -1774,9 +1734,9 @@ pub struct ManagedProperty { impl Part for ManagedProperty {} -/// A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to Google Play for Work only, or to other Google services, depending on the identity model: -/// - Google managed domain identity model requires synchronization to Google account sources (via primaryEmail). -/// - Android for Work Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to Google Play for Work only. +/// A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to managed Google Play only, or to other Google services, depending on the identity model: +/// - The Google managed domain identity model requires synchronization to Google account sources (via primaryEmail). +/// - The managed Google Play Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to managed Google Play. /// /// # Activities /// @@ -1785,12 +1745,9 @@ impl Part for ManagedProperty {} /// /// * [revoke token users](struct.UserRevokeTokenCall.html) (none) /// * [delete users](struct.UserDeleteCall.html) (none) -/// * [update collectionviewers](struct.CollectionviewerUpdateCall.html) (request|response) -/// * [patch collectionviewers](struct.CollectionviewerPatchCall.html) (request|response) /// * [generate authentication token users](struct.UserGenerateAuthenticationTokenCall.html) (none) /// * [list users](struct.UserListCall.html) (none) /// * [update users](struct.UserUpdateCall.html) (request|response) -/// * [get collectionviewers](struct.CollectionviewerGetCall.html) (response) /// * [patch users](struct.UserPatchCall.html) (request|response) /// * [set available product set users](struct.UserSetAvailableProductSetCall.html) (none) /// * [insert users](struct.UserInsertCall.html) (request|response) @@ -1873,18 +1830,23 @@ impl Part for ManagedPropertyBundle {} pub struct GroupLicense { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicense". pub kind: Option, - /// The number of purchased licenses (possibly in multiple purchases). If this field is omitted then there is no limit on the number of licenses that can be provisioned (e.g. if the acquisition kind is "free"). + /// The number of purchased licenses (possibly in multiple purchases). If this field is omitted, then there is no limit on the number of licenses that can be provisioned (for example, if the acquisition kind is "free"). #[serde(rename="numPurchased")] pub num_purchased: Option, /// The total number of provisioned licenses for this product. Returned by read operations, but ignored in write operations. #[serde(rename="numProvisioned")] pub num_provisioned: Option, - /// How this group license was acquired. "bulkPurchase" means that this group license object was created because the enterprise purchased licenses for this product; this is "free" otherwise (for free products). + /// How this group license was acquired. "bulkPurchase" means that this Grouplicenses resource was created because the enterprise purchased licenses for this product; otherwise, the value is "free" (for free products). #[serde(rename="acquisitionKind")] pub acquisition_kind: Option, - /// Whether the product to which this group license relates is currently approved by the enterprise, as either "approved" or "unapproved". Products are approved when a group license is first created, but this approval may be revoked by an enterprise admin via Google Play. Unapproved products will not be visible to end users in collections and new entitlements to them should not normally be created. + /// Whether the product to which this group license relates is currently approved by the enterprise. Products are approved when a group license is first created, but this approval may be revoked by an enterprise admin via Google Play. Unapproved products will not be visible to end users in collections, and new entitlements to them should not normally be created. pub approval: Option, - /// The ID of the product that the license is for, e.g. "app:com.google.android.gm". + /// The permission approval status of the product. This field is only set if the product is approved. Possible states are: + /// - "currentApproved", the current set of permissions is approved, but additional permissions will require the administrator to reapprove the product (If the product was approved without specifying the approved permissions setting, then this is the default behavior.), + /// - "needsReapproval", the product has unapproved permissions. No additional product licenses can be assigned until the product is reapproved, + /// - "allCurrentAndFutureApproved", the current permissions are approved and any future permission updates will be automatically approved without administrator review. + pub permissions: Option, + /// The ID of the product that the license is for. For example, "app:com.google.android.gm". #[serde(rename="productId")] pub product_id: Option, } @@ -1928,27 +1890,6 @@ pub struct ApprovalUrlInfo { impl Part for ApprovalUrlInfo {} -/// The grouplicense resources for the enterprise. -/// -/// # 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*). -/// -/// * [list grouplicenses](struct.GrouplicenseListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GroupLicensesListResponse { - /// A group license for a product approved for use in the enterprise. - #[serde(rename="groupLicense")] - pub group_license: Option>, - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicensesListResponse". - pub kind: Option, -} - -impl ResponseResult for GroupLicensesListResponse {} - - // ################### // MethodBuilders ### @@ -1994,14 +1935,31 @@ impl<'a, C, A> StorelayoutpageMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a store page. + /// Retrieves the details of all pages in the store. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + pub fn list(&self, enterprise_id: &str) -> StorelayoutpageListCall<'a, C, A> { + StorelayoutpageListCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Retrieves details of a store page. /// /// # Arguments /// /// * `enterpriseId` - The ID of the enterprise. /// * `pageId` - The ID of the page. - pub fn delete(&self, enterprise_id: &str, page_id: &str) -> StorelayoutpageDeleteCall<'a, C, A> { - StorelayoutpageDeleteCall { + pub fn get(&self, enterprise_id: &str, page_id: &str) -> StorelayoutpageGetCall<'a, C, A> { + StorelayoutpageGetCall { hub: self.hub, _enterprise_id: enterprise_id.to_string(), _page_id: page_id.to_string(), @@ -2013,15 +1971,15 @@ impl<'a, C, A> StorelayoutpageMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the content of a store page. This method supports patch semantics. + /// Updates the content of a store page. /// /// # Arguments /// /// * `request` - No description provided. /// * `enterpriseId` - The ID of the enterprise. /// * `pageId` - The ID of the page. - pub fn patch(&self, request: StorePage, enterprise_id: &str, page_id: &str) -> StorelayoutpagePatchCall<'a, C, A> { - StorelayoutpagePatchCall { + pub fn update(&self, request: StorePage, enterprise_id: &str, page_id: &str) -> StorelayoutpageUpdateCall<'a, C, A> { + StorelayoutpageUpdateCall { hub: self.hub, _request: request, _enterprise_id: enterprise_id.to_string(), @@ -2053,15 +2011,15 @@ impl<'a, C, A> StorelayoutpageMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the content of a store page. + /// Updates the content of a store page. This method supports patch semantics. /// /// # Arguments /// /// * `request` - No description provided. /// * `enterpriseId` - The ID of the enterprise. /// * `pageId` - The ID of the page. - pub fn update(&self, request: StorePage, enterprise_id: &str, page_id: &str) -> StorelayoutpageUpdateCall<'a, C, A> { - StorelayoutpageUpdateCall { + pub fn patch(&self, request: StorePage, enterprise_id: &str, page_id: &str) -> StorelayoutpagePatchCall<'a, C, A> { + StorelayoutpagePatchCall { hub: self.hub, _request: request, _enterprise_id: enterprise_id.to_string(), @@ -2074,14 +2032,14 @@ impl<'a, C, A> StorelayoutpageMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves details of a store page. + /// Deletes a store page. /// /// # Arguments /// /// * `enterpriseId` - The ID of the enterprise. /// * `pageId` - The ID of the page. - pub fn get(&self, enterprise_id: &str, page_id: &str) -> StorelayoutpageGetCall<'a, C, A> { - StorelayoutpageGetCall { + pub fn delete(&self, enterprise_id: &str, page_id: &str) -> StorelayoutpageDeleteCall<'a, C, A> { + StorelayoutpageDeleteCall { hub: self.hub, _enterprise_id: enterprise_id.to_string(), _page_id: page_id.to_string(), @@ -2090,171 +2048,6 @@ impl<'a, C, A> StorelayoutpageMethods<'a, C, A> { _additional_params: Default::default(), } } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the details of all pages in the store. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - pub fn list(&self, enterprise_id: &str) -> StorelayoutpageListCall<'a, C, A> { - StorelayoutpageListCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } -} - - - -/// A builder providing access to all methods supported on *collectionviewer* resources. -/// It is not used directly, but through the `AndroidEnterprise` hub. -/// -/// # Example -/// -/// Instantiate a resource builder -/// -/// ```test_harness,no_run -/// extern crate hyper; -/// extern crate yup_oauth2 as oauth2; -/// extern crate google_androidenterprise1 as androidenterprise1; -/// -/// # #[test] fn egal() { -/// use std::default::Default; -/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use androidenterprise1::AndroidEnterprise; -/// -/// let secret: ApplicationSecret = Default::default(); -/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// hyper::Client::new(), -/// ::default(), None); -/// let mut hub = AndroidEnterprise::new(hyper::Client::new(), auth); -/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `delete(...)`, `get(...)`, `list(...)`, `patch(...)` and `update(...)` -/// // to build up your call. -/// let rb = hub.collectionviewers(); -/// # } -/// ``` -pub struct CollectionviewerMethods<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, -} - -impl<'a, C, A> MethodsBuilder for CollectionviewerMethods<'a, C, A> {} - -impl<'a, C, A> CollectionviewerMethods<'a, C, A> { - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the ID of the user if they have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `collectionId` - The ID of the collection. - /// * `userId` - The ID of the user. - pub fn get(&self, enterprise_id: &str, collection_id: &str, user_id: &str) -> CollectionviewerGetCall<'a, C, A> { - CollectionviewerGetCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _collection_id: collection_id.to_string(), - _user_id: user_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. This method supports patch semantics. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - /// * `collectionId` - The ID of the collection. - /// * `userId` - The ID of the user. - pub fn patch(&self, request: User, enterprise_id: &str, collection_id: &str, user_id: &str) -> CollectionviewerPatchCall<'a, C, A> { - CollectionviewerPatchCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _collection_id: collection_id.to_string(), - _user_id: user_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the IDs of the users who have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `collectionId` - The ID of the collection. - pub fn list(&self, enterprise_id: &str, collection_id: &str) -> CollectionviewerListCall<'a, C, A> { - CollectionviewerListCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _collection_id: collection_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Removes the user from the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `collectionId` - The ID of the collection. - /// * `userId` - The ID of the user. - pub fn delete(&self, enterprise_id: &str, collection_id: &str, user_id: &str) -> CollectionviewerDeleteCall<'a, C, A> { - CollectionviewerDeleteCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _collection_id: collection_id.to_string(), - _user_id: user_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - /// * `collectionId` - The ID of the collection. - /// * `userId` - The ID of the user. - pub fn update(&self, request: User, enterprise_id: &str, collection_id: &str, user_id: &str) -> CollectionviewerUpdateCall<'a, C, A> { - CollectionviewerUpdateCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _collection_id: collection_id.to_string(), - _user_id: user_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } } @@ -2339,6 +2132,84 @@ impl<'a, C, A> UserMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Retrieves a user's details. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + pub fn get(&self, enterprise_id: &str, user_id: &str) -> UserGetCall<'a, C, A> { + UserGetCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _user_id: user_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Deleted an EMM-managed user. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + pub fn delete(&self, enterprise_id: &str, user_id: &str) -> UserDeleteCall<'a, C, A> { + UserDeleteCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _user_id: user_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Generates an authentication token which the device policy client can use to provision the given EMM-managed user account on a device. The generated token is single-use and expires after a few minutes. + /// + /// This call only works with EMM-managed accounts. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + pub fn generate_authentication_token(&self, enterprise_id: &str, user_id: &str) -> UserGenerateAuthenticationTokenCall<'a, C, A> { + UserGenerateAuthenticationTokenCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _user_id: user_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Looks up a user by primary email address. This is only supported for Google-managed users. Lookup of the id is not needed for EMM-managed users because the id is already returned in the result of the Users.insert call. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `email` - The exact primary email address of the user to look up. + pub fn list(&self, enterprise_id: &str, email: &str) -> UserListCall<'a, C, A> { + UserListCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _email: email.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Updates the details of an EMM-managed user. @@ -2362,65 +2233,6 @@ impl<'a, C, A> UserMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Modifies the set of products a user is entitled to access. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - /// * `userId` - The ID of the user. - pub fn set_available_product_set(&self, request: ProductSet, enterprise_id: &str, user_id: &str) -> UserSetAvailableProductSetCall<'a, C, A> { - UserSetAvailableProductSetCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _user_id: user_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the set of products a user is entitled to access. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `userId` - The ID of the user. - pub fn get_available_product_set(&self, enterprise_id: &str, user_id: &str) -> UserGetAvailableProductSetCall<'a, C, A> { - UserGetAvailableProductSetCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _user_id: user_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves a user's details. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `userId` - The ID of the user. - pub fn get(&self, enterprise_id: &str, user_id: &str) -> UserGetCall<'a, C, A> { - UserGetCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _user_id: user_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Creates a new EMM-managed user. @@ -2445,7 +2257,7 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token. + /// Generates a token (activation code) to allow this user to configure their managed account in the Android Setup Wizard. Revokes any previously generated token. /// /// This call only works with Google managed accounts. /// @@ -2466,15 +2278,17 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deleted an EMM-managed user. + /// Modifies the set of products that a user is entitled to access (referred to as whitelisted products). Only products that are approved or products that were previously approved (products with revoked approval) can be whitelisted. /// /// # Arguments /// + /// * `request` - No description provided. /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. - pub fn delete(&self, enterprise_id: &str, user_id: &str) -> UserDeleteCall<'a, C, A> { - UserDeleteCall { + pub fn set_available_product_set(&self, request: ProductSet, enterprise_id: &str, user_id: &str) -> UserSetAvailableProductSetCall<'a, C, A> { + UserSetAvailableProductSetCall { hub: self.hub, + _request: request, _enterprise_id: enterprise_id.to_string(), _user_id: user_id.to_string(), _delegate: Default::default(), @@ -2485,35 +2299,14 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Looks up a user by primary email address. This is only supported for Google-managed users. Lookup of the id is not needed for EMM-managed users because the id is already returned in the result of the Users.insert call. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `email` - The exact primary email address of the user to look up. - pub fn list(&self, enterprise_id: &str, email: &str) -> UserListCall<'a, C, A> { - UserListCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _email: email.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Generates an authentication token which the device policy client can use to provision the given EMM-managed user account on a device. The generated token is single-use and expires after a few minutes. - /// - /// This call only works with EMM-managed accounts. + /// Retrieves the set of products a user is entitled to access. /// /// # Arguments /// /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. - pub fn generate_authentication_token(&self, enterprise_id: &str, user_id: &str) -> UserGenerateAuthenticationTokenCall<'a, C, A> { - UserGenerateAuthenticationTokenCall { + pub fn get_available_product_set(&self, enterprise_id: &str, user_id: &str) -> UserGetAvailableProductSetCall<'a, C, A> { + UserGetAvailableProductSetCall { hub: self.hub, _enterprise_id: enterprise_id.to_string(), _user_id: user_id.to_string(), @@ -2566,7 +2359,7 @@ impl<'a, C, A> InstallMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics. + /// Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. This method supports patch semantics. /// /// # Arguments /// @@ -2589,29 +2382,6 @@ impl<'a, C, A> InstallMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `userId` - The ID of the user. - /// * `deviceId` - The Android ID of the device. - /// * `installId` - The ID of the product represented by the install, e.g. "app:com.google.android.gm". - pub fn delete(&self, enterprise_id: &str, user_id: &str, device_id: &str, install_id: &str) -> InstallDeleteCall<'a, C, A> { - InstallDeleteCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _user_id: user_id.to_string(), - _device_id: device_id.to_string(), - _install_id: install_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Retrieves details of an installation of an app on a device. @@ -2658,7 +2428,30 @@ impl<'a, C, A> InstallMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. + /// Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The Android ID of the device. + /// * `installId` - The ID of the product represented by the install, e.g. "app:com.google.android.gm". + pub fn delete(&self, enterprise_id: &str, user_id: &str, device_id: &str, install_id: &str) -> InstallDeleteCall<'a, C, A> { + InstallDeleteCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _user_id: user_id.to_string(), + _device_id: device_id.to_string(), + _install_id: install_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. /// /// # Arguments /// @@ -2801,44 +2594,17 @@ impl<'a, C, A> ManagedconfigurationsfordeviceMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Adds or updates a per-device managed configuration for an app for the specified device. + /// Removes a per-device managed configuration for an app for the specified device. /// /// # Arguments /// - /// * `request` - No description provided. /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. /// * `deviceId` - The Android ID of the device. /// * `managedConfigurationForDeviceId` - The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". - pub fn update(&self, request: ManagedConfiguration, enterprise_id: &str, user_id: &str, device_id: &str, managed_configuration_for_device_id: &str) -> ManagedconfigurationsfordeviceUpdateCall<'a, C, A> { - ManagedconfigurationsfordeviceUpdateCall { + pub fn delete(&self, enterprise_id: &str, user_id: &str, device_id: &str, managed_configuration_for_device_id: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { + ManagedconfigurationsfordeviceDeleteCall { hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _user_id: user_id.to_string(), - _device_id: device_id.to_string(), - _managed_configuration_for_device_id: managed_configuration_for_device_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Adds or updates a per-device managed configuration for an app for the specified device. This method supports patch semantics. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - /// * `userId` - The ID of the user. - /// * `deviceId` - The Android ID of the device. - /// * `managedConfigurationForDeviceId` - The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". - pub fn patch(&self, request: ManagedConfiguration, enterprise_id: &str, user_id: &str, device_id: &str, managed_configuration_for_device_id: &str) -> ManagedconfigurationsfordevicePatchCall<'a, C, A> { - ManagedconfigurationsfordevicePatchCall { - hub: self.hub, - _request: request, _enterprise_id: enterprise_id.to_string(), _user_id: user_id.to_string(), _device_id: device_id.to_string(), @@ -2872,17 +2638,19 @@ impl<'a, C, A> ManagedconfigurationsfordeviceMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Removes a per-device managed configuration for an app for the specified device. + /// Adds or updates a per-device managed configuration for an app for the specified device. /// /// # Arguments /// + /// * `request` - No description provided. /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. /// * `deviceId` - The Android ID of the device. /// * `managedConfigurationForDeviceId` - The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". - pub fn delete(&self, enterprise_id: &str, user_id: &str, device_id: &str, managed_configuration_for_device_id: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { - ManagedconfigurationsfordeviceDeleteCall { + pub fn update(&self, request: ManagedConfiguration, enterprise_id: &str, user_id: &str, device_id: &str, managed_configuration_for_device_id: &str) -> ManagedconfigurationsfordeviceUpdateCall<'a, C, A> { + ManagedconfigurationsfordeviceUpdateCall { hub: self.hub, + _request: request, _enterprise_id: enterprise_id.to_string(), _user_id: user_id.to_string(), _device_id: device_id.to_string(), @@ -2915,6 +2683,31 @@ impl<'a, C, A> ManagedconfigurationsfordeviceMethods<'a, C, A> { _additional_params: Default::default(), } } + + /// Create a builder to help you perform the following task: + /// + /// Adds or updates a per-device managed configuration for an app for the specified device. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The Android ID of the device. + /// * `managedConfigurationForDeviceId` - The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". + pub fn patch(&self, request: ManagedConfiguration, enterprise_id: &str, user_id: &str, device_id: &str, managed_configuration_for_device_id: &str) -> ManagedconfigurationsfordevicePatchCall<'a, C, A> { + ManagedconfigurationsfordevicePatchCall { + hub: self.hub, + _request: request, + _enterprise_id: enterprise_id.to_string(), + _user_id: user_id.to_string(), + _device_id: device_id.to_string(), + _managed_configuration_for_device_id: managed_configuration_for_device_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } } @@ -2980,27 +2773,6 @@ impl<'a, C, A> DeviceMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Retrieves the details of a device. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `userId` - The ID of the user. - /// * `deviceId` - The ID of the device. - pub fn get(&self, enterprise_id: &str, user_id: &str, device_id: &str) -> DeviceGetCall<'a, C, A> { - DeviceGetCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _user_id: user_id.to_string(), - _device_id: device_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users. @@ -3040,6 +2812,27 @@ impl<'a, C, A> DeviceMethods<'a, C, A> { _additional_params: Default::default(), } } + + /// Create a builder to help you perform the following task: + /// + /// Retrieves the details of a device. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The ID of the device. + pub fn get(&self, enterprise_id: &str, user_id: &str, device_id: &str) -> DeviceGetCall<'a, C, A> { + DeviceGetCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _user_id: user_id.to_string(), + _device_id: device_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } } @@ -3082,6 +2875,36 @@ impl<'a, C, A> MethodsBuilder for EnterpriseMethods<'a, C, A> {} impl<'a, C, A> EnterpriseMethods<'a, C, A> { + /// Create a builder to help you perform the following task: + /// + /// Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications. + pub fn acknowledge_notification_set(&self) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> { + EnterpriseAcknowledgeNotificationSetCall { + hub: self.hub, + _notification_set_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Unenrolls an enterprise from the calling EMM. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + pub fn unenroll(&self, enterprise_id: &str) -> EnterpriseUnenrollCall<'a, C, A> { + EnterpriseUnenrollCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Establishes the binding between the EMM and an enterprise. This is now deprecated; use enroll instead. @@ -3103,7 +2926,58 @@ impl<'a, C, A> EnterpriseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only contains apps approved by the administrator, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom"), the basic store layout is disabled. + /// Sends a test push notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + pub fn send_test_push_notification(&self, enterprise_id: &str) -> EnterpriseSendTestPushNotificationCall<'a, C, A> { + EnterpriseSendTestPushNotificationCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the Enterprises.generateSignupUrl call. + /// + /// # Arguments + /// + /// * `domain` - The exact primary domain name of the enterprise to look up. + pub fn list(&self, domain: &str) -> EnterpriseListCall<'a, C, A> { + EnterpriseListCall { + hub: self.hub, + _domain: domain.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns the store layout for the enterprise. If the store layout has not been set, returns "basic" as the store layout type and no homepage. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + pub fn get_store_layout(&self, enterprise_id: &str) -> EnterpriseGetStoreLayoutCall<'a, C, A> { + EnterpriseGetStoreLayoutCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only contains apps approved by the admin, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom" and setting a homepage), the basic store layout is disabled. /// /// # Arguments /// @@ -3120,10 +2994,24 @@ impl<'a, C, A> EnterpriseMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given Enterprise Token. + pub fn complete_signup(&self) -> EnterpriseCompleteSignupCall<'a, C, A> { + EnterpriseCompleteSignupCall { + hub: self.hub, + _enterprise_token: Default::default(), + _completion_token: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending. - /// A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises​.AcknowledgeNotificationSet, unless the notification set is empty. + /// A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set is empty. /// Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy. /// Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending. /// If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available. @@ -3158,68 +3046,13 @@ impl<'a, C, A> EnterpriseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Set the account that will be used to authenticate to the API as the enterprise. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - pub fn set_account(&self, request: EnterpriseAccount, enterprise_id: &str) -> EnterpriseSetAccountCall<'a, C, A> { - EnterpriseSetAccountCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the Play for Work javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - pub fn create_web_token(&self, request: AdministratorWebTokenSpec, enterprise_id: &str) -> EnterpriseCreateWebTokenCall<'a, C, A> { - EnterpriseCreateWebTokenCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the Enterprises.generateSignupUrl call. - /// - /// # Arguments - /// - /// * `domain` - The exact primary domain name of the enterprise to look up. - pub fn list(&self, domain: &str) -> EnterpriseListCall<'a, C, A> { - EnterpriseListCall { - hub: self.hub, - _domain: domain.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Returns the store layout for the enterprise. If the store layout has not been set, or if the store layout has no homepageId set, returns a NOT_FOUND error. + /// Retrieves the name and domain of an enterprise. /// /// # Arguments /// /// * `enterpriseId` - The ID of the enterprise. - pub fn get_store_layout(&self, enterprise_id: &str) -> EnterpriseGetStoreLayoutCall<'a, C, A> { - EnterpriseGetStoreLayoutCall { + pub fn get(&self, enterprise_id: &str) -> EnterpriseGetCall<'a, C, A> { + EnterpriseGetCall { hub: self.hub, _enterprise_id: enterprise_id.to_string(), _delegate: Default::default(), @@ -3228,20 +3061,6 @@ impl<'a, C, A> EnterpriseMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given Enterprise Token. - pub fn complete_signup(&self) -> EnterpriseCompleteSignupCall<'a, C, A> { - EnterpriseCompleteSignupCall { - hub: self.hub, - _enterprise_token: Default::default(), - _completion_token: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side. @@ -3268,27 +3087,16 @@ impl<'a, C, A> EnterpriseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications. - pub fn acknowledge_notification_set(&self) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> { - EnterpriseAcknowledgeNotificationSetCall { - hub: self.hub, - _notification_set_id: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Unenrolls an enterprise from the calling EMM. + /// Sets the account that will be used to authenticate to the API as the enterprise. /// /// # Arguments /// + /// * `request` - No description provided. /// * `enterpriseId` - The ID of the enterprise. - pub fn unenroll(&self, enterprise_id: &str) -> EnterpriseUnenrollCall<'a, C, A> { - EnterpriseUnenrollCall { + pub fn set_account(&self, request: EnterpriseAccount, enterprise_id: &str) -> EnterpriseSetAccountCall<'a, C, A> { + EnterpriseSetAccountCall { hub: self.hub, + _request: request, _enterprise_id: enterprise_id.to_string(), _delegate: Default::default(), _scopes: Default::default(), @@ -3298,41 +3106,7 @@ impl<'a, C, A> EnterpriseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Sends a test push notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - pub fn send_test_push_notification(&self, enterprise_id: &str) -> EnterpriseSendTestPushNotificationCall<'a, C, A> { - EnterpriseSendTestPushNotificationCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the name and domain of an enterprise. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - pub fn get(&self, enterprise_id: &str) -> EnterpriseGetCall<'a, C, A> { - EnterpriseGetCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Deletes the binding between the EMM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call. + /// Deletes the binding between the EMM and enterprise. This is now deprecated. Use this method only to unenroll customers that were previously enrolled with the insert call, then enroll them again with the enroll call. /// /// # Arguments /// @@ -3359,6 +3133,25 @@ impl<'a, C, A> EnterpriseMethods<'a, C, A> { _additional_params: Default::default(), } } + + /// Create a builder to help you perform the following task: + /// + /// Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the managed Google Play javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + pub fn create_web_token(&self, request: AdministratorWebTokenSpec, enterprise_id: &str) -> EnterpriseCreateWebTokenCall<'a, C, A> { + EnterpriseCreateWebTokenCall { + hub: self.hub, + _request: request, + _enterprise_id: enterprise_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } } @@ -3401,25 +3194,6 @@ impl<'a, C, A> MethodsBuilder for StorelayoutclusterMethods<'a, C, A> {} impl<'a, C, A> StorelayoutclusterMethods<'a, C, A> { - /// Create a builder to help you perform the following task: - /// - /// Retrieves the details of all clusters on the specified page. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `pageId` - The ID of the page. - pub fn list(&self, enterprise_id: &str, page_id: &str) -> StorelayoutclusterListCall<'a, C, A> { - StorelayoutclusterListCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _page_id: page_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Updates a cluster. This method supports patch semantics. @@ -3443,6 +3217,67 @@ impl<'a, C, A> StorelayoutclusterMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Deletes a cluster. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `pageId` - The ID of the page. + /// * `clusterId` - The ID of the cluster. + pub fn delete(&self, enterprise_id: &str, page_id: &str, cluster_id: &str) -> StorelayoutclusterDeleteCall<'a, C, A> { + StorelayoutclusterDeleteCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _page_id: page_id.to_string(), + _cluster_id: cluster_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Inserts a new cluster in a page. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `pageId` - The ID of the page. + pub fn insert(&self, request: StoreCluster, enterprise_id: &str, page_id: &str) -> StorelayoutclusterInsertCall<'a, C, A> { + StorelayoutclusterInsertCall { + hub: self.hub, + _request: request, + _enterprise_id: enterprise_id.to_string(), + _page_id: page_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Retrieves the details of all clusters on the specified page. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `pageId` - The ID of the page. + pub fn list(&self, enterprise_id: &str, page_id: &str) -> StorelayoutclusterListCall<'a, C, A> { + StorelayoutclusterListCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _page_id: page_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Updates a cluster. @@ -3486,48 +3321,6 @@ impl<'a, C, A> StorelayoutclusterMethods<'a, C, A> { _additional_params: Default::default(), } } - - /// Create a builder to help you perform the following task: - /// - /// Inserts a new cluster in a page. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - /// * `pageId` - The ID of the page. - pub fn insert(&self, request: StoreCluster, enterprise_id: &str, page_id: &str) -> StorelayoutclusterInsertCall<'a, C, A> { - StorelayoutclusterInsertCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _page_id: page_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Deletes a cluster. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `pageId` - The ID of the page. - /// * `clusterId` - The ID of the cluster. - pub fn delete(&self, enterprise_id: &str, page_id: &str, cluster_id: &str) -> StorelayoutclusterDeleteCall<'a, C, A> { - StorelayoutclusterDeleteCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _page_id: page_id.to_string(), - _cluster_id: cluster_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } } @@ -3555,7 +3348,7 @@ impl<'a, C, A> StorelayoutclusterMethods<'a, C, A> { /// ::default(), None); /// let mut hub = AndroidEnterprise::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `approve(...)`, `generate_approval_url(...)`, `get(...)`, `get_app_restrictions_schema(...)`, `get_permissions(...)`, `list(...)`, `unapprove(...)` and `update_permissions(...)` +/// // like `approve(...)`, `generate_approval_url(...)`, `get(...)`, `get_app_restrictions_schema(...)`, `get_permissions(...)`, `list(...)` and `unapprove(...)` /// // to build up your call. /// let rb = hub.products(); /// # } @@ -3608,11 +3401,53 @@ impl<'a, C, A> ProductMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product. + /// + /// Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display permissions for up to 1 day. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `productId` - The ID of the product. + pub fn generate_approval_url(&self, enterprise_id: &str, product_id: &str) -> ProductGenerateApprovalUrlCall<'a, C, A> { + ProductGenerateApprovalUrlCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _product_id: product_id.to_string(), + _language_code: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Retrieves details of a product for display to an enterprise admin. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `productId` - The ID of the product, e.g. "app:com.google.android.gm". + pub fn get(&self, enterprise_id: &str, product_id: &str) -> ProductGetCall<'a, C, A> { + ProductGetCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _product_id: product_id.to_string(), + _language: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000. /// - /// To learn how to use Google Play for Work to design and create a store layout to display approved products to your users, see Store Layout Design. + /// To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design. /// /// # Arguments /// @@ -3633,30 +3468,7 @@ impl<'a, C, A> ProductMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// This method has been deprecated. To programmatically approve applications, you must use the iframe mechanism via the generateApprovalUrl and approve methods of the Products resource. For more information, see the Play EMM API usage requirements. - /// - /// The updatePermissions method (deprecated) updates the set of Android app permissions for this app that have been accepted by the enterprise. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - /// * `productId` - The ID of the product. - pub fn update_permissions(&self, request: ProductPermissions, enterprise_id: &str, product_id: &str) -> ProductUpdatePermissionCall<'a, C, A> { - ProductUpdatePermissionCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _product_id: product_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an administrator to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play. + /// Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play. /// /// # Arguments /// @@ -3695,48 +3507,6 @@ impl<'a, C, A> ProductMethods<'a, C, A> { _additional_params: Default::default(), } } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves details of a product for display to an enterprise admin. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `productId` - The ID of the product, e.g. "app:com.google.android.gm". - pub fn get(&self, enterprise_id: &str, product_id: &str) -> ProductGetCall<'a, C, A> { - ProductGetCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _product_id: product_id.to_string(), - _language: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product. - /// - /// Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display permissions for up to 1 day. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `productId` - The ID of the product. - pub fn generate_approval_url(&self, enterprise_id: &str, product_id: &str) -> ProductGenerateApprovalUrlCall<'a, C, A> { - ProductGenerateApprovalUrlCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _product_id: product_id.to_string(), - _language_code: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } } @@ -3802,25 +3572,6 @@ impl<'a, C, A> ManagedconfigurationsforuserMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Lists all the per-user managed configurations for the specified user. Only the ID is set. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `userId` - The ID of the user. - pub fn list(&self, enterprise_id: &str, user_id: &str) -> ManagedconfigurationsforuserListCall<'a, C, A> { - ManagedconfigurationsforuserListCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _user_id: user_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Removes a per-user managed configuration for an app for the specified user. @@ -3842,6 +3593,25 @@ impl<'a, C, A> ManagedconfigurationsforuserMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Lists all the per-user managed configurations for the specified user. Only the ID is set. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + pub fn list(&self, enterprise_id: &str, user_id: &str) -> ManagedconfigurationsforuserListCall<'a, C, A> { + ManagedconfigurationsforuserListCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _user_id: user_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Adds or updates a per-user managed configuration for an app for the specified user. @@ -3989,17 +3759,19 @@ impl<'a, C, A> EntitlementMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// List of all entitlements for the specified user. Only the ID is set. + /// Removes an entitlement to an app for a user. /// /// # Arguments /// /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. - pub fn list(&self, enterprise_id: &str, user_id: &str) -> EntitlementListCall<'a, C, A> { - EntitlementListCall { + /// * `entitlementId` - The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". + pub fn delete(&self, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementDeleteCall<'a, C, A> { + EntitlementDeleteCall { hub: self.hub, _enterprise_id: enterprise_id.to_string(), _user_id: user_id.to_string(), + _entitlement_id: entitlement_id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -4053,19 +3825,17 @@ impl<'a, C, A> EntitlementMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Removes an entitlement to an app for a user and uninstalls it. + /// Lists all entitlements for the specified user. Only the ID is set. /// /// # Arguments /// /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. - /// * `entitlementId` - The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". - pub fn delete(&self, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementDeleteCall<'a, C, A> { - EntitlementDeleteCall { + pub fn list(&self, enterprise_id: &str, user_id: &str) -> EntitlementListCall<'a, C, A> { + EntitlementListCall { hub: self.hub, _enterprise_id: enterprise_id.to_string(), _user_id: user_id.to_string(), - _entitlement_id: entitlement_id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -4099,163 +3869,6 @@ impl<'a, C, A> EntitlementMethods<'a, C, A> { -/// A builder providing access to all methods supported on *collection* resources. -/// It is not used directly, but through the `AndroidEnterprise` hub. -/// -/// # Example -/// -/// Instantiate a resource builder -/// -/// ```test_harness,no_run -/// extern crate hyper; -/// extern crate yup_oauth2 as oauth2; -/// extern crate google_androidenterprise1 as androidenterprise1; -/// -/// # #[test] fn egal() { -/// use std::default::Default; -/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use androidenterprise1::AndroidEnterprise; -/// -/// let secret: ApplicationSecret = Default::default(); -/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// hyper::Client::new(), -/// ::default(), None); -/// let mut hub = AndroidEnterprise::new(hyper::Client::new(), auth); -/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `delete(...)`, `get(...)`, `insert(...)`, `list(...)`, `patch(...)` and `update(...)` -/// // to build up your call. -/// let rb = hub.collections(); -/// # } -/// ``` -pub struct CollectionMethods<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, -} - -impl<'a, C, A> MethodsBuilder for CollectionMethods<'a, C, A> {} - -impl<'a, C, A> CollectionMethods<'a, C, A> { - - /// Create a builder to help you perform the following task: - /// - /// Updates a collection. This method supports patch semantics. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - /// * `collectionId` - The ID of the collection. - pub fn patch(&self, request: Collection, enterprise_id: &str, collection_id: &str) -> CollectionPatchCall<'a, C, A> { - CollectionPatchCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _collection_id: collection_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the IDs of all the collections for an enterprise. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - pub fn list(&self, enterprise_id: &str) -> CollectionListCall<'a, C, A> { - CollectionListCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the details of a collection. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `collectionId` - The ID of the collection. - pub fn get(&self, enterprise_id: &str, collection_id: &str) -> CollectionGetCall<'a, C, A> { - CollectionGetCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _collection_id: collection_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Deletes a collection. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - /// * `collectionId` - The ID of the collection. - pub fn delete(&self, enterprise_id: &str, collection_id: &str) -> CollectionDeleteCall<'a, C, A> { - CollectionDeleteCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _collection_id: collection_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Creates a new collection. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - pub fn insert(&self, request: Collection, enterprise_id: &str) -> CollectionInsertCall<'a, C, A> { - CollectionInsertCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Updates a collection. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `enterpriseId` - The ID of the enterprise. - /// * `collectionId` - The ID of the collection. - pub fn update(&self, request: Collection, enterprise_id: &str, collection_id: &str) -> CollectionUpdateCall<'a, C, A> { - CollectionUpdateCall { - hub: self.hub, - _request: request, - _enterprise_id: enterprise_id.to_string(), - _collection_id: collection_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } -} - - - /// A builder providing access to all methods supported on *serviceaccountkey* resources. /// It is not used directly, but through the `AndroidEnterprise` hub. /// @@ -4294,23 +3907,6 @@ impl<'a, C, A> MethodsBuilder for ServiceaccountkeyMethods<'a, C, A> {} impl<'a, C, A> ServiceaccountkeyMethods<'a, C, A> { - /// Create a builder to help you perform the following task: - /// - /// Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. - /// - /// # Arguments - /// - /// * `enterpriseId` - The ID of the enterprise. - pub fn list(&self, enterprise_id: &str) -> ServiceaccountkeyListCall<'a, C, A> { - ServiceaccountkeyListCall { - hub: self.hub, - _enterprise_id: enterprise_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Generates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. @@ -4332,6 +3928,23 @@ impl<'a, C, A> ServiceaccountkeyMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + pub fn list(&self, enterprise_id: &str) -> ServiceaccountkeyListCall<'a, C, A> { + ServiceaccountkeyListCall { + hub: self.hub, + _enterprise_id: enterprise_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Removes and invalidates the specified credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. @@ -4419,9 +4032,9 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { // CallBuilders ### // ################# -/// Deletes a store page. +/// Retrieves the details of all pages in the store. /// -/// A builder for the *delete* method supported by a *storelayoutpage* resource. +/// A builder for the *list* method supported by a *storelayoutpage* resource. /// It is not used directly, but through a `StorelayoutpageMethods` instance. /// /// # Example @@ -4445,28 +4058,27 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// // 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.storelayoutpages().delete("enterpriseId", "pageId") +/// let result = hub.storelayoutpages().list("enterpriseId") /// .doit(); /// # } /// ``` -pub struct StorelayoutpageDeleteCall<'a, C, A> +pub struct StorelayoutpageListCall<'a, C, A> where C: 'a, A: 'a { hub: &'a AndroidEnterprise, _enterprise_id: String, - _page_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for StorelayoutpageDeleteCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for StorelayoutpageListCall<'a, C, A> {} -impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { + pub fn doit(mut self) -> Result<(hyper::client::Response, StoreLayoutPagesListResponse)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -4474,12 +4086,11 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.delete", - http_method: hyper::method::Method::Delete }); + dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.list", + http_method: hyper::method::Method::Get }); let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("pageId", self._page_id.to_string())); - for &field in ["enterpriseId", "pageId"].iter() { + for &field in ["alt", "enterpriseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4489,13 +4100,14 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -4506,8 +4118,8 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(2); - for param_name in ["pageId", "enterpriseId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -4540,7 +4152,7 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut Err(Error::BadRequest(serr)) } } - let result_value = res; + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; dlg.finished(true); return Ok(result_value) @@ -4589,27 +4211,17 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut StorelayoutpageDeleteCall<'a, C, A> { + pub fn enterprise_id(mut self, new_value: &str) -> StorelayoutpageListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// The ID of the page. - /// - /// Sets the *page id* 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 page_id(mut self, new_value: &str) -> StorelayoutpageDeleteCall<'a, C, A> { - self._page_id = 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. /// /// 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 Delegate) -> StorelayoutpageDeleteCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> StorelayoutpageListCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -4630,7 +4242,7 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> StorelayoutpageDeleteCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> StorelayoutpageListCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -4647,7 +4259,7 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutpageDeleteCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> StorelayoutpageListCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -4655,9 +4267,9 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut::default(), None); /// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = StorePage::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.storelayoutpages().patch(req, "enterpriseId", "pageId") +/// let result = hub.storelayoutpages().get("enterpriseId", "pageId") /// .doit(); /// # } /// ``` -pub struct StorelayoutpagePatchCall<'a, C, A> +pub struct StorelayoutpageGetCall<'a, C, A> where C: 'a, A: 'a { hub: &'a AndroidEnterprise, - _request: StorePage, _enterprise_id: String, _page_id: String, _delegate: Option<&'a mut Delegate>, @@ -4703,9 +4308,9 @@ pub struct StorelayoutpagePatchCall<'a, C, A> _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for StorelayoutpagePatchCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for StorelayoutpageGetCall<'a, C, A> {} -impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> StorelayoutpageGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. @@ -4717,9 +4322,9 @@ impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.patch", - http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("enterpriseId", self._enterprise_id.to_string())); params.push(("pageId", self._page_id.to_string())); for &field in ["alt", "enterpriseId", "pageId"].iter() { @@ -4766,17 +4371,6 @@ impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut StorelayoutpagePatchCall<'a, C, A> { - self._request = new_value; - self - } /// The ID of the enterprise. /// /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutpagePatchCall<'a, C, A> { + pub fn enterprise_id(mut self, new_value: &str) -> StorelayoutpageGetCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } @@ -4877,7 +4458,7 @@ impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut StorelayoutpagePatchCall<'a, C, A> { + pub fn page_id(mut self, new_value: &str) -> StorelayoutpageGetCall<'a, C, A> { self._page_id = new_value.to_string(); self } @@ -4887,7 +4468,7 @@ impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut StorelayoutpagePatchCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> StorelayoutpageGetCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -4908,7 +4489,7 @@ impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> StorelayoutpagePatchCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> StorelayoutpageGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -4925,273 +4506,7 @@ impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutpagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Inserts a new store page. -/// -/// A builder for the *insert* method supported by a *storelayoutpage* resource. -/// It is not used directly, but through a `StorelayoutpageMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// use androidenterprise1::StorePage; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = StorePage::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.storelayoutpages().insert(req, "enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct StorelayoutpageInsertCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _request: StorePage, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for StorelayoutpageInsertCall<'a, C, A> {} - -impl<'a, C, A> StorelayoutpageInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, StorePage)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.insert", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["alt", "enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: StorePage) -> StorelayoutpageInsertCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutpageInsertCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> StorelayoutpageInsertCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> StorelayoutpageInsertCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> StorelayoutpageInsertCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> StorelayoutpageGetCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -5477,9 +4792,9 @@ impl<'a, C, A> StorelayoutpageUpdateCall<'a, C, A> where C: BorrowMut StorelayoutpageUpdateCall<'a, C, A> where C: BorrowMut StorelayoutpageUpdateCall<'a, C, A> where C: BorrowMut::default(), None); /// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = StorePage::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.storelayoutpages().get("enterpriseId", "pageId") +/// let result = hub.storelayoutpages().insert(req, "enterpriseId") /// .doit(); /// # } /// ``` -pub struct StorelayoutpageGetCall<'a, C, A> +pub struct StorelayoutpageInsertCall<'a, C, A> where C: 'a, A: 'a { hub: &'a AndroidEnterprise, + _request: StorePage, _enterprise_id: String, - _page_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for StorelayoutpageGetCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for StorelayoutpageInsertCall<'a, C, A> {} -impl<'a, C, A> StorelayoutpageGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> StorelayoutpageInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. @@ -5532,256 +4853,10 @@ impl<'a, C, A> StorelayoutpageGetCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.get", - http_method: hyper::method::Method::Get }); + dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.insert", + http_method: hyper::method::Method::Post }); let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("pageId", self._page_id.to_string())); - for &field in ["alt", "enterpriseId", "pageId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{pageId}", "pageId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["pageId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutpageGetCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the page. - /// - /// Sets the *page id* 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 page_id(mut self, new_value: &str) -> StorelayoutpageGetCall<'a, C, A> { - self._page_id = 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. - /// - /// 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 Delegate) -> StorelayoutpageGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> StorelayoutpageGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> StorelayoutpageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Retrieves the details of all pages in the store. -/// -/// A builder for the *list* method supported by a *storelayoutpage* resource. -/// It is not used directly, but through a `StorelayoutpageMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.storelayoutpages().list("enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct StorelayoutpageListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for StorelayoutpageListCall<'a, C, A> {} - -impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, StoreLayoutPagesListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); for &field in ["alt", "enterpriseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); @@ -5826,6 +4901,17 @@ impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut StorelayoutpageListCall<'a, C, A> where C: BorrowMut StorelayoutpageListCall<'a, C, A> where C: BorrowMut StorelayoutpageInsertCall<'a, C, A> { + self._request = new_value; + self + } /// The ID of the enterprise. /// /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutpageListCall<'a, C, A> { + pub fn enterprise_id(mut self, new_value: &str) -> StorelayoutpageInsertCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } @@ -5913,7 +5012,7 @@ impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut StorelayoutpageListCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> StorelayoutpageInsertCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -5934,7 +5033,7 @@ impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> StorelayoutpageListCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> StorelayoutpageInsertCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -5951,7 +5050,7 @@ impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutpageListCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> StorelayoutpageInsertCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -5959,10 +5058,10 @@ impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut StorelayoutpageListCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.collectionviewers().get("enterpriseId", "collectionId", "userId") -/// .doit(); -/// # } -/// ``` -pub struct CollectionviewerGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _collection_id: String, - _user_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CollectionviewerGetCall<'a, C, A> {} - -impl<'a, C, A> CollectionviewerGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.collectionviewers.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("collectionId", self._collection_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "enterpriseId", "collectionId", "userId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{collectionId}", "collectionId"), ("{userId}", "userId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(3); - for param_name in ["userId", "collectionId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> CollectionviewerGetCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the collection. - /// - /// Sets the *collection id* 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 collection_id(mut self, new_value: &str) -> CollectionviewerGetCall<'a, C, A> { - self._collection_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> CollectionviewerGetCall<'a, C, A> { - self._user_id = 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. - /// - /// 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 Delegate) -> CollectionviewerGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> CollectionviewerGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> CollectionviewerGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. This method supports patch semantics. -/// -/// A builder for the *patch* method supported by a *collectionviewer* resource. -/// It is not used directly, but through a `CollectionviewerMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// use androidenterprise1::User; +/// use androidenterprise1::StorePage; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -6245,35 +5085,34 @@ impl<'a, C, A> CollectionviewerGetCall<'a, C, A> where C: BorrowMut +pub struct StorelayoutpagePatchCall<'a, C, A> where C: 'a, A: 'a { hub: &'a AndroidEnterprise, - _request: User, + _request: StorePage, _enterprise_id: String, - _collection_id: String, - _user_id: String, + _page_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for CollectionviewerPatchCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for StorelayoutpagePatchCall<'a, C, A> {} -impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, StorePage)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -6281,13 +5120,12 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "androidenterprise.collectionviewers.patch", + dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.patch", http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("collectionId", self._collection_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "enterpriseId", "collectionId", "userId"].iter() { + params.push(("pageId", self._page_id.to_string())); + for &field in ["alt", "enterpriseId", "pageId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -6299,12 +5137,12 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -6315,8 +5153,8 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(3); - for param_name in ["userId", "collectionId", "enterpriseId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["pageId", "enterpriseId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -6422,7 +5260,7 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut CollectionviewerPatchCall<'a, C, A> { + pub fn request(mut self, new_value: StorePage) -> StorelayoutpagePatchCall<'a, C, A> { self._request = new_value; self } @@ -6432,28 +5270,18 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut CollectionviewerPatchCall<'a, C, A> { + pub fn enterprise_id(mut self, new_value: &str) -> StorelayoutpagePatchCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// The ID of the collection. + /// The ID of the page. /// - /// Sets the *collection id* path property to the given value. + /// Sets the *page id* 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 collection_id(mut self, new_value: &str) -> CollectionviewerPatchCall<'a, C, A> { - self._collection_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> CollectionviewerPatchCall<'a, C, A> { - self._user_id = new_value.to_string(); + pub fn page_id(mut self, new_value: &str) -> StorelayoutpagePatchCall<'a, C, A> { + self._page_id = new_value.to_string(); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -6462,7 +5290,7 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut CollectionviewerPatchCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> StorelayoutpagePatchCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -6483,7 +5311,7 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CollectionviewerPatchCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> StorelayoutpagePatchCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -6500,7 +5328,7 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CollectionviewerPatchCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> StorelayoutpagePatchCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -6508,10 +5336,10 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut CollectionviewerPatchCall<'a, C, A> where C: BorrowMut +pub struct StorelayoutpageDeleteCall<'a, C, A> where C: 'a, A: 'a { hub: &'a AndroidEnterprise, _enterprise_id: String, - _collection_id: String, + _page_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for CollectionviewerListCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for StorelayoutpageDeleteCall<'a, C, A> {} -impl<'a, C, A> CollectionviewerListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, CollectionViewersListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.collectionviewers.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("collectionId", self._collection_id.to_string())); - for &field in ["alt", "enterpriseId", "collectionId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}/users".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{collectionId}", "collectionId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["collectionId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> CollectionviewerListCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the collection. - /// - /// Sets the *collection id* 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 collection_id(mut self, new_value: &str) -> CollectionviewerListCall<'a, C, A> { - self._collection_id = 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. - /// - /// 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 Delegate) -> CollectionviewerListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> CollectionviewerListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> CollectionviewerListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Removes the user from the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. -/// -/// A builder for the *delete* method supported by a *collectionviewer* resource. -/// It is not used directly, but through a `CollectionviewerMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.collectionviewers().delete("enterpriseId", "collectionId", "userId") -/// .doit(); -/// # } -/// ``` -pub struct CollectionviewerDeleteCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _collection_id: String, - _user_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CollectionviewerDeleteCall<'a, C, A> {} - -impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. @@ -6811,13 +5391,12 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "androidenterprise.collectionviewers.delete", + dlg.begin(MethodInfo { id: "androidenterprise.storelayoutpages.delete", http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("collectionId", self._collection_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["enterpriseId", "collectionId", "userId"].iter() { + params.push(("pageId", self._page_id.to_string())); + for &field in ["enterpriseId", "pageId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -6828,12 +5407,12 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -6844,8 +5423,8 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(3); - for param_name in ["userId", "collectionId", "enterpriseId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["pageId", "enterpriseId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -6927,28 +5506,18 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut CollectionviewerDeleteCall<'a, C, A> { + pub fn enterprise_id(mut self, new_value: &str) -> StorelayoutpageDeleteCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } - /// The ID of the collection. + /// The ID of the page. /// - /// Sets the *collection id* path property to the given value. + /// Sets the *page id* 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 collection_id(mut self, new_value: &str) -> CollectionviewerDeleteCall<'a, C, A> { - self._collection_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> CollectionviewerDeleteCall<'a, C, A> { - self._user_id = new_value.to_string(); + pub fn page_id(mut self, new_value: &str) -> StorelayoutpageDeleteCall<'a, C, A> { + self._page_id = new_value.to_string(); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -6957,7 +5526,7 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut CollectionviewerDeleteCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> StorelayoutpageDeleteCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -6978,7 +5547,7 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CollectionviewerDeleteCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> StorelayoutpageDeleteCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -6995,297 +5564,7 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CollectionviewerDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. -/// -/// A builder for the *update* method supported by a *collectionviewer* resource. -/// It is not used directly, but through a `CollectionviewerMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// use androidenterprise1::User; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = User::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.collectionviewers().update(req, "enterpriseId", "collectionId", "userId") -/// .doit(); -/// # } -/// ``` -pub struct CollectionviewerUpdateCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _request: User, - _enterprise_id: String, - _collection_id: String, - _user_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CollectionviewerUpdateCall<'a, C, A> {} - -impl<'a, C, A> CollectionviewerUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.collectionviewers.update", - http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("collectionId", self._collection_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "enterpriseId", "collectionId", "userId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{collectionId}", "collectionId"), ("{userId}", "userId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(3); - for param_name in ["userId", "collectionId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: User) -> CollectionviewerUpdateCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> CollectionviewerUpdateCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the collection. - /// - /// Sets the *collection id* 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 collection_id(mut self, new_value: &str) -> CollectionviewerUpdateCall<'a, C, A> { - self._collection_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> CollectionviewerUpdateCall<'a, C, A> { - self._user_id = 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. - /// - /// 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 Delegate) -> CollectionviewerUpdateCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> CollectionviewerUpdateCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> CollectionviewerUpdateCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> StorelayoutpageDeleteCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -7809,6 +6088,985 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa } +/// Retrieves a user's details. +/// +/// A builder for the *get* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().get("enterpriseId", "userId") +/// .doit(); +/// # } +/// ``` +pub struct UserGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserGetCall<'a, C, A> {} + +impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.users.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + for &field in ["alt", "enterpriseId", "userId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._user_id = 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. + /// + /// 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 Delegate) -> UserGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserGetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> UserGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Deleted an EMM-managed user. +/// +/// A builder for the *delete* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().delete("enterpriseId", "userId") +/// .doit(); +/// # } +/// ``` +pub struct UserDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserDeleteCall<'a, C, A> {} + +impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.users.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + for &field in ["enterpriseId", "userId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserDeleteCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserDeleteCall<'a, C, A> { + self._user_id = 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. + /// + /// 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 Delegate) -> UserDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> UserDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Generates an authentication token which the device policy client can use to provision the given EMM-managed user account on a device. The generated token is single-use and expires after a few minutes. +/// +/// This call only works with EMM-managed accounts. +/// +/// A builder for the *generateAuthenticationToken* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().generate_authentication_token("enterpriseId", "userId") +/// .doit(); +/// # } +/// ``` +pub struct UserGenerateAuthenticationTokenCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserGenerateAuthenticationTokenCall<'a, C, A> {} + +impl<'a, C, A> UserGenerateAuthenticationTokenCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, AuthenticationToken)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.users.generateAuthenticationToken", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + for &field in ["alt", "enterpriseId", "userId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/authenticationToken".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserGenerateAuthenticationTokenCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserGenerateAuthenticationTokenCall<'a, C, A> { + self._user_id = 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. + /// + /// 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 Delegate) -> UserGenerateAuthenticationTokenCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserGenerateAuthenticationTokenCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> UserGenerateAuthenticationTokenCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Looks up a user by primary email address. This is only supported for Google-managed users. Lookup of the id is not needed for EMM-managed users because the id is already returned in the result of the Users.insert call. +/// +/// A builder for the *list* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().list("enterpriseId", "email") +/// .doit(); +/// # } +/// ``` +pub struct UserListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _email: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserListCall<'a, C, A> {} + +impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, UsersListResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.users.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("email", self._email.to_string())); + for &field in ["alt", "enterpriseId", "email"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserListCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The exact primary email address of the user to look up. + /// + /// Sets the *email* query 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 email(mut self, new_value: &str) -> UserListCall<'a, C, A> { + self._email = 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. + /// + /// 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 Delegate) -> UserListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> UserListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Updates the details of an EMM-managed user. /// /// Can be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the displayName field can be changed. Other fields must either be unset or have the currently active value. This method supports patch semantics. @@ -8089,7 +7347,525 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau } -/// Modifies the set of products a user is entitled to access. +/// Creates a new EMM-managed user. +/// +/// The Users resource passed in the body of the request should include an accountIdentifier and an accountType. +/// If a corresponding user already exists with the same account identifier, the user will be updated with the resource. In this case only the displayName field can be changed. +/// +/// A builder for the *insert* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// use androidenterprise1::User; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = User::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.users().insert(req, "enterpriseId") +/// .doit(); +/// # } +/// ``` +pub struct UserInsertCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _request: User, + _enterprise_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserInsertCall<'a, C, A> {} + +impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.users.insert", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + for &field in ["alt", "enterpriseId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: User) -> UserInsertCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserInsertCall<'a, C, A> { + self._enterprise_id = 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. + /// + /// 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 Delegate) -> UserInsertCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserInsertCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> UserInsertCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Generates a token (activation code) to allow this user to configure their managed account in the Android Setup Wizard. Revokes any previously generated token. +/// +/// This call only works with Google managed accounts. +/// +/// A builder for the *generateToken* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().generate_token("enterpriseId", "userId") +/// .doit(); +/// # } +/// ``` +pub struct UserGenerateTokenCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserGenerateTokenCall<'a, C, A> {} + +impl<'a, C, A> UserGenerateTokenCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, UserToken)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.users.generateToken", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + for &field in ["alt", "enterpriseId", "userId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/token".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserGenerateTokenCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserGenerateTokenCall<'a, C, A> { + self._user_id = 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. + /// + /// 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 Delegate) -> UserGenerateTokenCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserGenerateTokenCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> UserGenerateTokenCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Modifies the set of products that a user is entitled to access (referred to as whitelisted products). Only products that are approved or products that were previously approved (products with revoked approval) can be whitelisted. /// /// A builder for the *setAvailableProductSet* method supported by a *user* resource. /// It is not used directly, but through a `UserMethods` instance. @@ -8614,1504 +8390,7 @@ impl<'a, C, A> UserGetAvailableProductSetCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().get("enterpriseId", "userId") -/// .doit(); -/// # } -/// ``` -pub struct UserGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for UserGetCall<'a, C, A> {} - -impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.users.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "enterpriseId", "userId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { - self._user_id = 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. - /// - /// 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 Delegate) -> UserGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> UserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Creates a new EMM-managed user. -/// -/// The Users resource passed in the body of the request should include an accountIdentifier and an accountType. -/// If a corresponding user already exists with the same account identifier, the user will be updated with the resource. In this case only the displayName field can be changed. -/// -/// A builder for the *insert* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// use androidenterprise1::User; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = User::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.users().insert(req, "enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct UserInsertCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _request: User, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for UserInsertCall<'a, C, A> {} - -impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.users.insert", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["alt", "enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: User) -> UserInsertCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserInsertCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> UserInsertCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserInsertCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> UserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token. -/// -/// This call only works with Google managed accounts. -/// -/// A builder for the *generateToken* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().generate_token("enterpriseId", "userId") -/// .doit(); -/// # } -/// ``` -pub struct UserGenerateTokenCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for UserGenerateTokenCall<'a, C, A> {} - -impl<'a, C, A> UserGenerateTokenCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, UserToken)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.users.generateToken", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "enterpriseId", "userId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/token".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserGenerateTokenCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserGenerateTokenCall<'a, C, A> { - self._user_id = 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. - /// - /// 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 Delegate) -> UserGenerateTokenCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserGenerateTokenCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> UserGenerateTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Deleted an EMM-managed user. -/// -/// A builder for the *delete* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().delete("enterpriseId", "userId") -/// .doit(); -/// # } -/// ``` -pub struct UserDeleteCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for UserDeleteCall<'a, C, A> {} - -impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.users.delete", - http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["enterpriseId", "userId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = res; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserDeleteCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserDeleteCall<'a, C, A> { - self._user_id = 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. - /// - /// 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 Delegate) -> UserDeleteCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserDeleteCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> UserDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Looks up a user by primary email address. This is only supported for Google-managed users. Lookup of the id is not needed for EMM-managed users because the id is already returned in the result of the Users.insert call. -/// -/// A builder for the *list* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().list("enterpriseId", "email") -/// .doit(); -/// # } -/// ``` -pub struct UserListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _email: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for UserListCall<'a, C, A> {} - -impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, UsersListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.users.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("email", self._email.to_string())); - for &field in ["alt", "enterpriseId", "email"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserListCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The exact primary email address of the user to look up. - /// - /// Sets the *email* query 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 email(mut self, new_value: &str) -> UserListCall<'a, C, A> { - self._email = 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. - /// - /// 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 Delegate) -> UserListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> UserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Generates an authentication token which the device policy client can use to provision the given EMM-managed user account on a device. The generated token is single-use and expires after a few minutes. -/// -/// This call only works with EMM-managed accounts. -/// -/// A builder for the *generateAuthenticationToken* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.users().generate_authentication_token("enterpriseId", "userId") -/// .doit(); -/// # } -/// ``` -pub struct UserGenerateAuthenticationTokenCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for UserGenerateAuthenticationTokenCall<'a, C, A> {} - -impl<'a, C, A> UserGenerateAuthenticationTokenCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, AuthenticationToken)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.users.generateAuthenticationToken", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "enterpriseId", "userId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/authenticationToken".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> UserGenerateAuthenticationTokenCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserGenerateAuthenticationTokenCall<'a, C, A> { - self._user_id = 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. - /// - /// 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 Delegate) -> UserGenerateAuthenticationTokenCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserGenerateAuthenticationTokenCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> UserGenerateAuthenticationTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics. +/// Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *install* resource. /// It is not used directly, but through a `InstallMethods` instance. @@ -10413,266 +8692,6 @@ impl<'a, C, A> InstallPatchCall<'a, C, A> where C: BorrowMut, A: } -/// Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. -/// -/// A builder for the *delete* method supported by a *install* resource. -/// It is not used directly, but through a `InstallMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.installs().delete("enterpriseId", "userId", "deviceId", "installId") -/// .doit(); -/// # } -/// ``` -pub struct InstallDeleteCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _device_id: String, - _install_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for InstallDeleteCall<'a, C, A> {} - -impl<'a, C, A> InstallDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.installs.delete", - http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - params.push(("deviceId", self._device_id.to_string())); - params.push(("installId", self._install_id.to_string())); - for &field in ["enterpriseId", "userId", "deviceId", "installId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId"), ("{installId}", "installId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(4); - for param_name in ["installId", "deviceId", "userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = res; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { - self._user_id = new_value.to_string(); - self - } - /// The Android ID of the device. - /// - /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { - self._device_id = new_value.to_string(); - self - } - /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". - /// - /// Sets the *install id* 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 install_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { - self._install_id = 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. - /// - /// 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 Delegate) -> InstallDeleteCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> InstallDeleteCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> InstallDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Retrieves details of an installation of an app on a device. /// /// A builder for the *get* method supported by a *install* resource. @@ -11203,7 +9222,267 @@ impl<'a, C, A> InstallListCall<'a, C, A> where C: BorrowMut, A: o } -/// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. +/// Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. +/// +/// A builder for the *delete* method supported by a *install* resource. +/// It is not used directly, but through a `InstallMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.installs().delete("enterpriseId", "userId", "deviceId", "installId") +/// .doit(); +/// # } +/// ``` +pub struct InstallDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _device_id: String, + _install_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for InstallDeleteCall<'a, C, A> {} + +impl<'a, C, A> InstallDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.installs.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + params.push(("deviceId", self._device_id.to_string())); + params.push(("installId", self._install_id.to_string())); + for &field in ["enterpriseId", "userId", "deviceId", "installId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId"), ("{installId}", "installId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(4); + for param_name in ["installId", "deviceId", "userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// The Android ID of the device. + /// + /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { + self._device_id = new_value.to_string(); + self + } + /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". + /// + /// Sets the *install id* 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 install_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, A> { + self._install_id = 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. + /// + /// 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 Delegate) -> InstallDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> InstallDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> InstallDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Requests to install the latest version of an app to a device. If the app is already installed, then it is updated to the latest version if necessary. /// /// A builder for the *update* method supported by a *install* resource. /// It is not used directly, but through a `InstallMethods` instance. @@ -11987,6 +10266,525 @@ impl<'a, C, A> GrouplicenseListCall<'a, C, A> where C: BorrowMut, } +/// Removes a per-device managed configuration for an app for the specified device. +/// +/// A builder for the *delete* method supported by a *managedconfigurationsfordevice* resource. +/// It is not used directly, but through a `ManagedconfigurationsfordeviceMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.managedconfigurationsfordevice().delete("enterpriseId", "userId", "deviceId", "managedConfigurationForDeviceId") +/// .doit(); +/// # } +/// ``` +pub struct ManagedconfigurationsfordeviceDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _device_id: String, + _managed_configuration_for_device_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ManagedconfigurationsfordeviceDeleteCall<'a, C, A> {} + +impl<'a, C, A> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.managedconfigurationsfordevice.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + params.push(("deviceId", self._device_id.to_string())); + params.push(("managedConfigurationForDeviceId", self._managed_configuration_for_device_id.to_string())); + for &field in ["enterpriseId", "userId", "deviceId", "managedConfigurationForDeviceId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId"), ("{managedConfigurationForDeviceId}", "managedConfigurationForDeviceId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(4); + for param_name in ["managedConfigurationForDeviceId", "deviceId", "userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// The Android ID of the device. + /// + /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { + self._device_id = new_value.to_string(); + self + } + /// The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". + /// + /// Sets the *managed configuration for device id* 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 managed_configuration_for_device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { + self._managed_configuration_for_device_id = 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. + /// + /// 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 Delegate) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists all the per-device managed configurations for the specified device. Only the ID is set. +/// +/// A builder for the *list* method supported by a *managedconfigurationsfordevice* resource. +/// It is not used directly, but through a `ManagedconfigurationsfordeviceMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.managedconfigurationsfordevice().list("enterpriseId", "userId", "deviceId") +/// .doit(); +/// # } +/// ``` +pub struct ManagedconfigurationsfordeviceListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _device_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ManagedconfigurationsfordeviceListCall<'a, C, A> {} + +impl<'a, C, A> ManagedconfigurationsfordeviceListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ManagedConfigurationsForDeviceListResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.managedconfigurationsfordevice.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + params.push(("deviceId", self._device_id.to_string())); + for &field in ["alt", "enterpriseId", "userId", "deviceId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["deviceId", "userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceListCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceListCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// The Android ID of the device. + /// + /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceListCall<'a, C, A> { + self._device_id = 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. + /// + /// 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 Delegate) -> ManagedconfigurationsfordeviceListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ManagedconfigurationsfordeviceListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> ManagedconfigurationsfordeviceListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Adds or updates a per-device managed configuration for an app for the specified device. /// /// A builder for the *update* method supported by a *managedconfigurationsfordevice* resource. @@ -12289,6 +11087,277 @@ impl<'a, C, A> ManagedconfigurationsfordeviceUpdateCall<'a, C, A> where C: Borro } +/// Retrieves details of a per-device managed configuration. +/// +/// A builder for the *get* method supported by a *managedconfigurationsfordevice* resource. +/// It is not used directly, but through a `ManagedconfigurationsfordeviceMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.managedconfigurationsfordevice().get("enterpriseId", "userId", "deviceId", "managedConfigurationForDeviceId") +/// .doit(); +/// # } +/// ``` +pub struct ManagedconfigurationsfordeviceGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _device_id: String, + _managed_configuration_for_device_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ManagedconfigurationsfordeviceGetCall<'a, C, A> {} + +impl<'a, C, A> ManagedconfigurationsfordeviceGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ManagedConfiguration)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.managedconfigurationsfordevice.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + params.push(("deviceId", self._device_id.to_string())); + params.push(("managedConfigurationForDeviceId", self._managed_configuration_for_device_id.to_string())); + for &field in ["alt", "enterpriseId", "userId", "deviceId", "managedConfigurationForDeviceId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId"), ("{managedConfigurationForDeviceId}", "managedConfigurationForDeviceId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(4); + for param_name in ["managedConfigurationForDeviceId", "deviceId", "userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// The Android ID of the device. + /// + /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { + self._device_id = new_value.to_string(); + self + } + /// The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". + /// + /// Sets the *managed configuration for device id* 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 managed_configuration_for_device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { + self._managed_configuration_for_device_id = 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. + /// + /// 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 Delegate) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Adds or updates a per-device managed configuration for an app for the specified device. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *managedconfigurationsfordevice* resource. @@ -12591,796 +11660,6 @@ impl<'a, C, A> ManagedconfigurationsfordevicePatchCall<'a, C, A> where C: Borrow } -/// Lists all the per-device managed configurations for the specified device. Only the ID is set. -/// -/// A builder for the *list* method supported by a *managedconfigurationsfordevice* resource. -/// It is not used directly, but through a `ManagedconfigurationsfordeviceMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.managedconfigurationsfordevice().list("enterpriseId", "userId", "deviceId") -/// .doit(); -/// # } -/// ``` -pub struct ManagedconfigurationsfordeviceListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _device_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ManagedconfigurationsfordeviceListCall<'a, C, A> {} - -impl<'a, C, A> ManagedconfigurationsfordeviceListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ManagedConfigurationsForDeviceListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.managedconfigurationsfordevice.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - params.push(("deviceId", self._device_id.to_string())); - for &field in ["alt", "enterpriseId", "userId", "deviceId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(3); - for param_name in ["deviceId", "userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceListCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceListCall<'a, C, A> { - self._user_id = new_value.to_string(); - self - } - /// The Android ID of the device. - /// - /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceListCall<'a, C, A> { - self._device_id = 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. - /// - /// 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 Delegate) -> ManagedconfigurationsfordeviceListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ManagedconfigurationsfordeviceListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> ManagedconfigurationsfordeviceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Removes a per-device managed configuration for an app for the specified device. -/// -/// A builder for the *delete* method supported by a *managedconfigurationsfordevice* resource. -/// It is not used directly, but through a `ManagedconfigurationsfordeviceMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.managedconfigurationsfordevice().delete("enterpriseId", "userId", "deviceId", "managedConfigurationForDeviceId") -/// .doit(); -/// # } -/// ``` -pub struct ManagedconfigurationsfordeviceDeleteCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _device_id: String, - _managed_configuration_for_device_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ManagedconfigurationsfordeviceDeleteCall<'a, C, A> {} - -impl<'a, C, A> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.managedconfigurationsfordevice.delete", - http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - params.push(("deviceId", self._device_id.to_string())); - params.push(("managedConfigurationForDeviceId", self._managed_configuration_for_device_id.to_string())); - for &field in ["enterpriseId", "userId", "deviceId", "managedConfigurationForDeviceId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId"), ("{managedConfigurationForDeviceId}", "managedConfigurationForDeviceId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(4); - for param_name in ["managedConfigurationForDeviceId", "deviceId", "userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = res; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { - self._user_id = new_value.to_string(); - self - } - /// The Android ID of the device. - /// - /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { - self._device_id = new_value.to_string(); - self - } - /// The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". - /// - /// Sets the *managed configuration for device id* 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 managed_configuration_for_device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { - self._managed_configuration_for_device_id = 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. - /// - /// 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 Delegate) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Retrieves details of a per-device managed configuration. -/// -/// A builder for the *get* method supported by a *managedconfigurationsfordevice* resource. -/// It is not used directly, but through a `ManagedconfigurationsfordeviceMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.managedconfigurationsfordevice().get("enterpriseId", "userId", "deviceId", "managedConfigurationForDeviceId") -/// .doit(); -/// # } -/// ``` -pub struct ManagedconfigurationsfordeviceGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _device_id: String, - _managed_configuration_for_device_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ManagedconfigurationsfordeviceGetCall<'a, C, A> {} - -impl<'a, C, A> ManagedconfigurationsfordeviceGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ManagedConfiguration)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.managedconfigurationsfordevice.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - params.push(("deviceId", self._device_id.to_string())); - params.push(("managedConfigurationForDeviceId", self._managed_configuration_for_device_id.to_string())); - for &field in ["alt", "enterpriseId", "userId", "deviceId", "managedConfigurationForDeviceId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId"), ("{managedConfigurationForDeviceId}", "managedConfigurationForDeviceId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(4); - for param_name in ["managedConfigurationForDeviceId", "deviceId", "userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { - self._user_id = new_value.to_string(); - self - } - /// The Android ID of the device. - /// - /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { - self._device_id = new_value.to_string(); - self - } - /// The ID of the managed configuration (a product ID), e.g. "app:com.google.android.gm". - /// - /// Sets the *managed configuration for device id* 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 managed_configuration_for_device_id(mut self, new_value: &str) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { - self._managed_configuration_for_device_id = 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. - /// - /// 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 Delegate) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users. /// /// A builder for the *setState* method supported by a *device* resource. @@ -13671,265 +11950,6 @@ impl<'a, C, A> DeviceSetStateCall<'a, C, A> where C: BorrowMut, A } -/// Retrieves the details of a device. -/// -/// A builder for the *get* method supported by a *device* resource. -/// It is not used directly, but through a `DeviceMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.devices().get("enterpriseId", "userId", "deviceId") -/// .doit(); -/// # } -/// ``` -pub struct DeviceGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _device_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for DeviceGetCall<'a, C, A> {} - -impl<'a, C, A> DeviceGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Device)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.devices.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - params.push(("deviceId", self._device_id.to_string())); - for &field in ["alt", "enterpriseId", "userId", "deviceId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(3); - for param_name in ["deviceId", "userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, A> { - self._user_id = new_value.to_string(); - self - } - /// The ID of the device. - /// - /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, A> { - self._device_id = 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. - /// - /// 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 Delegate) -> DeviceGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> DeviceGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> DeviceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users. /// /// A builder for the *getState* method supported by a *device* resource. @@ -14436,6 +12456,692 @@ impl<'a, C, A> DeviceListCall<'a, C, A> where C: BorrowMut, A: oa } +/// Retrieves the details of a device. +/// +/// A builder for the *get* method supported by a *device* resource. +/// It is not used directly, but through a `DeviceMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.devices().get("enterpriseId", "userId", "deviceId") +/// .doit(); +/// # } +/// ``` +pub struct DeviceGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _device_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for DeviceGetCall<'a, C, A> {} + +impl<'a, C, A> DeviceGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Device)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.devices.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + params.push(("deviceId", self._device_id.to_string())); + for &field in ["alt", "enterpriseId", "userId", "deviceId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{deviceId}", "deviceId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["deviceId", "userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// The ID of the device. + /// + /// Sets the *device id* 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 device_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, A> { + self._device_id = 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. + /// + /// 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 Delegate) -> DeviceGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> DeviceGetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> DeviceGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications. +/// +/// A builder for the *acknowledgeNotificationSet* method supported by a *enterprise* resource. +/// It is not used directly, but through a `EnterpriseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().acknowledge_notification_set() +/// .notification_set_id("nonumy") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseAcknowledgeNotificationSetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _notification_set_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseAcknowledgeNotificationSetCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.acknowledgeNotificationSet", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); + if let Some(value) = self._notification_set_id { + params.push(("notificationSetId", value.to_string())); + } + for &field in ["notificationSetId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/acknowledgeNotificationSet".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The notification set ID as returned by Enterprises.PullNotificationSet. This must be provided. + /// + /// Sets the *notification set id* query property to the given value. + pub fn notification_set_id(mut self, new_value: &str) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> { + self._notification_set_id = 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. + /// + /// 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 Delegate) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Unenrolls an enterprise from the calling EMM. +/// +/// A builder for the *unenroll* method supported by a *enterprise* resource. +/// It is not used directly, but through a `EnterpriseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().unenroll("enterpriseId") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseUnenrollCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseUnenrollCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseUnenrollCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.unenroll", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + for &field in ["enterpriseId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/unenroll".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseUnenrollCall<'a, C, A> { + self._enterprise_id = 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. + /// + /// 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 Delegate) -> EnterpriseUnenrollCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseUnenrollCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseUnenrollCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Establishes the binding between the EMM and an enterprise. This is now deprecated; use enroll instead. /// /// A builder for the *insert* method supported by a *enterprise* resource. @@ -14681,7 +13387,691 @@ impl<'a, C, A> EnterpriseInsertCall<'a, C, A> where C: BorrowMut, } -/// Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only contains apps approved by the administrator, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom"), the basic store layout is disabled. +/// Sends a test push notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise. +/// +/// A builder for the *sendTestPushNotification* method supported by a *enterprise* resource. +/// It is not used directly, but through a `EnterpriseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().send_test_push_notification("enterpriseId") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseSendTestPushNotificationCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseSendTestPushNotificationCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseSendTestPushNotificationCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, EnterprisesSendTestPushNotificationResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.sendTestPushNotification", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + for &field in ["alt", "enterpriseId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/sendTestPushNotification".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseSendTestPushNotificationCall<'a, C, A> { + self._enterprise_id = 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. + /// + /// 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 Delegate) -> EnterpriseSendTestPushNotificationCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseSendTestPushNotificationCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseSendTestPushNotificationCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the Enterprises.generateSignupUrl call. +/// +/// A builder for the *list* method supported by a *enterprise* resource. +/// It is not used directly, but through a `EnterpriseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().list("domain") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _domain: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseListCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, EnterprisesListResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("domain", self._domain.to_string())); + for &field in ["alt", "domain"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The exact primary domain name of the enterprise to look up. + /// + /// Sets the *domain* query 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 domain(mut self, new_value: &str) -> EnterpriseListCall<'a, C, A> { + self._domain = 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. + /// + /// 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 Delegate) -> EnterpriseListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns the store layout for the enterprise. If the store layout has not been set, returns "basic" as the store layout type and no homepage. +/// +/// A builder for the *getStoreLayout* method supported by a *enterprise* resource. +/// It is not used directly, but through a `EnterpriseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().get_store_layout("enterpriseId") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseGetStoreLayoutCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseGetStoreLayoutCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseGetStoreLayoutCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, StoreLayout)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.getStoreLayout", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + for &field in ["alt", "enterpriseId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseGetStoreLayoutCall<'a, C, A> { + self._enterprise_id = 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. + /// + /// 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 Delegate) -> EnterpriseGetStoreLayoutCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseGetStoreLayoutCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseGetStoreLayoutCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Sets the store layout for the enterprise. By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only contains apps approved by the admin, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom" and setting a homepage), the basic store layout is disabled. /// /// A builder for the *setStoreLayout* method supported by a *enterprise* resource. /// It is not used directly, but through a `EnterpriseMethods` instance. @@ -14947,8 +14337,234 @@ impl<'a, C, A> EnterpriseSetStoreLayoutCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().complete_signup() +/// .enterprise_token("ea") +/// .completion_token("sadipscing") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseCompleteSignupCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_token: Option, + _completion_token: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseCompleteSignupCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseCompleteSignupCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Enterprise)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.completeSignup", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + if let Some(value) = self._enterprise_token { + params.push(("enterpriseToken", value.to_string())); + } + if let Some(value) = self._completion_token { + params.push(("completionToken", value.to_string())); + } + for &field in ["alt", "enterpriseToken", "completionToken"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/completeSignup".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The Enterprise token appended to the Callback URL. + /// + /// Sets the *enterprise token* query property to the given value. + pub fn enterprise_token(mut self, new_value: &str) -> EnterpriseCompleteSignupCall<'a, C, A> { + self._enterprise_token = Some(new_value.to_string()); + self + } + /// The Completion token initially returned by GenerateSignupUrl. + /// + /// Sets the *completion token* query property to the given value. + pub fn completion_token(mut self, new_value: &str) -> EnterpriseCompleteSignupCall<'a, C, A> { + self._completion_token = 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. + /// + /// 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 Delegate) -> EnterpriseCompleteSignupCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseCompleteSignupCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseCompleteSignupCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending. -/// A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises​.AcknowledgeNotificationSet, unless the notification set is empty. +/// A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set is empty. /// Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy. /// Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending. /// If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available. @@ -14978,7 +14594,7 @@ impl<'a, C, A> EnterpriseSetStoreLayoutCall<'a, C, A> where C: BorrowMut EnterpriseEnrollCall<'a, C, A> where C: BorrowMut, } -/// Set the account that will be used to authenticate to the API as the enterprise. +/// Retrieves the name and domain of an enterprise. +/// +/// A builder for the *get* method supported by a *enterprise* resource. +/// It is not used directly, but through a `EnterpriseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().get("enterpriseId") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseGetCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Enterprise)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + for &field in ["alt", "enterpriseId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseGetCall<'a, C, A> { + self._enterprise_id = 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. + /// + /// 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 Delegate) -> EnterpriseGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseGetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side. +/// +/// This method can only be called after calling Enterprises.Enroll or Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other times it will return an error. +/// +/// Subsequent calls after the first will generate a new, unique set of credentials, and invalidate the previously generated credentials. +/// +/// Once the service account is bound to the enterprise, it can be managed using the serviceAccountKeys resource. +/// +/// A builder for the *getServiceAccount* method supported by a *enterprise* resource. +/// It is not used directly, but through a `EnterpriseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().get_service_account("enterpriseId") +/// .key_type("aliquyam") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseGetServiceAccountCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _key_type: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseGetServiceAccountCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseGetServiceAccountCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ServiceAccount)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.getServiceAccount", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + if let Some(value) = self._key_type { + params.push(("keyType", value.to_string())); + } + for &field in ["alt", "enterpriseId", "keyType"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/serviceAccount".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseGetServiceAccountCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The type of credential to return with the service account. Required. + /// + /// Sets the *key type* query property to the given value. + pub fn key_type(mut self, new_value: &str) -> EnterpriseGetServiceAccountCall<'a, C, A> { + self._key_type = 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. + /// + /// 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 Delegate) -> EnterpriseGetServiceAccountCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseGetServiceAccountCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseGetServiceAccountCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Sets the account that will be used to authenticate to the API as the enterprise. /// /// A builder for the *setAccount* method supported by a *enterprise* resource. /// It is not used directly, but through a `EnterpriseMethods` instance. @@ -15679,7 +15783,446 @@ impl<'a, C, A> EnterpriseSetAccountCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().delete("enterpriseId") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseDeleteCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + for &field in ["enterpriseId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseDeleteCall<'a, C, A> { + self._enterprise_id = 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. + /// + /// 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 Delegate) -> EnterpriseDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Generates a sign-up URL. +/// +/// A builder for the *generateSignupUrl* method supported by a *enterprise* resource. +/// It is not used directly, but through a `EnterpriseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().generate_signup_url() +/// .callback_url("consetetur") +/// .doit(); +/// # } +/// ``` +pub struct EnterpriseGenerateSignupUrlCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _callback_url: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for EnterpriseGenerateSignupUrlCall<'a, C, A> {} + +impl<'a, C, A> EnterpriseGenerateSignupUrlCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SignupInfo)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.enterprises.generateSignupUrl", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + if let Some(value) = self._callback_url { + params.push(("callbackUrl", value.to_string())); + } + for &field in ["alt", "callbackUrl"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/signupUrl".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The callback URL to which the Admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a single query parameter to this URL named "enterpriseToken" which will contain an opaque token to be used for the CompleteSignup request. + /// Beware that this means that the URL will be parsed, the parameter added and then a new URL formatted, i.e. there may be some minor formatting changes and, more importantly, the URL must be well-formed so that it can be parsed. + /// + /// Sets the *callback url* query property to the given value. + pub fn callback_url(mut self, new_value: &str) -> EnterpriseGenerateSignupUrlCall<'a, C, A> { + self._callback_url = 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. + /// + /// 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 Delegate) -> EnterpriseGenerateSignupUrlCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> EnterpriseGenerateSignupUrlCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> EnterpriseGenerateSignupUrlCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the managed Google Play javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information. /// /// A builder for the *createWebToken* method supported by a *enterprise* resource. /// It is not used directly, but through a `EnterpriseMethods` instance. @@ -15945,2517 +16488,6 @@ impl<'a, C, A> EnterpriseCreateWebTokenCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().list("domain") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _domain: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseListCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, EnterprisesListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("domain", self._domain.to_string())); - for &field in ["alt", "domain"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The exact primary domain name of the enterprise to look up. - /// - /// Sets the *domain* query 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 domain(mut self, new_value: &str) -> EnterpriseListCall<'a, C, A> { - self._domain = 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. - /// - /// 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 Delegate) -> EnterpriseListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Returns the store layout for the enterprise. If the store layout has not been set, or if the store layout has no homepageId set, returns a NOT_FOUND error. -/// -/// A builder for the *getStoreLayout* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().get_store_layout("enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseGetStoreLayoutCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseGetStoreLayoutCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseGetStoreLayoutCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, StoreLayout)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.getStoreLayout", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["alt", "enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseGetStoreLayoutCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> EnterpriseGetStoreLayoutCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseGetStoreLayoutCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseGetStoreLayoutCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given Enterprise Token. -/// -/// A builder for the *completeSignup* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().complete_signup() -/// .enterprise_token("eos") -/// .completion_token("tempor") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseCompleteSignupCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_token: Option, - _completion_token: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseCompleteSignupCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseCompleteSignupCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Enterprise)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.completeSignup", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - if let Some(value) = self._enterprise_token { - params.push(("enterpriseToken", value.to_string())); - } - if let Some(value) = self._completion_token { - params.push(("completionToken", value.to_string())); - } - for &field in ["alt", "enterpriseToken", "completionToken"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/completeSignup".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The Enterprise token appended to the Callback URL. - /// - /// Sets the *enterprise token* query property to the given value. - pub fn enterprise_token(mut self, new_value: &str) -> EnterpriseCompleteSignupCall<'a, C, A> { - self._enterprise_token = Some(new_value.to_string()); - self - } - /// The Completion token initially returned by GenerateSignupUrl. - /// - /// Sets the *completion token* query property to the given value. - pub fn completion_token(mut self, new_value: &str) -> EnterpriseCompleteSignupCall<'a, C, A> { - self._completion_token = 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. - /// - /// 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 Delegate) -> EnterpriseCompleteSignupCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseCompleteSignupCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseCompleteSignupCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side. -/// -/// This method can only be called after calling Enterprises.Enroll or Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other times it will return an error. -/// -/// Subsequent calls after the first will generate a new, unique set of credentials, and invalidate the previously generated credentials. -/// -/// Once the service account is bound to the enterprise, it can be managed using the serviceAccountKeys resource. -/// -/// A builder for the *getServiceAccount* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().get_service_account("enterpriseId") -/// .key_type("labore") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseGetServiceAccountCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _key_type: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseGetServiceAccountCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseGetServiceAccountCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ServiceAccount)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.getServiceAccount", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - if let Some(value) = self._key_type { - params.push(("keyType", value.to_string())); - } - for &field in ["alt", "enterpriseId", "keyType"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/serviceAccount".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseGetServiceAccountCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The type of credential to return with the service account. Required. - /// - /// Sets the *key type* query property to the given value. - pub fn key_type(mut self, new_value: &str) -> EnterpriseGetServiceAccountCall<'a, C, A> { - self._key_type = 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. - /// - /// 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 Delegate) -> EnterpriseGetServiceAccountCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseGetServiceAccountCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseGetServiceAccountCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications. -/// -/// A builder for the *acknowledgeNotificationSet* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().acknowledge_notification_set() -/// .notification_set_id("ipsum") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseAcknowledgeNotificationSetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _notification_set_id: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseAcknowledgeNotificationSetCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.acknowledgeNotificationSet", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); - if let Some(value) = self._notification_set_id { - params.push(("notificationSetId", value.to_string())); - } - for &field in ["notificationSetId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/acknowledgeNotificationSet".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = res; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The notification set ID as returned by Enterprises.PullNotificationSet. This must be provided. - /// - /// Sets the *notification set id* query property to the given value. - pub fn notification_set_id(mut self, new_value: &str) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> { - self._notification_set_id = 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. - /// - /// 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 Delegate) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Unenrolls an enterprise from the calling EMM. -/// -/// A builder for the *unenroll* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().unenroll("enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseUnenrollCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseUnenrollCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseUnenrollCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.unenroll", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/unenroll".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = res; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseUnenrollCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> EnterpriseUnenrollCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseUnenrollCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseUnenrollCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Sends a test push notification to validate the EMM integration with the Google Cloud Pub/Sub service for this enterprise. -/// -/// A builder for the *sendTestPushNotification* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().send_test_push_notification("enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseSendTestPushNotificationCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseSendTestPushNotificationCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseSendTestPushNotificationCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, EnterprisesSendTestPushNotificationResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.sendTestPushNotification", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["alt", "enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/sendTestPushNotification".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseSendTestPushNotificationCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> EnterpriseSendTestPushNotificationCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseSendTestPushNotificationCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseSendTestPushNotificationCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Retrieves the name and domain of an enterprise. -/// -/// A builder for the *get* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().get("enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseGetCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Enterprise)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["alt", "enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseGetCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> EnterpriseGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Deletes the binding between the EMM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call. -/// -/// A builder for the *delete* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().delete("enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseDeleteCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseDeleteCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.delete", - http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = res; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> EnterpriseDeleteCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> EnterpriseDeleteCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseDeleteCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Generates a sign-up URL. -/// -/// A builder for the *generateSignupUrl* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.enterprises().generate_signup_url() -/// .callback_url("ut") -/// .doit(); -/// # } -/// ``` -pub struct EnterpriseGenerateSignupUrlCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _callback_url: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for EnterpriseGenerateSignupUrlCall<'a, C, A> {} - -impl<'a, C, A> EnterpriseGenerateSignupUrlCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, SignupInfo)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.enterprises.generateSignupUrl", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - if let Some(value) = self._callback_url { - params.push(("callbackUrl", value.to_string())); - } - for &field in ["alt", "callbackUrl"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/signupUrl".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The callback URL to which the Admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a single query parameter to this URL named "enterpriseToken" which will contain an opaque token to be used for the CompleteSignup request. - /// Beware that this means that the URL will be parsed, the parameter added and then a new URL formatted, i.e. there may be some minor formatting changes and, more importantly, the URL must be well-formed so that it can be parsed. - /// - /// Sets the *callback url* query property to the given value. - pub fn callback_url(mut self, new_value: &str) -> EnterpriseGenerateSignupUrlCall<'a, C, A> { - self._callback_url = 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. - /// - /// 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 Delegate) -> EnterpriseGenerateSignupUrlCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EnterpriseGenerateSignupUrlCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> EnterpriseGenerateSignupUrlCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Retrieves the details of all clusters on the specified page. -/// -/// A builder for the *list* method supported by a *storelayoutcluster* resource. -/// It is not used directly, but through a `StorelayoutclusterMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.storelayoutclusters().list("enterpriseId", "pageId") -/// .doit(); -/// # } -/// ``` -pub struct StorelayoutclusterListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _page_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for StorelayoutclusterListCall<'a, C, A> {} - -impl<'a, C, A> StorelayoutclusterListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, StoreLayoutClustersListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.storelayoutclusters.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("pageId", self._page_id.to_string())); - for &field in ["alt", "enterpriseId", "pageId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{pageId}", "pageId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["pageId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutclusterListCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the page. - /// - /// Sets the *page id* 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 page_id(mut self, new_value: &str) -> StorelayoutclusterListCall<'a, C, A> { - self._page_id = 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. - /// - /// 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 Delegate) -> StorelayoutclusterListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> StorelayoutclusterListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> StorelayoutclusterListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Updates a cluster. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *storelayoutcluster* resource. @@ -18746,6 +16778,779 @@ impl<'a, C, A> StorelayoutclusterPatchCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.storelayoutclusters().delete("enterpriseId", "pageId", "clusterId") +/// .doit(); +/// # } +/// ``` +pub struct StorelayoutclusterDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _page_id: String, + _cluster_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for StorelayoutclusterDeleteCall<'a, C, A> {} + +impl<'a, C, A> StorelayoutclusterDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.storelayoutclusters.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("pageId", self._page_id.to_string())); + params.push(("clusterId", self._cluster_id.to_string())); + for &field in ["enterpriseId", "pageId", "clusterId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{pageId}", "pageId"), ("{clusterId}", "clusterId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["clusterId", "pageId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutclusterDeleteCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the page. + /// + /// Sets the *page id* 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 page_id(mut self, new_value: &str) -> StorelayoutclusterDeleteCall<'a, C, A> { + self._page_id = new_value.to_string(); + self + } + /// The ID of the cluster. + /// + /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> StorelayoutclusterDeleteCall<'a, C, A> { + self._cluster_id = 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. + /// + /// 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 Delegate) -> StorelayoutclusterDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> StorelayoutclusterDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> StorelayoutclusterDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Inserts a new cluster in a page. +/// +/// A builder for the *insert* method supported by a *storelayoutcluster* resource. +/// It is not used directly, but through a `StorelayoutclusterMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// use androidenterprise1::StoreCluster; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = StoreCluster::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.storelayoutclusters().insert(req, "enterpriseId", "pageId") +/// .doit(); +/// # } +/// ``` +pub struct StorelayoutclusterInsertCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _request: StoreCluster, + _enterprise_id: String, + _page_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for StorelayoutclusterInsertCall<'a, C, A> {} + +impl<'a, C, A> StorelayoutclusterInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, StoreCluster)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.storelayoutclusters.insert", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("pageId", self._page_id.to_string())); + for &field in ["alt", "enterpriseId", "pageId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{pageId}", "pageId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["pageId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: StoreCluster) -> StorelayoutclusterInsertCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutclusterInsertCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the page. + /// + /// Sets the *page id* 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 page_id(mut self, new_value: &str) -> StorelayoutclusterInsertCall<'a, C, A> { + self._page_id = 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. + /// + /// 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 Delegate) -> StorelayoutclusterInsertCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> StorelayoutclusterInsertCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> StorelayoutclusterInsertCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Retrieves the details of all clusters on the specified page. +/// +/// A builder for the *list* method supported by a *storelayoutcluster* resource. +/// It is not used directly, but through a `StorelayoutclusterMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.storelayoutclusters().list("enterpriseId", "pageId") +/// .doit(); +/// # } +/// ``` +pub struct StorelayoutclusterListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _page_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for StorelayoutclusterListCall<'a, C, A> {} + +impl<'a, C, A> StorelayoutclusterListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, StoreLayoutClustersListResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.storelayoutclusters.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("pageId", self._page_id.to_string())); + for &field in ["alt", "enterpriseId", "pageId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{pageId}", "pageId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["pageId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutclusterListCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the page. + /// + /// Sets the *page id* 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 page_id(mut self, new_value: &str) -> StorelayoutclusterListCall<'a, C, A> { + self._page_id = 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. + /// + /// 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 Delegate) -> StorelayoutclusterListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> StorelayoutclusterListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> StorelayoutclusterListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Updates a cluster. /// /// A builder for the *update* method supported by a *storelayoutcluster* resource. @@ -19295,532 +18100,6 @@ impl<'a, C, A> StorelayoutclusterGetCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = StoreCluster::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.storelayoutclusters().insert(req, "enterpriseId", "pageId") -/// .doit(); -/// # } -/// ``` -pub struct StorelayoutclusterInsertCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _request: StoreCluster, - _enterprise_id: String, - _page_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for StorelayoutclusterInsertCall<'a, C, A> {} - -impl<'a, C, A> StorelayoutclusterInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, StoreCluster)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.storelayoutclusters.insert", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("pageId", self._page_id.to_string())); - for &field in ["alt", "enterpriseId", "pageId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{pageId}", "pageId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["pageId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: StoreCluster) -> StorelayoutclusterInsertCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutclusterInsertCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the page. - /// - /// Sets the *page id* 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 page_id(mut self, new_value: &str) -> StorelayoutclusterInsertCall<'a, C, A> { - self._page_id = 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. - /// - /// 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 Delegate) -> StorelayoutclusterInsertCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> StorelayoutclusterInsertCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> StorelayoutclusterInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Deletes a cluster. -/// -/// A builder for the *delete* method supported by a *storelayoutcluster* resource. -/// It is not used directly, but through a `StorelayoutclusterMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.storelayoutclusters().delete("enterpriseId", "pageId", "clusterId") -/// .doit(); -/// # } -/// ``` -pub struct StorelayoutclusterDeleteCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _page_id: String, - _cluster_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for StorelayoutclusterDeleteCall<'a, C, A> {} - -impl<'a, C, A> StorelayoutclusterDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.storelayoutclusters.delete", - http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("pageId", self._page_id.to_string())); - params.push(("clusterId", self._cluster_id.to_string())); - for &field in ["enterpriseId", "pageId", "clusterId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{pageId}", "pageId"), ("{clusterId}", "clusterId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(3); - for param_name in ["clusterId", "pageId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = res; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> StorelayoutclusterDeleteCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the page. - /// - /// Sets the *page id* 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 page_id(mut self, new_value: &str) -> StorelayoutclusterDeleteCall<'a, C, A> { - self._page_id = new_value.to_string(); - self - } - /// The ID of the cluster. - /// - /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> StorelayoutclusterDeleteCall<'a, C, A> { - self._cluster_id = 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. - /// - /// 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 Delegate) -> StorelayoutclusterDeleteCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> StorelayoutclusterDeleteCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> StorelayoutclusterDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Retrieves the Android app permissions required by this app. /// /// A builder for the *getPermissions* method supported by a *product* resource. @@ -20304,9 +18583,529 @@ impl<'a, C, A> ProductUnapproveCall<'a, C, A> where C: BorrowMut, } +/// Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product. +/// +/// Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display permissions for up to 1 day. +/// +/// A builder for the *generateApprovalUrl* method supported by a *product* resource. +/// It is not used directly, but through a `ProductMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.products().generate_approval_url("enterpriseId", "productId") +/// .language_code("clita") +/// .doit(); +/// # } +/// ``` +pub struct ProductGenerateApprovalUrlCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _product_id: String, + _language_code: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProductGenerateApprovalUrlCall<'a, C, A> {} + +impl<'a, C, A> ProductGenerateApprovalUrlCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ProductsGenerateApprovalUrlResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.products.generateApprovalUrl", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("productId", self._product_id.to_string())); + if let Some(value) = self._language_code { + params.push(("languageCode", value.to_string())); + } + for &field in ["alt", "enterpriseId", "productId", "languageCode"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{productId}", "productId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["productId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ProductGenerateApprovalUrlCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the product. + /// + /// Sets the *product id* 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 product_id(mut self, new_value: &str) -> ProductGenerateApprovalUrlCall<'a, C, A> { + self._product_id = new_value.to_string(); + self + } + /// The BCP 47 language code used for permission names and descriptions in the returned iframe, for instance "en-US". + /// + /// Sets the *language code* query property to the given value. + pub fn language_code(mut self, new_value: &str) -> ProductGenerateApprovalUrlCall<'a, C, A> { + self._language_code = 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. + /// + /// 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 Delegate) -> ProductGenerateApprovalUrlCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProductGenerateApprovalUrlCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> ProductGenerateApprovalUrlCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Retrieves details of a product for display to an enterprise admin. +/// +/// A builder for the *get* method supported by a *product* resource. +/// It is not used directly, but through a `ProductMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.products().get("enterpriseId", "productId") +/// .language("dolores") +/// .doit(); +/// # } +/// ``` +pub struct ProductGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _product_id: String, + _language: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProductGetCall<'a, C, A> {} + +impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Product)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.products.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("productId", self._product_id.to_string())); + if let Some(value) = self._language { + params.push(("language", value.to_string())); + } + for &field in ["alt", "enterpriseId", "productId", "language"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{productId}", "productId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["productId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the product, e.g. "app:com.google.android.gm". + /// + /// Sets the *product id* 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 product_id(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { + self._product_id = new_value.to_string(); + self + } + /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). + /// + /// Sets the *language* query property to the given value. + pub fn language(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { + self._language = 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. + /// + /// 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 Delegate) -> ProductGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProductGetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> ProductGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000. /// -/// To learn how to use Google Play for Work to design and create a store layout to display approved products to your users, see Store Layout Design. +/// To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design. /// /// A builder for the *approve* method supported by a *product* resource. /// It is not used directly, but through a `ProductMethods` instance. @@ -20573,287 +19372,7 @@ impl<'a, C, A> ProductApproveCall<'a, C, A> where C: BorrowMut, A } -/// This method has been deprecated. To programmatically approve applications, you must use the iframe mechanism via the generateApprovalUrl and approve methods of the Products resource. For more information, see the Play EMM API usage requirements. -/// -/// The updatePermissions method (deprecated) updates the set of Android app permissions for this app that have been accepted by the enterprise. -/// -/// A builder for the *updatePermissions* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// use androidenterprise1::ProductPermissions; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = ProductPermissions::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.products().update_permissions(req, "enterpriseId", "productId") -/// .doit(); -/// # } -/// ``` -pub struct ProductUpdatePermissionCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _request: ProductPermissions, - _enterprise_id: String, - _product_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ProductUpdatePermissionCall<'a, C, A> {} - -impl<'a, C, A> ProductUpdatePermissionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ProductPermissions)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.products.updatePermissions", - http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("productId", self._product_id.to_string())); - for &field in ["alt", "enterpriseId", "productId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/permissions".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{productId}", "productId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["productId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: ProductPermissions) -> ProductUpdatePermissionCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ProductUpdatePermissionCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the product. - /// - /// Sets the *product id* 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 product_id(mut self, new_value: &str) -> ProductUpdatePermissionCall<'a, C, A> { - self._product_id = 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. - /// - /// 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 Delegate) -> ProductUpdatePermissionCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ProductUpdatePermissionCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> ProductUpdatePermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an administrator to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play. +/// Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play. /// /// A builder for the *getAppRestrictionsSchema* method supported by a *product* resource. /// It is not used directly, but through a `ProductMethods` instance. @@ -20880,7 +19399,7 @@ impl<'a, C, A> ProductUpdatePermissionCall<'a, C, A> where C: BorrowMut ProductGetAppRestrictionsSchemaCall<'a, C, A> where C: BorrowMut< /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.products().list("enterpriseId") -/// .token("eirmod") -/// .query("At") -/// .max_results(5) -/// .language("et") +/// .token("ea") +/// .query("et") +/// .max_results(53) +/// .language("diam") /// .approved(false) /// .doit(); /// # } @@ -21320,14 +19839,14 @@ impl<'a, C, A> ProductListCall<'a, C, A> where C: BorrowMut, A: o self._enterprise_id = new_value.to_string(); self } - /// A pagination token is contained in a request’s response when there are more products. The token can be used in a subsequent request to obtain more products, and so forth. This parameter cannot be used in the initial request. + /// A pagination token is contained in a request''s response when there are more products. The token can be used in a subsequent request to obtain more products, and so forth. This parameter cannot be used in the initial request. /// /// Sets the *token* query property to the given value. pub fn token(mut self, new_value: &str) -> ProductListCall<'a, C, A> { self._token = Some(new_value.to_string()); self } - /// The search query as typed in the Google Play Store search box. If omitted, all approved apps will be returned (using the pagination parameters), including apps that are not available in the store (e.g. unpublished apps). + /// The search query as typed in the Google Play store search box. If omitted, all approved apps will be returned (using the pagination parameters), including apps that are not available in the store (e.g. unpublished apps). /// /// Sets the *query* query property to the given value. pub fn query(mut self, new_value: &str) -> ProductListCall<'a, C, A> { @@ -21407,526 +19926,6 @@ impl<'a, C, A> ProductListCall<'a, C, A> where C: BorrowMut, A: o } -/// Retrieves details of a product for display to an enterprise admin. -/// -/// A builder for the *get* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.products().get("enterpriseId", "productId") -/// .language("elitr") -/// .doit(); -/// # } -/// ``` -pub struct ProductGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _product_id: String, - _language: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ProductGetCall<'a, C, A> {} - -impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Product)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.products.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("productId", self._product_id.to_string())); - if let Some(value) = self._language { - params.push(("language", value.to_string())); - } - for &field in ["alt", "enterpriseId", "productId", "language"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{productId}", "productId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["productId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the product, e.g. "app:com.google.android.gm". - /// - /// Sets the *product id* 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 product_id(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { - self._product_id = new_value.to_string(); - self - } - /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). - /// - /// Sets the *language* query property to the given value. - pub fn language(mut self, new_value: &str) -> ProductGetCall<'a, C, A> { - self._language = 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. - /// - /// 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 Delegate) -> ProductGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ProductGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> ProductGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product. -/// -/// Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display permissions for up to 1 day. -/// -/// A builder for the *generateApprovalUrl* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.products().generate_approval_url("enterpriseId", "productId") -/// .language_code("Lorem") -/// .doit(); -/// # } -/// ``` -pub struct ProductGenerateApprovalUrlCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _product_id: String, - _language_code: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ProductGenerateApprovalUrlCall<'a, C, A> {} - -impl<'a, C, A> ProductGenerateApprovalUrlCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ProductsGenerateApprovalUrlResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.products.generateApprovalUrl", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("productId", self._product_id.to_string())); - if let Some(value) = self._language_code { - params.push(("languageCode", value.to_string())); - } - for &field in ["alt", "enterpriseId", "productId", "languageCode"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{productId}", "productId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["productId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ProductGenerateApprovalUrlCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the product. - /// - /// Sets the *product id* 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 product_id(mut self, new_value: &str) -> ProductGenerateApprovalUrlCall<'a, C, A> { - self._product_id = new_value.to_string(); - self - } - /// The BCP 47 language code used for permission names and descriptions in the returned iframe, for instance "en-US". - /// - /// Sets the *language code* query property to the given value. - pub fn language_code(mut self, new_value: &str) -> ProductGenerateApprovalUrlCall<'a, C, A> { - self._language_code = 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. - /// - /// 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 Delegate) -> ProductGenerateApprovalUrlCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ProductGenerateApprovalUrlCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> ProductGenerateApprovalUrlCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Adds or updates a per-user managed configuration for an app for the specified user. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *managedconfigurationsforuser* resource. @@ -22217,253 +20216,6 @@ impl<'a, C, A> ManagedconfigurationsforuserPatchCall<'a, C, A> where C: BorrowMu } -/// Lists all the per-user managed configurations for the specified user. Only the ID is set. -/// -/// A builder for the *list* method supported by a *managedconfigurationsforuser* resource. -/// It is not used directly, but through a `ManagedconfigurationsforuserMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.managedconfigurationsforuser().list("enterpriseId", "userId") -/// .doit(); -/// # } -/// ``` -pub struct ManagedconfigurationsforuserListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _user_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ManagedconfigurationsforuserListCall<'a, C, A> {} - -impl<'a, C, A> ManagedconfigurationsforuserListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ManagedConfigurationsForUserListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.managedconfigurationsforuser.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "enterpriseId", "userId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["userId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ManagedconfigurationsforuserListCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the user. - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> ManagedconfigurationsforuserListCall<'a, C, A> { - self._user_id = 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. - /// - /// 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 Delegate) -> ManagedconfigurationsforuserListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ManagedconfigurationsforuserListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> ManagedconfigurationsforuserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Removes a per-user managed configuration for an app for the specified user. /// /// A builder for the *delete* method supported by a *managedconfigurationsforuser* resource. @@ -22712,6 +20464,253 @@ impl<'a, C, A> ManagedconfigurationsforuserDeleteCall<'a, C, A> where C: BorrowM } +/// Lists all the per-user managed configurations for the specified user. Only the ID is set. +/// +/// A builder for the *list* method supported by a *managedconfigurationsforuser* resource. +/// It is not used directly, but through a `ManagedconfigurationsforuserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_androidenterprise1 as androidenterprise1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use androidenterprise1::AndroidEnterprise; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.managedconfigurationsforuser().list("enterpriseId", "userId") +/// .doit(); +/// # } +/// ``` +pub struct ManagedconfigurationsforuserListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _user_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ManagedconfigurationsforuserListCall<'a, C, A> {} + +impl<'a, C, A> ManagedconfigurationsforuserListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ManagedConfigurationsForUserListResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.managedconfigurationsforuser.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + params.push(("userId", self._user_id.to_string())); + for &field in ["alt", "enterpriseId", "userId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["userId", "enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ManagedconfigurationsforuserListCall<'a, C, A> { + self._enterprise_id = new_value.to_string(); + self + } + /// The ID of the user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> ManagedconfigurationsforuserListCall<'a, C, A> { + self._user_id = 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. + /// + /// 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 Delegate) -> ManagedconfigurationsforuserListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ManagedconfigurationsforuserListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> ManagedconfigurationsforuserListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Adds or updates a per-user managed configuration for an app for the specified user. /// /// A builder for the *update* method supported by a *managedconfigurationsforuser* resource. @@ -23508,9 +21507,9 @@ impl<'a, C, A> GrouplicenseuserListCall<'a, C, A> where C: BorrowMut GrouplicenseuserListCall<'a, C, A> where C: BorrowMut +pub struct EntitlementDeleteCall<'a, C, A> where C: 'a, A: 'a { hub: &'a AndroidEnterprise, _enterprise_id: String, _user_id: String, + _entitlement_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for EntitlementListCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for EntitlementDeleteCall<'a, C, A> {} -impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, EntitlementsListResponse)> { + pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -23563,12 +21563,13 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "androidenterprise.entitlements.list", - http_method: hyper::method::Method::Get }); + dlg.begin(MethodInfo { id: "androidenterprise.entitlements.delete", + http_method: hyper::method::Method::Delete }); let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("enterpriseId", self._enterprise_id.to_string())); params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "enterpriseId", "userId"].iter() { + params.push(("entitlementId", self._entitlement_id.to_string())); + for &field in ["enterpriseId", "userId", "entitlementId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -23578,14 +21579,13 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, params.push((&name, value.clone())); } - params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements".to_string(); + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}".to_string(); if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{entitlementId}", "entitlementId")].iter() { let mut replace_with: Option<&str> = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -23596,8 +21596,8 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, url = url.replace(find_this, replace_with.expect("to find substitution value in params")); } { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["userId", "enterpriseId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["entitlementId", "userId", "enterpriseId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -23630,7 +21630,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) .header(UserAgent(self.hub._user_agent.clone())) .header(auth_header.clone()); @@ -23663,17 +21663,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, Ok(serr) => Err(Error::BadRequest(serr)) } } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; + let result_value = res; dlg.finished(true); return Ok(result_value) @@ -23689,7 +21679,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - pub fn enterprise_id(mut self, new_value: &str) -> EntitlementListCall<'a, C, A> { + pub fn enterprise_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } @@ -23699,17 +21689,27 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - pub fn user_id(mut self, new_value: &str) -> EntitlementListCall<'a, C, A> { + pub fn user_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". + /// + /// Sets the *entitlement id* 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 entitlement_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, A> { + self._entitlement_id = 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. /// /// 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 Delegate) -> EntitlementListCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> EntitlementDeleteCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -23730,7 +21730,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EntitlementListCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> EntitlementDeleteCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -23747,7 +21747,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, /// 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: T) -> EntitlementListCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> EntitlementDeleteCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -23788,7 +21788,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.entitlements().update(req, "enterpriseId", "userId", "entitlementId") -/// .install(true) +/// .install(false) /// .doit(); /// # } /// ``` @@ -24316,9 +22316,9 @@ impl<'a, C, A> EntitlementGetCall<'a, C, A> where C: BorrowMut, A } -/// Removes an entitlement to an app for a user and uninstalls it. +/// Lists all entitlements for the specified user. Only the ID is set. /// -/// A builder for the *delete* method supported by a *entitlement* resource. +/// A builder for the *list* method supported by a *entitlement* resource. /// It is not used directly, but through a `EntitlementMethods` instance. /// /// # Example @@ -24342,29 +22342,28 @@ impl<'a, C, A> EntitlementGetCall<'a, C, A> where C: BorrowMut, A /// // 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.entitlements().delete("enterpriseId", "userId", "entitlementId") +/// let result = hub.entitlements().list("enterpriseId", "userId") /// .doit(); /// # } /// ``` -pub struct EntitlementDeleteCall<'a, C, A> +pub struct EntitlementListCall<'a, C, A> where C: 'a, A: 'a { hub: &'a AndroidEnterprise, _enterprise_id: String, _user_id: String, - _entitlement_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for EntitlementDeleteCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for EntitlementListCall<'a, C, A> {} -impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { + pub fn doit(mut self) -> Result<(hyper::client::Response, EntitlementsListResponse)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -24372,13 +22371,12 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "androidenterprise.entitlements.delete", - http_method: hyper::method::Method::Delete }); + dlg.begin(MethodInfo { id: "androidenterprise.entitlements.list", + http_method: hyper::method::Method::Get }); let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("enterpriseId", self._enterprise_id.to_string())); params.push(("userId", self._user_id.to_string())); - params.push(("entitlementId", self._entitlement_id.to_string())); - for &field in ["enterpriseId", "userId", "entitlementId"].iter() { + for &field in ["alt", "enterpriseId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -24388,13 +22386,14 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut params.push((&name, value.clone())); } + params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}".to_string(); + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements".to_string(); if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId"), ("{entitlementId}", "entitlementId")].iter() { + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{userId}", "userId")].iter() { let mut replace_with: Option<&str> = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -24405,8 +22404,8 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut url = url.replace(find_this, replace_with.expect("to find substitution value in params")); } { - let mut indices_for_removal: Vec = Vec::with_capacity(3); - for param_name in ["entitlementId", "userId", "enterpriseId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["userId", "enterpriseId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -24439,7 +22438,7 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) .header(UserAgent(self.hub._user_agent.clone())) .header(auth_header.clone()); @@ -24472,7 +22471,17 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut Ok(serr) => Err(Error::BadRequest(serr)) } } - let result_value = res; + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; dlg.finished(true); return Ok(result_value) @@ -24488,7 +22497,7 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - pub fn enterprise_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, A> { + pub fn enterprise_id(mut self, new_value: &str) -> EntitlementListCall<'a, C, A> { self._enterprise_id = new_value.to_string(); self } @@ -24498,27 +22507,17 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - pub fn user_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, A> { + pub fn user_id(mut self, new_value: &str) -> EntitlementListCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". - /// - /// Sets the *entitlement id* 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 entitlement_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, A> { - self._entitlement_id = 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. /// /// 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 Delegate) -> EntitlementDeleteCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> EntitlementListCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -24539,7 +22538,7 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> EntitlementDeleteCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> EntitlementListCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -24556,7 +22555,7 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut /// 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: T) -> EntitlementDeleteCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> EntitlementListCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -24597,7 +22596,7 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.entitlements().patch(req, "enterpriseId", "userId", "entitlementId") -/// .install(true) +/// .install(false) /// .doit(); /// # } /// ``` @@ -24866,1781 +22865,6 @@ impl<'a, C, A> EntitlementPatchCall<'a, C, A> where C: BorrowMut, } -/// Updates a collection. This method supports patch semantics. -/// -/// A builder for the *patch* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// use androidenterprise1::Collection; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = Collection::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.collections().patch(req, "enterpriseId", "collectionId") -/// .doit(); -/// # } -/// ``` -pub struct CollectionPatchCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _request: Collection, - _enterprise_id: String, - _collection_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CollectionPatchCall<'a, C, A> {} - -impl<'a, C, A> CollectionPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Collection)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.collections.patch", - http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("collectionId", self._collection_id.to_string())); - for &field in ["alt", "enterpriseId", "collectionId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{collectionId}", "collectionId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["collectionId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: Collection) -> CollectionPatchCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> CollectionPatchCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the collection. - /// - /// Sets the *collection id* 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 collection_id(mut self, new_value: &str) -> CollectionPatchCall<'a, C, A> { - self._collection_id = 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. - /// - /// 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 Delegate) -> CollectionPatchCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> CollectionPatchCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> CollectionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Retrieves the IDs of all the collections for an enterprise. -/// -/// A builder for the *list* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.collections().list("enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct CollectionListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CollectionListCall<'a, C, A> {} - -impl<'a, C, A> CollectionListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, CollectionsListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.collections.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["alt", "enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> CollectionListCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> CollectionListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> CollectionListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> CollectionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Retrieves the details of a collection. -/// -/// A builder for the *get* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.collections().get("enterpriseId", "collectionId") -/// .doit(); -/// # } -/// ``` -pub struct CollectionGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _collection_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CollectionGetCall<'a, C, A> {} - -impl<'a, C, A> CollectionGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Collection)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.collections.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("collectionId", self._collection_id.to_string())); - for &field in ["alt", "enterpriseId", "collectionId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{collectionId}", "collectionId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["collectionId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> CollectionGetCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the collection. - /// - /// Sets the *collection id* 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 collection_id(mut self, new_value: &str) -> CollectionGetCall<'a, C, A> { - self._collection_id = 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. - /// - /// 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 Delegate) -> CollectionGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> CollectionGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> CollectionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Deletes a collection. -/// -/// A builder for the *delete* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.collections().delete("enterpriseId", "collectionId") -/// .doit(); -/// # } -/// ``` -pub struct CollectionDeleteCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _collection_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CollectionDeleteCall<'a, C, A> {} - -impl<'a, C, A> CollectionDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.collections.delete", - http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("collectionId", self._collection_id.to_string())); - for &field in ["enterpriseId", "collectionId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{collectionId}", "collectionId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["collectionId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = res; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> CollectionDeleteCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the collection. - /// - /// Sets the *collection id* 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 collection_id(mut self, new_value: &str) -> CollectionDeleteCall<'a, C, A> { - self._collection_id = 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. - /// - /// 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 Delegate) -> CollectionDeleteCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> CollectionDeleteCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> CollectionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Creates a new collection. -/// -/// A builder for the *insert* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// use androidenterprise1::Collection; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = Collection::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.collections().insert(req, "enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct CollectionInsertCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _request: Collection, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CollectionInsertCall<'a, C, A> {} - -impl<'a, C, A> CollectionInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Collection)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.collections.insert", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["alt", "enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: Collection) -> CollectionInsertCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> CollectionInsertCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> CollectionInsertCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> CollectionInsertCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> CollectionInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Updates a collection. -/// -/// A builder for the *update* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// use androidenterprise1::Collection; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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 = Collection::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.collections().update(req, "enterpriseId", "collectionId") -/// .doit(); -/// # } -/// ``` -pub struct CollectionUpdateCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _request: Collection, - _enterprise_id: String, - _collection_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CollectionUpdateCall<'a, C, A> {} - -impl<'a, C, A> CollectionUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Collection)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.collections.update", - http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - params.push(("collectionId", self._collection_id.to_string())); - for &field in ["alt", "enterpriseId", "collectionId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId"), ("{collectionId}", "collectionId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["collectionId", "enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: Collection) -> CollectionUpdateCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> CollectionUpdateCall<'a, C, A> { - self._enterprise_id = new_value.to_string(); - self - } - /// The ID of the collection. - /// - /// Sets the *collection id* 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 collection_id(mut self, new_value: &str) -> CollectionUpdateCall<'a, C, A> { - self._collection_id = 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. - /// - /// 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 Delegate) -> CollectionUpdateCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> CollectionUpdateCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> CollectionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. -/// -/// A builder for the *list* method supported by a *serviceaccountkey* resource. -/// It is not used directly, but through a `ServiceaccountkeyMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_androidenterprise1 as androidenterprise1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use androidenterprise1::AndroidEnterprise; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.serviceaccountkeys().list("enterpriseId") -/// .doit(); -/// # } -/// ``` -pub struct ServiceaccountkeyListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a AndroidEnterprise, - _enterprise_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ServiceaccountkeyListCall<'a, C, A> {} - -impl<'a, C, A> ServiceaccountkeyListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ServiceAccountKeysListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "androidenterprise.serviceaccountkeys.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("enterpriseId", self._enterprise_id.to_string())); - for &field in ["alt", "enterpriseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["enterpriseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the enterprise. - /// - /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ServiceaccountkeyListCall<'a, C, A> { - self._enterprise_id = 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. - /// - /// 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 Delegate) -> ServiceaccountkeyListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ServiceaccountkeyListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> ServiceaccountkeyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Generates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. /// /// Only the type of the key should be populated in the resource to be inserted. @@ -26909,6 +23133,241 @@ impl<'a, C, A> ServiceaccountkeyInsertCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = AndroidEnterprise::new(hyper::Client::new(), 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.serviceaccountkeys().list("enterpriseId") +/// .doit(); +/// # } +/// ``` +pub struct ServiceaccountkeyListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AndroidEnterprise, + _enterprise_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ServiceaccountkeyListCall<'a, C, A> {} + +impl<'a, C, A> ServiceaccountkeyListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ServiceAccountKeysListResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "androidenterprise.serviceaccountkeys.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("enterpriseId", self._enterprise_id.to_string())); + for &field in ["alt", "enterpriseId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{enterpriseId}", "enterpriseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["enterpriseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the enterprise. + /// + /// Sets the *enterprise id* 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 enterprise_id(mut self, new_value: &str) -> ServiceaccountkeyListCall<'a, C, A> { + self._enterprise_id = 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. + /// + /// 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 Delegate) -> ServiceaccountkeyListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ServiceaccountkeyListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> ServiceaccountkeyListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Removes and invalidates the specified credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. /// /// A builder for the *delete* method supported by a *serviceaccountkey* resource. @@ -27172,7 +23631,7 @@ impl<'a, C, A> ServiceaccountkeyDeleteCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Android Publisher (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidpublisher2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-androidpublisher2] path = "../androidpublisher2" -version = "1.0.4+20161212" +version = "1.0.4+20170425" diff --git a/gen/androidpublisher2-cli/README.md b/gen/androidpublisher2-cli/README.md index 715dd34a49..f1b34d842d 100644 --- a/gen/androidpublisher2-cli/README.md +++ b/gen/androidpublisher2-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Android Publisher* API at revision *20161212*. The CLI is at version *1.0.4*. +This documentation was generated from the *Android Publisher* API at revision *20170425*. The CLI is at version *1.0.4*. ```bash androidpublisher2 [options] diff --git a/gen/androidpublisher2-cli/mkdocs.yml b/gen/androidpublisher2-cli/mkdocs.yml index af3d68fa9a..2f4438c4c4 100644 --- a/gen/androidpublisher2-cli/mkdocs.yml +++ b/gen/androidpublisher2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Android Publisher v1.0.4+20161212 +site_name: Android Publisher v1.0.4+20170425 site_url: http://byron.github.io/google-apis-rs/google-androidpublisher2-cli site_description: A complete library to interact with Android Publisher (protocol v2) diff --git a/gen/androidpublisher2-cli/src/main.rs b/gen/androidpublisher2-cli/src/main.rs index 6dab9d252d..efd1a03d6a 100644 --- a/gen/androidpublisher2-cli/src/main.rs +++ b/gen/androidpublisher2-cli/src/main.rs @@ -5915,7 +5915,7 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Returns a list of reviews."##), + Some(r##"Returns a list of reviews. Only reviews from last week will be returned."##), "Details at http://byron.github.io/google-apis-rs/google_androidpublisher2_cli/reviews_list", vec![ (Some(r##"package-name"##), @@ -5976,7 +5976,7 @@ fn main() { let mut app = App::new("androidpublisher2") .author("Sebastian Thiel ") - .version("1.0.4+20161212") + .version("1.0.4+20170425") .about("Lets Android application developers access their Google Play accounts.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_androidpublisher2_cli") .arg(Arg::with_name("url") diff --git a/gen/androidpublisher2/Cargo.toml b/gen/androidpublisher2/Cargo.toml index 781738718b..18fe878dd3 100644 --- a/gen/androidpublisher2/Cargo.toml +++ b/gen/androidpublisher2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-androidpublisher2" -version = "1.0.4+20161212" +version = "1.0.4+20170425" authors = ["Sebastian Thiel "] description = "A complete library to interact with Android Publisher (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidpublisher2" homepage = "https://developers.google.com/android-publisher" -documentation = "https://docs.rs/google-androidpublisher2/1.0.4+20161212" +documentation = "https://docs.rs/google-androidpublisher2/1.0.4+20170425" license = "MIT" keywords = ["androidpublisher", "google", "protocol", "web", "api"] diff --git a/gen/androidpublisher2/README.md b/gen/androidpublisher2/README.md index 9e438ff03c..0587500a31 100644 --- a/gen/androidpublisher2/README.md +++ b/gen/androidpublisher2/README.md @@ -5,32 +5,32 @@ DO NOT EDIT ! --> The `google-androidpublisher2` library allows access to all features of the *Google Android Publisher* service. -This documentation was generated from *Android Publisher* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Android Publisher* crate version *1.0.4+20170425*, where *20170425* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Android Publisher* *v2* API can be found at the [official documentation site](https://developers.google.com/android-publisher). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.AndroidPublisher.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.AndroidPublisher.html) ... * edits - * [*apklistings delete*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApklistingDeleteCall.html), [*apklistings deleteall*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApklistingDeleteallCall.html), [*apklistings get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApklistingGetCall.html), [*apklistings list*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApklistingListCall.html), [*apklistings patch*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApklistingPatchCall.html), [*apklistings update*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApklistingUpdateCall.html), [*apks addexternallyhosted*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApkAddexternallyhostedCall.html), [*apks list*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApkListCall.html), [*apks upload*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApkUploadCall.html), [*commit*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditCommitCall.html), [*delete*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditDeleteCall.html), [*deobfuscationfiles upload*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditDeobfuscationfileUploadCall.html), [*details get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditDetailGetCall.html), [*details patch*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditDetailPatchCall.html), [*details update*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditDetailUpdateCall.html), [*expansionfiles get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditExpansionfileGetCall.html), [*expansionfiles patch*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditExpansionfilePatchCall.html), [*expansionfiles update*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditExpansionfileUpdateCall.html), [*expansionfiles upload*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditExpansionfileUploadCall.html), [*get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditGetCall.html), [*images delete*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditImageDeleteCall.html), [*images deleteall*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditImageDeleteallCall.html), [*images list*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditImageListCall.html), [*images upload*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditImageUploadCall.html), [*insert*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditInsertCall.html), [*listings delete*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditListingDeleteCall.html), [*listings deleteall*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditListingDeleteallCall.html), [*listings get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditListingGetCall.html), [*listings list*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditListingListCall.html), [*listings patch*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditListingPatchCall.html), [*listings update*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditListingUpdateCall.html), [*testers get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditTesterGetCall.html), [*testers patch*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditTesterPatchCall.html), [*testers update*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditTesterUpdateCall.html), [*tracks get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditTrackGetCall.html), [*tracks list*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditTrackListCall.html), [*tracks patch*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditTrackPatchCall.html), [*tracks update*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditTrackUpdateCall.html) and [*validate*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditValidateCall.html) -* [entitlements](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.Entitlement.html) - * [*list*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EntitlementListCall.html) + * [*apklistings delete*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApklistingDeleteCall.html), [*apklistings deleteall*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApklistingDeleteallCall.html), [*apklistings get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApklistingGetCall.html), [*apklistings list*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApklistingListCall.html), [*apklistings patch*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApklistingPatchCall.html), [*apklistings update*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApklistingUpdateCall.html), [*apks addexternallyhosted*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApkAddexternallyhostedCall.html), [*apks list*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApkListCall.html), [*apks upload*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApkUploadCall.html), [*commit*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditCommitCall.html), [*delete*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditDeleteCall.html), [*deobfuscationfiles upload*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditDeobfuscationfileUploadCall.html), [*details get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditDetailGetCall.html), [*details patch*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditDetailPatchCall.html), [*details update*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditDetailUpdateCall.html), [*expansionfiles get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditExpansionfileGetCall.html), [*expansionfiles patch*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditExpansionfilePatchCall.html), [*expansionfiles update*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditExpansionfileUpdateCall.html), [*expansionfiles upload*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditExpansionfileUploadCall.html), [*get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditGetCall.html), [*images delete*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditImageDeleteCall.html), [*images deleteall*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditImageDeleteallCall.html), [*images list*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditImageListCall.html), [*images upload*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditImageUploadCall.html), [*insert*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditInsertCall.html), [*listings delete*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditListingDeleteCall.html), [*listings deleteall*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditListingDeleteallCall.html), [*listings get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditListingGetCall.html), [*listings list*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditListingListCall.html), [*listings patch*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditListingPatchCall.html), [*listings update*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditListingUpdateCall.html), [*testers get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditTesterGetCall.html), [*testers patch*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditTesterPatchCall.html), [*testers update*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditTesterUpdateCall.html), [*tracks get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditTrackGetCall.html), [*tracks list*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditTrackListCall.html), [*tracks patch*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditTrackPatchCall.html), [*tracks update*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditTrackUpdateCall.html) and [*validate*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditValidateCall.html) +* [entitlements](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.Entitlement.html) + * [*list*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EntitlementListCall.html) * inappproducts - * [*batch*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.InappproductBatchCall.html), [*delete*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.InappproductDeleteCall.html), [*get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.InappproductGetCall.html), [*insert*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.InappproductInsertCall.html), [*list*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.InappproductListCall.html), [*patch*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.InappproductPatchCall.html) and [*update*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.InappproductUpdateCall.html) + * [*batch*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.InappproductBatchCall.html), [*delete*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.InappproductDeleteCall.html), [*get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.InappproductGetCall.html), [*insert*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.InappproductInsertCall.html), [*list*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.InappproductListCall.html), [*patch*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.InappproductPatchCall.html) and [*update*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.InappproductUpdateCall.html) * purchases - * [*products get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.PurchaseProductGetCall.html), [*subscriptions cancel*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.PurchaseSubscriptionCancelCall.html), [*subscriptions defer*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.PurchaseSubscriptionDeferCall.html), [*subscriptions get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.PurchaseSubscriptionGetCall.html), [*subscriptions refund*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.PurchaseSubscriptionRefundCall.html), [*subscriptions revoke*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.PurchaseSubscriptionRevokeCall.html) and [*voidedpurchases list*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.PurchaseVoidedpurchaseListCall.html) -* [reviews](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.Review.html) - * [*get*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.ReviewGetCall.html), [*list*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.ReviewListCall.html) and [*reply*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.ReviewReplyCall.html) + * [*products get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.PurchaseProductGetCall.html), [*subscriptions cancel*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.PurchaseSubscriptionCancelCall.html), [*subscriptions defer*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.PurchaseSubscriptionDeferCall.html), [*subscriptions get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.PurchaseSubscriptionGetCall.html), [*subscriptions refund*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.PurchaseSubscriptionRefundCall.html), [*subscriptions revoke*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.PurchaseSubscriptionRevokeCall.html) and [*voidedpurchases list*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.PurchaseVoidedpurchaseListCall.html) +* [reviews](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.Review.html) + * [*get*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.ReviewGetCall.html), [*list*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.ReviewListCall.html) and [*reply*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.ReviewReplyCall.html) Upload supported by ... -* [*deobfuscationfiles upload edits*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditDeobfuscationfileUploadCall.html) -* [*images upload edits*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditImageUploadCall.html) -* [*expansionfiles upload edits*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditExpansionfileUploadCall.html) -* [*apks upload edits*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.EditApkUploadCall.html) +* [*deobfuscationfiles upload edits*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditDeobfuscationfileUploadCall.html) +* [*images upload edits*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditImageUploadCall.html) +* [*expansionfiles upload edits*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditExpansionfileUploadCall.html) +* [*apks upload edits*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.EditApkUploadCall.html) @@ -38,17 +38,17 @@ Upload supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/struct.AndroidPublisher.html)** +* **[Hub](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/struct.AndroidPublisher.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.Part.html)** + * **[Parts](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -140,17 +140,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.Delegate.html), 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-androidpublisher2/1.0.4+20161212/google_androidpublisher2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.ResponseResult.html), 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")`. @@ -160,29 +160,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.CallBuilder.html) 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-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.CallBuilder.html), 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-androidpublisher2/1.0.4+20161212/google_androidpublisher2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-androidpublisher2/1.0.4+20170425/google_androidpublisher2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/androidpublisher2/src/lib.rs b/gen/androidpublisher2/src/lib.rs index e02a594455..5e128cf9d6 100644 --- a/gen/androidpublisher2/src/lib.rs +++ b/gen/androidpublisher2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Android Publisher* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Android Publisher* crate version *1.0.4+20170425*, where *20170425* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Android Publisher* *v2* API can be found at the //! [official documentation site](https://developers.google.com/android-publisher). @@ -1277,7 +1277,7 @@ impl RequestValue for Testers {} impl ResponseResult for Testers {} -/// A VoidedPurchase resource indicates the purchase was either cancelled/refunded/charged-back. +/// A VoidedPurchase resource indicates a purchase that was either cancelled/refunded/charged-back. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -1285,13 +1285,13 @@ impl ResponseResult for Testers {} pub struct VoidedPurchase { /// This kind represents a voided purchase object in the androidpublisher service. pub kind: Option, - /// The time when the purchase was cancelled/refunded/chargeback, in milliseconds since the epoch (Jan 1, 1970). + /// The time at which the purchase was cancelled/refunded/charged-back, in milliseconds since the epoch (Jan 1, 1970). #[serde(rename="voidedTimeMillis")] pub voided_time_millis: Option, - /// The token that was generated when a purchase was made and uniquely identifies a purchase. + /// The token that was generated when a purchase was made. This uniquely identifies a purchase. #[serde(rename="purchaseToken")] pub purchase_token: Option, - /// The time the purchase was made, in milliseconds since the epoch (Jan 1, 1970). + /// The time at which the purchase was made, in milliseconds since the epoch (Jan 1, 1970). #[serde(rename="purchaseTimeMillis")] pub purchase_time_millis: Option, } @@ -1425,6 +1425,9 @@ pub struct SubscriptionPurchase { /// Time at which the subscription was granted, in milliseconds since the Epoch. #[serde(rename="startTimeMillis")] pub start_time_millis: Option, + /// The time at which the subscription was canceled by the user, in milliseconds since the epoch. Only present if cancelReason is 0. + #[serde(rename="userCancellationTimeMillis")] + pub user_cancellation_time_millis: Option, /// Price of the subscription, not including tax. Price is expressed in micro-units, where 1,000,000 micro-units represents one unit of the currency. For example, if the subscription price is €1.99, price_amount_micros is 1990000. #[serde(rename="priceAmountMicros")] pub price_amount_micros: Option, @@ -2915,7 +2918,7 @@ impl<'a, C, A> ReviewMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of reviews. + /// Returns a list of reviews. Only reviews from last week will be returned. /// /// # Arguments /// @@ -4358,7 +4361,7 @@ impl<'a, C, A> PurchaseVoidedpurchaseListCall<'a, C, A> where C: BorrowMut PurchaseVoidedpurchaseListCall<'a, C, A> { @@ -4377,7 +4380,7 @@ impl<'a, C, A> PurchaseVoidedpurchaseListCall<'a, C, A> where C: BorrowMut PurchaseVoidedpurchaseListCall<'a, C, A> { @@ -16627,7 +16630,7 @@ impl<'a, C, A> ReviewGetCall<'a, C, A> where C: BorrowMut, A: oau } -/// Returns a list of reviews. +/// Returns a list of reviews. Only reviews from last week will be returned. /// /// A builder for the *list* method supported by a *review* resource. /// It is not used directly, but through a `ReviewMethods` instance. diff --git a/gen/appengine1-cli/Cargo.toml b/gen/appengine1-cli/Cargo.toml index a59cf45a6d..deca0b7dc6 100644 --- a/gen/appengine1-cli/Cargo.toml +++ b/gen/appengine1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appengine1-cli" -version = "1.0.4+20161208" +version = "1.0.4+20170522" authors = ["Sebastian Thiel "] description = "A complete library to interact with appengine (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-appengine1] path = "../appengine1" -version = "1.0.4+20161208" +version = "1.0.4+20170522" diff --git a/gen/appengine1-cli/README.md b/gen/appengine1-cli/README.md index e5ecdce6fb..11ce669955 100644 --- a/gen/appengine1-cli/README.md +++ b/gen/appengine1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *appengine* API at revision *20161208*. The CLI is at version *1.0.4*. +This documentation was generated from the *appengine* API at revision *20170522*. The CLI is at version *1.0.4*. ```bash appengine1 [options] diff --git a/gen/appengine1-cli/mkdocs.yml b/gen/appengine1-cli/mkdocs.yml index e86d404e61..ced13cd247 100644 --- a/gen/appengine1-cli/mkdocs.yml +++ b/gen/appengine1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: appengine v1.0.4+20161208 +site_name: appengine v1.0.4+20170522 site_url: http://byron.github.io/google-apis-rs/google-appengine1-cli site_description: A complete library to interact with appengine (protocol v1) diff --git a/gen/appengine1-cli/src/main.rs b/gen/appengine1-cli/src/main.rs index ea9261452c..9d959f7a6e 100644 --- a/gen/appengine1-cli/src/main.rs +++ b/gen/appengine1-cli/src/main.rs @@ -74,11 +74,17 @@ impl<'n> Engine<'n> { "code-bucket" => Some(("codeBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-bucket" => Some(("defaultBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-cookie-expiration" => Some(("defaultCookieExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "location-id" => Some(("locationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "auth-domain" => Some(("authDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "location-id" => Some(("locationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-id" => Some(("iap.oauth2ClientId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.enabled" => Some(("iap.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret" => Some(("iap.oauth2ClientSecret", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret-sha256" => Some(("iap.oauth2ClientSecretSha256", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "serving-status" => Some(("servingStatus", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "auth-domain" => Some(("authDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "gcr-domain" => Some(("gcrDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "id", "location-id", "name"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "enabled", "gcr-domain", "iap", "id", "location-id", "name", "oauth2-client-id", "oauth2-client-secret", "oauth2-client-secret-sha256", "serving-status"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -446,11 +452,17 @@ impl<'n> Engine<'n> { "code-bucket" => Some(("codeBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-bucket" => Some(("defaultBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-cookie-expiration" => Some(("defaultCookieExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "location-id" => Some(("locationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "auth-domain" => Some(("authDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "location-id" => Some(("locationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-id" => Some(("iap.oauth2ClientId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.enabled" => Some(("iap.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret" => Some(("iap.oauth2ClientSecret", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret-sha256" => Some(("iap.oauth2ClientSecretSha256", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "serving-status" => Some(("servingStatus", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "auth-domain" => Some(("authDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "gcr-domain" => Some(("gcrDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "id", "location-id", "name"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "enabled", "gcr-domain", "iap", "id", "location-id", "name", "oauth2-client-id", "oauth2-client-secret", "oauth2-client-secret-sha256", "serving-status"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -784,10 +796,10 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "split.shard-by" => Some(("split.shardBy", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "split.allocations" => Some(("split.allocations", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Map })), - "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["allocations", "id", "name", "shard-by", "split"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -881,18 +893,27 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "endpoints-api-service.config-id" => Some(("endpointsApiService.configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "endpoints-api-service.name" => Some(("endpointsApiService.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.idle-timeout" => Some(("basicScaling.idleTimeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.max-instances" => Some(("basicScaling.maxInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "vm" => Some(("vm", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "instance-class" => Some(("instanceClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "version-url" => Some(("versionUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.check-interval" => Some(("readinessCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.host" => Some(("readinessCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.timeout" => Some(("readinessCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.path" => Some(("readinessCheck.path", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.success-threshold" => Some(("readinessCheck.successThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "readiness-check.failure-threshold" => Some(("readinessCheck.failureThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "api-config.url" => Some(("apiConfig.url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.security-level" => Some(("apiConfig.securityLevel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.auth-fail-action" => Some(("apiConfig.authFailAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.login" => Some(("apiConfig.login", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.script" => Some(("apiConfig.script", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.subnetwork-name" => Some(("network.subnetworkName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.restart-threshold" => Some(("healthCheck.restartThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "health-check.check-interval" => Some(("healthCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.unhealthy-threshold" => Some(("healthCheck.unhealthyThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -900,7 +921,6 @@ impl<'n> Engine<'n> { "health-check.host" => Some(("healthCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.timeout" => Some(("healthCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.disable-health-check" => Some(("healthCheck.disableHealthCheck", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "env" => Some(("env", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "disk-usage-bytes" => Some(("diskUsageBytes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -909,13 +929,13 @@ impl<'n> Engine<'n> { "automatic-scaling.network-utilization.target-sent-packets-per-second" => Some(("automaticScaling.networkUtilization.targetSentPacketsPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-received-bytes-per-second" => Some(("automaticScaling.networkUtilization.targetReceivedBytesPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-bytes-per-second" => Some(("automaticScaling.networkUtilization.targetSentBytesPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.min-idle-instances" => Some(("automaticScaling.minIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.max-pending-latency" => Some(("automaticScaling.maxPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "automatic-scaling.max-idle-instances" => Some(("automaticScaling.maxIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-ops-per-second" => Some(("automaticScaling.diskUtilization.targetReadOpsPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-bytes-per-second" => Some(("automaticScaling.diskUtilization.targetWriteBytesPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-bytes-per-second" => Some(("automaticScaling.diskUtilization.targetReadBytesPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-ops-per-second" => Some(("automaticScaling.diskUtilization.targetWriteOpsPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.max-pending-latency" => Some(("automaticScaling.maxPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "automatic-scaling.max-idle-instances" => Some(("automaticScaling.maxIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.min-idle-instances" => Some(("automaticScaling.minIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.request-utilization.target-concurrent-requests" => Some(("automaticScaling.requestUtilization.targetConcurrentRequests", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.request-utilization.target-request-count-per-second" => Some(("automaticScaling.requestUtilization.targetRequestCountPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.cool-down-period" => Some(("automaticScaling.coolDownPeriod", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -930,21 +950,26 @@ impl<'n> Engine<'n> { "resources.memory-gb" => Some(("resources.memoryGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "inbound-services" => Some(("inboundServices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "created-by" => Some(("createdBy", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "deployment.container.image" => Some(("deployment.container.image", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "deployment.zip.files-count" => Some(("deployment.zip.filesCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "deployment.zip.source-url" => Some(("deployment.zip.sourceUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.check-interval" => Some(("livenessCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.initial-delay" => Some(("livenessCheck.initialDelay", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.host" => Some(("livenessCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.timeout" => Some(("livenessCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.path" => Some(("livenessCheck.path", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.success-threshold" => Some(("livenessCheck.successThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "liveness-check.failure-threshold" => Some(("livenessCheck.failureThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.subnetwork-name" => Some(("network.subnetworkName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "nobuild-files-regex" => Some(("nobuildFilesRegex", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "serving-status" => Some(("servingStatus", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "runtime" => Some(("runtime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["aggregation-window-length", "api-config", "auth-fail-action", "automatic-scaling", "basic-scaling", "beta-settings", "check-interval", "config-id", "container", "cool-down-period", "cpu", "cpu-utilization", "create-time", "created-by", "default-expiration", "deployment", "disable-health-check", "disk-gb", "disk-usage-bytes", "disk-utilization", "endpoints-api-service", "env", "env-variables", "files-count", "forwarded-ports", "health-check", "healthy-threshold", "host", "id", "idle-timeout", "image", "inbound-services", "instance-class", "instance-tag", "instances", "login", "manual-scaling", "max-concurrent-requests", "max-idle-instances", "max-instances", "max-pending-latency", "max-total-instances", "memory-gb", "min-idle-instances", "min-pending-latency", "min-total-instances", "name", "network", "network-utilization", "nobuild-files-regex", "request-utilization", "resources", "restart-threshold", "runtime", "script", "security-level", "serving-status", "source-url", "subnetwork-name", "target-concurrent-requests", "target-read-bytes-per-second", "target-read-ops-per-second", "target-received-bytes-per-second", "target-received-packets-per-second", "target-request-count-per-second", "target-sent-bytes-per-second", "target-sent-packets-per-second", "target-utilization", "target-write-bytes-per-second", "target-write-ops-per-second", "threadsafe", "timeout", "unhealthy-threshold", "url", "version-url", "vm", "zip"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["aggregation-window-length", "api-config", "auth-fail-action", "automatic-scaling", "basic-scaling", "beta-settings", "check-interval", "config-id", "container", "cool-down-period", "cpu", "cpu-utilization", "create-time", "created-by", "default-expiration", "deployment", "disable-health-check", "disk-gb", "disk-usage-bytes", "disk-utilization", "endpoints-api-service", "env", "env-variables", "failure-threshold", "files-count", "forwarded-ports", "health-check", "healthy-threshold", "host", "id", "idle-timeout", "image", "inbound-services", "initial-delay", "instance-class", "instance-tag", "instances", "liveness-check", "login", "manual-scaling", "max-concurrent-requests", "max-idle-instances", "max-instances", "max-pending-latency", "max-total-instances", "memory-gb", "min-idle-instances", "min-pending-latency", "min-total-instances", "name", "network", "network-utilization", "nobuild-files-regex", "path", "readiness-check", "request-utilization", "resources", "restart-threshold", "runtime", "script", "security-level", "serving-status", "source-url", "subnetwork-name", "success-threshold", "target-concurrent-requests", "target-read-bytes-per-second", "target-read-ops-per-second", "target-received-bytes-per-second", "target-received-packets-per-second", "target-request-count-per-second", "target-sent-bytes-per-second", "target-sent-packets-per-second", "target-utilization", "target-write-bytes-per-second", "target-write-ops-per-second", "threadsafe", "timeout", "unhealthy-threshold", "url", "version-url", "vm", "zip"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1447,18 +1472,27 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "endpoints-api-service.config-id" => Some(("endpointsApiService.configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "endpoints-api-service.name" => Some(("endpointsApiService.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.idle-timeout" => Some(("basicScaling.idleTimeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.max-instances" => Some(("basicScaling.maxInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "vm" => Some(("vm", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "instance-class" => Some(("instanceClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "version-url" => Some(("versionUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.check-interval" => Some(("readinessCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.host" => Some(("readinessCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.timeout" => Some(("readinessCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.path" => Some(("readinessCheck.path", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "readiness-check.success-threshold" => Some(("readinessCheck.successThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "readiness-check.failure-threshold" => Some(("readinessCheck.failureThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "api-config.url" => Some(("apiConfig.url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.security-level" => Some(("apiConfig.securityLevel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.auth-fail-action" => Some(("apiConfig.authFailAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.login" => Some(("apiConfig.login", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.script" => Some(("apiConfig.script", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.subnetwork-name" => Some(("network.subnetworkName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.restart-threshold" => Some(("healthCheck.restartThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "health-check.check-interval" => Some(("healthCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.unhealthy-threshold" => Some(("healthCheck.unhealthyThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -1466,7 +1500,6 @@ impl<'n> Engine<'n> { "health-check.host" => Some(("healthCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.timeout" => Some(("healthCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.disable-health-check" => Some(("healthCheck.disableHealthCheck", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "env" => Some(("env", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "disk-usage-bytes" => Some(("diskUsageBytes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1475,13 +1508,13 @@ impl<'n> Engine<'n> { "automatic-scaling.network-utilization.target-sent-packets-per-second" => Some(("automaticScaling.networkUtilization.targetSentPacketsPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-received-bytes-per-second" => Some(("automaticScaling.networkUtilization.targetReceivedBytesPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-bytes-per-second" => Some(("automaticScaling.networkUtilization.targetSentBytesPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.min-idle-instances" => Some(("automaticScaling.minIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.max-pending-latency" => Some(("automaticScaling.maxPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "automatic-scaling.max-idle-instances" => Some(("automaticScaling.maxIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-ops-per-second" => Some(("automaticScaling.diskUtilization.targetReadOpsPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-bytes-per-second" => Some(("automaticScaling.diskUtilization.targetWriteBytesPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-bytes-per-second" => Some(("automaticScaling.diskUtilization.targetReadBytesPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-ops-per-second" => Some(("automaticScaling.diskUtilization.targetWriteOpsPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.max-pending-latency" => Some(("automaticScaling.maxPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "automatic-scaling.max-idle-instances" => Some(("automaticScaling.maxIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.min-idle-instances" => Some(("automaticScaling.minIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.request-utilization.target-concurrent-requests" => Some(("automaticScaling.requestUtilization.targetConcurrentRequests", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.request-utilization.target-request-count-per-second" => Some(("automaticScaling.requestUtilization.targetRequestCountPerSecond", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.cool-down-period" => Some(("automaticScaling.coolDownPeriod", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1496,21 +1529,26 @@ impl<'n> Engine<'n> { "resources.memory-gb" => Some(("resources.memoryGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "inbound-services" => Some(("inboundServices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "created-by" => Some(("createdBy", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "deployment.container.image" => Some(("deployment.container.image", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "deployment.zip.files-count" => Some(("deployment.zip.filesCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "deployment.zip.source-url" => Some(("deployment.zip.sourceUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.check-interval" => Some(("livenessCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.initial-delay" => Some(("livenessCheck.initialDelay", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.host" => Some(("livenessCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.timeout" => Some(("livenessCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.path" => Some(("livenessCheck.path", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "liveness-check.success-threshold" => Some(("livenessCheck.successThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "liveness-check.failure-threshold" => Some(("livenessCheck.failureThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.subnetwork-name" => Some(("network.subnetworkName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "nobuild-files-regex" => Some(("nobuildFilesRegex", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "serving-status" => Some(("servingStatus", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "runtime" => Some(("runtime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["aggregation-window-length", "api-config", "auth-fail-action", "automatic-scaling", "basic-scaling", "beta-settings", "check-interval", "config-id", "container", "cool-down-period", "cpu", "cpu-utilization", "create-time", "created-by", "default-expiration", "deployment", "disable-health-check", "disk-gb", "disk-usage-bytes", "disk-utilization", "endpoints-api-service", "env", "env-variables", "files-count", "forwarded-ports", "health-check", "healthy-threshold", "host", "id", "idle-timeout", "image", "inbound-services", "instance-class", "instance-tag", "instances", "login", "manual-scaling", "max-concurrent-requests", "max-idle-instances", "max-instances", "max-pending-latency", "max-total-instances", "memory-gb", "min-idle-instances", "min-pending-latency", "min-total-instances", "name", "network", "network-utilization", "nobuild-files-regex", "request-utilization", "resources", "restart-threshold", "runtime", "script", "security-level", "serving-status", "source-url", "subnetwork-name", "target-concurrent-requests", "target-read-bytes-per-second", "target-read-ops-per-second", "target-received-bytes-per-second", "target-received-packets-per-second", "target-request-count-per-second", "target-sent-bytes-per-second", "target-sent-packets-per-second", "target-utilization", "target-write-bytes-per-second", "target-write-ops-per-second", "threadsafe", "timeout", "unhealthy-threshold", "url", "version-url", "vm", "zip"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["aggregation-window-length", "api-config", "auth-fail-action", "automatic-scaling", "basic-scaling", "beta-settings", "check-interval", "config-id", "container", "cool-down-period", "cpu", "cpu-utilization", "create-time", "created-by", "default-expiration", "deployment", "disable-health-check", "disk-gb", "disk-usage-bytes", "disk-utilization", "endpoints-api-service", "env", "env-variables", "failure-threshold", "files-count", "forwarded-ports", "health-check", "healthy-threshold", "host", "id", "idle-timeout", "image", "inbound-services", "initial-delay", "instance-class", "instance-tag", "instances", "liveness-check", "login", "manual-scaling", "max-concurrent-requests", "max-idle-instances", "max-instances", "max-pending-latency", "max-total-instances", "memory-gb", "min-idle-instances", "min-pending-latency", "min-total-instances", "name", "network", "network-utilization", "nobuild-files-regex", "path", "readiness-check", "request-utilization", "resources", "restart-threshold", "runtime", "script", "security-level", "serving-status", "source-url", "subnetwork-name", "success-threshold", "target-concurrent-requests", "target-read-bytes-per-second", "target-read-ops-per-second", "target-received-bytes-per-second", "target-received-packets-per-second", "target-request-count-per-second", "target-sent-bytes-per-second", "target-sent-packets-per-second", "target-utilization", "target-write-bytes-per-second", "target-write-ops-per-second", "threadsafe", "timeout", "unhealthy-threshold", "url", "version-url", "vm", "zip"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1738,7 +1776,9 @@ fn main() { let arg_data = [ ("apps", "methods: 'create', 'get', 'locations-get', 'locations-list', 'operations-get', 'operations-list', 'patch', 'repair', 'services-delete', 'services-get', 'services-list', 'services-patch', 'services-versions-create', 'services-versions-delete', 'services-versions-get', 'services-versions-instances-debug', 'services-versions-instances-delete', 'services-versions-instances-get', 'services-versions-instances-list', 'services-versions-list' and 'services-versions-patch'", vec![ ("create", - Some(r##"Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project)."##), + Some(r##"Creates an App Engine application for a Google Cloud Platform project. Required fields: + id - The ID of the target Cloud Platform project. + location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/)."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_cli/apps_create", vec![ (Some(r##"kv"##), @@ -1882,7 +1922,9 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.default_cookie_expiration)"##), + Some(r##"Updates the specified Application resource. You can update the following fields: + auth_domain - Google authentication domain for controlling user access to the application. + default_cookie_expiration - Cookie expiration policy for the application."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_cli/apps_patch", vec![ (Some(r##"apps-id"##), @@ -2278,7 +2320,7 @@ fn main() { Some(false)), ]), ("services-versions-instances-list", - Some(r##"Lists the instances of a version."##), + Some(r##"Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_cli/apps_services-versions-instances-list", vec![ (Some(r##"apps-id"##), @@ -2340,7 +2382,11 @@ fn main() { Some(false)), ]), ("services-versions-patch", - Some(r##"Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment."##), + Some(r##"Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: + serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. + instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. + automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_cli/apps_services-versions-patch", vec![ (Some(r##"apps-id"##), @@ -2385,8 +2431,8 @@ fn main() { let mut app = App::new("appengine1") .author("Sebastian Thiel ") - .version("1.0.4+20161208") - .about("Provisions and manages App Engine applications.") + .version("1.0.4+20170522") + .about("The App Engine Admin API enables developers to provision and manage their App Engine applications.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_appengine1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/appengine1/Cargo.toml b/gen/appengine1/Cargo.toml index 72fba3ce46..cbd0cd1c63 100644 --- a/gen/appengine1/Cargo.toml +++ b/gen/appengine1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-appengine1" -version = "1.0.4+20161208" +version = "1.0.4+20170522" authors = ["Sebastian Thiel "] description = "A complete library to interact with appengine (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1" homepage = "https://cloud.google.com/appengine/docs/admin-api/" -documentation = "https://docs.rs/google-appengine1/1.0.4+20161208" +documentation = "https://docs.rs/google-appengine1/1.0.4+20170522" license = "MIT" keywords = ["appengine", "google", "protocol", "web", "api"] diff --git a/gen/appengine1/README.md b/gen/appengine1/README.md index 294efb8ecb..1ded5fc540 100644 --- a/gen/appengine1/README.md +++ b/gen/appengine1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-appengine1` library allows access to all features of the *Google appengine* service. -This documentation was generated from *appengine* crate version *1.0.4+20161208*, where *20161208* is the exact revision of the *appengine:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *appengine* crate version *1.0.4+20170522*, where *20170522* is the exact revision of the *appengine:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *appengine* *v1* API can be found at the [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.Appengine.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.Appengine.html) ... * apps - * [*create*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppCreateCall.html), [*get*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppGetCall.html), [*locations get*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppLocationGetCall.html), [*locations list*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppLocationListCall.html), [*operations get*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppOperationGetCall.html), [*operations list*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppOperationListCall.html), [*patch*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppPatchCall.html), [*repair*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppRepairCall.html), [*services delete*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceDeleteCall.html), [*services get*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceGetCall.html), [*services list*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceListCall.html), [*services patch*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServicePatchCall.html), [*services versions create*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceVersionCreateCall.html), [*services versions delete*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceVersionDeleteCall.html), [*services versions get*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceVersionGetCall.html), [*services versions instances debug*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceVersionInstanceDebugCall.html), [*services versions instances delete*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceVersionInstanceDeleteCall.html), [*services versions instances get*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceVersionInstanceGetCall.html), [*services versions instances list*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceVersionInstanceListCall.html), [*services versions list*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceVersionListCall.html) and [*services versions patch*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.AppServiceVersionPatchCall.html) + * [*create*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppCreateCall.html), [*get*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppGetCall.html), [*locations get*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppLocationGetCall.html), [*locations list*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppLocationListCall.html), [*operations get*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppOperationGetCall.html), [*operations list*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppOperationListCall.html), [*patch*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppPatchCall.html), [*repair*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppRepairCall.html), [*services delete*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceDeleteCall.html), [*services get*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceGetCall.html), [*services list*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceListCall.html), [*services patch*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServicePatchCall.html), [*services versions create*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceVersionCreateCall.html), [*services versions delete*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceVersionDeleteCall.html), [*services versions get*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceVersionGetCall.html), [*services versions instances debug*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceVersionInstanceDebugCall.html), [*services versions instances delete*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceVersionInstanceDeleteCall.html), [*services versions instances get*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceVersionInstanceGetCall.html), [*services versions instances list*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceVersionInstanceListCall.html), [*services versions list*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceVersionListCall.html) and [*services versions patch*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.AppServiceVersionPatchCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/struct.Appengine.html)** +* **[Hub](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/struct.Appengine.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.Part.html)** + * **[Parts](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -131,17 +131,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.Delegate.html), 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-appengine1/1.0.4+20161208/google_appengine1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.ResponseResult.html), 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")`. @@ -151,29 +151,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.CallBuilder.html) 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-appengine1/1.0.4+20161208/google_appengine1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-appengine1/1.0.4+20161208/google_appengine1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.CallBuilder.html), 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-appengine1/1.0.4+20161208/google_appengine1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-appengine1/1.0.4+20170522/google_appengine1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/appengine1/src/lib.rs b/gen/appengine1/src/lib.rs index 374fbc587a..1d05dc5516 100644 --- a/gen/appengine1/src/lib.rs +++ b/gen/appengine1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *appengine* crate version *1.0.4+20161208*, where *20161208* is the exact revision of the *appengine:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *appengine* crate version *1.0.4+20170522*, where *20170522* is the exact revision of the *appengine:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *appengine* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). @@ -380,6 +380,35 @@ pub struct ListInstancesResponse { impl ResponseResult for ListInstancesResponse {} +/// Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct LivenessCheck { + /// Host header to send when performing a HTTP Liveness check. Example: "myapp.appspot.com" + pub host: Option, + /// Time before the check is considered failed. + pub timeout: Option, + /// Interval between health checks. + #[serde(rename="checkInterval")] + pub check_interval: Option, + /// The request path. + pub path: Option, + /// Number of consecutive successful checks required before considering the VM healthy. + #[serde(rename="successThreshold")] + pub success_threshold: Option, + /// The initial delay before starting to execute the checks. + #[serde(rename="initialDelay")] + pub initial_delay: Option, + /// Number of consecutive failed checks required before considering the VM unhealthy. + #[serde(rename="failureThreshold")] + pub failure_threshold: Option, +} + +impl Part for LivenessCheck {} + + /// Extra network settings. Only applicable for VM runtimes. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -394,7 +423,10 @@ pub struct Network { pub forwarded_ports: Option>, /// Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default. pub name: Option, - /// Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network. If the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range. If the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network. If the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app. + /// Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network. + /// If the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range. + /// If the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network. + /// If the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app. #[serde(rename="subnetworkName")] pub subnetwork_name: Option, } @@ -414,10 +446,10 @@ impl Part for Network {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Service { - /// Mapping that defines fractional HTTP traffic diversion to different versions within the service. - pub split: Option, /// Relative name of the service within the application. Example: default.@OutputOnly pub id: Option, + /// Mapping that defines fractional HTTP traffic diversion to different versions within the service. + pub split: Option, /// Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly pub name: Option, } @@ -459,26 +491,34 @@ pub struct Application { pub default_hostname: Option, /// Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly pub name: Option, + /// The Google Container Registry domain used for storing managed build docker images for this application. + #[serde(rename="gcrDomain")] + pub gcr_domain: Option, /// Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly #[serde(rename="codeBucket")] pub code_bucket: Option, /// Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly #[serde(rename="defaultBucket")] pub default_bucket: Option, - /// HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent.@OutputOnly + /// HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent. Up to 20 dispatch rules can be supported.@OutputOnly #[serde(rename="dispatchRules")] pub dispatch_rules: Option>, /// Cookie expiration policy for this application. #[serde(rename="defaultCookieExpiration")] pub default_cookie_expiration: Option, + /// Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp. + pub id: Option, /// Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US #[serde(rename="locationId")] pub location_id: Option, + /// Serving status of this application. + #[serde(rename="servingStatus")] + pub serving_status: Option, /// Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account. #[serde(rename="authDomain")] pub auth_domain: Option, - /// Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp. - pub id: Option, + /// no description provided + pub iap: Option, } impl RequestValue for Application {} @@ -492,8 +532,8 @@ impl ResponseResult for Application {} /// 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*). /// -/// * [services versions get apps](struct.AppServiceVersionGetCall.html) (response) /// * [services versions create apps](struct.AppServiceVersionCreateCall.html) (request) +/// * [services versions get apps](struct.AppServiceVersionGetCall.html) (response) /// * [services versions patch apps](struct.AppServiceVersionPatchCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] @@ -501,14 +541,14 @@ pub struct Version { /// Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app. #[serde(rename="endpointsApiService")] pub endpoints_api_service: Option, + /// Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set. + #[serde(rename="defaultExpiration")] + pub default_expiration: Option, + /// Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly + pub name: Option, /// A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity. #[serde(rename="basicScaling")] pub basic_scaling: Option, - /// Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly - pub name: Option, - /// Metadata settings that are supplied to this version to enable beta runtime features. - #[serde(rename="betaSettings")] - pub beta_settings: Option>, /// A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. #[serde(rename="manualScaling")] pub manual_scaling: Option, @@ -520,9 +560,14 @@ pub struct Version { /// Before an application can receive email or XMPP messages, the application must be configured to enable the service. #[serde(rename="inboundServices")] pub inbound_services: Option>, - /// Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling. + /// Instance class that is used to run this version. Valid values are: + /// AutomaticScaling: F1, F2, F4, F4_1G + /// ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling. #[serde(rename="instanceClass")] pub instance_class: Option, + /// Metadata settings that are supplied to this version to enable beta runtime features. + #[serde(rename="betaSettings")] + pub beta_settings: Option>, /// Email address of the user who created this version.@OutputOnly #[serde(rename="createdBy")] pub created_by: Option, @@ -531,29 +576,32 @@ pub struct Version { /// Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set. #[serde(rename="errorHandlers")] pub error_handlers: Option>, + /// Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set. + #[serde(rename="nobuildFilesRegex")] + pub nobuild_files_regex: Option, /// Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING. #[serde(rename="servingStatus")] pub serving_status: Option, /// Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-". pub id: Option, - /// Extra network settings. Only applicable for VM runtimes. - pub network: Option, + /// Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set. + #[serde(rename="readinessCheck")] + pub readiness_check: Option, + /// Whether multiple requests can be dispatched to this version at once. + pub threadsafe: Option, /// Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set. #[serde(rename="apiConfig")] pub api_config: Option, - /// Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set. - #[serde(rename="nobuildFilesRegex")] - pub nobuild_files_regex: Option, - /// Whether multiple requests can be dispatched to this version at once. - pub threadsafe: Option, + /// Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set. + #[serde(rename="livenessCheck")] + pub liveness_check: Option, + /// Extra network settings. Only applicable for VM runtimes. + pub network: Option, /// An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set. pub handlers: Option>, /// Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set. #[serde(rename="healthCheck")] pub health_check: Option, - /// Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set. - #[serde(rename="defaultExpiration")] - pub default_expiration: Option, /// Serving URL for this version. Example: "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly #[serde(rename="versionUrl")] pub version_url: Option, @@ -580,7 +628,7 @@ impl RequestValue for Version {} impl ResponseResult for Version {} -/// The response message for LocationService.ListLocations. +/// The response message for Locations.ListLocations. /// /// # Activities /// @@ -612,7 +660,9 @@ impl ResponseResult for ListLocationsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Location { - /// Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} + /// Cross-service attributes for the location. For example + /// {"cloud.googleapis.com/region": "us-east1"} + /// pub labels: Option>, /// The canonical id for this location. For example: "us-east1". #[serde(rename="locationId")] @@ -637,7 +687,9 @@ impl ResponseResult for Location {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DebugInstanceRequest { - /// Public SSH key to add to the instance. Examples: [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). + /// Public SSH key to add to the instance. Examples: + /// [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] + /// [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). #[serde(rename="sshKey")] pub ssh_key: Option, } @@ -683,7 +735,14 @@ pub struct Resources { impl Part for Resources {} -/// The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: Simple to use and understand for most users Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc which can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting purpose. Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons. +/// The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: +/// Simple to use and understand for most users +/// Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: +/// Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. +/// Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting. +/// Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. +/// Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. +/// Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -810,25 +869,21 @@ pub struct Volume { impl Part for Volume {} -/// Response message for Services.ListServices. +/// Code and application artifacts used to deploy a version to App Engine. /// -/// # 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*). -/// -/// * [services list apps](struct.AppServiceListCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListServicesResponse { - /// The services belonging to the requested application. - pub services: Option>, - /// Continuation token for fetching the next page of results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, +pub struct Deployment { + /// Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call. + pub files: Option>, + /// The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment. + pub container: Option, + /// The zip file for this deployment, if this is a zip deployment. + pub zip: Option, } -impl ResponseResult for ListServicesResponse {} +impl Part for Deployment {} /// Executes a script to handle the request that matches the URL pattern. @@ -845,21 +900,17 @@ pub struct ScriptHandler { impl Part for ScriptHandler {} -/// Rules to match an HTTP request and dispatch that request to a service. +/// Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UrlDispatchRule { - /// Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters. - pub path: Option, - /// Domain name to match against. The wildcard "*" is supported if specified before a period: "*.".Defaults to matching all domains: "*". - pub domain: Option, - /// Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default. - pub service: Option, +pub struct ContainerInfo { + /// URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" + pub image: Option, } -impl Part for UrlDispatchRule {} +impl Part for ContainerInfo {} /// Uses Google Cloud Endpoints to handle requests. @@ -906,21 +957,26 @@ pub struct HealthCheck { impl Part for HealthCheck {} -/// Code and application artifacts used to deploy a version to App Engine. +/// Identity-Aware Proxy /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Deployment { - /// Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call. - pub files: Option>, - /// A Docker image that App Engine uses to run the version. Only applicable for instances in App Engine flexible environment. - pub container: Option, - /// The zip file for this deployment, if this is a zip deployment. - pub zip: Option, +pub struct IdentityAwareProxy { + /// OAuth2 client ID to use for the authentication flow. + #[serde(rename="oauth2ClientId")] + pub oauth2_client_id: Option, + /// Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty. + pub enabled: Option, + /// OAuth2 client secret to use for the authentication flow.For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly + #[serde(rename="oauth2ClientSecret")] + pub oauth2_client_secret: Option, + /// Hex-encoded SHA-256 hash of the client secret.@OutputOnly + #[serde(rename="oauth2ClientSecretSha256")] + pub oauth2_client_secret_sha256: Option, } -impl Part for Deployment {} +impl Part for IdentityAwareProxy {} /// Custom static error page to be served when an error occurs. @@ -955,18 +1011,18 @@ pub struct AutomaticScaling { /// Target scaling by network usage. #[serde(rename="networkUtilization")] pub network_utilization: Option, - /// Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service. - #[serde(rename="minIdleInstances")] - pub min_idle_instances: Option, + /// Target scaling by disk usage. + #[serde(rename="diskUtilization")] + pub disk_utilization: Option, /// Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it. #[serde(rename="maxPendingLatency")] pub max_pending_latency: Option, /// Maximum number of idle instances that should be maintained for this version. #[serde(rename="maxIdleInstances")] pub max_idle_instances: Option, - /// Target scaling by disk usage. - #[serde(rename="diskUtilization")] - pub disk_utilization: Option, + /// Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service. + #[serde(rename="minIdleInstances")] + pub min_idle_instances: Option, /// Target scaling by request utilization. #[serde(rename="requestUtilization")] pub request_utilization: Option, @@ -1032,7 +1088,7 @@ pub struct FileInfo { /// The MIME type of the file.Defaults to the value from Google Cloud Storage. #[serde(rename="mimeType")] pub mime_type: Option, - /// URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'. + /// URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'. #[serde(rename="sourceUrl")] pub source_url: Option, /// The SHA1 hash of the file, in hex. @@ -1052,7 +1108,7 @@ pub struct ZipInfo { /// An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow. #[serde(rename="filesCount")] pub files_count: Option, - /// URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'. + /// URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'. #[serde(rename="sourceUrl")] pub source_url: Option, } @@ -1087,11 +1143,11 @@ impl Part for EndpointsApiService {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListOperationsResponse { - /// A list of operations that matches the specified filter in the request. - pub operations: Option>, /// The standard List next-page token. #[serde(rename="nextPageToken")] pub next_page_token: Option, + /// A list of operations that matches the specified filter in the request. + pub operations: Option>, } impl ResponseResult for ListOperationsResponse {} @@ -1128,8 +1184,8 @@ pub struct Instance { pub vm_ip: Option, /// Average queries per second (QPS) over the last minute.@OutputOnly pub qps: Option, - /// Availability of the instance.@OutputOnly - pub availability: Option, + /// Relative name of the instance within the version. Example: instance-1.@OutputOnly + pub id: Option, /// Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly pub name: Option, /// Number of errors since this instance was started.@OutputOnly @@ -1137,8 +1193,8 @@ pub struct Instance { /// Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly #[serde(rename="vmStatus")] pub vm_status: Option, - /// Relative name of the instance within the version. Example: instance-1.@OutputOnly - pub id: Option, + /// Availability of the instance.@OutputOnly + pub availability: Option, /// Average latency (ms) over the last minute.@OutputOnly #[serde(rename="averageLatency")] pub average_latency: Option, @@ -1262,17 +1318,68 @@ pub struct RequestUtilization { impl Part for RequestUtilization {} -/// Docker image that is used to start a VM container for the version you deploy. +/// Readiness checking configuration for VM instances. Unhealthy instances are removed from traffic rotation. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ContainerInfo { - /// URI to the hosted container image in a Docker repository. The URI must be fully qualified and include a tag or digest. Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" - pub image: Option, +pub struct ReadinessCheck { + /// Host header to send when performing a HTTP Readiness check. Example: "myapp.appspot.com" + pub host: Option, + /// Time before the check is considered failed. + pub timeout: Option, + /// Interval between health checks. + #[serde(rename="checkInterval")] + pub check_interval: Option, + /// The request path. + pub path: Option, + /// Number of consecutive successful checks required before receiving traffic. + #[serde(rename="successThreshold")] + pub success_threshold: Option, + /// Number of consecutive failed checks required before removing traffic. + #[serde(rename="failureThreshold")] + pub failure_threshold: Option, } -impl Part for ContainerInfo {} +impl Part for ReadinessCheck {} + + +/// Response message for Services.ListServices. +/// +/// # 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*). +/// +/// * [services list apps](struct.AppServiceListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListServicesResponse { + /// The services belonging to the requested application. + pub services: Option>, + /// Continuation token for fetching the next page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, +} + +impl ResponseResult for ListServicesResponse {} + + +/// Rules to match an HTTP request and dispatch that request to a service. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UrlDispatchRule { + /// Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters. + pub path: Option, + /// Domain name to match against. The wildcard "*" is supported if specified before a period: "*.".Defaults to matching all domains: "*". + pub domain: Option, + /// Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default. + pub service: Option, +} + +impl Part for UrlDispatchRule {} /// This resource represents a long-running operation that is the result of a network API call. @@ -1296,16 +1403,16 @@ impl Part for ContainerInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { - /// Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. - pub metadata: Option>, + /// The error result of the operation in case of failure or cancellation. + pub error: Option, /// If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. pub done: Option, /// The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. pub response: Option>, /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name. pub name: Option, - /// The error result of the operation in case of failure or cancellation. - pub error: Option, + /// Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + pub metadata: Option>, } impl ResponseResult for Operation {} @@ -1356,7 +1463,7 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the instances of a version. + /// Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). /// /// # Arguments /// @@ -1463,7 +1570,9 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.default_cookie_expiration) + /// Updates the specified Application resource. You can update the following fields: + /// auth_domain - Google authentication domain for controlling user access to the application. + /// default_cookie_expiration - Cookie expiration policy for the application. /// /// # Arguments /// @@ -1506,7 +1615,11 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + /// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: + /// serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. + /// instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. + /// automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + /// automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. /// /// # Arguments /// @@ -1752,7 +1865,9 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project). + /// Creates an App Engine application for a Google Cloud Platform project. Required fields: + /// id - The ID of the target Cloud Platform project. + /// location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/). /// /// # Arguments /// @@ -1798,7 +1913,7 @@ impl<'a, C, A> AppMethods<'a, C, A> { // CallBuilders ### // ################# -/// Lists the instances of a version. +/// Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). /// /// A builder for the *services.versions.instances.list* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -2049,10 +2164,10 @@ impl<'a, C, A> AppServiceVersionInstanceListCall<'a, C, A> where C: BorrowMut AppServiceVersionCreateCall<'a, C, A> where C: BorrowMut AppRepairCall<'a, C, A> where C: BorrowMut, A: oau /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -2913,10 +3028,10 @@ impl<'a, C, A> AppServiceVersionInstanceDebugCall<'a, C, A> where C: BorrowMut AppServiceGetCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -3204,7 +3319,9 @@ impl<'a, C, A> AppServiceGetCall<'a, C, A> where C: BorrowMut, A: } -/// Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#Application.FIELDS.default_cookie_expiration) +/// Updates the specified Application resource. You can update the following fields: +/// auth_domain - Google authentication domain for controlling user access to the application. +/// default_cookie_expiration - Cookie expiration policy for the application. /// /// A builder for the *patch* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -3450,10 +3567,10 @@ impl<'a, C, A> AppPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -3727,10 +3844,10 @@ impl<'a, C, A> AppServiceVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut< /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -3765,7 +3882,11 @@ impl<'a, C, A> AppServiceVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut< } -/// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. +/// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: +/// serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. +/// instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. +/// automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. +/// automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. /// /// A builder for the *services.versions.patch* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -4035,10 +4156,10 @@ impl<'a, C, A> AppServiceVersionPatchCall<'a, C, A> where C: BorrowMut AppServiceVersionListCall<'a, C, A> where C: BorrowMut AppOperationGetCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -4842,10 +4963,10 @@ impl<'a, C, A> AppServiceListCall<'a, C, A> where C: BorrowMut, A /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -5119,10 +5240,10 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -5396,10 +5517,10 @@ impl<'a, C, A> AppServiceVersionInstanceGetCall<'a, C, A> where C: BorrowMut AppOperationListCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -5938,10 +6059,10 @@ impl<'a, C, A> AppServiceVersionDeleteCall<'a, C, A> where C: BorrowMut AppLocationGetCall<'a, C, A> where C: BorrowMut, A /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -6472,7 +6593,7 @@ impl<'a, C, A> AppServicePatchCall<'a, C, A> where C: BorrowMut, self._update_mask = Some(new_value.to_string()); self } - /// Set to true to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + /// Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). /// /// Sets the *migrate traffic* query property to the given value. pub fn migrate_traffic(mut self, new_value: bool) -> AppServicePatchCall<'a, C, A> { @@ -6499,10 +6620,10 @@ impl<'a, C, A> AppServicePatchCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -6740,10 +6861,10 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -6993,10 +7114,10 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -7031,7 +7152,9 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, } -/// Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project). +/// Creates an App Engine application for a Google Cloud Platform project. Required fields: +/// id - The ID of the target Cloud Platform project. +/// location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/). /// /// A builder for the *create* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -7232,10 +7355,10 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -7509,10 +7632,10 @@ impl<'a, C, A> AppServiceVersionGetCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with appengine (protocol v1beta4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta4-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-appengine1_beta4] path = "../appengine1_beta4" -version = "1.0.4+20161208" +version = "1.0.4+20170522" diff --git a/gen/appengine1_beta4-cli/README.md b/gen/appengine1_beta4-cli/README.md index 10e31ef357..af4e1e787a 100644 --- a/gen/appengine1_beta4-cli/README.md +++ b/gen/appengine1_beta4-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *appengine* API at revision *20161208*. The CLI is at version *1.0.4*. +This documentation was generated from the *appengine* API at revision *20170522*. The CLI is at version *1.0.4*. ```bash appengine1-beta4 [options] diff --git a/gen/appengine1_beta4-cli/mkdocs.yml b/gen/appengine1_beta4-cli/mkdocs.yml index 4b6001a44f..fb191e1a42 100644 --- a/gen/appengine1_beta4-cli/mkdocs.yml +++ b/gen/appengine1_beta4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: appengine v1.0.4+20161208 +site_name: appengine v1.0.4+20170522 site_url: http://byron.github.io/google-apis-rs/google-appengine1_beta4-cli site_description: A complete library to interact with appengine (protocol v1beta4) diff --git a/gen/appengine1_beta4-cli/src/main.rs b/gen/appengine1_beta4-cli/src/main.rs index 97e247cac3..ab60d3830d 100644 --- a/gen/appengine1_beta4-cli/src/main.rs +++ b/gen/appengine1_beta4-cli/src/main.rs @@ -74,11 +74,15 @@ impl<'n> Engine<'n> { "code-bucket" => Some(("codeBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-bucket" => Some(("defaultBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-cookie-expiration" => Some(("defaultCookieExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "auth-domain" => Some(("authDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-id" => Some(("iap.oauth2ClientId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.enabled" => Some(("iap.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret" => Some(("iap.oauth2ClientSecret", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret-sha256" => Some(("iap.oauth2ClientSecretSha256", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "id", "location", "name"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "enabled", "iap", "id", "location", "name", "oauth2-client-id", "oauth2-client-secret", "oauth2-client-secret-sha256"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -496,8 +500,8 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "split.shard-by" => Some(("split.shardBy", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "split.allocations" => Some(("split.allocations", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Map })), - "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["allocations", "id", "name", "shard-by", "split"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -589,18 +593,20 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.idle-timeout" => Some(("basicScaling.idleTimeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.max-instances" => Some(("basicScaling.maxInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "vm" => Some(("vm", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "instance-class" => Some(("instanceClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.url" => Some(("apiConfig.url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.security-level" => Some(("apiConfig.securityLevel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "api-config.auth-fail-action" => Some(("apiConfig.authFailAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.login" => Some(("apiConfig.login", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "api-config.auth-fail-action" => Some(("apiConfig.authFailAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.script" => Some(("apiConfig.script", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.restart-threshold" => Some(("healthCheck.restartThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "health-check.check-interval" => Some(("healthCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.unhealthy-threshold" => Some(("healthCheck.unhealthyThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -608,14 +614,13 @@ impl<'n> Engine<'n> { "health-check.host" => Some(("healthCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.timeout" => Some(("healthCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.disable-health-check" => Some(("healthCheck.disableHealthCheck", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "deployer" => Some(("deployer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "env" => Some(("env", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "automatic-scaling.min-pending-latency" => Some(("automaticScaling.minPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-received-bytes-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-bytes-per-sec" => Some(("automaticScaling.networkUtilization.targetSentBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.network-utilization.target-received-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetSentPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.network-utilization.target-received-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-ops-per-sec" => Some(("automaticScaling.diskUtilization.targetWriteOpsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-bytes-per-sec" => Some(("automaticScaling.diskUtilization.targetReadBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-ops-per-sec" => Some(("automaticScaling.diskUtilization.targetReadOpsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -635,12 +640,11 @@ impl<'n> Engine<'n> { "resources.disk-gb" => Some(("resources.diskGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "resources.cpu" => Some(("resources.cpu", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "resources.memory-gb" => Some(("resources.memoryGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), - "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "deployer" => Some(("deployer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "inbound-services" => Some(("inboundServices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "deployment.container.image" => Some(("deployment.container.image", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "nobuild-files-regex" => Some(("nobuildFilesRegex", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1148,18 +1152,20 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.idle-timeout" => Some(("basicScaling.idleTimeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.max-instances" => Some(("basicScaling.maxInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "vm" => Some(("vm", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "instance-class" => Some(("instanceClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.url" => Some(("apiConfig.url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.security-level" => Some(("apiConfig.securityLevel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "api-config.auth-fail-action" => Some(("apiConfig.authFailAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.login" => Some(("apiConfig.login", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "api-config.auth-fail-action" => Some(("apiConfig.authFailAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.script" => Some(("apiConfig.script", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.restart-threshold" => Some(("healthCheck.restartThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "health-check.check-interval" => Some(("healthCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.unhealthy-threshold" => Some(("healthCheck.unhealthyThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -1167,14 +1173,13 @@ impl<'n> Engine<'n> { "health-check.host" => Some(("healthCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.timeout" => Some(("healthCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.disable-health-check" => Some(("healthCheck.disableHealthCheck", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "deployer" => Some(("deployer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "env" => Some(("env", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "automatic-scaling.min-pending-latency" => Some(("automaticScaling.minPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-received-bytes-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-bytes-per-sec" => Some(("automaticScaling.networkUtilization.targetSentBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.network-utilization.target-received-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetSentPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.network-utilization.target-received-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-ops-per-sec" => Some(("automaticScaling.diskUtilization.targetWriteOpsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-bytes-per-sec" => Some(("automaticScaling.diskUtilization.targetReadBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-ops-per-sec" => Some(("automaticScaling.diskUtilization.targetReadOpsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -1194,12 +1199,11 @@ impl<'n> Engine<'n> { "resources.disk-gb" => Some(("resources.diskGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "resources.cpu" => Some(("resources.cpu", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "resources.memory-gb" => Some(("resources.memoryGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), - "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "deployer" => Some(("deployer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "inbound-services" => Some(("inboundServices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "deployment.container.image" => Some(("deployment.container.image", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "nobuild-files-regex" => Some(("nobuildFilesRegex", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1412,11 +1416,15 @@ impl<'n> Engine<'n> { "code-bucket" => Some(("codeBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-bucket" => Some(("defaultBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-cookie-expiration" => Some(("defaultCookieExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "auth-domain" => Some(("authDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-id" => Some(("iap.oauth2ClientId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.enabled" => Some(("iap.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret" => Some(("iap.oauth2ClientSecret", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret-sha256" => Some(("iap.oauth2ClientSecretSha256", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "id", "location", "name"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "enabled", "iap", "id", "location", "name", "oauth2-client-id", "oauth2-client-secret", "oauth2-client-secret-sha256"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1641,7 +1649,9 @@ fn main() { let arg_data = [ ("apps", "methods: 'create', 'get', 'locations-get', 'locations-list', 'modules-delete', 'modules-get', 'modules-list', 'modules-patch', 'modules-versions-create', 'modules-versions-delete', 'modules-versions-get', 'modules-versions-instances-debug', 'modules-versions-instances-delete', 'modules-versions-instances-get', 'modules-versions-instances-list', 'modules-versions-list', 'modules-versions-patch', 'operations-get', 'operations-list' and 'patch'", vec![ ("create", - Some(r##"Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project)."##), + Some(r##"Creates an App Engine application for a Google Cloud Platform project. Required fields: + id - The ID of the target Cloud Platform project. + location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/)."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_beta4_cli/apps_create", vec![ (Some(r##"kv"##), @@ -2075,7 +2085,7 @@ fn main() { Some(false)), ]), ("modules-versions-instances-list", - Some(r##"Lists the instances of a version."##), + Some(r##"Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_beta4_cli/apps_modules-versions-instances-list", vec![ (Some(r##"apps-id"##), @@ -2137,7 +2147,11 @@ fn main() { Some(false)), ]), ("modules-versions-patch", - Some(r##"Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment."##), + Some(r##"Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: + serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. + instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. + automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_beta4_cli/apps_modules-versions-patch", vec![ (Some(r##"apps-id"##), @@ -2227,7 +2241,9 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)"##), + Some(r##"Updates the specified Application resource. You can update the following fields: + auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain) + default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)"##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_beta4_cli/apps_patch", vec![ (Some(r##"apps-id"##), @@ -2260,8 +2276,8 @@ fn main() { let mut app = App::new("appengine1-beta4") .author("Sebastian Thiel ") - .version("1.0.4+20161208") - .about("Provisions and manages App Engine applications.") + .version("1.0.4+20170522") + .about("The App Engine Admin API enables developers to provision and manage their App Engine applications.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_appengine1_beta4_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/appengine1_beta4/Cargo.toml b/gen/appengine1_beta4/Cargo.toml index f92e4b7b85..bfb37109a7 100644 --- a/gen/appengine1_beta4/Cargo.toml +++ b/gen/appengine1_beta4/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-appengine1_beta4" -version = "1.0.4+20161208" +version = "1.0.4+20170522" authors = ["Sebastian Thiel "] description = "A complete library to interact with appengine (protocol v1beta4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta4" homepage = "https://cloud.google.com/appengine/docs/admin-api/" -documentation = "https://docs.rs/google-appengine1_beta4/1.0.4+20161208" +documentation = "https://docs.rs/google-appengine1_beta4/1.0.4+20170522" license = "MIT" keywords = ["appengine", "google", "protocol", "web", "api"] diff --git a/gen/appengine1_beta4/README.md b/gen/appengine1_beta4/README.md index 2aad86afa7..acb8724e7e 100644 --- a/gen/appengine1_beta4/README.md +++ b/gen/appengine1_beta4/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-appengine1_beta4` library allows access to all features of the *Google appengine* service. -This documentation was generated from *appengine* crate version *1.0.4+20161208*, where *20161208* is the exact revision of the *appengine:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *appengine* crate version *1.0.4+20170522*, where *20170522* is the exact revision of the *appengine:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *appengine* *v1_beta4* API can be found at the [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.Appengine.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.Appengine.html) ... * apps - * [*create*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppCreateCall.html), [*get*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppGetCall.html), [*locations get*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppLocationGetCall.html), [*locations list*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppLocationListCall.html), [*modules delete*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleDeleteCall.html), [*modules get*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleGetCall.html), [*modules list*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleListCall.html), [*modules patch*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModulePatchCall.html), [*modules versions create*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleVersionCreateCall.html), [*modules versions delete*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleVersionDeleteCall.html), [*modules versions get*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleVersionGetCall.html), [*modules versions instances debug*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleVersionInstanceDebugCall.html), [*modules versions instances delete*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleVersionInstanceDeleteCall.html), [*modules versions instances get*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleVersionInstanceGetCall.html), [*modules versions instances list*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleVersionInstanceListCall.html), [*modules versions list*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleVersionListCall.html), [*modules versions patch*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppModuleVersionPatchCall.html), [*operations get*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppOperationGetCall.html), [*operations list*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppOperationListCall.html) and [*patch*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.AppPatchCall.html) + * [*create*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppCreateCall.html), [*get*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppGetCall.html), [*locations get*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppLocationGetCall.html), [*locations list*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppLocationListCall.html), [*modules delete*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleDeleteCall.html), [*modules get*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleGetCall.html), [*modules list*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleListCall.html), [*modules patch*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModulePatchCall.html), [*modules versions create*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleVersionCreateCall.html), [*modules versions delete*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleVersionDeleteCall.html), [*modules versions get*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleVersionGetCall.html), [*modules versions instances debug*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleVersionInstanceDebugCall.html), [*modules versions instances delete*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleVersionInstanceDeleteCall.html), [*modules versions instances get*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleVersionInstanceGetCall.html), [*modules versions instances list*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleVersionInstanceListCall.html), [*modules versions list*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleVersionListCall.html), [*modules versions patch*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppModuleVersionPatchCall.html), [*operations get*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppOperationGetCall.html), [*operations list*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppOperationListCall.html) and [*patch*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.AppPatchCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/struct.Appengine.html)** +* **[Hub](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/struct.Appengine.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.Part.html)** + * **[Parts](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -132,17 +132,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.Delegate.html), 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-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.ResponseResult.html), 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")`. @@ -152,29 +152,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.CallBuilder.html) 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-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.RequestValue.html) and -[decodable](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.RequestValue.html) and +[decodable](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.CallBuilder.html), 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-appengine1_beta4/1.0.4+20161208/google_appengine1_beta4/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-appengine1_beta4/1.0.4+20170522/google_appengine1_beta4/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/appengine1_beta4/src/lib.rs b/gen/appengine1_beta4/src/lib.rs index 9f028423f3..246de84209 100644 --- a/gen/appengine1_beta4/src/lib.rs +++ b/gen/appengine1_beta4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *appengine* crate version *1.0.4+20161208*, where *20161208* is the exact revision of the *appengine:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *appengine* crate version *1.0.4+20170522*, where *20170522* is the exact revision of the *appengine:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *appengine* *v1_beta4* API can be found at the //! [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). @@ -402,47 +402,62 @@ pub struct Network { impl Part for Network {} -/// An Application resource contains the top-level configuration of an App Engine application. +/// An Instance resource is the computing unit that App Engine uses to automatically scale an application. /// /// # 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*). /// -/// * [create apps](struct.AppCreateCall.html) (request) -/// * [patch apps](struct.AppPatchCall.html) (request) -/// * [get apps](struct.AppGetCall.html) (response) +/// * [modules versions instances get apps](struct.AppModuleVersionInstanceGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Application { - /// Hostname used to reach the application, as resolved by App Engine.@OutputOnly - #[serde(rename="defaultHostname")] - pub default_hostname: Option, - /// Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly +pub struct Instance { + /// Time that this instance was started.@OutputOnly + #[serde(rename="startTimestamp")] + pub start_timestamp: Option, + /// Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmId")] + pub vm_id: Option, + /// Total memory in use (bytes).@OutputOnly + #[serde(rename="memoryUsage")] + pub memory_usage: Option, + /// The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmIp")] + pub vm_ip: Option, + /// Average queries per second (QPS) over the last minute.@OutputOnly + pub qps: Option, + /// Availability of the instance.@OutputOnly + pub availability: Option, + /// Full path to the Instance resource in the API. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.@OutputOnly pub name: Option, - /// Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly - #[serde(rename="codeBucket")] - pub code_bucket: Option, - /// Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly - #[serde(rename="defaultBucket")] - pub default_bucket: Option, - /// HTTP path dispatch rules for requests to the application that do not explicitly target a module or version. Rules are order-dependent.@OutputOnly - #[serde(rename="dispatchRules")] - pub dispatch_rules: Option>, - /// Cookie expiration policy for this application. - #[serde(rename="defaultCookieExpiration")] - pub default_cookie_expiration: Option, - /// Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US - pub location: Option, - /// Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account. - #[serde(rename="authDomain")] - pub auth_domain: Option, - /// Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp. + /// Number of errors since this instance was started.@OutputOnly + pub errors: Option, + /// Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmStatus")] + pub vm_status: Option, + /// Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmUnlocked")] + pub vm_unlocked: Option, + /// Relative name of the instance within the version. Example: instance-1.@OutputOnly pub id: Option, + /// Average latency (ms) over the last minute.@OutputOnly + #[serde(rename="averageLatency")] + pub average_latency: Option, + /// Number of requests since this instance was started.@OutputOnly + pub requests: Option, + /// Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmName")] + pub vm_name: Option, + /// App Engine release this instance is running on.@OutputOnly + #[serde(rename="appEngineRelease")] + pub app_engine_release: Option, + /// Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmZoneName")] + pub vm_zone_name: Option, } -impl RequestValue for Application {} -impl ResponseResult for Application {} +impl ResponseResult for Instance {} /// A Version resource is a specific set of source code and configuration files that are deployed into a module. @@ -458,26 +473,27 @@ impl ResponseResult for Application {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Version { + /// Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set. + #[serde(rename="defaultExpiration")] + pub default_expiration: Option, /// A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity. #[serde(rename="basicScaling")] pub basic_scaling: Option, - /// Metadata settings that are supplied to this version to enable beta runtime features. - #[serde(rename="betaSettings")] - pub beta_settings: Option>, - /// A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. - #[serde(rename="manualScaling")] - pub manual_scaling: Option, - /// Time that this version was created.@OutputOnly - #[serde(rename="creationTime")] - pub creation_time: Option, + /// Email address of the user who created this version.@OutputOnly + pub deployer: Option, /// Whether to deploy this version in a container on a virtual machine. pub vm: Option, /// Before an application can receive email or XMPP messages, the application must be configured to enable the service. #[serde(rename="inboundServices")] pub inbound_services: Option>, - /// Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling. + /// Instance class that is used to run this version. Valid values are: + /// AutomaticScaling: F1, F2, F4, F4_1G + /// ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling. #[serde(rename="instanceClass")] pub instance_class: Option, + /// Metadata settings that are supplied to this version to enable beta runtime features. + #[serde(rename="betaSettings")] + pub beta_settings: Option>, /// Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set. pub deployment: Option, /// Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set. @@ -488,30 +504,31 @@ pub struct Version { pub serving_status: Option, /// Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-". pub id: Option, - /// Whether multiple requests can be dispatched to this version at once. - pub threadsafe: Option, + /// Extra network settings. Only applicable for VM runtimes. + pub network: Option, /// Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set. #[serde(rename="apiConfig")] pub api_config: Option, /// Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set. #[serde(rename="nobuildFilesRegex")] pub nobuild_files_regex: Option, - /// Extra network settings. Only applicable for VM runtimes. - pub network: Option, + /// Whether multiple requests can be dispatched to this version at once. + pub threadsafe: Option, /// An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set. pub handlers: Option>, /// Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set. #[serde(rename="healthCheck")] pub health_check: Option, - /// Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set. - #[serde(rename="defaultExpiration")] - pub default_expiration: Option, + /// Time that this version was created.@OutputOnly + #[serde(rename="creationTime")] + pub creation_time: Option, /// Full path to the Version resource in the API. Example: apps/myapp/modules/default/versions/v1.@OutputOnly pub name: Option, /// Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set. pub libraries: Option>, - /// Email address of the user who created this version.@OutputOnly - pub deployer: Option, + /// A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. + #[serde(rename="manualScaling")] + pub manual_scaling: Option, /// App Engine execution environment to use for this version.Defaults to 1. pub env: Option, /// Automatic scaling is based on request rate, response latencies, and other application metrics. @@ -530,7 +547,7 @@ impl RequestValue for Version {} impl ResponseResult for Version {} -/// The response message for LocationService.ListLocations. +/// The response message for Locations.ListLocations. /// /// # Activities /// @@ -551,19 +568,31 @@ pub struct ListLocationsResponse { impl ResponseResult for ListLocationsResponse {} -/// Third-party Python runtime library that is required by the application. +/// A resource that represents Google Cloud Platform location. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [locations get apps](struct.AppLocationGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Library { - /// Version of the library to select, or "latest". - pub version: Option, - /// Name of the library. Example: "django". +pub struct Location { + /// Cross-service attributes for the location. For example + /// {"cloud.googleapis.com/region": "us-east1"} + /// + pub labels: Option>, + /// The canonical id for this location. For example: "us-east1". + #[serde(rename="locationId")] + pub location_id: Option, + /// Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" pub name: Option, + /// Service-specific metadata. For example the available capacity at the given location. + pub metadata: Option>, } -impl Part for Library {} +impl ResponseResult for Location {} /// Request message for Instances.DebugInstance. @@ -577,7 +606,9 @@ impl Part for Library {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DebugInstanceRequest { - /// Public SSH key to add to the instance. Examples: [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). + /// Public SSH key to add to the instance. Examples: + /// [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] + /// [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). #[serde(rename="sshKey")] pub ssh_key: Option, } @@ -608,16 +639,16 @@ impl Part for CpuUtilization {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Resources { - /// Memory (GB) needed. - #[serde(rename="memoryGb")] - pub memory_gb: Option, + /// User specified volumes. + pub volumes: Option>, /// Disk size (GB) needed. #[serde(rename="diskGb")] pub disk_gb: Option, /// Number of CPU cores needed. pub cpu: Option, - /// User specified volumes. - pub volumes: Option>, + /// Memory (GB) needed. + #[serde(rename="memoryGb")] + pub memory_gb: Option, } impl Part for Resources {} @@ -644,7 +675,14 @@ pub struct ListModulesResponse { impl ResponseResult for ListModulesResponse {} -/// The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: Simple to use and understand for most users Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc which can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting purpose. Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons. +/// The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: +/// Simple to use and understand for most users +/// Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: +/// Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. +/// Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting. +/// Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. +/// Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. +/// Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -697,12 +735,12 @@ pub struct StaticFilesHandler { /// Whether this handler should match the request if the file referenced by the handler does not exist. #[serde(rename="requireMatchingFile")] pub require_matching_file: Option, - /// HTTP headers to use for all responses from these URLs. - #[serde(rename="httpHeaders")] - pub http_headers: Option>, /// Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas. #[serde(rename="applicationReadable")] pub application_readable: Option, + /// HTTP headers to use for all responses from these URLs. + #[serde(rename="httpHeaders")] + pub http_headers: Option>, } impl Part for StaticFilesHandler {} @@ -720,12 +758,12 @@ pub struct NetworkUtilization { /// Target bytes sent per second. #[serde(rename="targetSentBytesPerSec")] pub target_sent_bytes_per_sec: Option, - /// Target packets sent per second. - #[serde(rename="targetSentPacketsPerSec")] - pub target_sent_packets_per_sec: Option, /// Target packets received per second. #[serde(rename="targetReceivedPacketsPerSec")] pub target_received_packets_per_sec: Option, + /// Target packets sent per second. + #[serde(rename="targetSentPacketsPerSec")] + pub target_sent_packets_per_sec: Option, } impl Part for NetworkUtilization {} @@ -782,7 +820,7 @@ pub struct Deployment { /// Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories. #[serde(rename="sourceReferences")] pub source_references: Option>, - /// A Docker image that App Engine uses the run the version. Only applicable for instances in App Engine flexible environment. + /// The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment. pub container: Option, } @@ -803,21 +841,17 @@ pub struct ScriptHandler { impl Part for ScriptHandler {} -/// Rules to match an HTTP request and dispatch that request to a module. +/// Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UrlDispatchRule { - /// Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters. - pub path: Option, - /// Domain name to match against. The wildcard "*" is supported if specified before a period: "*.".Defaults to matching all domains: "*". - pub domain: Option, - /// Resource ID of a module in this application that should serve the matched request. The module must already exist. Example: default. - pub module: Option, +pub struct ContainerInfo { + /// URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" + pub image: Option, } -impl Part for UrlDispatchRule {} +impl Part for ContainerInfo {} /// Uses Google Cloud Endpoints to handle requests. @@ -911,6 +945,28 @@ pub struct StaticDirectoryHandler { impl Part for StaticDirectoryHandler {} +/// Identity-Aware Proxy +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct IdentityAwareProxy { + /// OAuth2 client ID to use for the authentication flow. + #[serde(rename="oauth2ClientId")] + pub oauth2_client_id: Option, + /// Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty. + pub enabled: Option, + /// For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly + #[serde(rename="oauth2ClientSecret")] + pub oauth2_client_secret: Option, + /// Hex-encoded SHA-256 hash of the client secret.@OutputOnly + #[serde(rename="oauth2ClientSecretSha256")] + pub oauth2_client_secret_sha256: Option, +} + +impl Part for IdentityAwareProxy {} + + /// Automatic scaling is based on request rate, response latencies, and other application metrics. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1003,7 +1059,7 @@ pub struct FileInfo { /// The MIME type of the file.Defaults to the value from Google Cloud Storage. #[serde(rename="mimeType")] pub mime_type: Option, - /// URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'. + /// URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'. #[serde(rename="sourceUrl")] pub source_url: Option, /// The SHA1 hash of the file, in hex. @@ -1025,72 +1081,59 @@ impl Part for FileInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListOperationsResponse { - /// A list of operations that matches the specified filter in the request. - pub operations: Option>, /// The standard List next-page token. #[serde(rename="nextPageToken")] pub next_page_token: Option, + /// A list of operations that matches the specified filter in the request. + pub operations: Option>, } impl ResponseResult for ListOperationsResponse {} -/// An Instance resource is the computing unit that App Engine uses to automatically scale an application. +/// An Application resource contains the top-level configuration of an App Engine application. /// /// # 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*). /// -/// * [modules versions instances get apps](struct.AppModuleVersionInstanceGetCall.html) (response) +/// * [create apps](struct.AppCreateCall.html) (request) +/// * [patch apps](struct.AppPatchCall.html) (request) +/// * [get apps](struct.AppGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Instance { - /// App Engine release this instance is running on.@OutputOnly - #[serde(rename="appEngineRelease")] - pub app_engine_release: Option, - /// Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmId")] - pub vm_id: Option, - /// Total memory in use (bytes).@OutputOnly - #[serde(rename="memoryUsage")] - pub memory_usage: Option, - /// The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmIp")] - pub vm_ip: Option, - /// Average queries per second (QPS) over the last minute.@OutputOnly - pub qps: Option, - /// Availability of the instance.@OutputOnly - pub availability: Option, - /// Full path to the Instance resource in the API. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.@OutputOnly +pub struct Application { + /// Hostname used to reach the application, as resolved by App Engine.@OutputOnly + #[serde(rename="defaultHostname")] + pub default_hostname: Option, + /// Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly pub name: Option, - /// Number of errors since this instance was started.@OutputOnly - pub errors: Option, - /// Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmStatus")] - pub vm_status: Option, - /// Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmUnlocked")] - pub vm_unlocked: Option, - /// Relative name of the instance within the version. Example: instance-1.@OutputOnly + /// Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly + #[serde(rename="codeBucket")] + pub code_bucket: Option, + /// Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly + #[serde(rename="defaultBucket")] + pub default_bucket: Option, + /// HTTP path dispatch rules for requests to the application that do not explicitly target a module or version. Rules are order-dependent.@OutputOnly + #[serde(rename="dispatchRules")] + pub dispatch_rules: Option>, + /// Cookie expiration policy for this application. + #[serde(rename="defaultCookieExpiration")] + pub default_cookie_expiration: Option, + /// no description provided + pub iap: Option, + /// Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US + pub location: Option, + /// Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account. + #[serde(rename="authDomain")] + pub auth_domain: Option, + /// Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp. pub id: Option, - /// Average latency (ms) over the last minute.@OutputOnly - #[serde(rename="averageLatency")] - pub average_latency: Option, - /// Number of requests since this instance was started.@OutputOnly - pub requests: Option, - /// Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmName")] - pub vm_name: Option, - /// Time that this instance was started.@OutputOnly - #[serde(rename="startTimestamp")] - pub start_timestamp: Option, - /// Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmZoneName")] - pub vm_zone_name: Option, } -impl ResponseResult for Instance {} +impl RequestValue for Application {} +impl ResponseResult for Application {} /// A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. @@ -1106,17 +1149,21 @@ pub struct ManualScaling { impl Part for ManualScaling {} -/// Docker image that is used to start a VM container for the version you deploy. +/// Rules to match an HTTP request and dispatch that request to a module. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ContainerInfo { - /// URI to the hosted container image in a Docker repository. The URI must be fully qualified and include a tag or digest. Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" - pub image: Option, +pub struct UrlDispatchRule { + /// Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters. + pub path: Option, + /// Domain name to match against. The wildcard "*" is supported if specified before a period: "*.".Defaults to matching all domains: "*". + pub domain: Option, + /// Resource ID of a module in this application that should serve the matched request. The module must already exist. Example: default. + pub module: Option, } -impl Part for ContainerInfo {} +impl Part for UrlDispatchRule {} /// Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers. @@ -1130,11 +1177,11 @@ pub struct ApiConfigHandler { /// Security (HTTPS) enforcement for this URL. #[serde(rename="securityLevel")] pub security_level: Option, + /// Level of login required to access this resource. Defaults to optional. + pub login: Option, /// Action to take when users access resources that require authentication. Defaults to redirect. #[serde(rename="authFailAction")] pub auth_fail_action: Option, - /// Level of login required to access this resource. Defaults to optional. - pub login: Option, /// Path to the script from the application root directory. pub script: Option, } @@ -1142,28 +1189,19 @@ pub struct ApiConfigHandler { impl Part for ApiConfigHandler {} -/// A Module resource is a logical component of an application that can share state and communicate in a secure fashion with other modules. For example, an application that handles customer requests might include separate modules to handle tasks such as backend data analysis or API requests from mobile devices. Each module has a collection of versions that define a specific set of code used to implement the functionality of that module. +/// Third-party Python runtime library that is required by the application. /// -/// # 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*). -/// -/// * [modules get apps](struct.AppModuleGetCall.html) (response) -/// * [modules patch apps](struct.AppModulePatchCall.html) (request) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Module { - /// Mapping that defines fractional HTTP traffic diversion to different versions within the module. - pub split: Option, - /// Relative name of the module within the application. Example: default.@OutputOnly - pub id: Option, - /// Full path to the Module resource in the API. Example: apps/myapp/modules/default.@OutputOnly +pub struct Library { + /// Version of the library to select, or "latest". + pub version: Option, + /// Name of the library. Example: "django". pub name: Option, } -impl RequestValue for Module {} -impl ResponseResult for Module {} +impl Part for Library {} /// Reference to a particular snapshot of the source tree used to build and deploy the application. @@ -1238,6 +1276,30 @@ pub struct TrafficSplit { impl Part for TrafficSplit {} +/// A Module resource is a logical component of an application that can share state and communicate in a secure fashion with other modules. For example, an application that handles customer requests might include separate modules to handle tasks such as backend data analysis or API requests from mobile devices. Each module has a collection of versions that define a specific set of code used to implement the functionality of that module. +/// +/// # 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*). +/// +/// * [modules get apps](struct.AppModuleGetCall.html) (response) +/// * [modules patch apps](struct.AppModulePatchCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Module { + /// Relative name of the module within the application. Example: default.@OutputOnly + pub id: Option, + /// Full path to the Module resource in the API. Example: apps/myapp/modules/default.@OutputOnly + pub name: Option, + /// Mapping that defines fractional HTTP traffic diversion to different versions within the module. + pub split: Option, +} + +impl RequestValue for Module {} +impl ResponseResult for Module {} + + /// This resource represents a long-running operation that is the result of a network API call. /// /// # Activities @@ -1258,44 +1320,19 @@ impl Part for TrafficSplit {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { - /// Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. - pub metadata: Option>, + /// The error result of the operation in case of failure or cancellation. + pub error: Option, /// If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. pub done: Option, /// The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. pub response: Option>, /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name. pub name: Option, - /// The error result of the operation in case of failure or cancellation. - pub error: Option, -} - -impl ResponseResult for Operation {} - - -/// A resource that represents Google Cloud Platform location. -/// -/// # 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*). -/// -/// * [locations get apps](struct.AppLocationGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Location { - /// Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} - pub labels: Option>, - /// The canonical id for this location. For example: "us-east1". - #[serde(rename="locationId")] - pub location_id: Option, - /// Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" - pub name: Option, - /// Service-specific metadata. For example the available capacity at the given location. + /// Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. pub metadata: Option>, } -impl ResponseResult for Location {} +impl ResponseResult for Operation {} @@ -1427,7 +1464,9 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project). + /// Creates an App Engine application for a Google Cloud Platform project. Required fields: + /// id - The ID of the target Cloud Platform project. + /// location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/). /// /// # Arguments /// @@ -1444,7 +1483,7 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the instances of a version. + /// Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). /// /// # Arguments /// @@ -1552,7 +1591,9 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration) + /// Updates the specified Application resource. You can update the following fields: + /// auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain) + /// default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration) /// /// # Arguments /// @@ -1630,7 +1671,11 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + /// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: + /// serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. + /// instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. + /// automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + /// automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. /// /// # Arguments /// @@ -2003,7 +2048,7 @@ impl<'a, C, A> AppModulePatchCall<'a, C, A> where C: BorrowMut, A self._modules_id = new_value.to_string(); self } - /// Set to true to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules#shardby) field in the Module resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + /// Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules#shardby) field in the Module resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). /// /// Sets the *migrate traffic* query property to the given value. pub fn migrate_traffic(mut self, new_value: bool) -> AppModulePatchCall<'a, C, A> { @@ -2037,10 +2082,10 @@ impl<'a, C, A> AppModulePatchCall<'a, C, A> where C: BorrowMut, A /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -2290,10 +2335,10 @@ impl<'a, C, A> AppModuleGetCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -2567,10 +2612,10 @@ impl<'a, C, A> AppModuleVersionInstanceGetCall<'a, C, A> where C: BorrowMut AppModuleListCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -2870,7 +2915,9 @@ impl<'a, C, A> AppModuleListCall<'a, C, A> where C: BorrowMut, A: } -/// Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project). +/// Creates an App Engine application for a Google Cloud Platform project. Required fields: +/// id - The ID of the target Cloud Platform project. +/// location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/). /// /// A builder for the *create* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -3071,10 +3118,10 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -3109,7 +3156,7 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau } -/// Lists the instances of a version. +/// Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). /// /// A builder for the *modules.versions.instances.list* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -3360,10 +3407,10 @@ impl<'a, C, A> AppModuleVersionInstanceListCall<'a, C, A> where C: BorrowMut AppModuleVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut AppModuleVersionInstanceDebugCall<'a, C, A> where C: BorrowMut AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -4451,10 +4498,10 @@ impl<'a, C, A> AppModuleDeleteCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -4489,7 +4536,9 @@ impl<'a, C, A> AppModuleDeleteCall<'a, C, A> where C: BorrowMut, } -/// Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration) +/// Updates the specified Application resource. You can update the following fields: +/// auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain) +/// default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration) /// /// A builder for the *patch* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -4735,10 +4784,10 @@ impl<'a, C, A> AppPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -4988,10 +5037,10 @@ impl<'a, C, A> AppOperationGetCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -5241,10 +5290,10 @@ impl<'a, C, A> AppLocationGetCall<'a, C, A> where C: BorrowMut, A /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -5518,10 +5567,10 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -5556,7 +5605,11 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, } -/// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. +/// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: +/// serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. +/// instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. +/// automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. +/// automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. /// /// A builder for the *modules.versions.patch* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -5826,10 +5879,10 @@ impl<'a, C, A> AppModuleVersionPatchCall<'a, C, A> where C: BorrowMut AppOperationListCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -6368,10 +6421,10 @@ impl<'a, C, A> AppModuleVersionDeleteCall<'a, C, A> where C: BorrowMut AppModuleVersionCreateCall<'a, C, A> where C: BorrowMut AppModuleVersionGetCall<'a, C, A> where C: BorrowMut AppModuleVersionListCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with appengine (protocol v1beta5)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta5-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-appengine1_beta5] path = "../appengine1_beta5" -version = "1.0.4+20161208" +version = "1.0.4+20170522" diff --git a/gen/appengine1_beta5-cli/README.md b/gen/appengine1_beta5-cli/README.md index 4abe9b7b16..2a9d64739f 100644 --- a/gen/appengine1_beta5-cli/README.md +++ b/gen/appengine1_beta5-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *appengine* API at revision *20161208*. The CLI is at version *1.0.4*. +This documentation was generated from the *appengine* API at revision *20170522*. The CLI is at version *1.0.4*. ```bash appengine1-beta5 [options] diff --git a/gen/appengine1_beta5-cli/mkdocs.yml b/gen/appengine1_beta5-cli/mkdocs.yml index 772df30689..071329ea1d 100644 --- a/gen/appengine1_beta5-cli/mkdocs.yml +++ b/gen/appengine1_beta5-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: appengine v1.0.4+20161208 +site_name: appengine v1.0.4+20170522 site_url: http://byron.github.io/google-apis-rs/google-appengine1_beta5-cli site_description: A complete library to interact with appengine (protocol v1beta5) diff --git a/gen/appengine1_beta5-cli/src/main.rs b/gen/appengine1_beta5-cli/src/main.rs index 7246bc740e..c76fe44d42 100644 --- a/gen/appengine1_beta5-cli/src/main.rs +++ b/gen/appengine1_beta5-cli/src/main.rs @@ -74,11 +74,15 @@ impl<'n> Engine<'n> { "code-bucket" => Some(("codeBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-bucket" => Some(("defaultBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-cookie-expiration" => Some(("defaultCookieExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-id" => Some(("iap.oauth2ClientId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.enabled" => Some(("iap.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret" => Some(("iap.oauth2ClientSecret", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret-sha256" => Some(("iap.oauth2ClientSecretSha256", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "auth-domain" => Some(("authDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "id", "location", "name"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "enabled", "iap", "id", "location", "name", "oauth2-client-id", "oauth2-client-secret", "oauth2-client-secret-sha256"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -450,11 +454,15 @@ impl<'n> Engine<'n> { "code-bucket" => Some(("codeBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-bucket" => Some(("defaultBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-cookie-expiration" => Some(("defaultCookieExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-id" => Some(("iap.oauth2ClientId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.enabled" => Some(("iap.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret" => Some(("iap.oauth2ClientSecret", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "iap.oauth2-client-secret-sha256" => Some(("iap.oauth2ClientSecretSha256", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "auth-domain" => Some(("authDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "id", "location", "name"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["auth-domain", "code-bucket", "default-bucket", "default-cookie-expiration", "default-hostname", "enabled", "iap", "id", "location", "name", "oauth2-client-id", "oauth2-client-secret", "oauth2-client-secret-sha256"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -706,8 +714,8 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "split.shard-by" => Some(("split.shardBy", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "split.allocations" => Some(("split.allocations", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Map })), - "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["allocations", "id", "name", "shard-by", "split"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -801,9 +809,9 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "endpoints-api-service.config-id" => Some(("endpointsApiService.configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "endpoints-api-service.name" => Some(("endpointsApiService.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.idle-timeout" => Some(("basicScaling.idleTimeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.max-instances" => Some(("basicScaling.maxInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "vm" => Some(("vm", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "instance-class" => Some(("instanceClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -812,7 +820,10 @@ impl<'n> Engine<'n> { "api-config.auth-fail-action" => Some(("apiConfig.authFailAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.login" => Some(("apiConfig.login", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.script" => Some(("apiConfig.script", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.subnetwork-name" => Some(("network.subnetworkName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.restart-threshold" => Some(("healthCheck.restartThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "health-check.check-interval" => Some(("healthCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.unhealthy-threshold" => Some(("healthCheck.unhealthyThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -820,22 +831,21 @@ impl<'n> Engine<'n> { "health-check.host" => Some(("healthCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.timeout" => Some(("healthCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.disable-health-check" => Some(("healthCheck.disableHealthCheck", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "deployer" => Some(("deployer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "env" => Some(("env", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "disk-usage-bytes" => Some(("diskUsageBytes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "automatic-scaling.min-pending-latency" => Some(("automaticScaling.minPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-received-bytes-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-bytes-per-sec" => Some(("automaticScaling.networkUtilization.targetSentBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.network-utilization.target-received-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetSentPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.network-utilization.target-received-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.min-idle-instances" => Some(("automaticScaling.minIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.max-pending-latency" => Some(("automaticScaling.maxPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "automatic-scaling.max-idle-instances" => Some(("automaticScaling.maxIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-ops-per-sec" => Some(("automaticScaling.diskUtilization.targetWriteOpsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-bytes-per-sec" => Some(("automaticScaling.diskUtilization.targetReadBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-ops-per-sec" => Some(("automaticScaling.diskUtilization.targetReadOpsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-bytes-per-sec" => Some(("automaticScaling.diskUtilization.targetWriteBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.max-pending-latency" => Some(("automaticScaling.maxPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "automatic-scaling.max-idle-instances" => Some(("automaticScaling.maxIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.min-idle-instances" => Some(("automaticScaling.minIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.request-utilization.target-concurrent-requests" => Some(("automaticScaling.requestUtilization.targetConcurrentRequests", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.request-utilization.target-request-count-per-sec" => Some(("automaticScaling.requestUtilization.targetRequestCountPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.cool-down-period" => Some(("automaticScaling.coolDownPeriod", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -848,13 +858,11 @@ impl<'n> Engine<'n> { "resources.disk-gb" => Some(("resources.diskGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "resources.cpu" => Some(("resources.cpu", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "resources.memory-gb" => Some(("resources.memoryGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), - "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "deployer" => Some(("deployer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "inbound-services" => Some(("inboundServices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "deployment.container.image" => Some(("deployment.container.image", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.subnetwork-name" => Some(("network.subnetworkName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "nobuild-files-regex" => Some(("nobuildFilesRegex", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1364,9 +1372,9 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "endpoints-api-service.config-id" => Some(("endpointsApiService.configId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "endpoints-api-service.name" => Some(("endpointsApiService.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.idle-timeout" => Some(("basicScaling.idleTimeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "basic-scaling.max-instances" => Some(("basicScaling.maxInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "vm" => Some(("vm", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "instance-class" => Some(("instanceClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1375,7 +1383,10 @@ impl<'n> Engine<'n> { "api-config.auth-fail-action" => Some(("apiConfig.authFailAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.login" => Some(("apiConfig.login", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "api-config.script" => Some(("apiConfig.script", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "network.subnetwork-name" => Some(("network.subnetworkName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.restart-threshold" => Some(("healthCheck.restartThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "health-check.check-interval" => Some(("healthCheck.checkInterval", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.unhealthy-threshold" => Some(("healthCheck.unhealthyThreshold", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -1383,22 +1394,21 @@ impl<'n> Engine<'n> { "health-check.host" => Some(("healthCheck.host", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.timeout" => Some(("healthCheck.timeout", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "health-check.disable-health-check" => Some(("healthCheck.disableHealthCheck", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "default-expiration" => Some(("defaultExpiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "deployer" => Some(("deployer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "env" => Some(("env", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "disk-usage-bytes" => Some(("diskUsageBytes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "automatic-scaling.min-pending-latency" => Some(("automaticScaling.minPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-received-bytes-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-bytes-per-sec" => Some(("automaticScaling.networkUtilization.targetSentBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.network-utilization.target-received-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.network-utilization.target-sent-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetSentPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.network-utilization.target-received-packets-per-sec" => Some(("automaticScaling.networkUtilization.targetReceivedPacketsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.min-idle-instances" => Some(("automaticScaling.minIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "automatic-scaling.max-pending-latency" => Some(("automaticScaling.maxPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "automatic-scaling.max-idle-instances" => Some(("automaticScaling.maxIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-ops-per-sec" => Some(("automaticScaling.diskUtilization.targetWriteOpsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-bytes-per-sec" => Some(("automaticScaling.diskUtilization.targetReadBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-read-ops-per-sec" => Some(("automaticScaling.diskUtilization.targetReadOpsPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.disk-utilization.target-write-bytes-per-sec" => Some(("automaticScaling.diskUtilization.targetWriteBytesPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.max-pending-latency" => Some(("automaticScaling.maxPendingLatency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "automatic-scaling.max-idle-instances" => Some(("automaticScaling.maxIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "automatic-scaling.min-idle-instances" => Some(("automaticScaling.minIdleInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.request-utilization.target-concurrent-requests" => Some(("automaticScaling.requestUtilization.targetConcurrentRequests", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.request-utilization.target-request-count-per-sec" => Some(("automaticScaling.requestUtilization.targetRequestCountPerSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "automatic-scaling.cool-down-period" => Some(("automaticScaling.coolDownPeriod", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1411,13 +1421,11 @@ impl<'n> Engine<'n> { "resources.disk-gb" => Some(("resources.diskGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "resources.cpu" => Some(("resources.cpu", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "resources.memory-gb" => Some(("resources.memoryGb", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), - "manual-scaling.instances" => Some(("manualScaling.instances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "deployer" => Some(("deployer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "inbound-services" => Some(("inboundServices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "beta-settings" => Some(("betaSettings", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "deployment.container.image" => Some(("deployment.container.image", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.instance-tag" => Some(("network.instanceTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.forwarded-ports" => Some(("network.forwardedPorts", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "network.name" => Some(("network.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "network.subnetwork-name" => Some(("network.subnetworkName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "threadsafe" => Some(("threadsafe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "nobuild-files-regex" => Some(("nobuildFilesRegex", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1649,7 +1657,9 @@ fn main() { let arg_data = [ ("apps", "methods: 'create', 'get', 'locations-get', 'locations-list', 'operations-get', 'operations-list', 'patch', 'services-delete', 'services-get', 'services-list', 'services-patch', 'services-versions-create', 'services-versions-delete', 'services-versions-get', 'services-versions-instances-debug', 'services-versions-instances-delete', 'services-versions-instances-get', 'services-versions-instances-list', 'services-versions-list' and 'services-versions-patch'", vec![ ("create", - Some(r##"Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project)."##), + Some(r##"Creates an App Engine application for a Google Cloud Platform project. Required fields: + id - The ID of the target Cloud Platform project. + location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/)."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_beta5_cli/apps_create", vec![ (Some(r##"kv"##), @@ -1793,7 +1803,9 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)"##), + Some(r##"Updates the specified Application resource. You can update the following fields: + auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain) + default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)"##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_beta5_cli/apps_patch", vec![ (Some(r##"apps-id"##), @@ -2161,7 +2173,7 @@ fn main() { Some(false)), ]), ("services-versions-instances-list", - Some(r##"Lists the instances of a version."##), + Some(r##"Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_beta5_cli/apps_services-versions-instances-list", vec![ (Some(r##"apps-id"##), @@ -2223,7 +2235,11 @@ fn main() { Some(false)), ]), ("services-versions-patch", - Some(r##"Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment."##), + Some(r##"Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: + serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. + instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. + automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment."##), "Details at http://byron.github.io/google-apis-rs/google_appengine1_beta5_cli/apps_services-versions-patch", vec![ (Some(r##"apps-id"##), @@ -2268,8 +2284,8 @@ fn main() { let mut app = App::new("appengine1-beta5") .author("Sebastian Thiel ") - .version("1.0.4+20161208") - .about("Provisions and manages App Engine applications.") + .version("1.0.4+20170522") + .about("The App Engine Admin API enables developers to provision and manage their App Engine applications.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_appengine1_beta5_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/appengine1_beta5/Cargo.toml b/gen/appengine1_beta5/Cargo.toml index 1c4c20a2a4..2ecdeb2b93 100644 --- a/gen/appengine1_beta5/Cargo.toml +++ b/gen/appengine1_beta5/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-appengine1_beta5" -version = "1.0.4+20161208" +version = "1.0.4+20170522" authors = ["Sebastian Thiel "] description = "A complete library to interact with appengine (protocol v1beta5)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta5" homepage = "https://cloud.google.com/appengine/docs/admin-api/" -documentation = "https://docs.rs/google-appengine1_beta5/1.0.4+20161208" +documentation = "https://docs.rs/google-appengine1_beta5/1.0.4+20170522" license = "MIT" keywords = ["appengine", "google", "protocol", "web", "api"] diff --git a/gen/appengine1_beta5/README.md b/gen/appengine1_beta5/README.md index 580d7cf095..116f3b82dc 100644 --- a/gen/appengine1_beta5/README.md +++ b/gen/appengine1_beta5/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-appengine1_beta5` library allows access to all features of the *Google appengine* service. -This documentation was generated from *appengine* crate version *1.0.4+20161208*, where *20161208* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *appengine* crate version *1.0.4+20170522*, where *20170522* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *appengine* *v1_beta5* API can be found at the [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.Appengine.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.Appengine.html) ... * apps - * [*create*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppCreateCall.html), [*get*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppGetCall.html), [*locations get*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppLocationGetCall.html), [*locations list*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppLocationListCall.html), [*operations get*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppOperationGetCall.html), [*operations list*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppOperationListCall.html), [*patch*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppPatchCall.html), [*services delete*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceDeleteCall.html), [*services get*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceGetCall.html), [*services list*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceListCall.html), [*services patch*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServicePatchCall.html), [*services versions create*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceVersionCreateCall.html), [*services versions delete*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceVersionDeleteCall.html), [*services versions get*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceVersionGetCall.html), [*services versions instances debug*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceVersionInstanceDebugCall.html), [*services versions instances delete*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceVersionInstanceDeleteCall.html), [*services versions instances get*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceVersionInstanceGetCall.html), [*services versions instances list*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceVersionInstanceListCall.html), [*services versions list*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceVersionListCall.html) and [*services versions patch*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.AppServiceVersionPatchCall.html) + * [*create*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppCreateCall.html), [*get*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppGetCall.html), [*locations get*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppLocationGetCall.html), [*locations list*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppLocationListCall.html), [*operations get*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppOperationGetCall.html), [*operations list*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppOperationListCall.html), [*patch*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppPatchCall.html), [*services delete*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceDeleteCall.html), [*services get*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceGetCall.html), [*services list*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceListCall.html), [*services patch*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServicePatchCall.html), [*services versions create*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceVersionCreateCall.html), [*services versions delete*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceVersionDeleteCall.html), [*services versions get*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceVersionGetCall.html), [*services versions instances debug*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceVersionInstanceDebugCall.html), [*services versions instances delete*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceVersionInstanceDeleteCall.html), [*services versions instances get*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceVersionInstanceGetCall.html), [*services versions instances list*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceVersionInstanceListCall.html), [*services versions list*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceVersionListCall.html) and [*services versions patch*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.AppServiceVersionPatchCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/struct.Appengine.html)** +* **[Hub](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/struct.Appengine.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.Part.html)** + * **[Parts](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -130,17 +130,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.Delegate.html), 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-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.ResponseResult.html), 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")`. @@ -150,29 +150,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.CallBuilder.html) 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-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.RequestValue.html) and -[decodable](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.RequestValue.html) and +[decodable](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.CallBuilder.html), 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-appengine1_beta5/1.0.4+20161208/google_appengine1_beta5/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-appengine1_beta5/1.0.4+20170522/google_appengine1_beta5/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/appengine1_beta5/src/lib.rs b/gen/appengine1_beta5/src/lib.rs index 989f461c30..9c8d121a75 100644 --- a/gen/appengine1_beta5/src/lib.rs +++ b/gen/appengine1_beta5/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *appengine* crate version *1.0.4+20161208*, where *20161208* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *appengine* crate version *1.0.4+20170522*, where *20170522* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *appengine* *v1_beta5* API can be found at the //! [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). @@ -393,7 +393,10 @@ pub struct Network { pub forwarded_ports: Option>, /// Google Cloud Platform network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default. pub name: Option, - /// Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network. If the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range. If the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network. If the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app. + /// Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network. + /// If the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range. + /// If the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network. + /// If the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the Flex app. #[serde(rename="subnetworkName")] pub subnetwork_name: Option, } @@ -413,59 +416,74 @@ impl Part for Network {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Service { - /// Mapping that defines fractional HTTP traffic diversion to different versions within the service. - pub split: Option, /// Relative name of the service within the application. Example: default.@OutputOnly pub id: Option, /// Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly pub name: Option, + /// Mapping that defines fractional HTTP traffic diversion to different versions within the service. + pub split: Option, } impl RequestValue for Service {} impl ResponseResult for Service {} -/// An Application resource contains the top-level configuration of an App Engine application. +/// An Instance resource is the computing unit that App Engine uses to automatically scale an application. /// /// # 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*). /// -/// * [create apps](struct.AppCreateCall.html) (request) -/// * [patch apps](struct.AppPatchCall.html) (request) -/// * [get apps](struct.AppGetCall.html) (response) +/// * [services versions instances get apps](struct.AppServiceVersionInstanceGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Application { - /// Hostname used to reach the application, as resolved by App Engine.@OutputOnly - #[serde(rename="defaultHostname")] - pub default_hostname: Option, - /// Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly +pub struct Instance { + /// Time that this instance was started.@OutputOnly + #[serde(rename="startTimestamp")] + pub start_timestamp: Option, + /// Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmId")] + pub vm_id: Option, + /// Total memory in use (bytes).@OutputOnly + #[serde(rename="memoryUsage")] + pub memory_usage: Option, + /// The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmIp")] + pub vm_ip: Option, + /// Average queries per second (QPS) over the last minute.@OutputOnly + pub qps: Option, + /// Availability of the instance.@OutputOnly + pub availability: Option, + /// Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly pub name: Option, - /// A Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly - #[serde(rename="codeBucket")] - pub code_bucket: Option, - /// A Google Cloud Storage bucket that can be used by the application to store content.@OutputOnly - #[serde(rename="defaultBucket")] - pub default_bucket: Option, - /// HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent.@OutputOnly - #[serde(rename="dispatchRules")] - pub dispatch_rules: Option>, - /// Cookie expiration policy for this application. - #[serde(rename="defaultCookieExpiration")] - pub default_cookie_expiration: Option, - /// Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US - pub location: Option, - /// Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account. - #[serde(rename="authDomain")] - pub auth_domain: Option, - /// Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp. + /// Number of errors since this instance was started.@OutputOnly + pub errors: Option, + /// Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmStatus")] + pub vm_status: Option, + /// Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmUnlocked")] + pub vm_unlocked: Option, + /// Relative name of the instance within the version. Example: instance-1.@OutputOnly pub id: Option, + /// Average latency (ms) over the last minute.@OutputOnly + #[serde(rename="averageLatency")] + pub average_latency: Option, + /// Number of requests since this instance was started.@OutputOnly + pub requests: Option, + /// Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmName")] + pub vm_name: Option, + /// App Engine release this instance is running on.@OutputOnly + #[serde(rename="appEngineRelease")] + pub app_engine_release: Option, + /// Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly + #[serde(rename="vmZoneName")] + pub vm_zone_name: Option, } -impl RequestValue for Application {} -impl ResponseResult for Application {} +impl ResponseResult for Instance {} /// A Version resource is a specific set of source code and configuration files that are deployed into a service. @@ -484,26 +502,27 @@ pub struct Version { /// Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app. #[serde(rename="endpointsApiService")] pub endpoints_api_service: Option, + /// Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set. + #[serde(rename="defaultExpiration")] + pub default_expiration: Option, /// A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity. #[serde(rename="basicScaling")] pub basic_scaling: Option, - /// Metadata settings that are supplied to this version to enable beta runtime features. - #[serde(rename="betaSettings")] - pub beta_settings: Option>, - /// A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. - #[serde(rename="manualScaling")] - pub manual_scaling: Option, - /// Time that this version was created.@OutputOnly - #[serde(rename="creationTime")] - pub creation_time: Option, + /// Email address of the user who created this version.@OutputOnly + pub deployer: Option, /// Whether to deploy this version in a container on a virtual machine. pub vm: Option, /// Before an application can receive email or XMPP messages, the application must be configured to enable the service. #[serde(rename="inboundServices")] pub inbound_services: Option>, - /// Instance class that is used to run this version. Valid values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling. + /// Instance class that is used to run this version. Valid values are: + /// AutomaticScaling: F1, F2, F4, F4_1G + /// ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling. #[serde(rename="instanceClass")] pub instance_class: Option, + /// Metadata settings that are supplied to this version to enable beta runtime features. + #[serde(rename="betaSettings")] + pub beta_settings: Option>, /// Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set. pub deployment: Option, /// Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set. @@ -514,30 +533,31 @@ pub struct Version { pub serving_status: Option, /// Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-". pub id: Option, - /// Whether multiple requests can be dispatched to this version at once. - pub threadsafe: Option, + /// Extra network settings. Only applicable for VM runtimes. + pub network: Option, /// Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set. #[serde(rename="apiConfig")] pub api_config: Option, /// Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set. #[serde(rename="nobuildFilesRegex")] pub nobuild_files_regex: Option, - /// Extra network settings. Only applicable for VM runtimes. - pub network: Option, + /// Whether multiple requests can be dispatched to this version at once. + pub threadsafe: Option, /// An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set. pub handlers: Option>, /// Configures health checking for VM instances. Unhealthy instances are be stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set. #[serde(rename="healthCheck")] pub health_check: Option, - /// Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set. - #[serde(rename="defaultExpiration")] - pub default_expiration: Option, + /// Time that this version was created.@OutputOnly + #[serde(rename="creationTime")] + pub creation_time: Option, /// Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly pub name: Option, /// Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set. pub libraries: Option>, - /// Email address of the user who created this version.@OutputOnly - pub deployer: Option, + /// A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. + #[serde(rename="manualScaling")] + pub manual_scaling: Option, /// App Engine execution environment to use for this version.Defaults to 1. pub env: Option, /// Total size of version files hosted on App Engine disk in bytes.@OutputOnly @@ -559,7 +579,7 @@ impl RequestValue for Version {} impl ResponseResult for Version {} -/// The response message for LocationService.ListLocations. +/// The response message for Locations.ListLocations. /// /// # Activities /// @@ -591,7 +611,9 @@ impl ResponseResult for ListLocationsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Location { - /// Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} + /// Cross-service attributes for the location. For example + /// {"cloud.googleapis.com/region": "us-east1"} + /// pub labels: Option>, /// The canonical id for this location. For example: "us-east1". #[serde(rename="locationId")] @@ -616,7 +638,9 @@ impl ResponseResult for Location {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DebugInstanceRequest { - /// Public SSH key to add to the instance. Examples: [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). + /// Public SSH key to add to the instance. Examples: + /// [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] + /// [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). #[serde(rename="sshKey")] pub ssh_key: Option, } @@ -647,22 +671,29 @@ impl Part for CpuUtilization {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Resources { - /// Memory (GB) needed. - #[serde(rename="memoryGb")] - pub memory_gb: Option, + /// Volumes mounted within the app container. + pub volumes: Option>, /// Disk size (GB) needed. #[serde(rename="diskGb")] pub disk_gb: Option, /// Number of CPU cores needed. pub cpu: Option, - /// Volumes mounted within the app container. - pub volumes: Option>, + /// Memory (GB) needed. + #[serde(rename="memoryGb")] + pub memory_gb: Option, } impl Part for Resources {} -/// The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: Simple to use and understand for most users Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc which can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting purpose. Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons. +/// The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: +/// Simple to use and understand for most users +/// Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: +/// Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. +/// Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting. +/// Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. +/// Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. +/// Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -738,12 +769,12 @@ pub struct NetworkUtilization { /// Target bytes sent per second. #[serde(rename="targetSentBytesPerSec")] pub target_sent_bytes_per_sec: Option, - /// Target packets sent per second. - #[serde(rename="targetSentPacketsPerSec")] - pub target_sent_packets_per_sec: Option, /// Target packets received per second. #[serde(rename="targetReceivedPacketsPerSec")] pub target_received_packets_per_sec: Option, + /// Target packets sent per second. + #[serde(rename="targetSentPacketsPerSec")] + pub target_sent_packets_per_sec: Option, } impl Part for NetworkUtilization {} @@ -800,7 +831,7 @@ pub struct Deployment { /// Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories. #[serde(rename="sourceReferences")] pub source_references: Option>, - /// A Docker image that App Engine uses the run the version. Only applicable for instances in App Engine flexible environment. + /// The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment. pub container: Option, } @@ -882,6 +913,28 @@ pub struct HealthCheck { impl Part for HealthCheck {} +/// Identity-Aware Proxy +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct IdentityAwareProxy { + /// OAuth2 client ID to use for the authentication flow. + #[serde(rename="oauth2ClientId")] + pub oauth2_client_id: Option, + /// Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty. + pub enabled: Option, + /// For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly + #[serde(rename="oauth2ClientSecret")] + pub oauth2_client_secret: Option, + /// Hex-encoded SHA-256 hash of the client secret.@OutputOnly + #[serde(rename="oauth2ClientSecretSha256")] + pub oauth2_client_secret_sha256: Option, +} + +impl Part for IdentityAwareProxy {} + + /// Custom static error page to be served when an error occurs. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -914,18 +967,18 @@ pub struct AutomaticScaling { /// Target scaling by network usage. #[serde(rename="networkUtilization")] pub network_utilization: Option, - /// Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module. - #[serde(rename="minIdleInstances")] - pub min_idle_instances: Option, + /// Target scaling by disk usage. + #[serde(rename="diskUtilization")] + pub disk_utilization: Option, /// Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it. #[serde(rename="maxPendingLatency")] pub max_pending_latency: Option, /// Maximum number of idle instances that should be maintained for this version. #[serde(rename="maxIdleInstances")] pub max_idle_instances: Option, - /// Target scaling by disk usage. - #[serde(rename="diskUtilization")] - pub disk_utilization: Option, + /// Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module. + #[serde(rename="minIdleInstances")] + pub min_idle_instances: Option, /// Target scaling by request utilization. #[serde(rename="requestUtilization")] pub request_utilization: Option, @@ -991,7 +1044,7 @@ pub struct FileInfo { /// The MIME type of the file.Defaults to the value from Google Cloud Storage. #[serde(rename="mimeType")] pub mime_type: Option, - /// URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'. + /// URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'. #[serde(rename="sourceUrl")] pub source_url: Option, /// The SHA1 hash of the file, in hex. @@ -1029,72 +1082,59 @@ impl Part for EndpointsApiService {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListOperationsResponse { - /// A list of operations that matches the specified filter in the request. - pub operations: Option>, /// The standard List next-page token. #[serde(rename="nextPageToken")] pub next_page_token: Option, + /// A list of operations that matches the specified filter in the request. + pub operations: Option>, } impl ResponseResult for ListOperationsResponse {} -/// An Instance resource is the computing unit that App Engine uses to automatically scale an application. +/// An Application resource contains the top-level configuration of an App Engine application. /// /// # 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*). /// -/// * [services versions instances get apps](struct.AppServiceVersionInstanceGetCall.html) (response) +/// * [create apps](struct.AppCreateCall.html) (request) +/// * [patch apps](struct.AppPatchCall.html) (request) +/// * [get apps](struct.AppGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Instance { - /// App Engine release this instance is running on.@OutputOnly - #[serde(rename="appEngineRelease")] - pub app_engine_release: Option, - /// Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmId")] - pub vm_id: Option, - /// Total memory in use (bytes).@OutputOnly - #[serde(rename="memoryUsage")] - pub memory_usage: Option, - /// The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmIp")] - pub vm_ip: Option, - /// Average queries per second (QPS) over the last minute.@OutputOnly - pub qps: Option, - /// Availability of the instance.@OutputOnly - pub availability: Option, - /// Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly +pub struct Application { + /// Hostname used to reach the application, as resolved by App Engine.@OutputOnly + #[serde(rename="defaultHostname")] + pub default_hostname: Option, + /// Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly pub name: Option, - /// Number of errors since this instance was started.@OutputOnly - pub errors: Option, - /// Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmStatus")] - pub vm_status: Option, - /// Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmUnlocked")] - pub vm_unlocked: Option, - /// Relative name of the instance within the version. Example: instance-1.@OutputOnly + /// A Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly + #[serde(rename="codeBucket")] + pub code_bucket: Option, + /// A Google Cloud Storage bucket that can be used by the application to store content.@OutputOnly + #[serde(rename="defaultBucket")] + pub default_bucket: Option, + /// HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent.@OutputOnly + #[serde(rename="dispatchRules")] + pub dispatch_rules: Option>, + /// Cookie expiration policy for this application. + #[serde(rename="defaultCookieExpiration")] + pub default_cookie_expiration: Option, + /// Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp. pub id: Option, - /// Average latency (ms) over the last minute.@OutputOnly - #[serde(rename="averageLatency")] - pub average_latency: Option, - /// Number of requests since this instance was started.@OutputOnly - pub requests: Option, - /// Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmName")] - pub vm_name: Option, - /// Time that this instance was started.@OutputOnly - #[serde(rename="startTimestamp")] - pub start_timestamp: Option, - /// Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly - #[serde(rename="vmZoneName")] - pub vm_zone_name: Option, + /// Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US + pub location: Option, + /// Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account. + #[serde(rename="authDomain")] + pub auth_domain: Option, + /// no description provided + pub iap: Option, } -impl ResponseResult for Instance {} +impl RequestValue for Application {} +impl ResponseResult for Application {} /// A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. @@ -1110,13 +1150,13 @@ pub struct ManualScaling { impl Part for ManualScaling {} -/// Docker image that is used to start a VM container for the version you deploy. +/// Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ContainerInfo { - /// URI to the hosted container image in a Docker repository. The URI must be fully qualified and include a tag or digest. Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" + /// URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" pub image: Option, } @@ -1274,16 +1314,16 @@ impl Part for TrafficSplit {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { - /// Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. - pub metadata: Option>, + /// The error result of the operation in case of failure or cancellation. + pub error: Option, /// If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. pub done: Option, /// The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. pub response: Option>, /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name. pub name: Option, - /// The error result of the operation in case of failure or cancellation. - pub error: Option, + /// Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + pub metadata: Option>, } impl ResponseResult for Operation {} @@ -1334,7 +1374,7 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the instances of a version. + /// Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). /// /// # Arguments /// @@ -1378,7 +1418,9 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the specified Application resource. You can update the following fields: auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain) default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration) + /// Updates the specified Application resource. You can update the following fields: + /// auth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain) + /// default_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration) /// /// # Arguments /// @@ -1465,7 +1507,11 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + /// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: + /// serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. + /// instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. + /// automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. + /// automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. /// /// # Arguments /// @@ -1712,7 +1758,9 @@ impl<'a, C, A> AppMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project). + /// Creates an App Engine application for a Google Cloud Platform project. Required fields: + /// id - The ID of the target Cloud Platform project. + /// location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/). /// /// # Arguments /// @@ -1758,7 +1806,7 @@ impl<'a, C, A> AppMethods<'a, C, A> { // CallBuilders ### // ################# -/// Lists the instances of a version. +/// Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). /// /// A builder for the *services.versions.instances.list* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -2014,12 +2062,12 @@ impl<'a, C, A> AppServiceVersionInstanceListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AppServiceVersionInstanceListCall<'a, C, A> @@ -2298,12 +2346,12 @@ impl<'a, C, A> AppServiceVersionCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AppServiceVersionCreateCall<'a, C, A> @@ -2331,7 +2379,9 @@ impl<'a, C, A> AppServiceVersionCreateCall<'a, C, A> where C: BorrowMut AppPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppPatchCall<'a, C, A> @@ -2890,12 +2940,12 @@ impl<'a, C, A> AppServiceVersionInstanceDebugCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AppServiceVersionInstanceDebugCall<'a, C, A> @@ -3143,12 +3193,12 @@ impl<'a, C, A> AppServiceGetCall<'a, C, A> where C: BorrowMut, A: /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppServiceGetCall<'a, C, A> @@ -3420,12 +3470,12 @@ impl<'a, C, A> AppServiceVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut< /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppServiceVersionInstanceDeleteCall<'a, C, A> @@ -3453,7 +3503,11 @@ impl<'a, C, A> AppServiceVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut< } -/// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. +/// Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: +/// serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. +/// instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. +/// automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. +/// automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. /// /// A builder for the *services.versions.patch* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -3728,12 +3782,12 @@ impl<'a, C, A> AppServiceVersionPatchCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AppServiceVersionPatchCall<'a, C, A> @@ -4017,12 +4071,12 @@ impl<'a, C, A> AppServiceVersionListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AppServiceVersionListCall<'a, C, A> @@ -4270,12 +4324,12 @@ impl<'a, C, A> AppOperationGetCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppOperationGetCall<'a, C, A> @@ -4535,12 +4589,12 @@ impl<'a, C, A> AppServiceListCall<'a, C, A> where C: BorrowMut, A /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppServiceListCall<'a, C, A> @@ -4812,12 +4866,12 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppLocationListCall<'a, C, A> @@ -5089,12 +5143,12 @@ impl<'a, C, A> AppServiceVersionInstanceGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AppServiceVersionInstanceGetCall<'a, C, A> @@ -5366,12 +5420,12 @@ impl<'a, C, A> AppOperationListCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppOperationListCall<'a, C, A> @@ -5631,12 +5685,12 @@ impl<'a, C, A> AppServiceVersionDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AppServiceVersionDeleteCall<'a, C, A> @@ -5884,12 +5938,12 @@ impl<'a, C, A> AppLocationGetCall<'a, C, A> where C: BorrowMut, A /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppLocationGetCall<'a, C, A> @@ -6153,7 +6207,7 @@ impl<'a, C, A> AppServicePatchCall<'a, C, A> where C: BorrowMut, self._services_id = new_value.to_string(); self } - /// Set to true to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + /// Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). /// /// Sets the *migrate traffic* query property to the given value. pub fn migrate_traffic(mut self, new_value: bool) -> AppServicePatchCall<'a, C, A> { @@ -6192,12 +6246,12 @@ impl<'a, C, A> AppServicePatchCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppServicePatchCall<'a, C, A> @@ -6445,12 +6499,12 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppGetCall<'a, C, A> @@ -6698,12 +6752,12 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppServiceDeleteCall<'a, C, A> @@ -6731,7 +6785,9 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, } -/// Creates an App Engine application for a Google Cloud Platform project. This requires a project that excludes an App Engine application. For details about creating a project without an application, see the Google Cloud Resource Manager create project topic (https://cloud.google.com/resource-manager/docs/creating-project). +/// Creates an App Engine application for a Google Cloud Platform project. Required fields: +/// id - The ID of the target Cloud Platform project. +/// location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/). /// /// A builder for the *create* method supported by a *app* resource. /// It is not used directly, but through a `AppMethods` instance. @@ -6937,12 +6993,12 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AppCreateCall<'a, C, A> @@ -7214,12 +7270,12 @@ impl<'a, C, A> AppServiceVersionGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AppServiceVersionGetCall<'a, C, A> diff --git a/gen/appsactivity1-cli/Cargo.toml b/gen/appsactivity1-cli/Cargo.toml index cc34cf321b..67ab6b3c97 100644 --- a/gen/appsactivity1-cli/Cargo.toml +++ b/gen/appsactivity1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appsactivity1-cli" -version = "1.0.4+20161202" +version = "1.0.4+20170215" authors = ["Sebastian Thiel "] description = "A complete library to interact with appsactivity (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appsactivity1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-appsactivity1] path = "../appsactivity1" -version = "1.0.4+20161202" +version = "1.0.4+20170215" diff --git a/gen/appsactivity1-cli/README.md b/gen/appsactivity1-cli/README.md index 54f3d436d6..64f0c22186 100644 --- a/gen/appsactivity1-cli/README.md +++ b/gen/appsactivity1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *appsactivity* API at revision *20161202*. The CLI is at version *1.0.4*. +This documentation was generated from the *appsactivity* API at revision *20170215*. The CLI is at version *1.0.4*. ```bash appsactivity1 [options] diff --git a/gen/appsactivity1-cli/mkdocs.yml b/gen/appsactivity1-cli/mkdocs.yml index 018ba16346..c694d5f4e9 100644 --- a/gen/appsactivity1-cli/mkdocs.yml +++ b/gen/appsactivity1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: appsactivity v1.0.4+20161202 +site_name: appsactivity v1.0.4+20170215 site_url: http://byron.github.io/google-apis-rs/google-appsactivity1-cli site_description: A complete library to interact with appsactivity (protocol v1) diff --git a/gen/appsactivity1-cli/src/main.rs b/gen/appsactivity1-cli/src/main.rs index 912a45f51f..6e12b94700 100644 --- a/gen/appsactivity1-cli/src/main.rs +++ b/gen/appsactivity1-cli/src/main.rs @@ -241,7 +241,7 @@ fn main() { let mut app = App::new("appsactivity1") .author("Sebastian Thiel ") - .version("1.0.4+20161202") + .version("1.0.4+20170215") .about("Provides a historical view of activity.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_appsactivity1_cli") .arg(Arg::with_name("url") diff --git a/gen/appsactivity1/Cargo.toml b/gen/appsactivity1/Cargo.toml index 086627b3cf..f4427789df 100644 --- a/gen/appsactivity1/Cargo.toml +++ b/gen/appsactivity1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-appsactivity1" -version = "1.0.4+20161202" +version = "1.0.4+20170215" authors = ["Sebastian Thiel "] description = "A complete library to interact with appsactivity (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appsactivity1" homepage = "https://developers.google.com/google-apps/activity/" -documentation = "https://docs.rs/google-appsactivity1/1.0.4+20161202" +documentation = "https://docs.rs/google-appsactivity1/1.0.4+20170215" license = "MIT" keywords = ["appsactivity", "google", "protocol", "web", "api"] diff --git a/gen/appsactivity1/README.md b/gen/appsactivity1/README.md index 1f3461ca10..9bb8ba9ae6 100644 --- a/gen/appsactivity1/README.md +++ b/gen/appsactivity1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-appsactivity1` library allows access to all features of the *Google appsactivity* service. -This documentation was generated from *appsactivity* crate version *1.0.4+20161202*, where *20161202* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *appsactivity* crate version *1.0.4+20170215*, where *20170215* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *appsactivity* *v1* API can be found at the [official documentation site](https://developers.google.com/google-apps/activity/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/struct.Appsactivity.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/struct.Appsactivity.html) ... -* [activities](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/struct.Activity.html) - * [*list*](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/struct.ActivityListCall.html) +* [activities](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/struct.Activity.html) + * [*list*](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/struct.ActivityListCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/struct.Appsactivity.html)** +* **[Hub](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/struct.Appsactivity.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.Part.html)** + * **[Parts](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -122,17 +122,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.Delegate.html), 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-appsactivity1/1.0.4+20161202/google_appsactivity1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.ResponseResult.html), 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")`. @@ -142,29 +142,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.CallBuilder.html) 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-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.CallBuilder.html), 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-appsactivity1/1.0.4+20161202/google_appsactivity1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-appsactivity1/1.0.4+20170215/google_appsactivity1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/appsactivity1/src/lib.rs b/gen/appsactivity1/src/lib.rs index 2d5f802b09..5d2bf59419 100644 --- a/gen/appsactivity1/src/lib.rs +++ b/gen/appsactivity1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *appsactivity* crate version *1.0.4+20161202*, where *20161202* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *appsactivity* crate version *1.0.4+20170215*, where *20170215* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *appsactivity* *v1* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/activity/). @@ -225,7 +225,7 @@ pub enum Scope { /// View and manage the files in your Google Drive Drive, - /// View the activity history of your Google Apps + /// View the activity history of your Google apps Activity, /// View and manage metadata of files in your Google Drive diff --git a/gen/appstate1-cli/Cargo.toml b/gen/appstate1-cli/Cargo.toml index f35ab592ff..ca77ffe92a 100644 --- a/gen/appstate1-cli/Cargo.toml +++ b/gen/appstate1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appstate1-cli" -version = "1.0.4+20161207" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with App State (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appstate1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-appstate1] path = "../appstate1" -version = "1.0.4+20161207" +version = "1.0.4+20170511" diff --git a/gen/appstate1-cli/README.md b/gen/appstate1-cli/README.md index b899159465..a8bc371333 100644 --- a/gen/appstate1-cli/README.md +++ b/gen/appstate1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *App State* API at revision *20161207*. The CLI is at version *1.0.4*. +This documentation was generated from the *App State* API at revision *20170511*. The CLI is at version *1.0.4*. ```bash appstate1 [options] diff --git a/gen/appstate1-cli/mkdocs.yml b/gen/appstate1-cli/mkdocs.yml index 8fac27dd30..44a909385f 100644 --- a/gen/appstate1-cli/mkdocs.yml +++ b/gen/appstate1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: App State v1.0.4+20161207 +site_name: App State v1.0.4+20170511 site_url: http://byron.github.io/google-apis-rs/google-appstate1-cli site_description: A complete library to interact with App State (protocol v1) diff --git a/gen/appstate1-cli/src/main.rs b/gen/appstate1-cli/src/main.rs index 69cc1d5111..25a362f9a8 100644 --- a/gen/appstate1-cli/src/main.rs +++ b/gen/appstate1-cli/src/main.rs @@ -569,7 +569,7 @@ fn main() { let mut app = App::new("appstate1") .author("Sebastian Thiel ") - .version("1.0.4+20161207") + .version("1.0.4+20170511") .about("The Google App State API.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_appstate1_cli") .arg(Arg::with_name("url") diff --git a/gen/appstate1/Cargo.toml b/gen/appstate1/Cargo.toml index 623e42da6c..4fbec4499a 100644 --- a/gen/appstate1/Cargo.toml +++ b/gen/appstate1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-appstate1" -version = "1.0.4+20161207" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with App State (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appstate1" homepage = "https://developers.google.com/games/services/web/api/states" -documentation = "https://docs.rs/google-appstate1/1.0.4+20161207" +documentation = "https://docs.rs/google-appstate1/1.0.4+20170511" license = "MIT" keywords = ["appstate", "google", "protocol", "web", "api"] diff --git a/gen/appstate1/README.md b/gen/appstate1/README.md index f63378b026..556388f8d1 100644 --- a/gen/appstate1/README.md +++ b/gen/appstate1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-appstate1` library allows access to all features of the *Google App State* service. -This documentation was generated from *App State* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *App State* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *App State* *v1* API can be found at the [official documentation site](https://developers.google.com/games/services/web/api/states). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/struct.AppState.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/struct.AppState.html) ... * states - * [*clear*](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/struct.StateClearCall.html), [*delete*](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/struct.StateDeleteCall.html), [*get*](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/struct.StateGetCall.html), [*list*](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/struct.StateListCall.html) and [*update*](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/struct.StateUpdateCall.html) + * [*clear*](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/struct.StateClearCall.html), [*delete*](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/struct.StateDeleteCall.html), [*get*](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/struct.StateGetCall.html), [*list*](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/struct.StateListCall.html) and [*update*](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/struct.StateUpdateCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/struct.AppState.html)** +* **[Hub](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/struct.AppState.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.Part.html)** + * **[Parts](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -123,17 +123,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.Delegate.html), 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-appstate1/1.0.4+20161207/google_appstate1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.ResponseResult.html), 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")`. @@ -143,29 +143,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.CallBuilder.html) 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-appstate1/1.0.4+20161207/google_appstate1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-appstate1/1.0.4+20161207/google_appstate1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.CallBuilder.html), 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-appstate1/1.0.4+20161207/google_appstate1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-appstate1/1.0.4+20170511/google_appstate1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/appstate1/src/lib.rs b/gen/appstate1/src/lib.rs index 4421c8f99c..81abef866e 100644 --- a/gen/appstate1/src/lib.rs +++ b/gen/appstate1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *App State* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *App State* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *App State* *v1* API can be found at the //! [official documentation site](https://developers.google.com/games/services/web/api/states). diff --git a/gen/autoscaler1_beta2-cli/Cargo.toml b/gen/autoscaler1_beta2-cli/Cargo.toml index 803395c2ab..f97576c550 100644 --- a/gen/autoscaler1_beta2-cli/Cargo.toml +++ b/gen/autoscaler1_beta2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/bigquery2-cli/Cargo.toml b/gen/bigquery2-cli/Cargo.toml index b038f9e4b4..35e35356f0 100644 --- a/gen/bigquery2-cli/Cargo.toml +++ b/gen/bigquery2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-bigquery2-cli" -version = "1.0.4+20161130" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with bigquery (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/bigquery2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-bigquery2] path = "../bigquery2" -version = "1.0.4+20161130" +version = "1.0.4+20170511" diff --git a/gen/bigquery2-cli/README.md b/gen/bigquery2-cli/README.md index b0247c17c0..9daa68823e 100644 --- a/gen/bigquery2-cli/README.md +++ b/gen/bigquery2-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *bigquery* API at revision *20161130*. The CLI is at version *1.0.4*. +This documentation was generated from the *bigquery* API at revision *20170511*. The CLI is at version *1.0.4*. ```bash bigquery2 [options] diff --git a/gen/bigquery2-cli/mkdocs.yml b/gen/bigquery2-cli/mkdocs.yml index 9c01700c35..64a8cc529d 100644 --- a/gen/bigquery2-cli/mkdocs.yml +++ b/gen/bigquery2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: bigquery v1.0.4+20161130 +site_name: bigquery v1.0.4+20170511 site_url: http://byron.github.io/google-apis-rs/google-bigquery2-cli site_description: A complete library to interact with bigquery (protocol v2) diff --git a/gen/bigquery2-cli/src/main.rs b/gen/bigquery2-cli/src/main.rs index 5af610e5e4..da7ef2565d 100644 --- a/gen/bigquery2-cli/src/main.rs +++ b/gen/bigquery2-cli/src/main.rs @@ -1163,6 +1163,9 @@ impl<'n> Engine<'n> { "start-index" => { call = call.start_index(value.unwrap_or("")); }, + "selected-fields" => { + call = call.selected_fields(value.unwrap_or("")); + }, "page-token" => { call = call.page_token(value.unwrap_or("")); }, @@ -1182,7 +1185,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["page-token", "start-index", "max-results"].iter().map(|v|*v)); + v.extend(["page-token", "start-index", "max-results", "selected-fields"].iter().map(|v|*v)); v } )); } } @@ -1266,6 +1269,9 @@ impl<'n> Engine<'n> { 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 { + "selected-fields" => { + call = call.selected_fields(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1279,6 +1285,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["selected-fields"].iter().map(|v|*v)); v } )); } } @@ -2583,7 +2590,7 @@ fn main() { let mut app = App::new("bigquery2") .author("Sebastian Thiel ") - .version("1.0.4+20161130") + .version("1.0.4+20170511") .about("A data platform for customers to create, manage, share and query data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_bigquery2_cli") .arg(Arg::with_name("url") diff --git a/gen/bigquery2/Cargo.toml b/gen/bigquery2/Cargo.toml index c7f838420e..c0ebf63761 100644 --- a/gen/bigquery2/Cargo.toml +++ b/gen/bigquery2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-bigquery2" -version = "1.0.4+20161130" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with bigquery (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/bigquery2" homepage = "https://cloud.google.com/bigquery/" -documentation = "https://docs.rs/google-bigquery2/1.0.4+20161130" +documentation = "https://docs.rs/google-bigquery2/1.0.4+20170511" license = "MIT" keywords = ["bigquery", "google", "protocol", "web", "api"] diff --git a/gen/bigquery2/README.md b/gen/bigquery2/README.md index 3d263fedaa..5af7cbdcfc 100644 --- a/gen/bigquery2/README.md +++ b/gen/bigquery2/README.md @@ -5,29 +5,29 @@ DO NOT EDIT ! --> The `google-bigquery2` library allows access to all features of the *Google bigquery* service. -This documentation was generated from *bigquery* crate version *1.0.4+20161130*, where *20161130* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *bigquery* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *bigquery* *v2* API can be found at the [official documentation site](https://cloud.google.com/bigquery/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.Bigquery.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.Bigquery.html) ... -* [datasets](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.Dataset.html) - * [*delete*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.DatasetDeleteCall.html), [*get*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.DatasetGetCall.html), [*insert*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.DatasetInsertCall.html), [*list*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.DatasetListCall.html), [*patch*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.DatasetPatchCall.html) and [*update*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.DatasetUpdateCall.html) -* [jobs](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.Job.html) - * [*cancel*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.JobCancelCall.html), [*get*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.JobGetCall.html), [*get query results*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.JobGetQueryResultCall.html), [*insert*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.JobInsertCall.html), [*list*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.JobListCall.html) and [*query*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.JobQueryCall.html) +* [datasets](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.Dataset.html) + * [*delete*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.DatasetDeleteCall.html), [*get*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.DatasetGetCall.html), [*insert*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.DatasetInsertCall.html), [*list*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.DatasetListCall.html), [*patch*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.DatasetPatchCall.html) and [*update*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.DatasetUpdateCall.html) +* [jobs](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.Job.html) + * [*cancel*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.JobCancelCall.html), [*get*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.JobGetCall.html), [*get query results*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.JobGetQueryResultCall.html), [*insert*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.JobInsertCall.html), [*list*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.JobListCall.html) and [*query*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.JobQueryCall.html) * projects - * [*list*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.ProjectListCall.html) + * [*list*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.ProjectListCall.html) * tabledata - * [*insert all*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.TabledataInsertAllCall.html) and [*list*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.TabledataListCall.html) -* [tables](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.Table.html) - * [*delete*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.TableDeleteCall.html), [*get*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.TableGetCall.html), [*insert*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.TableInsertCall.html), [*list*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.TableListCall.html), [*patch*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.TablePatchCall.html) and [*update*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.TableUpdateCall.html) + * [*insert all*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.TabledataInsertAllCall.html) and [*list*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.TabledataListCall.html) +* [tables](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.Table.html) + * [*delete*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.TableDeleteCall.html), [*get*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.TableGetCall.html), [*insert*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.TableInsertCall.html), [*list*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.TableListCall.html), [*patch*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.TablePatchCall.html) and [*update*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.TableUpdateCall.html) Upload supported by ... -* [*insert jobs*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.JobInsertCall.html) +* [*insert jobs*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.JobInsertCall.html) @@ -35,17 +35,17 @@ Upload supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/struct.Bigquery.html)** +* **[Hub](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/struct.Bigquery.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.Part.html)** + * **[Parts](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -138,17 +138,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.Delegate.html), 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-bigquery2/1.0.4+20161130/google_bigquery2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.ResponseResult.html), 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")`. @@ -158,29 +158,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.CallBuilder.html) 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-bigquery2/1.0.4+20161130/google_bigquery2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-bigquery2/1.0.4+20161130/google_bigquery2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.CallBuilder.html), 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-bigquery2/1.0.4+20161130/google_bigquery2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-bigquery2/1.0.4+20170511/google_bigquery2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/bigquery2/src/lib.rs b/gen/bigquery2/src/lib.rs index 38a946ff98..9fde52b678 100644 --- a/gen/bigquery2/src/lib.rs +++ b/gen/bigquery2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *bigquery* crate version *1.0.4+20161130*, where *20161130* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *bigquery* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *bigquery* *v2* API can be found at the //! [official documentation site](https://cloud.google.com/bigquery/). @@ -444,7 +444,7 @@ pub struct QueryRequest { /// [Optional] If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false. #[serde(rename="dryRun")] pub dry_run: Option, - /// [Experimental] Standard SQL only. Whether to use positional (?) or named (@myparam) query parameters in this query. + /// Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. #[serde(rename="parameterMode")] pub parameter_mode: Option, /// [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. The default value is true. @@ -459,7 +459,7 @@ pub struct QueryRequest { /// [Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies. #[serde(rename="maxResults")] pub max_results: Option, - /// [Experimental] Query parameters for Standard SQL queries. + /// Query parameters for Standard SQL queries. #[serde(rename="queryParameters")] pub query_parameters: Option>, /// [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]". @@ -478,7 +478,7 @@ impl RequestValue for QueryRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobStatistics2 { - /// [Output-only, Experimental] Describes execution plan for the query. + /// [Output-only] Describes execution plan for the query. #[serde(rename="queryPlan")] pub query_plan: Option>, /// [Output-only, Experimental] The type of query statement, if valid. @@ -502,7 +502,7 @@ pub struct JobStatistics2 { /// [Output-only] Billing tier for the job. #[serde(rename="billingTier")] pub billing_tier: Option, - /// [Output-only, Experimental] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. + /// [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. #[serde(rename="numDmlAffectedRows")] pub num_dml_affected_rows: Option, /// [Output-only, Experimental] The schema of the results. Present only for successful dry run of non-legacy SQL queries. @@ -535,6 +535,21 @@ pub struct JobStatistics3 { impl Part for JobStatistics3 {} +/// Additional details for a view. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TableListTablesView { + /// True if view is defined in legacy SQL dialect, false if in standard SQL. + #[serde(rename="useLegacySql")] + pub use_legacy_sql: Option, +} + +impl NestedType for TableListTablesView {} +impl Part for TableListTablesView {} + + /// Represents a single JSON object. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -581,7 +596,7 @@ impl ResponseResult for ProjectList {} pub struct TableFieldSchema { /// [Optional] Describes the nested schema fields if the type property is set to RECORD. pub fields: Option>, - /// [Optional] The field description. The maximum length is 16K characters. + /// [Optional] The field description. The maximum length is 512 characters. pub description: Option, /// [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD). #[serde(rename="type")] @@ -758,6 +773,8 @@ impl Part for JobReference {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExplainQueryStage { + /// Current status for the stage. + pub status: Option, /// Relative amount of time the slowest shard spent on CPU-bound tasks. #[serde(rename="computeRatioMax")] pub compute_ratio_max: Option, @@ -810,7 +827,7 @@ pub struct DatasetListDatasets { pub friendly_name: Option, /// The resource type. This property always returns the value "bigquery#dataset". pub kind: Option, - /// [Experimental] The labels associated with this dataset. You can use these to organize and group your datasets. + /// The labels associated with this dataset. You can use these to organize and group your datasets. pub labels: Option>, /// The fully-qualified, unique, opaque ID of the dataset. pub id: Option, @@ -868,6 +885,8 @@ impl Part for UserDefinedFunctionResource {} pub struct TableListTables { /// The resource type. pub kind: Option, + /// Additional details for a view. + pub view: Option, /// The user-friendly name for this table. #[serde(rename="friendlyName")] pub friendly_name: Option, @@ -1060,7 +1079,7 @@ pub struct JobConfigurationLoad { /// [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. #[serde(rename="skipLeadingRows")] pub skip_leading_rows: Option, - /// [Experimental] Indicates if we should automatically infer the options and schema for CSV and JSON sources. + /// Indicates if we should automatically infer the options and schema for CSV and JSON sources. pub autodetect: Option, /// [Required] The destination table to load the data into. #[serde(rename="destinationTable")] @@ -1068,10 +1087,10 @@ pub struct JobConfigurationLoad { /// [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. #[serde(rename="sourceUris")] pub source_uris: Option>, - /// [Optional] This string will be interpreted as a null value when it appears in a CSV file. The default value is the empty string. Please refer to the documentation for further information. + /// [Optional] Specifies a string that represents a null value in a CSV file. For example, if you specify "\N", BigQuery interprets "\N" as a null value when loading a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value. #[serde(rename="nullMarker")] pub null_marker: Option, - /// [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result. + /// If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result. #[serde(rename="projectionFields")] pub projection_fields: Option>, /// Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. @@ -1209,7 +1228,7 @@ pub struct GetQueryResultsResponse { pub etag: Option, /// An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Present only when the query completes successfully. pub rows: Option>, - /// [Output-only, Experimental] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. + /// [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. #[serde(rename="numDmlAffectedRows")] pub num_dml_affected_rows: Option, /// The schema of the results. Present only when the query completes successfully. @@ -1277,7 +1296,7 @@ pub struct ExternalDataConfiguration { /// Additional properties to set if sourceFormat is set to CSV. #[serde(rename="csvOptions")] pub csv_options: Option, - /// [Experimental] Try to detect schema and format options automatically. Any option specified explicitly will be honored. + /// Try to detect schema and format options automatically. Any option specified explicitly will be honored. pub autodetect: Option, /// [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. #[serde(rename="maxBadRecords")] @@ -1291,7 +1310,7 @@ pub struct ExternalDataConfiguration { /// [Optional] Additional options if sourceFormat is set to BIGTABLE. #[serde(rename="bigtableOptions")] pub bigtable_options: Option, - /// [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Experimental] For Google Cloud Bigtable, specify "BIGTABLE". Please note that reading from Google Cloud Bigtable is experimental and has to be enabled for your project. Please contact Google Cloud Support to enable this for your project. + /// [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". #[serde(rename="sourceFormat")] pub source_format: Option, /// [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. @@ -1350,7 +1369,7 @@ pub struct ViewDefinition { /// Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. #[serde(rename="useLegacySql")] pub use_legacy_sql: Option, - /// [Experimental] Describes user-defined function resources used in the query. + /// Describes user-defined function resources used in the query. #[serde(rename="userDefinedFunctionResources")] pub user_defined_function_resources: Option>, } @@ -1542,7 +1561,7 @@ impl Part for JobStatistics {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobConfigurationQuery { - /// [Optional] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false. + /// [Optional] If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if this is set to false. For standard SQL queries, this flag is ignored and results are never flattened. #[serde(rename="flattenResults")] pub flatten_results: Option, /// [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true. @@ -1554,7 +1573,7 @@ pub struct JobConfigurationQuery { /// Query parameters for standard SQL queries. #[serde(rename="queryParameters")] pub query_parameters: Option>, - /// [Required] BigQuery SQL query to execute. + /// [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL. pub query: Option, /// [Deprecated] This property is deprecated. #[serde(rename="preserveNulls")] @@ -1565,7 +1584,7 @@ pub struct JobConfigurationQuery { /// [Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default. #[serde(rename="maximumBillingTier")] pub maximum_billing_tier: Option, - /// [Experimental] Standard SQL only. Whether to use positional (?) or named (@myparam) query parameters in this query. + /// Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query. #[serde(rename="parameterMode")] pub parameter_mode: Option, /// [Optional] Specifies the default dataset to use for unqualified table names in the query. @@ -1582,13 +1601,13 @@ pub struct JobConfigurationQuery { /// [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(rename="writeDisposition")] pub write_disposition: Option, - /// If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. + /// [Optional] If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. For standard SQL queries, this flag is ignored and large results are always allowed. #[serde(rename="allowLargeResults")] pub allow_large_results: Option, /// [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(rename="createDisposition")] pub create_disposition: Option, - /// [Experimental] Describes user-defined function resources used in the query. + /// Describes user-defined function resources used in the query. #[serde(rename="userDefinedFunctionResources")] pub user_defined_function_resources: Option>, /// [Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table. @@ -1644,7 +1663,7 @@ pub struct JobConfiguration { pub dry_run: Option, /// [Pick one] Configures a query job. pub query: Option, - /// [Experimental] The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and must be unique within a dataset. Both keys and values are additionally constrained to be <= 128 bytes in size. + /// [Experimental] The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key. pub labels: Option>, /// [Pick one] Configures an extract job. pub extract: Option, @@ -1721,7 +1740,7 @@ pub struct Dataset { /// [Required] A reference that identifies the dataset. #[serde(rename="datasetReference")] pub dataset_reference: Option, - /// [Experimental] The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Labeling Datasets for more information. + /// The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Labeling Datasets for more information. pub labels: Option>, /// [Output-only] The time when this dataset was created, in milliseconds since the epoch. #[serde(rename="creationTime")] @@ -1733,7 +1752,7 @@ pub struct Dataset { pub default_table_expiration_ms: Option, /// [Output-only] A hash of the resource. pub etag: Option, - /// [Experimental] The geographic location where the dataset should reside. Possible values include EU and US. The default value is US. + /// The geographic location where the dataset should reside. Possible values include EU and US. The default value is US. pub location: Option, /// [Optional] A descriptive name for the dataset. #[serde(rename="friendlyName")] @@ -1793,7 +1812,7 @@ pub struct Table { /// [Output-only] The time when this table was created, in milliseconds since the epoch. #[serde(rename="creationTime")] pub creation_time: Option, - /// [Experimental] The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than 63 characters, can only contain letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and must be unique within a dataset. Both keys and values are additionally constrained to be <= 128 bytes in size. + /// [Experimental] The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key. pub labels: Option>, /// [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. #[serde(rename="numBytes")] @@ -1906,7 +1925,7 @@ pub struct QueryResponse { pub page_token: Option, /// An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. pub rows: Option>, - /// [Output-only, Experimental] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. + /// [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. #[serde(rename="numDmlAffectedRows")] pub num_dml_affected_rows: Option, /// The schema of the results. Present only when the query completes successfully. @@ -2100,6 +2119,7 @@ impl<'a, C, A> TableMethods<'a, C, A> { _project_id: project_id.to_string(), _dataset_id: dataset_id.to_string(), _table_id: table_id.to_string(), + _selected_fields: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2533,6 +2553,7 @@ impl<'a, C, A> TabledataMethods<'a, C, A> { _dataset_id: dataset_id.to_string(), _table_id: table_id.to_string(), _start_index: Default::default(), + _selected_fields: Default::default(), _page_token: Default::default(), _max_results: Default::default(), _delegate: Default::default(), @@ -3719,6 +3740,7 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.tables().get("projectId", "datasetId", "tableId") +/// .selected_fields("et") /// .doit(); /// # } /// ``` @@ -3729,6 +3751,7 @@ pub struct TableGetCall<'a, C, A> _project_id: String, _dataset_id: String, _table_id: String, + _selected_fields: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -3750,11 +3773,14 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut }; dlg.begin(MethodInfo { id: "bigquery.tables.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("projectId", self._project_id.to_string())); params.push(("datasetId", self._dataset_id.to_string())); params.push(("tableId", self._table_id.to_string())); - for &field in ["alt", "projectId", "datasetId", "tableId"].iter() { + if let Some(value) = self._selected_fields { + params.push(("selectedFields", value.to_string())); + } + for &field in ["alt", "projectId", "datasetId", "tableId", "selectedFields"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -3899,6 +3925,13 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut self._table_id = new_value.to_string(); self } + /// List of fields to return (comma-separated). If unspecified, all fields are returned + /// + /// Sets the *selected fields* query property to the given value. + pub fn selected_fields(mut self, new_value: &str) -> TableGetCall<'a, C, A> { + self._selected_fields = 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. /// @@ -4793,10 +4826,10 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.datasets().list("projectId") -/// .page_token("Lorem") -/// .max_results(26) -/// .filter("erat") -/// .all(false) +/// .page_token("eos") +/// .max_results(20) +/// .filter("sadipscing") +/// .all(true) /// .doit(); /// # } /// ``` @@ -5354,7 +5387,7 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.datasets().delete("projectId", "datasetId") -/// .delete_contents(false) +/// .delete_contents(true) /// .doit(); /// # } /// ``` @@ -6381,10 +6414,10 @@ impl<'a, C, A> JobQueryCall<'a, C, A> where C: BorrowMut, A: oaut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.jobs().get_query_results("projectId", "jobId") -/// .timeout_ms(45) -/// .start_index("sea") -/// .page_token("et") -/// .max_results(31) +/// .timeout_ms(92) +/// .start_index("et") +/// .page_token("duo") +/// .max_results(80) /// .doit(); /// # } /// ``` @@ -6676,10 +6709,10 @@ impl<'a, C, A> JobGetQueryResultCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.jobs().list("projectId") -/// .add_state_filter("eirmod") -/// .projection("sanctus") -/// .page_token("et") -/// .max_results(55) +/// .add_state_filter("sanctus") +/// .projection("et") +/// .page_token("amet") +/// .max_results(78) /// .all_users(true) /// .doit(); /// # } @@ -7887,9 +7920,10 @@ impl<'a, C, A> TabledataInsertAllCall<'a, C, A> where C: BorrowMut _dataset_id: String, _table_id: String, _start_index: Option, + _selected_fields: Option, _page_token: Option, _max_results: Option, _delegate: Option<&'a mut Delegate>, @@ -7924,20 +7959,23 @@ impl<'a, C, A> TabledataListCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "bigquery.tabledata.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); params.push(("projectId", self._project_id.to_string())); params.push(("datasetId", self._dataset_id.to_string())); params.push(("tableId", self._table_id.to_string())); if let Some(value) = self._start_index { params.push(("startIndex", value.to_string())); } + if let Some(value) = self._selected_fields { + params.push(("selectedFields", value.to_string())); + } if let Some(value) = self._page_token { params.push(("pageToken", value.to_string())); } if let Some(value) = self._max_results { params.push(("maxResults", value.to_string())); } - for &field in ["alt", "projectId", "datasetId", "tableId", "startIndex", "pageToken", "maxResults"].iter() { + for &field in ["alt", "projectId", "datasetId", "tableId", "startIndex", "selectedFields", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -8089,6 +8127,13 @@ impl<'a, C, A> TabledataListCall<'a, C, A> where C: BorrowMut, A: self._start_index = Some(new_value.to_string()); self } + /// List of fields to return (comma-separated). If unspecified, all fields are returned + /// + /// Sets the *selected fields* query property to the given value. + pub fn selected_fields(mut self, new_value: &str) -> TabledataListCall<'a, C, A> { + self._selected_fields = Some(new_value.to_string()); + self + } /// Page token, returned by a previous call, identifying the result set /// /// Sets the *page token* query property to the given value. @@ -8182,8 +8227,8 @@ impl<'a, C, A> TabledataListCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.projects().list() -/// .page_token("gubergren") -/// .max_results(81) +/// .page_token("sit") +/// .max_results(75) /// .doit(); /// # } /// ``` diff --git a/gen/blogger3-cli/Cargo.toml b/gen/blogger3-cli/Cargo.toml index f2610d14f9..bb32470036 100644 --- a/gen/blogger3-cli/Cargo.toml +++ b/gen/blogger3-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/books1-cli/Cargo.toml b/gen/books1-cli/Cargo.toml index 709db1d41a..7c5fb0fd11 100644 --- a/gen/books1-cli/Cargo.toml +++ b/gen/books1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-books1-cli" -version = "1.0.4+20161206" +version = "1.0.4+20170313" authors = ["Sebastian Thiel "] description = "A complete library to interact with books (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/books1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-books1] path = "../books1" -version = "1.0.4+20161206" +version = "1.0.4+20170313" diff --git a/gen/books1-cli/README.md b/gen/books1-cli/README.md index 09267b2579..a3f4e06da7 100644 --- a/gen/books1-cli/README.md +++ b/gen/books1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *books* API at revision *20161206*. The CLI is at version *1.0.4*. +This documentation was generated from the *books* API at revision *20170313*. The CLI is at version *1.0.4*. ```bash books1 [options] diff --git a/gen/books1-cli/mkdocs.yml b/gen/books1-cli/mkdocs.yml index 301e33d6bd..01f9d8666f 100644 --- a/gen/books1-cli/mkdocs.yml +++ b/gen/books1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: books v1.0.4+20161206 +site_name: books v1.0.4+20170313 site_url: http://byron.github.io/google-apis-rs/google-books1-cli site_description: A complete library to interact with books (protocol v1) diff --git a/gen/books1-cli/src/main.rs b/gen/books1-cli/src/main.rs index 8b10f2b6aa..33d01bc2a9 100644 --- a/gen/books1-cli/src/main.rs +++ b/gen/books1-cli/src/main.rs @@ -1160,12 +1160,13 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "notification.more-from-series.opted-state" => Some(("notification.moreFromSeries.opted_state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "notification.reward-expirations.opted-state" => Some(("notification.rewardExpirations.opted_state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "notification.more-from-authors.opted-state" => Some(("notification.moreFromAuthors.opted_state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "notes-export.is-enabled" => Some(("notesExport.isEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "notes-export.folder-name" => Some(("notesExport.folderName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["folder-name", "is-enabled", "kind", "more-from-authors", "more-from-series", "notes-export", "notification", "opted-state"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["folder-name", "is-enabled", "kind", "more-from-authors", "more-from-series", "notes-export", "notification", "opted-state", "reward-expirations"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1371,6 +1372,9 @@ impl<'n> Engine<'n> { "country" => { call = call.country(value.unwrap_or("")); }, + "annotation-id" => { + call = call.annotation_id(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1384,7 +1388,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["source", "show-only-summary-in-response", "country"].iter().map(|v|*v)); + v.extend(["source", "show-only-summary-in-response", "annotation-id", "country"].iter().map(|v|*v)); v } )); } } @@ -4702,7 +4706,7 @@ fn main() { let mut app = App::new("books1") .author("Sebastian Thiel ") - .version("1.0.4+20161206") + .version("1.0.4+20170313") .about("Searches for books and manages your Google Books library.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_books1_cli") .arg(Arg::with_name("url") diff --git a/gen/books1/Cargo.toml b/gen/books1/Cargo.toml index f251c90b61..dd040c02ed 100644 --- a/gen/books1/Cargo.toml +++ b/gen/books1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-books1" -version = "1.0.4+20161206" +version = "1.0.4+20170313" authors = ["Sebastian Thiel "] description = "A complete library to interact with books (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/books1" homepage = "https://developers.google.com/books/docs/v1/getting_started" -documentation = "https://docs.rs/google-books1/1.0.4+20161206" +documentation = "https://docs.rs/google-books1/1.0.4+20170313" license = "MIT" keywords = ["books", "google", "protocol", "web", "api"] diff --git a/gen/books1/README.md b/gen/books1/README.md index 3eece49977..27b2661351 100644 --- a/gen/books1/README.md +++ b/gen/books1/README.md @@ -5,38 +5,38 @@ DO NOT EDIT ! --> The `google-books1` library allows access to all features of the *Google books* service. -This documentation was generated from *books* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *books* crate version *1.0.4+20170313*, where *20170313* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *books* *v1* API can be found at the [official documentation site](https://developers.google.com/books/docs/v1/getting_started). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.Books.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.Books.html) ... * bookshelves - * [*get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.BookshelveGetCall.html), [*list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.BookshelveListCall.html) and [*volumes list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.BookshelveVolumeListCall.html) + * [*get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.BookshelveGetCall.html), [*list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.BookshelveListCall.html) and [*volumes list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.BookshelveVolumeListCall.html) * cloudloading - * [*add book*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.CloudloadingAddBookCall.html), [*delete book*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.CloudloadingDeleteBookCall.html) and [*update book*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.CloudloadingUpdateBookCall.html) + * [*add book*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.CloudloadingAddBookCall.html), [*delete book*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.CloudloadingDeleteBookCall.html) and [*update book*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.CloudloadingUpdateBookCall.html) * dictionary - * [*list offline metadata*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.DictionaryListOfflineMetadataCall.html) + * [*list offline metadata*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.DictionaryListOfflineMetadataCall.html) * layers - * [*annotation data get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.LayerAnnotationDataGetCall.html), [*annotation data list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.LayerAnnotationDataListCall.html), [*get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.LayerGetCall.html), [*list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.LayerListCall.html), [*volume annotations get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.LayerVolumeAnnotationGetCall.html) and [*volume annotations list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.LayerVolumeAnnotationListCall.html) + * [*annotation data get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.LayerAnnotationDataGetCall.html), [*annotation data list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.LayerAnnotationDataListCall.html), [*get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.LayerGetCall.html), [*list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.LayerListCall.html), [*volume annotations get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.LayerVolumeAnnotationGetCall.html) and [*volume annotations list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.LayerVolumeAnnotationListCall.html) * myconfig - * [*get user settings*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MyconfigGetUserSettingCall.html), [*release download access*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MyconfigReleaseDownloadAccesCall.html), [*request access*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MyconfigRequestAccesCall.html), [*sync volume licenses*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MyconfigSyncVolumeLicenseCall.html) and [*update user settings*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MyconfigUpdateUserSettingCall.html) + * [*get user settings*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MyconfigGetUserSettingCall.html), [*release download access*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MyconfigReleaseDownloadAccesCall.html), [*request access*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MyconfigRequestAccesCall.html), [*sync volume licenses*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MyconfigSyncVolumeLicenseCall.html) and [*update user settings*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MyconfigUpdateUserSettingCall.html) * mylibrary - * [*annotations delete*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryAnnotationDeleteCall.html), [*annotations insert*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryAnnotationInsertCall.html), [*annotations list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryAnnotationListCall.html), [*annotations summary*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryAnnotationSummaryCall.html), [*annotations update*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryAnnotationUpdateCall.html), [*bookshelves add volume*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryBookshelveAddVolumeCall.html), [*bookshelves clear volumes*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryBookshelveClearVolumeCall.html), [*bookshelves get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryBookshelveGetCall.html), [*bookshelves list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryBookshelveListCall.html), [*bookshelves move volume*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryBookshelveMoveVolumeCall.html), [*bookshelves remove volume*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryBookshelveRemoveVolumeCall.html), [*bookshelves volumes list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryBookshelveVolumeListCall.html), [*readingpositions get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryReadingpositionGetCall.html) and [*readingpositions set position*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.MylibraryReadingpositionSetPositionCall.html) -* [notification](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.Notification.html) - * [*get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.NotificationGetCall.html) + * [*annotations delete*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryAnnotationDeleteCall.html), [*annotations insert*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryAnnotationInsertCall.html), [*annotations list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryAnnotationListCall.html), [*annotations summary*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryAnnotationSummaryCall.html), [*annotations update*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryAnnotationUpdateCall.html), [*bookshelves add volume*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryBookshelveAddVolumeCall.html), [*bookshelves clear volumes*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryBookshelveClearVolumeCall.html), [*bookshelves get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryBookshelveGetCall.html), [*bookshelves list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryBookshelveListCall.html), [*bookshelves move volume*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryBookshelveMoveVolumeCall.html), [*bookshelves remove volume*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryBookshelveRemoveVolumeCall.html), [*bookshelves volumes list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryBookshelveVolumeListCall.html), [*readingpositions get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryReadingpositionGetCall.html) and [*readingpositions set position*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.MylibraryReadingpositionSetPositionCall.html) +* [notification](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.Notification.html) + * [*get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.NotificationGetCall.html) * onboarding - * [*list categories*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.OnboardingListCategoryCall.html) and [*list category volumes*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.OnboardingListCategoryVolumeCall.html) + * [*list categories*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.OnboardingListCategoryCall.html) and [*list category volumes*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.OnboardingListCategoryVolumeCall.html) * personalizedstream - * [*get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.PersonalizedstreamGetCall.html) + * [*get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.PersonalizedstreamGetCall.html) * promooffer - * [*accept*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.PromoofferAcceptCall.html), [*dismiss*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.PromoofferDismisCall.html) and [*get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.PromoofferGetCall.html) + * [*accept*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.PromoofferAcceptCall.html), [*dismiss*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.PromoofferDismisCall.html) and [*get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.PromoofferGetCall.html) * series - * [*get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.SeryGetCall.html) and [*membership get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.SeryMembershipGetCall.html) -* [volumes](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.Volume.html) - * [*associated list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.VolumeAssociatedListCall.html), [*get*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.VolumeGetCall.html), [*list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.VolumeListCall.html), [*mybooks list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.VolumeMybookListCall.html), [*recommended list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.VolumeRecommendedListCall.html), [*recommended rate*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.VolumeRecommendedRateCall.html) and [*useruploaded list*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.VolumeUseruploadedListCall.html) + * [*get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.SeryGetCall.html) and [*membership get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.SeryMembershipGetCall.html) +* [volumes](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.Volume.html) + * [*associated list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.VolumeAssociatedListCall.html), [*get*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.VolumeGetCall.html), [*list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.VolumeListCall.html), [*mybooks list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.VolumeMybookListCall.html), [*recommended list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.VolumeRecommendedListCall.html), [*recommended rate*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.VolumeRecommendedRateCall.html) and [*useruploaded list*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.VolumeUseruploadedListCall.html) @@ -45,17 +45,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-books1/1.0.4+20161206/google_books1/struct.Books.html)** +* **[Hub](https://docs.rs/google-books1/1.0.4+20170313/google_books1/struct.Books.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.Part.html)** + * **[Parts](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -157,17 +157,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-books1/1.0.4+20161206/google_books1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-books1/1.0.4+20170313/google_books1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.Delegate.html), 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-books1/1.0.4+20161206/google_books1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-books1/1.0.4+20170313/google_books1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.ResponseResult.html), 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")`. @@ -177,29 +177,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.CallBuilder.html) 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-books1/1.0.4+20161206/google_books1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-books1/1.0.4+20161206/google_books1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.CallBuilder.html), 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-books1/1.0.4+20161206/google_books1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-books1/1.0.4+20170313/google_books1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/books1/src/lib.rs b/gen/books1/src/lib.rs index 8bce9ff3e5..ff70dda1ce 100644 --- a/gen/books1/src/lib.rs +++ b/gen/books1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *books* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *books* crate version *1.0.4+20170313*, where *20170313* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *books* *v1* API can be found at the //! [official documentation site](https://developers.google.com/books/docs/v1/getting_started). @@ -2107,6 +2107,9 @@ pub struct UsersettingsNotification { #[serde(rename="moreFromSeries")] pub more_from_series: Option, /// no description provided + #[serde(rename="rewardExpirations")] + pub reward_expirations: Option, + /// no description provided #[serde(rename="moreFromAuthors")] pub more_from_authors: Option, } @@ -2252,6 +2255,20 @@ impl NestedType for VolumeUserInfo {} impl Part for VolumeUserInfo {} +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UsersettingsNotificationRewardExpirations { + /// no description provided + pub opted_state: Option, +} + +impl NestedType for UsersettingsNotificationRewardExpirations {} +impl Part for UsersettingsNotificationRewardExpirations {} + + /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -3613,6 +3630,7 @@ impl<'a, C, A> MylibraryMethods<'a, C, A> { _source: Default::default(), _show_only_summary_in_response: Default::default(), _country: Default::default(), + _annotation_id: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -13771,6 +13789,7 @@ impl<'a, C, A> MylibraryBookshelveAddVolumeCall<'a, C, A> where C: BorrowMut _source: Option, _show_only_summary_in_response: Option, _country: Option, + _annotation_id: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -13803,7 +13823,7 @@ impl<'a, C, A> MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((6 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); if let Some(value) = self._source { params.push(("source", value.to_string())); } @@ -13813,7 +13833,10 @@ impl<'a, C, A> MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut MylibraryAnnotationInsertCall<'a, C, A> { + self._annotation_id = 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. /// @@ -14031,8 +14061,8 @@ impl<'a, C, A> MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut MylibraryBookshelveRemoveVolumeCall<'a, C, A> where C: BorrowMut< /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.mylibrary().annotations_list() -/// .volume_id("consetetur") -/// .updated_min("vero") -/// .updated_max("consetetur") -/// .source("eos") +/// .volume_id("vero") +/// .updated_min("consetetur") +/// .updated_max("eos") +/// .source("justo") /// .show_deleted(true) -/// .page_token("tempor") -/// .max_results(40) -/// .add_layer_ids("dolore") -/// .layer_id("amet.") -/// .content_version("dolore") +/// .page_token("gubergren") +/// .max_results(17) +/// .add_layer_ids("amet.") +/// .layer_id("dolore") +/// .content_version("magna") /// .doit(); /// # } /// ``` @@ -14622,7 +14652,7 @@ impl<'a, C, A> MylibraryAnnotationListCall<'a, C, A> where C: BorrowMut MylibraryAnnotationUpdateCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionSetPositionCall<'a, C, A> where C: Borrow /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.mylibrary().bookshelves_get("shelf") -/// .source("diam") +/// .source("magna") /// .doit(); /// # } /// ``` @@ -15437,7 +15467,7 @@ impl<'a, C, A> MylibraryBookshelveGetCall<'a, C, A> where C: BorrowMut MylibraryBookshelveListCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionGetCall<'a, C, A> where C: BorrowMut NotificationGetCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.cloudloading().add_book() -/// .upload_client_token("dolores") -/// .name("consetetur") -/// .mime_type("erat") -/// .drive_document_id("amet.") +/// .upload_client_token("consetetur") +/// .name("erat") +/// .mime_type("amet.") +/// .drive_document_id("dolores") /// .doit(); /// # } /// ``` diff --git a/gen/calendar3-cli/Cargo.toml b/gen/calendar3-cli/Cargo.toml index 50aa46c69b..8e5cff48aa 100644 --- a/gen/calendar3-cli/Cargo.toml +++ b/gen/calendar3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-calendar3-cli" -version = "1.0.4+20161211" +version = "1.0.4+20170514" authors = ["Sebastian Thiel "] description = "A complete library to interact with calendar (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/calendar3-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-calendar3] path = "../calendar3" -version = "1.0.4+20161211" +version = "1.0.4+20170514" diff --git a/gen/calendar3-cli/README.md b/gen/calendar3-cli/README.md index 0aaf68972c..8ca5b869e5 100644 --- a/gen/calendar3-cli/README.md +++ b/gen/calendar3-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *calendar* API at revision *20161211*. The CLI is at version *1.0.4*. +This documentation was generated from the *calendar* API at revision *20170514*. The CLI is at version *1.0.4*. ```bash calendar3 [options] diff --git a/gen/calendar3-cli/mkdocs.yml b/gen/calendar3-cli/mkdocs.yml index 8d0edfb77f..6dbaf70848 100644 --- a/gen/calendar3-cli/mkdocs.yml +++ b/gen/calendar3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: calendar v1.0.4+20161211 +site_name: calendar v1.0.4+20170514 site_url: http://byron.github.io/google-apis-rs/google-calendar3-cli site_description: A complete library to interact with calendar (protocol v3) diff --git a/gen/calendar3-cli/src/main.rs b/gen/calendar3-cli/src/main.rs index 52cc000447..8184da525f 100644 --- a/gen/calendar3-cli/src/main.rs +++ b/gen/calendar3-cli/src/main.rs @@ -4386,7 +4386,7 @@ fn main() { let mut app = App::new("calendar3") .author("Sebastian Thiel ") - .version("1.0.4+20161211") + .version("1.0.4+20170514") .about("Manipulates events and other calendar data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_calendar3_cli") .arg(Arg::with_name("url") diff --git a/gen/calendar3/Cargo.toml b/gen/calendar3/Cargo.toml index 2392ca3259..e132aefb4a 100644 --- a/gen/calendar3/Cargo.toml +++ b/gen/calendar3/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-calendar3" -version = "1.0.4+20161211" +version = "1.0.4+20170514" authors = ["Sebastian Thiel "] description = "A complete library to interact with calendar (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/calendar3" homepage = "https://developers.google.com/google-apps/calendar/firstapp" -documentation = "https://docs.rs/google-calendar3/1.0.4+20161211" +documentation = "https://docs.rs/google-calendar3/1.0.4+20170514" license = "MIT" keywords = ["calendar", "google", "protocol", "web", "api"] diff --git a/gen/calendar3/README.md b/gen/calendar3/README.md index 418b12c990..b6fa995009 100644 --- a/gen/calendar3/README.md +++ b/gen/calendar3/README.md @@ -5,43 +5,43 @@ DO NOT EDIT ! --> The `google-calendar3` library allows access to all features of the *Google calendar* service. -This documentation was generated from *calendar* crate version *1.0.4+20161211*, where *20161211* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *calendar* crate version *1.0.4+20170514*, where *20170514* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *calendar* *v3* API can be found at the [official documentation site](https://developers.google.com/google-apps/calendar/firstapp). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarHub.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarHub.html) ... -* [acl](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.Acl.html) - * [*delete*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.AclDeleteCall.html), [*get*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.AclGetCall.html), [*insert*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.AclInsertCall.html), [*list*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.AclListCall.html), [*patch*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.AclPatchCall.html), [*update*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.AclUpdateCall.html) and [*watch*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.AclWatchCall.html) -* [calendar list](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarList.html) - * [*delete*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarListDeleteCall.html), [*get*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarListGetCall.html), [*insert*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarListInsertCall.html), [*list*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarListListCall.html), [*patch*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarListPatchCall.html), [*update*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarListUpdateCall.html) and [*watch*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarListWatchCall.html) -* [calendars](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.Calendar.html) - * [*clear*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarClearCall.html), [*delete*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarDeleteCall.html), [*get*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarGetCall.html), [*insert*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarInsertCall.html), [*patch*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarPatchCall.html) and [*update*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarUpdateCall.html) -* [channels](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.Channel.html) - * [*stop*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.ChannelStopCall.html) +* [acl](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.Acl.html) + * [*delete*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.AclDeleteCall.html), [*get*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.AclGetCall.html), [*insert*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.AclInsertCall.html), [*list*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.AclListCall.html), [*patch*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.AclPatchCall.html), [*update*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.AclUpdateCall.html) and [*watch*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.AclWatchCall.html) +* [calendar list](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarList.html) + * [*delete*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarListDeleteCall.html), [*get*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarListGetCall.html), [*insert*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarListInsertCall.html), [*list*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarListListCall.html), [*patch*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarListPatchCall.html), [*update*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarListUpdateCall.html) and [*watch*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarListWatchCall.html) +* [calendars](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.Calendar.html) + * [*clear*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarClearCall.html), [*delete*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarDeleteCall.html), [*get*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarGetCall.html), [*insert*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarInsertCall.html), [*patch*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarPatchCall.html) and [*update*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarUpdateCall.html) +* [channels](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.Channel.html) + * [*stop*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.ChannelStopCall.html) * colors - * [*get*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.ColorGetCall.html) -* [events](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.Event.html) - * [*delete*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventDeleteCall.html), [*get*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventGetCall.html), [*import*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventImportCall.html), [*insert*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventInsertCall.html), [*instances*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventInstanceCall.html), [*list*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventListCall.html), [*move*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventMoveCall.html), [*patch*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventPatchCall.html), [*quick add*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventQuickAddCall.html), [*update*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventUpdateCall.html) and [*watch*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventWatchCall.html) + * [*get*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.ColorGetCall.html) +* [events](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.Event.html) + * [*delete*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventDeleteCall.html), [*get*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventGetCall.html), [*import*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventImportCall.html), [*insert*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventInsertCall.html), [*instances*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventInstanceCall.html), [*list*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventListCall.html), [*move*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventMoveCall.html), [*patch*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventPatchCall.html), [*quick add*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventQuickAddCall.html), [*update*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventUpdateCall.html) and [*watch*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventWatchCall.html) * freebusy - * [*query*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.FreebusyQueryCall.html) -* [settings](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.Setting.html) - * [*get*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.SettingGetCall.html), [*list*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.SettingListCall.html) and [*watch*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.SettingWatchCall.html) + * [*query*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.FreebusyQueryCall.html) +* [settings](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.Setting.html) + * [*get*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.SettingGetCall.html), [*list*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.SettingListCall.html) and [*watch*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.SettingWatchCall.html) Subscription supported by ... -* [*list settings*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.SettingListCall.html) -* [*list events*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventListCall.html) -* [*list calendar list*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarListListCall.html) -* [*watch events*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventWatchCall.html) -* [*instances events*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.EventInstanceCall.html) -* [*watch settings*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.SettingWatchCall.html) -* [*watch acl*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.AclWatchCall.html) -* [*list acl*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.AclListCall.html) -* [*watch calendar list*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarListWatchCall.html) +* [*list settings*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.SettingListCall.html) +* [*list events*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventListCall.html) +* [*list calendar list*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarListListCall.html) +* [*watch events*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventWatchCall.html) +* [*instances events*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.EventInstanceCall.html) +* [*watch settings*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.SettingWatchCall.html) +* [*watch acl*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.AclWatchCall.html) +* [*list acl*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.AclListCall.html) +* [*watch calendar list*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarListWatchCall.html) @@ -49,17 +49,17 @@ Subscription supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/struct.CalendarHub.html)** +* **[Hub](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/struct.CalendarHub.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.Part.html)** + * **[Parts](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -174,17 +174,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.Delegate.html), 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-calendar3/1.0.4+20161211/google_calendar3/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.ResponseResult.html), 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")`. @@ -194,29 +194,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.CallBuilder.html) 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-calendar3/1.0.4+20161211/google_calendar3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.RequestValue.html) and -[decodable](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.RequestValue.html) and +[decodable](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-calendar3/1.0.4+20161211/google_calendar3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.CallBuilder.html), 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-calendar3/1.0.4+20161211/google_calendar3/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-calendar3/1.0.4+20170514/google_calendar3/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/calendar3/src/lib.rs b/gen/calendar3/src/lib.rs index 7cba6de5c8..12dedc99bc 100644 --- a/gen/calendar3/src/lib.rs +++ b/gen/calendar3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *calendar* crate version *1.0.4+20161211*, where *20161211* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *calendar* crate version *1.0.4+20170514*, where *20170514* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *calendar* *v3* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/calendar/firstapp). @@ -468,21 +468,6 @@ impl NestedType for EventGadget {} impl Part for EventGadget {} -/// There is no detailed description. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FreeBusyCalendar { - /// List of time ranges during which this calendar should be regarded as busy. - pub busy: Option>, - /// Optional error(s) (if computation for the calendar failed). - pub errors: Option>, -} - -impl Part for FreeBusyCalendar {} - - /// The scope of the rule. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -504,34 +489,6 @@ impl NestedType for AclRuleScope {} impl Part for AclRuleScope {} -/// There is no detailed description. -/// -/// # 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*). -/// -/// * [list settings](struct.SettingListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Settings { - /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// List of user settings. - pub items: Option>, - /// Type of the collection ("calendar#settings"). - pub kind: Option, - /// Etag of the collection. - pub etag: Option, - /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. - #[serde(rename="nextSyncToken")] - pub next_sync_token: Option, -} - -impl ResponseResult for Settings {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -597,6 +554,28 @@ impl Resource for Calendar {} impl ResponseResult for Calendar {} +/// The organizer of the event. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation. Read-only, except when importing an event. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct EventOrganizer { + /// Whether the organizer corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. + #[serde(rename="self")] + pub self_: Option, + /// The organizer's name, if available. + #[serde(rename="displayName")] + pub display_name: Option, + /// The organizer's email address, if available. It must be a valid email address as per RFC5322. + pub email: Option, + /// The organizer's Profile ID, if available. It corresponds to theid field in the People collection of the Google+ API + pub id: Option, +} + +impl NestedType for EventOrganizer {} +impl Part for EventOrganizer {} + + /// There is no detailed description. /// /// # Activities @@ -893,51 +872,6 @@ pub struct Events { impl ResponseResult for Events {} -/// There is no detailed description. -/// -/// # 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*). -/// -/// * [stop channels](struct.ChannelStopCall.html) (request) -/// * [watch settings](struct.SettingWatchCall.html) (request|response) -/// * [watch acl](struct.AclWatchCall.html) (request|response) -/// * [watch calendar list](struct.CalendarListWatchCall.html) (request|response) -/// * [watch events](struct.EventWatchCall.html) (request|response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Channel { - /// A version-specific identifier for the watched resource. - #[serde(rename="resourceUri")] - pub resource_uri: Option, - /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". - pub kind: Option, - /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. - #[serde(rename="resourceId")] - pub resource_id: Option, - /// A UUID or similar unique string that identifies this channel. - pub id: Option, - /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. - pub token: Option, - /// Additional parameters controlling delivery channel behavior. Optional. - pub params: Option>, - /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. - pub expiration: Option, - /// The address where notifications are delivered for this channel. - pub address: Option, - /// The type of delivery mechanism used for this channel. - #[serde(rename="type")] - pub type_: Option, - /// A Boolean value to indicate whether payload is wanted. Optional. - pub payload: Option, -} - -impl RequestValue for Channel {} -impl Resource for Channel {} -impl ResponseResult for Channel {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -977,6 +911,22 @@ pub struct EventAttendee { impl Part for EventAttendee {} +/// Extended properties of the event. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct EventExtendedProperties { + /// Properties that are shared between copies of the event on other attendees' calendars. + pub shared: Option>, + /// Properties that are private to the copy of the event that appears on this calendar. + pub private: Option>, +} + +impl NestedType for EventExtendedProperties {} +impl Part for EventExtendedProperties {} + + /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1009,6 +959,21 @@ impl NestedType for EventReminders {} impl Part for EventReminders {} +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FreeBusyCalendar { + /// List of time ranges during which this calendar should be regarded as busy. + pub busy: Option>, + /// Optional error(s) (if computation for the calendar failed). + pub errors: Option>, +} + +impl Part for FreeBusyCalendar {} + + /// There is no detailed description. /// /// # Activities @@ -1037,20 +1002,32 @@ pub struct CalendarList { impl ResponseResult for CalendarList {} -/// Extended properties of the event. +/// There is no detailed description. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [list settings](struct.SettingListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct EventExtendedProperties { - /// Properties that are shared between copies of the event on other attendees' calendars. - pub shared: Option>, - /// Properties that are private to the copy of the event that appears on this calendar. - pub private: Option>, +pub struct Settings { + /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// List of user settings. + pub items: Option>, + /// Type of the collection ("calendar#settings"). + pub kind: Option, + /// Etag of the collection. + pub etag: Option, + /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. + #[serde(rename="nextSyncToken")] + pub next_sync_token: Option, } -impl NestedType for EventExtendedProperties {} -impl Part for EventExtendedProperties {} +impl ResponseResult for Settings {} /// There is no detailed description. @@ -1151,6 +1128,69 @@ pub struct FreeBusyRequest { impl RequestValue for FreeBusyRequest {} +/// There is no detailed description. +/// +/// # 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*). +/// +/// * [stop channels](struct.ChannelStopCall.html) (request) +/// * [watch settings](struct.SettingWatchCall.html) (request|response) +/// * [watch acl](struct.AclWatchCall.html) (request|response) +/// * [watch calendar list](struct.CalendarListWatchCall.html) (request|response) +/// * [watch events](struct.EventWatchCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Channel { + /// A version-specific identifier for the watched resource. + #[serde(rename="resourceUri")] + pub resource_uri: Option, + /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". + pub kind: Option, + /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. + #[serde(rename="resourceId")] + pub resource_id: Option, + /// A UUID or similar unique string that identifies this channel. + pub id: Option, + /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. + pub token: Option, + /// Additional parameters controlling delivery channel behavior. Optional. + pub params: Option>, + /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. + pub expiration: Option, + /// The address where notifications are delivered for this channel. + pub address: Option, + /// The type of delivery mechanism used for this channel. + #[serde(rename="type")] + pub type_: Option, + /// A Boolean value to indicate whether payload is wanted. Optional. + pub payload: Option, +} + +impl RequestValue for Channel {} +impl Resource for Channel {} +impl ResponseResult for Channel {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct EventReminder { + /// Number of minutes before the start of the event when the reminder should trigger. Valid values are between 0 and 40320 (4 weeks in minutes). + pub minutes: Option, + /// The method used by this reminder. Possible values are: + /// - "email" - Reminders are sent via email. + /// - "sms" - Reminders are sent via SMS. These are only available for G Suite customers. Requests to set SMS reminders for other account types are ignored. + /// - "popup" - Reminders are sent via a UI popup. + pub method: Option, +} + +impl Part for EventReminder {} + + /// Source from which the event was created. For example, a web page, an email message or any document identifiable by an URL with HTTP or HTTPS scheme. Can only be seen or modified by the creator of the event. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1167,46 +1207,6 @@ impl NestedType for EventSource {} impl Part for EventSource {} -/// The organizer of the event. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation. Read-only, except when importing an event. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct EventOrganizer { - /// Whether the organizer corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. - #[serde(rename="self")] - pub self_: Option, - /// The organizer's name, if available. - #[serde(rename="displayName")] - pub display_name: Option, - /// The organizer's email address, if available. It must be a valid email address as per RFC5322. - pub email: Option, - /// The organizer's Profile ID, if available. It corresponds to theid field in the People collection of the Google+ API - pub id: Option, -} - -impl NestedType for EventOrganizer {} -impl Part for EventOrganizer {} - - -/// There is no detailed description. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct EventReminder { - /// Number of minutes before the start of the event when the reminder should trigger. Valid values are between 0 and 40320 (4 weeks in minutes). - pub minutes: Option, - /// The method used by this reminder. Possible values are: - /// - "email" - Reminders are sent via email. - /// - "sms" - Reminders are sent via SMS. These are only available for Google Apps for Work, Education, and Government customers. Requests to set SMS reminders for other account types are ignored. - /// - "popup" - Reminders are sent via a UI popup. - pub method: Option, -} - -impl Part for EventReminder {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1238,7 +1238,7 @@ pub struct CalendarNotification { pub type_: Option, /// The method used to deliver the notification. Possible values are: /// - "email" - Reminders are sent via email. - /// - "sms" - Reminders are sent via SMS. This value is read-only and is ignored on inserts and updates. SMS reminders are only available for Google Apps for Work, Education, and Government customers. + /// - "sms" - Reminders are sent via SMS. This value is read-only and is ignored on inserts and updates. SMS reminders are only available for G Suite customers. pub method: Option, } diff --git a/gen/classroom1-cli/Cargo.toml b/gen/classroom1-cli/Cargo.toml index d7e1213df5..9b9b3e68d5 100644 --- a/gen/classroom1-cli/Cargo.toml +++ b/gen/classroom1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-classroom1-cli" -version = "1.0.4+20161006" +version = "1.0.4+20170510" authors = ["Sebastian Thiel "] description = "A complete library to interact with classroom (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/classroom1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-classroom1] path = "../classroom1" -version = "1.0.4+20161006" +version = "1.0.4+20170510" diff --git a/gen/classroom1-cli/README.md b/gen/classroom1-cli/README.md index b9cf3463ae..6b05ecd622 100644 --- a/gen/classroom1-cli/README.md +++ b/gen/classroom1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *classroom* API at revision *20161006*. The CLI is at version *1.0.4*. +This documentation was generated from the *classroom* API at revision *20170510*. The CLI is at version *1.0.4*. ```bash classroom1 [options] @@ -34,8 +34,10 @@ classroom1 [options] aliases-delete [-p ]... [-o ] aliases-list [-p ]... [-o ] course-work-create (-r )... [-p ]... [-o ] + course-work-delete [-p ]... [-o ] course-work-get [-p ]... [-o ] course-work-list [-p ]... [-o ] + course-work-patch (-r )... [-p ]... [-o ] course-work-student-submissions-get [-p ]... [-o ] course-work-student-submissions-list [-p ]... [-o ] course-work-student-submissions-modify-attachments (-r )... [-p ]... [-o ] diff --git a/gen/classroom1-cli/mkdocs.yml b/gen/classroom1-cli/mkdocs.yml index f925d640ff..7e1aa2311a 100644 --- a/gen/classroom1-cli/mkdocs.yml +++ b/gen/classroom1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: classroom v1.0.4+20161006 +site_name: classroom v1.0.4+20170510 site_url: http://byron.github.io/google-apis-rs/google-classroom1-cli site_description: A complete library to interact with classroom (protocol v1) @@ -13,8 +13,10 @@ pages: - ['courses_aliases-delete.md', 'Courses', 'Aliases Delete'] - ['courses_aliases-list.md', 'Courses', 'Aliases List'] - ['courses_course-work-create.md', 'Courses', 'Course Work Create'] +- ['courses_course-work-delete.md', 'Courses', 'Course Work Delete'] - ['courses_course-work-get.md', 'Courses', 'Course Work Get'] - ['courses_course-work-list.md', 'Courses', 'Course Work List'] +- ['courses_course-work-patch.md', 'Courses', 'Course Work Patch'] - ['courses_course-work-student-submissions-get.md', 'Courses', 'Course Work Student Submissions Get'] - ['courses_course-work-student-submissions-list.md', 'Courses', 'Course Work Student Submissions List'] - ['courses_course-work-student-submissions-modify-attachments.md', 'Courses', 'Course Work Student Submissions Modify Attachments'] diff --git a/gen/classroom1-cli/src/main.rs b/gen/classroom1-cli/src/main.rs index 30d5de4dc5..1640b3ad33 100644 --- a/gen/classroom1-cli/src/main.rs +++ b/gen/classroom1-cli/src/main.rs @@ -268,25 +268,25 @@ impl<'n> Engine<'n> { "update-time" => Some(("updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "submission-modification-mode" => Some(("submissionModificationMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "course-id" => Some(("courseId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "assignment.student-work-folder.alternate-link" => Some(("assignment.studentWorkFolder.alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "assignment.student-work-folder.id" => Some(("assignment.studentWorkFolder.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "assignment.student-work-folder.title" => Some(("assignment.studentWorkFolder.title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "associated-with-developer" => Some(("associatedWithDeveloper", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "max-points" => Some(("maxPoints", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "multiple-choice-question.choices" => Some(("multipleChoiceQuestion.choices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "due-date.month" => Some(("dueDate.month", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "due-date.day" => Some(("dueDate.day", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "due-date.year" => Some(("dueDate.year", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "max-points" => Some(("maxPoints", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), - "multiple-choice-question.choices" => Some(("multipleChoiceQuestion.choices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "due-time.hours" => Some(("dueTime.hours", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "due-time.nanos" => Some(("dueTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "due-time.seconds" => Some(("dueTime.seconds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "due-time.minutes" => Some(("dueTime.minutes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "due-time.nanos" => Some(("dueTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "work-type" => Some(("workType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-link", "assignment", "associated-with-developer", "choices", "course-id", "creation-time", "day", "description", "due-date", "due-time", "hours", "id", "max-points", "minutes", "month", "multiple-choice-question", "nanos", "seconds", "state", "student-work-folder", "submission-modification-mode", "title", "update-time", "work-type", "year"]); @@ -349,6 +349,58 @@ impl<'n> Engine<'n> { } } + fn _courses_course_work_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.courses().course_work_delete(opt.value_of("course-id").unwrap_or(""), opt.value_of("id").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(), + _ => 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(()) + } + } + } + } + fn _courses_course_work_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.courses().course_work_get(opt.value_of("course-id").unwrap_or(""), opt.value_of("id").unwrap_or("")); @@ -466,6 +518,117 @@ impl<'n> Engine<'n> { } } + fn _courses_course_work_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()[..] { + "update-time" => Some(("updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "submission-modification-mode" => Some(("submissionModificationMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "course-id" => Some(("courseId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "assignment.student-work-folder.alternate-link" => Some(("assignment.studentWorkFolder.alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "assignment.student-work-folder.id" => Some(("assignment.studentWorkFolder.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "assignment.student-work-folder.title" => Some(("assignment.studentWorkFolder.title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "associated-with-developer" => Some(("associatedWithDeveloper", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "max-points" => Some(("maxPoints", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "multiple-choice-question.choices" => Some(("multipleChoiceQuestion.choices", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "due-date.month" => Some(("dueDate.month", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "due-date.day" => Some(("dueDate.day", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "due-date.year" => Some(("dueDate.year", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "due-time.hours" => Some(("dueTime.hours", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "due-time.nanos" => Some(("dueTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "due-time.seconds" => Some(("dueTime.seconds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "due-time.minutes" => Some(("dueTime.minutes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "work-type" => Some(("workType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-link", "assignment", "associated-with-developer", "choices", "course-id", "creation-time", "day", "description", "due-date", "due-time", "hours", "id", "max-points", "minutes", "month", "multiple-choice-question", "nanos", "seconds", "state", "student-work-folder", "submission-modification-mode", "title", "update-time", "work-type", "year"]); + 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::CourseWork = json::value::from_value(object).unwrap(); + let mut call = self.hub.courses().course_work_patch(request, opt.value_of("course-id").unwrap_or(""), opt.value_of("id").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.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(["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(), + _ => 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(()) + } + } + } + } + fn _courses_course_work_student_submissions_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.courses().course_work_student_submissions_get(opt.value_of("course-id").unwrap_or(""), opt.value_of("course-work-id").unwrap_or(""), opt.value_of("id").unwrap_or("")); @@ -1050,22 +1213,22 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "update-time" => Some(("updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "room" => Some(("room", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "enrollment-code" => Some(("enrollmentCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "section" => Some(("section", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "guardians-enabled" => Some(("guardiansEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "course-group-email" => Some(("courseGroupEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-group-email" => Some(("teacherGroupEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner-id" => Some(("ownerId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-folder.alternate-link" => Some(("teacherFolder.alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-folder.id" => Some(("teacherFolder.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-folder.title" => Some(("teacherFolder.title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "course-state" => Some(("courseState", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description-heading" => Some(("descriptionHeading", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "room" => Some(("room", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-link", "course-group-email", "course-state", "creation-time", "description", "description-heading", "enrollment-code", "guardians-enabled", "id", "name", "owner-id", "room", "section", "teacher-folder", "teacher-group-email", "title", "update-time"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -1324,22 +1487,22 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "update-time" => Some(("updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "room" => Some(("room", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "enrollment-code" => Some(("enrollmentCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "section" => Some(("section", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "guardians-enabled" => Some(("guardiansEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "course-group-email" => Some(("courseGroupEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-group-email" => Some(("teacherGroupEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner-id" => Some(("ownerId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-folder.alternate-link" => Some(("teacherFolder.alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-folder.id" => Some(("teacherFolder.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-folder.title" => Some(("teacherFolder.title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "course-state" => Some(("courseState", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description-heading" => Some(("descriptionHeading", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "room" => Some(("room", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-link", "course-group-email", "course-state", "creation-time", "description", "description-heading", "enrollment-code", "guardians-enabled", "id", "name", "owner-id", "room", "section", "teacher-folder", "teacher-group-email", "title", "update-time"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -1947,22 +2110,22 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "update-time" => Some(("updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "room" => Some(("room", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "enrollment-code" => Some(("enrollmentCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "section" => Some(("section", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "guardians-enabled" => Some(("guardiansEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "course-group-email" => Some(("courseGroupEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-group-email" => Some(("teacherGroupEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner-id" => Some(("ownerId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-folder.alternate-link" => Some(("teacherFolder.alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-folder.id" => Some(("teacherFolder.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "teacher-folder.title" => Some(("teacherFolder.title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "course-state" => Some(("courseState", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description-heading" => Some(("descriptionHeading", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "room" => Some(("room", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-link", "course-group-email", "course-state", "creation-time", "description", "description-heading", "enrollment-code", "guardians-enabled", "id", "name", "owner-id", "room", "section", "teacher-folder", "teacher-group-email", "title", "update-time"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -2100,8 +2263,8 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "course-id" => Some(("courseId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "role" => Some(("role", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-id" => Some(("userId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "role" => Some(("role", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["course-id", "id", "role", "user-id"]); @@ -2408,11 +2571,11 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "invitation-id" => Some(("invitationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "student-id" => Some(("studentId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "invited-email-address" => Some(("invitedEmailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "invitation-id" => Some(("invitationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["creation-time", "invitation-id", "invited-email-address", "state", "student-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -2605,11 +2768,11 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "invitation-id" => Some(("invitationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "student-id" => Some(("studentId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "invited-email-address" => Some(("invitedEmailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "invitation-id" => Some(("invitationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["creation-time", "invitation-id", "invited-email-address", "state", "student-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -2848,12 +3011,18 @@ impl<'n> Engine<'n> { ("course-work-create", Some(opt)) => { call_result = self._courses_course_work_create(opt, dry_run, &mut err); }, + ("course-work-delete", Some(opt)) => { + call_result = self._courses_course_work_delete(opt, dry_run, &mut err); + }, ("course-work-get", Some(opt)) => { call_result = self._courses_course_work_get(opt, dry_run, &mut err); }, ("course-work-list", Some(opt)) => { call_result = self._courses_course_work_list(opt, dry_run, &mut err); }, + ("course-work-patch", Some(opt)) => { + call_result = self._courses_course_work_patch(opt, dry_run, &mut err); + }, ("course-work-student-submissions-get", Some(opt)) => { call_result = self._courses_course_work_student_submissions_get(opt, dry_run, &mut err); }, @@ -3064,14 +3233,26 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ - ("courses", "methods: 'aliases-create', 'aliases-delete', 'aliases-list', 'course-work-create', 'course-work-get', 'course-work-list', 'course-work-student-submissions-get', 'course-work-student-submissions-list', 'course-work-student-submissions-modify-attachments', 'course-work-student-submissions-patch', 'course-work-student-submissions-reclaim', 'course-work-student-submissions-return', 'course-work-student-submissions-turn-in', 'create', 'delete', 'get', 'list', 'patch', 'students-create', 'students-delete', 'students-get', 'students-list', 'teachers-create', 'teachers-delete', 'teachers-get', 'teachers-list' and 'update'", vec![ + ("courses", "methods: 'aliases-create', 'aliases-delete', 'aliases-list', 'course-work-create', 'course-work-delete', 'course-work-get', 'course-work-list', 'course-work-patch', 'course-work-student-submissions-get', 'course-work-student-submissions-list', 'course-work-student-submissions-modify-attachments', 'course-work-student-submissions-patch', 'course-work-student-submissions-reclaim', 'course-work-student-submissions-return', 'course-work-student-submissions-turn-in', 'create', 'delete', 'get', 'list', 'patch', 'students-create', 'students-delete', 'students-get', 'students-list', 'teachers-create', 'teachers-delete', 'teachers-get', 'teachers-list' and 'update'", vec![ ("aliases-create", - Some(r##"Creates an alias for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors. * `NOT_FOUND` if the course does not exist. * `ALREADY_EXISTS` if the alias already exists."##), + Some(r##"Creates an alias for a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to create the + alias or for access errors. + * `NOT_FOUND` if the course does not exist. + * `ALREADY_EXISTS` if the alias already exists. + * `FAILED_PRECONDITION` if the alias requested does not make sense for the + requesting user or course (for example, if a user not in a domain + attempts to access a domain-scoped alias)."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_aliases-create", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course to alias. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3094,18 +3275,30 @@ fn main() { Some(false)), ]), ("aliases-delete", - Some(r##"Deletes an alias of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to remove the alias or for access errors. * `NOT_FOUND` if the alias does not exist."##), + Some(r##"Deletes an alias of a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to remove the + alias or for access errors. + * `NOT_FOUND` if the alias does not exist. + * `FAILED_PRECONDITION` if the alias requested does not make sense for the + requesting user or course (for example, if a user not in a domain + attempts to delete a domain-scoped alias)."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_aliases-delete", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course whose alias should be deleted. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course whose alias should be deleted. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), (Some(r##"alias"##), None, - Some(r##"Alias to delete. This may not be the Classroom-assigned identifier."##), + Some(r##"Alias to delete. + This may not be the Classroom-assigned identifier."##), Some(true), Some(false)), @@ -3122,12 +3315,20 @@ fn main() { Some(false)), ]), ("aliases-list", - Some(r##"Returns a list of aliases for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the course or for access errors. * `NOT_FOUND` if the course does not exist."##), + Some(r##"Returns a list of aliases for a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + course or for access errors. + * `NOT_FOUND` if the course does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_aliases-list", vec![ (Some(r##"course-id"##), None, - Some(r##"The identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"The identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3144,12 +3345,31 @@ fn main() { Some(false)), ]), ("course-work-create", - Some(r##"Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist."##), + Some(r##"Creates course work. + + The resulting course work (and corresponding student submissions) are + associated with the Developer Console project of the + [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + make the request. Classroom API requests to modify course work and student + submissions must be made with an OAuth client ID from the associated + Developer Console project. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + requested course, create course work in the requested course, share a + Drive attachment, or for access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course does not exist. + * `FAILED_PRECONDITION` for the following request error: + * AttachmentNotVisible"##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-create", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3165,6 +3385,50 @@ fn main() { 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)), + ]), + ("course-work-delete", + Some(r##"Deletes a course work. + + This request must be made by the Developer Console project of the + [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + create the corresponding course work item. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting developer project did not create + the corresponding course work, if the requesting user is not permitted + to delete the requested course or for access errors. + * `FAILED_PRECONDITION` if the requested course work has already been + deleted. + * `NOT_FOUND` if no course exists with the requested ID."##), + "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-delete", + vec![ + (Some(r##"course-id"##), + None, + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), + Some(true), + Some(false)), + + (Some(r##"id"##), + None, + Some(r##"Identifier of the course work to delete. + This identifier is a Classroom-assigned identifier."##), + 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"##), @@ -3172,12 +3436,21 @@ fn main() { Some(false)), ]), ("course-work-get", - Some(r##"Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist."##), + Some(r##"Returns course work. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + requested course or course work, or for access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course or course work does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-get", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3200,12 +3473,24 @@ fn main() { Some(false)), ]), ("course-work-list", - Some(r##"Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist."##), + Some(r##"Returns a list of course work that the requester is permitted to view. + + Course students may only view `PUBLISHED` course work. Course teachers + and domain administrators may view all course work. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access + the requested course or for access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-list", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3215,6 +3500,61 @@ fn main() { 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)), + ]), + ("course-work-patch", + Some(r##"Updates one or more fields of a course work. + + See google.classroom.v1.CourseWork for details + of which fields may be updated and who may change them. + + This request must be made by the Developer Console project of the + [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + create the corresponding course work item. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting developer project did not create + the corresponding course work, if the user is not permitted to make the + requested modification to the student submission, or for + access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `FAILED_PRECONDITION` if the requested course work has already been + deleted. + * `NOT_FOUND` if the requested course, course work, or student submission + does not exist."##), + "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-patch", + vec![ + (Some(r##"course-id"##), + None, + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), + Some(true), + Some(false)), + + (Some(r##"id"##), + None, + Some(r##"Identifier of the course work."##), + 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"##), @@ -3222,12 +3562,21 @@ fn main() { Some(false)), ]), ("course-work-student-submissions-get", - Some(r##"Returns a student submission. * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist."##), + Some(r##"Returns a student submission. + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + requested course, course work, or student submission or for + access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course, course work, or student submission + does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-student-submissions-get", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3256,18 +3605,35 @@ fn main() { Some(false)), ]), ("course-work-student-submissions-list", - Some(r##"Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist."##), + Some(r##"Returns a list of student submissions that the requester is permitted to + view, factoring in the OAuth scopes of the request. + `-` may be specified as the `course_work_id` to include student + submissions for multiple course work items. + + Course students may only view their own work. Course teachers + and domain administrators may view all student submissions. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + requested course or course work, or for access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-student-submissions-list", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), (Some(r##"course-work-id"##), None, - Some(r##"Identifer of the student work to request. This may be set to the string literal `"-"` to request student work for all course work in the specified course."##), + Some(r##"Identifer of the student work to request. + This may be set to the string literal `"-"` to request student work for + all course work in the specified course."##), Some(true), Some(false)), @@ -3284,12 +3650,31 @@ fn main() { Some(false)), ]), ("course-work-student-submissions-modify-attachments", - Some(r##"Modifies attachments of student submission. Attachments may only be added to student submissions whose type is `ASSIGNMENT`. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist."##), + Some(r##"Modifies attachments of student submission. + + Attachments may only be added to student submissions belonging to course + work objects with a `workType` of `ASSIGNMENT`. + + This request must be made by the Developer Console project of the + [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + create the corresponding course work item. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + requested course or course work, if the user is not permitted to modify + attachments on the requested student submission, or for + access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course, course work, or student submission + does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-student-submissions-modify-attachments", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3324,12 +3709,31 @@ fn main() { Some(false)), ]), ("course-work-student-submissions-patch", - Some(r##"Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist."##), + Some(r##"Updates one or more fields of a student submission. + + See google.classroom.v1.StudentSubmission for details + of which fields may be updated and who may change them. + + This request must be made by the Developer Console project of the + [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + create the corresponding course work item. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting developer project did not create + the corresponding course work, if the user is not permitted to make the + requested modification to the student submission, or for + access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course, course work, or student submission + does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-student-submissions-patch", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3364,12 +3768,34 @@ fn main() { Some(false)), ]), ("course-work-student-submissions-reclaim", - Some(r##"Reclaims a student submission on behalf of the student that owns it. Reclaiming a student submission transfers ownership of attached Drive files to the student and update the submission state. Only the student that ownes the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. * `FAILED_PRECONDITION` if the student submission has not been turned in. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist."##), + Some(r##"Reclaims a student submission on behalf of the student that owns it. + + Reclaiming a student submission transfers ownership of attached Drive + files to the student and update the submission state. + + Only the student that owns the requested student submission may call this + method, and only for a student submission that has been turned in. + + This request must be made by the Developer Console project of the + [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + create the corresponding course work item. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + requested course or course work, unsubmit the requested student submission, + or for access errors. + * `FAILED_PRECONDITION` if the student submission has not been turned in. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course, course work, or student submission + does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-student-submissions-reclaim", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3404,12 +3830,35 @@ fn main() { Some(false)), ]), ("course-work-student-submissions-return", - Some(r##"Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist."##), + Some(r##"Returns a student submission. + + Returning a student submission transfers ownership of attached Drive + files to the student and may also update the submission state. + Unlike the Classroom application, returning a student submission does not + set assignedGrade to the draftGrade value. + + Only a teacher of the course that contains the requested student submission + may call this method. + + This request must be made by the Developer Console project of the + [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + create the corresponding course work item. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + requested course or course work, return the requested student submission, + or for access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course, course work, or student submission + does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-student-submissions-return", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3444,12 +3893,33 @@ fn main() { Some(false)), ]), ("course-work-student-submissions-turn-in", - Some(r##"Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist."##), + Some(r##"Turns in a student submission. + + Turning in a student submission transfers ownership of attached Drive + files to the teacher and may also update the submission state. + + This may only be called by the student that owns the specified student + submission. + + This request must be made by the Developer Console project of the + [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + create the corresponding course work item. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + requested course or course work, turn in the requested student submission, + or for access errors. + * `INVALID_ARGUMENT` if the request is malformed. + * `NOT_FOUND` if the requested course, course work, or student submission + does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_course-work-student-submissions-turn-in", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3484,7 +3954,21 @@ fn main() { Some(false)), ]), ("create", - Some(r##"Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists."##), + Some(r##"Creates a course. + + The user specified in `ownerId` is the owner of the created course + and added as a teacher. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to create + courses or for access errors. + * `NOT_FOUND` if the primary teacher is not a valid user. + * `FAILED_PRECONDITION` if the course owner's account is disabled or for + the following request errors: + * UserGroupsMembershipLimitReached + * `ALREADY_EXISTS` if an alias was specified in the `id` and + already exists."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_create", vec![ (Some(r##"kv"##), @@ -3506,12 +3990,20 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID."##), + Some(r##"Deletes a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + requested course or for access errors. + * `NOT_FOUND` if no course exists with the requested ID."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_delete", vec![ (Some(r##"id"##), None, - Some(r##"Identifier of the course to delete. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course to delete. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3528,12 +4020,20 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Returns a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID."##), + Some(r##"Returns a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access the + requested course or for access errors. + * `NOT_FOUND` if no course exists with the requested ID."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_get", vec![ (Some(r##"id"##), None, - Some(r##"Identifier of the course to return. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course to return. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3550,7 +4050,14 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist."##), + Some(r##"Returns a list of courses that the requesting user is permitted to view, + restricted to those that match the request. + + This method returns the following error codes: + + * `PERMISSION_DENIED` for access errors. + * `INVALID_ARGUMENT` if the query argument is malformed. + * `NOT_FOUND` if any users specified in the query arguments do not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_list", vec![ (Some(r##"v"##), @@ -3566,12 +4073,24 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable"##), + Some(r##"Updates one or more fields in a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + requested course or for access errors. + * `NOT_FOUND` if no course exists with the requested ID. + * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or + if no update mask is supplied. + * `FAILED_PRECONDITION` for the following request errors: + * CourseNotModifiable"##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_patch", vec![ (Some(r##"id"##), None, - Some(r##"Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course to update. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3594,12 +4113,27 @@ fn main() { Some(false)), ]), ("students-create", - Some(r##"Adds a user as a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course."##), + Some(r##"Adds a user as a student of a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to create + students in this course or for access errors. + * `NOT_FOUND` if the requested course ID does not exist. + * `FAILED_PRECONDITION` if the requested user's account is disabled, + for the following request errors: + * CourseMemberLimitReached + * CourseNotModifiable + * UserGroupsMembershipLimitReached + * `ALREADY_EXISTS` if the user is already a student or teacher in the + course."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_students-create", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course to create the student in. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course to create the student in. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3622,18 +4156,32 @@ fn main() { Some(false)), ]), ("students-delete", - Some(r##"Deletes a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist."##), + Some(r##"Deletes a student of a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to delete + students of this course or for access errors. + * `NOT_FOUND` if no student of this course has the requested ID or if the + course does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_students-delete", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), (Some(r##"user-id"##), None, - Some(r##"Identifier of the student to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user"##), + Some(r##"Identifier of the student to delete. The identifier can be one of the + following: + + * the numeric identifier for the user + * the email address of the user + * the string literal `"me"`, indicating the requesting user"##), Some(true), Some(false)), @@ -3650,18 +4198,32 @@ fn main() { Some(false)), ]), ("students-get", - Some(r##"Returns a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist."##), + Some(r##"Returns a student of a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to view + students of this course or for access errors. + * `NOT_FOUND` if no student of this course has the requested ID or if the + course does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_students-get", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), (Some(r##"user-id"##), None, - Some(r##"Identifier of the student to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user"##), + Some(r##"Identifier of the student to return. The identifier can be one of the + following: + + * the numeric identifier for the user + * the email address of the user + * the string literal `"me"`, indicating the requesting user"##), Some(true), Some(false)), @@ -3678,12 +4240,20 @@ fn main() { Some(false)), ]), ("students-list", - Some(r##"Returns a list of students of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. * `PERMISSION_DENIED` for access errors."##), + Some(r##"Returns a list of students of this course that the requester + is permitted to view. + + This method returns the following error codes: + + * `NOT_FOUND` if the course does not exist. + * `PERMISSION_DENIED` for access errors."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_students-list", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3700,12 +4270,28 @@ fn main() { Some(false)), ]), ("teachers-create", - Some(r##"Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course."##), + Some(r##"Creates a teacher of a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to create + teachers in this course or for access errors. + * `NOT_FOUND` if the requested course ID does not exist. + * `FAILED_PRECONDITION` if the requested user's account is disabled, + for the following request errors: + * CourseMemberLimitReached + * CourseNotModifiable + * CourseTeacherLimitReached + * UserGroupsMembershipLimitReached + * `ALREADY_EXISTS` if the user is already a teacher or student in the + course."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_teachers-create", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3728,18 +4314,34 @@ fn main() { Some(false)), ]), ("teachers-delete", - Some(r##"Deletes a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course."##), + Some(r##"Deletes a teacher of a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to delete + teachers of this course or for access errors. + * `NOT_FOUND` if no teacher of this course has the requested ID or if the + course does not exist. + * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher + of this course."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_teachers-delete", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), (Some(r##"user-id"##), None, - Some(r##"Identifier of the teacher to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user"##), + Some(r##"Identifier of the teacher to delete. The identifier can be one of the + following: + + * the numeric identifier for the user + * the email address of the user + * the string literal `"me"`, indicating the requesting user"##), Some(true), Some(false)), @@ -3756,18 +4358,32 @@ fn main() { Some(false)), ]), ("teachers-get", - Some(r##"Returns a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist."##), + Some(r##"Returns a teacher of a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to view + teachers of this course or for access errors. + * `NOT_FOUND` if no teacher of this course has the requested ID or if the + course does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_teachers-get", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), (Some(r##"user-id"##), None, - Some(r##"Identifier of the teacher to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user"##), + Some(r##"Identifier of the teacher to return. The identifier can be one of the + following: + + * the numeric identifier for the user + * the email address of the user + * the string literal `"me"`, indicating the requesting user"##), Some(true), Some(false)), @@ -3784,12 +4400,20 @@ fn main() { Some(false)), ]), ("teachers-list", - Some(r##"Returns a list of teachers of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. * `PERMISSION_DENIED` for access errors."##), + Some(r##"Returns a list of teachers of this course that the requester + is permitted to view. + + This method returns the following error codes: + + * `NOT_FOUND` if the course does not exist. + * `PERMISSION_DENIED` for access errors."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_teachers-list", vec![ (Some(r##"course-id"##), None, - Some(r##"Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3806,12 +4430,22 @@ fn main() { Some(false)), ]), ("update", - Some(r##"Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable"##), + Some(r##"Updates a course. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + requested course or for access errors. + * `NOT_FOUND` if no course exists with the requested ID. + * `FAILED_PRECONDITION` for the following request errors: + * CourseNotModifiable"##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/courses_update", vec![ (Some(r##"id"##), None, - Some(r##"Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias."##), + Some(r##"Identifier of the course to update. + This identifier can be either the Classroom-assigned identifier or an + alias."##), Some(true), Some(false)), @@ -3837,7 +4471,20 @@ fn main() { ("invitations", "methods: 'accept', 'create', 'delete', 'get' and 'list'", vec![ ("accept", - Some(r##"Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to accept the requested invitation or for access errors. * `FAILED_PRECONDITION` for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `NOT_FOUND` if no invitation exists with the requested ID."##), + Some(r##"Accepts an invitation, removing it and adding the invited user to the + teachers or students (as appropriate) of the specified course. Only the + invited user may accept an invitation. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to accept the + requested invitation or for access errors. + * `FAILED_PRECONDITION` for the following request errors: + * CourseMemberLimitReached + * CourseNotModifiable + * CourseTeacherLimitReached + * UserGroupsMembershipLimitReached + * `NOT_FOUND` if no invitation exists with the requested ID."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/invitations_accept", vec![ (Some(r##"id"##), @@ -3859,7 +4506,18 @@ fn main() { Some(false)), ]), ("create", - Some(r##"Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create invitations for this course or for access errors. * `NOT_FOUND` if the course or the user does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled or if the user already has this role or a role with greater permissions. * `ALREADY_EXISTS` if an invitation for the specified user and course already exists."##), + Some(r##"Creates an invitation. Only one invitation for a user and course may exist + at a time. Delete and re-create an invitation to make changes. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to create + invitations for this course or for access errors. + * `NOT_FOUND` if the course or the user does not exist. + * `FAILED_PRECONDITION` if the requested user's account is disabled or if + the user already has this role or a role with greater permissions. + * `ALREADY_EXISTS` if an invitation for the specified user and course + already exists."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/invitations_create", vec![ (Some(r##"kv"##), @@ -3881,7 +4539,13 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested invitation or for access errors. * `NOT_FOUND` if no invitation exists with the requested ID."##), + Some(r##"Deletes an invitation. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + requested invitation or for access errors. + * `NOT_FOUND` if no invitation exists with the requested ID."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/invitations_delete", vec![ (Some(r##"id"##), @@ -3903,7 +4567,13 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Returns an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view the requested invitation or for access errors. * `NOT_FOUND` if no invitation exists with the requested ID."##), + Some(r##"Returns an invitation. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to view the + requested invitation or for access errors. + * `NOT_FOUND` if no invitation exists with the requested ID."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/invitations_get", vec![ (Some(r##"id"##), @@ -3925,7 +4595,15 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request. *Note:* At least one of `user_id` or `course_id` must be supplied. Both fields can be supplied. This method returns the following error codes: * `PERMISSION_DENIED` for access errors."##), + Some(r##"Returns a list of invitations that the requesting user is permitted to + view, restricted to those that match the list request. + + *Note:* At least one of `user_id` or `course_id` must be supplied. Both + fields can be supplied. + + This method returns the following error codes: + + * `PERMISSION_DENIED` for access errors."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/invitations_list", vec![ (Some(r##"v"##), @@ -3944,12 +4622,23 @@ fn main() { ("user-profiles", "methods: 'get', 'guardian-invitations-create', 'guardian-invitations-get', 'guardian-invitations-list', 'guardian-invitations-patch', 'guardians-delete', 'guardians-get' and 'guardians-list'", vec![ ("get", - Some(r##"Returns a user profile. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access this user profile or if no profile exists with the requested ID or for access errors."##), + Some(r##"Returns a user profile. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to access + this user profile, if no profile exists with the requested ID, or for + access errors."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/user-profiles_get", vec![ (Some(r##"user-id"##), None, - Some(r##"Identifier of the profile to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user"##), + Some(r##"Identifier of the profile to return. The identifier can be one of the + following: + + * the numeric identifier for the user + * the email address of the user + * the string literal `"me"`, indicating the requesting user"##), Some(true), Some(false)), @@ -3966,7 +4655,36 @@ fn main() { Some(false)), ]), ("guardian-invitations-create", - Some(r##"Creates a guardian invitation, and sends an email to the guardian asking them to confirm that they are the student's guardian. Once the guardian accepts the invitation, their `state` will change to `COMPLETED` and they will start receiving guardian notifications. A `Guardian` resource will also be created to represent the active guardian. The request object must have the `student_id` and `invited_email_address` fields set. Failing to set these fields, or setting any other fields in the request, will result in an error. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if the guardian in question has already rejected too many requests for that student, if guardians are not enabled for the domain in question, or for other access errors. * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link limit. * `INVALID_ARGUMENT` if the guardian email address is not valid (for example, if it is too long), or if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API). This error will also be returned if read-only fields are set, or if the `state` field is set to to a value other than `PENDING`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student. * `ALREADY_EXISTS` if there is already a pending guardian invitation for the student and `invited_email_address` provided, or if the provided `invited_email_address` matches the Google account of an existing `Guardian` for this user."##), + Some(r##"Creates a guardian invitation, and sends an email to the guardian asking + them to confirm that they are the student's guardian. + + Once the guardian accepts the invitation, their `state` will change to + `COMPLETED` and they will start receiving guardian notifications. A + `Guardian` resource will also be created to represent the active guardian. + + The request object must have the `student_id` and + `invited_email_address` fields set. Failing to set these fields, or + setting any other fields in the request, will result in an error. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the current user does not have permission to + manage guardians, if the guardian in question has already rejected + too many requests for that student, if guardians are not enabled for the + domain in question, or for other access errors. + * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian + link limit. + * `INVALID_ARGUMENT` if the guardian email address is not valid (for + example, if it is too long), or if the format of the student ID provided + cannot be recognized (it is not an email address, nor a `user_id` from + this API). This error will also be returned if read-only fields are set, + or if the `state` field is set to to a value other than `PENDING`. + * `NOT_FOUND` if the student ID provided is a valid student ID, but + Classroom has no record of that student. + * `ALREADY_EXISTS` if there is already a pending guardian invitation for + the student and `invited_email_address` provided, or if the provided + `invited_email_address` matches the Google account of an existing + `Guardian` for this user."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/user-profiles_guardian-invitations-create", vec![ (Some(r##"student-id"##), @@ -3994,7 +4712,20 @@ fn main() { Some(false)), ]), ("guardian-invitations-get", - Some(r##"Returns a specific guardian invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian invitations for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of the given student or `invitation_id`. May also be returned if the student exists, but the requesting user does not have access to see that student."##), + Some(r##"Returns a specific guardian invitation. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the requesting user is not permitted to view + guardian invitations for the student identified by the `student_id`, if + guardians are not enabled for the domain in question, or for other + access errors. + * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + be recognized (it is not an email address, nor a `student_id` from the + API, nor the literal string `me`). + * `NOT_FOUND` if Classroom cannot find any record of the given student or + `invitation_id`. May also be returned if the student exists, but the + requesting user does not have access to see that student."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/user-profiles_guardian-invitations-get", vec![ (Some(r##"student-id"##), @@ -4022,12 +4753,35 @@ fn main() { Some(false)), ]), ("guardian-invitations-list", - Some(r##"Returns a list of guardian invitations that the requesting user is permitted to view, filtered by the parameters provided. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian invitations for that student, if `"-"` is specified as the `student_id` and the user is not a domain administrator, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` or `state` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student."##), + Some(r##"Returns a list of guardian invitations that the requesting user is + permitted to view, filtered by the parameters provided. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + user is not permitted to view guardian invitations for that student, if + `"-"` is specified as the `student_id` and the user is not a domain + administrator, if guardians are not enabled for the domain in question, + or for other access errors. + * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + be recognized (it is not an email address, nor a `student_id` from the + API, nor the literal string `me`). May also be returned if an invalid + `page_token` or `state` is provided. + * `NOT_FOUND` if a `student_id` is specified, and its format can be + recognized, but Classroom has no record of that student."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/user-profiles_guardian-invitations-list", vec![ (Some(r##"student-id"##), None, - Some(r##"The ID of the student whose guardian invitations are to be returned. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user * the string literal `"-"`, indicating that results should be returned for all students that the requesting user is permitted to view guardian invitations."##), + Some(r##"The ID of the student whose guardian invitations are to be returned. + The identifier can be one of the following: + + * the numeric identifier for the user + * the email address of the user + * the string literal `"me"`, indicating the requesting user + * the string literal `"-"`, indicating that results should be returned for + all students that the requesting user is permitted to view guardian + invitations."##), Some(true), Some(false)), @@ -4044,7 +4798,24 @@ fn main() { Some(false)), ]), ("guardian-invitations-patch", - Some(r##"Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other access errors. * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom."##), + Some(r##"Modifies a guardian invitation. + + Currently, the only valid modification is to change the `state` from + `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if the current user does not have permission to + manage guardians, if guardians are not enabled for the domain in question + or for other access errors. + * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. + * `INVALID_ARGUMENT` if the format of the student ID provided + cannot be recognized (it is not an email address, nor a `user_id` from + this API), or if the passed `GuardianInvitation` has a `state` other than + `COMPLETE`, or if it modifies fields other than `state`. + * `NOT_FOUND` if the student ID provided is a valid student ID, but + Classroom has no record of that student, or if the `id` field does not + refer to a guardian invitation known to Classroom."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/user-profiles_guardian-invitations-patch", vec![ (Some(r##"student-id"##), @@ -4078,12 +4849,33 @@ fn main() { Some(false)), ]), ("guardians-delete", - Some(r##"Deletes a guardian. The guardian will no longer receive guardian notifications and the guardian will no longer be accessible via the API. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to manage guardians for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API). * `NOT_FOUND` if Classroom cannot find any record of the given `student_id` or `guardian_id`, or if the guardian has already been disabled."##), + Some(r##"Deletes a guardian. + + The guardian will no longer receive guardian notifications and the guardian + will no longer be accessible via the API. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if no user that matches the provided `student_id` + is visible to the requesting user, if the requesting user is not + permitted to manage guardians for the student identified by the + `student_id`, if guardians are not enabled for the domain in question, + or for other access errors. + * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + be recognized (it is not an email address, nor a `student_id` from the + API). + * `NOT_FOUND` if the requesting user is permitted to modify guardians for + the requested `student_id`, but no `Guardian` record exists for that + student with the provided `guardian_id`."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/user-profiles_guardians-delete", vec![ (Some(r##"student-id"##), None, - Some(r##"The student whose guardian is to be deleted. One of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user"##), + Some(r##"The student whose guardian is to be deleted. One of the following: + + * the numeric identifier for the user + * the email address of the user + * the string literal `"me"`, indicating the requesting user"##), Some(true), Some(false)), @@ -4106,12 +4898,30 @@ fn main() { Some(false)), ]), ("guardians-get", - Some(r##"Returns a specific guardian. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian information for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of the given student or `guardian_id`, or if the guardian has been disabled."##), + Some(r##"Returns a specific guardian. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if no user that matches the provided `student_id` + is visible to the requesting user, if the requesting user is not + permitted to view guardian information for the student identified by the + `student_id`, if guardians are not enabled for the domain in question, + or for other access errors. + * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + be recognized (it is not an email address, nor a `student_id` from the + API, nor the literal string `me`). + * `NOT_FOUND` if the requesting user is permitted to view guardians for + the requested `student_id`, but no `Guardian` record exists for that + student that matches the provided `guardian_id`."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/user-profiles_guardians-get", vec![ (Some(r##"student-id"##), None, - Some(r##"The student whose guardian is being requested. One of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user"##), + Some(r##"The student whose guardian is being requested. One of the following: + + * the numeric identifier for the user + * the email address of the user + * the string literal `"me"`, indicating the requesting user"##), Some(true), Some(false)), @@ -4134,12 +4944,38 @@ fn main() { Some(false)), ]), ("guardians-list", - Some(r##"Returns a list of guardians that the requesting user is permitted to view, restricted to those that match the request. To list guardians for any student that the requesting user may view guardians for, use the literal character `-` for the student ID. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian information for that student, if `"-"` is specified as the `student_id` and the user is not a domain administrator, if guardians are not enabled for the domain in question, if the `invited_email_address` filter is set by a user who is not a domain administrator, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student."##), + Some(r##"Returns a list of guardians that the requesting user is permitted to + view, restricted to those that match the request. + + To list guardians for any student that the requesting user may view + guardians for, use the literal character `-` for the student ID. + + This method returns the following error codes: + + * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + user is not permitted to view guardian information for that student, if + `"-"` is specified as the `student_id` and the user is not a domain + administrator, if guardians are not enabled for the domain in question, + if the `invited_email_address` filter is set by a user who is not a + domain administrator, or for other access errors. + * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + be recognized (it is not an email address, nor a `student_id` from the + API, nor the literal string `me`). May also be returned if an invalid + `page_token` is provided. + * `NOT_FOUND` if a `student_id` is specified, and its format can be + recognized, but Classroom has no record of that student."##), "Details at http://byron.github.io/google-apis-rs/google_classroom1_cli/user-profiles_guardians-list", vec![ (Some(r##"student-id"##), None, - Some(r##"Filter results by the student who the guardian is linked to. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user * the string literal `"-"`, indicating that results should be returned for all students that the requesting user has access to view."##), + Some(r##"Filter results by the student who the guardian is linked to. + The identifier can be one of the following: + + * the numeric identifier for the user + * the email address of the user + * the string literal `"me"`, indicating the requesting user + * the string literal `"-"`, indicating that results should be returned for + all students that the requesting user has access to view."##), Some(true), Some(false)), @@ -4161,7 +4997,7 @@ fn main() { let mut app = App::new("classroom1") .author("Sebastian Thiel ") - .version("1.0.4+20161006") + .version("1.0.4+20170510") .about("Manages classes, rosters, and invitations in Google Classroom.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_classroom1_cli") .arg(Arg::with_name("url") diff --git a/gen/classroom1/Cargo.toml b/gen/classroom1/Cargo.toml index 6ba710f5de..e9c9ba59d7 100644 --- a/gen/classroom1/Cargo.toml +++ b/gen/classroom1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-classroom1" -version = "1.0.4+20161006" +version = "1.0.4+20170510" authors = ["Sebastian Thiel "] description = "A complete library to interact with classroom (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/classroom1" homepage = "https://developers.google.com/classroom/" -documentation = "https://docs.rs/google-classroom1/1.0.4+20161006" +documentation = "https://docs.rs/google-classroom1/1.0.4+20170510" license = "MIT" keywords = ["classroom", "google", "protocol", "web", "api"] diff --git a/gen/classroom1/README.md b/gen/classroom1/README.md index 7f77423a39..78db608607 100644 --- a/gen/classroom1/README.md +++ b/gen/classroom1/README.md @@ -5,20 +5,20 @@ DO NOT EDIT ! --> The `google-classroom1` library allows access to all features of the *Google classroom* service. -This documentation was generated from *classroom* crate version *1.0.4+20161006*, where *20161006* is the exact revision of the *classroom:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *classroom* crate version *1.0.4+20170510*, where *20170510* is the exact revision of the *classroom:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *classroom* *v1* API can be found at the [official documentation site](https://developers.google.com/classroom/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.Classroom.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.Classroom.html) ... -* [courses](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.Course.html) - * [*aliases create*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseAliaseCreateCall.html), [*aliases delete*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseAliaseDeleteCall.html), [*aliases list*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseAliaseListCall.html), [*course work create*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkCreateCall.html), [*course work get*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkGetCall.html), [*course work list*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkListCall.html), [*course work student submissions get*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkStudentSubmissionGetCall.html), [*course work student submissions list*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkStudentSubmissionListCall.html), [*course work student submissions modify attachments*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkStudentSubmissionModifyAttachmentCall.html), [*course work student submissions patch*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkStudentSubmissionPatchCall.html), [*course work student submissions reclaim*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkStudentSubmissionReclaimCall.html), [*course work student submissions return*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkStudentSubmissionReturnCall.html), [*course work student submissions turn in*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCourseWorkStudentSubmissionTurnInCall.html), [*create*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseCreateCall.html), [*delete*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseDeleteCall.html), [*get*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseGetCall.html), [*list*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseListCall.html), [*patch*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CoursePatchCall.html), [*students create*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseStudentCreateCall.html), [*students delete*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseStudentDeleteCall.html), [*students get*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseStudentGetCall.html), [*students list*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseStudentListCall.html), [*teachers create*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseTeacherCreateCall.html), [*teachers delete*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseTeacherDeleteCall.html), [*teachers get*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseTeacherGetCall.html), [*teachers list*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseTeacherListCall.html) and [*update*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.CourseUpdateCall.html) -* [invitations](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.Invitation.html) - * [*accept*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.InvitationAcceptCall.html), [*create*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.InvitationCreateCall.html), [*delete*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.InvitationDeleteCall.html), [*get*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.InvitationGetCall.html) and [*list*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.InvitationListCall.html) -* [user profiles](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.UserProfile.html) - * [*get*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.UserProfileGetCall.html), [*guardian invitations create*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.UserProfileGuardianInvitationCreateCall.html), [*guardian invitations get*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.UserProfileGuardianInvitationGetCall.html), [*guardian invitations list*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.UserProfileGuardianInvitationListCall.html), [*guardian invitations patch*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.UserProfileGuardianInvitationPatchCall.html), [*guardians delete*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.UserProfileGuardianDeleteCall.html), [*guardians get*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.UserProfileGuardianGetCall.html) and [*guardians list*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.UserProfileGuardianListCall.html) +* [courses](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.Course.html) + * [*aliases create*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseAliaseCreateCall.html), [*aliases delete*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseAliaseDeleteCall.html), [*aliases list*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseAliaseListCall.html), [*course work create*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkCreateCall.html), [*course work delete*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkDeleteCall.html), [*course work get*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkGetCall.html), [*course work list*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkListCall.html), [*course work patch*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkPatchCall.html), [*course work student submissions get*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkStudentSubmissionGetCall.html), [*course work student submissions list*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkStudentSubmissionListCall.html), [*course work student submissions modify attachments*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkStudentSubmissionModifyAttachmentCall.html), [*course work student submissions patch*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkStudentSubmissionPatchCall.html), [*course work student submissions reclaim*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkStudentSubmissionReclaimCall.html), [*course work student submissions return*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkStudentSubmissionReturnCall.html), [*course work student submissions turn in*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCourseWorkStudentSubmissionTurnInCall.html), [*create*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseCreateCall.html), [*delete*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseDeleteCall.html), [*get*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseGetCall.html), [*list*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseListCall.html), [*patch*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CoursePatchCall.html), [*students create*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseStudentCreateCall.html), [*students delete*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseStudentDeleteCall.html), [*students get*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseStudentGetCall.html), [*students list*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseStudentListCall.html), [*teachers create*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseTeacherCreateCall.html), [*teachers delete*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseTeacherDeleteCall.html), [*teachers get*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseTeacherGetCall.html), [*teachers list*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseTeacherListCall.html) and [*update*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.CourseUpdateCall.html) +* [invitations](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.Invitation.html) + * [*accept*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.InvitationAcceptCall.html), [*create*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.InvitationCreateCall.html), [*delete*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.InvitationDeleteCall.html), [*get*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.InvitationGetCall.html) and [*list*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.InvitationListCall.html) +* [user profiles](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.UserProfile.html) + * [*get*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.UserProfileGetCall.html), [*guardian invitations create*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.UserProfileGuardianInvitationCreateCall.html), [*guardian invitations get*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.UserProfileGuardianInvitationGetCall.html), [*guardian invitations list*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.UserProfileGuardianInvitationListCall.html), [*guardian invitations patch*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.UserProfileGuardianInvitationPatchCall.html), [*guardians delete*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.UserProfileGuardianDeleteCall.html), [*guardians get*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.UserProfileGuardianGetCall.html) and [*guardians list*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.UserProfileGuardianListCall.html) @@ -27,17 +27,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/struct.Classroom.html)** +* **[Hub](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/struct.Classroom.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.Part.html)** + * **[Parts](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -55,29 +55,31 @@ let r = hub.courses().course_work_student_submissions_patch(...).doit() let r = hub.courses().course_work_student_submissions_list(...).doit() let r = hub.courses().get(...).doit() let r = hub.courses().update(...).doit() -let r = hub.courses().students_delete(...).doit() +let r = hub.courses().students_get(...).doit() let r = hub.courses().teachers_get(...).doit() let r = hub.courses().course_work_list(...).doit() -let r = hub.courses().teachers_list(...).doit() +let r = hub.courses().course_work_get(...).doit() let r = hub.courses().course_work_student_submissions_turn_in(...).doit() let r = hub.courses().course_work_student_submissions_modify_attachments(...).doit() +let r = hub.courses().teachers_list(...).doit() let r = hub.courses().course_work_student_submissions_return(...).doit() -let r = hub.courses().course_work_get(...).doit() +let r = hub.courses().aliases_list(...).doit() let r = hub.courses().course_work_create(...).doit() let r = hub.courses().list(...).doit() let r = hub.courses().course_work_student_submissions_reclaim(...).doit() let r = hub.courses().aliases_create(...).doit() let r = hub.courses().students_create(...).doit() let r = hub.courses().aliases_delete(...).doit() +let r = hub.courses().course_work_delete(...).doit() let r = hub.courses().create(...).doit() let r = hub.courses().students_list(...).doit() let r = hub.courses().delete(...).doit() +let r = hub.courses().course_work_patch(...).doit() let r = hub.courses().patch(...).doit() -let r = hub.courses().aliases_list(...).doit() +let r = hub.courses().students_delete(...).doit() let r = hub.courses().teachers_delete(...).doit() let r = hub.courses().teachers_create(...).doit() let r = hub.courses().course_work_student_submissions_get(...).doit() -let r = hub.courses().students_get(...).doit() ``` The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -150,17 +152,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.Delegate.html), 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-classroom1/1.0.4+20161006/google_classroom1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.ResponseResult.html), 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")`. @@ -170,29 +172,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.CallBuilder.html) 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-classroom1/1.0.4+20161006/google_classroom1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-classroom1/1.0.4+20161006/google_classroom1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.CallBuilder.html), 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-classroom1/1.0.4+20161006/google_classroom1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-classroom1/1.0.4+20170510/google_classroom1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/classroom1/src/lib.rs b/gen/classroom1/src/lib.rs index d57137f5cf..ed2cd94b81 100644 --- a/gen/classroom1/src/lib.rs +++ b/gen/classroom1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *classroom* crate version *1.0.4+20161006*, where *20161006* is the exact revision of the *classroom:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *classroom* crate version *1.0.4+20170510*, where *20170510* is the exact revision of the *classroom:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *classroom* *v1* API can be found at the //! [official documentation site](https://developers.google.com/classroom/). @@ -12,7 +12,7 @@ //! Handle the following *Resources* with ease from the central [hub](struct.Classroom.html) ... //! //! * [courses](struct.Course.html) -//! * [*aliases create*](struct.CourseAliaseCreateCall.html), [*aliases delete*](struct.CourseAliaseDeleteCall.html), [*aliases list*](struct.CourseAliaseListCall.html), [*course work create*](struct.CourseCourseWorkCreateCall.html), [*course work get*](struct.CourseCourseWorkGetCall.html), [*course work list*](struct.CourseCourseWorkListCall.html), [*course work student submissions get*](struct.CourseCourseWorkStudentSubmissionGetCall.html), [*course work student submissions list*](struct.CourseCourseWorkStudentSubmissionListCall.html), [*course work student submissions modify attachments*](struct.CourseCourseWorkStudentSubmissionModifyAttachmentCall.html), [*course work student submissions patch*](struct.CourseCourseWorkStudentSubmissionPatchCall.html), [*course work student submissions reclaim*](struct.CourseCourseWorkStudentSubmissionReclaimCall.html), [*course work student submissions return*](struct.CourseCourseWorkStudentSubmissionReturnCall.html), [*course work student submissions turn in*](struct.CourseCourseWorkStudentSubmissionTurnInCall.html), [*create*](struct.CourseCreateCall.html), [*delete*](struct.CourseDeleteCall.html), [*get*](struct.CourseGetCall.html), [*list*](struct.CourseListCall.html), [*patch*](struct.CoursePatchCall.html), [*students create*](struct.CourseStudentCreateCall.html), [*students delete*](struct.CourseStudentDeleteCall.html), [*students get*](struct.CourseStudentGetCall.html), [*students list*](struct.CourseStudentListCall.html), [*teachers create*](struct.CourseTeacherCreateCall.html), [*teachers delete*](struct.CourseTeacherDeleteCall.html), [*teachers get*](struct.CourseTeacherGetCall.html), [*teachers list*](struct.CourseTeacherListCall.html) and [*update*](struct.CourseUpdateCall.html) +//! * [*aliases create*](struct.CourseAliaseCreateCall.html), [*aliases delete*](struct.CourseAliaseDeleteCall.html), [*aliases list*](struct.CourseAliaseListCall.html), [*course work create*](struct.CourseCourseWorkCreateCall.html), [*course work delete*](struct.CourseCourseWorkDeleteCall.html), [*course work get*](struct.CourseCourseWorkGetCall.html), [*course work list*](struct.CourseCourseWorkListCall.html), [*course work patch*](struct.CourseCourseWorkPatchCall.html), [*course work student submissions get*](struct.CourseCourseWorkStudentSubmissionGetCall.html), [*course work student submissions list*](struct.CourseCourseWorkStudentSubmissionListCall.html), [*course work student submissions modify attachments*](struct.CourseCourseWorkStudentSubmissionModifyAttachmentCall.html), [*course work student submissions patch*](struct.CourseCourseWorkStudentSubmissionPatchCall.html), [*course work student submissions reclaim*](struct.CourseCourseWorkStudentSubmissionReclaimCall.html), [*course work student submissions return*](struct.CourseCourseWorkStudentSubmissionReturnCall.html), [*course work student submissions turn in*](struct.CourseCourseWorkStudentSubmissionTurnInCall.html), [*create*](struct.CourseCreateCall.html), [*delete*](struct.CourseDeleteCall.html), [*get*](struct.CourseGetCall.html), [*list*](struct.CourseListCall.html), [*patch*](struct.CoursePatchCall.html), [*students create*](struct.CourseStudentCreateCall.html), [*students delete*](struct.CourseStudentDeleteCall.html), [*students get*](struct.CourseStudentGetCall.html), [*students list*](struct.CourseStudentListCall.html), [*teachers create*](struct.CourseTeacherCreateCall.html), [*teachers delete*](struct.CourseTeacherDeleteCall.html), [*teachers get*](struct.CourseTeacherGetCall.html), [*teachers list*](struct.CourseTeacherListCall.html) and [*update*](struct.CourseUpdateCall.html) //! * [invitations](struct.Invitation.html) //! * [*accept*](struct.InvitationAcceptCall.html), [*create*](struct.InvitationCreateCall.html), [*delete*](struct.InvitationDeleteCall.html), [*get*](struct.InvitationGetCall.html) and [*list*](struct.InvitationListCall.html) //! * [user profiles](struct.UserProfile.html) @@ -55,29 +55,31 @@ //! let r = hub.courses().course_work_student_submissions_list(...).doit() //! let r = hub.courses().get(...).doit() //! let r = hub.courses().update(...).doit() -//! let r = hub.courses().students_delete(...).doit() +//! let r = hub.courses().students_get(...).doit() //! let r = hub.courses().teachers_get(...).doit() //! let r = hub.courses().course_work_list(...).doit() -//! let r = hub.courses().teachers_list(...).doit() +//! let r = hub.courses().course_work_get(...).doit() //! let r = hub.courses().course_work_student_submissions_turn_in(...).doit() //! let r = hub.courses().course_work_student_submissions_modify_attachments(...).doit() +//! let r = hub.courses().teachers_list(...).doit() //! let r = hub.courses().course_work_student_submissions_return(...).doit() -//! let r = hub.courses().course_work_get(...).doit() +//! let r = hub.courses().aliases_list(...).doit() //! let r = hub.courses().course_work_create(...).doit() //! let r = hub.courses().list(...).doit() //! let r = hub.courses().course_work_student_submissions_reclaim(...).doit() //! let r = hub.courses().aliases_create(...).doit() //! let r = hub.courses().students_create(...).doit() //! let r = hub.courses().aliases_delete(...).doit() +//! let r = hub.courses().course_work_delete(...).doit() //! let r = hub.courses().create(...).doit() //! let r = hub.courses().students_list(...).doit() //! let r = hub.courses().delete(...).doit() +//! let r = hub.courses().course_work_patch(...).doit() //! let r = hub.courses().patch(...).doit() -//! let r = hub.courses().aliases_list(...).doit() +//! let r = hub.courses().students_delete(...).doit() //! let r = hub.courses().teachers_delete(...).doit() //! let r = hub.courses().teachers_create(...).doit() //! let r = hub.courses().course_work_student_submissions_get(...).doit() -//! let r = hub.courses().students_get(...).doit() //! ``` //! //! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -250,30 +252,24 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { - /// View the email addresses of people in your classes - ProfileEmail, + /// View your course work and grades in Google Classroom + StudentSubmissionMeReadonly, /// View your Google Classroom class rosters RosterReadonly, - /// Manage your Google Classroom classes - Course, + /// View your course work and grades in Google Classroom + CourseworkMeReadonly, /// View course work and grades for students in the Google Classroom classes you teach or administer CourseworkStudentReadonly, - /// View instructions for teacher-assigned work in your Google Classroom classes - CourseWorkReadonly, - - /// View your course work and grades in Google Classroom - StudentSubmissionMeReadonly, + /// View the email addresses of people in your classes + ProfileEmail, /// View the profile photos of people in your classes ProfilePhoto, - /// View your course work and grades in Google Classroom - CourseworkMeReadonly, - /// Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer CourseworkStudent, @@ -288,31 +284,33 @@ pub enum Scope { /// Manage your course work and view your grades in Google Classroom CourseworkMe, + + /// Manage your Google Classroom classes + Course, } impl AsRef for Scope { fn as_ref(&self) -> &str { match *self { - Scope::ProfileEmail => "https://www.googleapis.com/auth/classroom.profile.emails", - Scope::RosterReadonly => "https://www.googleapis.com/auth/classroom.rosters.readonly", - Scope::Course => "https://www.googleapis.com/auth/classroom.courses", - Scope::CourseworkStudentReadonly => "https://www.googleapis.com/auth/classroom.coursework.students.readonly", - Scope::CourseWorkReadonly => "https://www.googleapis.com/auth/classroom.course-work.readonly", Scope::StudentSubmissionMeReadonly => "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly", - Scope::ProfilePhoto => "https://www.googleapis.com/auth/classroom.profile.photos", + Scope::RosterReadonly => "https://www.googleapis.com/auth/classroom.rosters.readonly", Scope::CourseworkMeReadonly => "https://www.googleapis.com/auth/classroom.coursework.me.readonly", + Scope::CourseworkStudentReadonly => "https://www.googleapis.com/auth/classroom.coursework.students.readonly", + Scope::ProfileEmail => "https://www.googleapis.com/auth/classroom.profile.emails", + Scope::ProfilePhoto => "https://www.googleapis.com/auth/classroom.profile.photos", Scope::CourseworkStudent => "https://www.googleapis.com/auth/classroom.coursework.students", Scope::StudentSubmissionStudentReadonly => "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly", Scope::CourseReadonly => "https://www.googleapis.com/auth/classroom.courses.readonly", Scope::Roster => "https://www.googleapis.com/auth/classroom.rosters", Scope::CourseworkMe => "https://www.googleapis.com/auth/classroom.coursework.me", + Scope::Course => "https://www.googleapis.com/auth/classroom.courses", } } } impl Default for Scope { fn default() -> Scope { - Scope::RosterReadonly + Scope::StudentSubmissionMeReadonly } } @@ -434,10 +432,12 @@ impl<'a, C, A> Classroom /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListGuardiansResponse { - /// Token identifying the next page of results to return. If empty, no further results are available. + /// Token identifying the next page of results to return. If empty, no further + /// results are available. #[serde(rename="nextPageToken")] pub next_page_token: Option, - /// Guardians on this page of results that met the criteria specified in the request. + /// Guardians on this page of results that met the criteria specified in + /// the request. pub guardians: Option>, } @@ -468,7 +468,10 @@ impl Part for MultipleChoiceSubmission {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ModifyAttachmentsRequest { - /// Attachments to add. A student submission may not have more than 20 attachments. This may only contain link attachments. + /// Attachments to add. + /// A student submission may not have more than 20 attachments. + /// + /// Form attachments are not supported. #[serde(rename="addAttachments")] pub add_attachments: Option>, } @@ -489,7 +492,9 @@ pub struct ShortAnswerSubmission { impl Part for ShortAnswerSubmission {} -/// Attachment added to student assignment work. When creating attachments, only the Link field may be specified. +/// Attachment added to student assignment work. +/// +/// When creating attachments, setting the `form` field is not supported. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -510,17 +515,27 @@ pub struct Attachment { impl Part for Attachment {} -/// Student work for an assignment. +/// Represents a time of day. The date and time zone are either not significant +/// or are specified elsewhere. An API may choose to allow leap seconds. Related +/// types are google.type.Date and `google.protobuf.Timestamp`. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AssignmentSubmission { - /// Attachments added by the student. Drive files that correspond to materials with a share mode of SUBMISSION_COPY may not exist yet if the student has not accessed the assignment in Classroom. Some attachment metadata is only populated if the requesting user has permission to access it. Identifier and alternate_link fields are available, but others (e.g. title) may not be. - pub attachments: Option>, +pub struct TimeOfDay { + /// Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + /// to allow the value "24:00:00" for scenarios like business closing time. + pub hours: Option, + /// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + pub nanos: Option, + /// Seconds of minutes of the time. Must normally be from 0 to 59. An API may + /// allow the value 60 if it allows leap-seconds. + pub seconds: Option, + /// Minutes of hour of day. Must be from 0 to 59. + pub minutes: Option, } -impl Part for AssignmentSubmission {} +impl Part for TimeOfDay {} /// Request to return a student submission. @@ -538,7 +553,15 @@ pub struct ReturnStudentSubmissionRequest { _never_set: Option } impl RequestValue for ReturnStudentSubmissionRequest {} -/// 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); } The JSON representation for `Empty` is empty JSON object `{}`. +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. /// /// # Activities /// @@ -546,12 +569,13 @@ impl RequestValue for ReturnStudentSubmissionRequest {} /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [delete invitations](struct.InvitationDeleteCall.html) (response) -/// * [course work student submissions turn in courses](struct.CourseCourseWorkStudentSubmissionTurnInCall.html) (response) +/// * [course work delete courses](struct.CourseCourseWorkDeleteCall.html) (response) /// * [course work student submissions reclaim courses](struct.CourseCourseWorkStudentSubmissionReclaimCall.html) (response) /// * [teachers delete courses](struct.CourseTeacherDeleteCall.html) (response) /// * [guardians delete user profiles](struct.UserProfileGuardianDeleteCall.html) (response) /// * [students delete courses](struct.CourseStudentDeleteCall.html) (response) /// * [aliases delete courses](struct.CourseAliaseDeleteCall.html) (response) +/// * [course work student submissions turn in courses](struct.CourseCourseWorkStudentSubmissionTurnInCall.html) (response) /// * [course work student submissions return courses](struct.CourseCourseWorkStudentSubmissionReturnCall.html) (response) /// * [delete courses](struct.CourseDeleteCall.html) (response) /// * [accept invitations](struct.InvitationAcceptCall.html) (response) @@ -580,17 +604,27 @@ impl ResponseResult for Empty {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserProfile { - /// URL of user's profile photo. Read-only. + /// URL of user's profile photo. + /// + /// Read-only. #[serde(rename="photoUrl")] pub photo_url: Option, - /// Email address of the user. Read-only. + /// Email address of the user. + /// + /// Read-only. #[serde(rename="emailAddress")] pub email_address: Option, - /// Identifier of the user. Read-only. + /// Identifier of the user. + /// + /// Read-only. pub id: Option, - /// Name of the user. Read-only. + /// Name of the user. + /// + /// Read-only. pub name: Option, - /// Global permissions of the user. Read-only. + /// Global permissions of the user. + /// + /// Read-only. pub permissions: Option>, } @@ -598,7 +632,9 @@ impl Resource for UserProfile {} impl ResponseResult for UserProfile {} -/// A set of materials that appears on the "About" page of the course. These materials might include a syllabus, schedule, or other background information relating to the course as a whole. +/// A set of materials that appears on the "About" page of the course. +/// These materials might include a syllabus, schedule, or other background +/// information relating to the course as a whole. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -613,23 +649,24 @@ pub struct CourseMaterialSet { impl Part for CourseMaterialSet {} -/// Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may chose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. +/// Student work for an assignment. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct TimeOfDay { - /// Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. - pub hours: Option, - /// Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. - pub seconds: Option, - /// Minutes of hour of day. Must be from 0 to 59. - pub minutes: Option, - /// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - pub nanos: Option, +pub struct AssignmentSubmission { + /// Attachments added by the student. + /// Drive files that correspond to materials with a share mode of + /// STUDENT_COPY may not exist yet if the student has not accessed the + /// assignment in Classroom. + /// + /// Some attachment metadata is only populated if the requesting user has + /// permission to access it. Identifier and alternate_link fields are always + /// available, but others (e.g. title) may not be. + pub attachments: Option>, } -impl Part for TimeOfDay {} +impl Part for AssignmentSubmission {} /// Google Forms item. @@ -641,20 +678,29 @@ pub struct Form { /// URL of the form. #[serde(rename="formUrl")] pub form_url: Option, - /// URL of a thumbnail image of the Form. Read-only. + /// URL of a thumbnail image of the Form. + /// + /// Read-only. #[serde(rename="thumbnailUrl")] pub thumbnail_url: Option, - /// URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only. + /// URL of the form responses document. + /// Only set if respsonses have been recorded and only when the + /// requesting user is an editor of the form. + /// + /// Read-only. #[serde(rename="responseUrl")] pub response_url: Option, - /// Title of the Form. Read-only. + /// Title of the Form. + /// + /// Read-only. pub title: Option, } impl Part for Form {} -/// Association between a student and a guardian of that student. The guardian may receive information about the student's course work. +/// Association between a student and a guardian of that student. The guardian +/// may receive information about the student's course work. /// /// # Activities /// @@ -668,7 +714,8 @@ pub struct Guardian { /// Identifier for the guardian. #[serde(rename="guardianId")] pub guardian_id: Option, - /// The email address to which the initial guardian invitation was sent. This field is only visible to domain administrators. + /// The email address to which the initial guardian invitation was sent. + /// This field is only visible to domain administrators. #[serde(rename="invitedEmailAddress")] pub invited_email_address: Option, /// Identifier for the student to whom the guardian relationship applies. @@ -697,20 +744,23 @@ pub struct TurnInStudentSubmissionRequest { _never_set: Option } impl RequestValue for TurnInStudentSubmissionRequest {} -/// Material attached to course work. When creating attachments, only the Link field may be specified. +/// Material attached to course work. +/// +/// When creating attachments, setting the `form` field is not supported. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Material { - /// YouTube video material. - #[serde(rename="youtubeVideo")] - pub youtube_video: Option, + /// Link material. On creation, will be upgraded to a more appropriate type + /// if possible, and this will be reflected in the response. + pub link: Option, /// Google Drive file material. #[serde(rename="driveFile")] pub drive_file: Option, - /// Link material. - pub link: Option, + /// YouTube video material. + #[serde(rename="youtubeVideo")] + pub youtube_video: Option, /// Google Forms material. pub form: Option
, } @@ -724,16 +774,22 @@ impl Part for Material {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct YouTubeVideo { - /// Title of the YouTube video. Read-only. - pub title: Option, - /// URL of a thumbnail image of the YouTube video. Read-only. + /// URL that can be used to view the YouTube video. + /// + /// Read-only. + #[serde(rename="alternateLink")] + pub alternate_link: Option, + /// URL of a thumbnail image of the YouTube video. + /// + /// Read-only. #[serde(rename="thumbnailUrl")] pub thumbnail_url: Option, /// YouTube API resource ID. pub id: Option, - /// URL that can be used to view the YouTube video. Read-only. - #[serde(rename="alternateLink")] - pub alternate_link: Option, + /// Title of the YouTube video. + /// + /// Read-only. + pub title: Option, } impl Part for YouTubeVideo {} @@ -750,7 +806,8 @@ impl Part for YouTubeVideo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListTeachersResponse { - /// Token identifying the next page of results to return. If empty, no further results are available. + /// Token identifying the next page of results to return. If empty, no further + /// results are available. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// Teachers who match the list request. @@ -766,14 +823,20 @@ impl ResponseResult for ListTeachersResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DriveFile { - /// Title of the Drive item. Read-only. + /// Title of the Drive item. + /// + /// Read-only. pub title: Option, - /// URL of a thumbnail image of the Drive item. Read-only. + /// URL of a thumbnail image of the Drive item. + /// + /// Read-only. #[serde(rename="thumbnailUrl")] pub thumbnail_url: Option, /// Drive API resource ID. pub id: Option, - /// URL that can be used to access the Drive item. Read-only. + /// URL that can be used to access the Drive item. + /// + /// Read-only. #[serde(rename="alternateLink")] pub alternate_link: Option, } @@ -787,12 +850,17 @@ impl Part for DriveFile {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Link { - /// URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. + /// URL to link to. + /// This must be a valid UTF-8 string containing between 1 and 2024 characters. pub url: Option, - /// URL of a thumbnail image of the target URL. Read-only. + /// URL of a thumbnail image of the target URL. + /// + /// Read-only. #[serde(rename="thumbnailUrl")] pub thumbnail_url: Option, - /// Title of the target of the URL. Read-only. + /// Title of the target of the URL. + /// + /// Read-only. pub title: Option, } @@ -811,15 +879,29 @@ impl Part for Link {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Student { - /// Identifier of the course. Read-only. + /// Identifier of the course. + /// + /// Read-only. #[serde(rename="courseId")] pub course_id: Option, - /// Global user information for the student. Read-only. + /// Global user information for the student. + /// + /// Read-only. pub profile: Option, - /// Information about a Drive Folder for this student's work in this course. Only visible to the student and domain administrators. Read-only. + /// Information about a Drive Folder for this student's work in this course. + /// Only visible to the student and domain administrators. + /// + /// Read-only. #[serde(rename="studentWorkFolder")] pub student_work_folder: Option, - /// Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// Identifier of the user. + /// + /// When specified as a parameter of a request, this identifier can be one of + /// the following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user #[serde(rename="userId")] pub user_id: Option, } @@ -828,15 +910,23 @@ impl RequestValue for Student {} impl ResponseResult for Student {} -/// Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. +/// Represents a whole calendar date, e.g. date of birth. The time of day and +/// time zone are either specified elsewhere or are not significant. The date +/// is relative to the Proleptic Gregorian Calendar. The day may be 0 to +/// represent a year and month where the day is not significant, e.g. credit card +/// expiration date. The year may be 0 to represent a month and day independent +/// of year, e.g. anniversary date. Related types are google.type.TimeOfDay +/// and `google.protobuf.Timestamp`. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Date { - /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year. + /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without + /// a year. pub year: Option, - /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant. + /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + /// if specifying a year/month where the day is not significant. pub day: Option, /// Month of year. Must be from 1 to 12. pub month: Option, @@ -862,17 +952,27 @@ pub struct SharedDriveFile { impl Part for SharedDriveFile {} -/// Additional details for multiple-choice questions. +/// Response when listing student submissions. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [course work student submissions list courses](struct.CourseCourseWorkStudentSubmissionListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct MultipleChoiceQuestion { - /// Possible choices. - pub choices: Option>, +pub struct ListStudentSubmissionsResponse { + /// Token identifying the next page of results to return. If empty, no further + /// results are available. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// Student work that matches the request. + #[serde(rename="studentSubmissions")] + pub student_submissions: Option>, } -impl Part for MultipleChoiceQuestion {} +impl ResponseResult for ListStudentSubmissionsResponse {} /// Response when listing courses. @@ -886,7 +986,8 @@ impl Part for MultipleChoiceQuestion {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListCoursesResponse { - /// Token identifying the next page of results to return. If empty, no further results are available. + /// Token identifying the next page of results to return. If empty, no further + /// results are available. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// Courses that match the list request. @@ -908,12 +1009,23 @@ impl ResponseResult for ListCoursesResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Teacher { - /// Identifier of the course. Read-only. + /// Identifier of the course. + /// + /// Read-only. #[serde(rename="courseId")] pub course_id: Option, - /// Global user information for the teacher. Read-only. + /// Global user information for the teacher. + /// + /// Read-only. pub profile: Option, - /// Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// Identifier of the user. + /// + /// When specified as a parameter of a request, this identifier can be one of + /// the following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user #[serde(rename="userId")] pub user_id: Option, } @@ -949,13 +1061,20 @@ impl Part for CourseMaterial {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Name { - /// The user's full name formed by concatenating the first and last name values. Read-only. + /// The user's full name formed by concatenating the first and last name + /// values. + /// + /// Read-only. #[serde(rename="fullName")] pub full_name: Option, - /// The user's first name. Read-only. + /// The user's first name. + /// + /// Read-only. #[serde(rename="givenName")] pub given_name: Option, - /// The user's last name. Read-only. + /// The user's last name. + /// + /// Read-only. #[serde(rename="familyName")] pub family_name: Option, } @@ -974,7 +1093,8 @@ impl Part for Name {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListInvitationsResponse { - /// Token identifying the next page of results to return. If empty, no further results are available. + /// Token identifying the next page of results to return. If empty, no further + /// results are available. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// Invitations that match the list request. @@ -990,11 +1110,15 @@ impl ResponseResult for ListInvitationsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DriveFolder { - /// Title of the Drive folder. Read-only. + /// Title of the Drive folder. + /// + /// Read-only. pub title: Option, /// Drive API resource ID. pub id: Option, - /// URL that can be used to access the Drive folder. Read-only. + /// URL that can be used to access the Drive folder. + /// + /// Read-only. #[serde(rename="alternateLink")] pub alternate_link: Option, } @@ -1020,12 +1144,22 @@ pub struct Invitation { /// Identifier of the course to invite the user to. #[serde(rename="courseId")] pub course_id: Option, - /// Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// Role to invite the user to have. + /// Must not be `COURSE_ROLE_UNSPECIFIED`. + pub role: Option, + /// Identifier of the invited user. + /// + /// When specified as a parameter of a request, this identifier can be set to + /// one of the following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user #[serde(rename="userId")] pub user_id: Option, - /// Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`. - pub role: Option, - /// Identifier assigned by Classroom. Read-only. + /// Identifier assigned by Classroom. + /// + /// Read-only. pub id: Option, } @@ -1047,7 +1181,8 @@ impl ResponseResult for Invitation {} pub struct ListStudentsResponse { /// Students who match the list request. pub students: Option>, - /// Token identifying the next page of results to return. If empty, no further results are available. + /// Token identifying the next page of results to return. If empty, no further + /// results are available. #[serde(rename="nextPageToken")] pub next_page_token: Option, } @@ -1055,26 +1190,17 @@ pub struct ListStudentsResponse { impl ResponseResult for ListStudentsResponse {} -/// Response when listing student submissions. +/// Additional details for multiple-choice questions. /// -/// # 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*). -/// -/// * [course work student submissions list courses](struct.CourseCourseWorkStudentSubmissionListCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListStudentSubmissionsResponse { - /// Token identifying the next page of results to return. If empty, no further results are available. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// Student work that matches the request. - #[serde(rename="studentSubmissions")] - pub student_submissions: Option>, +pub struct MultipleChoiceQuestion { + /// Possible choices. + pub choices: Option>, } -impl ResponseResult for ListStudentSubmissionsResponse {} +impl Part for MultipleChoiceQuestion {} /// Response when listing course aliases. @@ -1088,7 +1214,8 @@ impl ResponseResult for ListStudentSubmissionsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListCourseAliasesResponse { - /// Token identifying the next page of results to return. If empty, no further results are available. + /// Token identifying the next page of results to return. If empty, no further + /// results are available. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The course aliases. @@ -1122,52 +1249,93 @@ impl RequestValue for ReclaimStudentSubmissionRequest {} /// /// * [course work create courses](struct.CourseCourseWorkCreateCall.html) (request|response) /// * [course work get courses](struct.CourseCourseWorkGetCall.html) (response) +/// * [course work patch courses](struct.CourseCourseWorkPatchCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CourseWork { - /// Timestamp of the most recent change to this course work. Read-only. + /// Timestamp of the most recent change to this course work. + /// + /// Read-only. #[serde(rename="updateTime")] pub update_time: Option, - /// Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters. + /// Optional description of this course work. + /// If set, the description must be a valid UTF-8 string containing no more + /// than 30,000 characters. pub description: Option, - /// Identifier of the course. Read-only. + /// Identifier of the course. + /// + /// Read-only. #[serde(rename="courseId")] pub course_id: Option, - /// Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. + /// Assignment details. + /// This is populated only when `work_type` is `ASSIGNMENT`. + /// + /// Read-only. pub assignment: Option, - /// Whether this course work item is associated with the Developer Console project making the request. See google.classroom.Work.CreateCourseWork for more details. Read-only. + /// Whether this course work item is associated with the Developer Console + /// project making the request. + /// + /// See google.classroom.Work.CreateCourseWork for more + /// details. + /// + /// Read-only. #[serde(rename="associatedWithDeveloper")] pub associated_with_developer: Option, - /// Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value. + /// Maximum grade for this course work. + /// If zero or unspecified, this assignment is considered ungraded. + /// This must be a non-negative integer value. #[serde(rename="maxPoints")] pub max_points: Option, - /// Classroom-assigned identifier of this course work, unique per course. Read-only. - pub id: Option, - /// Type of this course work. The type is set when the course work is created and cannot be changed. When creating course work, this must be `ASSIGNMENT`. - #[serde(rename="workType")] - pub work_type: Option, - /// Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. - #[serde(rename="submissionModificationMode")] - pub submission_modification_mode: Option, - /// Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters. - pub title: Option, - /// Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. - #[serde(rename="alternateLink")] - pub alternate_link: Option, - /// Timestamp when this course work was created. Read-only. - #[serde(rename="creationTime")] - pub creation_time: Option, - /// Optional date, in UTC, that submissions for this this course work are due. This must be specified if `due_time` is specified. + /// Optional date, in UTC, that submissions for this this course work are due. + /// This must be specified if `due_time` is specified. #[serde(rename="dueDate")] pub due_date: Option, - /// Status of this course work. If unspecified, the default state is `DRAFT`. + /// Type of this course work. + /// + /// The type is set when the course work is created and cannot be changed. + #[serde(rename="workType")] + pub work_type: Option, + /// Setting to determine when students are allowed to modify submissions. + /// If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. + #[serde(rename="submissionModificationMode")] + pub submission_modification_mode: Option, + /// Absolute link to this course work in the Classroom web UI. + /// This is only populated if `state` is `PUBLISHED`. + /// + /// Read-only. + #[serde(rename="alternateLink")] + pub alternate_link: Option, + /// Title of this course work. + /// The title must be a valid UTF-8 string containing between 1 and 3000 + /// characters. + pub title: Option, + /// Timestamp when this course work was created. + /// + /// Read-only. + #[serde(rename="creationTime")] + pub creation_time: Option, + /// Classroom-assigned identifier of this course work, unique per course. + /// + /// Read-only. + pub id: Option, + /// Status of this course work. + /// If unspecified, the default state is `DRAFT`. pub state: Option, - /// Additional materials. CourseWork must have no more than 20 material items. + /// Additional materials. + /// + /// CourseWork must have no more than 20 material items. pub materials: Option>, - /// Optional time of day, in UTC, that submissions for this this course work are due. This must be specified if `due_date` is specified. + /// Optional time of day, in UTC, that submissions for this this course work + /// are due. + /// This must be specified if `due_date` is specified. #[serde(rename="dueTime")] pub due_time: Option, - /// Multiple choice question details. This is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. + /// Multiple choice question details. + /// For read operations, this field is populated only when `work_type` is + /// `MULTIPLE_CHOICE_QUESTION`. + /// For write operations, this field must be specified when creating course + /// work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be + /// set otherwise. #[serde(rename="multipleChoiceQuestion")] pub multiple_choice_question: Option, } @@ -1176,7 +1344,12 @@ impl RequestValue for CourseWork {} impl ResponseResult for CourseWork {} -/// Student submission for course work. StudentSubmission items are generated when a CourseWork item is created. StudentSubmissions that have never been accessed (i.e. with `state` = NEW) may not have a creation time or update time. +/// Student submission for course work. +/// +/// StudentSubmission items are generated when a CourseWork item is created. +/// +/// StudentSubmissions that have never been accessed (i.e. with `state` = NEW) +/// may not have a creation time or update time. /// /// # Activities /// @@ -1189,46 +1362,81 @@ impl ResponseResult for CourseWork {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct StudentSubmission { - /// Last update time of this submission. This may be unset if the student has not accessed this item. Read-only. + /// Last update time of this submission. + /// This may be unset if the student has not accessed this item. + /// + /// Read-only. #[serde(rename="updateTime")] pub update_time: Option, - /// Identifier of the course. Read-only. + /// Identifier of the course. + /// + /// Read-only. #[serde(rename="courseId")] pub course_id: Option, - /// Identifier for the student that owns this submission. Read-only. + /// Identifier for the student that owns this submission. + /// + /// Read-only. #[serde(rename="userId")] pub user_id: Option, - /// Whether this student submission is associated with the Developer Console project making the request. See google.classroom.Work.CreateCourseWork for more details. Read-only. + /// Whether this student submission is associated with the Developer Console + /// project making the request. + /// + /// See google.classroom.Work.CreateCourseWork for more + /// details. + /// + /// Read-only. #[serde(rename="associatedWithDeveloper")] pub associated_with_developer: Option, - /// Type of course work this submission is for. Read-only. + /// Type of course work this submission is for. + /// + /// Read-only. #[serde(rename="courseWorkType")] pub course_work_type: Option, - /// Optional grade. If unset, no grade was set. This must be a non-negative integer value. This may be modified only by course teachers. + /// Optional grade. If unset, no grade was set. + /// This must be a non-negative integer value. + /// + /// This may be modified only by course teachers. #[serde(rename="assignedGrade")] pub assigned_grade: Option, - /// Classroom-assigned Identifier for the student submission. This is unique among submissions for the relevant course work. Read-only. + /// Classroom-assigned Identifier for the student submission. + /// This is unique among submissions for the relevant course work. + /// + /// Read-only. pub id: Option, - /// Optional pending grade. If unset, no grade was set. This must be a non-negative integer value. This is only visible to and modifiable by course teachers. + /// Optional pending grade. If unset, no grade was set. + /// This must be a non-negative integer value. + /// + /// This is only visible to and modifiable by course teachers. #[serde(rename="draftGrade")] pub draft_grade: Option, - /// Absolute link to the submission in the Classroom web UI. Read-only. + /// Absolute link to the submission in the Classroom web UI. + /// + /// Read-only. #[serde(rename="alternateLink")] pub alternate_link: Option, /// Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION. #[serde(rename="multipleChoiceSubmission")] pub multiple_choice_submission: Option, - /// Creation time of this submission. This may be unset if the student has not accessed this item. Read-only. + /// Creation time of this submission. + /// This may be unset if the student has not accessed this item. + /// + /// Read-only. #[serde(rename="creationTime")] pub creation_time: Option, /// Submission content when course_work_type is SHORT_ANSWER_QUESTION. #[serde(rename="shortAnswerSubmission")] pub short_answer_submission: Option, - /// Whether this submission is late. Read-only. + /// Whether this submission is late. + /// + /// Read-only. pub late: Option, - /// State of this submission. Read-only. + /// State of this submission. + /// + /// Read-only. pub state: Option, - /// Identifier for the course work this corresponds to. Read-only. + /// Identifier for the course work this corresponds to. + /// + /// Read-only. #[serde(rename="courseWorkId")] pub course_work_id: Option, /// Submission content when course_work_type is ASSIGNMENT . @@ -1251,7 +1459,8 @@ impl ResponseResult for StudentSubmission {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListGuardianInvitationsResponse { - /// Token identifying the next page of results to return. If empty, no further results are available. + /// Token identifying the next page of results to return. If empty, no further + /// results are available. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// Guardian invitations that matched the list request. @@ -1273,76 +1482,143 @@ impl ResponseResult for ListGuardianInvitationsResponse {} /// * [course work student submissions list courses](struct.CourseCourseWorkStudentSubmissionListCall.html) (none) /// * [get courses](struct.CourseGetCall.html) (response) /// * [update courses](struct.CourseUpdateCall.html) (request|response) -/// * [students delete courses](struct.CourseStudentDeleteCall.html) (none) +/// * [students get courses](struct.CourseStudentGetCall.html) (none) /// * [teachers get courses](struct.CourseTeacherGetCall.html) (none) /// * [course work list courses](struct.CourseCourseWorkListCall.html) (none) -/// * [teachers list courses](struct.CourseTeacherListCall.html) (none) +/// * [course work get courses](struct.CourseCourseWorkGetCall.html) (none) /// * [course work student submissions turn in courses](struct.CourseCourseWorkStudentSubmissionTurnInCall.html) (none) /// * [course work student submissions modify attachments courses](struct.CourseCourseWorkStudentSubmissionModifyAttachmentCall.html) (none) +/// * [teachers list courses](struct.CourseTeacherListCall.html) (none) /// * [course work student submissions return courses](struct.CourseCourseWorkStudentSubmissionReturnCall.html) (none) -/// * [course work get courses](struct.CourseCourseWorkGetCall.html) (none) +/// * [aliases list courses](struct.CourseAliaseListCall.html) (none) /// * [course work create courses](struct.CourseCourseWorkCreateCall.html) (none) /// * [list courses](struct.CourseListCall.html) (none) /// * [course work student submissions reclaim courses](struct.CourseCourseWorkStudentSubmissionReclaimCall.html) (none) /// * [aliases create courses](struct.CourseAliaseCreateCall.html) (none) /// * [students create courses](struct.CourseStudentCreateCall.html) (none) /// * [aliases delete courses](struct.CourseAliaseDeleteCall.html) (none) +/// * [course work delete courses](struct.CourseCourseWorkDeleteCall.html) (none) /// * [create courses](struct.CourseCreateCall.html) (request|response) /// * [students list courses](struct.CourseStudentListCall.html) (none) /// * [delete courses](struct.CourseDeleteCall.html) (none) +/// * [course work patch courses](struct.CourseCourseWorkPatchCall.html) (none) /// * [patch courses](struct.CoursePatchCall.html) (request|response) -/// * [aliases list courses](struct.CourseAliaseListCall.html) (none) +/// * [students delete courses](struct.CourseStudentDeleteCall.html) (none) /// * [teachers delete courses](struct.CourseTeacherDeleteCall.html) (none) /// * [teachers create courses](struct.CourseTeacherCreateCall.html) (none) /// * [course work student submissions get courses](struct.CourseCourseWorkStudentSubmissionGetCall.html) (none) -/// * [students get courses](struct.CourseStudentGetCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Course { - /// Time of the most recent update to this course. Specifying this field in a course update mask results in an error. Read-only. + /// Time of the most recent update to this course. + /// Specifying this field in a course update mask results in an error. + /// + /// Read-only. #[serde(rename="updateTime")] pub update_time: Option, - /// Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters. + /// Optional description. + /// For example, "We'll be learning about the structure of living + /// creatures from a combination of textbooks, guest lectures, and lab work. + /// Expect to be excited!" + /// If set, this field must be a valid UTF-8 string and no longer than 30,000 + /// characters. pub description: Option, - /// Enrollment code to use when joining this course. Specifying this field in a course update mask results in an error. Read-only. + /// Enrollment code to use when joining this course. + /// Specifying this field in a course update mask results in an error. + /// + /// Read-only. #[serde(rename="enrollmentCode")] pub enrollment_code: Option, - /// Whether or not guardian notifications are enabled for this course. Read-only. + /// Whether or not guardian notifications are enabled for this course. + /// + /// Read-only. #[serde(rename="guardiansEnabled")] pub guardians_enabled: Option, - /// The email address of a Google group containing all members of the course. This group does not accept email and can only be used for permissions. Read-only. + /// The email address of a Google group containing all members of the course. + /// This group does not accept email and can only be used for permissions. + /// + /// Read-only. #[serde(rename="courseGroupEmail")] pub course_group_email: Option, - /// Sets of materials that appear on the "about" page of this course. Read-only. + /// Sets of materials that appear on the "about" page of this course. + /// + /// Read-only. #[serde(rename="courseMaterialSets")] pub course_material_sets: Option>, - /// State of the course. If unspecified, the default state is `PROVISIONED`. + /// State of the course. + /// If unspecified, the default state is `PROVISIONED`. #[serde(rename="courseState")] pub course_state: Option, - /// Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask results in an error. + /// Identifier for this course assigned by Classroom. + /// + /// When + /// creating a course, + /// you may optionally set this identifier to an + /// alias string in the + /// request to create a corresponding alias. The `id` is still assigned by + /// Classroom and cannot be updated after the course is created. + /// + /// Specifying this field in a course update mask results in an error. pub id: Option, - /// Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters. - pub room: Option, - /// Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string. + /// Name of the course. + /// For example, "10th Grade Biology". + /// The name is required. It must be between 1 and 750 characters and a valid + /// UTF-8 string. pub name: Option, - /// Absolute link to this course in the Classroom web UI. Read-only. + /// Optional room location. + /// For example, "301". + /// If set, this field must be a valid UTF-8 string and no longer than 650 + /// characters. + pub room: Option, + /// Absolute link to this course in the Classroom web UI. + /// + /// Read-only. #[serde(rename="alternateLink")] pub alternate_link: Option, - /// Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters. + /// Section of the course. + /// For example, "Period 2". + /// If set, this field must be a valid UTF-8 string and no longer than 2800 + /// characters. pub section: Option, - /// Creation time of the course. Specifying this field in a course update mask results in an error. Read-only. + /// Creation time of the course. + /// Specifying this field in a course update mask results in an error. + /// + /// Read-only. #[serde(rename="creationTime")] pub creation_time: Option, - /// The email address of a Google group containing all teachers of the course. This group does not accept email and can only be used for permissions. Read-only. + /// The email address of a Google group containing all teachers of the course. + /// This group does not accept email and can only be used for permissions. + /// + /// Read-only. #[serde(rename="teacherGroupEmail")] pub teacher_group_email: Option, - /// Information about a Drive Folder that is shared with all teachers of the course. This field will only be set for teachers of the course and domain administrators. Read-only. + /// Information about a Drive Folder that is shared with all teachers of the + /// course. + /// + /// This field will only be set for teachers of the course and domain administrators. + /// + /// Read-only. #[serde(rename="teacherFolder")] pub teacher_folder: Option, - /// The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask results in an `INVALID_ARGUMENT` error. + /// The identifier of the owner of a course. + /// + /// When specified as a parameter of a + /// create course request, this + /// field is required. + /// The identifier can be one of the following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user + /// + /// This must be set in a create request. Specifying this field in a course + /// update mask results in an `INVALID_ARGUMENT` error. #[serde(rename="ownerId")] pub owner_id: Option, - /// Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters. + /// Optional heading for the description. + /// For example, "Welcome to 10th Grade Biology." + /// If set, this field must be a valid UTF-8 string and no longer than 3600 + /// characters. #[serde(rename="descriptionHeading")] pub description_heading: Option, } @@ -1352,7 +1628,21 @@ impl Resource for Course {} impl ResponseResult for Course {} -/// Alternative identifier for a course. An alias uniquely identifies a course. It must be unique within one of the following scopes: * domain: A domain-scoped alias is visible to all users within the alias creator's domain and can be created only by a domain admin. A domain-scoped alias is often used when a course has an identifier external to Classroom. * project: A project-scoped alias is visible to any request from an application using the Developer Console project ID that created the alias and can be created by any project. A project-scoped alias is often used when an application has alternative identifiers. A random value can also be used to avoid duplicate courses in the event of transmission failures, as retrying a request will return `ALREADY_EXISTS` if a previous one has succeeded. +/// Alternative identifier for a course. +/// +/// An alias uniquely identifies a course. It must be unique within one of the +/// following scopes: +/// +/// * domain: A domain-scoped alias is visible to all users within the alias +/// creator's domain and can be created only by a domain admin. A domain-scoped +/// alias is often used when a course has an identifier external to Classroom. +/// +/// * project: A project-scoped alias is visible to any request from an +/// application using the Developer Console project ID that created the alias +/// and can be created by any project. A project-scoped alias is often used when +/// an application has alternative identifiers. A random value can also be used +/// to avoid duplicate courses in the event of transmission failures, as retrying +/// a request will return `ALREADY_EXISTS` if a previous one has succeeded. /// /// # Activities /// @@ -1363,7 +1653,14 @@ impl ResponseResult for Course {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CourseAlias { - /// Alias string. The format of the string indicates the desired alias scoping. * `d:` indicates a domain-scoped alias. Example: `d:math_101` * `p:` indicates a project-scoped alias. Example: `p:abc123` This field has a maximum length of 256 characters. + /// Alias string. The format of the string indicates the desired alias scoping. + /// + /// * `d:` indicates a domain-scoped alias. + /// Example: `d:math_101` + /// * `p:` indicates a project-scoped alias. + /// Example: `p:abc123` + /// + /// This field has a maximum length of 256 characters. pub alias: Option, } @@ -1377,7 +1674,8 @@ impl ResponseResult for CourseAlias {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Assignment { - /// Drive folder where attachments from student submissions are placed. This is only populated for course teachers. + /// Drive folder where attachments from student submissions are placed. + /// This is only populated for course teachers. #[serde(rename="studentWorkFolder")] pub student_work_folder: Option, } @@ -1409,7 +1707,8 @@ impl Part for GlobalPermission {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListCourseWorkResponse { - /// Token identifying the next page of results to return. If empty, no further results are available. + /// Token identifying the next page of results to return. If empty, no further + /// results are available. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// Course work items that match the request. @@ -1420,7 +1719,8 @@ pub struct ListCourseWorkResponse { impl ResponseResult for ListCourseWorkResponse {} -/// An invitation to become the guardian of a specified user, sent to a specified email address. +/// An invitation to become the guardian of a specified user, sent to a specified +/// email address. /// /// # Activities /// @@ -1433,20 +1733,25 @@ impl ResponseResult for ListCourseWorkResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GuardianInvitation { - /// Unique identifier for this invitation. Read-only. - #[serde(rename="invitationId")] - pub invitation_id: Option, + /// The state that this invitation is in. + pub state: Option, /// ID of the student (in standard format) #[serde(rename="studentId")] pub student_id: Option, - /// The time that this invitation was created. Read-only. + /// The time that this invitation was created. + /// + /// Read-only. #[serde(rename="creationTime")] pub creation_time: Option, - /// Email address that the invitation was sent to. This field is only visible to domain administrators. + /// Email address that the invitation was sent to. + /// This field is only visible to domain administrators. #[serde(rename="invitedEmailAddress")] pub invited_email_address: Option, - /// The state that this invitation is in. - pub state: Option, + /// Unique identifier for this invitation. + /// + /// Read-only. + #[serde(rename="invitationId")] + pub invitation_id: Option, } impl RequestValue for GuardianInvitation {} @@ -1481,7 +1786,7 @@ impl ResponseResult for GuardianInvitation {} /// ::default(), None); /// let mut hub = Classroom::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `aliases_create(...)`, `aliases_delete(...)`, `aliases_list(...)`, `course_work_create(...)`, `course_work_get(...)`, `course_work_list(...)`, `course_work_student_submissions_get(...)`, `course_work_student_submissions_list(...)`, `course_work_student_submissions_modify_attachments(...)`, `course_work_student_submissions_patch(...)`, `course_work_student_submissions_reclaim(...)`, `course_work_student_submissions_return(...)`, `course_work_student_submissions_turn_in(...)`, `create(...)`, `delete(...)`, `get(...)`, `list(...)`, `patch(...)`, `students_create(...)`, `students_delete(...)`, `students_get(...)`, `students_list(...)`, `teachers_create(...)`, `teachers_delete(...)`, `teachers_get(...)`, `teachers_list(...)` and `update(...)` +/// // like `aliases_create(...)`, `aliases_delete(...)`, `aliases_list(...)`, `course_work_create(...)`, `course_work_delete(...)`, `course_work_get(...)`, `course_work_list(...)`, `course_work_patch(...)`, `course_work_student_submissions_get(...)`, `course_work_student_submissions_list(...)`, `course_work_student_submissions_modify_attachments(...)`, `course_work_student_submissions_patch(...)`, `course_work_student_submissions_reclaim(...)`, `course_work_student_submissions_return(...)`, `course_work_student_submissions_turn_in(...)`, `create(...)`, `delete(...)`, `get(...)`, `list(...)`, `patch(...)`, `students_create(...)`, `students_delete(...)`, `students_get(...)`, `students_list(...)`, `teachers_create(...)`, `teachers_delete(...)`, `teachers_get(...)`, `teachers_list(...)` and `update(...)` /// // to build up your call. /// let rb = hub.courses(); /// # } @@ -1498,12 +1803,31 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. + /// Updates one or more fields of a student submission. + /// + /// See google.classroom.v1.StudentSubmission for details + /// of which fields may be updated and who may change them. + /// + /// This request must be made by the Developer Console project of the + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + /// create the corresponding course work item. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting developer project did not create + /// the corresponding course work, if the user is not permitted to make the + /// requested modification to the student submission, or for + /// access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course, course work, or student submission + /// does not exist. /// /// # Arguments /// /// * `request` - No description provided. - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// * `courseWorkId` - Identifier of the course work. /// * `id` - Identifier of the student submission. pub fn course_work_student_submissions_patch(&self, request: StudentSubmission, course_id: &str, course_work_id: &str, id: &str) -> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> { @@ -1522,12 +1846,29 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. + /// Returns a list of student submissions that the requester is permitted to + /// view, factoring in the OAuth scopes of the request. + /// `-` may be specified as the `course_work_id` to include student + /// submissions for multiple course work items. + /// + /// Course students may only view their own work. Course teachers + /// and domain administrators may view all student submissions. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// requested course or course work, or for access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course does not exist. /// /// # Arguments /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. - /// * `courseWorkId` - Identifer of the student work to request. This may be set to the string literal `"-"` to request student work for all course work in the specified course. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// * `courseWorkId` - Identifer of the student work to request. + /// This may be set to the string literal `"-"` to request student work for + /// all course work in the specified course. pub fn course_work_student_submissions_list(&self, course_id: &str, course_work_id: &str) -> CourseCourseWorkStudentSubmissionListCall<'a, C, A> { CourseCourseWorkStudentSubmissionListCall { hub: self.hub, @@ -1546,11 +1887,19 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. + /// Returns a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// requested course or for access errors. + /// * `NOT_FOUND` if no course exists with the requested ID. /// /// # Arguments /// - /// * `id` - Identifier of the course to return. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `id` - Identifier of the course to return. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn get(&self, id: &str) -> CourseGetCall<'a, C, A> { CourseGetCall { hub: self.hub, @@ -1563,12 +1912,22 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable + /// Updates a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + /// requested course or for access errors. + /// * `NOT_FOUND` if no course exists with the requested ID. + /// * `FAILED_PRECONDITION` for the following request errors: + /// * CourseNotModifiable /// /// # Arguments /// /// * `request` - No description provided. - /// * `id` - Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `id` - Identifier of the course to update. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn update(&self, request: Course, id: &str) -> CourseUpdateCall<'a, C, A> { CourseUpdateCall { hub: self.hub, @@ -1582,14 +1941,27 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist. + /// Returns a student of a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to view + /// students of this course or for access errors. + /// * `NOT_FOUND` if no student of this course has the requested ID or if the + /// course does not exist. /// /// # Arguments /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. - /// * `userId` - Identifier of the student to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user - pub fn students_delete(&self, course_id: &str, user_id: &str) -> CourseStudentDeleteCall<'a, C, A> { - CourseStudentDeleteCall { + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// * `userId` - Identifier of the student to return. The identifier can be one of the + /// following: + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user + pub fn students_get(&self, course_id: &str, user_id: &str) -> CourseStudentGetCall<'a, C, A> { + CourseStudentGetCall { hub: self.hub, _course_id: course_id.to_string(), _user_id: user_id.to_string(), @@ -1601,12 +1973,25 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. + /// Returns a teacher of a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to view + /// teachers of this course or for access errors. + /// * `NOT_FOUND` if no teacher of this course has the requested ID or if the + /// course does not exist. /// /// # Arguments /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. - /// * `userId` - Identifier of the teacher to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// * `userId` - Identifier of the teacher to return. The identifier can be one of the + /// following: + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user pub fn teachers_get(&self, course_id: &str, user_id: &str) -> CourseTeacherGetCall<'a, C, A> { CourseTeacherGetCall { hub: self.hub, @@ -1620,11 +2005,23 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. + /// Returns a list of course work that the requester is permitted to view. + /// + /// Course students may only view `PUBLISHED` course work. Course teachers + /// and domain administrators may view all course work. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access + /// the requested course or for access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course does not exist. /// /// # Arguments /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn course_work_list(&self, course_id: &str) -> CourseCourseWorkListCall<'a, C, A> { CourseCourseWorkListCall { hub: self.hub, @@ -1641,17 +2038,26 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of teachers of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. * `PERMISSION_DENIED` for access errors. + /// Returns course work. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// requested course or course work, or for access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course or course work does not exist. /// /// # Arguments /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. - pub fn teachers_list(&self, course_id: &str) -> CourseTeacherListCall<'a, C, A> { - CourseTeacherListCall { + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// * `id` - Identifier of the course work. + pub fn course_work_get(&self, course_id: &str, id: &str) -> CourseCourseWorkGetCall<'a, C, A> { + CourseCourseWorkGetCall { hub: self.hub, _course_id: course_id.to_string(), - _page_token: Default::default(), - _page_size: Default::default(), + _id: id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1660,12 +2066,33 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. + /// Turns in a student submission. + /// + /// Turning in a student submission transfers ownership of attached Drive + /// files to the teacher and may also update the submission state. + /// + /// This may only be called by the student that owns the specified student + /// submission. + /// + /// This request must be made by the Developer Console project of the + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + /// create the corresponding course work item. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// requested course or course work, turn in the requested student submission, + /// or for access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course, course work, or student submission + /// does not exist. /// /// # Arguments /// /// * `request` - No description provided. - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// * `courseWorkId` - Identifier of the course work. /// * `id` - Identifier of the student submission. pub fn course_work_student_submissions_turn_in(&self, request: TurnInStudentSubmissionRequest, course_id: &str, course_work_id: &str, id: &str) -> CourseCourseWorkStudentSubmissionTurnInCall<'a, C, A> { @@ -1683,12 +2110,31 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Modifies attachments of student submission. Attachments may only be added to student submissions whose type is `ASSIGNMENT`. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. + /// Modifies attachments of student submission. + /// + /// Attachments may only be added to student submissions belonging to course + /// work objects with a `workType` of `ASSIGNMENT`. + /// + /// This request must be made by the Developer Console project of the + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + /// create the corresponding course work item. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// requested course or course work, if the user is not permitted to modify + /// attachments on the requested student submission, or for + /// access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course, course work, or student submission + /// does not exist. /// /// # Arguments /// /// * `request` - No description provided. - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// * `courseWorkId` - Identifier of the course work. /// * `id` - Identifier of the student submission. pub fn course_work_student_submissions_modify_attachments(&self, request: ModifyAttachmentsRequest, course_id: &str, course_work_id: &str, id: &str) -> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, C, A> { @@ -1706,12 +2152,62 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. + /// Returns a list of teachers of this course that the requester + /// is permitted to view. + /// + /// This method returns the following error codes: + /// + /// * `NOT_FOUND` if the course does not exist. + /// * `PERMISSION_DENIED` for access errors. + /// + /// # Arguments + /// + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + pub fn teachers_list(&self, course_id: &str) -> CourseTeacherListCall<'a, C, A> { + CourseTeacherListCall { + hub: self.hub, + _course_id: course_id.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns a student submission. + /// + /// Returning a student submission transfers ownership of attached Drive + /// files to the student and may also update the submission state. + /// Unlike the Classroom application, returning a student submission does not + /// set assignedGrade to the draftGrade value. + /// + /// Only a teacher of the course that contains the requested student submission + /// may call this method. + /// + /// This request must be made by the Developer Console project of the + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + /// create the corresponding course work item. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// requested course or course work, return the requested student submission, + /// or for access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course, course work, or student submission + /// does not exist. /// /// # Arguments /// /// * `request` - No description provided. - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// * `courseWorkId` - Identifier of the course work. /// * `id` - Identifier of the student submission. pub fn course_work_student_submissions_return(&self, request: ReturnStudentSubmissionRequest, course_id: &str, course_work_id: &str, id: &str) -> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> { @@ -1729,17 +2225,25 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. + /// Returns a list of aliases for a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// course or for access errors. + /// * `NOT_FOUND` if the course does not exist. /// /// # Arguments /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. - /// * `id` - Identifier of the course work. - pub fn course_work_get(&self, course_id: &str, id: &str) -> CourseCourseWorkGetCall<'a, C, A> { - CourseCourseWorkGetCall { + /// * `courseId` - The identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + pub fn aliases_list(&self, course_id: &str) -> CourseAliaseListCall<'a, C, A> { + CourseAliaseListCall { hub: self.hub, _course_id: course_id.to_string(), - _id: id.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1748,12 +2252,31 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. + /// Creates course work. + /// + /// The resulting course work (and corresponding student submissions) are + /// associated with the Developer Console project of the + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + /// make the request. Classroom API requests to modify course work and student + /// submissions must be made with an OAuth client ID from the associated + /// Developer Console project. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// requested course, create course work in the requested course, share a + /// Drive attachment, or for access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course does not exist. + /// * `FAILED_PRECONDITION` for the following request error: + /// * AttachmentNotVisible /// /// # Arguments /// /// * `request` - No description provided. - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn course_work_create(&self, request: CourseWork, course_id: &str) -> CourseCourseWorkCreateCall<'a, C, A> { CourseCourseWorkCreateCall { hub: self.hub, @@ -1767,7 +2290,14 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist. + /// Returns a list of courses that the requesting user is permitted to view, + /// restricted to those that match the request. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` for access errors. + /// * `INVALID_ARGUMENT` if the query argument is malformed. + /// * `NOT_FOUND` if any users specified in the query arguments do not exist. pub fn list(&self) -> CourseListCall<'a, C, A> { CourseListCall { hub: self.hub, @@ -1784,12 +2314,34 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Reclaims a student submission on behalf of the student that owns it. Reclaiming a student submission transfers ownership of attached Drive files to the student and update the submission state. Only the student that ownes the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. * `FAILED_PRECONDITION` if the student submission has not been turned in. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. + /// Reclaims a student submission on behalf of the student that owns it. + /// + /// Reclaiming a student submission transfers ownership of attached Drive + /// files to the student and update the submission state. + /// + /// Only the student that owns the requested student submission may call this + /// method, and only for a student submission that has been turned in. + /// + /// This request must be made by the Developer Console project of the + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + /// create the corresponding course work item. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// requested course or course work, unsubmit the requested student submission, + /// or for access errors. + /// * `FAILED_PRECONDITION` if the student submission has not been turned in. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course, course work, or student submission + /// does not exist. /// /// # Arguments /// /// * `request` - No description provided. - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// * `courseWorkId` - Identifier of the course work. /// * `id` - Identifier of the student submission. pub fn course_work_student_submissions_reclaim(&self, request: ReclaimStudentSubmissionRequest, course_id: &str, course_work_id: &str, id: &str) -> CourseCourseWorkStudentSubmissionReclaimCall<'a, C, A> { @@ -1807,12 +2359,24 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates an alias for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors. * `NOT_FOUND` if the course does not exist. * `ALREADY_EXISTS` if the alias already exists. + /// Creates an alias for a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to create the + /// alias or for access errors. + /// * `NOT_FOUND` if the course does not exist. + /// * `ALREADY_EXISTS` if the alias already exists. + /// * `FAILED_PRECONDITION` if the alias requested does not make sense for the + /// requesting user or course (for example, if a user not in a domain + /// attempts to access a domain-scoped alias). /// /// # Arguments /// /// * `request` - No description provided. - /// * `courseId` - Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course to alias. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn aliases_create(&self, request: CourseAlias, course_id: &str) -> CourseAliaseCreateCall<'a, C, A> { CourseAliaseCreateCall { hub: self.hub, @@ -1826,12 +2390,27 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Adds a user as a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course. + /// Adds a user as a student of a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to create + /// students in this course or for access errors. + /// * `NOT_FOUND` if the requested course ID does not exist. + /// * `FAILED_PRECONDITION` if the requested user's account is disabled, + /// for the following request errors: + /// * CourseMemberLimitReached + /// * CourseNotModifiable + /// * UserGroupsMembershipLimitReached + /// * `ALREADY_EXISTS` if the user is already a student or teacher in the + /// course. /// /// # Arguments /// /// * `request` - No description provided. - /// * `courseId` - Identifier of the course to create the student in. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course to create the student in. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn students_create(&self, request: Student, course_id: &str) -> CourseStudentCreateCall<'a, C, A> { CourseStudentCreateCall { hub: self.hub, @@ -1846,12 +2425,24 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an alias of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to remove the alias or for access errors. * `NOT_FOUND` if the alias does not exist. + /// Deletes an alias of a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to remove the + /// alias or for access errors. + /// * `NOT_FOUND` if the alias does not exist. + /// * `FAILED_PRECONDITION` if the alias requested does not make sense for the + /// requesting user or course (for example, if a user not in a domain + /// attempts to delete a domain-scoped alias). /// /// # Arguments /// - /// * `courseId` - Identifier of the course whose alias should be deleted. This identifier can be either the Classroom-assigned identifier or an alias. - /// * `alias` - Alias to delete. This may not be the Classroom-assigned identifier. + /// * `courseId` - Identifier of the course whose alias should be deleted. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// * `alias` - Alias to delete. + /// This may not be the Classroom-assigned identifier. pub fn aliases_delete(&self, course_id: &str, alias: &str) -> CourseAliaseDeleteCall<'a, C, A> { CourseAliaseDeleteCall { hub: self.hub, @@ -1865,7 +2456,56 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists. + /// Deletes a course work. + /// + /// This request must be made by the Developer Console project of the + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + /// create the corresponding course work item. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting developer project did not create + /// the corresponding course work, if the requesting user is not permitted + /// to delete the requested course or for access errors. + /// * `FAILED_PRECONDITION` if the requested course work has already been + /// deleted. + /// * `NOT_FOUND` if no course exists with the requested ID. + /// + /// # Arguments + /// + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// * `id` - Identifier of the course work to delete. + /// This identifier is a Classroom-assigned identifier. + pub fn course_work_delete(&self, course_id: &str, id: &str) -> CourseCourseWorkDeleteCall<'a, C, A> { + CourseCourseWorkDeleteCall { + hub: self.hub, + _course_id: course_id.to_string(), + _id: id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a course. + /// + /// The user specified in `ownerId` is the owner of the created course + /// and added as a teacher. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to create + /// courses or for access errors. + /// * `NOT_FOUND` if the primary teacher is not a valid user. + /// * `FAILED_PRECONDITION` if the course owner's account is disabled or for + /// the following request errors: + /// * UserGroupsMembershipLimitReached + /// * `ALREADY_EXISTS` if an alias was specified in the `id` and + /// already exists. /// /// # Arguments /// @@ -1882,11 +2522,19 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of students of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. * `PERMISSION_DENIED` for access errors. + /// Returns a list of students of this course that the requester + /// is permitted to view. + /// + /// This method returns the following error codes: + /// + /// * `NOT_FOUND` if the course does not exist. + /// * `PERMISSION_DENIED` for access errors. /// /// # Arguments /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn students_list(&self, course_id: &str) -> CourseStudentListCall<'a, C, A> { CourseStudentListCall { hub: self.hub, @@ -1901,11 +2549,19 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. + /// Deletes a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + /// requested course or for access errors. + /// * `NOT_FOUND` if no course exists with the requested ID. /// /// # Arguments /// - /// * `id` - Identifier of the course to delete. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `id` - Identifier of the course to delete. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn delete(&self, id: &str) -> CourseDeleteCall<'a, C, A> { CourseDeleteCall { hub: self.hub, @@ -1918,12 +2574,67 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable + /// Updates one or more fields of a course work. + /// + /// See google.classroom.v1.CourseWork for details + /// of which fields may be updated and who may change them. + /// + /// This request must be made by the Developer Console project of the + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + /// create the corresponding course work item. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting developer project did not create + /// the corresponding course work, if the user is not permitted to make the + /// requested modification to the student submission, or for + /// access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `FAILED_PRECONDITION` if the requested course work has already been + /// deleted. + /// * `NOT_FOUND` if the requested course, course work, or student submission + /// does not exist. /// /// # Arguments /// /// * `request` - No description provided. - /// * `id` - Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// * `id` - Identifier of the course work. + pub fn course_work_patch(&self, request: CourseWork, course_id: &str, id: &str) -> CourseCourseWorkPatchCall<'a, C, A> { + CourseCourseWorkPatchCall { + hub: self.hub, + _request: request, + _course_id: course_id.to_string(), + _id: id.to_string(), + _update_mask: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates one or more fields in a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + /// requested course or for access errors. + /// * `NOT_FOUND` if no course exists with the requested ID. + /// * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or + /// if no update mask is supplied. + /// * `FAILED_PRECONDITION` for the following request errors: + /// * CourseNotModifiable + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `id` - Identifier of the course to update. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn patch(&self, request: Course, id: &str) -> CoursePatchCall<'a, C, A> { CoursePatchCall { hub: self.hub, @@ -1938,17 +2649,30 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of aliases for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the course or for access errors. * `NOT_FOUND` if the course does not exist. + /// Deletes a student of a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to delete + /// students of this course or for access errors. + /// * `NOT_FOUND` if no student of this course has the requested ID or if the + /// course does not exist. /// /// # Arguments /// - /// * `courseId` - The identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. - pub fn aliases_list(&self, course_id: &str) -> CourseAliaseListCall<'a, C, A> { - CourseAliaseListCall { + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// * `userId` - Identifier of the student to delete. The identifier can be one of the + /// following: + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user + pub fn students_delete(&self, course_id: &str, user_id: &str) -> CourseStudentDeleteCall<'a, C, A> { + CourseStudentDeleteCall { hub: self.hub, _course_id: course_id.to_string(), - _page_token: Default::default(), - _page_size: Default::default(), + _user_id: user_id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1957,12 +2681,27 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course. + /// Deletes a teacher of a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to delete + /// teachers of this course or for access errors. + /// * `NOT_FOUND` if no teacher of this course has the requested ID or if the + /// course does not exist. + /// * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher + /// of this course. /// /// # Arguments /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. - /// * `userId` - Identifier of the teacher to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// * `userId` - Identifier of the teacher to delete. The identifier can be one of the + /// following: + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user pub fn teachers_delete(&self, course_id: &str, user_id: &str) -> CourseTeacherDeleteCall<'a, C, A> { CourseTeacherDeleteCall { hub: self.hub, @@ -1976,12 +2715,28 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course. + /// Creates a teacher of a course. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to create + /// teachers in this course or for access errors. + /// * `NOT_FOUND` if the requested course ID does not exist. + /// * `FAILED_PRECONDITION` if the requested user's account is disabled, + /// for the following request errors: + /// * CourseMemberLimitReached + /// * CourseNotModifiable + /// * CourseTeacherLimitReached + /// * UserGroupsMembershipLimitReached + /// * `ALREADY_EXISTS` if the user is already a teacher or student in the + /// course. /// /// # Arguments /// /// * `request` - No description provided. - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. pub fn teachers_create(&self, request: Teacher, course_id: &str) -> CourseTeacherCreateCall<'a, C, A> { CourseTeacherCreateCall { hub: self.hub, @@ -1995,11 +2750,20 @@ impl<'a, C, A> CourseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a student submission. * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. + /// Returns a student submission. + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access the + /// requested course, course work, or student submission or for + /// access errors. + /// * `INVALID_ARGUMENT` if the request is malformed. + /// * `NOT_FOUND` if the requested course, course work, or student submission + /// does not exist. /// /// # Arguments /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// * `courseId` - Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// * `courseWorkId` - Identifier of the course work. /// * `id` - Identifier of the student submission. pub fn course_work_student_submissions_get(&self, course_id: &str, course_work_id: &str, id: &str) -> CourseCourseWorkStudentSubmissionGetCall<'a, C, A> { @@ -2013,25 +2777,6 @@ impl<'a, C, A> CourseMethods<'a, C, A> { _additional_params: Default::default(), } } - - /// Create a builder to help you perform the following task: - /// - /// Returns a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist. - /// - /// # Arguments - /// - /// * `courseId` - Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. - /// * `userId` - Identifier of the student to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user - pub fn students_get(&self, course_id: &str, user_id: &str) -> CourseStudentGetCall<'a, C, A> { - CourseStudentGetCall { - hub: self.hub, - _course_id: course_id.to_string(), - _user_id: user_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } } @@ -2076,11 +2821,28 @@ impl<'a, C, A> UserProfileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a specific guardian. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian information for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of the given student or `guardian_id`, or if the guardian has been disabled. + /// Returns a specific guardian. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if no user that matches the provided `student_id` + /// is visible to the requesting user, if the requesting user is not + /// permitted to view guardian information for the student identified by the + /// `student_id`, if guardians are not enabled for the domain in question, + /// or for other access errors. + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + /// be recognized (it is not an email address, nor a `student_id` from the + /// API, nor the literal string `me`). + /// * `NOT_FOUND` if the requesting user is permitted to view guardians for + /// the requested `student_id`, but no `Guardian` record exists for that + /// student that matches the provided `guardian_id`. /// /// # Arguments /// - /// * `studentId` - The student whose guardian is being requested. One of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// * `studentId` - The student whose guardian is being requested. One of the following: + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user /// * `guardianId` - The `id` field from a `Guardian`. pub fn guardians_get(&self, student_id: &str, guardian_id: &str) -> UserProfileGuardianGetCall<'a, C, A> { UserProfileGuardianGetCall { @@ -2094,7 +2856,36 @@ impl<'a, C, A> UserProfileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a guardian invitation, and sends an email to the guardian asking them to confirm that they are the student's guardian. Once the guardian accepts the invitation, their `state` will change to `COMPLETED` and they will start receiving guardian notifications. A `Guardian` resource will also be created to represent the active guardian. The request object must have the `student_id` and `invited_email_address` fields set. Failing to set these fields, or setting any other fields in the request, will result in an error. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if the guardian in question has already rejected too many requests for that student, if guardians are not enabled for the domain in question, or for other access errors. * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link limit. * `INVALID_ARGUMENT` if the guardian email address is not valid (for example, if it is too long), or if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API). This error will also be returned if read-only fields are set, or if the `state` field is set to to a value other than `PENDING`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student. * `ALREADY_EXISTS` if there is already a pending guardian invitation for the student and `invited_email_address` provided, or if the provided `invited_email_address` matches the Google account of an existing `Guardian` for this user. + /// Creates a guardian invitation, and sends an email to the guardian asking + /// them to confirm that they are the student's guardian. + /// + /// Once the guardian accepts the invitation, their `state` will change to + /// `COMPLETED` and they will start receiving guardian notifications. A + /// `Guardian` resource will also be created to represent the active guardian. + /// + /// The request object must have the `student_id` and + /// `invited_email_address` fields set. Failing to set these fields, or + /// setting any other fields in the request, will result in an error. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the current user does not have permission to + /// manage guardians, if the guardian in question has already rejected + /// too many requests for that student, if guardians are not enabled for the + /// domain in question, or for other access errors. + /// * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian + /// link limit. + /// * `INVALID_ARGUMENT` if the guardian email address is not valid (for + /// example, if it is too long), or if the format of the student ID provided + /// cannot be recognized (it is not an email address, nor a `user_id` from + /// this API). This error will also be returned if read-only fields are set, + /// or if the `state` field is set to to a value other than `PENDING`. + /// * `NOT_FOUND` if the student ID provided is a valid student ID, but + /// Classroom has no record of that student. + /// * `ALREADY_EXISTS` if there is already a pending guardian invitation for + /// the student and `invited_email_address` provided, or if the provided + /// `invited_email_address` matches the Google account of an existing + /// `Guardian` for this user. /// /// # Arguments /// @@ -2112,11 +2903,21 @@ impl<'a, C, A> UserProfileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a user profile. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access this user profile or if no profile exists with the requested ID or for access errors. + /// Returns a user profile. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access + /// this user profile, if no profile exists with the requested ID, or for + /// access errors. /// /// # Arguments /// - /// * `userId` - Identifier of the profile to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// * `userId` - Identifier of the profile to return. The identifier can be one of the + /// following: + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user pub fn get(&self, user_id: &str) -> UserProfileGetCall<'a, C, A> { UserProfileGetCall { hub: self.hub, @@ -2129,7 +2930,24 @@ impl<'a, C, A> UserProfileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other access errors. * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom. + /// Modifies a guardian invitation. + /// + /// Currently, the only valid modification is to change the `state` from + /// `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the current user does not have permission to + /// manage guardians, if guardians are not enabled for the domain in question + /// or for other access errors. + /// * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. + /// * `INVALID_ARGUMENT` if the format of the student ID provided + /// cannot be recognized (it is not an email address, nor a `user_id` from + /// this API), or if the passed `GuardianInvitation` has a `state` other than + /// `COMPLETE`, or if it modifies fields other than `state`. + /// * `NOT_FOUND` if the student ID provided is a valid student ID, but + /// Classroom has no record of that student, or if the `id` field does not + /// refer to a guardian invitation known to Classroom. /// /// # Arguments /// @@ -2150,7 +2968,20 @@ impl<'a, C, A> UserProfileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a specific guardian invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian invitations for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of the given student or `invitation_id`. May also be returned if the student exists, but the requesting user does not have access to see that student. + /// Returns a specific guardian invitation. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to view + /// guardian invitations for the student identified by the `student_id`, if + /// guardians are not enabled for the domain in question, or for other + /// access errors. + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + /// be recognized (it is not an email address, nor a `student_id` from the + /// API, nor the literal string `me`). + /// * `NOT_FOUND` if Classroom cannot find any record of the given student or + /// `invitation_id`. May also be returned if the student exists, but the + /// requesting user does not have access to see that student. /// /// # Arguments /// @@ -2168,11 +2999,36 @@ impl<'a, C, A> UserProfileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of guardians that the requesting user is permitted to view, restricted to those that match the request. To list guardians for any student that the requesting user may view guardians for, use the literal character `-` for the student ID. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian information for that student, if `"-"` is specified as the `student_id` and the user is not a domain administrator, if guardians are not enabled for the domain in question, if the `invited_email_address` filter is set by a user who is not a domain administrator, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student. + /// Returns a list of guardians that the requesting user is permitted to + /// view, restricted to those that match the request. + /// + /// To list guardians for any student that the requesting user may view + /// guardians for, use the literal character `-` for the student ID. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + /// user is not permitted to view guardian information for that student, if + /// `"-"` is specified as the `student_id` and the user is not a domain + /// administrator, if guardians are not enabled for the domain in question, + /// if the `invited_email_address` filter is set by a user who is not a + /// domain administrator, or for other access errors. + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + /// be recognized (it is not an email address, nor a `student_id` from the + /// API, nor the literal string `me`). May also be returned if an invalid + /// `page_token` is provided. + /// * `NOT_FOUND` if a `student_id` is specified, and its format can be + /// recognized, but Classroom has no record of that student. /// /// # Arguments /// - /// * `studentId` - Filter results by the student who the guardian is linked to. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user * the string literal `"-"`, indicating that results should be returned for all students that the requesting user has access to view. + /// * `studentId` - Filter results by the student who the guardian is linked to. + /// The identifier can be one of the following: + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user + /// * the string literal `"-"`, indicating that results should be returned for + /// all students that the requesting user has access to view. pub fn guardians_list(&self, student_id: &str) -> UserProfileGuardianListCall<'a, C, A> { UserProfileGuardianListCall { hub: self.hub, @@ -2187,11 +3043,33 @@ impl<'a, C, A> UserProfileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of guardian invitations that the requesting user is permitted to view, filtered by the parameters provided. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian invitations for that student, if `"-"` is specified as the `student_id` and the user is not a domain administrator, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` or `state` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student. + /// Returns a list of guardian invitations that the requesting user is + /// permitted to view, filtered by the parameters provided. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + /// user is not permitted to view guardian invitations for that student, if + /// `"-"` is specified as the `student_id` and the user is not a domain + /// administrator, if guardians are not enabled for the domain in question, + /// or for other access errors. + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + /// be recognized (it is not an email address, nor a `student_id` from the + /// API, nor the literal string `me`). May also be returned if an invalid + /// `page_token` or `state` is provided. + /// * `NOT_FOUND` if a `student_id` is specified, and its format can be + /// recognized, but Classroom has no record of that student. /// /// # Arguments /// - /// * `studentId` - The ID of the student whose guardian invitations are to be returned. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user * the string literal `"-"`, indicating that results should be returned for all students that the requesting user is permitted to view guardian invitations. + /// * `studentId` - The ID of the student whose guardian invitations are to be returned. + /// The identifier can be one of the following: + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user + /// * the string literal `"-"`, indicating that results should be returned for + /// all students that the requesting user is permitted to view guardian + /// invitations. pub fn guardian_invitations_list(&self, student_id: &str) -> UserProfileGuardianInvitationListCall<'a, C, A> { UserProfileGuardianInvitationListCall { hub: self.hub, @@ -2207,11 +3085,31 @@ impl<'a, C, A> UserProfileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a guardian. The guardian will no longer receive guardian notifications and the guardian will no longer be accessible via the API. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to manage guardians for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API). * `NOT_FOUND` if Classroom cannot find any record of the given `student_id` or `guardian_id`, or if the guardian has already been disabled. + /// Deletes a guardian. + /// + /// The guardian will no longer receive guardian notifications and the guardian + /// will no longer be accessible via the API. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if no user that matches the provided `student_id` + /// is visible to the requesting user, if the requesting user is not + /// permitted to manage guardians for the student identified by the + /// `student_id`, if guardians are not enabled for the domain in question, + /// or for other access errors. + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + /// be recognized (it is not an email address, nor a `student_id` from the + /// API). + /// * `NOT_FOUND` if the requesting user is permitted to modify guardians for + /// the requested `student_id`, but no `Guardian` record exists for that + /// student with the provided `guardian_id`. /// /// # Arguments /// - /// * `studentId` - The student whose guardian is to be deleted. One of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// * `studentId` - The student whose guardian is to be deleted. One of the following: + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user /// * `guardianId` - The `id` field from a `Guardian`. pub fn guardians_delete(&self, student_id: &str, guardian_id: &str) -> UserProfileGuardianDeleteCall<'a, C, A> { UserProfileGuardianDeleteCall { @@ -2266,7 +3164,13 @@ impl<'a, C, A> InvitationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested invitation or for access errors. * `NOT_FOUND` if no invitation exists with the requested ID. + /// Deletes an invitation. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + /// requested invitation or for access errors. + /// * `NOT_FOUND` if no invitation exists with the requested ID. /// /// # Arguments /// @@ -2283,23 +3187,18 @@ impl<'a, C, A> InvitationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request. *Note:* At least one of `user_id` or `course_id` must be supplied. Both fields can be supplied. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. - pub fn list(&self) -> InvitationListCall<'a, C, A> { - InvitationListCall { - hub: self.hub, - _user_id: Default::default(), - _page_token: Default::default(), - _page_size: Default::default(), - _course_id: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create invitations for this course or for access errors. * `NOT_FOUND` if the course or the user does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled or if the user already has this role or a role with greater permissions. * `ALREADY_EXISTS` if an invitation for the specified user and course already exists. + /// Creates an invitation. Only one invitation for a user and course may exist + /// at a time. Delete and re-create an invitation to make changes. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to create + /// invitations for this course or for access errors. + /// * `NOT_FOUND` if the course or the user does not exist. + /// * `FAILED_PRECONDITION` if the requested user's account is disabled or if + /// the user already has this role or a role with greater permissions. + /// * `ALREADY_EXISTS` if an invitation for the specified user and course + /// already exists. /// /// # Arguments /// @@ -2316,7 +3215,37 @@ impl<'a, C, A> InvitationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view the requested invitation or for access errors. * `NOT_FOUND` if no invitation exists with the requested ID. + /// Returns a list of invitations that the requesting user is permitted to + /// view, restricted to those that match the list request. + /// + /// *Note:* At least one of `user_id` or `course_id` must be supplied. Both + /// fields can be supplied. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` for access errors. + pub fn list(&self) -> InvitationListCall<'a, C, A> { + InvitationListCall { + hub: self.hub, + _user_id: Default::default(), + _page_token: Default::default(), + _page_size: Default::default(), + _course_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns an invitation. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to view the + /// requested invitation or for access errors. + /// * `NOT_FOUND` if no invitation exists with the requested ID. /// /// # Arguments /// @@ -2333,7 +3262,20 @@ impl<'a, C, A> InvitationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to accept the requested invitation or for access errors. * `FAILED_PRECONDITION` for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `NOT_FOUND` if no invitation exists with the requested ID. + /// Accepts an invitation, removing it and adding the invited user to the + /// teachers or students (as appropriate) of the specified course. Only the + /// invited user may accept an invitation. + /// + /// This method returns the following error codes: + /// + /// * `PERMISSION_DENIED` if the requesting user is not permitted to accept the + /// requested invitation or for access errors. + /// * `FAILED_PRECONDITION` for the following request errors: + /// * CourseMemberLimitReached + /// * CourseNotModifiable + /// * CourseTeacherLimitReached + /// * UserGroupsMembershipLimitReached + /// * `NOT_FOUND` if no invitation exists with the requested ID. /// /// # Arguments /// @@ -2357,7 +3299,24 @@ impl<'a, C, A> InvitationMethods<'a, C, A> { // CallBuilders ### // ################# -/// Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. +/// Updates one or more fields of a student submission. +/// +/// See google.classroom.v1.StudentSubmission for details +/// of which fields may be updated and who may change them. +/// +/// This request must be made by the Developer Console project of the +/// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to +/// create the corresponding course work item. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting developer project did not create +/// the corresponding course work, if the user is not permitted to make the +/// requested modification to the student submission, or for +/// access errors. +/// * `INVALID_ARGUMENT` if the request is malformed. +/// * `NOT_FOUND` if the requested course, course work, or student submission +/// does not exist. /// /// A builder for the *courseWork.studentSubmissions.patch* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -2570,7 +3529,9 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> where C: Bor self._request = new_value; self } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* path property to the given value. /// @@ -2600,7 +3561,13 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> where C: Bor self._id = new_value.to_string(); self } - /// Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields may be specified by teachers: * `draft_grade` * `assigned_grade` + /// Mask that identifies which fields on the student submission to update. + /// This field is required to do an update. The update fails if invalid + /// fields are specified. + /// + /// The following fields may be specified by teachers: + /// * `draft_grade` + /// * `assigned_grade` /// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> { @@ -2627,17 +3594,17 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> where C: Bor /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> @@ -2665,7 +3632,20 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> where C: Bor } -/// Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. +/// Returns a list of student submissions that the requester is permitted to +/// view, factoring in the OAuth scopes of the request. +/// `-` may be specified as the `course_work_id` to include student +/// submissions for multiple course work items. +/// +/// Course students may only view their own work. Course teachers +/// and domain administrators may view all student submissions. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to access the +/// requested course or course work, or for access errors. +/// * `INVALID_ARGUMENT` if the request is malformed. +/// * `NOT_FOUND` if the requested course does not exist. /// /// A builder for the *courseWork.studentSubmissions.list* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -2867,7 +3847,9 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionListCall<'a, C, A> where C: Borr } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* path property to the given value. /// @@ -2877,7 +3859,9 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionListCall<'a, C, A> where C: Borr self._course_id = new_value.to_string(); self } - /// Identifer of the student work to request. This may be set to the string literal `"-"` to request student work for all course work in the specified course. + /// Identifer of the student work to request. + /// This may be set to the string literal `"-"` to request student work for + /// all course work in the specified course. /// /// Sets the *course work id* path property to the given value. /// @@ -2887,14 +3871,21 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionListCall<'a, C, A> where C: Borr self._course_work_id = new_value.to_string(); self } - /// Optional argument to restrict returned student work to those owned by the student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// Optional argument to restrict returned student work to those owned by the + /// student with the specified identifier. The identifier can be one of the + /// following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user /// /// Sets the *user id* query property to the given value. pub fn user_id(mut self, new_value: &str) -> CourseCourseWorkStudentSubmissionListCall<'a, C, A> { self._user_id = Some(new_value.to_string()); self } - /// Requested submission states. If specified, returned student submissions match one of the specified submission states. + /// Requested submission states. If specified, returned student submissions + /// match one of the specified submission states. /// /// Append the given value to the *states* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -2902,21 +3893,32 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionListCall<'a, C, A> where C: Borr self._states.push(new_value.to_string()); self } - /// nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. + /// nextPageToken + /// value returned from a previous + /// list call, + /// indicating that the subsequent page of results should be returned. + /// + /// The list request + /// must be otherwise identical to the one that resulted in this token. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CourseCourseWorkStudentSubmissionListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. + /// Maximum number of items to return. Zero or unspecified indicates that the + /// server may assign a maximum. + /// + /// The server may return fewer than the specified number of results. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> CourseCourseWorkStudentSubmissionListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// Requested lateness value. If specified, returned student submissions are restricted by the requested value. If unspecified, submissions are returned regardless of `late` value. + /// Requested lateness value. If specified, returned student submissions are + /// restricted by the requested value. + /// If unspecified, submissions are returned regardless of `late` value. /// /// Sets the *late* query property to the given value. pub fn late(mut self, new_value: &str) -> CourseCourseWorkStudentSubmissionListCall<'a, C, A> { @@ -2943,17 +3945,17 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionListCall<'a, C, A> where C: Borr /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseCourseWorkStudentSubmissionListCall<'a, C, A> @@ -2981,7 +3983,13 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionListCall<'a, C, A> where C: Borr } -/// Returns a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. +/// Returns a course. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to access the +/// requested course or for access errors. +/// * `NOT_FOUND` if no course exists with the requested ID. /// /// A builder for the *get* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -3154,7 +4162,9 @@ impl<'a, C, A> CourseGetCall<'a, C, A> where C: BorrowMut, A: oau } - /// Identifier of the course to return. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course to return. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *id* path property to the given value. /// @@ -3184,17 +4194,17 @@ impl<'a, C, A> CourseGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseGetCall<'a, C, A> @@ -3222,7 +4232,15 @@ impl<'a, C, A> CourseGetCall<'a, C, A> where C: BorrowMut, A: oau } -/// Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable +/// Updates a course. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to modify the +/// requested course or for access errors. +/// * `NOT_FOUND` if no course exists with the requested ID. +/// * `FAILED_PRECONDITION` for the following request errors: +/// * CourseNotModifiable /// /// A builder for the *update* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -3426,7 +4444,9 @@ impl<'a, C, A> CourseUpdateCall<'a, C, A> where C: BorrowMut, A: self._request = new_value; self } - /// Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course to update. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *id* path property to the given value. /// @@ -3456,17 +4476,17 @@ impl<'a, C, A> CourseUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseUpdateCall<'a, C, A> @@ -3494,9 +4514,16 @@ impl<'a, C, A> CourseUpdateCall<'a, C, A> where C: BorrowMut, A: } -/// Deletes a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist. +/// Returns a student of a course. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to view +/// students of this course or for access errors. +/// * `NOT_FOUND` if no student of this course has the requested ID or if the +/// course does not exist. /// -/// A builder for the *students.delete* method supported by a *course* resource. +/// A builder for the *students.get* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. /// /// # Example @@ -3520,11 +4547,11 @@ impl<'a, C, A> CourseUpdateCall<'a, C, A> where C: BorrowMut, A: /// // 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.courses().students_delete("courseId", "userId") +/// let result = hub.courses().students_get("courseId", "userId") /// .doit(); /// # } /// ``` -pub struct CourseStudentDeleteCall<'a, C, A> +pub struct CourseStudentGetCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Classroom, @@ -3535,13 +4562,13 @@ pub struct CourseStudentDeleteCall<'a, C, A> _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for CourseStudentDeleteCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for CourseStudentGetCall<'a, C, A> {} -impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> CourseStudentGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, Student)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -3549,8 +4576,8 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "classroom.courses.students.delete", - http_method: hyper::method::Method::Delete }); + dlg.begin(MethodInfo { id: "classroom.courses.students.get", + http_method: hyper::method::Method::Get }); let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("courseId", self._course_id.to_string())); params.push(("userId", self._user_id.to_string())); @@ -3568,7 +4595,7 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut CourseStudentDeleteCall<'a, C, A> where C: BorrowMut CourseStudentDeleteCall<'a, C, A> where C: BorrowMut CourseStudentDeleteCall<'a, C, A> { + pub fn course_id(mut self, new_value: &str) -> CourseStudentGetCall<'a, C, A> { self._course_id = new_value.to_string(); self } - /// Identifier of the student to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// Identifier of the student to return. The identifier can be one of the + /// following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user /// /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> CourseStudentDeleteCall<'a, C, A> { + pub fn user_id(mut self, new_value: &str) -> CourseStudentGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } @@ -3695,7 +4729,7 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut CourseStudentDeleteCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> CourseStudentGetCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -3709,20 +4743,20 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CourseStudentDeleteCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> CourseStudentGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -3731,7 +4765,7 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut CourseStudentDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseStudentDeleteCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> CourseStudentGetCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -3747,7 +4781,14 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut CourseTeacherGetCall<'a, C, A> where C: BorrowMut, } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* path property to the given value. /// @@ -3932,7 +4975,12 @@ impl<'a, C, A> CourseTeacherGetCall<'a, C, A> where C: BorrowMut, self._course_id = new_value.to_string(); self } - /// Identifier of the teacher to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// Identifier of the teacher to return. The identifier can be one of the + /// following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user /// /// Sets the *user id* path property to the given value. /// @@ -3962,17 +5010,17 @@ impl<'a, C, A> CourseTeacherGetCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseTeacherGetCall<'a, C, A> @@ -4000,7 +5048,17 @@ impl<'a, C, A> CourseTeacherGetCall<'a, C, A> where C: BorrowMut, } -/// Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. +/// Returns a list of course work that the requester is permitted to view. +/// +/// Course students may only view `PUBLISHED` course work. Course teachers +/// and domain administrators may view all course work. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to access +/// the requested course or for access errors. +/// * `INVALID_ARGUMENT` if the request is malformed. +/// * `NOT_FOUND` if the requested course does not exist. /// /// A builder for the *courseWork.list* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -4094,7 +5152,7 @@ impl<'a, C, A> CourseCourseWorkListCall<'a, C, A> where C: BorrowMut CourseCourseWorkListCall<'a, C, A> where C: BorrowMut CourseCourseWorkListCall<'a, C, A> where C: BorrowMut CourseCourseWorkListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. + /// Maximum number of items to return. Zero or unspecified indicates that the + /// server may assign a maximum. + /// + /// The server may return fewer than the specified number of results. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> CourseCourseWorkListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported fields are `updateTime` and `dueDate`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` + /// Optional sort ordering for results. A comma-separated list of fields with + /// an optional sort direction keyword. Supported fields are `updateTime` + /// and `dueDate`. Supported direction keywords are `asc` and `desc`. + /// If not specified, `updateTime desc` is the default behavior. + /// Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` /// /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> CourseCourseWorkListCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// Restriction on the work status to return. Only courseWork that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned. + /// Restriction on the work status to return. Only courseWork that matches + /// is returned. If unspecified, items with a work status of `PUBLISHED` + /// is returned. /// /// Append the given value to the *course work states* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -4254,17 +5329,17 @@ impl<'a, C, A> CourseCourseWorkListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CourseCourseWorkListCall<'a, C, A> @@ -4276,7 +5351,7 @@ impl<'a, C, A> CourseCourseWorkListCall<'a, C, A> where C: BorrowMut CourseCourseWorkListCall<'a, C, A> where C: BorrowMut CourseCourseWorkListCall<'a, C, A> where C: BorrowMut +pub struct CourseCourseWorkGetCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Classroom, _course_id: String, - _page_token: Option, - _page_size: Option, + _id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for CourseTeacherListCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for CourseCourseWorkGetCall<'a, C, A> {} -impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ListTeachersResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, CourseWork)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -4350,17 +5429,12 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "classroom.courses.teachers.list", + dlg.begin(MethodInfo { id: "classroom.courses.courseWork.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("courseId", self._course_id.to_string())); - if let Some(value) = self._page_token { - params.push(("pageToken", value.to_string())); - } - if let Some(value) = self._page_size { - params.push(("pageSize", value.to_string())); - } - for &field in ["alt", "courseId", "pageToken", "pageSize"].iter() { + params.push(("id", self._id.to_string())); + for &field in ["alt", "courseId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4372,12 +5446,12 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/teachers".to_string(); + let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::CourseworkMeReadonly.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{courseId}", "courseId")].iter() { + for &(find_this, param_name) in [("{courseId}", "courseId"), ("{id}", "id")].iter() { let mut replace_with: Option<&str> = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -4388,8 +5462,8 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut url = url.replace(find_this, replace_with.expect("to find substitution value in params")); } { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["courseId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["id", "courseId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -4475,28 +5549,26 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* 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 course_id(mut self, new_value: &str) -> CourseTeacherListCall<'a, C, A> { + pub fn course_id(mut self, new_value: &str) -> CourseCourseWorkGetCall<'a, C, A> { self._course_id = new_value.to_string(); self } - /// nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. + /// Identifier of the course work. /// - /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> CourseTeacherListCall<'a, C, A> { - self._page_token = Some(new_value.to_string()); - self - } - /// Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results. + /// Sets the *id* path property to the given value. /// - /// Sets the *page size* query property to the given value. - pub fn page_size(mut self, new_value: i32) -> CourseTeacherListCall<'a, C, A> { - self._page_size = Some(new_value); + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn id(mut self, new_value: &str) -> CourseCourseWorkGetCall<'a, C, A> { + self._id = new_value.to_string(); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -4505,7 +5577,7 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut /// 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 Delegate) -> CourseTeacherListCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> CourseCourseWorkGetCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -4519,20 +5591,20 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> CourseTeacherListCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> CourseCourseWorkGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -4541,7 +5613,7 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut /// Identifies the authorization scope for the method you are building. /// /// Use this method to actively specify which scope should be used, instead the default `Scope` variant - /// `Scope::RosterReadonly`. + /// `Scope::CourseworkMeReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -4549,7 +5621,7 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut /// 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: T) -> CourseTeacherListCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkGetCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -4557,7 +5629,26 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut } -/// Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. +/// Turns in a student submission. +/// +/// Turning in a student submission transfers ownership of attached Drive +/// files to the teacher and may also update the submission state. +/// +/// This may only be called by the student that owns the specified student +/// submission. +/// +/// This request must be made by the Developer Console project of the +/// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to +/// create the corresponding course work item. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to access the +/// requested course or course work, turn in the requested student submission, +/// or for access errors. +/// * `INVALID_ARGUMENT` if the request is malformed. +/// * `NOT_FOUND` if the requested course, course work, or student submission +/// does not exist. /// /// A builder for the *courseWork.studentSubmissions.turnIn* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -4765,7 +5856,9 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionTurnInCall<'a, C, A> where C: Bo self._request = new_value; self } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* path property to the given value. /// @@ -4815,17 +5908,17 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionTurnInCall<'a, C, A> where C: Bo /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseCourseWorkStudentSubmissionTurnInCall<'a, C, A> @@ -4853,7 +5946,24 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionTurnInCall<'a, C, A> where C: Bo } -/// Modifies attachments of student submission. Attachments may only be added to student submissions whose type is `ASSIGNMENT`. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. +/// Modifies attachments of student submission. +/// +/// Attachments may only be added to student submissions belonging to course +/// work objects with a `workType` of `ASSIGNMENT`. +/// +/// This request must be made by the Developer Console project of the +/// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to +/// create the corresponding course work item. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to access the +/// requested course or course work, if the user is not permitted to modify +/// attachments on the requested student submission, or for +/// access errors. +/// * `INVALID_ARGUMENT` if the request is malformed. +/// * `NOT_FOUND` if the requested course, course work, or student submission +/// does not exist. /// /// A builder for the *courseWork.studentSubmissions.modifyAttachments* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -5061,7 +6171,9 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, C, A> w self._request = new_value; self } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* path property to the given value. /// @@ -5111,17 +6223,17 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, C, A> w /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, C, A> @@ -5149,7 +6261,309 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, C, A> w } -/// Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. +/// Returns a list of teachers of this course that the requester +/// is permitted to view. +/// +/// This method returns the following error codes: +/// +/// * `NOT_FOUND` if the course does not exist. +/// * `PERMISSION_DENIED` for access errors. +/// +/// A builder for the *teachers.list* method supported by a *course* resource. +/// It is not used directly, but through a `CourseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_classroom1 as classroom1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use classroom1::Classroom; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Classroom::new(hyper::Client::new(), 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.courses().teachers_list("courseId") +/// .page_token("eirmod") +/// .page_size(-58) +/// .doit(); +/// # } +/// ``` +pub struct CourseTeacherListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Classroom, + _course_id: String, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for CourseTeacherListCall<'a, C, A> {} + +impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListTeachersResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "classroom.courses.teachers.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("courseId", self._course_id.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "courseId", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/teachers".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{courseId}", "courseId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["courseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// + /// Sets the *course id* 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 course_id(mut self, new_value: &str) -> CourseTeacherListCall<'a, C, A> { + self._course_id = new_value.to_string(); + self + } + /// nextPageToken + /// value returned from a previous + /// list call, indicating that + /// the subsequent page of results should be returned. + /// + /// The list request must be + /// otherwise identical to the one that resulted in this token. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> CourseTeacherListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Maximum number of items to return. Zero means no maximum. + /// + /// The server may return fewer than the specified number of results. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> CourseTeacherListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> CourseTeacherListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> CourseTeacherListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::RosterReadonly`. + /// + /// 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: T) -> CourseTeacherListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns a student submission. +/// +/// Returning a student submission transfers ownership of attached Drive +/// files to the student and may also update the submission state. +/// Unlike the Classroom application, returning a student submission does not +/// set assignedGrade to the draftGrade value. +/// +/// Only a teacher of the course that contains the requested student submission +/// may call this method. +/// +/// This request must be made by the Developer Console project of the +/// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to +/// create the corresponding course work item. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to access the +/// requested course or course work, return the requested student submission, +/// or for access errors. +/// * `INVALID_ARGUMENT` if the request is malformed. +/// * `NOT_FOUND` if the requested course, course work, or student submission +/// does not exist. /// /// A builder for the *courseWork.studentSubmissions.return* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -5357,7 +6771,9 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> where C: Bo self._request = new_value; self } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* path property to the given value. /// @@ -5407,17 +6823,17 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> where C: Bo /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> @@ -5445,9 +6861,15 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> where C: Bo } -/// Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. +/// Returns a list of aliases for a course. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to access the +/// course or for access errors. +/// * `NOT_FOUND` if the course does not exist. /// -/// A builder for the *courseWork.get* method supported by a *course* resource. +/// A builder for the *aliases.list* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. /// /// # Example @@ -5471,28 +6893,31 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> where C: Bo /// // 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.courses().course_work_get("courseId", "id") +/// let result = hub.courses().aliases_list("courseId") +/// .page_token("ut") +/// .page_size(-16) /// .doit(); /// # } /// ``` -pub struct CourseCourseWorkGetCall<'a, C, A> +pub struct CourseAliaseListCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Classroom, _course_id: String, - _id: String, + _page_token: Option, + _page_size: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for CourseCourseWorkGetCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for CourseAliaseListCall<'a, C, A> {} -impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, CourseWork)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, ListCourseAliasesResponse)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -5500,12 +6925,17 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "classroom.courses.courseWork.get", + dlg.begin(MethodInfo { id: "classroom.courses.aliases.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("courseId", self._course_id.to_string())); - params.push(("id", self._id.to_string())); - for &field in ["alt", "courseId", "id"].iter() { + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "courseId", "pageToken", "pageSize"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -5517,12 +6947,12 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -5533,8 +6963,8 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(2); - for param_name in ["id", "courseId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["courseId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -5620,24 +7050,39 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut CourseCourseWorkGetCall<'a, C, A> { + pub fn course_id(mut self, new_value: &str) -> CourseAliaseListCall<'a, C, A> { self._course_id = new_value.to_string(); self } - /// Identifier of the course work. + /// nextPageToken + /// value returned from a previous + /// list call, + /// indicating that the subsequent page of results should be returned. + /// + /// The list request + /// must be otherwise identical to the one that resulted in this token. /// - /// Sets the *id* path property to the given value. + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> CourseAliaseListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Maximum number of items to return. Zero or unspecified indicates that the + /// server may assign a maximum. + /// + /// The server may return fewer than the specified number of results. /// - /// Even though the property as already been set when instantiating this call, - /// we provide this method for API completeness. - pub fn id(mut self, new_value: &str) -> CourseCourseWorkGetCall<'a, C, A> { - self._id = new_value.to_string(); + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> CourseAliaseListCall<'a, C, A> { + self._page_size = Some(new_value); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -5646,7 +7091,7 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut CourseCourseWorkGetCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> CourseAliaseListCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -5660,20 +7105,20 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CourseCourseWorkGetCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> CourseAliaseListCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -5682,7 +7127,7 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseCourseWorkGetCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> CourseAliaseListCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -5698,7 +7143,24 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut CourseCourseWorkCreateCall<'a, C, A> where C: BorrowMut CourseCourseWorkCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CourseCourseWorkCreateCall<'a, C, A> @@ -5970,7 +7434,14 @@ impl<'a, C, A> CourseCourseWorkCreateCall<'a, C, A> where C: BorrowMut CourseCourseWorkCreateCall<'a, C, A> where C: BorrowMut CourseListCall<'a, C, A> where C: BorrowMut, A: oa } - /// Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// Restricts returned courses to those having a teacher with the specified + /// identifier. The identifier can be one of the following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user /// /// Sets the *teacher id* query property to the given value. pub fn teacher_id(mut self, new_value: &str) -> CourseListCall<'a, C, A> { self._teacher_id = Some(new_value.to_string()); self } - /// Restricts returned courses to those having a student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// Restricts returned courses to those having a student with the specified + /// identifier. The identifier can be one of the following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user /// /// Sets the *student id* query property to the given value. pub fn student_id(mut self, new_value: &str) -> CourseListCall<'a, C, A> { self._student_id = Some(new_value.to_string()); self } - /// nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. + /// nextPageToken + /// value returned from a previous + /// list call, + /// indicating that the subsequent page of results should be returned. + /// + /// The list request must be + /// otherwise identical to the one that resulted in this token. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CourseListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. + /// Maximum number of items to return. Zero or unspecified indicates that the + /// server may assign a maximum. + /// + /// The server may return fewer than the specified number of results. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> CourseListCall<'a, C, A> { @@ -6176,6 +7666,7 @@ impl<'a, C, A> CourseListCall<'a, C, A> where C: BorrowMut, A: oa self } /// Restricts returned courses to those in one of the specified states + /// The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED. /// /// Append the given value to the *course states* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -6203,17 +7694,17 @@ impl<'a, C, A> CourseListCall<'a, C, A> where C: BorrowMut, A: oa /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseListCall<'a, C, A> @@ -6241,7 +7732,27 @@ impl<'a, C, A> CourseListCall<'a, C, A> where C: BorrowMut, A: oa } -/// Reclaims a student submission on behalf of the student that owns it. Reclaiming a student submission transfers ownership of attached Drive files to the student and update the submission state. Only the student that ownes the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. * `FAILED_PRECONDITION` if the student submission has not been turned in. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. +/// Reclaims a student submission on behalf of the student that owns it. +/// +/// Reclaiming a student submission transfers ownership of attached Drive +/// files to the student and update the submission state. +/// +/// Only the student that owns the requested student submission may call this +/// method, and only for a student submission that has been turned in. +/// +/// This request must be made by the Developer Console project of the +/// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to +/// create the corresponding course work item. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to access the +/// requested course or course work, unsubmit the requested student submission, +/// or for access errors. +/// * `FAILED_PRECONDITION` if the student submission has not been turned in. +/// * `INVALID_ARGUMENT` if the request is malformed. +/// * `NOT_FOUND` if the requested course, course work, or student submission +/// does not exist. /// /// A builder for the *courseWork.studentSubmissions.reclaim* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -6449,7 +7960,9 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReclaimCall<'a, C, A> where C: B self._request = new_value; self } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* path property to the given value. /// @@ -6499,17 +8012,17 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReclaimCall<'a, C, A> where C: B /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseCourseWorkStudentSubmissionReclaimCall<'a, C, A> @@ -6537,7 +8050,17 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReclaimCall<'a, C, A> where C: B } -/// Creates an alias for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors. * `NOT_FOUND` if the course does not exist. * `ALREADY_EXISTS` if the alias already exists. +/// Creates an alias for a course. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to create the +/// alias or for access errors. +/// * `NOT_FOUND` if the course does not exist. +/// * `ALREADY_EXISTS` if the alias already exists. +/// * `FAILED_PRECONDITION` if the alias requested does not make sense for the +/// requesting user or course (for example, if a user not in a domain +/// attempts to access a domain-scoped alias). /// /// A builder for the *aliases.create* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -6741,7 +8264,9 @@ impl<'a, C, A> CourseAliaseCreateCall<'a, C, A> where C: BorrowMut CourseAliaseCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CourseAliaseCreateCall<'a, C, A> @@ -6809,7 +8334,20 @@ impl<'a, C, A> CourseAliaseCreateCall<'a, C, A> where C: BorrowMut CourseAliaseCreateCall<'a, C, A> where C: BorrowMut CourseStudentCreateCall<'a, C, A> where C: BorrowMut CourseStudentCreateCall<'a, C, A> where C: BorrowMut CourseStudentCreateCall<'a, C, A> { @@ -7055,17 +8598,17 @@ impl<'a, C, A> CourseStudentCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CourseStudentCreateCall<'a, C, A> @@ -7093,7 +8636,16 @@ impl<'a, C, A> CourseStudentCreateCall<'a, C, A> where C: BorrowMut CourseAliaseDeleteCall<'a, C, A> where C: BorrowMut CourseAliaseDeleteCall<'a, C, A> where C: BorrowMut CourseAliaseDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CourseAliaseDeleteCall<'a, C, A> @@ -7346,7 +8901,290 @@ impl<'a, C, A> CourseAliaseDeleteCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Classroom::new(hyper::Client::new(), 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.courses().course_work_delete("courseId", "id") +/// .doit(); +/// # } +/// ``` +pub struct CourseCourseWorkDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Classroom, + _course_id: String, + _id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for CourseCourseWorkDeleteCall<'a, C, A> {} + +impl<'a, C, A> CourseCourseWorkDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "classroom.courses.courseWork.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("courseId", self._course_id.to_string())); + params.push(("id", self._id.to_string())); + for &field in ["alt", "courseId", "id"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{id}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CourseworkStudent.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{courseId}", "courseId"), ("{id}", "id")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["id", "courseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// + /// Sets the *course id* 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 course_id(mut self, new_value: &str) -> CourseCourseWorkDeleteCall<'a, C, A> { + self._course_id = new_value.to_string(); + self + } + /// Identifier of the course work to delete. + /// This identifier is a Classroom-assigned identifier. + /// + /// Sets the *id* 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 id(mut self, new_value: &str) -> CourseCourseWorkDeleteCall<'a, C, A> { + self._id = 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. + /// + /// 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 Delegate) -> CourseCourseWorkDeleteCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> CourseCourseWorkDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::CourseworkStudent`. + /// + /// 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: T) -> CourseCourseWorkDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates a course. +/// +/// The user specified in `ownerId` is the owner of the created course +/// and added as a teacher. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to create +/// courses or for access errors. +/// * `NOT_FOUND` if the primary teacher is not a valid user. +/// * `FAILED_PRECONDITION` if the course owner's account is disabled or for +/// the following request errors: +/// * UserGroupsMembershipLimitReached +/// * `ALREADY_EXISTS` if an alias was specified in the `id` and +/// already exists. /// /// A builder for the *create* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -7547,17 +9385,17 @@ impl<'a, C, A> CourseCreateCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseCreateCall<'a, C, A> @@ -7585,7 +9423,13 @@ impl<'a, C, A> CourseCreateCall<'a, C, A> where C: BorrowMut, A: } -/// Returns a list of students of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. * `PERMISSION_DENIED` for access errors. +/// Returns a list of students of this course that the requester +/// is permitted to view. +/// +/// This method returns the following error codes: +/// +/// * `NOT_FOUND` if the course does not exist. +/// * `PERMISSION_DENIED` for access errors. /// /// A builder for the *students.list* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -7613,7 +9457,7 @@ impl<'a, C, A> CourseCreateCall<'a, C, A> where C: BorrowMut, A: /// // Values shown here are possibly random and not representative ! /// let result = hub.courses().students_list("courseId") /// .page_token("vero") -/// .page_size(-28) +/// .page_size(-95) /// .doit(); /// # } /// ``` @@ -7768,7 +9612,9 @@ impl<'a, C, A> CourseStudentListCall<'a, C, A> where C: BorrowMut } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* path property to the given value. /// @@ -7778,14 +9624,22 @@ impl<'a, C, A> CourseStudentListCall<'a, C, A> where C: BorrowMut self._course_id = new_value.to_string(); self } - /// nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. + /// nextPageToken + /// value returned from a previous + /// list call, indicating that + /// the subsequent page of results should be returned. + /// + /// The list request must be + /// otherwise identical to the one that resulted in this token. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CourseStudentListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results. + /// Maximum number of items to return. Zero means no maximum. + /// + /// The server may return fewer than the specified number of results. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> CourseStudentListCall<'a, C, A> { @@ -7812,17 +9666,17 @@ impl<'a, C, A> CourseStudentListCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseStudentListCall<'a, C, A> @@ -7850,7 +9704,13 @@ impl<'a, C, A> CourseStudentListCall<'a, C, A> where C: BorrowMut } -/// Deletes a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. +/// Deletes a course. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to delete the +/// requested course or for access errors. +/// * `NOT_FOUND` if no course exists with the requested ID. /// /// A builder for the *delete* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -8023,7 +9883,9 @@ impl<'a, C, A> CourseDeleteCall<'a, C, A> where C: BorrowMut, A: } - /// Identifier of the course to delete. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course to delete. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *id* path property to the given value. /// @@ -8053,17 +9915,17 @@ impl<'a, C, A> CourseDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseDeleteCall<'a, C, A> @@ -8091,7 +9953,349 @@ impl<'a, C, A> CourseDeleteCall<'a, C, A> where C: BorrowMut, A: } -/// Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable +/// Updates one or more fields of a course work. +/// +/// See google.classroom.v1.CourseWork for details +/// of which fields may be updated and who may change them. +/// +/// This request must be made by the Developer Console project of the +/// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to +/// create the corresponding course work item. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting developer project did not create +/// the corresponding course work, if the user is not permitted to make the +/// requested modification to the student submission, or for +/// access errors. +/// * `INVALID_ARGUMENT` if the request is malformed. +/// * `FAILED_PRECONDITION` if the requested course work has already been +/// deleted. +/// * `NOT_FOUND` if the requested course, course work, or student submission +/// does not exist. +/// +/// A builder for the *courseWork.patch* method supported by a *course* resource. +/// It is not used directly, but through a `CourseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_classroom1 as classroom1; +/// use classroom1::CourseWork; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use classroom1::Classroom; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Classroom::new(hyper::Client::new(), 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 = CourseWork::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.courses().course_work_patch(req, "courseId", "id") +/// .update_mask("duo") +/// .doit(); +/// # } +/// ``` +pub struct CourseCourseWorkPatchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Classroom, + _request: CourseWork, + _course_id: String, + _id: String, + _update_mask: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for CourseCourseWorkPatchCall<'a, C, A> {} + +impl<'a, C, A> CourseCourseWorkPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CourseWork)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "classroom.courses.courseWork.patch", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("courseId", self._course_id.to_string())); + params.push(("id", self._id.to_string())); + if let Some(value) = self._update_mask { + params.push(("updateMask", value.to_string())); + } + for &field in ["alt", "courseId", "id", "updateMask"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{id}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CourseworkStudent.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{courseId}", "courseId"), ("{id}", "id")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["id", "courseId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: CourseWork) -> CourseCourseWorkPatchCall<'a, C, A> { + self._request = new_value; + self + } + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. + /// + /// Sets the *course id* 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 course_id(mut self, new_value: &str) -> CourseCourseWorkPatchCall<'a, C, A> { + self._course_id = new_value.to_string(); + self + } + /// Identifier of the course work. + /// + /// Sets the *id* 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 id(mut self, new_value: &str) -> CourseCourseWorkPatchCall<'a, C, A> { + self._id = new_value.to_string(); + self + } + /// Mask that identifies which fields on the course work to update. + /// This field is required to do an update. The update fails if invalid + /// fields are specified. If a field supports empty values, it can be cleared + /// by specifying it in the update mask and not in the CourseWork object. If a + /// field that does not support empty values is included in the update mask and + /// not set in the CourseWork object, an `INVALID_ARGUMENT` error will be + /// returned. + /// + /// The following fields may be specified by teachers: + /// * `title` + /// * `description` + /// * `state` + /// * `due_date` + /// * `due_time` + /// * `max_points` + /// * `submission_modification_mode` + /// + /// Sets the *update mask* query property to the given value. + pub fn update_mask(mut self, new_value: &str) -> CourseCourseWorkPatchCall<'a, C, A> { + self._update_mask = 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. + /// + /// 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 Delegate) -> CourseCourseWorkPatchCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> CourseCourseWorkPatchCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::CourseworkStudent`. + /// + /// 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: T) -> CourseCourseWorkPatchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates one or more fields in a course. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to modify the +/// requested course or for access errors. +/// * `NOT_FOUND` if no course exists with the requested ID. +/// * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or +/// if no update mask is supplied. +/// * `FAILED_PRECONDITION` for the following request errors: +/// * CourseNotModifiable /// /// A builder for the *patch* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -8124,7 +10328,7 @@ impl<'a, C, A> CourseDeleteCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.courses().patch(req, "id") -/// .update_mask("sadipscing") +/// .update_mask("Lorem") /// .doit(); /// # } /// ``` @@ -8300,7 +10504,9 @@ impl<'a, C, A> CoursePatchCall<'a, C, A> where C: BorrowMut, A: o self._request = new_value; self } - /// Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course to update. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *id* path property to the given value. /// @@ -8310,7 +10516,20 @@ impl<'a, C, A> CoursePatchCall<'a, C, A> where C: BorrowMut, A: o self._id = new_value.to_string(); self } - /// Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `name` * `section` * `descriptionHeading` * `description` * `room` * `courseState` When set in a query parameter, this field should be specified as `updateMask=,,...` + /// Mask that identifies which fields on the course to update. + /// This field is required to do an update. The update will fail if invalid + /// fields are specified. The following fields are valid: + /// + /// * `name` + /// * `section` + /// * `descriptionHeading` + /// * `description` + /// * `room` + /// * `courseState` + /// + /// When set in a query parameter, this field should be specified as + /// + /// `updateMask=,,...` /// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> CoursePatchCall<'a, C, A> { @@ -8337,17 +10556,17 @@ impl<'a, C, A> CoursePatchCall<'a, C, A> where C: BorrowMut, A: o /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CoursePatchCall<'a, C, A> @@ -8375,9 +10594,16 @@ impl<'a, C, A> CoursePatchCall<'a, C, A> where C: BorrowMut, A: o } -/// Returns a list of aliases for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the course or for access errors. * `NOT_FOUND` if the course does not exist. +/// Deletes a student of a course. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to delete +/// students of this course or for access errors. +/// * `NOT_FOUND` if no student of this course has the requested ID or if the +/// course does not exist. /// -/// A builder for the *aliases.list* method supported by a *course* resource. +/// A builder for the *students.delete* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. /// /// # Example @@ -8401,31 +10627,28 @@ impl<'a, C, A> CoursePatchCall<'a, C, A> where C: BorrowMut, A: o /// // 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.courses().aliases_list("courseId") -/// .page_token("sadipscing") -/// .page_size(-88) +/// let result = hub.courses().students_delete("courseId", "userId") /// .doit(); /// # } /// ``` -pub struct CourseAliaseListCall<'a, C, A> +pub struct CourseStudentDeleteCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Classroom, _course_id: String, - _page_token: Option, - _page_size: Option, + _user_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for CourseAliaseListCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for CourseStudentDeleteCall<'a, C, A> {} -impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ListCourseAliasesResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -8433,17 +10656,12 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "classroom.courses.aliases.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "classroom.courses.students.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("courseId", self._course_id.to_string())); - if let Some(value) = self._page_token { - params.push(("pageToken", value.to_string())); - } - if let Some(value) = self._page_size { - params.push(("pageSize", value.to_string())); - } - for &field in ["alt", "courseId", "pageToken", "pageSize"].iter() { + params.push(("userId", self._user_id.to_string())); + for &field in ["alt", "courseId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -8455,12 +10673,12 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/aliases".to_string(); + let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/students/{userId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::CourseReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Roster.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{courseId}", "courseId")].iter() { + for &(find_this, param_name) in [("{courseId}", "courseId"), ("{userId}", "userId")].iter() { let mut replace_with: Option<&str> = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -8471,8 +10689,8 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, url = url.replace(find_this, replace_with.expect("to find substitution value in params")); } { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["courseId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["userId", "courseId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -8505,7 +10723,7 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) .header(UserAgent(self.hub._user_agent.clone())) .header(auth_header.clone()); @@ -8558,28 +10776,31 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, } - /// The identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* 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 course_id(mut self, new_value: &str) -> CourseAliaseListCall<'a, C, A> { + pub fn course_id(mut self, new_value: &str) -> CourseStudentDeleteCall<'a, C, A> { self._course_id = new_value.to_string(); self } - /// nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. + /// Identifier of the student to delete. The identifier can be one of the + /// following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user /// - /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> CourseAliaseListCall<'a, C, A> { - self._page_token = Some(new_value.to_string()); - self - } - /// Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. + /// Sets the *user id* path property to the given value. /// - /// Sets the *page size* query property to the given value. - pub fn page_size(mut self, new_value: i32) -> CourseAliaseListCall<'a, C, A> { - self._page_size = Some(new_value); + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn user_id(mut self, new_value: &str) -> CourseStudentDeleteCall<'a, C, A> { + self._user_id = new_value.to_string(); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -8588,7 +10809,7 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, /// 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 Delegate) -> CourseAliaseListCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> CourseStudentDeleteCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -8602,20 +10823,20 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> CourseAliaseListCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> CourseStudentDeleteCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -8624,7 +10845,7 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// /// Use this method to actively specify which scope should be used, instead the default `Scope` variant - /// `Scope::CourseReadonly`. + /// `Scope::Roster`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8632,7 +10853,7 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, /// 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: T) -> CourseAliaseListCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> CourseStudentDeleteCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -8640,7 +10861,16 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, } -/// Deletes a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course. +/// Deletes a teacher of a course. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to delete +/// teachers of this course or for access errors. +/// * `NOT_FOUND` if no teacher of this course has the requested ID or if the +/// course does not exist. +/// * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher +/// of this course. /// /// A builder for the *teachers.delete* method supported by a *course* resource. /// It is not used directly, but through a `CourseMethods` instance. @@ -8815,7 +11045,9 @@ impl<'a, C, A> CourseTeacherDeleteCall<'a, C, A> where C: BorrowMut CourseTeacherDeleteCall<'a, C, A> where C: BorrowMut CourseTeacherDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CourseTeacherDeleteCall<'a, C, A> @@ -8893,7 +11130,21 @@ impl<'a, C, A> CourseTeacherDeleteCall<'a, C, A> where C: BorrowMut CourseTeacherCreateCall<'a, C, A> where C: BorrowMut CourseTeacherCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> CourseTeacherCreateCall<'a, C, A> @@ -9165,7 +11418,14 @@ impl<'a, C, A> CourseTeacherCreateCall<'a, C, A> where C: BorrowMut CourseCourseWorkStudentSubmissionGetCall<'a, C, A> where C: Borro } - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. + /// Identifier of the course. + /// This identifier can be either the Classroom-assigned identifier or an + /// alias. /// /// Sets the *course id* path property to the given value. /// @@ -9392,17 +11654,17 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionGetCall<'a, C, A> where C: Borro /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CourseCourseWorkStudentSubmissionGetCall<'a, C, A> @@ -9430,260 +11692,21 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionGetCall<'a, C, A> where C: Borro } -/// Returns a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view students of this course or for access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist. -/// -/// A builder for the *students.get* method supported by a *course* resource. -/// It is not used directly, but through a `CourseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_classroom1 as classroom1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use classroom1::Classroom; +/// Returns a specific guardian. /// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Classroom::new(hyper::Client::new(), 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.courses().students_get("courseId", "userId") -/// .doit(); -/// # } -/// ``` -pub struct CourseStudentGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Classroom, - _course_id: String, - _user_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for CourseStudentGetCall<'a, C, A> {} - -impl<'a, C, A> CourseStudentGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Student)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "classroom.courses.students.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("courseId", self._course_id.to_string())); - params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "courseId", "userId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/students/{userId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{courseId}", "courseId"), ("{userId}", "userId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["userId", "courseId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. - /// - /// Sets the *course id* 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 course_id(mut self, new_value: &str) -> CourseStudentGetCall<'a, C, A> { - self._course_id = new_value.to_string(); - self - } - /// Identifier of the student to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user - /// - /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> CourseStudentGetCall<'a, C, A> { - self._user_id = 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. - /// - /// 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 Delegate) -> CourseStudentGetCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> CourseStudentGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::RosterReadonly`. - /// - /// 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: T) -> CourseStudentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Returns a specific guardian. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian information for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of the given student or `guardian_id`, or if the guardian has been disabled. +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if no user that matches the provided `student_id` +/// is visible to the requesting user, if the requesting user is not +/// permitted to view guardian information for the student identified by the +/// `student_id`, if guardians are not enabled for the domain in question, +/// or for other access errors. +/// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot +/// be recognized (it is not an email address, nor a `student_id` from the +/// API, nor the literal string `me`). +/// * `NOT_FOUND` if the requesting user is permitted to view guardians for +/// the requested `student_id`, but no `Guardian` record exists for that +/// student that matches the provided `guardian_id`. /// /// A builder for the *guardians.get* method supported by a *userProfile* resource. /// It is not used directly, but through a `UserProfileMethods` instance. @@ -9852,7 +11875,11 @@ impl<'a, C, A> UserProfileGuardianGetCall<'a, C, A> where C: BorrowMut UserProfileGuardianGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> UserProfileGuardianGetCall<'a, C, A> @@ -9914,7 +11941,36 @@ impl<'a, C, A> UserProfileGuardianGetCall<'a, C, A> where C: BorrowMut UserProfileGuardianInvitationCreateCall<'a, C, A> where C: Borrow /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> UserProfileGuardianInvitationCreateCall<'a, C, A> @@ -10164,7 +12220,13 @@ impl<'a, C, A> UserProfileGuardianInvitationCreateCall<'a, C, A> where C: Borrow } -/// Returns a user profile. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access this user profile or if no profile exists with the requested ID or for access errors. +/// Returns a user profile. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to access +/// this user profile, if no profile exists with the requested ID, or for +/// access errors. /// /// A builder for the *get* method supported by a *userProfile* resource. /// It is not used directly, but through a `UserProfileMethods` instance. @@ -10337,7 +12399,12 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A } - /// Identifier of the profile to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user + /// Identifier of the profile to return. The identifier can be one of the + /// following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user /// /// Sets the *user id* path property to the given value. /// @@ -10367,17 +12434,17 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> UserProfileGetCall<'a, C, A> @@ -10405,7 +12472,24 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A } -/// Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other access errors. * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom. +/// Modifies a guardian invitation. +/// +/// Currently, the only valid modification is to change the `state` from +/// `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the current user does not have permission to +/// manage guardians, if guardians are not enabled for the domain in question +/// or for other access errors. +/// * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. +/// * `INVALID_ARGUMENT` if the format of the student ID provided +/// cannot be recognized (it is not an email address, nor a `user_id` from +/// this API), or if the passed `GuardianInvitation` has a `state` other than +/// `COMPLETE`, or if it modifies fields other than `state`. +/// * `NOT_FOUND` if the student ID provided is a valid student ID, but +/// Classroom has no record of that student, or if the `id` field does not +/// refer to a guardian invitation known to Classroom. /// /// A builder for the *guardianInvitations.patch* method supported by a *userProfile* resource. /// It is not used directly, but through a `UserProfileMethods` instance. @@ -10438,7 +12522,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.user_profiles().guardian_invitations_patch(req, "studentId", "invitationId") -/// .update_mask("labore") +/// .update_mask("dolore") /// .doit(); /// # } /// ``` @@ -10630,7 +12714,15 @@ impl<'a, C, A> UserProfileGuardianInvitationPatchCall<'a, C, A> where C: BorrowM self._invitation_id = new_value.to_string(); self } - /// Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `state` When set in a query parameter, this field should be specified as `updateMask=,,...` + /// Mask that identifies which fields on the course to update. + /// This field is required to do an update. The update will fail if invalid + /// fields are specified. The following fields are valid: + /// + /// * `state` + /// + /// When set in a query parameter, this field should be specified as + /// + /// `updateMask=,,...` /// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> UserProfileGuardianInvitationPatchCall<'a, C, A> { @@ -10657,17 +12749,17 @@ impl<'a, C, A> UserProfileGuardianInvitationPatchCall<'a, C, A> where C: BorrowM /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> UserProfileGuardianInvitationPatchCall<'a, C, A> @@ -10679,7 +12771,20 @@ impl<'a, C, A> UserProfileGuardianInvitationPatchCall<'a, C, A> where C: BorrowM } -/// Returns a specific guardian invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian invitations for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of the given student or `invitation_id`. May also be returned if the student exists, but the requesting user does not have access to see that student. +/// Returns a specific guardian invitation. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to view +/// guardian invitations for the student identified by the `student_id`, if +/// guardians are not enabled for the domain in question, or for other +/// access errors. +/// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot +/// be recognized (it is not an email address, nor a `student_id` from the +/// API, nor the literal string `me`). +/// * `NOT_FOUND` if Classroom cannot find any record of the given student or +/// `invitation_id`. May also be returned if the student exists, but the +/// requesting user does not have access to see that student. /// /// A builder for the *guardianInvitations.get* method supported by a *userProfile* resource. /// It is not used directly, but through a `UserProfileMethods` instance. @@ -10888,17 +12993,17 @@ impl<'a, C, A> UserProfileGuardianInvitationGetCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> UserProfileGuardianInvitationGetCall<'a, C, A> @@ -10910,7 +13015,26 @@ impl<'a, C, A> UserProfileGuardianInvitationGetCall<'a, C, A> where C: BorrowMut } -/// Returns a list of guardians that the requesting user is permitted to view, restricted to those that match the request. To list guardians for any student that the requesting user may view guardians for, use the literal character `-` for the student ID. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian information for that student, if `"-"` is specified as the `student_id` and the user is not a domain administrator, if guardians are not enabled for the domain in question, if the `invited_email_address` filter is set by a user who is not a domain administrator, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student. +/// Returns a list of guardians that the requesting user is permitted to +/// view, restricted to those that match the request. +/// +/// To list guardians for any student that the requesting user may view +/// guardians for, use the literal character `-` for the student ID. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting +/// user is not permitted to view guardian information for that student, if +/// `"-"` is specified as the `student_id` and the user is not a domain +/// administrator, if guardians are not enabled for the domain in question, +/// if the `invited_email_address` filter is set by a user who is not a +/// domain administrator, or for other access errors. +/// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot +/// be recognized (it is not an email address, nor a `student_id` from the +/// API, nor the literal string `me`). May also be returned if an invalid +/// `page_token` is provided. +/// * `NOT_FOUND` if a `student_id` is specified, and its format can be +/// recognized, but Classroom has no record of that student. /// /// A builder for the *guardians.list* method supported by a *userProfile* resource. /// It is not used directly, but through a `UserProfileMethods` instance. @@ -10937,9 +13061,9 @@ impl<'a, C, A> UserProfileGuardianInvitationGetCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.user_profiles().guardians_list("studentId") -/// .page_token("rebum.") -/// .page_size(-33) -/// .invited_email_address("nonumy") +/// .page_token("sit") +/// .page_size(-40) +/// .invited_email_address("consetetur") /// .doit(); /// # } /// ``` @@ -11092,7 +13216,14 @@ impl<'a, C, A> UserProfileGuardianListCall<'a, C, A> where C: BorrowMut UserProfileGuardianListCall<'a, C, A> where C: BorrowMut UserProfileGuardianListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. + /// Maximum number of items to return. Zero or unspecified indicates that the + /// server may assign a maximum. + /// + /// The server may return fewer than the specified number of results. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> UserProfileGuardianListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// Filter results by the email address that the original invitation was sent to, resulting in this guardian link. This filter can only be used by domain administrators. + /// Filter results by the email address that the original invitation was sent + /// to, resulting in this guardian link. + /// This filter can only be used by domain administrators. /// /// Sets the *invited email address* query property to the given value. pub fn invited_email_address(mut self, new_value: &str) -> UserProfileGuardianListCall<'a, C, A> { @@ -11143,17 +13285,17 @@ impl<'a, C, A> UserProfileGuardianListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> UserProfileGuardianListCall<'a, C, A> @@ -11165,7 +13307,22 @@ impl<'a, C, A> UserProfileGuardianListCall<'a, C, A> where C: BorrowMut UserProfileGuardianListCall<'a, C, A> where C: BorrowMut UserProfileGuardianInvitationListCall<'a, C, A> where C: BorrowMu } - /// The ID of the student whose guardian invitations are to be returned. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user * the string literal `"-"`, indicating that results should be returned for all students that the requesting user is permitted to view guardian invitations. + /// The ID of the student whose guardian invitations are to be returned. + /// The identifier can be one of the following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user + /// * the string literal `"-"`, indicating that results should be returned for + /// all students that the requesting user is permitted to view guardian + /// invitations. /// /// Sets the *student id* path property to the given value. /// @@ -11364,7 +13529,8 @@ impl<'a, C, A> UserProfileGuardianInvitationListCall<'a, C, A> where C: BorrowMu self._student_id = new_value.to_string(); self } - /// If specified, only results with the specified `state` values will be returned. Otherwise, results with a `state` of `PENDING` will be returned. + /// If specified, only results with the specified `state` values will be + /// returned. Otherwise, results with a `state` of `PENDING` will be returned. /// /// Append the given value to the *states* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -11372,21 +13538,31 @@ impl<'a, C, A> UserProfileGuardianInvitationListCall<'a, C, A> where C: BorrowMu self._states.push(new_value.to_string()); self } - /// nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. + /// nextPageToken + /// value returned from a previous + /// list call, + /// indicating that the subsequent page of results should be returned. + /// + /// The list request + /// must be otherwise identical to the one that resulted in this token. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UserProfileGuardianInvitationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. + /// Maximum number of items to return. Zero or unspecified indicates that the + /// server may assign a maximum. + /// + /// The server may return fewer than the specified number of results. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> UserProfileGuardianInvitationListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// If specified, only results with the specified `invited_email_address` will be returned. + /// If specified, only results with the specified `invited_email_address` + /// will be returned. /// /// Sets the *invited email address* query property to the given value. pub fn invited_email_address(mut self, new_value: &str) -> UserProfileGuardianInvitationListCall<'a, C, A> { @@ -11413,17 +13589,17 @@ impl<'a, C, A> UserProfileGuardianInvitationListCall<'a, C, A> where C: BorrowMu /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> UserProfileGuardianInvitationListCall<'a, C, A> @@ -11435,7 +13611,24 @@ impl<'a, C, A> UserProfileGuardianInvitationListCall<'a, C, A> where C: BorrowMu } -/// Deletes a guardian. The guardian will no longer receive guardian notifications and the guardian will no longer be accessible via the API. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to manage guardians for the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API). * `NOT_FOUND` if Classroom cannot find any record of the given `student_id` or `guardian_id`, or if the guardian has already been disabled. +/// Deletes a guardian. +/// +/// The guardian will no longer receive guardian notifications and the guardian +/// will no longer be accessible via the API. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if no user that matches the provided `student_id` +/// is visible to the requesting user, if the requesting user is not +/// permitted to manage guardians for the student identified by the +/// `student_id`, if guardians are not enabled for the domain in question, +/// or for other access errors. +/// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot +/// be recognized (it is not an email address, nor a `student_id` from the +/// API). +/// * `NOT_FOUND` if the requesting user is permitted to modify guardians for +/// the requested `student_id`, but no `Guardian` record exists for that +/// student with the provided `guardian_id`. /// /// A builder for the *guardians.delete* method supported by a *userProfile* resource. /// It is not used directly, but through a `UserProfileMethods` instance. @@ -11604,7 +13797,11 @@ impl<'a, C, A> UserProfileGuardianDeleteCall<'a, C, A> where C: BorrowMut UserProfileGuardianDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> UserProfileGuardianDeleteCall<'a, C, A> @@ -11666,7 +13863,13 @@ impl<'a, C, A> UserProfileGuardianDeleteCall<'a, C, A> where C: BorrowMut InvitationDeleteCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> InvitationDeleteCall<'a, C, A> @@ -11907,263 +14110,18 @@ impl<'a, C, A> InvitationDeleteCall<'a, C, A> where C: BorrowMut, } -/// Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request. *Note:* At least one of `user_id` or `course_id` must be supplied. Both fields can be supplied. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. -/// -/// A builder for the *list* method supported by a *invitation* resource. -/// It is not used directly, but through a `InvitationMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_classroom1 as classroom1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use classroom1::Classroom; +/// Creates an invitation. Only one invitation for a user and course may exist +/// at a time. Delete and re-create an invitation to make changes. /// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Classroom::new(hyper::Client::new(), 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.invitations().list() -/// .user_id("gubergren") -/// .page_token("aliquyam") -/// .page_size(-24) -/// .course_id("tempor") -/// .doit(); -/// # } -/// ``` -pub struct InvitationListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Classroom, - _user_id: Option, - _page_token: Option, - _page_size: Option, - _course_id: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for InvitationListCall<'a, C, A> {} - -impl<'a, C, A> InvitationListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ListInvitationsResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "classroom.invitations.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); - if let Some(value) = self._user_id { - params.push(("userId", value.to_string())); - } - if let Some(value) = self._page_token { - params.push(("pageToken", value.to_string())); - } - if let Some(value) = self._page_size { - params.push(("pageSize", value.to_string())); - } - if let Some(value) = self._course_id { - params.push(("courseId", value.to_string())); - } - for &field in ["alt", "userId", "pageToken", "pageSize", "courseId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://classroom.googleapis.com/v1/invitations".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// Restricts returned invitations to those for a specific user. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user - /// - /// Sets the *user id* query property to the given value. - pub fn user_id(mut self, new_value: &str) -> InvitationListCall<'a, C, A> { - self._user_id = Some(new_value.to_string()); - self - } - /// nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. - /// - /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> InvitationListCall<'a, C, A> { - self._page_token = Some(new_value.to_string()); - self - } - /// Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results. - /// - /// Sets the *page size* query property to the given value. - pub fn page_size(mut self, new_value: i32) -> InvitationListCall<'a, C, A> { - self._page_size = Some(new_value); - self - } - /// Restricts returned invitations to those for a course with the specified identifier. - /// - /// Sets the *course id* query property to the given value. - pub fn course_id(mut self, new_value: &str) -> InvitationListCall<'a, C, A> { - self._course_id = 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. - /// - /// 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 Delegate) -> InvitationListCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> InvitationListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::RosterReadonly`. - /// - /// 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: T) -> InvitationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create invitations for this course or for access errors. * `NOT_FOUND` if the course or the user does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled or if the user already has this role or a role with greater permissions. * `ALREADY_EXISTS` if an invitation for the specified user and course already exists. +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to create +/// invitations for this course or for access errors. +/// * `NOT_FOUND` if the course or the user does not exist. +/// * `FAILED_PRECONDITION` if the requested user's account is disabled or if +/// the user already has this role or a role with greater permissions. +/// * `ALREADY_EXISTS` if an invitation for the specified user and course +/// already exists. /// /// A builder for the *create* method supported by a *invitation* resource. /// It is not used directly, but through a `InvitationMethods` instance. @@ -12364,17 +14322,17 @@ impl<'a, C, A> InvitationCreateCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> InvitationCreateCall<'a, C, A> @@ -12402,7 +14360,291 @@ impl<'a, C, A> InvitationCreateCall<'a, C, A> where C: BorrowMut, } -/// Returns an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view the requested invitation or for access errors. * `NOT_FOUND` if no invitation exists with the requested ID. +/// Returns a list of invitations that the requesting user is permitted to +/// view, restricted to those that match the list request. +/// +/// *Note:* At least one of `user_id` or `course_id` must be supplied. Both +/// fields can be supplied. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` for access errors. +/// +/// A builder for the *list* method supported by a *invitation* resource. +/// It is not used directly, but through a `InvitationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_classroom1 as classroom1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use classroom1::Classroom; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Classroom::new(hyper::Client::new(), 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.invitations().list() +/// .user_id("labore") +/// .page_token("ipsum") +/// .page_size(-31) +/// .course_id("dolores") +/// .doit(); +/// # } +/// ``` +pub struct InvitationListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Classroom, + _user_id: Option, + _page_token: Option, + _page_size: Option, + _course_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for InvitationListCall<'a, C, A> {} + +impl<'a, C, A> InvitationListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListInvitationsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "classroom.invitations.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + if let Some(value) = self._user_id { + params.push(("userId", value.to_string())); + } + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._course_id { + params.push(("courseId", value.to_string())); + } + for &field in ["alt", "userId", "pageToken", "pageSize", "courseId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://classroom.googleapis.com/v1/invitations".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Restricts returned invitations to those for a specific user. The identifier + /// can be one of the following: + /// + /// * the numeric identifier for the user + /// * the email address of the user + /// * the string literal `"me"`, indicating the requesting user + /// + /// Sets the *user id* query property to the given value. + pub fn user_id(mut self, new_value: &str) -> InvitationListCall<'a, C, A> { + self._user_id = Some(new_value.to_string()); + self + } + /// nextPageToken + /// value returned from a previous + /// list call, indicating + /// that the subsequent page of results should be returned. + /// + /// The list request must be + /// otherwise identical to the one that resulted in this token. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> InvitationListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Maximum number of items to return. Zero means no maximum. + /// + /// The server may return fewer than the specified number of results. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> InvitationListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// Restricts returned invitations to those for a course with the specified + /// identifier. + /// + /// Sets the *course id* query property to the given value. + pub fn course_id(mut self, new_value: &str) -> InvitationListCall<'a, C, A> { + self._course_id = 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. + /// + /// 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 Delegate) -> InvitationListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> InvitationListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::RosterReadonly`. + /// + /// 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: T) -> InvitationListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns an invitation. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to view the +/// requested invitation or for access errors. +/// * `NOT_FOUND` if no invitation exists with the requested ID. /// /// A builder for the *get* method supported by a *invitation* resource. /// It is not used directly, but through a `InvitationMethods` instance. @@ -12605,17 +14847,17 @@ impl<'a, C, A> InvitationGetCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> InvitationGetCall<'a, C, A> @@ -12643,7 +14885,20 @@ impl<'a, C, A> InvitationGetCall<'a, C, A> where C: BorrowMut, A: } -/// Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to accept the requested invitation or for access errors. * `FAILED_PRECONDITION` for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `NOT_FOUND` if no invitation exists with the requested ID. +/// Accepts an invitation, removing it and adding the invited user to the +/// teachers or students (as appropriate) of the specified course. Only the +/// invited user may accept an invitation. +/// +/// This method returns the following error codes: +/// +/// * `PERMISSION_DENIED` if the requesting user is not permitted to accept the +/// requested invitation or for access errors. +/// * `FAILED_PRECONDITION` for the following request errors: +/// * CourseMemberLimitReached +/// * CourseNotModifiable +/// * CourseTeacherLimitReached +/// * UserGroupsMembershipLimitReached +/// * `NOT_FOUND` if no invitation exists with the requested ID. /// /// A builder for the *accept* method supported by a *invitation* resource. /// It is not used directly, but through a `InvitationMethods` instance. @@ -12846,17 +15101,17 @@ impl<'a, C, A> InvitationAcceptCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> InvitationAcceptCall<'a, C, A> diff --git a/gen/cloudbilling1-cli/Cargo.toml b/gen/cloudbilling1-cli/Cargo.toml index d7ef0da658..3cd8b78ef2 100644 --- a/gen/cloudbilling1-cli/Cargo.toml +++ b/gen/cloudbilling1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudbilling1-cli" -version = "1.0.4+20151222" +version = "1.0.4+20170504" authors = ["Sebastian Thiel "] description = "A complete library to interact with cloudbilling (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudbilling1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-cloudbilling1] path = "../cloudbilling1" -version = "1.0.4+20151222" +version = "1.0.4+20170504" diff --git a/gen/cloudbilling1-cli/README.md b/gen/cloudbilling1-cli/README.md index 001064ea72..b05c9a8849 100644 --- a/gen/cloudbilling1-cli/README.md +++ b/gen/cloudbilling1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *cloudbilling* API at revision *20151222*. The CLI is at version *1.0.4*. +This documentation was generated from the *cloudbilling* API at revision *20170504*. The CLI is at version *1.0.4*. ```bash cloudbilling1 [options] diff --git a/gen/cloudbilling1-cli/mkdocs.yml b/gen/cloudbilling1-cli/mkdocs.yml index d4d6366c22..5cbbe2cf48 100644 --- a/gen/cloudbilling1-cli/mkdocs.yml +++ b/gen/cloudbilling1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: cloudbilling v1.0.4+20151222 +site_name: cloudbilling v1.0.4+20170504 site_url: http://byron.github.io/google-apis-rs/google-cloudbilling1-cli site_description: A complete library to interact with cloudbilling (protocol v1) diff --git a/gen/cloudbilling1-cli/src/main.rs b/gen/cloudbilling1-cli/src/main.rs index fc65cec550..b209c36c1d 100644 --- a/gen/cloudbilling1-cli/src/main.rs +++ b/gen/cloudbilling1-cli/src/main.rs @@ -480,12 +480,15 @@ fn main() { let arg_data = [ ("billing-accounts", "methods: 'get', 'list' and 'projects-list'", vec![ ("get", - Some(r##"Gets information about a billing account. The current authenticated user must be an [owner of the billing account](https://support.google.com/cloud/answer/4430947)."##), + Some(r##"Gets information about a billing account. The current authenticated user + must be an [owner of the billing + account](https://support.google.com/cloud/answer/4430947)."##), "Details at http://byron.github.io/google-apis-rs/google_cloudbilling1_cli/billing-accounts_get", vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the billing account to retrieve. For example, `billingAccounts/012345-567890-ABCDEF`."##), + Some(r##"The resource name of the billing account to retrieve. For example, + `billingAccounts/012345-567890-ABCDEF`."##), Some(true), Some(false)), @@ -502,7 +505,8 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Lists the billing accounts that the current authenticated user [owns](https://support.google.com/cloud/answer/4430947)."##), + Some(r##"Lists the billing accounts that the current authenticated user + [owns](https://support.google.com/cloud/answer/4430947)."##), "Details at http://byron.github.io/google-apis-rs/google_cloudbilling1_cli/billing-accounts_list", vec![ (Some(r##"v"##), @@ -518,12 +522,15 @@ fn main() { Some(false)), ]), ("projects-list", - Some(r##"Lists the projects associated with a billing account. The current authenticated user must be an [owner of the billing account](https://support.google.com/cloud/answer/4430947)."##), + Some(r##"Lists the projects associated with a billing account. The current + authenticated user must be an [owner of the billing + account](https://support.google.com/cloud/answer/4430947)."##), "Details at http://byron.github.io/google-apis-rs/google_cloudbilling1_cli/billing-accounts_projects-list", vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the billing account associated with the projects that you want to list. For example, `billingAccounts/012345-567890-ABCDEF`."##), + Some(r##"The resource name of the billing account associated with the projects that + you want to list. For example, `billingAccounts/012345-567890-ABCDEF`."##), Some(true), Some(false)), @@ -543,12 +550,16 @@ fn main() { ("projects", "methods: 'get-billing-info' and 'update-billing-info'", vec![ ("get-billing-info", - Some(r##"Gets the billing information for a project. The current authenticated user must have [permission to view the project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo )."##), + Some(r##"Gets the billing information for a project. The current authenticated user + must have [permission to view the + project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + )."##), "Details at http://byron.github.io/google-apis-rs/google_cloudbilling1_cli/projects_get-billing-info", vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the project for which billing information is retrieved. For example, `projects/tokyo-rain-123`."##), + Some(r##"The resource name of the project for which billing information is + retrieved. For example, `projects/tokyo-rain-123`."##), Some(true), Some(false)), @@ -565,12 +576,43 @@ fn main() { Some(false)), ]), ("update-billing-info", - Some(r##"Sets or updates the billing account associated with a project. You specify the new billing account by setting the `billing_account_name` in the `ProjectBillingInfo` resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges. *Note:* Incurred charges that have not yet been reported in the transaction history of the Google Developers Console may be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project. The current authenticated user must have ownership privileges for both the [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing account](https://support.google.com/cloud/answer/4430947). You can disable billing on the project by setting the `billing_account_name` field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project. Note that associating a project with a *closed* billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an *open* billing account."##), + Some(r##"Sets or updates the billing account associated with a project. You specify + the new billing account by setting the `billing_account_name` in the + `ProjectBillingInfo` resource to the resource name of a billing account. + Associating a project with an open billing account enables billing on the + project and allows charges for resource usage. If the project already had a + billing account, this method changes the billing account used for resource + usage charges. + + *Note:* Incurred charges that have not yet been reported in the transaction + history of the Google Cloud Console may be billed to the new billing + account, even if the charge occurred before the new billing account was + assigned to the project. + + The current authenticated user must have ownership privileges for both the + [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + ) and the [billing + account](https://support.google.com/cloud/answer/4430947). + + You can disable billing on the project by setting the + `billing_account_name` field to empty. This action disassociates the + current billing account from the project. Any billable activity of your + in-use services will stop, and your application could stop functioning as + expected. Any unbilled charges to date will be billed to the previously + associated account. The current authenticated user must be either an owner + of the project or an owner of the billing account for the project. + + Note that associating a project with a *closed* billing account will have + much the same effect as disabling billing on the project: any paid + resources used by the project will be shut down. Thus, unless you wish to + disable billing, you should always call this method with the name of an + *open* billing account."##), "Details at http://byron.github.io/google-apis-rs/google_cloudbilling1_cli/projects_update-billing-info", vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the project associated with the billing information that you want to update. For example, `projects/tokyo-rain-123`."##), + Some(r##"The resource name of the project associated with the billing information + that you want to update. For example, `projects/tokyo-rain-123`."##), Some(true), Some(false)), @@ -598,8 +640,9 @@ fn main() { let mut app = App::new("cloudbilling1") .author("Sebastian Thiel ") - .version("1.0.4+20151222") - .about("Retrieves Google Developers Console billing accounts and associates them with projects.") + .version("1.0.4+20170504") + .about("Allows developers to manage billing for their Google Cloud Platform projects + programmatically.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudbilling1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/cloudbilling1/Cargo.toml b/gen/cloudbilling1/Cargo.toml index db9ceb77a3..72da7e7593 100644 --- a/gen/cloudbilling1/Cargo.toml +++ b/gen/cloudbilling1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-cloudbilling1" -version = "1.0.4+20151222" +version = "1.0.4+20170504" authors = ["Sebastian Thiel "] description = "A complete library to interact with cloudbilling (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudbilling1" homepage = "https://cloud.google.com/billing/" -documentation = "https://docs.rs/google-cloudbilling1/1.0.4+20151222" +documentation = "https://docs.rs/google-cloudbilling1/1.0.4+20170504" license = "MIT" keywords = ["cloudbilling", "google", "protocol", "web", "api"] diff --git a/gen/cloudbilling1/README.md b/gen/cloudbilling1/README.md index f68a47f613..4ad3171a75 100644 --- a/gen/cloudbilling1/README.md +++ b/gen/cloudbilling1/README.md @@ -5,18 +5,18 @@ DO NOT EDIT ! --> The `google-cloudbilling1` library allows access to all features of the *Google cloudbilling* service. -This documentation was generated from *cloudbilling* crate version *1.0.4+20151222*, where *20151222* is the exact revision of the *cloudbilling:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *cloudbilling* crate version *1.0.4+20170504*, where *20170504* is the exact revision of the *cloudbilling:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *cloudbilling* *v1* API can be found at the [official documentation site](https://cloud.google.com/billing/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/struct.Cloudbilling.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/struct.Cloudbilling.html) ... -* [billing accounts](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/struct.BillingAccount.html) - * [*get*](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/struct.BillingAccountGetCall.html), [*list*](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/struct.BillingAccountListCall.html) and [*projects list*](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/struct.BillingAccountProjectListCall.html) +* [billing accounts](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/struct.BillingAccount.html) + * [*get*](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/struct.BillingAccountGetCall.html), [*list*](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/struct.BillingAccountListCall.html) and [*projects list*](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/struct.BillingAccountProjectListCall.html) * projects - * [*get billing info*](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/struct.ProjectGetBillingInfoCall.html) and [*update billing info*](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/struct.ProjectUpdateBillingInfoCall.html) + * [*get billing info*](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/struct.ProjectGetBillingInfoCall.html) and [*update billing info*](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/struct.ProjectUpdateBillingInfoCall.html) @@ -25,17 +25,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/struct.Cloudbilling.html)** +* **[Hub](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/struct.Cloudbilling.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.Part.html)** + * **[Parts](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -121,17 +121,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.Delegate.html), 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-cloudbilling1/1.0.4+20151222/google_cloudbilling1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.ResponseResult.html), 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")`. @@ -141,29 +141,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.CallBuilder.html) 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-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.CallBuilder.html), 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-cloudbilling1/1.0.4+20151222/google_cloudbilling1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-cloudbilling1/1.0.4+20170504/google_cloudbilling1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/cloudbilling1/src/lib.rs b/gen/cloudbilling1/src/lib.rs index 2c39d03bd4..cac0dee8cc 100644 --- a/gen/cloudbilling1/src/lib.rs +++ b/gen/cloudbilling1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *cloudbilling* crate version *1.0.4+20151222*, where *20151222* is the exact revision of the *cloudbilling:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *cloudbilling* crate version *1.0.4+20170504*, where *20170504* is the exact revision of the *cloudbilling:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *cloudbilling* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/billing/). @@ -340,7 +340,9 @@ impl<'a, C, A> Cloudbilling // ############ // SCHEMAS ### // ########## -/// Encapsulation of billing information for a Developers Console project. A project has at most one associated billing account at a time (but a billing account can be assigned to multiple projects). +/// Encapsulation of billing information for a Cloud Console project. A project +/// has at most one associated billing account at a time (but a billing account +/// can be assigned to multiple projects). /// /// # Activities /// @@ -352,15 +354,24 @@ impl<'a, C, A> Cloudbilling /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProjectBillingInfo { - /// The ID of the project that this `ProjectBillingInfo` represents, such as `tokyo-rain-123`. This is a convenience field so that you don't need to parse the `name` field to obtain a project ID. This field is read-only. + /// The ID of the project that this `ProjectBillingInfo` represents, such as + /// `tokyo-rain-123`. This is a convenience field so that you don't need to + /// parse the `name` field to obtain a project ID. This field is read-only. #[serde(rename="projectId")] pub project_id: Option, - /// The resource name for the `ProjectBillingInfo`; has the form `projects/{project_id}/billingInfo`. For example, the resource name for the billing information for project `tokyo-rain-123` would be `projects/tokyo-rain-123/billingInfo`. This field is read-only. + /// The resource name for the `ProjectBillingInfo`; has the form + /// `projects/{project_id}/billingInfo`. For example, the resource name for the + /// billing information for project `tokyo-rain-123` would be + /// `projects/tokyo-rain-123/billingInfo`. This field is read-only. pub name: Option, - /// True if the project is associated with an open billing account, to which usage on the project is charged. False if the project is associated with a closed billing account, or no billing account at all, and therefore cannot use paid services. This field is read-only. + /// True if the project is associated with an open billing account, to which + /// usage on the project is charged. False if the project is associated with a + /// closed billing account, or no billing account at all, and therefore cannot + /// use paid services. This field is read-only. #[serde(rename="billingEnabled")] pub billing_enabled: Option, - /// The resource name of the billing account associated with the project, if any. For example, `billingAccounts/012345-567890-ABCDEF`. + /// The resource name of the billing account associated with the project, if + /// any. For example, `billingAccounts/012345-567890-ABCDEF`. #[serde(rename="billingAccountName")] pub billing_account_name: Option, } @@ -380,10 +391,13 @@ impl ResponseResult for ProjectBillingInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListProjectBillingInfoResponse { - /// A token to retrieve the next page of results. To retrieve the next page, call `ListProjectBillingInfo` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve. + /// A token to retrieve the next page of results. To retrieve the next page, + /// call `ListProjectBillingInfo` again with the `page_token` field set to this + /// value. This field is empty if there are no more results to retrieve. #[serde(rename="nextPageToken")] pub next_page_token: Option, - /// A list of `ProjectBillingInfo` resources representing the projects associated with the billing account. + /// A list of `ProjectBillingInfo` resources representing the projects + /// associated with the billing account. #[serde(rename="projectBillingInfo")] pub project_billing_info: Option>, } @@ -391,7 +405,9 @@ pub struct ListProjectBillingInfoResponse { impl ResponseResult for ListProjectBillingInfoResponse {} -/// A billing account in [Google Developers Console](https://console.developers.google.com/). You can assign a billing account to one or more projects. +/// A billing account in [Google Cloud +/// Console](https://console.cloud.google.com/). You can assign a billing account +/// to one or more projects. /// /// # Activities /// @@ -404,12 +420,18 @@ impl ResponseResult for ListProjectBillingInfoResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BillingAccount { - /// True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services. - pub open: Option, - /// The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Developers Console. + /// The display name given to the billing account, such as `My Billing + /// Account`. This name is displayed in the Google Cloud Console. #[serde(rename="displayName")] pub display_name: Option, - /// The resource name of the billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF` would be the resource name for billing account `012345-567890-ABCDEF`. + /// True if the billing account is open, and will therefore be charged for any + /// usage on associated projects. False if the billing account is closed, and + /// therefore projects associated with it will be unable to use paid services. + pub open: Option, + /// The resource name of the billing account. The resource name has the form + /// `billingAccounts/{billing_account_id}`. For example, + /// `billingAccounts/012345-567890-ABCDEF` would be the resource name for + /// billing account `012345-567890-ABCDEF`. pub name: Option, } @@ -428,7 +450,9 @@ impl ResponseResult for BillingAccount {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListBillingAccountsResponse { - /// A token to retrieve the next page of results. To retrieve the next page, call `ListBillingAccounts` again with the `page_token` field set to this value. This field is empty if there are no more results to retrieve. + /// A token to retrieve the next page of results. To retrieve the next page, + /// call `ListBillingAccounts` again with the `page_token` field set to this + /// value. This field is empty if there are no more results to retrieve. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// A list of billing accounts. @@ -484,11 +508,14 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets information about a billing account. The current authenticated user must be an [owner of the billing account](https://support.google.com/cloud/answer/4430947). + /// Gets information about a billing account. The current authenticated user + /// must be an [owner of the billing + /// account](https://support.google.com/cloud/answer/4430947). /// /// # Arguments /// - /// * `name` - The resource name of the billing account to retrieve. For example, `billingAccounts/012345-567890-ABCDEF`. + /// * `name` - The resource name of the billing account to retrieve. For example, + /// `billingAccounts/012345-567890-ABCDEF`. pub fn get(&self, name: &str) -> BillingAccountGetCall<'a, C, A> { BillingAccountGetCall { hub: self.hub, @@ -501,7 +528,8 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the billing accounts that the current authenticated user [owns](https://support.google.com/cloud/answer/4430947). + /// Lists the billing accounts that the current authenticated user + /// [owns](https://support.google.com/cloud/answer/4430947). pub fn list(&self) -> BillingAccountListCall<'a, C, A> { BillingAccountListCall { hub: self.hub, @@ -515,11 +543,14 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the projects associated with a billing account. The current authenticated user must be an [owner of the billing account](https://support.google.com/cloud/answer/4430947). + /// Lists the projects associated with a billing account. The current + /// authenticated user must be an [owner of the billing + /// account](https://support.google.com/cloud/answer/4430947). /// /// # Arguments /// - /// * `name` - The resource name of the billing account associated with the projects that you want to list. For example, `billingAccounts/012345-567890-ABCDEF`. + /// * `name` - The resource name of the billing account associated with the projects that + /// you want to list. For example, `billingAccounts/012345-567890-ABCDEF`. pub fn projects_list(&self, name: &str) -> BillingAccountProjectListCall<'a, C, A> { BillingAccountProjectListCall { hub: self.hub, @@ -575,11 +606,15 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the billing information for a project. The current authenticated user must have [permission to view the project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ). + /// Gets the billing information for a project. The current authenticated user + /// must have [permission to view the + /// project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + /// ). /// /// # Arguments /// - /// * `name` - The resource name of the project for which billing information is retrieved. For example, `projects/tokyo-rain-123`. + /// * `name` - The resource name of the project for which billing information is + /// retrieved. For example, `projects/tokyo-rain-123`. pub fn get_billing_info(&self, name: &str) -> ProjectGetBillingInfoCall<'a, C, A> { ProjectGetBillingInfoCall { hub: self.hub, @@ -592,12 +627,43 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Sets or updates the billing account associated with a project. You specify the new billing account by setting the `billing_account_name` in the `ProjectBillingInfo` resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges. *Note:* Incurred charges that have not yet been reported in the transaction history of the Google Developers Console may be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project. The current authenticated user must have ownership privileges for both the [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing account](https://support.google.com/cloud/answer/4430947). You can disable billing on the project by setting the `billing_account_name` field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project. Note that associating a project with a *closed* billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an *open* billing account. + /// Sets or updates the billing account associated with a project. You specify + /// the new billing account by setting the `billing_account_name` in the + /// `ProjectBillingInfo` resource to the resource name of a billing account. + /// Associating a project with an open billing account enables billing on the + /// project and allows charges for resource usage. If the project already had a + /// billing account, this method changes the billing account used for resource + /// usage charges. + /// + /// *Note:* Incurred charges that have not yet been reported in the transaction + /// history of the Google Cloud Console may be billed to the new billing + /// account, even if the charge occurred before the new billing account was + /// assigned to the project. + /// + /// The current authenticated user must have ownership privileges for both the + /// [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + /// ) and the [billing + /// account](https://support.google.com/cloud/answer/4430947). + /// + /// You can disable billing on the project by setting the + /// `billing_account_name` field to empty. This action disassociates the + /// current billing account from the project. Any billable activity of your + /// in-use services will stop, and your application could stop functioning as + /// expected. Any unbilled charges to date will be billed to the previously + /// associated account. The current authenticated user must be either an owner + /// of the project or an owner of the billing account for the project. + /// + /// Note that associating a project with a *closed* billing account will have + /// much the same effect as disabling billing on the project: any paid + /// resources used by the project will be shut down. Thus, unless you wish to + /// disable billing, you should always call this method with the name of an + /// *open* billing account. /// /// # Arguments /// /// * `request` - No description provided. - /// * `name` - The resource name of the project associated with the billing information that you want to update. For example, `projects/tokyo-rain-123`. + /// * `name` - The resource name of the project associated with the billing information + /// that you want to update. For example, `projects/tokyo-rain-123`. pub fn update_billing_info(&self, request: ProjectBillingInfo, name: &str) -> ProjectUpdateBillingInfoCall<'a, C, A> { ProjectUpdateBillingInfoCall { hub: self.hub, @@ -618,7 +684,9 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { // CallBuilders ### // ################# -/// Gets information about a billing account. The current authenticated user must be an [owner of the billing account](https://support.google.com/cloud/answer/4430947). +/// Gets information about a billing account. The current authenticated user +/// must be an [owner of the billing +/// account](https://support.google.com/cloud/answer/4430947). /// /// A builder for the *get* method supported by a *billingAccount* resource. /// It is not used directly, but through a `BillingAccountMethods` instance. @@ -795,7 +863,8 @@ impl<'a, C, A> BillingAccountGetCall<'a, C, A> where C: BorrowMut } - /// The resource name of the billing account to retrieve. For example, `billingAccounts/012345-567890-ABCDEF`. + /// The resource name of the billing account to retrieve. For example, + /// `billingAccounts/012345-567890-ABCDEF`. /// /// Sets the *name* path property to the given value. /// @@ -863,7 +932,8 @@ impl<'a, C, A> BillingAccountGetCall<'a, C, A> where C: BorrowMut } -/// Lists the billing accounts that the current authenticated user [owns](https://support.google.com/cloud/answer/4430947). +/// Lists the billing accounts that the current authenticated user +/// [owns](https://support.google.com/cloud/answer/4430947). /// /// A builder for the *list* method supported by a *billingAccount* resource. /// It is not used directly, but through a `BillingAccountMethods` instance. @@ -1023,14 +1093,17 @@ impl<'a, C, A> BillingAccountListCall<'a, C, A> where C: BorrowMut BillingAccountListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Requested page size. The maximum page size is 100; this is also the default. + /// Requested page size. The maximum page size is 100; this is also the + /// default. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> BillingAccountListCall<'a, C, A> { @@ -1095,7 +1168,9 @@ impl<'a, C, A> BillingAccountListCall<'a, C, A> where C: BorrowMut BillingAccountProjectListCall<'a, C, A> where C: BorrowMut BillingAccountProjectListCall<'a, C, A> where C: BorrowMut BillingAccountProjectListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Requested page size. The maximum page size is 100; this is also the default. + /// Requested page size. The maximum page size is 100; this is also the + /// default. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> BillingAccountProjectListCall<'a, C, A> { @@ -1364,7 +1443,10 @@ impl<'a, C, A> BillingAccountProjectListCall<'a, C, A> where C: BorrowMut ProjectGetBillingInfoCall<'a, C, A> where C: BorrowMut ProjectGetBillingInfoCall<'a, C, A> where C: BorrowMut ProjectUpdateBillingInfoCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Cloud Debugger (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/clouddebugger2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-clouddebugger2] path = "../clouddebugger2" -version = "1.0.4+20160810" +version = "1.0.4+20170413" diff --git a/gen/clouddebugger2-cli/README.md b/gen/clouddebugger2-cli/README.md index feb4526f06..1f26127f50 100644 --- a/gen/clouddebugger2-cli/README.md +++ b/gen/clouddebugger2-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Cloud Debugger* API at revision *20160810*. The CLI is at version *1.0.4*. +This documentation was generated from the *Cloud Debugger* API at revision *20170413*. The CLI is at version *1.0.4*. ```bash clouddebugger2 [options] diff --git a/gen/clouddebugger2-cli/mkdocs.yml b/gen/clouddebugger2-cli/mkdocs.yml index 66dc019125..43a62cb76d 100644 --- a/gen/clouddebugger2-cli/mkdocs.yml +++ b/gen/clouddebugger2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Cloud Debugger v1.0.4+20160810 +site_name: Cloud Debugger v1.0.4+20170413 site_url: http://byron.github.io/google-apis-rs/google-clouddebugger2-cli site_description: A complete library to interact with Cloud Debugger (protocol v2) diff --git a/gen/clouddebugger2-cli/src/main.rs b/gen/clouddebugger2-cli/src/main.rs index 0d2d6b99f1..3e71d77d00 100644 --- a/gen/clouddebugger2-cli/src/main.rs +++ b/gen/clouddebugger2-cli/src/main.rs @@ -785,7 +785,19 @@ fn main() { let arg_data = [ ("controller", "methods: 'debuggees-breakpoints-list', 'debuggees-breakpoints-update' and 'debuggees-register'", vec![ ("debuggees-breakpoints-list", - Some(r##"Returns the list of all active breakpoints for the debuggee. The breakpoint specification (location, condition, and expression fields) is semantically immutable, although the field values may change. For example, an agent may update the location line number to reflect the actual line where the breakpoint was set, but this doesn't change the breakpoint semantics. This means that an agent does not need to check if a breakpoint has changed when it encounters the same breakpoint on a successive call. Moreover, an agent should remember the breakpoints that are completed until the controller removes them from the active list to avoid setting those breakpoints again."##), + Some(r##"Returns the list of all active breakpoints for the debuggee. + + The breakpoint specification (location, condition, and expression + fields) is semantically immutable, although the field values may + change. For example, an agent may update the location line number + to reflect the actual line where the breakpoint was set, but this + doesn't change the breakpoint semantics. + + This means that an agent does not need to check if a breakpoint has changed + when it encounters the same breakpoint on a successive call. + Moreover, an agent should remember the breakpoints that are completed + until the controller removes them from the active list to avoid + setting those breakpoints again."##), "Details at http://byron.github.io/google-apis-rs/google_clouddebugger2_cli/controller_debuggees-breakpoints-list", vec![ (Some(r##"debuggee-id"##), @@ -807,7 +819,15 @@ fn main() { Some(false)), ]), ("debuggees-breakpoints-update", - Some(r##"Updates the breakpoint state or mutable fields. The entire Breakpoint message must be sent back to the controller service. Updates to active breakpoint fields are only allowed if the new value does not change the breakpoint specification. Updates to the `location`, `condition` and `expression` fields should not alter the breakpoint semantics. These may only make changes such as canonicalizing a value or snapping the location to the correct line of code."##), + Some(r##"Updates the breakpoint state or mutable fields. + The entire Breakpoint message must be sent back to the controller + service. + + Updates to active breakpoint fields are only allowed if the new value + does not change the breakpoint specification. Updates to the `location`, + `condition` and `expression` fields should not alter the breakpoint + semantics. These may only make changes such as canonicalizing a value + or snapping the location to the correct line of code."##), "Details at http://byron.github.io/google-apis-rs/google_clouddebugger2_cli/controller_debuggees-breakpoints-update", vec![ (Some(r##"debuggee-id"##), @@ -841,7 +861,16 @@ fn main() { Some(false)), ]), ("debuggees-register", - Some(r##"Registers the debuggee with the controller service. All agents attached to the same application should call this method with the same request content to get back the same stable `debuggee_id`. Agents should call this method again whenever `google.rpc.Code.NOT_FOUND` is returned from any controller method. This allows the controller service to disable the agent or recover from any data loss. If the debuggee is disabled by the server, the response will have `is_disabled` set to `true`."##), + Some(r##"Registers the debuggee with the controller service. + + All agents attached to the same application should call this method with + the same request content to get back the same stable `debuggee_id`. Agents + should call this method again whenever `google.rpc.Code.NOT_FOUND` is + returned from any controller method. + + This allows the controller service to disable the agent or recover from any + data loss. If the debuggee is disabled by the server, the response will + have `is_disabled` set to `true`."##), "Details at http://byron.github.io/google-apis-rs/google_clouddebugger2_cli/controller_debuggees-register", vec![ (Some(r##"kv"##), @@ -993,8 +1022,9 @@ fn main() { let mut app = App::new("clouddebugger2") .author("Sebastian Thiel ") - .version("1.0.4+20160810") - .about("Examines the call stack and variables of a running application without stopping or slowing it down.") + .version("1.0.4+20170413") + .about("Examines the call stack and variables of a running application without stopping or slowing it down. + ") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_clouddebugger2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/clouddebugger2/Cargo.toml b/gen/clouddebugger2/Cargo.toml index 9a138e9177..fc11f13f47 100644 --- a/gen/clouddebugger2/Cargo.toml +++ b/gen/clouddebugger2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-clouddebugger2" -version = "1.0.4+20160810" +version = "1.0.4+20170413" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud Debugger (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/clouddebugger2" homepage = "http://cloud.google.com/debugger" -documentation = "https://docs.rs/google-clouddebugger2/1.0.4+20160810" +documentation = "https://docs.rs/google-clouddebugger2/1.0.4+20170413" license = "MIT" keywords = ["clouddebugger", "google", "protocol", "web", "api"] diff --git a/gen/clouddebugger2/README.md b/gen/clouddebugger2/README.md index 7dfab8a522..70c721a867 100644 --- a/gen/clouddebugger2/README.md +++ b/gen/clouddebugger2/README.md @@ -5,18 +5,18 @@ DO NOT EDIT ! --> The `google-clouddebugger2` library allows access to all features of the *Google Cloud Debugger* service. -This documentation was generated from *Cloud Debugger* crate version *1.0.4+20160810*, where *20160810* is the exact revision of the *clouddebugger:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Cloud Debugger* crate version *1.0.4+20170413*, where *20170413* is the exact revision of the *clouddebugger:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Cloud Debugger* *v2* API can be found at the [official documentation site](http://cloud.google.com/debugger). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.CloudDebugger.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.CloudDebugger.html) ... * controller - * [*debuggees breakpoints list*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.ControllerDebuggeeBreakpointListCall.html), [*debuggees breakpoints update*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.ControllerDebuggeeBreakpointUpdateCall.html) and [*debuggees register*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.ControllerDebuggeeRegisterCall.html) + * [*debuggees breakpoints list*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.ControllerDebuggeeBreakpointListCall.html), [*debuggees breakpoints update*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.ControllerDebuggeeBreakpointUpdateCall.html) and [*debuggees register*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.ControllerDebuggeeRegisterCall.html) * debugger - * [*debuggees breakpoints delete*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.DebuggerDebuggeeBreakpointDeleteCall.html), [*debuggees breakpoints get*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.DebuggerDebuggeeBreakpointGetCall.html), [*debuggees breakpoints list*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.DebuggerDebuggeeBreakpointListCall.html), [*debuggees breakpoints set*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.DebuggerDebuggeeBreakpointSetCall.html) and [*debuggees list*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.DebuggerDebuggeeListCall.html) + * [*debuggees breakpoints delete*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.DebuggerDebuggeeBreakpointDeleteCall.html), [*debuggees breakpoints get*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.DebuggerDebuggeeBreakpointGetCall.html), [*debuggees breakpoints list*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.DebuggerDebuggeeBreakpointListCall.html), [*debuggees breakpoints set*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.DebuggerDebuggeeBreakpointSetCall.html) and [*debuggees list*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.DebuggerDebuggeeListCall.html) @@ -25,17 +25,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/struct.CloudDebugger.html)** +* **[Hub](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/struct.CloudDebugger.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.Part.html)** + * **[Parts](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -124,17 +124,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.Delegate.html), 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-clouddebugger2/1.0.4+20160810/google_clouddebugger2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.ResponseResult.html), 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")`. @@ -144,29 +144,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.CallBuilder.html) 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-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.CallBuilder.html), 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-clouddebugger2/1.0.4+20160810/google_clouddebugger2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-clouddebugger2/1.0.4+20170413/google_clouddebugger2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/clouddebugger2/src/lib.rs b/gen/clouddebugger2/src/lib.rs index 9c927c433b..ad0f598586 100644 --- a/gen/clouddebugger2/src/lib.rs +++ b/gen/clouddebugger2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Cloud Debugger* crate version *1.0.4+20160810*, where *20160810* is the exact revision of the *clouddebugger:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Cloud Debugger* crate version *1.0.4+20170413*, where *20170413* is the exact revision of the *clouddebugger:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Cloud Debugger* *v2* API can be found at the //! [official documentation site](http://cloud.google.com/debugger). @@ -352,7 +352,8 @@ impl<'a, C, A> CloudDebugger // ############ // SCHEMAS ### // ########## -/// An ExtendedSourceContext is a SourceContext combined with additional details describing the context. +/// An ExtendedSourceContext is a SourceContext combined with additional +/// details describing the context. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -378,10 +379,14 @@ impl Part for ExtendedSourceContext {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListBreakpointsResponse { - /// A wait token that can be used in the next call to `list` (REST) or `ListBreakpoints` (RPC) to block until the list of breakpoints has changes. + /// A wait token that can be used in the next call to `list` (REST) or + /// `ListBreakpoints` (RPC) to block until the list of breakpoints has changes. #[serde(rename="nextWaitToken")] pub next_wait_token: Option, - /// List of all breakpoints with complete state. The fields `id` and `location` are guaranteed to be set on each breakpoint. + /// List of breakpoints matching the request. + /// The fields `id` and `location` are guaranteed to be set on each breakpoint. + /// The fields: `stack_frames`, `evaluated_expressions` and `variable_table` + /// are cleared on each breakpoint regardless of it's status. pub breakpoints: Option>, } @@ -394,7 +399,8 @@ impl ResponseResult for ListBreakpointsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CloudWorkspaceSourceContext { - /// The ID of the snapshot. An empty snapshot_id refers to the most recent snapshot. + /// The ID of the snapshot. + /// An empty snapshot_id refers to the most recent snapshot. #[serde(rename="snapshotId")] pub snapshot_id: Option, /// The ID of the workspace. @@ -413,12 +419,14 @@ impl Part for CloudWorkspaceSourceContext {} pub struct StackFrame { /// Demangled function name at the call site. pub function: Option, + /// Set of arguments passed to this function. + /// Note that this might not be populated for all stack frames. + pub arguments: Option>, + /// Set of local variables at the stack frame location. + /// Note that this might not be populated for all stack frames. + pub locals: Option>, /// Source location of the call site. pub location: Option, - /// Set of local variables at the stack frame location. Note that this might not be populated for all stack frames. - pub locals: Option>, - /// Set of arguments passed to this function. Note that this might not be populated for all stack frames. - pub arguments: Option>, } impl Part for StackFrame {} @@ -435,7 +443,11 @@ impl Part for StackFrame {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListDebuggeesResponse { - /// List of debuggees accessible to the calling user. Note that the `description` field is the only human readable field that should be displayed to the user. The fields `debuggee.id` and `description` fields are guaranteed to be set on each debuggee. + /// List of debuggees accessible to the calling user. + /// Note that the `description` field is the only human readable field + /// that should be displayed to the user. + /// The fields `debuggee.id` and `description` fields are guaranteed to be + /// set on each debuggee. pub debuggees: Option>, } @@ -453,14 +465,17 @@ impl ResponseResult for ListDebuggeesResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RegisterDebuggeeRequest { - /// Debuggee information to register. The fields `project`, `uniquifier`, `description` and `agent_version` of the debuggee must be set. + /// Debuggee information to register. + /// The fields `project`, `uniquifier`, `description` and `agent_version` + /// of the debuggee must be set. pub debuggee: Option, } impl RequestValue for RegisterDebuggeeRequest {} -/// Response for updating an active breakpoint. The message is defined to allow future extensions. +/// Response for updating an active breakpoint. +/// The message is defined to allow future extensions. /// /// # Activities /// @@ -475,7 +490,8 @@ pub struct UpdateActiveBreakpointResponse { _never_set: Option } impl ResponseResult for UpdateActiveBreakpointResponse {} -/// Selects a repo using a Google Cloud Platform project ID (e.g. winged-cargo-31) and a repo name within that project. +/// Selects a repo using a Google Cloud Platform project ID +/// (e.g. winged-cargo-31) and a repo name within that project. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -518,20 +534,24 @@ impl Part for AliasContext {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListActiveBreakpointsResponse { - /// The `wait_expired` field is set to true by the server when the request times out and the field `success_on_timeout` is set to true. + /// The `wait_expired` field is set to true by the server when the + /// request times out and the field `success_on_timeout` is set to true. #[serde(rename="waitExpired")] pub wait_expired: Option, - /// A wait token that can be used in the next method call to block until the list of breakpoints changes. + /// A wait token that can be used in the next method call to block until + /// the list of breakpoints changes. #[serde(rename="nextWaitToken")] pub next_wait_token: Option, - /// List of all active breakpoints. The fields `id` and `location` are guaranteed to be set on each breakpoint. + /// List of all active breakpoints. + /// The fields `id` and `location` are guaranteed to be set on each breakpoint. pub breakpoints: Option>, } impl ResponseResult for ListActiveBreakpointsResponse {} -/// A CloudRepoSourceContext denotes a particular revision in a cloud repo (a repo hosted by the Google Cloud Platform). +/// A CloudRepoSourceContext denotes a particular revision in a cloud +/// repo (a repo hosted by the Google Cloud Platform). /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -570,7 +590,15 @@ pub struct RepoId { impl Part for RepoId {} -/// 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); } The JSON representation for `Empty` is empty JSON object `{}`. +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. /// /// # Activities /// @@ -597,15 +625,17 @@ pub struct GerritSourceContext { /// A revision (commit) ID. #[serde(rename="revisionId")] pub revision_id: Option, + /// The full project name within the host. Projects may be nested, so + /// "project/subproject" is a valid project name. + /// The "repo name" is hostURI/project. + #[serde(rename="gerritProject")] + pub gerrit_project: Option, /// The URI of a running Gerrit instance. #[serde(rename="hostUri")] pub host_uri: Option, /// The name of an alias (branch, tag, etc.). #[serde(rename="aliasName")] pub alias_name: Option, - /// The full project name within the host. Projects may be nested, so "project/subproject" is a valid project name. The "repo name" is hostURI/project. - #[serde(rename="gerritProject")] - pub gerrit_project: Option, } impl Part for GerritSourceContext {} @@ -622,14 +652,16 @@ impl Part for GerritSourceContext {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RegisterDebuggeeResponse { - /// Debuggee resource. The field `id` is guranteed to be set (in addition to the echoed fields). + /// Debuggee resource. + /// The field `id` is guranteed to be set (in addition to the echoed fields). pub debuggee: Option, } impl ResponseResult for RegisterDebuggeeResponse {} -/// A SourceContext is a reference to a tree of files. A SourceContext together with a path point to a unique revision of a single file or directory. +/// A SourceContext is a reference to a tree of files. A SourceContext together +/// with a path point to a unique revision of a single file or directory. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -661,7 +693,8 @@ impl Part for SourceContext {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UpdateActiveBreakpointRequest { - /// Updated breakpoint information. The field 'id' must be set. + /// Updated breakpoint information. + /// The field 'id' must be set. pub breakpoint: Option, } @@ -683,35 +716,61 @@ pub struct SourceLocation { impl Part for SourceLocation {} -/// Represents the application to debug. The application may include one or more replicated processes executing the same code. Each of these processes is attached with a debugger agent, carrying out the debugging commands. The agents attached to the same debuggee are identified by using exactly the same field values when registering. +/// Represents the application to debug. The application may include one or more +/// replicated processes executing the same code. Each of these processes is +/// attached with a debugger agent, carrying out the debugging commands. +/// The agents attached to the same debuggee are identified by using exactly the +/// same field values when registering. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Debuggee { - /// Human readable message to be displayed to the user about this debuggee. Absence of this field indicates no status. The message can be either informational or an error status. + /// Human readable message to be displayed to the user about this debuggee. + /// Absence of this field indicates no status. The message can be either + /// informational or an error status. pub status: Option, - /// Human readable description of the debuggee. Including a human-readable project name, environment name and version information is recommended. + /// Human readable description of the debuggee. + /// Including a human-readable project name, environment name and version + /// information is recommended. pub description: Option, - /// If set to `true`, indicates that the agent should disable itself and detach from the debuggee. + /// If set to `true`, indicates that the agent should disable itself and + /// detach from the debuggee. #[serde(rename="isDisabled")] pub is_disabled: Option, - /// A set of custom debuggee properties, populated by the agent, to be displayed to the user. + /// A set of custom debuggee properties, populated by the agent, to be + /// displayed to the user. pub labels: Option>, - /// Debuggee uniquifier within the project. Any string that identifies the application within the project can be used. Including environment and version or build IDs is recommended. + /// Debuggee uniquifier within the project. + /// Any string that identifies the application within the project can be used. + /// Including environment and version or build IDs is recommended. pub uniquifier: Option, - /// Project the debuggee is associated with. Use the project number when registering a Google Cloud Platform project. + /// Project the debuggee is associated with. + /// Use the project number when registering a Google Cloud Platform project. pub project: Option, - /// References to the locations and revisions of the source code used in the deployed application. NOTE: This field is deprecated. Consumers should use `ext_source_contexts` if it is not empty. Debug agents should populate both this field and `ext_source_contexts`. + /// References to the locations and revisions of the source code used in the + /// deployed application. + /// + /// NOTE: This field is deprecated. Consumers should use + /// `ext_source_contexts` if it is not empty. Debug agents should populate + /// both this field and `ext_source_contexts`. #[serde(rename="sourceContexts")] pub source_contexts: Option>, - /// References to the locations and revisions of the source code used in the deployed application. Contexts describing a remote repo related to the source code have a `category` label of `remote_repo`. Source snapshot source contexts have a `category` of `snapshot`. + /// References to the locations and revisions of the source code used in the + /// deployed application. + /// + /// Contexts describing a remote repo related to the source code + /// have a `category` label of `remote_repo`. Source snapshot source + /// contexts have a `category` of `snapshot`. #[serde(rename="extSourceContexts")] pub ext_source_contexts: Option>, - /// Version ID of the agent release. The version ID is structured as following: `domain/type/vmajor.minor` (for example `google.com/gcp-java/v1.1`). + /// Version ID of the agent release. The version ID is structured as + /// following: `domain/type/vmajor.minor` (for example + /// `google.com/gcp-java/v1.1`). #[serde(rename="agentVersion")] pub agent_version: Option, - /// If set to `true`, indicates that the debuggee is considered as inactive by the Controller service. + /// If set to `true`, indicates that the debuggee is considered as inactive by + /// the Controller service. #[serde(rename="isInactive")] pub is_inactive: Option, /// Unique identifier for the debuggee generated by the controller service. @@ -729,14 +788,23 @@ impl Part for Debuggee {} pub struct FormatMessage { /// Optional parameters to be embedded into the message. pub parameters: Option>, - /// Format template for the message. The `format` uses placeholders `$0`, `$1`, etc. to reference parameters. `$$` can be used to denote the `$` character. Examples: * `Failed to load '$0' which helps debug $1 the first time it is loaded. Again, $0 is very important.` * `Please pay $$10 to use $0 instead of $1.` + /// Format template for the message. The `format` uses placeholders `$0`, + /// `$1`, etc. to reference parameters. `$$` can be used to denote the `$` + /// character. + /// + /// Examples: + /// + /// * `Failed to load '$0' which helps debug $1 the first time it + /// is loaded. Again, $0 is very important.` + /// * `Please pay $$10 to use $0 instead of $1.` pub format: Option, } impl Part for FormatMessage {} -/// A GitSourceContext denotes a particular revision in a third party Git repository (e.g. GitHub). +/// A GitSourceContext denotes a particular revision in a third party Git +/// repository (e.g. GitHub). /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -744,7 +812,8 @@ impl Part for FormatMessage {} pub struct GitSourceContext { /// Git repository URL. pub url: Option, - /// Git commit hash. required. + /// Git commit hash. + /// required. #[serde(rename="revisionId")] pub revision_id: Option, } @@ -752,7 +821,9 @@ pub struct GitSourceContext { impl Part for GitSourceContext {} -/// A CloudWorkspaceId is a unique identifier for a cloud workspace. A cloud workspace is a place associated with a repo where modified files can be stored before they are committed. +/// A CloudWorkspaceId is a unique identifier for a cloud workspace. +/// A cloud workspace is a place associated with a repo where modified files +/// can be stored before they are committed. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -761,7 +832,8 @@ pub struct CloudWorkspaceId { /// The ID of the repo containing the workspace. #[serde(rename="repoId")] pub repo_id: Option, - /// The unique name of the workspace within the repo. This is the name chosen by the client in the Source API's CreateWorkspace method. + /// The unique name of the workspace within the repo. This is the name + /// chosen by the client in the Source API's CreateWorkspace method. pub name: Option, } @@ -779,9 +851,34 @@ impl Part for CloudWorkspaceId {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Breakpoint { - /// Breakpoint status. The status includes an error flag and a human readable message. This field is usually unset. The message can be either informational or an error message. Regardless, clients should always display the text message back to the user. Error status indicates complete failure of the breakpoint. Example (non-final state): `Still loading symbols...` Examples (final state): * `Invalid line number` referring to location * `Field f not found in class C` referring to condition + /// Breakpoint status. + /// + /// The status includes an error flag and a human readable message. + /// This field is usually unset. The message can be either + /// informational or an error message. Regardless, clients should always + /// display the text message back to the user. + /// + /// Error status indicates complete failure of the breakpoint. + /// + /// Example (non-final state): `Still loading symbols...` + /// + /// Examples (final state): + /// + /// * `Invalid line number` referring to location + /// * `Field f not found in class C` referring to condition pub status: Option, - /// The `variable_table` exists to aid with computation, memory and network traffic optimization. It enables storing a variable once and reference it from multiple variables, including variables stored in the `variable_table` itself. For example, the same `this` object, which may appear at many levels of the stack, can have all of its data stored once in this table. The stack frame variables then would hold only a reference to it. The variable `var_table_index` field is an index into this repeated field. The stored objects are nameless and get their name from the referencing variable. The effective variable is a merge of the referencing variable and the referenced variable. + /// The `variable_table` exists to aid with computation, memory and network + /// traffic optimization. It enables storing a variable once and reference + /// it from multiple variables, including variables stored in the + /// `variable_table` itself. + /// For example, the same `this` object, which may appear at many levels of + /// the stack, can have all of its data stored once in this table. The + /// stack frame variables then would hold only a reference to it. + /// + /// The variable `var_table_index` field is an index into this repeated field. + /// The stored objects are nameless and get their name from the referencing + /// variable. The effective variable is a merge of the referencing variable + /// and the referenced variable. #[serde(rename="variableTable")] pub variable_table: Option>, /// E-mail address of the user that created this breakpoint @@ -790,24 +887,44 @@ pub struct Breakpoint { /// Indicates the severity of the log. Only relevant when action is `LOG`. #[serde(rename="logLevel")] pub log_level: Option, - /// A set of custom breakpoint properties, populated by the agent, to be displayed to the user. + /// A set of custom breakpoint properties, populated by the agent, to be + /// displayed to the user. pub labels: Option>, - /// Time this breakpoint was finalized as seen by the server in seconds resolution. + /// Time this breakpoint was finalized as seen by the server in seconds + /// resolution. #[serde(rename="finalTime")] pub final_time: Option, /// The stack at breakpoint time. #[serde(rename="stackFrames")] pub stack_frames: Option>, - /// List of read-only expressions to evaluate at the breakpoint location. The expressions are composed using expressions in the programming language at the source location. If the breakpoint action is `LOG`, the evaluated expressions are included in log statements. + /// List of read-only expressions to evaluate at the breakpoint location. + /// The expressions are composed using expressions in the programming language + /// at the source location. If the breakpoint action is `LOG`, the evaluated + /// expressions are included in log statements. pub expressions: Option>, - /// Values of evaluated expressions at breakpoint time. The evaluated expressions appear in exactly the same order they are listed in the `expressions` field. The `name` field holds the original expression text, the `value` or `members` field holds the result of the evaluated expression. If the expression cannot be evaluated, the `status` inside the `Variable` will indicate an error and contain the error text. + /// Values of evaluated expressions at breakpoint time. + /// The evaluated expressions appear in exactly the same order they + /// are listed in the `expressions` field. + /// The `name` field holds the original expression text, the `value` or + /// `members` field holds the result of the evaluated expression. + /// If the expression cannot be evaluated, the `status` inside the `Variable` + /// will indicate an error and contain the error text. #[serde(rename="evaluatedExpressions")] pub evaluated_expressions: Option>, /// Breakpoint identifier, unique in the scope of the debuggee. pub id: Option, - /// Condition that triggers the breakpoint. The condition is a compound boolean expression composed using expressions in a programming language at the source location. + /// Condition that triggers the breakpoint. + /// The condition is a compound boolean expression composed using expressions + /// in a programming language at the source location. pub condition: Option, - /// Only relevant when action is `LOG`. Defines the message to log when the breakpoint hits. The message may include parameter placeholders `$0`, `$1`, etc. These placeholders are replaced with the evaluated value of the appropriate expression. Expressions not referenced in `log_message_format` are not logged. Example: `Message received, id = $0, count = $1` with `expressions` = `[ message.id, message.count ]`. + /// Only relevant when action is `LOG`. Defines the message to log when + /// the breakpoint hits. The message may include parameter placeholders `$0`, + /// `$1`, etc. These placeholders are replaced with the evaluated value + /// of the appropriate expression. Expressions not referenced in + /// `log_message_format` are not logged. + /// + /// Example: `Message received, id = $0, count = $1` with + /// `expressions` = `[ message.id, message.count ]`. #[serde(rename="logMessageFormat")] pub log_message_format: Option, /// Time this breakpoint was created by the server in seconds resolution. @@ -815,9 +932,11 @@ pub struct Breakpoint { pub create_time: Option, /// Breakpoint source location. pub location: Option, - /// Action that the agent should perform when the code at the breakpoint location is hit. + /// Action that the agent should perform when the code at the + /// breakpoint location is hit. pub action: Option, - /// When true, indicates that this is a final result and the breakpoint state will not change from here on. + /// When true, indicates that this is a final result and the + /// breakpoint state will not change from here on. #[serde(rename="isFinalState")] pub is_final_state: Option, } @@ -825,21 +944,151 @@ pub struct Breakpoint { impl RequestValue for Breakpoint {} -/// Represents a variable or an argument possibly of a compound object type. Note how the following variables are represented: 1) A simple variable: int x = 5 { name: "x", value: "5", type: "int" } // Captured variable 2) A compound object: struct T { int m1; int m2; }; T x = { 3, 7 }; { // Captured variable name: "x", type: "T", members { name: "m1", value: "3", type: "int" }, members { name: "m2", value: "7", type: "int" } } 3) A pointer where the pointee was captured: T x = { 3, 7 }; T* p = &x; { // Captured variable name: "p", type: "T*", value: "0x00500500", members { name: "m1", value: "3", type: "int" }, members { name: "m2", value: "7", type: "int" } } 4) A pointer where the pointee was not captured: T* p = new T; { // Captured variable name: "p", type: "T*", value: "0x00400400" status { is_error: true, description { format: "unavailable" } } } The status should describe the reason for the missing value, such as ``, ``, ` -/// `. Note that a null pointer should not have members. 5) An unnamed value: int* p = new int(7); { // Captured variable name: "p", value: "0x00500500", type: "int*", members { value: "7", type: "int" } } 6) An unnamed pointer where the pointee was not captured: int* p = new int(7); int** pp = &p; { // Captured variable name: "pp", value: "0x00500500", type: "int**", members { value: "0x00400400", type: "int*" status { is_error: true, description: { format: "unavailable" } } } } } To optimize computation, memory and network traffic, variables that repeat in the output multiple times can be stored once in a shared variable table and be referenced using the `var_table_index` field. The variables stored in the shared table are nameless and are essentially a partition of the complete variable. To reconstruct the complete variable, merge the referencing variable with the referenced variable. When using the shared variable table, the following variables: T x = { 3, 7 }; T* p = &x; T& r = x; { name: "x", var_table_index: 3, type: "T" } // Captured variables { name: "p", value "0x00500500", type="T*", var_table_index: 3 } { name: "r", type="T&", var_table_index: 3 } { // Shared variable table entry #3: members { name: "m1", value: "3", type: "int" }, members { name: "m2", value: "7", type: "int" } } Note that the pointer address is stored with the referencing variable and not with the referenced variable. This allows the referenced variable to be shared between pointers and references. The type field is optional. The debugger agent may or may not support it. +/// Represents a variable or an argument possibly of a compound object type. +/// Note how the following variables are represented: +/// +/// 1) A simple variable: +/// +/// int x = 5 +/// +/// { name: "x", value: "5", type: "int" } // Captured variable +/// +/// 2) A compound object: +/// +/// struct T { +/// int m1; +/// int m2; +/// }; +/// T x = { 3, 7 }; +/// +/// { // Captured variable +/// name: "x", +/// type: "T", +/// members { name: "m1", value: "3", type: "int" }, +/// members { name: "m2", value: "7", type: "int" } +/// } +/// +/// 3) A pointer where the pointee was captured: +/// +/// T x = { 3, 7 }; +/// T* p = &x; +/// +/// { // Captured variable +/// name: "p", +/// type: "T*", +/// value: "0x00500500", +/// members { name: "m1", value: "3", type: "int" }, +/// members { name: "m2", value: "7", type: "int" } +/// } +/// +/// 4) A pointer where the pointee was not captured: +/// +/// T* p = new T; +/// +/// { // Captured variable +/// name: "p", +/// type: "T*", +/// value: "0x00400400" +/// status { is_error: true, description { format: "unavailable" } } +/// } +/// +/// The status should describe the reason for the missing value, +/// such as ``, ``, ``. +/// +/// Note that a null pointer should not have members. +/// +/// 5) An unnamed value: +/// +/// int* p = new int(7); +/// +/// { // Captured variable +/// name: "p", +/// value: "0x00500500", +/// type: "int*", +/// members { value: "7", type: "int" } } +/// +/// 6) An unnamed pointer where the pointee was not captured: +/// +/// int* p = new int(7); +/// int** pp = &p; +/// +/// { // Captured variable +/// name: "pp", +/// value: "0x00500500", +/// type: "int**", +/// members { +/// value: "0x00400400", +/// type: "int*" +/// status { +/// is_error: true, +/// description: { format: "unavailable" } } +/// } +/// } +/// } +/// +/// To optimize computation, memory and network traffic, variables that +/// repeat in the output multiple times can be stored once in a shared +/// variable table and be referenced using the `var_table_index` field. The +/// variables stored in the shared table are nameless and are essentially +/// a partition of the complete variable. To reconstruct the complete +/// variable, merge the referencing variable with the referenced variable. +/// +/// When using the shared variable table, the following variables: +/// +/// T x = { 3, 7 }; +/// T* p = &x; +/// T& r = x; +/// +/// { name: "x", var_table_index: 3, type: "T" } // Captured variables +/// { name: "p", value "0x00500500", type="T*", var_table_index: 3 } +/// { name: "r", type="T&", var_table_index: 3 } +/// +/// { // Shared variable table entry #3: +/// members { name: "m1", value: "3", type: "int" }, +/// members { name: "m2", value: "7", type: "int" } +/// } +/// +/// Note that the pointer address is stored with the referencing variable +/// and not with the referenced variable. This allows the referenced variable +/// to be shared between pointers and references. +/// +/// The type field is optional. The debugger agent may or may not support it. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Variable { - /// Status associated with the variable. This field will usually stay unset. A status of a single variable only applies to that variable or expression. The rest of breakpoint data still remains valid. Variables might be reported in error state even when breakpoint is not in final state. The message may refer to variable name with `refers_to` set to `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. In either case variable value and members will be unset. Example of error message applied to name: `Invalid expression syntax`. Example of information message applied to value: `Not captured`. Examples of error message applied to value: * `Malformed string`, * `Field f not found in class C` * `Null pointer dereference` + /// Status associated with the variable. This field will usually stay + /// unset. A status of a single variable only applies to that variable or + /// expression. The rest of breakpoint data still remains valid. Variables + /// might be reported in error state even when breakpoint is not in final + /// state. + /// + /// The message may refer to variable name with `refers_to` set to + /// `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. + /// In either case variable value and members will be unset. + /// + /// Example of error message applied to name: `Invalid expression syntax`. + /// + /// Example of information message applied to value: `Not captured`. + /// + /// Examples of error message applied to value: + /// + /// * `Malformed string`, + /// * `Field f not found in class C` + /// * `Null pointer dereference` pub status: Option, /// Name of the variable, if any. pub name: Option, - /// Reference to a variable in the shared variable table. More than one variable can reference the same variable in the table. The `var_table_index` field is an index into `variable_table` in Breakpoint. + /// Reference to a variable in the shared variable table. More than + /// one variable can reference the same variable in the table. The + /// `var_table_index` field is an index into `variable_table` in Breakpoint. #[serde(rename="varTableIndex")] pub var_table_index: Option, - /// Variable type (e.g. `MyClass`). If the variable is split with `var_table_index`, `type` goes next to `value`. The interpretation of a type is agent specific. It is recommended to include the dynamic type rather than a static type of an object. + /// Variable type (e.g. `MyClass`). If the variable is split with + /// `var_table_index`, `type` goes next to `value`. The interpretation of + /// a type is agent specific. It is recommended to include the dynamic type + /// rather than a static type of an object. #[serde(rename="type")] pub type_: Option, /// Members contained or pointed to by the variable. @@ -862,14 +1111,19 @@ impl Part for Variable {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SetBreakpointResponse { - /// Breakpoint resource. The field `id` is guaranteed to be set (in addition to the echoed fileds). + /// Breakpoint resource. + /// The field `id` is guaranteed to be set (in addition to the echoed fileds). pub breakpoint: Option, } impl ResponseResult for SetBreakpointResponse {} -/// Represents a contextual status message. The message can indicate an error or informational status, and refer to specific parts of the containing object. For example, the `Breakpoint.status` field can indicate an error referring to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. +/// Represents a contextual status message. +/// The message can indicate an error or informational status, and refer to +/// specific parts of the containing object. +/// For example, the `Breakpoint.status` field can indicate an error referring +/// to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -899,7 +1153,8 @@ impl Part for StatusMessage {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GetBreakpointResponse { - /// Complete breakpoint state. The fields `id` and `location` are guaranteed to be set. + /// Complete breakpoint state. + /// The fields `id` and `location` are guaranteed to be set. pub breakpoint: Option, } @@ -951,7 +1206,15 @@ impl<'a, C, A> ControllerMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the breakpoint state or mutable fields. The entire Breakpoint message must be sent back to the controller service. Updates to active breakpoint fields are only allowed if the new value does not change the breakpoint specification. Updates to the `location`, `condition` and `expression` fields should not alter the breakpoint semantics. These may only make changes such as canonicalizing a value or snapping the location to the correct line of code. + /// Updates the breakpoint state or mutable fields. + /// The entire Breakpoint message must be sent back to the controller + /// service. + /// + /// Updates to active breakpoint fields are only allowed if the new value + /// does not change the breakpoint specification. Updates to the `location`, + /// `condition` and `expression` fields should not alter the breakpoint + /// semantics. These may only make changes such as canonicalizing a value + /// or snapping the location to the correct line of code. /// /// # Arguments /// @@ -972,7 +1235,16 @@ impl<'a, C, A> ControllerMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Registers the debuggee with the controller service. All agents attached to the same application should call this method with the same request content to get back the same stable `debuggee_id`. Agents should call this method again whenever `google.rpc.Code.NOT_FOUND` is returned from any controller method. This allows the controller service to disable the agent or recover from any data loss. If the debuggee is disabled by the server, the response will have `is_disabled` set to `true`. + /// Registers the debuggee with the controller service. + /// + /// All agents attached to the same application should call this method with + /// the same request content to get back the same stable `debuggee_id`. Agents + /// should call this method again whenever `google.rpc.Code.NOT_FOUND` is + /// returned from any controller method. + /// + /// This allows the controller service to disable the agent or recover from any + /// data loss. If the debuggee is disabled by the server, the response will + /// have `is_disabled` set to `true`. /// /// # Arguments /// @@ -989,7 +1261,19 @@ impl<'a, C, A> ControllerMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns the list of all active breakpoints for the debuggee. The breakpoint specification (location, condition, and expression fields) is semantically immutable, although the field values may change. For example, an agent may update the location line number to reflect the actual line where the breakpoint was set, but this doesn't change the breakpoint semantics. This means that an agent does not need to check if a breakpoint has changed when it encounters the same breakpoint on a successive call. Moreover, an agent should remember the breakpoints that are completed until the controller removes them from the active list to avoid setting those breakpoints again. + /// Returns the list of all active breakpoints for the debuggee. + /// + /// The breakpoint specification (location, condition, and expression + /// fields) is semantically immutable, although the field values may + /// change. For example, an agent may update the location line number + /// to reflect the actual line where the breakpoint was set, but this + /// doesn't change the breakpoint semantics. + /// + /// This means that an agent does not need to check if a breakpoint has changed + /// when it encounters the same breakpoint on a successive call. + /// Moreover, an agent should remember the breakpoints that are completed + /// until the controller removes them from the active list to avoid + /// setting those breakpoints again. /// /// # Arguments /// @@ -1154,7 +1438,15 @@ impl<'a, C, A> DebuggerMethods<'a, C, A> { // CallBuilders ### // ################# -/// Updates the breakpoint state or mutable fields. The entire Breakpoint message must be sent back to the controller service. Updates to active breakpoint fields are only allowed if the new value does not change the breakpoint specification. Updates to the `location`, `condition` and `expression` fields should not alter the breakpoint semantics. These may only make changes such as canonicalizing a value or snapping the location to the correct line of code. +/// Updates the breakpoint state or mutable fields. +/// The entire Breakpoint message must be sent back to the controller +/// service. +/// +/// Updates to active breakpoint fields are only allowed if the new value +/// does not change the breakpoint specification. Updates to the `location`, +/// `condition` and `expression` fields should not alter the breakpoint +/// semantics. These may only make changes such as canonicalizing a value +/// or snapping the location to the correct line of code. /// /// A builder for the *debuggees.breakpoints.update* method supported by a *controller* resource. /// It is not used directly, but through a `ControllerMethods` instance. @@ -1405,12 +1697,12 @@ impl<'a, C, A> ControllerDebuggeeBreakpointUpdateCall<'a, C, A> where C: BorrowM /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ControllerDebuggeeBreakpointUpdateCall<'a, C, A> @@ -1438,7 +1730,16 @@ impl<'a, C, A> ControllerDebuggeeBreakpointUpdateCall<'a, C, A> where C: BorrowM } -/// Registers the debuggee with the controller service. All agents attached to the same application should call this method with the same request content to get back the same stable `debuggee_id`. Agents should call this method again whenever `google.rpc.Code.NOT_FOUND` is returned from any controller method. This allows the controller service to disable the agent or recover from any data loss. If the debuggee is disabled by the server, the response will have `is_disabled` set to `true`. +/// Registers the debuggee with the controller service. +/// +/// All agents attached to the same application should call this method with +/// the same request content to get back the same stable `debuggee_id`. Agents +/// should call this method again whenever `google.rpc.Code.NOT_FOUND` is +/// returned from any controller method. +/// +/// This allows the controller service to disable the agent or recover from any +/// data loss. If the debuggee is disabled by the server, the response will +/// have `is_disabled` set to `true`. /// /// A builder for the *debuggees.register* method supported by a *controller* resource. /// It is not used directly, but through a `ControllerMethods` instance. @@ -1644,12 +1945,12 @@ impl<'a, C, A> ControllerDebuggeeRegisterCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ControllerDebuggeeRegisterCall<'a, C, A> @@ -1677,7 +1978,19 @@ impl<'a, C, A> ControllerDebuggeeRegisterCall<'a, C, A> where C: BorrowMut ControllerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut self._debuggee_id = new_value.to_string(); self } - /// A wait token that, if specified, blocks the method call until the list of active breakpoints has changed, or a server selected timeout has expired. The value should be set from the last returned response. + /// A wait token that, if specified, blocks the method call until the list + /// of active breakpoints has changed, or a server selected timeout has + /// expired. The value should be set from the last returned response. /// /// Sets the *wait token* query property to the given value. pub fn wait_token(mut self, new_value: &str) -> ControllerDebuggeeBreakpointListCall<'a, C, A> { self._wait_token = Some(new_value.to_string()); self } - /// If set to `true`, returns `google.rpc.Code.OK` status and sets the `wait_expired` response field to `true` when the server-selected timeout has expired (recommended). If set to `false`, returns `google.rpc.Code.ABORTED` status when the server-selected timeout has expired (deprecated). + /// If set to `true`, returns `google.rpc.Code.OK` status and sets the + /// `wait_expired` response field to `true` when the server-selected timeout + /// has expired (recommended). + /// + /// If set to `false`, returns `google.rpc.Code.ABORTED` status when the + /// server-selected timeout has expired (deprecated). /// /// Sets the *success on timeout* query property to the given value. pub fn success_on_timeout(mut self, new_value: bool) -> ControllerDebuggeeBreakpointListCall<'a, C, A> { @@ -1909,12 +2229,12 @@ impl<'a, C, A> ControllerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ControllerDebuggeeBreakpointListCall<'a, C, A> @@ -2142,7 +2462,8 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointGetCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointGetCall<'a, C, A> { @@ -2174,12 +2495,12 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> DebuggerDebuggeeBreakpointGetCall<'a, C, A> @@ -2407,7 +2728,8 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> where C: BorrowMut self._breakpoint_id = new_value.to_string(); self } - /// The client version making the call. Following: `domain/type/version` (e.g., `google.com/intellij/v1`). + /// The client version making the call. + /// Following: `domain/type/version` (e.g., `google.com/intellij/v1`). /// /// Sets the *client version* query property to the given value. pub fn client_version(mut self, new_value: &str) -> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> { @@ -2439,12 +2761,12 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> where C: BorrowMut /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> @@ -2644,14 +2966,16 @@ impl<'a, C, A> DebuggerDebuggeeListCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeListCall<'a, C, A> { self._include_inactive = Some(new_value); self } - /// The client version making the call. Following: `domain/type/version` (e.g., `google.com/intellij/v1`). + /// The client version making the call. + /// Following: `domain/type/version` (e.g., `google.com/intellij/v1`). /// /// Sets the *client version* query property to the given value. pub fn client_version(mut self, new_value: &str) -> DebuggerDebuggeeListCall<'a, C, A> { @@ -2683,12 +3007,12 @@ impl<'a, C, A> DebuggerDebuggeeListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> DebuggerDebuggeeListCall<'a, C, A> @@ -2935,7 +3259,8 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointSetCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointSetCall<'a, C, A> { @@ -2967,12 +3292,12 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointSetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> DebuggerDebuggeeBreakpointSetCall<'a, C, A> @@ -3213,35 +3538,43 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointListCall<'a, C, A> { self._wait_token = Some(new_value.to_string()); self } - /// When set to `true`, the response breakpoints are stripped of the results fields: `stack_frames`, `evaluated_expressions` and `variable_table`. + /// This field is deprecated. The following fields are always stripped out of + /// the result: `stack_frames`, `evaluated_expressions` and `variable_table`. /// /// Sets the *strip results* query property to the given value. pub fn strip_results(mut self, new_value: bool) -> DebuggerDebuggeeBreakpointListCall<'a, C, A> { self._strip_results = Some(new_value); self } - /// When set to `true`, the response includes active and inactive breakpoints. Otherwise, it includes only active breakpoints. + /// When set to `true`, the response includes active and inactive + /// breakpoints. Otherwise, it includes only active breakpoints. /// /// Sets the *include inactive* query property to the given value. pub fn include_inactive(mut self, new_value: bool) -> DebuggerDebuggeeBreakpointListCall<'a, C, A> { self._include_inactive = Some(new_value); self } - /// When set to `true`, the response includes the list of breakpoints set by any user. Otherwise, it includes only breakpoints set by the caller. + /// When set to `true`, the response includes the list of breakpoints set by + /// any user. Otherwise, it includes only breakpoints set by the caller. /// /// Sets the *include all users* query property to the given value. pub fn include_all_users(mut self, new_value: bool) -> DebuggerDebuggeeBreakpointListCall<'a, C, A> { self._include_all_users = Some(new_value); self } - /// The client version making the call. Following: `domain/type/version` (e.g., `google.com/intellij/v1`). + /// The client version making the call. + /// Following: `domain/type/version` (e.g., `google.com/intellij/v1`). /// /// Sets the *client version* query property to the given value. pub fn client_version(mut self, new_value: &str) -> DebuggerDebuggeeBreakpointListCall<'a, C, A> { @@ -3280,12 +3613,12 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> DebuggerDebuggeeBreakpointListCall<'a, C, A> diff --git a/gen/cloudkms1_beta1-cli/Cargo.toml b/gen/cloudkms1_beta1-cli/Cargo.toml new file mode 100644 index 0000000000..1d3b79f063 --- /dev/null +++ b/gen/cloudkms1_beta1-cli/Cargo.toml @@ -0,0 +1,37 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-cloudkms1_beta1-cli" +version = "1.0.4+20170515" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with Cloud KMS (protocol v1beta1)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudkms1_beta1-cli" +homepage = "https://cloud.google.com/kms/" +documentation = "http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli" +license = "MIT" +keywords = ["cloudkms", "google", "cli"] + +[[bin]] +name = "cloudkms1-beta1" + +[dependencies] +hyper = "^ 0.10" +mime = "^ 0.2.0" +serde = "^ 0.9" +serde_json = "^ 0.9" +serde_derive = "^ 0.9" +yup-oauth2 = "^ 1.0" +strsim = "^0.5" +hyper-rustls = "^0.6" +yup-hyper-mock = "^2.0" +clap = "^2.0" + +[features] + + + +[dependencies.google-cloudkms1_beta1] +path = "../cloudkms1_beta1" +version = "1.0.4+20170515" diff --git a/gen/cloudkms1_beta1-cli/LICENSE.md b/gen/cloudkms1_beta1-cli/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/cloudkms1_beta1-cli/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `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/cloudkms1_beta1-cli/README.md b/gen/cloudkms1_beta1-cli/README.md new file mode 100644 index 0000000000..a3c8260637 --- /dev/null +++ b/gen/cloudkms1_beta1-cli/README.md @@ -0,0 +1,137 @@ + +The `cloudkms1-beta1` command-line interface *(CLI)* allows to use most features of the *Google Cloud KMS* 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 KMS* API can be found at the +[official documentation site](https://cloud.google.com/kms/). + +# Installation and Source Code + +Install the command-line interface with cargo using: + +```bash +cargo install google-cloudkms1_beta1-cli +``` + +Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudkms1_beta1-cli). + +# Usage + +This documentation was generated from the *Cloud KMS* API at revision *20170515*. The CLI is at version *1.0.4*. + +```bash +cloudkms1-beta1 [options] + projects + locations-get [-p ]... [-o ] + locations-key-rings-create (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-create (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-crypto-key-versions-create (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-crypto-key-versions-destroy (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-crypto-key-versions-get [-p ]... [-o ] + locations-key-rings-crypto-keys-crypto-key-versions-list [-p ]... [-o ] + locations-key-rings-crypto-keys-crypto-key-versions-patch (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-crypto-key-versions-restore (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-decrypt (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-encrypt (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-get [-p ]... [-o ] + locations-key-rings-crypto-keys-get-iam-policy [-p ]... [-o ] + locations-key-rings-crypto-keys-list [-p ]... [-o ] + locations-key-rings-crypto-keys-patch (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-set-iam-policy (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-test-iam-permissions (-r )... [-p ]... [-o ] + locations-key-rings-crypto-keys-update-primary-version (-r )... [-p ]... [-o ] + locations-key-rings-get [-p ]... [-o ] + locations-key-rings-get-iam-policy [-p ]... [-o ] + locations-key-rings-list [-p ]... [-o ] + locations-key-rings-set-iam-policy (-r )... [-p ]... [-o ] + locations-key-rings-test-iam-permissions (-r )... [-p ]... [-o ] + locations-list [-p ]... [-o ] + cloudkms1-beta1 --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] + --debug + Output all server communication to standard error. `tx` and `rx` are placed + into the same stream. + --debug-auth + Output all communication related to authentication to standard error. `tx` + and `rx` are placed into the same stream. + +``` + +# Configuration + +The program will store all persistent data in the `~/.google-service-cli` directory in *JSON* files prefixed with `cloudkms1-beta1-`. 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/cloudkms1-beta1-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/cloudkms1-beta1-secret.json`, assuming that the required *cloudkms* 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 all client-server communication to standard error, whereas the `--debug-auth` flag +will cause all communication related to authentication to standard error. +If the `--debug` flag is set, error-results will be debug-printed, possibly yielding more information about the +issue at hand. + +You may consider redirecting standard error into a file for ease of use, e.g. `cloudkms1-beta1 --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/ \ No newline at end of file diff --git a/gen/cloudkms1_beta1-cli/mkdocs.yml b/gen/cloudkms1_beta1-cli/mkdocs.yml new file mode 100644 index 0000000000..304914217a --- /dev/null +++ b/gen/cloudkms1_beta1-cli/mkdocs.yml @@ -0,0 +1,40 @@ +site_name: Cloud KMS v1.0.4+20170515 +site_url: http://byron.github.io/google-apis-rs/google-cloudkms1_beta1-cli +site_description: A complete library to interact with Cloud KMS (protocol v1beta1) + +repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/cloudkms1_beta1-cli + +docs_dir: docs +site_dir: build_html + +pages: +- ['index.md', 'Home'] +- ['projects_locations-get.md', 'Projects', 'Locations Get'] +- ['projects_locations-key-rings-create.md', 'Projects', 'Locations Key Rings Create'] +- ['projects_locations-key-rings-crypto-keys-create.md', 'Projects', 'Locations Key Rings Crypto Keys Create'] +- ['projects_locations-key-rings-crypto-keys-crypto-key-versions-create.md', 'Projects', 'Locations Key Rings Crypto Keys Crypto Key Versions Create'] +- ['projects_locations-key-rings-crypto-keys-crypto-key-versions-destroy.md', 'Projects', 'Locations Key Rings Crypto Keys Crypto Key Versions Destroy'] +- ['projects_locations-key-rings-crypto-keys-crypto-key-versions-get.md', 'Projects', 'Locations Key Rings Crypto Keys Crypto Key Versions Get'] +- ['projects_locations-key-rings-crypto-keys-crypto-key-versions-list.md', 'Projects', 'Locations Key Rings Crypto Keys Crypto Key Versions List'] +- ['projects_locations-key-rings-crypto-keys-crypto-key-versions-patch.md', 'Projects', 'Locations Key Rings Crypto Keys Crypto Key Versions Patch'] +- ['projects_locations-key-rings-crypto-keys-crypto-key-versions-restore.md', 'Projects', 'Locations Key Rings Crypto Keys Crypto Key Versions Restore'] +- ['projects_locations-key-rings-crypto-keys-decrypt.md', 'Projects', 'Locations Key Rings Crypto Keys Decrypt'] +- ['projects_locations-key-rings-crypto-keys-encrypt.md', 'Projects', 'Locations Key Rings Crypto Keys Encrypt'] +- ['projects_locations-key-rings-crypto-keys-get.md', 'Projects', 'Locations Key Rings Crypto Keys Get'] +- ['projects_locations-key-rings-crypto-keys-get-iam-policy.md', 'Projects', 'Locations Key Rings Crypto Keys Get Iam Policy'] +- ['projects_locations-key-rings-crypto-keys-list.md', 'Projects', 'Locations Key Rings Crypto Keys List'] +- ['projects_locations-key-rings-crypto-keys-patch.md', 'Projects', 'Locations Key Rings Crypto Keys Patch'] +- ['projects_locations-key-rings-crypto-keys-set-iam-policy.md', 'Projects', 'Locations Key Rings Crypto Keys Set Iam Policy'] +- ['projects_locations-key-rings-crypto-keys-test-iam-permissions.md', 'Projects', 'Locations Key Rings Crypto Keys Test Iam Permissions'] +- ['projects_locations-key-rings-crypto-keys-update-primary-version.md', 'Projects', 'Locations Key Rings Crypto Keys Update Primary Version'] +- ['projects_locations-key-rings-get.md', 'Projects', 'Locations Key Rings Get'] +- ['projects_locations-key-rings-get-iam-policy.md', 'Projects', 'Locations Key Rings Get Iam Policy'] +- ['projects_locations-key-rings-list.md', 'Projects', 'Locations Key Rings List'] +- ['projects_locations-key-rings-set-iam-policy.md', 'Projects', 'Locations Key Rings Set Iam Policy'] +- ['projects_locations-key-rings-test-iam-permissions.md', 'Projects', 'Locations Key Rings Test Iam Permissions'] +- ['projects_locations-list.md', 'Projects', 'Locations List'] + +theme: readthedocs + +copyright: Copyright © 2015-2016, `Sebastian Thiel` + diff --git a/gen/cloudkms1_beta1-cli/src/cmn.rs b/gen/cloudkms1_beta1-cli/src/cmn.rs new file mode 100644 index 0000000000..6cc030e9c4 --- /dev/null +++ b/gen/cloudkms1_beta1-cli/src/cmn.rs @@ -0,0 +1,747 @@ +// COPY OF 'src/rust/cli/cmn.rs' +// DO NOT EDIT +use oauth2::{ApplicationSecret, ConsoleApplicationSecret, TokenStorage, Token}; +use serde_json as json; +use serde_json::value::Value; +use mime::Mime; +use clap::{App, SubCommand}; +use strsim; + +use std::fs; +use std::env; +use std::io; +use std::error::Error as StdError; +use std::fmt; +use std::path::{Path, PathBuf}; +use std::str::FromStr; +use std::string::ToString; +use std::io::{Write, Read, stdout}; + +use std::default::Default; + +const FIELD_SEP: char = '.'; + + +pub enum ComplexType { + Pod, + Vec, + Map, +} + + // Null, + // Bool(bool), + // I64(i64), + // U64(u64), + // F64(f64), + // String(String), + +pub enum JsonType { + Boolean, + Int, + Uint, + Float, + String, +} + +pub struct JsonTypeInfo { + pub jtype: JsonType, + pub ctype: ComplexType, +} + +// Based on @erickt user comment. Thanks for the idea ! +// Remove all keys whose values are null from given value (changed in place) +pub fn remove_json_null_values(value: &mut Value) { + match *value { + Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} + +fn did_you_mean<'a>(v: &str, possible_values: &[&'a str]) -> Option<&'a str> { + + let mut candidate: Option<(f64, &str)> = None; + for pv in possible_values { + let confidence = strsim::jaro_winkler(v, pv); + if confidence > 0.8 && (candidate.is_none() || (candidate.as_ref().unwrap().0 < confidence)) { + candidate = Some((confidence, pv)); + } + } + match candidate { + None => None, + Some((_, candidate)) => Some(candidate), + } +} + +pub enum CallType { + Upload(UploadProtocol), + Standard, +} + +arg_enum!{ + pub enum UploadProtocol { + Simple, + Resumable + } +} + +impl AsRef for UploadProtocol { + fn as_ref(&self) -> &str { + match *self { + UploadProtocol::Simple => "simple", + UploadProtocol::Resumable => "resumable" + } + } +} + +impl AsRef for CallType { + fn as_ref(&self) -> &str { + match *self { + CallType::Upload(ref proto) => proto.as_ref(), + CallType::Standard => "standard-request" + } + } +} + +#[derive(Clone, Default)] +pub struct FieldCursor(Vec); + +impl ToString for FieldCursor { + fn to_string(&self) -> String { + self.0.join(".") + } +} + +impl From<&'static str> for FieldCursor { + fn from(value: &'static str) -> FieldCursor { + let mut res = FieldCursor::default(); + res.set(value).unwrap(); + res + } +} + +fn assure_entry<'a, 'b>(m: &'a mut json::Map, k: &'b String) -> &'a mut Value { + if m.contains_key(k) { + return m.get_mut(k).expect("value to exist") + } + m.insert(k.to_owned(), Value::Object(Default::default())); + m.get_mut(k).expect("value to exist") +} + +impl FieldCursor { + pub fn set(&mut self, value: &str) -> Result<(), CLIError> { + if value.len() == 0 { + return Err(CLIError::Field(FieldError::Empty)) + } + + let mut first_is_field_sep = false; + let mut char_count: usize = 0; + let mut last_c = FIELD_SEP; + let mut num_conscutive_field_seps = 0; + + let mut field = String::new(); + let mut fields = self.0.clone(); + + let push_field = |fs: &mut Vec, f: &mut String| { + if f.len() > 0 { + fs.push(f.clone()); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + char_count += 1; + + if c == FIELD_SEP { + if cid == 0 { + first_is_field_sep = true; + } + num_conscutive_field_seps += 1; + if cid > 0 && last_c == FIELD_SEP { + if fields.pop().is_none() { + return Err(CLIError::Field(FieldError::PopOnEmpty(value.to_string()))) + } + } else { + push_field(&mut fields, &mut field); + } + } else { + num_conscutive_field_seps = 0; + if cid == 1 { + if first_is_field_sep { + fields.truncate(0); + } + } + field.push(c); + } + + last_c = c; + } + + push_field(&mut fields, &mut field); + + if char_count == 1 && first_is_field_sep { + fields.truncate(0); + } + if char_count > 1 && num_conscutive_field_seps == 1 { + return Err(CLIError::Field(FieldError::TrailingFieldSep(value.to_string()))) + } + + self.0 = fields; + Ok(()) + } + + pub fn did_you_mean(value: &str, possible_values: &[&str]) -> Option { + if value.len() == 0 { + return None + } + + let mut last_c = FIELD_SEP; + + let mut field = String::new(); + let mut output = String::new(); + + let push_field = |fs: &mut String, f: &mut String| { + if f.len() > 0 { + fs.push_str( + match did_you_mean(&f, possible_values) { + Some(candidate) => candidate, + None => &f, + }); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + if c == FIELD_SEP { + if last_c != FIELD_SEP { + push_field(&mut output, &mut field); + } + output.push(c); + } else { + field.push(c); + } + + last_c = c; + } + + push_field(&mut output, &mut field); + + if &output == value { + None + } else { + Some(output) + } + } + + pub fn set_json_value(&self, mut object: &mut Value, + value: &str, type_info: JsonTypeInfo, + err: &mut InvalidOptionsError, + orig_cursor: &FieldCursor) { + assert!(self.0.len() > 0); + + for field in &self.0[..self.0.len()-1] { + let tmp = object; + object = + match *tmp { + Value::Object(ref mut mapping) => { + assure_entry(mapping, &field) + }, + _ => panic!("We don't expect non-object Values here ...") + }; + } + + match *object { + Value::Object(ref mut mapping) => { + let field = &self.0[self.0.len()-1]; + let to_jval = + |value: &str, jtype: JsonType, err: &mut InvalidOptionsError| + -> Value { + match jtype { + JsonType::Boolean => + Value::Bool(arg_from_str(value, err, &field, "boolean")), + JsonType::Int => + Value::Number(json::Number::from_f64(arg_from_str(value, err, &field, "int")).expect("valid f64")), + JsonType::Uint => + Value::Number(json::Number::from_f64(arg_from_str(value, err, &field, "uint")).expect("valid f64")), + JsonType::Float => + Value::Number(json::Number::from_f64(arg_from_str(value, err, &field, "float")).expect("valid f64")), + JsonType::String => + Value::String(value.to_owned()), + } + }; + + match type_info.ctype { + ComplexType::Pod => { + if mapping.insert(field.to_owned(), to_jval(value, type_info.jtype, err)).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + }, + ComplexType::Vec => { + match *assure_entry(mapping, field) { + Value::Array(ref mut values) => values.push(to_jval(value, type_info.jtype, err)), + _ => unreachable!() + } + }, + ComplexType::Map => { + let (key, value) = parse_kv_arg(value, err, true); + let jval = to_jval(value.unwrap_or(""), type_info.jtype, err); + + match *assure_entry(mapping, &field) { + + Value::Object(ref mut value_map) => { + if value_map.insert(key.to_owned(), jval).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + } + _ => unreachable!() + } + } + } + }, + _ => unreachable!() + } + } + + pub fn num_fields(&self) -> usize { + self.0.len() + } +} + +pub fn parse_kv_arg<'a>(kv: &'a str, err: &mut InvalidOptionsError, for_hashmap: bool) + -> (&'a str, Option<&'a str>) { + let mut add_err = || err.issues.push(CLIError::InvalidKeyValueSyntax(kv.to_string(),for_hashmap)); + match kv.find('=') { + None => { + add_err(); + return (kv, None) + }, + Some(pos) => { + let key = &kv[..pos]; + if kv.len() <= pos + 1 { + add_err(); + return (key, Some("")) + } + (key, Some(&kv[pos+1..])) + } + } +} + +pub fn calltype_from_str(name: &str, valid_protocols: Vec, err: &mut InvalidOptionsError) -> CallType { + CallType::Upload( + match UploadProtocol::from_str(name) { + Ok(up) => up, + Err(msg) => { + err.issues.push(CLIError::InvalidUploadProtocol(name.to_string(), valid_protocols)); + UploadProtocol::Simple + } + }) +} + +pub fn input_file_from_opts(file_path: &str, err: &mut InvalidOptionsError) -> Option { + match fs::File::open(file_path) { + Ok(f) => Some(f), + Err(io_err) => { + err.issues.push(CLIError::Input(InputError::Io((file_path.to_string(), io_err)))); + None + } + } +} + +pub fn input_mime_from_opts(mime: &str, err: &mut InvalidOptionsError) -> Option { + match mime.parse() { + Ok(m) => Some(m), + Err(_) => { + err.issues.push(CLIError::Input(InputError::Mime(mime.to_string()))); + None + } + } +} + +pub fn writer_from_opts(arg: Option<&str>) -> Result, io::Error> { + let f = arg.unwrap_or("-"); + match f { + "-" => Ok(Box::new(stdout())), + _ => match fs::OpenOptions::new().create(true).write(true).open(f) { + Ok(f) => Ok(Box::new(f)), + Err(io_err) => Err(io_err), + } + } +} + + +pub fn arg_from_str<'a, T>(arg: &str, err: &mut InvalidOptionsError, + arg_name: &'a str, + arg_type: &'a str) -> T + where T: FromStr + Default, + ::Err: fmt::Display { + match FromStr::from_str(arg) { + Err(perr) => { + err.issues.push( + CLIError::ParseError(arg_name.to_owned(), arg_type.to_owned(), arg.to_string(), format!("{}", perr)) + ); + Default::default() + }, + Ok(v) => v, + } +} + +pub struct JsonTokenStorage { + pub program_name: &'static str, + pub db_dir: String, +} + +impl JsonTokenStorage { + fn path(&self, scope_hash: u64) -> PathBuf { + Path::new(&self.db_dir).join(&format!("{}-token-{}.json", self.program_name, scope_hash)) + } +} + + +#[derive(Debug)] +pub enum TokenStorageError { + Json(json::Error), + Io(io::Error), +} + +impl fmt::Display for TokenStorageError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + TokenStorageError::Json(ref err) + => writeln!(f, "Could not serialize secrets: {}", err), + TokenStorageError::Io(ref err) + => writeln!(f, "Failed to write secret token: {}", err), + } + } +} + +impl StdError for TokenStorageError { + fn description(&self) -> &str { + "Failure when getting or setting the token storage" + } +} + + +impl TokenStorage for JsonTokenStorage { + type Error = TokenStorageError; + + // NOTE: logging might be interesting, currently we swallow all errors + fn set(&mut self, scope_hash: u64, _: &Vec<&str>, token: Option) -> Result<(), TokenStorageError> { + match token { + None => { + match fs::remove_file(self.path(scope_hash)) { + Err(err) => + match err.kind() { + io::ErrorKind::NotFound => Ok(()), + _ => Err(TokenStorageError::Io(err)) + }, + Ok(_) => Ok(()), + } + } + Some(token) => { + match fs::OpenOptions::new().create(true).write(true).open(&self.path(scope_hash)) { + Ok(mut f) => { + match json::to_writer_pretty(&mut f, &token) { + Ok(_) => Ok(()), + Err(serde_err) => Err(TokenStorageError::Json(serde_err)), + } + }, + Err(io_err) => Err(TokenStorageError::Io(io_err)) + } + } + } + } + + fn get(&self, scope_hash: u64, _: &Vec<&str>) -> Result, TokenStorageError> { + match fs::File::open(&self.path(scope_hash)) { + Ok(f) => { + match json::de::from_reader(f) { + Ok(token) => Ok(Some(token)), + Err(err) => Err(TokenStorageError::Json(err)), + } + }, + Err(io_err) => { + match io_err.kind() { + io::ErrorKind::NotFound => Ok(None), + _ => Err(TokenStorageError::Io(io_err)) + } + } + } + } +} + + +#[derive(Debug)] +pub enum ApplicationSecretError { + DecoderError((String, json::Error)), + FormatError(String), +} + +impl fmt::Display for ApplicationSecretError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ApplicationSecretError::DecoderError((ref path, ref err)) + => writeln!(f, "Could not decode file at '{}' with error: {}.", + path, err), + ApplicationSecretError::FormatError(ref path) + => writeln!(f, "'installed' field is unset in secret file at '{}'.", + path), + } + } +} + +#[derive(Debug)] +pub enum ConfigurationError { + DirectoryCreationFailed((String, io::Error)), + DirectoryUnset, + HomeExpansionFailed(String), + Secret(ApplicationSecretError), + Io((String, io::Error)), +} + +impl fmt::Display for ConfigurationError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ConfigurationError::DirectoryCreationFailed((ref dir, ref err)) + => writeln!(f, "Directory '{}' could not be created with error: {}.", dir, err), + ConfigurationError::DirectoryUnset + => writeln!(f, "--config-dir was unset or empty."), + ConfigurationError::HomeExpansionFailed(ref dir) + => writeln!(f, "Couldn't find HOME directory of current user, failed to expand '{}'.", dir), + ConfigurationError::Secret(ref err) + => writeln!(f, "Secret -> {}", err), + ConfigurationError::Io((ref path, ref err)) + => writeln!(f, "IO operation failed on path '{}' with error: {}.", path, err), + } + } +} + +#[derive(Debug)] +pub enum InputError { + Io((String, io::Error)), + Mime(String), +} + +impl fmt::Display for InputError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + InputError::Io((ref file_path, ref io_err)) + => writeln!(f, "Failed to open '{}' for reading with error: {}.", file_path, io_err), + InputError::Mime(ref mime) + => writeln!(f, "'{}' is not a known mime-type.", mime), + } + } +} + +#[derive(Debug)] +pub enum FieldError { + PopOnEmpty(String), + TrailingFieldSep(String), + Unknown(String, Option, Option), + Duplicate(String), + Empty, +} + + +impl fmt::Display for FieldError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + FieldError::PopOnEmpty(ref field) + => writeln!(f, "'{}': Cannot move up on empty field cursor.", field), + FieldError::TrailingFieldSep(ref field) + => writeln!(f, "'{}': Single field separator may not be last character.", field), + FieldError::Unknown(ref field, ref suggestion, ref value) => { + let suffix = + match *suggestion { + Some(ref s) => { + let kv = + match *value { + Some(ref v) => format!("{}={}", s, v), + None => s.clone(), + }; + format!(" Did you mean '{}' ?", kv) + }, + None => String::new(), + }; + writeln!(f, "Field '{}' does not exist.{}", field, suffix) + }, + FieldError::Duplicate(ref cursor) + => writeln!(f, "Value at '{}' was already set", cursor), + FieldError::Empty + => writeln!(f, "Field names must not be empty."), + } + } +} + + +#[derive(Debug)] +pub enum CLIError { + Configuration(ConfigurationError), + ParseError(String, String, String, String), + UnknownParameter(String, Vec<&'static str>), + InvalidUploadProtocol(String, Vec), + InvalidKeyValueSyntax(String, bool), + Input(InputError), + Field(FieldError), + MissingCommandError, + MissingMethodError(String), +} + +impl fmt::Display for CLIError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + CLIError::Configuration(ref err) => write!(f, "Configuration -> {}", err), + CLIError::Input(ref err) => write!(f, "Input -> {}", err), + CLIError::Field(ref err) => write!(f, "Field -> {}", err), + CLIError::InvalidUploadProtocol(ref proto_name, ref valid_names) + => writeln!(f, "'{}' is not a valid upload protocol. Choose from one of {}.", proto_name, valid_names.join(", ")), + CLIError::ParseError(ref arg_name, ref type_name, ref value, ref err_desc) + => writeln!(f, "Failed to parse argument '{}' with value '{}' as {} with error: {}.", + arg_name, value, type_name, err_desc), + CLIError::UnknownParameter(ref param_name, ref possible_values) => { + let suffix = + match did_you_mean(param_name, &possible_values) { + Some(v) => format!(" Did you mean '{}' ?", v), + None => String::new(), + }; + write!(f, "Parameter '{}' is unknown.{}\n", param_name, suffix) + }, + CLIError::InvalidKeyValueSyntax(ref kv, is_hashmap) => { + let hashmap_info = if is_hashmap { "hashmap " } else { "" }; + writeln!(f, "'{}' does not match {}pattern =.", kv, hashmap_info) + }, + CLIError::MissingCommandError => writeln!(f, "Please specify the main sub-command."), + CLIError::MissingMethodError(ref cmd) => writeln!(f, "Please specify the method to call on the '{}' command.", cmd), + } + } +} + +#[derive(Debug)] +pub struct InvalidOptionsError { + pub issues: Vec, + pub exit_code: i32, +} + +impl fmt::Display for InvalidOptionsError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + for issue in &self.issues { + try!(issue.fmt(f)); + } + Ok(()) + } +} + +impl InvalidOptionsError { + pub fn single(err: CLIError, exit_code: i32) -> InvalidOptionsError { + InvalidOptionsError { + issues: vec![err], + exit_code: exit_code, + } + } + + pub fn new() -> InvalidOptionsError { + InvalidOptionsError { + issues: Vec::new(), + exit_code: 1, + } + } +} + +pub fn assure_config_dir_exists(dir: &str) -> Result { + let trdir = dir.trim(); + if trdir.len() == 0 { + return Err(CLIError::Configuration(ConfigurationError::DirectoryUnset)) + } + + let expanded_config_dir = + if trdir.as_bytes()[0] == b'~' { + match env::var("HOME").ok().or(env::var("UserProfile").ok()) { + None => return Err(CLIError::Configuration(ConfigurationError::HomeExpansionFailed(trdir.to_string()))), + Some(mut user) => { + user.push_str(&trdir[1..]); + user + } + } + } else { + trdir.to_string() + }; + + if let Err(err) = fs::create_dir(&expanded_config_dir) { + if err.kind() != io::ErrorKind::AlreadyExists { + return Err(CLIError::Configuration( + ConfigurationError::DirectoryCreationFailed((expanded_config_dir, err)))) + } + } + + Ok(expanded_config_dir) +} + +pub fn application_secret_from_directory(dir: &str, + secret_basename: &str, + json_console_secret: &str) + -> Result { + let secret_path = Path::new(dir).join(secret_basename); + let secret_str = || secret_path.as_path().to_str().unwrap().to_string(); + let secret_io_error = |io_err: io::Error| { + Err(CLIError::Configuration(ConfigurationError::Io( + (secret_str(), io_err) + ))) + }; + + for _ in 0..2 { + match fs::File::open(&secret_path) { + Err(mut err) => { + if err.kind() == io::ErrorKind::NotFound { + // Write our built-in one - user may adjust the written file at will + + err = match fs::OpenOptions::new().create(true).write(true).open(&secret_path) { + Err(cfe) => cfe, + Ok(mut f) => { + // Assure we convert 'ugly' json string into pretty one + let console_secret: ConsoleApplicationSecret + = json::from_str(json_console_secret).unwrap(); + match json::to_writer_pretty(&mut f, &console_secret) { + Err(serde_err) => panic!("Unexpected serde error: {:#?}", serde_err), + Ok(_) => continue, + } + } + }; + // fall through to IO error handling + } + return secret_io_error(err) + }, + Ok(f) => { + match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { + Err(json_err) => + return Err(CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::DecoderError( + (secret_str(), json_err) + )))), + Ok(console_secret) => + match console_secret.installed { + Some(secret) => return Ok(secret), + None => return Err( + CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::FormatError(secret_str()) + ))) + }, + } + } + } + } + unreachable!(); +} diff --git a/gen/cloudkms1_beta1-cli/src/main.rs b/gen/cloudkms1_beta1-cli/src/main.rs new file mode 100644 index 0000000000..9b967a873e --- /dev/null +++ b/gen/cloudkms1_beta1-cli/src/main.rs @@ -0,0 +1,2789 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/cli/main.rs.mako' +// DO NOT EDIT ! +#![allow(unused_variables, unused_imports, dead_code, unused_mut)] + +#[macro_use] +extern crate clap; +extern crate yup_oauth2 as oauth2; +extern crate yup_hyper_mock as mock; +extern crate hyper_rustls; +extern crate serde; +extern crate serde_json; +extern crate hyper; +extern crate mime; +extern crate strsim; +extern crate google_cloudkms1_beta1 as api; + +use std::env; +use std::io::{self, Write}; +use clap::{App, SubCommand, Arg}; + +mod cmn; + +use cmn::{InvalidOptionsError, CLIError, JsonTokenStorage, 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::str::FromStr; + +use oauth2::{Authenticator, DefaultAuthenticatorDelegate, FlowType}; +use serde_json as json; +use clap::ArgMatches; + +enum DoitError { + IoError(String, io::Error), + ApiError(api::Error), +} + +struct Engine<'n> { + opt: ArgMatches<'n>, + hub: api::CloudKMS>, + gp: Vec<&'static str>, + gpm: Vec<(&'static str, &'static str)>, +} + + +impl<'n> Engine<'n> { + fn _projects_locations_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_create(&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()[..] { + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "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::KeyRing = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_create(request, 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 { + "key-ring-id" => { + call = call.key_ring_id(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(["key-ring-id"].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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_create(&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()[..] { + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "rotation-period" => Some(("rotationPeriod", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.name" => Some(("primary.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.state" => Some(("primary.state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.destroy-time" => Some(("primary.destroyTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.destroy-event-time" => Some(("primary.destroyEventTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.create-time" => Some(("primary.createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "purpose" => Some(("purpose", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "next-rotation-time" => Some(("nextRotationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "destroy-event-time", "destroy-time", "name", "next-rotation-time", "primary", "purpose", "rotation-period", "state"]); + 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::CryptoKey = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_create(request, 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 { + "crypto-key-id" => { + call = call.crypto_key_id(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(["crypto-key-id"].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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_crypto_key_versions_create(&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()[..] { + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "destroy-time" => Some(("destroyTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "destroy-event-time" => Some(("destroyEventTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "destroy-event-time", "destroy-time", "name", "state"]); + 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::CryptoKeyVersion = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_create(request, 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 { + _ => { + 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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_crypto_key_versions_destroy(&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::DestroyCryptoKeyVersionRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_destroy(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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_crypto_key_versions_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_crypto_key_versions_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_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(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + _ => { + 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-token", "page-size"].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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_crypto_key_versions_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()[..] { + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "destroy-time" => Some(("destroyTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "destroy-event-time" => Some(("destroyEventTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "destroy-event-time", "destroy-time", "name", "state"]); + 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::CryptoKeyVersion = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_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.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(["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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_crypto_key_versions_restore(&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::RestoreCryptoKeyVersionRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_restore(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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_decrypt(&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()[..] { + "ciphertext" => Some(("ciphertext", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "additional-authenticated-data" => Some(("additionalAuthenticatedData", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-authenticated-data", "ciphertext"]); + 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::DecryptRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_decrypt(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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_encrypt(&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()[..] { + "plaintext" => Some(("plaintext", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "additional-authenticated-data" => Some(("additionalAuthenticatedData", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-authenticated-data", "plaintext"]); + 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::EncryptRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_encrypt(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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_key_rings_crypto_keys_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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_get_iam_policy(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_key_rings_crypto_keys_get_iam_policy(opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_key_rings_crypto_keys_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(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + _ => { + 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-token", "page-size"].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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_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()[..] { + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "rotation-period" => Some(("rotationPeriod", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.name" => Some(("primary.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.state" => Some(("primary.state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.destroy-time" => Some(("primary.destroyTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.destroy-event-time" => Some(("primary.destroyEventTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary.create-time" => Some(("primary.createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "purpose" => Some(("purpose", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "next-rotation-time" => Some(("nextRotationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "destroy-event-time", "destroy-time", "name", "next-rotation-time", "primary", "purpose", "rotation-period", "state"]); + 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::CryptoKey = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_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.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(["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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_set_iam_policy(&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()[..] { + "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.iam-owned" => Some(("policy.iamOwned", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "update-mask" => Some(("updateMask", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "iam-owned", "policy", "update-mask", "version"]); + 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::SetIamPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_set_iam_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_test_iam_permissions(&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()[..] { + "permissions" => Some(("permissions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["permissions"]); + 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::TestIamPermissionsRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_test_iam_permissions(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_crypto_keys_update_primary_version(&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()[..] { + "crypto-key-version-id" => Some(("cryptoKeyVersionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["crypto-key-version-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::UpdateCryptoKeyPrimaryVersionRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_crypto_keys_update_primary_version(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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_key_rings_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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_get_iam_policy(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_key_rings_get_iam_policy(opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_key_rings_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(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + _ => { + 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-token", "page-size"].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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_set_iam_policy(&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()[..] { + "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.iam-owned" => Some(("policy.iamOwned", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "update-mask" => Some(("updateMask", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "iam-owned", "policy", "update-mask", "version"]); + 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::SetIamPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_set_iam_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_key_rings_test_iam_permissions(&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()[..] { + "permissions" => Some(("permissions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["permissions"]); + 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::TestIamPermissionsRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().locations_key_rings_test_iam_permissions(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _projects_locations_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().locations_list(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 { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + "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-token", "page-size"].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(), + _ => 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(()) + } + } + } + } + + 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() { + ("projects", Some(opt)) => { + match opt.subcommand() { + ("locations-get", Some(opt)) => { + call_result = self._projects_locations_get(opt, dry_run, &mut err); + }, + ("locations-key-rings-create", Some(opt)) => { + call_result = self._projects_locations_key_rings_create(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-create", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_create(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-crypto-key-versions-create", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_crypto_key_versions_create(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-crypto-key-versions-destroy", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_crypto_key_versions_destroy(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-crypto-key-versions-get", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_crypto_key_versions_get(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-crypto-key-versions-list", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_crypto_key_versions_list(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-crypto-key-versions-patch", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_crypto_key_versions_patch(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-crypto-key-versions-restore", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_crypto_key_versions_restore(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-decrypt", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_decrypt(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-encrypt", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_encrypt(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-get", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_get(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-get-iam-policy", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_get_iam_policy(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-list", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_list(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-patch", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_patch(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-set-iam-policy", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_set_iam_policy(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-test-iam-permissions", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_test_iam_permissions(opt, dry_run, &mut err); + }, + ("locations-key-rings-crypto-keys-update-primary-version", Some(opt)) => { + call_result = self._projects_locations_key_rings_crypto_keys_update_primary_version(opt, dry_run, &mut err); + }, + ("locations-key-rings-get", Some(opt)) => { + call_result = self._projects_locations_key_rings_get(opt, dry_run, &mut err); + }, + ("locations-key-rings-get-iam-policy", Some(opt)) => { + call_result = self._projects_locations_key_rings_get_iam_policy(opt, dry_run, &mut err); + }, + ("locations-key-rings-list", Some(opt)) => { + call_result = self._projects_locations_key_rings_list(opt, dry_run, &mut err); + }, + ("locations-key-rings-set-iam-policy", Some(opt)) => { + call_result = self._projects_locations_key_rings_set_iam_policy(opt, dry_run, &mut err); + }, + ("locations-key-rings-test-iam-permissions", Some(opt)) => { + call_result = self._projects_locations_key_rings_test_iam_permissions(opt, dry_run, &mut err); + }, + ("locations-list", Some(opt)) => { + call_result = self._projects_locations_list(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("projects".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 + fn new(opt: ArgMatches<'n>) -> Result, InvalidOptionsError> { + let (config_dir, secret) = { + let config_dir = match cmn::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 cmn::application_secret_from_directory(&config_dir, "cloudkms1-beta1-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 auth = Authenticator::new( &secret, DefaultAuthenticatorDelegate, + if opt.is_present("debug-auth") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new()) + }) + } else { + hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())) + }, + JsonTokenStorage { + program_name: "cloudkms1-beta1", + db_dir: config_dir.clone(), + }, Some(FlowType::InstalledRedirect(54324))); + + let client = + if opt.is_present("debug") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new()) + }) + } else { + hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())) + }; + let engine = Engine { + opt: opt, + hub: api::CloudKMS::new(client, auth), + gp: vec!["$-xgafv", "access-token", "alt", "bearer-token", "callback", "fields", "key", "oauth-token", "pp", "pretty-print", "quota-user", "upload-type", "upload-protocol"], + gpm: vec![ + ("$-xgafv", "$.xgafv"), + ("access-token", "access_token"), + ("bearer-token", "bearer_token"), + ("oauth-token", "oauth_token"), + ("pretty-print", "prettyPrint"), + ("quota-user", "quotaUser"), + ("upload-type", "uploadType"), + ("upload-protocol", "upload_protocol"), + ] + }; + + match engine._doit(true) { + Err(Some(err)) => Err(err), + Err(None) => Ok(engine), + Ok(_) => unreachable!(), + } + } + + fn doit(&self) -> Result<(), DoitError> { + match self._doit(false) { + Ok(res) => res, + Err(_) => unreachable!(), + } + } +} + +fn main() { + let mut exit_status = 0i32; + let arg_data = [ + ("projects", "methods: 'locations-get', 'locations-key-rings-create', 'locations-key-rings-crypto-keys-create', 'locations-key-rings-crypto-keys-crypto-key-versions-create', 'locations-key-rings-crypto-keys-crypto-key-versions-destroy', 'locations-key-rings-crypto-keys-crypto-key-versions-get', 'locations-key-rings-crypto-keys-crypto-key-versions-list', 'locations-key-rings-crypto-keys-crypto-key-versions-patch', 'locations-key-rings-crypto-keys-crypto-key-versions-restore', 'locations-key-rings-crypto-keys-decrypt', 'locations-key-rings-crypto-keys-encrypt', 'locations-key-rings-crypto-keys-get', 'locations-key-rings-crypto-keys-get-iam-policy', 'locations-key-rings-crypto-keys-list', 'locations-key-rings-crypto-keys-patch', 'locations-key-rings-crypto-keys-set-iam-policy', 'locations-key-rings-crypto-keys-test-iam-permissions', 'locations-key-rings-crypto-keys-update-primary-version', 'locations-key-rings-get', 'locations-key-rings-get-iam-policy', 'locations-key-rings-list', 'locations-key-rings-set-iam-policy', 'locations-key-rings-test-iam-permissions' and 'locations-list'", vec![ + ("locations-get", + Some(r##"Get information about a location."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-get", + vec![ + (Some(r##"name"##), + None, + Some(r##"Resource name for the location."##), + 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)), + ]), + ("locations-key-rings-create", + Some(r##"Create a new KeyRing in a given Project and Location."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-create", + vec![ + (Some(r##"parent"##), + None, + Some(r##"Required. The resource name of the location associated with the + KeyRings, in the format `projects/*/locations/*`."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-create", + Some(r##"Create a new CryptoKey within a KeyRing. + + CryptoKey.purpose is required."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-create", + vec![ + (Some(r##"parent"##), + None, + Some(r##"Required. The name of the KeyRing associated with the + CryptoKeys."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-crypto-key-versions-create", + Some(r##"Create a new CryptoKeyVersion in a CryptoKey. + + The server will assign the next sequential id. If unset, + state will be set to + ENABLED."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-crypto-key-versions-create", + vec![ + (Some(r##"parent"##), + None, + Some(r##"Required. The name of the CryptoKey associated with + the CryptoKeyVersions."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-crypto-key-versions-destroy", + Some(r##"Schedule a CryptoKeyVersion for destruction. + + Upon calling this method, CryptoKeyVersion.state will be set to + DESTROY_SCHEDULED + and destroy_time will be set to a time 24 + hours in the future, at which point the state + will be changed to + DESTROYED, and the key + material will be irrevocably destroyed. + + Before the destroy_time is reached, + RestoreCryptoKeyVersion may be called to reverse the process."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-crypto-key-versions-destroy", + vec![ + (Some(r##"name"##), + None, + Some(r##"The resource name of the CryptoKeyVersion to destroy."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-crypto-key-versions-get", + Some(r##"Returns metadata for a given CryptoKeyVersion."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-crypto-key-versions-get", + vec![ + (Some(r##"name"##), + None, + Some(r##"The name of the CryptoKeyVersion to get."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-crypto-key-versions-list", + Some(r##"Lists CryptoKeyVersions."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-crypto-key-versions-list", + vec![ + (Some(r##"parent"##), + None, + Some(r##"Required. The resource name of the CryptoKey to list, in the format + `projects/*/locations/*/keyRings/*/cryptoKeys/*`."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-crypto-key-versions-patch", + Some(r##"Update a CryptoKeyVersion's metadata. + + state may be changed between + ENABLED and + DISABLED using this + method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to + move between other states."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-crypto-key-versions-patch", + vec![ + (Some(r##"name"##), + None, + Some(r##"Output only. The resource name for this CryptoKeyVersion in the format + `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-crypto-key-versions-restore", + Some(r##"Restore a CryptoKeyVersion in the + DESTROY_SCHEDULED, + state. + + Upon restoration of the CryptoKeyVersion, state + will be set to DISABLED, + and destroy_time will be cleared."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-crypto-key-versions-restore", + vec![ + (Some(r##"name"##), + None, + Some(r##"The resource name of the CryptoKeyVersion to restore."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-decrypt", + Some(r##"Decrypt data that was protected by Encrypt."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-decrypt", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The resource name of the CryptoKey to use for decryption. + The server will choose the appropriate version."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-encrypt", + Some(r##"Encrypt data, so that it can only be recovered by a call to Decrypt."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-encrypt", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The resource name of the CryptoKey or CryptoKeyVersion + to use for encryption. + + If a CryptoKey is specified, the server will use its + primary version."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-get", + Some(r##"Returns metadata for a given CryptoKey, as well as its + primary CryptoKeyVersion."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-get", + vec![ + (Some(r##"name"##), + None, + Some(r##"The name of the CryptoKey to get."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-get-iam-policy", + Some(r##"Gets the access control policy for a resource. + Returns an empty policy if the resource exists and does not have a policy + set."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-get-iam-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"REQUIRED: The resource for which the policy is being requested. + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-list", + Some(r##"Lists CryptoKeys."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-list", + vec![ + (Some(r##"parent"##), + None, + Some(r##"Required. The resource name of the KeyRing to list, in the format + `projects/*/locations/*/keyRings/*`."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-patch", + Some(r##"Update a CryptoKey."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-patch", + vec![ + (Some(r##"name"##), + None, + Some(r##"Output only. The resource name for this CryptoKey in the format + `projects/*/locations/*/keyRings/*/cryptoKeys/*`."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-set-iam-policy", + Some(r##"Sets the access control policy on the specified resource. Replaces any + existing policy."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-set-iam-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"REQUIRED: The resource for which the policy is being specified. + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-test-iam-permissions", + Some(r##"Returns permissions that a caller has on the specified resource. + If the resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building permission-aware + UIs and command-line tools, not for authorization checking. This operation + may "fail open" without warning."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-test-iam-permissions", + vec![ + (Some(r##"resource"##), + None, + Some(r##"REQUIRED: The resource for which the policy detail is being requested. + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("locations-key-rings-crypto-keys-update-primary-version", + Some(r##"Update the version of a CryptoKey that will be used in Encrypt"##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-crypto-keys-update-primary-version", + vec![ + (Some(r##"name"##), + None, + Some(r##"The resource name of the CryptoKey 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)), + ]), + ("locations-key-rings-get", + Some(r##"Returns metadata for a given KeyRing."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-get", + vec![ + (Some(r##"name"##), + None, + Some(r##"The name of the KeyRing to get."##), + 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)), + ]), + ("locations-key-rings-get-iam-policy", + Some(r##"Gets the access control policy for a resource. + Returns an empty policy if the resource exists and does not have a policy + set."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-get-iam-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"REQUIRED: The resource for which the policy is being requested. + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("locations-key-rings-list", + Some(r##"Lists KeyRings."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-list", + vec![ + (Some(r##"parent"##), + None, + Some(r##"Required. The resource name of the location associated with the + KeyRings, in the format `projects/*/locations/*`."##), + 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)), + ]), + ("locations-key-rings-set-iam-policy", + Some(r##"Sets the access control policy on the specified resource. Replaces any + existing policy."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-set-iam-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"REQUIRED: The resource for which the policy is being specified. + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("locations-key-rings-test-iam-permissions", + Some(r##"Returns permissions that a caller has on the specified resource. + If the resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building permission-aware + UIs and command-line tools, not for authorization checking. This operation + may "fail open" without warning."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-key-rings-test-iam-permissions", + vec![ + (Some(r##"resource"##), + None, + Some(r##"REQUIRED: The resource for which the policy detail is being requested. + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("locations-list", + Some(r##"Lists information about the supported locations for this service."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_cli/projects_locations-list", + vec![ + (Some(r##"name"##), + None, + Some(r##"The resource that owns the locations collection, if applicable."##), + 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)), + ]), + ]), + + ]; + + let mut app = App::new("cloudkms1-beta1") + .author("Sebastian Thiel ") + .version("1.0.4+20170515") + .about("Manages encryption for your cloud services the same way you do on-premise. You can generate, use, rotate, and destroy AES256 encryption keys.") + .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudkms1_beta1_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("Output all server communication to standard error. `tx` and `rx` are placed into the same stream.") + .multiple(false) + .takes_value(false)) + .arg(Arg::with_name("debug-auth") + .long("debug-auth") + .help("Output all communication related to authentication to standard error. `tx` and `rx` are placed into the same stream.") + .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("debug"); + match Engine::new(matches) { + Err(err) => { + exit_status = err.exit_code; + writeln!(io::stderr(), "{}", err).ok(); + }, + Ok(engine) => { + if let Err(doit_err) = engine.doit() { + 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); +} \ No newline at end of file diff --git a/gen/cloudkms1_beta1/Cargo.toml b/gen/cloudkms1_beta1/Cargo.toml new file mode 100644 index 0000000000..fe7fc2f741 --- /dev/null +++ b/gen/cloudkms1_beta1/Cargo.toml @@ -0,0 +1,28 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-cloudkms1_beta1" +version = "1.0.4+20170515" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with Cloud KMS (protocol v1beta1)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudkms1_beta1" +homepage = "https://cloud.google.com/kms/" +documentation = "https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515" +license = "MIT" +keywords = ["cloudkms", "google", "protocol", "web", "api"] + + +[dependencies] +hyper = "^ 0.10" +mime = "^ 0.2.0" +serde = "^ 0.9" +serde_json = "^ 0.9" +serde_derive = "^ 0.9" +yup-oauth2 = "^ 1.0" +url = "= 0.5" + +[features] + + diff --git a/gen/cloudkms1_beta1/LICENSE.md b/gen/cloudkms1_beta1/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/cloudkms1_beta1/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `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/cloudkms1_beta1/README.md b/gen/cloudkms1_beta1/README.md new file mode 100644 index 0000000000..ca4b2f2f47 --- /dev/null +++ b/gen/cloudkms1_beta1/README.md @@ -0,0 +1,184 @@ + +The `google-cloudkms1_beta1` library allows access to all features of the *Google Cloud KMS* service. + +This documentation was generated from *Cloud KMS* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *cloudkms:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. + +Everything else about the *Cloud KMS* *v1_beta1* API can be found at the +[official documentation site](https://cloud.google.com/kms/). +# Features + +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.CloudKMS.html) ... + +* projects + * [*locations get*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationGetCall.html), [*locations key rings create*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCreateCall.html), [*locations key rings crypto keys create*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyCreateCall.html), [*locations key rings crypto keys crypto key versions create*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall.html), [*locations key rings crypto keys crypto key versions destroy*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall.html), [*locations key rings crypto keys crypto key versions get*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall.html), [*locations key rings crypto keys crypto key versions list*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall.html), [*locations key rings crypto keys crypto key versions patch*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall.html), [*locations key rings crypto keys crypto key versions restore*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall.html), [*locations key rings crypto keys decrypt*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyDecryptCall.html), [*locations key rings crypto keys encrypt*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyEncryptCall.html), [*locations key rings crypto keys get*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyGetCall.html), [*locations key rings crypto keys get iam policy*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyGetIamPolicyCall.html), [*locations key rings crypto keys list*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyListCall.html), [*locations key rings crypto keys patch*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyPatchCall.html), [*locations key rings crypto keys set iam policy*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeySetIamPolicyCall.html), [*locations key rings crypto keys test iam permissions*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyTestIamPermissionCall.html), [*locations key rings crypto keys update primary version*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall.html), [*locations key rings get*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingGetCall.html), [*locations key rings get iam policy*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingGetIamPolicyCall.html), [*locations key rings list*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingListCall.html), [*locations key rings set iam policy*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingSetIamPolicyCall.html), [*locations key rings test iam permissions*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationKeyRingTestIamPermissionCall.html) and [*locations list*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.ProjectLocationListCall.html) + + + + +# Structure of this Library + +The API is structured into the following primary items: + +* **[Hub](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/struct.CloudKMS.html)** + * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.Resource.html)** + * primary types that you can apply *Activities* to + * a collection of properties and *Parts* + * **[Parts](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.Part.html)** + * a collection of properties + * never directly used in *Activities* +* **[Activities](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.CallBuilder.html)** + * operations to apply to *Resources* + +All *structures* are marked with applicable traits to further categorize them and ease browsing. + +Generally speaking, you can invoke *Activities* like this: + +```Rust,ignore +let r = hub.resource().activity(...).doit() +``` + +Or specifically ... + +```ignore +let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_destroy(...).doit() +let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_get(...).doit() +let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_patch(...).doit() +let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_restore(...).doit() +let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_create(...).doit() +``` + +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-cloudkms1_beta1 = "*" +``` + +## A complete example + +```Rust +extern crate hyper; +extern crate yup_oauth2 as oauth2; +extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +use cloudkms1_beta1::CryptoKeyVersion; +use cloudkms1_beta1::{Result, Error}; +use std::default::Default; +use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +use cloudkms1_beta1::CloudKMS; + +// Get an ApplicationSecret instance by some means. It contains the `client_id` and +// `client_secret`, among other things. +let secret: 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 = Authenticator::new(&secret, DefaultAuthenticatorDelegate, + hyper::Client::new(), + ::default(), None); +let mut hub = CloudKMS::new(hyper::Client::new(), 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 = CryptoKeyVersion::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.projects().locations_key_rings_crypto_keys_crypto_key_versions_patch(req, "name") + .update_mask("sit") + .doit(); + +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::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-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/enum.Result.html) enumeration as return value of +the doit() methods, or handed as possibly intermediate results to either the +[Hub Delegate](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.Delegate.html), 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-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/enum.Result.html), should be +read by you to obtain the media. +If such a method also supports a [Response Result](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.ResponseResult.html), 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-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.CallBuilder.html) 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-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.Part.html) which are identifiable by name, which will be sent to +the server to indicate either the set parts of the request or the desired parts in the response. + +## Builder Arguments + +Using [method builders](https://docs.rs/google-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.CallBuilder.html), 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-cloudkms1_beta1/1.0.4+20170515/google_cloudkms1_beta1/trait.RequestValue.html) 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 + +# License +The **cloudkms1_beta1** 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/master/LICENSE.md diff --git a/gen/cloudkms1_beta1/src/cmn.rs b/gen/cloudkms1_beta1/src/cmn.rs new file mode 100644 index 0000000000..77d71c8896 --- /dev/null +++ b/gen/cloudkms1_beta1/src/cmn.rs @@ -0,0 +1,753 @@ +// COPY OF 'src/rust/api/cmn.rs' +// DO NOT EDIT +use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; +use std; +use std::fmt::{self, Display}; +use std::str::FromStr; +use std::error; +use std::thread::sleep; +use std::time::Duration; + +use mime::{Mime, TopLevel, SubLevel, Attr, Value}; +use oauth2::{TokenType, Retry, self}; +use hyper; +use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, + HeaderFormat, Bearer}; +use hyper::http::h1::LINE_ENDING; +use hyper::method::Method; +use hyper::status::StatusCode; + +use serde_json as json; + +/// Identifies the Hub. There is only one per library, this trait is supposed +/// to make intended use more explicit. +/// The hub allows to access all resource methods more easily. +pub trait Hub {} + +/// Identifies types for building methods of a particular resource type +pub trait MethodsBuilder {} + +/// Identifies types which represent builders for a particular resource method +pub trait CallBuilder {} + +/// Identifies types which can be inserted and deleted. +/// Types with this trait are most commonly used by clients of this API. +pub trait Resource {} + +/// Identifies types which are used in API responses. +pub trait ResponseResult {} + +/// Identifies types which are used in API requests. +pub trait RequestValue {} + +/// Identifies types which are not actually used by the API +/// This might be a bug within the google API schema. +pub trait UnusedType {} + +/// Identifies types which are only used as part of other types, which +/// usually are carrying the `Resource` trait. +pub trait Part {} + +/// Identifies types which are only used by other types internally. +/// They have no special meaning, this trait just marks them for completeness. +pub trait NestedType {} + +/// A utility to specify reader types which provide seeking capabilities too +pub trait ReadSeek: Seek + Read {} +impl ReadSeek for T {} + +/// A trait for all types that can convert themselves into a *parts* string +pub trait ToParts { + fn to_parts(&self) -> String; +} + +/// A utility type which can decode a server response that indicates error +#[derive(Deserialize)] +pub struct JsonServerError { + pub error: String, + pub error_description: Option +} + +/// A utility to represent detailed errors we might see in case there are BadRequests. +/// The latter happen if the sent parameters or request structures are unsound +#[derive(Deserialize, Serialize, Debug)] +pub struct ErrorResponse { + error: ServerError, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerError { + errors: Vec, + code: u16, + message: String, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerMessage { + domain: String, + reason: String, + message: String, + #[serde(rename="locationType")] + location_type: Option, + location: Option +} + +#[derive(Copy, Clone)] +pub struct DummyNetworkStream; + +impl Read for DummyNetworkStream { + fn read(&mut self, _: &mut [u8]) -> io::Result { + Ok(0) + } +} + +impl Write for DummyNetworkStream { + fn write(&mut self, _: &[u8]) -> io::Result { + Ok(0) + } + + fn flush(&mut self) -> io::Result<()> { + Ok(()) + } +} + +impl hyper::net::NetworkStream for DummyNetworkStream { + fn peer_addr(&mut self) -> io::Result { + Ok("127.0.0.1:1337".parse().unwrap()) + } + + fn set_read_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } + + fn set_write_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } +} + + +/// A trait specifying functionality to help controlling any request performed by the API. +/// The trait has a conservative default implementation. +/// +/// It contains methods to deal with all common issues, as well with the ones related to +/// uploading media +pub trait Delegate { + + /// Called at the beginning of any API request. The delegate should store the method + /// information if he is interesting in knowing more context when further calls to it + /// are made. + /// The matching `finished()` call will always be made, no matter whether or not the API + /// request was successful. That way, the delegate may easily maintain a clean state + /// between various API calls. + fn begin(&mut self, MethodInfo) {} + + /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// + /// Return retry information. + fn http_error(&mut self, &hyper::Error) -> Retry { + Retry::Abort + } + + /// Called whenever there is the need for your applications API key after + /// the official authenticator implementation didn't provide one, for some reason. + /// If this method returns None as well, the underlying operation will fail + fn api_key(&mut self) -> Option { + None + } + + /// Called whenever the Authenticator didn't yield a token. The delegate + /// may attempt to provide one, or just take it as a general information about the + /// impending failure. + /// The given Error provides information about why the token couldn't be acquired in the + /// first place + fn token(&mut self, err: &error::Error) -> Option { + let _ = err; + None + } + + /// Called during resumable uploads to provide a URL for the impending upload. + /// It was saved after a previous call to `store_upload_url(...)`, and if not None, + /// will be used instead of asking the server for a new upload URL. + /// This is useful in case a previous resumable upload was aborted/canceled, but should now + /// be resumed. + /// The returned URL will be used exactly once - if it fails again and the delegate allows + /// to retry, we will ask the server for a new upload URL. + fn upload_url(&mut self) -> Option { + None + } + + /// Called after we have retrieved a new upload URL for a resumable upload to store it + /// in case we fail or cancel. That way, we can attempt to resume the upload later, + /// see `upload_url()`. + /// It will also be called with None after a successful upload, which allows the delegate + /// to forget the URL. That way, we will not attempt to resume an upload that has already + /// finished. + fn store_upload_url(&mut self, url: Option<&str>) { + let _ = url; + } + + /// Called whenever a server response could not be decoded from json. + /// It's for informational purposes only, the caller will return with an error + /// accordingly. + /// + /// # Arguments + /// + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error + fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &json::Error) { + let _ = json_encoded_value; + let _ = json_decode_error; + } + + /// Called whenever the http request returns with a non-success status code. + /// This can involve authentication issues, or anything else that very much + /// depends on the used API method. + /// The delegate should check the status, header and decoded json error to decide + /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + fn http_failure(&mut self, _: &hyper::client::Response, Option, _: Option) -> Retry { + Retry::Abort + } + + /// Called prior to sending the main request of the given method. It can be used to time + /// the call or to print progress information. + /// It's also useful as you can be sure that a request will definitely be made. + fn pre_request(&mut self) { } + + /// Return the size of each chunk of a resumable upload. + /// Must be a power of two, with 1<<18 being the smallest allowed chunk size. + /// Will be called once before starting any resumable upload. + fn chunk_size(&mut self) -> u64 { + 1 << 23 + } + + /// Called before the given chunk is uploaded to the server. + /// If true is returned, the upload will be interrupted. + /// However, it may be resumable if you stored the upload URL in a previous call + /// to `store_upload_url()` + fn cancel_chunk_upload(&mut self, chunk: &ContentRange) -> bool { + let _ = chunk; + false + } + + /// Called before the API request method returns, in every case. It can be used to clean up + /// internal state between calls to the API. + /// This call always has a matching call to `begin(...)`. + /// + /// # Arguments + /// + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. + fn finished(&mut self, is_success: bool) { + let _ = is_success; + } +} + +/// A delegate with a conservative default implementation, which is used if no other delegate is +/// set. +#[derive(Default)] +pub struct DefaultDelegate; + +impl Delegate for DefaultDelegate {} + + +#[derive(Debug)] +pub enum Error { + /// The http connection failed + HttpError(hyper::Error), + + /// An attempt was made to upload a resource with size stored in field `.0` + /// even though the maximum upload size is what is stored in field `.1`. + UploadSizeLimitExceeded(u64, u64), + + /// Represents information about a request that was not understood by the server. + /// Details are included. + BadRequest(ErrorResponse), + + /// We needed an API key for authentication, but didn't obtain one. + /// Neither through the authenticator, nor through the Delegate. + MissingAPIKey, + + /// We required a Token, but didn't get one from the Authenticator + MissingToken(Box), + + /// The delgate instructed to cancel the operation + Cancelled, + + /// An additional, free form field clashed with one of the built-in optional ones + FieldClash(&'static str), + + /// Shows that we failed to decode the server response. + /// This can happen if the protocol changes in conjunction with strict json decoding. + JsonDecodeError(String, json::Error), + + /// Indicates an HTTP repsonse with a non-success status code + Failure(hyper::client::Response), +} + + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + (writeln!(f, "The application's API key was not found in the configuration")).ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::BadRequest(ref err) => { + try!(writeln!(f, "Bad Request ({}): {}", err.error.code, err.error.message)); + for err in err.error.errors.iter() { + try!(writeln!(f, " {}: {}, {}{}", + err.domain, + err.message, + err.reason, + match &err.location { + &Some(ref loc) => format!("@{}", loc), + &None => String::new(), + })); + } + Ok(()) + }, + Error::MissingToken(ref err) => + writeln!(f, "Token retrieval failed with error: {}", err), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref json_str, ref err) + => writeln!(f, "{}: {}", err, json_str), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(_, ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(_, ref err) => err.cause(), + _ => None + } + } +} + +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + +/// Contains information about an API request. +pub struct MethodInfo { + pub id: &'static str, + pub http_method: Method, +} + +const BOUNDARY: &'static str = "MDuXWGyeE33QFXGchb2VFWc4Z7945d"; + +/// Provides a `Read` interface that converts multiple parts into the protocol +/// identified by [RFC2387](https://tools.ietf.org/html/rfc2387). +/// **Note**: This implementation is just as rich as it needs to be to perform uploads +/// to google APIs, and might not be a fully-featured implementation. +#[derive(Default)] +pub struct MultiPartReader<'a> { + raw_parts: Vec<(Headers, &'a mut Read)>, + current_part: Option<(Cursor>, &'a mut Read)>, + last_part_boundary: Option>>, +} + +impl<'a> MultiPartReader<'a> { + + /// Reserve memory for exactly the given amount of parts + pub fn reserve_exact(&mut self, cap: usize) { + self.raw_parts.reserve_exact(cap); + } + + /// Add a new part to the queue of parts to be read on the first `read` call. + /// + /// # Arguments + /// + /// `headers` - identifying the body of the part. It's similar to the header + /// in an ordinary single-part call, and should thus contain the + /// same information. + /// `reader` - a reader providing the part's body + /// `size` - the amount of bytes provided by the reader. It will be put onto the header as + /// content-size. + /// `mime` - It will be put onto the content type + pub fn add_part(&mut self, reader: &'a mut Read, size: u64, mime_type: Mime) -> &mut MultiPartReader<'a> { + let mut headers = Headers::new(); + headers.set(ContentType(mime_type)); + headers.set(ContentLength(size)); + self.raw_parts.push((headers, reader)); + self + } + + /// Returns the mime-type representing our multi-part message. + /// Use it with the ContentType header. + pub fn mime_type(&self) -> Mime { + Mime( + TopLevel::Multipart, + SubLevel::Ext("Related".to_string()), + vec![(Attr::Ext("boundary".to_string()), Value::Ext(BOUNDARY.to_string()))], + ) + } + + /// Returns true if we are totally used + fn is_depleted(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_none() && self.last_part_boundary.is_none() + } + + /// Returns true if we are handling our last part + fn is_last_part(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_some() + } +} + +impl<'a> Read for MultiPartReader<'a> { + fn read(&mut self, buf: &mut [u8]) -> io::Result { + match (self.raw_parts.len(), + self.current_part.is_none(), + self.last_part_boundary.is_none()) { + (_, _, false) => { + let br = self.last_part_boundary.as_mut().unwrap().read(buf).unwrap_or(0); + if br < buf.len() { + self.last_part_boundary = None; + } + return Ok(br) + }, + (0, true, true) => return Ok(0), + (n, true, _) if n > 0 => { + let (headers, reader) = self.raw_parts.remove(0); + let mut c = Cursor::new(Vec::::new()); + (write!(&mut c, "{}--{}{}{}{}", LINE_ENDING, BOUNDARY, LINE_ENDING, + headers, LINE_ENDING)).unwrap(); + c.seek(SeekFrom::Start(0)).unwrap(); + self.current_part = Some((c, reader)); + } + _ => {}, + } + + // read headers as long as possible + let (hb, rr) = { + let &mut (ref mut c, ref mut reader) = self.current_part.as_mut().unwrap(); + let b = c.read(buf).unwrap_or(0); + (b, reader.read(&mut buf[b..])) + }; + + match rr { + Ok(bytes_read) => { + if hb < buf.len() && bytes_read == 0 { + if self.is_last_part() { + // before clearing the last part, we will add the boundary that + // will be written last + self.last_part_boundary = Some(Cursor::new( + format!("{}--{}--", LINE_ENDING, BOUNDARY).into_bytes())) + } + // We are depleted - this can trigger the next part to come in + self.current_part = None; + } + let mut total_bytes_read = hb + bytes_read; + while total_bytes_read < buf.len() && !self.is_depleted() { + match self.read(&mut buf[total_bytes_read ..]) { + Ok(br) => total_bytes_read += br, + Err(err) => return Err(err), + } + } + Ok(total_bytes_read) + } + Err(err) => { + // fail permanently + self.current_part = None; + self.last_part_boundary = None; + self.raw_parts.clear(); + Err(err) + } + } + } +} + +/// The `X-Upload-Content-Type` header. +/// +/// Generated via rustc --pretty expanded -Z unstable-options, and manually +/// processed to be more readable. +#[derive(PartialEq, Debug, Clone)] +pub struct XUploadContentType(pub Mime); + +impl ::std::ops::Deref for XUploadContentType { + type Target = Mime; + fn deref<'a>(&'a self) -> &'a Mime { &self.0 } +} +impl ::std::ops::DerefMut for XUploadContentType { + fn deref_mut<'a>(&'a mut self) -> &'a mut Mime { &mut self.0 } +} +impl Header for XUploadContentType { + fn header_name() -> &'static str { "X-Upload-Content-Type" } + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + hyper::header::parsing::from_one_raw_str(raw).map(XUploadContentType) + } +} +impl HeaderFormat for XUploadContentType { + fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result { + Display::fmt(&**self, f) + } +} +impl Display for XUploadContentType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&**self, f) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct Chunk { + pub first: u64, + pub last: u64 +} + +impl fmt::Display for Chunk { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + (write!(fmt, "{}-{}", self.first, self.last)).ok(); + Ok(()) + } +} + +impl FromStr for Chunk { + type Err = &'static str; + + /// NOTE: only implements `%i-%i`, not `*` + fn from_str(s: &str) -> std::result::Result { + let parts: Vec<&str> = s.split('-').collect(); + if parts.len() != 2 { + return Err("Expected two parts: %i-%i") + } + Ok( + Chunk { + first: match FromStr::from_str(parts[0]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'first' as digit") + }, + last: match FromStr::from_str(parts[1]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'last' as digit") + } + } + ) + } +} + +/// Implements the Content-Range header, for serialization only +#[derive(Clone, PartialEq, Debug)] +pub struct ContentRange { + pub range: Option, + pub total_length: u64, +} + +impl Header for ContentRange { + fn header_name() -> &'static str { + "Content-Range" + } + + /// We are not parsable, as parsing is done by the `Range` header + fn parse_header(_: &[Vec]) -> hyper::error::Result { + Err(hyper::error::Error::Method) + } +} + + +impl HeaderFormat for ContentRange { + fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + try!(fmt.write_str("bytes ")); + match self.range { + Some(ref c) => try!(c.fmt(fmt)), + None => try!(fmt.write_str("*")) + } + (write!(fmt, "/{}", self.total_length)).ok(); + Ok(()) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct RangeResponseHeader(pub Chunk); + +impl Header for RangeResponseHeader { + fn header_name() -> &'static str { + "Range" + } + + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + if raw.len() > 0 { + let v = &raw[0]; + if let Ok(s) = std::str::from_utf8(v) { + const PREFIX: &'static str = "bytes "; + if s.starts_with(PREFIX) { + if let Ok(c) = ::from_str(&s[PREFIX.len()..]) { + return Ok(RangeResponseHeader(c)) + } + } + } + } + Err(hyper::error::Error::Method) + } +} + +impl HeaderFormat for RangeResponseHeader { + /// No implmentation necessary, we just need to parse + fn fmt_header(&self, _: &mut fmt::Formatter) -> fmt::Result { + Err(fmt::Error) + } +} + +/// A utility type to perform a resumable upload from start to end. +pub struct ResumableUploadHelper<'a, A: 'a> { + pub client: &'a mut hyper::client::Client, + pub delegate: &'a mut Delegate, + pub start_at: Option, + pub auth: &'a mut A, + pub user_agent: &'a str, + pub auth_header: Authorization, + pub url: &'a str, + pub reader: &'a mut ReadSeek, + pub media_type: Mime, + pub content_length: u64 +} + +impl<'a, A> ResumableUploadHelper<'a, A> + where A: oauth2::GetToken { + + fn query_transfer_status(&mut self) -> std::result::Result> { + loop { + match self.client.post(self.url) + .header(UserAgent(self.user_agent.to_string())) + .header(ContentRange { range: None, total_length: self.content_length }) + .header(self.auth_header.clone()) + .send() { + Ok(r) => { + // 308 = resume-incomplete == PermanentRedirect + let headers = r.headers.clone(); + let h: &RangeResponseHeader = match headers.get() { + Some(hh) if r.status == StatusCode::PermanentRedirect => hh, + None|Some(_) => { + if let Retry::After(d) = self.delegate.http_failure(&r, None, None) { + sleep(d); + continue; + } + return Err(Ok(r)) + } + }; + return Ok(h.0.last) + } + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Err(Err(err)) + } + } + } + } + + /// returns None if operation was cancelled by delegate, or the HttpResult. + /// It can be that we return the result just because we didn't understand the status code - + /// caller should check for status himself before assuming it's OK to use + pub fn upload(&mut self) -> Option> { + let mut start = match self.start_at { + Some(s) => s, + None => match self.query_transfer_status() { + Ok(s) => s, + Err(result) => return Some(result) + } + }; + + const MIN_CHUNK_SIZE: u64 = 1 << 18; + let chunk_size = match self.delegate.chunk_size() { + cs if cs > MIN_CHUNK_SIZE => cs, + _ => MIN_CHUNK_SIZE + }; + + self.reader.seek(SeekFrom::Start(start)).unwrap(); + loop { + let request_size = match self.content_length - start { + rs if rs > chunk_size => chunk_size, + rs => rs + }; + + let mut section_reader = self.reader.take(request_size); + let range_header = ContentRange { + range: Some(Chunk {first: start, last: start + request_size - 1}), + total_length: self.content_length + }; + start += request_size; + if self.delegate.cancel_chunk_upload(&range_header) { + return None + } + let res = self.client.post(self.url) + .header(range_header) + .header(ContentType(self.media_type.clone())) + .header(UserAgent(self.user_agent.to_string())) + .body(&mut section_reader) + .send(); + match res { + Ok(mut res) => { + if res.status == StatusCode::PermanentRedirect { + continue + } + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let Retry::After(d) = self.delegate.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + } + return Some(Ok(res)) + }, + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Some(Err(err)) + } + } + } + } +} + +// Copy of src/rust/cli/cmn.rs +// TODO(ST): Allow sharing common code between program types +pub fn remove_json_null_values(value: &mut json::value::Value) { + match *value { + json::value::Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} diff --git a/gen/cloudkms1_beta1/src/lib.rs b/gen/cloudkms1_beta1/src/lib.rs new file mode 100644 index 0000000000..e8a5fa2834 --- /dev/null +++ b/gen/cloudkms1_beta1/src/lib.rs @@ -0,0 +1,8276 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/api/lib.rs.mako' +// DO NOT EDIT ! + +//! This documentation was generated from *Cloud KMS* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *cloudkms:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! +//! Everything else about the *Cloud KMS* *v1_beta1* API can be found at the +//! [official documentation site](https://cloud.google.com/kms/). +//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudkms1_beta1). +//! # Features +//! +//! Handle the following *Resources* with ease from the central [hub](struct.CloudKMS.html) ... +//! +//! * projects +//! * [*locations get*](struct.ProjectLocationGetCall.html), [*locations key rings create*](struct.ProjectLocationKeyRingCreateCall.html), [*locations key rings crypto keys create*](struct.ProjectLocationKeyRingCryptoKeyCreateCall.html), [*locations key rings crypto keys crypto key versions create*](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall.html), [*locations key rings crypto keys crypto key versions destroy*](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall.html), [*locations key rings crypto keys crypto key versions get*](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall.html), [*locations key rings crypto keys crypto key versions list*](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall.html), [*locations key rings crypto keys crypto key versions patch*](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall.html), [*locations key rings crypto keys crypto key versions restore*](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall.html), [*locations key rings crypto keys decrypt*](struct.ProjectLocationKeyRingCryptoKeyDecryptCall.html), [*locations key rings crypto keys encrypt*](struct.ProjectLocationKeyRingCryptoKeyEncryptCall.html), [*locations key rings crypto keys get*](struct.ProjectLocationKeyRingCryptoKeyGetCall.html), [*locations key rings crypto keys get iam policy*](struct.ProjectLocationKeyRingCryptoKeyGetIamPolicyCall.html), [*locations key rings crypto keys list*](struct.ProjectLocationKeyRingCryptoKeyListCall.html), [*locations key rings crypto keys patch*](struct.ProjectLocationKeyRingCryptoKeyPatchCall.html), [*locations key rings crypto keys set iam policy*](struct.ProjectLocationKeyRingCryptoKeySetIamPolicyCall.html), [*locations key rings crypto keys test iam permissions*](struct.ProjectLocationKeyRingCryptoKeyTestIamPermissionCall.html), [*locations key rings crypto keys update primary version*](struct.ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall.html), [*locations key rings get*](struct.ProjectLocationKeyRingGetCall.html), [*locations key rings get iam policy*](struct.ProjectLocationKeyRingGetIamPolicyCall.html), [*locations key rings list*](struct.ProjectLocationKeyRingListCall.html), [*locations key rings set iam policy*](struct.ProjectLocationKeyRingSetIamPolicyCall.html), [*locations key rings test iam permissions*](struct.ProjectLocationKeyRingTestIamPermissionCall.html) and [*locations list*](struct.ProjectLocationListCall.html) +//! +//! +//! +//! +//! 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](struct.CloudKMS.html)** +//! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) +//! * **[Resources](trait.Resource.html)** +//! * primary types that you can apply *Activities* to +//! * a collection of properties and *Parts* +//! * **[Parts](trait.Part.html)** +//! * a collection of properties +//! * never directly used in *Activities* +//! * **[Activities](trait.CallBuilder.html)** +//! * operations to apply to *Resources* +//! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! +//! Generally speaking, you can invoke *Activities* like this: +//! +//! ```Rust,ignore +//! let r = hub.resource().activity(...).doit() +//! ``` +//! +//! Or specifically ... +//! +//! ```ignore +//! let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_destroy(...).doit() +//! let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_get(...).doit() +//! let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_patch(...).doit() +//! let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_restore(...).doit() +//! let r = hub.projects().locations_key_rings_crypto_keys_crypto_key_versions_create(...).doit() +//! ``` +//! +//! 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-cloudkms1_beta1 = "*" +//! ``` +//! +//! ## A complete example +//! +//! ```test_harness,no_run +//! extern crate hyper; +//! extern crate yup_oauth2 as oauth2; +//! extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +//! use cloudkms1_beta1::CryptoKeyVersion; +//! use cloudkms1_beta1::{Result, Error}; +//! # #[test] fn egal() { +//! use std::default::Default; +//! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +//! use cloudkms1_beta1::CloudKMS; +//! +//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and +//! // `client_secret`, among other things. +//! let secret: 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 = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +//! hyper::Client::new(), +//! ::default(), None); +//! let mut hub = CloudKMS::new(hyper::Client::new(), 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 = CryptoKeyVersion::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.projects().locations_key_rings_crypto_keys_crypto_key_versions_patch(req, "name") +//! .update_mask("sed") +//! .doit(); +//! +//! 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::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](enum.Result.html) enumeration as return value of +//! the doit() methods, or handed as possibly intermediate results to either the +//! [Hub Delegate](trait.Delegate.html), 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](enum.Result.html), should be +//! read by you to obtain the media. +//! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. +//! 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](trait.Delegate.html) to the +//! [Method Builder](trait.CallBuilder.html) 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](trait.Delegate.html) 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 [enocodable](trait.RequestValue.html) and +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are 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](trait.CallBuilder.html), 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](trait.RequestValue.html) 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 +//! +//! + +// 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/mako/api/lib.rs.mako' +// DO NOT EDIT ! + +#[macro_use] +extern crate serde_derive; + +extern crate hyper; +extern crate serde; +extern crate serde_json; +extern crate yup_oauth2 as oauth2; +extern crate mime; +extern crate url; + +mod cmn; + +use std::collections::HashMap; +use std::cell::RefCell; +use std::borrow::BorrowMut; +use std::default::Default; +use std::collections::BTreeMap; +use serde_json as json; +use std::io; +use std::fs; +use std::thread::sleep; +use std::time::Duration; + +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, + ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, + Resource, ErrorResponse, remove_json_null_values}; + + +// ############## +// 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, Hash)] +pub enum Scope { + /// View and manage your data across Google Cloud Platform services + 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 CloudKMS related resource activities +/// +/// # Examples +/// +/// Instantiate a new hub +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::CryptoKeyVersion; +/// use cloudkms1_beta1::{Result, Error}; +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use cloudkms1_beta1::CloudKMS; +/// +/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and +/// // `client_secret`, among other things. +/// let secret: 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 = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = CloudKMS::new(hyper::Client::new(), 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 = CryptoKeyVersion::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.projects().locations_key_rings_crypto_keys_crypto_key_versions_patch(req, "name") +/// .update_mask("dolores") +/// .doit(); +/// +/// 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::MissingAPIKey +/// |Error::MissingToken(_) +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::BadRequest(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_, _) => println!("{}", e), +/// }, +/// Ok(res) => println!("Success: {:?}", res), +/// } +/// # } +/// ``` +pub struct CloudKMS { + client: RefCell, + auth: RefCell, + _user_agent: String, +} + +impl<'a, C, A> Hub for CloudKMS {} + +impl<'a, C, A> CloudKMS + where C: BorrowMut, A: oauth2::GetToken { + + pub fn new(client: C, authenticator: A) -> CloudKMS { + CloudKMS { + client: RefCell::new(client), + auth: RefCell::new(authenticator), + _user_agent: "google-api-rust-client/1.0.4".to_string(), + } + } + + pub fn projects(&'a self) -> ProjectMethods<'a, C, A> { + ProjectMethods { hub: &self } + } + + /// Set the user-agent header field to use in all requests to the server. + /// It defaults to `google-api-rust-client/1.0.4`. + /// + /// Returns the previously set user-agent. + pub fn user_agent(&mut self, agent_name: String) -> String { + let prev = self._user_agent.clone(); + self._user_agent = agent_name; + prev + } +} + + +// ############ +// SCHEMAS ### +// ########## +/// Response message for KeyManagementService.ListCryptoKeys. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys list projects](struct.ProjectLocationKeyRingCryptoKeyListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListCryptoKeysResponse { + /// A token to retrieve next page of results. Pass this value in + /// ListCryptoKeysRequest.page_token to retrieve the next page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of CryptoKeys. + #[serde(rename="cryptoKeys")] + pub crypto_keys: Option>, + /// The total number of CryptoKeys that matched the query. + #[serde(rename="totalSize")] + pub total_size: Option, +} + +impl ResponseResult for ListCryptoKeysResponse {} + + +/// Provides the configuration for logging a type of permissions. +/// Example: +/// +/// { +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// "exempted_members": [ +/// "user:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// } +/// ] +/// } +/// +/// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting +/// foo@gmail.com from DATA_READ logging. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AuditLogConfig { + /// Specifies the identities that do not cause logging for this type of + /// permission. + /// Follows the same format of Binding.members. + #[serde(rename="exemptedMembers")] + pub exempted_members: Option>, + /// The log type that this config enables. + #[serde(rename="logType")] + pub log_type: Option, +} + +impl Part for AuditLogConfig {} + + +/// Request message for KeyManagementService.Encrypt. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys encrypt projects](struct.ProjectLocationKeyRingCryptoKeyEncryptCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct EncryptRequest { + /// Required. The data to encrypt. Must be no larger than 64KiB. + pub plaintext: Option, + /// Optional data that, if specified, must also be provided during decryption + /// through DecryptRequest.additional_authenticated_data. Must be no + /// larger than 64KiB. + #[serde(rename="additionalAuthenticatedData")] + pub additional_authenticated_data: Option, +} + +impl RequestValue for EncryptRequest {} + + +/// Request message for `TestIamPermissions` method. +/// +/// # 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*). +/// +/// * [locations key rings test iam permissions projects](struct.ProjectLocationKeyRingTestIamPermissionCall.html) (request) +/// * [locations key rings crypto keys test iam permissions projects](struct.ProjectLocationKeyRingCryptoKeyTestIamPermissionCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestIamPermissionsRequest { + /// The set of permissions to check for the `resource`. Permissions with + /// wildcards (such as '*' or 'storage.*') are not allowed. For more + /// information see + /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + pub permissions: Option>, +} + +impl RequestValue for TestIamPermissionsRequest {} + + +/// Request message for `SetIamPolicy` method. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys set iam policy projects](struct.ProjectLocationKeyRingCryptoKeySetIamPolicyCall.html) (request) +/// * [locations key rings set iam policy projects](struct.ProjectLocationKeyRingSetIamPolicyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SetIamPolicyRequest { + /// REQUIRED: The complete policy to be applied to the `resource`. The size of + /// the policy is limited to a few 10s of KB. An empty policy is a + /// valid policy but certain Cloud Platform services (such as Projects) + /// might reject them. + pub policy: Option, + /// OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + /// the fields in the mask will be modified. If no mask is provided, the + /// following default mask is used: + /// paths: "bindings, etag" + /// This field is only used by Cloud IAM. + #[serde(rename="updateMask")] + pub update_mask: Option, +} + +impl RequestValue for SetIamPolicyRequest {} + + +/// A KeyRing is a toplevel logical grouping of CryptoKeys. +/// +/// # 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*). +/// +/// * [locations key rings create projects](struct.ProjectLocationKeyRingCreateCall.html) (request|response) +/// * [locations key rings get projects](struct.ProjectLocationKeyRingGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct KeyRing { + /// Output only. The time at which this KeyRing was created. + #[serde(rename="createTime")] + pub create_time: Option, + /// Output only. The resource name for the KeyRing in the format + /// `projects/*/locations/*/keyRings/*`. + pub name: Option, +} + +impl RequestValue for KeyRing {} +impl ResponseResult for KeyRing {} + + +/// A CryptoKeyVersion represents an individual cryptographic key, and the +/// associated key material. +/// +/// It can be used for cryptographic operations either directly, or via its +/// parent CryptoKey, in which case the server will choose the appropriate +/// version for the operation. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys crypto key versions destroy projects](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall.html) (response) +/// * [locations key rings crypto keys crypto key versions get projects](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall.html) (response) +/// * [locations key rings crypto keys crypto key versions patch projects](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall.html) (request|response) +/// * [locations key rings crypto keys crypto key versions restore projects](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall.html) (response) +/// * [locations key rings crypto keys crypto key versions create projects](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CryptoKeyVersion { + /// The current state of the CryptoKeyVersion. + pub state: Option, + /// Output only. The time this CryptoKeyVersion's key material is scheduled + /// for destruction. Only present if state is + /// DESTROY_SCHEDULED. + #[serde(rename="destroyTime")] + pub destroy_time: Option, + /// Output only. The time at which this CryptoKeyVersion was created. + #[serde(rename="createTime")] + pub create_time: Option, + /// Output only. The time this CryptoKeyVersion's key material was + /// destroyed. Only present if state is + /// DESTROYED. + #[serde(rename="destroyEventTime")] + pub destroy_event_time: Option, + /// Output only. The resource name for this CryptoKeyVersion in the format + /// `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + pub name: Option, +} + +impl RequestValue for CryptoKeyVersion {} +impl ResponseResult for CryptoKeyVersion {} + + +/// A rule to be applied in a Policy. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Rule { + /// If one or more 'not_in' clauses are specified, the rule matches + /// if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. + /// The format for in and not_in entries is the same as for members in a + /// Binding (see google/iam/v1/policy.proto). + #[serde(rename="notIn")] + pub not_in: Option>, + /// Human-readable description of the rule. + pub description: Option, + /// If one or more 'in' clauses are specified, the rule matches if + /// the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. + #[serde(rename="in")] + pub in_: Option>, + /// Required + pub action: Option, + /// Additional restrictions that must be met + pub conditions: Option>, + /// The config returned to callers of tech.iam.IAM.CheckPolicy for any entries + /// that match the LOG action. + #[serde(rename="logConfig")] + pub log_config: Option>, + /// A permission is a string of form '..' + /// (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, + /// and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. + pub permissions: Option>, +} + +impl Part for Rule {} + + +/// Response message for KeyManagementService.ListKeyRings. +/// +/// # 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*). +/// +/// * [locations key rings list projects](struct.ProjectLocationKeyRingListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListKeyRingsResponse { + /// A token to retrieve next page of results. Pass this value in + /// ListKeyRingsRequest.page_token to retrieve the next page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The total number of KeyRings that matched the query. + #[serde(rename="totalSize")] + pub total_size: Option, + /// The list of KeyRings. + #[serde(rename="keyRings")] + pub key_rings: Option>, +} + +impl ResponseResult for ListKeyRingsResponse {} + + +/// The response message for Locations.ListLocations. +/// +/// # 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*). +/// +/// * [locations list projects](struct.ProjectLocationListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListLocationsResponse { + /// The standard List next-page token. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// A list of locations that matches the specified filter in the request. + pub locations: Option>, +} + +impl ResponseResult for ListLocationsResponse {} + + +/// A resource that represents Google Cloud Platform location. +/// +/// # 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*). +/// +/// * [locations get projects](struct.ProjectLocationGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Location { + /// Cross-service attributes for the location. For example + /// + /// {"cloud.googleapis.com/region": "us-east1"} + pub labels: Option>, + /// The canonical id for this location. For example: `"us-east1"`. + #[serde(rename="locationId")] + pub location_id: Option, + /// Resource name for the location, which may vary between implementations. + /// For example: `"projects/example-project/locations/us-east1"` + pub name: Option, + /// Service-specific metadata. For example the available capacity at the given + /// location. + pub metadata: Option>, +} + +impl ResponseResult for Location {} + + +/// Defines an Identity and Access Management (IAM) policy. It is used to +/// specify access control policies for Cloud Platform resources. +/// +/// +/// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of +/// `members` to a `role`, where the members can be user accounts, Google groups, +/// Google domains, and service accounts. A `role` is a named list of permissions +/// defined by IAM. +/// +/// **Example** +/// +/// { +/// "bindings": [ +/// { +/// "role": "roles/owner", +/// "members": [ +/// "user:mike@example.com", +/// "group:admins@example.com", +/// "domain:google.com", +/// "serviceAccount:my-other-app@appspot.gserviceaccount.com", +/// ] +/// }, +/// { +/// "role": "roles/viewer", +/// "members": ["user:sean@example.com"] +/// } +/// ] +/// } +/// +/// For a description of IAM and its features, see the +/// [IAM developer's guide](https://cloud.google.com/iam). +/// +/// # 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*). +/// +/// * [locations key rings crypto keys get iam policy projects](struct.ProjectLocationKeyRingCryptoKeyGetIamPolicyCall.html) (response) +/// * [locations key rings get iam policy projects](struct.ProjectLocationKeyRingGetIamPolicyCall.html) (response) +/// * [locations key rings crypto keys set iam policy projects](struct.ProjectLocationKeyRingCryptoKeySetIamPolicyCall.html) (response) +/// * [locations key rings set iam policy projects](struct.ProjectLocationKeyRingSetIamPolicyCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Policy { + /// Specifies cloud audit logging configuration for this policy. + #[serde(rename="auditConfigs")] + pub audit_configs: Option>, + /// Version of the `Policy`. The default version is 0. + pub version: Option, + /// `etag` is used for optimistic concurrency control as a way to help + /// prevent simultaneous updates of a policy from overwriting each other. + /// It is strongly suggested that systems make use of the `etag` in the + /// read-modify-write cycle to perform policy updates in order to avoid race + /// conditions: An `etag` is returned in the response to `getIamPolicy`, and + /// systems are expected to put that etag in the request to `setIamPolicy` to + /// ensure that their change will be applied to the same version of the policy. + /// + /// If no `etag` is provided in the call to `setIamPolicy`, then the existing + /// policy is overwritten blindly. + pub etag: Option, + /// If more than one rule is specified, the rules are applied in the following + /// manner: + /// - All matching LOG rules are always applied. + /// - If any DENY/DENY_WITH_LOG rule matches, permission is denied. + /// Logging will be applied if one or more matching rule requires logging. + /// - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is + /// granted. + /// Logging will be applied if one or more matching rule requires logging. + /// - Otherwise, if no rule applies, permission is denied. + pub rules: Option>, + /// Associates a list of `members` to a `role`. + /// Multiple `bindings` must not be specified for the same `role`. + /// `bindings` with no members will result in an error. + pub bindings: Option>, + /// no description provided + #[serde(rename="iamOwned")] + pub iam_owned: Option, +} + +impl ResponseResult for Policy {} + + +/// Response message for KeyManagementService.Decrypt. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys decrypt projects](struct.ProjectLocationKeyRingCryptoKeyDecryptCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct DecryptResponse { + /// The decrypted data originally supplied in EncryptRequest.plaintext. + pub plaintext: Option, +} + +impl ResponseResult for DecryptResponse {} + + +/// Response message for KeyManagementService.ListCryptoKeyVersions. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys crypto key versions list projects](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListCryptoKeyVersionsResponse { + /// A token to retrieve next page of results. Pass this value in + /// ListCryptoKeyVersionsRequest.page_token to retrieve the next page of + /// results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The total number of CryptoKeyVersions that matched the + /// query. + #[serde(rename="totalSize")] + pub total_size: Option, + /// The list of CryptoKeyVersions. + #[serde(rename="cryptoKeyVersions")] + pub crypto_key_versions: Option>, +} + +impl ResponseResult for ListCryptoKeyVersionsResponse {} + + +/// Options for counters +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CounterOptions { + /// The field value to attribute. + pub field: Option, + /// The metric to update. + pub metric: Option, +} + +impl Part for CounterOptions {} + + +/// A CryptoKey represents a logical key that can be used for cryptographic +/// operations. +/// +/// A CryptoKey is made up of one or more versions, which +/// represent the actual key material used in cryptographic operations. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys get projects](struct.ProjectLocationKeyRingCryptoKeyGetCall.html) (response) +/// * [locations key rings crypto keys update primary version projects](struct.ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall.html) (response) +/// * [locations key rings crypto keys create projects](struct.ProjectLocationKeyRingCryptoKeyCreateCall.html) (request|response) +/// * [locations key rings crypto keys patch projects](struct.ProjectLocationKeyRingCryptoKeyPatchCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CryptoKey { + /// Output only. The resource name for this CryptoKey in the format + /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + pub name: Option, + /// At next_rotation_time, the Key Management Service will automatically: + /// + /// 1. Create a new version of this CryptoKey. + /// 2. Mark the new version as primary. + /// + /// Key rotations performed manually via + /// CreateCryptoKeyVersion and + /// UpdateCryptoKeyPrimaryVersion + /// do not affect next_rotation_time. + #[serde(rename="nextRotationTime")] + pub next_rotation_time: Option, + /// next_rotation_time will be advanced by this period when the service + /// automatically rotates a key. Must be at least one day. + /// + /// If rotation_period is set, next_rotation_time must also be set. + #[serde(rename="rotationPeriod")] + pub rotation_period: Option, + /// Output only. A copy of the "primary" CryptoKeyVersion that will be used + /// by Encrypt when this CryptoKey is given + /// in EncryptRequest.name. + /// + /// The CryptoKey's primary version can be updated via + /// UpdateCryptoKeyPrimaryVersion. + pub primary: Option, + /// Output only. The time at which this CryptoKey was created. + #[serde(rename="createTime")] + pub create_time: Option, + /// The immutable purpose of this CryptoKey. Currently, the only acceptable + /// purpose is ENCRYPT_DECRYPT. + pub purpose: Option, +} + +impl RequestValue for CryptoKey {} +impl ResponseResult for CryptoKey {} + + +/// Response message for `TestIamPermissions` method. +/// +/// # 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*). +/// +/// * [locations key rings test iam permissions projects](struct.ProjectLocationKeyRingTestIamPermissionCall.html) (response) +/// * [locations key rings crypto keys test iam permissions projects](struct.ProjectLocationKeyRingCryptoKeyTestIamPermissionCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestIamPermissionsResponse { + /// A subset of `TestPermissionsRequest.permissions` that the caller is + /// allowed. + pub permissions: Option>, +} + +impl ResponseResult for TestIamPermissionsResponse {} + + +/// Request message for KeyManagementService.RestoreCryptoKeyVersion. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys crypto key versions restore projects](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct RestoreCryptoKeyVersionRequest { _never_set: Option } + +impl RequestValue for RestoreCryptoKeyVersionRequest {} + + +/// Response message for KeyManagementService.Encrypt. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys encrypt projects](struct.ProjectLocationKeyRingCryptoKeyEncryptCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct EncryptResponse { + /// The encrypted data. + pub ciphertext: Option, + /// The resource name of the CryptoKeyVersion used in encryption. + pub name: Option, +} + +impl ResponseResult for EncryptResponse {} + + +/// Request message for KeyManagementService.DestroyCryptoKeyVersion. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys crypto key versions destroy projects](struct.ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct DestroyCryptoKeyVersionRequest { _never_set: Option } + +impl RequestValue for DestroyCryptoKeyVersionRequest {} + + +/// Request message for KeyManagementService.Decrypt. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys decrypt projects](struct.ProjectLocationKeyRingCryptoKeyDecryptCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct DecryptRequest { + /// Required. The encrypted data originally returned in + /// EncryptResponse.ciphertext. + pub ciphertext: Option, + /// Optional data that must match the data originally supplied in + /// EncryptRequest.additional_authenticated_data. + #[serde(rename="additionalAuthenticatedData")] + pub additional_authenticated_data: Option, +} + +impl RequestValue for DecryptRequest {} + + +/// Write a Data Access (Gin) log +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct DataAccessOptions { _never_set: Option } + +impl Part for DataAccessOptions {} + + +/// Associates `members` with a `role`. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Binding { + /// Role that is assigned to `members`. + /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + /// Required + pub role: Option, + /// Specifies the identities requesting access for a Cloud Platform resource. + /// `members` can have the following values: + /// + /// * `allUsers`: A special identifier that represents anyone who is + /// on the internet; with or without a Google account. + /// + /// * `allAuthenticatedUsers`: A special identifier that represents anyone + /// who is authenticated with a Google account or a service account. + /// + /// * `user:{emailid}`: An email address that represents a specific Google + /// account. For example, `alice@gmail.com` or `joe@example.com`. + /// + /// + /// * `serviceAccount:{emailid}`: An email address that represents a service + /// account. For example, `my-other-app@appspot.gserviceaccount.com`. + /// + /// * `group:{emailid}`: An email address that represents a Google group. + /// For example, `admins@example.com`. + /// + /// + /// * `domain:{domain}`: A Google Apps domain name that represents all the + /// users of that domain. For example, `google.com` or `example.com`. + /// + /// + pub members: Option>, +} + +impl Part for Binding {} + + +/// Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion. +/// +/// # 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*). +/// +/// * [locations key rings crypto keys update primary version projects](struct.ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UpdateCryptoKeyPrimaryVersionRequest { + /// The id of the child CryptoKeyVersion to use as primary. + #[serde(rename="cryptoKeyVersionId")] + pub crypto_key_version_id: Option, +} + +impl RequestValue for UpdateCryptoKeyPrimaryVersionRequest {} + + +/// Specifies the audit configuration for a service. +/// The configuration determines which permission types are logged, and what +/// identities, if any, are exempted from logging. +/// An AuditConfig must have one or more AuditLogConfigs. +/// +/// If there are AuditConfigs for both `allServices` and a specific service, +/// the union of the two AuditConfigs is used for that service: the log_types +/// specified in each AuditConfig are enabled, and the exempted_members in each +/// AuditConfig are exempted. +/// +/// Example Policy with multiple AuditConfigs: +/// +/// { +/// "audit_configs": [ +/// { +/// "service": "allServices" +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// "exempted_members": [ +/// "user:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// }, +/// { +/// "log_type": "ADMIN_READ", +/// } +/// ] +/// }, +/// { +/// "service": "fooservice.googleapis.com" +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// "exempted_members": [ +/// "user:bar@gmail.com" +/// ] +/// } +/// ] +/// } +/// ] +/// } +/// +/// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ +/// logging. It also exempts foo@gmail.com from DATA_READ logging, and +/// bar@gmail.com from DATA_WRITE logging. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AuditConfig { + /// no description provided + #[serde(rename="exemptedMembers")] + pub exempted_members: Option>, + /// The configuration for logging of each type of permission. + /// Next ID: 4 + #[serde(rename="auditLogConfigs")] + pub audit_log_configs: Option>, + /// Specifies a service that will be enabled for audit logging. + /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + /// `allServices` is a special value that covers all services. + pub service: Option, +} + +impl Part for AuditConfig {} + + +/// Write a Cloud Audit log +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CloudAuditOptions { + /// The log_name to populate in the Cloud Audit Record. + #[serde(rename="logName")] + pub log_name: Option, +} + +impl Part for CloudAuditOptions {} + + +/// Specifies what kind of log the caller must write +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct LogConfig { + /// Counter options. + pub counter: Option, + /// Data access options. + #[serde(rename="dataAccess")] + pub data_access: Option, + /// Cloud audit options. + #[serde(rename="cloudAudit")] + pub cloud_audit: Option, +} + +impl Part for LogConfig {} + + +/// A condition to be met. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Condition { + /// Trusted attributes supplied by the IAM system. + pub iam: Option, + /// Trusted attributes supplied by any service that owns resources and uses + /// the IAM system for access control. + pub sys: Option, + /// The objects of the condition. This is mutually exclusive with 'value'. + pub values: Option>, + /// Trusted attributes discharged by the service. + pub svc: Option, + /// DEPRECATED. Use 'values' instead. + pub value: Option, + /// An operator to apply the subject with. + pub op: Option, +} + +impl Part for Condition {} + + + +// ################### +// MethodBuilders ### +// ################# + +/// A builder providing access to all methods supported on *project* resources. +/// It is not used directly, but through the `CloudKMS` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use cloudkms1_beta1::CloudKMS; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = CloudKMS::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `locations_get(...)`, `locations_key_rings_create(...)`, `locations_key_rings_crypto_keys_create(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_create(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_destroy(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_get(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_list(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_patch(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_restore(...)`, `locations_key_rings_crypto_keys_decrypt(...)`, `locations_key_rings_crypto_keys_encrypt(...)`, `locations_key_rings_crypto_keys_get(...)`, `locations_key_rings_crypto_keys_get_iam_policy(...)`, `locations_key_rings_crypto_keys_list(...)`, `locations_key_rings_crypto_keys_patch(...)`, `locations_key_rings_crypto_keys_set_iam_policy(...)`, `locations_key_rings_crypto_keys_test_iam_permissions(...)`, `locations_key_rings_crypto_keys_update_primary_version(...)`, `locations_key_rings_get(...)`, `locations_key_rings_get_iam_policy(...)`, `locations_key_rings_list(...)`, `locations_key_rings_set_iam_policy(...)`, `locations_key_rings_test_iam_permissions(...)` and `locations_list(...)` +/// // to build up your call. +/// let rb = hub.projects(); +/// # } +/// ``` +pub struct ProjectMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, +} + +impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} + +impl<'a, C, A> ProjectMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Update a CryptoKeyVersion's metadata. + /// + /// state may be changed between + /// ENABLED and + /// DISABLED using this + /// method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to + /// move between other states. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Output only. The resource name for this CryptoKeyVersion in the format + /// `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + pub fn locations_key_rings_crypto_keys_crypto_key_versions_patch(&self, request: CryptoKeyVersion, name: &str) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _update_mask: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Create a new KeyRing in a given Project and Location. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `parent` - Required. The resource name of the location associated with the + /// KeyRings, in the format `projects/*/locations/*`. + pub fn locations_key_rings_create(&self, request: KeyRing, parent: &str) -> ProjectLocationKeyRingCreateCall<'a, C, A> { + ProjectLocationKeyRingCreateCall { + hub: self.hub, + _request: request, + _parent: parent.to_string(), + _key_ring_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists KeyRings. + /// + /// # Arguments + /// + /// * `parent` - Required. The resource name of the location associated with the + /// KeyRings, in the format `projects/*/locations/*`. + pub fn locations_key_rings_list(&self, parent: &str) -> ProjectLocationKeyRingListCall<'a, C, A> { + ProjectLocationKeyRingListCall { + hub: self.hub, + _parent: parent.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Schedule a CryptoKeyVersion for destruction. + /// + /// Upon calling this method, CryptoKeyVersion.state will be set to + /// DESTROY_SCHEDULED + /// and destroy_time will be set to a time 24 + /// hours in the future, at which point the state + /// will be changed to + /// DESTROYED, and the key + /// material will be irrevocably destroyed. + /// + /// Before the destroy_time is reached, + /// RestoreCryptoKeyVersion may be called to reverse the process. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - The resource name of the CryptoKeyVersion to destroy. + pub fn locations_key_rings_crypto_keys_crypto_key_versions_destroy(&self, request: DestroyCryptoKeyVersionRequest, name: &str) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Encrypt data, so that it can only be recovered by a call to Decrypt. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The resource name of the CryptoKey or CryptoKeyVersion + /// to use for encryption. + /// If a CryptoKey is specified, the server will use its + /// primary version. + pub fn locations_key_rings_crypto_keys_encrypt(&self, request: EncryptRequest, name: &str) -> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyEncryptCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns metadata for a given KeyRing. + /// + /// # Arguments + /// + /// * `name` - The name of the KeyRing to get. + pub fn locations_key_rings_get(&self, name: &str) -> ProjectLocationKeyRingGetCall<'a, C, A> { + ProjectLocationKeyRingGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns metadata for a given CryptoKey, as well as its + /// primary CryptoKeyVersion. + /// + /// # Arguments + /// + /// * `name` - The name of the CryptoKey to get. + pub fn locations_key_rings_crypto_keys_get(&self, name: &str) -> ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists information about the supported locations for this service. + /// + /// # Arguments + /// + /// * `name` - The resource that owns the locations collection, if applicable. + pub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C, A> { + ProjectLocationListCall { + hub: self.hub, + _name: name.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _filter: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns permissions that a caller has on the specified resource. + /// If the resource does not exist, this will return an empty set of + /// permissions, not a NOT_FOUND error. + /// + /// Note: This operation is designed to be used for building permission-aware + /// UIs and command-line tools, not for authorization checking. This operation + /// may "fail open" without warning. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. + /// See the operation documentation for the appropriate value for this field. + pub fn locations_key_rings_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> { + ProjectLocationKeyRingTestIamPermissionCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets the access control policy for a resource. + /// Returns an empty policy if the resource exists and does not have a policy + /// set. + /// + /// # Arguments + /// + /// * `resource` - REQUIRED: The resource for which the policy is being requested. + /// See the operation documentation for the appropriate value for this field. + pub fn locations_key_rings_crypto_keys_get_iam_policy(&self, resource: &str) -> ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyGetIamPolicyCall { + hub: self.hub, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Update the version of a CryptoKey that will be used in Encrypt + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - The resource name of the CryptoKey to update. + pub fn locations_key_rings_crypto_keys_update_primary_version(&self, request: UpdateCryptoKeyPrimaryVersionRequest, name: &str) -> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Update a CryptoKey. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Output only. The resource name for this CryptoKey in the format + /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + pub fn locations_key_rings_crypto_keys_patch(&self, request: CryptoKey, name: &str) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyPatchCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _update_mask: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Decrypt data that was protected by Encrypt. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The resource name of the CryptoKey to use for decryption. + /// The server will choose the appropriate version. + pub fn locations_key_rings_crypto_keys_decrypt(&self, request: DecryptRequest, name: &str) -> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyDecryptCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets the access control policy for a resource. + /// Returns an empty policy if the resource exists and does not have a policy + /// set. + /// + /// # Arguments + /// + /// * `resource` - REQUIRED: The resource for which the policy is being requested. + /// See the operation documentation for the appropriate value for this field. + pub fn locations_key_rings_get_iam_policy(&self, resource: &str) -> ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> { + ProjectLocationKeyRingGetIamPolicyCall { + hub: self.hub, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Sets the access control policy on the specified resource. Replaces any + /// existing policy. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy is being specified. + /// See the operation documentation for the appropriate value for this field. + pub fn locations_key_rings_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> { + ProjectLocationKeyRingSetIamPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Get information about a location. + /// + /// # Arguments + /// + /// * `name` - Resource name for the location. + pub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C, A> { + ProjectLocationGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns permissions that a caller has on the specified resource. + /// If the resource does not exist, this will return an empty set of + /// permissions, not a NOT_FOUND error. + /// + /// Note: This operation is designed to be used for building permission-aware + /// UIs and command-line tools, not for authorization checking. This operation + /// may "fail open" without warning. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. + /// See the operation documentation for the appropriate value for this field. + pub fn locations_key_rings_crypto_keys_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyTestIamPermissionCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists CryptoKeyVersions. + /// + /// # Arguments + /// + /// * `parent` - Required. The resource name of the CryptoKey to list, in the format + /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + pub fn locations_key_rings_crypto_keys_crypto_key_versions_list(&self, parent: &str) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall { + hub: self.hub, + _parent: parent.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists CryptoKeys. + /// + /// # Arguments + /// + /// * `parent` - Required. The resource name of the KeyRing to list, in the format + /// `projects/*/locations/*/keyRings/*`. + pub fn locations_key_rings_crypto_keys_list(&self, parent: &str) -> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyListCall { + hub: self.hub, + _parent: parent.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Create a new CryptoKeyVersion in a CryptoKey. + /// + /// The server will assign the next sequential id. If unset, + /// state will be set to + /// ENABLED. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `parent` - Required. The name of the CryptoKey associated with + /// the CryptoKeyVersions. + pub fn locations_key_rings_crypto_keys_crypto_key_versions_create(&self, request: CryptoKeyVersion, parent: &str) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall { + hub: self.hub, + _request: request, + _parent: parent.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns metadata for a given CryptoKeyVersion. + /// + /// # Arguments + /// + /// * `name` - The name of the CryptoKeyVersion to get. + pub fn locations_key_rings_crypto_keys_crypto_key_versions_get(&self, name: &str) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Sets the access control policy on the specified resource. Replaces any + /// existing policy. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy is being specified. + /// See the operation documentation for the appropriate value for this field. + pub fn locations_key_rings_crypto_keys_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeySetIamPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Restore a CryptoKeyVersion in the + /// DESTROY_SCHEDULED, + /// state. + /// + /// Upon restoration of the CryptoKeyVersion, state + /// will be set to DISABLED, + /// and destroy_time will be cleared. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - The resource name of the CryptoKeyVersion to restore. + pub fn locations_key_rings_crypto_keys_crypto_key_versions_restore(&self, request: RestoreCryptoKeyVersionRequest, name: &str) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Create a new CryptoKey within a KeyRing. + /// + /// CryptoKey.purpose is required. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `parent` - Required. The name of the KeyRing associated with the + /// CryptoKeys. + pub fn locations_key_rings_crypto_keys_create(&self, request: CryptoKey, parent: &str) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> { + ProjectLocationKeyRingCryptoKeyCreateCall { + hub: self.hub, + _request: request, + _parent: parent.to_string(), + _crypto_key_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + + + +// ################### +// CallBuilders ### +// ################# + +/// Update a CryptoKeyVersion's metadata. +/// +/// state may be changed between +/// ENABLED and +/// DISABLED using this +/// method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to +/// move between other states. +/// +/// A builder for the *locations.keyRings.cryptoKeys.cryptoKeyVersions.patch* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::CryptoKeyVersion; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = CryptoKeyVersion::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.projects().locations_key_rings_crypto_keys_crypto_key_versions_patch(req, "name") +/// .update_mask("accusam") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: CryptoKeyVersion, + _name: String, + _update_mask: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CryptoKeyVersion)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._update_mask { + params.push(("updateMask", value.to_string())); + } + for &field in ["alt", "name", "updateMask"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: CryptoKeyVersion) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> { + self._request = new_value; + self + } + /// Output only. The resource name for this CryptoKeyVersion in the format + /// `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// Required list of fields to be updated in this request. + /// + /// Sets the *update mask* query property to the given value. + pub fn update_mask(mut self, new_value: &str) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> { + self._update_mask = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Create a new KeyRing in a given Project and Location. +/// +/// A builder for the *locations.keyRings.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::KeyRing; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = KeyRing::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.projects().locations_key_rings_create(req, "parent") +/// .key_ring_id("justo") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: KeyRing, + _parent: String, + _key_ring_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, KeyRing)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("parent", self._parent.to_string())); + if let Some(value) = self._key_ring_id { + params.push(("keyRingId", value.to_string())); + } + for &field in ["alt", "parent", "keyRingId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+parent}/keyRings".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["parent"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: KeyRing) -> ProjectLocationKeyRingCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// Required. The resource name of the location associated with the + /// KeyRings, in the format `projects/*/locations/*`. + /// + /// 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) -> ProjectLocationKeyRingCreateCall<'a, C, A> { + self._parent = new_value.to_string(); + self + } + /// Required. It must be unique within a location and match the regular + /// expression `[a-zA-Z0-9_-]{1,63}` + /// + /// Sets the *key ring id* query property to the given value. + pub fn key_ring_id(mut self, new_value: &str) -> ProjectLocationKeyRingCreateCall<'a, C, A> { + self._key_ring_id = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCreateCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCreateCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists KeyRings. +/// +/// A builder for the *locations.keyRings.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_key_rings_list("parent") +/// .page_token("erat") +/// .page_size(-35) +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _parent: String, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingListCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListKeyRingsResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("parent", self._parent.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "parent", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+parent}/keyRings".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["parent"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Required. The resource name of the location associated with the + /// KeyRings, in the format `projects/*/locations/*`. + /// + /// 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) -> ProjectLocationKeyRingListCall<'a, C, A> { + self._parent = new_value.to_string(); + self + } + /// Optional pagination token, returned earlier via + /// ListKeyRingsResponse.next_page_token. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectLocationKeyRingListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Optional limit on the number of KeyRings to include in the + /// response. Further KeyRings can subsequently be obtained by + /// including the ListKeyRingsResponse.next_page_token in a subsequent + /// request. If unspecified, the server will pick an appropriate default. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectLocationKeyRingListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingListCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Schedule a CryptoKeyVersion for destruction. +/// +/// Upon calling this method, CryptoKeyVersion.state will be set to +/// DESTROY_SCHEDULED +/// and destroy_time will be set to a time 24 +/// hours in the future, at which point the state +/// will be changed to +/// DESTROYED, and the key +/// material will be irrevocably destroyed. +/// +/// Before the destroy_time is reached, +/// RestoreCryptoKeyVersion may be called to reverse the process. +/// +/// A builder for the *locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::DestroyCryptoKeyVersionRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = DestroyCryptoKeyVersionRequest::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.projects().locations_key_rings_crypto_keys_crypto_key_versions_destroy(req, "name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: DestroyCryptoKeyVersionRequest, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CryptoKeyVersion)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}:destroy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: DestroyCryptoKeyVersionRequest) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> { + self._request = new_value; + self + } + /// The resource name of the CryptoKeyVersion to destroy. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Encrypt data, so that it can only be recovered by a call to Decrypt. +/// +/// A builder for the *locations.keyRings.cryptoKeys.encrypt* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::EncryptRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = EncryptRequest::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.projects().locations_key_rings_crypto_keys_encrypt(req, "name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: EncryptRequest, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, EncryptResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.encrypt", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}:encrypt".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: EncryptRequest) -> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> { + self._request = new_value; + self + } + /// Required. The resource name of the CryptoKey or CryptoKeyVersion + /// to use for encryption. + /// + /// If a CryptoKey is specified, the server will use its + /// primary version. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns metadata for a given KeyRing. +/// +/// A builder for the *locations.keyRings.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_key_rings_get("name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, KeyRing)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The name of the KeyRing to get. + /// + /// 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) -> ProjectLocationKeyRingGetCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingGetCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns metadata for a given CryptoKey, as well as its +/// primary CryptoKeyVersion. +/// +/// A builder for the *locations.keyRings.cryptoKeys.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_key_rings_crypto_keys_get("name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CryptoKey)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The name of the CryptoKey to get. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists information about the supported locations for this service. +/// +/// A builder for the *locations.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_list("name") +/// .page_token("aliquyam") +/// .page_size(-66) +/// .filter("no") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _name: String, + _page_token: Option, + _page_size: Option, + _filter: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationListCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListLocationsResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._filter { + params.push(("filter", value.to_string())); + } + for &field in ["alt", "name", "pageToken", "pageSize", "filter"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}/locations".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The resource that owns the locations collection, if applicable. + /// + /// 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) -> ProjectLocationListCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// The standard list page token. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectLocationListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The standard list page size. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectLocationListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// The standard list filter. + /// + /// Sets the *filter* query property to the given value. + pub fn filter(mut self, new_value: &str) -> ProjectLocationListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationListCall<'a, C, A> + 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 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: T) -> ProjectLocationListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns permissions that a caller has on the specified resource. +/// If the resource does not exist, this will return an empty set of +/// permissions, not a NOT_FOUND error. +/// +/// Note: This operation is designed to be used for building permission-aware +/// UIs and command-line tools, not for authorization checking. This operation +/// may "fail open" without warning. +/// +/// A builder for the *locations.keyRings.testIamPermissions* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::TestIamPermissionsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = TestIamPermissionsRequest::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.projects().locations_key_rings_test_iam_permissions(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: TestIamPermissionsRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TestIamPermissionsResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.testIamPermissions", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+resource}:testIamPermissions".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: TestIamPermissionsRequest) -> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> { + self._request = new_value; + self + } + /// REQUIRED: The resource for which the policy detail is being requested. + /// See the operation documentation for the appropriate value for this field. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets the access control policy for a resource. +/// Returns an empty policy if the resource exists and does not have a policy +/// set. +/// +/// A builder for the *locations.keyRings.cryptoKeys.getIamPolicy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_key_rings_crypto_keys_get_iam_policy("resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+resource}:getIamPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// REQUIRED: The resource for which the policy is being requested. + /// See the operation documentation for the appropriate value for this field. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Update the version of a CryptoKey that will be used in Encrypt +/// +/// A builder for the *locations.keyRings.cryptoKeys.updatePrimaryVersion* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::UpdateCryptoKeyPrimaryVersionRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = UpdateCryptoKeyPrimaryVersionRequest::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.projects().locations_key_rings_crypto_keys_update_primary_version(req, "name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: UpdateCryptoKeyPrimaryVersionRequest, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CryptoKey)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}:updatePrimaryVersion".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: UpdateCryptoKeyPrimaryVersionRequest) -> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> { + self._request = new_value; + self + } + /// The resource name of the CryptoKey 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) -> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Update a CryptoKey. +/// +/// A builder for the *locations.keyRings.cryptoKeys.patch* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::CryptoKey; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = CryptoKey::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.projects().locations_key_rings_crypto_keys_patch(req, "name") +/// .update_mask("diam") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: CryptoKey, + _name: String, + _update_mask: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CryptoKey)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.patch", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._update_mask { + params.push(("updateMask", value.to_string())); + } + for &field in ["alt", "name", "updateMask"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: CryptoKey) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> { + self._request = new_value; + self + } + /// Output only. The resource name for this CryptoKey in the format + /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// Required list of fields to be updated in this request. + /// + /// Sets the *update mask* query property to the given value. + pub fn update_mask(mut self, new_value: &str) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> { + self._update_mask = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Decrypt data that was protected by Encrypt. +/// +/// A builder for the *locations.keyRings.cryptoKeys.decrypt* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::DecryptRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = DecryptRequest::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.projects().locations_key_rings_crypto_keys_decrypt(req, "name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: DecryptRequest, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, DecryptResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.decrypt", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}:decrypt".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: DecryptRequest) -> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> { + self._request = new_value; + self + } + /// Required. The resource name of the CryptoKey to use for decryption. + /// The server will choose the appropriate version. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets the access control policy for a resource. +/// Returns an empty policy if the resource exists and does not have a policy +/// set. +/// +/// A builder for the *locations.keyRings.getIamPolicy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_key_rings_get_iam_policy("resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.getIamPolicy", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+resource}:getIamPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// REQUIRED: The resource for which the policy is being requested. + /// See the operation documentation for the appropriate value for this field. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Sets the access control policy on the specified resource. Replaces any +/// existing policy. +/// +/// A builder for the *locations.keyRings.setIamPolicy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::SetIamPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = SetIamPolicyRequest::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.projects().locations_key_rings_set_iam_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: SetIamPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.setIamPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+resource}:setIamPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SetIamPolicyRequest) -> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// REQUIRED: The resource for which the policy is being specified. + /// See the operation documentation for the appropriate value for this field. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Get information about a location. +/// +/// A builder for the *locations.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_get("name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Location)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Resource name for the location. + /// + /// 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) -> ProjectLocationGetCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationGetCall<'a, C, A> + 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 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: T) -> ProjectLocationGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns permissions that a caller has on the specified resource. +/// If the resource does not exist, this will return an empty set of +/// permissions, not a NOT_FOUND error. +/// +/// Note: This operation is designed to be used for building permission-aware +/// UIs and command-line tools, not for authorization checking. This operation +/// may "fail open" without warning. +/// +/// A builder for the *locations.keyRings.cryptoKeys.testIamPermissions* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::TestIamPermissionsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = TestIamPermissionsRequest::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.projects().locations_key_rings_crypto_keys_test_iam_permissions(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: TestIamPermissionsRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TestIamPermissionsResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+resource}:testIamPermissions".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: TestIamPermissionsRequest) -> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> { + self._request = new_value; + self + } + /// REQUIRED: The resource for which the policy detail is being requested. + /// See the operation documentation for the appropriate value for this field. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists CryptoKeyVersions. +/// +/// A builder for the *locations.keyRings.cryptoKeys.cryptoKeyVersions.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_key_rings_crypto_keys_crypto_key_versions_list("parent") +/// .page_token("Lorem") +/// .page_size(-75) +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _parent: String, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListCryptoKeyVersionsResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("parent", self._parent.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "parent", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+parent}/cryptoKeyVersions".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["parent"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Required. The resource name of the CryptoKey to list, in the format + /// `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> { + self._parent = new_value.to_string(); + self + } + /// Optional pagination token, returned earlier via + /// ListCryptoKeyVersionsResponse.next_page_token. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Optional limit on the number of CryptoKeyVersions to + /// include in the response. Further CryptoKeyVersions can + /// subsequently be obtained by including the + /// ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. + /// If unspecified, the server will pick an appropriate default. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists CryptoKeys. +/// +/// A builder for the *locations.keyRings.cryptoKeys.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_key_rings_crypto_keys_list("parent") +/// .page_token("sadipscing") +/// .page_size(-48) +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _parent: String, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListCryptoKeysResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("parent", self._parent.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "parent", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+parent}/cryptoKeys".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["parent"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Required. The resource name of the KeyRing to list, in the format + /// `projects/*/locations/*/keyRings/*`. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> { + self._parent = new_value.to_string(); + self + } + /// Optional pagination token, returned earlier via + /// ListCryptoKeysResponse.next_page_token. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Optional limit on the number of CryptoKeys to include in the + /// response. Further CryptoKeys can subsequently be obtained by + /// including the ListCryptoKeysResponse.next_page_token in a subsequent + /// request. If unspecified, the server will pick an appropriate default. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Create a new CryptoKeyVersion in a CryptoKey. +/// +/// The server will assign the next sequential id. If unset, +/// state will be set to +/// ENABLED. +/// +/// A builder for the *locations.keyRings.cryptoKeys.cryptoKeyVersions.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::CryptoKeyVersion; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = CryptoKeyVersion::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.projects().locations_key_rings_crypto_keys_crypto_key_versions_create(req, "parent") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: CryptoKeyVersion, + _parent: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CryptoKeyVersion)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("parent", self._parent.to_string())); + for &field in ["alt", "parent"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+parent}/cryptoKeyVersions".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["parent"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: CryptoKeyVersion) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// Required. The name of the CryptoKey associated with + /// the CryptoKeyVersions. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> { + self._parent = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns metadata for a given CryptoKeyVersion. +/// +/// A builder for the *locations.keyRings.cryptoKeys.cryptoKeyVersions.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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.projects().locations_key_rings_crypto_keys_crypto_key_versions_get("name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CryptoKeyVersion)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The name of the CryptoKeyVersion to get. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Sets the access control policy on the specified resource. Replaces any +/// existing policy. +/// +/// A builder for the *locations.keyRings.cryptoKeys.setIamPolicy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::SetIamPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = SetIamPolicyRequest::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.projects().locations_key_rings_crypto_keys_set_iam_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: SetIamPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+resource}:setIamPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SetIamPolicyRequest) -> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// REQUIRED: The resource for which the policy is being specified. + /// See the operation documentation for the appropriate value for this field. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Restore a CryptoKeyVersion in the +/// DESTROY_SCHEDULED, +/// state. +/// +/// Upon restoration of the CryptoKeyVersion, state +/// will be set to DISABLED, +/// and destroy_time will be cleared. +/// +/// A builder for the *locations.keyRings.cryptoKeys.cryptoKeyVersions.restore* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::RestoreCryptoKeyVersionRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = RestoreCryptoKeyVersionRequest::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.projects().locations_key_rings_crypto_keys_crypto_key_versions_restore(req, "name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: RestoreCryptoKeyVersionRequest, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CryptoKeyVersion)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+name}:restore".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: RestoreCryptoKeyVersionRequest) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> { + self._request = new_value; + self + } + /// The resource name of the CryptoKeyVersion to restore. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Create a new CryptoKey within a KeyRing. +/// +/// CryptoKey.purpose is required. +/// +/// A builder for the *locations.keyRings.cryptoKeys.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudkms1_beta1 as cloudkms1_beta1; +/// use cloudkms1_beta1::CryptoKey; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudkms1_beta1::CloudKMS; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudKMS::new(hyper::Client::new(), 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 = CryptoKey::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.projects().locations_key_rings_crypto_keys_create(req, "parent") +/// .crypto_key_id("eirmod") +/// .doit(); +/// # } +/// ``` +pub struct ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudKMS, + _request: CryptoKey, + _parent: String, + _crypto_key_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CryptoKey)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudkms.projects.locations.keyRings.cryptoKeys.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("parent", self._parent.to_string())); + if let Some(value) = self._crypto_key_id { + params.push(("cryptoKeyId", value.to_string())); + } + for &field in ["alt", "parent", "cryptoKeyId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudkms.googleapis.com/v1beta1/{+parent}/cryptoKeys".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["parent"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: CryptoKey) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// Required. The name of the KeyRing associated with the + /// CryptoKeys. + /// + /// 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) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> { + self._parent = new_value.to_string(); + self + } + /// Required. It must be unique within a KeyRing and match the regular + /// expression `[a-zA-Z0-9_-]{1,63}` + /// + /// Sets the *crypto key id* query property to the given value. + pub fn crypto_key_id(mut self, new_value: &str) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> { + self._crypto_key_id = 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. + /// + /// 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 Delegate) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> + 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 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: T) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + + diff --git a/gen/cloudlatencytest2-cli/Cargo.toml b/gen/cloudlatencytest2-cli/Cargo.toml index e0ed2e619c..d06668bdbb 100644 --- a/gen/cloudlatencytest2-cli/Cargo.toml +++ b/gen/cloudlatencytest2-cli/Cargo.toml @@ -23,7 +23,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/cloudmonitoring2_beta2-cli/Cargo.toml b/gen/cloudmonitoring2_beta2-cli/Cargo.toml index 8e8ef2c5d8..0b9a86d2e5 100644 --- a/gen/cloudmonitoring2_beta2-cli/Cargo.toml +++ b/gen/cloudmonitoring2_beta2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudmonitoring2_beta2-cli" -version = "1.0.4+20161031" +version = "1.0.4+20170501" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud Monitoring (protocol v2beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudmonitoring2_beta2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-cloudmonitoring2_beta2] path = "../cloudmonitoring2_beta2" -version = "1.0.4+20161031" +version = "1.0.4+20170501" diff --git a/gen/cloudmonitoring2_beta2-cli/README.md b/gen/cloudmonitoring2_beta2-cli/README.md index 02f8005076..fa2bd0ca52 100644 --- a/gen/cloudmonitoring2_beta2-cli/README.md +++ b/gen/cloudmonitoring2_beta2-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Cloud Monitoring* API at revision *20161031*. The CLI is at version *1.0.4*. +This documentation was generated from the *Cloud Monitoring* API at revision *20170501*. The CLI is at version *1.0.4*. ```bash cloudmonitoring2-beta2 [options] diff --git a/gen/cloudmonitoring2_beta2-cli/mkdocs.yml b/gen/cloudmonitoring2_beta2-cli/mkdocs.yml index 3708d6b6f0..6cb47f093d 100644 --- a/gen/cloudmonitoring2_beta2-cli/mkdocs.yml +++ b/gen/cloudmonitoring2_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Cloud Monitoring v1.0.4+20161031 +site_name: Cloud Monitoring v1.0.4+20170501 site_url: http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2-cli site_description: A complete library to interact with Cloud Monitoring (protocol v2beta2) diff --git a/gen/cloudmonitoring2_beta2-cli/src/main.rs b/gen/cloudmonitoring2_beta2-cli/src/main.rs index 99c77be6fd..38c82c01f6 100644 --- a/gen/cloudmonitoring2_beta2-cli/src/main.rs +++ b/gen/cloudmonitoring2_beta2-cli/src/main.rs @@ -915,7 +915,7 @@ fn main() { let mut app = App::new("cloudmonitoring2-beta2") .author("Sebastian Thiel ") - .version("1.0.4+20161031") + .version("1.0.4+20170501") .about("Accesses Google Cloud Monitoring data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudmonitoring2_beta2_cli") .arg(Arg::with_name("url") diff --git a/gen/cloudmonitoring2_beta2/Cargo.toml b/gen/cloudmonitoring2_beta2/Cargo.toml index e7b04186d8..2be403eb54 100644 --- a/gen/cloudmonitoring2_beta2/Cargo.toml +++ b/gen/cloudmonitoring2_beta2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-cloudmonitoring2_beta2" -version = "1.0.4+20161031" +version = "1.0.4+20170501" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud Monitoring (protocol v2beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudmonitoring2_beta2" homepage = "https://cloud.google.com/monitoring/v2beta2/" -documentation = "https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031" +documentation = "https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501" license = "MIT" keywords = ["cloudmonitoring", "google", "protocol", "web", "api"] diff --git a/gen/cloudmonitoring2_beta2/README.md b/gen/cloudmonitoring2_beta2/README.md index df172a565c..8e14b5a7d9 100644 --- a/gen/cloudmonitoring2_beta2/README.md +++ b/gen/cloudmonitoring2_beta2/README.md @@ -5,20 +5,20 @@ DO NOT EDIT ! --> The `google-cloudmonitoring2_beta2` library allows access to all features of the *Google Cloud Monitoring* service. -This documentation was generated from *Cloud Monitoring* crate version *1.0.4+20161031*, where *20161031* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Cloud Monitoring* crate version *1.0.4+20170501*, where *20170501* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Cloud Monitoring* *v2_beta2* API can be found at the [official documentation site](https://cloud.google.com/monitoring/v2beta2/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.CloudMonitoring.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.CloudMonitoring.html) ... -* [metric descriptors](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.MetricDescriptor.html) - * [*create*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.MetricDescriptorCreateCall.html), [*delete*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.MetricDescriptorDeleteCall.html) and [*list*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.MetricDescriptorListCall.html) +* [metric descriptors](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.MetricDescriptor.html) + * [*create*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.MetricDescriptorCreateCall.html), [*delete*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.MetricDescriptorDeleteCall.html) and [*list*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.MetricDescriptorListCall.html) * timeseries - * [*list*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.TimeseryListCall.html) and [*write*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.TimeseryWriteCall.html) -* [timeseries descriptors](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.TimeseriesDescriptor.html) - * [*list*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.TimeseriesDescriptorListCall.html) + * [*list*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.TimeseryListCall.html) and [*write*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.TimeseryWriteCall.html) +* [timeseries descriptors](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.TimeseriesDescriptor.html) + * [*list*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.TimeseriesDescriptorListCall.html) @@ -27,17 +27,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/struct.CloudMonitoring.html)** +* **[Hub](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/struct.CloudMonitoring.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.Part.html)** + * **[Parts](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -130,17 +130,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.Delegate.html), 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-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.ResponseResult.html), 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")`. @@ -150,29 +150,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.CallBuilder.html) 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-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.CallBuilder.html), 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-cloudmonitoring2_beta2/1.0.4+20161031/google_cloudmonitoring2_beta2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-cloudmonitoring2_beta2/1.0.4+20170501/google_cloudmonitoring2_beta2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/cloudmonitoring2_beta2/src/lib.rs b/gen/cloudmonitoring2_beta2/src/lib.rs index c94b050188..f36ea64150 100644 --- a/gen/cloudmonitoring2_beta2/src/lib.rs +++ b/gen/cloudmonitoring2_beta2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Cloud Monitoring* crate version *1.0.4+20161031*, where *20161031* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Cloud Monitoring* crate version *1.0.4+20170501*, where *20170501* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Cloud Monitoring* *v2_beta2* API can be found at the //! [official documentation site](https://cloud.google.com/monitoring/v2beta2/). diff --git a/gen/cloudresourcemanager1-cli/Cargo.toml b/gen/cloudresourcemanager1-cli/Cargo.toml index 3444422563..8ac9baea2b 100644 --- a/gen/cloudresourcemanager1-cli/Cargo.toml +++ b/gen/cloudresourcemanager1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudresourcemanager1-cli" -version = "1.0.4+20161212" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud Resource Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-cloudresourcemanager1] path = "../cloudresourcemanager1" -version = "1.0.4+20161212" +version = "1.0.4+20170517" diff --git a/gen/cloudresourcemanager1-cli/README.md b/gen/cloudresourcemanager1-cli/README.md index 30fd9ae61f..51fad1eb04 100644 --- a/gen/cloudresourcemanager1-cli/README.md +++ b/gen/cloudresourcemanager1-cli/README.md @@ -25,26 +25,49 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Cloud Resource Manager* API at revision *20161212*. The CLI is at version *1.0.4*. +This documentation was generated from the *Cloud Resource Manager* API at revision *20170517*. The CLI is at version *1.0.4*. ```bash cloudresourcemanager1 [options] + folders + clear-org-policy (-r )... [-p ]... [-o ] + get-effective-org-policy (-r )... [-p ]... [-o ] + get-org-policy (-r )... [-p ]... [-o ] + list-available-org-policy-constraints (-r )... [-p ]... [-o ] + list-org-policies (-r )... [-p ]... [-o ] + set-org-policy (-r )... [-p ]... [-o ] + liens + create (-r )... [-p ]... [-o ] + delete [-p ]... [-o ] + list [-p ]... [-o ] operations get [-p ]... [-o ] organizations + clear-org-policy (-r )... [-p ]... [-o ] get [-p ]... [-o ] + get-effective-org-policy (-r )... [-p ]... [-o ] get-iam-policy (-r )... [-p ]... [-o ] + get-org-policy (-r )... [-p ]... [-o ] + list-available-org-policy-constraints (-r )... [-p ]... [-o ] + list-org-policies (-r )... [-p ]... [-o ] search (-r )... [-p ]... [-o ] set-iam-policy (-r )... [-p ]... [-o ] + set-org-policy (-r )... [-p ]... [-o ] test-iam-permissions (-r )... [-p ]... [-o ] projects + clear-org-policy (-r )... [-p ]... [-o ] create (-r )... [-p ]... [-o ] delete [-p ]... [-o ] get [-p ]... [-o ] get-ancestry (-r )... [-p ]... [-o ] + get-effective-org-policy (-r )... [-p ]... [-o ] get-iam-policy (-r )... [-p ]... [-o ] + get-org-policy (-r )... [-p ]... [-o ] list [-p ]... [-o ] + list-available-org-policy-constraints (-r )... [-p ]... [-o ] + list-org-policies (-r )... [-p ]... [-o ] set-iam-policy (-r )... [-p ]... [-o ] + set-org-policy (-r )... [-p ]... [-o ] test-iam-permissions (-r )... [-p ]... [-o ] undelete (-r )... [-p ]... [-o ] update (-r )... [-p ]... [-o ] diff --git a/gen/cloudresourcemanager1-cli/mkdocs.yml b/gen/cloudresourcemanager1-cli/mkdocs.yml index dc900568f7..ef07016d04 100644 --- a/gen/cloudresourcemanager1-cli/mkdocs.yml +++ b/gen/cloudresourcemanager1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Cloud Resource Manager v1.0.4+20161212 +site_name: Cloud Resource Manager v1.0.4+20170517 site_url: http://byron.github.io/google-apis-rs/google-cloudresourcemanager1-cli site_description: A complete library to interact with Cloud Resource Manager (protocol v1) @@ -9,19 +9,40 @@ site_dir: build_html pages: - ['index.md', 'Home'] +- ['folders_clear-org-policy.md', 'Folders', 'Clear Org Policy'] +- ['folders_get-effective-org-policy.md', 'Folders', 'Get Effective Org Policy'] +- ['folders_get-org-policy.md', 'Folders', 'Get Org Policy'] +- ['folders_list-available-org-policy-constraints.md', 'Folders', 'List Available Org Policy Constraints'] +- ['folders_list-org-policies.md', 'Folders', 'List Org Policies'] +- ['folders_set-org-policy.md', 'Folders', 'Set Org Policy'] +- ['liens_create.md', 'Liens', 'Create'] +- ['liens_delete.md', 'Liens', 'Delete'] +- ['liens_list.md', 'Liens', 'List'] - ['operations_get.md', 'Operations', 'Get'] +- ['organizations_clear-org-policy.md', 'Organizations', 'Clear Org Policy'] - ['organizations_get.md', 'Organizations', 'Get'] +- ['organizations_get-effective-org-policy.md', 'Organizations', 'Get Effective Org Policy'] - ['organizations_get-iam-policy.md', 'Organizations', 'Get Iam Policy'] +- ['organizations_get-org-policy.md', 'Organizations', 'Get Org Policy'] +- ['organizations_list-available-org-policy-constraints.md', 'Organizations', 'List Available Org Policy Constraints'] +- ['organizations_list-org-policies.md', 'Organizations', 'List Org Policies'] - ['organizations_search.md', 'Organizations', 'Search'] - ['organizations_set-iam-policy.md', 'Organizations', 'Set Iam Policy'] +- ['organizations_set-org-policy.md', 'Organizations', 'Set Org Policy'] - ['organizations_test-iam-permissions.md', 'Organizations', 'Test Iam Permissions'] +- ['projects_clear-org-policy.md', 'Projects', 'Clear Org Policy'] - ['projects_create.md', 'Projects', 'Create'] - ['projects_delete.md', 'Projects', 'Delete'] - ['projects_get.md', 'Projects', 'Get'] - ['projects_get-ancestry.md', 'Projects', 'Get Ancestry'] +- ['projects_get-effective-org-policy.md', 'Projects', 'Get Effective Org Policy'] - ['projects_get-iam-policy.md', 'Projects', 'Get Iam Policy'] +- ['projects_get-org-policy.md', 'Projects', 'Get Org Policy'] - ['projects_list.md', 'Projects', 'List'] +- ['projects_list-available-org-policy-constraints.md', 'Projects', 'List Available Org Policy Constraints'] +- ['projects_list-org-policies.md', 'Projects', 'List Org Policies'] - ['projects_set-iam-policy.md', 'Projects', 'Set Iam Policy'] +- ['projects_set-org-policy.md', 'Projects', 'Set Org Policy'] - ['projects_test-iam-permissions.md', 'Projects', 'Test Iam Permissions'] - ['projects_undelete.md', 'Projects', 'Undelete'] - ['projects_update.md', 'Projects', 'Update'] diff --git a/gen/cloudresourcemanager1-cli/src/main.rs b/gen/cloudresourcemanager1-cli/src/main.rs index c10596e539..f1cdcd44cc 100644 --- a/gen/cloudresourcemanager1-cli/src/main.rs +++ b/gen/cloudresourcemanager1-cli/src/main.rs @@ -46,6 +46,732 @@ struct Engine<'n> { impl<'n> Engine<'n> { + fn _folders_clear_org_policy(&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()[..] { + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "constraint" => Some(("constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["constraint", "etag"]); + 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::ClearOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.folders().clear_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _folders_get_effective_org_policy(&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()[..] { + "constraint" => Some(("constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["constraint"]); + 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::GetEffectiveOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.folders().get_effective_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _folders_get_org_policy(&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()[..] { + "constraint" => Some(("constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["constraint"]); + 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::GetOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.folders().get_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _folders_list_available_org_policy_constraints(&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()[..] { + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["page-size", "page-token"]); + 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::ListAvailableOrgPolicyConstraintsRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.folders().list_available_org_policy_constraints(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _folders_list_org_policies(&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()[..] { + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["page-size", "page-token"]); + 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::ListOrgPoliciesRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.folders().list_org_policies(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _folders_set_org_policy(&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()[..] { + "policy.update-time" => Some(("policy.updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.constraint" => Some(("policy.constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.list-policy.all-values" => Some(("policy.listPolicy.allValues", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.list-policy.denied-values" => Some(("policy.listPolicy.deniedValues", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "policy.list-policy.inherit-from-parent" => Some(("policy.listPolicy.inheritFromParent", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "policy.list-policy.suggested-value" => Some(("policy.listPolicy.suggestedValue", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.list-policy.allowed-values" => Some(("policy.listPolicy.allowedValues", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "policy.boolean-policy.enforced" => Some(("policy.booleanPolicy.enforced", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["all-values", "allowed-values", "boolean-policy", "constraint", "denied-values", "enforced", "etag", "inherit-from-parent", "list-policy", "policy", "suggested-value", "update-time", "version"]); + 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::SetOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.folders().set_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _liens_create(&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()[..] { + "origin" => Some(("origin", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "restrictions" => Some(("restrictions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "parent" => Some(("parent", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "name", "origin", "parent", "reason", "restrictions"]); + 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::Lien = json::value::from_value(object).unwrap(); + let mut call = self.hub.liens().create(request); + 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(), + _ => 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(()) + } + } + } + } + + fn _liens_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.liens().delete(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(), + _ => 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(()) + } + } + } + } + + fn _liens_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.liens().list(); + 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 { + "parent" => { + call = call.parent(value.unwrap_or("")); + }, + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + _ => { + 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-token", "page-size", "parent"].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(), + _ => 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(()) + } + } + } + } + fn _operations_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.operations().get(opt.value_of("name").unwrap_or("")); @@ -98,6 +824,92 @@ impl<'n> Engine<'n> { } } + fn _organizations_clear_org_policy(&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()[..] { + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "constraint" => Some(("constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["constraint", "etag"]); + 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::ClearOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.organizations().clear_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + fn _organizations_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.organizations().get(opt.value_of("name").unwrap_or("")); @@ -150,6 +962,91 @@ impl<'n> Engine<'n> { } } + fn _organizations_get_effective_org_policy(&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()[..] { + "constraint" => Some(("constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["constraint"]); + 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::GetEffectiveOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.organizations().get_effective_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + fn _organizations_get_iam_policy(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -234,6 +1131,263 @@ impl<'n> Engine<'n> { } } + fn _organizations_get_org_policy(&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()[..] { + "constraint" => Some(("constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["constraint"]); + 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::GetOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.organizations().get_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _organizations_list_available_org_policy_constraints(&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()[..] { + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["page-size", "page-token"]); + 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::ListAvailableOrgPolicyConstraintsRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.organizations().list_available_org_policy_constraints(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _organizations_list_org_policies(&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()[..] { + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["page-size", "page-token"]); + 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::ListOrgPoliciesRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.organizations().list_org_policies(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + fn _organizations_search(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -346,8 +1500,9 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "update-mask" => Some(("updateMask", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "version"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "update-mask", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -407,6 +1562,100 @@ impl<'n> Engine<'n> { } } + fn _organizations_set_org_policy(&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()[..] { + "policy.update-time" => Some(("policy.updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.constraint" => Some(("policy.constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.list-policy.all-values" => Some(("policy.listPolicy.allValues", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.list-policy.denied-values" => Some(("policy.listPolicy.deniedValues", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "policy.list-policy.inherit-from-parent" => Some(("policy.listPolicy.inheritFromParent", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "policy.list-policy.suggested-value" => Some(("policy.listPolicy.suggestedValue", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.list-policy.allowed-values" => Some(("policy.listPolicy.allowedValues", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "policy.boolean-policy.enforced" => Some(("policy.booleanPolicy.enforced", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["all-values", "allowed-values", "boolean-policy", "constraint", "denied-values", "enforced", "etag", "inherit-from-parent", "list-policy", "policy", "suggested-value", "update-time", "version"]); + 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::SetOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.organizations().set_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + fn _organizations_test_iam_permissions(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -492,6 +1741,92 @@ impl<'n> Engine<'n> { } } + fn _projects_clear_org_policy(&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()[..] { + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "constraint" => Some(("constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["constraint", "etag"]); + 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::ClearOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().clear_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + fn _projects_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -772,6 +2107,91 @@ impl<'n> Engine<'n> { } } + fn _projects_get_effective_org_policy(&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()[..] { + "constraint" => Some(("constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["constraint"]); + 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::GetEffectiveOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().get_effective_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + fn _projects_get_iam_policy(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -856,6 +2276,91 @@ impl<'n> Engine<'n> { } } + fn _projects_get_org_policy(&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()[..] { + "constraint" => Some(("constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["constraint"]); + 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::GetOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().get_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + fn _projects_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.projects().list(); @@ -918,6 +2423,178 @@ impl<'n> Engine<'n> { } } + fn _projects_list_available_org_policy_constraints(&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()[..] { + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["page-size", "page-token"]); + 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::ListAvailableOrgPolicyConstraintsRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().list_available_org_policy_constraints(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + + fn _projects_list_org_policies(&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()[..] { + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["page-size", "page-token"]); + 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::ListOrgPoliciesRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().list_org_policies(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + fn _projects_set_iam_policy(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -943,8 +2620,9 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "update-mask" => Some(("updateMask", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "version"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "update-mask", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1004,6 +2682,100 @@ impl<'n> Engine<'n> { } } + fn _projects_set_org_policy(&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()[..] { + "policy.update-time" => Some(("policy.updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.constraint" => Some(("policy.constraint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.list-policy.all-values" => Some(("policy.listPolicy.allValues", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.list-policy.denied-values" => Some(("policy.listPolicy.deniedValues", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "policy.list-policy.inherit-from-parent" => Some(("policy.listPolicy.inheritFromParent", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "policy.list-policy.suggested-value" => Some(("policy.listPolicy.suggestedValue", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.list-policy.allowed-values" => Some(("policy.listPolicy.allowedValues", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "policy.boolean-policy.enforced" => Some(("policy.booleanPolicy.enforced", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["all-values", "allowed-values", "boolean-policy", "constraint", "denied-values", "enforced", "etag", "inherit-from-parent", "list-policy", "policy", "suggested-value", "update-time", "version"]); + 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::SetOrgPolicyRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().set_org_policy(request, opt.value_of("resource").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(), + _ => 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(()) + } + } + } + } + fn _projects_test_iam_permissions(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -1270,6 +3042,49 @@ impl<'n> Engine<'n> { let mut call_result: Result<(), DoitError> = Ok(()); let mut err_opt: Option = None; match self.opt.subcommand() { + ("folders", Some(opt)) => { + match opt.subcommand() { + ("clear-org-policy", Some(opt)) => { + call_result = self._folders_clear_org_policy(opt, dry_run, &mut err); + }, + ("get-effective-org-policy", Some(opt)) => { + call_result = self._folders_get_effective_org_policy(opt, dry_run, &mut err); + }, + ("get-org-policy", Some(opt)) => { + call_result = self._folders_get_org_policy(opt, dry_run, &mut err); + }, + ("list-available-org-policy-constraints", Some(opt)) => { + call_result = self._folders_list_available_org_policy_constraints(opt, dry_run, &mut err); + }, + ("list-org-policies", Some(opt)) => { + call_result = self._folders_list_org_policies(opt, dry_run, &mut err); + }, + ("set-org-policy", Some(opt)) => { + call_result = self._folders_set_org_policy(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("folders".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + ("liens", Some(opt)) => { + match opt.subcommand() { + ("create", Some(opt)) => { + call_result = self._liens_create(opt, dry_run, &mut err); + }, + ("delete", Some(opt)) => { + call_result = self._liens_delete(opt, dry_run, &mut err); + }, + ("list", Some(opt)) => { + call_result = self._liens_list(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("liens".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, ("operations", Some(opt)) => { match opt.subcommand() { ("get", Some(opt)) => { @@ -1283,18 +3098,36 @@ impl<'n> Engine<'n> { }, ("organizations", Some(opt)) => { match opt.subcommand() { + ("clear-org-policy", Some(opt)) => { + call_result = self._organizations_clear_org_policy(opt, dry_run, &mut err); + }, ("get", Some(opt)) => { call_result = self._organizations_get(opt, dry_run, &mut err); }, + ("get-effective-org-policy", Some(opt)) => { + call_result = self._organizations_get_effective_org_policy(opt, dry_run, &mut err); + }, ("get-iam-policy", Some(opt)) => { call_result = self._organizations_get_iam_policy(opt, dry_run, &mut err); }, + ("get-org-policy", Some(opt)) => { + call_result = self._organizations_get_org_policy(opt, dry_run, &mut err); + }, + ("list-available-org-policy-constraints", Some(opt)) => { + call_result = self._organizations_list_available_org_policy_constraints(opt, dry_run, &mut err); + }, + ("list-org-policies", Some(opt)) => { + call_result = self._organizations_list_org_policies(opt, dry_run, &mut err); + }, ("search", Some(opt)) => { call_result = self._organizations_search(opt, dry_run, &mut err); }, ("set-iam-policy", Some(opt)) => { call_result = self._organizations_set_iam_policy(opt, dry_run, &mut err); }, + ("set-org-policy", Some(opt)) => { + call_result = self._organizations_set_org_policy(opt, dry_run, &mut err); + }, ("test-iam-permissions", Some(opt)) => { call_result = self._organizations_test_iam_permissions(opt, dry_run, &mut err); }, @@ -1306,6 +3139,9 @@ impl<'n> Engine<'n> { }, ("projects", Some(opt)) => { match opt.subcommand() { + ("clear-org-policy", Some(opt)) => { + call_result = self._projects_clear_org_policy(opt, dry_run, &mut err); + }, ("create", Some(opt)) => { call_result = self._projects_create(opt, dry_run, &mut err); }, @@ -1318,15 +3154,30 @@ impl<'n> Engine<'n> { ("get-ancestry", Some(opt)) => { call_result = self._projects_get_ancestry(opt, dry_run, &mut err); }, + ("get-effective-org-policy", Some(opt)) => { + call_result = self._projects_get_effective_org_policy(opt, dry_run, &mut err); + }, ("get-iam-policy", Some(opt)) => { call_result = self._projects_get_iam_policy(opt, dry_run, &mut err); }, + ("get-org-policy", Some(opt)) => { + call_result = self._projects_get_org_policy(opt, dry_run, &mut err); + }, ("list", Some(opt)) => { call_result = self._projects_list(opt, dry_run, &mut err); }, + ("list-available-org-policy-constraints", Some(opt)) => { + call_result = self._projects_list_available_org_policy_constraints(opt, dry_run, &mut err); + }, + ("list-org-policies", Some(opt)) => { + call_result = self._projects_list_org_policies(opt, dry_run, &mut err); + }, ("set-iam-policy", Some(opt)) => { call_result = self._projects_set_iam_policy(opt, dry_run, &mut err); }, + ("set-org-policy", Some(opt)) => { + call_result = self._projects_set_org_policy(opt, dry_run, &mut err); + }, ("test-iam-permissions", Some(opt)) => { call_result = self._projects_test_iam_permissions(opt, dry_run, &mut err); }, @@ -1428,6 +3279,265 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ + ("folders", "methods: 'clear-org-policy', 'get-effective-org-policy', 'get-org-policy', 'list-available-org-policy-constraints', 'list-org-policies' and 'set-org-policy'", vec![ + ("clear-org-policy", + Some(r##"Clears a `Policy` from a resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/folders_clear-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource for the `Policy` to clear."##), + 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)), + ]), + ("get-effective-org-policy", + Some(r##"Gets the effective `Policy` on a resource. This is the result of merging + `Policies` in the resource hierarchy. The returned `Policy` will not have + an `etag`set because it is a computed `Policy` across multiple resources."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/folders_get-effective-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"The name of the resource to start computing the effective `Policy`."##), + 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)), + ]), + ("get-org-policy", + Some(r##"Gets a `Policy` on a resource. + + If no `Policy` is set on the resource, a `Policy` is returned with default + values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + `etag` value can be used with `SetOrgPolicy()` to create or update a + `Policy` during read-modify-write."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/folders_get-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource the `Policy` is set on."##), + 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)), + ]), + ("list-available-org-policy-constraints", + Some(r##"Lists `Constraints` that could be applied on the specified resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/folders_list-available-org-policy-constraints", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource to list `Constraints` for."##), + 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)), + ]), + ("list-org-policies", + Some(r##"Lists all the `Policies` set for a particular resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/folders_list-org-policies", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource to list Policies for."##), + 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)), + ]), + ("set-org-policy", + Some(r##"Updates the specified `Policy` on the resource. Creates a new `Policy` for + that `Constraint` on the resource if one does not exist. + + Not supplying an `etag` on the request `Policy` results in an unconditional + write of the `Policy`."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/folders_set-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Resource name of the resource to attach the `Policy`."##), + 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)), + ]), + ]), + + ("liens", "methods: 'create', 'delete' and 'list'", vec![ + ("create", + Some(r##"Create a Lien which applies to the resource denoted by the `parent` field. + + Callers of this method will require permission on the `parent` resource. + For example, applying to `projects/1234` requires permission + `resourcemanager.projects.updateLiens`. + + NOTE: Some resources may limit the number of Liens which may be applied."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/liens_create", + vec![ + (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)), + ]), + ("delete", + Some(r##"Delete a Lien by `name`. + + Callers of this method will require permission on the `parent` resource. + For example, a Lien with a `parent` of `projects/1234` requires permission + `resourcemanager.projects.updateLiens`."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/liens_delete", + vec![ + (Some(r##"name"##), + None, + Some(r##"The name/identifier of the Lien to delete."##), + 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)), + ]), + ("list", + Some(r##"List all Liens applied to the `parent` resource. + + Callers of this method will require permission on the `parent` resource. + For example, a Lien with a `parent` of `projects/1234` requires permission + `resourcemanager.projects.get`."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/liens_list", + vec![ + (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)), + ]), + ]), + ("operations", "methods: 'get'", vec![ ("get", Some(r##"Gets the latest state of a long-running operation. Clients can use this @@ -1455,7 +3565,35 @@ fn main() { ]), ]), - ("organizations", "methods: 'get', 'get-iam-policy', 'search', 'set-iam-policy' and 'test-iam-permissions'", vec![ + ("organizations", "methods: 'clear-org-policy', 'get', 'get-effective-org-policy', 'get-iam-policy', 'get-org-policy', 'list-available-org-policy-constraints', 'list-org-policies', 'search', 'set-iam-policy', 'set-org-policy' and 'test-iam-permissions'", vec![ + ("clear-org-policy", + Some(r##"Clears a `Policy` from a resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/organizations_clear-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource for the `Policy` to clear."##), + 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)), + ]), ("get", Some(r##"Fetches an Organization resource identified by the specified resource name."##), "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/organizations_get", @@ -1472,6 +3610,36 @@ fn main() { 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)), + ]), + ("get-effective-org-policy", + Some(r##"Gets the effective `Policy` on a resource. This is the result of merging + `Policies` in the resource hierarchy. The returned `Policy` will not have + an `etag`set because it is a computed `Policy` across multiple resources."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/organizations_get-effective-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"The name of the resource to start computing the effective `Policy`."##), + 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"##), @@ -1487,8 +3655,96 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("get-org-policy", + Some(r##"Gets a `Policy` on a resource. + + If no `Policy` is set on the resource, a `Policy` is returned with default + values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + `etag` value can be used with `SetOrgPolicy()` to create or update a + `Policy` during read-modify-write."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/organizations_get-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource the `Policy` is set on."##), + 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)), + ]), + ("list-available-org-policy-constraints", + Some(r##"Lists `Constraints` that could be applied on the specified resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/organizations_list-available-org-policy-constraints", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource to list `Constraints` for."##), + 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)), + ]), + ("list-org-policies", + Some(r##"Lists all the `Policies` set for a particular resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/organizations_list-org-policies", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource to list Policies for."##), Some(true), Some(false)), @@ -1544,8 +3800,39 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being specified. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("set-org-policy", + Some(r##"Updates the specified `Policy` on the resource. Creates a new `Policy` for + that `Constraint` on the resource if one does not exist. + + Not supplying an `etag` on the request `Policy` results in an unconditional + write of the `Policy`."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/organizations_set-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Resource name of the resource to attach the `Policy`."##), Some(true), Some(false)), @@ -1576,8 +3863,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy detail is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1601,7 +3887,35 @@ fn main() { ]), ]), - ("projects", "methods: 'create', 'delete', 'get', 'get-ancestry', 'get-iam-policy', 'list', 'set-iam-policy', 'test-iam-permissions', 'undelete' and 'update'", vec![ + ("projects", "methods: 'clear-org-policy', 'create', 'delete', 'get', 'get-ancestry', 'get-effective-org-policy', 'get-iam-policy', 'get-org-policy', 'list', 'list-available-org-policy-constraints', 'list-org-policies', 'set-iam-policy', 'set-org-policy', 'test-iam-permissions', 'undelete' and 'update'", vec![ + ("clear-org-policy", + Some(r##"Clears a `Policy` from a resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/projects_clear-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource for the `Policy` to clear."##), + 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)), + ]), ("create", Some(r##"Request that a new Project be created. The result is an Operation which can be used to track the creation process. It is automatically deleted @@ -1732,6 +4046,36 @@ fn main() { 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)), + ]), + ("get-effective-org-policy", + Some(r##"Gets the effective `Policy` on a resource. This is the result of merging + `Policies` in the resource hierarchy. The returned `Policy` will not have + an `etag`set because it is a computed `Policy` across multiple resources."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/projects_get-effective-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"The name of the resource to start computing the effective `Policy`."##), + 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"##), @@ -1746,8 +4090,40 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("get-org-policy", + Some(r##"Gets a `Policy` on a resource. + + If no `Policy` is set on the resource, a `Policy` is returned with default + values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + `etag` value can be used with `SetOrgPolicy()` to create or update a + `Policy` during read-modify-write."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/projects_get-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource the `Policy` is set on."##), Some(true), Some(false)), @@ -1781,6 +4157,62 @@ fn main() { 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)), + ]), + ("list-available-org-policy-constraints", + Some(r##"Lists `Constraints` that could be applied on the specified resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/projects_list-available-org-policy-constraints", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource to list `Constraints` for."##), + 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)), + ]), + ("list-org-policies", + Some(r##"Lists all the `Policies` set for a particular resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/projects_list-org-policies", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Name of the resource to list Policies for."##), + 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"##), @@ -1815,7 +4247,7 @@ fn main() { + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to - to remove the last ToS-accepted owner from the policy will fail. This + remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. @@ -1831,8 +4263,39 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being specified. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), + 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)), + ]), + ("set-org-policy", + Some(r##"Updates the specified `Policy` on the resource. Creates a new `Policy` for + that `Constraint` on the resource if one does not exist. + + Not supplying an `etag` on the request `Policy` results in an unconditional + write of the `Policy`."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli/projects_set-org-policy", + vec![ + (Some(r##"resource"##), + None, + Some(r##"Resource name of the resource to attach the `Policy`."##), Some(true), Some(false)), @@ -1861,8 +4324,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy detail is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1959,7 +4421,7 @@ fn main() { let mut app = App::new("cloudresourcemanager1") .author("Sebastian Thiel ") - .version("1.0.4+20161212") + .version("1.0.4+20170517") .about("The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli") .arg(Arg::with_name("url") diff --git a/gen/cloudresourcemanager1/Cargo.toml b/gen/cloudresourcemanager1/Cargo.toml index 07cb8e0f3f..9de26194b2 100644 --- a/gen/cloudresourcemanager1/Cargo.toml +++ b/gen/cloudresourcemanager1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-cloudresourcemanager1" -version = "1.0.4+20161212" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud Resource Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1" homepage = "https://cloud.google.com/resource-manager" -documentation = "https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212" +documentation = "https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517" license = "MIT" keywords = ["cloudresourcemanager", "google", "protocol", "web", "api"] diff --git a/gen/cloudresourcemanager1/README.md b/gen/cloudresourcemanager1/README.md index cb00cd3746..8c886e5422 100644 --- a/gen/cloudresourcemanager1/README.md +++ b/gen/cloudresourcemanager1/README.md @@ -5,20 +5,24 @@ DO NOT EDIT ! --> The `google-cloudresourcemanager1` library allows access to all features of the *Google Cloud Resource Manager* service. -This documentation was generated from *Cloud Resource Manager* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *cloudresourcemanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Cloud Resource Manager* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *cloudresourcemanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Cloud Resource Manager* *v1* API can be found at the [official documentation site](https://cloud.google.com/resource-manager). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.CloudResourceManager.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.CloudResourceManager.html) ... -* [operations](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.Operation.html) - * [*get*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.OperationGetCall.html) -* [organizations](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.Organization.html) - * [*get*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.OrganizationGetCall.html), [*get iam policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.OrganizationGetIamPolicyCall.html), [*search*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.OrganizationSearchCall.html), [*set iam policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.OrganizationSetIamPolicyCall.html) and [*test iam permissions*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.OrganizationTestIamPermissionCall.html) -* [projects](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.Project.html) - * [*create*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectCreateCall.html), [*delete*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectDeleteCall.html), [*get*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectGetCall.html), [*get ancestry*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectGetAncestryCall.html), [*get iam policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectGetIamPolicyCall.html), [*list*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectListCall.html), [*set iam policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectSetIamPolicyCall.html), [*test iam permissions*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectTestIamPermissionCall.html), [*undelete*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectUndeleteCall.html) and [*update*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.ProjectUpdateCall.html) +* folders + * [*clear org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.FolderClearOrgPolicyCall.html), [*get effective org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.FolderGetEffectiveOrgPolicyCall.html), [*get org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.FolderGetOrgPolicyCall.html), [*list available org policy constraints*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.FolderListAvailableOrgPolicyConstraintCall.html), [*list org policies*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.FolderListOrgPolicyCall.html) and [*set org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.FolderSetOrgPolicyCall.html) +* [liens](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.Lien.html) + * [*create*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.LienCreateCall.html), [*delete*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.LienDeleteCall.html) and [*list*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.LienListCall.html) +* [operations](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.Operation.html) + * [*get*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OperationGetCall.html) +* [organizations](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.Organization.html) + * [*clear org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationClearOrgPolicyCall.html), [*get*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationGetCall.html), [*get effective org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationGetEffectiveOrgPolicyCall.html), [*get iam policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationGetIamPolicyCall.html), [*get org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationGetOrgPolicyCall.html), [*list available org policy constraints*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationListAvailableOrgPolicyConstraintCall.html), [*list org policies*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationListOrgPolicyCall.html), [*search*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationSearchCall.html), [*set iam policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationSetIamPolicyCall.html), [*set org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationSetOrgPolicyCall.html) and [*test iam permissions*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.OrganizationTestIamPermissionCall.html) +* [projects](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.Project.html) + * [*clear org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectClearOrgPolicyCall.html), [*create*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectCreateCall.html), [*delete*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectDeleteCall.html), [*get*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectGetCall.html), [*get ancestry*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectGetAncestryCall.html), [*get effective org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectGetEffectiveOrgPolicyCall.html), [*get iam policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectGetIamPolicyCall.html), [*get org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectGetOrgPolicyCall.html), [*list*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectListCall.html), [*list available org policy constraints*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectListAvailableOrgPolicyConstraintCall.html), [*list org policies*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectListOrgPolicyCall.html), [*set iam policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectSetIamPolicyCall.html), [*set org policy*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectSetOrgPolicyCall.html), [*test iam permissions*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectTestIamPermissionCall.html), [*undelete*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectUndeleteCall.html) and [*update*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.ProjectUpdateCall.html) @@ -27,17 +31,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/struct.CloudResourceManager.html)** +* **[Hub](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/struct.CloudResourceManager.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.Part.html)** + * **[Parts](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -53,14 +57,20 @@ Or specifically ... ```ignore let r = hub.projects().test_iam_permissions(...).doit() let r = hub.projects().undelete(...).doit() -let r = hub.projects().set_iam_policy(...).doit() +let r = hub.projects().list_org_policies(...).doit() +let r = hub.projects().get_effective_org_policy(...).doit() let r = hub.projects().get(...).doit() let r = hub.projects().get_ancestry(...).doit() let r = hub.projects().update(...).doit() let r = hub.projects().get_iam_policy(...).doit() let r = hub.projects().delete(...).doit() -let r = hub.projects().create(...).doit() let r = hub.projects().list(...).doit() +let r = hub.projects().create(...).doit() +let r = hub.projects().set_iam_policy(...).doit() +let r = hub.projects().get_org_policy(...).doit() +let r = hub.projects().set_org_policy(...).doit() +let r = hub.projects().list_available_org_policy_constraints(...).doit() +let r = hub.projects().clear_org_policy(...).doit() ``` The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -131,17 +141,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.Delegate.html), 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-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.ResponseResult.html), 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")`. @@ -151,29 +161,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.CallBuilder.html) 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-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.CallBuilder.html), 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-cloudresourcemanager1/1.0.4+20161212/google_cloudresourcemanager1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-cloudresourcemanager1/1.0.4+20170517/google_cloudresourcemanager1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/cloudresourcemanager1/src/lib.rs b/gen/cloudresourcemanager1/src/lib.rs index a2ff0319f2..14aac2daf2 100644 --- a/gen/cloudresourcemanager1/src/lib.rs +++ b/gen/cloudresourcemanager1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Cloud Resource Manager* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *cloudresourcemanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Cloud Resource Manager* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *cloudresourcemanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Cloud Resource Manager* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/resource-manager). @@ -11,12 +11,16 @@ //! //! Handle the following *Resources* with ease from the central [hub](struct.CloudResourceManager.html) ... //! +//! * folders +//! * [*clear org policy*](struct.FolderClearOrgPolicyCall.html), [*get effective org policy*](struct.FolderGetEffectiveOrgPolicyCall.html), [*get org policy*](struct.FolderGetOrgPolicyCall.html), [*list available org policy constraints*](struct.FolderListAvailableOrgPolicyConstraintCall.html), [*list org policies*](struct.FolderListOrgPolicyCall.html) and [*set org policy*](struct.FolderSetOrgPolicyCall.html) +//! * [liens](struct.Lien.html) +//! * [*create*](struct.LienCreateCall.html), [*delete*](struct.LienDeleteCall.html) and [*list*](struct.LienListCall.html) //! * [operations](struct.Operation.html) //! * [*get*](struct.OperationGetCall.html) //! * [organizations](struct.Organization.html) -//! * [*get*](struct.OrganizationGetCall.html), [*get iam policy*](struct.OrganizationGetIamPolicyCall.html), [*search*](struct.OrganizationSearchCall.html), [*set iam policy*](struct.OrganizationSetIamPolicyCall.html) and [*test iam permissions*](struct.OrganizationTestIamPermissionCall.html) +//! * [*clear org policy*](struct.OrganizationClearOrgPolicyCall.html), [*get*](struct.OrganizationGetCall.html), [*get effective org policy*](struct.OrganizationGetEffectiveOrgPolicyCall.html), [*get iam policy*](struct.OrganizationGetIamPolicyCall.html), [*get org policy*](struct.OrganizationGetOrgPolicyCall.html), [*list available org policy constraints*](struct.OrganizationListAvailableOrgPolicyConstraintCall.html), [*list org policies*](struct.OrganizationListOrgPolicyCall.html), [*search*](struct.OrganizationSearchCall.html), [*set iam policy*](struct.OrganizationSetIamPolicyCall.html), [*set org policy*](struct.OrganizationSetOrgPolicyCall.html) and [*test iam permissions*](struct.OrganizationTestIamPermissionCall.html) //! * [projects](struct.Project.html) -//! * [*create*](struct.ProjectCreateCall.html), [*delete*](struct.ProjectDeleteCall.html), [*get*](struct.ProjectGetCall.html), [*get ancestry*](struct.ProjectGetAncestryCall.html), [*get iam policy*](struct.ProjectGetIamPolicyCall.html), [*list*](struct.ProjectListCall.html), [*set iam policy*](struct.ProjectSetIamPolicyCall.html), [*test iam permissions*](struct.ProjectTestIamPermissionCall.html), [*undelete*](struct.ProjectUndeleteCall.html) and [*update*](struct.ProjectUpdateCall.html) +//! * [*clear org policy*](struct.ProjectClearOrgPolicyCall.html), [*create*](struct.ProjectCreateCall.html), [*delete*](struct.ProjectDeleteCall.html), [*get*](struct.ProjectGetCall.html), [*get ancestry*](struct.ProjectGetAncestryCall.html), [*get effective org policy*](struct.ProjectGetEffectiveOrgPolicyCall.html), [*get iam policy*](struct.ProjectGetIamPolicyCall.html), [*get org policy*](struct.ProjectGetOrgPolicyCall.html), [*list*](struct.ProjectListCall.html), [*list available org policy constraints*](struct.ProjectListAvailableOrgPolicyConstraintCall.html), [*list org policies*](struct.ProjectListOrgPolicyCall.html), [*set iam policy*](struct.ProjectSetIamPolicyCall.html), [*set org policy*](struct.ProjectSetOrgPolicyCall.html), [*test iam permissions*](struct.ProjectTestIamPermissionCall.html), [*undelete*](struct.ProjectUndeleteCall.html) and [*update*](struct.ProjectUpdateCall.html) //! //! //! @@ -53,14 +57,20 @@ //! ```ignore //! let r = hub.projects().test_iam_permissions(...).doit() //! let r = hub.projects().undelete(...).doit() -//! let r = hub.projects().set_iam_policy(...).doit() +//! let r = hub.projects().list_org_policies(...).doit() +//! let r = hub.projects().get_effective_org_policy(...).doit() //! let r = hub.projects().get(...).doit() //! let r = hub.projects().get_ancestry(...).doit() //! let r = hub.projects().update(...).doit() //! let r = hub.projects().get_iam_policy(...).doit() //! let r = hub.projects().delete(...).doit() -//! let r = hub.projects().create(...).doit() //! let r = hub.projects().list(...).doit() +//! let r = hub.projects().create(...).doit() +//! let r = hub.projects().set_iam_policy(...).doit() +//! let r = hub.projects().get_org_policy(...).doit() +//! let r = hub.projects().set_org_policy(...).doit() +//! let r = hub.projects().list_available_org_policy_constraints(...).doit() +//! let r = hub.projects().clear_org_policy(...).doit() //! ``` //! //! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -333,6 +343,12 @@ impl<'a, C, A> CloudResourceManager } } + pub fn folders(&'a self) -> FolderMethods<'a, C, A> { + FolderMethods { hub: &self } + } + pub fn liens(&'a self) -> LienMethods<'a, C, A> { + LienMethods { hub: &self } + } pub fn operations(&'a self) -> OperationMethods<'a, C, A> { OperationMethods { hub: &self } } @@ -358,60 +374,6 @@ impl<'a, C, A> CloudResourceManager // ############ // SCHEMAS ### // ########## -/// The request sent to the UndeleteProject -/// method. -/// -/// # 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*). -/// -/// * [undelete projects](struct.ProjectUndeleteCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UndeleteProjectRequest { _never_set: Option } - -impl RequestValue for UndeleteProjectRequest {} - - -/// Request message for `GetIamPolicy` method. -/// -/// # 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*). -/// -/// * [get iam policy projects](struct.ProjectGetIamPolicyCall.html) (request) -/// * [get iam policy organizations](struct.OrganizationGetIamPolicyCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GetIamPolicyRequest { _never_set: Option } - -impl RequestValue for GetIamPolicyRequest {} - - -/// Request message for `TestIamPermissions` method. -/// -/// # 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*). -/// -/// * [test iam permissions organizations](struct.OrganizationTestIamPermissionCall.html) (request) -/// * [test iam permissions projects](struct.ProjectTestIamPermissionCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct TestIamPermissionsRequest { - /// The set of permissions to check for the `resource`. Permissions with - /// wildcards (such as '*' or 'storage.*') are not allowed. For more - /// information see - /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - pub permissions: Option>, -} - -impl RequestValue for TestIamPermissionsRequest {} - - /// The response returned from the `SearchOrganizations` method. /// /// # Activities @@ -455,137 +417,77 @@ pub struct SetIamPolicyRequest { /// valid policy but certain Cloud Platform services (such as Projects) /// might reject them. pub policy: Option, + /// OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + /// the fields in the mask will be modified. If no mask is provided, the + /// following default mask is used: + /// paths: "bindings, etag" + /// This field is only used by Cloud IAM. + #[serde(rename="updateMask")] + pub update_mask: Option, } impl RequestValue for SetIamPolicyRequest {} -/// Response from the GetAncestry method. +/// Associates `members` with a `role`. /// -/// # 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*). -/// -/// * [get ancestry projects](struct.ProjectGetAncestryCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GetAncestryResponse { - /// Ancestors are ordered from bottom to top of the resource hierarchy. The - /// first ancestor is the project itself, followed by the project's parent, - /// etc. - pub ancestor: Option>, +pub struct Binding { + /// Role that is assigned to `members`. + /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + /// Required + pub role: Option, + /// Specifies the identities requesting access for a Cloud Platform resource. + /// `members` can have the following values: + /// + /// * `allUsers`: A special identifier that represents anyone who is + /// on the internet; with or without a Google account. + /// + /// * `allAuthenticatedUsers`: A special identifier that represents anyone + /// who is authenticated with a Google account or a service account. + /// + /// * `user:{emailid}`: An email address that represents a specific Google + /// account. For example, `alice@gmail.com` or `joe@example.com`. + /// + /// + /// * `serviceAccount:{emailid}`: An email address that represents a service + /// account. For example, `my-other-app@appspot.gserviceaccount.com`. + /// + /// * `group:{emailid}`: An email address that represents a Google group. + /// For example, `admins@example.com`. + /// + /// + /// * `domain:{domain}`: A Google Apps domain name that represents all the + /// users of that domain. For example, `google.com` or `example.com`. + /// + /// + pub members: Option>, } -impl ResponseResult for GetAncestryResponse {} +impl Part for Binding {} -/// A Project is a high-level Google Cloud Platform entity. It is a -/// container for ACLs, APIs, AppEngine Apps, VMs, and other -/// Google Cloud Platform resources. +/// Ignores policies set above this resource and restores the +/// `constraint_default` enforcement behavior of the specific `Constraint` at +/// this resource. /// -/// # Activities +/// Suppose that `constraint_default` is set to `ALLOW` for the +/// `Constraint` `constraints/serviceuser.services`. Suppose that organization +/// foo.com sets a `Policy` at their Organization resource node that restricts +/// the allowed service activations to deny all service activations. They +/// could then set a `Policy` with the `policy_type` `restore_default` on +/// several experimental projects, restoring the `constraint_default` +/// enforcement of the `Constraint` for only those projects, allowing those +/// projects to have all services activated. /// -/// 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*). -/// -/// * [test iam permissions projects](struct.ProjectTestIamPermissionCall.html) (none) -/// * [undelete projects](struct.ProjectUndeleteCall.html) (none) -/// * [set iam policy projects](struct.ProjectSetIamPolicyCall.html) (none) -/// * [get projects](struct.ProjectGetCall.html) (response) -/// * [get ancestry projects](struct.ProjectGetAncestryCall.html) (none) -/// * [update projects](struct.ProjectUpdateCall.html) (request|response) -/// * [get iam policy projects](struct.ProjectGetIamPolicyCall.html) (none) -/// * [delete projects](struct.ProjectDeleteCall.html) (none) -/// * [create projects](struct.ProjectCreateCall.html) (request) -/// * [list projects](struct.ProjectListCall.html) (none) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Project { - /// The user-assigned display name of the Project. - /// It must be 4 to 30 characters. - /// Allowed characters are: lowercase and uppercase letters, numbers, - /// hyphen, single-quote, double-quote, space, and exclamation point. - /// - /// Example: My Project - /// - /// Read-write. - pub name: Option, - /// An optional reference to a parent Resource. - /// - /// The only supported parent type is "organization". Once set, the parent - /// cannot be modified. The `parent` can be set on creation or using the - /// `UpdateProject` method; the end user must have the - /// `resourcemanager.projects.create` permission on the parent. - /// - /// Read-write. - pub parent: Option, - /// The unique, user-assigned ID of the Project. - /// It must be 6 to 30 lowercase letters, digits, or hyphens. - /// It must start with a letter. - /// Trailing hyphens are prohibited. - /// - /// Example: tokyo-rain-123 - /// - /// Read-only after creation. - #[serde(rename="projectId")] - pub project_id: Option, - /// The labels associated with this Project. - /// - /// Label keys must be between 1 and 63 characters long and must conform - /// to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. - /// - /// Label values must be between 0 and 63 characters long and must conform - /// to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - /// - /// No more than 256 labels can be associated with a given resource. - /// - /// Clients should store labels in a representation such as JSON that does not - /// depend on specific characters being disallowed. - /// - /// Example: "environment" : "dev" - /// - /// Read-write. - pub labels: Option>, - /// Creation time. - /// - /// Read-only. - #[serde(rename="createTime")] - pub create_time: Option, - /// The number uniquely identifying the project. - /// - /// Example: 415104041262 - /// - /// Read-only. - #[serde(rename="projectNumber")] - pub project_number: Option, - /// The Project lifecycle state. - /// - /// Read-only. - #[serde(rename="lifecycleState")] - pub lifecycle_state: Option, -} +pub struct RestoreDefault { _never_set: Option } -impl RequestValue for Project {} -impl Resource for Project {} -impl ResponseResult for Project {} - - -/// The request sent to the -/// GetAncestry -/// method. -/// -/// # 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*). -/// -/// * [get ancestry projects](struct.ProjectGetAncestryCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GetAncestryRequest { _never_set: Option } - -impl RequestValue for GetAncestryRequest {} +impl Part for RestoreDefault {} /// Defines an Identity and Access Management (IAM) policy. It is used to @@ -647,6 +549,9 @@ pub struct Policy { /// If no `etag` is provided in the call to `setIamPolicy`, then the existing /// policy is overwritten blindly. pub etag: Option, + /// Specifies cloud audit logging configuration for this policy. + #[serde(rename="auditConfigs")] + pub audit_configs: Option>, /// Version of the `Policy`. The default version is 0. pub version: Option, } @@ -654,50 +559,6 @@ pub struct Policy { impl ResponseResult for Policy {} -/// The root node in the resource hierarchy to which a particular entity's -/// (e.g., company) resources belong. -/// -/// # 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*). -/// -/// * [test iam permissions organizations](struct.OrganizationTestIamPermissionCall.html) (none) -/// * [search organizations](struct.OrganizationSearchCall.html) (none) -/// * [set iam policy organizations](struct.OrganizationSetIamPolicyCall.html) (none) -/// * [get organizations](struct.OrganizationGetCall.html) (response) -/// * [get iam policy organizations](struct.OrganizationGetIamPolicyCall.html) (none) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Organization { - /// The owner of this Organization. The owner should be specified on - /// creation. Once set, it cannot be changed. - /// This field is required. - pub owner: Option, - /// A friendly string to be used to refer to the Organization in the UI. - /// Assigned by the server, set to the firm name of the Google For Work - /// customer that owns this organization. - /// @OutputOnly - #[serde(rename="displayName")] - pub display_name: Option, - /// Timestamp when the Organization was created. Assigned by the server. - /// @OutputOnly - #[serde(rename="creationTime")] - pub creation_time: Option, - /// The organization's current lifecycle state. Assigned by the server. - /// @OutputOnly - #[serde(rename="lifecycleState")] - pub lifecycle_state: Option, - /// Output Only. The resource name of the organization. This is the - /// organization's relative path in the API. Its format is - /// "organizations/[organization_id]". For example, "organizations/1234". - pub name: Option, -} - -impl Resource for Organization {} -impl ResponseResult for Organization {} - - /// Identifying information for a single ancestor of a project. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -727,8 +588,12 @@ impl Part for Ancestor {} /// 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*). /// -/// * [delete projects](struct.ProjectDeleteCall.html) (response) +/// * [clear org policy folders](struct.FolderClearOrgPolicyCall.html) (response) /// * [undelete projects](struct.ProjectUndeleteCall.html) (response) +/// * [delete projects](struct.ProjectDeleteCall.html) (response) +/// * [delete liens](struct.LienDeleteCall.html) (response) +/// * [clear org policy organizations](struct.OrganizationClearOrgPolicyCall.html) (response) +/// * [clear org policy projects](struct.ProjectClearOrgPolicyCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Empty { _never_set: Option } @@ -753,7 +618,7 @@ impl ResponseResult for Empty {} /// error message is needed, put the localized message in the error details or /// localize it in the client. The optional error details may contain arbitrary /// information about the error. There is a predefined set of error detail types -/// in the package `google.rpc` which can be used for common error conditions. +/// in the package `google.rpc` that can be used for common error conditions. /// /// # Language mapping /// @@ -776,7 +641,7 @@ impl ResponseResult for Empty {} /// errors. /// /// - Workflow errors. A typical workflow has multiple steps. Each step may -/// have a `Status` message for error reporting purpose. +/// have a `Status` message for error reporting. /// /// - Batch operations. If a client uses batch request and batch response, the /// `Status` message should be used directly inside batch response, one for @@ -865,9 +730,57 @@ pub struct ListProjectsResponse { impl ResponseResult for ListProjectsResponse {} +/// The response returned from the ListAvailableOrgPolicyConstraints method. +/// Returns all `Constraints` that could be set at this level of the hierarchy +/// (contrast with the response from `ListPolicies`, which returns all policies +/// which are set). +/// +/// # 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*). +/// +/// * [list available org policy constraints folders](struct.FolderListAvailableOrgPolicyConstraintCall.html) (response) +/// * [list available org policy constraints projects](struct.ProjectListAvailableOrgPolicyConstraintCall.html) (response) +/// * [list available org policy constraints organizations](struct.OrganizationListAvailableOrgPolicyConstraintCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListAvailableOrgPolicyConstraintsResponse { + /// Page token used to retrieve the next page. This is currently not used. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The collection of constraints that are settable on the request resource. + pub constraints: Option>, +} + +impl ResponseResult for ListAvailableOrgPolicyConstraintsResponse {} + + +/// The response message for Liens.ListLiens. +/// +/// # 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*). +/// +/// * [list liens](struct.LienListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListLiensResponse { + /// Token to retrieve the next page of results, or empty if there are no more + /// results in the list. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// A list of Liens. + pub liens: Option>, +} + +impl ResponseResult for ListLiensResponse {} + + /// A container to reference an id for any resource type. A `resource` in Google /// Cloud Platform is a generic term for something you (a developer) may want to -/// interact with through one of our API's. Some examples are an AppEngine app, +/// interact with through one of our API's. Some examples are an App Engine app, /// a Compute Engine instance, a Cloud SQL database, and so on. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -875,7 +788,7 @@ impl ResponseResult for ListProjectsResponse {} #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResourceId { /// Required field representing the resource type this id is for. - /// At present, the only valid type is "organization". + /// At present, the valid types are: "organization" #[serde(rename="type")] pub type_: Option, /// Required field for the type-specific id. This should correspond to the id @@ -886,43 +799,835 @@ pub struct ResourceId { impl Part for ResourceId {} -/// Associates `members` with a `role`. +/// Used in `policy_type` to specify how `list_policy` behaves at this +/// resource. +/// +/// A `ListPolicy` can define specific values that are allowed or denied by +/// setting either the `allowed_values` or `denied_values` fields. It can also +/// be used to allow or deny all values, by setting the `all_values` field. If +/// `all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values` +/// or `denied_values` must be set (attempting to set both or neither will +/// result in a failed request). If `all_values` is set to either `ALLOW` or +/// `DENY`, `allowed_values` and `denied_values` must be unset. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Binding { - /// Role that is assigned to `members`. - /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - /// Required - pub role: Option, - /// Specifies the identities requesting access for a Cloud Platform resource. - /// `members` can have the following values: +pub struct ListPolicy { + /// The policy all_values state. + #[serde(rename="allValues")] + pub all_values: Option, + /// List of values allowed at this resource. an only be set if no values are + /// set for `denied_values` and `all_values` is set to + /// `ALL_VALUES_UNSPECIFIED`. + #[serde(rename="allowedValues")] + pub allowed_values: Option>, + /// Determines the inheritance behavior for this `Policy`. /// - /// * `allUsers`: A special identifier that represents anyone who is - /// on the internet; with or without a Google account. + /// By default, a `ListPolicy` set at a resource supercedes any `Policy` set + /// anywhere up the resource hierarchy. However, if `inherit_from_parent` is + /// set to `true`, then the values from the effective `Policy` of the parent + /// resource are inherited, meaning the values set in this `Policy` are + /// added to the values inherited up the hierarchy. /// - /// * `allAuthenticatedUsers`: A special identifier that represents anyone - /// who is authenticated with a Google account or a service account. + /// Setting `Policy` hierarchies that inherit both allowed values and denied + /// values isn't recommended in most circumstances to keep the configuration + /// simple and understandable. However, it is possible to set a `Policy` with + /// `allowed_values` set that inherits a `Policy` with `denied_values` set. + /// In this case, the values that are allowed must be in `allowed_values` and + /// not present in `denied_values`. /// - /// * `user:{emailid}`: An email address that represents a specific Google - /// account. For example, `alice@gmail.com` or `joe@example.com`. + /// For example, suppose you have a `Constraint` + /// `constraints/serviceuser.services`, which has a `constraint_type` of + /// `list_constraint`, and with `constraint_default` set to `ALLOW`. + /// Suppose that at the Organization level, a `Policy` is applied that + /// restricts the allowed API activations to {`E1`, `E2`}. Then, if a + /// `Policy` is applied to a project below the Organization that has + /// `inherit_from_parent` set to `false` and field all_values set to DENY, + /// then an attempt to activate any API will be denied. /// + /// The following examples demonstrate different possible layerings: /// - /// * `serviceAccount:{emailid}`: An email address that represents a service - /// account. For example, `my-other-app@appspot.gserviceaccount.com`. + /// Example 1 (no inherited values): + /// `organizations/foo` has a `Policy` with values: + /// {allowed_values: “E1” allowed_values:”E2”} + /// ``projects/bar`` has `inherit_from_parent` `false` and values: + /// {allowed_values: "E3" allowed_values: "E4"} + /// The accepted values at `organizations/foo` are `E1`, `E2`. + /// The accepted values at `projects/bar` are `E3`, and `E4`. /// - /// * `group:{emailid}`: An email address that represents a Google group. - /// For example, `admins@example.com`. + /// Example 2 (inherited values): + /// `organizations/foo` has a `Policy` with values: + /// {allowed_values: “E1” allowed_values:”E2”} + /// `projects/bar` has a `Policy` with values: + /// {value: “E3” value: ”E4” inherit_from_parent: true} + /// The accepted values at `organizations/foo` are `E1`, `E2`. + /// The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. /// - /// * `domain:{domain}`: A Google Apps domain name that represents all the - /// users of that domain. For example, `google.com` or `example.com`. + /// Example 3 (inheriting both allowed and denied values): + /// `organizations/foo` has a `Policy` with values: + /// {allowed_values: "E1" allowed_values: "E2"} + /// `projects/bar` has a `Policy` with: + /// {denied_values: "E1"} + /// The accepted values at `organizations/foo` are `E1`, `E2`. + /// The value accepted at `projects/bar` is `E2`. /// + /// Example 4 (RestoreDefault): + /// `organizations/foo` has a `Policy` with values: + /// {allowed_values: “E1” allowed_values:”E2”} + /// `projects/bar` has a `Policy` with values: + /// {RestoreDefault: {}} + /// The accepted values at `organizations/foo` are `E1`, `E2`. + /// The accepted values at `projects/bar` are either all or none depending on + /// the value of `constraint_default` (if `ALLOW`, all; if + /// `DENY`, none). /// - pub members: Option>, + /// Example 5 (no policy inherits parent policy): + /// `organizations/foo` has no `Policy` set. + /// `projects/bar` has no `Policy` set. + /// The accepted values at both levels are either all or none depending on + /// the value of `constraint_default` (if `ALLOW`, all; if + /// `DENY`, none). + /// + /// Example 6 (ListConstraint allowing all): + /// `organizations/foo` has a `Policy` with values: + /// {allowed_values: “E1” allowed_values: ”E2”} + /// `projects/bar` has a `Policy` with: + /// {all: ALLOW} + /// The accepted values at `organizations/foo` are `E1`, E2`. + /// Any value is accepted at `projects/bar`. + /// + /// Example 7 (ListConstraint allowing none): + /// `organizations/foo` has a `Policy` with values: + /// {allowed_values: “E1” allowed_values: ”E2”} + /// `projects/bar` has a `Policy` with: + /// {all: DENY} + /// The accepted values at `organizations/foo` are `E1`, E2`. + /// No value is accepted at `projects/bar`. + #[serde(rename="inheritFromParent")] + pub inherit_from_parent: Option, + /// Optional. The Google Cloud Console will try to default to a configuration + /// that matches the value specified in this `Policy`. If `suggested_value` + /// is not set, it will inherit the value specified higher in the hierarchy, + /// unless `inherit_from_parent` is `false`. + #[serde(rename="suggestedValue")] + pub suggested_value: Option, + /// List of values denied at this resource. Can only be set if no values are + /// set for `allowed_values` and `all_values` is set to + /// `ALL_VALUES_UNSPECIFIED`. + #[serde(rename="deniedValues")] + pub denied_values: Option>, } -impl Part for Binding {} +impl Part for ListPolicy {} + + +/// Used in `policy_type` to specify how `boolean_policy` will behave at this +/// resource. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BooleanPolicy { + /// If `true`, then the `Policy` is enforced. If `false`, then any + /// configuration is acceptable. + /// + /// Suppose you have a `Constraint` `constraints/compute.disableSerialPortAccess` + /// with `constraint_default` set to `ALLOW`. A `Policy` for that + /// `Constraint` exhibits the following behavior: + /// - If the `Policy` at this resource has enforced set to `false`, serial + /// port connection attempts will be allowed. + /// - If the `Policy` at this resource has enforced set to `true`, serial + /// port connection attempts will be refused. + /// - If the `Policy` at this resource is `RestoreDefault`, serial port + /// connection attempts will be allowed. + /// - If no `Policy` is set at this resource or anywhere higher in the + /// resource hierarchy, serial port connection attempts will be allowed. + /// - If no `Policy` is set at this resource, but one exists higher in the + /// resource hierarchy, the behavior is as if the`Policy` were set at + /// this resource. + /// + /// The following examples demonstrate the different possible layerings: + /// + /// Example 1 (nearest `Constraint` wins): + /// `organizations/foo` has a `Policy` with: + /// {enforced: false} + /// `projects/bar` has no `Policy` set. + /// The constraint at `projects/bar` and `organizations/foo` will not be + /// enforced. + /// + /// Example 2 (enforcement gets replaced): + /// `organizations/foo` has a `Policy` with: + /// {enforced: false} + /// `projects/bar` has a `Policy` with: + /// {enforced: true} + /// The constraint at `organizations/foo` is not enforced. + /// The constraint at `projects/bar` is enforced. + /// + /// Example 3 (RestoreDefault): + /// `organizations/foo` has a `Policy` with: + /// {enforced: true} + /// `projects/bar` has a `Policy` with: + /// {RestoreDefault: {}} + /// The constraint at `organizations/foo` is enforced. + /// The constraint at `projects/bar` is not enforced, because + /// `constraint_default` for the `Constraint` is `ALLOW`. + pub enforced: Option, +} + +impl Part for BooleanPolicy {} + + +/// Defines a Cloud Organization `Policy` which is used to specify `Constraints` +/// for configurations of Cloud Platform resources. +/// +/// # 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*). +/// +/// * [set org policy folders](struct.FolderSetOrgPolicyCall.html) (response) +/// * [get org policy organizations](struct.OrganizationGetOrgPolicyCall.html) (response) +/// * [get effective org policy projects](struct.ProjectGetEffectiveOrgPolicyCall.html) (response) +/// * [set org policy organizations](struct.OrganizationSetOrgPolicyCall.html) (response) +/// * [get effective org policy folders](struct.FolderGetEffectiveOrgPolicyCall.html) (response) +/// * [get org policy folders](struct.FolderGetOrgPolicyCall.html) (response) +/// * [get effective org policy organizations](struct.OrganizationGetEffectiveOrgPolicyCall.html) (response) +/// * [get org policy projects](struct.ProjectGetOrgPolicyCall.html) (response) +/// * [set org policy projects](struct.ProjectSetOrgPolicyCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct OrgPolicy { + /// The time stamp the `Policy` was previously updated. This is set by the + /// server, not specified by the caller, and represents the last time a call to + /// `SetOrgPolicy` was made for that `Policy`. Any value set by the client will + /// be ignored. + #[serde(rename="updateTime")] + pub update_time: Option, + /// Version of the `Policy`. Default version is 0; + pub version: Option, + /// An opaque tag indicating the current version of the `Policy`, used for + /// concurrency control. + /// + /// When the `Policy` is returned from either a `GetPolicy` or a + /// `ListOrgPolicy` request, this `etag` indicates the version of the current + /// `Policy` to use when executing a read-modify-write loop. + /// + /// When the `Policy` is returned from a `GetEffectivePolicy` request, the + /// `etag` will be unset. + /// + /// When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value + /// that was returned from a `GetOrgPolicy` request as part of a + /// read-modify-write loop for concurrency control. Not setting the `etag`in a + /// `SetOrgPolicy` request will result in an unconditional write of the + /// `Policy`. + pub etag: Option, + /// The name of the `Constraint` the `Policy` is configuring, for example, + /// `constraints/serviceuser.services`. + /// + /// Immutable after creation. + pub constraint: Option, + /// Restores the default behavior of the constraint; independent of + /// `Constraint` type. + #[serde(rename="restoreDefault")] + pub restore_default: Option, + /// List of values either allowed or disallowed. + #[serde(rename="listPolicy")] + pub list_policy: Option, + /// For boolean `Constraints`, whether to enforce the `Constraint` or not. + #[serde(rename="booleanPolicy")] + pub boolean_policy: Option, +} + +impl ResponseResult for OrgPolicy {} + + +/// The request sent to the SetOrgPolicyRequest method. +/// +/// # 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*). +/// +/// * [set org policy folders](struct.FolderSetOrgPolicyCall.html) (request) +/// * [set org policy organizations](struct.OrganizationSetOrgPolicyCall.html) (request) +/// * [set org policy projects](struct.ProjectSetOrgPolicyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SetOrgPolicyRequest { + /// `Policy` to set on the resource. + pub policy: Option, +} + +impl RequestValue for SetOrgPolicyRequest {} + + +/// Provides the configuration for logging a type of permissions. +/// Example: +/// +/// { +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// "exempted_members": [ +/// "user:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// } +/// ] +/// } +/// +/// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting +/// foo@gmail.com from DATA_READ logging. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AuditLogConfig { + /// Specifies the identities that do not cause logging for this type of + /// permission. + /// Follows the same format of Binding.members. + #[serde(rename="exemptedMembers")] + pub exempted_members: Option>, + /// The log type that this config enables. + #[serde(rename="logType")] + pub log_type: Option, +} + +impl Part for AuditLogConfig {} + + +/// Request message for `GetIamPolicy` method. +/// +/// # 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*). +/// +/// * [get iam policy projects](struct.ProjectGetIamPolicyCall.html) (request) +/// * [get iam policy organizations](struct.OrganizationGetIamPolicyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetIamPolicyRequest { _never_set: Option } + +impl RequestValue for GetIamPolicyRequest {} + + +/// Request message for `TestIamPermissions` method. +/// +/// # 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*). +/// +/// * [test iam permissions organizations](struct.OrganizationTestIamPermissionCall.html) (request) +/// * [test iam permissions projects](struct.ProjectTestIamPermissionCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestIamPermissionsRequest { + /// The set of permissions to check for the `resource`. Permissions with + /// wildcards (such as '*' or 'storage.*') are not allowed. For more + /// information see + /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + pub permissions: Option>, +} + +impl RequestValue for TestIamPermissionsRequest {} + + +/// A `Constraint` describes a way in which a resource's configuration can be +/// restricted. For example, it controls which cloud services can be activated +/// across an organization, or whether a Compute Engine instance can have +/// serial port connections established. `Constraints` can be configured by the +/// organization's policy adminstrator to fit the needs of the organzation by +/// setting Policies for `Constraints` at different locations in the +/// organization's resource hierarchy. Policies are inherited down the resource +/// hierarchy from higher levels, but can also be overridden. For details about +/// the inheritance rules please read about +/// Policies. +/// +/// `Constraints` have a default behavior determined by the `constraint_default` +/// field, which is the enforcement behavior that is used in the absence of a +/// `Policy` being defined or inherited for the resource in question. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Constraint { + /// The evaluation behavior of this constraint in the absense of 'Policy'. + #[serde(rename="constraintDefault")] + pub constraint_default: Option, + /// Version of the `Constraint`. Default version is 0; + pub version: Option, + /// The human readable name. + /// + /// Mutable. + #[serde(rename="displayName")] + pub display_name: Option, + /// Detailed description of what this `Constraint` controls as well as how and + /// where it is enforced. + /// + /// Mutable. + pub description: Option, + /// Defines this constraint as being a BooleanConstraint. + #[serde(rename="booleanConstraint")] + pub boolean_constraint: Option, + /// Defines this constraint as being a ListConstraint. + #[serde(rename="listConstraint")] + pub list_constraint: Option, + /// Immutable value, required to globally be unique. For example, + /// `constraints/serviceuser.services` + pub name: Option, +} + +impl Part for Constraint {} + + +/// A `Constraint` that is either enforced or not. +/// +/// For example a constraint `constraints/compute.disableSerialPortAccess`. +/// If it is enforced on a VM instance, serial port connections will not be +/// opened to that instance. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BooleanConstraint { _never_set: Option } + +impl Part for BooleanConstraint {} + + +/// Response from the GetAncestry method. +/// +/// # 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*). +/// +/// * [get ancestry projects](struct.ProjectGetAncestryCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetAncestryResponse { + /// Ancestors are ordered from bottom to top of the resource hierarchy. The + /// first ancestor is the project itself, followed by the project's parent, + /// etc. + pub ancestor: Option>, +} + +impl ResponseResult for GetAncestryResponse {} + + +/// A Project is a high-level Google Cloud Platform entity. It is a +/// container for ACLs, APIs, App Engine Apps, VMs, and other +/// Google Cloud Platform resources. +/// +/// # 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*). +/// +/// * [test iam permissions projects](struct.ProjectTestIamPermissionCall.html) (none) +/// * [undelete projects](struct.ProjectUndeleteCall.html) (none) +/// * [list org policies projects](struct.ProjectListOrgPolicyCall.html) (none) +/// * [get effective org policy projects](struct.ProjectGetEffectiveOrgPolicyCall.html) (none) +/// * [get projects](struct.ProjectGetCall.html) (response) +/// * [get ancestry projects](struct.ProjectGetAncestryCall.html) (none) +/// * [update projects](struct.ProjectUpdateCall.html) (request|response) +/// * [get iam policy projects](struct.ProjectGetIamPolicyCall.html) (none) +/// * [delete projects](struct.ProjectDeleteCall.html) (none) +/// * [list projects](struct.ProjectListCall.html) (none) +/// * [create projects](struct.ProjectCreateCall.html) (request) +/// * [set iam policy projects](struct.ProjectSetIamPolicyCall.html) (none) +/// * [get org policy projects](struct.ProjectGetOrgPolicyCall.html) (none) +/// * [set org policy projects](struct.ProjectSetOrgPolicyCall.html) (none) +/// * [list available org policy constraints projects](struct.ProjectListAvailableOrgPolicyConstraintCall.html) (none) +/// * [clear org policy projects](struct.ProjectClearOrgPolicyCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Project { + /// The user-assigned display name of the Project. + /// It must be 4 to 30 characters. + /// Allowed characters are: lowercase and uppercase letters, numbers, + /// hyphen, single-quote, double-quote, space, and exclamation point. + /// + /// Example: My Project + /// Read-write. + pub name: Option, + /// An optional reference to a parent Resource. + /// + /// The only supported parent type is "organization". Once set, the parent + /// cannot be modified. The `parent` can be set on creation or using the + /// `UpdateProject` method; the end user must have the + /// `resourcemanager.projects.create` permission on the parent. + /// + /// Read-write. + pub parent: Option, + /// The unique, user-assigned ID of the Project. + /// It must be 6 to 30 lowercase letters, digits, or hyphens. + /// It must start with a letter. + /// Trailing hyphens are prohibited. + /// + /// Example: tokyo-rain-123 + /// Read-only after creation. + #[serde(rename="projectId")] + pub project_id: Option, + /// The labels associated with this Project. + /// + /// Label keys must be between 1 and 63 characters long and must conform + /// to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + /// + /// Label values must be between 0 and 63 characters long and must conform + /// to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + /// + /// No more than 256 labels can be associated with a given resource. + /// + /// Clients should store labels in a representation such as JSON that does not + /// depend on specific characters being disallowed. + /// + /// Example: "environment" : "dev" + /// Read-write. + pub labels: Option>, + /// Creation time. + /// + /// Read-only. + #[serde(rename="createTime")] + pub create_time: Option, + /// The number uniquely identifying the project. + /// + /// Example: 415104041262 + /// Read-only. + #[serde(rename="projectNumber")] + pub project_number: Option, + /// The Project lifecycle state. + /// + /// Read-only. + #[serde(rename="lifecycleState")] + pub lifecycle_state: Option, +} + +impl RequestValue for Project {} +impl Resource for Project {} +impl ResponseResult for Project {} + + +/// The request sent to the UndeleteProject +/// method. +/// +/// # 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*). +/// +/// * [undelete projects](struct.ProjectUndeleteCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UndeleteProjectRequest { _never_set: Option } + +impl RequestValue for UndeleteProjectRequest {} + + +/// The request sent to the +/// GetAncestry +/// method. +/// +/// # 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*). +/// +/// * [get ancestry projects](struct.ProjectGetAncestryCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetAncestryRequest { _never_set: Option } + +impl RequestValue for GetAncestryRequest {} + + +/// The request sent to the ClearOrgPolicy method. +/// +/// # 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*). +/// +/// * [clear org policy folders](struct.FolderClearOrgPolicyCall.html) (request) +/// * [clear org policy organizations](struct.OrganizationClearOrgPolicyCall.html) (request) +/// * [clear org policy projects](struct.ProjectClearOrgPolicyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ClearOrgPolicyRequest { + /// The current version, for concurrency control. Not sending an `etag` + /// will cause the `Policy` to be cleared blindly. + pub etag: Option, + /// Name of the `Constraint` of the `Policy` to clear. + pub constraint: Option, +} + +impl RequestValue for ClearOrgPolicyRequest {} + + +/// The root node in the resource hierarchy to which a particular entity's +/// (e.g., company) resources belong. +/// +/// # 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*). +/// +/// * [set iam policy organizations](struct.OrganizationSetIamPolicyCall.html) (none) +/// * [get iam policy organizations](struct.OrganizationGetIamPolicyCall.html) (none) +/// * [get org policy organizations](struct.OrganizationGetOrgPolicyCall.html) (none) +/// * [test iam permissions organizations](struct.OrganizationTestIamPermissionCall.html) (none) +/// * [get effective org policy organizations](struct.OrganizationGetEffectiveOrgPolicyCall.html) (none) +/// * [set org policy organizations](struct.OrganizationSetOrgPolicyCall.html) (none) +/// * [get organizations](struct.OrganizationGetCall.html) (response) +/// * [list available org policy constraints organizations](struct.OrganizationListAvailableOrgPolicyConstraintCall.html) (none) +/// * [search organizations](struct.OrganizationSearchCall.html) (none) +/// * [list org policies organizations](struct.OrganizationListOrgPolicyCall.html) (none) +/// * [clear org policy organizations](struct.OrganizationClearOrgPolicyCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Organization { + /// The owner of this Organization. The owner should be specified on + /// creation. Once set, it cannot be changed. + /// This field is required. + pub owner: Option, + /// A friendly string to be used to refer to the Organization in the UI. + /// Assigned by the server, set to the primary domain of the G Suite + /// customer that owns the organization. + /// @OutputOnly + #[serde(rename="displayName")] + pub display_name: Option, + /// Timestamp when the Organization was created. Assigned by the server. + /// @OutputOnly + #[serde(rename="creationTime")] + pub creation_time: Option, + /// The organization's current lifecycle state. Assigned by the server. + /// @OutputOnly + #[serde(rename="lifecycleState")] + pub lifecycle_state: Option, + /// Output Only. The resource name of the organization. This is the + /// organization's relative path in the API. Its format is + /// "organizations/[organization_id]". For example, "organizations/1234". + pub name: Option, +} + +impl Resource for Organization {} +impl ResponseResult for Organization {} + + +/// A `Constraint` that allows or disallows a list of string values, which are +/// configured by an Organization's policy administrator with a `Policy`. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListConstraint { + /// Optional. The Google Cloud Console will try to default to a configuration + /// that matches the value specified in this `Constraint`. + #[serde(rename="suggestedValue")] + pub suggested_value: Option, +} + +impl Part for ListConstraint {} + + +/// The request sent to the GetOrgPolicy method. +/// +/// # 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*). +/// +/// * [get org policy projects](struct.ProjectGetOrgPolicyCall.html) (request) +/// * [get org policy folders](struct.FolderGetOrgPolicyCall.html) (request) +/// * [get org policy organizations](struct.OrganizationGetOrgPolicyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetOrgPolicyRequest { + /// Name of the `Constraint` to get the `Policy`. + pub constraint: Option, +} + +impl RequestValue for GetOrgPolicyRequest {} + + +/// The request sent to the [ListAvailableOrgPolicyConstraints] +/// google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method. +/// +/// # 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*). +/// +/// * [list available org policy constraints folders](struct.FolderListAvailableOrgPolicyConstraintCall.html) (request) +/// * [list available org policy constraints projects](struct.ProjectListAvailableOrgPolicyConstraintCall.html) (request) +/// * [list available org policy constraints organizations](struct.OrganizationListAvailableOrgPolicyConstraintCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListAvailableOrgPolicyConstraintsRequest { + /// Page token used to retrieve the next page. This is currently unsupported + /// and will be ignored. The server may at any point start using this field. + #[serde(rename="pageToken")] + pub page_token: Option, + /// Size of the pages to be returned. This is currently unsupported and will + /// be ignored. The server may at any point start using this field to limit + /// page size. + #[serde(rename="pageSize")] + pub page_size: Option, +} + +impl RequestValue for ListAvailableOrgPolicyConstraintsRequest {} + + +/// The request sent to the ListOrgPolicies method. +/// +/// # 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*). +/// +/// * [list org policies organizations](struct.OrganizationListOrgPolicyCall.html) (request) +/// * [list org policies projects](struct.ProjectListOrgPolicyCall.html) (request) +/// * [list org policies folders](struct.FolderListOrgPolicyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListOrgPoliciesRequest { + /// Page token used to retrieve the next page. This is currently unsupported + /// and will be ignored. The server may at any point start using this field. + #[serde(rename="pageToken")] + pub page_token: Option, + /// Size of the pages to be returned. This is currently unsupported and will + /// be ignored. The server may at any point start using this field to limit + /// page size. + #[serde(rename="pageSize")] + pub page_size: Option, +} + +impl RequestValue for ListOrgPoliciesRequest {} + + +/// A Lien represents an encumbrance on the actions that can be performed on a +/// resource. +/// +/// # 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*). +/// +/// * [create liens](struct.LienCreateCall.html) (request|response) +/// * [delete liens](struct.LienDeleteCall.html) (none) +/// * [list liens](struct.LienListCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Lien { + /// A stable, user-visible/meaningful string identifying the origin of the + /// Lien, intended to be inspected programmatically. Maximum length of 200 + /// characters. + /// + /// Example: 'compute.googleapis.com' + pub origin: Option, + /// The types of operations which should be blocked as a result of this Lien. + /// Each value should correspond to an IAM permission. The server will + /// validate the permissions against those for which Liens are supported. + /// + /// An empty list is meaningless and will be rejected. + /// + /// Example: ['resourcemanager.projects.delete'] + pub restrictions: Option>, + /// Concise user-visible strings indicating why an action cannot be performed + /// on a resource. Maximum lenth of 200 characters. + /// + /// Example: 'Holds production API key' + pub reason: Option, + /// A system-generated unique identifier for this Lien. + /// + /// Example: `liens/1234abcd` + pub name: Option, + /// A reference to the resource this Lien is attached to. The server will + /// validate the parent against those for which Liens are supported. + /// + /// Example: `projects/1234` + pub parent: Option, + /// The creation time of this Lien. + #[serde(rename="createTime")] + pub create_time: Option, +} + +impl RequestValue for Lien {} +impl Resource for Lien {} +impl ResponseResult for Lien {} + + +/// Specifies the audit configuration for a service. +/// The configuration determines which permission types are logged, and what +/// identities, if any, are exempted from logging. +/// An AuditConfig must have one or more AuditLogConfigs. +/// +/// If there are AuditConfigs for both `allServices` and a specific service, +/// the union of the two AuditConfigs is used for that service: the log_types +/// specified in each AuditConfig are enabled, and the exempted_members in each +/// AuditConfig are exempted. +/// +/// Example Policy with multiple AuditConfigs: +/// +/// { +/// "audit_configs": [ +/// { +/// "service": "allServices" +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// "exempted_members": [ +/// "user:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// }, +/// { +/// "log_type": "ADMIN_READ", +/// } +/// ] +/// }, +/// { +/// "service": "fooservice.googleapis.com" +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// "exempted_members": [ +/// "user:bar@gmail.com" +/// ] +/// } +/// ] +/// } +/// ] +/// } +/// +/// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ +/// logging. It also exempts foo@gmail.com from DATA_READ logging, and +/// bar@gmail.com from DATA_WRITE logging. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AuditConfig { + /// The configuration for logging of each type of permission. + /// Next ID: 4 + #[serde(rename="auditLogConfigs")] + pub audit_log_configs: Option>, + /// Specifies a service that will be enabled for audit logging. + /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + /// `allServices` is a special value that covers all services. + pub service: Option, +} + +impl Part for AuditConfig {} /// The request sent to the `SearchOrganizations` method. @@ -1008,6 +1713,52 @@ impl Resource for Operation {} impl ResponseResult for Operation {} +/// The request sent to the GetEffectiveOrgPolicy method. +/// +/// # 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*). +/// +/// * [get effective org policy folders](struct.FolderGetEffectiveOrgPolicyCall.html) (request) +/// * [get effective org policy organizations](struct.OrganizationGetEffectiveOrgPolicyCall.html) (request) +/// * [get effective org policy projects](struct.ProjectGetEffectiveOrgPolicyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetEffectiveOrgPolicyRequest { + /// The name of the `Constraint` to compute the effective `Policy`. + pub constraint: Option, +} + +impl RequestValue for GetEffectiveOrgPolicyRequest {} + + +/// The response returned from the ListOrgPolicies method. It will be empty +/// if no `Policies` are set on the resource. +/// +/// # 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*). +/// +/// * [list org policies organizations](struct.OrganizationListOrgPolicyCall.html) (response) +/// * [list org policies projects](struct.ProjectListOrgPolicyCall.html) (response) +/// * [list org policies folders](struct.FolderListOrgPolicyCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListOrgPoliciesResponse { + /// Page token used to retrieve the next page. This is currently not used, but + /// the server may at any point start supplying a valid token. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The `Policies` that are set on the resource. It will be empty if no + /// `Policies` are set. + pub policies: Option>, +} + +impl ResponseResult for ListOrgPoliciesResponse {} + + /// The entity that owns an Organization. The lifetime of the Organization and /// all of its descendants are bound to the `OrganizationOwner`. If the /// `OrganizationOwner` is deleted, the Organization and all its descendants will @@ -1030,6 +1781,984 @@ impl Part for OrganizationOwner {} // MethodBuilders ### // ################# +/// A builder providing access to all methods supported on *folder* resources. +/// It is not used directly, but through the `CloudResourceManager` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use cloudresourcemanager1::CloudResourceManager; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `clear_org_policy(...)`, `get_effective_org_policy(...)`, `get_org_policy(...)`, `list_available_org_policy_constraints(...)`, `list_org_policies(...)` and `set_org_policy(...)` +/// // to build up your call. +/// let rb = hub.folders(); +/// # } +/// ``` +pub struct FolderMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, +} + +impl<'a, C, A> MethodsBuilder for FolderMethods<'a, C, A> {} + +impl<'a, C, A> FolderMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Gets the effective `Policy` on a resource. This is the result of merging + /// `Policies` in the resource hierarchy. The returned `Policy` will not have + /// an `etag`set because it is a computed `Policy` across multiple resources. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - The name of the resource to start computing the effective `Policy`. + pub fn get_effective_org_policy(&self, request: GetEffectiveOrgPolicyRequest, resource: &str) -> FolderGetEffectiveOrgPolicyCall<'a, C, A> { + FolderGetEffectiveOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Clears a `Policy` from a resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource for the `Policy` to clear. + pub fn clear_org_policy(&self, request: ClearOrgPolicyRequest, resource: &str) -> FolderClearOrgPolicyCall<'a, C, A> { + FolderClearOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists `Constraints` that could be applied on the specified resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource to list `Constraints` for. + pub fn list_available_org_policy_constraints(&self, request: ListAvailableOrgPolicyConstraintsRequest, resource: &str) -> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> { + FolderListAvailableOrgPolicyConstraintCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a `Policy` on a resource. + /// + /// If no `Policy` is set on the resource, a `Policy` is returned with default + /// values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + /// `etag` value can be used with `SetOrgPolicy()` to create or update a + /// `Policy` during read-modify-write. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource the `Policy` is set on. + pub fn get_org_policy(&self, request: GetOrgPolicyRequest, resource: &str) -> FolderGetOrgPolicyCall<'a, C, A> { + FolderGetOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates the specified `Policy` on the resource. Creates a new `Policy` for + /// that `Constraint` on the resource if one does not exist. + /// + /// Not supplying an `etag` on the request `Policy` results in an unconditional + /// write of the `Policy`. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Resource name of the resource to attach the `Policy`. + pub fn set_org_policy(&self, request: SetOrgPolicyRequest, resource: &str) -> FolderSetOrgPolicyCall<'a, C, A> { + FolderSetOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists all the `Policies` set for a particular resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource to list Policies for. + pub fn list_org_policies(&self, request: ListOrgPoliciesRequest, resource: &str) -> FolderListOrgPolicyCall<'a, C, A> { + FolderListOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *organization* resources. +/// It is not used directly, but through the `CloudResourceManager` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use cloudresourcemanager1::CloudResourceManager; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `clear_org_policy(...)`, `get(...)`, `get_effective_org_policy(...)`, `get_iam_policy(...)`, `get_org_policy(...)`, `list_available_org_policy_constraints(...)`, `list_org_policies(...)`, `search(...)`, `set_iam_policy(...)`, `set_org_policy(...)` and `test_iam_permissions(...)` +/// // to build up your call. +/// let rb = hub.organizations(); +/// # } +/// ``` +pub struct OrganizationMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, +} + +impl<'a, C, A> MethodsBuilder for OrganizationMethods<'a, C, A> {} + +impl<'a, C, A> OrganizationMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Clears a `Policy` from a resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource for the `Policy` to clear. + pub fn clear_org_policy(&self, request: ClearOrgPolicyRequest, resource: &str) -> OrganizationClearOrgPolicyCall<'a, C, A> { + OrganizationClearOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a `Policy` on a resource. + /// + /// If no `Policy` is set on the resource, a `Policy` is returned with default + /// values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + /// `etag` value can be used with `SetOrgPolicy()` to create or update a + /// `Policy` during read-modify-write. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource the `Policy` is set on. + pub fn get_org_policy(&self, request: GetOrgPolicyRequest, resource: &str) -> OrganizationGetOrgPolicyCall<'a, C, A> { + OrganizationGetOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists `Constraints` that could be applied on the specified resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource to list `Constraints` for. + pub fn list_available_org_policy_constraints(&self, request: ListAvailableOrgPolicyConstraintsRequest, resource: &str) -> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> { + OrganizationListAvailableOrgPolicyConstraintCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists all the `Policies` set for a particular resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource to list Policies for. + pub fn list_org_policies(&self, request: ListOrgPoliciesRequest, resource: &str) -> OrganizationListOrgPolicyCall<'a, C, A> { + OrganizationListOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Sets the access control policy on an Organization resource. Replaces any + /// existing policy. The `resource` field should be the organization's resource + /// name, e.g. "organizations/123". + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy is being specified. + /// See the operation documentation for the appropriate value for this field. + pub fn set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> OrganizationSetIamPolicyCall<'a, C, A> { + OrganizationSetIamPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Fetches an Organization resource identified by the specified resource name. + /// + /// # Arguments + /// + /// * `name` - The resource name of the Organization to fetch, e.g. "organizations/1234". + pub fn get(&self, name: &str) -> OrganizationGetCall<'a, C, A> { + OrganizationGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets the effective `Policy` on a resource. This is the result of merging + /// `Policies` in the resource hierarchy. The returned `Policy` will not have + /// an `etag`set because it is a computed `Policy` across multiple resources. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - The name of the resource to start computing the effective `Policy`. + pub fn get_effective_org_policy(&self, request: GetEffectiveOrgPolicyRequest, resource: &str) -> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> { + OrganizationGetEffectiveOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Searches Organization resources that are visible to the user and satisfy + /// the specified filter. This method returns Organizations in an unspecified + /// order. New Organizations do not necessarily appear at the end of the + /// results. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn search(&self, request: SearchOrganizationsRequest) -> OrganizationSearchCall<'a, C, A> { + OrganizationSearchCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets the access control policy for an Organization resource. May be empty + /// if no such policy or resource exists. The `resource` field should be the + /// organization's resource name, e.g. "organizations/123". + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy is being requested. + /// See the operation documentation for the appropriate value for this field. + pub fn get_iam_policy(&self, request: GetIamPolicyRequest, resource: &str) -> OrganizationGetIamPolicyCall<'a, C, A> { + OrganizationGetIamPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns permissions that a caller has on the specified Organization. + /// The `resource` field should be the organization's resource name, + /// e.g. "organizations/123". + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. + /// See the operation documentation for the appropriate value for this field. + pub fn test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> OrganizationTestIamPermissionCall<'a, C, A> { + OrganizationTestIamPermissionCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates the specified `Policy` on the resource. Creates a new `Policy` for + /// that `Constraint` on the resource if one does not exist. + /// + /// Not supplying an `etag` on the request `Policy` results in an unconditional + /// write of the `Policy`. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Resource name of the resource to attach the `Policy`. + pub fn set_org_policy(&self, request: SetOrgPolicyRequest, resource: &str) -> OrganizationSetOrgPolicyCall<'a, C, A> { + OrganizationSetOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *lien* resources. +/// It is not used directly, but through the `CloudResourceManager` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use cloudresourcemanager1::CloudResourceManager; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `create(...)`, `delete(...)` and `list(...)` +/// // to build up your call. +/// let rb = hub.liens(); +/// # } +/// ``` +pub struct LienMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, +} + +impl<'a, C, A> MethodsBuilder for LienMethods<'a, C, A> {} + +impl<'a, C, A> LienMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Create a Lien which applies to the resource denoted by the `parent` field. + /// + /// Callers of this method will require permission on the `parent` resource. + /// For example, applying to `projects/1234` requires permission + /// `resourcemanager.projects.updateLiens`. + /// + /// NOTE: Some resources may limit the number of Liens which may be applied. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn create(&self, request: Lien) -> LienCreateCall<'a, C, A> { + LienCreateCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Delete a Lien by `name`. + /// + /// Callers of this method will require permission on the `parent` resource. + /// For example, a Lien with a `parent` of `projects/1234` requires permission + /// `resourcemanager.projects.updateLiens`. + /// + /// # Arguments + /// + /// * `name` - The name/identifier of the Lien to delete. + pub fn delete(&self, name: &str) -> LienDeleteCall<'a, C, A> { + LienDeleteCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// List all Liens applied to the `parent` resource. + /// + /// Callers of this method will require permission on the `parent` resource. + /// For example, a Lien with a `parent` of `projects/1234` requires permission + /// `resourcemanager.projects.get`. + pub fn list(&self) -> LienListCall<'a, C, A> { + LienListCall { + hub: self.hub, + _parent: Default::default(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *project* resources. +/// It is not used directly, but through the `CloudResourceManager` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use cloudresourcemanager1::CloudResourceManager; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `clear_org_policy(...)`, `create(...)`, `delete(...)`, `get(...)`, `get_ancestry(...)`, `get_effective_org_policy(...)`, `get_iam_policy(...)`, `get_org_policy(...)`, `list(...)`, `list_available_org_policy_constraints(...)`, `list_org_policies(...)`, `set_iam_policy(...)`, `set_org_policy(...)`, `test_iam_permissions(...)`, `undelete(...)` and `update(...)` +/// // to build up your call. +/// let rb = hub.projects(); +/// # } +/// ``` +pub struct ProjectMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, +} + +impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} + +impl<'a, C, A> ProjectMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Marks the Project identified by the specified + /// `project_id` (for example, `my-project-123`) for deletion. + /// This method will only affect the Project if the following criteria are met: + /// + /// + The Project does not have a billing account associated with it. + /// + The Project has a lifecycle state of + /// ACTIVE. + /// + /// This method changes the Project's lifecycle state from + /// ACTIVE + /// to DELETE_REQUESTED. + /// The deletion starts at an unspecified time, + /// at which point the Project is no longer accessible. + /// + /// Until the deletion completes, you can check the lifecycle state + /// checked by retrieving the Project with GetProject, + /// and the Project remains visible to ListProjects. + /// However, you cannot update the project. + /// + /// After the deletion completes, the Project is not retrievable by + /// the GetProject and + /// ListProjects methods. + /// + /// The caller must have modify permissions for this Project. + /// + /// # Arguments + /// + /// * `projectId` - The Project ID (for example, `foo-bar-123`). + /// Required. + pub fn delete(&self, project_id: &str) -> ProjectDeleteCall<'a, C, A> { + ProjectDeleteCall { + hub: self.hub, + _project_id: project_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns the IAM access control policy for the specified Project. + /// Permission is denied if the policy or the resource does not exist. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy is being requested. + /// See the operation documentation for the appropriate value for this field. + pub fn get_iam_policy(&self, request: GetIamPolicyRequest, resource: &str) -> ProjectGetIamPolicyCall<'a, C, A> { + ProjectGetIamPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Request that a new Project be created. The result is an Operation which + /// can be used to track the creation process. It is automatically deleted + /// after a few hours, so there is no need to call DeleteOperation. + /// + /// Our SLO permits Project creation to take up to 30 seconds at the 90th + /// percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile + /// latency. 95th percentile latency is around 11 seconds. We recommend + /// polling at the 5th second with an exponential backoff. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn create(&self, request: Project) -> ProjectCreateCall<'a, C, A> { + ProjectCreateCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a `Policy` on a resource. + /// + /// If no `Policy` is set on the resource, a `Policy` is returned with default + /// values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + /// `etag` value can be used with `SetOrgPolicy()` to create or update a + /// `Policy` during read-modify-write. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource the `Policy` is set on. + pub fn get_org_policy(&self, request: GetOrgPolicyRequest, resource: &str) -> ProjectGetOrgPolicyCall<'a, C, A> { + ProjectGetOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates the specified `Policy` on the resource. Creates a new `Policy` for + /// that `Constraint` on the resource if one does not exist. + /// + /// Not supplying an `etag` on the request `Policy` results in an unconditional + /// write of the `Policy`. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Resource name of the resource to attach the `Policy`. + pub fn set_org_policy(&self, request: SetOrgPolicyRequest, resource: &str) -> ProjectSetOrgPolicyCall<'a, C, A> { + ProjectSetOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Clears a `Policy` from a resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource for the `Policy` to clear. + pub fn clear_org_policy(&self, request: ClearOrgPolicyRequest, resource: &str) -> ProjectClearOrgPolicyCall<'a, C, A> { + ProjectClearOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Restores the Project identified by the specified + /// `project_id` (for example, `my-project-123`). + /// You can only use this method for a Project that has a lifecycle state of + /// DELETE_REQUESTED. + /// After deletion starts, the Project cannot be restored. + /// + /// The caller must have modify permissions for this Project. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - The project ID (for example, `foo-bar-123`). + /// Required. + pub fn undelete(&self, request: UndeleteProjectRequest, project_id: &str) -> ProjectUndeleteCall<'a, C, A> { + ProjectUndeleteCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists all the `Policies` set for a particular resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource to list Policies for. + pub fn list_org_policies(&self, request: ListOrgPoliciesRequest, resource: &str) -> ProjectListOrgPolicyCall<'a, C, A> { + ProjectListOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns permissions that a caller has on the specified Project. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. + /// See the operation documentation for the appropriate value for this field. + pub fn test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectTestIamPermissionCall<'a, C, A> { + ProjectTestIamPermissionCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists `Constraints` that could be applied on the specified resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - Name of the resource to list `Constraints` for. + pub fn list_available_org_policy_constraints(&self, request: ListAvailableOrgPolicyConstraintsRequest, resource: &str) -> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> { + ProjectListAvailableOrgPolicyConstraintCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Retrieves the Project identified by the specified + /// `project_id` (for example, `my-project-123`). + /// + /// The caller must have read permissions for this Project. + /// + /// # Arguments + /// + /// * `projectId` - The Project ID (for example, `my-project-123`). + /// Required. + pub fn get(&self, project_id: &str) -> ProjectGetCall<'a, C, A> { + ProjectGetCall { + hub: self.hub, + _project_id: project_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists Projects that are visible to the user and satisfy the + /// specified filter. This method returns Projects in an unspecified order. + /// New Projects do not necessarily appear at the end of the list. + pub fn list(&self) -> ProjectListCall<'a, C, A> { + ProjectListCall { + hub: self.hub, + _page_token: Default::default(), + _page_size: Default::default(), + _filter: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Sets the IAM access control policy for the specified Project. Replaces + /// any existing policy. + /// + /// The following constraints apply when using `setIamPolicy()`: + /// + /// + Project does not support `allUsers` and `allAuthenticatedUsers` as + /// `members` in a `Binding` of a `Policy`. + /// + /// + The owner role can be granted only to `user` and `serviceAccount`. + /// + /// + Service accounts can be made owners of a project directly + /// without any restrictions. However, to be added as an owner, a user must be + /// invited via Cloud Platform console and must accept the invitation. + /// + /// + A user cannot be granted the owner role using `setIamPolicy()`. The user + /// must be granted the owner role using the Cloud Platform Console and must + /// explicitly accept the invitation. + /// + /// + Invitations to grant the owner role cannot be sent using + /// `setIamPolicy()`; + /// they must be sent only using the Cloud Platform Console. + /// + /// + Membership changes that leave the project without any owners that have + /// accepted the Terms of Service (ToS) will be rejected. + /// + /// + There must be at least one owner who has accepted the Terms of + /// Service (ToS) agreement in the policy. Calling `setIamPolicy()` to + /// remove the last ToS-accepted owner from the policy will fail. This + /// restriction also applies to legacy projects that no longer have owners + /// who have accepted the ToS. Edits to IAM policies will be rejected until + /// the lack of a ToS-accepting owner is rectified. + /// + /// + Calling this method requires enabling the App Engine Admin API. + /// + /// Note: Removing service accounts from policies or changing their roles + /// can render services completely inoperable. It is important to understand + /// how the service account is being used before removing or updating its + /// roles. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - REQUIRED: The resource for which the policy is being specified. + /// See the operation documentation for the appropriate value for this field. + pub fn set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectSetIamPolicyCall<'a, C, A> { + ProjectSetIamPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a list of ancestors in the resource hierarchy for the Project + /// identified by the specified `project_id` (for example, `my-project-123`). + /// + /// The caller must have read permissions for this Project. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - The Project ID (for example, `my-project-123`). + /// Required. + pub fn get_ancestry(&self, request: GetAncestryRequest, project_id: &str) -> ProjectGetAncestryCall<'a, C, A> { + ProjectGetAncestryCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates the attributes of the Project identified by the specified + /// `project_id` (for example, `my-project-123`). + /// + /// The caller must have modify permissions for this Project. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - The project ID (for example, `my-project-123`). + /// Required. + pub fn update(&self, request: Project, project_id: &str) -> ProjectUpdateCall<'a, C, A> { + ProjectUpdateCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets the effective `Policy` on a resource. This is the result of merging + /// `Policies` in the resource hierarchy. The returned `Policy` will not have + /// an `etag`set because it is a computed `Policy` across multiple resources. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `resource` - The name of the resource to start computing the effective `Policy`. + pub fn get_effective_org_policy(&self, request: GetEffectiveOrgPolicyRequest, resource: &str) -> ProjectGetEffectiveOrgPolicyCall<'a, C, A> { + ProjectGetEffectiveOrgPolicyCall { + hub: self.hub, + _request: request, + _resource: resource.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *operation* resources. /// It is not used directly, but through the `CloudResourceManager` hub. /// @@ -1090,482 +2819,18 @@ impl<'a, C, A> OperationMethods<'a, C, A> { -/// A builder providing access to all methods supported on *organization* resources. -/// It is not used directly, but through the `CloudResourceManager` hub. -/// -/// # Example -/// -/// Instantiate a resource builder -/// -/// ```test_harness,no_run -/// extern crate hyper; -/// extern crate yup_oauth2 as oauth2; -/// extern crate google_cloudresourcemanager1 as cloudresourcemanager1; -/// -/// # #[test] fn egal() { -/// use std::default::Default; -/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use cloudresourcemanager1::CloudResourceManager; -/// -/// let secret: ApplicationSecret = Default::default(); -/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// hyper::Client::new(), -/// ::default(), None); -/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); -/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `get(...)`, `get_iam_policy(...)`, `search(...)`, `set_iam_policy(...)` and `test_iam_permissions(...)` -/// // to build up your call. -/// let rb = hub.organizations(); -/// # } -/// ``` -pub struct OrganizationMethods<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a CloudResourceManager, -} - -impl<'a, C, A> MethodsBuilder for OrganizationMethods<'a, C, A> {} - -impl<'a, C, A> OrganizationMethods<'a, C, A> { - - /// Create a builder to help you perform the following task: - /// - /// Sets the access control policy on an Organization resource. Replaces any - /// existing policy. The `resource` field should be the organization's resource - /// name, e.g. "organizations/123". - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. - pub fn set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> OrganizationSetIamPolicyCall<'a, C, A> { - OrganizationSetIamPolicyCall { - hub: self.hub, - _request: request, - _resource: resource.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Gets the access control policy for an Organization resource. May be empty - /// if no such policy or resource exists. The `resource` field should be the - /// organization's resource name, e.g. "organizations/123". - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. - pub fn get_iam_policy(&self, request: GetIamPolicyRequest, resource: &str) -> OrganizationGetIamPolicyCall<'a, C, A> { - OrganizationGetIamPolicyCall { - hub: self.hub, - _request: request, - _resource: resource.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Returns permissions that a caller has on the specified Organization. - /// The `resource` field should be the organization's resource name, - /// e.g. "organizations/123". - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. - pub fn test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> OrganizationTestIamPermissionCall<'a, C, A> { - OrganizationTestIamPermissionCall { - hub: self.hub, - _request: request, - _resource: resource.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Fetches an Organization resource identified by the specified resource name. - /// - /// # Arguments - /// - /// * `name` - The resource name of the Organization to fetch, e.g. "organizations/1234". - pub fn get(&self, name: &str) -> OrganizationGetCall<'a, C, A> { - OrganizationGetCall { - hub: self.hub, - _name: name.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Searches Organization resources that are visible to the user and satisfy - /// the specified filter. This method returns Organizations in an unspecified - /// order. New Organizations do not necessarily appear at the end of the - /// results. - /// - /// # Arguments - /// - /// * `request` - No description provided. - pub fn search(&self, request: SearchOrganizationsRequest) -> OrganizationSearchCall<'a, C, A> { - OrganizationSearchCall { - hub: self.hub, - _request: request, - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } -} - - - -/// A builder providing access to all methods supported on *project* resources. -/// It is not used directly, but through the `CloudResourceManager` hub. -/// -/// # Example -/// -/// Instantiate a resource builder -/// -/// ```test_harness,no_run -/// extern crate hyper; -/// extern crate yup_oauth2 as oauth2; -/// extern crate google_cloudresourcemanager1 as cloudresourcemanager1; -/// -/// # #[test] fn egal() { -/// use std::default::Default; -/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use cloudresourcemanager1::CloudResourceManager; -/// -/// let secret: ApplicationSecret = Default::default(); -/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// hyper::Client::new(), -/// ::default(), None); -/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); -/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `create(...)`, `delete(...)`, `get(...)`, `get_ancestry(...)`, `get_iam_policy(...)`, `list(...)`, `set_iam_policy(...)`, `test_iam_permissions(...)`, `undelete(...)` and `update(...)` -/// // to build up your call. -/// let rb = hub.projects(); -/// # } -/// ``` -pub struct ProjectMethods<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a CloudResourceManager, -} - -impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} - -impl<'a, C, A> ProjectMethods<'a, C, A> { - - /// Create a builder to help you perform the following task: - /// - /// Returns permissions that a caller has on the specified Project. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. - pub fn test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectTestIamPermissionCall<'a, C, A> { - ProjectTestIamPermissionCall { - hub: self.hub, - _request: request, - _resource: resource.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Restores the Project identified by the specified - /// `project_id` (for example, `my-project-123`). - /// You can only use this method for a Project that has a lifecycle state of - /// DELETE_REQUESTED. - /// After deletion starts, the Project cannot be restored. - /// - /// The caller must have modify permissions for this Project. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `projectId` - The project ID (for example, `foo-bar-123`). - /// Required. - pub fn undelete(&self, request: UndeleteProjectRequest, project_id: &str) -> ProjectUndeleteCall<'a, C, A> { - ProjectUndeleteCall { - hub: self.hub, - _request: request, - _project_id: project_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Sets the IAM access control policy for the specified Project. Replaces - /// any existing policy. - /// - /// The following constraints apply when using `setIamPolicy()`: - /// - /// + Project does not support `allUsers` and `allAuthenticatedUsers` as - /// `members` in a `Binding` of a `Policy`. - /// - /// + The owner role can be granted only to `user` and `serviceAccount`. - /// - /// + Service accounts can be made owners of a project directly - /// without any restrictions. However, to be added as an owner, a user must be - /// invited via Cloud Platform console and must accept the invitation. - /// - /// + A user cannot be granted the owner role using `setIamPolicy()`. The user - /// must be granted the owner role using the Cloud Platform Console and must - /// explicitly accept the invitation. - /// - /// + Invitations to grant the owner role cannot be sent using - /// `setIamPolicy()`; - /// they must be sent only using the Cloud Platform Console. - /// - /// + Membership changes that leave the project without any owners that have - /// accepted the Terms of Service (ToS) will be rejected. - /// - /// + There must be at least one owner who has accepted the Terms of - /// Service (ToS) agreement in the policy. Calling `setIamPolicy()` to - /// to remove the last ToS-accepted owner from the policy will fail. This - /// restriction also applies to legacy projects that no longer have owners - /// who have accepted the ToS. Edits to IAM policies will be rejected until - /// the lack of a ToS-accepting owner is rectified. - /// - /// + Calling this method requires enabling the App Engine Admin API. - /// - /// Note: Removing service accounts from policies or changing their roles - /// can render services completely inoperable. It is important to understand - /// how the service account is being used before removing or updating its - /// roles. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. - pub fn set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectSetIamPolicyCall<'a, C, A> { - ProjectSetIamPolicyCall { - hub: self.hub, - _request: request, - _resource: resource.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the Project identified by the specified - /// `project_id` (for example, `my-project-123`). - /// - /// The caller must have read permissions for this Project. - /// - /// # Arguments - /// - /// * `projectId` - The Project ID (for example, `my-project-123`). - /// Required. - pub fn get(&self, project_id: &str) -> ProjectGetCall<'a, C, A> { - ProjectGetCall { - hub: self.hub, - _project_id: project_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Gets a list of ancestors in the resource hierarchy for the Project - /// identified by the specified `project_id` (for example, `my-project-123`). - /// - /// The caller must have read permissions for this Project. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `projectId` - The Project ID (for example, `my-project-123`). - /// Required. - pub fn get_ancestry(&self, request: GetAncestryRequest, project_id: &str) -> ProjectGetAncestryCall<'a, C, A> { - ProjectGetAncestryCall { - hub: self.hub, - _request: request, - _project_id: project_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Updates the attributes of the Project identified by the specified - /// `project_id` (for example, `my-project-123`). - /// - /// The caller must have modify permissions for this Project. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `projectId` - The project ID (for example, `my-project-123`). - /// Required. - pub fn update(&self, request: Project, project_id: &str) -> ProjectUpdateCall<'a, C, A> { - ProjectUpdateCall { - hub: self.hub, - _request: request, - _project_id: project_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Returns the IAM access control policy for the specified Project. - /// Permission is denied if the policy or the resource does not exist. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. - pub fn get_iam_policy(&self, request: GetIamPolicyRequest, resource: &str) -> ProjectGetIamPolicyCall<'a, C, A> { - ProjectGetIamPolicyCall { - hub: self.hub, - _request: request, - _resource: resource.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Marks the Project identified by the specified - /// `project_id` (for example, `my-project-123`) for deletion. - /// This method will only affect the Project if the following criteria are met: - /// - /// + The Project does not have a billing account associated with it. - /// + The Project has a lifecycle state of - /// ACTIVE. - /// - /// This method changes the Project's lifecycle state from - /// ACTIVE - /// to DELETE_REQUESTED. - /// The deletion starts at an unspecified time, - /// at which point the Project is no longer accessible. - /// - /// Until the deletion completes, you can check the lifecycle state - /// checked by retrieving the Project with GetProject, - /// and the Project remains visible to ListProjects. - /// However, you cannot update the project. - /// - /// After the deletion completes, the Project is not retrievable by - /// the GetProject and - /// ListProjects methods. - /// - /// The caller must have modify permissions for this Project. - /// - /// # Arguments - /// - /// * `projectId` - The Project ID (for example, `foo-bar-123`). - /// Required. - pub fn delete(&self, project_id: &str) -> ProjectDeleteCall<'a, C, A> { - ProjectDeleteCall { - hub: self.hub, - _project_id: project_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Request that a new Project be created. The result is an Operation which - /// can be used to track the creation process. It is automatically deleted - /// after a few hours, so there is no need to call DeleteOperation. - /// - /// Our SLO permits Project creation to take up to 30 seconds at the 90th - /// percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile - /// latency. 95th percentile latency is around 11 seconds. We recommend - /// polling at the 5th second with an exponential backoff. - /// - /// # Arguments - /// - /// * `request` - No description provided. - pub fn create(&self, request: Project) -> ProjectCreateCall<'a, C, A> { - ProjectCreateCall { - hub: self.hub, - _request: request, - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Lists Projects that are visible to the user and satisfy the - /// specified filter. This method returns Projects in an unspecified order. - /// New Projects do not necessarily appear at the end of the list. - pub fn list(&self) -> ProjectListCall<'a, C, A> { - ProjectListCall { - hub: self.hub, - _page_token: Default::default(), - _page_size: Default::default(), - _filter: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } -} - - - // ################### // CallBuilders ### // ################# -/// Gets the latest state of a long-running operation. Clients can use this -/// method to poll the operation result at intervals as recommended by the API -/// service. +/// Gets the effective `Policy` on a resource. This is the result of merging +/// `Policies` in the resource hierarchy. The returned `Policy` will not have +/// an `etag`set because it is a computed `Policy` across multiple resources. /// -/// A builder for the *get* method supported by a *operation* resource. -/// It is not used directly, but through a `OperationMethods` instance. +/// A builder for the *getEffectiveOrgPolicy* method supported by a *folder* resource. +/// It is not used directly, but through a `FolderMethods` instance. /// /// # Example /// @@ -1575,6 +2840,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::GetEffectiveOrgPolicyRequest; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -1585,30 +2851,36 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # hyper::Client::new(), /// # ::default(), None); /// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = GetEffectiveOrgPolicyRequest::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.operations().get("name") +/// let result = hub.folders().get_effective_org_policy(req, "resource") /// .doit(); /// # } /// ``` -pub struct OperationGetCall<'a, C, A> +pub struct FolderGetEffectiveOrgPolicyCall<'a, C, A> where C: 'a, A: 'a { hub: &'a CloudResourceManager, - _name: String, + _request: GetEffectiveOrgPolicyRequest, + _resource: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for OperationGetCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for FolderGetEffectiveOrgPolicyCall<'a, C, A> {} -impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> FolderGetEffectiveOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, OrgPolicy)> { use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; @@ -1617,11 +2889,11 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "cloudresourcemanager.operations.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("name", self._name.to_string())); - for &field in ["alt", "name"].iter() { + dlg.begin(MethodInfo { id: "cloudresourcemanager.folders.getEffectiveOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -1633,12 +2905,12 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+name}".to_string(); + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:getEffectiveOrgPolicy".to_string(); if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{+name}", "name")].iter() { + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { let mut replace_with = String::new(); for &(name, ref value) in params.iter() { if name == param_name { @@ -1653,7 +2925,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: } { let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["name"].iter() { + for param_name in ["resource"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -1668,6 +2940,17 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: url.push_str(&url::form_urlencoded::serialize(params)); } + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { @@ -1684,11 +2967,15 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: } }; let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); dlg.pre_request(); req.send() @@ -1739,14 +3026,23 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: } - /// The name of the operation resource. /// - /// Sets the *name* path property to the given 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 name(mut self, new_value: &str) -> OperationGetCall<'a, C, A> { - self._name = new_value.to_string(); + pub fn request(mut self, new_value: GetEffectiveOrgPolicyRequest) -> FolderGetEffectiveOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// The name of the resource to start computing the effective `Policy`. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> FolderGetEffectiveOrgPolicyCall<'a, C, A> { + self._resource = new_value.to_string(); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -1755,7 +3051,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// 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 Delegate) -> OperationGetCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> FolderGetEffectiveOrgPolicyCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -1774,15 +3070,15 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> OperationGetCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> FolderGetEffectiveOrgPolicyCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -1799,7 +3095,2505 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// 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: T) -> OperationGetCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> FolderGetEffectiveOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Clears a `Policy` from a resource. +/// +/// A builder for the *clearOrgPolicy* method supported by a *folder* resource. +/// It is not used directly, but through a `FolderMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::ClearOrgPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = ClearOrgPolicyRequest::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.folders().clear_org_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct FolderClearOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: ClearOrgPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for FolderClearOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> FolderClearOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.folders.clearOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:clearOrgPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ClearOrgPolicyRequest) -> FolderClearOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource for the `Policy` to clear. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> FolderClearOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> FolderClearOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> FolderClearOrgPolicyCall<'a, C, A> + 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 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: T) -> FolderClearOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists `Constraints` that could be applied on the specified resource. +/// +/// A builder for the *listAvailableOrgPolicyConstraints* method supported by a *folder* resource. +/// It is not used directly, but through a `FolderMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::ListAvailableOrgPolicyConstraintsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = ListAvailableOrgPolicyConstraintsRequest::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.folders().list_available_org_policy_constraints(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct FolderListAvailableOrgPolicyConstraintCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: ListAvailableOrgPolicyConstraintsRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for FolderListAvailableOrgPolicyConstraintCall<'a, C, A> {} + +impl<'a, C, A> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListAvailableOrgPolicyConstraintsResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.folders.listAvailableOrgPolicyConstraints", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:listAvailableOrgPolicyConstraints".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ListAvailableOrgPolicyConstraintsRequest) -> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource to list `Constraints` for. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> + 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 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: T) -> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets a `Policy` on a resource. +/// +/// If no `Policy` is set on the resource, a `Policy` is returned with default +/// values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The +/// `etag` value can be used with `SetOrgPolicy()` to create or update a +/// `Policy` during read-modify-write. +/// +/// A builder for the *getOrgPolicy* method supported by a *folder* resource. +/// It is not used directly, but through a `FolderMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::GetOrgPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = GetOrgPolicyRequest::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.folders().get_org_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct FolderGetOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: GetOrgPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for FolderGetOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> FolderGetOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, OrgPolicy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.folders.getOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:getOrgPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: GetOrgPolicyRequest) -> FolderGetOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource the `Policy` is set on. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> FolderGetOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> FolderGetOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> FolderGetOrgPolicyCall<'a, C, A> + 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 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: T) -> FolderGetOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates the specified `Policy` on the resource. Creates a new `Policy` for +/// that `Constraint` on the resource if one does not exist. +/// +/// Not supplying an `etag` on the request `Policy` results in an unconditional +/// write of the `Policy`. +/// +/// A builder for the *setOrgPolicy* method supported by a *folder* resource. +/// It is not used directly, but through a `FolderMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::SetOrgPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = SetOrgPolicyRequest::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.folders().set_org_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct FolderSetOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: SetOrgPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for FolderSetOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> FolderSetOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, OrgPolicy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.folders.setOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:setOrgPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SetOrgPolicyRequest) -> FolderSetOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Resource name of the resource to attach the `Policy`. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> FolderSetOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> FolderSetOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> FolderSetOrgPolicyCall<'a, C, A> + 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 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: T) -> FolderSetOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists all the `Policies` set for a particular resource. +/// +/// A builder for the *listOrgPolicies* method supported by a *folder* resource. +/// It is not used directly, but through a `FolderMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::ListOrgPoliciesRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = ListOrgPoliciesRequest::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.folders().list_org_policies(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct FolderListOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: ListOrgPoliciesRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for FolderListOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> FolderListOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListOrgPoliciesResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.folders.listOrgPolicies", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:listOrgPolicies".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ListOrgPoliciesRequest) -> FolderListOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource to list Policies for. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> FolderListOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> FolderListOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> FolderListOrgPolicyCall<'a, C, A> + 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 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: T) -> FolderListOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Clears a `Policy` from a resource. +/// +/// A builder for the *clearOrgPolicy* method supported by a *organization* resource. +/// It is not used directly, but through a `OrganizationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::ClearOrgPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = ClearOrgPolicyRequest::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.organizations().clear_org_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct OrganizationClearOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: ClearOrgPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for OrganizationClearOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> OrganizationClearOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.clearOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:clearOrgPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ClearOrgPolicyRequest) -> OrganizationClearOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource for the `Policy` to clear. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> OrganizationClearOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> OrganizationClearOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> OrganizationClearOrgPolicyCall<'a, C, A> + 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 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: T) -> OrganizationClearOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets a `Policy` on a resource. +/// +/// If no `Policy` is set on the resource, a `Policy` is returned with default +/// values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The +/// `etag` value can be used with `SetOrgPolicy()` to create or update a +/// `Policy` during read-modify-write. +/// +/// A builder for the *getOrgPolicy* method supported by a *organization* resource. +/// It is not used directly, but through a `OrganizationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::GetOrgPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = GetOrgPolicyRequest::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.organizations().get_org_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct OrganizationGetOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: GetOrgPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for OrganizationGetOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> OrganizationGetOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, OrgPolicy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.getOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:getOrgPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: GetOrgPolicyRequest) -> OrganizationGetOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource the `Policy` is set on. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> OrganizationGetOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> OrganizationGetOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> OrganizationGetOrgPolicyCall<'a, C, A> + 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 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: T) -> OrganizationGetOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists `Constraints` that could be applied on the specified resource. +/// +/// A builder for the *listAvailableOrgPolicyConstraints* method supported by a *organization* resource. +/// It is not used directly, but through a `OrganizationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::ListAvailableOrgPolicyConstraintsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = ListAvailableOrgPolicyConstraintsRequest::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.organizations().list_available_org_policy_constraints(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: ListAvailableOrgPolicyConstraintsRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> {} + +impl<'a, C, A> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListAvailableOrgPolicyConstraintsResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:listAvailableOrgPolicyConstraints".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ListAvailableOrgPolicyConstraintsRequest) -> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource to list `Constraints` for. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> + 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 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: T) -> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists all the `Policies` set for a particular resource. +/// +/// A builder for the *listOrgPolicies* method supported by a *organization* resource. +/// It is not used directly, but through a `OrganizationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::ListOrgPoliciesRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = ListOrgPoliciesRequest::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.organizations().list_org_policies(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct OrganizationListOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: ListOrgPoliciesRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for OrganizationListOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> OrganizationListOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListOrgPoliciesResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.listOrgPolicies", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:listOrgPolicies".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ListOrgPoliciesRequest) -> OrganizationListOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource to list Policies for. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> OrganizationListOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> OrganizationListOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> OrganizationListOrgPolicyCall<'a, C, A> + 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 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: T) -> OrganizationListOrgPolicyCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -2018,8 +5812,7 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> OrganizationSetIamPolicyCall<'a, C, A> @@ -2087,6 +5880,771 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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.organizations().get("name") +/// .doit(); +/// # } +/// ``` +pub struct OrganizationGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for OrganizationGetCall<'a, C, A> {} + +impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Organization)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The resource name of the Organization to fetch, e.g. "organizations/1234". + /// + /// 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) -> OrganizationGetCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> OrganizationGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> OrganizationGetCall<'a, C, A> + 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 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: T) -> OrganizationGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets the effective `Policy` on a resource. This is the result of merging +/// `Policies` in the resource hierarchy. The returned `Policy` will not have +/// an `etag`set because it is a computed `Policy` across multiple resources. +/// +/// A builder for the *getEffectiveOrgPolicy* method supported by a *organization* resource. +/// It is not used directly, but through a `OrganizationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::GetEffectiveOrgPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = GetEffectiveOrgPolicyRequest::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.organizations().get_effective_org_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct OrganizationGetEffectiveOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: GetEffectiveOrgPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for OrganizationGetEffectiveOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, OrgPolicy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.getEffectiveOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:getEffectiveOrgPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: GetEffectiveOrgPolicyRequest) -> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// The name of the resource to start computing the effective `Policy`. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> + 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 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: T) -> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Searches Organization resources that are visible to the user and satisfy +/// the specified filter. This method returns Organizations in an unspecified +/// order. New Organizations do not necessarily appear at the end of the +/// results. +/// +/// A builder for the *search* method supported by a *organization* resource. +/// It is not used directly, but through a `OrganizationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::SearchOrganizationsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = SearchOrganizationsRequest::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.organizations().search(req) +/// .doit(); +/// # } +/// ``` +pub struct OrganizationSearchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: SearchOrganizationsRequest, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for OrganizationSearchCall<'a, C, A> {} + +impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SearchOrganizationsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.search", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/organizations:search".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SearchOrganizationsRequest) -> OrganizationSearchCall<'a, C, A> { + self._request = 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. + /// + /// 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 Delegate) -> OrganizationSearchCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> OrganizationSearchCall<'a, C, A> + 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 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: T) -> OrganizationSearchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Gets the access control policy for an Organization resource. May be empty /// if no such policy or resource exists. The `resource` field should be the /// organization's resource name, e.g. "organizations/123". @@ -2298,8 +6856,7 @@ impl<'a, C, A> OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> OrganizationGetIamPolicyCall<'a, C, A> @@ -2578,8 +7135,7 @@ impl<'a, C, A> OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> OrganizationTestIamPermissionCall<'a, C, A> @@ -2647,9 +7203,13 @@ impl<'a, C, A> OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut::default(), None); /// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = SetOrgPolicyRequest::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.organizations().get("name") +/// let result = hub.organizations().set_org_policy(req, "resource") /// .doit(); /// # } /// ``` -pub struct OrganizationGetCall<'a, C, A> +pub struct OrganizationSetOrgPolicyCall<'a, C, A> where C: 'a, A: 'a { hub: &'a CloudResourceManager, - _name: String, + _request: SetOrgPolicyRequest, + _resource: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for OrganizationGetCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for OrganizationSetOrgPolicyCall<'a, C, A> {} -impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> OrganizationSetOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Organization)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, OrgPolicy)> { use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; @@ -2702,11 +7269,11 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("name", self._name.to_string())); - for &field in ["alt", "name"].iter() { + dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.setOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2718,12 +7285,12 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+name}".to_string(); + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:setOrgPolicy".to_string(); if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{+name}", "name")].iter() { + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { let mut replace_with = String::new(); for &(name, ref value) in params.iter() { if name == param_name { @@ -2738,7 +7305,7 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, } { let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["name"].iter() { + for param_name in ["resource"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -2753,6 +7320,17 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, url.push_str(&url::form_urlencoded::serialize(params)); } + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { @@ -2769,11 +7347,15 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, } }; let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); dlg.pre_request(); req.send() @@ -2824,14 +7406,23 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, } - /// The resource name of the Organization to fetch, e.g. "organizations/1234". /// - /// Sets the *name* path property to the given 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 name(mut self, new_value: &str) -> OrganizationGetCall<'a, C, A> { - self._name = new_value.to_string(); + pub fn request(mut self, new_value: SetOrgPolicyRequest) -> OrganizationSetOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Resource name of the resource to attach the `Policy`. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> OrganizationSetOrgPolicyCall<'a, C, A> { + self._resource = new_value.to_string(); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -2840,7 +7431,7 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, /// 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 Delegate) -> OrganizationGetCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> OrganizationSetOrgPolicyCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -2859,15 +7450,15 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> OrganizationGetCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> OrganizationSetOrgPolicyCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -2884,7 +7475,7 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, /// 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: T) -> OrganizationGetCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> OrganizationSetOrgPolicyCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -2892,13 +7483,16 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, } -/// Searches Organization resources that are visible to the user and satisfy -/// the specified filter. This method returns Organizations in an unspecified -/// order. New Organizations do not necessarily appear at the end of the -/// results. +/// Create a Lien which applies to the resource denoted by the `parent` field. +/// +/// Callers of this method will require permission on the `parent` resource. +/// For example, applying to `projects/1234` requires permission +/// `resourcemanager.projects.updateLiens`. +/// +/// NOTE: Some resources may limit the number of Liens which may be applied. /// -/// A builder for the *search* method supported by a *organization* resource. -/// It is not used directly, but through a `OrganizationMethods` instance. +/// A builder for the *create* method supported by a *lien* resource. +/// It is not used directly, but through a `LienMethods` instance. /// /// # Example /// @@ -2908,7 +7502,7 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; -/// use cloudresourcemanager1::SearchOrganizationsRequest; +/// use cloudresourcemanager1::Lien; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -2922,32 +7516,32 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, /// // 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 = SearchOrganizationsRequest::default(); +/// let mut req = Lien::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.organizations().search(req) +/// let result = hub.liens().create(req) /// .doit(); /// # } /// ``` -pub struct OrganizationSearchCall<'a, C, A> +pub struct LienCreateCall<'a, C, A> where C: 'a, A: 'a { hub: &'a CloudResourceManager, - _request: SearchOrganizationsRequest, + _request: Lien, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for OrganizationSearchCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for LienCreateCall<'a, C, A> {} -impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> LienCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, SearchOrganizationsResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, Lien)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -2955,7 +7549,7 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "cloudresourcemanager.organizations.search", + dlg.begin(MethodInfo { id: "cloudresourcemanager.liens.create", http_method: hyper::method::Method::Post }); let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); for &field in ["alt"].iter() { @@ -2970,7 +7564,7 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut OrganizationSearchCall<'a, C, A> where C: BorrowMut OrganizationSearchCall<'a, C, A> { + pub fn request(mut self, new_value: Lien) -> LienCreateCall<'a, C, A> { self._request = new_value; self } @@ -3082,7 +7676,7 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut OrganizationSearchCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> LienCreateCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -3101,15 +7695,15 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> OrganizationSearchCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> LienCreateCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -3126,7 +7720,7 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSearchCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> LienCreateCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -3134,9 +7728,530 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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.liens().delete("name") +/// .doit(); +/// # } +/// ``` +pub struct LienDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for LienDeleteCall<'a, C, A> {} + +impl<'a, C, A> LienDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.liens.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The name/identifier of the Lien to delete. + /// + /// 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) -> LienDeleteCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> LienDeleteCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> LienDeleteCall<'a, C, A> + 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 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: T) -> LienDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// List all Liens applied to the `parent` resource. +/// +/// Callers of this method will require permission on the `parent` resource. +/// For example, a Lien with a `parent` of `projects/1234` requires permission +/// `resourcemanager.projects.get`. +/// +/// A builder for the *list* method supported by a *lien* resource. +/// It is not used directly, but through a `LienMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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.liens().list() +/// .parent("ipsum") +/// .page_token("Lorem") +/// .page_size(-21) +/// .doit(); +/// # } +/// ``` +pub struct LienListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _parent: Option, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for LienListCall<'a, C, A> {} + +impl<'a, C, A> LienListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListLiensResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.liens.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + if let Some(value) = self._parent { + params.push(("parent", value.to_string())); + } + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "parent", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/liens".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The name of the resource to list all attached Liens. + /// For example, `projects/1234`. + /// + /// Sets the *parent* query property to the given value. + pub fn parent(mut self, new_value: &str) -> LienListCall<'a, C, A> { + self._parent = Some(new_value.to_string()); + self + } + /// The `next_page_token` value returned from a previous List request, if any. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> LienListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of items to return. This is a suggestion for the server. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> LienListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> LienListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> LienListCall<'a, C, A> + 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 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: T) -> LienListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Marks the Project identified by the specified +/// `project_id` (for example, `my-project-123`) for deletion. +/// This method will only affect the Project if the following criteria are met: +/// +/// + The Project does not have a billing account associated with it. +/// + The Project has a lifecycle state of +/// ACTIVE. +/// +/// This method changes the Project's lifecycle state from +/// ACTIVE +/// to DELETE_REQUESTED. +/// The deletion starts at an unspecified time, +/// at which point the Project is no longer accessible. +/// +/// Until the deletion completes, you can check the lifecycle state +/// checked by retrieving the Project with GetProject, +/// and the Project remains visible to ListProjects. +/// However, you cannot update the project. +/// +/// After the deletion completes, the Project is not retrievable by +/// the GetProject and +/// ListProjects methods. +/// +/// The caller must have modify permissions for this Project. +/// +/// A builder for the *delete* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example @@ -3147,7 +8262,251 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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.projects().delete("projectId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _project_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectDeleteCall<'a, C, A> {} + +impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + for &field in ["alt", "projectId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects/{projectId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The Project ID (for example, `foo-bar-123`). + /// + /// Required. + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectDeleteCall<'a, C, A> { + self._project_id = 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. + /// + /// 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 Delegate) -> ProjectDeleteCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectDeleteCall<'a, C, A> + 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 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: T) -> ProjectDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns the IAM access control policy for the specified Project. +/// Permission is denied if the policy or the resource does not exist. +/// +/// A builder for the *getIamPolicy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::GetIamPolicyRequest; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -3161,33 +8520,33 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut +pub struct ProjectGetIamPolicyCall<'a, C, A> where C: 'a, A: 'a { hub: &'a CloudResourceManager, - _request: TestIamPermissionsRequest, + _request: GetIamPolicyRequest, _resource: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectTestIamPermissionCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectGetIamPolicyCall<'a, C, A> {} -impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, TestIamPermissionsResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -3195,7 +8554,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.testIamPermissions", + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.getIamPolicy", http_method: hyper::method::Method::Post }); let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("resource", self._resource.to_string())); @@ -3211,7 +8570,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTestIamPermissionCall<'a, C, A> { + pub fn request(mut self, new_value: GetIamPolicyRequest) -> ProjectGetIamPolicyCall<'a, C, A> { self._request = new_value; self } - /// REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// REQUIRED: The resource for which the policy is being requested. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectTestIamPermissionCall<'a, C, A> { + pub fn resource(mut self, new_value: &str) -> ProjectGetIamPolicyCall<'a, C, A> { self._resource = new_value.to_string(); self } @@ -3356,7 +8714,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTestIamPermissionCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectGetIamPolicyCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -3375,15 +8733,15 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectTestIamPermissionCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectGetIamPolicyCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -3400,7 +8758,1090 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTestIamPermissionCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectGetIamPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Request that a new Project be created. The result is an Operation which +/// can be used to track the creation process. It is automatically deleted +/// after a few hours, so there is no need to call DeleteOperation. +/// +/// Our SLO permits Project creation to take up to 30 seconds at the 90th +/// percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile +/// latency. 95th percentile latency is around 11 seconds. We recommend +/// polling at the 5th second with an exponential backoff. +/// +/// A builder for the *create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::Project; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = Project::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.projects().create(req) +/// .doit(); +/// # } +/// ``` +pub struct ProjectCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: Project, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Project) -> ProjectCreateCall<'a, C, A> { + self._request = 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. + /// + /// 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 Delegate) -> ProjectCreateCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectCreateCall<'a, C, A> + 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 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: T) -> ProjectCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets a `Policy` on a resource. +/// +/// If no `Policy` is set on the resource, a `Policy` is returned with default +/// values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The +/// `etag` value can be used with `SetOrgPolicy()` to create or update a +/// `Policy` during read-modify-write. +/// +/// A builder for the *getOrgPolicy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::GetOrgPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = GetOrgPolicyRequest::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.projects().get_org_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectGetOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: GetOrgPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectGetOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> ProjectGetOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, OrgPolicy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.getOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:getOrgPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: GetOrgPolicyRequest) -> ProjectGetOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource the `Policy` is set on. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectGetOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectGetOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectGetOrgPolicyCall<'a, C, A> + 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 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: T) -> ProjectGetOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates the specified `Policy` on the resource. Creates a new `Policy` for +/// that `Constraint` on the resource if one does not exist. +/// +/// Not supplying an `etag` on the request `Policy` results in an unconditional +/// write of the `Policy`. +/// +/// A builder for the *setOrgPolicy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::SetOrgPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = SetOrgPolicyRequest::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.projects().set_org_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectSetOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: SetOrgPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectSetOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> ProjectSetOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, OrgPolicy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.setOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:setOrgPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SetOrgPolicyRequest) -> ProjectSetOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Resource name of the resource to attach the `Policy`. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectSetOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectSetOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectSetOrgPolicyCall<'a, C, A> + 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 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: T) -> ProjectSetOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Clears a `Policy` from a resource. +/// +/// A builder for the *clearOrgPolicy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::ClearOrgPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = ClearOrgPolicyRequest::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.projects().clear_org_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectClearOrgPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: ClearOrgPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectClearOrgPolicyCall<'a, C, A> {} + +impl<'a, C, A> ProjectClearOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.clearOrgPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:clearOrgPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ClearOrgPolicyRequest) -> ProjectClearOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource for the `Policy` to clear. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectClearOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectClearOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectClearOrgPolicyCall<'a, C, A> + 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 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: T) -> ProjectClearOrgPolicyCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -3655,12 +10096,12 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectUndeleteCall<'a, C, A> @@ -3688,46 +10129,9 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, } -/// Sets the IAM access control policy for the specified Project. Replaces -/// any existing policy. -/// -/// The following constraints apply when using `setIamPolicy()`: -/// -/// + Project does not support `allUsers` and `allAuthenticatedUsers` as -/// `members` in a `Binding` of a `Policy`. -/// -/// + The owner role can be granted only to `user` and `serviceAccount`. -/// -/// + Service accounts can be made owners of a project directly -/// without any restrictions. However, to be added as an owner, a user must be -/// invited via Cloud Platform console and must accept the invitation. -/// -/// + A user cannot be granted the owner role using `setIamPolicy()`. The user -/// must be granted the owner role using the Cloud Platform Console and must -/// explicitly accept the invitation. -/// -/// + Invitations to grant the owner role cannot be sent using -/// `setIamPolicy()`; -/// they must be sent only using the Cloud Platform Console. -/// -/// + Membership changes that leave the project without any owners that have -/// accepted the Terms of Service (ToS) will be rejected. -/// -/// + There must be at least one owner who has accepted the Terms of -/// Service (ToS) agreement in the policy. Calling `setIamPolicy()` to -/// to remove the last ToS-accepted owner from the policy will fail. This -/// restriction also applies to legacy projects that no longer have owners -/// who have accepted the ToS. Edits to IAM policies will be rejected until -/// the lack of a ToS-accepting owner is rectified. -/// -/// + Calling this method requires enabling the App Engine Admin API. -/// -/// Note: Removing service accounts from policies or changing their roles -/// can render services completely inoperable. It is important to understand -/// how the service account is being used before removing or updating its -/// roles. +/// Lists all the `Policies` set for a particular resource. /// -/// A builder for the *setIamPolicy* method supported by a *project* resource. +/// A builder for the *listOrgPolicies* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example @@ -3738,7 +10142,7 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; -/// use cloudresourcemanager1::SetIamPolicyRequest; +/// use cloudresourcemanager1::ListOrgPoliciesRequest; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -3752,33 +10156,34 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, /// // 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 = SetIamPolicyRequest::default(); +/// let mut req = ListOrgPoliciesRequest::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.projects().set_iam_policy(req, "resource") +/// let result = hub.projects().list_org_policies(req, "resource") /// .doit(); /// # } /// ``` -pub struct ProjectSetIamPolicyCall<'a, C, A> +pub struct ProjectListOrgPolicyCall<'a, C, A> where C: 'a, A: 'a { hub: &'a CloudResourceManager, - _request: SetIamPolicyRequest, + _request: ListOrgPoliciesRequest, _resource: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectSetIamPolicyCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectListOrgPolicyCall<'a, C, A> {} -impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectListOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, ListOrgPoliciesResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -3786,7 +10191,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.setIamPolicy", + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.listOrgPolicies", http_method: hyper::method::Method::Post }); let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("resource", self._resource.to_string())); @@ -3802,7 +10207,282 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ListOrgPoliciesRequest) -> ProjectListOrgPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource to list Policies for. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectListOrgPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectListOrgPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectListOrgPolicyCall<'a, C, A> + 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 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: T) -> ProjectListOrgPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns permissions that a caller has on the specified Project. +/// +/// A builder for the *testIamPermissions* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::TestIamPermissionsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = TestIamPermissionsRequest::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.projects().test_iam_permissions(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectTestIamPermissionCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: TestIamPermissionsRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectTestIamPermissionCall<'a, C, A> {} + +impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TestIamPermissionsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.testIamPermissions", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects/{resource}:testIamPermissions".to_string(); if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3925,19 +10605,18 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSetIamPolicyCall<'a, C, A> { + pub fn request(mut self, new_value: TestIamPermissionsRequest) -> ProjectTestIamPermissionCall<'a, C, A> { self._request = new_value; self } - /// REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// REQUIRED: The resource for which the policy detail is being requested. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectSetIamPolicyCall<'a, C, A> { + pub fn resource(mut self, new_value: &str) -> ProjectTestIamPermissionCall<'a, C, A> { self._resource = new_value.to_string(); self } @@ -3947,7 +10626,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSetIamPolicyCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectTestIamPermissionCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -3966,15 +10645,15 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectSetIamPolicyCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectTestIamPermissionCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -3991,7 +10670,283 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSetIamPolicyCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectTestIamPermissionCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists `Constraints` that could be applied on the specified resource. +/// +/// A builder for the *listAvailableOrgPolicyConstraints* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::ListAvailableOrgPolicyConstraintsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = ListAvailableOrgPolicyConstraintsRequest::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.projects().list_available_org_policy_constraints(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: ListAvailableOrgPolicyConstraintsRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> {} + +impl<'a, C, A> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListAvailableOrgPolicyConstraintsResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.listAvailableOrgPolicyConstraints", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+resource}:listAvailableOrgPolicyConstraints".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ListAvailableOrgPolicyConstraintsRequest) -> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the resource to list `Constraints` for. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> + 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 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: T) -> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -4212,12 +11167,12 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectGetCall<'a, C, A> @@ -4245,6 +11200,589 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } +/// Lists Projects that are visible to the user and satisfy the +/// specified filter. This method returns Projects in an unspecified order. +/// New Projects do not necessarily appear at the end of the list. +/// +/// A builder for the *list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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.projects().list() +/// .page_token("amet") +/// .page_size(-60) +/// .filter("labore") +/// .doit(); +/// # } +/// ``` +pub struct ProjectListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _page_token: Option, + _page_size: Option, + _filter: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectListCall<'a, C, A> {} + +impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListProjectsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._filter { + params.push(("filter", value.to_string())); + } + for &field in ["alt", "pageToken", "pageSize", "filter"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A pagination token returned from a previous call to ListProjects + /// that indicates from where listing should continue. + /// + /// Optional. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of Projects to return in the response. + /// The server can return fewer Projects than requested. + /// If unspecified, server picks an appropriate default. + /// + /// Optional. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// An expression for filtering the results of the request. Filter rules are + /// case insensitive. The fields eligible for filtering are: + /// + /// + `name` + /// + `id` + /// + labels.key where *key* is the name of a label + /// + /// Some examples of using labels as filters: + /// + /// |Filter|Description| + /// |------|-----------| + /// |name:how*|The project's name starts with "how".| + /// |name:Howl|The project's name is `Howl` or `howl`.| + /// |name:HOWL|Equivalent to above.| + /// |NAME:howl|Equivalent to above.| + /// |labels.color:*|The project has the label `color`.| + /// |labels.color:red|The project's label `color` has the value `red`.| + /// |labels.color:red labels.size:big|The project's label `color` has the + /// value `red` and its label `size` has the value `big`. + /// + /// Optional. + /// + /// Sets the *filter* query property to the given value. + pub fn filter(mut self, new_value: &str) -> ProjectListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectListCall<'a, C, A> + 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 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: T) -> ProjectListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Sets the IAM access control policy for the specified Project. Replaces +/// any existing policy. +/// +/// The following constraints apply when using `setIamPolicy()`: +/// +/// + Project does not support `allUsers` and `allAuthenticatedUsers` as +/// `members` in a `Binding` of a `Policy`. +/// +/// + The owner role can be granted only to `user` and `serviceAccount`. +/// +/// + Service accounts can be made owners of a project directly +/// without any restrictions. However, to be added as an owner, a user must be +/// invited via Cloud Platform console and must accept the invitation. +/// +/// + A user cannot be granted the owner role using `setIamPolicy()`. The user +/// must be granted the owner role using the Cloud Platform Console and must +/// explicitly accept the invitation. +/// +/// + Invitations to grant the owner role cannot be sent using +/// `setIamPolicy()`; +/// they must be sent only using the Cloud Platform Console. +/// +/// + Membership changes that leave the project without any owners that have +/// accepted the Terms of Service (ToS) will be rejected. +/// +/// + There must be at least one owner who has accepted the Terms of +/// Service (ToS) agreement in the policy. Calling `setIamPolicy()` to +/// remove the last ToS-accepted owner from the policy will fail. This +/// restriction also applies to legacy projects that no longer have owners +/// who have accepted the ToS. Edits to IAM policies will be rejected until +/// the lack of a ToS-accepting owner is rectified. +/// +/// + Calling this method requires enabling the App Engine Admin API. +/// +/// Note: Removing service accounts from policies or changing their roles +/// can render services completely inoperable. It is important to understand +/// how the service account is being used before removing or updating its +/// roles. +/// +/// A builder for the *setIamPolicy* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; +/// use cloudresourcemanager1::SetIamPolicyRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use cloudresourcemanager1::CloudResourceManager; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = SetIamPolicyRequest::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.projects().set_iam_policy(req, "resource") +/// .doit(); +/// # } +/// ``` +pub struct ProjectSetIamPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a CloudResourceManager, + _request: SetIamPolicyRequest, + _resource: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectSetIamPolicyCall<'a, C, A> {} + +impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.setIamPolicy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("resource", self._resource.to_string())); + for &field in ["alt", "resource"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects/{resource}:setIamPolicy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{resource}", "resource")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resource"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SetIamPolicyRequest) -> ProjectSetIamPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// REQUIRED: The resource for which the policy is being specified. + /// See the operation documentation for the appropriate value for this field. + /// + /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectSetIamPolicyCall<'a, C, A> { + self._resource = 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. + /// + /// 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 Delegate) -> ProjectSetIamPolicyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectSetIamPolicyCall<'a, C, A> + 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 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: T) -> ProjectSetIamPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Gets a list of ancestors in the resource hierarchy for the Project /// identified by the specified `project_id` (for example, `my-project-123`). /// @@ -4489,12 +12027,12 @@ impl<'a, C, A> ProjectGetAncestryCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectGetAncestryCall<'a, C, A> @@ -4766,12 +12304,12 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectUpdateCall<'a, C, A> @@ -4799,10 +12337,11 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: } -/// Returns the IAM access control policy for the specified Project. -/// Permission is denied if the policy or the resource does not exist. +/// Gets the effective `Policy` on a resource. This is the result of merging +/// `Policies` in the resource hierarchy. The returned `Policy` will not have +/// an `etag`set because it is a computed `Policy` across multiple resources. /// -/// A builder for the *getIamPolicy* method supported by a *project* resource. +/// A builder for the *getEffectiveOrgPolicy* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example @@ -4813,7 +12352,7 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; -/// use cloudresourcemanager1::GetIamPolicyRequest; +/// use cloudresourcemanager1::GetEffectiveOrgPolicyRequest; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -4827,33 +12366,34 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// // 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 = GetIamPolicyRequest::default(); +/// let mut req = GetEffectiveOrgPolicyRequest::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.projects().get_iam_policy(req, "resource") +/// let result = hub.projects().get_effective_org_policy(req, "resource") /// .doit(); /// # } /// ``` -pub struct ProjectGetIamPolicyCall<'a, C, A> +pub struct ProjectGetEffectiveOrgPolicyCall<'a, C, A> where C: 'a, A: 'a { hub: &'a CloudResourceManager, - _request: GetIamPolicyRequest, + _request: GetEffectiveOrgPolicyRequest, _resource: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectGetIamPolicyCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectGetEffectiveOrgPolicyCall<'a, C, A> {} -impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectGetEffectiveOrgPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, OrgPolicy)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -4861,7 +12401,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.getIamPolicy", + dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.getEffectiveOrgPolicy", http_method: hyper::method::Method::Post }); let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("resource", self._resource.to_string())); @@ -4877,20 +12417,23 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut = None; + for &(find_this, param_name) in [("{+resource}", "resource")].iter() { + let mut replace_with = String::new(); for &(name, ref value) in params.iter() { if name == param_name { - replace_with = Some(value); + replace_with = value.to_string(); break; } } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); } { let mut indices_for_removal: Vec = Vec::with_capacity(1); @@ -5000,19 +12543,17 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectGetIamPolicyCall<'a, C, A> { + pub fn request(mut self, new_value: GetEffectiveOrgPolicyRequest) -> ProjectGetEffectiveOrgPolicyCall<'a, C, A> { self._request = new_value; self } - /// REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// The name of the resource to start computing the effective `Policy`. /// /// Sets the *resource* 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 resource(mut self, new_value: &str) -> ProjectGetIamPolicyCall<'a, C, A> { + pub fn resource(mut self, new_value: &str) -> ProjectGetEffectiveOrgPolicyCall<'a, C, A> { self._resource = new_value.to_string(); self } @@ -5022,7 +12563,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectGetIamPolicyCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectGetEffectiveOrgPolicyCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -5041,15 +12582,15 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectGetIamPolicyCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectGetEffectiveOrgPolicyCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -5066,7 +12607,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGetIamPolicyCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectGetEffectiveOrgPolicyCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -5074,33 +12615,12 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut +pub struct OperationGetCall<'a, C, A> where C: 'a, A: 'a { hub: &'a CloudResourceManager, - _project_id: String, + _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectDeleteCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for OperationGetCall<'a, C, A> {} -impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -5151,11 +12672,11 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.delete", - http_method: hyper::method::Method::Delete }); + dlg.begin(MethodInfo { id: "cloudresourcemanager.operations.get", + http_method: hyper::method::Method::Get }); let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("projectId", self._project_id.to_string())); - for &field in ["alt", "projectId"].iter() { + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -5167,24 +12688,27 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects/{projectId}".to_string(); + let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+name}".to_string(); if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{projectId}", "projectId")].iter() { - let mut replace_with: Option<&str> = None; + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); for &(name, ref value) in params.iter() { if name == param_name { - replace_with = Some(value); + replace_with = value.to_string(); break; } } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); } { let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["projectId"].iter() { + for param_name in ["name"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -5201,489 +12725,6 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The Project ID (for example, `foo-bar-123`). - /// - /// Required. - /// - /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectDeleteCall<'a, C, A> { - self._project_id = 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. - /// - /// 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 Delegate) -> ProjectDeleteCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> ProjectDeleteCall<'a, C, A> - 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 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: T) -> ProjectDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Request that a new Project be created. The result is an Operation which -/// can be used to track the creation process. It is automatically deleted -/// after a few hours, so there is no need to call DeleteOperation. -/// -/// Our SLO permits Project creation to take up to 30 seconds at the 90th -/// percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile -/// latency. 95th percentile latency is around 11 seconds. We recommend -/// polling at the 5th second with an exponential backoff. -/// -/// A builder for the *create* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; -/// use cloudresourcemanager1::Project; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1::CloudResourceManager; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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 = Project::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.projects().create(req) -/// .doit(); -/// # } -/// ``` -pub struct ProjectCreateCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a CloudResourceManager, - _request: Project, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ProjectCreateCall<'a, C, A> {} - -impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.create", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - for &field in ["alt"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: Project) -> ProjectCreateCall<'a, C, A> { - self._request = 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. - /// - /// 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 Delegate) -> ProjectCreateCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> ProjectCreateCall<'a, C, A> - 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 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: T) -> ProjectCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Lists Projects that are visible to the user and satisfy the -/// specified filter. This method returns Projects in an unspecified order. -/// New Projects do not necessarily appear at the end of the list. -/// -/// A builder for the *list* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_cloudresourcemanager1 as cloudresourcemanager1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1::CloudResourceManager; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), 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.projects().list() -/// .page_token("justo") -/// .page_size(-34) -/// .filter("et") -/// .doit(); -/// # } -/// ``` -pub struct ProjectListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a CloudResourceManager, - _page_token: Option, - _page_size: Option, - _filter: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ProjectListCall<'a, C, A> {} - -impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ListProjectsResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "cloudresourcemanager.projects.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - if let Some(value) = self._page_token { - params.push(("pageToken", value.to_string())); - } - if let Some(value) = self._page_size { - params.push(("pageSize", value.to_string())); - } - if let Some(value) = self._filter { - params.push(("filter", value.to_string())); - } - for &field in ["alt", "pageToken", "pageSize", "filter"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - loop { let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { Ok(token) => token, @@ -5753,52 +12794,14 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } - /// A pagination token returned from a previous call to ListProjects - /// that indicates from where listing should continue. - /// - /// Optional. + /// The name of the operation resource. /// - /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> ProjectListCall<'a, C, A> { - self._page_token = Some(new_value.to_string()); - self - } - /// The maximum number of Projects to return in the response. - /// The server can return fewer Projects than requested. - /// If unspecified, server picks an appropriate default. - /// - /// Optional. + /// Sets the *name* path property to the given value. /// - /// Sets the *page size* query property to the given value. - pub fn page_size(mut self, new_value: i32) -> ProjectListCall<'a, C, A> { - self._page_size = Some(new_value); - self - } - /// An expression for filtering the results of the request. Filter rules are - /// case insensitive. The fields eligible for filtering are: - /// - /// + `name` - /// + `id` - /// + labels.key where *key* is the name of a label - /// - /// Some examples of using labels as filters: - /// - /// |Filter|Description| - /// |------|-----------| - /// |name:*|The project has a name.| - /// |name:Howl|The project's name is `Howl` or `howl`.| - /// |name:HOWL|Equivalent to above.| - /// |NAME:howl|Equivalent to above.| - /// |labels.color:*|The project has the label `color`.| - /// |labels.color:red|The project's label `color` has the value `red`.| - /// |labels.color:red label.size:big|The project's label `color` has the - /// value `red` and its label `size` has the value `big`. - /// - /// Optional. - /// - /// Sets the *filter* query property to the given value. - pub fn filter(mut self, new_value: &str) -> ProjectListCall<'a, C, A> { - self._filter = Some(new_value.to_string()); + /// 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) -> OperationGetCall<'a, C, A> { + self._name = new_value.to_string(); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -5807,7 +12810,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// 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 Delegate) -> ProjectListCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> OperationGetCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -5826,15 +12829,15 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> ProjectListCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> OperationGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -5851,7 +12854,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// 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: T) -> ProjectListCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> OperationGetCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self diff --git a/gen/cloudresourcemanager1_beta1-cli/Cargo.toml b/gen/cloudresourcemanager1_beta1-cli/Cargo.toml index 3fcc4a1e10..459bb78707 100644 --- a/gen/cloudresourcemanager1_beta1-cli/Cargo.toml +++ b/gen/cloudresourcemanager1_beta1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudresourcemanager1_beta1-cli" -version = "1.0.4+20161212" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud Resource Manager (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1_beta1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-cloudresourcemanager1_beta1] path = "../cloudresourcemanager1_beta1" -version = "1.0.4+20161212" +version = "1.0.4+20170517" diff --git a/gen/cloudresourcemanager1_beta1-cli/README.md b/gen/cloudresourcemanager1_beta1-cli/README.md index a3b8328147..61de787b2b 100644 --- a/gen/cloudresourcemanager1_beta1-cli/README.md +++ b/gen/cloudresourcemanager1_beta1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Cloud Resource Manager* API at revision *20161212*. The CLI is at version *1.0.4*. +This documentation was generated from the *Cloud Resource Manager* API at revision *20170517*. The CLI is at version *1.0.4*. ```bash cloudresourcemanager1-beta1 [options] diff --git a/gen/cloudresourcemanager1_beta1-cli/mkdocs.yml b/gen/cloudresourcemanager1_beta1-cli/mkdocs.yml index 8789eb1e8b..85e9cc2637 100644 --- a/gen/cloudresourcemanager1_beta1-cli/mkdocs.yml +++ b/gen/cloudresourcemanager1_beta1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Cloud Resource Manager v1.0.4+20161212 +site_name: Cloud Resource Manager v1.0.4+20170517 site_url: http://byron.github.io/google-apis-rs/google-cloudresourcemanager1_beta1-cli site_description: A complete library to interact with Cloud Resource Manager (protocol v1beta1) diff --git a/gen/cloudresourcemanager1_beta1-cli/src/main.rs b/gen/cloudresourcemanager1_beta1-cli/src/main.rs index dfcdd6b834..cee16ab833 100644 --- a/gen/cloudresourcemanager1_beta1-cli/src/main.rs +++ b/gen/cloudresourcemanager1_beta1-cli/src/main.rs @@ -273,8 +273,9 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "update-mask" => Some(("updateMask", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "version"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "update-mask", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -537,9 +538,9 @@ impl<'n> Engine<'n> { "parent.id" => Some(("parent.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "labels" => Some(("labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), - "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "lifecycle-state" => Some(("lifecycleState", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "project-number" => Some(("projectNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "lifecycle-state" => Some(("lifecycleState", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "id", "labels", "lifecycle-state", "name", "parent", "project-id", "project-number", "type"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -964,8 +965,9 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "update-mask" => Some(("updateMask", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "version"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "update-mask", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1222,9 +1224,9 @@ impl<'n> Engine<'n> { "parent.id" => Some(("parent.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "labels" => Some(("labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), - "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "lifecycle-state" => Some(("lifecycleState", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "project-number" => Some(("projectNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "lifecycle-state" => Some(("lifecycleState", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "id", "labels", "lifecycle-state", "name", "parent", "project-id", "project-number", "type"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -1473,8 +1475,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1523,8 +1524,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being specified. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1555,8 +1555,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy detail is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1755,8 +1754,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1815,15 +1813,15 @@ fn main() { must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. - + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; - they must be sent only using the Cloud Platform Console. + + Invitations to grant the owner role cannot be sent using + `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to - to remove the last ToS-accepted owner from the policy will fail. This + remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. @@ -1832,14 +1830,14 @@ fn main() { Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand - how the service account is being used before removing or updating its roles."##), + how the service account is being used before removing or updating its + roles."##), "Details at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1_cli/projects_set-iam-policy", vec![ (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being specified. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1868,8 +1866,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy detail is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1966,7 +1963,7 @@ fn main() { let mut app = App::new("cloudresourcemanager1-beta1") .author("Sebastian Thiel ") - .version("1.0.4+20161212") + .version("1.0.4+20170517") .about("The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1_cli") .arg(Arg::with_name("url") diff --git a/gen/cloudresourcemanager1_beta1/Cargo.toml b/gen/cloudresourcemanager1_beta1/Cargo.toml index b5f52a444a..ed7fd91dd2 100644 --- a/gen/cloudresourcemanager1_beta1/Cargo.toml +++ b/gen/cloudresourcemanager1_beta1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-cloudresourcemanager1_beta1" -version = "1.0.4+20161212" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud Resource Manager (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1_beta1" homepage = "https://cloud.google.com/resource-manager" -documentation = "https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212" +documentation = "https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517" license = "MIT" keywords = ["cloudresourcemanager", "google", "protocol", "web", "api"] diff --git a/gen/cloudresourcemanager1_beta1/README.md b/gen/cloudresourcemanager1_beta1/README.md index ef69523f0a..be141c16da 100644 --- a/gen/cloudresourcemanager1_beta1/README.md +++ b/gen/cloudresourcemanager1_beta1/README.md @@ -5,18 +5,18 @@ DO NOT EDIT ! --> The `google-cloudresourcemanager1_beta1` library allows access to all features of the *Google Cloud Resource Manager* service. -This documentation was generated from *Cloud Resource Manager* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *cloudresourcemanager:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Cloud Resource Manager* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *cloudresourcemanager:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Cloud Resource Manager* *v1_beta1* API can be found at the [official documentation site](https://cloud.google.com/resource-manager). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.CloudResourceManager.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.CloudResourceManager.html) ... -* [organizations](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.Organization.html) - * [*get*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.OrganizationGetCall.html), [*get iam policy*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.OrganizationGetIamPolicyCall.html), [*list*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.OrganizationListCall.html), [*set iam policy*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.OrganizationSetIamPolicyCall.html), [*test iam permissions*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.OrganizationTestIamPermissionCall.html) and [*update*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.OrganizationUpdateCall.html) -* [projects](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.Project.html) - * [*create*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectCreateCall.html), [*delete*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectDeleteCall.html), [*get*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectGetCall.html), [*get ancestry*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectGetAncestryCall.html), [*get iam policy*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectGetIamPolicyCall.html), [*list*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectListCall.html), [*set iam policy*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectSetIamPolicyCall.html), [*test iam permissions*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectTestIamPermissionCall.html), [*undelete*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectUndeleteCall.html) and [*update*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.ProjectUpdateCall.html) +* [organizations](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.Organization.html) + * [*get*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.OrganizationGetCall.html), [*get iam policy*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.OrganizationGetIamPolicyCall.html), [*list*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.OrganizationListCall.html), [*set iam policy*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.OrganizationSetIamPolicyCall.html), [*test iam permissions*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.OrganizationTestIamPermissionCall.html) and [*update*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.OrganizationUpdateCall.html) +* [projects](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.Project.html) + * [*create*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectCreateCall.html), [*delete*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectDeleteCall.html), [*get*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectGetCall.html), [*get ancestry*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectGetAncestryCall.html), [*get iam policy*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectGetIamPolicyCall.html), [*list*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectListCall.html), [*set iam policy*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectSetIamPolicyCall.html), [*test iam permissions*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectTestIamPermissionCall.html), [*undelete*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectUndeleteCall.html) and [*update*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.ProjectUpdateCall.html) @@ -25,17 +25,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/struct.CloudResourceManager.html)** +* **[Hub](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/struct.CloudResourceManager.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.Part.html)** + * **[Parts](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -129,17 +129,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.Delegate.html), 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-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.ResponseResult.html), 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")`. @@ -149,29 +149,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.CallBuilder.html) 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-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.CallBuilder.html), 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-cloudresourcemanager1_beta1/1.0.4+20161212/google_cloudresourcemanager1_beta1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-cloudresourcemanager1_beta1/1.0.4+20170517/google_cloudresourcemanager1_beta1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/cloudresourcemanager1_beta1/src/lib.rs b/gen/cloudresourcemanager1_beta1/src/lib.rs index 803fbc2704..3cc428f1e9 100644 --- a/gen/cloudresourcemanager1_beta1/src/lib.rs +++ b/gen/cloudresourcemanager1_beta1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Cloud Resource Manager* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *cloudresourcemanager:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Cloud Resource Manager* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *cloudresourcemanager:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Cloud Resource Manager* *v1_beta1* API can be found at the //! [official documentation site](https://cloud.google.com/resource-manager). @@ -353,6 +353,43 @@ impl<'a, C, A> CloudResourceManager // ############ // SCHEMAS ### // ########## +/// Provides the configuration for logging a type of permissions. +/// Example: +/// +/// { +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// "exempted_members": [ +/// "user:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// } +/// ] +/// } +/// +/// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting +/// foo@gmail.com from DATA_READ logging. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AuditLogConfig { + /// Specifies the identities that do not cause logging for this type of + /// permission. + /// Follows the same format of Binding.members. + #[serde(rename="exemptedMembers")] + pub exempted_members: Option>, + /// The log type that this config enables. + #[serde(rename="logType")] + pub log_type: Option, +} + +impl Part for AuditLogConfig {} + + /// Request message for `GetIamPolicy` method. /// /// # Activities @@ -408,6 +445,13 @@ pub struct SetIamPolicyRequest { /// valid policy but certain Cloud Platform services (such as Projects) /// might reject them. pub policy: Option, + /// OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + /// the fields in the mask will be modified. If no mask is provided, the + /// following default mask is used: + /// paths: "bindings, etag" + /// This field is only used by Cloud IAM. + #[serde(rename="updateMask")] + pub update_mask: Option, } impl RequestValue for SetIamPolicyRequest {} @@ -434,7 +478,7 @@ impl ResponseResult for GetAncestryResponse {} /// A Project is a high-level Google Cloud Platform entity. It is a -/// container for ACLs, APIs, AppEngine Apps, VMs, and other +/// container for ACLs, APIs, App Engine Apps, VMs, and other /// Google Cloud Platform resources. /// /// # Activities @@ -461,7 +505,6 @@ pub struct Project { /// hyphen, single-quote, double-quote, space, and exclamation point. /// /// Example: My Project - /// /// Read-write. pub name: Option, /// An optional reference to a parent Resource. @@ -479,7 +522,6 @@ pub struct Project { /// Trailing hyphens are prohibited. /// /// Example: tokyo-rain-123 - /// /// Read-only after creation. #[serde(rename="projectId")] pub project_id: Option, @@ -497,21 +539,19 @@ pub struct Project { /// depend on specific characters being disallowed. /// /// Example: "environment" : "dev" - /// /// Read-write. pub labels: Option>, + /// The number uniquely identifying the project. + /// + /// Example: 415104041262 + /// Read-only. + #[serde(rename="projectNumber")] + pub project_number: Option, /// Creation time. /// /// Read-only. #[serde(rename="createTime")] pub create_time: Option, - /// The number uniquely identifying the project. - /// - /// Example: 415104041262 - /// - /// Read-only. - #[serde(rename="projectNumber")] - pub project_number: Option, /// The Project lifecycle state. /// /// Read-only. @@ -600,6 +640,9 @@ pub struct Policy { /// If no `etag` is provided in the call to `setIamPolicy`, then the existing /// policy is overwritten blindly. pub etag: Option, + /// Specifies cloud audit logging configuration for this policy. + #[serde(rename="auditConfigs")] + pub audit_configs: Option>, /// Version of the `Policy`. The default version is 0. pub version: Option, } @@ -629,8 +672,8 @@ pub struct Organization { /// This field is required. pub owner: Option, /// A friendly string to be used to refer to the Organization in the UI. - /// Assigned by the server, set to the firm name of the Google For Work - /// customer that owns this organization. + /// Assigned by the server, set to the primary domain of the G Suite + /// customer that owns the organization. /// @OutputOnly #[serde(rename="displayName")] pub display_name: Option, @@ -659,42 +702,18 @@ impl Resource for Organization {} impl ResponseResult for Organization {} -/// A page of the response received from the -/// ListProjects -/// method. +/// Identifying information for a single ancestor of a project. /// -/// A paginated response where more pages are available has -/// `next_page_token` set. This token can be used in a subsequent request to -/// retrieve the next request page. -/// -/// # 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*). -/// -/// * [list projects](struct.ProjectListCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListProjectsResponse { - /// Pagination token. - /// - /// If the result set is too large to fit in a single response, this token - /// is returned. It encodes the position of the current result cursor. - /// Feeding this value into a new list request with the `page_token` parameter - /// gives the next page of the results. - /// - /// When `next_page_token` is not filled in, there is no next page and - /// the list returned is the last page in the result set. - /// - /// Pagination tokens have a limited lifetime. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The list of Projects that matched the list filter. This list can - /// be paginated. - pub projects: Option>, +pub struct Ancestor { + /// Resource id of the ancestor. + #[serde(rename="resourceId")] + pub resource_id: Option, } -impl ResponseResult for ListProjectsResponse {} +impl Part for Ancestor {} /// A generic empty message that you can re-use to avoid defining duplicated @@ -782,23 +801,47 @@ pub struct TestIamPermissionsResponse { impl ResponseResult for TestIamPermissionsResponse {} -/// Identifying information for a single ancestor of a project. +/// A page of the response received from the +/// ListProjects +/// method. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// A paginated response where more pages are available has +/// `next_page_token` set. This token can be used in a subsequent request to +/// retrieve the next request page. +/// +/// # 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*). +/// +/// * [list projects](struct.ProjectListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Ancestor { - /// Resource id of the ancestor. - #[serde(rename="resourceId")] - pub resource_id: Option, +pub struct ListProjectsResponse { + /// Pagination token. + /// + /// If the result set is too large to fit in a single response, this token + /// is returned. It encodes the position of the current result cursor. + /// Feeding this value into a new list request with the `page_token` parameter + /// gives the next page of the results. + /// + /// When `next_page_token` is not filled in, there is no next page and + /// the list returned is the last page in the result set. + /// + /// Pagination tokens have a limited lifetime. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of Projects that matched the list filter. This list can + /// be paginated. + pub projects: Option>, } -impl Part for Ancestor {} +impl ResponseResult for ListProjectsResponse {} /// A container to reference an id for any resource type. A `resource` in Google /// Cloud Platform is a generic term for something you (a developer) may want to -/// interact with through one of our API's. Some examples are an AppEngine app, +/// interact with through one of our API's. Some examples are an App Engine app, /// a Compute Engine instance, a Cloud SQL database, and so on. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -846,6 +889,7 @@ pub struct Binding { /// * `group:{emailid}`: An email address that represents a Google group. /// For example, `admins@example.com`. /// + /// /// * `domain:{domain}`: A Google Apps domain name that represents all the /// users of that domain. For example, `google.com` or `example.com`. /// @@ -856,6 +900,75 @@ pub struct Binding { impl Part for Binding {} +/// Specifies the audit configuration for a service. +/// The configuration determines which permission types are logged, and what +/// identities, if any, are exempted from logging. +/// An AuditConfig must have one or more AuditLogConfigs. +/// +/// If there are AuditConfigs for both `allServices` and a specific service, +/// the union of the two AuditConfigs is used for that service: the log_types +/// specified in each AuditConfig are enabled, and the exempted_members in each +/// AuditConfig are exempted. +/// +/// Example Policy with multiple AuditConfigs: +/// +/// { +/// "audit_configs": [ +/// { +/// "service": "allServices" +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// "exempted_members": [ +/// "user:foo@gmail.com" +/// ] +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// }, +/// { +/// "log_type": "ADMIN_READ", +/// } +/// ] +/// }, +/// { +/// "service": "fooservice.googleapis.com" +/// "audit_log_configs": [ +/// { +/// "log_type": "DATA_READ", +/// }, +/// { +/// "log_type": "DATA_WRITE", +/// "exempted_members": [ +/// "user:bar@gmail.com" +/// ] +/// } +/// ] +/// } +/// ] +/// } +/// +/// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ +/// logging. It also exempts foo@gmail.com from DATA_READ logging, and +/// bar@gmail.com from DATA_WRITE logging. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AuditConfig { + /// The configuration for logging of each type of permission. + /// Next ID: 4 + #[serde(rename="auditLogConfigs")] + pub audit_log_configs: Option>, + /// Specifies a service that will be enabled for audit logging. + /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + /// `allServices` is a special value that covers all services. + pub service: Option, +} + +impl Part for AuditConfig {} + + /// The entity that owns an Organization. The lifetime of the Organization and /// all of its descendants are bound to the `OrganizationOwner`. If the /// `OrganizationOwner` is deleted, the Organization and all its descendants will @@ -926,8 +1039,7 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> OrganizationSetIamPolicyCall<'a, C, A> { OrganizationSetIamPolicyCall { hub: self.hub, @@ -949,8 +1061,7 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn get_iam_policy(&self, request: GetIamPolicyRequest, resource: &str) -> OrganizationGetIamPolicyCall<'a, C, A> { OrganizationGetIamPolicyCall { hub: self.hub, @@ -972,8 +1083,7 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> OrganizationTestIamPermissionCall<'a, C, A> { OrganizationTestIamPermissionCall { hub: self.hub, @@ -1090,8 +1200,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectTestIamPermissionCall<'a, C, A> { ProjectTestIamPermissionCall { hub: self.hub, @@ -1174,15 +1283,15 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// must be granted the owner role using the Cloud Platform Console and must /// explicitly accept the invitation. /// - /// + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; - /// they must be sent only using the Cloud Platform Console. + /// + Invitations to grant the owner role cannot be sent using + /// `setIamPolicy()`; they must be sent only using the Cloud Platform Console. /// /// + Membership changes that leave the project without any owners that have /// accepted the Terms of Service (ToS) will be rejected. /// /// + There must be at least one owner who has accepted the Terms of /// Service (ToS) agreement in the policy. Calling `setIamPolicy()` to - /// to remove the last ToS-accepted owner from the policy will fail. This + /// remove the last ToS-accepted owner from the policy will fail. This /// restriction also applies to legacy projects that no longer have owners /// who have accepted the ToS. Edits to IAM policies will be rejected until /// the lack of a ToS-accepting owner is rectified. @@ -1191,14 +1300,14 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// Note: Removing service accounts from policies or changing their roles /// can render services completely inoperable. It is important to understand - /// how the service account is being used before removing or updating its roles. + /// how the service account is being used before removing or updating its + /// roles. /// /// # Arguments /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectSetIamPolicyCall<'a, C, A> { ProjectSetIamPolicyCall { hub: self.hub, @@ -1286,8 +1395,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn get_iam_policy(&self, request: GetIamPolicyRequest, resource: &str) -> ProjectGetIamPolicyCall<'a, C, A> { ProjectGetIamPolicyCall { hub: self.hub, @@ -1577,8 +1685,7 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectCreateCall<'a, C, A> where C: BorrowMut, A: /// must be granted the owner role using the Cloud Platform Console and must /// explicitly accept the invitation. /// -/// + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; -/// they must be sent only using the Cloud Platform Console. +/// + Invitations to grant the owner role cannot be sent using +/// `setIamPolicy()`; they must be sent only using the Cloud Platform Console. /// /// + Membership changes that leave the project without any owners that have /// accepted the Terms of Service (ToS) will be rejected. /// /// + There must be at least one owner who has accepted the Terms of /// Service (ToS) agreement in the policy. Calling `setIamPolicy()` to -/// to remove the last ToS-accepted owner from the policy will fail. This +/// remove the last ToS-accepted owner from the policy will fail. This /// restriction also applies to legacy projects that no longer have owners /// who have accepted the ToS. Edits to IAM policies will be rejected until /// the lack of a ToS-accepting owner is rectified. @@ -3850,7 +3954,8 @@ impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: /// /// Note: Removing service accounts from policies or changing their roles /// can render services completely inoperable. It is important to understand -/// how the service account is being used before removing or updating its roles. +/// how the service account is being used before removing or updating its +/// roles. /// /// A builder for the *setIamPolicy* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -4055,8 +4160,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// |Filter|Description| /// |------|-----------| - /// |name:*|The project has a name.| + /// |name:how*|The project's name starts with "how".| /// |name:Howl|The project's name is `Howl` or `howl`.| /// |name:HOWL|Equivalent to above.| /// |NAME:howl|Equivalent to above.| /// |labels.color:*|The project has the label `color`.| /// |labels.color:red|The project's label `color` has the value `red`.| - /// |labels.color:red label.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`. + /// |labels.color:red labels.size:big|The project's label `color` has the + /// value `red` and its label `size` has the value `big`. /// /// Optional. /// diff --git a/gen/clouduseraccountsvm_beta-cli/Cargo.toml b/gen/clouduseraccountsvm_beta-cli/Cargo.toml index f7f80ab914..5fcf5e2dee 100644 --- a/gen/clouduseraccountsvm_beta-cli/Cargo.toml +++ b/gen/clouduseraccountsvm_beta-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/container1-cli/Cargo.toml b/gen/container1-cli/Cargo.toml index 9d546a6f0b..fc0df33bec 100644 --- a/gen/container1-cli/Cargo.toml +++ b/gen/container1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-container1-cli" -version = "1.0.4+20160421" +version = "1.0.4+20170430" authors = ["Sebastian Thiel "] description = "A complete library to interact with container (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/container1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-container1] path = "../container1" -version = "1.0.4+20160421" +version = "1.0.4+20170430" diff --git a/gen/container1-cli/README.md b/gen/container1-cli/README.md index 4836eaeb00..b1e88166f6 100644 --- a/gen/container1-cli/README.md +++ b/gen/container1-cli/README.md @@ -25,21 +25,29 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *container* API at revision *20160421*. The CLI is at version *1.0.4*. +This documentation was generated from the *container* API at revision *20170430*. The CLI is at version *1.0.4*. ```bash container1 [options] projects + zones-clusters-complete-ip-rotation (-r )... [-p ]... [-o ] zones-clusters-create (-r )... [-p ]... [-o ] zones-clusters-delete [-p ]... [-o ] zones-clusters-get [-p ]... [-o ] + zones-clusters-legacy-abac (-r )... [-p ]... [-o ] zones-clusters-list [-p ]... [-o ] zones-clusters-node-pools-create (-r )... [-p ]... [-o ] zones-clusters-node-pools-delete [-p ]... [-o ] zones-clusters-node-pools-get [-p ]... [-o ] zones-clusters-node-pools-list [-p ]... [-o ] + zones-clusters-node-pools-rollback (-r )... [-p ]... [-o ] + zones-clusters-node-pools-set-management (-r )... [-p ]... [-o ] + zones-clusters-resource-labels (-r )... [-p ]... [-o ] + zones-clusters-set-master-auth (-r )... [-p ]... [-o ] + zones-clusters-start-ip-rotation (-r )... [-p ]... [-o ] zones-clusters-update (-r )... [-p ]... [-o ] zones-get-serverconfig [-p ]... [-o ] + zones-operations-cancel (-r )... [-p ]... [-o ] zones-operations-get [-p ]... [-o ] zones-operations-list [-p ]... [-o ] container1 --help diff --git a/gen/container1-cli/mkdocs.yml b/gen/container1-cli/mkdocs.yml index d5469b7222..2ba0649553 100644 --- a/gen/container1-cli/mkdocs.yml +++ b/gen/container1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: container v1.0.4+20160421 +site_name: container v1.0.4+20170430 site_url: http://byron.github.io/google-apis-rs/google-container1-cli site_description: A complete library to interact with container (protocol v1) @@ -9,16 +9,24 @@ site_dir: build_html pages: - ['index.md', 'Home'] +- ['projects_zones-clusters-complete-ip-rotation.md', 'Projects', 'Zones Clusters Complete Ip Rotation'] - ['projects_zones-clusters-create.md', 'Projects', 'Zones Clusters Create'] - ['projects_zones-clusters-delete.md', 'Projects', 'Zones Clusters Delete'] - ['projects_zones-clusters-get.md', 'Projects', 'Zones Clusters Get'] +- ['projects_zones-clusters-legacy-abac.md', 'Projects', 'Zones Clusters Legacy Abac'] - ['projects_zones-clusters-list.md', 'Projects', 'Zones Clusters List'] - ['projects_zones-clusters-node-pools-create.md', 'Projects', 'Zones Clusters Node Pools Create'] - ['projects_zones-clusters-node-pools-delete.md', 'Projects', 'Zones Clusters Node Pools Delete'] - ['projects_zones-clusters-node-pools-get.md', 'Projects', 'Zones Clusters Node Pools Get'] - ['projects_zones-clusters-node-pools-list.md', 'Projects', 'Zones Clusters Node Pools List'] +- ['projects_zones-clusters-node-pools-rollback.md', 'Projects', 'Zones Clusters Node Pools Rollback'] +- ['projects_zones-clusters-node-pools-set-management.md', 'Projects', 'Zones Clusters Node Pools Set Management'] +- ['projects_zones-clusters-resource-labels.md', 'Projects', 'Zones Clusters Resource Labels'] +- ['projects_zones-clusters-set-master-auth.md', 'Projects', 'Zones Clusters Set Master Auth'] +- ['projects_zones-clusters-start-ip-rotation.md', 'Projects', 'Zones Clusters Start Ip Rotation'] - ['projects_zones-clusters-update.md', 'Projects', 'Zones Clusters Update'] - ['projects_zones-get-serverconfig.md', 'Projects', 'Zones Get Serverconfig'] +- ['projects_zones-operations-cancel.md', 'Projects', 'Zones Operations Cancel'] - ['projects_zones-operations-get.md', 'Projects', 'Zones Operations Get'] - ['projects_zones-operations-list.md', 'Projects', 'Zones Operations List'] diff --git a/gen/container1-cli/src/main.rs b/gen/container1-cli/src/main.rs index 0704633369..58f709f183 100644 --- a/gen/container1-cli/src/main.rs +++ b/gen/container1-cli/src/main.rs @@ -46,6 +46,90 @@ struct Engine<'n> { impl<'n> Engine<'n> { + fn _projects_zones_clusters_complete_ip_rotation(&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::CompleteIPRotationRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().zones_clusters_complete_ip_rotation(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("cluster-id").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(), + _ => 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(()) + } + } + } + } + fn _projects_zones_clusters_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -73,6 +157,7 @@ impl<'n> Engine<'n> { "cluster.addons-config.http-load-balancing.disabled" => Some(("cluster.addonsConfig.httpLoadBalancing.disabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "cluster.addons-config.horizontal-pod-autoscaling.disabled" => Some(("cluster.addonsConfig.horizontalPodAutoscaling.disabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "cluster.locations" => Some(("cluster.locations", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "cluster.enable-kubernetes-alpha" => Some(("cluster.enableKubernetesAlpha", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "cluster.network" => Some(("cluster.network", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.logging-service" => Some(("cluster.loggingService", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.instance-group-urls" => Some(("cluster.instanceGroupUrls", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), @@ -82,28 +167,38 @@ impl<'n> Engine<'n> { "cluster.status" => Some(("cluster.status", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.description" => Some(("cluster.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.current-node-version" => Some(("cluster.currentNodeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.label-fingerprint" => Some(("cluster.labelFingerprint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.current-master-version" => Some(("cluster.currentMasterVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.username" => Some(("cluster.masterAuth.username", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.password" => Some(("cluster.masterAuth.password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.client-key" => Some(("cluster.masterAuth.clientKey", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.client-certificate" => Some(("cluster.masterAuth.clientCertificate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.cluster-ca-certificate" => Some(("cluster.masterAuth.clusterCaCertificate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.expire-time" => Some(("cluster.expireTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.initial-node-count" => Some(("cluster.initialNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "cluster.monitoring-service" => Some(("cluster.monitoringService", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.create-time" => Some(("cluster.createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.endpoint" => Some(("cluster.endpoint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.current-node-count" => Some(("cluster.currentNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "cluster.name" => Some(("cluster.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.legacy-abac.enabled" => Some(("cluster.legacyAbac.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "cluster.initial-cluster-version" => Some(("cluster.initialClusterVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "cluster.node-config.disk-size-gb" => Some(("cluster.nodeConfig.diskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "cluster.node-config.machine-type" => Some(("cluster.nodeConfig.machineType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.node-config.tags" => Some(("cluster.nodeConfig.tags", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "cluster.node-config.preemptible" => Some(("cluster.nodeConfig.preemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "cluster.node-config.labels" => Some(("cluster.nodeConfig.labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "cluster.node-config.service-account" => Some(("cluster.nodeConfig.serviceAccount", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.node-config.oauth-scopes" => Some(("cluster.nodeConfig.oauthScopes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "cluster.node-config.disk-size-gb" => Some(("cluster.nodeConfig.diskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "cluster.node-config.local-ssd-count" => Some(("cluster.nodeConfig.localSsdCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "cluster.node-config.image-type" => Some(("cluster.nodeConfig.imageType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.node-config.metadata" => Some(("cluster.nodeConfig.metadata", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "cluster.cluster-ipv4-cidr" => Some(("cluster.clusterIpv4Cidr", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.subnetwork" => Some(("cluster.subnetwork", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.resource-labels" => Some(("cluster.resourceLabels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "cluster.self-link" => Some(("cluster.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["addons-config", "client-certificate", "client-key", "cluster", "cluster-ca-certificate", "cluster-ipv4-cidr", "create-time", "current-master-version", "current-node-count", "current-node-version", "description", "disabled", "disk-size-gb", "endpoint", "horizontal-pod-autoscaling", "http-load-balancing", "initial-cluster-version", "initial-node-count", "instance-group-urls", "locations", "logging-service", "machine-type", "master-auth", "metadata", "monitoring-service", "name", "network", "node-config", "node-ipv4-cidr-size", "oauth-scopes", "password", "self-link", "services-ipv4-cidr", "status", "status-message", "subnetwork", "username", "zone"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["addons-config", "client-certificate", "client-key", "cluster", "cluster-ca-certificate", "cluster-ipv4-cidr", "create-time", "current-master-version", "current-node-count", "current-node-version", "description", "disabled", "disk-size-gb", "enable-kubernetes-alpha", "enabled", "endpoint", "expire-time", "horizontal-pod-autoscaling", "http-load-balancing", "image-type", "initial-cluster-version", "initial-node-count", "instance-group-urls", "label-fingerprint", "labels", "legacy-abac", "local-ssd-count", "locations", "logging-service", "machine-type", "master-auth", "metadata", "monitoring-service", "name", "network", "node-config", "node-ipv4-cidr-size", "oauth-scopes", "password", "preemptible", "resource-labels", "self-link", "service-account", "services-ipv4-cidr", "status", "status-message", "subnetwork", "tags", "username", "zone"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -267,6 +362,91 @@ impl<'n> Engine<'n> { } } + fn _projects_zones_clusters_legacy_abac(&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()[..] { + "enabled" => Some(("enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["enabled"]); + 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::SetLegacyAbacRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().zones_clusters_legacy_abac(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("cluster-id").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(), + _ => 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(()) + } + } + } + } + fn _projects_zones_clusters_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.projects().zones_clusters_list(opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or("")); @@ -343,18 +523,31 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "node-pool.status" => Some(("nodePool.status", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "node-pool.status-message" => Some(("nodePool.statusMessage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "node-pool.self-link" => Some(("nodePool.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "node-pool.management.upgrade-options.description" => Some(("nodePool.management.upgradeOptions.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "node-pool.management.upgrade-options.auto-upgrade-start-time" => Some(("nodePool.management.upgradeOptions.autoUpgradeStartTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "node-pool.management.auto-repair" => Some(("nodePool.management.autoRepair", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "node-pool.management.auto-upgrade" => Some(("nodePool.management.autoUpgrade", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "node-pool.name" => Some(("nodePool.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "node-pool.instance-group-urls" => Some(("nodePool.instanceGroupUrls", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "node-pool.autoscaling.min-node-count" => Some(("nodePool.autoscaling.minNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "node-pool.autoscaling.enabled" => Some(("nodePool.autoscaling.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "node-pool.autoscaling.max-node-count" => Some(("nodePool.autoscaling.maxNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "node-pool.version" => Some(("nodePool.version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "node-pool.initial-node-count" => Some(("nodePool.initialNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "node-pool.config.disk-size-gb" => Some(("nodePool.config.diskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "node-pool.config.machine-type" => Some(("nodePool.config.machineType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "node-pool.config.tags" => Some(("nodePool.config.tags", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "node-pool.config.preemptible" => Some(("nodePool.config.preemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "node-pool.config.labels" => Some(("nodePool.config.labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "node-pool.config.service-account" => Some(("nodePool.config.serviceAccount", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "node-pool.config.oauth-scopes" => Some(("nodePool.config.oauthScopes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "node-pool.config.disk-size-gb" => Some(("nodePool.config.diskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "node-pool.config.local-ssd-count" => Some(("nodePool.config.localSsdCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "node-pool.config.image-type" => Some(("nodePool.config.imageType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "node-pool.config.metadata" => Some(("nodePool.config.metadata", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), - "node-pool.self-link" => Some(("nodePool.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "node-pool.status-message" => Some(("nodePool.statusMessage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["config", "disk-size-gb", "initial-node-count", "instance-group-urls", "machine-type", "metadata", "name", "node-pool", "oauth-scopes", "self-link", "status", "status-message", "version"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["auto-repair", "auto-upgrade", "auto-upgrade-start-time", "autoscaling", "config", "description", "disk-size-gb", "enabled", "image-type", "initial-node-count", "instance-group-urls", "labels", "local-ssd-count", "machine-type", "management", "max-node-count", "metadata", "min-node-count", "name", "node-pool", "oauth-scopes", "preemptible", "self-link", "service-account", "status", "status-message", "tags", "upgrade-options", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -570,6 +763,438 @@ impl<'n> Engine<'n> { } } + fn _projects_zones_clusters_node_pools_rollback(&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::RollbackNodePoolUpgradeRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().zones_clusters_node_pools_rollback(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("cluster-id").unwrap_or(""), opt.value_of("node-pool-id").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(), + _ => 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(()) + } + } + } + } + + fn _projects_zones_clusters_node_pools_set_management(&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()[..] { + "management.upgrade-options.description" => Some(("management.upgradeOptions.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "management.upgrade-options.auto-upgrade-start-time" => Some(("management.upgradeOptions.autoUpgradeStartTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "management.auto-repair" => Some(("management.autoRepair", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "management.auto-upgrade" => Some(("management.autoUpgrade", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["auto-repair", "auto-upgrade", "auto-upgrade-start-time", "description", "management", "upgrade-options"]); + 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::SetNodePoolManagementRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().zones_clusters_node_pools_set_management(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("cluster-id").unwrap_or(""), opt.value_of("node-pool-id").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(), + _ => 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(()) + } + } + } + } + + fn _projects_zones_clusters_resource_labels(&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()[..] { + "label-fingerprint" => Some(("labelFingerprint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "resource-labels" => Some(("resourceLabels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["label-fingerprint", "resource-labels"]); + 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::SetLabelsRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().zones_clusters_resource_labels(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("cluster-id").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(), + _ => 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(()) + } + } + } + } + + fn _projects_zones_clusters_set_master_auth(&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()[..] { + "action" => Some(("action", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.username" => Some(("update.username", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.password" => Some(("update.password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.client-key" => Some(("update.clientKey", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.client-certificate" => Some(("update.clientCertificate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.cluster-ca-certificate" => Some(("update.clusterCaCertificate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["action", "client-certificate", "client-key", "cluster-ca-certificate", "password", "update", "username"]); + 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::SetMasterAuthRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().zones_clusters_set_master_auth(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("cluster-id").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(), + _ => 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(()) + } + } + } + } + + fn _projects_zones_clusters_start_ip_rotation(&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::StartIPRotationRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().zones_clusters_start_ip_rotation(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("cluster-id").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(), + _ => 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(()) + } + } + } + } + fn _projects_zones_clusters_update(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -593,14 +1218,19 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "update.desired-master-version" => Some(("update.desiredMasterVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "update.desired-node-pool-id" => Some(("update.desiredNodePoolId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "update.desired-node-version" => Some(("update.desiredNodeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "update.desired-monitoring-service" => Some(("update.desiredMonitoringService", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "update.desired-addons-config.http-load-balancing.disabled" => Some(("update.desiredAddonsConfig.httpLoadBalancing.disabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "update.desired-addons-config.horizontal-pod-autoscaling.disabled" => Some(("update.desiredAddonsConfig.horizontalPodAutoscaling.disabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "update.desired-master-version" => Some(("update.desiredMasterVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.desired-locations" => Some(("update.desiredLocations", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "update.desired-node-version" => Some(("update.desiredNodeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.desired-monitoring-service" => Some(("update.desiredMonitoringService", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.desired-node-pool-autoscaling.min-node-count" => Some(("update.desiredNodePoolAutoscaling.minNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "update.desired-node-pool-autoscaling.enabled" => Some(("update.desiredNodePoolAutoscaling.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "update.desired-node-pool-autoscaling.max-node-count" => Some(("update.desiredNodePoolAutoscaling.maxNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "update.desired-image-type" => Some(("update.desiredImageType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["desired-addons-config", "desired-master-version", "desired-monitoring-service", "desired-node-pool-id", "desired-node-version", "disabled", "horizontal-pod-autoscaling", "http-load-balancing", "update"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["desired-addons-config", "desired-image-type", "desired-locations", "desired-master-version", "desired-monitoring-service", "desired-node-pool-autoscaling", "desired-node-pool-id", "desired-node-version", "disabled", "enabled", "horizontal-pod-autoscaling", "http-load-balancing", "max-node-count", "min-node-count", "update"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -712,6 +1342,90 @@ impl<'n> Engine<'n> { } } + fn _projects_zones_operations_cancel(&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::CancelOperationRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().zones_operations_cancel(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("operation-id").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(), + _ => 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(()) + } + } + } + } + fn _projects_zones_operations_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.projects().zones_operations_get(opt.value_of("project-id").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("operation-id").unwrap_or("")); @@ -823,6 +1537,9 @@ impl<'n> Engine<'n> { match self.opt.subcommand() { ("projects", Some(opt)) => { match opt.subcommand() { + ("zones-clusters-complete-ip-rotation", Some(opt)) => { + call_result = self._projects_zones_clusters_complete_ip_rotation(opt, dry_run, &mut err); + }, ("zones-clusters-create", Some(opt)) => { call_result = self._projects_zones_clusters_create(opt, dry_run, &mut err); }, @@ -832,6 +1549,9 @@ impl<'n> Engine<'n> { ("zones-clusters-get", Some(opt)) => { call_result = self._projects_zones_clusters_get(opt, dry_run, &mut err); }, + ("zones-clusters-legacy-abac", Some(opt)) => { + call_result = self._projects_zones_clusters_legacy_abac(opt, dry_run, &mut err); + }, ("zones-clusters-list", Some(opt)) => { call_result = self._projects_zones_clusters_list(opt, dry_run, &mut err); }, @@ -847,12 +1567,30 @@ impl<'n> Engine<'n> { ("zones-clusters-node-pools-list", Some(opt)) => { call_result = self._projects_zones_clusters_node_pools_list(opt, dry_run, &mut err); }, + ("zones-clusters-node-pools-rollback", Some(opt)) => { + call_result = self._projects_zones_clusters_node_pools_rollback(opt, dry_run, &mut err); + }, + ("zones-clusters-node-pools-set-management", Some(opt)) => { + call_result = self._projects_zones_clusters_node_pools_set_management(opt, dry_run, &mut err); + }, + ("zones-clusters-resource-labels", Some(opt)) => { + call_result = self._projects_zones_clusters_resource_labels(opt, dry_run, &mut err); + }, + ("zones-clusters-set-master-auth", Some(opt)) => { + call_result = self._projects_zones_clusters_set_master_auth(opt, dry_run, &mut err); + }, + ("zones-clusters-start-ip-rotation", Some(opt)) => { + call_result = self._projects_zones_clusters_start_ip_rotation(opt, dry_run, &mut err); + }, ("zones-clusters-update", Some(opt)) => { call_result = self._projects_zones_clusters_update(opt, dry_run, &mut err); }, ("zones-get-serverconfig", Some(opt)) => { call_result = self._projects_zones_get_serverconfig(opt, dry_run, &mut err); }, + ("zones-operations-cancel", Some(opt)) => { + call_result = self._projects_zones_operations_cancel(opt, dry_run, &mut err); + }, ("zones-operations-get", Some(opt)) => { call_result = self._projects_zones_operations_get(opt, dry_run, &mut err); }, @@ -951,20 +1689,78 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ - ("projects", "methods: 'zones-clusters-create', 'zones-clusters-delete', 'zones-clusters-get', 'zones-clusters-list', 'zones-clusters-node-pools-create', 'zones-clusters-node-pools-delete', 'zones-clusters-node-pools-get', 'zones-clusters-node-pools-list', 'zones-clusters-update', 'zones-get-serverconfig', 'zones-operations-get' and 'zones-operations-list'", vec![ - ("zones-clusters-create", - Some(r##"Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster."##), - "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-create", + ("projects", "methods: 'zones-clusters-complete-ip-rotation', 'zones-clusters-create', 'zones-clusters-delete', 'zones-clusters-get', 'zones-clusters-legacy-abac', 'zones-clusters-list', 'zones-clusters-node-pools-create', 'zones-clusters-node-pools-delete', 'zones-clusters-node-pools-get', 'zones-clusters-node-pools-list', 'zones-clusters-node-pools-rollback', 'zones-clusters-node-pools-set-management', 'zones-clusters-resource-labels', 'zones-clusters-set-master-auth', 'zones-clusters-start-ip-rotation', 'zones-clusters-update', 'zones-get-serverconfig', 'zones-operations-cancel', 'zones-operations-get' and 'zones-operations-list'", vec![ + ("zones-clusters-complete-ip-rotation", + Some(r##"Completes master IP rotation."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-complete-ip-rotation", vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://developers.google.com/console/help/new/#projectnumber)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), + Some(true), + Some(false)), + + (Some(r##"cluster-id"##), + None, + Some(r##"The name of the cluster."##), + 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)), + ]), + ("zones-clusters-create", + Some(r##"Creates a cluster, consisting of the specified number and type of Google + Compute Engine instances. + + By default, the cluster is created in the project's + [default network](/compute/docs/networks-and-firewalls#networks). + + One firewall is added for the cluster. After cluster creation, + the cluster creates routes for each node to allow the containers + on that node to communicate with all other instances in the + cluster. + + Finally, an entry is added to the project's global metadata indicating + which CIDR range is being used by the cluster."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-create", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), + Some(true), + Some(false)), + + (Some(r##"zone"##), + None, + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), Some(true), Some(false)), @@ -987,18 +1783,29 @@ fn main() { Some(false)), ]), ("zones-clusters-delete", - Some(r##"Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster (e.g. load balancer resources) will not be deleted if they weren't present at the initial create time."##), + Some(r##"Deletes the cluster, including the Kubernetes endpoint and all worker + nodes. + + Firewalls and routes that were configured during cluster creation + are also deleted. + + Other Google Compute Engine resources that might be in use by the cluster + (e.g. load balancer resources) will not be deleted if they weren't present + at the initial create time."##), "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-delete", vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), Some(true), Some(false)), @@ -1026,13 +1833,16 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), Some(true), Some(false)), @@ -1054,19 +1864,66 @@ fn main() { Some(false), Some(false)), ]), - ("zones-clusters-list", - Some(r##"Lists all clusters owned by a project in either the specified zone or all zones."##), - "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-list", + ("zones-clusters-legacy-abac", + Some(r##"Enables or disables the ABAC authorization mechanism on a cluster."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-legacy-abac", vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), + Some(true), + Some(false)), + + (Some(r##"cluster-id"##), + None, + Some(r##"The name of the cluster 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)), + ]), + ("zones-clusters-list", + Some(r##"Lists all clusters owned by a project in either the specified zone or all + zones."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-list", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), + Some(true), + Some(false)), + + (Some(r##"zone"##), + None, + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides, or "-" for all zones."##), Some(true), Some(false)), @@ -1088,13 +1945,16 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://developers.google.com/console/help/new/#projectnumber)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), Some(true), Some(false)), @@ -1128,13 +1988,16 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://developers.google.com/console/help/new/#projectnumber)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), Some(true), Some(false)), @@ -1168,13 +2031,16 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://developers.google.com/console/help/new/#projectnumber)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), Some(true), Some(false)), @@ -1208,13 +2074,16 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://developers.google.com/console/help/new/#projectnumber)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), Some(true), Some(false)), @@ -1230,6 +2099,236 @@ fn main() { 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)), + ]), + ("zones-clusters-node-pools-rollback", + Some(r##"Roll back the previously Aborted or Failed NodePool upgrade. + This will be an no-op if the last upgrade successfully completed."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-node-pools-rollback", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), + Some(true), + Some(false)), + + (Some(r##"zone"##), + None, + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), + Some(true), + Some(false)), + + (Some(r##"cluster-id"##), + None, + Some(r##"The name of the cluster to rollback."##), + Some(true), + Some(false)), + + (Some(r##"node-pool-id"##), + None, + Some(r##"The name of the node pool to rollback."##), + 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)), + ]), + ("zones-clusters-node-pools-set-management", + Some(r##"Sets the NodeManagement options for a node pool."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-node-pools-set-management", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), + Some(true), + Some(false)), + + (Some(r##"zone"##), + None, + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), + Some(true), + Some(false)), + + (Some(r##"cluster-id"##), + None, + Some(r##"The name of the cluster to update."##), + Some(true), + Some(false)), + + (Some(r##"node-pool-id"##), + None, + Some(r##"The name of the node pool 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)), + ]), + ("zones-clusters-resource-labels", + Some(r##"Sets labels on a cluster."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-resource-labels", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"The Google Developers Console [project ID or project + number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(true), + Some(false)), + + (Some(r##"zone"##), + None, + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), + Some(true), + Some(false)), + + (Some(r##"cluster-id"##), + None, + Some(r##"The name of the cluster."##), + 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)), + ]), + ("zones-clusters-set-master-auth", + Some(r##"Used to set master auth materials. Currently supports :- + Changing the admin password of a specific cluster. + This can be either via password generation or explicitly set the password."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-set-master-auth", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), + Some(true), + Some(false)), + + (Some(r##"zone"##), + None, + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), + Some(true), + Some(false)), + + (Some(r##"cluster-id"##), + None, + Some(r##"The name of the cluster to upgrade."##), + 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)), + ]), + ("zones-clusters-start-ip-rotation", + Some(r##"Start master IP rotation."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-start-ip-rotation", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"The Google Developers Console [project ID or project + number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(true), + Some(false)), + + (Some(r##"zone"##), + None, + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), + Some(true), + Some(false)), + + (Some(r##"cluster-id"##), + None, + Some(r##"The name of the cluster."##), + 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"##), @@ -1242,13 +2341,16 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), Some(true), Some(false)), @@ -1282,13 +2384,15 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for."##), + Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) + to return operations for."##), Some(true), Some(false)), @@ -1298,6 +2402,48 @@ fn main() { 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)), + ]), + ("zones-operations-cancel", + Some(r##"Cancels the specified operation."##), + "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-operations-cancel", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), + Some(true), + Some(false)), + + (Some(r##"zone"##), + None, + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the operation resides."##), + Some(true), + Some(false)), + + (Some(r##"operation-id"##), + None, + Some(r##"The server-assigned `name` of the operation."##), + 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"##), @@ -1310,13 +2456,16 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides."##), + Some(r##"The name of the Google Compute Engine + [zone](/compute/docs/zones#available) in which the cluster + resides."##), Some(true), Some(false)), @@ -1344,13 +2493,15 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), + Some(r##"The Google Developers Console [project ID or project + number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones."##), + Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) + to return operations for, or `-` for all zones."##), Some(true), Some(false)), @@ -1372,8 +2523,8 @@ fn main() { let mut app = App::new("container1") .author("Sebastian Thiel ") - .version("1.0.4+20160421") - .about("Builds and manages clusters that run container-based applications, powered by open source Kubernetes technology.") + .version("1.0.4+20170430") + .about("The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_container1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/container1/Cargo.toml b/gen/container1/Cargo.toml index 185fa6e1f8..a579b9d0c2 100644 --- a/gen/container1/Cargo.toml +++ b/gen/container1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-container1" -version = "1.0.4+20160421" +version = "1.0.4+20170430" authors = ["Sebastian Thiel "] description = "A complete library to interact with container (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/container1" homepage = "https://cloud.google.com/container-engine/" -documentation = "https://docs.rs/google-container1/1.0.4+20160421" +documentation = "https://docs.rs/google-container1/1.0.4+20170430" license = "MIT" keywords = ["container", "google", "protocol", "web", "api"] diff --git a/gen/container1/README.md b/gen/container1/README.md index 0c2afac6fb..12ef95f258 100644 --- a/gen/container1/README.md +++ b/gen/container1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-container1` library allows access to all features of the *Google container* service. -This documentation was generated from *container* crate version *1.0.4+20160421*, where *20160421* is the exact revision of the *container:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *container* crate version *1.0.4+20170430*, where *20170430* is the exact revision of the *container:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *container* *v1* API can be found at the [official documentation site](https://cloud.google.com/container-engine/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.Container.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.Container.html) ... * projects - * [*zones clusters create*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneClusterCreateCall.html), [*zones clusters delete*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneClusterDeleteCall.html), [*zones clusters get*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneClusterGetCall.html), [*zones clusters list*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneClusterListCall.html), [*zones clusters node pools create*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneClusterNodePoolCreateCall.html), [*zones clusters node pools delete*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneClusterNodePoolDeleteCall.html), [*zones clusters node pools get*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneClusterNodePoolGetCall.html), [*zones clusters node pools list*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneClusterNodePoolListCall.html), [*zones clusters update*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneClusterUpdateCall.html), [*zones get serverconfig*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneGetServerconfigCall.html), [*zones operations get*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneOperationGetCall.html) and [*zones operations list*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.ProjectZoneOperationListCall.html) + * [*zones clusters complete ip rotation*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterCompleteIpRotationCall.html), [*zones clusters create*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterCreateCall.html), [*zones clusters delete*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterDeleteCall.html), [*zones clusters get*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterGetCall.html), [*zones clusters legacy abac*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterLegacyAbacCall.html), [*zones clusters list*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterListCall.html), [*zones clusters node pools create*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterNodePoolCreateCall.html), [*zones clusters node pools delete*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterNodePoolDeleteCall.html), [*zones clusters node pools get*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterNodePoolGetCall.html), [*zones clusters node pools list*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterNodePoolListCall.html), [*zones clusters node pools rollback*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterNodePoolRollbackCall.html), [*zones clusters node pools set management*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterNodePoolSetManagementCall.html), [*zones clusters resource labels*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterResourceLabelCall.html), [*zones clusters set master auth*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterSetMasterAuthCall.html), [*zones clusters start ip rotation*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterStartIpRotationCall.html), [*zones clusters update*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneClusterUpdateCall.html), [*zones get serverconfig*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneGetServerconfigCall.html), [*zones operations cancel*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneOperationCancelCall.html), [*zones operations get*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneOperationGetCall.html) and [*zones operations list*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.ProjectZoneOperationListCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-container1/1.0.4+20160421/google_container1/struct.Container.html)** +* **[Hub](https://docs.rs/google-container1/1.0.4+20170430/google_container1/struct.Container.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.Part.html)** + * **[Parts](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -47,12 +47,19 @@ let r = hub.resource().activity(...).doit() Or specifically ... ```ignore -let r = hub.projects().zones_clusters_node_pools_create(...).doit() +let r = hub.projects().zones_clusters_node_pools_rollback(...).doit() let r = hub.projects().zones_clusters_delete(...).doit() +let r = hub.projects().zones_clusters_node_pools_create(...).doit() +let r = hub.projects().zones_clusters_set_master_auth(...).doit() +let r = hub.projects().zones_clusters_complete_ip_rotation(...).doit() +let r = hub.projects().zones_clusters_node_pools_set_management(...).doit() +let r = hub.projects().zones_clusters_legacy_abac(...).doit() let r = hub.projects().zones_operations_get(...).doit() -let r = hub.projects().zones_clusters_node_pools_delete(...).doit() -let r = hub.projects().zones_clusters_update(...).doit() +let r = hub.projects().zones_clusters_resource_labels(...).doit() let r = hub.projects().zones_clusters_create(...).doit() +let r = hub.projects().zones_clusters_update(...).doit() +let r = hub.projects().zones_clusters_start_ip_rotation(...).doit() +let r = hub.projects().zones_clusters_node_pools_delete(...).doit() ``` The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -77,7 +84,7 @@ google-container1 = "*" extern crate hyper; extern crate yup_oauth2 as oauth2; extern crate google_container1 as container1; -use container1::CreateNodePoolRequest; +use container1::RollbackNodePoolUpgradeRequest; use container1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -98,12 +105,12 @@ let mut hub = Container::new(hyper::Client::new(), 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 = CreateNodePoolRequest::default(); +let mut req = RollbackNodePoolUpgradeRequest::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.projects().zones_clusters_node_pools_create(req, "projectId", "zone", "clusterId") +let result = hub.projects().zones_clusters_node_pools_rollback(req, "projectId", "zone", "clusterId", "nodePoolId") .doit(); match result { @@ -126,17 +133,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-container1/1.0.4+20160421/google_container1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-container1/1.0.4+20170430/google_container1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.Delegate.html), 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-container1/1.0.4+20160421/google_container1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-container1/1.0.4+20170430/google_container1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.ResponseResult.html), 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")`. @@ -146,29 +153,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.CallBuilder.html) 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-container1/1.0.4+20160421/google_container1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-container1/1.0.4+20160421/google_container1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.CallBuilder.html), 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-container1/1.0.4+20160421/google_container1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-container1/1.0.4+20170430/google_container1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/container1/src/lib.rs b/gen/container1/src/lib.rs index 94c3f30b74..72cee2f3fb 100644 --- a/gen/container1/src/lib.rs +++ b/gen/container1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *container* crate version *1.0.4+20160421*, where *20160421* is the exact revision of the *container:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *container* crate version *1.0.4+20170430*, where *20170430* is the exact revision of the *container:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *container* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/container-engine/). @@ -12,7 +12,7 @@ //! Handle the following *Resources* with ease from the central [hub](struct.Container.html) ... //! //! * projects -//! * [*zones clusters create*](struct.ProjectZoneClusterCreateCall.html), [*zones clusters delete*](struct.ProjectZoneClusterDeleteCall.html), [*zones clusters get*](struct.ProjectZoneClusterGetCall.html), [*zones clusters list*](struct.ProjectZoneClusterListCall.html), [*zones clusters node pools create*](struct.ProjectZoneClusterNodePoolCreateCall.html), [*zones clusters node pools delete*](struct.ProjectZoneClusterNodePoolDeleteCall.html), [*zones clusters node pools get*](struct.ProjectZoneClusterNodePoolGetCall.html), [*zones clusters node pools list*](struct.ProjectZoneClusterNodePoolListCall.html), [*zones clusters update*](struct.ProjectZoneClusterUpdateCall.html), [*zones get serverconfig*](struct.ProjectZoneGetServerconfigCall.html), [*zones operations get*](struct.ProjectZoneOperationGetCall.html) and [*zones operations list*](struct.ProjectZoneOperationListCall.html) +//! * [*zones clusters complete ip rotation*](struct.ProjectZoneClusterCompleteIpRotationCall.html), [*zones clusters create*](struct.ProjectZoneClusterCreateCall.html), [*zones clusters delete*](struct.ProjectZoneClusterDeleteCall.html), [*zones clusters get*](struct.ProjectZoneClusterGetCall.html), [*zones clusters legacy abac*](struct.ProjectZoneClusterLegacyAbacCall.html), [*zones clusters list*](struct.ProjectZoneClusterListCall.html), [*zones clusters node pools create*](struct.ProjectZoneClusterNodePoolCreateCall.html), [*zones clusters node pools delete*](struct.ProjectZoneClusterNodePoolDeleteCall.html), [*zones clusters node pools get*](struct.ProjectZoneClusterNodePoolGetCall.html), [*zones clusters node pools list*](struct.ProjectZoneClusterNodePoolListCall.html), [*zones clusters node pools rollback*](struct.ProjectZoneClusterNodePoolRollbackCall.html), [*zones clusters node pools set management*](struct.ProjectZoneClusterNodePoolSetManagementCall.html), [*zones clusters resource labels*](struct.ProjectZoneClusterResourceLabelCall.html), [*zones clusters set master auth*](struct.ProjectZoneClusterSetMasterAuthCall.html), [*zones clusters start ip rotation*](struct.ProjectZoneClusterStartIpRotationCall.html), [*zones clusters update*](struct.ProjectZoneClusterUpdateCall.html), [*zones get serverconfig*](struct.ProjectZoneGetServerconfigCall.html), [*zones operations cancel*](struct.ProjectZoneOperationCancelCall.html), [*zones operations get*](struct.ProjectZoneOperationGetCall.html) and [*zones operations list*](struct.ProjectZoneOperationListCall.html) //! //! //! @@ -47,12 +47,19 @@ //! Or specifically ... //! //! ```ignore -//! let r = hub.projects().zones_clusters_node_pools_create(...).doit() +//! let r = hub.projects().zones_clusters_node_pools_rollback(...).doit() //! let r = hub.projects().zones_clusters_delete(...).doit() +//! let r = hub.projects().zones_clusters_node_pools_create(...).doit() +//! let r = hub.projects().zones_clusters_set_master_auth(...).doit() +//! let r = hub.projects().zones_clusters_complete_ip_rotation(...).doit() +//! let r = hub.projects().zones_clusters_node_pools_set_management(...).doit() +//! let r = hub.projects().zones_clusters_legacy_abac(...).doit() //! let r = hub.projects().zones_operations_get(...).doit() -//! let r = hub.projects().zones_clusters_node_pools_delete(...).doit() -//! let r = hub.projects().zones_clusters_update(...).doit() +//! let r = hub.projects().zones_clusters_resource_labels(...).doit() //! let r = hub.projects().zones_clusters_create(...).doit() +//! let r = hub.projects().zones_clusters_update(...).doit() +//! let r = hub.projects().zones_clusters_start_ip_rotation(...).doit() +//! let r = hub.projects().zones_clusters_node_pools_delete(...).doit() //! ``` //! //! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -77,7 +84,7 @@ //! extern crate hyper; //! extern crate yup_oauth2 as oauth2; //! extern crate google_container1 as container1; -//! use container1::CreateNodePoolRequest; +//! use container1::RollbackNodePoolUpgradeRequest; //! use container1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; @@ -99,12 +106,12 @@ //! // 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 = CreateNodePoolRequest::default(); +//! let mut req = RollbackNodePoolUpgradeRequest::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.projects().zones_clusters_node_pools_create(req, "projectId", "zone", "clusterId") +//! let result = hub.projects().zones_clusters_node_pools_rollback(req, "projectId", "zone", "clusterId", "nodePoolId") //! .doit(); //! //! match result { @@ -260,7 +267,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate yup_oauth2 as oauth2; /// extern crate google_container1 as container1; -/// use container1::CreateNodePoolRequest; +/// use container1::RollbackNodePoolUpgradeRequest; /// use container1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; @@ -282,12 +289,12 @@ impl Default for Scope { /// // 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 = CreateNodePoolRequest::default(); +/// let mut req = RollbackNodePoolUpgradeRequest::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.projects().zones_clusters_node_pools_create(req, "projectId", "zone", "clusterId") +/// let result = hub.projects().zones_clusters_node_pools_rollback(req, "projectId", "zone", "clusterId", "nodePoolId") /// .doit(); /// /// match result { @@ -346,27 +353,59 @@ impl<'a, C, A> Container // ############ // SCHEMAS ### // ########## -/// ClusterUpdate describes an update to the cluster. Exactly one update can be applied to a cluster with each request, so at most one field can be provided. +/// ClusterUpdate describes an update to the cluster. Exactly one update can +/// be applied to a cluster with each request, so at most one field can be +/// provided. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ClusterUpdate { - /// The Kubernetes version to change the master to. The only valid value is the latest supported version. Use "-" to have the server automatically select the latest version. - #[serde(rename="desiredMasterVersion")] - pub desired_master_version: Option, - /// The node pool to be upgraded. This field is mandatory if the "desired_node_version" or "desired_image_family" is specified and there is more than one node pool on the cluster. - #[serde(rename="desiredNodePoolId")] - pub desired_node_pool_id: Option, - /// The Kubernetes version to change the nodes to (typically an upgrade). Use `-` to upgrade to the latest version supported by the server. - #[serde(rename="desiredNodeVersion")] - pub desired_node_version: Option, - /// The monitoring service the cluster should use to write metrics. Currently available options: * "monitoring.googleapis.com" - the Google Cloud Monitoring service * "none" - no metrics will be exported from the cluster - #[serde(rename="desiredMonitoringService")] - pub desired_monitoring_service: Option, + /// The desired list of Google Compute Engine + /// [locations](/compute/docs/zones#available) in which the cluster's nodes + /// should be located. Changing the locations a cluster is in will result + /// in nodes being either created or removed from the cluster, depending on + /// whether locations are being added or removed. + /// + /// This list must always include the cluster's primary zone. + #[serde(rename="desiredLocations")] + pub desired_locations: Option>, /// Configurations for the various addons available to run in the cluster. #[serde(rename="desiredAddonsConfig")] pub desired_addons_config: Option, + /// The Kubernetes version to change the master to. The only valid value is the + /// latest supported version. Use "-" to have the server automatically select + /// the latest version. + #[serde(rename="desiredMasterVersion")] + pub desired_master_version: Option, + /// The node pool to be upgraded. This field is mandatory if + /// "desired_node_version", "desired_image_family" or + /// "desired_node_pool_autoscaling" is specified and there is more than one + /// node pool on the cluster. + #[serde(rename="desiredNodePoolId")] + pub desired_node_pool_id: Option, + /// The Kubernetes version to change the nodes to (typically an + /// upgrade). Use `-` to upgrade to the latest version supported by + /// the server. + #[serde(rename="desiredNodeVersion")] + pub desired_node_version: Option, + /// The monitoring service the cluster should use to write metrics. + /// Currently available options: + /// + /// * "monitoring.googleapis.com" - the Google Cloud Monitoring service + /// * "none" - no metrics will be exported from the cluster + #[serde(rename="desiredMonitoringService")] + pub desired_monitoring_service: Option, + /// Autoscaler configuration for the node pool specified in + /// desired_node_pool_id. If there is only one pool in the + /// cluster and desired_node_pool_id is not provided then + /// the change applies to that single node pool. + #[serde(rename="desiredNodePoolAutoscaling")] + pub desired_node_pool_autoscaling: Option, + /// The desired image type for the node pool. + /// NOTE: Set the "desired_node_pool" field as well. + #[serde(rename="desiredImageType")] + pub desired_image_type: Option, } impl Part for ClusterUpdate {} @@ -390,19 +429,44 @@ pub struct UpdateClusterRequest { impl RequestValue for UpdateClusterRequest {} -/// Configuration options for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. +/// Configuration options for the HTTP (L7) load balancing controller addon, +/// which makes it easy to set up HTTP load balancers for services in a cluster. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HttpLoadBalancing { - /// Whether the HTTP Load Balancing controller is enabled in the cluster. When enabled, it runs a small pod in the cluster that manages the load balancers. + /// Whether the HTTP Load Balancing controller is enabled in the cluster. + /// When enabled, it runs a small pod in the cluster that manages the load + /// balancers. pub disabled: Option, } impl Part for HttpLoadBalancing {} +/// ListOperationsResponse is the result of ListOperationsRequest. +/// +/// # 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*). +/// +/// * [zones operations list projects](struct.ProjectZoneOperationListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListOperationsResponse { + /// A list of operations in the project in the specified zone. + pub operations: Option>, + /// If any zones are listed here, the list of operations returned + /// may be missing the operations from those zones. + #[serde(rename="missingZones")] + pub missing_zones: Option>, +} + +impl ResponseResult for ListOperationsResponse {} + + /// ListClustersResponse is the result of ListClustersRequest. /// /// # Activities @@ -414,9 +478,11 @@ impl Part for HttpLoadBalancing {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListClustersResponse { - /// A list of clusters in the project in the specified zone, or across all ones. + /// A list of clusters in the project in the specified zone, or + /// across all ones. pub clusters: Option>, - /// If any zones are listed here, the list of clusters returned may be missing those zones. + /// If any zones are listed here, the list of clusters returned + /// may be missing those zones. #[serde(rename="missingZones")] pub missing_zones: Option>, } @@ -424,41 +490,6 @@ pub struct ListClustersResponse { impl ResponseResult for ListClustersResponse {} -/// Configuration options for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct HorizontalPodAutoscaling { - /// Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that a Heapster pod is running in the cluster, which is also used by the Cloud Monitoring service. - pub disabled: Option, -} - -impl Part for HorizontalPodAutoscaling {} - - -/// Parameters that describe the nodes in a cluster. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct NodeConfig { - /// Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. - #[serde(rename="diskSizeGb")] - pub disk_size_gb: Option, - /// The name of a Google Compute Engine [machine type](/compute/docs/machine-types) (e.g. `n1-standard-1`). If unspecified, the default machine type is `n1-standard-1`. - #[serde(rename="machineType")] - pub machine_type: Option, - /// The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with **gcr.io** (the [Google Container Registry](/container-registry/)). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. - #[serde(rename="oauthScopes")] - pub oauth_scopes: Option>, - /// The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. - pub metadata: Option>, -} - -impl Part for NodeConfig {} - - /// Container Engine service configuration. /// /// # Activities @@ -476,17 +507,338 @@ pub struct ServerConfig { /// List of valid node upgrade target versions. #[serde(rename="validNodeVersions")] pub valid_node_versions: Option>, - /// Default image family. - #[serde(rename="defaultImageFamily")] - pub default_image_family: Option, - /// List of valid image families. - #[serde(rename="validImageFamilies")] - pub valid_image_families: Option>, + /// List of valid image types. + #[serde(rename="validImageTypes")] + pub valid_image_types: Option>, + /// List of valid master versions. + #[serde(rename="validMasterVersions")] + pub valid_master_versions: Option>, + /// Default image type. + #[serde(rename="defaultImageType")] + pub default_image_type: Option, } impl ResponseResult for ServerConfig {} +/// A Google Container Engine cluster. +/// +/// # 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*). +/// +/// * [zones clusters get projects](struct.ProjectZoneClusterGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Cluster { + /// [Output only] The size of the address space on each node for hosting + /// containers. This is provisioned from within the `container_ipv4_cidr` + /// range. + #[serde(rename="nodeIpv4CidrSize")] + pub node_ipv4_cidr_size: Option, + /// [Output only] The current status of this cluster. + pub status: Option, + /// [Output only] The current software version of the master endpoint. + #[serde(rename="currentMasterVersion")] + pub current_master_version: Option, + /// An optional description of this cluster. + pub description: Option, + /// [Output only] The current version of the node software components. + /// If they are currently at multiple versions because they're in the process + /// of being upgraded, this reflects the minimum version of all nodes. + #[serde(rename="currentNodeVersion")] + pub current_node_version: Option, + /// The fingerprint of the set of labels for this cluster. + #[serde(rename="labelFingerprint")] + pub label_fingerprint: Option, + /// Configurations for the various addons available to run in the cluster. + #[serde(rename="addonsConfig")] + pub addons_config: Option, + /// The list of Google Compute Engine + /// [locations](/compute/docs/zones#available) in which the cluster's nodes + /// should be located. + pub locations: Option>, + /// The authentication information for accessing the master endpoint. + #[serde(rename="masterAuth")] + pub master_auth: Option, + /// [Output only] The time the cluster will be automatically + /// deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + #[serde(rename="expireTime")] + pub expire_time: Option, + /// Kubernetes alpha features are enabled on this cluster. This includes alpha + /// API groups (e.g. v1alpha1) and features that may not be production ready in + /// the kubernetes version of the master and nodes. + /// The cluster has no SLA for uptime and master/node upgrades are disabled. + /// Alpha enabled clusters are automatically deleted thirty days after + /// creation. + #[serde(rename="enableKubernetesAlpha")] + pub enable_kubernetes_alpha: Option, + /// The number of nodes to create in this cluster. You must ensure that your + /// Compute Engine resource quota + /// is sufficient for this number of instances. You must also have available + /// firewall and routes quota. + /// For requests, this field should only be used in lieu of a + /// "node_pool" object, since this configuration (along with the + /// "node_config") will be used to create a "NodePool" object with an + /// auto-generated name. Do not use this and a node_pool at the same time. + #[serde(rename="initialNodeCount")] + pub initial_node_count: Option, + /// The node pools associated with this cluster. + /// This field should not be set if "node_config" or "initial_node_count" are + /// specified. + #[serde(rename="nodePools")] + pub node_pools: Option>, + /// The monitoring service the cluster should use to write metrics. + /// Currently available options: + /// + /// * `monitoring.googleapis.com` - the Google Cloud Monitoring service. + /// * `none` - no metrics will be exported from the cluster. + /// * if left as an empty string, `monitoring.googleapis.com` will be used. + #[serde(rename="monitoringService")] + pub monitoring_service: Option, + /// [Output only] The time the cluster was created, in + /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + #[serde(rename="createTime")] + pub create_time: Option, + /// The name of this cluster. The name must be unique within this project + /// and zone, and can be up to 40 characters with the following restrictions: + /// + /// * Lowercase letters, numbers, and hyphens only. + /// * Must start with a letter. + /// * Must end with a number or a letter. + pub name: Option, + /// [Output only] The IP address of this cluster's master endpoint. + /// The endpoint can be accessed from the internet at + /// `https://username:password@endpoint/`. + /// + /// See the `masterAuth` property of this resource for username and + /// password information. + pub endpoint: Option, + /// [Output only] The number of nodes currently in the cluster. + #[serde(rename="currentNodeCount")] + pub current_node_count: Option, + /// The name of the Google Compute Engine + /// [network](/compute/docs/networks-and-firewalls#networks) to which the + /// cluster is connected. If left unspecified, the `default` network + /// will be used. + pub network: Option, + /// The logging service the cluster should use to write logs. + /// Currently available options: + /// + /// * `logging.googleapis.com` - the Google Cloud Logging service. + /// * `none` - no logs will be exported from the cluster. + /// * if left as an empty string,`logging.googleapis.com` will be used. + #[serde(rename="loggingService")] + pub logging_service: Option, + /// [Output only] The resource URLs of [instance + /// groups](/compute/docs/instance-groups/) associated with this + /// cluster. + #[serde(rename="instanceGroupUrls")] + pub instance_group_urls: Option>, + /// Configuration for the legacy ABAC authorization mode. + #[serde(rename="legacyAbac")] + pub legacy_abac: Option, + /// The initial Kubernetes version for this cluster. Valid versions are those + /// found in validMasterVersions returned by getServerConfig. The version can + /// be upgraded over time; such upgrades are reflected in + /// currentMasterVersion and currentNodeVersion. + #[serde(rename="initialClusterVersion")] + pub initial_cluster_version: Option, + /// Parameters used in creating the cluster's nodes. + /// See `nodeConfig` for the description of its properties. + /// For requests, this field should only be used in lieu of a + /// "node_pool" object, since this configuration (along with the + /// "initial_node_count") will be used to create a "NodePool" object with an + /// auto-generated name. Do not use this and a node_pool at the same time. + /// For responses, this field will be populated with the node configuration of + /// the first node pool. + /// + /// If unspecified, the defaults are used. + #[serde(rename="nodeConfig")] + pub node_config: Option, + /// [Output only] Server-defined URL for the resource. + #[serde(rename="selfLink")] + pub self_link: Option, + /// The IP address range of the container pods in this cluster, in + /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + /// notation (e.g. `10.96.0.0/14`). Leave blank to have + /// one automatically chosen or specify a `/14` block in `10.0.0.0/8`. + #[serde(rename="clusterIpv4Cidr")] + pub cluster_ipv4_cidr: Option, + /// The name of the Google Compute Engine + /// [subnetwork](/compute/docs/subnetworks) to which the + /// cluster is connected. + pub subnetwork: Option, + /// [Output only] The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + pub zone: Option, + /// [Output only] The IP address range of the Kubernetes services in + /// this cluster, in + /// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + /// notation (e.g. `1.2.3.4/29`). Service addresses are + /// typically put in the last `/16` from the container CIDR. + #[serde(rename="servicesIpv4Cidr")] + pub services_ipv4_cidr: Option, + /// [Output only] Additional information about the current status of this + /// cluster, if available. + #[serde(rename="statusMessage")] + pub status_message: Option, + /// The resource labels for the cluster to use to annotate any related GCE + /// resources. + #[serde(rename="resourceLabels")] + pub resource_labels: Option>, +} + +impl ResponseResult for Cluster {} + + +/// CreateClusterRequest creates a cluster. +/// +/// # 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*). +/// +/// * [zones clusters create projects](struct.ProjectZoneClusterCreateCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CreateClusterRequest { + /// A [cluster + /// resource](/container-engine/reference/rest/v1/projects.zones.clusters) + pub cluster: Option, +} + +impl RequestValue for CreateClusterRequest {} + + +/// Parameters that describe the nodes in a cluster. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct NodeConfig { + /// The name of a Google Compute Engine [machine + /// type](/compute/docs/machine-types) (e.g. + /// `n1-standard-1`). + /// + /// If unspecified, the default machine type is + /// `n1-standard-1`. + #[serde(rename="machineType")] + pub machine_type: Option, + /// The list of instance tags applied to all nodes. Tags are used to identify + /// valid sources or targets for network firewalls and are specified by + /// the client during cluster or node pool creation. Each tag within the list + /// must comply with RFC1035. + pub tags: Option>, + /// Whether the nodes are created as preemptible VM instances. See: + /// https://cloud.google.com/compute/docs/instances/preemptible for more + /// inforamtion about preemptible VM instances. + pub preemptible: Option, + /// The map of Kubernetes labels (key/value pairs) to be applied to each node. + /// These will added in addition to any default label(s) that + /// Kubernetes may apply to the node. + /// In case of conflict in label keys, the applied set may differ depending on + /// the Kubernetes version -- it's best to assume the behavior is undefined + /// and conflicts should be avoided. + /// For more information, including usage and the valid values, see: + /// http://kubernetes.io/v1.1/docs/user-guide/labels.html + pub labels: Option>, + /// The Google Cloud Platform Service Account to be used by the node VMs. If + /// no Service Account is specified, the "default" service account is used. + #[serde(rename="serviceAccount")] + pub service_account: Option, + /// The set of Google API scopes to be made available on all of the + /// node VMs under the "default" service account. + /// + /// The following scopes are recommended, but not required, and by default are + /// not included: + /// + /// * `https://www.googleapis.com/auth/compute` is required for mounting + /// persistent storage on your nodes. + /// * `https://www.googleapis.com/auth/devstorage.read_only` is required for + /// communicating with **gcr.io** + /// (the [Google Container Registry](/container-registry/)). + /// + /// If unspecified, no scopes are added, unless Cloud Logging or Cloud + /// Monitoring are enabled, in which case their required scopes will be added. + #[serde(rename="oauthScopes")] + pub oauth_scopes: Option>, + /// Size of the disk attached to each node, specified in GB. + /// The smallest allowed disk size is 10GB. + /// + /// If unspecified, the default disk size is 100GB. + #[serde(rename="diskSizeGb")] + pub disk_size_gb: Option, + /// The metadata key/value pairs assigned to instances in the cluster. + /// + /// Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes + /// in length. These are reflected as part of a URL in the metadata server. + /// Additionally, to avoid ambiguity, keys must not conflict with any other + /// metadata keys for the project or be one of the four reserved keys: + /// "instance-template", "kube-env", "startup-script", and "user-data" + /// + /// Values are free-form strings, and only have meaning as interpreted by + /// the image running in the instance. The only restriction placed on them is + /// that each value's size must be less than or equal to 32 KB. + /// + /// The total size of all keys and values must be less than 512 KB. + pub metadata: Option>, + /// The image type to use for this node. Note that for a given image type, + /// the latest version of it will be used. + #[serde(rename="imageType")] + pub image_type: Option, + /// The number of local SSD disks to be attached to the node. + /// + /// The limit for this value is dependant upon the maximum number of + /// disks available on a machine per zone. See: + /// https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits + /// for more information. + #[serde(rename="localSsdCount")] + pub local_ssd_count: Option, +} + +impl Part for NodeConfig {} + + +/// AutoUpgradeOptions defines the set of options for the user to control how +/// the Auto Upgrades will proceed. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AutoUpgradeOptions { + /// [Output only] This field is set when upgrades are about to commence + /// with the description of the upgrade. + pub description: Option, + /// [Output only] This field is set when upgrades are about to commence + /// with the approximate start time for the upgrades, in + /// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + #[serde(rename="autoUpgradeStartTime")] + pub auto_upgrade_start_time: Option, +} + +impl Part for AutoUpgradeOptions {} + + +/// Configuration options for the horizontal pod autoscaling feature, which +/// increases or decreases the number of replica pods a replication controller +/// has based on the resource usage of the existing pods. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct HorizontalPodAutoscaling { + /// Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. + /// When enabled, it ensures that a Heapster pod is running in the cluster, + /// which is also used by the Cloud Monitoring service. + pub disabled: Option, +} + +impl Part for HorizontalPodAutoscaling {} + + /// ListNodePoolsResponse is the result of ListNodePoolsRequest. /// /// # Activities @@ -506,7 +858,274 @@ pub struct ListNodePoolsResponse { impl ResponseResult for ListNodePoolsResponse {} -/// NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload. +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. +/// +/// # 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*). +/// +/// * [zones operations cancel projects](struct.ProjectZoneOperationCancelCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Empty { _never_set: Option } + +impl ResponseResult for Empty {} + + +/// RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed +/// NodePool upgrade. This will be an no-op if the last upgrade successfully +/// completed. +/// +/// # 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*). +/// +/// * [zones clusters node pools rollback projects](struct.ProjectZoneClusterNodePoolRollbackCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct RollbackNodePoolUpgradeRequest { _never_set: Option } + +impl RequestValue for RollbackNodePoolUpgradeRequest {} + + +/// CompleteIPRotationRequest moves the cluster master back into single-IP mode. +/// +/// # 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*). +/// +/// * [zones clusters complete ip rotation projects](struct.ProjectZoneClusterCompleteIpRotationCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CompleteIPRotationRequest { _never_set: Option } + +impl RequestValue for CompleteIPRotationRequest {} + + +/// SetNodePoolManagementRequest sets the node management properties of a node +/// pool. +/// +/// # 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*). +/// +/// * [zones clusters node pools set management projects](struct.ProjectZoneClusterNodePoolSetManagementCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SetNodePoolManagementRequest { + /// NodeManagement configuration for the node pool. + pub management: Option, +} + +impl RequestValue for SetNodePoolManagementRequest {} + + +/// SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for +/// a cluster. +/// +/// # 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*). +/// +/// * [zones clusters legacy abac projects](struct.ProjectZoneClusterLegacyAbacCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SetLegacyAbacRequest { + /// Whether ABAC authorization will be enabled in the cluster. + pub enabled: Option, +} + +impl RequestValue for SetLegacyAbacRequest {} + + +/// Configuration for the addons that can be automatically spun up in the +/// cluster, enabling additional functionality. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AddonsConfig { + /// Configuration for the HTTP (L7) load balancing controller addon, which + /// makes it easy to set up HTTP load balancers for services in a cluster. + #[serde(rename="httpLoadBalancing")] + pub http_load_balancing: Option, + /// Configuration for the horizontal pod autoscaling feature, which + /// increases or decreases the number of replica pods a replication controller + /// has based on the resource usage of the existing pods. + #[serde(rename="horizontalPodAutoscaling")] + pub horizontal_pod_autoscaling: Option, +} + +impl Part for AddonsConfig {} + + +/// NodePoolAutoscaling contains information required by cluster autoscaler to +/// adjust the size of the node pool to the current cluster usage. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct NodePoolAutoscaling { + /// Minimum number of nodes in the NodePool. Must be >= 1 and <= + /// max_node_count. + #[serde(rename="minNodeCount")] + pub min_node_count: Option, + /// Is autoscaling enabled for this node pool. + pub enabled: Option, + /// Maximum number of nodes in the NodePool. Must be >= min_node_count. There + /// has to enough quota to scale up the cluster. + #[serde(rename="maxNodeCount")] + pub max_node_count: Option, +} + +impl Part for NodePoolAutoscaling {} + + +/// The authentication information for accessing the master endpoint. +/// Authentication can be done using HTTP basic auth or using client +/// certificates. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct MasterAuth { + /// The username to use for HTTP basic authentication to the master endpoint. + /// For clusters v1.6.0 and later, you can disable basic authentication by + /// providing an empty username. + pub username: Option, + /// The password to use for HTTP basic authentication to the master endpoint. + /// Because the master endpoint is open to the Internet, you should create a + /// strong password. If a password is provided for cluster creation, username + /// must be non-empty. + pub password: Option, + /// [Output only] Base64-encoded private key used by clients to authenticate + /// to the cluster endpoint. + #[serde(rename="clientKey")] + pub client_key: Option, + /// [Output only] Base64-encoded public certificate used by clients to + /// authenticate to the cluster endpoint. + #[serde(rename="clientCertificate")] + pub client_certificate: Option, + /// [Output only] Base64-encoded public certificate that is the root of + /// trust for the cluster. + #[serde(rename="clusterCaCertificate")] + pub cluster_ca_certificate: Option, +} + +impl Part for MasterAuth {} + + +/// SetMasterAuthRequest updates the admin password of a cluster. +/// +/// # 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*). +/// +/// * [zones clusters set master auth projects](struct.ProjectZoneClusterSetMasterAuthCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SetMasterAuthRequest { + /// The exact form of action to be taken on the master auth + pub action: Option, + /// A description of the update. + pub update: Option, +} + +impl RequestValue for SetMasterAuthRequest {} + + +/// SetLabelsRequest sets the Google Cloud Platform labels on a Google Container +/// Engine cluster, which will in turn set them for Google Compute Engine +/// resources used by that cluster +/// +/// # 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*). +/// +/// * [zones clusters resource labels projects](struct.ProjectZoneClusterResourceLabelCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SetLabelsRequest { + /// The fingerprint of the previous set of labels for this resource, + /// used to detect conflicts. The fingerprint is initially generated by + /// Container Engine and changes after every request to modify or update + /// labels. You must always provide an up-to-date fingerprint hash when + /// updating or changing labels. Make a get() request to the + /// resource to get the latest fingerprint. + #[serde(rename="labelFingerprint")] + pub label_fingerprint: Option, + /// The labels to set for that cluster. + #[serde(rename="resourceLabels")] + pub resource_labels: Option>, +} + +impl RequestValue for SetLabelsRequest {} + + +/// Configuration for the legacy Attribute Based Access Control authorization +/// mode. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct LegacyAbac { + /// Whether the ABAC authorizer is enabled for this cluster. When enabled, + /// identities in the system, including service accounts, nodes, and + /// controllers, will have statically granted permissions beyond those + /// provided by the RBAC configuration or IAM. + pub enabled: Option, +} + +impl Part for LegacyAbac {} + + +/// NodeManagement defines the set of node management services turned on for the +/// node pool. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct NodeManagement { + /// Specifies the Auto Upgrade knobs for the node pool. + #[serde(rename="upgradeOptions")] + pub upgrade_options: Option, + /// A flag that specifies whether the node auto-repair is enabled for the node + /// pool. If enabled, the nodes in this node pool will be monitored and, if + /// they fail health checks too many times, an automatic repair action will be + /// triggered. + #[serde(rename="autoRepair")] + pub auto_repair: Option, + /// A flag that specifies whether node auto-upgrade is enabled for the node + /// pool. If enabled, node auto-upgrade helps keep the nodes in your node pool + /// up to date with the latest release version of Kubernetes. + #[serde(rename="autoUpgrade")] + pub auto_upgrade: Option, +} + +impl Part for NodeManagement {} + + +/// NodePool contains the name and configuration for a cluster's node pool. +/// Node pools are a set of nodes (i.e. VM's), with a common configuration and +/// specification, under the control of the cluster master. They may have a set +/// of Kubernetes labels applied to them, which may be used to reference them +/// during pod scheduling. They may also be resized up or down, to accommodate +/// the workload. /// /// # Activities /// @@ -517,195 +1136,55 @@ impl ResponseResult for ListNodePoolsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct NodePool { - /// The status of the nodes in this pool instance. + /// [Output only] The status of the nodes in this pool instance. pub status: Option, - /// Server-defined URL for the resource. - #[serde(rename="selfLink")] - pub self_link: Option, + /// NodeManagement configuration for this NodePool. + pub management: Option, /// The name of the node pool. pub name: Option, - /// [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this node pool. + /// [Output only] The resource URLs of [instance + /// groups](/compute/docs/instance-groups/) associated with this + /// node pool. #[serde(rename="instanceGroupUrls")] pub instance_group_urls: Option>, - /// The version of the Kubernetes of this node. + /// Autoscaler configuration for this NodePool. Autoscaler is enabled + /// only if a valid configuration is present. + pub autoscaling: Option, + /// [Output only] The version of the Kubernetes of this node. pub version: Option, - /// The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. + /// The initial node count for the pool. You must ensure that your + /// Compute Engine resource quota + /// is sufficient for this number of instances. You must also have available + /// firewall and routes quota. #[serde(rename="initialNodeCount")] pub initial_node_count: Option, - /// The node configuration of the pool. - pub config: Option, - /// [Output only] Additional information about the current status of this node pool instance, if available. + /// [Output only] Additional information about the current status of this + /// node pool instance, if available. #[serde(rename="statusMessage")] pub status_message: Option, + /// The node configuration of the pool. + pub config: Option, + /// [Output only] Server-defined URL for the resource. + #[serde(rename="selfLink")] + pub self_link: Option, } impl ResponseResult for NodePool {} -/// CreateClusterRequest creates a cluster. +/// CancelOperationRequest cancels a single operation. /// /// # 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*). /// -/// * [zones clusters create projects](struct.ProjectZoneClusterCreateCall.html) (request) +/// * [zones operations cancel projects](struct.ProjectZoneOperationCancelCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CreateClusterRequest { - /// A [cluster resource](/container-engine/reference/rest/v1/projects.zones.clusters) - pub cluster: Option, -} +pub struct CancelOperationRequest { _never_set: Option } -impl RequestValue for CreateClusterRequest {} - - -/// ListOperationsResponse is the result of ListOperationsRequest. -/// -/// # 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*). -/// -/// * [zones operations list projects](struct.ProjectZoneOperationListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListOperationsResponse { - /// A list of operations in the project in the specified zone. - pub operations: Option>, - /// If any zones are listed here, the list of operations returned may be missing the operations from those zones. - #[serde(rename="missingZones")] - pub missing_zones: Option>, -} - -impl ResponseResult for ListOperationsResponse {} - - -/// Configuration for the addons that can be automatically spun up in the cluster, enabling additional functionality. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AddonsConfig { - /// Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. - #[serde(rename="httpLoadBalancing")] - pub http_load_balancing: Option, - /// Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. - #[serde(rename="horizontalPodAutoscaling")] - pub horizontal_pod_autoscaling: Option, -} - -impl Part for AddonsConfig {} - - -/// The authentication information for accessing the master endpoint. Authentication can be done using HTTP basic auth or using client certificates. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct MasterAuth { - /// The username to use for HTTP basic authentication to the master endpoint. - pub username: Option, - /// The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password. - pub password: Option, - /// [Output only] Base64-encoded private key used by clients to authenticate to the cluster endpoint. - #[serde(rename="clientKey")] - pub client_key: Option, - /// [Output only] Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. - #[serde(rename="clientCertificate")] - pub client_certificate: Option, - /// [Output only] Base64-encoded public certificate that is the root of trust for the cluster. - #[serde(rename="clusterCaCertificate")] - pub cluster_ca_certificate: Option, -} - -impl Part for MasterAuth {} - - -/// A Google Container Engine cluster. -/// -/// # 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*). -/// -/// * [zones clusters get projects](struct.ProjectZoneClusterGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Cluster { - /// [Output only] The size of the address space on each node for hosting containers. This is provisioned from within the `container_ipv4_cidr` range. - #[serde(rename="nodeIpv4CidrSize")] - pub node_ipv4_cidr_size: Option, - /// [Output only] The current status of this cluster. - pub status: Option, - /// [Output only] The current software version of the master endpoint. - #[serde(rename="currentMasterVersion")] - pub current_master_version: Option, - /// An optional description of this cluster. - pub description: Option, - /// [Output only] The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. - #[serde(rename="currentNodeVersion")] - pub current_node_version: Option, - /// Configurations for the various addons available to run in the cluster. - #[serde(rename="addonsConfig")] - pub addons_config: Option, - /// The list of Google Compute Engine [locations](/compute/docs/zones#available) in which the cluster's nodes should be located. - pub locations: Option>, - /// The authentication information for accessing the master endpoint. - #[serde(rename="masterAuth")] - pub master_auth: Option, - /// The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "node_config") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. - #[serde(rename="initialNodeCount")] - pub initial_node_count: Option, - /// The node pools associated with this cluster. When creating a new cluster, only a single node pool should be specified. This field should not be set if "node_config" or "initial_node_count" are specified. - #[serde(rename="nodePools")] - pub node_pools: Option>, - /// The monitoring service the cluster should use to write metrics. Currently available options: * `monitoring.googleapis.com` - the Google Cloud Monitoring service. * `none` - no metrics will be exported from the cluster. * if left as an empty string, `monitoring.googleapis.com` will be used. - #[serde(rename="monitoringService")] - pub monitoring_service: Option, - /// [Output only] The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - #[serde(rename="createTime")] - pub create_time: Option, - /// The name of this cluster. The name must be unique within this project and zone, and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter. - pub name: Option, - /// [Output only] The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information. - pub endpoint: Option, - /// [Output only] The number of nodes currently in the cluster. - #[serde(rename="currentNodeCount")] - pub current_node_count: Option, - /// The name of the Google Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. If left unspecified, the `default` network will be used. - pub network: Option, - /// The logging service the cluster should use to write logs. Currently available options: * `logging.googleapis.com` - the Google Cloud Logging service. * `none` - no logs will be exported from the cluster. * if left as an empty string,`logging.googleapis.com` will be used. - #[serde(rename="loggingService")] - pub logging_service: Option, - /// [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this cluster. - #[serde(rename="instanceGroupUrls")] - pub instance_group_urls: Option>, - /// [Output only] The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time. - #[serde(rename="initialClusterVersion")] - pub initial_cluster_version: Option, - /// Parameters used in creating the cluster's nodes. See `nodeConfig` for the description of its properties. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "initial_node_count") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. If unspecified, the defaults are used. - #[serde(rename="nodeConfig")] - pub node_config: Option, - /// [Output only] Server-defined URL for the resource. - #[serde(rename="selfLink")] - pub self_link: Option, - /// The IP address range of the container pods in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen or specify a `/14` block in `10.0.0.0/8`. - #[serde(rename="clusterIpv4Cidr")] - pub cluster_ipv4_cidr: Option, - /// The name of the Google Compute Engine [subnetwork](/compute/docs/subnetworks) to which the cluster is connected. - pub subnetwork: Option, - /// [Output only] The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. - pub zone: Option, - /// [Output only] Additional information about the current status of this cluster, if available. - #[serde(rename="statusMessage")] - pub status_message: Option, - /// [Output only] The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last `/16` from the container CIDR. - #[serde(rename="servicesIpv4Cidr")] - pub services_ipv4_cidr: Option, -} - -impl ResponseResult for Cluster {} +impl RequestValue for CancelOperationRequest {} /// CreateNodePoolRequest creates a node pool for a cluster. @@ -727,19 +1206,27 @@ pub struct CreateNodePoolRequest { impl RequestValue for CreateNodePoolRequest {} -/// This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only. +/// This operation resource represents operations that may have happened or are +/// happening on the cluster. All fields are output only. /// /// # 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*). /// -/// * [zones clusters node pools create projects](struct.ProjectZoneClusterNodePoolCreateCall.html) (response) +/// * [zones clusters node pools rollback projects](struct.ProjectZoneClusterNodePoolRollbackCall.html) (response) /// * [zones clusters delete projects](struct.ProjectZoneClusterDeleteCall.html) (response) +/// * [zones clusters node pools create projects](struct.ProjectZoneClusterNodePoolCreateCall.html) (response) +/// * [zones clusters set master auth projects](struct.ProjectZoneClusterSetMasterAuthCall.html) (response) +/// * [zones clusters complete ip rotation projects](struct.ProjectZoneClusterCompleteIpRotationCall.html) (response) +/// * [zones clusters node pools set management projects](struct.ProjectZoneClusterNodePoolSetManagementCall.html) (response) +/// * [zones clusters legacy abac projects](struct.ProjectZoneClusterLegacyAbacCall.html) (response) /// * [zones operations get projects](struct.ProjectZoneOperationGetCall.html) (response) -/// * [zones clusters node pools delete projects](struct.ProjectZoneClusterNodePoolDeleteCall.html) (response) -/// * [zones clusters update projects](struct.ProjectZoneClusterUpdateCall.html) (response) +/// * [zones clusters resource labels projects](struct.ProjectZoneClusterResourceLabelCall.html) (response) /// * [zones clusters create projects](struct.ProjectZoneClusterCreateCall.html) (response) +/// * [zones clusters update projects](struct.ProjectZoneClusterUpdateCall.html) (response) +/// * [zones clusters start ip rotation projects](struct.ProjectZoneClusterStartIpRotationCall.html) (response) +/// * [zones clusters node pools delete projects](struct.ProjectZoneClusterNodePoolDeleteCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { @@ -747,19 +1234,21 @@ pub struct Operation { pub status: Option, /// The server-assigned ID for the operation. pub name: Option, - /// The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation is taking place. + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the operation + /// is taking place. pub zone: Option, /// Detailed operation progress, if available. pub detail: Option, - /// If an error has occurred, a textual description of the error. - #[serde(rename="statusMessage")] - pub status_message: Option, - /// The operation type. - #[serde(rename="operationType")] - pub operation_type: Option, /// Server-defined URL for the resource. #[serde(rename="selfLink")] pub self_link: Option, + /// The operation type. + #[serde(rename="operationType")] + pub operation_type: Option, + /// If an error has occurred, a textual description of the error. + #[serde(rename="statusMessage")] + pub status_message: Option, /// Server-defined URL for the target of the operation. #[serde(rename="targetLink")] pub target_link: Option, @@ -768,6 +1257,22 @@ pub struct Operation { impl ResponseResult for Operation {} +/// StartIPRotationRequest creates a new IP for the cluster and then performs +/// a node upgrade on each node pool to point to the new IP. +/// +/// # 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*). +/// +/// * [zones clusters start ip rotation projects](struct.ProjectZoneClusterStartIpRotationCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct StartIPRotationRequest { _never_set: Option } + +impl RequestValue for StartIPRotationRequest {} + + // ################### // MethodBuilders ### @@ -796,7 +1301,7 @@ impl ResponseResult for Operation {} /// ::default(), None); /// let mut hub = Container::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `zones_clusters_create(...)`, `zones_clusters_delete(...)`, `zones_clusters_get(...)`, `zones_clusters_list(...)`, `zones_clusters_node_pools_create(...)`, `zones_clusters_node_pools_delete(...)`, `zones_clusters_node_pools_get(...)`, `zones_clusters_node_pools_list(...)`, `zones_clusters_update(...)`, `zones_get_serverconfig(...)`, `zones_operations_get(...)` and `zones_operations_list(...)` +/// // like `zones_clusters_complete_ip_rotation(...)`, `zones_clusters_create(...)`, `zones_clusters_delete(...)`, `zones_clusters_get(...)`, `zones_clusters_legacy_abac(...)`, `zones_clusters_list(...)`, `zones_clusters_node_pools_create(...)`, `zones_clusters_node_pools_delete(...)`, `zones_clusters_node_pools_get(...)`, `zones_clusters_node_pools_list(...)`, `zones_clusters_node_pools_rollback(...)`, `zones_clusters_node_pools_set_management(...)`, `zones_clusters_resource_labels(...)`, `zones_clusters_set_master_auth(...)`, `zones_clusters_start_ip_rotation(...)`, `zones_clusters_update(...)`, `zones_get_serverconfig(...)`, `zones_operations_cancel(...)`, `zones_operations_get(...)` and `zones_operations_list(...)` /// // to build up your call. /// let rb = hub.projects(); /// # } @@ -817,8 +1322,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// * `clusterId` - The name of the cluster to retrieve. pub fn zones_clusters_get(&self, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterGetCall<'a, C, A> { ProjectZoneClusterGetCall { @@ -832,6 +1340,136 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Returns configuration info about the Container Engine service. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) + /// to return operations for. + pub fn zones_get_serverconfig(&self, project_id: &str, zone: &str) -> ProjectZoneGetServerconfigCall<'a, C, A> { + ProjectZoneGetServerconfigCall { + hub: self.hub, + _project_id: project_id.to_string(), + _zone: zone.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Cancels the specified operation. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the operation resides. + /// * `operationId` - The server-assigned `name` of the operation. + pub fn zones_operations_cancel(&self, request: CancelOperationRequest, project_id: &str, zone: &str, operation_id: &str) -> ProjectZoneOperationCancelCall<'a, C, A> { + ProjectZoneOperationCancelCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _zone: zone.to_string(), + _operation_id: operation_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists the node pools for a cluster. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// * `clusterId` - The name of the cluster. + pub fn zones_clusters_node_pools_list(&self, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterNodePoolListCall<'a, C, A> { + ProjectZoneClusterNodePoolListCall { + hub: self.hub, + _project_id: project_id.to_string(), + _zone: zone.to_string(), + _cluster_id: cluster_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Used to set master auth materials. Currently supports :- + /// Changing the admin password of a specific cluster. + /// This can be either via password generation or explicitly set the password. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// * `clusterId` - The name of the cluster to upgrade. + pub fn zones_clusters_set_master_auth(&self, request: SetMasterAuthRequest, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> { + ProjectZoneClusterSetMasterAuthCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _zone: zone.to_string(), + _cluster_id: cluster_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Deletes the cluster, including the Kubernetes endpoint and all worker + /// nodes. + /// + /// Firewalls and routes that were configured during cluster creation + /// are also deleted. + /// + /// Other Google Compute Engine resources that might be in use by the cluster + /// (e.g. load balancer resources) will not be deleted if they weren't present + /// at the initial create time. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// * `clusterId` - The name of the cluster to delete. + pub fn zones_clusters_delete(&self, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { + ProjectZoneClusterDeleteCall { + hub: self.hub, + _project_id: project_id.to_string(), + _zone: zone.to_string(), + _cluster_id: cluster_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Creates a node pool for a cluster. @@ -839,8 +1477,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// * `clusterId` - The name of the cluster. pub fn zones_clusters_node_pools_create(&self, request: CreateNodePoolRequest, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterNodePoolCreateCall<'a, C, A> { ProjectZoneClusterNodePoolCreateCall { @@ -861,8 +1502,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// * `clusterId` - The name of the cluster. /// * `nodePoolId` - The name of the node pool. pub fn zones_clusters_node_pools_get(&self, project_id: &str, zone: &str, cluster_id: &str, node_pool_id: &str) -> ProjectZoneClusterNodePoolGetCall<'a, C, A> { @@ -880,16 +1524,50 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster (e.g. load balancer resources) will not be deleted if they weren't present at the initial create time. + /// Roll back the previously Aborted or Failed NodePool upgrade. + /// This will be an no-op if the last upgrade successfully completed. /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. - /// * `clusterId` - The name of the cluster to delete. - pub fn zones_clusters_delete(&self, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { - ProjectZoneClusterDeleteCall { + /// * `request` - No description provided. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// * `clusterId` - The name of the cluster to rollback. + /// * `nodePoolId` - The name of the node pool to rollback. + pub fn zones_clusters_node_pools_rollback(&self, request: RollbackNodePoolUpgradeRequest, project_id: &str, zone: &str, cluster_id: &str, node_pool_id: &str) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> { + ProjectZoneClusterNodePoolRollbackCall { hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _zone: zone.to_string(), + _cluster_id: cluster_id.to_string(), + _node_pool_id: node_pool_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Start master IP rotation. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// * `clusterId` - The name of the cluster. + pub fn zones_clusters_start_ip_rotation(&self, request: StartIPRotationRequest, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterStartIpRotationCall<'a, C, A> { + ProjectZoneClusterStartIpRotationCall { + hub: self.hub, + _request: request, _project_id: project_id.to_string(), _zone: zone.to_string(), _cluster_id: cluster_id.to_string(), @@ -901,17 +1579,24 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns configuration info about the Container Engine service. + /// Completes master IP rotation. /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. - pub fn zones_get_serverconfig(&self, project_id: &str, zone: &str) -> ProjectZoneGetServerconfigCall<'a, C, A> { - ProjectZoneGetServerconfigCall { + /// * `request` - No description provided. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// * `clusterId` - The name of the cluster. + pub fn zones_clusters_complete_ip_rotation(&self, request: CompleteIPRotationRequest, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> { + ProjectZoneClusterCompleteIpRotationCall { hub: self.hub, + _request: request, _project_id: project_id.to_string(), _zone: zone.to_string(), + _cluster_id: cluster_id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -920,16 +1605,49 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the node pools for a cluster. + /// Sets the NodeManagement options for a node pool. /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. - /// * `clusterId` - The name of the cluster. - pub fn zones_clusters_node_pools_list(&self, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterNodePoolListCall<'a, C, A> { - ProjectZoneClusterNodePoolListCall { + /// * `request` - No description provided. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// * `clusterId` - The name of the cluster to update. + /// * `nodePoolId` - The name of the node pool to update. + pub fn zones_clusters_node_pools_set_management(&self, request: SetNodePoolManagementRequest, project_id: &str, zone: &str, cluster_id: &str, node_pool_id: &str) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> { + ProjectZoneClusterNodePoolSetManagementCall { hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _zone: zone.to_string(), + _cluster_id: cluster_id.to_string(), + _node_pool_id: node_pool_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Enables or disables the ABAC authorization mechanism on a cluster. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// * `clusterId` - The name of the cluster to update. + pub fn zones_clusters_legacy_abac(&self, request: SetLegacyAbacRequest, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> { + ProjectZoneClusterLegacyAbacCall { + hub: self.hub, + _request: request, _project_id: project_id.to_string(), _zone: zone.to_string(), _cluster_id: cluster_id.to_string(), @@ -945,8 +1663,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// * `operationId` - The server-assigned `name` of the operation. pub fn zones_operations_get(&self, project_id: &str, zone: &str, operation_id: &str) -> ProjectZoneOperationGetCall<'a, C, A> { ProjectZoneOperationGetCall { @@ -960,14 +1681,42 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Sets labels on a cluster. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// * `clusterId` - The name of the cluster. + pub fn zones_clusters_resource_labels(&self, request: SetLabelsRequest, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterResourceLabelCall<'a, C, A> { + ProjectZoneClusterResourceLabelCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _zone: zone.to_string(), + _cluster_id: cluster_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Lists all operations in a project in a specific zone or all zones. /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) + /// to return operations for, or `-` for all zones. pub fn zones_operations_list(&self, project_id: &str, zone: &str) -> ProjectZoneOperationListCall<'a, C, A> { ProjectZoneOperationListCall { hub: self.hub, @@ -981,13 +1730,28 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster. + /// Creates a cluster, consisting of the specified number and type of Google + /// Compute Engine instances. + /// + /// By default, the cluster is created in the project's + /// [default network](/compute/docs/networks-and-firewalls#networks). + /// + /// One firewall is added for the cluster. After cluster creation, + /// the cluster creates routes for each node to allow the containers + /// on that node to communicate with all other instances in the + /// cluster. + /// + /// Finally, an entry is added to the project's global metadata indicating + /// which CIDR range is being used by the cluster. /// /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. pub fn zones_clusters_create(&self, request: CreateClusterRequest, project_id: &str, zone: &str) -> ProjectZoneClusterCreateCall<'a, C, A> { ProjectZoneClusterCreateCall { hub: self.hub, @@ -1007,8 +1771,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// * `clusterId` - The name of the cluster to upgrade. pub fn zones_clusters_update(&self, request: UpdateClusterRequest, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterUpdateCall<'a, C, A> { ProjectZoneClusterUpdateCall { @@ -1025,12 +1792,16 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists all clusters owned by a project in either the specified zone or all zones. + /// Lists all clusters owned by a project in either the specified zone or all + /// zones. /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides, or "-" for all zones. pub fn zones_clusters_list(&self, project_id: &str, zone: &str) -> ProjectZoneClusterListCall<'a, C, A> { ProjectZoneClusterListCall { hub: self.hub, @@ -1048,8 +1819,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// * `projectId` - The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// * `zone` - The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// * `clusterId` - The name of the cluster. /// * `nodePoolId` - The name of the node pool to delete. pub fn zones_clusters_node_pools_delete(&self, project_id: &str, zone: &str, cluster_id: &str, node_pool_id: &str) -> ProjectZoneClusterNodePoolDeleteCall<'a, C, A> { @@ -1251,7 +2025,8 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Container::new(hyper::Client::new(), 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.projects().zones_get_serverconfig("projectId", "zone") +/// .doit(); +/// # } +/// ``` +pub struct ProjectZoneGetServerconfigCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Container, + _project_id: String, + _zone: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectZoneGetServerconfigCall<'a, C, A> {} + +impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ServerConfig)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "container.projects.zones.getServerconfig", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("zone", self._zone.to_string())); + for &field in ["alt", "projectId", "zone"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/serverconfig".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["zone", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneGetServerconfigCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The name of the Google Compute Engine [zone](/compute/docs/zones#available) + /// to return operations for. + /// + /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneGetServerconfigCall<'a, C, A> { + self._zone = 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. + /// + /// 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 Delegate) -> ProjectZoneGetServerconfigCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectZoneGetServerconfigCall<'a, C, A> + 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 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: T) -> ProjectZoneGetServerconfigCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Cancels the specified operation. +/// +/// A builder for the *zones.operations.cancel* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_container1 as container1; +/// use container1::CancelOperationRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use container1::Container; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Container::new(hyper::Client::new(), 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 = CancelOperationRequest::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.projects().zones_operations_cancel(req, "projectId", "zone", "operationId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectZoneOperationCancelCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Container, + _request: CancelOperationRequest, + _project_id: String, + _zone: String, + _operation_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectZoneOperationCancelCall<'a, C, A> {} + +impl<'a, C, A> ProjectZoneOperationCancelCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "container.projects.zones.operations.cancel", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("zone", self._zone.to_string())); + params.push(("operationId", self._operation_id.to_string())); + for &field in ["alt", "projectId", "zone", "operationId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone"), ("{operationId}", "operationId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["operationId", "zone", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: CancelOperationRequest) -> ProjectZoneOperationCancelCall<'a, C, A> { + self._request = new_value; + self + } + /// The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneOperationCancelCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the operation resides. + /// + /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneOperationCancelCall<'a, C, A> { + self._zone = new_value.to_string(); + self + } + /// The server-assigned `name` of the operation. + /// + /// Sets the *operation id* 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 operation_id(mut self, new_value: &str) -> ProjectZoneOperationCancelCall<'a, C, A> { + self._operation_id = 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. + /// + /// 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 Delegate) -> ProjectZoneOperationCancelCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectZoneOperationCancelCall<'a, C, A> + 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 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: T) -> ProjectZoneOperationCancelCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists the node pools for a cluster. +/// +/// A builder for the *zones.clusters.nodePools.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_container1 as container1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use container1::Container; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Container::new(hyper::Client::new(), 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.projects().zones_clusters_node_pools_list("projectId", "zone", "clusterId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectZoneClusterNodePoolListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Container, + _project_id: String, + _zone: String, + _cluster_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectZoneClusterNodePoolListCall<'a, C, A> {} + +impl<'a, C, A> ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListNodePoolsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "container.projects.zones.clusters.nodePools.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("zone", self._zone.to_string())); + params.push(("clusterId", self._cluster_id.to_string())); + for &field in ["alt", "projectId", "zone", "clusterId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone"), ("{clusterId}", "clusterId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["clusterId", "zone", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneClusterNodePoolListCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// + /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneClusterNodePoolListCall<'a, C, A> { + self._zone = new_value.to_string(); + self + } + /// The name of the cluster. + /// + /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> ProjectZoneClusterNodePoolListCall<'a, C, A> { + self._cluster_id = 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. + /// + /// 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 Delegate) -> ProjectZoneClusterNodePoolListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectZoneClusterNodePoolListCall<'a, C, A> + 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 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: T) -> ProjectZoneClusterNodePoolListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Used to set master auth materials. Currently supports :- +/// Changing the admin password of a specific cluster. +/// This can be either via password generation or explicitly set the password. +/// +/// A builder for the *zones.clusters.setMasterAuth* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_container1 as container1; +/// use container1::SetMasterAuthRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use container1::Container; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Container::new(hyper::Client::new(), 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 = SetMasterAuthRequest::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.projects().zones_clusters_set_master_auth(req, "projectId", "zone", "clusterId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectZoneClusterSetMasterAuthCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Container, + _request: SetMasterAuthRequest, + _project_id: String, + _zone: String, + _cluster_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectZoneClusterSetMasterAuthCall<'a, C, A> {} + +impl<'a, C, A> ProjectZoneClusterSetMasterAuthCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "container.projects.zones.clusters.setMasterAuth", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("zone", self._zone.to_string())); + params.push(("clusterId", self._cluster_id.to_string())); + for &field in ["alt", "projectId", "zone", "clusterId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone"), ("{clusterId}", "clusterId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["clusterId", "zone", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SetMasterAuthRequest) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> { + self._request = new_value; + self + } + /// The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// + /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> { + self._zone = new_value.to_string(); + self + } + /// The name of the cluster to upgrade. + /// + /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> { + self._cluster_id = 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. + /// + /// 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 Delegate) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> + 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 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: T) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Deletes the cluster, including the Kubernetes endpoint and all worker +/// nodes. +/// +/// Firewalls and routes that were configured during cluster creation +/// are also deleted. +/// +/// Other Google Compute Engine resources that might be in use by the cluster +/// (e.g. load balancer resources) will not be deleted if they weren't present +/// at the initial create time. +/// +/// A builder for the *zones.clusters.delete* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_container1 as container1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use container1::Container; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Container::new(hyper::Client::new(), 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.projects().zones_clusters_delete("projectId", "zone", "clusterId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectZoneClusterDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Container, + _project_id: String, + _zone: String, + _cluster_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectZoneClusterDeleteCall<'a, C, A> {} + +impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "container.projects.zones.clusters.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("zone", self._zone.to_string())); + params.push(("clusterId", self._cluster_id.to_string())); + for &field in ["alt", "projectId", "zone", "clusterId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone"), ("{clusterId}", "clusterId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["clusterId", "zone", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// + /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { + self._zone = new_value.to_string(); + self + } + /// The name of the cluster to delete. + /// + /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { + self._cluster_id = 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. + /// + /// 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 Delegate) -> ProjectZoneClusterDeleteCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectZoneClusterDeleteCall<'a, C, A> + 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 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: T) -> ProjectZoneClusterDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Creates a node pool for a cluster. /// /// A builder for the *zones.clusters.nodePools.create* method supported by a *project* resource. @@ -1547,7 +3722,8 @@ impl<'a, C, A> ProjectZoneClusterNodePoolCreateCall<'a, C, A> where C: BorrowMut self._request = new_value; self } - /// The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). + /// The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). /// /// Sets the *project id* path property to the given value. /// @@ -1557,7 +3733,9 @@ impl<'a, C, A> ProjectZoneClusterNodePoolCreateCall<'a, C, A> where C: BorrowMut self._project_id = new_value.to_string(); self } - /// The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// /// Sets the *zone* path property to the given value. /// @@ -1597,10 +3775,10 @@ impl<'a, C, A> ProjectZoneClusterNodePoolCreateCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -1814,7 +3992,8 @@ impl<'a, C, A> ProjectZoneClusterNodePoolGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolGetCall<'a, C, A> where C: BorrowMut::default(), None); /// # let mut hub = Container::new(hyper::Client::new(), 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 = RollbackNodePoolUpgradeRequest::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.projects().zones_clusters_delete("projectId", "zone", "clusterId") +/// let result = hub.projects().zones_clusters_node_pools_rollback(req, "projectId", "zone", "clusterId", "nodePoolId") /// .doit(); /// # } /// ``` -pub struct ProjectZoneClusterDeleteCall<'a, C, A> +pub struct ProjectZoneClusterNodePoolRollbackCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Container, + _request: RollbackNodePoolUpgradeRequest, _project_id: String, _zone: String, _cluster_id: String, + _node_pool_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectZoneClusterDeleteCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectZoneClusterNodePoolRollbackCall<'a, C, A> {} -impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. @@ -1968,13 +4158,14 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "container.projects.zones.clusters.delete", - http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "container.projects.zones.clusters.nodePools.rollback", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); params.push(("projectId", self._project_id.to_string())); params.push(("zone", self._zone.to_string())); params.push(("clusterId", self._cluster_id.to_string())); - for &field in ["alt", "projectId", "zone", "clusterId"].iter() { + params.push(("nodePoolId", self._node_pool_id.to_string())); + for &field in ["alt", "projectId", "zone", "clusterId", "nodePoolId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -1986,12 +4177,12 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -2002,8 +4193,8 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(3); - for param_name in ["clusterId", "zone", "projectId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(4); + for param_name in ["nodePoolId", "clusterId", "zone", "projectId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -2018,6 +4209,17 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolRollbackCall<'a, C, A> { + self._request = new_value; + self + } + /// The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). /// /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { + pub fn project_id(mut self, new_value: &str) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> { self._project_id = new_value.to_string(); self } - /// The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { + pub fn zone(mut self, new_value: &str) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> { self._zone = new_value.to_string(); self } - /// The name of the cluster to delete. + /// The name of the cluster to rollback. /// /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { + pub fn cluster_id(mut self, new_value: &str) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> { self._cluster_id = new_value.to_string(); self } + /// The name of the node pool to rollback. + /// + /// Sets the *node pool id* 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 node_pool_id(mut self, new_value: &str) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> { + self._node_pool_id = 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. /// /// 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 Delegate) -> ProjectZoneClusterDeleteCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -2139,10 +4367,10 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectZoneClusterDeleteCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -2169,7 +4397,7 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterDeleteCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -2177,9 +4405,9 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut::default(), None); /// # let mut hub = Container::new(hyper::Client::new(), auth); -/// // You can configure optional parameters by calling the respective setters at will, and -/// // execute the final call using `doit()`. +/// // 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 result = hub.projects().zones_get_serverconfig("projectId", "zone") -/// .doit(); -/// # } -/// ``` -pub struct ProjectZoneGetServerconfigCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Container, - _project_id: String, - _zone: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ProjectZoneGetServerconfigCall<'a, C, A> {} - -impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ServerConfig)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "container.projects.zones.getServerconfig", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("projectId", self._project_id.to_string())); - params.push(("zone", self._zone.to_string())); - for &field in ["alt", "projectId", "zone"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/serverconfig".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["zone", "projectId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). - /// - /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneGetServerconfigCall<'a, C, A> { - self._project_id = new_value.to_string(); - self - } - /// The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. - /// - /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneGetServerconfigCall<'a, C, A> { - self._zone = 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. - /// - /// 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 Delegate) -> ProjectZoneGetServerconfigCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> ProjectZoneGetServerconfigCall<'a, C, A> - 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 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: T) -> ProjectZoneGetServerconfigCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Lists the node pools for a cluster. -/// -/// A builder for the *zones.clusters.nodePools.list* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_container1 as container1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use container1::Container; +/// let mut req = StartIPRotationRequest::default(); /// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Container::new(hyper::Client::new(), 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.projects().zones_clusters_node_pools_list("projectId", "zone", "clusterId") +/// let result = hub.projects().zones_clusters_start_ip_rotation(req, "projectId", "zone", "clusterId") /// .doit(); /// # } /// ``` -pub struct ProjectZoneClusterNodePoolListCall<'a, C, A> +pub struct ProjectZoneClusterStartIpRotationCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Container, + _request: StartIPRotationRequest, _project_id: String, _zone: String, _cluster_id: String, @@ -2472,13 +4454,13 @@ pub struct ProjectZoneClusterNodePoolListCall<'a, C, A> _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectZoneClusterNodePoolListCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectZoneClusterStartIpRotationCall<'a, C, A> {} -impl<'a, C, A> ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectZoneClusterStartIpRotationCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ListNodePoolsResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -2486,9 +4468,9 @@ impl<'a, C, A> ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "container.projects.zones.clusters.nodePools.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "container.projects.zones.clusters.startIpRotation", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("projectId", self._project_id.to_string())); params.push(("zone", self._zone.to_string())); params.push(("clusterId", self._cluster_id.to_string())); @@ -2504,7 +4486,7 @@ impl<'a, C, A> ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterStartIpRotationCall<'a, C, A> { + self._request = new_value; + self + } + /// The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). /// /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneClusterNodePoolListCall<'a, C, A> { + pub fn project_id(mut self, new_value: &str) -> ProjectZoneClusterStartIpRotationCall<'a, C, A> { self._project_id = new_value.to_string(); self } - /// The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneClusterNodePoolListCall<'a, C, A> { + pub fn zone(mut self, new_value: &str) -> ProjectZoneClusterStartIpRotationCall<'a, C, A> { self._zone = new_value.to_string(); self } @@ -2633,7 +4642,7 @@ impl<'a, C, A> ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolListCall<'a, C, A> { + pub fn cluster_id(mut self, new_value: &str) -> ProjectZoneClusterStartIpRotationCall<'a, C, A> { self._cluster_id = new_value.to_string(); self } @@ -2643,7 +4652,7 @@ impl<'a, C, A> ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolListCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectZoneClusterStartIpRotationCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -2657,10 +4666,10 @@ impl<'a, C, A> ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectZoneClusterNodePoolListCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectZoneClusterStartIpRotationCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -2687,7 +4696,916 @@ impl<'a, C, A> ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterNodePoolListCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterStartIpRotationCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Completes master IP rotation. +/// +/// A builder for the *zones.clusters.completeIpRotation* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_container1 as container1; +/// use container1::CompleteIPRotationRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use container1::Container; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Container::new(hyper::Client::new(), 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 = CompleteIPRotationRequest::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.projects().zones_clusters_complete_ip_rotation(req, "projectId", "zone", "clusterId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectZoneClusterCompleteIpRotationCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Container, + _request: CompleteIPRotationRequest, + _project_id: String, + _zone: String, + _cluster_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectZoneClusterCompleteIpRotationCall<'a, C, A> {} + +impl<'a, C, A> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "container.projects.zones.clusters.completeIpRotation", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("zone", self._zone.to_string())); + params.push(("clusterId", self._cluster_id.to_string())); + for &field in ["alt", "projectId", "zone", "clusterId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone"), ("{clusterId}", "clusterId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["clusterId", "zone", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: CompleteIPRotationRequest) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> { + self._request = new_value; + self + } + /// The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// + /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> { + self._zone = new_value.to_string(); + self + } + /// The name of the cluster. + /// + /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> { + self._cluster_id = 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. + /// + /// 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 Delegate) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> + 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 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: T) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Sets the NodeManagement options for a node pool. +/// +/// A builder for the *zones.clusters.nodePools.setManagement* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_container1 as container1; +/// use container1::SetNodePoolManagementRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use container1::Container; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Container::new(hyper::Client::new(), 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 = SetNodePoolManagementRequest::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.projects().zones_clusters_node_pools_set_management(req, "projectId", "zone", "clusterId", "nodePoolId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Container, + _request: SetNodePoolManagementRequest, + _project_id: String, + _zone: String, + _cluster_id: String, + _node_pool_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> {} + +impl<'a, C, A> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "container.projects.zones.clusters.nodePools.setManagement", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("zone", self._zone.to_string())); + params.push(("clusterId", self._cluster_id.to_string())); + params.push(("nodePoolId", self._node_pool_id.to_string())); + for &field in ["alt", "projectId", "zone", "clusterId", "nodePoolId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone"), ("{clusterId}", "clusterId"), ("{nodePoolId}", "nodePoolId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(4); + for param_name in ["nodePoolId", "clusterId", "zone", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SetNodePoolManagementRequest) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> { + self._request = new_value; + self + } + /// The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// + /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> { + self._zone = new_value.to_string(); + self + } + /// The name of the cluster to update. + /// + /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> { + self._cluster_id = new_value.to_string(); + self + } + /// The name of the node pool to update. + /// + /// Sets the *node pool id* 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 node_pool_id(mut self, new_value: &str) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> { + self._node_pool_id = 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. + /// + /// 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 Delegate) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> + 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 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: T) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Enables or disables the ABAC authorization mechanism on a cluster. +/// +/// A builder for the *zones.clusters.legacyAbac* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_container1 as container1; +/// use container1::SetLegacyAbacRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use container1::Container; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Container::new(hyper::Client::new(), 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 = SetLegacyAbacRequest::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.projects().zones_clusters_legacy_abac(req, "projectId", "zone", "clusterId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectZoneClusterLegacyAbacCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Container, + _request: SetLegacyAbacRequest, + _project_id: String, + _zone: String, + _cluster_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectZoneClusterLegacyAbacCall<'a, C, A> {} + +impl<'a, C, A> ProjectZoneClusterLegacyAbacCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "container.projects.zones.clusters.legacyAbac", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("zone", self._zone.to_string())); + params.push(("clusterId", self._cluster_id.to_string())); + for &field in ["alt", "projectId", "zone", "clusterId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone"), ("{clusterId}", "clusterId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["clusterId", "zone", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SetLegacyAbacRequest) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> { + self._request = new_value; + self + } + /// The Google Developers Console [project ID or project + /// number](https://support.google.com/cloud/answer/6158840). + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// + /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> { + self._zone = new_value.to_string(); + self + } + /// The name of the cluster to update. + /// + /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> { + self._cluster_id = 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. + /// + /// 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 Delegate) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> + 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 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: T) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -2872,7 +5790,8 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Container::new(hyper::Client::new(), 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 = SetLabelsRequest::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.projects().zones_clusters_resource_labels(req, "projectId", "zone", "clusterId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectZoneClusterResourceLabelCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Container, + _request: SetLabelsRequest, + _project_id: String, + _zone: String, + _cluster_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectZoneClusterResourceLabelCall<'a, C, A> {} + +impl<'a, C, A> ProjectZoneClusterResourceLabelCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "container.projects.zones.clusters.resourceLabels", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("zone", self._zone.to_string())); + params.push(("clusterId", self._cluster_id.to_string())); + for &field in ["alt", "projectId", "zone", "clusterId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{zone}", "zone"), ("{clusterId}", "clusterId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["clusterId", "zone", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SetLabelsRequest) -> ProjectZoneClusterResourceLabelCall<'a, C, A> { + self._request = new_value; + self + } + /// The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectZoneClusterResourceLabelCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. + /// + /// Sets the *zone* 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 zone(mut self, new_value: &str) -> ProjectZoneClusterResourceLabelCall<'a, C, A> { + self._zone = new_value.to_string(); + self + } + /// The name of the cluster. + /// + /// Sets the *cluster id* 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 cluster_id(mut self, new_value: &str) -> ProjectZoneClusterResourceLabelCall<'a, C, A> { + self._cluster_id = 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. + /// + /// 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 Delegate) -> ProjectZoneClusterResourceLabelCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectZoneClusterResourceLabelCall<'a, C, A> + 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 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: T) -> ProjectZoneClusterResourceLabelCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Lists all operations in a project in a specific zone or all zones. /// /// A builder for the *zones.operations.list* method supported by a *project* resource. @@ -3135,7 +6355,8 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolDeleteCall<'a, C, A> where C: BorrowMut } - /// The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). + /// The Google Developers Console [project ID or project + /// number](https://developers.google.com/console/help/new/#projectnumber). /// /// Sets the *project id* path property to the given value. /// @@ -4235,7 +7480,9 @@ impl<'a, C, A> ProjectZoneClusterNodePoolDeleteCall<'a, C, A> where C: BorrowMut self._project_id = new_value.to_string(); self } - /// The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. + /// The name of the Google Compute Engine + /// [zone](/compute/docs/zones#available) in which the cluster + /// resides. /// /// Sets the *zone* path property to the given value. /// @@ -4285,10 +7532,10 @@ impl<'a, C, A> ProjectZoneClusterNodePoolDeleteCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. diff --git a/gen/content2-cli/Cargo.toml b/gen/content2-cli/Cargo.toml index 19fee71fe2..9104942537 100644 --- a/gen/content2-cli/Cargo.toml +++ b/gen/content2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-content2-cli" -version = "1.0.4+20161205" +version = "1.0.4+20170519" authors = ["Sebastian Thiel "] description = "A complete library to interact with Shopping Content (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/content2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-content2] path = "../content2" -version = "1.0.4+20161205" +version = "1.0.4+20170519" diff --git a/gen/content2-cli/README.md b/gen/content2-cli/README.md index f94e79f21c..914a272897 100644 --- a/gen/content2-cli/README.md +++ b/gen/content2-cli/README.md @@ -25,12 +25,13 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Shopping Content* API at revision *20161205*. The CLI is at version *1.0.4*. +This documentation was generated from the *Shopping Content* API at revision *20170519*. The CLI is at version *1.0.4*. ```bash content2 [options] accounts authinfo [-p ]... [-o ] + claimwebsite [-p ]... [-o ] custombatch (-r )... [-p ]... [-o ] delete [-p ]... get [-p ]... [-o ] @@ -38,12 +39,6 @@ content2 [options] list [-p ]... [-o ] patch (-r )... [-p ]... [-o ] update (-r )... [-p ]... [-o ] - accountshipping - custombatch (-r )... [-p ]... [-o ] - get [-p ]... [-o ] - list [-p ]... [-o ] - patch (-r )... [-p ]... [-o ] - update (-r )... [-p ]... [-o ] accountstatuses custombatch (-r )... [-p ]... [-o ] get [-p ]... [-o ] diff --git a/gen/content2-cli/mkdocs.yml b/gen/content2-cli/mkdocs.yml index 090c2aee87..1df6cfb3c9 100644 --- a/gen/content2-cli/mkdocs.yml +++ b/gen/content2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Shopping Content v1.0.4+20161205 +site_name: Shopping Content v1.0.4+20170519 site_url: http://byron.github.io/google-apis-rs/google-content2-cli site_description: A complete library to interact with Shopping Content (protocol v2) @@ -10,6 +10,7 @@ site_dir: build_html pages: - ['index.md', 'Home'] - ['accounts_authinfo.md', 'Accounts', 'Authinfo'] +- ['accounts_claimwebsite.md', 'Accounts', 'Claimwebsite'] - ['accounts_custombatch.md', 'Accounts', 'Custombatch'] - ['accounts_delete.md', 'Accounts', 'Delete'] - ['accounts_get.md', 'Accounts', 'Get'] @@ -17,11 +18,6 @@ pages: - ['accounts_list.md', 'Accounts', 'List'] - ['accounts_patch.md', 'Accounts', 'Patch'] - ['accounts_update.md', 'Accounts', 'Update'] -- ['accountshipping_custombatch.md', 'Accountshipping', 'Custombatch'] -- ['accountshipping_get.md', 'Accountshipping', 'Get'] -- ['accountshipping_list.md', 'Accountshipping', 'List'] -- ['accountshipping_patch.md', 'Accountshipping', 'Patch'] -- ['accountshipping_update.md', 'Accountshipping', 'Update'] - ['accountstatuses_custombatch.md', 'Accountstatuses', 'Custombatch'] - ['accountstatuses_get.md', 'Accountstatuses', 'Get'] - ['accountstatuses_list.md', 'Accountstatuses', 'List'] diff --git a/gen/content2-cli/src/main.rs b/gen/content2-cli/src/main.rs index 533455d6a1..933827a750 100644 --- a/gen/content2-cli/src/main.rs +++ b/gen/content2-cli/src/main.rs @@ -98,6 +98,62 @@ impl<'n> Engine<'n> { } } + fn _accounts_claimwebsite(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.accounts().claimwebsite(opt.value_of("merchant-id").unwrap_or(""), opt.value_of("account-id").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 { + "overwrite" => { + call = call.overwrite(arg_from_str(value.unwrap_or("false"), err, "overwrite", "boolean")); + }, + _ => { + 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(["overwrite"].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(), + _ => 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(()) + } + } + } + } + fn _accounts_custombatch(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -630,385 +686,6 @@ impl<'n> Engine<'n> { } } - fn _accountshipping_custombatch(&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::AccountshippingCustomBatchRequest = json::value::from_value(object).unwrap(); - let mut call = self.hub.accountshipping().custombatch(request); - 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 { - "dry-run" => { - call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean")); - }, - _ => { - 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(["dry-run"].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(), - _ => 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(()) - } - } - } - } - - fn _accountshipping_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.accountshipping().get(opt.value_of("merchant-id").unwrap_or(""), opt.value_of("account-id").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(), - _ => 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(()) - } - } - } - } - - fn _accountshipping_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.accountshipping().list(opt.value_of("merchant-id").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("")); - }, - "max-results" => { - call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); - }, - _ => { - 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-token", "max-results"].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(), - _ => 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(()) - } - } - } - } - - fn _accountshipping_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()[..] { - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "account-id" => Some(("accountId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "kind"]); - 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::AccountShipping = json::value::from_value(object).unwrap(); - let mut call = self.hub.accountshipping().patch(request, opt.value_of("merchant-id").unwrap_or(""), opt.value_of("account-id").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 { - "dry-run" => { - call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean")); - }, - _ => { - 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(["dry-run"].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(), - _ => 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(()) - } - } - } - } - - fn _accountshipping_update(&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()[..] { - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "account-id" => Some(("accountId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "kind"]); - 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::AccountShipping = json::value::from_value(object).unwrap(); - let mut call = self.hub.accountshipping().update(request, opt.value_of("merchant-id").unwrap_or(""), opt.value_of("account-id").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 { - "dry-run" => { - call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean")); - }, - _ => { - 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(["dry-run"].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(), - _ => 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(()) - } - } - } - } - fn _accountstatuses_custombatch(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -4164,6 +3841,9 @@ impl<'n> Engine<'n> { 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 { + "include-attributes" => { + call = call.include_attributes(arg_from_str(value.unwrap_or("false"), err, "include-attributes", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -4177,6 +3857,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["include-attributes"].iter().map(|v|*v)); v } )); } } @@ -4216,6 +3897,9 @@ impl<'n> Engine<'n> { 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 { + "include-attributes" => { + call = call.include_attributes(arg_from_str(value.unwrap_or("false"), err, "include-attributes", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -4229,6 +3913,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["include-attributes"].iter().map(|v|*v)); v } )); } } @@ -4277,6 +3962,9 @@ impl<'n> Engine<'n> { "include-invalid-inserted-items" => { call = call.include_invalid_inserted_items(arg_from_str(value.unwrap_or("false"), err, "include-invalid-inserted-items", "boolean")); }, + "include-attributes" => { + call = call.include_attributes(arg_from_str(value.unwrap_or("false"), err, "include-attributes", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -4290,7 +3978,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["include-invalid-inserted-items", "page-token", "max-results"].iter().map(|v|*v)); + v.extend(["include-invalid-inserted-items", "page-token", "include-attributes", "max-results"].iter().map(|v|*v)); v } )); } } @@ -4763,6 +4451,9 @@ impl<'n> Engine<'n> { ("authinfo", Some(opt)) => { call_result = self._accounts_authinfo(opt, dry_run, &mut err); }, + ("claimwebsite", Some(opt)) => { + call_result = self._accounts_claimwebsite(opt, dry_run, &mut err); + }, ("custombatch", Some(opt)) => { call_result = self._accounts_custombatch(opt, dry_run, &mut err); }, @@ -4790,29 +4481,6 @@ impl<'n> Engine<'n> { } } }, - ("accountshipping", Some(opt)) => { - match opt.subcommand() { - ("custombatch", Some(opt)) => { - call_result = self._accountshipping_custombatch(opt, dry_run, &mut err); - }, - ("get", Some(opt)) => { - call_result = self._accountshipping_get(opt, dry_run, &mut err); - }, - ("list", Some(opt)) => { - call_result = self._accountshipping_list(opt, dry_run, &mut err); - }, - ("patch", Some(opt)) => { - call_result = self._accountshipping_patch(opt, dry_run, &mut err); - }, - ("update", Some(opt)) => { - call_result = self._accountshipping_update(opt, dry_run, &mut err); - }, - _ => { - err.issues.push(CLIError::MissingMethodError("accountshipping".to_string())); - writeln!(io::stderr(), "{}\n", opt.usage()).ok(); - } - } - }, ("accountstatuses", Some(opt)) => { match opt.subcommand() { ("custombatch", Some(opt)) => { @@ -5114,7 +4782,7 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ - ("accounts", "methods: 'authinfo', 'custombatch', 'delete', 'get', 'insert', 'list', 'patch' and 'update'", vec![ + ("accounts", "methods: 'authinfo', 'claimwebsite', 'custombatch', 'delete', 'get', 'insert', 'list', 'patch' and 'update'", vec![ ("authinfo", Some(r##"Returns information about the authenticated user."##), "Details at http://byron.github.io/google-apis-rs/google_content2_cli/accounts_authinfo", @@ -5125,6 +4793,34 @@ fn main() { 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)), + ]), + ("claimwebsite", + Some(r##"Claims the website of a Merchant Center sub-account. This method can only be called for multi-client accounts."##), + "Details at http://byron.github.io/google-apis-rs/google_content2_cli/accounts_claimwebsite", + vec![ + (Some(r##"merchant-id"##), + None, + Some(r##"The ID of the managing account."##), + Some(true), + Some(false)), + + (Some(r##"account-id"##), + None, + Some(r##"The ID of the account whose website is claimed."##), + 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"##), @@ -5254,7 +4950,7 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates a Merchant Center account. This method can only be called for multi-client accounts. This method supports patch semantics."##), + Some(r##"Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. This method supports patch semantics."##), "Details at http://byron.github.io/google-apis-rs/google_content2_cli/accounts_patch", vec![ (Some(r##"merchant-id"##), @@ -5288,7 +4984,7 @@ fn main() { Some(false)), ]), ("update", - Some(r##"Updates a Merchant Center account. This method can only be called for multi-client accounts."##), + Some(r##"Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account."##), "Details at http://byron.github.io/google-apis-rs/google_content2_cli/accounts_update", vec![ (Some(r##"merchant-id"##), @@ -5323,149 +5019,6 @@ fn main() { ]), ]), - ("accountshipping", "methods: 'custombatch', 'get', 'list', 'patch' and 'update'", vec![ - ("custombatch", - Some(r##"Retrieves and updates the shipping settings of multiple accounts in a single request."##), - "Details at http://byron.github.io/google-apis-rs/google_content2_cli/accountshipping_custombatch", - vec![ - (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)), - ]), - ("get", - Some(r##"Retrieves the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account."##), - "Details at http://byron.github.io/google-apis-rs/google_content2_cli/accountshipping_get", - vec![ - (Some(r##"merchant-id"##), - None, - Some(r##"The ID of the managing account."##), - Some(true), - Some(false)), - - (Some(r##"account-id"##), - None, - Some(r##"The ID of the account for which to get/update account shipping settings."##), - 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)), - ]), - ("list", - Some(r##"Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts."##), - "Details at http://byron.github.io/google-apis-rs/google_content2_cli/accountshipping_list", - vec![ - (Some(r##"merchant-id"##), - None, - Some(r##"The ID of the managing account."##), - 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)), - ]), - ("patch", - Some(r##"Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. This method supports patch semantics."##), - "Details at http://byron.github.io/google-apis-rs/google_content2_cli/accountshipping_patch", - vec![ - (Some(r##"merchant-id"##), - None, - Some(r##"The ID of the managing account."##), - Some(true), - Some(false)), - - (Some(r##"account-id"##), - None, - Some(r##"The ID of the account for which to get/update account shipping settings."##), - 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)), - ]), - ("update", - Some(r##"Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account."##), - "Details at http://byron.github.io/google-apis-rs/google_content2_cli/accountshipping_update", - vec![ - (Some(r##"merchant-id"##), - None, - Some(r##"The ID of the managing account."##), - Some(true), - Some(false)), - - (Some(r##"account-id"##), - None, - Some(r##"The ID of the account for which to get/update account shipping settings."##), - 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)), - ]), - ]), - ("accountstatuses", "methods: 'custombatch', 'get' and 'list'", vec![ ("custombatch", None, @@ -6081,7 +5634,7 @@ fn main() { Some(false)), ]), ("cancel", - Some(r##"Cancels all line items in an order. This method can only be called for non-multi-client accounts."##), + Some(r##"Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts."##), "Details at http://byron.github.io/google-apis-rs/google_content2_cli/orders_cancel", vec![ (Some(r##"merchant-id"##), @@ -6115,7 +5668,7 @@ fn main() { Some(false)), ]), ("cancellineitem", - Some(r##"Cancels a line item. This method can only be called for non-multi-client accounts."##), + Some(r##"Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts."##), "Details at http://byron.github.io/google-apis-rs/google_content2_cli/orders_cancellineitem", vec![ (Some(r##"merchant-id"##), @@ -6845,7 +6398,7 @@ fn main() { let mut app = App::new("content2") .author("Sebastian Thiel ") - .version("1.0.4+20161205") + .version("1.0.4+20170519") .about("Manages product items, inventory, and Merchant Center accounts for Google Shopping.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_content2_cli") .arg(Arg::with_name("url") diff --git a/gen/content2/Cargo.toml b/gen/content2/Cargo.toml index ee0912a3c9..2e8b2095d9 100644 --- a/gen/content2/Cargo.toml +++ b/gen/content2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-content2" -version = "1.0.4+20161205" +version = "1.0.4+20170519" authors = ["Sebastian Thiel "] description = "A complete library to interact with Shopping Content (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/content2" homepage = "https://developers.google.com/shopping-content" -documentation = "https://docs.rs/google-content2/1.0.4+20161205" +documentation = "https://docs.rs/google-content2/1.0.4+20170519" license = "MIT" keywords = ["content", "google", "protocol", "web", "api"] diff --git a/gen/content2/README.md b/gen/content2/README.md index a2fbf46bea..d0ffe18d94 100644 --- a/gen/content2/README.md +++ b/gen/content2/README.md @@ -5,36 +5,34 @@ DO NOT EDIT ! --> The `google-content2` library allows access to all features of the *Google Shopping Content* service. -This documentation was generated from *Shopping Content* crate version *1.0.4+20161205*, where *20161205* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Shopping Content* crate version *1.0.4+20170519*, where *20170519* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Shopping Content* *v2* API can be found at the [official documentation site](https://developers.google.com/shopping-content). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ShoppingContent.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ShoppingContent.html) ... -* [accounts](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.Account.html) - * [*authinfo*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountAuthinfoCall.html), [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountCustombatchCall.html), [*delete*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountDeleteCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountGetCall.html), [*insert*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountInsertCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountListCall.html), [*patch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountUpdateCall.html) -* accountshipping - * [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountshippingCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountshippingGetCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountshippingListCall.html), [*patch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountshippingPatchCall.html) and [*update*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountshippingUpdateCall.html) +* [accounts](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.Account.html) + * [*authinfo*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountAuthinfoCall.html), [*claimwebsite*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountClaimwebsiteCall.html), [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountCustombatchCall.html), [*delete*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountDeleteCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountGetCall.html), [*insert*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountInsertCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountListCall.html), [*patch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountUpdateCall.html) * accountstatuses - * [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountstatuseCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountstatuseGetCall.html) and [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccountstatuseListCall.html) + * [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountstatuseCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountstatuseGetCall.html) and [*list*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccountstatuseListCall.html) * accounttax - * [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccounttaxCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccounttaxGetCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccounttaxListCall.html), [*patch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccounttaxPatchCall.html) and [*update*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.AccounttaxUpdateCall.html) -* [datafeeds](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.Datafeed.html) - * [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedCustombatchCall.html), [*delete*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedDeleteCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedGetCall.html), [*insert*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedInsertCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedListCall.html), [*patch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedPatchCall.html) and [*update*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedUpdateCall.html) + * [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccounttaxCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccounttaxGetCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccounttaxListCall.html), [*patch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccounttaxPatchCall.html) and [*update*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.AccounttaxUpdateCall.html) +* [datafeeds](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.Datafeed.html) + * [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedCustombatchCall.html), [*delete*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedDeleteCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedGetCall.html), [*insert*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedInsertCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedListCall.html), [*patch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedPatchCall.html) and [*update*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedUpdateCall.html) * datafeedstatuses - * [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedstatuseCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedstatuseGetCall.html) and [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.DatafeedstatuseListCall.html) -* [inventory](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.Inventory.html) - * [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.InventoryCustombatchCall.html) and [*set*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.InventorySetCall.html) -* [orders](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.Order.html) - * [*acknowledge*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderAcknowledgeCall.html), [*advancetestorder*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderAdvancetestorderCall.html), [*cancel*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderCancelCall.html), [*cancellineitem*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderCancellineitemCall.html), [*createtestorder*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderCreatetestorderCall.html), [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderGetCall.html), [*getbymerchantorderid*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderGetbymerchantorderidCall.html), [*gettestordertemplate*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderGettestordertemplateCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderListCall.html), [*refund*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderRefundCall.html), [*returnlineitem*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderReturnlineitemCall.html), [*shiplineitems*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderShiplineitemCall.html), [*updatemerchantorderid*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderUpdatemerchantorderidCall.html) and [*updateshipment*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.OrderUpdateshipmentCall.html) -* [products](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.Product.html) - * [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ProductCustombatchCall.html), [*delete*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ProductDeleteCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ProductGetCall.html), [*insert*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ProductInsertCall.html) and [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ProductListCall.html) + * [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedstatuseCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedstatuseGetCall.html) and [*list*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.DatafeedstatuseListCall.html) +* [inventory](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.Inventory.html) + * [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.InventoryCustombatchCall.html) and [*set*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.InventorySetCall.html) +* [orders](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.Order.html) + * [*acknowledge*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderAcknowledgeCall.html), [*advancetestorder*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderAdvancetestorderCall.html), [*cancel*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderCancelCall.html), [*cancellineitem*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderCancellineitemCall.html), [*createtestorder*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderCreatetestorderCall.html), [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderGetCall.html), [*getbymerchantorderid*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderGetbymerchantorderidCall.html), [*gettestordertemplate*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderGettestordertemplateCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderListCall.html), [*refund*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderRefundCall.html), [*returnlineitem*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderReturnlineitemCall.html), [*shiplineitems*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderShiplineitemCall.html), [*updatemerchantorderid*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderUpdatemerchantorderidCall.html) and [*updateshipment*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.OrderUpdateshipmentCall.html) +* [products](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.Product.html) + * [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ProductCustombatchCall.html), [*delete*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ProductDeleteCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ProductGetCall.html), [*insert*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ProductInsertCall.html) and [*list*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ProductListCall.html) * productstatuses - * [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ProductstatuseCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ProductstatuseGetCall.html) and [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ProductstatuseListCall.html) + * [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ProductstatuseCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ProductstatuseGetCall.html) and [*list*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ProductstatuseListCall.html) * shippingsettings - * [*custombatch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ShippingsettingCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ShippingsettingGetCall.html), [*getsupportedcarriers*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ShippingsettingGetsupportedcarrierCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ShippingsettingListCall.html), [*patch*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ShippingsettingPatchCall.html) and [*update*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ShippingsettingUpdateCall.html) + * [*custombatch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ShippingsettingCustombatchCall.html), [*get*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ShippingsettingGetCall.html), [*getsupportedcarriers*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ShippingsettingGetsupportedcarrierCall.html), [*list*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ShippingsettingListCall.html), [*patch*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ShippingsettingPatchCall.html) and [*update*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ShippingsettingUpdateCall.html) @@ -43,17 +41,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-content2/1.0.4+20161205/google_content2/struct.ShoppingContent.html)** +* **[Hub](https://docs.rs/google-content2/1.0.4+20170519/google_content2/struct.ShoppingContent.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.Part.html)** + * **[Parts](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -156,17 +154,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-content2/1.0.4+20161205/google_content2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-content2/1.0.4+20170519/google_content2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.Delegate.html), 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-content2/1.0.4+20161205/google_content2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-content2/1.0.4+20170519/google_content2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.ResponseResult.html), 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")`. @@ -176,29 +174,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.CallBuilder.html) 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-content2/1.0.4+20161205/google_content2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-content2/1.0.4+20161205/google_content2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.CallBuilder.html), 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-content2/1.0.4+20161205/google_content2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-content2/1.0.4+20170519/google_content2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/content2/src/lib.rs b/gen/content2/src/lib.rs index 27f15100c1..5626b2d62f 100644 --- a/gen/content2/src/lib.rs +++ b/gen/content2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Shopping Content* crate version *1.0.4+20161205*, where *20161205* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Shopping Content* crate version *1.0.4+20170519*, where *20170519* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Shopping Content* *v2* API can be found at the //! [official documentation site](https://developers.google.com/shopping-content). @@ -12,9 +12,7 @@ //! Handle the following *Resources* with ease from the central [hub](struct.ShoppingContent.html) ... //! //! * [accounts](struct.Account.html) -//! * [*authinfo*](struct.AccountAuthinfoCall.html), [*custombatch*](struct.AccountCustombatchCall.html), [*delete*](struct.AccountDeleteCall.html), [*get*](struct.AccountGetCall.html), [*insert*](struct.AccountInsertCall.html), [*list*](struct.AccountListCall.html), [*patch*](struct.AccountPatchCall.html) and [*update*](struct.AccountUpdateCall.html) -//! * accountshipping -//! * [*custombatch*](struct.AccountshippingCustombatchCall.html), [*get*](struct.AccountshippingGetCall.html), [*list*](struct.AccountshippingListCall.html), [*patch*](struct.AccountshippingPatchCall.html) and [*update*](struct.AccountshippingUpdateCall.html) +//! * [*authinfo*](struct.AccountAuthinfoCall.html), [*claimwebsite*](struct.AccountClaimwebsiteCall.html), [*custombatch*](struct.AccountCustombatchCall.html), [*delete*](struct.AccountDeleteCall.html), [*get*](struct.AccountGetCall.html), [*insert*](struct.AccountInsertCall.html), [*list*](struct.AccountListCall.html), [*patch*](struct.AccountPatchCall.html) and [*update*](struct.AccountUpdateCall.html) //! * accountstatuses //! * [*custombatch*](struct.AccountstatuseCustombatchCall.html), [*get*](struct.AccountstatuseGetCall.html) and [*list*](struct.AccountstatuseListCall.html) //! * accounttax @@ -361,9 +359,6 @@ impl<'a, C, A> ShoppingContent pub fn accounts(&'a self) -> AccountMethods<'a, C, A> { AccountMethods { hub: &self } } - pub fn accountshipping(&'a self) -> AccountshippingMethods<'a, C, A> { - AccountshippingMethods { hub: &self } - } pub fn accountstatuses(&'a self) -> AccountstatuseMethods<'a, C, A> { AccountstatuseMethods { hub: &self } } @@ -549,19 +544,22 @@ impl Part for ProductsCustomBatchResponseEntry {} /// There is no detailed description. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [custombatch accounttax](struct.AccounttaxCustombatchCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct DeliveryTime { - /// Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required. - #[serde(rename="maxTransitTimeInDays")] - pub max_transit_time_in_days: Option, - /// Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required. - #[serde(rename="minTransitTimeInDays")] - pub min_transit_time_in_days: Option, +pub struct AccounttaxCustomBatchResponse { + /// Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse". + pub kind: Option, + /// The result of the execution of the batch requests. + pub entries: Option>, } -impl Part for DeliveryTime {} +impl ResponseResult for AccounttaxCustomBatchResponse {} /// There is no detailed description. @@ -643,50 +641,20 @@ impl Part for TestOrderCustomer {} /// There is no detailed description. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [custombatch accountstatuses](struct.AccountstatuseCustombatchCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct OrderLineItemProduct { - /// The CLDR territory code of the target country of the product. - #[serde(rename="targetCountry")] - pub target_country: Option, - /// URL to the cached image shown to the user when order was placed. - #[serde(rename="shownImage")] - pub shown_image: Option, - /// The two-letter ISO 639-1 language code for the item. - #[serde(rename="contentLanguage")] - pub content_language: Option, - /// The title of the product. - pub title: Option, - /// Manufacturer Part Number (MPN) of the item. - pub mpn: Option, - /// Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here. - #[serde(rename="variantAttributes")] - pub variant_attributes: Option>, - /// Brand of the item. - pub brand: Option, - /// URL of an image of the item. - #[serde(rename="imageLink")] - pub image_link: Option, - /// An identifier of the item. - #[serde(rename="offerId")] - pub offer_id: Option, - /// The REST id of the product. - pub id: Option, - /// Shared identifier for all variants of the same product. - #[serde(rename="itemGroupId")] - pub item_group_id: Option, - /// Global Trade Item Number (GTIN) of the item. - pub gtin: Option, - /// Condition or state of the item. - pub condition: Option, - /// Price of the item. - pub price: Option, - /// The item's channel (online or local). - pub channel: Option, +pub struct AccountstatusesCustomBatchRequest { + /// The request entries to be processed in the batch. + pub entries: Option>, } -impl Part for OrderLineItemProduct {} +impl RequestValue for AccountstatusesCustomBatchRequest {} /// An example occurrence for a particular error. @@ -708,28 +676,6 @@ pub struct DatafeedStatusExample { impl Part for DatafeedStatusExample {} -/// Building block of the cost calculation decision tree. -/// - The tree root should have no condition and no calculation method. -/// - All the children must have a condition on the same dimension. The first child matching a condition is entered, therefore, price and weight conditions form contiguous intervals. -/// - The last child of an element must have no condition and matches all elements not previously matched. -/// - Children and calculation method are mutually exclusive, and exactly one of them must be defined; the root must only have children. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShippingShippingServiceCostRule { - /// Final calculation method to be used only in leaf nodes. - #[serde(rename="calculationMethod")] - pub calculation_method: Option, - /// Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. - pub condition: Option, - /// Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. - pub children: Option>, -} - -impl Part for AccountShippingShippingServiceCostRule {} - - /// Account data. /// /// # Activities @@ -743,6 +689,7 @@ impl Part for AccountShippingShippingServiceCostRule {} /// * [update accounts](struct.AccountUpdateCall.html) (request|response) /// * [list accounts](struct.AccountListCall.html) (none) /// * [authinfo accounts](struct.AccountAuthinfoCall.html) (none) +/// * [claimwebsite accounts](struct.AccountClaimwebsiteCall.html) (none) /// * [delete accounts](struct.AccountDeleteCall.html) (none) /// * [insert accounts](struct.AccountInsertCall.html) (request|response) /// @@ -758,7 +705,7 @@ pub struct Account { /// Indicates whether the merchant sells adult content. #[serde(rename="adultContent")] pub adult_content: Option, - /// List of linked AdWords accounts, active or pending approval. To create a new link request, add a new link with status active to the list. It will remain is state pending until approved or rejected in the AdWords interface. To delete an active link or to cancel a link request, remove it from the list. + /// List of linked AdWords accounts that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected either in the AdWords interface or through the AdWords API. To delete an active link, or to cancel a link request, remove it from the list. #[serde(rename="adwordsLinks")] pub adwords_links: Option>, /// The merchant's website. @@ -1080,23 +1027,6 @@ pub struct ProductstatusesCustomBatchResponse { impl ResponseResult for ProductstatusesCustomBatchResponse {} -/// A postal code range, that can be either: -/// - A range of postal codes (e.g., start=12340, end=12359) -/// - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes must be of the same length (e.g., start=12* end=2* is invalid). -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShippingPostalCodeRange { - /// The first (inclusive) postal code or prefix of the range. - pub start: Option, - /// The last (inclusive) postal code or prefix of the range. - pub end: Option, -} - -impl Part for AccountShippingPostalCodeRange {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1213,22 +1143,22 @@ impl Part for ProductTax {} /// There is no detailed description. /// -/// # 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*). -/// -/// * [custombatch datafeedstatuses](struct.DatafeedstatuseCustombatchCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct DatafeedstatusesCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesCustomBatchResponse". - pub kind: Option, - /// The result of the execution of the batch requests. - pub entries: Option>, +pub struct DatafeedFormat { + /// Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. + #[serde(rename="fileEncoding")] + pub file_encoding: Option, + /// Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. + #[serde(rename="quotingMode")] + pub quoting_mode: Option, + /// Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds. + #[serde(rename="columnDelimiter")] + pub column_delimiter: Option, } -impl ResponseResult for DatafeedstatusesCustomBatchResponse {} +impl Part for DatafeedFormat {} /// A batch entry encoding a single non-batch accounts request. @@ -1242,12 +1172,14 @@ pub struct AccountsCustomBatchRequestEntry { pub batch_id: Option, /// The account to create or update. Only defined if the method is insert or update. pub account: Option, - /// The ID of the account to get or delete. Only defined if the method is get or delete. + /// The ID of the targeted account. Only defined if the method is get, delete or claimwebsite. #[serde(rename="accountId")] pub account_id: Option, /// The ID of the managing account. #[serde(rename="merchantId")] pub merchant_id: Option, + /// Only applicable if the method is claimwebsite. Indicates whether or not to take the claim from another account in case there is a conflict. + pub overwrite: Option, /// no description provided pub method: Option, } @@ -1400,24 +1332,6 @@ pub struct OrdersShipLineItemsRequest { impl RequestValue for OrdersShipLineItemsRequest {} -/// A single or bi-dimensional table of shipping rates. Each dimension is defined in terms of consecutive price/weight ranges, delivery locations, or shipping labels. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShippingRateTable { - /// One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). - pub content: Option>, - /// The sale country for which this table is valid, represented as a CLDR territory code. - #[serde(rename="saleCountry")] - pub sale_country: Option, - /// The name of the rate table. - pub name: Option, -} - -impl Part for AccountShippingRateTable {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1701,38 +1615,6 @@ pub struct ProductCustomAttribute { impl Part for ProductCustomAttribute {} -/// There is no detailed description. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShippingCondition { - /// Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). - #[serde(rename="weightMax")] - pub weight_max: Option, - /// Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. - #[serde(rename="deliveryLocationId")] - pub delivery_location_id: Option, - /// Shipping label of the product. The products with the label are matched. - #[serde(rename="shippingLabel")] - pub shipping_label: Option, - /// Delivery location in terms of a location group name. A location group with this name must be specified among location groups. - #[serde(rename="deliveryLocationGroup")] - pub delivery_location_group: Option, - /// Delivery location in terms of a postal code. - #[serde(rename="deliveryPostalCode")] - pub delivery_postal_code: Option, - /// Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). - #[serde(rename="priceMax")] - pub price_max: Option, - /// Delivery location in terms of a postal code range. - #[serde(rename="deliveryPostalCodeRange")] - pub delivery_postal_code_range: Option, -} - -impl Part for AccountShippingCondition {} - - /// There is no detailed description. /// /// # Activities @@ -1812,57 +1694,6 @@ pub struct ProductStatusDataQualityIssue { impl Part for ProductStatusDataQualityIssue {} -/// Shipping services provided in a country. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShippingShippingService { - /// The minimum number of days in transit. Must be a value between 0 and maxDaysIntransit included. A value of 0 means same day delivery. - #[serde(rename="minDaysInTransit")] - pub min_days_in_transit: Option, - /// The name of this shipping service. - pub name: Option, - /// The maximum number of days in transit. Must be a value between 0 and 250 included. A value of 0 means same day delivery. - #[serde(rename="maxDaysInTransit")] - pub max_days_in_transit: Option, - /// Whether the shipping service is available. - pub active: Option, - /// Decision tree for "complicated" shipping cost calculation. - #[serde(rename="costRuleTree")] - pub cost_rule_tree: Option, - /// The CLDR territory code of the sale country for which this service can be used. - #[serde(rename="saleCountry")] - pub sale_country: Option, - /// Calculation method for the "simple" case that needs no rules. - #[serde(rename="calculationMethod")] - pub calculation_method: Option, -} - -impl Part for AccountShippingShippingService {} - - -/// A batch entry encoding a single non-batch accountshipping response. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountshippingCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. - #[serde(rename="batchId")] - pub batch_id: Option, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingCustomBatchResponseEntry". - pub kind: Option, - /// A list of errors defined if and only if the request failed. - pub errors: Option, - /// The retrieved or updated account shipping settings. - #[serde(rename="accountShipping")] - pub account_shipping: Option, -} - -impl Part for AccountshippingCustomBatchResponseEntry {} - - /// There is no detailed description. /// /// # Activities @@ -2034,24 +1865,6 @@ pub struct DatafeedFetchSchedule { impl Part for DatafeedFetchSchedule {} -/// There is no detailed description. -/// -/// # 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*). -/// -/// * [custombatch accountshipping](struct.AccountshippingCustombatchCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountshippingCustomBatchRequest { - /// The request entries to be processed in the batch. - pub entries: Option>, -} - -impl RequestValue for AccountshippingCustomBatchRequest {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -2132,42 +1945,19 @@ impl Part for ProductAspect {} /// There is no detailed description. /// -/// # 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*). -/// -/// * [custombatch accounttax](struct.AccounttaxCustombatchCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccounttaxCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse". - pub kind: Option, - /// The result of the execution of the batch requests. - pub entries: Option>, +pub struct DeliveryTime { + /// Maximum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to minTransitTimeInDays. Required. + #[serde(rename="maxTransitTimeInDays")] + pub max_transit_time_in_days: Option, + /// Minimum number of business days that is spent in transit. 0 means same day delivery, 1 means next day delivery. Required. + #[serde(rename="minTransitTimeInDays")] + pub min_transit_time_in_days: Option, } -impl ResponseResult for AccounttaxCustomBatchResponse {} - - -/// There is no detailed description. -/// -/// # 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*). -/// -/// * [custombatch accountshipping](struct.AccountshippingCustombatchCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountshippingCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingCustomBatchResponse". - pub kind: Option, - /// The result of the execution of the batch requests. - pub entries: Option>, -} - -impl ResponseResult for AccountshippingCustomBatchResponse {} +impl Part for DeliveryTime {} /// A batch entry encoding a single non-batch accountstatuses request. @@ -2192,36 +1982,46 @@ pub struct AccountstatusesCustomBatchRequestEntry { impl Part for AccountstatusesCustomBatchRequestEntry {} -/// There is no detailed description. +/// A batch entry encoding a single non-batch productstatuses request. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountIdentifier { - /// The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount). - #[serde(rename="aggregatorId")] - pub aggregator_id: Option, - /// The merchant account ID, set for individual accounts and subaccounts. +pub struct ProductstatusesCustomBatchRequestEntry { + /// An entry ID, unique within the batch request. + #[serde(rename="batchId")] + pub batch_id: Option, + /// The ID of the managing account. #[serde(rename="merchantId")] pub merchant_id: Option, + /// no description provided + pub method: Option, + /// The ID of the product whose status to get. + #[serde(rename="productId")] + pub product_id: Option, } -impl Part for AccountIdentifier {} +impl Part for ProductstatusesCustomBatchRequestEntry {} /// There is no detailed description. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [custombatch datafeedstatuses](struct.DatafeedstatuseCustombatchCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShippingRateTableCell { - /// The rate applicable if the cell conditions are matched. - pub rate: Option, - /// Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. - pub condition: Option, +pub struct DatafeedstatusesCustomBatchResponse { + /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesCustomBatchResponse". + pub kind: Option, + /// The result of the execution of the batch requests. + pub entries: Option>, } -impl Part for AccountShippingRateTableCell {} +impl ResponseResult for DatafeedstatusesCustomBatchResponse {} /// There is no detailed description. @@ -2286,52 +2086,21 @@ pub struct OrderRefund { impl Part for OrderRefund {} -/// A user-defined locations group in a given country. All the locations of the group must be of the same type. +/// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShippingLocationGroup { - /// A postal code range representing a city or a set of cities. - #[serde(rename="postalCodeRanges")] - pub postal_code_ranges: Option>, - /// The CLDR territory code of the country in which this location group is. - pub country: Option, - /// A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. - #[serde(rename="locationIds")] - pub location_ids: Option>, - /// The name of the location group. - pub name: Option, - /// A postal code representing a city or a set of cities. - /// - A single postal code (e.g., 12345) - /// - A postal code prefix followed by a star (e.g., 1234*) - #[serde(rename="postalCodes")] - pub postal_codes: Option>, -} - -impl Part for AccountShippingLocationGroup {} - - -/// A batch entry encoding a single non-batch productstatuses request. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ProductstatusesCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. - #[serde(rename="batchId")] - pub batch_id: Option, - /// The ID of the managing account. +pub struct AccountIdentifier { + /// The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount). + #[serde(rename="aggregatorId")] + pub aggregator_id: Option, + /// The merchant account ID, set for individual accounts and subaccounts. #[serde(rename="merchantId")] pub merchant_id: Option, - /// no description provided - pub method: Option, - /// The ID of the product whose status to get. - #[serde(rename="productId")] - pub product_id: Option, } -impl Part for ProductstatusesCustomBatchRequestEntry {} +impl Part for AccountIdentifier {} /// There is no detailed description. @@ -2590,6 +2359,9 @@ impl Part for AccountstatusesCustomBatchResponseEntry {} pub struct AccountStatus { /// Identifies what kind of resource this is. Value: the fixed string "content#accountStatus". pub kind: Option, + /// Whether the account's website is claimed or not. + #[serde(rename="websiteClaimed")] + pub website_claimed: Option, /// A list of data quality issues. #[serde(rename="dataQualityIssues")] pub data_quality_issues: Option>, @@ -2663,31 +2435,6 @@ pub struct DatafeedsCustomBatchResponseEntry { impl Part for DatafeedsCustomBatchResponseEntry {} -/// A batch entry encoding a single non-batch accountshipping request. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountshippingCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. - #[serde(rename="batchId")] - pub batch_id: Option, - /// The ID of the account for which to get/update account shipping settings. - #[serde(rename="accountId")] - pub account_id: Option, - /// The account shipping settings to update. Only defined if the method is update. - #[serde(rename="accountShipping")] - pub account_shipping: Option, - /// no description provided - pub method: Option, - /// The ID of the managing account. - #[serde(rename="merchantId")] - pub merchant_id: Option, -} - -impl Part for AccountshippingCustomBatchRequestEntry {} - - /// There is no detailed description. /// /// # Activities @@ -2859,7 +2606,7 @@ pub struct AccountsCustomBatchResponseEntry { /// The ID of the request entry this entry responds to. #[serde(rename="batchId")] pub batch_id: Option, - /// The retrieved, created, or updated account. Not defined if the method was delete. + /// The retrieved, created, or updated account. Not defined if the method was delete or claimwebsite. pub account: Option, /// A list of errors defined if and only if the request failed. pub errors: Option, @@ -2872,50 +2619,50 @@ impl Part for AccountsCustomBatchResponseEntry {} /// There is no detailed description. /// -/// # 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*). -/// -/// * [custombatch accountstatuses](struct.AccountstatuseCustombatchCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountstatusesCustomBatchRequest { - /// The request entries to be processed in the batch. - pub entries: Option>, -} - -impl RequestValue for AccountstatusesCustomBatchRequest {} - - -/// A carrier-calculated shipping rate. -/// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShippingCarrierRate { - /// Shipping origin represented as a postal code. - #[serde(rename="shippingOrigin")] - pub shipping_origin: Option, - /// The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". - pub carrier: Option, - /// The name of the carrier rate. - pub name: Option, - /// The sale country for which this carrier rate is valid, represented as a CLDR territory code. - #[serde(rename="saleCountry")] - pub sale_country: Option, - /// The carrier service, such as "Ground" or "2Day". - #[serde(rename="carrierService")] - pub carrier_service: Option, - /// Additive shipping rate modifier. - #[serde(rename="modifierFlatRate")] - pub modifier_flat_rate: Option, - /// Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. - #[serde(rename="modifierPercent")] - pub modifier_percent: Option, +pub struct OrderLineItemProduct { + /// The CLDR territory code of the target country of the product. + #[serde(rename="targetCountry")] + pub target_country: Option, + /// URL to the cached image shown to the user when order was placed. + #[serde(rename="shownImage")] + pub shown_image: Option, + /// The two-letter ISO 639-1 language code for the item. + #[serde(rename="contentLanguage")] + pub content_language: Option, + /// The title of the product. + pub title: Option, + /// Manufacturer Part Number (MPN) of the item. + pub mpn: Option, + /// Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here. + #[serde(rename="variantAttributes")] + pub variant_attributes: Option>, + /// Brand of the item. + pub brand: Option, + /// URL of an image of the item. + #[serde(rename="imageLink")] + pub image_link: Option, + /// An identifier of the item. + #[serde(rename="offerId")] + pub offer_id: Option, + /// The REST id of the product. + pub id: Option, + /// Shared identifier for all variants of the same product. + #[serde(rename="itemGroupId")] + pub item_group_id: Option, + /// Global Trade Item Number (GTIN) of the item. + pub gtin: Option, + /// Condition or state of the item. + pub condition: Option, + /// Price of the item. + pub price: Option, + /// The item's channel (online or local). + pub channel: Option, } -impl Part for AccountShippingCarrierRate {} +impl Part for OrderLineItemProduct {} /// Datafeed data. @@ -2937,7 +2684,7 @@ impl Part for AccountShippingCarrierRate {} pub struct Datafeed { /// Identifies what kind of resource this is. Value: the fixed string "content#datafeed". pub kind: Option, - /// The type of data feed. + /// The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported. #[serde(rename="contentType")] pub content_type: Option, /// A descriptive name of the data feed. @@ -3136,29 +2883,22 @@ pub struct OrdersCustomBatchRequest { impl RequestValue for OrdersCustomBatchRequest {} -/// Shipping cost calculation method. Exactly one of the field is set. +/// There is no detailed description. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [claimwebsite accounts](struct.AccountClaimwebsiteCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShippingShippingServiceCalculationMethod { - /// Percentage of the price, represented as a floating point number without the percentage character. - #[serde(rename="percentageRate")] - pub percentage_rate: Option, - /// Name of the carrier rate to use for the calculation. - #[serde(rename="carrierRate")] - pub carrier_rate: Option, - /// Name of the rate table to use for the calculation. - #[serde(rename="rateTable")] - pub rate_table: Option, - /// Delivery is excluded. Valid only within cost rules tree. - pub excluded: Option, - /// Fixed price shipping, represented as a floating point number associated with a currency. - #[serde(rename="flatRate")] - pub flat_rate: Option, +pub struct AccountsClaimWebsiteResponse { + /// Identifies what kind of resource this is. Value: the fixed string "content#accountsClaimWebsiteResponse". + pub kind: Option, } -impl Part for AccountShippingShippingServiceCalculationMethod {} +impl ResponseResult for AccountsClaimWebsiteResponse {} /// A batch entry encoding a single non-batch inventory request. @@ -3265,29 +3005,6 @@ pub struct AccounttaxCustomBatchRequestEntry { impl Part for AccounttaxCustomBatchRequestEntry {} -/// There is no detailed description. -/// -/// # 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*). -/// -/// * [list accountshipping](struct.AccountshippingListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountshippingListResponse { - /// The token for the retrieval of the next page of account shipping settings. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingListResponse". - pub kind: Option, - /// no description provided - pub resources: Option>, -} - -impl ResponseResult for AccountshippingListResponse {} - - /// An example of an item that has poor data quality. An item value on the landing page differs from what is submitted, or conflicts with a policy. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -3555,41 +3272,6 @@ pub struct ProductShippingWeight { impl Part for ProductShippingWeight {} -/// The shipping settings of a merchant account. -/// -/// # 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*). -/// -/// * [update accountshipping](struct.AccountshippingUpdateCall.html) (request|response) -/// * [patch accountshipping](struct.AccountshippingPatchCall.html) (request|response) -/// * [get accountshipping](struct.AccountshippingGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AccountShipping { - /// Carrier-based shipping calculations. - #[serde(rename="carrierRates")] - pub carrier_rates: Option>, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". - pub kind: Option, - /// Location groups for shipping. - #[serde(rename="locationGroups")] - pub location_groups: Option>, - /// Shipping services describing shipping fees calculation. - pub services: Option>, - /// The ID of the account to which these account shipping settings belong. - #[serde(rename="accountId")] - pub account_id: Option, - /// Rate tables definitions. - #[serde(rename="rateTables")] - pub rate_tables: Option>, -} - -impl RequestValue for AccountShipping {} -impl ResponseResult for AccountShipping {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -3630,7 +3312,7 @@ pub struct AccountTaxTaxRule { impl Part for AccountTaxTaxRule {} -/// A batch entry encoding a single non-batch accountshipping request. +/// A batch entry encoding a single non-batch shippingsettings request. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -4217,17 +3899,21 @@ pub struct AccountStatusDataQualityIssue { pub last_checked: Option, /// Country for which this issue is reported. pub country: Option, - /// Example items featuring the issue. - #[serde(rename="exampleItems")] - pub example_items: Option>, + /// A more detailed description of the issue. + pub detail: Option, /// Submitted value that causes the issue. #[serde(rename="submittedValue")] pub submitted_value: Option, /// Number of items in the account found to have the said issue. #[serde(rename="numItems")] pub num_items: Option, + /// The attribute name that is relevant for the issue. + pub location: Option, /// Issue identifier. pub id: Option, + /// Example items featuring the issue. + #[serde(rename="exampleItems")] + pub example_items: Option>, } impl Part for AccountStatusDataQualityIssue {} @@ -4399,26 +4085,6 @@ pub struct OrdersUpdateShipmentRequest { impl RequestValue for OrdersUpdateShipmentRequest {} -/// There is no detailed description. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct DatafeedFormat { - /// Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. - #[serde(rename="fileEncoding")] - pub file_encoding: Option, - /// Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. - #[serde(rename="quotingMode")] - pub quoting_mode: Option, - /// Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds. - #[serde(rename="columnDelimiter")] - pub column_delimiter: Option, -} - -impl Part for DatafeedFormat {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -4643,99 +4309,6 @@ impl<'a, C, A> AccounttaxMethods<'a, C, A> { -/// A builder providing access to all methods supported on *datafeedstatuse* resources. -/// It is not used directly, but through the `ShoppingContent` hub. -/// -/// # Example -/// -/// Instantiate a resource builder -/// -/// ```test_harness,no_run -/// extern crate hyper; -/// extern crate yup_oauth2 as oauth2; -/// extern crate google_content2 as content2; -/// -/// # #[test] fn egal() { -/// use std::default::Default; -/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use content2::ShoppingContent; -/// -/// let secret: ApplicationSecret = Default::default(); -/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// hyper::Client::new(), -/// ::default(), None); -/// let mut hub = ShoppingContent::new(hyper::Client::new(), auth); -/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `custombatch(...)`, `get(...)` and `list(...)` -/// // to build up your call. -/// let rb = hub.datafeedstatuses(); -/// # } -/// ``` -pub struct DatafeedstatuseMethods<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a ShoppingContent, -} - -impl<'a, C, A> MethodsBuilder for DatafeedstatuseMethods<'a, C, A> {} - -impl<'a, C, A> DatafeedstatuseMethods<'a, C, A> { - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the status of a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. - /// - /// # Arguments - /// - /// * `merchantId` - No description provided. - /// * `datafeedId` - No description provided. - pub fn get(&self, merchant_id: &str, datafeed_id: &str) -> DatafeedstatuseGetCall<'a, C, A> { - DatafeedstatuseGetCall { - hub: self.hub, - _merchant_id: merchant_id.to_string(), - _datafeed_id: datafeed_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Lists the statuses of the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. - /// - /// # Arguments - /// - /// * `merchantId` - The ID of the managing account. - pub fn list(&self, merchant_id: &str) -> DatafeedstatuseListCall<'a, C, A> { - DatafeedstatuseListCall { - hub: self.hub, - _merchant_id: merchant_id.to_string(), - _page_token: Default::default(), - _max_results: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// - /// # Arguments - /// - /// * `request` - No description provided. - pub fn custombatch(&self, request: DatafeedstatusesCustomBatchRequest) -> DatafeedstatuseCustombatchCall<'a, C, A> { - DatafeedstatuseCustombatchCall { - hub: self.hub, - _request: request, - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } -} - - - /// A builder providing access to all methods supported on *shippingsetting* resources. /// It is not used directly, but through the `ShoppingContent` hub. /// @@ -5188,7 +4761,7 @@ impl<'a, C, A> AccountstatuseMethods<'a, C, A> { /// ::default(), None); /// let mut hub = ShoppingContent::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `authinfo(...)`, `custombatch(...)`, `delete(...)`, `get(...)`, `insert(...)`, `list(...)`, `patch(...)` and `update(...)` +/// // like `authinfo(...)`, `claimwebsite(...)`, `custombatch(...)`, `delete(...)`, `get(...)`, `insert(...)`, `list(...)`, `patch(...)` and `update(...)` /// // to build up your call. /// let rb = hub.accounts(); /// # } @@ -5205,7 +4778,7 @@ impl<'a, C, A> AccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a Merchant Center account. This method can only be called for multi-client accounts. + /// Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. /// /// # Arguments /// @@ -5239,7 +4812,7 @@ impl<'a, C, A> AccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a Merchant Center account. This method can only be called for multi-client accounts. This method supports patch semantics. + /// Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. This method supports patch semantics. /// /// # Arguments /// @@ -5259,6 +4832,26 @@ impl<'a, C, A> AccountMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Claims the website of a Merchant Center sub-account. This method can only be called for multi-client accounts. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account whose website is claimed. + pub fn claimwebsite(&self, merchant_id: &str, account_id: &str) -> AccountClaimwebsiteCall<'a, C, A> { + AccountClaimwebsiteCall { + hub: self.hub, + _merchant_id: merchant_id.to_string(), + _account_id: account_id.to_string(), + _overwrite: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Lists the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. @@ -5492,6 +5085,7 @@ impl<'a, C, A> ProductstatuseMethods<'a, C, A> { hub: self.hub, _merchant_id: merchant_id.to_string(), _product_id: product_id.to_string(), + _include_attributes: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -5512,6 +5106,7 @@ impl<'a, C, A> ProductstatuseMethods<'a, C, A> { _page_token: Default::default(), _max_results: Default::default(), _include_invalid_inserted_items: Default::default(), + _include_attributes: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -5529,6 +5124,7 @@ impl<'a, C, A> ProductstatuseMethods<'a, C, A> { ProductstatuseCustombatchCall { hub: self.hub, _request: request, + _include_attributes: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -5676,7 +5272,7 @@ impl<'a, C, A> ProductMethods<'a, C, A> { -/// A builder providing access to all methods supported on *accountshipping* resources. +/// A builder providing access to all methods supported on *datafeedstatuse* resources. /// It is not used directly, but through the `ShoppingContent` hub. /// /// # Example @@ -5699,30 +5295,49 @@ impl<'a, C, A> ProductMethods<'a, C, A> { /// ::default(), None); /// let mut hub = ShoppingContent::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `custombatch(...)`, `get(...)`, `list(...)`, `patch(...)` and `update(...)` +/// // like `custombatch(...)`, `get(...)` and `list(...)` /// // to build up your call. -/// let rb = hub.accountshipping(); +/// let rb = hub.datafeedstatuses(); /// # } /// ``` -pub struct AccountshippingMethods<'a, C, A> +pub struct DatafeedstatuseMethods<'a, C, A> where C: 'a, A: 'a { hub: &'a ShoppingContent, } -impl<'a, C, A> MethodsBuilder for AccountshippingMethods<'a, C, A> {} +impl<'a, C, A> MethodsBuilder for DatafeedstatuseMethods<'a, C, A> {} -impl<'a, C, A> AccountshippingMethods<'a, C, A> { +impl<'a, C, A> DatafeedstatuseMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. + /// Retrieves the status of a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. + /// + /// # Arguments + /// + /// * `merchantId` - No description provided. + /// * `datafeedId` - No description provided. + pub fn get(&self, merchant_id: &str, datafeed_id: &str) -> DatafeedstatuseGetCall<'a, C, A> { + DatafeedstatuseGetCall { + hub: self.hub, + _merchant_id: merchant_id.to_string(), + _datafeed_id: datafeed_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists the statuses of the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. /// /// # Arguments /// /// * `merchantId` - The ID of the managing account. - pub fn list(&self, merchant_id: &str) -> AccountshippingListCall<'a, C, A> { - AccountshippingListCall { + pub fn list(&self, merchant_id: &str) -> DatafeedstatuseListCall<'a, C, A> { + DatafeedstatuseListCall { hub: self.hub, _merchant_id: merchant_id.to_string(), _page_token: Default::default(), @@ -5733,81 +5348,14 @@ impl<'a, C, A> AccountshippingMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. This method supports patch semantics. /// /// # Arguments /// /// * `request` - No description provided. - /// * `merchantId` - The ID of the managing account. - /// * `accountId` - The ID of the account for which to get/update account shipping settings. - pub fn patch(&self, request: AccountShipping, merchant_id: &str, account_id: &str) -> AccountshippingPatchCall<'a, C, A> { - AccountshippingPatchCall { + pub fn custombatch(&self, request: DatafeedstatusesCustomBatchRequest) -> DatafeedstatuseCustombatchCall<'a, C, A> { + DatafeedstatuseCustombatchCall { hub: self.hub, _request: request, - _merchant_id: merchant_id.to_string(), - _account_id: account_id.to_string(), - _dry_run: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `merchantId` - The ID of the managing account. - /// * `accountId` - The ID of the account for which to get/update account shipping settings. - pub fn update(&self, request: AccountShipping, merchant_id: &str, account_id: &str) -> AccountshippingUpdateCall<'a, C, A> { - AccountshippingUpdateCall { - hub: self.hub, - _request: request, - _merchant_id: merchant_id.to_string(), - _account_id: account_id.to_string(), - _dry_run: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves and updates the shipping settings of multiple accounts in a single request. - /// - /// # Arguments - /// - /// * `request` - No description provided. - pub fn custombatch(&self, request: AccountshippingCustomBatchRequest) -> AccountshippingCustombatchCall<'a, C, A> { - AccountshippingCustombatchCall { - hub: self.hub, - _request: request, - _dry_run: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Retrieves the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. - /// - /// # Arguments - /// - /// * `merchantId` - The ID of the managing account. - /// * `accountId` - The ID of the account for which to get/update account shipping settings. - pub fn get(&self, merchant_id: &str, account_id: &str) -> AccountshippingGetCall<'a, C, A> { - AccountshippingGetCall { - hub: self.hub, - _merchant_id: merchant_id.to_string(), - _account_id: account_id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -5982,17 +5530,17 @@ impl<'a, C, A> OrderMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method can only be called for non-multi-client accounts. + /// Retrieves an order using merchant order id. This method can only be called for non-multi-client accounts. /// /// # Arguments /// /// * `merchantId` - The ID of the managing account. - /// * `orderId` - The ID of the test order to modify. - pub fn advancetestorder(&self, merchant_id: &str, order_id: &str) -> OrderAdvancetestorderCall<'a, C, A> { - OrderAdvancetestorderCall { + /// * `merchantOrderId` - The merchant order id to be looked for. + pub fn getbymerchantorderid(&self, merchant_id: &str, merchant_order_id: &str) -> OrderGetbymerchantorderidCall<'a, C, A> { + OrderGetbymerchantorderidCall { hub: self.hub, _merchant_id: merchant_id.to_string(), - _order_id: order_id.to_string(), + _merchant_order_id: merchant_order_id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -6039,25 +5587,6 @@ impl<'a, C, A> OrderMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Retrieves an order using merchant order id. This method can only be called for non-multi-client accounts. - /// - /// # Arguments - /// - /// * `merchantId` - The ID of the managing account. - /// * `merchantOrderId` - The merchant order id to be looked for. - pub fn getbymerchantorderid(&self, merchant_id: &str, merchant_order_id: &str) -> OrderGetbymerchantorderidCall<'a, C, A> { - OrderGetbymerchantorderidCall { - hub: self.hub, - _merchant_id: merchant_id.to_string(), - _merchant_order_id: merchant_order_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Retrieves or modifies multiple orders in a single request. This method can only be called for non-multi-client accounts. @@ -6075,6 +5604,27 @@ impl<'a, C, A> OrderMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. + /// * `orderId` - The ID of the order. + pub fn cancellineitem(&self, request: OrdersCancelLineItemRequest, merchant_id: &str, order_id: &str) -> OrderCancellineitemCall<'a, C, A> { + OrderCancellineitemCall { + hub: self.hub, + _request: request, + _merchant_id: merchant_id.to_string(), + _order_id: order_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Marks line item(s) as shipped. This method can only be called for non-multi-client accounts. @@ -6119,17 +5669,15 @@ impl<'a, C, A> OrderMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Cancels a line item. This method can only be called for non-multi-client accounts. + /// Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method can only be called for non-multi-client accounts. /// /// # Arguments /// - /// * `request` - No description provided. /// * `merchantId` - The ID of the managing account. - /// * `orderId` - The ID of the order. - pub fn cancellineitem(&self, request: OrdersCancelLineItemRequest, merchant_id: &str, order_id: &str) -> OrderCancellineitemCall<'a, C, A> { - OrderCancellineitemCall { + /// * `orderId` - The ID of the test order to modify. + pub fn advancetestorder(&self, merchant_id: &str, order_id: &str) -> OrderAdvancetestorderCall<'a, C, A> { + OrderAdvancetestorderCall { hub: self.hub, - _request: request, _merchant_id: merchant_id.to_string(), _order_id: order_id.to_string(), _delegate: Default::default(), @@ -6140,7 +5688,7 @@ impl<'a, C, A> OrderMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Cancels all line items in an order. This method can only be called for non-multi-client accounts. + /// Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts. /// /// # Arguments /// @@ -7499,741 +7047,6 @@ impl<'a, C, A> AccounttaxGetCall<'a, C, A> where C: BorrowMut, A: } -/// Retrieves the status of a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. -/// -/// A builder for the *get* method supported by a *datafeedstatuse* resource. -/// It is not used directly, but through a `DatafeedstatuseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_content2 as content2; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use content2::ShoppingContent; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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.datafeedstatuses().get("merchantId", "datafeedId") -/// .doit(); -/// # } -/// ``` -pub struct DatafeedstatuseGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a ShoppingContent, - _merchant_id: String, - _datafeed_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for DatafeedstatuseGetCall<'a, C, A> {} - -impl<'a, C, A> DatafeedstatuseGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, DatafeedStatus)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "content.datafeedstatuses.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("merchantId", self._merchant_id.to_string())); - params.push(("datafeedId", self._datafeed_id.to_string())); - for &field in ["alt", "merchantId", "datafeedId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/datafeedstatuses/{datafeedId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{merchantId}", "merchantId"), ("{datafeedId}", "datafeedId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["datafeedId", "merchantId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// - /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> DatafeedstatuseGetCall<'a, C, A> { - self._merchant_id = new_value.to_string(); - self - } - /// - /// Sets the *datafeed id* 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 datafeed_id(mut self, new_value: &str) -> DatafeedstatuseGetCall<'a, C, A> { - self._datafeed_id = 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. - /// - /// 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 Delegate) -> DatafeedstatuseGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> DatafeedstatuseGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> DatafeedstatuseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Lists the statuses of the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. -/// -/// A builder for the *list* method supported by a *datafeedstatuse* resource. -/// It is not used directly, but through a `DatafeedstatuseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_content2 as content2; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use content2::ShoppingContent; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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.datafeedstatuses().list("merchantId") -/// .page_token("amet") -/// .max_results(41) -/// .doit(); -/// # } -/// ``` -pub struct DatafeedstatuseListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a ShoppingContent, - _merchant_id: String, - _page_token: Option, - _max_results: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for DatafeedstatuseListCall<'a, C, A> {} - -impl<'a, C, A> DatafeedstatuseListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, DatafeedstatusesListResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "content.datafeedstatuses.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("merchantId", self._merchant_id.to_string())); - if let Some(value) = self._page_token { - params.push(("pageToken", value.to_string())); - } - if let Some(value) = self._max_results { - params.push(("maxResults", value.to_string())); - } - for &field in ["alt", "merchantId", "pageToken", "maxResults"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/datafeedstatuses".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{merchantId}", "merchantId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["merchantId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the managing account. - /// - /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> DatafeedstatuseListCall<'a, C, A> { - self._merchant_id = new_value.to_string(); - self - } - /// The token returned by the previous request. - /// - /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> DatafeedstatuseListCall<'a, C, A> { - self._page_token = Some(new_value.to_string()); - self - } - /// The maximum number of products to return in the response, used for paging. - /// - /// Sets the *max results* query property to the given value. - pub fn max_results(mut self, new_value: u32) -> DatafeedstatuseListCall<'a, C, A> { - self._max_results = 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. - /// - /// 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 Delegate) -> DatafeedstatuseListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> DatafeedstatuseListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> DatafeedstatuseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// A builder for the *custombatch* method supported by a *datafeedstatuse* resource. -/// It is not used directly, but through a `DatafeedstatuseMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_content2 as content2; -/// use content2::DatafeedstatusesCustomBatchRequest; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use content2::ShoppingContent; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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 = DatafeedstatusesCustomBatchRequest::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.datafeedstatuses().custombatch(req) -/// .doit(); -/// # } -/// ``` -pub struct DatafeedstatuseCustombatchCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a ShoppingContent, - _request: DatafeedstatusesCustomBatchRequest, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for DatafeedstatuseCustombatchCall<'a, C, A> {} - -impl<'a, C, A> DatafeedstatuseCustombatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, DatafeedstatusesCustomBatchResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "content.datafeedstatuses.custombatch", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - for &field in ["alt"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/content/v2/datafeedstatuses/batch".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: DatafeedstatusesCustomBatchRequest) -> DatafeedstatuseCustombatchCall<'a, C, A> { - self._request = 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. - /// - /// 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 Delegate) -> DatafeedstatuseCustombatchCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> DatafeedstatuseCustombatchCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> DatafeedstatuseCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *shippingsetting* resource. @@ -8786,8 +7599,8 @@ impl<'a, C, A> ShippingsettingGetsupportedcarrierCall<'a, C, A> where C: BorrowM /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.shippingsettings().list("merchantId") -/// .page_token("accusam") -/// .max_results(45) +/// .page_token("labore") +/// .max_results(62) /// .doit(); /// # } /// ``` @@ -9296,7 +8109,7 @@ impl<'a, C, A> ShippingsettingCustombatchCall<'a, C, A> where C: BorrowMut DatafeedInsertCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.datafeeds().list("merchantId") -/// .page_token("amet.") -/// .max_results(74) +/// .page_token("dolor") +/// .max_results(53) /// .doit(); /// # } /// ``` @@ -11391,7 +10204,7 @@ impl<'a, C, A> DatafeedListCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.datafeeds().update(req, "merchantId", "datafeedId") -/// .dry_run(true) +/// .dry_run(false) /// .doit(); /// # } /// ``` @@ -12151,8 +10964,8 @@ impl<'a, C, A> AccountstatuseCustombatchCall<'a, C, A> where C: BorrowMut AccountstatuseListCall<'a, C, A> where C: BorrowMut AccountstatuseListCall<'a, C, A> where C: BorrowMut AccountAuthinfoCall<'a, C, A> where C: BorrowMut, } -/// Updates a Merchant Center account. This method can only be called for multi-client accounts. This method supports patch semantics. +/// Updates a Merchant Center account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *account* resource. /// It is not used directly, but through a `AccountMethods` instance. @@ -12908,7 +11721,7 @@ impl<'a, C, A> AccountAuthinfoCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.accounts().patch(req, "merchantId", "accountId") -/// .dry_run(false) +/// .dry_run(true) /// .doit(); /// # } /// ``` @@ -13165,6 +11978,265 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } +/// Claims the website of a Merchant Center sub-account. This method can only be called for multi-client accounts. +/// +/// A builder for the *claimwebsite* method supported by a *account* resource. +/// It is not used directly, but through a `AccountMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_content2 as content2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use content2::ShoppingContent; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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.accounts().claimwebsite("merchantId", "accountId") +/// .overwrite(false) +/// .doit(); +/// # } +/// ``` +pub struct AccountClaimwebsiteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ShoppingContent, + _merchant_id: String, + _account_id: String, + _overwrite: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AccountClaimwebsiteCall<'a, C, A> {} + +impl<'a, C, A> AccountClaimwebsiteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, AccountsClaimWebsiteResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "content.accounts.claimwebsite", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("merchantId", self._merchant_id.to_string())); + params.push(("accountId", self._account_id.to_string())); + if let Some(value) = self._overwrite { + params.push(("overwrite", value.to_string())); + } + for &field in ["alt", "merchantId", "accountId", "overwrite"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounts/{accountId}/claimwebsite".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{merchantId}", "merchantId"), ("{accountId}", "accountId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["accountId", "merchantId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the managing account. + /// + /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> AccountClaimwebsiteCall<'a, C, A> { + self._merchant_id = new_value.to_string(); + self + } + /// The ID of the account whose website is claimed. + /// + /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> AccountClaimwebsiteCall<'a, C, A> { + self._account_id = new_value.to_string(); + self + } + /// Flag to remove any existing claim on the requested website by another account and replace it with a claim from this account. + /// + /// Sets the *overwrite* query property to the given value. + pub fn overwrite(mut self, new_value: bool) -> AccountClaimwebsiteCall<'a, C, A> { + self._overwrite = 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. + /// + /// 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 Delegate) -> AccountClaimwebsiteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> AccountClaimwebsiteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> AccountClaimwebsiteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Lists the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. /// /// A builder for the *list* method supported by a *account* resource. @@ -13192,8 +12264,8 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.accounts().list("merchantId") -/// .page_token("aliquyam") -/// .max_results(96) +/// .page_token("dolore") +/// .max_results(82) /// .doit(); /// # } /// ``` @@ -13705,7 +12777,7 @@ impl<'a, C, A> AccountDeleteCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.accounts().custombatch(req) -/// .dry_run(false) +/// .dry_run(true) /// .doit(); /// # } /// ``` @@ -14197,7 +13269,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.accounts().insert(req, "merchantId") -/// .dry_run(false) +/// .dry_run(true) /// .doit(); /// # } /// ``` @@ -14720,7 +13792,7 @@ impl<'a, C, A> InventoryCustombatchCall<'a, C, A> where C: BorrowMut InventorySetCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.productstatuses().get("merchantId", "productId") +/// .include_attributes(false) /// .doit(); /// # } /// ``` @@ -15025,6 +14098,7 @@ pub struct ProductstatuseGetCall<'a, C, A> hub: &'a ShoppingContent, _merchant_id: String, _product_id: String, + _include_attributes: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -15046,10 +14120,13 @@ impl<'a, C, A> ProductstatuseGetCall<'a, C, A> where C: BorrowMut }; dlg.begin(MethodInfo { id: "content.productstatuses.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("merchantId", self._merchant_id.to_string())); params.push(("productId", self._product_id.to_string())); - for &field in ["alt", "merchantId", "productId"].iter() { + if let Some(value) = self._include_attributes { + params.push(("includeAttributes", value.to_string())); + } + for &field in ["alt", "merchantId", "productId", "includeAttributes"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -15184,6 +14261,13 @@ impl<'a, C, A> ProductstatuseGetCall<'a, C, A> where C: BorrowMut self._product_id = new_value.to_string(); self } + /// Flag to include full product data in the result of this get request. The default value is false. + /// + /// Sets the *include attributes* query property to the given value. + pub fn include_attributes(mut self, new_value: bool) -> ProductstatuseGetCall<'a, C, A> { + self._include_attributes = 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. /// @@ -15263,9 +14347,10 @@ impl<'a, C, A> ProductstatuseGetCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.productstatuses().list("merchantId") -/// .page_token("sed") -/// .max_results(19) +/// .page_token("nonumy") +/// .max_results(72) /// .include_invalid_inserted_items(false) +/// .include_attributes(false) /// .doit(); /// # } /// ``` @@ -15277,6 +14362,7 @@ pub struct ProductstatuseListCall<'a, C, A> _page_token: Option, _max_results: Option, _include_invalid_inserted_items: Option, + _include_attributes: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -15298,7 +14384,7 @@ impl<'a, C, A> ProductstatuseListCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((6 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); params.push(("merchantId", self._merchant_id.to_string())); if let Some(value) = self._page_token { params.push(("pageToken", value.to_string())); @@ -15309,7 +14395,10 @@ impl<'a, C, A> ProductstatuseListCall<'a, C, A> where C: BorrowMut ProductstatuseListCall<'a, C, A> where C: BorrowMut ProductstatuseListCall<'a, C, A> { + self._include_attributes = 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. /// @@ -15540,6 +14636,7 @@ impl<'a, C, A> ProductstatuseListCall<'a, C, A> where C: BorrowMut hub: &'a ShoppingContent, _request: ProductstatusesCustomBatchRequest, + _include_attributes: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -15569,8 +14667,11 @@ impl<'a, C, A> ProductstatuseCustombatchCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((3 + self._additional_params.len())); - for &field in ["alt"].iter() { + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + if let Some(value) = self._include_attributes { + params.push(("includeAttributes", value.to_string())); + } + for &field in ["alt", "includeAttributes"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -15688,6 +14789,13 @@ impl<'a, C, A> ProductstatuseCustombatchCall<'a, C, A> where C: BorrowMut ProductstatuseCustombatchCall<'a, C, A> { + self._include_attributes = 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. /// @@ -15767,8 +14875,8 @@ impl<'a, C, A> ProductstatuseCustombatchCall<'a, C, A> where C: BorrowMut ProductGetCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.products().delete("merchantId", "productId") -/// .dry_run(true) +/// .dry_run(false) /// .doit(); /// # } /// ``` @@ -16784,7 +15892,7 @@ impl<'a, C, A> ProductCustombatchCall<'a, C, A> where C: BorrowMut ProductInsertCall<'a, C, A> where C: BorrowMut, A: } -/// Lists the shipping settings of the sub-accounts in your Merchant Center account. This method can only be called for multi-client accounts. +/// Retrieves the status of a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts. /// -/// A builder for the *list* method supported by a *accountshipping* resource. -/// It is not used directly, but through a `AccountshippingMethods` instance. +/// A builder for the *get* method supported by a *datafeedstatuse* resource. +/// It is not used directly, but through a `DatafeedstatuseMethods` instance. /// /// # Example /// @@ -17055,13 +16163,258 @@ impl<'a, C, A> ProductInsertCall<'a, C, A> where C: BorrowMut, A: /// // 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.accountshipping().list("merchantId") -/// .page_token("dolores") -/// .max_results(3) +/// let result = hub.datafeedstatuses().get("merchantId", "datafeedId") /// .doit(); /// # } /// ``` -pub struct AccountshippingListCall<'a, C, A> +pub struct DatafeedstatuseGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ShoppingContent, + _merchant_id: String, + _datafeed_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for DatafeedstatuseGetCall<'a, C, A> {} + +impl<'a, C, A> DatafeedstatuseGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, DatafeedStatus)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "content.datafeedstatuses.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("merchantId", self._merchant_id.to_string())); + params.push(("datafeedId", self._datafeed_id.to_string())); + for &field in ["alt", "merchantId", "datafeedId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/content/v2/{merchantId}/datafeedstatuses/{datafeedId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{merchantId}", "merchantId"), ("{datafeedId}", "datafeedId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["datafeedId", "merchantId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> DatafeedstatuseGetCall<'a, C, A> { + self._merchant_id = new_value.to_string(); + self + } + /// + /// Sets the *datafeed id* 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 datafeed_id(mut self, new_value: &str) -> DatafeedstatuseGetCall<'a, C, A> { + self._datafeed_id = 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. + /// + /// 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 Delegate) -> DatafeedstatuseGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> DatafeedstatuseGetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> DatafeedstatuseGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists the statuses of the datafeeds in your Merchant Center account. This method can only be called for non-multi-client accounts. +/// +/// A builder for the *list* method supported by a *datafeedstatuse* resource. +/// It is not used directly, but through a `DatafeedstatuseMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_content2 as content2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use content2::ShoppingContent; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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.datafeedstatuses().list("merchantId") +/// .page_token("ut") +/// .max_results(31) +/// .doit(); +/// # } +/// ``` +pub struct DatafeedstatuseListCall<'a, C, A> where C: 'a, A: 'a { hub: &'a ShoppingContent, @@ -17073,13 +16426,13 @@ pub struct AccountshippingListCall<'a, C, A> _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for AccountshippingListCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for DatafeedstatuseListCall<'a, C, A> {} -impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> DatafeedstatuseListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, AccountshippingListResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, DatafeedstatusesListResponse)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -17087,7 +16440,7 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "content.accountshipping.list", + dlg.begin(MethodInfo { id: "content.datafeedstatuses.list", http_method: hyper::method::Method::Get }); let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("merchantId", self._merchant_id.to_string())); @@ -17109,7 +16462,7 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut AccountshippingListCall<'a, C, A> where C: BorrowMut AccountshippingListCall<'a, C, A> { + pub fn merchant_id(mut self, new_value: &str) -> DatafeedstatuseListCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } /// The token returned by the previous request. /// /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> AccountshippingListCall<'a, C, A> { + pub fn page_token(mut self, new_value: &str) -> DatafeedstatuseListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// The maximum number of shipping settings to return in the response, used for paging. + /// The maximum number of products to return in the response, used for paging. /// /// Sets the *max results* query property to the given value. - pub fn max_results(mut self, new_value: u32) -> AccountshippingListCall<'a, C, A> { + pub fn max_results(mut self, new_value: u32) -> DatafeedstatuseListCall<'a, C, A> { self._max_results = Some(new_value); self } @@ -17242,7 +16595,7 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut AccountshippingListCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> DatafeedstatuseListCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -17263,7 +16616,7 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AccountshippingListCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> DatafeedstatuseListCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -17280,7 +16633,7 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountshippingListCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> DatafeedstatuseListCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -17288,10 +16641,8 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut AccountshippingListCall<'a, C, A> where C: BorrowMut AccountshippingListCall<'a, C, A> where C: BorrowMut +pub struct DatafeedstatuseCustombatchCall<'a, C, A> where C: 'a, A: 'a { hub: &'a ShoppingContent, - _request: AccountShipping, - _merchant_id: String, - _account_id: String, - _dry_run: Option, + _request: DatafeedstatusesCustomBatchRequest, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for AccountshippingPatchCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for DatafeedstatuseCustombatchCall<'a, C, A> {} -impl<'a, C, A> AccountshippingPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> DatafeedstatuseCustombatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, AccountShipping)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, DatafeedstatusesCustomBatchResponse)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -17352,591 +16699,10 @@ impl<'a, C, A> AccountshippingPatchCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "content.accountshipping.patch", - http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); - params.push(("merchantId", self._merchant_id.to_string())); - params.push(("accountId", self._account_id.to_string())); - if let Some(value) = self._dry_run { - params.push(("dryRun", value.to_string())); - } - for &field in ["alt", "merchantId", "accountId", "dryRun"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accountshipping/{accountId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{merchantId}", "merchantId"), ("{accountId}", "accountId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["accountId", "merchantId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: AccountShipping) -> AccountshippingPatchCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the managing account. - /// - /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> AccountshippingPatchCall<'a, C, A> { - self._merchant_id = new_value.to_string(); - self - } - /// The ID of the account for which to get/update account shipping settings. - /// - /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> AccountshippingPatchCall<'a, C, A> { - self._account_id = new_value.to_string(); - self - } - /// Flag to run the request in dry-run mode. - /// - /// Sets the *dry run* query property to the given value. - pub fn dry_run(mut self, new_value: bool) -> AccountshippingPatchCall<'a, C, A> { - self._dry_run = 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. - /// - /// 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 Delegate) -> AccountshippingPatchCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> AccountshippingPatchCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> AccountshippingPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. -/// -/// A builder for the *update* method supported by a *accountshipping* resource. -/// It is not used directly, but through a `AccountshippingMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_content2 as content2; -/// use content2::AccountShipping; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use content2::ShoppingContent; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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 = AccountShipping::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.accountshipping().update(req, "merchantId", "accountId") -/// .dry_run(true) -/// .doit(); -/// # } -/// ``` -pub struct AccountshippingUpdateCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a ShoppingContent, - _request: AccountShipping, - _merchant_id: String, - _account_id: String, - _dry_run: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for AccountshippingUpdateCall<'a, C, A> {} - -impl<'a, C, A> AccountshippingUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, AccountShipping)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "content.accountshipping.update", - http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); - params.push(("merchantId", self._merchant_id.to_string())); - params.push(("accountId", self._account_id.to_string())); - if let Some(value) = self._dry_run { - params.push(("dryRun", value.to_string())); - } - for &field in ["alt", "merchantId", "accountId", "dryRun"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accountshipping/{accountId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{merchantId}", "merchantId"), ("{accountId}", "accountId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["accountId", "merchantId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: AccountShipping) -> AccountshippingUpdateCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the managing account. - /// - /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> AccountshippingUpdateCall<'a, C, A> { - self._merchant_id = new_value.to_string(); - self - } - /// The ID of the account for which to get/update account shipping settings. - /// - /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> AccountshippingUpdateCall<'a, C, A> { - self._account_id = new_value.to_string(); - self - } - /// Flag to run the request in dry-run mode. - /// - /// Sets the *dry run* query property to the given value. - pub fn dry_run(mut self, new_value: bool) -> AccountshippingUpdateCall<'a, C, A> { - self._dry_run = 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. - /// - /// 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 Delegate) -> AccountshippingUpdateCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> AccountshippingUpdateCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> AccountshippingUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Retrieves and updates the shipping settings of multiple accounts in a single request. -/// -/// A builder for the *custombatch* method supported by a *accountshipping* resource. -/// It is not used directly, but through a `AccountshippingMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_content2 as content2; -/// use content2::AccountshippingCustomBatchRequest; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use content2::ShoppingContent; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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 = AccountshippingCustomBatchRequest::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.accountshipping().custombatch(req) -/// .dry_run(true) -/// .doit(); -/// # } -/// ``` -pub struct AccountshippingCustombatchCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a ShoppingContent, - _request: AccountshippingCustomBatchRequest, - _dry_run: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for AccountshippingCustombatchCall<'a, C, A> {} - -impl<'a, C, A> AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, AccountshippingCustomBatchResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "content.accountshipping.custombatch", + dlg.begin(MethodInfo { id: "content.datafeedstatuses.custombatch", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - if let Some(value) = self._dry_run { - params.push(("dryRun", value.to_string())); - } - for &field in ["alt", "dryRun"].iter() { + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -17948,7 +16714,7 @@ impl<'a, C, A> AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut AccountshippingCustombatchCall<'a, C, A> { + pub fn request(mut self, new_value: DatafeedstatusesCustomBatchRequest) -> DatafeedstatuseCustombatchCall<'a, C, A> { self._request = new_value; self } - /// Flag to run the request in dry-run mode. - /// - /// Sets the *dry run* query property to the given value. - pub fn dry_run(mut self, new_value: bool) -> AccountshippingCustombatchCall<'a, C, A> { - self._dry_run = 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. /// /// 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 Delegate) -> AccountshippingCustombatchCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> DatafeedstatuseCustombatchCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -18088,7 +16847,7 @@ impl<'a, C, A> AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AccountshippingCustombatchCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> DatafeedstatuseCustombatchCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -18105,254 +16864,7 @@ impl<'a, C, A> AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountshippingCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Retrieves the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself or sub-accounts if the managing account is a multi-client account. -/// -/// A builder for the *get* method supported by a *accountshipping* resource. -/// It is not used directly, but through a `AccountshippingMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_content2 as content2; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use content2::ShoppingContent; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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.accountshipping().get("merchantId", "accountId") -/// .doit(); -/// # } -/// ``` -pub struct AccountshippingGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a ShoppingContent, - _merchant_id: String, - _account_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for AccountshippingGetCall<'a, C, A> {} - -impl<'a, C, A> AccountshippingGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, AccountShipping)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "content.accountshipping.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("merchantId", self._merchant_id.to_string())); - params.push(("accountId", self._account_id.to_string())); - for &field in ["alt", "merchantId", "accountId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accountshipping/{accountId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{merchantId}", "merchantId"), ("{accountId}", "accountId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["accountId", "merchantId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the managing account. - /// - /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> AccountshippingGetCall<'a, C, A> { - self._merchant_id = new_value.to_string(); - self - } - /// The ID of the account for which to get/update account shipping settings. - /// - /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> AccountshippingGetCall<'a, C, A> { - self._account_id = 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. - /// - /// 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 Delegate) -> AccountshippingGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> AccountshippingGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> AccountshippingGetCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> DatafeedstatuseCustombatchCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -18387,13 +16899,13 @@ impl<'a, C, A> AccountshippingGetCall<'a, C, A> where C: BorrowMut OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut +pub struct OrderGetbymerchantorderidCall<'a, C, A> where C: 'a, A: 'a { hub: &'a ShoppingContent, _merchant_id: String, - _order_id: String, + _merchant_order_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for OrderAdvancetestorderCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for OrderGetbymerchantorderidCall<'a, C, A> {} -impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersAdvanceTestOrderResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersGetByMerchantOrderIdResponse)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -20067,12 +18579,12 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "content.orders.advancetestorder", - http_method: hyper::method::Method::Post }); + dlg.begin(MethodInfo { id: "content.orders.getbymerchantorderid", + http_method: hyper::method::Method::Get }); let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("merchantId", self._merchant_id.to_string())); - params.push(("orderId", self._order_id.to_string())); - for &field in ["alt", "merchantId", "orderId"].iter() { + params.push(("merchantOrderId", self._merchant_order_id.to_string())); + for &field in ["alt", "merchantId", "merchantOrderId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -20084,12 +18596,12 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -20101,7 +18613,7 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(2); - for param_name in ["orderId", "merchantId"].iter() { + for param_name in ["merchantOrderId", "merchantId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -20134,7 +18646,7 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut OrderAdvancetestorderCall<'a, C, A> { + pub fn merchant_id(mut self, new_value: &str) -> OrderGetbymerchantorderidCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// The ID of the test order to modify. + /// The merchant order id to be looked for. /// - /// Sets the *order id* path property to the given value. + /// Sets the *merchant order id* 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 order_id(mut self, new_value: &str) -> OrderAdvancetestorderCall<'a, C, A> { - self._order_id = new_value.to_string(); + pub fn merchant_order_id(mut self, new_value: &str) -> OrderGetbymerchantorderidCall<'a, C, A> { + self._merchant_order_id = new_value.to_string(); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -20213,7 +18725,7 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut OrderAdvancetestorderCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> OrderGetbymerchantorderidCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -20234,7 +18746,7 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> OrderAdvancetestorderCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> OrderGetbymerchantorderidCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -20251,7 +18763,7 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderAdvancetestorderCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> OrderGetbymerchantorderidCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -20803,253 +19315,6 @@ impl<'a, C, A> OrderReturnlineitemCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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.orders().getbymerchantorderid("merchantId", "merchantOrderId") -/// .doit(); -/// # } -/// ``` -pub struct OrderGetbymerchantorderidCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a ShoppingContent, - _merchant_id: String, - _merchant_order_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for OrderGetbymerchantorderidCall<'a, C, A> {} - -impl<'a, C, A> OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersGetByMerchantOrderIdResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "content.orders.getbymerchantorderid", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("merchantId", self._merchant_id.to_string())); - params.push(("merchantOrderId", self._merchant_order_id.to_string())); - for &field in ["alt", "merchantId", "merchantOrderId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/ordersbymerchantid/{merchantOrderId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{merchantId}", "merchantId"), ("{merchantOrderId}", "merchantOrderId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["merchantOrderId", "merchantId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the managing account. - /// - /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> OrderGetbymerchantorderidCall<'a, C, A> { - self._merchant_id = new_value.to_string(); - self - } - /// The merchant order id to be looked for. - /// - /// Sets the *merchant order id* 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 merchant_order_id(mut self, new_value: &str) -> OrderGetbymerchantorderidCall<'a, C, A> { - self._merchant_order_id = 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. - /// - /// 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 Delegate) -> OrderGetbymerchantorderidCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> OrderGetbymerchantorderidCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> OrderGetbymerchantorderidCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Retrieves or modifies multiple orders in a single request. This method can only be called for non-multi-client accounts. /// /// A builder for the *custombatch* method supported by a *order* resource. @@ -21283,6 +19548,284 @@ impl<'a, C, A> OrderCustombatchCall<'a, C, A> where C: BorrowMut, } +/// Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts. +/// +/// A builder for the *cancellineitem* method supported by a *order* resource. +/// It is not used directly, but through a `OrderMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_content2 as content2; +/// use content2::OrdersCancelLineItemRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use content2::ShoppingContent; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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 = OrdersCancelLineItemRequest::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.orders().cancellineitem(req, "merchantId", "orderId") +/// .doit(); +/// # } +/// ``` +pub struct OrderCancellineitemCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ShoppingContent, + _request: OrdersCancelLineItemRequest, + _merchant_id: String, + _order_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for OrderCancellineitemCall<'a, C, A> {} + +impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersCancelLineItemResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "content.orders.cancellineitem", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("merchantId", self._merchant_id.to_string())); + params.push(("orderId", self._order_id.to_string())); + for &field in ["alt", "merchantId", "orderId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/content/v2/{merchantId}/orders/{orderId}/cancelLineItem".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{merchantId}", "merchantId"), ("{orderId}", "orderId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["orderId", "merchantId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: OrdersCancelLineItemRequest) -> OrderCancellineitemCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the managing account. + /// + /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> OrderCancellineitemCall<'a, C, A> { + self._merchant_id = new_value.to_string(); + self + } + /// The ID of the order. + /// + /// Sets the *order id* 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 order_id(mut self, new_value: &str) -> OrderCancellineitemCall<'a, C, A> { + self._order_id = 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. + /// + /// 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 Delegate) -> OrderCancellineitemCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> OrderCancellineitemCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> OrderCancellineitemCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Marks line item(s) as shipped. This method can only be called for non-multi-client accounts. /// /// A builder for the *shiplineitems* method supported by a *order* resource. @@ -21839,9 +20382,9 @@ impl<'a, C, A> OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut::default(), None); /// # let mut hub = ShoppingContent::new(hyper::Client::new(), 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 = OrdersCancelLineItemRequest::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.orders().cancellineitem(req, "merchantId", "orderId") +/// let result = hub.orders().advancetestorder("merchantId", "orderId") /// .doit(); /// # } /// ``` -pub struct OrderCancellineitemCall<'a, C, A> +pub struct OrderAdvancetestorderCall<'a, C, A> where C: 'a, A: 'a { hub: &'a ShoppingContent, - _request: OrdersCancelLineItemRequest, _merchant_id: String, _order_id: String, _delegate: Option<&'a mut Delegate>, @@ -21887,13 +20423,13 @@ pub struct OrderCancellineitemCall<'a, C, A> _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for OrderCancellineitemCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for OrderAdvancetestorderCall<'a, C, A> {} -impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersCancelLineItemResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersAdvanceTestOrderResponse)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -21901,9 +20437,9 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "content.orders.cancellineitem", + dlg.begin(MethodInfo { id: "content.orders.advancetestorder", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("merchantId", self._merchant_id.to_string())); params.push(("orderId", self._order_id.to_string())); for &field in ["alt", "merchantId", "orderId"].iter() { @@ -21918,7 +20454,7 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut OrderCancellineitemCall<'a, C, A> where C: BorrowMut OrderCancellineitemCall<'a, C, A> where C: BorrowMut OrderCancellineitemCall<'a, C, A> where C: BorrowMut OrderCancellineitemCall<'a, C, A> { - self._request = new_value; - self - } /// The ID of the managing account. /// /// Sets the *merchant id* 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 merchant_id(mut self, new_value: &str) -> OrderCancellineitemCall<'a, C, A> { + pub fn merchant_id(mut self, new_value: &str) -> OrderAdvancetestorderCall<'a, C, A> { self._merchant_id = new_value.to_string(); self } - /// The ID of the order. + /// The ID of the test order to modify. /// /// Sets the *order id* 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 order_id(mut self, new_value: &str) -> OrderCancellineitemCall<'a, C, A> { + pub fn order_id(mut self, new_value: &str) -> OrderAdvancetestorderCall<'a, C, A> { self._order_id = new_value.to_string(); self } @@ -22071,7 +20583,7 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut OrderCancellineitemCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> OrderAdvancetestorderCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -22092,7 +20604,7 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> OrderCancellineitemCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> OrderAdvancetestorderCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -22109,7 +20621,7 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderCancellineitemCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> OrderAdvancetestorderCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -22117,7 +20629,7 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Shopping Content (protocol v2sandbox)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/content2_sandbox-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-content2_sandbox] path = "../content2_sandbox" -version = "1.0.4+20161205" +version = "1.0.4+20170519" diff --git a/gen/content2_sandbox-cli/README.md b/gen/content2_sandbox-cli/README.md index 3b350890d9..b7ff324fdf 100644 --- a/gen/content2_sandbox-cli/README.md +++ b/gen/content2_sandbox-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Shopping Content* API at revision *20161205*. The CLI is at version *1.0.4*. +This documentation was generated from the *Shopping Content* API at revision *20170519*. The CLI is at version *1.0.4*. ```bash content2-sandbox [options] diff --git a/gen/content2_sandbox-cli/mkdocs.yml b/gen/content2_sandbox-cli/mkdocs.yml index bf4a56f24e..10805d8677 100644 --- a/gen/content2_sandbox-cli/mkdocs.yml +++ b/gen/content2_sandbox-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Shopping Content v1.0.4+20161205 +site_name: Shopping Content v1.0.4+20170519 site_url: http://byron.github.io/google-apis-rs/google-content2_sandbox-cli site_description: A complete library to interact with Shopping Content (protocol v2sandbox) diff --git a/gen/content2_sandbox-cli/src/main.rs b/gen/content2_sandbox-cli/src/main.rs index 8b3665520d..931f052cbd 100644 --- a/gen/content2_sandbox-cli/src/main.rs +++ b/gen/content2_sandbox-cli/src/main.rs @@ -1420,7 +1420,7 @@ fn main() { Some(false)), ]), ("cancel", - Some(r##"Cancels all line items in an order. This method can only be called for non-multi-client accounts."##), + Some(r##"Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts."##), "Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_cancel", vec![ (Some(r##"merchant-id"##), @@ -1454,7 +1454,7 @@ fn main() { Some(false)), ]), ("cancellineitem", - Some(r##"Cancels a line item. This method can only be called for non-multi-client accounts."##), + Some(r##"Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts."##), "Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_cancellineitem", vec![ (Some(r##"merchant-id"##), @@ -1819,7 +1819,7 @@ fn main() { let mut app = App::new("content2-sandbox") .author("Sebastian Thiel ") - .version("1.0.4+20161205") + .version("1.0.4+20170519") .about("Manages product items, inventory, and Merchant Center accounts for Google Shopping.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli") .arg(Arg::with_name("url") diff --git a/gen/content2_sandbox/Cargo.toml b/gen/content2_sandbox/Cargo.toml index d1966cd884..21dfe09cdf 100644 --- a/gen/content2_sandbox/Cargo.toml +++ b/gen/content2_sandbox/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-content2_sandbox" -version = "1.0.4+20161205" +version = "1.0.4+20170519" authors = ["Sebastian Thiel "] description = "A complete library to interact with Shopping Content (protocol v2sandbox)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/content2_sandbox" homepage = "https://developers.google.com/shopping-content" -documentation = "https://docs.rs/google-content2_sandbox/1.0.4+20161205" +documentation = "https://docs.rs/google-content2_sandbox/1.0.4+20170519" license = "MIT" keywords = ["content", "google", "protocol", "web", "api"] diff --git a/gen/content2_sandbox/README.md b/gen/content2_sandbox/README.md index 90279ce4d4..7c3b55b123 100644 --- a/gen/content2_sandbox/README.md +++ b/gen/content2_sandbox/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-content2_sandbox` library allows access to all features of the *Google Shopping Content* service. -This documentation was generated from *Shopping Content* crate version *1.0.4+20161205*, where *20161205* is the exact revision of the *content:v2sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Shopping Content* crate version *1.0.4+20170519*, where *20170519* is the exact revision of the *content:v2sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Shopping Content* *v2_sandbox* API can be found at the [official documentation site](https://developers.google.com/shopping-content). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.ShoppingContent.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.ShoppingContent.html) ... -* [orders](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.Order.html) - * [*acknowledge*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderAcknowledgeCall.html), [*advancetestorder*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderAdvancetestorderCall.html), [*cancel*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderCancelCall.html), [*cancellineitem*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderCancellineitemCall.html), [*createtestorder*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderCreatetestorderCall.html), [*custombatch*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderCustombatchCall.html), [*get*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderGetCall.html), [*getbymerchantorderid*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderGetbymerchantorderidCall.html), [*gettestordertemplate*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderGettestordertemplateCall.html), [*list*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderListCall.html), [*refund*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderRefundCall.html), [*returnlineitem*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderReturnlineitemCall.html), [*shiplineitems*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderShiplineitemCall.html), [*updatemerchantorderid*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderUpdatemerchantorderidCall.html) and [*updateshipment*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.OrderUpdateshipmentCall.html) +* [orders](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.Order.html) + * [*acknowledge*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderAcknowledgeCall.html), [*advancetestorder*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderAdvancetestorderCall.html), [*cancel*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderCancelCall.html), [*cancellineitem*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderCancellineitemCall.html), [*createtestorder*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderCreatetestorderCall.html), [*custombatch*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderCustombatchCall.html), [*get*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderGetCall.html), [*getbymerchantorderid*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderGetbymerchantorderidCall.html), [*gettestordertemplate*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderGettestordertemplateCall.html), [*list*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderListCall.html), [*refund*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderRefundCall.html), [*returnlineitem*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderReturnlineitemCall.html), [*shiplineitems*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderShiplineitemCall.html), [*updatemerchantorderid*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderUpdatemerchantorderidCall.html) and [*updateshipment*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.OrderUpdateshipmentCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/struct.ShoppingContent.html)** +* **[Hub](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/struct.ShoppingContent.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.Part.html)** + * **[Parts](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -136,17 +136,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.Delegate.html), 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-content2_sandbox/1.0.4+20161205/google_content2_sandbox/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.ResponseResult.html), 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")`. @@ -156,29 +156,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.CallBuilder.html) 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-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.RequestValue.html) and -[decodable](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.RequestValue.html) and +[decodable](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.CallBuilder.html), 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-content2_sandbox/1.0.4+20161205/google_content2_sandbox/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-content2_sandbox/1.0.4+20170519/google_content2_sandbox/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/content2_sandbox/src/lib.rs b/gen/content2_sandbox/src/lib.rs index 87f8cc8db4..5d6d275d4d 100644 --- a/gen/content2_sandbox/src/lib.rs +++ b/gen/content2_sandbox/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Shopping Content* crate version *1.0.4+20161205*, where *20161205* is the exact revision of the *content:v2sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Shopping Content* crate version *1.0.4+20170519*, where *20170519* is the exact revision of the *content:v2sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Shopping Content* *v2_sandbox* API can be found at the //! [official documentation site](https://developers.google.com/shopping-content). @@ -2052,7 +2052,7 @@ impl<'a, C, A> OrderMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Cancels a line item. This method can only be called for non-multi-client accounts. + /// Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts. /// /// # Arguments /// @@ -2113,7 +2113,7 @@ impl<'a, C, A> OrderMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Cancels all line items in an order. This method can only be called for non-multi-client accounts. + /// Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts. /// /// # Arguments /// @@ -4838,7 +4838,7 @@ impl<'a, C, A> OrderCustombatchCall<'a, C, A> where C: BorrowMut, } -/// Cancels a line item. This method can only be called for non-multi-client accounts. +/// Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts. /// /// A builder for the *cancellineitem* method supported by a *order* resource. /// It is not used directly, but through a `OrderMethods` instance. @@ -5641,7 +5641,7 @@ impl<'a, C, A> OrderAcknowledgeCall<'a, C, A> where C: BorrowMut, } -/// Cancels all line items in an order. This method can only be called for non-multi-client accounts. +/// Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts. /// /// A builder for the *cancel* method supported by a *order* resource. /// It is not used directly, but through a `OrderMethods` instance. diff --git a/gen/coordinate1-cli/Cargo.toml b/gen/coordinate1-cli/Cargo.toml index db02d53f76..c86bca8d78 100644 --- a/gen/coordinate1-cli/Cargo.toml +++ b/gen/coordinate1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/customsearch1-cli/Cargo.toml b/gen/customsearch1-cli/Cargo.toml index b469f6ed68..068f0800e2 100644 --- a/gen/customsearch1-cli/Cargo.toml +++ b/gen/customsearch1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/dataproc1-cli/Cargo.toml b/gen/dataproc1-cli/Cargo.toml index 53d54dd113..52eaad8ffa 100644 --- a/gen/dataproc1-cli/Cargo.toml +++ b/gen/dataproc1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dataproc1-cli" -version = "1.0.4+20161102" +version = "1.0.4+20170515" authors = ["Sebastian Thiel "] description = "A complete library to interact with dataproc (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dataproc1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-dataproc1] path = "../dataproc1" -version = "1.0.4+20161102" +version = "1.0.4+20170515" diff --git a/gen/dataproc1-cli/README.md b/gen/dataproc1-cli/README.md index a794a36142..f67968738d 100644 --- a/gen/dataproc1-cli/README.md +++ b/gen/dataproc1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *dataproc* API at revision *20161102*. The CLI is at version *1.0.4*. +This documentation was generated from the *dataproc* API at revision *20170515*. The CLI is at version *1.0.4*. ```bash dataproc1 [options] @@ -40,6 +40,7 @@ dataproc1 [options] regions-jobs-delete [-p ]... [-o ] regions-jobs-get [-p ]... [-o ] regions-jobs-list [-p ]... [-o ] + regions-jobs-patch (-r )... [-p ]... [-o ] regions-jobs-submit (-r )... [-p ]... [-o ] regions-operations-cancel [-p ]... [-o ] regions-operations-delete [-p ]... [-o ] diff --git a/gen/dataproc1-cli/mkdocs.yml b/gen/dataproc1-cli/mkdocs.yml index 95416ebe51..0dd5618022 100644 --- a/gen/dataproc1-cli/mkdocs.yml +++ b/gen/dataproc1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dataproc v1.0.4+20161102 +site_name: dataproc v1.0.4+20170515 site_url: http://byron.github.io/google-apis-rs/google-dataproc1-cli site_description: A complete library to interact with dataproc (protocol v1) @@ -19,6 +19,7 @@ pages: - ['projects_regions-jobs-delete.md', 'Projects', 'Regions Jobs Delete'] - ['projects_regions-jobs-get.md', 'Projects', 'Regions Jobs Get'] - ['projects_regions-jobs-list.md', 'Projects', 'Regions Jobs List'] +- ['projects_regions-jobs-patch.md', 'Projects', 'Regions Jobs Patch'] - ['projects_regions-jobs-submit.md', 'Projects', 'Regions Jobs Submit'] - ['projects_regions-operations-cancel.md', 'Projects', 'Regions Operations Cancel'] - ['projects_regions-operations-delete.md', 'Projects', 'Regions Operations Delete'] diff --git a/gen/dataproc1-cli/src/main.rs b/gen/dataproc1-cli/src/main.rs index cf31bf6ae2..868d7bab95 100644 --- a/gen/dataproc1-cli/src/main.rs +++ b/gen/dataproc1-cli/src/main.rs @@ -72,6 +72,7 @@ impl<'n> Engine<'n> { "status.state" => Some(("status.state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "status.state-start-time" => Some(("status.stateStartTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "status.detail" => Some(("status.detail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "status.substate" => Some(("status.substate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster-uuid" => Some(("clusterUuid", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster-name" => Some(("clusterName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -84,39 +85,40 @@ impl<'n> Engine<'n> { "config.gce-cluster-config.internal-ip-only" => Some(("config.gceClusterConfig.internalIpOnly", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "config.gce-cluster-config.network-uri" => Some(("config.gceClusterConfig.networkUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.gce-cluster-config.tags" => Some(("config.gceClusterConfig.tags", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "config.gce-cluster-config.service-account" => Some(("config.gceClusterConfig.serviceAccount", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.gce-cluster-config.zone-uri" => Some(("config.gceClusterConfig.zoneUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.gce-cluster-config.subnetwork-uri" => Some(("config.gceClusterConfig.subnetworkUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.gce-cluster-config.service-account-scopes" => Some(("config.gceClusterConfig.serviceAccountScopes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "config.gce-cluster-config.metadata" => Some(("config.gceClusterConfig.metadata", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), - "config.worker-config.is-preemptible" => Some(("config.workerConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "config.worker-config.num-instances" => Some(("config.workerConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.worker-config.machine-type-uri" => Some(("config.workerConfig.machineTypeUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.worker-config.instance-names" => Some(("config.workerConfig.instanceNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "config.worker-config.disk-config.num-local-ssds" => Some(("config.workerConfig.diskConfig.numLocalSsds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.worker-config.disk-config.boot-disk-size-gb" => Some(("config.workerConfig.diskConfig.bootDiskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.worker-config.managed-group-config.instance-template-name" => Some(("config.workerConfig.managedGroupConfig.instanceTemplateName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.worker-config.managed-group-config.instance-group-manager-name" => Some(("config.workerConfig.managedGroupConfig.instanceGroupManagerName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.worker-config.num-instances" => Some(("config.workerConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "config.worker-config.is-preemptible" => Some(("config.workerConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "config.worker-config.image-uri" => Some(("config.workerConfig.imageUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.secondary-worker-config.is-preemptible" => Some(("config.secondaryWorkerConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "config.secondary-worker-config.num-instances" => Some(("config.secondaryWorkerConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.secondary-worker-config.machine-type-uri" => Some(("config.secondaryWorkerConfig.machineTypeUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.secondary-worker-config.instance-names" => Some(("config.secondaryWorkerConfig.instanceNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "config.secondary-worker-config.disk-config.num-local-ssds" => Some(("config.secondaryWorkerConfig.diskConfig.numLocalSsds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.secondary-worker-config.disk-config.boot-disk-size-gb" => Some(("config.secondaryWorkerConfig.diskConfig.bootDiskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.secondary-worker-config.managed-group-config.instance-template-name" => Some(("config.secondaryWorkerConfig.managedGroupConfig.instanceTemplateName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.secondary-worker-config.managed-group-config.instance-group-manager-name" => Some(("config.secondaryWorkerConfig.managedGroupConfig.instanceGroupManagerName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.secondary-worker-config.num-instances" => Some(("config.secondaryWorkerConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "config.secondary-worker-config.is-preemptible" => Some(("config.secondaryWorkerConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "config.secondary-worker-config.image-uri" => Some(("config.secondaryWorkerConfig.imageUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.master-config.is-preemptible" => Some(("config.masterConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "config.master-config.num-instances" => Some(("config.masterConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.master-config.machine-type-uri" => Some(("config.masterConfig.machineTypeUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.master-config.instance-names" => Some(("config.masterConfig.instanceNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "config.master-config.disk-config.num-local-ssds" => Some(("config.masterConfig.diskConfig.numLocalSsds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.master-config.disk-config.boot-disk-size-gb" => Some(("config.masterConfig.diskConfig.bootDiskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.master-config.managed-group-config.instance-template-name" => Some(("config.masterConfig.managedGroupConfig.instanceTemplateName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.master-config.managed-group-config.instance-group-manager-name" => Some(("config.masterConfig.managedGroupConfig.instanceGroupManagerName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.master-config.num-instances" => Some(("config.masterConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "config.master-config.is-preemptible" => Some(("config.masterConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "config.master-config.image-uri" => Some(("config.masterConfig.imageUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["boot-disk-size-gb", "cluster-name", "cluster-uuid", "config", "config-bucket", "detail", "disk-config", "gce-cluster-config", "hdfs-metrics", "image-uri", "image-version", "instance-group-manager-name", "instance-names", "instance-template-name", "internal-ip-only", "is-preemptible", "labels", "machine-type-uri", "managed-group-config", "master-config", "metadata", "metrics", "network-uri", "num-instances", "num-local-ssds", "project-id", "properties", "secondary-worker-config", "service-account-scopes", "software-config", "state", "state-start-time", "status", "subnetwork-uri", "tags", "worker-config", "yarn-metrics", "zone-uri"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["boot-disk-size-gb", "cluster-name", "cluster-uuid", "config", "config-bucket", "detail", "disk-config", "gce-cluster-config", "hdfs-metrics", "image-uri", "image-version", "instance-group-manager-name", "instance-names", "instance-template-name", "internal-ip-only", "is-preemptible", "labels", "machine-type-uri", "managed-group-config", "master-config", "metadata", "metrics", "network-uri", "num-instances", "num-local-ssds", "project-id", "properties", "secondary-worker-config", "service-account", "service-account-scopes", "software-config", "state", "state-start-time", "status", "subnetwork-uri", "substate", "tags", "worker-config", "yarn-metrics", "zone-uri"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -452,6 +454,7 @@ impl<'n> Engine<'n> { "status.state" => Some(("status.state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "status.state-start-time" => Some(("status.stateStartTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "status.detail" => Some(("status.detail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "status.substate" => Some(("status.substate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster-uuid" => Some(("clusterUuid", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster-name" => Some(("clusterName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -464,39 +467,40 @@ impl<'n> Engine<'n> { "config.gce-cluster-config.internal-ip-only" => Some(("config.gceClusterConfig.internalIpOnly", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "config.gce-cluster-config.network-uri" => Some(("config.gceClusterConfig.networkUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.gce-cluster-config.tags" => Some(("config.gceClusterConfig.tags", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "config.gce-cluster-config.service-account" => Some(("config.gceClusterConfig.serviceAccount", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.gce-cluster-config.zone-uri" => Some(("config.gceClusterConfig.zoneUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.gce-cluster-config.subnetwork-uri" => Some(("config.gceClusterConfig.subnetworkUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.gce-cluster-config.service-account-scopes" => Some(("config.gceClusterConfig.serviceAccountScopes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "config.gce-cluster-config.metadata" => Some(("config.gceClusterConfig.metadata", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), - "config.worker-config.is-preemptible" => Some(("config.workerConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "config.worker-config.num-instances" => Some(("config.workerConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.worker-config.machine-type-uri" => Some(("config.workerConfig.machineTypeUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.worker-config.instance-names" => Some(("config.workerConfig.instanceNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "config.worker-config.disk-config.num-local-ssds" => Some(("config.workerConfig.diskConfig.numLocalSsds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.worker-config.disk-config.boot-disk-size-gb" => Some(("config.workerConfig.diskConfig.bootDiskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.worker-config.managed-group-config.instance-template-name" => Some(("config.workerConfig.managedGroupConfig.instanceTemplateName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.worker-config.managed-group-config.instance-group-manager-name" => Some(("config.workerConfig.managedGroupConfig.instanceGroupManagerName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.worker-config.num-instances" => Some(("config.workerConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "config.worker-config.is-preemptible" => Some(("config.workerConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "config.worker-config.image-uri" => Some(("config.workerConfig.imageUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.secondary-worker-config.is-preemptible" => Some(("config.secondaryWorkerConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "config.secondary-worker-config.num-instances" => Some(("config.secondaryWorkerConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.secondary-worker-config.machine-type-uri" => Some(("config.secondaryWorkerConfig.machineTypeUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.secondary-worker-config.instance-names" => Some(("config.secondaryWorkerConfig.instanceNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "config.secondary-worker-config.disk-config.num-local-ssds" => Some(("config.secondaryWorkerConfig.diskConfig.numLocalSsds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.secondary-worker-config.disk-config.boot-disk-size-gb" => Some(("config.secondaryWorkerConfig.diskConfig.bootDiskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.secondary-worker-config.managed-group-config.instance-template-name" => Some(("config.secondaryWorkerConfig.managedGroupConfig.instanceTemplateName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.secondary-worker-config.managed-group-config.instance-group-manager-name" => Some(("config.secondaryWorkerConfig.managedGroupConfig.instanceGroupManagerName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.secondary-worker-config.num-instances" => Some(("config.secondaryWorkerConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "config.secondary-worker-config.is-preemptible" => Some(("config.secondaryWorkerConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "config.secondary-worker-config.image-uri" => Some(("config.secondaryWorkerConfig.imageUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.master-config.is-preemptible" => Some(("config.masterConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "config.master-config.num-instances" => Some(("config.masterConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.master-config.machine-type-uri" => Some(("config.masterConfig.machineTypeUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.master-config.instance-names" => Some(("config.masterConfig.instanceNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "config.master-config.disk-config.num-local-ssds" => Some(("config.masterConfig.diskConfig.numLocalSsds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.master-config.disk-config.boot-disk-size-gb" => Some(("config.masterConfig.diskConfig.bootDiskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "config.master-config.managed-group-config.instance-template-name" => Some(("config.masterConfig.managedGroupConfig.instanceTemplateName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "config.master-config.managed-group-config.instance-group-manager-name" => Some(("config.masterConfig.managedGroupConfig.instanceGroupManagerName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "config.master-config.num-instances" => Some(("config.masterConfig.numInstances", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "config.master-config.is-preemptible" => Some(("config.masterConfig.isPreemptible", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "config.master-config.image-uri" => Some(("config.masterConfig.imageUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["boot-disk-size-gb", "cluster-name", "cluster-uuid", "config", "config-bucket", "detail", "disk-config", "gce-cluster-config", "hdfs-metrics", "image-uri", "image-version", "instance-group-manager-name", "instance-names", "instance-template-name", "internal-ip-only", "is-preemptible", "labels", "machine-type-uri", "managed-group-config", "master-config", "metadata", "metrics", "network-uri", "num-instances", "num-local-ssds", "project-id", "properties", "secondary-worker-config", "service-account-scopes", "software-config", "state", "state-start-time", "status", "subnetwork-uri", "tags", "worker-config", "yarn-metrics", "zone-uri"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["boot-disk-size-gb", "cluster-name", "cluster-uuid", "config", "config-bucket", "detail", "disk-config", "gce-cluster-config", "hdfs-metrics", "image-uri", "image-version", "instance-group-manager-name", "instance-names", "instance-template-name", "internal-ip-only", "is-preemptible", "labels", "machine-type-uri", "managed-group-config", "master-config", "metadata", "metrics", "network-uri", "num-instances", "num-local-ssds", "project-id", "properties", "secondary-worker-config", "service-account", "service-account-scopes", "software-config", "state", "state-start-time", "status", "subnetwork-uri", "substate", "tags", "worker-config", "yarn-metrics", "zone-uri"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -816,6 +820,149 @@ impl<'n> Engine<'n> { } } + fn _projects_regions_jobs_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()[..] { + "status.state" => Some(("status.state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "status.state-start-time" => Some(("status.stateStartTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "status.details" => Some(("status.details", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "status.substate" => Some(("status.substate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "spark-sql-job.query-file-uri" => Some(("sparkSqlJob.queryFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "spark-sql-job.script-variables" => Some(("sparkSqlJob.scriptVariables", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "spark-sql-job.logging-config.driver-log-levels" => Some(("sparkSqlJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "spark-sql-job.jar-file-uris" => Some(("sparkSqlJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "spark-sql-job.query-list.queries" => Some(("sparkSqlJob.queryList.queries", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "spark-sql-job.properties" => Some(("sparkSqlJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "pig-job.query-file-uri" => Some(("pigJob.queryFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "pig-job.script-variables" => Some(("pigJob.scriptVariables", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "pig-job.logging-config.driver-log-levels" => Some(("pigJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "pig-job.jar-file-uris" => Some(("pigJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "pig-job.query-list.queries" => Some(("pigJob.queryList.queries", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "pig-job.continue-on-failure" => Some(("pigJob.continueOnFailure", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "pig-job.properties" => Some(("pigJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "placement.cluster-name" => Some(("placement.clusterName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "placement.cluster-uuid" => Some(("placement.clusterUuid", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference.project-id" => Some(("reference.projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference.job-id" => Some(("reference.jobId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "hadoop-job.args" => Some(("hadoopJob.args", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "hadoop-job.logging-config.driver-log-levels" => Some(("hadoopJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "hadoop-job.jar-file-uris" => Some(("hadoopJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "hadoop-job.file-uris" => Some(("hadoopJob.fileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "hadoop-job.main-class" => Some(("hadoopJob.mainClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "hadoop-job.archive-uris" => Some(("hadoopJob.archiveUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "hadoop-job.main-jar-file-uri" => Some(("hadoopJob.mainJarFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "hadoop-job.properties" => Some(("hadoopJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "labels" => Some(("labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "driver-output-resource-uri" => Some(("driverOutputResourceUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "driver-control-files-uri" => Some(("driverControlFilesUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "spark-job.args" => Some(("sparkJob.args", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "spark-job.logging-config.driver-log-levels" => Some(("sparkJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "spark-job.jar-file-uris" => Some(("sparkJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "spark-job.file-uris" => Some(("sparkJob.fileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "spark-job.main-class" => Some(("sparkJob.mainClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "spark-job.archive-uris" => Some(("sparkJob.archiveUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "spark-job.main-jar-file-uri" => Some(("sparkJob.mainJarFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "spark-job.properties" => Some(("sparkJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "scheduling.max-failures-per-hour" => Some(("scheduling.maxFailuresPerHour", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "pyspark-job.main-python-file-uri" => Some(("pysparkJob.mainPythonFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "pyspark-job.args" => Some(("pysparkJob.args", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "pyspark-job.logging-config.driver-log-levels" => Some(("pysparkJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "pyspark-job.jar-file-uris" => Some(("pysparkJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "pyspark-job.file-uris" => Some(("pysparkJob.fileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "pyspark-job.archive-uris" => Some(("pysparkJob.archiveUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "pyspark-job.python-file-uris" => Some(("pysparkJob.pythonFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "pyspark-job.properties" => Some(("pysparkJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "hive-job.query-file-uri" => Some(("hiveJob.queryFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "hive-job.script-variables" => Some(("hiveJob.scriptVariables", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "hive-job.jar-file-uris" => Some(("hiveJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "hive-job.query-list.queries" => Some(("hiveJob.queryList.queries", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "hive-job.continue-on-failure" => Some(("hiveJob.continueOnFailure", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "hive-job.properties" => Some(("hiveJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["archive-uris", "args", "cluster-name", "cluster-uuid", "continue-on-failure", "details", "driver-control-files-uri", "driver-log-levels", "driver-output-resource-uri", "file-uris", "hadoop-job", "hive-job", "jar-file-uris", "job-id", "labels", "logging-config", "main-class", "main-jar-file-uri", "main-python-file-uri", "max-failures-per-hour", "pig-job", "placement", "project-id", "properties", "pyspark-job", "python-file-uris", "queries", "query-file-uri", "query-list", "reference", "scheduling", "script-variables", "spark-job", "spark-sql-job", "state", "state-start-time", "status", "substate"]); + 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::Job = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().regions_jobs_patch(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("region").unwrap_or(""), opt.value_of("job-id").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.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(["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(), + _ => 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(()) + } + } + } + } + fn _projects_regions_jobs_submit(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -842,14 +989,13 @@ impl<'n> Engine<'n> { "job.status.state" => Some(("job.status.state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "job.status.state-start-time" => Some(("job.status.stateStartTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "job.status.details" => Some(("job.status.details", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "job.hadoop-job.args" => Some(("job.hadoopJob.args", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "job.hadoop-job.logging-config.driver-log-levels" => Some(("job.hadoopJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), - "job.hadoop-job.jar-file-uris" => Some(("job.hadoopJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "job.hadoop-job.file-uris" => Some(("job.hadoopJob.fileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "job.hadoop-job.main-class" => Some(("job.hadoopJob.mainClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "job.hadoop-job.archive-uris" => Some(("job.hadoopJob.archiveUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "job.hadoop-job.main-jar-file-uri" => Some(("job.hadoopJob.mainJarFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "job.hadoop-job.properties" => Some(("job.hadoopJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "job.status.substate" => Some(("job.status.substate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "job.spark-sql-job.query-file-uri" => Some(("job.sparkSqlJob.queryFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "job.spark-sql-job.script-variables" => Some(("job.sparkSqlJob.scriptVariables", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "job.spark-sql-job.logging-config.driver-log-levels" => Some(("job.sparkSqlJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "job.spark-sql-job.jar-file-uris" => Some(("job.sparkSqlJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "job.spark-sql-job.query-list.queries" => Some(("job.sparkSqlJob.queryList.queries", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "job.spark-sql-job.properties" => Some(("job.sparkSqlJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "job.pig-job.query-file-uri" => Some(("job.pigJob.queryFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "job.pig-job.script-variables" => Some(("job.pigJob.scriptVariables", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "job.pig-job.logging-config.driver-log-levels" => Some(("job.pigJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), @@ -861,12 +1007,14 @@ impl<'n> Engine<'n> { "job.placement.cluster-uuid" => Some(("job.placement.clusterUuid", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "job.reference.project-id" => Some(("job.reference.projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "job.reference.job-id" => Some(("job.reference.jobId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "job.spark-sql-job.query-file-uri" => Some(("job.sparkSqlJob.queryFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "job.spark-sql-job.script-variables" => Some(("job.sparkSqlJob.scriptVariables", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), - "job.spark-sql-job.logging-config.driver-log-levels" => Some(("job.sparkSqlJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), - "job.spark-sql-job.jar-file-uris" => Some(("job.sparkSqlJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "job.spark-sql-job.query-list.queries" => Some(("job.sparkSqlJob.queryList.queries", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "job.spark-sql-job.properties" => Some(("job.sparkSqlJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "job.hadoop-job.args" => Some(("job.hadoopJob.args", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "job.hadoop-job.logging-config.driver-log-levels" => Some(("job.hadoopJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "job.hadoop-job.jar-file-uris" => Some(("job.hadoopJob.jarFileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "job.hadoop-job.file-uris" => Some(("job.hadoopJob.fileUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "job.hadoop-job.main-class" => Some(("job.hadoopJob.mainClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "job.hadoop-job.archive-uris" => Some(("job.hadoopJob.archiveUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "job.hadoop-job.main-jar-file-uri" => Some(("job.hadoopJob.mainJarFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "job.hadoop-job.properties" => Some(("job.hadoopJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "job.labels" => Some(("job.labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "job.driver-output-resource-uri" => Some(("job.driverOutputResourceUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "job.driver-control-files-uri" => Some(("job.driverControlFilesUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -878,6 +1026,7 @@ impl<'n> Engine<'n> { "job.spark-job.archive-uris" => Some(("job.sparkJob.archiveUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "job.spark-job.main-jar-file-uri" => Some(("job.sparkJob.mainJarFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "job.spark-job.properties" => Some(("job.sparkJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "job.scheduling.max-failures-per-hour" => Some(("job.scheduling.maxFailuresPerHour", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "job.pyspark-job.main-python-file-uri" => Some(("job.pysparkJob.mainPythonFileUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "job.pyspark-job.args" => Some(("job.pysparkJob.args", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "job.pyspark-job.logging-config.driver-log-levels" => Some(("job.pysparkJob.loggingConfig.driverLogLevels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), @@ -893,7 +1042,7 @@ impl<'n> Engine<'n> { "job.hive-job.continue-on-failure" => Some(("job.hiveJob.continueOnFailure", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "job.hive-job.properties" => Some(("job.hiveJob.properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["archive-uris", "args", "cluster-name", "cluster-uuid", "continue-on-failure", "details", "driver-control-files-uri", "driver-log-levels", "driver-output-resource-uri", "file-uris", "hadoop-job", "hive-job", "jar-file-uris", "job", "job-id", "labels", "logging-config", "main-class", "main-jar-file-uri", "main-python-file-uri", "pig-job", "placement", "project-id", "properties", "pyspark-job", "python-file-uris", "queries", "query-file-uri", "query-list", "reference", "script-variables", "spark-job", "spark-sql-job", "state", "state-start-time", "status"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["archive-uris", "args", "cluster-name", "cluster-uuid", "continue-on-failure", "details", "driver-control-files-uri", "driver-log-levels", "driver-output-resource-uri", "file-uris", "hadoop-job", "hive-job", "jar-file-uris", "job", "job-id", "labels", "logging-config", "main-class", "main-jar-file-uri", "main-python-file-uri", "max-failures-per-hour", "pig-job", "placement", "project-id", "properties", "pyspark-job", "python-file-uris", "queries", "query-file-uri", "query-list", "reference", "scheduling", "script-variables", "spark-job", "spark-sql-job", "state", "state-start-time", "status", "substate"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1208,6 +1357,9 @@ impl<'n> Engine<'n> { ("regions-jobs-list", Some(opt)) => { call_result = self._projects_regions_jobs_list(opt, dry_run, &mut err); }, + ("regions-jobs-patch", Some(opt)) => { + call_result = self._projects_regions_jobs_patch(opt, dry_run, &mut err); + }, ("regions-jobs-submit", Some(opt)) => { call_result = self._projects_regions_jobs_submit(opt, dry_run, &mut err); }, @@ -1315,20 +1467,20 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ - ("projects", "methods: 'regions-clusters-create', 'regions-clusters-delete', 'regions-clusters-diagnose', 'regions-clusters-get', 'regions-clusters-list', 'regions-clusters-patch', 'regions-jobs-cancel', 'regions-jobs-delete', 'regions-jobs-get', 'regions-jobs-list', 'regions-jobs-submit', 'regions-operations-cancel', 'regions-operations-delete', 'regions-operations-get' and 'regions-operations-list'", vec![ + ("projects", "methods: 'regions-clusters-create', 'regions-clusters-delete', 'regions-clusters-diagnose', 'regions-clusters-get', 'regions-clusters-list', 'regions-clusters-patch', 'regions-jobs-cancel', 'regions-jobs-delete', 'regions-jobs-get', 'regions-jobs-list', 'regions-jobs-patch', 'regions-jobs-submit', 'regions-operations-cancel', 'regions-operations-delete', 'regions-operations-get' and 'regions-operations-list'", vec![ ("regions-clusters-create", Some(r##"Creates a cluster in a project."##), "Details at http://byron.github.io/google-apis-rs/google_dataproc1_cli/projects_regions-clusters-create", vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the cluster belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the cluster belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), @@ -1356,19 +1508,19 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the cluster belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the cluster belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), (Some(r##"cluster-name"##), None, - Some(r##"[Required] The cluster name."##), + Some(r##"Required. The cluster name."##), Some(true), Some(false)), @@ -1385,24 +1537,24 @@ fn main() { Some(false)), ]), ("regions-clusters-diagnose", - Some(r##"Gets cluster diagnostic information. After the operation completes, the Operation.response field contains `DiagnoseClusterOutputLocation`."##), + Some(r##"Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation."##), "Details at http://byron.github.io/google-apis-rs/google_dataproc1_cli/projects_regions-clusters-diagnose", vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the cluster belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the cluster belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), (Some(r##"cluster-name"##), None, - Some(r##"[Required] The cluster name."##), + Some(r##"Required. The cluster name."##), Some(true), Some(false)), @@ -1430,19 +1582,19 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the cluster belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the cluster belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), (Some(r##"cluster-name"##), None, - Some(r##"[Required] The cluster name."##), + Some(r##"Required. The cluster name."##), Some(true), Some(false)), @@ -1464,13 +1616,13 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the cluster belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the cluster belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), @@ -1492,19 +1644,19 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project the cluster belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project the cluster belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), (Some(r##"cluster-name"##), None, - Some(r##"[Required] The cluster name."##), + Some(r##"Required. The cluster name."##), Some(true), Some(false)), @@ -1527,24 +1679,24 @@ fn main() { Some(false)), ]), ("regions-jobs-cancel", - Some(r##"Starts a job cancellation request. To access the job resource after cancellation, call [regions/{region}/jobs.list](/dataproc/reference/rest/v1/projects.regions.jobs/list) or [regions/{region}/jobs.get](/dataproc/reference/rest/v1/projects.regions.jobs/get)."##), + Some(r##"Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get."##), "Details at http://byron.github.io/google-apis-rs/google_dataproc1_cli/projects_regions-jobs-cancel", vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the job belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the job belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), (Some(r##"job-id"##), None, - Some(r##"[Required] The job ID."##), + Some(r##"Required. The job ID."##), Some(true), Some(false)), @@ -1567,24 +1719,24 @@ fn main() { Some(false)), ]), ("regions-jobs-delete", - Some(r##"Deletes the job from the project. If the job is active, the delete fails, and the response returns `FAILED_PRECONDITION`."##), + Some(r##"Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION."##), "Details at http://byron.github.io/google-apis-rs/google_dataproc1_cli/projects_regions-jobs-delete", vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the job belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the job belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), (Some(r##"job-id"##), None, - Some(r##"[Required] The job ID."##), + Some(r##"Required. The job ID."##), Some(true), Some(false)), @@ -1606,19 +1758,19 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the job belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the job belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), (Some(r##"job-id"##), None, - Some(r##"[Required] The job ID."##), + Some(r##"Required. The job ID."##), Some(true), Some(false)), @@ -1640,13 +1792,13 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the job belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the job belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), @@ -1656,6 +1808,46 @@ fn main() { 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)), + ]), + ("regions-jobs-patch", + Some(r##"Updates a job in a project."##), + "Details at http://byron.github.io/google-apis-rs/google_dataproc1_cli/projects_regions-jobs-patch", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"Required. The ID of the Google Cloud Platform project that the job belongs to."##), + Some(true), + Some(false)), + + (Some(r##"region"##), + None, + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), + Some(true), + Some(false)), + + (Some(r##"job-id"##), + None, + Some(r##"Required. The job ID."##), + 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"##), @@ -1668,13 +1860,13 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"[Required] The ID of the Google Cloud Platform project that the job belongs to."##), + Some(r##"Required. The ID of the Google Cloud Platform project that the job belongs to."##), Some(true), Some(false)), (Some(r##"region"##), None, - Some(r##"[Required] The Cloud Dataproc region in which to handle the request."##), + Some(r##"Required. The Cloud Dataproc region in which to handle the request."##), Some(true), Some(false)), @@ -1697,7 +1889,7 @@ fn main() { Some(false)), ]), ("regions-operations-cancel", - Some(r##"Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`."##), + Some(r##"Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED."##), "Details at http://byron.github.io/google-apis-rs/google_dataproc1_cli/projects_regions-operations-cancel", vec![ (Some(r##"name"##), @@ -1719,7 +1911,7 @@ fn main() { Some(false)), ]), ("regions-operations-delete", - Some(r##"Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`."##), + Some(r##"Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED."##), "Details at http://byron.github.io/google-apis-rs/google_dataproc1_cli/projects_regions-operations-delete", vec![ (Some(r##"name"##), @@ -1763,7 +1955,7 @@ fn main() { Some(false)), ]), ("regions-operations-list", - Some(r##"Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/*/operations`."##), + Some(r##"Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations."##), "Details at http://byron.github.io/google-apis-rs/google_dataproc1_cli/projects_regions-operations-list", vec![ (Some(r##"name"##), @@ -1790,8 +1982,8 @@ fn main() { let mut app = App::new("dataproc1") .author("Sebastian Thiel ") - .version("1.0.4+20161102") - .about("An API for managing Hadoop-based clusters and jobs on Google Cloud Platform.") + .version("1.0.4+20170515") + .about("Manages Hadoop-based clusters and jobs on Google Cloud Platform.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dataproc1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/dataproc1/Cargo.toml b/gen/dataproc1/Cargo.toml index 890a85041b..3cb8fb3ab3 100644 --- a/gen/dataproc1/Cargo.toml +++ b/gen/dataproc1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-dataproc1" -version = "1.0.4+20161102" +version = "1.0.4+20170515" authors = ["Sebastian Thiel "] description = "A complete library to interact with dataproc (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dataproc1" homepage = "https://cloud.google.com/dataproc/" -documentation = "https://docs.rs/google-dataproc1/1.0.4+20161102" +documentation = "https://docs.rs/google-dataproc1/1.0.4+20170515" license = "MIT" keywords = ["dataproc", "google", "protocol", "web", "api"] diff --git a/gen/dataproc1/README.md b/gen/dataproc1/README.md index 3dd69e6351..b42f852737 100644 --- a/gen/dataproc1/README.md +++ b/gen/dataproc1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-dataproc1` library allows access to all features of the *Google dataproc* service. -This documentation was generated from *dataproc* crate version *1.0.4+20161102*, where *20161102* is the exact revision of the *dataproc:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *dataproc* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *dataproc:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *dataproc* *v1* API can be found at the [official documentation site](https://cloud.google.com/dataproc/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.Dataproc.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.Dataproc.html) ... * projects - * [*regions clusters create*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionClusterCreateCall.html), [*regions clusters delete*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionClusterDeleteCall.html), [*regions clusters diagnose*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionClusterDiagnoseCall.html), [*regions clusters get*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionClusterGetCall.html), [*regions clusters list*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionClusterListCall.html), [*regions clusters patch*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionClusterPatchCall.html), [*regions jobs cancel*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionJobCancelCall.html), [*regions jobs delete*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionJobDeleteCall.html), [*regions jobs get*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionJobGetCall.html), [*regions jobs list*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionJobListCall.html), [*regions jobs submit*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionJobSubmitCall.html), [*regions operations cancel*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionOperationCancelCall.html), [*regions operations delete*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionOperationDeleteCall.html), [*regions operations get*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionOperationGetCall.html) and [*regions operations list*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.ProjectRegionOperationListCall.html) + * [*regions clusters create*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionClusterCreateCall.html), [*regions clusters delete*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionClusterDeleteCall.html), [*regions clusters diagnose*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionClusterDiagnoseCall.html), [*regions clusters get*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionClusterGetCall.html), [*regions clusters list*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionClusterListCall.html), [*regions clusters patch*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionClusterPatchCall.html), [*regions jobs cancel*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionJobCancelCall.html), [*regions jobs delete*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionJobDeleteCall.html), [*regions jobs get*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionJobGetCall.html), [*regions jobs list*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionJobListCall.html), [*regions jobs patch*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionJobPatchCall.html), [*regions jobs submit*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionJobSubmitCall.html), [*regions operations cancel*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionOperationCancelCall.html), [*regions operations delete*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionOperationDeleteCall.html), [*regions operations get*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionOperationGetCall.html) and [*regions operations list*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.ProjectRegionOperationListCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/struct.Dataproc.html)** +* **[Hub](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/struct.Dataproc.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.Part.html)** + * **[Parts](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -126,17 +126,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.Delegate.html), 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-dataproc1/1.0.4+20161102/google_dataproc1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.ResponseResult.html), 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")`. @@ -146,29 +146,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.CallBuilder.html) 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-dataproc1/1.0.4+20161102/google_dataproc1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-dataproc1/1.0.4+20161102/google_dataproc1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.CallBuilder.html), 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-dataproc1/1.0.4+20161102/google_dataproc1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-dataproc1/1.0.4+20170515/google_dataproc1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/dataproc1/src/lib.rs b/gen/dataproc1/src/lib.rs index 2369ba4edc..788c87617b 100644 --- a/gen/dataproc1/src/lib.rs +++ b/gen/dataproc1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dataproc* crate version *1.0.4+20161102*, where *20161102* is the exact revision of the *dataproc:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *dataproc* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *dataproc:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *dataproc* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/dataproc/). @@ -12,7 +12,7 @@ //! Handle the following *Resources* with ease from the central [hub](struct.Dataproc.html) ... //! //! * projects -//! * [*regions clusters create*](struct.ProjectRegionClusterCreateCall.html), [*regions clusters delete*](struct.ProjectRegionClusterDeleteCall.html), [*regions clusters diagnose*](struct.ProjectRegionClusterDiagnoseCall.html), [*regions clusters get*](struct.ProjectRegionClusterGetCall.html), [*regions clusters list*](struct.ProjectRegionClusterListCall.html), [*regions clusters patch*](struct.ProjectRegionClusterPatchCall.html), [*regions jobs cancel*](struct.ProjectRegionJobCancelCall.html), [*regions jobs delete*](struct.ProjectRegionJobDeleteCall.html), [*regions jobs get*](struct.ProjectRegionJobGetCall.html), [*regions jobs list*](struct.ProjectRegionJobListCall.html), [*regions jobs submit*](struct.ProjectRegionJobSubmitCall.html), [*regions operations cancel*](struct.ProjectRegionOperationCancelCall.html), [*regions operations delete*](struct.ProjectRegionOperationDeleteCall.html), [*regions operations get*](struct.ProjectRegionOperationGetCall.html) and [*regions operations list*](struct.ProjectRegionOperationListCall.html) +//! * [*regions clusters create*](struct.ProjectRegionClusterCreateCall.html), [*regions clusters delete*](struct.ProjectRegionClusterDeleteCall.html), [*regions clusters diagnose*](struct.ProjectRegionClusterDiagnoseCall.html), [*regions clusters get*](struct.ProjectRegionClusterGetCall.html), [*regions clusters list*](struct.ProjectRegionClusterListCall.html), [*regions clusters patch*](struct.ProjectRegionClusterPatchCall.html), [*regions jobs cancel*](struct.ProjectRegionJobCancelCall.html), [*regions jobs delete*](struct.ProjectRegionJobDeleteCall.html), [*regions jobs get*](struct.ProjectRegionJobGetCall.html), [*regions jobs list*](struct.ProjectRegionJobListCall.html), [*regions jobs patch*](struct.ProjectRegionJobPatchCall.html), [*regions jobs submit*](struct.ProjectRegionJobSubmitCall.html), [*regions operations cancel*](struct.ProjectRegionOperationCancelCall.html), [*regions operations delete*](struct.ProjectRegionOperationDeleteCall.html), [*regions operations get*](struct.ProjectRegionOperationGetCall.html) and [*regions operations list*](struct.ProjectRegionOperationListCall.html) //! //! //! @@ -347,7 +347,7 @@ impl<'a, C, A> Dataproc // ############ // SCHEMAS ### // ########## -/// A Cloud Dataproc job for running [Apache Spark SQL](http://spark.apache.org/sql/) queries. +/// A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -356,50 +356,66 @@ pub struct SparkSqlJob { /// The HCFS URI of the script that contains SQL queries. #[serde(rename="queryFileUri")] pub query_file_uri: Option, - /// [Optional] Mapping of query variable names to values (equivalent to the Spark SQL command: SET `name="value";`). + /// Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name="value";). #[serde(rename="scriptVariables")] pub script_variables: Option>, - /// [Optional] The runtime log config for job execution. + /// Optional. The runtime log config for job execution. #[serde(rename="loggingConfig")] pub logging_config: Option, - /// [Optional] HCFS URIs of jar files to be added to the Spark CLASSPATH. + /// Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. #[serde(rename="jarFileUris")] pub jar_file_uris: Option>, /// A list of queries. #[serde(rename="queryList")] pub query_list: Option, - /// [Optional] A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. + /// Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. pub properties: Option>, } impl Part for SparkSqlJob {} -/// [Optional] The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. +/// Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct JobScheduling { + /// Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10. + #[serde(rename="maxFailuresPerHour")] + pub max_failures_per_hour: Option, +} + +impl Part for JobScheduling {} + + +/// Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstanceGroupConfig { - /// [Required] The number of VM instances in the instance group. For master instance groups, must be set to 1. - #[serde(rename="numInstances")] - pub num_instances: Option, - /// [Optional] Specifies that this instance group contains preemptible instances. + /// Optional. Specifies that this instance group contains preemptible instances. #[serde(rename="isPreemptible")] pub is_preemptible: Option, - /// [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups. - #[serde(rename="managedGroupConfig")] - pub managed_group_config: Option, - /// [Required] The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`. + /// Required. The Google Compute Engine machine type used for cluster instances. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2. #[serde(rename="machineTypeUri")] pub machine_type_uri: Option, - /// [Optional] Disk option config settings. - #[serde(rename="diskConfig")] - pub disk_config: Option, - /// [Optional] The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name). + /// Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name). #[serde(rename="instanceNames")] pub instance_names: Option>, - /// [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`. + /// Optional. Disk option config settings. + #[serde(rename="diskConfig")] + pub disk_config: Option, + /// Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. + pub accelerators: Option>, + /// Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups. + #[serde(rename="managedGroupConfig")] + pub managed_group_config: Option, + /// Required. The number of VM instances in the instance group. For master instance groups, must be set to 1. + #[serde(rename="numInstances")] + pub num_instances: Option, + /// Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version. #[serde(rename="imageUri")] pub image_uri: Option, } @@ -407,19 +423,19 @@ pub struct InstanceGroupConfig { impl Part for InstanceGroupConfig {} -/// A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto. **Beta Feature**: This report is available for testing purposes only. It may be changed before final release. +/// A YARN application created by a job. Application information is a subset of org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta Feature: This report is available for testing purposes only. It may be changed before final release. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct YarnApplication { - /// [Required] The numerical progress of the application, from 1 to 100. + /// Required. The numerical progress of the application, from 1 to 100. pub progress: Option, - /// [Required] The application state. + /// Required. The application state. pub state: Option, - /// [Required] The application name. + /// Required. The application name. pub name: Option, - /// [Optional] The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access. + /// Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access. #[serde(rename="trackingUrl")] pub tracking_url: Option, } @@ -427,7 +443,11 @@ pub struct YarnApplication { impl Part for YarnApplication {} -/// 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); } The JSON representation for `Empty` is empty JSON object `{}`. +/// 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); +/// } +/// The JSON representation for Empty is empty JSON object {}. /// /// # Activities /// @@ -444,7 +464,14 @@ pub struct Empty { _never_set: Option } impl ResponseResult for Empty {} -/// The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. +/// The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be: +/// Simple to use and understand for most users +/// Flexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include: +/// Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors. +/// Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting. +/// Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response. +/// Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message. +/// Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -461,21 +488,18 @@ pub struct Status { impl Part for Status {} -/// Encapsulates the full scoping used to reference a job. +/// The runtime logging config of the job. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct JobReference { - /// [Required] The ID of the Google Cloud Platform project that the job belongs to. - #[serde(rename="projectId")] - pub project_id: Option, - /// [Optional] The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 512 characters. - #[serde(rename="jobId")] - pub job_id: Option, +pub struct LoggingConfig { + /// The per-package log levels for the driver. This may include "root" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG' + #[serde(rename="driverLogLevels")] + pub driver_log_levels: Option>, } -impl Part for JobReference {} +impl Part for LoggingConfig {} /// Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster. @@ -484,55 +508,91 @@ impl Part for JobReference {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GceClusterConfig { - /// [Optional] If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This `internal_ip_only` restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses. + /// Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses. #[serde(rename="internalIpOnly")] pub internal_ip_only: Option, - /// [Optional] The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither `network_uri` nor `subnetwork_uri` is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see [Using Subnetworks](/compute/docs/subnetworks) for more information). Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`. + /// Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using Subnetworks for more information). Example: https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default. #[serde(rename="networkUri")] pub network_uri: Option, - /// [Optional] The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`. - #[serde(rename="subnetworkUri")] - pub subnetwork_uri: Option, - /// [Optional] The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: * https://www.googleapis.com/auth/cloud.useraccounts.readonly * https://www.googleapis.com/auth/devstorage.read_write * https://www.googleapis.com/auth/logging.write If no scopes are specified, the following defaults are also provided: * https://www.googleapis.com/auth/bigquery * https://www.googleapis.com/auth/bigtable.admin.table * https://www.googleapis.com/auth/bigtable.data * https://www.googleapis.com/auth/devstorage.full_control - #[serde(rename="serviceAccountScopes")] - pub service_account_scopes: Option>, - /// The Google Compute Engine tags to add to all instances (see [Tagging instances](/compute/docs/label-or-tag-resources#tags)). + /// The Google Compute Engine tags to add to all instances (see Tagging instances). pub tags: Option>, - /// The Google Compute Engine metadata entries to add to all instances (see [Project and instance metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - pub metadata: Option>, - /// [Required] The zone where the Google Compute Engine cluster will be located. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`. + /// Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles: + /// roles/logging.logWriter + /// roles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com + #[serde(rename="serviceAccount")] + pub service_account: Option, + /// Required. The zone where the Google Compute Engine cluster will be located. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]. #[serde(rename="zoneUri")] pub zone_uri: Option, + /// Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0. + #[serde(rename="subnetworkUri")] + pub subnetwork_uri: Option, + /// Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: + /// https://www.googleapis.com/auth/cloud.useraccounts.readonly + /// https://www.googleapis.com/auth/devstorage.read_write + /// https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided: + /// https://www.googleapis.com/auth/bigquery + /// https://www.googleapis.com/auth/bigtable.admin.table + /// https://www.googleapis.com/auth/bigtable.data + /// https://www.googleapis.com/auth/devstorage.full_control + #[serde(rename="serviceAccountScopes")] + pub service_account_scopes: Option>, + /// The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). + pub metadata: Option>, } impl Part for GceClusterConfig {} +/// Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AcceleratorConfig { + /// The number of the accelerator cards of this type exposed to this instance. + #[serde(rename="acceleratorCount")] + pub accelerator_count: Option, + /// Full or partial URI of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes) + #[serde(rename="acceleratorTypeUri")] + pub accelerator_type_uri: Option, +} + +impl Part for AcceleratorConfig {} + + /// The cluster config. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ClusterConfig { - /// [Optional] The config settings for software inside the cluster. + /// Optional. The config settings for software inside the cluster. #[serde(rename="softwareConfig")] pub software_config: Option, - /// [Optional] A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you. + /// Optional. A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you. #[serde(rename="configBucket")] pub config_bucket: Option, - /// [Required] The shared Google Compute Engine config settings for all instances in a cluster. + /// Required. The shared Google Compute Engine config settings for all instances in a cluster. #[serde(rename="gceClusterConfig")] pub gce_cluster_config: Option, - /// [Optional] Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using `curl` (you can also use `wget`): ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) if [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi + /// Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget): + /// ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) + /// if [[ "${ROLE}" == 'Master' ]]; then + /// ... master specific actions ... + /// else + /// ... worker specific actions ... + /// fi + /// #[serde(rename="initializationActions")] pub initialization_actions: Option>, - /// [Optional] The Google Compute Engine config settings for worker instances in a cluster. + /// Optional. The Google Compute Engine config settings for worker instances in a cluster. #[serde(rename="workerConfig")] pub worker_config: Option, - /// [Optional] The Google Compute Engine config settings for additional worker instances in a cluster. + /// Optional. The Google Compute Engine config settings for additional worker instances in a cluster. #[serde(rename="secondaryWorkerConfig")] pub secondary_worker_config: Option, - /// [Optional] The Google Compute Engine config settings for the master instance in a cluster. + /// Optional. The Google Compute Engine config settings for the master instance in a cluster. #[serde(rename="masterConfig")] pub master_config: Option, } @@ -551,7 +611,7 @@ impl Part for ClusterConfig {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SubmitJobRequest { - /// [Required] The job resource. + /// Required. The job resource. pub job: Option, } @@ -564,7 +624,17 @@ impl RequestValue for SubmitJobRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QueryList { - /// [Required] The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob: "hiveJob": { "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } } + /// Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob: + /// "hiveJob": { + /// "queryList": { + /// "queries": [ + /// "query1", + /// "query2", + /// "query3;query4", + /// ] + /// } + /// } + /// pub queries: Option>, } @@ -577,10 +647,10 @@ impl Part for QueryList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DiskConfig { - /// [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries. + /// Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries. #[serde(rename="numLocalSsds")] pub num_local_ssds: Option, - /// [Optional] Size in GB of the boot disk (default is 500GB). + /// Optional. Size in GB of the boot disk (default is 500GB). #[serde(rename="bootDiskSizeGb")] pub boot_disk_size_gb: Option, } @@ -597,50 +667,54 @@ impl Part for DiskConfig {} /// /// * [regions jobs submit projects](struct.ProjectRegionJobSubmitCall.html) (response) /// * [regions jobs get projects](struct.ProjectRegionJobGetCall.html) (response) +/// * [regions jobs patch projects](struct.ProjectRegionJobPatchCall.html) (request|response) /// * [regions jobs cancel projects](struct.ProjectRegionJobCancelCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Job { - /// [Output-only] The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields. + /// Output-only. The job status. Additional application-specific status information may be contained in the type_job and yarn_applications fields. pub status: Option, - /// Job is a Hadoop job. - #[serde(rename="hadoopJob")] - pub hadoop_job: Option, - /// [Optional] The labels to associate with this job. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job. - pub labels: Option>, - /// [Required] Job information, including how, when, and where to run the job. - pub placement: Option, - /// [Optional] The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id. - pub reference: Option, /// Job is a SparkSql job. #[serde(rename="sparkSqlJob")] pub spark_sql_job: Option, + /// Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job. + pub labels: Option>, + /// Required. Job information, including how, when, and where to run the job. + pub placement: Option, + /// Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a job_id. + pub reference: Option, + /// Job is a Hadoop job. + #[serde(rename="hadoopJob")] + pub hadoop_job: Option, /// Job is a Pig job. #[serde(rename="pigJob")] pub pig_job: Option, - /// [Output-only] A URI pointing to the location of the stdout of the job's driver program. + /// Output-only. A URI pointing to the location of the stdout of the job's driver program. #[serde(rename="driverOutputResourceUri")] pub driver_output_resource_uri: Option, - /// Job is a Pyspark job. - #[serde(rename="pysparkJob")] - pub pyspark_job: Option, - /// [Output-only] If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as `driver_output_uri`. + /// Output-only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri. #[serde(rename="driverControlFilesUri")] pub driver_control_files_uri: Option, /// Job is a Spark job. #[serde(rename="sparkJob")] pub spark_job: Option, - /// [Output-only] The collection of YARN applications spun up by this job. **Beta** Feature: This report is available for testing purposes only. It may be changed before final release. + /// Output-only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release. #[serde(rename="yarnApplications")] pub yarn_applications: Option>, - /// [Output-only] The previous job status. + /// Optional. Job scheduling configuration. + pub scheduling: Option, + /// Output-only. The previous job status. #[serde(rename="statusHistory")] pub status_history: Option>, + /// Job is a Pyspark job. + #[serde(rename="pysparkJob")] + pub pyspark_job: Option, /// Job is a Hive job. #[serde(rename="hiveJob")] pub hive_job: Option, } +impl RequestValue for Job {} impl ResponseResult for Job {} @@ -650,10 +724,10 @@ impl ResponseResult for Job {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ManagedGroupConfig { - /// [Output-only] The name of the Instance Template used for the Managed Instance Group. + /// Output-only. The name of the Instance Template used for the Managed Instance Group. #[serde(rename="instanceTemplateName")] pub instance_template_name: Option, - /// [Output-only] The name of the Instance Group Manager for this group. + /// Output-only. The name of the Instance Group Manager for this group. #[serde(rename="instanceGroupManagerName")] pub instance_group_manager_name: Option, } @@ -661,33 +735,33 @@ pub struct ManagedGroupConfig { impl Part for ManagedGroupConfig {} -/// A Cloud Dataproc job for running [Apache PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. +/// A Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PySparkJob { - /// [Required] The HCFS URI of the main Python file to use as the driver. Must be a .py file. + /// Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file. #[serde(rename="mainPythonFileUri")] pub main_python_file_uri: Option, - /// [Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks. + /// Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks. #[serde(rename="jarFileUris")] pub jar_file_uris: Option>, - /// [Optional] The runtime log config for job execution. + /// Optional. The runtime log config for job execution. #[serde(rename="loggingConfig")] pub logging_config: Option, - /// [Optional] The arguments to pass to the driver. Do not include arguments, such as `--conf`, that can be set as job properties, since a collision may occur that causes an incorrect job submission. + /// Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission. pub args: Option>, - /// [Optional] HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks. + /// Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks. #[serde(rename="fileUris")] pub file_uris: Option>, - /// [Optional] HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip. + /// Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip. #[serde(rename="archiveUris")] pub archive_uris: Option>, - /// [Optional] HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip. + /// Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip. #[serde(rename="pythonFileUris")] pub python_file_uris: Option>, - /// [Optional] A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. + /// Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. pub properties: Option>, } @@ -700,10 +774,10 @@ impl Part for PySparkJob {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct NodeInitializationAction { - /// [Optional] Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period. + /// Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period. #[serde(rename="executionTimeout")] pub execution_timeout: Option, - /// [Required] Google Cloud Storage URI of executable file. + /// Required. Google Cloud Storage URI of executable file. #[serde(rename="executableFile")] pub executable_file: Option, } @@ -737,10 +811,10 @@ impl RequestValue for DiagnoseClusterRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListClustersResponse { - /// [Output-only] This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the `page_token` in a subsequent ListClustersRequest. + /// Output-only. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent ListClustersRequest. #[serde(rename="nextPageToken")] pub next_page_token: Option, - /// [Output-only] The clusters in the project. + /// Output-only. The clusters in the project. pub clusters: Option>, } @@ -758,10 +832,10 @@ impl ResponseResult for ListClustersResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListJobsResponse { - /// [Optional] This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the `page_token` in a subsequent ListJobsRequest. + /// Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent ListJobsRequest. #[serde(rename="nextPageToken")] pub next_page_token: Option, - /// [Output-only] Jobs list. + /// Output-only. Jobs list. pub jobs: Option>, } @@ -774,13 +848,15 @@ impl ResponseResult for ListJobsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobStatus { - /// [Output-only] A state message specifying the overall job state. + /// Output-only. A state message specifying the overall job state. pub state: Option, - /// [Output-only] The time when this state was entered. + /// Output-only. The time when this state was entered. #[serde(rename="stateStartTime")] pub state_start_time: Option, - /// [Output-only] Optional job state details, such as an error description if the state is ERROR. + /// Output-only. Optional job state details, such as an error description if the state is ERROR. pub details: Option, + /// Output-only. Additional state information, which includes status reported by the agent. + pub substate: Option, } impl Part for JobStatus {} @@ -792,10 +868,10 @@ impl Part for JobStatus {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobPlacement { - /// [Required] The name of the cluster where the job will be submitted. + /// Required. The name of the cluster where the job will be submitted. #[serde(rename="clusterName")] pub cluster_name: Option, - /// [Output-only] A cluster UUID generated by the Cloud Dataproc service when the job is submitted. + /// Output-only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted. #[serde(rename="clusterUuid")] pub cluster_uuid: Option, } @@ -803,21 +879,24 @@ pub struct JobPlacement { impl Part for JobPlacement {} -/// The runtime logging config of the job. +/// Encapsulates the full scoping used to reference a job. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct LoggingConfig { - /// The per-package log levels for the driver. This may include "root" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG' - #[serde(rename="driverLogLevels")] - pub driver_log_levels: Option>, +pub struct JobReference { + /// Required. The ID of the Google Cloud Platform project that the job belongs to. + #[serde(rename="projectId")] + pub project_id: Option, + /// Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters. + #[serde(rename="jobId")] + pub job_id: Option, } -impl Part for LoggingConfig {} +impl Part for JobReference {} -/// Contains cluster daemon metrics, such as HDFS and YARN stats. **Beta Feature**: This report is available for testing purposes only. It may be changed before final release. +/// Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -834,7 +913,7 @@ pub struct ClusterMetrics { impl Part for ClusterMetrics {} -/// A Cloud Dataproc job for running [Apache Hive](https://hive.apache.org/) queries on YARN. +/// A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -843,52 +922,52 @@ pub struct HiveJob { /// The HCFS URI of the script that contains Hive queries. #[serde(rename="queryFileUri")] pub query_file_uri: Option, - /// [Optional] Mapping of query variable names to values (equivalent to the Hive command: `SET name="value";`). + /// Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name="value";). #[serde(rename="scriptVariables")] pub script_variables: Option>, - /// [Optional] Whether to continue executing queries if a query fails. The default value is `false`. Setting to `true` can be useful when executing independent parallel queries. + /// Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. #[serde(rename="continueOnFailure")] pub continue_on_failure: Option, - /// [Optional] HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs. + /// Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs. #[serde(rename="jarFileUris")] pub jar_file_uris: Option>, /// A list of queries. #[serde(rename="queryList")] pub query_list: Option, - /// [Optional] A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code. + /// Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code. pub properties: Option>, } impl Part for HiveJob {} -/// A Cloud Dataproc job for running [Apache Hadoop MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on [Apache Hadoop YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). +/// A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HadoopJob { - /// [Optional] Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks. + /// Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks. #[serde(rename="jarFileUris")] pub jar_file_uris: Option>, - /// [Optional] The runtime log config for job execution. + /// Optional. The runtime log config for job execution. #[serde(rename="loggingConfig")] pub logging_config: Option, - /// [Optional] The arguments to pass to the driver. Do not include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job properties, since a collision may occur that causes an incorrect job submission. + /// Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission. pub args: Option>, - /// [Optional] HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks. + /// Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks. #[serde(rename="fileUris")] pub file_uris: Option>, - /// The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in `jar_file_uris`. + /// The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris. #[serde(rename="mainClass")] pub main_class: Option, - /// [Optional] HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip. + /// Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip. #[serde(rename="archiveUris")] pub archive_uris: Option>, - /// The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' + /// The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' #[serde(rename="mainJarFileUri")] pub main_jar_file_uri: Option, - /// [Optional] A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code. + /// Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code. pub properties: Option>, } @@ -901,10 +980,19 @@ impl Part for HadoopJob {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SoftwareConfig { - /// [Optional] The version of software inside the cluster. It must match the regular expression `[0-9]+\.[0-9]+`. If unspecified, it defaults to the latest version (see [Cloud Dataproc Versioning](/dataproc/versioning)). + /// Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning). #[serde(rename="imageVersion")] pub image_version: Option, - /// [Optional] The properties to set on daemon config files. Property keys are specified in `prefix:property` format, such as `core:fs.defaultFS`. The following are supported prefixes and their mappings: * core: `core-site.xml` * hdfs: `hdfs-site.xml` * mapred: `mapred-site.xml` * yarn: `yarn-site.xml` * hive: `hive-site.xml` * pig: `pig.properties` * spark: `spark-defaults.conf` + /// Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings: + /// capacity-scheduler: capacity-scheduler.xml + /// core: core-site.xml + /// distcp: distcp-default.xml + /// hdfs: hdfs-site.xml + /// hive: hive-site.xml + /// mapred: mapred-site.xml + /// pig: pig.properties + /// spark: spark-defaults.conf + /// yarn: yarn-site.xml pub properties: Option>, } @@ -932,7 +1020,7 @@ pub struct ListOperationsResponse { impl ResponseResult for ListOperationsResponse {} -/// A Cloud Dataproc job for running [Apache Pig](https://pig.apache.org/) queries on YARN. +/// A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -941,22 +1029,22 @@ pub struct PigJob { /// The HCFS URI of the script that contains the Pig queries. #[serde(rename="queryFileUri")] pub query_file_uri: Option, - /// [Optional] Mapping of query variable names to values (equivalent to the Pig command: `name=[value]`). + /// Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]). #[serde(rename="scriptVariables")] pub script_variables: Option>, - /// [Optional] The runtime log config for job execution. + /// Optional. The runtime log config for job execution. #[serde(rename="loggingConfig")] pub logging_config: Option, - /// [Optional] Whether to continue executing queries if a query fails. The default value is `false`. Setting to `true` can be useful when executing independent parallel queries. + /// Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries. #[serde(rename="continueOnFailure")] pub continue_on_failure: Option, - /// [Optional] HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. + /// Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. #[serde(rename="jarFileUris")] pub jar_file_uris: Option>, /// A list of queries. #[serde(rename="queryList")] pub query_list: Option, - /// [Optional] A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code. + /// Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code. pub properties: Option>, } @@ -976,25 +1064,25 @@ impl Part for PigJob {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Cluster { - /// [Output-only] Cluster status. + /// Output-only. Cluster status. pub status: Option, - /// [Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster. + /// Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster. #[serde(rename="clusterUuid")] pub cluster_uuid: Option, - /// [Required] The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused. + /// Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused. #[serde(rename="clusterName")] pub cluster_name: Option, - /// [Required] The Google Cloud Platform project ID that the cluster belongs to. + /// Required. The Google Cloud Platform project ID that the cluster belongs to. #[serde(rename="projectId")] pub project_id: Option, - /// [Optional] The labels to associate with this cluster. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster. + /// Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster. pub labels: Option>, - /// Contains cluster daemon metrics such as HDFS and YARN stats. **Beta Feature**: This report is available for testing purposes only. It may be changed before final release. + /// Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release. pub metrics: Option, - /// [Output-only] The previous cluster status. + /// Output-only. The previous cluster status. #[serde(rename="statusHistory")] pub status_history: Option>, - /// [Required] The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated. + /// Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated. pub config: Option, } @@ -1002,33 +1090,33 @@ impl RequestValue for Cluster {} impl ResponseResult for Cluster {} -/// A Cloud Dataproc job for running [Apache Spark](http://spark.apache.org/) applications on YARN. +/// A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SparkJob { - /// [Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks. + /// Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks. #[serde(rename="jarFileUris")] pub jar_file_uris: Option>, - /// [Optional] The runtime log config for job execution. + /// Optional. The runtime log config for job execution. #[serde(rename="loggingConfig")] pub logging_config: Option, - /// [Optional] The arguments to pass to the driver. Do not include arguments, such as `--conf`, that can be set as job properties, since a collision may occur that causes an incorrect job submission. + /// Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission. pub args: Option>, - /// [Optional] HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks. + /// Optional. HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks. #[serde(rename="fileUris")] pub file_uris: Option>, - /// The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in `jar_file_uris`. + /// The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris. #[serde(rename="mainClass")] pub main_class: Option, - /// [Optional] HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. + /// Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. #[serde(rename="archiveUris")] pub archive_uris: Option>, /// The HCFS URI of the jar file that contains the main class. #[serde(rename="mainJarFileUri")] pub main_jar_file_uri: Option, - /// [Optional] A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. + /// Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code. pub properties: Option>, } @@ -1041,13 +1129,15 @@ impl Part for SparkJob {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ClusterStatus { - /// [Output-only] The cluster's state. + /// Output-only. The cluster's state. pub state: Option, - /// [Output-only] Time when this state was entered. + /// Output-only. Time when this state was entered. #[serde(rename="stateStartTime")] pub state_start_time: Option, - /// [Output-only] Optional details of cluster's state. + /// Output-only. Optional details of cluster's state. pub detail: Option, + /// Output-only. Additional state information that includes status reported by the agent. + pub substate: Option, } impl Part for ClusterStatus {} @@ -1068,16 +1158,16 @@ impl Part for ClusterStatus {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { - /// Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. - pub metadata: Option>, - /// If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available. - pub done: Option, - /// The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. - pub response: Option>, - /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`. - pub name: Option, /// The error result of the operation in case of failure or cancellation. pub error: Option, + /// If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. + pub done: Option, + /// The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. + pub response: Option>, + /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name. + pub name: Option, + /// Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + pub metadata: Option>, } impl ResponseResult for Operation {} @@ -1126,7 +1216,7 @@ impl RequestValue for CancelJobRequest {} /// ::default(), None); /// let mut hub = Dataproc::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `regions_clusters_create(...)`, `regions_clusters_delete(...)`, `regions_clusters_diagnose(...)`, `regions_clusters_get(...)`, `regions_clusters_list(...)`, `regions_clusters_patch(...)`, `regions_jobs_cancel(...)`, `regions_jobs_delete(...)`, `regions_jobs_get(...)`, `regions_jobs_list(...)`, `regions_jobs_submit(...)`, `regions_operations_cancel(...)`, `regions_operations_delete(...)`, `regions_operations_get(...)` and `regions_operations_list(...)` +/// // like `regions_clusters_create(...)`, `regions_clusters_delete(...)`, `regions_clusters_diagnose(...)`, `regions_clusters_get(...)`, `regions_clusters_list(...)`, `regions_clusters_patch(...)`, `regions_jobs_cancel(...)`, `regions_jobs_delete(...)`, `regions_jobs_get(...)`, `regions_jobs_list(...)`, `regions_jobs_patch(...)`, `regions_jobs_submit(...)`, `regions_operations_cancel(...)`, `regions_operations_delete(...)`, `regions_operations_get(...)` and `regions_operations_list(...)` /// // to build up your call. /// let rb = hub.projects(); /// # } @@ -1147,9 +1237,9 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the cluster belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. - /// * `clusterName` - [Required] The cluster name. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the cluster belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. + /// * `clusterName` - Required. The cluster name. pub fn regions_clusters_get(&self, project_id: &str, region: &str, cluster_name: &str) -> ProjectRegionClusterGetCall<'a, C, A> { ProjectRegionClusterGetCall { hub: self.hub, @@ -1168,8 +1258,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the cluster belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the cluster belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. pub fn regions_clusters_list(&self, project_id: &str, region: &str) -> ProjectRegionClusterListCall<'a, C, A> { ProjectRegionClusterListCall { hub: self.hub, @@ -1190,8 +1280,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the job belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the job belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. pub fn regions_jobs_list(&self, project_id: &str, region: &str) -> ProjectRegionJobListCall<'a, C, A> { ProjectRegionJobListCall { hub: self.hub, @@ -1215,9 +1305,9 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - [Required] The ID of the Google Cloud Platform project the cluster belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. - /// * `clusterName` - [Required] The cluster name. + /// * `projectId` - Required. The ID of the Google Cloud Platform project the cluster belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. + /// * `clusterName` - Required. The cluster name. pub fn regions_clusters_patch(&self, request: Cluster, project_id: &str, region: &str, cluster_name: &str) -> ProjectRegionClusterPatchCall<'a, C, A> { ProjectRegionClusterPatchCall { hub: self.hub, @@ -1238,9 +1328,9 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the job belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. - /// * `jobId` - [Required] The job ID. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the job belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. + /// * `jobId` - Required. The job ID. pub fn regions_jobs_get(&self, project_id: &str, region: &str, job_id: &str) -> ProjectRegionJobGetCall<'a, C, A> { ProjectRegionJobGetCall { hub: self.hub, @@ -1255,7 +1345,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + /// Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. /// /// # Arguments /// @@ -1293,9 +1383,9 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the cluster belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. - /// * `clusterName` - [Required] The cluster name. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the cluster belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. + /// * `clusterName` - Required. The cluster name. pub fn regions_clusters_delete(&self, project_id: &str, region: &str, cluster_name: &str) -> ProjectRegionClusterDeleteCall<'a, C, A> { ProjectRegionClusterDeleteCall { hub: self.hub, @@ -1310,14 +1400,14 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets cluster diagnostic information. After the operation completes, the Operation.response field contains `DiagnoseClusterOutputLocation`. + /// Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation. /// /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the cluster belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. - /// * `clusterName` - [Required] The cluster name. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the cluster belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. + /// * `clusterName` - Required. The cluster name. pub fn regions_clusters_diagnose(&self, request: DiagnoseClusterRequest, project_id: &str, region: &str, cluster_name: &str) -> ProjectRegionClusterDiagnoseCall<'a, C, A> { ProjectRegionClusterDiagnoseCall { hub: self.hub, @@ -1338,8 +1428,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the job belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the job belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. pub fn regions_jobs_submit(&self, request: SubmitJobRequest, project_id: &str, region: &str) -> ProjectRegionJobSubmitCall<'a, C, A> { ProjectRegionJobSubmitCall { hub: self.hub, @@ -1359,8 +1449,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the cluster belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the cluster belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. pub fn regions_clusters_create(&self, request: Cluster, project_id: &str, region: &str) -> ProjectRegionClusterCreateCall<'a, C, A> { ProjectRegionClusterCreateCall { hub: self.hub, @@ -1375,13 +1465,13 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the job from the project. If the job is active, the delete fails, and the response returns `FAILED_PRECONDITION`. + /// Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION. /// /// # Arguments /// - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the job belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. - /// * `jobId` - [Required] The job ID. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the job belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. + /// * `jobId` - Required. The job ID. pub fn regions_jobs_delete(&self, project_id: &str, region: &str, job_id: &str) -> ProjectRegionJobDeleteCall<'a, C, A> { ProjectRegionJobDeleteCall { hub: self.hub, @@ -1396,7 +1486,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + /// Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. /// /// # Arguments /// @@ -1413,7 +1503,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. + /// Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations. /// /// # Arguments /// @@ -1433,14 +1523,38 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Starts a job cancellation request. To access the job resource after cancellation, call [regions/{region}/jobs.list](/dataproc/reference/rest/v1/projects.regions.jobs/list) or [regions/{region}/jobs.get](/dataproc/reference/rest/v1/projects.regions.jobs/get). + /// Updates a job in a project. /// /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - [Required] The ID of the Google Cloud Platform project that the job belongs to. - /// * `region` - [Required] The Cloud Dataproc region in which to handle the request. - /// * `jobId` - [Required] The job ID. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the job belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. + /// * `jobId` - Required. The job ID. + pub fn regions_jobs_patch(&self, request: Job, project_id: &str, region: &str, job_id: &str) -> ProjectRegionJobPatchCall<'a, C, A> { + ProjectRegionJobPatchCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _region: region.to_string(), + _job_id: job_id.to_string(), + _update_mask: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Required. The ID of the Google Cloud Platform project that the job belongs to. + /// * `region` - Required. The Cloud Dataproc region in which to handle the request. + /// * `jobId` - Required. The job ID. pub fn regions_jobs_cancel(&self, request: CancelJobRequest, project_id: &str, region: &str, job_id: &str) -> ProjectRegionJobCancelCall<'a, C, A> { ProjectRegionJobCancelCall { hub: self.hub, @@ -1640,7 +1754,7 @@ impl<'a, C, A> ProjectRegionClusterGetCall<'a, C, A> where C: BorrowMut ProjectRegionClusterGetCall<'a, C, A> where C: BorrowMut ProjectRegionClusterGetCall<'a, C, A> where C: BorrowMut ProjectRegionClusterListCall<'a, C, A> where C: BorrowMut ProjectRegionClusterListCall<'a, C, A> where C: BorrowMut ProjectRegionClusterListCall<'a, C, A> where C: BorrowMut ProjectRegionClusterListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// [Optional] The standard List page size. + /// Optional. The standard List page size. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ProjectRegionClusterListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// [Optional] A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax: field:value [field:value] ... or field = value [AND [field = value]] ... where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, and `[KEY]` is a label key. **value** can be `*` to match all values. `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` contains the `DELETING` and `ERROR` states. `clusterName` is the name of the cluster provided at creation time. Only the logical `AND` operator is supported; space-separated items are treated as having an implicit `AND` operator. Example valid filters are: status.state:ACTIVE clusterName:mycluster labels.env:staging \ labels.starred:* and status.state = ACTIVE AND clusterName = mycluster \ AND labels.env = staging AND labels.starred = * + /// Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = * /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ProjectRegionClusterListCall<'a, C, A> { @@ -2217,7 +2331,7 @@ impl<'a, C, A> ProjectRegionJobListCall<'a, C, A> where C: BorrowMut ProjectRegionJobListCall<'a, C, A> where C: BorrowMut ProjectRegionJobListCall<'a, C, A> where C: BorrowMut ProjectRegionJobListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// [Optional] The number of results to return in each response. + /// Optional. The number of results to return in each response. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ProjectRegionJobListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// [Optional] Specifies enumerated categories of jobs to list (default = match ALL jobs). + /// Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs). /// /// Sets the *job state matcher* query property to the given value. pub fn job_state_matcher(mut self, new_value: &str) -> ProjectRegionJobListCall<'a, C, A> { self._job_state_matcher = Some(new_value.to_string()); self } - /// [Optional] A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax: field:value] ... or [field = value] AND [field [= value]] ... where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label key. **value** can be `*` to match all values. `status.state` can be either `ACTIVE` or `INACTIVE`. Only the logical `AND` operator is supported; space-separated items are treated as having an implicit `AND` operator. Example valid filters are: status.state:ACTIVE labels.env:staging labels.starred:* and status.state = ACTIVE AND labels.env = staging AND labels.starred = * + /// Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = * /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ProjectRegionJobListCall<'a, C, A> { self._filter = Some(new_value.to_string()); self } - /// [Optional] If set, the returned jobs list includes only jobs that were submitted to the named cluster. + /// Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster. /// /// Sets the *cluster name* query property to the given value. pub fn cluster_name(mut self, new_value: &str) -> ProjectRegionJobListCall<'a, C, A> { @@ -2543,7 +2657,7 @@ impl<'a, C, A> ProjectRegionClusterPatchCall<'a, C, A> where C: BorrowMut ProjectRegionClusterPatchCall<'a, C, A> where C: BorrowMut ProjectRegionClusterPatchCall<'a, C, A> where C: BorrowMut ProjectRegionClusterPatchCall<'a, C, A> where C: BorrowMutNote: Currently, only the following fields can be updated:
Mask Purpose
labels Update labels
config.worker_config.num_instances Resize primary worker group
config.secondary_worker_config.num_instances Resize secondary worker group
/// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> ProjectRegionClusterPatchCall<'a, C, A> { @@ -2815,7 +2945,7 @@ impl<'a, C, A> ProjectRegionJobGetCall<'a, C, A> where C: BorrowMut ProjectRegionJobGetCall<'a, C, A> where C: BorrowMut ProjectRegionJobGetCall<'a, C, A> where C: BorrowMut ProjectRegionJobGetCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDiagnoseCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDiagnoseCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDiagnoseCall<'a, C, A> where C: BorrowMut ProjectRegionJobSubmitCall<'a, C, A> where C: BorrowMut ProjectRegionJobSubmitCall<'a, C, A> where C: BorrowMut ProjectRegionClusterCreateCall<'a, C, A> where C: BorrowMut ProjectRegionClusterCreateCall<'a, C, A> where C: BorrowMut ProjectRegionClusterCreateCall<'a, C, A> where C: BorrowMut ProjectRegionJobDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionJobDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionJobDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionJobDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionOperationDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionOperationListCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Dataproc::new(hyper::Client::new(), 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 = Job::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.projects().regions_jobs_patch(req, "projectId", "region", "jobId") +/// .update_mask("consetetur") +/// .doit(); +/// # } +/// ``` +pub struct ProjectRegionJobPatchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Dataproc, + _request: Job, + _project_id: String, + _region: String, + _job_id: String, + _update_mask: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectRegionJobPatchCall<'a, C, A> {} + +impl<'a, C, A> ProjectRegionJobPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Job)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "dataproc.projects.regions.jobs.patch", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("region", self._region.to_string())); + params.push(("jobId", self._job_id.to_string())); + if let Some(value) = self._update_mask { + params.push(("updateMask", value.to_string())); + } + for &field in ["alt", "projectId", "region", "jobId", "updateMask"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://dataproc.googleapis.com/v1/projects/{projectId}/regions/{region}/jobs/{jobId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{region}", "region"), ("{jobId}", "jobId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["jobId", "region", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Job) -> ProjectRegionJobPatchCall<'a, C, A> { + self._request = new_value; + self + } + /// Required. The ID of the Google Cloud Platform project that the job belongs to. + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectRegionJobPatchCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// Required. The Cloud Dataproc region in which to handle the request. + /// + /// Sets the *region* 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 region(mut self, new_value: &str) -> ProjectRegionJobPatchCall<'a, C, A> { + self._region = new_value.to_string(); + self + } + /// Required. The job ID. + /// + /// Sets the *job id* 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 job_id(mut self, new_value: &str) -> ProjectRegionJobPatchCall<'a, C, A> { + self._job_id = new_value.to_string(); + self + } + /// Required. Specifies the path, relative to Job, of the field to update. For example, to update the labels of a Job the update_mask parameter would be specified as labels, and the PATCH request body would specify the new value. Note: Currently, labels is the only field that can be updated. + /// + /// Sets the *update mask* query property to the given value. + pub fn update_mask(mut self, new_value: &str) -> ProjectRegionJobPatchCall<'a, C, A> { + self._update_mask = 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. + /// + /// 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 Delegate) -> ProjectRegionJobPatchCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectRegionJobPatchCall<'a, C, A> + 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 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: T) -> ProjectRegionJobPatchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get. /// /// A builder for the *regions.jobs.cancel* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -5521,7 +5959,7 @@ impl<'a, C, A> ProjectRegionJobCancelCall<'a, C, A> where C: BorrowMut ProjectRegionJobCancelCall<'a, C, A> where C: BorrowMut ProjectRegionJobCancelCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Deployment Manager (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/deploymentmanager2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-deploymentmanager2] path = "../deploymentmanager2" -version = "1.0.4+20161209" +version = "1.0.4+20170501" diff --git a/gen/deploymentmanager2-cli/README.md b/gen/deploymentmanager2-cli/README.md index 45c2487a7f..1967ac9607 100644 --- a/gen/deploymentmanager2-cli/README.md +++ b/gen/deploymentmanager2-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Deployment Manager* API at revision *20161209*. The CLI is at version *1.0.4*. +This documentation was generated from the *Deployment Manager* API at revision *20170501*. The CLI is at version *1.0.4*. ```bash deploymentmanager2 [options] diff --git a/gen/deploymentmanager2-cli/mkdocs.yml b/gen/deploymentmanager2-cli/mkdocs.yml index 28656d2d5f..45fcad5908 100644 --- a/gen/deploymentmanager2-cli/mkdocs.yml +++ b/gen/deploymentmanager2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Deployment Manager v1.0.4+20161209 +site_name: Deployment Manager v1.0.4+20170501 site_url: http://byron.github.io/google-apis-rs/google-deploymentmanager2-cli site_description: A complete library to interact with Deployment Manager (protocol v2) diff --git a/gen/deploymentmanager2-cli/src/main.rs b/gen/deploymentmanager2-cli/src/main.rs index b273a5eef0..b214c43c07 100644 --- a/gen/deploymentmanager2-cli/src/main.rs +++ b/gen/deploymentmanager2-cli/src/main.rs @@ -315,6 +315,7 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.description" => Some(("update.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "update.manifest" => Some(("update.manifest", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "manifest" => Some(("manifest", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "insert-time" => Some(("insertTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -498,6 +499,7 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.description" => Some(("update.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "update.manifest" => Some(("update.manifest", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "manifest" => Some(("manifest", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "insert-time" => Some(("insertTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -879,6 +881,7 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.description" => Some(("update.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "update.manifest" => Some(("update.manifest", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "manifest" => Some(("manifest", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "insert-time" => Some(("insertTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2129,7 +2132,7 @@ fn main() { let mut app = App::new("deploymentmanager2") .author("Sebastian Thiel ") - .version("1.0.4+20161209") + .version("1.0.4+20170501") .about("Declares, configures, and deploys complex solutions on Google Cloud Platform.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_deploymentmanager2_cli") .arg(Arg::with_name("url") diff --git a/gen/deploymentmanager2/Cargo.toml b/gen/deploymentmanager2/Cargo.toml index 9b2bcc5162..9bd0a0f60a 100644 --- a/gen/deploymentmanager2/Cargo.toml +++ b/gen/deploymentmanager2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-deploymentmanager2" -version = "1.0.4+20161209" +version = "1.0.4+20170501" authors = ["Sebastian Thiel "] description = "A complete library to interact with Deployment Manager (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/deploymentmanager2" homepage = "https://cloud.google.com/deployment-manager/" -documentation = "https://docs.rs/google-deploymentmanager2/1.0.4+20161209" +documentation = "https://docs.rs/google-deploymentmanager2/1.0.4+20170501" license = "MIT" keywords = ["deploymentmanager", "google", "protocol", "web", "api"] diff --git a/gen/deploymentmanager2/README.md b/gen/deploymentmanager2/README.md index b007406d55..847961f5a4 100644 --- a/gen/deploymentmanager2/README.md +++ b/gen/deploymentmanager2/README.md @@ -5,24 +5,24 @@ DO NOT EDIT ! --> The `google-deploymentmanager2` library allows access to all features of the *Google Deployment Manager* service. -This documentation was generated from *Deployment Manager* crate version *1.0.4+20161209*, where *20161209* is the exact revision of the *deploymentmanager:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Deployment Manager* crate version *1.0.4+20170501*, where *20170501* is the exact revision of the *deploymentmanager:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Deployment Manager* *v2* API can be found at the [official documentation site](https://cloud.google.com/deployment-manager/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentManager.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentManager.html) ... -* [deployments](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.Deployment.html) - * [*cancel preview*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentCancelPreviewCall.html), [*delete*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentDeleteCall.html), [*get*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentGetCall.html), [*get iam policy*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentGetIamPolicyCall.html), [*insert*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentInsertCall.html), [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentListCall.html), [*patch*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentPatchCall.html), [*set iam policy*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentSetIamPolicyCall.html), [*stop*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentStopCall.html), [*test iam permissions*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentTestIamPermissionCall.html) and [*update*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentUpdateCall.html) -* [manifests](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.Manifest.html) - * [*get*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.ManifestGetCall.html) and [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.ManifestListCall.html) -* [operations](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.Operation.html) - * [*get*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.OperationGetCall.html) and [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.OperationListCall.html) -* [resources](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.ResourceType.html) - * [*get*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.ResourceGetCall.html) and [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.ResourceListCall.html) -* [types](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.Type.html) - * [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.TypeListCall.html) +* [deployments](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.Deployment.html) + * [*cancel preview*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentCancelPreviewCall.html), [*delete*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentDeleteCall.html), [*get*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentGetCall.html), [*get iam policy*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentGetIamPolicyCall.html), [*insert*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentInsertCall.html), [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentListCall.html), [*patch*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentPatchCall.html), [*set iam policy*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentSetIamPolicyCall.html), [*stop*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentStopCall.html), [*test iam permissions*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentTestIamPermissionCall.html) and [*update*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentUpdateCall.html) +* [manifests](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.Manifest.html) + * [*get*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.ManifestGetCall.html) and [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.ManifestListCall.html) +* [operations](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.Operation.html) + * [*get*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.OperationGetCall.html) and [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.OperationListCall.html) +* [resources](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.ResourceType.html) + * [*get*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.ResourceGetCall.html) and [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.ResourceListCall.html) +* [types](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.Type.html) + * [*list*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.TypeListCall.html) @@ -31,17 +31,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/struct.DeploymentManager.html)** +* **[Hub](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/struct.DeploymentManager.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.Part.html)** + * **[Parts](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -142,17 +142,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.Delegate.html), 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-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.ResponseResult.html), 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")`. @@ -162,29 +162,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.CallBuilder.html) 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-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.CallBuilder.html), 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-deploymentmanager2/1.0.4+20161209/google_deploymentmanager2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-deploymentmanager2/1.0.4+20170501/google_deploymentmanager2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/deploymentmanager2/src/lib.rs b/gen/deploymentmanager2/src/lib.rs index 7ccbee00e3..34f6b3adfc 100644 --- a/gen/deploymentmanager2/src/lib.rs +++ b/gen/deploymentmanager2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Deployment Manager* crate version *1.0.4+20161209*, where *20161209* is the exact revision of the *deploymentmanager:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Deployment Manager* crate version *1.0.4+20170501*, where *20170501* is the exact revision of the *deploymentmanager:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Deployment Manager* *v2* API can be found at the //! [official documentation site](https://cloud.google.com/deployment-manager/). @@ -389,13 +389,17 @@ impl<'a, C, A> DeploymentManager // ############ // SCHEMAS ### // ########## -/// Provides the configuration for a sub-type of logging. +/// Provides the configuration for logging a type of permissions. Example: +/// +/// { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] } +/// +/// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AuditLogConfig { - /// Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members. + /// Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][]. #[serde(rename="exemptedMembers")] pub exempted_members: Option>, /// The log type that this config enables. @@ -509,7 +513,7 @@ pub struct Operation { /// [Output Only] Reserved for future use. #[serde(rename="clientOperationId")] pub client_operation_id: Option, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Deprecated] This field is deprecated. #[serde(rename="creationTimestamp")] pub creation_timestamp: Option, /// [Output Only] The unique identifier for the resource. This identifier is defined by the server. @@ -704,6 +708,8 @@ impl ResponseResult for Manifest {} pub struct DeploymentUpdate { /// [Output Only] Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)? pub labels: Option>, + /// [Output Only] An optional user-provided description of the deployment after the current update has been applied. + pub description: Option, /// [Output Only] URL of the manifest representing the update configuration of this deployment. pub manifest: Option, } @@ -816,9 +822,7 @@ impl Part for ResourceUpdate {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Policy { - /// Specifies audit logging configs for "data access". "data access": generally refers to data reads/writes and admin reads. "admin activity": generally refers to admin writes. - /// - /// Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging. + /// Specifies cloud audit logging configuration for this policy. #[serde(rename="auditConfigs")] pub audit_configs: Option>, /// Version of the `Policy`. The default version is 0. @@ -1106,19 +1110,27 @@ impl NestedType for OperationError {} impl Part for OperationError {} -/// Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types. +/// Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. +/// +/// If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditConfig are exempted. +/// +/// Example Policy with multiple AuditConfigs: +/// +/// { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] } +/// +/// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AuditConfig { - /// Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members. + /// #[serde(rename="exemptedMembers")] pub exempted_members: Option>, - /// The configuration for each type of logging + /// The configuration for logging of each type of permission. #[serde(rename="auditLogConfigs")] pub audit_log_configs: Option>, - /// Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services. + /// Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. pub service: Option, } @@ -2374,7 +2386,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: self._order_by = Some(new_value.to_string()); self } - /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. + /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> OperationListCall<'a, C, A> { @@ -2681,7 +2693,7 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: self._order_by = Some(new_value.to_string()); self } - /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. + /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ManifestListCall<'a, C, A> { @@ -3235,7 +3247,7 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut self._order_by = Some(new_value.to_string()); self } - /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. + /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> TypeListCall<'a, C, A> { @@ -3801,7 +3813,7 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: self._order_by = Some(new_value.to_string()); self } - /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. + /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ResourceListCall<'a, C, A> { @@ -5738,7 +5750,7 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A self._order_by = Some(new_value.to_string()); self } - /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. + /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> DeploymentListCall<'a, C, A> { diff --git a/gen/deploymentmanager2_beta2-cli/Cargo.toml b/gen/deploymentmanager2_beta2-cli/Cargo.toml index dbe2e2e437..6c2d836f7c 100644 --- a/gen/deploymentmanager2_beta2-cli/Cargo.toml +++ b/gen/deploymentmanager2_beta2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/dfareporting2d1-cli/Cargo.toml b/gen/dfareporting2d1-cli/Cargo.toml index 3d046a357b..d97b942b85 100644 --- a/gen/dfareporting2d1-cli/Cargo.toml +++ b/gen/dfareporting2d1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/dfareporting2d2-cli/Cargo.toml b/gen/dfareporting2d2-cli/Cargo.toml index a7b5918e65..9242586d13 100644 --- a/gen/dfareporting2d2-cli/Cargo.toml +++ b/gen/dfareporting2d2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/dfareporting2d3-cli/Cargo.toml b/gen/dfareporting2d3-cli/Cargo.toml index da53f734fe..8958fb2ab2 100644 --- a/gen/dfareporting2d3-cli/Cargo.toml +++ b/gen/dfareporting2d3-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/dfareporting2d4-cli/Cargo.toml b/gen/dfareporting2d4-cli/Cargo.toml index 2c7aab06fe..b33f9c24f8 100644 --- a/gen/dfareporting2d4-cli/Cargo.toml +++ b/gen/dfareporting2d4-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/dfareporting2d5-cli/Cargo.toml b/gen/dfareporting2d5-cli/Cargo.toml index 3eb6291de3..71a49f3768 100644 --- a/gen/dfareporting2d5-cli/Cargo.toml +++ b/gen/dfareporting2d5-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d5-cli" -version = "1.0.4+20161027" +version = "1.0.4+20170428" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.5)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d5-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-dfareporting2d5] path = "../dfareporting2d5" -version = "1.0.4+20161027" +version = "1.0.4+20170428" diff --git a/gen/dfareporting2d5-cli/README.md b/gen/dfareporting2d5-cli/README.md index 1ed01ee898..41710118ef 100644 --- a/gen/dfareporting2d5-cli/README.md +++ b/gen/dfareporting2d5-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *dfareporting* API at revision *20161027*. The CLI is at version *1.0.4*. +This documentation was generated from the *dfareporting* API at revision *20170428*. The CLI is at version *1.0.4*. ```bash dfareporting2d5 [options] diff --git a/gen/dfareporting2d5-cli/mkdocs.yml b/gen/dfareporting2d5-cli/mkdocs.yml index db541edd4b..b1bc8d3202 100644 --- a/gen/dfareporting2d5-cli/mkdocs.yml +++ b/gen/dfareporting2d5-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dfareporting v1.0.4+20161027 +site_name: dfareporting v1.0.4+20170428 site_url: http://byron.github.io/google-apis-rs/google-dfareporting2d5-cli site_description: A complete library to interact with dfareporting (protocol v2.5) diff --git a/gen/dfareporting2d5-cli/src/main.rs b/gen/dfareporting2d5-cli/src/main.rs index 34d0339ed1..a1fff9fae0 100644 --- a/gen/dfareporting2d5-cli/src/main.rs +++ b/gen/dfareporting2d5-cli/src/main.rs @@ -22705,7 +22705,7 @@ fn main() { let mut app = App::new("dfareporting2d5") .author("Sebastian Thiel ") - .version("1.0.4+20161027") + .version("1.0.4+20170428") .about("Manages your DoubleClick Campaign Manager ad campaigns and reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dfareporting2d5_cli") .arg(Arg::with_name("url") diff --git a/gen/dfareporting2d5/Cargo.toml b/gen/dfareporting2d5/Cargo.toml index 0dd8e5016c..e3ac32c29b 100644 --- a/gen/dfareporting2d5/Cargo.toml +++ b/gen/dfareporting2d5/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-dfareporting2d5" -version = "1.0.4+20161027" +version = "1.0.4+20170428" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.5)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d5" homepage = "https://developers.google.com/doubleclick-advertisers/reporting/" -documentation = "https://docs.rs/google-dfareporting2d5/1.0.4+20161027" +documentation = "https://docs.rs/google-dfareporting2d5/1.0.4+20170428" license = "MIT" keywords = ["dfareporting", "google", "protocol", "web", "api"] diff --git a/gen/dfareporting2d5/README.md b/gen/dfareporting2d5/README.md index 1636478f22..cf4a2caf0e 100644 --- a/gen/dfareporting2d5/README.md +++ b/gen/dfareporting2d5/README.md @@ -5,138 +5,138 @@ DO NOT EDIT ! --> The `google-dfareporting2d5` library allows access to all features of the *Google dfareporting* service. -This documentation was generated from *dfareporting* crate version *1.0.4+20161027*, where *20161027* is the exact revision of the *dfareporting:v2.5* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *dfareporting* crate version *1.0.4+20170428*, where *20170428* is the exact revision of the *dfareporting:v2.5* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *dfareporting* *v2d5* API can be found at the [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Dfareporting.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Dfareporting.html) ... -* [account active ad summaries](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountActiveAdSummary.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountActiveAdSummaryGetCall.html) -* [account permission groups](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountPermissionGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountPermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountPermissionGroupListCall.html) -* [account permissions](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountPermission.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountPermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountPermissionListCall.html) -* [account user profiles](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountUserProfile.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountUserProfileGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountUserProfileInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountUserProfileListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountUserProfilePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountUserProfileUpdateCall.html) -* [accounts](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Account.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountGetCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AccountUpdateCall.html) -* [ads](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Ad.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdUpdateCall.html) -* [advertiser groups](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserGroup.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserGroupDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserGroupUpdateCall.html) -* [advertisers](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Advertiser.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.AdvertiserUpdateCall.html) -* [browsers](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Browser.html) - * [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.BrowserListCall.html) -* [campaign creative associations](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CampaignCreativeAssociation.html) - * [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CampaignCreativeAssociationInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CampaignCreativeAssociationListCall.html) -* [campaigns](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Campaign.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CampaignGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CampaignInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CampaignListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CampaignPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CampaignUpdateCall.html) -* [change logs](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ChangeLog.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ChangeLogGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ChangeLogListCall.html) -* [cities](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.City.html) - * [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CityListCall.html) -* [connection types](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ConnectionType.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ConnectionTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ConnectionTypeListCall.html) -* [content categories](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ContentCategory.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ContentCategoryDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ContentCategoryGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ContentCategoryInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ContentCategoryListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ContentCategoryPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ContentCategoryUpdateCall.html) -* [conversions](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Conversion.html) - * [*batchinsert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ConversionBatchinsertCall.html) -* [countries](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Country.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CountryGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CountryListCall.html) -* [creative assets](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeAsset.html) - * [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeAssetInsertCall.html) -* [creative field values](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldValue.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldValueDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldValueGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldValueInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldValueListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldValuePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldValueUpdateCall.html) -* [creative fields](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeField.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeFieldUpdateCall.html) -* [creative groups](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeGroupUpdateCall.html) -* [creatives](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Creative.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeUpdateCall.html) -* [dimension values](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DimensionValue.html) - * [*query*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DimensionValueQueryCall.html) -* [directory site contacts](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DirectorySiteContact.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DirectorySiteContactGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DirectorySiteContactListCall.html) -* [directory sites](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DirectorySite.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DirectorySiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DirectorySiteInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DirectorySiteListCall.html) -* [dynamic targeting keys](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DynamicTargetingKey.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DynamicTargetingKeyDeleteCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DynamicTargetingKeyInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.DynamicTargetingKeyListCall.html) -* [event tags](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.EventTag.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.EventTagDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.EventTagGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.EventTagInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.EventTagListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.EventTagPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.EventTagUpdateCall.html) -* [files](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.File.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FileListCall.html) -* [floodlight activities](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivity.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityDeleteCall.html), [*generatetag*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityUpdateCall.html) -* [floodlight activity groups](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightActivityGroupUpdateCall.html) -* [floodlight configurations](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightConfiguration.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightConfigurationGetCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightConfigurationListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightConfigurationPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FloodlightConfigurationUpdateCall.html) -* [inventory items](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.InventoryItem.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.InventoryItemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.InventoryItemListCall.html) -* [landing pages](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.LandingPage.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.LandingPageDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.LandingPageGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.LandingPageInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.LandingPageListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.LandingPagePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.LandingPageUpdateCall.html) -* [metros](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Metro.html) - * [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.MetroListCall.html) -* [mobile carriers](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.MobileCarrier.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.MobileCarrierGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.MobileCarrierListCall.html) -* [operating system versions](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OperatingSystemVersion.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OperatingSystemVersionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OperatingSystemVersionListCall.html) -* [operating systems](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OperatingSystem.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OperatingSystemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OperatingSystemListCall.html) -* [order documents](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OrderDocument.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OrderDocumentGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OrderDocumentListCall.html) -* [orders](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Order.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OrderGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.OrderListCall.html) -* [placement groups](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementGroupUpdateCall.html) -* [placement strategies](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementStrategy.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementStrategyDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementStrategyGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementStrategyInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementStrategyListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementStrategyPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementStrategyUpdateCall.html) -* [placements](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Placement.html) - * [*generatetags*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlacementUpdateCall.html) -* [platform types](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlatformType.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlatformTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PlatformTypeListCall.html) -* [postal codes](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PostalCode.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PostalCodeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.PostalCodeListCall.html) -* [projects](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Project.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ProjectGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ProjectListCall.html) -* [regions](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Region.html) - * [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RegionListCall.html) -* [remarketing list shares](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingListShare.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingListShareGetCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingListSharePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingListShareUpdateCall.html) -* [remarketing lists](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingList.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingListGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingListInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingListListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingListPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.RemarketingListUpdateCall.html) -* [reports](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Report.html) - * [*compatible fields query*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportCompatibleFieldQueryCall.html), [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportDeleteCall.html), [*files get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportFileGetCall.html), [*files list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportFileListCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportPatchCall.html), [*run*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportRunCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportUpdateCall.html) -* [sites](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Site.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SiteInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SiteListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SitePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SiteUpdateCall.html) -* [sizes](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Size.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SizeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SizeInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SizeListCall.html) -* [subaccounts](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Subaccount.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SubaccountGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SubaccountInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SubaccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SubaccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.SubaccountUpdateCall.html) -* [targetable remarketing lists](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.TargetableRemarketingList.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.TargetableRemarketingListGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.TargetableRemarketingListListCall.html) -* [user profiles](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserProfile.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserProfileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserProfileListCall.html) -* [user role permission groups](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRolePermissionGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRolePermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRolePermissionGroupListCall.html) -* [user role permissions](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRolePermission.html) - * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRolePermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRolePermissionListCall.html) -* [user roles](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRole.html) - * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRoleDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRoleGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRoleInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRoleListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRolePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.UserRoleUpdateCall.html) +* [account active ad summaries](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountActiveAdSummary.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountActiveAdSummaryGetCall.html) +* [account permission groups](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountPermissionGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountPermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountPermissionGroupListCall.html) +* [account permissions](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountPermission.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountPermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountPermissionListCall.html) +* [account user profiles](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountUserProfile.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountUserProfileGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountUserProfileInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountUserProfileListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountUserProfilePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountUserProfileUpdateCall.html) +* [accounts](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Account.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountGetCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AccountUpdateCall.html) +* [ads](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Ad.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdUpdateCall.html) +* [advertiser groups](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserGroup.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserGroupDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserGroupUpdateCall.html) +* [advertisers](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Advertiser.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.AdvertiserUpdateCall.html) +* [browsers](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Browser.html) + * [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.BrowserListCall.html) +* [campaign creative associations](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CampaignCreativeAssociation.html) + * [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CampaignCreativeAssociationInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CampaignCreativeAssociationListCall.html) +* [campaigns](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Campaign.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CampaignGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CampaignInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CampaignListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CampaignPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CampaignUpdateCall.html) +* [change logs](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ChangeLog.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ChangeLogGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ChangeLogListCall.html) +* [cities](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.City.html) + * [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CityListCall.html) +* [connection types](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ConnectionType.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ConnectionTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ConnectionTypeListCall.html) +* [content categories](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ContentCategory.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ContentCategoryDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ContentCategoryGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ContentCategoryInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ContentCategoryListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ContentCategoryPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ContentCategoryUpdateCall.html) +* [conversions](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Conversion.html) + * [*batchinsert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ConversionBatchinsertCall.html) +* [countries](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Country.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CountryGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CountryListCall.html) +* [creative assets](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeAsset.html) + * [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeAssetInsertCall.html) +* [creative field values](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldValue.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldValueDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldValueGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldValueInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldValueListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldValuePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldValueUpdateCall.html) +* [creative fields](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeField.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeFieldUpdateCall.html) +* [creative groups](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeGroupUpdateCall.html) +* [creatives](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Creative.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeUpdateCall.html) +* [dimension values](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DimensionValue.html) + * [*query*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DimensionValueQueryCall.html) +* [directory site contacts](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DirectorySiteContact.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DirectorySiteContactGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DirectorySiteContactListCall.html) +* [directory sites](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DirectorySite.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DirectorySiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DirectorySiteInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DirectorySiteListCall.html) +* [dynamic targeting keys](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DynamicTargetingKey.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DynamicTargetingKeyDeleteCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DynamicTargetingKeyInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.DynamicTargetingKeyListCall.html) +* [event tags](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.EventTag.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.EventTagDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.EventTagGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.EventTagInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.EventTagListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.EventTagPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.EventTagUpdateCall.html) +* [files](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.File.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FileListCall.html) +* [floodlight activities](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivity.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityDeleteCall.html), [*generatetag*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityUpdateCall.html) +* [floodlight activity groups](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightActivityGroupUpdateCall.html) +* [floodlight configurations](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightConfiguration.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightConfigurationGetCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightConfigurationListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightConfigurationPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FloodlightConfigurationUpdateCall.html) +* [inventory items](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.InventoryItem.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.InventoryItemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.InventoryItemListCall.html) +* [landing pages](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.LandingPage.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.LandingPageDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.LandingPageGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.LandingPageInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.LandingPageListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.LandingPagePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.LandingPageUpdateCall.html) +* [metros](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Metro.html) + * [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.MetroListCall.html) +* [mobile carriers](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.MobileCarrier.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.MobileCarrierGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.MobileCarrierListCall.html) +* [operating system versions](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OperatingSystemVersion.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OperatingSystemVersionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OperatingSystemVersionListCall.html) +* [operating systems](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OperatingSystem.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OperatingSystemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OperatingSystemListCall.html) +* [order documents](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OrderDocument.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OrderDocumentGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OrderDocumentListCall.html) +* [orders](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Order.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OrderGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.OrderListCall.html) +* [placement groups](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementGroupUpdateCall.html) +* [placement strategies](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementStrategy.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementStrategyDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementStrategyGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementStrategyInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementStrategyListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementStrategyPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementStrategyUpdateCall.html) +* [placements](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Placement.html) + * [*generatetags*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlacementUpdateCall.html) +* [platform types](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlatformType.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlatformTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PlatformTypeListCall.html) +* [postal codes](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PostalCode.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PostalCodeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.PostalCodeListCall.html) +* [projects](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Project.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ProjectGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ProjectListCall.html) +* [regions](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Region.html) + * [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RegionListCall.html) +* [remarketing list shares](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingListShare.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingListShareGetCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingListSharePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingListShareUpdateCall.html) +* [remarketing lists](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingList.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingListGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingListInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingListListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingListPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.RemarketingListUpdateCall.html) +* [reports](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Report.html) + * [*compatible fields query*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportCompatibleFieldQueryCall.html), [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportDeleteCall.html), [*files get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportFileGetCall.html), [*files list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportFileListCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportPatchCall.html), [*run*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportRunCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportUpdateCall.html) +* [sites](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Site.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SiteInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SiteListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SitePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SiteUpdateCall.html) +* [sizes](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Size.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SizeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SizeInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SizeListCall.html) +* [subaccounts](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Subaccount.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SubaccountGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SubaccountInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SubaccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SubaccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.SubaccountUpdateCall.html) +* [targetable remarketing lists](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.TargetableRemarketingList.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.TargetableRemarketingListGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.TargetableRemarketingListListCall.html) +* [user profiles](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserProfile.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserProfileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserProfileListCall.html) +* [user role permission groups](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRolePermissionGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRolePermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRolePermissionGroupListCall.html) +* [user role permissions](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRolePermission.html) + * [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRolePermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRolePermissionListCall.html) +* [user roles](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRole.html) + * [*delete*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRoleDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRoleGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRoleInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRoleListCall.html), [*patch*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRolePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.UserRoleUpdateCall.html) Upload supported by ... -* [*insert creative assets*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.CreativeAssetInsertCall.html) +* [*insert creative assets*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.CreativeAssetInsertCall.html) Download supported by ... -* [*get files*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.FileGetCall.html) -* [*files get reports*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.ReportFileGetCall.html) +* [*get files*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.FileGetCall.html) +* [*files get reports*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.ReportFileGetCall.html) @@ -144,17 +144,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/struct.Dfareporting.html)** +* **[Hub](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/struct.Dfareporting.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.Part.html)** + * **[Parts](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -250,17 +250,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.Delegate.html), 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-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.ResponseResult.html), 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")`. @@ -270,29 +270,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.CallBuilder.html) 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-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.RequestValue.html) and -[decodable](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.RequestValue.html) and +[decodable](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.CallBuilder.html), 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-dfareporting2d5/1.0.4+20161027/google_dfareporting2d5/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-dfareporting2d5/1.0.4+20170428/google_dfareporting2d5/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/dfareporting2d5/src/lib.rs b/gen/dfareporting2d5/src/lib.rs index b5f6702a92..ea5bb7af78 100644 --- a/gen/dfareporting2d5/src/lib.rs +++ b/gen/dfareporting2d5/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dfareporting* crate version *1.0.4+20161027*, where *20161027* is the exact revision of the *dfareporting:v2.5* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *dfareporting* crate version *1.0.4+20170428*, where *20170428* is the exact revision of the *dfareporting:v2.5* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *dfareporting* *v2d5* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). @@ -1019,10 +1019,10 @@ impl ResponseResult for AccountActiveAdSummary {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LookbackConfiguration { - /// Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. + /// Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive. #[serde(rename="clickDuration")] pub click_duration: Option, - /// Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. + /// Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive. #[serde(rename="postImpressionActivitiesDuration")] pub post_impression_activities_duration: Option, } @@ -1368,7 +1368,7 @@ impl Part for ListPopulationRule {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { - /// File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 and 10240. + /// File size limit in kilobytes of Rich Media teaser creatives. Acceptable values are 1 to 10240, inclusive. #[serde(rename="teaserSizeLimit")] pub teaser_size_limit: Option, /// Whether to serve creatives with Active View tags. If disabled, viewability data will not be available for any impressions. @@ -1415,7 +1415,7 @@ pub struct Account { pub country_id: Option, /// Name of this account. This is a required field, and must be less than 128 characters long and be globally unique. pub name: Option, - /// Maximum image size allowed for this account. + /// Maximum image size allowed for this account, in kilobytes. Value must be greater than or equal to 1. #[serde(rename="maximumImageSize")] pub maximum_image_size: Option, /// Whether campaigns created in this account will be enabled for Nielsen OCR reach ratings by default. @@ -1475,7 +1475,8 @@ pub struct Account { /// - "45" for RUB /// - "46" for AED /// - "47" for BGN - /// - "48" for HRK + /// - "48" for HRK + /// - "49" for MXN #[serde(rename="currencyId")] pub currency_id: Option, /// Reporting configuration of this account. @@ -1509,7 +1510,7 @@ pub struct DayPartTargeting { /// - "SATURDAY" #[serde(rename="daysOfWeek")] pub days_of_week: Option>, - /// Hours of the day when the ad will serve. Must be an integer between 0 and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example, if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. + /// Hours of the day when the ad will serve, where 0 is midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive. #[serde(rename="hoursOfDay")] pub hours_of_day: Option>, /// Whether or not to use the user's local time. If false, the America/New York time zone applies. @@ -1759,7 +1760,7 @@ impl ResponseResult for FloodlightActivityGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AudienceSegment { - /// Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. + /// Weight allocated to this segment. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. Acceptable values are 1 to 1000, inclusive. pub allocation: Option, /// ID of this audience segment. This is a read-only, auto-generated field. pub id: Option, @@ -2076,6 +2077,8 @@ pub struct Placement { /// - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT" /// - "PLACEMENT_TAG_CLICK_COMMANDS" /// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH" + /// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3" + /// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4" /// - "PLACEMENT_TAG_TRACKING" /// - "PLACEMENT_TAG_TRACKING_IFRAME" /// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT" @@ -2234,7 +2237,7 @@ pub struct OptimizationActivity { /// Dimension value for the ID of the floodlight activity. This is a read-only, auto-generated field. #[serde(rename="floodlightActivityIdDimensionValue")] pub floodlight_activity_id_dimension_value: Option, - /// Weight associated with this optimization. Must be greater than 1. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. + /// Weight associated with this optimization. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. Value must be greater than or equal to 1. pub weight: Option, } @@ -2327,9 +2330,9 @@ impl Part for CompanionClickThroughOverride {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FrequencyCap { - /// Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days in seconds, or 7,776,000. + /// Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days. Acceptable values are 1 to 7776000, inclusive. pub duration: Option, - /// Number of times an individual user can be served the ad within the specified duration. The maximum allowed is 15. + /// Number of times an individual user can be served the ad within the specified duration. Acceptable values are 1 to 15, inclusive. pub impressions: Option, } @@ -2597,15 +2600,16 @@ impl Part for DirectorySiteContactAssignment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeAssignment { - /// Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. + /// Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater than or equal to 1. pub weight: Option, - /// Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. + /// Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable values are 1 to 65535, inclusive. pub sequence: Option, /// Click-through URL of the creative assignment. #[serde(rename="clickThroughUrl")] pub click_through_url: Option, /// Rich media exit overrides for this creative assignment. /// Applicable when the creative type is any of the following: + /// - DISPLAY /// - RICH_MEDIA_INPAGE /// - RICH_MEDIA_INPAGE_FLOATING /// - RICH_MEDIA_IM_EXPAND @@ -2614,7 +2618,6 @@ pub struct CreativeAssignment { /// - RICH_MEDIA_MOBILE_IN_APP /// - RICH_MEDIA_MULTI_FLOATING /// - RICH_MEDIA_PEEL_DOWN - /// - ADVANCED_BANNER /// - VPAID_LINEAR /// - VPAID_NON_LINEAR #[serde(rename="richMediaExitOverrides")] @@ -2988,7 +2991,7 @@ pub struct CreativeAsset { /// List of feature dependencies for the creative asset that are detected by DCM. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative correctly. This is a read-only, auto-generated field. Applicable to the following creative types: HTML5_BANNER. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. #[serde(rename="detectedFeatures")] pub detected_features: Option>, - /// Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. + /// Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1. pub duration: Option, /// Offset top unit for an asset. This is a read-only field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following creative types: all RICH_MEDIA. #[serde(rename="positionTopUnit")] @@ -3058,7 +3061,7 @@ pub struct CreativeAsset { /// Streaming URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(rename="streamingServingUrl")] pub streaming_serving_url: Option, - /// zIndex value of an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. + /// zIndex value of an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable values are -999999999 to 999999999, inclusive. #[serde(rename="zIndex")] pub z_index: Option, /// Rich media child asset type. This is a read-only field. Applicable to the following creative types: all VPAID. @@ -3070,7 +3073,7 @@ pub struct CreativeAsset { /// Whether ActionScript3 is enabled for the flash asset. This is a read-only field. Applicable to the following creative type: FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. #[serde(rename="actionScript3")] pub action_script3: Option, - /// Pushdown duration in seconds for an asset. Must be between 0 and 9.99. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. + /// Pushdown duration in seconds for an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. Acceptable values are 0 to 9.99, inclusive. #[serde(rename="pushdownDuration")] pub pushdown_duration: Option, /// Identifier of this asset. This is the same identifier returned during creative asset insert operation. This is a required field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. @@ -3083,7 +3086,7 @@ pub struct CreativeAsset { pub ssl_compliant: Option, /// Offset position for an asset. Applicable to the following creative types: all RICH_MEDIA. pub position: Option, - /// Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. + /// Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. Value must be greater than or equal to 0. #[serde(rename="customStartTimeValue")] pub custom_start_time_value: Option, /// File name of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. @@ -3328,14 +3331,14 @@ impl Part for OrderContact {} pub struct DirectorySite { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite". pub kind: Option, - /// Country ID of this directory site. + /// Country ID of this directory site. This is a read-only field. #[serde(rename="countryId")] pub country_id: Option, - /// Description of this directory site. + /// Description of this directory site. This is a read-only field. pub description: Option, /// Directory site settings. pub settings: Option, - /// Currency ID of this directory site. + /// Currency ID of this directory site. This is a read-only field. /// Possible values are: /// - "1" for USD /// - "2" for GBP @@ -3383,7 +3386,8 @@ pub struct DirectorySite { /// - "45" for RUB /// - "46" for AED /// - "47" for BGN - /// - "48" for HRK + /// - "48" for HRK + /// - "49" for MXN #[serde(rename="currencyId")] pub currency_id: Option, /// Tag types for regular placements. @@ -3469,10 +3473,7 @@ pub struct CreativeGroup { pub subaccount_id: Option, /// Name of this creative group. This is a required field and must be less than 256 characters long and unique among creative groups of the same advertiser. pub name: Option, - /// Subgroup of the creative group. Assign your creative groups to one of the following subgroups in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. - /// Acceptable values are: - /// - 1 - /// - 2 + /// Subgroup of the creative group. Assign your creative groups to a subgroup in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. Acceptable values are 1 to 2, inclusive. #[serde(rename="groupNumber")] pub group_number: Option, /// Advertiser ID of this creative group. This is a required field on insertion. @@ -4316,7 +4317,7 @@ pub struct DeliverySchedule { /// Limit on the number of times an individual user can be served the ad within a specified period of time. #[serde(rename="frequencyCap")] pub frequency_cap: Option, - /// Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Must be between 1 and 10. + /// Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Acceptable values are 1 to 10, inclusive. #[serde(rename="impressionRatio")] pub impression_ratio: Option, } @@ -4621,10 +4622,10 @@ pub struct TagData { /// Tag string for serving an ad. #[serde(rename="impressionTag")] pub impression_tag: Option, - /// Creative associated with this placement tag. + /// Creative associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING. #[serde(rename="creativeId")] pub creative_id: Option, - /// Ad associated with this placement tag. + /// Ad associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING. #[serde(rename="adId")] pub ad_id: Option, /// TagData tag format of this tag. @@ -4787,7 +4788,7 @@ pub struct RemarketingList { /// Number of users currently in the list. This is a read-only field. #[serde(rename="listSize")] pub list_size: Option, - /// Number of days that a user should remain in the remarketing list without an impression. + /// Number of days that a user should remain in the remarketing list without an impression. Acceptable values are 1 to 540, inclusive. #[serde(rename="lifeSpan")] pub life_span: Option, /// Dimension value for the advertiser ID that owns this remarketing list. This is a required field. @@ -4843,7 +4844,7 @@ pub struct FloodlightActivity { /// Advertiser ID of this floodlight activity. If this field is left blank, the value will be copied over either from the activity group's advertiser or the existing activity's advertiser. #[serde(rename="advertiserId")] pub advertiser_id: Option, - /// Code type used for cache busting in the generated tag. + /// Code type used for cache busting in the generated tag. Applicable only when floodlightActivityGroupType is COUNTER and countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING. #[serde(rename="cacheBustingType")] pub cache_busting_type: Option, /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. @@ -5343,11 +5344,11 @@ impl ResponseResult for LandingPage {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Size { - /// Width of this size. + /// Width of this size. Acceptable values are 0 to 32767, inclusive. pub width: Option, /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#size". pub kind: Option, - /// Height of this size. + /// Height of this size. Acceptable values are 0 to 32767, inclusive. pub height: Option, /// ID of this size. This is a read-only, auto-generated field. pub id: Option, @@ -6180,7 +6181,7 @@ impl Part for ReportFloodlightCriteriaReportProperties {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ConversionsBatchInsertResponse { - /// The status of each conversion's insertion status. The status is returned in the same order that conversions are inserted. + /// The insert status of each conversion. Statuses are returned in the same order that conversions are inserted. pub status: Option>, /// Indicates that some or all conversions failed to insert. #[serde(rename="hasFailures")] @@ -6676,12 +6677,12 @@ impl ResponseResult for Ad {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PricingSchedulePricingPeriod { - /// Units of this pricing period. + /// Units of this pricing period. Acceptable values are 0 to 10000000000, inclusive. pub units: Option, /// Pricing period start date. This date must be later than, or the same day as, the placement start date. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. #[serde(rename="startDate")] pub start_date: Option, - /// Rate or cost of this pricing period. + /// Rate or cost of this pricing period in nanos (i.e., multipled by 1000000000). Acceptable values are 0 to 1000000000000000000, inclusive. #[serde(rename="rateOrCostNanos")] pub rate_or_cost_nanos: Option, /// Pricing period end date. This date must be later than, or the same day as, the pricing period start date, but not later than the placement end date. The period end date can be the same date as the period start date. If, for example, you set 6/25/2015 as both the start and end dates, the effective pricing period date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. @@ -16378,7 +16379,7 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> { @@ -16961,7 +16962,7 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { @@ -19616,7 +19617,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: self._subaccount_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { @@ -22680,7 +22681,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< self._campaign_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, A> { @@ -27662,7 +27663,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A self._status = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { @@ -29352,7 +29353,7 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> { @@ -30462,7 +30463,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau self._project_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> OrderListCall<'a, C, A> { @@ -31293,7 +31294,7 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> { @@ -32722,7 +32723,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 self._ssl_compliant = Some(new_value); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AdListCall<'a, C, A> { @@ -34869,7 +34870,7 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> { @@ -36801,7 +36802,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut self._subaccount_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> SiteListCall<'a, C, A> { @@ -37997,7 +37998,7 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> { @@ -40669,7 +40670,7 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { @@ -41282,7 +41283,7 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> { @@ -42648,7 +42649,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> SubaccountListCall<'a, C, A> { @@ -45852,7 +45853,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupListCall<'a, C, A> { @@ -47355,7 +47356,7 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut self._type_ = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> InventoryItemListCall<'a, C, A> { @@ -48919,7 +48920,7 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> { @@ -51376,7 +51377,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: self._studio_creative_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { @@ -53153,7 +53154,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: self._subaccount_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { @@ -53766,7 +53767,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { @@ -55690,7 +55691,7 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> { @@ -57355,7 +57356,7 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> { @@ -58452,7 +58453,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ProjectListCall<'a, C, A> { @@ -59318,7 +59319,7 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { @@ -62077,7 +62078,7 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> { @@ -63957,7 +63958,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut self._project_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> OrderDocumentListCall<'a, C, A> { @@ -65259,7 +65260,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AccountListCall<'a, C, A> { @@ -66498,7 +66499,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { diff --git a/gen/dfareporting2d6-cli/Cargo.toml b/gen/dfareporting2d6-cli/Cargo.toml index 898c7c608f..db2ed10aa0 100644 --- a/gen/dfareporting2d6-cli/Cargo.toml +++ b/gen/dfareporting2d6-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d6-cli" -version = "1.0.4+20161027" +version = "1.0.4+20170428" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.6)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d6-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-dfareporting2d6] path = "../dfareporting2d6" -version = "1.0.4+20161027" +version = "1.0.4+20170428" diff --git a/gen/dfareporting2d6-cli/README.md b/gen/dfareporting2d6-cli/README.md index 126f80bb41..9647fad993 100644 --- a/gen/dfareporting2d6-cli/README.md +++ b/gen/dfareporting2d6-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *dfareporting* API at revision *20161027*. The CLI is at version *1.0.4*. +This documentation was generated from the *dfareporting* API at revision *20170428*. The CLI is at version *1.0.4*. ```bash dfareporting2d6 [options] diff --git a/gen/dfareporting2d6-cli/mkdocs.yml b/gen/dfareporting2d6-cli/mkdocs.yml index 00c0829a33..0ad8085cb3 100644 --- a/gen/dfareporting2d6-cli/mkdocs.yml +++ b/gen/dfareporting2d6-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dfareporting v1.0.4+20161027 +site_name: dfareporting v1.0.4+20170428 site_url: http://byron.github.io/google-apis-rs/google-dfareporting2d6-cli site_description: A complete library to interact with dfareporting (protocol v2.6) diff --git a/gen/dfareporting2d6-cli/src/main.rs b/gen/dfareporting2d6-cli/src/main.rs index c8a2333636..775e5a5f59 100644 --- a/gen/dfareporting2d6-cli/src/main.rs +++ b/gen/dfareporting2d6-cli/src/main.rs @@ -23404,7 +23404,7 @@ fn main() { let mut app = App::new("dfareporting2d6") .author("Sebastian Thiel ") - .version("1.0.4+20161027") + .version("1.0.4+20170428") .about("Manages your DoubleClick Campaign Manager ad campaigns and reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dfareporting2d6_cli") .arg(Arg::with_name("url") diff --git a/gen/dfareporting2d6/Cargo.toml b/gen/dfareporting2d6/Cargo.toml index c120ea4da2..3c291240bc 100644 --- a/gen/dfareporting2d6/Cargo.toml +++ b/gen/dfareporting2d6/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-dfareporting2d6" -version = "1.0.4+20161027" +version = "1.0.4+20170428" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.6)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d6" homepage = "https://developers.google.com/doubleclick-advertisers/" -documentation = "https://docs.rs/google-dfareporting2d6/1.0.4+20161027" +documentation = "https://docs.rs/google-dfareporting2d6/1.0.4+20170428" license = "MIT" keywords = ["dfareporting", "google", "protocol", "web", "api"] diff --git a/gen/dfareporting2d6/README.md b/gen/dfareporting2d6/README.md index 2881091934..0a8242945e 100644 --- a/gen/dfareporting2d6/README.md +++ b/gen/dfareporting2d6/README.md @@ -5,142 +5,142 @@ DO NOT EDIT ! --> The `google-dfareporting2d6` library allows access to all features of the *Google dfareporting* service. -This documentation was generated from *dfareporting* crate version *1.0.4+20161027*, where *20161027* is the exact revision of the *dfareporting:v2.6* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *dfareporting* crate version *1.0.4+20170428*, where *20170428* is the exact revision of the *dfareporting:v2.6* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *dfareporting* *v2d6* API can be found at the [official documentation site](https://developers.google.com/doubleclick-advertisers/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Dfareporting.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Dfareporting.html) ... -* [account active ad summaries](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountActiveAdSummary.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountActiveAdSummaryGetCall.html) -* [account permission groups](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountPermissionGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountPermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountPermissionGroupListCall.html) -* [account permissions](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountPermission.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountPermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountPermissionListCall.html) -* [account user profiles](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountUserProfile.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountUserProfileGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountUserProfileInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountUserProfileListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountUserProfilePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountUserProfileUpdateCall.html) -* [accounts](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Account.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountGetCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AccountUpdateCall.html) -* [ads](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Ad.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdUpdateCall.html) -* [advertiser groups](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserGroup.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserGroupDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserGroupUpdateCall.html) -* [advertisers](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Advertiser.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.AdvertiserUpdateCall.html) -* [browsers](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Browser.html) - * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.BrowserListCall.html) -* [campaign creative associations](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CampaignCreativeAssociation.html) - * [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CampaignCreativeAssociationInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CampaignCreativeAssociationListCall.html) -* [campaigns](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Campaign.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CampaignGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CampaignInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CampaignListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CampaignPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CampaignUpdateCall.html) -* [change logs](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ChangeLog.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ChangeLogGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ChangeLogListCall.html) -* [cities](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.City.html) - * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CityListCall.html) -* [connection types](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ConnectionType.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ConnectionTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ConnectionTypeListCall.html) -* [content categories](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ContentCategory.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ContentCategoryDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ContentCategoryGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ContentCategoryInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ContentCategoryListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ContentCategoryPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ContentCategoryUpdateCall.html) -* [conversions](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Conversion.html) - * [*batchinsert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ConversionBatchinsertCall.html) -* [countries](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Country.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CountryGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CountryListCall.html) -* [creative assets](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeAsset.html) - * [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeAssetInsertCall.html) -* [creative field values](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldValue.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldValueDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldValueGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldValueInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldValueListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldValuePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldValueUpdateCall.html) -* [creative fields](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeField.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeFieldUpdateCall.html) -* [creative groups](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeGroupUpdateCall.html) -* [creatives](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Creative.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeUpdateCall.html) -* [dimension values](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DimensionValue.html) - * [*query*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DimensionValueQueryCall.html) -* [directory site contacts](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DirectorySiteContact.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DirectorySiteContactGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DirectorySiteContactListCall.html) -* [directory sites](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DirectorySite.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DirectorySiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DirectorySiteInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DirectorySiteListCall.html) -* [dynamic targeting keys](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DynamicTargetingKey.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DynamicTargetingKeyDeleteCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DynamicTargetingKeyInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.DynamicTargetingKeyListCall.html) -* [event tags](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.EventTag.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.EventTagDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.EventTagGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.EventTagInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.EventTagListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.EventTagPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.EventTagUpdateCall.html) -* [files](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.File.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FileListCall.html) -* [floodlight activities](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivity.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityDeleteCall.html), [*generatetag*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityUpdateCall.html) -* [floodlight activity groups](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightActivityGroupUpdateCall.html) -* [floodlight configurations](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightConfiguration.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightConfigurationGetCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightConfigurationListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightConfigurationPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FloodlightConfigurationUpdateCall.html) -* [inventory items](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.InventoryItem.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.InventoryItemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.InventoryItemListCall.html) -* [landing pages](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.LandingPage.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.LandingPageDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.LandingPageGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.LandingPageInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.LandingPageListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.LandingPagePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.LandingPageUpdateCall.html) -* [languages](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Language.html) - * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.LanguageListCall.html) -* [metros](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Metro.html) - * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.MetroListCall.html) -* [mobile carriers](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.MobileCarrier.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.MobileCarrierGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.MobileCarrierListCall.html) -* [operating system versions](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OperatingSystemVersion.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OperatingSystemVersionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OperatingSystemVersionListCall.html) -* [operating systems](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OperatingSystem.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OperatingSystemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OperatingSystemListCall.html) -* [order documents](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OrderDocument.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OrderDocumentGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OrderDocumentListCall.html) -* [orders](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Order.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OrderGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.OrderListCall.html) -* [placement groups](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementGroupUpdateCall.html) -* [placement strategies](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementStrategy.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementStrategyDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementStrategyGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementStrategyInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementStrategyListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementStrategyPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementStrategyUpdateCall.html) -* [placements](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Placement.html) - * [*generatetags*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlacementUpdateCall.html) -* [platform types](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlatformType.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlatformTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PlatformTypeListCall.html) -* [postal codes](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PostalCode.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PostalCodeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.PostalCodeListCall.html) -* [projects](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Project.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ProjectGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ProjectListCall.html) -* [regions](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Region.html) - * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RegionListCall.html) -* [remarketing list shares](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingListShare.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingListShareGetCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingListSharePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingListShareUpdateCall.html) -* [remarketing lists](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingList.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingListGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingListInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingListListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingListPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.RemarketingListUpdateCall.html) -* [reports](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Report.html) - * [*compatible fields query*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportCompatibleFieldQueryCall.html), [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportDeleteCall.html), [*files get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportFileGetCall.html), [*files list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportFileListCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportPatchCall.html), [*run*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportRunCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportUpdateCall.html) -* [sites](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Site.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SiteInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SiteListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SitePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SiteUpdateCall.html) -* [sizes](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Size.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SizeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SizeInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SizeListCall.html) -* [subaccounts](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Subaccount.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SubaccountGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SubaccountInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SubaccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SubaccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.SubaccountUpdateCall.html) -* [targetable remarketing lists](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.TargetableRemarketingList.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.TargetableRemarketingListGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.TargetableRemarketingListListCall.html) -* [targeting templates](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.TargetingTemplate.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.TargetingTemplateGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.TargetingTemplateInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.TargetingTemplateListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.TargetingTemplatePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.TargetingTemplateUpdateCall.html) -* [user profiles](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserProfile.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserProfileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserProfileListCall.html) -* [user role permission groups](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRolePermissionGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRolePermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRolePermissionGroupListCall.html) -* [user role permissions](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRolePermission.html) - * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRolePermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRolePermissionListCall.html) -* [user roles](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRole.html) - * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRoleDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRoleGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRoleInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRoleListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRolePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.UserRoleUpdateCall.html) +* [account active ad summaries](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountActiveAdSummary.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountActiveAdSummaryGetCall.html) +* [account permission groups](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountPermissionGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountPermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountPermissionGroupListCall.html) +* [account permissions](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountPermission.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountPermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountPermissionListCall.html) +* [account user profiles](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountUserProfile.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountUserProfileGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountUserProfileInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountUserProfileListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountUserProfilePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountUserProfileUpdateCall.html) +* [accounts](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Account.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountGetCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AccountUpdateCall.html) +* [ads](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Ad.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdUpdateCall.html) +* [advertiser groups](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserGroup.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserGroupDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserGroupUpdateCall.html) +* [advertisers](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Advertiser.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.AdvertiserUpdateCall.html) +* [browsers](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Browser.html) + * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.BrowserListCall.html) +* [campaign creative associations](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CampaignCreativeAssociation.html) + * [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CampaignCreativeAssociationInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CampaignCreativeAssociationListCall.html) +* [campaigns](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Campaign.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CampaignGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CampaignInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CampaignListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CampaignPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CampaignUpdateCall.html) +* [change logs](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ChangeLog.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ChangeLogGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ChangeLogListCall.html) +* [cities](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.City.html) + * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CityListCall.html) +* [connection types](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ConnectionType.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ConnectionTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ConnectionTypeListCall.html) +* [content categories](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ContentCategory.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ContentCategoryDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ContentCategoryGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ContentCategoryInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ContentCategoryListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ContentCategoryPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ContentCategoryUpdateCall.html) +* [conversions](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Conversion.html) + * [*batchinsert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ConversionBatchinsertCall.html) +* [countries](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Country.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CountryGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CountryListCall.html) +* [creative assets](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeAsset.html) + * [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeAssetInsertCall.html) +* [creative field values](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldValue.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldValueDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldValueGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldValueInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldValueListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldValuePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldValueUpdateCall.html) +* [creative fields](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeField.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeFieldUpdateCall.html) +* [creative groups](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeGroupUpdateCall.html) +* [creatives](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Creative.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeUpdateCall.html) +* [dimension values](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DimensionValue.html) + * [*query*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DimensionValueQueryCall.html) +* [directory site contacts](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DirectorySiteContact.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DirectorySiteContactGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DirectorySiteContactListCall.html) +* [directory sites](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DirectorySite.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DirectorySiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DirectorySiteInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DirectorySiteListCall.html) +* [dynamic targeting keys](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DynamicTargetingKey.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DynamicTargetingKeyDeleteCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DynamicTargetingKeyInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.DynamicTargetingKeyListCall.html) +* [event tags](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.EventTag.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.EventTagDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.EventTagGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.EventTagInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.EventTagListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.EventTagPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.EventTagUpdateCall.html) +* [files](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.File.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FileListCall.html) +* [floodlight activities](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivity.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityDeleteCall.html), [*generatetag*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityUpdateCall.html) +* [floodlight activity groups](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightActivityGroupUpdateCall.html) +* [floodlight configurations](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightConfiguration.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightConfigurationGetCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightConfigurationListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightConfigurationPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FloodlightConfigurationUpdateCall.html) +* [inventory items](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.InventoryItem.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.InventoryItemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.InventoryItemListCall.html) +* [landing pages](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.LandingPage.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.LandingPageDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.LandingPageGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.LandingPageInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.LandingPageListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.LandingPagePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.LandingPageUpdateCall.html) +* [languages](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Language.html) + * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.LanguageListCall.html) +* [metros](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Metro.html) + * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.MetroListCall.html) +* [mobile carriers](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.MobileCarrier.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.MobileCarrierGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.MobileCarrierListCall.html) +* [operating system versions](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OperatingSystemVersion.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OperatingSystemVersionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OperatingSystemVersionListCall.html) +* [operating systems](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OperatingSystem.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OperatingSystemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OperatingSystemListCall.html) +* [order documents](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OrderDocument.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OrderDocumentGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OrderDocumentListCall.html) +* [orders](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Order.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OrderGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.OrderListCall.html) +* [placement groups](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementGroupUpdateCall.html) +* [placement strategies](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementStrategy.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementStrategyDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementStrategyGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementStrategyInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementStrategyListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementStrategyPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementStrategyUpdateCall.html) +* [placements](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Placement.html) + * [*generatetags*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlacementUpdateCall.html) +* [platform types](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlatformType.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlatformTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PlatformTypeListCall.html) +* [postal codes](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PostalCode.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PostalCodeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.PostalCodeListCall.html) +* [projects](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Project.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ProjectGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ProjectListCall.html) +* [regions](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Region.html) + * [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RegionListCall.html) +* [remarketing list shares](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingListShare.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingListShareGetCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingListSharePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingListShareUpdateCall.html) +* [remarketing lists](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingList.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingListGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingListInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingListListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingListPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.RemarketingListUpdateCall.html) +* [reports](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Report.html) + * [*compatible fields query*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportCompatibleFieldQueryCall.html), [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportDeleteCall.html), [*files get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportFileGetCall.html), [*files list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportFileListCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportPatchCall.html), [*run*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportRunCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportUpdateCall.html) +* [sites](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Site.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SiteInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SiteListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SitePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SiteUpdateCall.html) +* [sizes](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Size.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SizeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SizeInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SizeListCall.html) +* [subaccounts](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Subaccount.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SubaccountGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SubaccountInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SubaccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SubaccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.SubaccountUpdateCall.html) +* [targetable remarketing lists](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.TargetableRemarketingList.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.TargetableRemarketingListGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.TargetableRemarketingListListCall.html) +* [targeting templates](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.TargetingTemplate.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.TargetingTemplateGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.TargetingTemplateInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.TargetingTemplateListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.TargetingTemplatePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.TargetingTemplateUpdateCall.html) +* [user profiles](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserProfile.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserProfileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserProfileListCall.html) +* [user role permission groups](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRolePermissionGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRolePermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRolePermissionGroupListCall.html) +* [user role permissions](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRolePermission.html) + * [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRolePermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRolePermissionListCall.html) +* [user roles](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRole.html) + * [*delete*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRoleDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRoleGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRoleInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRoleListCall.html), [*patch*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRolePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.UserRoleUpdateCall.html) Upload supported by ... -* [*insert creative assets*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.CreativeAssetInsertCall.html) +* [*insert creative assets*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.CreativeAssetInsertCall.html) Download supported by ... -* [*get files*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.FileGetCall.html) -* [*files get reports*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.ReportFileGetCall.html) +* [*get files*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.FileGetCall.html) +* [*files get reports*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.ReportFileGetCall.html) @@ -148,17 +148,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/struct.Dfareporting.html)** +* **[Hub](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/struct.Dfareporting.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.Part.html)** + * **[Parts](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -254,17 +254,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.Delegate.html), 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-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.ResponseResult.html), 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")`. @@ -274,29 +274,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.CallBuilder.html) 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-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.RequestValue.html) and -[decodable](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.RequestValue.html) and +[decodable](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.CallBuilder.html), 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-dfareporting2d6/1.0.4+20161027/google_dfareporting2d6/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-dfareporting2d6/1.0.4+20170428/google_dfareporting2d6/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/dfareporting2d6/src/lib.rs b/gen/dfareporting2d6/src/lib.rs index 38f51eac21..415faa6943 100644 --- a/gen/dfareporting2d6/src/lib.rs +++ b/gen/dfareporting2d6/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dfareporting* crate version *1.0.4+20161027*, where *20161027* is the exact revision of the *dfareporting:v2.6* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *dfareporting* crate version *1.0.4+20170428*, where *20170428* is the exact revision of the *dfareporting:v2.6* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *dfareporting* *v2d6* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-advertisers/). @@ -1032,10 +1032,10 @@ impl ResponseResult for AccountActiveAdSummary {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LookbackConfiguration { - /// Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. + /// Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive. #[serde(rename="clickDuration")] pub click_duration: Option, - /// Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. + /// Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive. #[serde(rename="postImpressionActivitiesDuration")] pub post_impression_activities_duration: Option, } @@ -1381,7 +1381,7 @@ impl Part for ListPopulationRule {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { - /// File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 and 10240. + /// File size limit in kilobytes of Rich Media teaser creatives. Acceptable values are 1 to 10240, inclusive. #[serde(rename="teaserSizeLimit")] pub teaser_size_limit: Option, /// User role permissions available to the user roles of this account. @@ -1428,7 +1428,7 @@ pub struct Account { pub country_id: Option, /// Name of this account. This is a required field, and must be less than 128 characters long and be globally unique. pub name: Option, - /// Maximum image size allowed for this account. + /// Maximum image size allowed for this account, in kilobytes. Value must be greater than or equal to 1. #[serde(rename="maximumImageSize")] pub maximum_image_size: Option, /// Whether campaigns created in this account will be enabled for Nielsen OCR reach ratings by default. @@ -1488,7 +1488,8 @@ pub struct Account { /// - "45" for RUB /// - "46" for AED /// - "47" for BGN - /// - "48" for HRK + /// - "48" for HRK + /// - "49" for MXN #[serde(rename="currencyId")] pub currency_id: Option, /// Reporting configuration of this account. @@ -1522,7 +1523,7 @@ pub struct DayPartTargeting { /// - "SATURDAY" #[serde(rename="daysOfWeek")] pub days_of_week: Option>, - /// Hours of the day when the ad will serve. Must be an integer between 0 and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example, if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. + /// Hours of the day when the ad will serve, where 0 is midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive. #[serde(rename="hoursOfDay")] pub hours_of_day: Option>, /// Whether or not to use the user's local time. If false, the America/New York time zone applies. @@ -1772,7 +1773,7 @@ impl ResponseResult for FloodlightActivityGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AudienceSegment { - /// Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. + /// Weight allocated to this segment. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. Acceptable values are 1 to 1000, inclusive. pub allocation: Option, /// ID of this audience segment. This is a read-only, auto-generated field. pub id: Option, @@ -2086,6 +2087,8 @@ pub struct Placement { /// - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT" /// - "PLACEMENT_TAG_CLICK_COMMANDS" /// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH" + /// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3" + /// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4" /// - "PLACEMENT_TAG_TRACKING" /// - "PLACEMENT_TAG_TRACKING_IFRAME" /// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT" @@ -2244,7 +2247,7 @@ pub struct OptimizationActivity { /// Dimension value for the ID of the floodlight activity. This is a read-only, auto-generated field. #[serde(rename="floodlightActivityIdDimensionValue")] pub floodlight_activity_id_dimension_value: Option, - /// Weight associated with this optimization. Must be greater than 1. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. + /// Weight associated with this optimization. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. Value must be greater than or equal to 1. pub weight: Option, } @@ -2337,9 +2340,9 @@ impl Part for CompanionClickThroughOverride {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FrequencyCap { - /// Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days in seconds, or 7,776,000. + /// Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days. Acceptable values are 1 to 7776000, inclusive. pub duration: Option, - /// Number of times an individual user can be served the ad within the specified duration. The maximum allowed is 15. + /// Number of times an individual user can be served the ad within the specified duration. Acceptable values are 1 to 15, inclusive. pub impressions: Option, } @@ -2607,15 +2610,16 @@ impl Part for DirectorySiteContactAssignment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeAssignment { - /// Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. + /// Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater than or equal to 1. pub weight: Option, - /// Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. + /// Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable values are 1 to 65535, inclusive. pub sequence: Option, /// Click-through URL of the creative assignment. #[serde(rename="clickThroughUrl")] pub click_through_url: Option, /// Rich media exit overrides for this creative assignment. /// Applicable when the creative type is any of the following: + /// - DISPLAY /// - RICH_MEDIA_INPAGE /// - RICH_MEDIA_INPAGE_FLOATING /// - RICH_MEDIA_IM_EXPAND @@ -2624,7 +2628,6 @@ pub struct CreativeAssignment { /// - RICH_MEDIA_MOBILE_IN_APP /// - RICH_MEDIA_MULTI_FLOATING /// - RICH_MEDIA_PEEL_DOWN - /// - ADVANCED_BANNER /// - VPAID_LINEAR /// - VPAID_NON_LINEAR #[serde(rename="richMediaExitOverrides")] @@ -3001,7 +3004,7 @@ pub struct CreativeAsset { /// List of companion creatives assigned to an in-stream video creative asset. Acceptable values include IDs of existing flash and image creatives. Applicable to INSTREAM_VIDEO creative type with dynamicAssetSelection set to true. #[serde(rename="companionCreativeIds")] pub companion_creative_ids: Option>, - /// Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. + /// Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1. pub duration: Option, /// Offset top unit for an asset. This is a read-only field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following creative types: all RICH_MEDIA. #[serde(rename="positionTopUnit")] @@ -3074,7 +3077,7 @@ pub struct CreativeAsset { /// Streaming URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(rename="streamingServingUrl")] pub streaming_serving_url: Option, - /// zIndex value of an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. + /// zIndex value of an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable values are -999999999 to 999999999, inclusive. #[serde(rename="zIndex")] pub z_index: Option, /// Rich media child asset type. This is a read-only field. Applicable to the following creative types: all VPAID. @@ -3086,7 +3089,7 @@ pub struct CreativeAsset { /// Whether ActionScript3 is enabled for the flash asset. This is a read-only field. Applicable to the following creative type: FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. #[serde(rename="actionScript3")] pub action_script3: Option, - /// Pushdown duration in seconds for an asset. Must be between 0 and 9.99. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. + /// Pushdown duration in seconds for an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. Acceptable values are 0 to 9.99, inclusive. #[serde(rename="pushdownDuration")] pub pushdown_duration: Option, /// Identifier of this asset. This is the same identifier returned during creative asset insert operation. This is a required field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. @@ -3099,7 +3102,7 @@ pub struct CreativeAsset { pub ssl_compliant: Option, /// Offset position for an asset. Applicable to the following creative types: all RICH_MEDIA. pub position: Option, - /// Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. + /// Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. Value must be greater than or equal to 0. #[serde(rename="customStartTimeValue")] pub custom_start_time_value: Option, /// File name of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. @@ -3344,14 +3347,14 @@ impl Part for OrderContact {} pub struct DirectorySite { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite". pub kind: Option, - /// Country ID of this directory site. + /// Country ID of this directory site. This is a read-only field. #[serde(rename="countryId")] pub country_id: Option, - /// Description of this directory site. + /// Description of this directory site. This is a read-only field. pub description: Option, /// Directory site settings. pub settings: Option, - /// Currency ID of this directory site. + /// Currency ID of this directory site. This is a read-only field. /// Possible values are: /// - "1" for USD /// - "2" for GBP @@ -3399,7 +3402,8 @@ pub struct DirectorySite { /// - "45" for RUB /// - "46" for AED /// - "47" for BGN - /// - "48" for HRK + /// - "48" for HRK + /// - "49" for MXN #[serde(rename="currencyId")] pub currency_id: Option, /// Tag types for regular placements. @@ -3485,10 +3489,7 @@ pub struct CreativeGroup { pub subaccount_id: Option, /// Name of this creative group. This is a required field and must be less than 256 characters long and unique among creative groups of the same advertiser. pub name: Option, - /// Subgroup of the creative group. Assign your creative groups to one of the following subgroups in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. - /// Acceptable values are: - /// - 1 - /// - 2 + /// Subgroup of the creative group. Assign your creative groups to a subgroup in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. Acceptable values are 1 to 2, inclusive. #[serde(rename="groupNumber")] pub group_number: Option, /// Advertiser ID of this creative group. This is a required field on insertion. @@ -4397,7 +4398,7 @@ pub struct DeliverySchedule { /// Limit on the number of times an individual user can be served the ad within a specified period of time. #[serde(rename="frequencyCap")] pub frequency_cap: Option, - /// Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Must be between 1 and 10. + /// Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Acceptable values are 1 to 10, inclusive. #[serde(rename="impressionRatio")] pub impression_ratio: Option, } @@ -4771,10 +4772,10 @@ pub struct TagData { /// Tag string for serving an ad. #[serde(rename="impressionTag")] pub impression_tag: Option, - /// Creative associated with this placement tag. + /// Creative associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING. #[serde(rename="creativeId")] pub creative_id: Option, - /// Ad associated with this placement tag. + /// Ad associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING. #[serde(rename="adId")] pub ad_id: Option, /// TagData tag format of this tag. @@ -4953,7 +4954,7 @@ pub struct RemarketingList { /// Number of users currently in the list. This is a read-only field. #[serde(rename="listSize")] pub list_size: Option, - /// Number of days that a user should remain in the remarketing list without an impression. + /// Number of days that a user should remain in the remarketing list without an impression. Acceptable values are 1 to 540, inclusive. #[serde(rename="lifeSpan")] pub life_span: Option, /// Dimension value for the advertiser ID that owns this remarketing list. This is a required field. @@ -5009,7 +5010,7 @@ pub struct FloodlightActivity { /// Advertiser ID of this floodlight activity. If this field is left blank, the value will be copied over either from the activity group's advertiser or the existing activity's advertiser. #[serde(rename="advertiserId")] pub advertiser_id: Option, - /// Code type used for cache busting in the generated tag. + /// Code type used for cache busting in the generated tag. Applicable only when floodlightActivityGroupType is COUNTER and countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING. #[serde(rename="cacheBustingType")] pub cache_busting_type: Option, /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. @@ -5509,11 +5510,11 @@ impl ResponseResult for LandingPage {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Size { - /// Width of this size. + /// Width of this size. Acceptable values are 0 to 32767, inclusive. pub width: Option, /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#size". pub kind: Option, - /// Height of this size. + /// Height of this size. Acceptable values are 0 to 32767, inclusive. pub height: Option, /// ID of this size. This is a read-only, auto-generated field. pub id: Option, @@ -6405,7 +6406,7 @@ impl Part for ReportFloodlightCriteriaReportProperties {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ConversionsBatchInsertResponse { - /// The status of each conversion's insertion status. The status is returned in the same order that conversions are inserted. + /// The insert status of each conversion. Statuses are returned in the same order that conversions are inserted. pub status: Option>, /// Indicates that some or all conversions failed to insert. #[serde(rename="hasFailures")] @@ -6910,12 +6911,12 @@ impl ResponseResult for Ad {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PricingSchedulePricingPeriod { - /// Units of this pricing period. + /// Units of this pricing period. Acceptable values are 0 to 10000000000, inclusive. pub units: Option, /// Pricing period start date. This date must be later than, or the same day as, the placement start date. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. #[serde(rename="startDate")] pub start_date: Option, - /// Rate or cost of this pricing period. + /// Rate or cost of this pricing period in nanos (i.e., multipled by 1000000000). Acceptable values are 0 to 1000000000000000000, inclusive. #[serde(rename="rateOrCostNanos")] pub rate_or_cost_nanos: Option, /// Pricing period end date. This date must be later than, or the same day as, the pricing period start date, but not later than the placement end date. The period end date can be the same date as the period start date. If, for example, you set 6/25/2015 as both the start and end dates, the effective pricing period date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. @@ -15716,7 +15717,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut self._project_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> OrderDocumentListCall<'a, C, A> { @@ -16322,7 +16323,7 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { @@ -18977,7 +18978,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: self._subaccount_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { @@ -22041,7 +22042,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< self._campaign_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, A> { @@ -27023,7 +27024,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A self._status = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { @@ -28713,7 +28714,7 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> { @@ -29823,7 +29824,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau self._project_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> OrderListCall<'a, C, A> { @@ -30889,7 +30890,7 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> { @@ -32318,7 +32319,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 self._ssl_compliant = Some(new_value); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AdListCall<'a, C, A> { @@ -34228,7 +34229,7 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> { @@ -35031,7 +35032,7 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> { @@ -36963,7 +36964,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut self._subaccount_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> SiteListCall<'a, C, A> { @@ -38159,7 +38160,7 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> { @@ -40831,7 +40832,7 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { @@ -41717,7 +41718,7 @@ impl<'a, C, A> TargetingTemplateListCall<'a, C, A> where C: BorrowMut TargetingTemplateListCall<'a, C, A> { @@ -43623,7 +43624,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> SubaccountListCall<'a, C, A> { @@ -46827,7 +46828,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupListCall<'a, C, A> { @@ -48330,7 +48331,7 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut self._type_ = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> InventoryItemListCall<'a, C, A> { @@ -49894,7 +49895,7 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> { @@ -52351,7 +52352,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: self._studio_creative_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { @@ -54128,7 +54129,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: self._subaccount_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { @@ -54741,7 +54742,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { @@ -56665,7 +56666,7 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> { @@ -58330,7 +58331,7 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> { @@ -59427,7 +59428,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ProjectListCall<'a, C, A> { @@ -60293,7 +60294,7 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { @@ -63052,7 +63053,7 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> { @@ -66007,7 +66008,7 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> { @@ -67286,7 +67287,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AccountListCall<'a, C, A> { @@ -68525,7 +68526,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { diff --git a/gen/dfareporting2d7-cli/Cargo.toml b/gen/dfareporting2d7-cli/Cargo.toml index 05dc3cc176..b0e352e00c 100644 --- a/gen/dfareporting2d7-cli/Cargo.toml +++ b/gen/dfareporting2d7-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d7-cli" -version = "1.0.4+20161027" +version = "1.0.4+20170428" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.7)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d7-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-dfareporting2d7] path = "../dfareporting2d7" -version = "1.0.4+20161027" +version = "1.0.4+20170428" diff --git a/gen/dfareporting2d7-cli/README.md b/gen/dfareporting2d7-cli/README.md index 7ec5fe4307..6aaae4ab16 100644 --- a/gen/dfareporting2d7-cli/README.md +++ b/gen/dfareporting2d7-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *dfareporting* API at revision *20161027*. The CLI is at version *1.0.4*. +This documentation was generated from the *dfareporting* API at revision *20170428*. The CLI is at version *1.0.4*. ```bash dfareporting2d7 [options] diff --git a/gen/dfareporting2d7-cli/mkdocs.yml b/gen/dfareporting2d7-cli/mkdocs.yml index fca5e9a4d7..114da68483 100644 --- a/gen/dfareporting2d7-cli/mkdocs.yml +++ b/gen/dfareporting2d7-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dfareporting v1.0.4+20161027 +site_name: dfareporting v1.0.4+20170428 site_url: http://byron.github.io/google-apis-rs/google-dfareporting2d7-cli site_description: A complete library to interact with dfareporting (protocol v2.7) diff --git a/gen/dfareporting2d7-cli/src/main.rs b/gen/dfareporting2d7-cli/src/main.rs index 80452151f8..941da2e1ee 100644 --- a/gen/dfareporting2d7-cli/src/main.rs +++ b/gen/dfareporting2d7-cli/src/main.rs @@ -20403,7 +20403,7 @@ fn main() { ("files", "methods: 'get' and 'list'", vec![ ("get", - Some(r##"Retrieves a report file by its report ID and file ID."##), + Some(r##"Retrieves a report file by its report ID and file ID. This method supports media download."##), "Details at http://byron.github.io/google-apis-rs/google_dfareporting2d7_cli/files_get", vec![ (Some(r##"report-id"##), @@ -22455,7 +22455,7 @@ fn main() { Some(true)), ]), ("files-get", - Some(r##"Retrieves a report file."##), + Some(r##"Retrieves a report file. This method supports media download."##), "Details at http://byron.github.io/google-apis-rs/google_dfareporting2d7_cli/reports_files-get", vec![ (Some(r##"profile-id"##), @@ -23630,7 +23630,7 @@ fn main() { let mut app = App::new("dfareporting2d7") .author("Sebastian Thiel ") - .version("1.0.4+20161027") + .version("1.0.4+20170428") .about("Manages your DoubleClick Campaign Manager ad campaigns and reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dfareporting2d7_cli") .arg(Arg::with_name("url") diff --git a/gen/dfareporting2d7/Cargo.toml b/gen/dfareporting2d7/Cargo.toml index a9e71718d1..253fd6cf7d 100644 --- a/gen/dfareporting2d7/Cargo.toml +++ b/gen/dfareporting2d7/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-dfareporting2d7" -version = "1.0.4+20161027" +version = "1.0.4+20170428" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.7)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d7" homepage = "https://developers.google.com/doubleclick-advertisers/" -documentation = "https://docs.rs/google-dfareporting2d7/1.0.4+20161027" +documentation = "https://docs.rs/google-dfareporting2d7/1.0.4+20170428" license = "MIT" keywords = ["dfareporting", "google", "protocol", "web", "api"] diff --git a/gen/dfareporting2d7/README.md b/gen/dfareporting2d7/README.md index eebd31e5e8..d6e26d6d35 100644 --- a/gen/dfareporting2d7/README.md +++ b/gen/dfareporting2d7/README.md @@ -5,144 +5,144 @@ DO NOT EDIT ! --> The `google-dfareporting2d7` library allows access to all features of the *Google dfareporting* service. -This documentation was generated from *dfareporting* crate version *1.0.4+20161027*, where *20161027* is the exact revision of the *dfareporting:v2.7* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *dfareporting* crate version *1.0.4+20170428*, where *20170428* is the exact revision of the *dfareporting:v2.7* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *dfareporting* *v2d7* API can be found at the [official documentation site](https://developers.google.com/doubleclick-advertisers/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Dfareporting.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Dfareporting.html) ... -* [account active ad summaries](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountActiveAdSummary.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountActiveAdSummaryGetCall.html) -* [account permission groups](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountPermissionGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountPermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountPermissionGroupListCall.html) -* [account permissions](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountPermission.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountPermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountPermissionListCall.html) -* [account user profiles](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountUserProfile.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountUserProfileGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountUserProfileInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountUserProfileListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountUserProfilePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountUserProfileUpdateCall.html) -* [accounts](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Account.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountGetCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AccountUpdateCall.html) -* [ads](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Ad.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdUpdateCall.html) -* [advertiser groups](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserGroup.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserGroupDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserGroupUpdateCall.html) -* [advertisers](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Advertiser.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.AdvertiserUpdateCall.html) -* [browsers](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Browser.html) - * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.BrowserListCall.html) -* [campaign creative associations](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CampaignCreativeAssociation.html) - * [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CampaignCreativeAssociationInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CampaignCreativeAssociationListCall.html) -* [campaigns](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Campaign.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CampaignGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CampaignInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CampaignListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CampaignPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CampaignUpdateCall.html) -* [change logs](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ChangeLog.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ChangeLogGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ChangeLogListCall.html) -* [cities](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.City.html) - * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CityListCall.html) -* [connection types](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ConnectionType.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ConnectionTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ConnectionTypeListCall.html) -* [content categories](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ContentCategory.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ContentCategoryDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ContentCategoryGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ContentCategoryInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ContentCategoryListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ContentCategoryPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ContentCategoryUpdateCall.html) -* [conversions](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Conversion.html) - * [*batchinsert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ConversionBatchinsertCall.html) -* [countries](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Country.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CountryGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CountryListCall.html) -* [creative assets](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeAsset.html) - * [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeAssetInsertCall.html) -* [creative field values](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldValue.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldValueDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldValueGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldValueInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldValueListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldValuePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldValueUpdateCall.html) -* [creative fields](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeField.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeFieldUpdateCall.html) -* [creative groups](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeGroupUpdateCall.html) -* [creatives](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Creative.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeUpdateCall.html) -* [dimension values](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DimensionValue.html) - * [*query*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DimensionValueQueryCall.html) -* [directory site contacts](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DirectorySiteContact.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DirectorySiteContactGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DirectorySiteContactListCall.html) -* [directory sites](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DirectorySite.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DirectorySiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DirectorySiteInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DirectorySiteListCall.html) -* [dynamic targeting keys](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DynamicTargetingKey.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DynamicTargetingKeyDeleteCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DynamicTargetingKeyInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.DynamicTargetingKeyListCall.html) -* [event tags](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.EventTag.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.EventTagDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.EventTagGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.EventTagInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.EventTagListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.EventTagPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.EventTagUpdateCall.html) -* [files](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.File.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FileListCall.html) -* [floodlight activities](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivity.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityDeleteCall.html), [*generatetag*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityUpdateCall.html) -* [floodlight activity groups](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightActivityGroupUpdateCall.html) -* [floodlight configurations](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightConfiguration.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightConfigurationGetCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightConfigurationListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightConfigurationPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FloodlightConfigurationUpdateCall.html) -* [inventory items](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.InventoryItem.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.InventoryItemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.InventoryItemListCall.html) -* [landing pages](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.LandingPage.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.LandingPageDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.LandingPageGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.LandingPageInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.LandingPageListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.LandingPagePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.LandingPageUpdateCall.html) -* [languages](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Language.html) - * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.LanguageListCall.html) -* [metros](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Metro.html) - * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.MetroListCall.html) -* [mobile carriers](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.MobileCarrier.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.MobileCarrierGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.MobileCarrierListCall.html) -* [operating system versions](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OperatingSystemVersion.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OperatingSystemVersionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OperatingSystemVersionListCall.html) -* [operating systems](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OperatingSystem.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OperatingSystemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OperatingSystemListCall.html) -* [order documents](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OrderDocument.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OrderDocumentGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OrderDocumentListCall.html) -* [orders](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Order.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OrderGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.OrderListCall.html) -* [placement groups](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementGroupUpdateCall.html) -* [placement strategies](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementStrategy.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementStrategyDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementStrategyGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementStrategyInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementStrategyListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementStrategyPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementStrategyUpdateCall.html) -* [placements](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Placement.html) - * [*generatetags*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlacementUpdateCall.html) -* [platform types](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlatformType.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlatformTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PlatformTypeListCall.html) -* [postal codes](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PostalCode.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PostalCodeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.PostalCodeListCall.html) -* [projects](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Project.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ProjectGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ProjectListCall.html) -* [regions](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Region.html) - * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RegionListCall.html) -* [remarketing list shares](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingListShare.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingListShareGetCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingListSharePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingListShareUpdateCall.html) -* [remarketing lists](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingList.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingListGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingListInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingListListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingListPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.RemarketingListUpdateCall.html) -* [reports](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Report.html) - * [*compatible fields query*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportCompatibleFieldQueryCall.html), [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportDeleteCall.html), [*files get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportFileGetCall.html), [*files list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportFileListCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportPatchCall.html), [*run*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportRunCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportUpdateCall.html) -* [sites](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Site.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SiteInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SiteListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SitePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SiteUpdateCall.html) -* [sizes](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Size.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SizeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SizeInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SizeListCall.html) -* [subaccounts](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Subaccount.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SubaccountGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SubaccountInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SubaccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SubaccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.SubaccountUpdateCall.html) -* [targetable remarketing lists](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.TargetableRemarketingList.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.TargetableRemarketingListGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.TargetableRemarketingListListCall.html) -* [targeting templates](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.TargetingTemplate.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.TargetingTemplateGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.TargetingTemplateInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.TargetingTemplateListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.TargetingTemplatePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.TargetingTemplateUpdateCall.html) -* [user profiles](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserProfile.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserProfileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserProfileListCall.html) -* [user role permission groups](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRolePermissionGroup.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRolePermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRolePermissionGroupListCall.html) -* [user role permissions](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRolePermission.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRolePermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRolePermissionListCall.html) -* [user roles](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRole.html) - * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRoleDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRoleGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRoleInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRoleListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRolePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.UserRoleUpdateCall.html) -* [video formats](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.VideoFormat.html) - * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.VideoFormatGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.VideoFormatListCall.html) +* [account active ad summaries](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountActiveAdSummary.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountActiveAdSummaryGetCall.html) +* [account permission groups](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountPermissionGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountPermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountPermissionGroupListCall.html) +* [account permissions](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountPermission.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountPermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountPermissionListCall.html) +* [account user profiles](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountUserProfile.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountUserProfileGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountUserProfileInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountUserProfileListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountUserProfilePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountUserProfileUpdateCall.html) +* [accounts](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Account.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountGetCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AccountUpdateCall.html) +* [ads](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Ad.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdUpdateCall.html) +* [advertiser groups](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserGroup.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserGroupDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserGroupUpdateCall.html) +* [advertisers](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Advertiser.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.AdvertiserUpdateCall.html) +* [browsers](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Browser.html) + * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.BrowserListCall.html) +* [campaign creative associations](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CampaignCreativeAssociation.html) + * [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CampaignCreativeAssociationInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CampaignCreativeAssociationListCall.html) +* [campaigns](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Campaign.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CampaignGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CampaignInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CampaignListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CampaignPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CampaignUpdateCall.html) +* [change logs](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ChangeLog.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ChangeLogGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ChangeLogListCall.html) +* [cities](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.City.html) + * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CityListCall.html) +* [connection types](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ConnectionType.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ConnectionTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ConnectionTypeListCall.html) +* [content categories](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ContentCategory.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ContentCategoryDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ContentCategoryGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ContentCategoryInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ContentCategoryListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ContentCategoryPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ContentCategoryUpdateCall.html) +* [conversions](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Conversion.html) + * [*batchinsert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ConversionBatchinsertCall.html) +* [countries](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Country.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CountryGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CountryListCall.html) +* [creative assets](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeAsset.html) + * [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeAssetInsertCall.html) +* [creative field values](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldValue.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldValueDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldValueGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldValueInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldValueListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldValuePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldValueUpdateCall.html) +* [creative fields](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeField.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeFieldUpdateCall.html) +* [creative groups](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeGroupUpdateCall.html) +* [creatives](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Creative.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeUpdateCall.html) +* [dimension values](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DimensionValue.html) + * [*query*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DimensionValueQueryCall.html) +* [directory site contacts](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DirectorySiteContact.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DirectorySiteContactGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DirectorySiteContactListCall.html) +* [directory sites](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DirectorySite.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DirectorySiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DirectorySiteInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DirectorySiteListCall.html) +* [dynamic targeting keys](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DynamicTargetingKey.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DynamicTargetingKeyDeleteCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DynamicTargetingKeyInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.DynamicTargetingKeyListCall.html) +* [event tags](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.EventTag.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.EventTagDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.EventTagGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.EventTagInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.EventTagListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.EventTagPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.EventTagUpdateCall.html) +* [files](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.File.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FileListCall.html) +* [floodlight activities](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivity.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityDeleteCall.html), [*generatetag*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityUpdateCall.html) +* [floodlight activity groups](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightActivityGroupUpdateCall.html) +* [floodlight configurations](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightConfiguration.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightConfigurationGetCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightConfigurationListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightConfigurationPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FloodlightConfigurationUpdateCall.html) +* [inventory items](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.InventoryItem.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.InventoryItemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.InventoryItemListCall.html) +* [landing pages](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.LandingPage.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.LandingPageDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.LandingPageGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.LandingPageInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.LandingPageListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.LandingPagePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.LandingPageUpdateCall.html) +* [languages](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Language.html) + * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.LanguageListCall.html) +* [metros](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Metro.html) + * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.MetroListCall.html) +* [mobile carriers](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.MobileCarrier.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.MobileCarrierGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.MobileCarrierListCall.html) +* [operating system versions](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OperatingSystemVersion.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OperatingSystemVersionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OperatingSystemVersionListCall.html) +* [operating systems](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OperatingSystem.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OperatingSystemGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OperatingSystemListCall.html) +* [order documents](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OrderDocument.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OrderDocumentGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OrderDocumentListCall.html) +* [orders](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Order.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OrderGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.OrderListCall.html) +* [placement groups](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementGroupGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementGroupInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementGroupListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementGroupPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementGroupUpdateCall.html) +* [placement strategies](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementStrategy.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementStrategyDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementStrategyGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementStrategyInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementStrategyListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementStrategyPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementStrategyUpdateCall.html) +* [placements](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Placement.html) + * [*generatetags*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementGeneratetagCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlacementUpdateCall.html) +* [platform types](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlatformType.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlatformTypeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PlatformTypeListCall.html) +* [postal codes](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PostalCode.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PostalCodeGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.PostalCodeListCall.html) +* [projects](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Project.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ProjectGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ProjectListCall.html) +* [regions](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Region.html) + * [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RegionListCall.html) +* [remarketing list shares](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingListShare.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingListShareGetCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingListSharePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingListShareUpdateCall.html) +* [remarketing lists](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingList.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingListGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingListInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingListListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingListPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.RemarketingListUpdateCall.html) +* [reports](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Report.html) + * [*compatible fields query*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportCompatibleFieldQueryCall.html), [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportDeleteCall.html), [*files get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportFileGetCall.html), [*files list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportFileListCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportPatchCall.html), [*run*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportRunCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportUpdateCall.html) +* [sites](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Site.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SiteGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SiteInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SiteListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SitePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SiteUpdateCall.html) +* [sizes](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Size.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SizeGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SizeInsertCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SizeListCall.html) +* [subaccounts](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Subaccount.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SubaccountGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SubaccountInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SubaccountListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SubaccountPatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.SubaccountUpdateCall.html) +* [targetable remarketing lists](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.TargetableRemarketingList.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.TargetableRemarketingListGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.TargetableRemarketingListListCall.html) +* [targeting templates](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.TargetingTemplate.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.TargetingTemplateGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.TargetingTemplateInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.TargetingTemplateListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.TargetingTemplatePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.TargetingTemplateUpdateCall.html) +* [user profiles](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserProfile.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserProfileGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserProfileListCall.html) +* [user role permission groups](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRolePermissionGroup.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRolePermissionGroupGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRolePermissionGroupListCall.html) +* [user role permissions](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRolePermission.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRolePermissionGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRolePermissionListCall.html) +* [user roles](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRole.html) + * [*delete*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRoleDeleteCall.html), [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRoleGetCall.html), [*insert*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRoleInsertCall.html), [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRoleListCall.html), [*patch*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRolePatchCall.html) and [*update*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.UserRoleUpdateCall.html) +* [video formats](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.VideoFormat.html) + * [*get*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.VideoFormatGetCall.html) and [*list*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.VideoFormatListCall.html) Upload supported by ... -* [*insert creative assets*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.CreativeAssetInsertCall.html) +* [*insert creative assets*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.CreativeAssetInsertCall.html) Download supported by ... -* [*get files*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.FileGetCall.html) -* [*files get reports*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.ReportFileGetCall.html) +* [*get files*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.FileGetCall.html) +* [*files get reports*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.ReportFileGetCall.html) @@ -150,17 +150,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/struct.Dfareporting.html)** +* **[Hub](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/struct.Dfareporting.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.Part.html)** + * **[Parts](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -256,17 +256,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.Delegate.html), 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-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.ResponseResult.html), 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")`. @@ -276,29 +276,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.CallBuilder.html) 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-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.RequestValue.html) and -[decodable](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.RequestValue.html) and +[decodable](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.CallBuilder.html), 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-dfareporting2d7/1.0.4+20161027/google_dfareporting2d7/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-dfareporting2d7/1.0.4+20170428/google_dfareporting2d7/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/dfareporting2d7/src/lib.rs b/gen/dfareporting2d7/src/lib.rs index 9a63f2682a..ae299f3c4a 100644 --- a/gen/dfareporting2d7/src/lib.rs +++ b/gen/dfareporting2d7/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dfareporting* crate version *1.0.4+20161027*, where *20161027* is the exact revision of the *dfareporting:v2.7* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *dfareporting* crate version *1.0.4+20170428*, where *20170428* is the exact revision of the *dfareporting:v2.7* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *dfareporting* *v2d7* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-advertisers/). @@ -983,10 +983,10 @@ impl Part for EventTagOverride {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VideoOffset { - /// Duration, as a percentage of video duration. Do not set when offsetSeconds is set. + /// Duration, as a percentage of video duration. Do not set when offsetSeconds is set. Acceptable values are 0 to 100, inclusive. #[serde(rename="offsetPercentage")] pub offset_percentage: Option, - /// Duration, in seconds. Do not set when offsetPercentage is set. + /// Duration, in seconds. Do not set when offsetPercentage is set. Acceptable values are 0 to 86399, inclusive. #[serde(rename="offsetSeconds")] pub offset_seconds: Option, } @@ -1054,10 +1054,10 @@ impl ResponseResult for AccountActiveAdSummary {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LookbackConfiguration { - /// Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. + /// Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive. #[serde(rename="clickDuration")] pub click_duration: Option, - /// Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. + /// Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. Acceptable values are 0 to 90, inclusive. #[serde(rename="postImpressionActivitiesDuration")] pub post_impression_activities_duration: Option, } @@ -1406,7 +1406,7 @@ impl Part for ListPopulationRule {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { - /// File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 and 10240. + /// File size limit in kilobytes of Rich Media teaser creatives. Acceptable values are 1 to 10240, inclusive. #[serde(rename="teaserSizeLimit")] pub teaser_size_limit: Option, /// User role permissions available to the user roles of this account. @@ -1453,7 +1453,7 @@ pub struct Account { pub country_id: Option, /// Name of this account. This is a required field, and must be less than 128 characters long and be globally unique. pub name: Option, - /// Maximum image size allowed for this account. + /// Maximum image size allowed for this account, in kilobytes. Value must be greater than or equal to 1. #[serde(rename="maximumImageSize")] pub maximum_image_size: Option, /// Whether campaigns created in this account will be enabled for Nielsen OCR reach ratings by default. @@ -1513,7 +1513,8 @@ pub struct Account { /// - "45" for RUB /// - "46" for AED /// - "47" for BGN - /// - "48" for HRK + /// - "48" for HRK + /// - "49" for MXN #[serde(rename="currencyId")] pub currency_id: Option, /// Reporting configuration of this account. @@ -1547,7 +1548,7 @@ pub struct DayPartTargeting { /// - "SATURDAY" #[serde(rename="daysOfWeek")] pub days_of_week: Option>, - /// Hours of the day when the ad will serve. Must be an integer between 0 and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example, if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. + /// Hours of the day when the ad will serve, where 0 is midnight to 1 AM and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. Acceptable values are 0 to 23, inclusive. #[serde(rename="hoursOfDay")] pub hours_of_day: Option>, /// Whether or not to use the user's local time. If false, the America/New York time zone applies. @@ -1797,7 +1798,7 @@ impl ResponseResult for FloodlightActivityGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AudienceSegment { - /// Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. + /// Weight allocated to this segment. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. Acceptable values are 1 to 1000, inclusive. pub allocation: Option, /// ID of this audience segment. This is a read-only, auto-generated field. pub id: Option, @@ -2156,6 +2157,8 @@ pub struct Placement { /// - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT" /// - "PLACEMENT_TAG_CLICK_COMMANDS" /// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH" + /// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3" + /// - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4" /// - "PLACEMENT_TAG_TRACKING" /// - "PLACEMENT_TAG_TRACKING_IFRAME" /// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT" @@ -2317,7 +2320,7 @@ pub struct OptimizationActivity { /// Dimension value for the ID of the floodlight activity. This is a read-only, auto-generated field. #[serde(rename="floodlightActivityIdDimensionValue")] pub floodlight_activity_id_dimension_value: Option, - /// Weight associated with this optimization. Must be greater than 1. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. + /// Weight associated with this optimization. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. Value must be greater than or equal to 1. pub weight: Option, } @@ -2410,9 +2413,9 @@ impl Part for CompanionClickThroughOverride {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FrequencyCap { - /// Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days in seconds, or 7,776,000. + /// Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days. Acceptable values are 1 to 7776000, inclusive. pub duration: Option, - /// Number of times an individual user can be served the ad within the specified duration. The maximum allowed is 15. + /// Number of times an individual user can be served the ad within the specified duration. Acceptable values are 1 to 15, inclusive. pub impressions: Option, } @@ -2680,15 +2683,16 @@ impl Part for DirectorySiteContactAssignment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeAssignment { - /// Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. + /// Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. Value must be greater than or equal to 1. pub weight: Option, - /// Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. + /// Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. Acceptable values are 1 to 65535, inclusive. pub sequence: Option, /// Click-through URL of the creative assignment. #[serde(rename="clickThroughUrl")] pub click_through_url: Option, /// Rich media exit overrides for this creative assignment. /// Applicable when the creative type is any of the following: + /// - DISPLAY /// - RICH_MEDIA_INPAGE /// - RICH_MEDIA_INPAGE_FLOATING /// - RICH_MEDIA_IM_EXPAND @@ -2697,7 +2701,6 @@ pub struct CreativeAssignment { /// - RICH_MEDIA_MOBILE_IN_APP /// - RICH_MEDIA_MULTI_FLOATING /// - RICH_MEDIA_PEEL_DOWN - /// - ADVANCED_BANNER /// - VPAID_LINEAR /// - VPAID_NON_LINEAR #[serde(rename="richMediaExitOverrides")] @@ -3074,7 +3077,7 @@ pub struct CreativeAsset { /// List of companion creatives assigned to an in-stream video creative asset. Acceptable values include IDs of existing flash and image creatives. Applicable to INSTREAM_VIDEO creative type with dynamicAssetSelection set to true. #[serde(rename="companionCreativeIds")] pub companion_creative_ids: Option>, - /// Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. + /// Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR_VIDEO. Value must be greater than or equal to 1. pub duration: Option, /// Offset top unit for an asset. This is a read-only field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following creative types: all RICH_MEDIA. #[serde(rename="positionTopUnit")] @@ -3147,7 +3150,7 @@ pub struct CreativeAsset { /// Streaming URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(rename="streamingServingUrl")] pub streaming_serving_url: Option, - /// zIndex value of an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. + /// zIndex value of an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. Acceptable values are -999999999 to 999999999, inclusive. #[serde(rename="zIndex")] pub z_index: Option, /// Rich media child asset type. This is a read-only field. Applicable to the following creative types: all VPAID. @@ -3159,7 +3162,7 @@ pub struct CreativeAsset { /// Whether ActionScript3 is enabled for the flash asset. This is a read-only field. Applicable to the following creative type: FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE. #[serde(rename="actionScript3")] pub action_script3: Option, - /// Pushdown duration in seconds for an asset. Must be between 0 and 9.99. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. + /// Pushdown duration in seconds for an asset. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. Acceptable values are 0 to 9.99, inclusive. #[serde(rename="pushdownDuration")] pub pushdown_duration: Option, /// Identifier of this asset. This is the same identifier returned during creative asset insert operation. This is a required field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. @@ -3172,7 +3175,7 @@ pub struct CreativeAsset { pub ssl_compliant: Option, /// Offset position for an asset. Applicable to the following creative types: all RICH_MEDIA. pub position: Option, - /// Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. + /// Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. Value must be greater than or equal to 0. #[serde(rename="customStartTimeValue")] pub custom_start_time_value: Option, /// File name of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. @@ -3469,14 +3472,14 @@ impl Part for OrderContact {} pub struct DirectorySite { /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite". pub kind: Option, - /// Country ID of this directory site. + /// Country ID of this directory site. This is a read-only field. #[serde(rename="countryId")] pub country_id: Option, - /// Description of this directory site. + /// Description of this directory site. This is a read-only field. pub description: Option, /// Directory site settings. pub settings: Option, - /// Currency ID of this directory site. + /// Currency ID of this directory site. This is a read-only field. /// Possible values are: /// - "1" for USD /// - "2" for GBP @@ -3524,7 +3527,8 @@ pub struct DirectorySite { /// - "45" for RUB /// - "46" for AED /// - "47" for BGN - /// - "48" for HRK + /// - "48" for HRK + /// - "49" for MXN #[serde(rename="currencyId")] pub currency_id: Option, /// Tag types for regular placements. @@ -4533,7 +4537,7 @@ pub struct DeliverySchedule { /// Limit on the number of times an individual user can be served the ad within a specified period of time. #[serde(rename="frequencyCap")] pub frequency_cap: Option, - /// Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Must be between 1 and 10. + /// Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Acceptable values are 1 to 10, inclusive. #[serde(rename="impressionRatio")] pub impression_ratio: Option, } @@ -4907,10 +4911,10 @@ pub struct TagData { /// Tag string for serving an ad. #[serde(rename="impressionTag")] pub impression_tag: Option, - /// Creative associated with this placement tag. + /// Creative associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING. #[serde(rename="creativeId")] pub creative_id: Option, - /// Ad associated with this placement tag. + /// Ad associated with this placement tag. Applicable only when format is PLACEMENT_TAG_TRACKING. #[serde(rename="adId")] pub ad_id: Option, /// TagData tag format of this tag. @@ -5089,7 +5093,7 @@ pub struct RemarketingList { /// Number of users currently in the list. This is a read-only field. #[serde(rename="listSize")] pub list_size: Option, - /// Number of days that a user should remain in the remarketing list without an impression. + /// Number of days that a user should remain in the remarketing list without an impression. Acceptable values are 1 to 540, inclusive. #[serde(rename="lifeSpan")] pub life_span: Option, /// Dimension value for the advertiser ID that owns this remarketing list. This is a required field. @@ -5145,7 +5149,7 @@ pub struct FloodlightActivity { /// Advertiser ID of this floodlight activity. If this field is left blank, the value will be copied over either from the activity group's advertiser or the existing activity's advertiser. #[serde(rename="advertiserId")] pub advertiser_id: Option, - /// Code type used for cache busting in the generated tag. + /// Code type used for cache busting in the generated tag. Applicable only when floodlightActivityGroupType is COUNTER and countingMethod is STANDARD_COUNTING or UNIQUE_COUNTING. #[serde(rename="cacheBustingType")] pub cache_busting_type: Option, /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. @@ -5637,11 +5641,11 @@ impl ResponseResult for LandingPage {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Size { - /// Width of this size. + /// Width of this size. Acceptable values are 0 to 32767, inclusive. pub width: Option, /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#size". pub kind: Option, - /// Height of this size. + /// Height of this size. Acceptable values are 0 to 32767, inclusive. pub height: Option, /// ID of this size. This is a read-only, auto-generated field. pub id: Option, @@ -5966,10 +5970,7 @@ pub struct CreativeGroup { pub subaccount_id: Option, /// Name of this creative group. This is a required field and must be less than 256 characters long and unique among creative groups of the same advertiser. pub name: Option, - /// Subgroup of the creative group. Assign your creative groups to one of the following subgroups in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. - /// Acceptable values are: - /// - 1 - /// - 2 + /// Subgroup of the creative group. Assign your creative groups to a subgroup in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. Acceptable values are 1 to 2, inclusive. #[serde(rename="groupNumber")] pub group_number: Option, /// Advertiser ID of this creative group. This is a required field on insertion. @@ -6577,7 +6578,7 @@ impl Part for ReportFloodlightCriteriaReportProperties {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ConversionsBatchInsertResponse { - /// The status of each conversion's insertion status. The status is returned in the same order that conversions are inserted. + /// The insert status of each conversion. Statuses are returned in the same order that conversions are inserted. pub status: Option>, /// Indicates that some or all conversions failed to insert. #[serde(rename="hasFailures")] @@ -7082,12 +7083,12 @@ impl ResponseResult for Ad {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PricingSchedulePricingPeriod { - /// Units of this pricing period. + /// Units of this pricing period. Acceptable values are 0 to 10000000000, inclusive. pub units: Option, /// Pricing period start date. This date must be later than, or the same day as, the placement start date. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. #[serde(rename="startDate")] pub start_date: Option, - /// Rate or cost of this pricing period. + /// Rate or cost of this pricing period in nanos (i.e., multipled by 1000000000). Acceptable values are 0 to 1000000000000000000, inclusive. #[serde(rename="rateOrCostNanos")] pub rate_or_cost_nanos: Option, /// Pricing period end date. This date must be later than, or the same day as, the pricing period start date, but not later than the placement end date. The period end date can be the same date as the period start date. If, for example, you set 6/25/2015 as both the start and end dates, the effective pricing period date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. @@ -8924,7 +8925,7 @@ impl<'a, C, A> ReportMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a report file. + /// Retrieves a report file. This method supports media download. /// /// # Arguments /// @@ -11438,7 +11439,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a report file by its report ID and file ID. + /// Retrieves a report file by its report ID and file ID. This method supports media download. /// /// # Arguments /// @@ -15964,7 +15965,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut self._project_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> OrderDocumentListCall<'a, C, A> { @@ -16570,7 +16571,7 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, A> { @@ -19225,7 +19226,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: self._subaccount_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> UserRoleListCall<'a, C, A> { @@ -22289,7 +22290,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< self._campaign_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, A> { @@ -24516,7 +24517,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A self._report_id = new_value.to_string(); self } - /// Order of sorted results, default is 'DESCENDING'. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ReportFileListCall<'a, C, A> { @@ -25375,7 +25376,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau } -/// Retrieves a report file. +/// Retrieves a report file. This method supports media download. /// /// This method supports **media download**. To enable it, adjust the builder like this: /// `.param("alt", "media")`. @@ -26377,7 +26378,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is 'DESCENDING'. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ReportListCall<'a, C, A> { @@ -26391,7 +26392,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa self._sort_field = Some(new_value.to_string()); self } - /// The scope that defines which results are returned, default is 'MINE'. + /// The scope that defines which results are returned. /// /// Sets the *scope* query property to the given value. pub fn scope(mut self, new_value: &str) -> ReportListCall<'a, C, A> { @@ -27271,7 +27272,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A self._status = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AdvertiserListCall<'a, C, A> { @@ -28961,7 +28962,7 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> { @@ -30071,7 +30072,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau self._project_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> OrderListCall<'a, C, A> { @@ -31137,7 +31138,7 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> { @@ -32561,7 +32562,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 self._ssl_compliant = Some(new_value); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AdListCall<'a, C, A> { @@ -34464,7 +34465,7 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> { @@ -35267,7 +35268,7 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> { @@ -37199,7 +37200,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut self._subaccount_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> SiteListCall<'a, C, A> { @@ -38395,7 +38396,7 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> { @@ -41067,7 +41068,7 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, A> { @@ -41953,7 +41954,7 @@ impl<'a, C, A> TargetingTemplateListCall<'a, C, A> where C: BorrowMut TargetingTemplateListCall<'a, C, A> { @@ -43859,7 +43860,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> SubaccountListCall<'a, C, A> { @@ -46414,7 +46415,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is 'DESCENDING'. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> FileListCall<'a, C, A> { @@ -46428,7 +46429,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut self._sort_field = Some(new_value.to_string()); self } - /// The scope that defines which results are returned, default is 'MINE'. + /// The scope that defines which results are returned. /// /// Sets the *scope* query property to the given value. pub fn scope(mut self, new_value: &str) -> FileListCall<'a, C, A> { @@ -46501,7 +46502,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } -/// Retrieves a report file by its report ID and file ID. +/// Retrieves a report file by its report ID and file ID. This method supports media download. /// /// This method supports **media download**. To enable it, adjust the builder like this: /// `.param("alt", "media")`. @@ -47063,7 +47064,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupListCall<'a, C, A> { @@ -48566,7 +48567,7 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut self._type_ = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> InventoryItemListCall<'a, C, A> { @@ -50130,7 +50131,7 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> { @@ -52587,7 +52588,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: self._studio_creative_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CreativeListCall<'a, C, A> { @@ -54364,7 +54365,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: self._subaccount_id = Some(new_value.to_string()); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> CampaignListCall<'a, C, A> { @@ -54977,7 +54978,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> EventTagListCall<'a, C, A> { @@ -56901,7 +56902,7 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> { @@ -58566,7 +58567,7 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> { @@ -59663,7 +59664,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> ProjectListCall<'a, C, A> { @@ -60529,7 +60530,7 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, A> { @@ -63770,7 +63771,7 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> { @@ -66725,7 +66726,7 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> { @@ -68004,7 +68005,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> AccountListCall<'a, C, A> { @@ -69243,7 +69244,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: self._profile_id = new_value.to_string(); self } - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> PlacementListCall<'a, C, A> { diff --git a/gen/discovery1-cli/Cargo.toml b/gen/discovery1-cli/Cargo.toml index 8e1ed3d73c..91f3a351d8 100644 --- a/gen/discovery1-cli/Cargo.toml +++ b/gen/discovery1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/dns1-cli/Cargo.toml b/gen/dns1-cli/Cargo.toml index 8871601ce9..d32e03be37 100644 --- a/gen/dns1-cli/Cargo.toml +++ b/gen/dns1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dns1-cli" -version = "1.0.4+20161130" +version = "1.0.4+20170512" authors = ["Sebastian Thiel "] description = "A complete library to interact with dns (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dns1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-dns1] path = "../dns1" -version = "1.0.4+20161130" +version = "1.0.4+20170512" diff --git a/gen/dns1-cli/README.md b/gen/dns1-cli/README.md index c7adf852fb..a72b4c30f0 100644 --- a/gen/dns1-cli/README.md +++ b/gen/dns1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *dns* API at revision *20161130*. The CLI is at version *1.0.4*. +This documentation was generated from the *dns* API at revision *20170512*. The CLI is at version *1.0.4*. ```bash dns1 [options] diff --git a/gen/dns1-cli/mkdocs.yml b/gen/dns1-cli/mkdocs.yml index efe59b435f..6a98315bce 100644 --- a/gen/dns1-cli/mkdocs.yml +++ b/gen/dns1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dns v1.0.4+20161130 +site_name: dns v1.0.4+20170512 site_url: http://byron.github.io/google-apis-rs/google-dns1-cli site_description: A complete library to interact with dns (protocol v1) diff --git a/gen/dns1-cli/src/main.rs b/gen/dns1-cli/src/main.rs index 4039e1d5d8..d2a826b006 100644 --- a/gen/dns1-cli/src/main.rs +++ b/gen/dns1-cli/src/main.rs @@ -1026,7 +1026,7 @@ fn main() { let mut app = App::new("dns1") .author("Sebastian Thiel ") - .version("1.0.4+20161130") + .version("1.0.4+20170512") .about("Configures and serves authoritative DNS records.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dns1_cli") .arg(Arg::with_name("url") diff --git a/gen/dns1/Cargo.toml b/gen/dns1/Cargo.toml index 8507a6f167..6010bb5723 100644 --- a/gen/dns1/Cargo.toml +++ b/gen/dns1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-dns1" -version = "1.0.4+20161130" +version = "1.0.4+20170512" authors = ["Sebastian Thiel "] description = "A complete library to interact with dns (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dns1" homepage = "https://developers.google.com/cloud-dns" -documentation = "https://docs.rs/google-dns1/1.0.4+20161130" +documentation = "https://docs.rs/google-dns1/1.0.4+20170512" license = "MIT" keywords = ["dns", "google", "protocol", "web", "api"] diff --git a/gen/dns1/README.md b/gen/dns1/README.md index 0e63871b78..85bece4436 100644 --- a/gen/dns1/README.md +++ b/gen/dns1/README.md @@ -5,22 +5,22 @@ DO NOT EDIT ! --> The `google-dns1` library allows access to all features of the *Google dns* service. -This documentation was generated from *dns* crate version *1.0.4+20161130*, where *20161130* is the exact revision of the *dns:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *dns* crate version *1.0.4+20170512*, where *20170512* is the exact revision of the *dns:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *dns* *v1* API can be found at the [official documentation site](https://developers.google.com/cloud-dns). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.Dns.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.Dns.html) ... -* [changes](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.Change.html) - * [*create*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ChangeCreateCall.html), [*get*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ChangeGetCall.html) and [*list*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ChangeListCall.html) -* [managed zones](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ManagedZone.html) - * [*create*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ManagedZoneCreateCall.html), [*delete*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ManagedZoneDeleteCall.html), [*get*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ManagedZoneGetCall.html) and [*list*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ManagedZoneListCall.html) -* [projects](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.Project.html) - * [*get*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ProjectGetCall.html) -* [resource record sets](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ResourceRecordSet.html) - * [*list*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.ResourceRecordSetListCall.html) +* [changes](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.Change.html) + * [*create*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ChangeCreateCall.html), [*get*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ChangeGetCall.html) and [*list*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ChangeListCall.html) +* [managed zones](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ManagedZone.html) + * [*create*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ManagedZoneCreateCall.html), [*delete*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ManagedZoneDeleteCall.html), [*get*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ManagedZoneGetCall.html) and [*list*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ManagedZoneListCall.html) +* [projects](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.Project.html) + * [*get*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ProjectGetCall.html) +* [resource record sets](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ResourceRecordSet.html) + * [*list*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.ResourceRecordSetListCall.html) @@ -29,17 +29,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/struct.Dns.html)** +* **[Hub](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/struct.Dns.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.Part.html)** + * **[Parts](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -127,17 +127,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.Delegate.html), 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-dns1/1.0.4+20161130/google_dns1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.ResponseResult.html), 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")`. @@ -147,29 +147,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.CallBuilder.html) 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-dns1/1.0.4+20161130/google_dns1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-dns1/1.0.4+20161130/google_dns1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.CallBuilder.html), 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-dns1/1.0.4+20161130/google_dns1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-dns1/1.0.4+20170512/google_dns1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/dns1/src/lib.rs b/gen/dns1/src/lib.rs index 1caa6e60d4..f7bac7f808 100644 --- a/gen/dns1/src/lib.rs +++ b/gen/dns1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dns* crate version *1.0.4+20161130*, where *20161130* is the exact revision of the *dns:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *dns* crate version *1.0.4+20170512*, where *20170512* is the exact revision of the *dns:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *dns* *v1* API can be found at the //! [official documentation site](https://developers.google.com/cloud-dns). diff --git a/gen/doubleclickbidmanager1-cli/Cargo.toml b/gen/doubleclickbidmanager1-cli/Cargo.toml index 5076c8f993..570ff518d6 100644 --- a/gen/doubleclickbidmanager1-cli/Cargo.toml +++ b/gen/doubleclickbidmanager1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-doubleclickbidmanager1-cli" -version = "1.0.4+20161010" +version = "1.0.4+20170224" authors = ["Sebastian Thiel "] description = "A complete library to interact with DoubleClick Bid Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclickbidmanager1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-doubleclickbidmanager1] path = "../doubleclickbidmanager1" -version = "1.0.4+20161010" +version = "1.0.4+20170224" diff --git a/gen/doubleclickbidmanager1-cli/README.md b/gen/doubleclickbidmanager1-cli/README.md index 7f29003a2e..d6d16abb05 100644 --- a/gen/doubleclickbidmanager1-cli/README.md +++ b/gen/doubleclickbidmanager1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *DoubleClick Bid Manager* API at revision *20161010*. The CLI is at version *1.0.4*. +This documentation was generated from the *DoubleClick Bid Manager* API at revision *20170224*. The CLI is at version *1.0.4*. ```bash doubleclickbidmanager1 [options] @@ -45,6 +45,10 @@ doubleclickbidmanager1 [options] doubleclickbidmanager1 --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. diff --git a/gen/doubleclickbidmanager1-cli/mkdocs.yml b/gen/doubleclickbidmanager1-cli/mkdocs.yml index 6bebbc3ef3..0745fe057d 100644 --- a/gen/doubleclickbidmanager1-cli/mkdocs.yml +++ b/gen/doubleclickbidmanager1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: DoubleClick Bid Manager v1.0.4+20161010 +site_name: DoubleClick Bid Manager v1.0.4+20170224 site_url: http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1-cli site_description: A complete library to interact with DoubleClick Bid Manager (protocol v1) diff --git a/gen/doubleclickbidmanager1-cli/src/main.rs b/gen/doubleclickbidmanager1-cli/src/main.rs index b633d73da3..8cded1d852 100644 --- a/gen/doubleclickbidmanager1-cli/src/main.rs +++ b/gen/doubleclickbidmanager1-cli/src/main.rs @@ -111,6 +111,9 @@ impl<'n> Engine<'n> { 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)), @@ -195,6 +198,9 @@ impl<'n> Engine<'n> { 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)), @@ -300,6 +306,9 @@ impl<'n> Engine<'n> { 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)), @@ -349,6 +358,9 @@ impl<'n> Engine<'n> { 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); + } match match protocol { CallType::Standard => call.doit(), _ => unreachable!() @@ -390,6 +402,9 @@ impl<'n> Engine<'n> { 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)), @@ -439,6 +454,9 @@ impl<'n> Engine<'n> { 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)), @@ -524,6 +542,9 @@ impl<'n> Engine<'n> { 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); + } match match protocol { CallType::Standard => call.doit(), _ => unreachable!() @@ -565,6 +586,9 @@ impl<'n> Engine<'n> { 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)), @@ -650,6 +674,9 @@ impl<'n> Engine<'n> { 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)), @@ -1018,9 +1045,14 @@ fn main() { let mut app = App::new("doubleclickbidmanager1") .author("Sebastian Thiel ") - .version("1.0.4+20161010") + .version("1.0.4+20170224") .about("API for viewing and managing your reports in DoubleClick Bid Manager.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_doubleclickbidmanager1_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") diff --git a/gen/doubleclickbidmanager1/Cargo.toml b/gen/doubleclickbidmanager1/Cargo.toml index 304c42e776..3608b0bac3 100644 --- a/gen/doubleclickbidmanager1/Cargo.toml +++ b/gen/doubleclickbidmanager1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-doubleclickbidmanager1" -version = "1.0.4+20161010" +version = "1.0.4+20170224" authors = ["Sebastian Thiel "] description = "A complete library to interact with DoubleClick Bid Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclickbidmanager1" homepage = "https://developers.google.com/bid-manager/" -documentation = "https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010" +documentation = "https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224" license = "MIT" keywords = ["doubleclickbidmanage", "google", "protocol", "web", "api"] diff --git a/gen/doubleclickbidmanager1/README.md b/gen/doubleclickbidmanager1/README.md index 3d1b70de8d..0d58a0878e 100644 --- a/gen/doubleclickbidmanager1/README.md +++ b/gen/doubleclickbidmanager1/README.md @@ -5,22 +5,22 @@ DO NOT EDIT ! --> The `google-doubleclickbidmanager1` library allows access to all features of the *Google DoubleClick Bid Manager* service. -This documentation was generated from *DoubleClick Bid Manager* crate version *1.0.4+20161010*, where *20161010* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *DoubleClick Bid Manager* crate version *1.0.4+20170224*, where *20170224* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *DoubleClick Bid Manager* *v1* API can be found at the [official documentation site](https://developers.google.com/bid-manager/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.DoubleClickBidManager.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.DoubleClickBidManager.html) ... * lineitems - * [*downloadlineitems*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.LineitemDownloadlineitemCall.html) and [*uploadlineitems*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.LineitemUploadlineitemCall.html) -* [queries](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.Query.html) - * [*createquery*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.QueryCreatequeryCall.html), [*deletequery*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.QueryDeletequeryCall.html), [*getquery*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.QueryGetqueryCall.html), [*listqueries*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.QueryListqueryCall.html) and [*runquery*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.QueryRunqueryCall.html) -* [reports](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.Report.html) - * [*listreports*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.ReportListreportCall.html) + * [*downloadlineitems*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.LineitemDownloadlineitemCall.html) and [*uploadlineitems*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.LineitemUploadlineitemCall.html) +* [queries](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.Query.html) + * [*createquery*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.QueryCreatequeryCall.html), [*deletequery*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.QueryDeletequeryCall.html), [*getquery*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.QueryGetqueryCall.html), [*listqueries*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.QueryListqueryCall.html) and [*runquery*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.QueryRunqueryCall.html) +* [reports](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.Report.html) + * [*listreports*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.ReportListreportCall.html) * sdf - * [*download*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.SdfDownloadCall.html) + * [*download*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.SdfDownloadCall.html) @@ -29,17 +29,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/struct.DoubleClickBidManager.html)** +* **[Hub](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/struct.DoubleClickBidManager.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.Part.html)** + * **[Parts](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -122,17 +122,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.Delegate.html), 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-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.ResponseResult.html), 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")`. @@ -142,29 +142,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.CallBuilder.html) 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-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.CallBuilder.html), 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-doubleclickbidmanager1/1.0.4+20161010/google_doubleclickbidmanager1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-doubleclickbidmanager1/1.0.4+20170224/google_doubleclickbidmanager1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/doubleclickbidmanager1/src/lib.rs b/gen/doubleclickbidmanager1/src/lib.rs index edb663362c..1eaa4f6463 100644 --- a/gen/doubleclickbidmanager1/src/lib.rs +++ b/gen/doubleclickbidmanager1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *DoubleClick Bid Manager* crate version *1.0.4+20161010*, where *20161010* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *DoubleClick Bid Manager* crate version *1.0.4+20170224*, where *20170224* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *DoubleClick Bid Manager* *v1* API can be found at the //! [official documentation site](https://developers.google.com/bid-manager/). @@ -217,6 +217,28 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, // 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, Hash)] +pub enum Scope { + /// View and manage your reports in DoubleClick Bid Manager + Full, +} + +impl AsRef for Scope { + fn as_ref(&self) -> &str { + match *self { + Scope::Full => "https://www.googleapis.com/auth/doubleclickbidmanager", + } + } +} + +impl Default for Scope { + fn default() -> Scope { + Scope::Full + } +} @@ -641,7 +663,7 @@ pub struct DownloadRequest { /// Filter type used to filter line items to fetch. #[serde(rename="filterType")] pub filter_type: Option, - /// The IDs of the specified filter type. This is used to filter entities to fetch. At least one ID must be specified. Only one ID is allowed for the ADVERTISER_ID filter type. For INSERTION_ORDER_ID or LINE_ITEM_ID filter types all IDs must be from the same Advertiser. + /// The IDs of the specified filter type. This is used to filter entities to fetch. At least one ID must be specified. Only one ID is allowed for the ADVERTISER_ID filter type. For INSERTION_ORDER_ID or LINE_ITEM_ID filter types, all IDs must be from the same Advertiser. #[serde(rename="filterIds")] pub filter_ids: Option>, } @@ -868,6 +890,7 @@ impl<'a, C, A> SdfMethods<'a, C, A> { hub: self.hub, _request: request, _delegate: Default::default(), + _scopes: Default::default(), _additional_params: Default::default(), } } @@ -925,6 +948,7 @@ impl<'a, C, A> LineitemMethods<'a, C, A> { hub: self.hub, _request: request, _delegate: Default::default(), + _scopes: Default::default(), _additional_params: Default::default(), } } @@ -941,6 +965,7 @@ impl<'a, C, A> LineitemMethods<'a, C, A> { hub: self.hub, _request: request, _delegate: Default::default(), + _scopes: Default::default(), _additional_params: Default::default(), } } @@ -998,6 +1023,7 @@ impl<'a, C, A> ReportMethods<'a, C, A> { hub: self.hub, _query_id: query_id.to_string(), _delegate: Default::default(), + _scopes: Default::default(), _additional_params: Default::default(), } } @@ -1050,6 +1076,7 @@ impl<'a, C, A> QueryMethods<'a, C, A> { QueryListqueryCall { hub: self.hub, _delegate: Default::default(), + _scopes: Default::default(), _additional_params: Default::default(), } } @@ -1066,6 +1093,7 @@ impl<'a, C, A> QueryMethods<'a, C, A> { hub: self.hub, _query_id: query_id.to_string(), _delegate: Default::default(), + _scopes: Default::default(), _additional_params: Default::default(), } } @@ -1082,6 +1110,7 @@ impl<'a, C, A> QueryMethods<'a, C, A> { hub: self.hub, _request: request, _delegate: Default::default(), + _scopes: Default::default(), _additional_params: Default::default(), } } @@ -1098,6 +1127,7 @@ impl<'a, C, A> QueryMethods<'a, C, A> { hub: self.hub, _query_id: query_id.to_string(), _delegate: Default::default(), + _scopes: Default::default(), _additional_params: Default::default(), } } @@ -1116,6 +1146,7 @@ impl<'a, C, A> QueryMethods<'a, C, A> { _request: request, _query_id: query_id.to_string(), _delegate: Default::default(), + _scopes: Default::default(), _additional_params: Default::default(), } } @@ -1172,6 +1203,7 @@ pub struct SdfDownloadCall<'a, C, A> _request: DownloadRequest, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, + _scopes: BTreeMap } impl<'a, C, A> CallBuilder for SdfDownloadCall<'a, C, A> {} @@ -1204,17 +1236,8 @@ impl<'a, C, A> SdfDownloadCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/sdf/download".to_string(); - - let mut key = self.hub.auth.borrow_mut().api_key(); - if key.is_none() { - key = dlg.api_key(); - } - match key { - Some(value) => params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1237,11 +1260,25 @@ impl<'a, C, A> SdfDownloadCall<'a, C, A> where C: BorrowMut, A: o loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) .header(ContentType(json_mime_type.clone())) .header(ContentLength(request_size as u64)) .body(&mut request_value_reader); @@ -1337,6 +1374,22 @@ impl<'a, C, A> SdfDownloadCall<'a, C, A> where C: BorrowMut, A: o self } + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> SdfDownloadCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } } @@ -1383,6 +1436,7 @@ pub struct LineitemUploadlineitemCall<'a, C, A> _request: UploadLineItemsRequest, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, + _scopes: BTreeMap } impl<'a, C, A> CallBuilder for LineitemUploadlineitemCall<'a, C, A> {} @@ -1415,17 +1469,8 @@ impl<'a, C, A> LineitemUploadlineitemCall<'a, C, A> where C: BorrowMut params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1448,11 +1493,25 @@ impl<'a, C, A> LineitemUploadlineitemCall<'a, C, A> where C: BorrowMut token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) .header(ContentType(json_mime_type.clone())) .header(ContentLength(request_size as u64)) .body(&mut request_value_reader); @@ -1548,6 +1607,22 @@ impl<'a, C, A> LineitemUploadlineitemCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LineitemUploadlineitemCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } } @@ -1594,6 +1669,7 @@ pub struct LineitemDownloadlineitemCall<'a, C, A> _request: DownloadLineItemsRequest, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, + _scopes: BTreeMap } impl<'a, C, A> CallBuilder for LineitemDownloadlineitemCall<'a, C, A> {} @@ -1626,17 +1702,8 @@ impl<'a, C, A> LineitemDownloadlineitemCall<'a, C, A> where C: BorrowMut params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1659,11 +1726,25 @@ impl<'a, C, A> LineitemDownloadlineitemCall<'a, C, A> where C: BorrowMut token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) .header(ContentType(json_mime_type.clone())) .header(ContentLength(request_size as u64)) .body(&mut request_value_reader); @@ -1759,6 +1840,22 @@ impl<'a, C, A> LineitemDownloadlineitemCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LineitemDownloadlineitemCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } } @@ -1799,6 +1896,7 @@ pub struct ReportListreportCall<'a, C, A> _query_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, + _scopes: BTreeMap } impl<'a, C, A> CallBuilder for ReportListreportCall<'a, C, A> {} @@ -1832,17 +1930,8 @@ impl<'a, C, A> ReportListreportCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/queries/{queryId}/reports".to_string(); - - let mut key = self.hub.auth.borrow_mut().api_key(); - if key.is_none() { - key = dlg.api_key(); - } - match key { - Some(value) => params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{queryId}", "queryId")].iter() { @@ -1875,10 +1964,24 @@ impl<'a, C, A> ReportListreportCall<'a, C, A> where C: BorrowMut, loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())); + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); dlg.pre_request(); req.send() @@ -1972,6 +2075,22 @@ impl<'a, C, A> ReportListreportCall<'a, C, A> where C: BorrowMut, self } + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> ReportListreportCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } } @@ -2011,6 +2130,7 @@ pub struct QueryListqueryCall<'a, C, A> hub: &'a DoubleClickBidManager, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, + _scopes: BTreeMap } impl<'a, C, A> CallBuilder for QueryListqueryCall<'a, C, A> {} @@ -2043,17 +2163,8 @@ impl<'a, C, A> QueryListqueryCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/queries".to_string(); - - let mut key = self.hub.auth.borrow_mut().api_key(); - if key.is_none() { - key = dlg.api_key(); - } - match key { - Some(value) => params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2065,10 +2176,24 @@ impl<'a, C, A> QueryListqueryCall<'a, C, A> where C: BorrowMut, A loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())); + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); dlg.pre_request(); req.send() @@ -2152,6 +2277,22 @@ impl<'a, C, A> QueryListqueryCall<'a, C, A> where C: BorrowMut, A self } + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> QueryListqueryCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } } @@ -2192,6 +2333,7 @@ pub struct QueryGetqueryCall<'a, C, A> _query_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, + _scopes: BTreeMap } impl<'a, C, A> CallBuilder for QueryGetqueryCall<'a, C, A> {} @@ -2225,17 +2367,8 @@ impl<'a, C, A> QueryGetqueryCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/query/{queryId}".to_string(); - - let mut key = self.hub.auth.borrow_mut().api_key(); - if key.is_none() { - key = dlg.api_key(); - } - match key { - Some(value) => params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{queryId}", "queryId")].iter() { @@ -2268,10 +2401,24 @@ impl<'a, C, A> QueryGetqueryCall<'a, C, A> where C: BorrowMut, A: loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())); + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); dlg.pre_request(); req.send() @@ -2365,6 +2512,22 @@ impl<'a, C, A> QueryGetqueryCall<'a, C, A> where C: BorrowMut, A: self } + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> QueryGetqueryCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } } @@ -2411,6 +2574,7 @@ pub struct QueryCreatequeryCall<'a, C, A> _request: Query, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, + _scopes: BTreeMap } impl<'a, C, A> CallBuilder for QueryCreatequeryCall<'a, C, A> {} @@ -2443,17 +2607,8 @@ impl<'a, C, A> QueryCreatequeryCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/query".to_string(); - - let mut key = self.hub.auth.borrow_mut().api_key(); - if key.is_none() { - key = dlg.api_key(); - } - match key { - Some(value) => params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2476,11 +2631,25 @@ impl<'a, C, A> QueryCreatequeryCall<'a, C, A> where C: BorrowMut, loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) .header(ContentType(json_mime_type.clone())) .header(ContentLength(request_size as u64)) .body(&mut request_value_reader); @@ -2576,6 +2745,22 @@ impl<'a, C, A> QueryCreatequeryCall<'a, C, A> where C: BorrowMut, self } + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> QueryCreatequeryCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } } @@ -2616,6 +2801,7 @@ pub struct QueryDeletequeryCall<'a, C, A> _query_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, + _scopes: BTreeMap } impl<'a, C, A> CallBuilder for QueryDeletequeryCall<'a, C, A> {} @@ -2648,17 +2834,8 @@ impl<'a, C, A> QueryDeletequeryCall<'a, C, A> where C: BorrowMut, let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/query/{queryId}".to_string(); - - let mut key = self.hub.auth.borrow_mut().api_key(); - if key.is_none() { - key = dlg.api_key(); - } - match key { - Some(value) => params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{queryId}", "queryId")].iter() { @@ -2691,10 +2868,24 @@ impl<'a, C, A> QueryDeletequeryCall<'a, C, A> where C: BorrowMut, loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) - .header(UserAgent(self.hub._user_agent.clone())); + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); dlg.pre_request(); req.send() @@ -2778,6 +2969,22 @@ impl<'a, C, A> QueryDeletequeryCall<'a, C, A> where C: BorrowMut, self } + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> QueryDeletequeryCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } } @@ -2825,6 +3032,7 @@ pub struct QueryRunqueryCall<'a, C, A> _query_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, + _scopes: BTreeMap } impl<'a, C, A> CallBuilder for QueryRunqueryCall<'a, C, A> {} @@ -2857,17 +3065,8 @@ impl<'a, C, A> QueryRunqueryCall<'a, C, A> where C: BorrowMut, A: let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/query/{queryId}".to_string(); - - let mut key = self.hub.auth.borrow_mut().api_key(); - if key.is_none() { - key = dlg.api_key(); - } - match key { - Some(value) => params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{queryId}", "queryId")].iter() { @@ -2911,11 +3110,25 @@ impl<'a, C, A> QueryRunqueryCall<'a, C, A> where C: BorrowMut, A: loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) .header(ContentType(json_mime_type.clone())) .header(ContentLength(request_size as u64)) .body(&mut request_value_reader); @@ -3011,6 +3224,22 @@ impl<'a, C, A> QueryRunqueryCall<'a, C, A> where C: BorrowMut, A: self } + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> QueryRunqueryCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } } diff --git a/gen/doubleclicksearch2-cli/Cargo.toml b/gen/doubleclicksearch2-cli/Cargo.toml index 306edca9e8..2f28589409 100644 --- a/gen/doubleclicksearch2-cli/Cargo.toml +++ b/gen/doubleclicksearch2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-doubleclicksearch2-cli" -version = "1.0.4+20161108" +version = "1.0.4+20170509" authors = ["Sebastian Thiel "] description = "A complete library to interact with doubleclicksearch (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclicksearch2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-doubleclicksearch2] path = "../doubleclicksearch2" -version = "1.0.4+20161108" +version = "1.0.4+20170509" diff --git a/gen/doubleclicksearch2-cli/README.md b/gen/doubleclicksearch2-cli/README.md index c4a34be97a..6dc3735dc7 100644 --- a/gen/doubleclicksearch2-cli/README.md +++ b/gen/doubleclicksearch2-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *doubleclicksearch* API at revision *20161108*. The CLI is at version *1.0.4*. +This documentation was generated from the *doubleclicksearch* API at revision *20170509*. The CLI is at version *1.0.4*. ```bash doubleclicksearch2 [options] diff --git a/gen/doubleclicksearch2-cli/mkdocs.yml b/gen/doubleclicksearch2-cli/mkdocs.yml index 8e85699104..bc182d63c4 100644 --- a/gen/doubleclicksearch2-cli/mkdocs.yml +++ b/gen/doubleclicksearch2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: doubleclicksearch v1.0.4+20161108 +site_name: doubleclicksearch v1.0.4+20170509 site_url: http://byron.github.io/google-apis-rs/google-doubleclicksearch2-cli site_description: A complete library to interact with doubleclicksearch (protocol v2) diff --git a/gen/doubleclicksearch2-cli/src/main.rs b/gen/doubleclicksearch2-cli/src/main.rs index 41bb61b213..fe63825ad6 100644 --- a/gen/doubleclicksearch2-cli/src/main.rs +++ b/gen/doubleclicksearch2-cli/src/main.rs @@ -1292,7 +1292,7 @@ fn main() { let mut app = App::new("doubleclicksearch2") .author("Sebastian Thiel ") - .version("1.0.4+20161108") + .version("1.0.4+20170509") .about("Reports and modifies your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions).") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_doubleclicksearch2_cli") .arg(Arg::with_name("url") diff --git a/gen/doubleclicksearch2/Cargo.toml b/gen/doubleclicksearch2/Cargo.toml index 3eec67292a..a9427570e9 100644 --- a/gen/doubleclicksearch2/Cargo.toml +++ b/gen/doubleclicksearch2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-doubleclicksearch2" -version = "1.0.4+20161108" +version = "1.0.4+20170509" authors = ["Sebastian Thiel "] description = "A complete library to interact with doubleclicksearch (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclicksearch2" homepage = "https://developers.google.com/doubleclick-search/" -documentation = "https://docs.rs/google-doubleclicksearch2/1.0.4+20161108" +documentation = "https://docs.rs/google-doubleclicksearch2/1.0.4+20170509" license = "MIT" keywords = ["doubleclicksearch", "google", "protocol", "web", "api"] diff --git a/gen/doubleclicksearch2/README.md b/gen/doubleclicksearch2/README.md index 1250da697f..261b87cbb4 100644 --- a/gen/doubleclicksearch2/README.md +++ b/gen/doubleclicksearch2/README.md @@ -5,25 +5,25 @@ DO NOT EDIT ! --> The `google-doubleclicksearch2` library allows access to all features of the *Google doubleclicksearch* service. -This documentation was generated from *doubleclicksearch* crate version *1.0.4+20161108*, where *20161108* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *doubleclicksearch* crate version *1.0.4+20170509*, where *20170509* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *doubleclicksearch* *v2* API can be found at the [official documentation site](https://developers.google.com/doubleclick-search/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.Doubleclicksearch.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.Doubleclicksearch.html) ... -* [conversion](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.Conversion.html) - * [*get*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ConversionGetCall.html), [*insert*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ConversionInsertCall.html), [*patch*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ConversionPatchCall.html), [*update*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ConversionUpdateCall.html) and [*update availability*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ConversionUpdateAvailabilityCall.html) -* [reports](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.Report.html) - * [*generate*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ReportGenerateCall.html), [*get*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ReportGetCall.html), [*get file*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ReportGetFileCall.html) and [*request*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ReportRequestCall.html) -* [saved columns](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.SavedColumn.html) - * [*list*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.SavedColumnListCall.html) +* [conversion](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.Conversion.html) + * [*get*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ConversionGetCall.html), [*insert*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ConversionInsertCall.html), [*patch*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ConversionPatchCall.html), [*update*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ConversionUpdateCall.html) and [*update availability*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ConversionUpdateAvailabilityCall.html) +* [reports](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.Report.html) + * [*generate*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ReportGenerateCall.html), [*get*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ReportGetCall.html), [*get file*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ReportGetFileCall.html) and [*request*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ReportRequestCall.html) +* [saved columns](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.SavedColumn.html) + * [*list*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.SavedColumnListCall.html) Download supported by ... -* [*get file reports*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.ReportGetFileCall.html) +* [*get file reports*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.ReportGetFileCall.html) @@ -31,17 +31,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/struct.Doubleclicksearch.html)** +* **[Hub](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/struct.Doubleclicksearch.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.Part.html)** + * **[Parts](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -126,17 +126,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.Delegate.html), 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-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.ResponseResult.html), 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")`. @@ -146,29 +146,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.CallBuilder.html) 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-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.CallBuilder.html), 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-doubleclicksearch2/1.0.4+20161108/google_doubleclicksearch2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-doubleclicksearch2/1.0.4+20170509/google_doubleclicksearch2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/doubleclicksearch2/src/lib.rs b/gen/doubleclicksearch2/src/lib.rs index a96313830f..47598f682c 100644 --- a/gen/doubleclicksearch2/src/lib.rs +++ b/gen/doubleclicksearch2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *doubleclicksearch* crate version *1.0.4+20161108*, where *20161108* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *doubleclicksearch* crate version *1.0.4+20170509*, where *20170509* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *doubleclicksearch* *v2* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-search/). @@ -426,7 +426,8 @@ pub struct Conversion { /// DS ad ID. #[serde(rename="adId")] pub ad_id: Option, - /// For offline conversions, this is an ID that advertisers are required to provide. Advertisers can specify any ID that is meaningful to them. For online conversions, DS copies the dsConversionId or floodlightOrderId into this property depending on the advertiser's Floodlight instructions. + /// For offline conversions, advertisers provide this ID. Advertisers can specify any ID that is meaningful to them. Each conversion in a request must specify a unique ID, and the combination of ID and timestamp must be unique amongst all conversions within the advertiser. + /// For online conversions, DS copies the dsConversionId or floodlightOrderId into this property depending on the advertiser's Floodlight instructions. #[serde(rename="conversionId")] pub conversion_id: Option, /// The time at which the conversion was last modified, in epoch millis UTC. diff --git a/gen/drive2-cli/Cargo.toml b/gen/drive2-cli/Cargo.toml index 7a0e00d098..5cbc1ca589 100644 --- a/gen/drive2-cli/Cargo.toml +++ b/gen/drive2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-drive2-cli" -version = "1.0.4+20161212" +version = "1.0.4+20170512" authors = ["Sebastian Thiel "] description = "A complete library to interact with drive (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/drive2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-drive2] path = "../drive2" -version = "1.0.4+20161212" +version = "1.0.4+20170512" diff --git a/gen/drive2-cli/README.md b/gen/drive2-cli/README.md index 493200c44c..06200a587f 100644 --- a/gen/drive2-cli/README.md +++ b/gen/drive2-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *drive* API at revision *20161212*. The CLI is at version *1.0.4*. +This documentation was generated from the *drive* API at revision *20170512*. The CLI is at version *1.0.4*. ```bash drive2 [options] @@ -36,6 +36,7 @@ drive2 [options] list [-p ]... [-o ] changes get [-p ]... [-o ] + get-start-page-token [-p ]... [-o ] list [-p ]... [-o ] watch (-r )... [-p ]... [-o ] channels @@ -103,6 +104,12 @@ drive2 [options] list [-p ]... [-o ] patch (-r )... [-p ]... [-o ] update (-r )... [-p ]... [-o ] + teamdrives + delete [-p ]... + get [-p ]... [-o ] + insert (-r )... [-p ]... [-o ] + list [-p ]... [-o ] + update (-r )... [-p ]... [-o ] drive2 --help Configuration: diff --git a/gen/drive2-cli/mkdocs.yml b/gen/drive2-cli/mkdocs.yml index 449425e792..6b0e895263 100644 --- a/gen/drive2-cli/mkdocs.yml +++ b/gen/drive2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: drive v1.0.4+20161212 +site_name: drive v1.0.4+20170512 site_url: http://byron.github.io/google-apis-rs/google-drive2-cli site_description: A complete library to interact with drive (protocol v2) @@ -13,6 +13,7 @@ pages: - ['apps_get.md', 'Apps', 'Get'] - ['apps_list.md', 'Apps', 'List'] - ['changes_get.md', 'Changes', 'Get'] +- ['changes_get-start-page-token.md', 'Changes', 'Get Start Page Token'] - ['changes_list.md', 'Changes', 'List'] - ['changes_watch.md', 'Changes', 'Watch'] - ['channels_stop.md', 'Channels', 'Stop'] @@ -70,6 +71,11 @@ pages: - ['revisions_list.md', 'Revisions', 'List'] - ['revisions_patch.md', 'Revisions', 'Patch'] - ['revisions_update.md', 'Revisions', 'Update'] +- ['teamdrives_delete.md', 'Teamdrives', 'Delete'] +- ['teamdrives_get.md', 'Teamdrives', 'Get'] +- ['teamdrives_insert.md', 'Teamdrives', 'Insert'] +- ['teamdrives_list.md', 'Teamdrives', 'List'] +- ['teamdrives_update.md', 'Teamdrives', 'Update'] theme: readthedocs diff --git a/gen/drive2-cli/src/main.rs b/gen/drive2-cli/src/main.rs index b2a89c01a5..88f65a33f8 100644 --- a/gen/drive2-cli/src/main.rs +++ b/gen/drive2-cli/src/main.rs @@ -228,6 +228,12 @@ impl<'n> Engine<'n> { 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 { + "team-drive-id" => { + call = call.team_drive_id(value.unwrap_or("")); + }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -241,6 +247,66 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["team-drive-id", "supports-team-drives"].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(), + _ => 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(()) + } + } + } + } + + fn _changes_get_start_page_token(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.changes().get_start_page_token(); + 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 { + "team-drive-id" => { + call = call.team_drive_id(value.unwrap_or("")); + }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, + _ => { + 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(["team-drive-id", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -280,6 +346,12 @@ impl<'n> Engine<'n> { 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 { + "team-drive-id" => { + call = call.team_drive_id(value.unwrap_or("")); + }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "start-change-id" => { call = call.start_change_id(value.unwrap_or("")); }, @@ -292,12 +364,18 @@ impl<'n> Engine<'n> { "max-results" => { call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); }, + "include-team-drive-items" => { + call = call.include_team_drive_items(arg_from_str(value.unwrap_or("false"), err, "include-team-drive-items", "boolean")); + }, "include-subscribed" => { call = call.include_subscribed(arg_from_str(value.unwrap_or("false"), err, "include-subscribed", "boolean")); }, "include-deleted" => { call = call.include_deleted(arg_from_str(value.unwrap_or("false"), err, "include-deleted", "boolean")); }, + "include-corpus-removals" => { + call = call.include_corpus_removals(arg_from_str(value.unwrap_or("false"), err, "include-corpus-removals", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -311,7 +389,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["include-subscribed", "include-deleted", "max-results", "page-token", "spaces", "start-change-id"].iter().map(|v|*v)); + v.extend(["include-subscribed", "include-deleted", "include-team-drive-items", "max-results", "page-token", "spaces", "supports-team-drives", "start-change-id", "team-drive-id", "include-corpus-removals"].iter().map(|v|*v)); v } )); } } @@ -393,6 +471,12 @@ impl<'n> Engine<'n> { 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 { + "team-drive-id" => { + call = call.team_drive_id(value.unwrap_or("")); + }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "start-change-id" => { call = call.start_change_id(value.unwrap_or("")); }, @@ -405,12 +489,18 @@ impl<'n> Engine<'n> { "max-results" => { call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); }, + "include-team-drive-items" => { + call = call.include_team_drive_items(arg_from_str(value.unwrap_or("false"), err, "include-team-drive-items", "boolean")); + }, "include-subscribed" => { call = call.include_subscribed(arg_from_str(value.unwrap_or("false"), err, "include-subscribed", "boolean")); }, "include-deleted" => { call = call.include_deleted(arg_from_str(value.unwrap_or("false"), err, "include-deleted", "boolean")); }, + "include-corpus-removals" => { + call = call.include_corpus_removals(arg_from_str(value.unwrap_or("false"), err, "include-corpus-removals", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -424,7 +514,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["include-subscribed", "include-deleted", "max-results", "page-token", "spaces", "start-change-id"].iter().map(|v|*v)); + v.extend(["include-subscribed", "include-deleted", "include-team-drive-items", "max-results", "page-token", "spaces", "supports-team-drives", "start-change-id", "team-drive-id", "include-corpus-removals"].iter().map(|v|*v)); v } )); } } @@ -682,6 +772,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -695,6 +788,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1295,6 +1389,7 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "has-thumbnail" => Some(("hasThumbnail", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "mime-type" => Some(("mimeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "app-data-contents" => Some(("appDataContents", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "thumbnail-link" => Some(("thumbnailLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "labels.restricted" => Some(("labels.restricted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -1305,7 +1400,7 @@ impl<'n> Engine<'n> { "labels.trashed" => Some(("labels.trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "indexable-text.text" => Some(("indexableText.text", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-version" => Some(("thumbnailVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "last-modifying-user-name" => Some(("lastModifyingUserName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -1317,6 +1412,12 @@ impl<'n> Engine<'n> { "sharing-user.permission-id" => Some(("sharingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "sharing-user.is-authenticated-user" => Some(("sharingUser.isAuthenticatedUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "sharing-user.email-address" => Some(("sharingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.picture.url" => Some(("trashingUser.picture.url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.kind" => Some(("trashingUser.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.display-name" => Some(("trashingUser.displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.permission-id" => Some(("trashingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.is-authenticated-user" => Some(("trashingUser.isAuthenticatedUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashing-user.email-address" => Some(("trashingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "video-media-metadata.width" => Some(("videoMediaMetadata.width", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "video-media-metadata.duration-millis" => Some(("videoMediaMetadata.durationMillis", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "video-media-metadata.height" => Some(("videoMediaMetadata.height", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -1328,14 +1429,33 @@ impl<'n> Engine<'n> { "last-modifying-user.email-address" => Some(("lastModifyingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "copyable" => Some(("copyable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "folder-color-rgb" => Some(("folderColorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "marked-viewed-by-me-date" => Some(("markedViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner-names" => Some(("ownerNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-untrash" => Some(("capabilities.canUntrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete" => Some(("capabilities.canDelete", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-team-drive-item" => Some(("capabilities.canMoveTeamDriveItem", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-restricted-download" => Some(("capabilities.canChangeRestrictedDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-item-into-team-drive" => Some(("capabilities.canMoveItemIntoTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-trash" => Some(("capabilities.canTrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-read-team-drive" => Some(("capabilities.canReadTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "shared-with-me-date" => Some(("sharedWithMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-view-link" => Some(("webViewLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "last-viewed-by-me-date" => Some(("lastViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "export-links" => Some(("exportLinks", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "shared" => Some(("shared", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "full-file-extension" => Some(("fullFileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "open-with-links" => Some(("openWithLinks", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "full-file-extension" => Some(("fullFileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashed-date" => Some(("trashedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "can-read-revisions" => Some(("canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "image-media-metadata.exposure-bias" => Some(("imageMediaMetadata.exposureBias", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "image-media-metadata.exposure-time" => Some(("imageMediaMetadata.exposureTime", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), @@ -1362,18 +1482,17 @@ impl<'n> Engine<'n> { "image-media-metadata.camera-model" => Some(("imageMediaMetadata.cameraModel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-content-link" => Some(("webContentLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "file-size" => Some(("fileSize", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "editable" => Some(("editable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "marked-viewed-by-me-date" => Some(("markedViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "can-comment" => Some(("canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "quota-bytes-used" => Some(("quotaBytesUsed", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "embed-link" => Some(("embedLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "created-date" => Some(("createdDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "last-viewed-by-me-date" => Some(("lastViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "team-drive-id" => Some(("teamDriveId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "md5-checksum" => Some(("md5Checksum", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "icon-link" => Some(("iconLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-open-with-link" => Some(("defaultOpenWithLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "embed-link" => Some(("embedLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1384,6 +1503,7 @@ impl<'n> Engine<'n> { "user-permission.with-link" => Some(("userPermission.withLink", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "user-permission.domain" => Some(("userPermission.domain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.name" => Some(("userPermission.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "user-permission.deleted" => Some(("userPermission.deleted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "user-permission.kind" => Some(("userPermission.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.value" => Some(("userPermission.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.id" => Some(("userPermission.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1396,15 +1516,16 @@ impl<'n> Engine<'n> { "user-permission.additional-roles" => Some(("userPermission.additionalRoles", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "user-permission.self-link" => Some(("userPermission.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.photo-link" => Some(("userPermission.photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "shareable" => Some(("shareable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "original-filename" => Some(("originalFilename", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "file-extension" => Some(("fileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "has-augmented-permissions" => Some(("hasAugmentedPermissions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "file-size" => Some(("fileSize", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "expiration-date", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-thumbnail", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "thumbnail-version", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-add-children", "can-change-restricted-download", "can-comment", "can-copy", "can-delete", "can-download", "can-edit", "can-list-children", "can-move-item-into-team-drive", "can-move-team-drive-item", "can-read-revisions", "can-read-team-drive", "can-remove-children", "can-rename", "can-share", "can-trash", "can-untrash", "capabilities", "color-space", "copyable", "created-date", "date", "default-open-with-link", "deleted", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "expiration-date", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-augmented-permissions", "has-thumbnail", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "team-drive-id", "text", "thumbnail", "thumbnail-link", "thumbnail-version", "title", "trashed", "trashed-date", "trashing-user", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1427,6 +1548,9 @@ impl<'n> Engine<'n> { "timed-text-language" => { call = call.timed_text_language(value.unwrap_or("")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "pinned" => { call = call.pinned(arg_from_str(value.unwrap_or("false"), err, "pinned", "boolean")); }, @@ -1452,7 +1576,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["convert", "ocr-language", "visibility", "pinned", "ocr", "timed-text-track-name", "timed-text-language"].iter().map(|v|*v)); + v.extend(["convert", "ocr-language", "supports-team-drives", "pinned", "visibility", "ocr", "timed-text-track-name", "timed-text-language"].iter().map(|v|*v)); v } )); } } @@ -1492,6 +1616,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1505,6 +1632,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1700,6 +1828,9 @@ impl<'n> Engine<'n> { "update-viewed-date" => { call = call.update_viewed_date(arg_from_str(value.unwrap_or("false"), err, "update-viewed-date", "boolean")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "revision-id" => { call = call.revision_id(value.unwrap_or("")); }, @@ -1725,7 +1856,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["revision-id", "update-viewed-date", "acknowledge-abuse", "projection"].iter().map(|v|*v)); + v.extend(["revision-id", "update-viewed-date", "acknowledge-abuse", "projection", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1789,6 +1920,7 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "has-thumbnail" => Some(("hasThumbnail", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "mime-type" => Some(("mimeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "app-data-contents" => Some(("appDataContents", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "thumbnail-link" => Some(("thumbnailLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "labels.restricted" => Some(("labels.restricted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -1799,7 +1931,7 @@ impl<'n> Engine<'n> { "labels.trashed" => Some(("labels.trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "indexable-text.text" => Some(("indexableText.text", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-version" => Some(("thumbnailVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "last-modifying-user-name" => Some(("lastModifyingUserName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -1811,6 +1943,12 @@ impl<'n> Engine<'n> { "sharing-user.permission-id" => Some(("sharingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "sharing-user.is-authenticated-user" => Some(("sharingUser.isAuthenticatedUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "sharing-user.email-address" => Some(("sharingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.picture.url" => Some(("trashingUser.picture.url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.kind" => Some(("trashingUser.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.display-name" => Some(("trashingUser.displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.permission-id" => Some(("trashingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.is-authenticated-user" => Some(("trashingUser.isAuthenticatedUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashing-user.email-address" => Some(("trashingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "video-media-metadata.width" => Some(("videoMediaMetadata.width", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "video-media-metadata.duration-millis" => Some(("videoMediaMetadata.durationMillis", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "video-media-metadata.height" => Some(("videoMediaMetadata.height", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -1822,14 +1960,33 @@ impl<'n> Engine<'n> { "last-modifying-user.email-address" => Some(("lastModifyingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "copyable" => Some(("copyable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "folder-color-rgb" => Some(("folderColorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "marked-viewed-by-me-date" => Some(("markedViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner-names" => Some(("ownerNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-untrash" => Some(("capabilities.canUntrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete" => Some(("capabilities.canDelete", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-team-drive-item" => Some(("capabilities.canMoveTeamDriveItem", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-restricted-download" => Some(("capabilities.canChangeRestrictedDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-item-into-team-drive" => Some(("capabilities.canMoveItemIntoTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-trash" => Some(("capabilities.canTrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-read-team-drive" => Some(("capabilities.canReadTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "shared-with-me-date" => Some(("sharedWithMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-view-link" => Some(("webViewLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "last-viewed-by-me-date" => Some(("lastViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "export-links" => Some(("exportLinks", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "shared" => Some(("shared", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "full-file-extension" => Some(("fullFileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "open-with-links" => Some(("openWithLinks", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "full-file-extension" => Some(("fullFileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashed-date" => Some(("trashedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "can-read-revisions" => Some(("canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "image-media-metadata.exposure-bias" => Some(("imageMediaMetadata.exposureBias", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "image-media-metadata.exposure-time" => Some(("imageMediaMetadata.exposureTime", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), @@ -1856,18 +2013,17 @@ impl<'n> Engine<'n> { "image-media-metadata.camera-model" => Some(("imageMediaMetadata.cameraModel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-content-link" => Some(("webContentLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "file-size" => Some(("fileSize", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "editable" => Some(("editable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "marked-viewed-by-me-date" => Some(("markedViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "can-comment" => Some(("canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "quota-bytes-used" => Some(("quotaBytesUsed", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "embed-link" => Some(("embedLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "created-date" => Some(("createdDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "last-viewed-by-me-date" => Some(("lastViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "team-drive-id" => Some(("teamDriveId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "md5-checksum" => Some(("md5Checksum", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "icon-link" => Some(("iconLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-open-with-link" => Some(("defaultOpenWithLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "embed-link" => Some(("embedLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1878,6 +2034,7 @@ impl<'n> Engine<'n> { "user-permission.with-link" => Some(("userPermission.withLink", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "user-permission.domain" => Some(("userPermission.domain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.name" => Some(("userPermission.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "user-permission.deleted" => Some(("userPermission.deleted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "user-permission.kind" => Some(("userPermission.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.value" => Some(("userPermission.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.id" => Some(("userPermission.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1890,15 +2047,16 @@ impl<'n> Engine<'n> { "user-permission.additional-roles" => Some(("userPermission.additionalRoles", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "user-permission.self-link" => Some(("userPermission.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.photo-link" => Some(("userPermission.photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "shareable" => Some(("shareable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "original-filename" => Some(("originalFilename", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "file-extension" => Some(("fileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "has-augmented-permissions" => Some(("hasAugmentedPermissions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "file-size" => Some(("fileSize", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "expiration-date", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-thumbnail", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "thumbnail-version", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-add-children", "can-change-restricted-download", "can-comment", "can-copy", "can-delete", "can-download", "can-edit", "can-list-children", "can-move-item-into-team-drive", "can-move-team-drive-item", "can-read-revisions", "can-read-team-drive", "can-remove-children", "can-rename", "can-share", "can-trash", "can-untrash", "capabilities", "color-space", "copyable", "created-date", "date", "default-open-with-link", "deleted", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "expiration-date", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-augmented-permissions", "has-thumbnail", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "team-drive-id", "text", "thumbnail", "thumbnail-link", "thumbnail-version", "title", "trashed", "trashed-date", "trashing-user", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1924,6 +2082,9 @@ impl<'n> Engine<'n> { "timed-text-language" => { call = call.timed_text_language(value.unwrap_or("")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "pinned" => { call = call.pinned(arg_from_str(value.unwrap_or("false"), err, "pinned", "boolean")); }, @@ -1949,7 +2110,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["convert", "use-content-as-indexable-text", "ocr-language", "visibility", "pinned", "ocr", "timed-text-track-name", "timed-text-language"].iter().map(|v|*v)); + v.extend(["convert", "use-content-as-indexable-text", "ocr-language", "supports-team-drives", "pinned", "visibility", "ocr", "timed-text-track-name", "timed-text-language"].iter().map(|v|*v)); v } )); } } @@ -1993,6 +2154,12 @@ impl<'n> Engine<'n> { 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 { + "team-drive-id" => { + call = call.team_drive_id(value.unwrap_or("")); + }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "spaces" => { call = call.spaces(value.unwrap_or("")); }, @@ -2011,9 +2178,15 @@ impl<'n> Engine<'n> { "max-results" => { call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); }, + "include-team-drive-items" => { + call = call.include_team_drive_items(arg_from_str(value.unwrap_or("false"), err, "include-team-drive-items", "boolean")); + }, "corpus" => { call = call.corpus(value.unwrap_or("")); }, + "corpora" => { + call = call.corpora(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -2027,7 +2200,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["order-by", "projection", "max-results", "q", "page-token", "spaces", "corpus"].iter().map(|v|*v)); + v.extend(["order-by", "projection", "include-team-drive-items", "corpora", "supports-team-drives", "q", "page-token", "spaces", "max-results", "team-drive-id", "corpus"].iter().map(|v|*v)); v } )); } } @@ -2086,6 +2259,7 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "has-thumbnail" => Some(("hasThumbnail", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "mime-type" => Some(("mimeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "app-data-contents" => Some(("appDataContents", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "thumbnail-link" => Some(("thumbnailLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "labels.restricted" => Some(("labels.restricted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -2096,7 +2270,7 @@ impl<'n> Engine<'n> { "labels.trashed" => Some(("labels.trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "indexable-text.text" => Some(("indexableText.text", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-version" => Some(("thumbnailVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "last-modifying-user-name" => Some(("lastModifyingUserName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -2108,6 +2282,12 @@ impl<'n> Engine<'n> { "sharing-user.permission-id" => Some(("sharingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "sharing-user.is-authenticated-user" => Some(("sharingUser.isAuthenticatedUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "sharing-user.email-address" => Some(("sharingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.picture.url" => Some(("trashingUser.picture.url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.kind" => Some(("trashingUser.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.display-name" => Some(("trashingUser.displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.permission-id" => Some(("trashingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.is-authenticated-user" => Some(("trashingUser.isAuthenticatedUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashing-user.email-address" => Some(("trashingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "video-media-metadata.width" => Some(("videoMediaMetadata.width", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "video-media-metadata.duration-millis" => Some(("videoMediaMetadata.durationMillis", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "video-media-metadata.height" => Some(("videoMediaMetadata.height", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -2119,14 +2299,33 @@ impl<'n> Engine<'n> { "last-modifying-user.email-address" => Some(("lastModifyingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "copyable" => Some(("copyable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "folder-color-rgb" => Some(("folderColorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "marked-viewed-by-me-date" => Some(("markedViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner-names" => Some(("ownerNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-untrash" => Some(("capabilities.canUntrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete" => Some(("capabilities.canDelete", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-team-drive-item" => Some(("capabilities.canMoveTeamDriveItem", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-restricted-download" => Some(("capabilities.canChangeRestrictedDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-item-into-team-drive" => Some(("capabilities.canMoveItemIntoTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-trash" => Some(("capabilities.canTrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-read-team-drive" => Some(("capabilities.canReadTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "shared-with-me-date" => Some(("sharedWithMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-view-link" => Some(("webViewLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "last-viewed-by-me-date" => Some(("lastViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "export-links" => Some(("exportLinks", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "shared" => Some(("shared", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "full-file-extension" => Some(("fullFileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "open-with-links" => Some(("openWithLinks", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "full-file-extension" => Some(("fullFileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashed-date" => Some(("trashedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "can-read-revisions" => Some(("canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "image-media-metadata.exposure-bias" => Some(("imageMediaMetadata.exposureBias", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "image-media-metadata.exposure-time" => Some(("imageMediaMetadata.exposureTime", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), @@ -2153,18 +2352,17 @@ impl<'n> Engine<'n> { "image-media-metadata.camera-model" => Some(("imageMediaMetadata.cameraModel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-content-link" => Some(("webContentLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "file-size" => Some(("fileSize", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "editable" => Some(("editable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "marked-viewed-by-me-date" => Some(("markedViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "can-comment" => Some(("canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "quota-bytes-used" => Some(("quotaBytesUsed", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "embed-link" => Some(("embedLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "created-date" => Some(("createdDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "last-viewed-by-me-date" => Some(("lastViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "team-drive-id" => Some(("teamDriveId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "md5-checksum" => Some(("md5Checksum", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "icon-link" => Some(("iconLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-open-with-link" => Some(("defaultOpenWithLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "embed-link" => Some(("embedLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2175,6 +2373,7 @@ impl<'n> Engine<'n> { "user-permission.with-link" => Some(("userPermission.withLink", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "user-permission.domain" => Some(("userPermission.domain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.name" => Some(("userPermission.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "user-permission.deleted" => Some(("userPermission.deleted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "user-permission.kind" => Some(("userPermission.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.value" => Some(("userPermission.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.id" => Some(("userPermission.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2187,15 +2386,16 @@ impl<'n> Engine<'n> { "user-permission.additional-roles" => Some(("userPermission.additionalRoles", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "user-permission.self-link" => Some(("userPermission.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.photo-link" => Some(("userPermission.photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "shareable" => Some(("shareable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "original-filename" => Some(("originalFilename", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "file-extension" => Some(("fileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "has-augmented-permissions" => Some(("hasAugmentedPermissions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "file-size" => Some(("fileSize", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "expiration-date", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-thumbnail", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "thumbnail-version", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-add-children", "can-change-restricted-download", "can-comment", "can-copy", "can-delete", "can-download", "can-edit", "can-list-children", "can-move-item-into-team-drive", "can-move-team-drive-item", "can-read-revisions", "can-read-team-drive", "can-remove-children", "can-rename", "can-share", "can-trash", "can-untrash", "capabilities", "color-space", "copyable", "created-date", "date", "default-open-with-link", "deleted", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "expiration-date", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-augmented-permissions", "has-thumbnail", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "team-drive-id", "text", "thumbnail", "thumbnail-link", "thumbnail-version", "title", "trashed", "trashed-date", "trashing-user", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2221,6 +2421,9 @@ impl<'n> Engine<'n> { "timed-text-language" => { call = call.timed_text_language(value.unwrap_or("")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "set-modified-date" => { call = call.set_modified_date(arg_from_str(value.unwrap_or("false"), err, "set-modified-date", "boolean")); }, @@ -2261,7 +2464,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["add-parents", "convert", "ocr", "set-modified-date", "modified-date-behavior", "use-content-as-indexable-text", "ocr-language", "new-revision", "pinned", "remove-parents", "update-viewed-date", "timed-text-track-name", "timed-text-language"].iter().map(|v|*v)); + v.extend(["add-parents", "new-revision", "ocr", "remove-parents", "convert", "modified-date-behavior", "use-content-as-indexable-text", "ocr-language", "supports-team-drives", "pinned", "set-modified-date", "update-viewed-date", "timed-text-track-name", "timed-text-language"].iter().map(|v|*v)); v } )); } } @@ -2301,6 +2504,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -2314,6 +2520,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -2353,6 +2560,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -2366,6 +2576,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -2405,6 +2616,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -2418,6 +2632,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -2476,6 +2691,7 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "has-thumbnail" => Some(("hasThumbnail", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "mime-type" => Some(("mimeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "app-data-contents" => Some(("appDataContents", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "thumbnail-link" => Some(("thumbnailLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "labels.restricted" => Some(("labels.restricted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -2486,7 +2702,7 @@ impl<'n> Engine<'n> { "labels.trashed" => Some(("labels.trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "indexable-text.text" => Some(("indexableText.text", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-version" => Some(("thumbnailVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "last-modifying-user-name" => Some(("lastModifyingUserName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -2498,6 +2714,12 @@ impl<'n> Engine<'n> { "sharing-user.permission-id" => Some(("sharingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "sharing-user.is-authenticated-user" => Some(("sharingUser.isAuthenticatedUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "sharing-user.email-address" => Some(("sharingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.picture.url" => Some(("trashingUser.picture.url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.kind" => Some(("trashingUser.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.display-name" => Some(("trashingUser.displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.permission-id" => Some(("trashingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.is-authenticated-user" => Some(("trashingUser.isAuthenticatedUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashing-user.email-address" => Some(("trashingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "video-media-metadata.width" => Some(("videoMediaMetadata.width", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "video-media-metadata.duration-millis" => Some(("videoMediaMetadata.durationMillis", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "video-media-metadata.height" => Some(("videoMediaMetadata.height", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -2509,14 +2731,33 @@ impl<'n> Engine<'n> { "last-modifying-user.email-address" => Some(("lastModifyingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "copyable" => Some(("copyable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "folder-color-rgb" => Some(("folderColorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "marked-viewed-by-me-date" => Some(("markedViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner-names" => Some(("ownerNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-untrash" => Some(("capabilities.canUntrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete" => Some(("capabilities.canDelete", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-team-drive-item" => Some(("capabilities.canMoveTeamDriveItem", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-restricted-download" => Some(("capabilities.canChangeRestrictedDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-item-into-team-drive" => Some(("capabilities.canMoveItemIntoTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-trash" => Some(("capabilities.canTrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-read-team-drive" => Some(("capabilities.canReadTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "shared-with-me-date" => Some(("sharedWithMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-view-link" => Some(("webViewLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "last-viewed-by-me-date" => Some(("lastViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "export-links" => Some(("exportLinks", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "shared" => Some(("shared", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "full-file-extension" => Some(("fullFileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "open-with-links" => Some(("openWithLinks", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "full-file-extension" => Some(("fullFileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashed-date" => Some(("trashedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "can-read-revisions" => Some(("canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "image-media-metadata.exposure-bias" => Some(("imageMediaMetadata.exposureBias", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "image-media-metadata.exposure-time" => Some(("imageMediaMetadata.exposureTime", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), @@ -2543,18 +2784,17 @@ impl<'n> Engine<'n> { "image-media-metadata.camera-model" => Some(("imageMediaMetadata.cameraModel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-content-link" => Some(("webContentLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "file-size" => Some(("fileSize", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "editable" => Some(("editable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "marked-viewed-by-me-date" => Some(("markedViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "can-comment" => Some(("canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "quota-bytes-used" => Some(("quotaBytesUsed", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "embed-link" => Some(("embedLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "created-date" => Some(("createdDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "last-viewed-by-me-date" => Some(("lastViewedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "team-drive-id" => Some(("teamDriveId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "md5-checksum" => Some(("md5Checksum", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "icon-link" => Some(("iconLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-open-with-link" => Some(("defaultOpenWithLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "embed-link" => Some(("embedLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2565,6 +2805,7 @@ impl<'n> Engine<'n> { "user-permission.with-link" => Some(("userPermission.withLink", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "user-permission.domain" => Some(("userPermission.domain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.name" => Some(("userPermission.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "user-permission.deleted" => Some(("userPermission.deleted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "user-permission.kind" => Some(("userPermission.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.value" => Some(("userPermission.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.id" => Some(("userPermission.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2577,15 +2818,16 @@ impl<'n> Engine<'n> { "user-permission.additional-roles" => Some(("userPermission.additionalRoles", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "user-permission.self-link" => Some(("userPermission.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-permission.photo-link" => Some(("userPermission.photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "shareable" => Some(("shareable", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "original-filename" => Some(("originalFilename", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "file-extension" => Some(("fileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "has-augmented-permissions" => Some(("hasAugmentedPermissions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "file-size" => Some(("fileSize", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "expiration-date", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-thumbnail", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "thumbnail-version", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-add-children", "can-change-restricted-download", "can-comment", "can-copy", "can-delete", "can-download", "can-edit", "can-list-children", "can-move-item-into-team-drive", "can-move-team-drive-item", "can-read-revisions", "can-read-team-drive", "can-remove-children", "can-rename", "can-share", "can-trash", "can-untrash", "capabilities", "color-space", "copyable", "created-date", "date", "default-open-with-link", "deleted", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "expiration-date", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-augmented-permissions", "has-thumbnail", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "team-drive-id", "text", "thumbnail", "thumbnail-link", "thumbnail-version", "title", "trashed", "trashed-date", "trashing-user", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2611,6 +2853,9 @@ impl<'n> Engine<'n> { "timed-text-language" => { call = call.timed_text_language(value.unwrap_or("")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "set-modified-date" => { call = call.set_modified_date(arg_from_str(value.unwrap_or("false"), err, "set-modified-date", "boolean")); }, @@ -2651,7 +2896,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["add-parents", "convert", "ocr", "set-modified-date", "modified-date-behavior", "use-content-as-indexable-text", "ocr-language", "new-revision", "pinned", "remove-parents", "update-viewed-date", "timed-text-track-name", "timed-text-language"].iter().map(|v|*v)); + v.extend(["add-parents", "new-revision", "ocr", "remove-parents", "convert", "modified-date-behavior", "use-content-as-indexable-text", "ocr-language", "supports-team-drives", "pinned", "set-modified-date", "update-viewed-date", "timed-text-track-name", "timed-text-language"].iter().map(|v|*v)); v } )); } } @@ -2741,6 +2986,9 @@ impl<'n> Engine<'n> { "update-viewed-date" => { call = call.update_viewed_date(arg_from_str(value.unwrap_or("false"), err, "update-viewed-date", "boolean")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "revision-id" => { call = call.revision_id(value.unwrap_or("")); }, @@ -2766,7 +3014,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["revision-id", "update-viewed-date", "acknowledge-abuse", "projection"].iter().map(|v|*v)); + v.extend(["revision-id", "update-viewed-date", "acknowledge-abuse", "projection", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -2944,6 +3192,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -2957,6 +3208,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -3048,6 +3300,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -3061,6 +3316,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -3092,6 +3348,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -3105,6 +3364,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -3216,6 +3476,7 @@ impl<'n> Engine<'n> { "with-link" => Some(("withLink", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "domain" => Some(("domain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "deleted" => Some(("deleted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "value" => Some(("value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -3229,7 +3490,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "photo-link" => Some(("photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "auth-key", "domain", "email-address", "etag", "expiration-date", "id", "kind", "name", "photo-link", "role", "self-link", "type", "value", "with-link"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "auth-key", "deleted", "domain", "email-address", "etag", "expiration-date", "id", "kind", "name", "photo-link", "role", "self-link", "type", "value", "with-link"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -3243,6 +3504,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "send-notification-emails" => { call = call.send_notification_emails(arg_from_str(value.unwrap_or("false"), err, "send-notification-emails", "boolean")); }, @@ -3262,7 +3526,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["email-message", "send-notification-emails"].iter().map(|v|*v)); + v.extend(["email-message", "send-notification-emails", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -3302,6 +3566,15 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "max-results" => { + call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); + }, _ => { let mut found = false; for param in &self.gp { @@ -3315,6 +3588,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["page-token", "max-results", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -3374,6 +3648,7 @@ impl<'n> Engine<'n> { "with-link" => Some(("withLink", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "domain" => Some(("domain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "deleted" => Some(("deleted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "value" => Some(("value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -3387,7 +3662,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "photo-link" => Some(("photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "auth-key", "domain", "email-address", "etag", "expiration-date", "id", "kind", "name", "photo-link", "role", "self-link", "type", "value", "with-link"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "auth-key", "deleted", "domain", "email-address", "etag", "expiration-date", "id", "kind", "name", "photo-link", "role", "self-link", "type", "value", "with-link"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -3404,6 +3679,9 @@ impl<'n> Engine<'n> { "transfer-ownership" => { call = call.transfer_ownership(arg_from_str(value.unwrap_or("false"), err, "transfer-ownership", "boolean")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "remove-expiration" => { call = call.remove_expiration(arg_from_str(value.unwrap_or("false"), err, "remove-expiration", "boolean")); }, @@ -3420,7 +3698,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["transfer-ownership", "remove-expiration"].iter().map(|v|*v)); + v.extend(["transfer-ownership", "supports-team-drives", "remove-expiration"].iter().map(|v|*v)); v } )); } } @@ -3480,6 +3758,7 @@ impl<'n> Engine<'n> { "with-link" => Some(("withLink", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "domain" => Some(("domain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "deleted" => Some(("deleted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "value" => Some(("value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -3493,7 +3772,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "photo-link" => Some(("photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "auth-key", "domain", "email-address", "etag", "expiration-date", "id", "kind", "name", "photo-link", "role", "self-link", "type", "value", "with-link"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "auth-key", "deleted", "domain", "email-address", "etag", "expiration-date", "id", "kind", "name", "photo-link", "role", "self-link", "type", "value", "with-link"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -3510,6 +3789,9 @@ impl<'n> Engine<'n> { "transfer-ownership" => { call = call.transfer_ownership(arg_from_str(value.unwrap_or("false"), err, "transfer-ownership", "boolean")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "remove-expiration" => { call = call.remove_expiration(arg_from_str(value.unwrap_or("false"), err, "remove-expiration", "boolean")); }, @@ -3526,7 +3808,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["transfer-ownership", "remove-expiration"].iter().map(|v|*v)); + v.extend(["transfer-ownership", "supports-team-drives", "remove-expiration"].iter().map(|v|*v)); v } )); } } @@ -4932,6 +5214,377 @@ impl<'n> Engine<'n> { } } + fn _teamdrives_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.teamdrives().delete(opt.value_of("team-drive-id").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); + } + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok(mut response) => { + Ok(()) + } + } + } + } + + fn _teamdrives_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.teamdrives().get(opt.value_of("team-drive-id").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(), + _ => 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(()) + } + } + } + } + + fn _teamdrives_insert(&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()[..] { + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "background-image-link" => Some(("backgroundImageLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "theme-id" => Some(("themeId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "color-rgb" => Some(("colorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-manage-members" => Some(("capabilities.canManageMembers", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-team-drive-background" => Some(("capabilities.canChangeTeamDriveBackground", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete-team-drive" => Some(("capabilities.canDeleteTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename-team-drive" => Some(("capabilities.canRenameTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "background-image-file.width" => Some(("backgroundImageFile.width", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "background-image-file.y-coordinate" => Some(("backgroundImageFile.yCoordinate", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "background-image-file.id" => Some(("backgroundImageFile.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "background-image-file.x-coordinate" => Some(("backgroundImageFile.xCoordinate", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["background-image-file", "background-image-link", "can-add-children", "can-change-team-drive-background", "can-comment", "can-copy", "can-delete-team-drive", "can-download", "can-edit", "can-list-children", "can-manage-members", "can-read-revisions", "can-remove-children", "can-rename", "can-rename-team-drive", "can-share", "capabilities", "color-rgb", "id", "kind", "name", "theme-id", "width", "x-coordinate", "y-coordinate"]); + 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::TeamDrive = json::value::from_value(object).unwrap(); + let mut call = self.hub.teamdrives().insert(request, opt.value_of("request-id").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(), + _ => 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(()) + } + } + } + } + + fn _teamdrives_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.teamdrives().list(); + 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("")); + }, + "max-results" => { + call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); + }, + _ => { + 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-token", "max-results"].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(), + _ => 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(()) + } + } + } + } + + fn _teamdrives_update(&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()[..] { + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "background-image-link" => Some(("backgroundImageLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "theme-id" => Some(("themeId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "color-rgb" => Some(("colorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-manage-members" => Some(("capabilities.canManageMembers", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-team-drive-background" => Some(("capabilities.canChangeTeamDriveBackground", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete-team-drive" => Some(("capabilities.canDeleteTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename-team-drive" => Some(("capabilities.canRenameTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "background-image-file.width" => Some(("backgroundImageFile.width", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "background-image-file.y-coordinate" => Some(("backgroundImageFile.yCoordinate", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "background-image-file.id" => Some(("backgroundImageFile.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "background-image-file.x-coordinate" => Some(("backgroundImageFile.xCoordinate", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["background-image-file", "background-image-link", "can-add-children", "can-change-team-drive-background", "can-comment", "can-copy", "can-delete-team-drive", "can-download", "can-edit", "can-list-children", "can-manage-members", "can-read-revisions", "can-remove-children", "can-rename", "can-rename-team-drive", "can-share", "capabilities", "color-rgb", "id", "kind", "name", "theme-id", "width", "x-coordinate", "y-coordinate"]); + 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::TeamDrive = json::value::from_value(object).unwrap(); + let mut call = self.hub.teamdrives().update(request, opt.value_of("team-drive-id").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(), + _ => 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(()) + } + } + } + } + fn _doit(&self, dry_run: bool) -> Result, Option> { let mut err = InvalidOptionsError::new(); let mut call_result: Result<(), DoitError> = Ok(()); @@ -4967,6 +5620,9 @@ impl<'n> Engine<'n> { ("get", Some(opt)) => { call_result = self._changes_get(opt, dry_run, &mut err); }, + ("get-start-page-token", Some(opt)) => { + call_result = self._changes_get_start_page_token(opt, dry_run, &mut err); + }, ("list", Some(opt)) => { call_result = self._changes_list(opt, dry_run, &mut err); }, @@ -5224,6 +5880,29 @@ impl<'n> Engine<'n> { } } }, + ("teamdrives", Some(opt)) => { + match opt.subcommand() { + ("delete", Some(opt)) => { + call_result = self._teamdrives_delete(opt, dry_run, &mut err); + }, + ("get", Some(opt)) => { + call_result = self._teamdrives_get(opt, dry_run, &mut err); + }, + ("insert", Some(opt)) => { + call_result = self._teamdrives_insert(opt, dry_run, &mut err); + }, + ("list", Some(opt)) => { + call_result = self._teamdrives_list(opt, dry_run, &mut err); + }, + ("update", Some(opt)) => { + call_result = self._teamdrives_update(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("teamdrives".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, _ => { err.issues.push(CLIError::MissingCommandError); writeln!(io::stderr(), "{}\n", self.opt.usage()).ok(); @@ -5367,7 +6046,7 @@ fn main() { ]), ]), - ("changes", "methods: 'get', 'list' and 'watch'", vec![ + ("changes", "methods: 'get', 'get-start-page-token', 'list' and 'watch'", vec![ ("get", Some(r##"Gets a specific change."##), "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/changes_get", @@ -5384,6 +6063,22 @@ fn main() { 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)), + ]), + ("get-start-page-token", + Some(r##"Gets the starting pageToken for listing future changes."##), + "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/changes_get-start-page-token", + vec![ + (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"##), @@ -5391,7 +6086,7 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Lists the changes for a user."##), + Some(r##"Lists the changes for a user or Team Drive."##), "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/changes_list", vec![ (Some(r##"v"##), @@ -5753,7 +6448,7 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file."##), + Some(r##"Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files."##), "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/files_delete", vec![ (Some(r##"file-id"##), @@ -5939,7 +6634,7 @@ fn main() { Some(false)), ]), ("trash", - Some(r##"Moves a file to the trash. The currently authenticated user must own the file."##), + Some(r##"Moves a file to the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files."##), "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/files_trash", vec![ (Some(r##"file-id"##), @@ -6151,12 +6846,12 @@ fn main() { ("permissions", "methods: 'delete', 'get', 'get-id-for-email', 'insert', 'list', 'patch' and 'update'", vec![ ("delete", - Some(r##"Deletes a permission from a file."##), + Some(r##"Deletes a permission from a file or Team Drive."##), "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/permissions_delete", vec![ (Some(r##"file-id"##), None, - Some(r##"The ID for the file."##), + Some(r##"The ID for the file or Team Drive."##), Some(true), Some(false)), @@ -6178,7 +6873,7 @@ fn main() { vec![ (Some(r##"file-id"##), None, - Some(r##"The ID for the file."##), + Some(r##"The ID for the file or Team Drive."##), Some(true), Some(false)), @@ -6223,12 +6918,12 @@ fn main() { Some(false)), ]), ("insert", - Some(r##"Inserts a permission for a file."##), + Some(r##"Inserts a permission for a file or Team Drive."##), "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/permissions_insert", vec![ (Some(r##"file-id"##), None, - Some(r##"The ID for the file."##), + Some(r##"The ID for the file or Team Drive."##), Some(true), Some(false)), @@ -6251,12 +6946,12 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Lists a file's permissions."##), + Some(r##"Lists a file's or Team Drive's permissions."##), "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/permissions_list", vec![ (Some(r##"file-id"##), None, - Some(r##"The ID for the file."##), + Some(r##"The ID for the file or Team Drive."##), Some(true), Some(false)), @@ -6278,7 +6973,7 @@ fn main() { vec![ (Some(r##"file-id"##), None, - Some(r##"The ID for the file."##), + Some(r##"The ID for the file or Team Drive."##), Some(true), Some(false)), @@ -6312,7 +7007,7 @@ fn main() { vec![ (Some(r##"file-id"##), None, - Some(r##"The ID for the file."##), + Some(r##"The ID for the file or Team Drive."##), Some(true), Some(false)), @@ -6910,11 +7605,124 @@ fn main() { ]), ]), + ("teamdrives", "methods: 'delete', 'get', 'insert', 'list' and 'update'", vec![ + ("delete", + Some(r##"Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items."##), + "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/teamdrives_delete", + vec![ + (Some(r##"team-drive-id"##), + None, + Some(r##"The ID of the Team Drive"##), + 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)), + ]), + ("get", + Some(r##"Gets a Team Drive's metadata by ID."##), + "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/teamdrives_get", + vec![ + (Some(r##"team-drive-id"##), + None, + Some(r##"The ID of the Team Drive"##), + 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)), + ]), + ("insert", + Some(r##"Creates a new Team Drive."##), + "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/teamdrives_insert", + vec![ + (Some(r##"request-id"##), + None, + Some(r##"An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned."##), + 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)), + ]), + ("list", + Some(r##"Lists the user's Team Drives."##), + "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/teamdrives_list", + vec![ + (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)), + ]), + ("update", + Some(r##"Updates a Team Drive's metadata"##), + "Details at http://byron.github.io/google-apis-rs/google_drive2_cli/teamdrives_update", + vec![ + (Some(r##"team-drive-id"##), + None, + Some(r##"The ID of the Team Drive"##), + 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("drive2") .author("Sebastian Thiel ") - .version("1.0.4+20161212") + .version("1.0.4+20170512") .about("Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_drive2_cli") .arg(Arg::with_name("url") diff --git a/gen/drive2/Cargo.toml b/gen/drive2/Cargo.toml index 4e4fb57cb4..75727fd7b2 100644 --- a/gen/drive2/Cargo.toml +++ b/gen/drive2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-drive2" -version = "1.0.4+20161212" +version = "1.0.4+20170512" authors = ["Sebastian Thiel "] description = "A complete library to interact with drive (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/drive2" homepage = "https://developers.google.com/drive/" -documentation = "https://docs.rs/google-drive2/1.0.4+20161212" +documentation = "https://docs.rs/google-drive2/1.0.4+20170512" license = "MIT" keywords = ["drive", "google", "protocol", "web", "api"] diff --git a/gen/drive2/README.md b/gen/drive2/README.md index 7808c00194..d50b5ed09f 100644 --- a/gen/drive2/README.md +++ b/gen/drive2/README.md @@ -5,62 +5,64 @@ DO NOT EDIT ! --> The `google-drive2` library allows access to all features of the *Google drive* service. -This documentation was generated from *drive* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *drive* crate version *1.0.4+20170512*, where *20170512* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *drive* *v2* API can be found at the [official documentation site](https://developers.google.com/drive/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.Drive.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.Drive.html) ... -* [about](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.About.html) - * [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.AboutGetCall.html) -* [apps](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.App.html) - * [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.AppGetCall.html) and [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.AppListCall.html) -* [changes](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.Change.html) - * [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChangeGetCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChangeListCall.html) and [*watch*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChangeWatchCall.html) -* [channels](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.Channel.html) - * [*stop*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChannelStopCall.html) +* [about](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.About.html) + * [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.AboutGetCall.html) +* [apps](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.App.html) + * [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.AppGetCall.html) and [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.AppListCall.html) +* [changes](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.Change.html) + * [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChangeGetCall.html), [*get start page token*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChangeGetStartPageTokenCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChangeListCall.html) and [*watch*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChangeWatchCall.html) +* [channels](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.Channel.html) + * [*stop*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChannelStopCall.html) * children - * [*delete*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChildrenDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChildrenGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChildrenInsertCall.html) and [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChildrenListCall.html) -* [comments](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.Comment.html) - * [*delete*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.CommentDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.CommentGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.CommentInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.CommentListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.CommentPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.CommentUpdateCall.html) -* [files](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.File.html) - * [*copy*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileCopyCall.html), [*delete*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileDeleteCall.html), [*empty trash*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileEmptyTrashCall.html), [*export*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileExportCall.html), [*generate ids*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileGenerateIdCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FilePatchCall.html), [*touch*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileTouchCall.html), [*trash*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileTrashCall.html), [*untrash*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileUntrashCall.html), [*update*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileUpdateCall.html) and [*watch*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileWatchCall.html) + * [*delete*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChildrenDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChildrenGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChildrenInsertCall.html) and [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChildrenListCall.html) +* [comments](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.Comment.html) + * [*delete*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.CommentDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.CommentGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.CommentInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.CommentListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.CommentPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.CommentUpdateCall.html) +* [files](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.File.html) + * [*copy*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileCopyCall.html), [*delete*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileDeleteCall.html), [*empty trash*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileEmptyTrashCall.html), [*export*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileExportCall.html), [*generate ids*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileGenerateIdCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FilePatchCall.html), [*touch*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileTouchCall.html), [*trash*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileTrashCall.html), [*untrash*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileUntrashCall.html), [*update*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileUpdateCall.html) and [*watch*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileWatchCall.html) * parents - * [*delete*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ParentDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ParentGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ParentInsertCall.html) and [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ParentListCall.html) -* [permissions](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.Permission.html) - * [*delete*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PermissionDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PermissionGetCall.html), [*get id for email*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PermissionGetIdForEmailCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PermissionInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PermissionListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PermissionPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PermissionUpdateCall.html) -* [properties](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.Property.html) - * [*delete*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PropertyDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PropertyGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PropertyInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PropertyListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PropertyPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.PropertyUpdateCall.html) + * [*delete*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ParentDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ParentGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ParentInsertCall.html) and [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ParentListCall.html) +* [permissions](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.Permission.html) + * [*delete*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PermissionDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PermissionGetCall.html), [*get id for email*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PermissionGetIdForEmailCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PermissionInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PermissionListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PermissionPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PermissionUpdateCall.html) +* [properties](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.Property.html) + * [*delete*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PropertyDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PropertyGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PropertyInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PropertyListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PropertyPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.PropertyUpdateCall.html) * realtime - * [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.RealtimeGetCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.RealtimeUpdateCall.html) + * [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.RealtimeGetCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.RealtimeUpdateCall.html) * replies - * [*delete*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ReplyDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ReplyGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ReplyInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ReplyListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ReplyPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ReplyUpdateCall.html) -* [revisions](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.Revision.html) - * [*delete*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.RevisionDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.RevisionGetCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.RevisionListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.RevisionPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.RevisionUpdateCall.html) + * [*delete*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ReplyDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ReplyGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ReplyInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ReplyListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ReplyPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ReplyUpdateCall.html) +* [revisions](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.Revision.html) + * [*delete*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.RevisionDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.RevisionGetCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.RevisionListCall.html), [*patch*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.RevisionPatchCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.RevisionUpdateCall.html) +* teamdrives + * [*delete*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.TeamdriveDeleteCall.html), [*get*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.TeamdriveGetCall.html), [*insert*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.TeamdriveInsertCall.html), [*list*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.TeamdriveListCall.html) and [*update*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.TeamdriveUpdateCall.html) Upload supported by ... -* [*insert files*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileInsertCall.html) -* [*update realtime*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.RealtimeUpdateCall.html) -* [*update files*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileUpdateCall.html) +* [*update files*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileUpdateCall.html) +* [*insert files*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileInsertCall.html) +* [*update realtime*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.RealtimeUpdateCall.html) Download supported by ... -* [*watch files*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileWatchCall.html) -* [*get realtime*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.RealtimeGetCall.html) -* [*export files*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileExportCall.html) -* [*get files*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileGetCall.html) +* [*watch files*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileWatchCall.html) +* [*get realtime*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.RealtimeGetCall.html) +* [*get files*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileGetCall.html) +* [*export files*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileExportCall.html) Subscription supported by ... -* [*watch files*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileWatchCall.html) -* [*watch changes*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChangeWatchCall.html) -* [*insert files*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileInsertCall.html) -* [*list changes*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.ChangeListCall.html) -* [*get files*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.FileGetCall.html) +* [*watch files*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileWatchCall.html) +* [*insert files*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileInsertCall.html) +* [*get files*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.FileGetCall.html) +* [*watch changes*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChangeWatchCall.html) +* [*list changes*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.ChangeListCall.html) @@ -68,17 +70,17 @@ Subscription supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/struct.Drive.html)** +* **[Hub](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/struct.Drive.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.Part.html)** + * **[Parts](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -161,15 +163,16 @@ let result = hub.files().patch(req, "fileId") .update_viewed_date(false) .timed_text_track_name("sed") .timed_text_language("et") - .set_modified_date(true) - .remove_parents("kasd") + .supports_team_drives(true) + .set_modified_date(false) + .remove_parents("accusam") .pinned(true) - .ocr_language("takimata") - .ocr(false) - .new_revision(true) - .modified_date_behavior("erat") + .ocr_language("justo") + .ocr(true) + .new_revision(false) + .modified_date_behavior("labore") .convert(true) - .add_parents("sea") + .add_parents("nonumy") .doit(); match result { @@ -192,17 +195,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.Delegate.html), 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-drive2/1.0.4+20161212/google_drive2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.ResponseResult.html), 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")`. @@ -212,29 +215,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.CallBuilder.html) 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-drive2/1.0.4+20161212/google_drive2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-drive2/1.0.4+20161212/google_drive2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.CallBuilder.html), 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-drive2/1.0.4+20161212/google_drive2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-drive2/1.0.4+20170512/google_drive2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/drive2/src/lib.rs b/gen/drive2/src/lib.rs index 6372609ec5..c45605c4b7 100644 --- a/gen/drive2/src/lib.rs +++ b/gen/drive2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *drive* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *drive* crate version *1.0.4+20170512*, where *20170512* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *drive* *v2* API can be found at the //! [official documentation site](https://developers.google.com/drive/). @@ -16,7 +16,7 @@ //! * [apps](struct.App.html) //! * [*get*](struct.AppGetCall.html) and [*list*](struct.AppListCall.html) //! * [changes](struct.Change.html) -//! * [*get*](struct.ChangeGetCall.html), [*list*](struct.ChangeListCall.html) and [*watch*](struct.ChangeWatchCall.html) +//! * [*get*](struct.ChangeGetCall.html), [*get start page token*](struct.ChangeGetStartPageTokenCall.html), [*list*](struct.ChangeListCall.html) and [*watch*](struct.ChangeWatchCall.html) //! * [channels](struct.Channel.html) //! * [*stop*](struct.ChannelStopCall.html) //! * children @@ -37,28 +37,30 @@ //! * [*delete*](struct.ReplyDeleteCall.html), [*get*](struct.ReplyGetCall.html), [*insert*](struct.ReplyInsertCall.html), [*list*](struct.ReplyListCall.html), [*patch*](struct.ReplyPatchCall.html) and [*update*](struct.ReplyUpdateCall.html) //! * [revisions](struct.Revision.html) //! * [*delete*](struct.RevisionDeleteCall.html), [*get*](struct.RevisionGetCall.html), [*list*](struct.RevisionListCall.html), [*patch*](struct.RevisionPatchCall.html) and [*update*](struct.RevisionUpdateCall.html) +//! * teamdrives +//! * [*delete*](struct.TeamdriveDeleteCall.html), [*get*](struct.TeamdriveGetCall.html), [*insert*](struct.TeamdriveInsertCall.html), [*list*](struct.TeamdriveListCall.html) and [*update*](struct.TeamdriveUpdateCall.html) //! //! //! Upload supported by ... //! +//! * [*update files*](struct.FileUpdateCall.html) //! * [*insert files*](struct.FileInsertCall.html) //! * [*update realtime*](struct.RealtimeUpdateCall.html) -//! * [*update files*](struct.FileUpdateCall.html) //! //! Download supported by ... //! //! * [*watch files*](struct.FileWatchCall.html) //! * [*get realtime*](struct.RealtimeGetCall.html) -//! * [*export files*](struct.FileExportCall.html) //! * [*get files*](struct.FileGetCall.html) +//! * [*export files*](struct.FileExportCall.html) //! //! Subscription supported by ... //! //! * [*watch files*](struct.FileWatchCall.html) -//! * [*watch changes*](struct.ChangeWatchCall.html) //! * [*insert files*](struct.FileInsertCall.html) -//! * [*list changes*](struct.ChangeListCall.html) //! * [*get files*](struct.FileGetCall.html) +//! * [*watch changes*](struct.ChangeWatchCall.html) +//! * [*list changes*](struct.ChangeListCall.html) //! //! //! @@ -158,19 +160,20 @@ //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! //! let result = hub.files().patch(req, "fileId") -//! .use_content_as_indexable_text(true) +//! .use_content_as_indexable_text(false) //! .update_viewed_date(false) -//! .timed_text_track_name("sadipscing") -//! .timed_text_language("aliquyam") -//! .set_modified_date(false) -//! .remove_parents("no") +//! .timed_text_track_name("aliquyam") +//! .timed_text_language("ea") +//! .supports_team_drives(false) +//! .set_modified_date(true) +//! .remove_parents("justo") //! .pinned(true) -//! .ocr_language("justo") +//! .ocr_language("et") //! .ocr(true) -//! .new_revision(true) -//! .modified_date_behavior("diam") -//! .convert(false) -//! .add_parents("Lorem") +//! .new_revision(false) +//! .modified_date_behavior("Lorem") +//! .convert(true) +//! .add_parents("duo") //! .doit(); //! //! match result { @@ -386,19 +389,20 @@ impl Default for Scope { /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().patch(req, "fileId") -/// .use_content_as_indexable_text(false) -/// .update_viewed_date(true) -/// .timed_text_track_name("sea") -/// .timed_text_language("Lorem") -/// .set_modified_date(false) -/// .remove_parents("erat") -/// .pinned(false) -/// .ocr_language("dolor") -/// .ocr(true) +/// .use_content_as_indexable_text(true) +/// .update_viewed_date(false) +/// .timed_text_track_name("eos") +/// .timed_text_language("erat") +/// .supports_team_drives(false) +/// .set_modified_date(true) +/// .remove_parents("eirmod") +/// .pinned(true) +/// .ocr_language("amet") +/// .ocr(false) /// .new_revision(true) -/// .modified_date_behavior("amet") -/// .convert(false) -/// .add_parents("labore") +/// .modified_date_behavior("eirmod") +/// .convert(true) +/// .add_parents("invidunt") /// .doit(); /// /// match result { @@ -477,6 +481,9 @@ impl<'a, C, A> Drive pub fn revisions(&'a self) -> RevisionMethods<'a, C, A> { RevisionMethods { hub: &self } } + pub fn teamdrives(&'a self) -> TeamdriveMethods<'a, C, A> { + TeamdriveMethods { hub: &self } + } /// Set the user-agent header field to use in all requests to the server. /// It defaults to `google-api-rust-client/1.0.4`. @@ -493,450 +500,58 @@ impl<'a, C, A> Drive // ############ // SCHEMAS ### // ########## -/// A reference to a file's parent. -/// -/// # 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*). -/// -/// * [get parents](struct.ParentGetCall.html) (response) -/// * [insert parents](struct.ParentInsertCall.html) (request|response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ParentReference { - /// Whether or not the parent is the root folder. - #[serde(rename="isRoot")] - pub is_root: Option, - /// This is always drive#parentReference. - pub kind: Option, - /// The ID of the parent. - pub id: Option, - /// A link back to this reference. - #[serde(rename="selfLink")] - pub self_link: Option, - /// A link to the parent. - #[serde(rename="parentLink")] - pub parent_link: Option, -} - -impl RequestValue for ParentReference {} -impl ResponseResult for ParentReference {} - - -/// A comment on a file in Google Drive. -/// -/// # 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*). -/// -/// * [update comments](struct.CommentUpdateCall.html) (request|response) -/// * [insert comments](struct.CommentInsertCall.html) (request|response) -/// * [delete comments](struct.CommentDeleteCall.html) (none) -/// * [patch comments](struct.CommentPatchCall.html) (request|response) -/// * [get comments](struct.CommentGetCall.html) (response) -/// * [list comments](struct.CommentListCall.html) (none) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Comment { - /// The status of this comment. Status can be changed by posting a reply to a comment with the desired status. - /// - "open" - The comment is still open. - /// - "resolved" - The comment has been resolved by one of its replies. - pub status: Option, - /// A link back to this comment. - #[serde(rename="selfLink")] - pub self_link: Option, - /// This is always drive#comment. - pub kind: Option, - /// The user who wrote this comment. - pub author: Option, - /// Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. - pub deleted: Option, - /// The date when this comment was first created. - #[serde(rename="createdDate")] - pub created_date: Option, - /// HTML formatted content for this comment. - #[serde(rename="htmlContent")] - pub html_content: Option, - /// The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. - pub content: Option, - /// The date when this comment or any of its replies were last modified. - #[serde(rename="modifiedDate")] - pub modified_date: Option, - /// The context of the file which is being commented on. - pub context: Option, - /// Replies to this post. - pub replies: Option>, - /// The ID of the comment. - #[serde(rename="commentId")] - pub comment_id: Option, - /// A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties. - pub anchor: Option, - /// The title of the file which this comment is addressing. - #[serde(rename="fileTitle")] - pub file_title: Option, - /// The file which this comment is addressing. - #[serde(rename="fileId")] - pub file_id: Option, -} - -impl RequestValue for Comment {} -impl Resource for Comment {} -impl ResponseResult for Comment {} - - -/// An item with user information and settings. -/// -/// # 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*). -/// -/// * [get about](struct.AboutGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct About { - /// The user's language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/). - #[serde(rename="languageCode")] - pub language_code: Option, - /// The amount of storage quota used by different Google services. - #[serde(rename="quotaBytesByService")] - pub quota_bytes_by_service: Option>, - /// List of additional features enabled on this account. - pub features: Option>, - /// The number of quota bytes used by Google Drive. - #[serde(rename="quotaBytesUsed")] - pub quota_bytes_used: Option, - /// This is always drive#about. - pub kind: Option, - /// Information about supported additional roles per file type. The most specific type takes precedence. - #[serde(rename="additionalRoleInfo")] - pub additional_role_info: Option>, - /// The palette of allowable folder colors as RGB hex strings. - #[serde(rename="folderColorPalette")] - pub folder_color_palette: Option>, - /// The authenticated user. - pub user: Option, - /// The type of the user's storage quota. Possible values are: - /// - LIMITED - /// - UNLIMITED - #[serde(rename="quotaType")] - pub quota_type: Option, - /// The number of quota bytes used by all Google apps (Drive, Picasa, etc.). - #[serde(rename="quotaBytesUsedAggregate")] - pub quota_bytes_used_aggregate: Option, - /// List of max upload sizes for each file type. The most specific type takes precedence. - #[serde(rename="maxUploadSizes")] - pub max_upload_sizes: Option>, - /// The current user's ID as visible in the permissions collection. - #[serde(rename="permissionId")] - pub permission_id: Option, - /// The name of the current user. - pub name: Option, - /// The total number of quota bytes. - #[serde(rename="quotaBytesTotal")] - pub quota_bytes_total: Option, - /// The number of remaining change ids, limited to no more than 2500. - #[serde(rename="remainingChangeIds")] - pub remaining_change_ids: Option, - /// The ETag of the item. - pub etag: Option, - /// The allowable import formats. - #[serde(rename="importFormats")] - pub import_formats: Option>, - /// The id of the root folder. - #[serde(rename="rootFolderId")] - pub root_folder_id: Option, - /// The largest change id. - #[serde(rename="largestChangeId")] - pub largest_change_id: Option, - /// The number of quota bytes used by trashed items. - #[serde(rename="quotaBytesUsedInTrash")] - pub quota_bytes_used_in_trash: Option, - /// The allowable export formats. - #[serde(rename="exportFormats")] - pub export_formats: Option>, - /// The domain sharing policy for the current user. Possible values are: - /// - allowed - /// - allowedWithWarning - /// - incomingOnly - /// - disallowed - #[serde(rename="domainSharingPolicy")] - pub domain_sharing_policy: Option, - /// A link back to this item. - #[serde(rename="selfLink")] - pub self_link: Option, - /// A boolean indicating whether the authenticated app is installed by the authenticated user. - #[serde(rename="isCurrentAppInstalled")] - pub is_current_app_installed: Option, -} - -impl ResponseResult for About {} - - -/// A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail. +/// Capabilities the current user has on this Team Drive. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FileThumbnail { - /// The MIME type of the thumbnail. - #[serde(rename="mimeType")] - pub mime_type: Option, - /// The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5. - pub image: Option, -} - -impl NestedType for FileThumbnail {} -impl Part for FileThumbnail {} - - -/// The metadata for a file. -/// -/// # 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*). -/// -/// * [watch files](struct.FileWatchCall.html) (none) -/// * [empty trash files](struct.FileEmptyTrashCall.html) (none) -/// * [generate ids files](struct.FileGenerateIdCall.html) (none) -/// * [copy files](struct.FileCopyCall.html) (request|response) -/// * [list files](struct.FileListCall.html) (none) -/// * [delete files](struct.FileDeleteCall.html) (none) -/// * [patch files](struct.FilePatchCall.html) (request|response) -/// * [update files](struct.FileUpdateCall.html) (request|response) -/// * [insert files](struct.FileInsertCall.html) (request|response) -/// * [untrash files](struct.FileUntrashCall.html) (response) -/// * [trash files](struct.FileTrashCall.html) (response) -/// * [touch files](struct.FileTouchCall.html) (response) -/// * [get files](struct.FileGetCall.html) (response) -/// * [export files](struct.FileExportCall.html) (none) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct File { - /// Whether this file has a thumbnail. - #[serde(rename="hasThumbnail")] - pub has_thumbnail: Option, - /// The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type. - #[serde(rename="mimeType")] - pub mime_type: Option, - /// Whether this file is in the Application Data folder. - #[serde(rename="appDataContents")] - pub app_data_contents: Option, - /// A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. - #[serde(rename="thumbnailLink")] - pub thumbnail_link: Option, - /// A group of labels for the file. - pub labels: Option, - /// Indexable text attributes for the file (can only be written) - #[serde(rename="indexableText")] - pub indexable_text: Option, - /// The thumbnail version for use in client-contructable thumbnail URLs or thumbnail cache invalidation. - #[serde(rename="thumbnailVersion")] - pub thumbnail_version: Option, - /// Whether this file has been explicitly trashed, as opposed to recursively trashed. - #[serde(rename="explicitlyTrashed")] - pub explicitly_trashed: Option, - /// Whether the file was created or opened by the requesting app. - #[serde(rename="isAppAuthorized")] - pub is_app_authorized: Option, - /// Name of the last user to modify this file. - #[serde(rename="lastModifyingUserName")] - pub last_modifying_user_name: Option, - /// Whether writers can share the document with other users. - #[serde(rename="writersCanShare")] - pub writers_can_share: Option, - /// Whether the file is owned by the current user. - #[serde(rename="ownedByMe")] - pub owned_by_me: Option, - /// Time at which this file was shared with the user (formatted RFC 3339 timestamp). - #[serde(rename="sharedWithMeDate")] - pub shared_with_me_date: Option, - /// User that shared the item with the current user, if available. - #[serde(rename="sharingUser")] - pub sharing_user: Option, - /// Metadata about video media. This will only be present for video types. - #[serde(rename="videoMediaMetadata")] - pub video_media_metadata: Option, - /// The last user to modify this file. - #[serde(rename="lastModifyingUser")] - pub last_modifying_user: Option, - /// Whether the file can be copied by the current user. - pub copyable: Option, - /// Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. - #[serde(rename="folderColorRgb")] - pub folder_color_rgb: Option, - /// Name(s) of the owner(s) of this file. - #[serde(rename="ownerNames")] - pub owner_names: Option>, - /// The type of file. This is always drive#file. - pub kind: Option, - /// The ID of the file. - pub id: Option, - /// A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting. - #[serde(rename="webViewLink")] - pub web_view_link: Option, - /// A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user. - pub version: Option, - /// Collection of parent folders which contain this file. - /// Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder. - pub parents: Option>, - /// Links for exporting Google Docs to specific formats. - #[serde(rename="exportLinks")] - pub export_links: Option>, - /// Whether the file has been shared. - pub shared: Option, - /// A link to the file's icon. - #[serde(rename="iconLink")] - pub icon_link: Option, - /// The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. - #[serde(rename="fullFileExtension")] - pub full_file_extension: Option, - /// A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. - #[serde(rename="openWithLinks")] - pub open_with_links: Option>, - /// Whether the current user has read access to the Revisions resource of the file. +pub struct TeamDriveCapabilities { + /// Whether the current user can read the revisions resource of files in this Team Drive. #[serde(rename="canReadRevisions")] pub can_read_revisions: Option, - /// A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. - #[serde(rename="defaultOpenWithLink")] - pub default_open_with_link: Option, - /// A short description of the file. - pub description: Option, - /// A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials. - #[serde(rename="webContentLink")] - pub web_content_link: Option, - /// Whether the file can be edited by the current user. - pub editable: Option, - /// Deprecated. - #[serde(rename="markedViewedByMeDate")] - pub marked_viewed_by_me_date: Option, - /// A link for embedding the file. - #[serde(rename="embedLink")] - pub embed_link: Option, - /// Whether the current user can comment on the file. + /// Whether the current user can copy files in this Team Drive. + #[serde(rename="canCopy")] + pub can_copy: Option, + /// Whether the current user can edit files in this Team Drive + #[serde(rename="canEdit")] + pub can_edit: Option, + /// Whether the current user can add children to folders in this Team Drive. + #[serde(rename="canAddChildren")] + pub can_add_children: Option, + /// Whether the current user can share files or folders in this Team Drive. + #[serde(rename="canShare")] + pub can_share: Option, + /// Whether the current user can add members to this Team Drive or remove them or change their role. + #[serde(rename="canManageMembers")] + pub can_manage_members: Option, + /// Whether the current user can download files in this Team Drive. + #[serde(rename="canDownload")] + pub can_download: Option, + /// Whether the current user can comment on files in this Team Drive. #[serde(rename="canComment")] pub can_comment: Option, - /// The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. - #[serde(rename="fileExtension")] - pub file_extension: Option, - /// Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set. - #[serde(rename="modifiedDate")] - pub modified_date: Option, - /// Create time for this file (formatted RFC 3339 timestamp). - #[serde(rename="createdDate")] - pub created_date: Option, - /// Last time this file was viewed by the user (formatted RFC 3339 timestamp). - #[serde(rename="lastViewedByMeDate")] - pub last_viewed_by_me_date: Option, - /// The list of properties. - pub properties: Option>, - /// An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. - #[serde(rename="md5Checksum")] - pub md5_checksum: Option, - /// The list of permissions for users with access to this file. - pub permissions: Option>, - /// Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content. - #[serde(rename="imageMediaMetadata")] - pub image_media_metadata: Option, - /// The owner(s) of this file. - pub owners: Option>, - /// ETag of the file. - pub etag: Option, - /// A link for opening the file in a relevant Google editor or viewer. - #[serde(rename="alternateLink")] - pub alternate_link: Option, - /// The title of this file. - pub title: Option, - /// Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date. - #[serde(rename="modifiedByMeDate")] - pub modified_by_me_date: Option, - /// A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail. - pub thumbnail: Option, - /// no description provided - #[serde(rename="downloadUrl")] - pub download_url: Option, - /// The permissions for the authenticated user on this file. - #[serde(rename="userPermission")] - pub user_permission: Option, - /// The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'. - pub spaces: Option>, - /// Whether the file's sharing settings can be modified by the current user. - pub shareable: Option, - /// The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Drive. - #[serde(rename="originalFilename")] - pub original_filename: Option, - /// The number of quota bytes used by this file. - #[serde(rename="quotaBytesUsed")] - pub quota_bytes_used: Option, - /// The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. - #[serde(rename="headRevisionId")] - pub head_revision_id: Option, - /// A link back to this file. - #[serde(rename="selfLink")] - pub self_link: Option, - /// The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. - #[serde(rename="fileSize")] - pub file_size: Option, + /// Whether the current user can change the background of this Team Drive. + #[serde(rename="canChangeTeamDriveBackground")] + pub can_change_team_drive_background: Option, + /// Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive. + #[serde(rename="canDeleteTeamDrive")] + pub can_delete_team_drive: Option, + /// Whether the current user can rename this Team Drive. + #[serde(rename="canRenameTeamDrive")] + pub can_rename_team_drive: Option, + /// Whether the current user can remove children from folders in this Team Drive. + #[serde(rename="canRemoveChildren")] + pub can_remove_children: Option, + /// Whether the current user can list the children of folders in this Team Drive. + #[serde(rename="canListChildren")] + pub can_list_children: Option, + /// Whether the current user can rename files or folders in this Team Drive. + #[serde(rename="canRename")] + pub can_rename: Option, } -impl RequestValue for File {} -impl Resource for File {} -impl ResponseResult for File {} - - -/// Information about supported additional roles per file type. The most specific type takes precedence. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AboutAdditionalRoleInfo { - /// The supported additional roles per primary role. - #[serde(rename="roleSets")] - pub role_sets: Option>, - /// The content type that this additional role info applies to. - #[serde(rename="type")] - pub type_: Option, -} - -impl NestedType for AboutAdditionalRoleInfo {} -impl Part for AboutAdditionalRoleInfo {} - - -/// A list of changes for a user. -/// -/// # 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*). -/// -/// * [list changes](struct.ChangeListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ChangeList { - /// The page token for the next page of changes. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// This is always drive#changeList. - pub kind: Option, - /// The ETag of the list. - pub etag: Option, - /// The current largest change ID. - #[serde(rename="largestChangeId")] - pub largest_change_id: Option, - /// The actual list of changes. - pub items: Option>, - /// A link back to this list. - #[serde(rename="selfLink")] - pub self_link: Option, - /// A link to the next page of changes. - #[serde(rename="nextLink")] - pub next_link: Option, -} - -impl ResponseResult for ChangeList {} +impl NestedType for TeamDriveCapabilities {} +impl Part for TeamDriveCapabilities {} /// A collection of properties, key-value pairs that are either public or private to an application. @@ -964,83 +579,6 @@ pub struct PropertyList { impl ResponseResult for PropertyList {} -/// An ID for a user or group as seen in Permission items. -/// -/// # 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*). -/// -/// * [get id for email permissions](struct.PermissionGetIdForEmailCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct PermissionId { - /// This is always drive#permissionId. - pub kind: Option, - /// The permission ID. - pub id: Option, -} - -impl ResponseResult for PermissionId {} - - -/// A list of permissions associated with a file. -/// -/// # 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*). -/// -/// * [list permissions](struct.PermissionListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct PermissionList { - /// The actual list of permissions. - pub items: Option>, - /// This is always drive#permissionList. - pub kind: Option, - /// The ETag of the list. - pub etag: Option, - /// A link back to this list. - #[serde(rename="selfLink")] - pub self_link: Option, -} - -impl ResponseResult for PermissionList {} - - -/// Indexable text attributes for the file (can only be written) -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FileIndexableText { - /// The text to be indexed for this file. - pub text: Option, -} - -impl NestedType for FileIndexableText {} -impl Part for FileIndexableText {} - - -/// The supported additional roles per primary role. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AboutAdditionalRoleInfoRoleSets { - /// A primary permission role. - #[serde(rename="primaryRole")] - pub primary_role: Option, - /// The supported additional roles with the primary role. - #[serde(rename="additionalRoles")] - pub additional_roles: Option>, -} - -impl NestedType for AboutAdditionalRoleInfoRoleSets {} -impl Part for AboutAdditionalRoleInfoRoleSets {} - - /// A list of replies to a comment on a file in Google Drive. /// /// # Activities @@ -1052,10 +590,10 @@ impl Part for AboutAdditionalRoleInfoRoleSets {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentReplyList { - /// The token to use to request the next page of results. + /// The page token for the next page of replies. This will be absent if the end of the replies list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, - /// List of reply. + /// The list of replies. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. pub items: Option>, /// This is always drive#commentReplyList. pub kind: Option, @@ -1086,195 +624,22 @@ impl NestedType for AboutImportFormats {} impl Part for AboutImportFormats {} -/// A list of revisions of a file. -/// -/// # 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*). -/// -/// * [list revisions](struct.RevisionListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct RevisionList { - /// The page token for the next page of revisions. This field will be absent if the end of the revisions list has been reached. If the token is rejected for any reason, it should be discarded and pagination should be restarted from the first page of results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The actual list of revisions. - pub items: Option>, - /// This is always drive#revisionList. - pub kind: Option, - /// The ETag of the list. - pub etag: Option, - /// A link back to this list. - #[serde(rename="selfLink")] - pub self_link: Option, -} - -impl ResponseResult for RevisionList {} - - -/// List of max upload sizes for each file type. The most specific type takes precedence. +/// Information about supported additional roles per file type. The most specific type takes precedence. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AboutMaxUploadSizes { - /// The file type. +pub struct AboutAdditionalRoleInfo { + /// The supported additional roles per primary role. + #[serde(rename="roleSets")] + pub role_sets: Option>, + /// The content type that this additional role info applies to. #[serde(rename="type")] pub type_: Option, - /// The max upload size for this type. - pub size: Option, } -impl NestedType for AboutMaxUploadSizes {} -impl Part for AboutMaxUploadSizes {} - - -/// A group of labels for the file. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FileLabels { - /// Whether this file is starred by the user. - pub starred: Option, - /// Whether this file has been viewed by this user. - pub viewed: Option, - /// Whether viewers and commenters are prevented from downloading, printing, and copying this file. - pub restricted: Option, - /// Deprecated. - pub hidden: Option, - /// Whether the file has been modified by this user. - pub modified: Option, - /// Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files. - pub trashed: Option, -} - -impl NestedType for FileLabels {} -impl Part for FileLabels {} - - -/// A list of generated IDs which can be provided in insert requests -/// -/// # 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*). -/// -/// * [generate ids files](struct.FileGenerateIdCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GeneratedIds { - /// This is always drive#generatedIds - pub kind: Option, - /// The IDs generated for the requesting user in the specified space. - pub ids: Option>, - /// The type of file that can be created with these IDs. - pub space: Option, -} - -impl ResponseResult for GeneratedIds {} - - -/// An notification channel used to watch for resource changes. -/// -/// # 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*). -/// -/// * [watch changes](struct.ChangeWatchCall.html) (request|response) -/// * [watch files](struct.FileWatchCall.html) (request|response) -/// * [stop channels](struct.ChannelStopCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Channel { - /// A version-specific identifier for the watched resource. - #[serde(rename="resourceUri")] - pub resource_uri: Option, - /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". - pub kind: Option, - /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. - #[serde(rename="resourceId")] - pub resource_id: Option, - /// A UUID or similar unique string that identifies this channel. - pub id: Option, - /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. - pub token: Option, - /// Additional parameters controlling delivery channel behavior. Optional. - pub params: Option>, - /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. - pub expiration: Option, - /// The address where notifications are delivered for this channel. - pub address: Option, - /// The type of delivery mechanism used for this channel. - #[serde(rename="type")] - pub type_: Option, - /// A Boolean value to indicate whether payload is wanted. Optional. - pub payload: Option, -} - -impl RequestValue for Channel {} -impl Resource for Channel {} -impl ResponseResult for Channel {} - - -/// A reference to a folder's child. -/// -/// # 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*). -/// -/// * [insert children](struct.ChildrenInsertCall.html) (request|response) -/// * [get children](struct.ChildrenGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ChildReference { - /// This is always drive#childReference. - pub kind: Option, - /// A link to the child. - #[serde(rename="childLink")] - pub child_link: Option, - /// The ID of the child. - pub id: Option, - /// A link back to this reference. - #[serde(rename="selfLink")] - pub self_link: Option, -} - -impl RequestValue for ChildReference {} -impl ResponseResult for ChildReference {} - - -/// A list of comments on a file in Google Drive. -/// -/// # 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*). -/// -/// * [list comments](struct.CommentListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CommentList { - /// The token to use to request the next page of results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// List of comments. - pub items: Option>, - /// This is always drive#commentList. - pub kind: Option, - /// A link back to this list. - #[serde(rename="selfLink")] - pub self_link: Option, - /// A link to the next page of comments. - #[serde(rename="nextLink")] - pub next_link: Option, -} - -impl ResponseResult for CommentList {} +impl NestedType for AboutAdditionalRoleInfo {} +impl Part for AboutAdditionalRoleInfo {} /// A list of a file's parents. @@ -1288,7 +653,7 @@ impl ResponseResult for CommentList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ParentList { - /// The actual list of parents. + /// The list of parents. pub items: Option>, /// This is always drive#parentList. pub kind: Option, @@ -1302,44 +667,6 @@ pub struct ParentList { impl ResponseResult for ParentList {} -/// A key-value pair attached to a file that is either public or private to an application. -/// The following limits apply to file properties: -/// - Maximum of 100 properties total per file -/// - Maximum of 30 private properties per app -/// - Maximum of 30 public properties -/// - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. -/// -/// # 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*). -/// -/// * [insert properties](struct.PropertyInsertCall.html) (request|response) -/// * [get properties](struct.PropertyGetCall.html) (response) -/// * [patch properties](struct.PropertyPatchCall.html) (request|response) -/// * [update properties](struct.PropertyUpdateCall.html) (request|response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Property { - /// The link back to this property. - #[serde(rename="selfLink")] - pub self_link: Option, - /// This is always drive#property. - pub kind: Option, - /// ETag of the property. - pub etag: Option, - /// The visibility of this property. - pub visibility: Option, - /// The key of this property. - pub key: Option, - /// The value of this property. - pub value: Option, -} - -impl RequestValue for Property {} -impl ResponseResult for Property {} - - /// The amount of storage quota used by different Google services. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1358,75 +685,6 @@ impl NestedType for AboutQuotaBytesByService {} impl Part for AboutQuotaBytesByService {} -/// A permission for a file. -/// -/// # 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*). -/// -/// * [patch permissions](struct.PermissionPatchCall.html) (request|response) -/// * [list permissions](struct.PermissionListCall.html) (none) -/// * [insert permissions](struct.PermissionInsertCall.html) (request|response) -/// * [get permissions](struct.PermissionGetCall.html) (response) -/// * [get id for email permissions](struct.PermissionGetIdForEmailCall.html) (none) -/// * [delete permissions](struct.PermissionDeleteCall.html) (none) -/// * [update permissions](struct.PermissionUpdateCall.html) (request|response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Permission { - /// Whether the link is required for this permission. - #[serde(rename="withLink")] - pub with_link: Option, - /// The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. - pub domain: Option, - /// The name for this permission. - pub name: Option, - /// This is always drive#permission. - pub kind: Option, - /// The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. - pub value: Option, - /// Additional roles for this user. Only commenter is currently allowed. - #[serde(rename="additionalRoles")] - pub additional_roles: Option>, - /// The authkey parameter required for this permission. - #[serde(rename="authKey")] - pub auth_key: Option, - /// The ETag of the permission. - pub etag: Option, - /// The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. - #[serde(rename="emailAddress")] - pub email_address: Option, - /// The time at which this permission will expire (RFC 3339 date-time). - #[serde(rename="expirationDate")] - pub expiration_date: Option, - /// The primary role for this user. Allowed values are: - /// - owner - /// - reader - /// - writer - pub role: Option, - /// The account type. Allowed values are: - /// - user - /// - group - /// - domain - /// - anyone - #[serde(rename="type")] - pub type_: Option, - /// The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. - pub id: Option, - /// A link back to this permission. - #[serde(rename="selfLink")] - pub self_link: Option, - /// A link to the profile photo, if available. - #[serde(rename="photoLink")] - pub photo_link: Option, -} - -impl RequestValue for Permission {} -impl Resource for Permission {} -impl ResponseResult for Permission {} - - /// Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1494,6 +752,1175 @@ impl NestedType for FileImageMediaMetadata {} impl Part for FileImageMediaMetadata {} +/// List of max upload sizes for each file type. The most specific type takes precedence. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AboutMaxUploadSizes { + /// The file type. + #[serde(rename="type")] + pub type_: Option, + /// The max upload size for this type. + pub size: Option, +} + +impl NestedType for AboutMaxUploadSizes {} +impl Part for AboutMaxUploadSizes {} + + +/// Information about a Drive user. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct User { + /// The user's profile picture. + pub picture: Option, + /// This is always drive#user. + pub kind: Option, + /// Whether this user is the same as the authenticated user for whom the request was made. + #[serde(rename="isAuthenticatedUser")] + pub is_authenticated_user: Option, + /// A plain text displayable name for this user. + #[serde(rename="displayName")] + pub display_name: Option, + /// The email address of the user. + #[serde(rename="emailAddress")] + pub email_address: Option, + /// The user's ID as visible in the permissions collection. + #[serde(rename="permissionId")] + pub permission_id: Option, +} + +impl Part for User {} + + +/// A list of third-party applications which the user has installed or given access to Google Drive. +/// +/// # 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*). +/// +/// * [list apps](struct.AppListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AppList { + /// The list of apps. + pub items: Option>, + /// This is always drive#appList. + pub kind: Option, + /// The ETag of the list. + pub etag: Option, + /// A link back to this list. + #[serde(rename="selfLink")] + pub self_link: Option, + /// List of app IDs that the user has specified to use by default. The list is in reverse-priority order (lowest to highest). + #[serde(rename="defaultAppIds")] + pub default_app_ids: Option>, +} + +impl ResponseResult for AppList {} + + +/// Representation of a change to a file or Team Drive. +/// +/// # 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*). +/// +/// * [list changes](struct.ChangeListCall.html) (none) +/// * [get start page token changes](struct.ChangeGetStartPageTokenCall.html) (none) +/// * [watch changes](struct.ChangeWatchCall.html) (none) +/// * [get changes](struct.ChangeGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Change { + /// The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member of the Team Drive, and the Team Drive has not been deleted. + #[serde(rename="teamDrive")] + pub team_drive: Option, + /// This is always drive#change. + pub kind: Option, + /// Whether the file or Team Drive has been removed from this list of changes, for example by deletion or loss of access. + pub deleted: Option, + /// The updated state of the file. Present if the type is file and the file has not been removed from this list of changes. + pub file: Option, + /// The time of this modification. + #[serde(rename="modificationDate")] + pub modification_date: Option, + /// The ID of the Team Drive associated with this change. + #[serde(rename="teamDriveId")] + pub team_drive_id: Option, + /// The type of the change. Possible values are file and teamDrive. + #[serde(rename="type")] + pub type_: Option, + /// The ID of the change. + pub id: Option, + /// A link back to this change. + #[serde(rename="selfLink")] + pub self_link: Option, + /// The ID of the file associated with this change. + #[serde(rename="fileId")] + pub file_id: Option, +} + +impl Resource for Change {} +impl ResponseResult for Change {} + + +/// A reference to a file's parent. +/// +/// # 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*). +/// +/// * [get parents](struct.ParentGetCall.html) (response) +/// * [insert parents](struct.ParentInsertCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ParentReference { + /// Whether or not the parent is the root folder. + #[serde(rename="isRoot")] + pub is_root: Option, + /// This is always drive#parentReference. + pub kind: Option, + /// The ID of the parent. + pub id: Option, + /// A link back to this reference. + #[serde(rename="selfLink")] + pub self_link: Option, + /// A link to the parent. + #[serde(rename="parentLink")] + pub parent_link: Option, +} + +impl RequestValue for ParentReference {} +impl ResponseResult for ParentReference {} + + +/// A list of comments on a file in Google Drive. +/// +/// # 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*). +/// +/// * [list comments](struct.CommentListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CommentList { + /// The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. + pub items: Option>, + /// This is always drive#commentList. + pub kind: Option, + /// A link back to this list. + #[serde(rename="selfLink")] + pub self_link: Option, + /// A link to the next page of comments. + #[serde(rename="nextLink")] + pub next_link: Option, +} + +impl ResponseResult for CommentList {} + + +/// A list of revisions of a file. +/// +/// # 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*). +/// +/// * [list revisions](struct.RevisionListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct RevisionList { + /// The page token for the next page of revisions. This field will be absent if the end of the revisions list has been reached. If the token is rejected for any reason, it should be discarded and pagination should be restarted from the first page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. + pub items: Option>, + /// This is always drive#revisionList. + pub kind: Option, + /// The ETag of the list. + pub etag: Option, + /// A link back to this list. + #[serde(rename="selfLink")] + pub self_link: Option, +} + +impl ResponseResult for RevisionList {} + + +/// A revision of a file. +/// +/// # 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*). +/// +/// * [delete revisions](struct.RevisionDeleteCall.html) (none) +/// * [update revisions](struct.RevisionUpdateCall.html) (request|response) +/// * [patch revisions](struct.RevisionPatchCall.html) (request|response) +/// * [list revisions](struct.RevisionListCall.html) (none) +/// * [get revisions](struct.RevisionGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Revision { + /// The MIME type of the revision. + #[serde(rename="mimeType")] + pub mime_type: Option, + /// A link to the published revision. + #[serde(rename="publishedLink")] + pub published_link: Option, + /// Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs. + #[serde(rename="publishedOutsideDomain")] + pub published_outside_domain: Option, + /// Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs. + #[serde(rename="publishAuto")] + pub publish_auto: Option, + /// The size of the revision in bytes. This will only be populated on files with content stored in Drive. + #[serde(rename="fileSize")] + pub file_size: Option, + /// Name of the last user to modify this revision. + #[serde(rename="lastModifyingUserName")] + pub last_modifying_user_name: Option, + /// The ID of the revision. + pub id: Option, + /// An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive. + #[serde(rename="md5Checksum")] + pub md5_checksum: Option, + /// Short term download URL for the file. This will only be populated on files with content stored in Drive. + #[serde(rename="downloadUrl")] + pub download_url: Option, + /// This is always drive#revision. + pub kind: Option, + /// The last user to modify this revision. + #[serde(rename="lastModifyingUser")] + pub last_modifying_user: Option, + /// Whether this revision is pinned to prevent automatic purging. This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter. + pub pinned: Option, + /// The ETag of the revision. + pub etag: Option, + /// The original filename when this revision was created. This will only be populated on files with content stored in Drive. + #[serde(rename="originalFilename")] + pub original_filename: Option, + /// Links for exporting Google Docs to specific formats. + #[serde(rename="exportLinks")] + pub export_links: Option>, + /// Whether this revision is published. This is only populated and can only be modified for Google Docs. + pub published: Option, + /// A link back to this revision. + #[serde(rename="selfLink")] + pub self_link: Option, + /// Last time this revision was modified (formatted RFC 3339 timestamp). + #[serde(rename="modifiedDate")] + pub modified_date: Option, +} + +impl RequestValue for Revision {} +impl Resource for Revision {} +impl ResponseResult for Revision {} + + +/// List of additional features enabled on this account. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AboutFeatures { + /// The name of the feature. + #[serde(rename="featureName")] + pub feature_name: Option, + /// The request limit rate for this feature, in queries per second. + #[serde(rename="featureRate")] + pub feature_rate: Option, +} + +impl NestedType for AboutFeatures {} +impl Part for AboutFeatures {} + + +/// Geographic location information stored in the image. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileImageMediaMetadataLocation { + /// The latitude stored in the image. + pub latitude: Option, + /// The altitude stored in the image. + pub altitude: Option, + /// The longitude stored in the image. + pub longitude: Option, +} + +impl NestedType for FileImageMediaMetadataLocation {} +impl Part for FileImageMediaMetadataLocation {} + + +/// Metadata about video media. This will only be present for video types. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileVideoMediaMetadata { + /// The width of the video in pixels. + pub width: Option, + /// The duration of the video in milliseconds. + #[serde(rename="durationMillis")] + pub duration_millis: Option, + /// The height of the video in pixels. + pub height: Option, +} + +impl NestedType for FileVideoMediaMetadata {} +impl Part for FileVideoMediaMetadata {} + + +/// The allowable export formats. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AboutExportFormats { + /// The content type to convert from. + pub source: Option, + /// The possible content types to convert to. + pub targets: Option>, +} + +impl NestedType for AboutExportFormats {} +impl Part for AboutExportFormats {} + + +/// The various icons for the app. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AppIcons { + /// Category of the icon. Allowed values are: + /// - application - icon for the application + /// - document - icon for a file associated with the app + /// - documentShared - icon for a shared file associated with the app + pub category: Option, + /// URL for the icon. + #[serde(rename="iconUrl")] + pub icon_url: Option, + /// Size of the icon. Represented as the maximum of the width and height. + pub size: Option, +} + +impl NestedType for AppIcons {} +impl Part for AppIcons {} + + +/// An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TeamDriveBackgroundImageFile { + /// The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high. + pub width: Option, + /// The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image. + #[serde(rename="yCoordinate")] + pub y_coordinate: Option, + /// The ID of an image file in Drive to use for the background image. + pub id: Option, + /// The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image. + #[serde(rename="xCoordinate")] + pub x_coordinate: Option, +} + +impl NestedType for TeamDriveBackgroundImageFile {} +impl Part for TeamDriveBackgroundImageFile {} + + +/// A list of changes for a user. +/// +/// # 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*). +/// +/// * [list changes](struct.ChangeListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ChangeList { + /// The page token for the next page of changes. This will be absent if the end of the changes list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// This is always drive#changeList. + pub kind: Option, + /// The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. + pub items: Option>, + /// A link to the next page of changes. + #[serde(rename="nextLink")] + pub next_link: Option, + /// The ETag of the list. + pub etag: Option, + /// The starting page token for future changes. This will be present only if the end of the current changes list has been reached. + #[serde(rename="newStartPageToken")] + pub new_start_page_token: Option, + /// The current largest change ID. + #[serde(rename="largestChangeId")] + pub largest_change_id: Option, + /// A link back to this list. + #[serde(rename="selfLink")] + pub self_link: Option, +} + +impl ResponseResult for ChangeList {} + + +/// An ID for a user or group as seen in Permission items. +/// +/// # 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*). +/// +/// * [get id for email permissions](struct.PermissionGetIdForEmailCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct PermissionId { + /// This is always drive#permissionId. + pub kind: Option, + /// The permission ID. + pub id: Option, +} + +impl ResponseResult for PermissionId {} + + +/// The supported additional roles per primary role. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AboutAdditionalRoleInfoRoleSets { + /// A primary permission role. + #[serde(rename="primaryRole")] + pub primary_role: Option, + /// The supported additional roles with the primary role. + #[serde(rename="additionalRoles")] + pub additional_roles: Option>, +} + +impl NestedType for AboutAdditionalRoleInfoRoleSets {} +impl Part for AboutAdditionalRoleInfoRoleSets {} + + +/// A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileThumbnail { + /// The MIME type of the thumbnail. + #[serde(rename="mimeType")] + pub mime_type: Option, + /// The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5. + pub image: Option, +} + +impl NestedType for FileThumbnail {} +impl Part for FileThumbnail {} + + +/// A list of generated IDs which can be provided in insert requests +/// +/// # 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*). +/// +/// * [generate ids files](struct.FileGenerateIdCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GeneratedIds { + /// This is always drive#generatedIds + pub kind: Option, + /// The IDs generated for the requesting user in the specified space. + pub ids: Option>, + /// The type of file that can be created with these IDs. + pub space: Option, +} + +impl ResponseResult for GeneratedIds {} + + +/// An notification channel used to watch for resource changes. +/// +/// # 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*). +/// +/// * [watch changes](struct.ChangeWatchCall.html) (request|response) +/// * [watch files](struct.FileWatchCall.html) (request|response) +/// * [stop channels](struct.ChannelStopCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Channel { + /// A version-specific identifier for the watched resource. + #[serde(rename="resourceUri")] + pub resource_uri: Option, + /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". + pub kind: Option, + /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. + #[serde(rename="resourceId")] + pub resource_id: Option, + /// A UUID or similar unique string that identifies this channel. + pub id: Option, + /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. + pub token: Option, + /// Additional parameters controlling delivery channel behavior. Optional. + pub params: Option>, + /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. + pub expiration: Option, + /// The address where notifications are delivered for this channel. + pub address: Option, + /// The type of delivery mechanism used for this channel. + #[serde(rename="type")] + pub type_: Option, + /// A Boolean value to indicate whether payload is wanted. Optional. + pub payload: Option, +} + +impl RequestValue for Channel {} +impl Resource for Channel {} +impl ResponseResult for Channel {} + + +/// A group of labels for the file. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileLabels { + /// Whether this file is starred by the user. + pub starred: Option, + /// Whether this file has been viewed by this user. + pub viewed: Option, + /// Whether viewers and commenters are prevented from downloading, printing, and copying this file. + pub restricted: Option, + /// Deprecated. + pub hidden: Option, + /// Whether the file has been modified by this user. + pub modified: Option, + /// Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files. + pub trashed: Option, +} + +impl NestedType for FileLabels {} +impl Part for FileLabels {} + + +/// Representation of a Team Drive. +/// +/// # 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*). +/// +/// * [insert teamdrives](struct.TeamdriveInsertCall.html) (request|response) +/// * [get teamdrives](struct.TeamdriveGetCall.html) (response) +/// * [update teamdrives](struct.TeamdriveUpdateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TeamDrive { + /// This is always drive#teamDrive + pub kind: Option, + /// A short-lived link to this Team Drive's background image. + #[serde(rename="backgroundImageLink")] + pub background_image_link: Option, + /// The name of this Team Drive. + pub name: Option, + /// The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. + #[serde(rename="themeId")] + pub theme_id: Option, + /// The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId. + #[serde(rename="colorRgb")] + pub color_rgb: Option, + /// Capabilities the current user has on this Team Drive. + pub capabilities: Option, + /// An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set. + #[serde(rename="backgroundImageFile")] + pub background_image_file: Option, + /// The ID of this Team Drive which is also the ID of the top level folder for this Team Drive. + pub id: Option, +} + +impl RequestValue for TeamDrive {} +impl Resource for TeamDrive {} +impl ResponseResult for TeamDrive {} + + +/// A permission for a file. +/// +/// # 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*). +/// +/// * [patch permissions](struct.PermissionPatchCall.html) (request|response) +/// * [list permissions](struct.PermissionListCall.html) (none) +/// * [insert permissions](struct.PermissionInsertCall.html) (request|response) +/// * [get permissions](struct.PermissionGetCall.html) (response) +/// * [get id for email permissions](struct.PermissionGetIdForEmailCall.html) (none) +/// * [delete permissions](struct.PermissionDeleteCall.html) (none) +/// * [update permissions](struct.PermissionUpdateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Permission { + /// The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain. + pub domain: Option, + /// Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. + pub deleted: Option, + /// The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group. + #[serde(rename="emailAddress")] + pub email_address: Option, + /// The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: + /// - They can only be set on user and group permissions + /// - The date must be in the future + /// - The date cannot be more than a year in the future + /// - The date can only be set on drive.permissions.update requests + #[serde(rename="expirationDate")] + pub expiration_date: Option, + /// Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. + #[serde(rename="additionalRoles")] + pub additional_roles: Option>, + /// Whether the link is required for this permission. + #[serde(rename="withLink")] + pub with_link: Option, + /// This is always drive#permission. + pub kind: Option, + /// The name for this permission. + pub name: Option, + /// The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. + pub value: Option, + /// The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. + pub id: Option, + /// The authkey parameter required for this permission. + #[serde(rename="authKey")] + pub auth_key: Option, + /// The ETag of the permission. + pub etag: Option, + /// The primary role for this user. While new values may be supported in the future, the following are currently allowed: + /// - organizer + /// - owner + /// - reader + /// - writer + pub role: Option, + /// A link to the profile photo, if available. + #[serde(rename="photoLink")] + pub photo_link: Option, + /// Details of whether the permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. + #[serde(rename="teamDrivePermissionDetails")] + pub team_drive_permission_details: Option>, + /// The account type. Allowed values are: + /// - user + /// - group + /// - domain + /// - anyone + #[serde(rename="type")] + pub type_: Option, + /// A link back to this permission. + #[serde(rename="selfLink")] + pub self_link: Option, +} + +impl RequestValue for Permission {} +impl Resource for Permission {} +impl ResponseResult for Permission {} + + +/// Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileCapabilities { + /// Whether the current user can read the revisions resource of this file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read. + #[serde(rename="canReadRevisions")] + pub can_read_revisions: Option, + /// Whether the current user can restore this file from trash. + #[serde(rename="canUntrash")] + pub can_untrash: Option, + /// Whether the current user can copy this file. For a Team Drive item, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder. + #[serde(rename="canCopy")] + pub can_copy: Option, + /// Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem. + #[serde(rename="canMoveItemIntoTeamDrive")] + pub can_move_item_into_team_drive: Option, + /// Whether the current user can comment on this file. + #[serde(rename="canComment")] + pub can_comment: Option, + /// Whether the current user can list the children of this folder. This is always false when the item is not a folder. + #[serde(rename="canListChildren")] + pub can_list_children: Option, + /// Whether the current user can rename this file. + #[serde(rename="canRename")] + pub can_rename: Option, + /// Whether the current user can move this file to trash. + #[serde(rename="canTrash")] + pub can_trash: Option, + /// Whether the current user can delete this file. + #[serde(rename="canDelete")] + pub can_delete: Option, + /// Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files. + #[serde(rename="canMoveTeamDriveItem")] + pub can_move_team_drive_item: Option, + /// Whether the current user can add children to this folder. This is always false when the item is not a folder. + #[serde(rename="canAddChildren")] + pub can_add_children: Option, + /// Whether the current user can change the restricted download label of this file. + #[serde(rename="canChangeRestrictedDownload")] + pub can_change_restricted_download: Option, + /// Whether the current user can modify the sharing settings for this file. + #[serde(rename="canShare")] + pub can_share: Option, + /// Whether the current user can download this file. + #[serde(rename="canDownload")] + pub can_download: Option, + /// Whether the current user can remove children from this folder. This is always false when the item is not a folder. + #[serde(rename="canRemoveChildren")] + pub can_remove_children: Option, + /// Whether the current user can read the Team Drive to which this file belongs. Only populated for Team Drive files. + #[serde(rename="canReadTeamDrive")] + pub can_read_team_drive: Option, + /// Whether the current user can edit this file. + #[serde(rename="canEdit")] + pub can_edit: Option, +} + +impl NestedType for FileCapabilities {} +impl Part for FileCapabilities {} + + +/// Details of whether the permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct PermissionTeamDrivePermissionDetails { + /// Whether this permission is inherited. This field is always populated. This is an output-only field. + pub inherited: Option, + /// The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: + /// - file + /// - member + #[serde(rename="teamDrivePermissionType")] + pub team_drive_permission_type: Option, + /// The primary role for this user. While new values may be added in the future, the following are currently possible: + /// - organizer + /// - reader + /// - writer + pub role: Option, + /// Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. + #[serde(rename="additionalRoles")] + pub additional_roles: Option>, + /// The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. + #[serde(rename="inheritedFrom")] + pub inherited_from: Option, +} + +impl NestedType for PermissionTeamDrivePermissionDetails {} +impl Part for PermissionTeamDrivePermissionDetails {} + + +/// A list of files. +/// +/// # 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*). +/// +/// * [list files](struct.FileListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileList { + /// Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple Team Drives with the "default,allTeamDrives" corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as "default" or "teamDrive". + #[serde(rename="incompleteSearch")] + pub incomplete_search: Option, + /// The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// This is always drive#fileList. + pub kind: Option, + /// The ETag of the list. + pub etag: Option, + /// The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. + pub items: Option>, + /// A link back to this list. + #[serde(rename="selfLink")] + pub self_link: Option, + /// A link to the next page of files. + #[serde(rename="nextLink")] + pub next_link: Option, +} + +impl ResponseResult for FileList {} + + +/// A comment on a file in Google Drive. +/// +/// # 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*). +/// +/// * [patch replies](struct.ReplyPatchCall.html) (request|response) +/// * [insert replies](struct.ReplyInsertCall.html) (request|response) +/// * [get replies](struct.ReplyGetCall.html) (response) +/// * [update replies](struct.ReplyUpdateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CommentReply { + /// This is always drive#commentReply. + pub kind: Option, + /// The user who wrote this reply. + pub author: Option, + /// Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. + pub deleted: Option, + /// HTML formatted content for this reply. + #[serde(rename="htmlContent")] + pub html_content: Option, + /// The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). + pub content: Option, + /// The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: + /// - "resolve" - To resolve a comment. + /// - "reopen" - To reopen (un-resolve) a comment. + pub verb: Option, + /// The ID of the reply. + #[serde(rename="replyId")] + pub reply_id: Option, + /// The date when this reply was last modified. + #[serde(rename="modifiedDate")] + pub modified_date: Option, + /// The date when this reply was first created. + #[serde(rename="createdDate")] + pub created_date: Option, +} + +impl RequestValue for CommentReply {} +impl ResponseResult for CommentReply {} + + +/// The user's profile picture. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UserPicture { + /// A URL that points to a profile picture of this user. + pub url: Option, +} + +impl NestedType for UserPicture {} +impl Part for UserPicture {} + + +/// The context of the file which is being commented on. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CommentContext { + /// The MIME type of the context snippet. + #[serde(rename="type")] + pub type_: Option, + /// Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. + pub value: Option, +} + +impl NestedType for CommentContext {} +impl Part for CommentContext {} + + +/// A reference to a folder's child. +/// +/// # 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*). +/// +/// * [insert children](struct.ChildrenInsertCall.html) (request|response) +/// * [get children](struct.ChildrenGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ChildReference { + /// This is always drive#childReference. + pub kind: Option, + /// A link to the child. + #[serde(rename="childLink")] + pub child_link: Option, + /// The ID of the child. + pub id: Option, + /// A link back to this reference. + #[serde(rename="selfLink")] + pub self_link: Option, +} + +impl RequestValue for ChildReference {} +impl ResponseResult for ChildReference {} + + +/// Indexable text attributes for the file (can only be written) +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileIndexableText { + /// The text to be indexed for this file. + pub text: Option, +} + +impl NestedType for FileIndexableText {} +impl Part for FileIndexableText {} + + +/// An item with user information and settings. +/// +/// # 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*). +/// +/// * [get about](struct.AboutGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct About { + /// The user's language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/). + #[serde(rename="languageCode")] + pub language_code: Option, + /// The amount of storage quota used by different Google services. + #[serde(rename="quotaBytesByService")] + pub quota_bytes_by_service: Option>, + /// List of additional features enabled on this account. + pub features: Option>, + /// The number of quota bytes used by Google Drive. + #[serde(rename="quotaBytesUsed")] + pub quota_bytes_used: Option, + /// This is always drive#about. + pub kind: Option, + /// Information about supported additional roles per file type. The most specific type takes precedence. + #[serde(rename="additionalRoleInfo")] + pub additional_role_info: Option>, + /// The palette of allowable folder colors as RGB hex strings. + #[serde(rename="folderColorPalette")] + pub folder_color_palette: Option>, + /// The authenticated user. + pub user: Option, + /// The type of the user's storage quota. Possible values are: + /// - LIMITED + /// - UNLIMITED + #[serde(rename="quotaType")] + pub quota_type: Option, + /// The number of quota bytes used by all Google apps (Drive, Picasa, etc.). + #[serde(rename="quotaBytesUsedAggregate")] + pub quota_bytes_used_aggregate: Option, + /// List of max upload sizes for each file type. The most specific type takes precedence. + #[serde(rename="maxUploadSizes")] + pub max_upload_sizes: Option>, + /// The current user's ID as visible in the permissions collection. + #[serde(rename="permissionId")] + pub permission_id: Option, + /// The name of the current user. + pub name: Option, + /// A list of themes that are supported for Team Drives. + #[serde(rename="teamDriveThemes")] + pub team_drive_themes: Option>, + /// The total number of quota bytes. + #[serde(rename="quotaBytesTotal")] + pub quota_bytes_total: Option, + /// The number of remaining change ids, limited to no more than 2500. + #[serde(rename="remainingChangeIds")] + pub remaining_change_ids: Option, + /// The ETag of the item. + pub etag: Option, + /// The allowable import formats. + #[serde(rename="importFormats")] + pub import_formats: Option>, + /// The id of the root folder. + #[serde(rename="rootFolderId")] + pub root_folder_id: Option, + /// The largest change id. + #[serde(rename="largestChangeId")] + pub largest_change_id: Option, + /// The number of quota bytes used by trashed items. + #[serde(rename="quotaBytesUsedInTrash")] + pub quota_bytes_used_in_trash: Option, + /// The allowable export formats. + #[serde(rename="exportFormats")] + pub export_formats: Option>, + /// The domain sharing policy for the current user. Possible values are: + /// - allowed + /// - allowedWithWarning + /// - incomingOnly + /// - disallowed + #[serde(rename="domainSharingPolicy")] + pub domain_sharing_policy: Option, + /// A link back to this item. + #[serde(rename="selfLink")] + pub self_link: Option, + /// A boolean indicating whether the authenticated app is installed by the authenticated user. + #[serde(rename="isCurrentAppInstalled")] + pub is_current_app_installed: Option, +} + +impl ResponseResult for About {} + + +/// A list of themes that are supported for Team Drives. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AboutTeamDriveThemes { + /// The color of this Team Drive theme as an RGB hex string. + #[serde(rename="colorRgb")] + pub color_rgb: Option, + /// A link to this Team Drive theme's background image. + #[serde(rename="backgroundImageLink")] + pub background_image_link: Option, + /// The ID of the theme. + pub id: Option, +} + +impl NestedType for AboutTeamDriveThemes {} +impl Part for AboutTeamDriveThemes {} + + +/// There is no detailed description. +/// +/// # 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*). +/// +/// * [get start page token changes](struct.ChangeGetStartPageTokenCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct StartPageToken { + /// Identifies what kind of resource this is. Value: the fixed string "drive#startPageToken". + pub kind: Option, + /// The starting page token for listing changes. + #[serde(rename="startPageToken")] + pub start_page_token: Option, +} + +impl ResponseResult for StartPageToken {} + + +/// A key-value pair attached to a file that is either public or private to an application. +/// The following limits apply to file properties: +/// - Maximum of 100 properties total per file +/// - Maximum of 30 private properties per app +/// - Maximum of 30 public properties +/// - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property. +/// +/// # 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*). +/// +/// * [insert properties](struct.PropertyInsertCall.html) (request|response) +/// * [get properties](struct.PropertyGetCall.html) (response) +/// * [patch properties](struct.PropertyPatchCall.html) (request|response) +/// * [update properties](struct.PropertyUpdateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Property { + /// The link back to this property. + #[serde(rename="selfLink")] + pub self_link: Option, + /// This is always drive#property. + pub kind: Option, + /// ETag of the property. + pub etag: Option, + /// The visibility of this property. + pub visibility: Option, + /// The key of this property. + pub key: Option, + /// The value of this property. + pub value: Option, +} + +impl RequestValue for Property {} +impl ResponseResult for Property {} + + +/// A comment on a file in Google Drive. +/// +/// # 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*). +/// +/// * [update comments](struct.CommentUpdateCall.html) (request|response) +/// * [insert comments](struct.CommentInsertCall.html) (request|response) +/// * [delete comments](struct.CommentDeleteCall.html) (none) +/// * [patch comments](struct.CommentPatchCall.html) (request|response) +/// * [get comments](struct.CommentGetCall.html) (response) +/// * [list comments](struct.CommentListCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Comment { + /// The status of this comment. Status can be changed by posting a reply to a comment with the desired status. + /// - "open" - The comment is still open. + /// - "resolved" - The comment has been resolved by one of its replies. + pub status: Option, + /// A link back to this comment. + #[serde(rename="selfLink")] + pub self_link: Option, + /// This is always drive#comment. + pub kind: Option, + /// The user who wrote this comment. + pub author: Option, + /// Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. + pub deleted: Option, + /// The date when this comment was first created. + #[serde(rename="createdDate")] + pub created_date: Option, + /// HTML formatted content for this comment. + #[serde(rename="htmlContent")] + pub html_content: Option, + /// The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. + pub content: Option, + /// The date when this comment or any of its replies were last modified. + #[serde(rename="modifiedDate")] + pub modified_date: Option, + /// The context of the file which is being commented on. + pub context: Option, + /// Replies to this post. + pub replies: Option>, + /// The ID of the comment. + #[serde(rename="commentId")] + pub comment_id: Option, + /// A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties. + pub anchor: Option, + /// The title of the file which this comment is addressing. + #[serde(rename="fileTitle")] + pub file_title: Option, + /// The file which this comment is addressing. + #[serde(rename="fileId")] + pub file_id: Option, +} + +impl RequestValue for Comment {} +impl Resource for Comment {} +impl ResponseResult for Comment {} + + /// The apps resource provides a list of the apps that a user has installed, with information about each app's supported MIME types, file extensions, and other details. /// /// # Activities @@ -1578,55 +2005,6 @@ impl Resource for App {} impl ResponseResult for App {} -/// Geographic location information stored in the image. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FileImageMediaMetadataLocation { - /// The latitude stored in the image. - pub latitude: Option, - /// The altitude stored in the image. - pub altitude: Option, - /// The longitude stored in the image. - pub longitude: Option, -} - -impl NestedType for FileImageMediaMetadataLocation {} -impl Part for FileImageMediaMetadataLocation {} - - -/// A list of files. -/// -/// # 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*). -/// -/// * [list files](struct.FileListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FileList { - /// The page token for the next page of files. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// This is always drive#fileList. - pub kind: Option, - /// The ETag of the list. - pub etag: Option, - /// The actual list of files. - pub items: Option>, - /// A link back to this list. - #[serde(rename="selfLink")] - pub self_link: Option, - /// A link to the next page of files. - #[serde(rename="nextLink")] - pub next_link: Option, -} - -impl ResponseResult for FileList {} - - /// A list of children of a file. /// /// # Activities @@ -1638,14 +2016,14 @@ impl ResponseResult for FileList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChildList { - /// The page token for the next page of children. + /// The page token for the next page of children. This will be absent if the end of the children list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// This is always drive#childList. pub kind: Option, /// The ETag of the list. pub etag: Option, - /// The actual list of children. + /// The list of children. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. pub items: Option>, /// A link back to this list. #[serde(rename="selfLink")] @@ -1658,316 +2036,264 @@ pub struct ChildList { impl ResponseResult for ChildList {} -/// A comment on a file in Google Drive. +/// The metadata for a file. /// /// # 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*). /// -/// * [patch replies](struct.ReplyPatchCall.html) (request|response) -/// * [insert replies](struct.ReplyInsertCall.html) (request|response) -/// * [get replies](struct.ReplyGetCall.html) (response) -/// * [update replies](struct.ReplyUpdateCall.html) (request|response) +/// * [watch files](struct.FileWatchCall.html) (none) +/// * [empty trash files](struct.FileEmptyTrashCall.html) (none) +/// * [generate ids files](struct.FileGenerateIdCall.html) (none) +/// * [copy files](struct.FileCopyCall.html) (request|response) +/// * [list files](struct.FileListCall.html) (none) +/// * [delete files](struct.FileDeleteCall.html) (none) +/// * [patch files](struct.FilePatchCall.html) (request|response) +/// * [update files](struct.FileUpdateCall.html) (request|response) +/// * [insert files](struct.FileInsertCall.html) (request|response) +/// * [untrash files](struct.FileUntrashCall.html) (response) +/// * [trash files](struct.FileTrashCall.html) (response) +/// * [touch files](struct.FileTouchCall.html) (response) +/// * [get files](struct.FileGetCall.html) (response) +/// * [export files](struct.FileExportCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CommentReply { - /// This is always drive#commentReply. - pub kind: Option, - /// The user who wrote this reply. - pub author: Option, - /// Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. - pub deleted: Option, - /// HTML formatted content for this reply. - #[serde(rename="htmlContent")] - pub html_content: Option, - /// The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). - pub content: Option, - /// The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: - /// - "resolve" - To resolve a comment. - /// - "reopen" - To reopen (un-resolve) a comment. - pub verb: Option, - /// The ID of the reply. - #[serde(rename="replyId")] - pub reply_id: Option, - /// The date when this reply was last modified. +pub struct File { + /// Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field. + #[serde(rename="hasThumbnail")] + pub has_thumbnail: Option, + /// Whether this file is in the Application Data folder. + #[serde(rename="appDataContents")] + pub app_data_contents: Option, + /// A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. + #[serde(rename="thumbnailLink")] + pub thumbnail_link: Option, + /// A group of labels for the file. + pub labels: Option, + /// The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'. + pub spaces: Option>, + /// Whether the file was created or opened by the requesting app. + #[serde(rename="isAppAuthorized")] + pub is_app_authorized: Option, + /// Name of the last user to modify this file. + #[serde(rename="lastModifyingUserName")] + pub last_modifying_user_name: Option, + /// Whether writers can share the document with other users. Not populated for Team Drive files. + #[serde(rename="writersCanShare")] + pub writers_can_share: Option, + /// User that shared the item with the current user, if available. + #[serde(rename="sharingUser")] + pub sharing_user: Option, + /// The last user to modify this file. + #[serde(rename="lastModifyingUser")] + pub last_modifying_user: Option, + /// Deprecated: use capabilities/canCopy. + pub copyable: Option, + /// Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. + pub capabilities: Option, + /// A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting. + #[serde(rename="webViewLink")] + pub web_view_link: Option, + /// Last time this file was viewed by the user (formatted RFC 3339 timestamp). + #[serde(rename="lastViewedByMeDate")] + pub last_viewed_by_me_date: Option, + /// Collection of parent folders which contain this file. + /// Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder. + pub parents: Option>, + /// A link to the file's icon. + #[serde(rename="iconLink")] + pub icon_link: Option, + /// The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. + #[serde(rename="fullFileExtension")] + pub full_file_extension: Option, + /// The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files. + #[serde(rename="trashedDate")] + pub trashed_date: Option, + /// Deprecated: use capabilities/canReadRevisions. + #[serde(rename="canReadRevisions")] + pub can_read_revisions: Option, + /// A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. + #[serde(rename="defaultOpenWithLink")] + pub default_open_with_link: Option, + /// Deprecated: use capabilities/canEdit. + pub editable: Option, + /// A link for embedding the file. + #[serde(rename="embedLink")] + pub embed_link: Option, + /// Deprecated: use capabilities/canComment. + #[serde(rename="canComment")] + pub can_comment: Option, + /// Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set. #[serde(rename="modifiedDate")] pub modified_date: Option, - /// The date when this reply was first created. + /// Create time for this file (formatted RFC 3339 timestamp). #[serde(rename="createdDate")] pub created_date: Option, -} - -impl RequestValue for CommentReply {} -impl ResponseResult for CommentReply {} - - -/// The user's profile picture. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UserPicture { - /// A URL that points to a profile picture of this user. - pub url: Option, -} - -impl NestedType for UserPicture {} -impl Part for UserPicture {} - - -/// List of additional features enabled on this account. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AboutFeatures { - /// The name of the feature. - #[serde(rename="featureName")] - pub feature_name: Option, - /// The request limit rate for this feature, in queries per second. - #[serde(rename="featureRate")] - pub feature_rate: Option, -} - -impl NestedType for AboutFeatures {} -impl Part for AboutFeatures {} - - -/// Information about a Drive user. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct User { - /// The user's profile picture. - pub picture: Option, - /// This is always drive#user. + /// ID of the Team Drive the file resides in. + #[serde(rename="teamDriveId")] + pub team_drive_id: Option, + /// An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. + #[serde(rename="md5Checksum")] + pub md5_checksum: Option, + /// The list of permissions for users with access to this file. Not populated for Team Drive files. + pub permissions: Option>, + /// Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content. + #[serde(rename="imageMediaMetadata")] + pub image_media_metadata: Option, + /// The type of file. This is always drive#file. pub kind: Option, - /// Whether this user is the same as the authenticated user for whom the request was made. - #[serde(rename="isAuthenticatedUser")] - pub is_authenticated_user: Option, - /// A plain text displayable name for this user. - #[serde(rename="displayName")] - pub display_name: Option, - /// The email address of the user. - #[serde(rename="emailAddress")] - pub email_address: Option, - /// The user's ID as visible in the permissions collection. - #[serde(rename="permissionId")] - pub permission_id: Option, + /// A link for opening the file in a relevant Google editor or viewer. + #[serde(rename="alternateLink")] + pub alternate_link: Option, + /// no description provided + #[serde(rename="downloadUrl")] + pub download_url: Option, + /// The permissions for the authenticated user on this file. + #[serde(rename="userPermission")] + pub user_permission: Option, + /// Deprecated: use capabilities/canShare. + pub shareable: Option, + /// The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Drive. + #[serde(rename="originalFilename")] + pub original_filename: Option, + /// The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. + #[serde(rename="fileExtension")] + pub file_extension: Option, + /// Whether any users are granted file access directly on this file. This field is only populated for Team Drive files. + #[serde(rename="hasAugmentedPermissions")] + pub has_augmented_permissions: Option, + /// The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. + #[serde(rename="headRevisionId")] + pub head_revision_id: Option, + /// The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type. + #[serde(rename="mimeType")] + pub mime_type: Option, + /// Indexable text attributes for the file (can only be written) + #[serde(rename="indexableText")] + pub indexable_text: Option, + /// The thumbnail version for use in thumbnail cache invalidation. + #[serde(rename="thumbnailVersion")] + pub thumbnail_version: Option, + /// Whether this file has been explicitly trashed, as opposed to recursively trashed. + #[serde(rename="explicitlyTrashed")] + pub explicitly_trashed: Option, + /// ETag of the file. + pub etag: Option, + /// Whether the file is owned by the current user. Not populated for Team Drive files. + #[serde(rename="ownedByMe")] + pub owned_by_me: Option, + /// The ID of the file. + pub id: Option, + /// Metadata about video media. This will only be present for video types. + #[serde(rename="videoMediaMetadata")] + pub video_media_metadata: Option, + /// Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for Team Drive files. + #[serde(rename="folderColorRgb")] + pub folder_color_rgb: Option, + /// Name(s) of the owner(s) of this file. Not populated for Team Drive files. + #[serde(rename="ownerNames")] + pub owner_names: Option>, + /// Time at which this file was shared with the user (formatted RFC 3339 timestamp). + #[serde(rename="sharedWithMeDate")] + pub shared_with_me_date: Option, + /// A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user. + pub version: Option, + /// Links for exporting Google Docs to specific formats. + #[serde(rename="exportLinks")] + pub export_links: Option>, + /// Whether the file has been shared. Not populated for Team Drive files. + pub shared: Option, + /// A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail. + pub thumbnail: Option, + /// A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. + #[serde(rename="openWithLinks")] + pub open_with_links: Option>, + /// A short description of the file. + pub description: Option, + /// A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials. + #[serde(rename="webContentLink")] + pub web_content_link: Option, + /// Deprecated. + #[serde(rename="markedViewedByMeDate")] + pub marked_viewed_by_me_date: Option, + /// The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. + #[serde(rename="fileSize")] + pub file_size: Option, + /// The list of properties. + pub properties: Option>, + /// The owner(s) of this file. Not populated for Team Drive files. + pub owners: Option>, + /// The title of this file. Note that for immutable items such as the top level folders of Team Drives, My Drive root folder, and Application Data folder the title is constant. + pub title: Option, + /// Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date. + #[serde(rename="modifiedByMeDate")] + pub modified_by_me_date: Option, + /// If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files. + #[serde(rename="trashingUser")] + pub trashing_user: Option, + /// The number of quota bytes used by this file. + #[serde(rename="quotaBytesUsed")] + pub quota_bytes_used: Option, + /// A link back to this file. + #[serde(rename="selfLink")] + pub self_link: Option, } -impl Part for User {} +impl RequestValue for File {} +impl Resource for File {} +impl ResponseResult for File {} -/// A list of third-party applications which the user has installed or given access to Google Drive. +/// A list of permissions associated with a file. /// /// # 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*). /// -/// * [list apps](struct.AppListCall.html) (response) +/// * [list permissions](struct.PermissionListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AppList { - /// The actual list of apps. - pub items: Option>, - /// This is always drive#appList. +pub struct PermissionList { + /// The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of permissions. + pub items: Option>, + /// This is always drive#permissionList. pub kind: Option, /// The ETag of the list. pub etag: Option, /// A link back to this list. #[serde(rename="selfLink")] pub self_link: Option, - /// List of app IDs that the user has specified to use by default. The list is in reverse-priority order (lowest to highest). - #[serde(rename="defaultAppIds")] - pub default_app_ids: Option>, } -impl ResponseResult for AppList {} +impl ResponseResult for PermissionList {} -/// The various icons for the app. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AppIcons { - /// Category of the icon. Allowed values are: - /// - application - icon for the application - /// - document - icon for a file associated with the app - /// - documentShared - icon for a shared file associated with the app - pub category: Option, - /// URL for the icon. - #[serde(rename="iconUrl")] - pub icon_url: Option, - /// Size of the icon. Represented as the maximum of the width and height. - pub size: Option, -} - -impl NestedType for AppIcons {} -impl Part for AppIcons {} - - -/// The context of the file which is being commented on. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CommentContext { - /// The MIME type of the context snippet. - #[serde(rename="type")] - pub type_: Option, - /// Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. - pub value: Option, -} - -impl NestedType for CommentContext {} -impl Part for CommentContext {} - - -/// A revision of a file. +/// A list of Team Drives. /// /// # 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*). /// -/// * [delete revisions](struct.RevisionDeleteCall.html) (none) -/// * [update revisions](struct.RevisionUpdateCall.html) (request|response) -/// * [patch revisions](struct.RevisionPatchCall.html) (request|response) -/// * [list revisions](struct.RevisionListCall.html) (none) -/// * [get revisions](struct.RevisionGetCall.html) (response) +/// * [list teamdrives](struct.TeamdriveListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Revision { - /// The MIME type of the revision. - #[serde(rename="mimeType")] - pub mime_type: Option, - /// A link to the published revision. - #[serde(rename="publishedLink")] - pub published_link: Option, - /// Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs. - #[serde(rename="publishedOutsideDomain")] - pub published_outside_domain: Option, - /// Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs. - #[serde(rename="publishAuto")] - pub publish_auto: Option, - /// The size of the revision in bytes. This will only be populated on files with content stored in Drive. - #[serde(rename="fileSize")] - pub file_size: Option, - /// Name of the last user to modify this revision. - #[serde(rename="lastModifyingUserName")] - pub last_modifying_user_name: Option, - /// The ID of the revision. - pub id: Option, - /// An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive. - #[serde(rename="md5Checksum")] - pub md5_checksum: Option, - /// Short term download URL for the file. This will only be populated on files with content stored in Drive. - #[serde(rename="downloadUrl")] - pub download_url: Option, - /// This is always drive#revision. +pub struct TeamDriveList { + /// The page token for the next page of Team Drives. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of Team Drives. + pub items: Option>, + /// This is always drive#teamDriveList pub kind: Option, - /// The last user to modify this revision. - #[serde(rename="lastModifyingUser")] - pub last_modifying_user: Option, - /// Whether this revision is pinned to prevent automatic purging. This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter. - pub pinned: Option, - /// The ETag of the revision. - pub etag: Option, - /// The original filename when this revision was created. This will only be populated on files with content stored in Drive. - #[serde(rename="originalFilename")] - pub original_filename: Option, - /// Links for exporting Google Docs to specific formats. - #[serde(rename="exportLinks")] - pub export_links: Option>, - /// Whether this revision is published. This is only populated and can only be modified for Google Docs. - pub published: Option, - /// A link back to this revision. - #[serde(rename="selfLink")] - pub self_link: Option, - /// Last time this revision was modified (formatted RFC 3339 timestamp). - #[serde(rename="modifiedDate")] - pub modified_date: Option, } -impl RequestValue for Revision {} -impl Resource for Revision {} -impl ResponseResult for Revision {} - - -/// Metadata about video media. This will only be present for video types. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FileVideoMediaMetadata { - /// The width of the video in pixels. - pub width: Option, - /// The duration of the video in milliseconds. - #[serde(rename="durationMillis")] - pub duration_millis: Option, - /// The height of the video in pixels. - pub height: Option, -} - -impl NestedType for FileVideoMediaMetadata {} -impl Part for FileVideoMediaMetadata {} - - -/// The allowable export formats. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AboutExportFormats { - /// The content type to convert from. - pub source: Option, - /// The possible content types to convert to. - pub targets: Option>, -} - -impl NestedType for AboutExportFormats {} -impl Part for AboutExportFormats {} - - -/// Representation of a change to a file. -/// -/// # 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*). -/// -/// * [list changes](struct.ChangeListCall.html) (none) -/// * [watch changes](struct.ChangeWatchCall.html) (none) -/// * [get changes](struct.ChangeGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Change { - /// The time of this modification. - #[serde(rename="modificationDate")] - pub modification_date: Option, - /// This is always drive#change. - pub kind: Option, - /// The updated state of the file. Present if the file has not been deleted. - pub file: Option, - /// Whether the file has been deleted. - pub deleted: Option, - /// The ID of the change. - pub id: Option, - /// A link back to this change. - #[serde(rename="selfLink")] - pub self_link: Option, - /// The ID of the file associated with this change. - #[serde(rename="fileId")] - pub file_id: Option, -} - -impl Resource for Change {} -impl ResponseResult for Change {} +impl ResponseResult for TeamDriveList {} @@ -2027,6 +2353,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { _request: request, _file_id: file_id.to_string(), _update_viewed_date: Default::default(), + _supports_team_drives: Default::default(), _revision_id: Default::default(), _projection: Default::default(), _acknowledge_abuse: Default::default(), @@ -2051,6 +2378,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { _use_content_as_indexable_text: Default::default(), _timed_text_track_name: Default::default(), _timed_text_language: Default::default(), + _supports_team_drives: Default::default(), _pinned: Default::default(), _ocr_language: Default::default(), _ocr: Default::default(), @@ -2072,6 +2400,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { FileUntrashCall { hub: self.hub, _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2094,6 +2423,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { _visibility: Default::default(), _timed_text_track_name: Default::default(), _timed_text_language: Default::default(), + _supports_team_drives: Default::default(), _pinned: Default::default(), _ocr_language: Default::default(), _ocr: Default::default(), @@ -2106,7 +2436,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Moves a file to the trash. The currently authenticated user must own the file. + /// Moves a file to the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files. /// /// # Arguments /// @@ -2115,6 +2445,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { FileTrashCall { hub: self.hub, _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2158,13 +2489,17 @@ impl<'a, C, A> FileMethods<'a, C, A> { pub fn list(&self) -> FileListCall<'a, C, A> { FileListCall { hub: self.hub, + _team_drive_id: Default::default(), + _supports_team_drives: Default::default(), _spaces: Default::default(), _q: Default::default(), _projection: Default::default(), _page_token: Default::default(), _order_by: Default::default(), _max_results: Default::default(), + _include_team_drive_items: Default::default(), _corpus: Default::default(), + _corpora: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2182,6 +2517,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { FileTouchCall { hub: self.hub, _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2219,6 +2555,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { _update_viewed_date: Default::default(), _timed_text_track_name: Default::default(), _timed_text_language: Default::default(), + _supports_team_drives: Default::default(), _set_modified_date: Default::default(), _remove_parents: Default::default(), _pinned: Default::default(), @@ -2236,7 +2573,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file. + /// Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files. /// /// # Arguments /// @@ -2245,6 +2582,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { FileDeleteCall { hub: self.hub, _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2268,6 +2606,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { _update_viewed_date: Default::default(), _timed_text_track_name: Default::default(), _timed_text_language: Default::default(), + _supports_team_drives: Default::default(), _set_modified_date: Default::default(), _remove_parents: Default::default(), _pinned: Default::default(), @@ -2295,6 +2634,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { hub: self.hub, _file_id: file_id.to_string(), _update_viewed_date: Default::default(), + _supports_team_drives: Default::default(), _revision_id: Default::default(), _projection: Default::default(), _acknowledge_abuse: Default::default(), @@ -2307,7 +2647,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { -/// A builder providing access to all methods supported on *about* resources. +/// A builder providing access to all methods supported on *teamdrive* resources. /// It is not used directly, but through the `Drive` hub. /// /// # Example @@ -2330,30 +2670,101 @@ impl<'a, C, A> FileMethods<'a, C, A> { /// ::default(), None); /// let mut hub = Drive::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `get(...)` +/// // like `delete(...)`, `get(...)`, `insert(...)`, `list(...)` and `update(...)` /// // to build up your call. -/// let rb = hub.about(); +/// let rb = hub.teamdrives(); /// # } /// ``` -pub struct AboutMethods<'a, C, A> +pub struct TeamdriveMethods<'a, C, A> where C: 'a, A: 'a { hub: &'a Drive, } -impl<'a, C, A> MethodsBuilder for AboutMethods<'a, C, A> {} +impl<'a, C, A> MethodsBuilder for TeamdriveMethods<'a, C, A> {} -impl<'a, C, A> AboutMethods<'a, C, A> { +impl<'a, C, A> TeamdriveMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the information about the current user along with Drive API settings - pub fn get(&self) -> AboutGetCall<'a, C, A> { - AboutGetCall { + /// Creates a new Team Drive. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `requestId` - An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned. + pub fn insert(&self, request: TeamDrive, request_id: &str) -> TeamdriveInsertCall<'a, C, A> { + TeamdriveInsertCall { hub: self.hub, - _start_change_id: Default::default(), - _max_change_id_count: Default::default(), - _include_subscribed: Default::default(), + _request: request, + _request_id: request_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a Team Drive's metadata by ID. + /// + /// # Arguments + /// + /// * `teamDriveId` - The ID of the Team Drive + pub fn get(&self, team_drive_id: &str) -> TeamdriveGetCall<'a, C, A> { + TeamdriveGetCall { + hub: self.hub, + _team_drive_id: team_drive_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists the user's Team Drives. + pub fn list(&self) -> TeamdriveListCall<'a, C, A> { + TeamdriveListCall { + hub: self.hub, + _page_token: Default::default(), + _max_results: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. + /// + /// # Arguments + /// + /// * `teamDriveId` - The ID of the Team Drive + pub fn delete(&self, team_drive_id: &str) -> TeamdriveDeleteCall<'a, C, A> { + TeamdriveDeleteCall { + hub: self.hub, + _team_drive_id: team_drive_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates a Team Drive's metadata + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `teamDriveId` - The ID of the Team Drive + pub fn update(&self, request: TeamDrive, team_drive_id: &str) -> TeamdriveUpdateCall<'a, C, A> { + TeamdriveUpdateCall { + hub: self.hub, + _request: request, + _team_drive_id: team_drive_id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2513,6 +2924,62 @@ impl<'a, C, A> AppMethods<'a, C, A> { +/// A builder providing access to all methods supported on *about* resources. +/// It is not used directly, but through the `Drive` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_drive2 as drive2; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use drive2::Drive; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Drive::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `get(...)` +/// // to build up your call. +/// let rb = hub.about(); +/// # } +/// ``` +pub struct AboutMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, +} + +impl<'a, C, A> MethodsBuilder for AboutMethods<'a, C, A> {} + +impl<'a, C, A> AboutMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Gets the information about the current user along with Drive API settings + pub fn get(&self) -> AboutGetCall<'a, C, A> { + AboutGetCall { + hub: self.hub, + _start_change_id: Default::default(), + _max_change_id_count: Default::default(), + _include_subscribed: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *comment* resources. /// It is not used directly, but through the `Drive` hub. /// @@ -2785,6 +3252,7 @@ impl<'a, C, A> ChildrenMethods<'a, C, A> { hub: self.hub, _request: request, _folder_id: folder_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2939,6 +3407,7 @@ impl<'a, C, A> ParentMethods<'a, C, A> { hub: self.hub, _request: request, _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -3180,17 +3649,18 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a permission from a file. + /// Deletes a permission from a file or Team Drive. /// /// # Arguments /// - /// * `fileId` - The ID for the file. + /// * `fileId` - The ID for the file or Team Drive. /// * `permissionId` - The ID for the permission. pub fn delete(&self, file_id: &str, permission_id: &str) -> PermissionDeleteCall<'a, C, A> { PermissionDeleteCall { hub: self.hub, _file_id: file_id.to_string(), _permission_id: permission_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -3199,17 +3669,18 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a permission for a file. + /// Inserts a permission for a file or Team Drive. /// /// # Arguments /// /// * `request` - No description provided. - /// * `fileId` - The ID for the file. + /// * `fileId` - The ID for the file or Team Drive. pub fn insert(&self, request: Permission, file_id: &str) -> PermissionInsertCall<'a, C, A> { PermissionInsertCall { hub: self.hub, _request: request, _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), _send_notification_emails: Default::default(), _email_message: Default::default(), _delegate: Default::default(), @@ -3225,7 +3696,7 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `fileId` - The ID for the file. + /// * `fileId` - The ID for the file or Team Drive. /// * `permissionId` - The ID for the permission. pub fn patch(&self, request: Permission, file_id: &str, permission_id: &str) -> PermissionPatchCall<'a, C, A> { PermissionPatchCall { @@ -3234,6 +3705,7 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { _file_id: file_id.to_string(), _permission_id: permission_id.to_string(), _transfer_ownership: Default::default(), + _supports_team_drives: Default::default(), _remove_expiration: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -3243,15 +3715,18 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists a file's permissions. + /// Lists a file's or Team Drive's permissions. /// /// # Arguments /// - /// * `fileId` - The ID for the file. + /// * `fileId` - The ID for the file or Team Drive. pub fn list(&self, file_id: &str) -> PermissionListCall<'a, C, A> { PermissionListCall { hub: self.hub, _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), + _page_token: Default::default(), + _max_results: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -3265,7 +3740,7 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `fileId` - The ID for the file. + /// * `fileId` - The ID for the file or Team Drive. /// * `permissionId` - The ID for the permission. pub fn update(&self, request: Permission, file_id: &str, permission_id: &str) -> PermissionUpdateCall<'a, C, A> { PermissionUpdateCall { @@ -3274,6 +3749,7 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { _file_id: file_id.to_string(), _permission_id: permission_id.to_string(), _transfer_ownership: Default::default(), + _supports_team_drives: Default::default(), _remove_expiration: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -3287,13 +3763,14 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// /// # Arguments /// - /// * `fileId` - The ID for the file. + /// * `fileId` - The ID for the file or Team Drive. /// * `permissionId` - The ID for the permission. pub fn get(&self, file_id: &str, permission_id: &str) -> PermissionGetCall<'a, C, A> { PermissionGetCall { hub: self.hub, _file_id: file_id.to_string(), _permission_id: permission_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -3343,7 +3820,7 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// ::default(), None); /// let mut hub = Drive::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `get(...)`, `list(...)` and `watch(...)` +/// // like `get(...)`, `get_start_page_token(...)`, `list(...)` and `watch(...)` /// // to build up your call. /// let rb = hub.changes(); /// # } @@ -3358,6 +3835,20 @@ impl<'a, C, A> MethodsBuilder for ChangeMethods<'a, C, A> {} impl<'a, C, A> ChangeMethods<'a, C, A> { + /// Create a builder to help you perform the following task: + /// + /// Gets the starting pageToken for listing future changes. + pub fn get_start_page_token(&self) -> ChangeGetStartPageTokenCall<'a, C, A> { + ChangeGetStartPageTokenCall { + hub: self.hub, + _team_drive_id: Default::default(), + _supports_team_drives: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Subscribe to changes for a user. @@ -3369,12 +3860,16 @@ impl<'a, C, A> ChangeMethods<'a, C, A> { ChangeWatchCall { hub: self.hub, _request: request, + _team_drive_id: Default::default(), + _supports_team_drives: Default::default(), _start_change_id: Default::default(), _spaces: Default::default(), _page_token: Default::default(), _max_results: Default::default(), + _include_team_drive_items: Default::default(), _include_subscribed: Default::default(), _include_deleted: Default::default(), + _include_corpus_removals: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -3383,16 +3878,20 @@ impl<'a, C, A> ChangeMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the changes for a user. + /// Lists the changes for a user or Team Drive. pub fn list(&self) -> ChangeListCall<'a, C, A> { ChangeListCall { hub: self.hub, + _team_drive_id: Default::default(), + _supports_team_drives: Default::default(), _start_change_id: Default::default(), _spaces: Default::default(), _page_token: Default::default(), _max_results: Default::default(), + _include_team_drive_items: Default::default(), _include_subscribed: Default::default(), _include_deleted: Default::default(), + _include_corpus_removals: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -3410,6 +3909,8 @@ impl<'a, C, A> ChangeMethods<'a, C, A> { ChangeGetCall { hub: self.hub, _change_id: change_id.to_string(), + _team_drive_id: Default::default(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -3764,9 +4265,10 @@ impl<'a, C, A> RevisionMethods<'a, C, A> { /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().watch(req, "fileId") -/// .update_viewed_date(true) -/// .revision_id("invidunt") -/// .projection("aliquyam") +/// .update_viewed_date(false) +/// .supports_team_drives(false) +/// .revision_id("sea") +/// .projection("et") /// .acknowledge_abuse(false) /// .doit(); /// # } @@ -3778,6 +4280,7 @@ pub struct FileWatchCall<'a, C, A> _request: Channel, _file_id: String, _update_viewed_date: Option, + _supports_team_drives: Option, _revision_id: Option, _projection: Option, _acknowledge_abuse: Option, @@ -3802,11 +4305,14 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau }; dlg.begin(MethodInfo { id: "drive.files.watch", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); if let Some(value) = self._update_viewed_date { params.push(("updateViewedDate", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._revision_id { params.push(("revisionId", value.to_string())); } @@ -3816,7 +4322,7 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau if let Some(value) = self._acknowledge_abuse { params.push(("acknowledgeAbuse", value.to_string())); } - for &field in ["fileId", "updateViewedDate", "revisionId", "projection", "acknowledgeAbuse"].iter() { + for &field in ["fileId", "updateViewedDate", "supportsTeamDrives", "revisionId", "projection", "acknowledgeAbuse"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -3988,6 +4494,13 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau self._update_viewed_date = Some(new_value); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileWatchCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. /// /// Sets the *revision id* query property to the given value. @@ -4095,13 +4608,14 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `upload_resumable(...)`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().insert(req) -/// .visibility("Lorem") +/// .visibility("et") /// .use_content_as_indexable_text(true) -/// .timed_text_track_name("et") -/// .timed_text_language("duo") +/// .timed_text_track_name("sanctus") +/// .timed_text_language("et") +/// .supports_team_drives(true) /// .pinned(true) -/// .ocr_language("eirmod") -/// .ocr(false) +/// .ocr_language("consetetur") +/// .ocr(true) /// .convert(true) /// .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); /// # } @@ -4115,6 +4629,7 @@ pub struct FileInsertCall<'a, C, A> _use_content_as_indexable_text: Option, _timed_text_track_name: Option, _timed_text_language: Option, + _supports_team_drives: Option, _pinned: Option, _ocr_language: Option, _ocr: Option, @@ -4141,7 +4656,7 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa }; dlg.begin(MethodInfo { id: "drive.files.insert", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); if let Some(value) = self._visibility { params.push(("visibility", value.to_string())); } @@ -4154,6 +4669,9 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa if let Some(value) = self._timed_text_language { params.push(("timedTextLanguage", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._pinned { params.push(("pinned", value.to_string())); } @@ -4166,7 +4684,7 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa if let Some(value) = self._convert { params.push(("convert", value.to_string())); } - for &field in ["alt", "visibility", "useContentAsIndexableText", "timedTextTrackName", "timedTextLanguage", "pinned", "ocrLanguage", "ocr", "convert"].iter() { + for &field in ["alt", "visibility", "useContentAsIndexableText", "timedTextTrackName", "timedTextLanguage", "supportsTeamDrives", "pinned", "ocrLanguage", "ocr", "convert"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4424,6 +4942,13 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa self._timed_text_language = Some(new_value.to_string()); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileInsertCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions. /// /// Sets the *pinned* query property to the given value. @@ -4531,6 +5056,7 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().untrash("fileId") +/// .supports_team_drives(true) /// .doit(); /// # } /// ``` @@ -4539,6 +5065,7 @@ pub struct FileUntrashCall<'a, C, A> hub: &'a Drive, _file_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -4560,9 +5087,12 @@ impl<'a, C, A> FileUntrashCall<'a, C, A> where C: BorrowMut, A: o }; dlg.begin(MethodInfo { id: "drive.files.untrash", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); - for &field in ["alt", "fileId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "fileId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4687,6 +5217,13 @@ impl<'a, C, A> FileUntrashCall<'a, C, A> where C: BorrowMut, A: o self._file_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileUntrashCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -4772,11 +5309,12 @@ impl<'a, C, A> FileUntrashCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().copy(req, "fileId") -/// .visibility("consetetur") -/// .timed_text_track_name("ut") -/// .timed_text_language("ea") -/// .pinned(false) -/// .ocr_language("dolor") +/// .visibility("dolor") +/// .timed_text_track_name("et") +/// .timed_text_language("consetetur") +/// .supports_team_drives(false) +/// .pinned(true) +/// .ocr_language("Lorem") /// .ocr(true) /// .convert(true) /// .doit(); @@ -4791,6 +5329,7 @@ pub struct FileCopyCall<'a, C, A> _visibility: Option, _timed_text_track_name: Option, _timed_text_language: Option, + _supports_team_drives: Option, _pinned: Option, _ocr_language: Option, _ocr: Option, @@ -4816,7 +5355,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut }; dlg.begin(MethodInfo { id: "drive.files.copy", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); if let Some(value) = self._visibility { params.push(("visibility", value.to_string())); @@ -4827,6 +5366,9 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut if let Some(value) = self._timed_text_language { params.push(("timedTextLanguage", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._pinned { params.push(("pinned", value.to_string())); } @@ -4839,7 +5381,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut if let Some(value) = self._convert { params.push(("convert", value.to_string())); } - for &field in ["alt", "fileId", "visibility", "timedTextTrackName", "timedTextLanguage", "pinned", "ocrLanguage", "ocr", "convert"].iter() { + for &field in ["alt", "fileId", "visibility", "timedTextTrackName", "timedTextLanguage", "supportsTeamDrives", "pinned", "ocrLanguage", "ocr", "convert"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -5009,6 +5551,13 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut self._timed_text_language = Some(new_value.to_string()); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileCopyCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions. /// /// Sets the *pinned* query property to the given value. @@ -5089,7 +5638,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut } -/// Moves a file to the trash. The currently authenticated user must own the file. +/// Moves a file to the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files. /// /// A builder for the *trash* method supported by a *file* resource. /// It is not used directly, but through a `FileMethods` instance. @@ -5116,6 +5665,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().trash("fileId") +/// .supports_team_drives(true) /// .doit(); /// # } /// ``` @@ -5124,6 +5674,7 @@ pub struct FileTrashCall<'a, C, A> hub: &'a Drive, _file_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -5145,9 +5696,12 @@ impl<'a, C, A> FileTrashCall<'a, C, A> where C: BorrowMut, A: oau }; dlg.begin(MethodInfo { id: "drive.files.trash", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); - for &field in ["alt", "fileId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "fileId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -5272,6 +5826,13 @@ impl<'a, C, A> FileTrashCall<'a, C, A> where C: BorrowMut, A: oau self._file_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileTrashCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -5781,13 +6342,17 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().list() -/// .spaces("voluptua.") -/// .q("Lorem") -/// .projection("gubergren") -/// .page_token("justo") -/// .order_by("sit") -/// .max_results(-26) -/// .corpus("diam") +/// .team_drive_id("consetetur") +/// .supports_team_drives(true) +/// .spaces("vero") +/// .q("sadipscing") +/// .projection("invidunt") +/// .page_token("consetetur") +/// .order_by("dolore") +/// .max_results(-19) +/// .include_team_drive_items(false) +/// .corpus("Lorem") +/// .corpora("et") /// .doit(); /// # } /// ``` @@ -5795,13 +6360,17 @@ pub struct FileListCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Drive, + _team_drive_id: Option, + _supports_team_drives: Option, _spaces: Option, _q: Option, _projection: Option, _page_token: Option, _order_by: Option, _max_results: Option, + _include_team_drive_items: Option, _corpus: Option, + _corpora: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -5823,7 +6392,13 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut }; dlg.begin(MethodInfo { id: "drive.files.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((13 + self._additional_params.len())); + if let Some(value) = self._team_drive_id { + params.push(("teamDriveId", value.to_string())); + } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._spaces { params.push(("spaces", value.to_string())); } @@ -5842,10 +6417,16 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut if let Some(value) = self._max_results { params.push(("maxResults", value.to_string())); } + if let Some(value) = self._include_team_drive_items { + params.push(("includeTeamDriveItems", value.to_string())); + } if let Some(value) = self._corpus { params.push(("corpus", value.to_string())); } - for &field in ["alt", "spaces", "q", "projection", "pageToken", "orderBy", "maxResults", "corpus"].iter() { + if let Some(value) = self._corpora { + params.push(("corpora", value.to_string())); + } + for &field in ["alt", "teamDriveId", "supportsTeamDrives", "spaces", "q", "projection", "pageToken", "orderBy", "maxResults", "includeTeamDriveItems", "corpus", "corpora"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -5939,6 +6520,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// ID of Team Drive to search. + /// + /// Sets the *team drive id* query property to the given value. + pub fn team_drive_id(mut self, new_value: &str) -> FileListCall<'a, C, A> { + self._team_drive_id = Some(new_value.to_string()); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileListCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'. /// /// Sets the *spaces* query property to the given value. @@ -5974,20 +6569,34 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut self._order_by = Some(new_value.to_string()); self } - /// Maximum number of files to return. + /// The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached. /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: i32) -> FileListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// The body of items (files/documents) to which the query applies. + /// Whether Team Drive items should be included in results. + /// + /// Sets the *include team drive items* query property to the given value. + pub fn include_team_drive_items(mut self, new_value: bool) -> FileListCall<'a, C, A> { + self._include_team_drive_items = Some(new_value); + self + } + /// The body of items (files/documents) to which the query applies. Deprecated: use 'corpora' instead. /// /// Sets the *corpus* query property to the given value. pub fn corpus(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._corpus = Some(new_value.to_string()); self } + /// Comma-separated list of bodies of items (files/documents) to which the query applies. Supported bodies are 'default', 'domain', 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with 'default'; all other values must be used in isolation. Prefer 'default' or 'teamDrive' to 'allTeamDrives' for efficiency. + /// + /// Sets the *corpora* query property to the given value. + pub fn corpora(mut self, new_value: &str) -> FileListCall<'a, C, A> { + self._corpora = 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. /// @@ -6067,6 +6676,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().touch("fileId") +/// .supports_team_drives(true) /// .doit(); /// # } /// ``` @@ -6075,6 +6685,7 @@ pub struct FileTouchCall<'a, C, A> hub: &'a Drive, _file_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -6096,9 +6707,12 @@ impl<'a, C, A> FileTouchCall<'a, C, A> where C: BorrowMut, A: oau }; dlg.begin(MethodInfo { id: "drive.files.touch", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); - for &field in ["alt", "fileId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "fileId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -6223,6 +6837,13 @@ impl<'a, C, A> FileTouchCall<'a, C, A> where C: BorrowMut, A: oau self._file_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileTouchCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -6302,8 +6923,8 @@ impl<'a, C, A> FileTouchCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().generate_ids() -/// .space("consetetur") -/// .max_results(-44) +/// .space("takimata") +/// .max_results(-40) /// .doit(); /// # } /// ``` @@ -6535,19 +7156,20 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `upload_resumable(...)`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().update(req, "fileId") -/// .use_content_as_indexable_text(false) +/// .use_content_as_indexable_text(true) /// .update_viewed_date(false) -/// .timed_text_track_name("consetetur") -/// .timed_text_language("dolore") -/// .set_modified_date(true) -/// .remove_parents("aliquyam") -/// .pinned(true) -/// .ocr_language("et") +/// .timed_text_track_name("At") +/// .timed_text_language("labore") +/// .supports_team_drives(true) +/// .set_modified_date(false) +/// .remove_parents("sadipscing") +/// .pinned(false) +/// .ocr_language("dolore") /// .ocr(true) /// .new_revision(true) -/// .modified_date_behavior("takimata") -/// .convert(true) -/// .add_parents("kasd") +/// .modified_date_behavior("aliquyam") +/// .convert(false) +/// .add_parents("eirmod") /// .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); /// # } /// ``` @@ -6561,6 +7183,7 @@ pub struct FileUpdateCall<'a, C, A> _update_viewed_date: Option, _timed_text_track_name: Option, _timed_text_language: Option, + _supports_team_drives: Option, _set_modified_date: Option, _remove_parents: Option, _pinned: Option, @@ -6592,7 +7215,7 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa }; dlg.begin(MethodInfo { id: "drive.files.update", http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((17 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((18 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); if let Some(value) = self._use_content_as_indexable_text { params.push(("useContentAsIndexableText", value.to_string())); @@ -6606,6 +7229,9 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa if let Some(value) = self._timed_text_language { params.push(("timedTextLanguage", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._set_modified_date { params.push(("setModifiedDate", value.to_string())); } @@ -6633,7 +7259,7 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa if let Some(value) = self._add_parents { params.push(("addParents", value.to_string())); } - for &field in ["alt", "fileId", "useContentAsIndexableText", "updateViewedDate", "timedTextTrackName", "timedTextLanguage", "setModifiedDate", "removeParents", "pinned", "ocrLanguage", "ocr", "newRevision", "modifiedDateBehavior", "convert", "addParents"].iter() { + for &field in ["alt", "fileId", "useContentAsIndexableText", "updateViewedDate", "timedTextTrackName", "timedTextLanguage", "supportsTeamDrives", "setModifiedDate", "removeParents", "pinned", "ocrLanguage", "ocr", "newRevision", "modifiedDateBehavior", "convert", "addParents"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -6922,6 +7548,13 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa self._timed_text_language = Some(new_value.to_string()); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileUpdateCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether to set the modified date with the supplied modified date. /// /// Sets the *set modified date* query property to the given value. @@ -7037,7 +7670,7 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa } -/// Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file. +/// Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files. /// /// A builder for the *delete* method supported by a *file* resource. /// It is not used directly, but through a `FileMethods` instance. @@ -7064,6 +7697,7 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().delete("fileId") +/// .supports_team_drives(false) /// .doit(); /// # } /// ``` @@ -7072,6 +7706,7 @@ pub struct FileDeleteCall<'a, C, A> hub: &'a Drive, _file_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -7093,9 +7728,12 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa }; dlg.begin(MethodInfo { id: "drive.files.delete", http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); - for &field in ["fileId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["fileId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -7209,6 +7847,13 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa self._file_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileDeleteCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -7296,17 +7941,18 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// let result = hub.files().patch(req, "fileId") /// .use_content_as_indexable_text(true) /// .update_viewed_date(false) -/// .timed_text_track_name("invidunt") -/// .timed_text_language("ea") +/// .timed_text_track_name("aliquyam") +/// .timed_text_language("eos") +/// .supports_team_drives(true) /// .set_modified_date(false) -/// .remove_parents("rebum.") -/// .pinned(true) -/// .ocr_language("nonumy") -/// .ocr(true) +/// .remove_parents("labore") +/// .pinned(false) +/// .ocr_language("aliquyam") +/// .ocr(false) /// .new_revision(false) -/// .modified_date_behavior("sit") +/// .modified_date_behavior("diam") /// .convert(true) -/// .add_parents("consetetur") +/// .add_parents("justo") /// .doit(); /// # } /// ``` @@ -7320,6 +7966,7 @@ pub struct FilePatchCall<'a, C, A> _update_viewed_date: Option, _timed_text_track_name: Option, _timed_text_language: Option, + _supports_team_drives: Option, _set_modified_date: Option, _remove_parents: Option, _pinned: Option, @@ -7350,7 +7997,7 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau }; dlg.begin(MethodInfo { id: "drive.files.patch", http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((17 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((18 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); if let Some(value) = self._use_content_as_indexable_text { params.push(("useContentAsIndexableText", value.to_string())); @@ -7364,6 +8011,9 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau if let Some(value) = self._timed_text_language { params.push(("timedTextLanguage", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._set_modified_date { params.push(("setModifiedDate", value.to_string())); } @@ -7391,7 +8041,7 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau if let Some(value) = self._add_parents { params.push(("addParents", value.to_string())); } - for &field in ["alt", "fileId", "useContentAsIndexableText", "updateViewedDate", "timedTextTrackName", "timedTextLanguage", "setModifiedDate", "removeParents", "pinned", "ocrLanguage", "ocr", "newRevision", "modifiedDateBehavior", "convert", "addParents"].iter() { + for &field in ["alt", "fileId", "useContentAsIndexableText", "updateViewedDate", "timedTextTrackName", "timedTextLanguage", "supportsTeamDrives", "setModifiedDate", "removeParents", "pinned", "ocrLanguage", "ocr", "newRevision", "modifiedDateBehavior", "convert", "addParents"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -7568,6 +8218,13 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau self._timed_text_language = Some(new_value.to_string()); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FilePatchCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether to set the modified date with the supplied modified date. /// /// Sets the *set modified date* query property to the given value. @@ -7716,8 +8373,9 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau /// // Values shown here are possibly random and not representative ! /// let result = hub.files().get("fileId") /// .update_viewed_date(true) -/// .revision_id("ea") -/// .projection("gubergren") +/// .supports_team_drives(true) +/// .revision_id("clita") +/// .projection("diam") /// .acknowledge_abuse(false) /// .doit(); /// # } @@ -7728,6 +8386,7 @@ pub struct FileGetCall<'a, C, A> hub: &'a Drive, _file_id: String, _update_viewed_date: Option, + _supports_team_drives: Option, _revision_id: Option, _projection: Option, _acknowledge_abuse: Option, @@ -7752,11 +8411,14 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth }; dlg.begin(MethodInfo { id: "drive.files.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); if let Some(value) = self._update_viewed_date { params.push(("updateViewedDate", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._revision_id { params.push(("revisionId", value.to_string())); } @@ -7766,7 +8428,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth if let Some(value) = self._acknowledge_abuse { params.push(("acknowledgeAbuse", value.to_string())); } - for &field in ["fileId", "updateViewedDate", "revisionId", "projection", "acknowledgeAbuse"].iter() { + for &field in ["fileId", "updateViewedDate", "supportsTeamDrives", "revisionId", "projection", "acknowledgeAbuse"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -7914,6 +8576,13 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth self._update_viewed_date = Some(new_value); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileGetCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. /// /// Sets the *revision id* query property to the given value. @@ -7987,10 +8656,255 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } -/// Gets the information about the current user along with Drive API settings +/// Creates a new Team Drive. /// -/// A builder for the *get* method supported by a *about* resource. -/// It is not used directly, but through a `AboutMethods` instance. +/// A builder for the *insert* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive2 as drive2; +/// use drive2::TeamDrive; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive2::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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 = TeamDrive::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.teamdrives().insert(req, "requestId") +/// .doit(); +/// # } +/// ``` +pub struct TeamdriveInsertCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _request: TeamDrive, + _request_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TeamdriveInsertCall<'a, C, A> {} + +impl<'a, C, A> TeamdriveInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TeamDrive)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.teamdrives.insert", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("requestId", self._request_id.to_string())); + for &field in ["alt", "requestId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v2/teamdrives".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: TeamDrive) -> TeamdriveInsertCall<'a, C, A> { + self._request = new_value; + self + } + /// An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned. + /// + /// Sets the *request id* query 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_id(mut self, new_value: &str) -> TeamdriveInsertCall<'a, C, A> { + self._request_id = 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. + /// + /// 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 Delegate) -> TeamdriveInsertCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> TeamdriveInsertCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> TeamdriveInsertCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets a Team Drive's metadata by ID. +/// +/// A builder for the *get* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. /// /// # Example /// @@ -8013,32 +8927,27 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// // 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.about().get() -/// .start_change_id("eos") -/// .max_change_id_count(-38) -/// .include_subscribed(false) +/// let result = hub.teamdrives().get("teamDriveId") /// .doit(); /// # } /// ``` -pub struct AboutGetCall<'a, C, A> +pub struct TeamdriveGetCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Drive, - _start_change_id: Option, - _max_change_id_count: Option, - _include_subscribed: Option, + _team_drive_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for AboutGetCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for TeamdriveGetCall<'a, C, A> {} -impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> TeamdriveGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, About)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, TeamDrive)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -8046,19 +8955,11 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "drive.about.get", + dlg.begin(MethodInfo { id: "drive.teamdrives.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - if let Some(value) = self._start_change_id { - params.push(("startChangeId", value.to_string())); - } - if let Some(value) = self._max_change_id_count { - params.push(("maxChangeIdCount", value.to_string())); - } - if let Some(value) = self._include_subscribed { - params.push(("includeSubscribed", value.to_string())); - } - for &field in ["alt", "startChangeId", "maxChangeIdCount", "includeSubscribed"].iter() { + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("teamDriveId", self._team_drive_id.to_string())); + for &field in ["alt", "teamDriveId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -8070,9 +8971,252 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/about".to_string(); + let mut url = "https://www.googleapis.com/drive/v2/teamdrives/{teamDriveId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{teamDriveId}", "teamDriveId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["teamDriveId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the Team Drive + /// + /// Sets the *team drive id* 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 team_drive_id(mut self, new_value: &str) -> TeamdriveGetCall<'a, C, A> { + self._team_drive_id = 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. + /// + /// 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 Delegate) -> TeamdriveGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> TeamdriveGetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Readonly`. + /// + /// 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: T) -> TeamdriveGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists the user's Team Drives. +/// +/// A builder for the *list* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive2 as drive2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive2::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.teamdrives().list() +/// .page_token("invidunt") +/// .max_results(-87) +/// .doit(); +/// # } +/// ``` +pub struct TeamdriveListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _page_token: Option, + _max_results: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TeamdriveListCall<'a, C, A> {} + +impl<'a, C, A> TeamdriveListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TeamDriveList)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.teamdrives.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._max_results { + params.push(("maxResults", value.to_string())); + } + for &field in ["alt", "pageToken", "maxResults"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v2/teamdrives".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -8152,25 +9296,18 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut } - /// Change ID to start counting from when calculating number of remaining change IDs + /// Page token for Team Drives. /// - /// Sets the *start change id* query property to the given value. - pub fn start_change_id(mut self, new_value: &str) -> AboutGetCall<'a, C, A> { - self._start_change_id = Some(new_value.to_string()); + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> TeamdriveListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); self } - /// Maximum number of remaining change IDs to count + /// Maximum number of Team Drives to return. /// - /// Sets the *max change id count* query property to the given value. - pub fn max_change_id_count(mut self, new_value: i64) -> AboutGetCall<'a, C, A> { - self._max_change_id_count = Some(new_value); - self - } - /// When calculating the number of remaining change IDs, whether to include public files the user has opened and shared files. When set to false, this counts only change IDs for owned files and any shared or public files that the user has explicitly added to a folder they own. - /// - /// Sets the *include subscribed* query property to the given value. - pub fn include_subscribed(mut self, new_value: bool) -> AboutGetCall<'a, C, A> { - self._include_subscribed = Some(new_value); + /// Sets the *max results* query property to the given value. + pub fn max_results(mut self, new_value: i32) -> TeamdriveListCall<'a, C, A> { + self._max_results = Some(new_value); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -8179,7 +9316,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// 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 Delegate) -> AboutGetCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> TeamdriveListCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -8200,7 +9337,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> AboutGetCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> TeamdriveListCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -8209,7 +9346,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Identifies the authorization scope for the method you are building. /// /// Use this method to actively specify which scope should be used, instead the default `Scope` variant - /// `Scope::MetadataReadonly`. + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8217,7 +9354,497 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// 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: T) -> AboutGetCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> TeamdriveListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. +/// +/// A builder for the *delete* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive2 as drive2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive2::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.teamdrives().delete("teamDriveId") +/// .doit(); +/// # } +/// ``` +pub struct TeamdriveDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _team_drive_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TeamdriveDeleteCall<'a, C, A> {} + +impl<'a, C, A> TeamdriveDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.teamdrives.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); + params.push(("teamDriveId", self._team_drive_id.to_string())); + for &field in ["teamDriveId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/drive/v2/teamdrives/{teamDriveId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{teamDriveId}", "teamDriveId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["teamDriveId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the Team Drive + /// + /// Sets the *team drive id* 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 team_drive_id(mut self, new_value: &str) -> TeamdriveDeleteCall<'a, C, A> { + self._team_drive_id = 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. + /// + /// 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 Delegate) -> TeamdriveDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> TeamdriveDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> TeamdriveDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates a Team Drive's metadata +/// +/// A builder for the *update* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive2 as drive2; +/// use drive2::TeamDrive; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive2::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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 = TeamDrive::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.teamdrives().update(req, "teamDriveId") +/// .doit(); +/// # } +/// ``` +pub struct TeamdriveUpdateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _request: TeamDrive, + _team_drive_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TeamdriveUpdateCall<'a, C, A> {} + +impl<'a, C, A> TeamdriveUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TeamDrive)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.teamdrives.update", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("teamDriveId", self._team_drive_id.to_string())); + for &field in ["alt", "teamDriveId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v2/teamdrives/{teamDriveId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{teamDriveId}", "teamDriveId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["teamDriveId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: TeamDrive) -> TeamdriveUpdateCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the Team Drive + /// + /// Sets the *team drive id* 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 team_drive_id(mut self, new_value: &str) -> TeamdriveUpdateCall<'a, C, A> { + self._team_drive_id = 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. + /// + /// 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 Delegate) -> TeamdriveUpdateCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> TeamdriveUpdateCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> TeamdriveUpdateCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -8253,7 +9880,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// // execute the final call using `upload(...)`. /// // Values shown here are possibly random and not representative ! /// let result = hub.realtime().update("fileId") -/// .base_revision("ipsum") +/// .base_revision("duo") /// .upload(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); /// # } /// ``` @@ -8600,7 +10227,7 @@ impl<'a, C, A> RealtimeUpdateCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.realtime().get("fileId") -/// .revision(-69) +/// .revision(-31) /// .doit(); /// # } /// ``` @@ -9071,9 +10698,9 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.apps().list() -/// .language_code("diam") -/// .app_filter_mime_types("ut") -/// .app_filter_extensions("justo") +/// .language_code("ea") +/// .app_filter_mime_types("et") +/// .app_filter_extensions("dolor") /// .doit(); /// # } /// ``` @@ -9282,6 +10909,244 @@ impl<'a, C, A> AppListCall<'a, C, A> where C: BorrowMut, A: oauth } +/// Gets the information about the current user along with Drive API settings +/// +/// A builder for the *get* method supported by a *about* resource. +/// It is not used directly, but through a `AboutMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive2 as drive2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive2::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.about().get() +/// .start_change_id("diam") +/// .max_change_id_count(-62) +/// .include_subscribed(false) +/// .doit(); +/// # } +/// ``` +pub struct AboutGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _start_change_id: Option, + _max_change_id_count: Option, + _include_subscribed: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AboutGetCall<'a, C, A> {} + +impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, About)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.about.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + if let Some(value) = self._start_change_id { + params.push(("startChangeId", value.to_string())); + } + if let Some(value) = self._max_change_id_count { + params.push(("maxChangeIdCount", value.to_string())); + } + if let Some(value) = self._include_subscribed { + params.push(("includeSubscribed", value.to_string())); + } + for &field in ["alt", "startChangeId", "maxChangeIdCount", "includeSubscribed"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v2/about".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Change ID to start counting from when calculating number of remaining change IDs + /// + /// Sets the *start change id* query property to the given value. + pub fn start_change_id(mut self, new_value: &str) -> AboutGetCall<'a, C, A> { + self._start_change_id = Some(new_value.to_string()); + self + } + /// Maximum number of remaining change IDs to count + /// + /// Sets the *max change id count* query property to the given value. + pub fn max_change_id_count(mut self, new_value: i64) -> AboutGetCall<'a, C, A> { + self._max_change_id_count = Some(new_value); + self + } + /// When calculating the number of remaining change IDs, whether to include public files the user has opened and shared files. When set to false, this counts only change IDs for owned files and any shared or public files that the user has explicitly added to a folder they own. + /// + /// Sets the *include subscribed* query property to the given value. + pub fn include_subscribed(mut self, new_value: bool) -> AboutGetCall<'a, C, A> { + self._include_subscribed = 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. + /// + /// 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 Delegate) -> AboutGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> AboutGetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::MetadataReadonly`. + /// + /// 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: T) -> AboutGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Deletes a comment. /// /// A builder for the *delete* method supported by a *comment* resource. @@ -10626,10 +12491,10 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.comments().list("fileId") -/// .updated_min("eos") -/// .page_token("voluptua.") -/// .max_results(-19) -/// .include_deleted(false) +/// .updated_min("elitr") +/// .page_token("nonumy") +/// .max_results(-15) +/// .include_deleted(true) /// .doit(); /// # } /// ``` @@ -10909,10 +12774,10 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.children().list("folderId") -/// .q("ea") -/// .page_token("ea") -/// .order_by("et") -/// .max_results(-48) +/// .q("diam") +/// .page_token("ut") +/// .order_by("ut") +/// .max_results(-51) /// .doit(); /// # } /// ``` @@ -11681,6 +13546,7 @@ impl<'a, C, A> ChildrenDeleteCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.children().insert(req, "folderId") +/// .supports_team_drives(true) /// .doit(); /// # } /// ``` @@ -11690,6 +13556,7 @@ pub struct ChildrenInsertCall<'a, C, A> hub: &'a Drive, _request: ChildReference, _folder_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -11711,9 +13578,12 @@ impl<'a, C, A> ChildrenInsertCall<'a, C, A> where C: BorrowMut, A }; dlg.begin(MethodInfo { id: "drive.children.insert", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("folderId", self._folder_id.to_string())); - for &field in ["alt", "folderId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "folderId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -11862,6 +13732,13 @@ impl<'a, C, A> ChildrenInsertCall<'a, C, A> where C: BorrowMut, A self._folder_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> ChildrenInsertCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -12640,6 +14517,7 @@ impl<'a, C, A> ParentDeleteCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.parents().insert(req, "fileId") +/// .supports_team_drives(false) /// .doit(); /// # } /// ``` @@ -12649,6 +14527,7 @@ pub struct ParentInsertCall<'a, C, A> hub: &'a Drive, _request: ParentReference, _file_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -12670,9 +14549,12 @@ impl<'a, C, A> ParentInsertCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "drive.parents.insert", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); - for &field in ["alt", "fileId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "fileId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -12821,6 +14703,13 @@ impl<'a, C, A> ParentInsertCall<'a, C, A> where C: BorrowMut, A: self._file_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> ParentInsertCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -13437,9 +15326,9 @@ impl<'a, C, A> ReplyPatchCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.replies().list("fileId", "commentId") -/// .page_token("rebum.") -/// .max_results(-6) -/// .include_deleted(true) +/// .page_token("vero") +/// .max_results(-99) +/// .include_deleted(false) /// .doit(); /// # } /// ``` @@ -13720,7 +15609,7 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.replies().get("fileId", "commentId", "replyId") -/// .include_deleted(false) +/// .include_deleted(true) /// .doit(); /// # } /// ``` @@ -14780,7 +16669,7 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o } -/// Deletes a permission from a file. +/// Deletes a permission from a file or Team Drive. /// /// A builder for the *delete* method supported by a *permission* resource. /// It is not used directly, but through a `PermissionMethods` instance. @@ -14807,6 +16696,7 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().delete("fileId", "permissionId") +/// .supports_team_drives(true) /// .doit(); /// # } /// ``` @@ -14816,6 +16706,7 @@ pub struct PermissionDeleteCall<'a, C, A> hub: &'a Drive, _file_id: String, _permission_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -14837,10 +16728,13 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, }; dlg.begin(MethodInfo { id: "drive.permissions.delete", http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); params.push(("permissionId", self._permission_id.to_string())); - for &field in ["fileId", "permissionId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["fileId", "permissionId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -14944,7 +16838,7 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, } - /// The ID for the file. + /// The ID for the file or Team Drive. /// /// Sets the *file id* path property to the given value. /// @@ -14964,6 +16858,13 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, self._permission_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionDeleteCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -15016,7 +16917,7 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, } -/// Inserts a permission for a file. +/// Inserts a permission for a file or Team Drive. /// /// A builder for the *insert* method supported by a *permission* resource. /// It is not used directly, but through a `PermissionMethods` instance. @@ -15049,8 +16950,9 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().insert(req, "fileId") +/// .supports_team_drives(false) /// .send_notification_emails(true) -/// .email_message("ut") +/// .email_message("dolores") /// .doit(); /// # } /// ``` @@ -15060,6 +16962,7 @@ pub struct PermissionInsertCall<'a, C, A> hub: &'a Drive, _request: Permission, _file_id: String, + _supports_team_drives: Option, _send_notification_emails: Option, _email_message: Option, _delegate: Option<&'a mut Delegate>, @@ -15083,15 +16986,18 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, }; dlg.begin(MethodInfo { id: "drive.permissions.insert", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._send_notification_emails { params.push(("sendNotificationEmails", value.to_string())); } if let Some(value) = self._email_message { params.push(("emailMessage", value.to_string())); } - for &field in ["alt", "fileId", "sendNotificationEmails", "emailMessage"].iter() { + for &field in ["alt", "fileId", "supportsTeamDrives", "sendNotificationEmails", "emailMessage"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -15230,7 +17136,7 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, self._request = new_value; self } - /// The ID for the file. + /// The ID for the file or Team Drive. /// /// Sets the *file id* path property to the given value. /// @@ -15240,6 +17146,13 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, self._file_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionInsertCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner. /// /// Sets the *send notification emails* query property to the given value. @@ -15340,6 +17253,7 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().patch(req, "fileId", "permissionId") /// .transfer_ownership(false) +/// .supports_team_drives(false) /// .remove_expiration(true) /// .doit(); /// # } @@ -15352,6 +17266,7 @@ pub struct PermissionPatchCall<'a, C, A> _file_id: String, _permission_id: String, _transfer_ownership: Option, + _supports_team_drives: Option, _remove_expiration: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -15374,16 +17289,19 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, }; dlg.begin(MethodInfo { id: "drive.permissions.patch", http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); params.push(("permissionId", self._permission_id.to_string())); if let Some(value) = self._transfer_ownership { params.push(("transferOwnership", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._remove_expiration { params.push(("removeExpiration", value.to_string())); } - for &field in ["alt", "fileId", "permissionId", "transferOwnership", "removeExpiration"].iter() { + for &field in ["alt", "fileId", "permissionId", "transferOwnership", "supportsTeamDrives", "removeExpiration"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -15522,7 +17440,7 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, self._request = new_value; self } - /// The ID for the file. + /// The ID for the file or Team Drive. /// /// Sets the *file id* path property to the given value. /// @@ -15549,6 +17467,13 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, self._transfer_ownership = Some(new_value); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionPatchCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether to remove the expiration date. /// /// Sets the *remove expiration* query property to the given value. @@ -15608,7 +17533,7 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, } -/// Lists a file's permissions. +/// Lists a file's or Team Drive's permissions. /// /// A builder for the *list* method supported by a *permission* resource. /// It is not used directly, but through a `PermissionMethods` instance. @@ -15635,6 +17560,9 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().list("fileId") +/// .supports_team_drives(false) +/// .page_token("sed") +/// .max_results(-99) /// .doit(); /// # } /// ``` @@ -15643,6 +17571,9 @@ pub struct PermissionListCall<'a, C, A> hub: &'a Drive, _file_id: String, + _supports_team_drives: Option, + _page_token: Option, + _max_results: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -15664,9 +17595,18 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A }; dlg.begin(MethodInfo { id: "drive.permissions.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); - for &field in ["alt", "fileId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._max_results { + params.push(("maxResults", value.to_string())); + } + for &field in ["alt", "fileId", "supportsTeamDrives", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -15781,7 +17721,7 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A } - /// The ID for the file. + /// The ID for the file or Team Drive. /// /// Sets the *file id* path property to the given value. /// @@ -15791,6 +17731,27 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A self._file_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionListCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } + /// The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> PermissionListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire list will be returned. + /// + /// Sets the *max results* query property to the given value. + pub fn max_results(mut self, new_value: i32) -> PermissionListCall<'a, C, A> { + self._max_results = 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. /// @@ -15876,7 +17837,8 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().update(req, "fileId", "permissionId") -/// .transfer_ownership(false) +/// .transfer_ownership(true) +/// .supports_team_drives(false) /// .remove_expiration(true) /// .doit(); /// # } @@ -15889,6 +17851,7 @@ pub struct PermissionUpdateCall<'a, C, A> _file_id: String, _permission_id: String, _transfer_ownership: Option, + _supports_team_drives: Option, _remove_expiration: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -15911,16 +17874,19 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, }; dlg.begin(MethodInfo { id: "drive.permissions.update", http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); params.push(("permissionId", self._permission_id.to_string())); if let Some(value) = self._transfer_ownership { params.push(("transferOwnership", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._remove_expiration { params.push(("removeExpiration", value.to_string())); } - for &field in ["alt", "fileId", "permissionId", "transferOwnership", "removeExpiration"].iter() { + for &field in ["alt", "fileId", "permissionId", "transferOwnership", "supportsTeamDrives", "removeExpiration"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -16059,7 +18025,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, self._request = new_value; self } - /// The ID for the file. + /// The ID for the file or Team Drive. /// /// Sets the *file id* path property to the given value. /// @@ -16086,6 +18052,13 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, self._transfer_ownership = Some(new_value); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionUpdateCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether to remove the expiration date. /// /// Sets the *remove expiration* query property to the given value. @@ -16172,6 +18145,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().get("fileId", "permissionId") +/// .supports_team_drives(false) /// .doit(); /// # } /// ``` @@ -16181,6 +18155,7 @@ pub struct PermissionGetCall<'a, C, A> hub: &'a Drive, _file_id: String, _permission_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -16202,10 +18177,13 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "drive.permissions.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); params.push(("permissionId", self._permission_id.to_string())); - for &field in ["alt", "fileId", "permissionId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "fileId", "permissionId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -16320,7 +18298,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: } - /// The ID for the file. + /// The ID for the file or Team Drive. /// /// Sets the *file id* path property to the given value. /// @@ -16340,6 +18318,13 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: self._permission_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionGetCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -16627,6 +18612,232 @@ impl<'a, C, A> PermissionGetIdForEmailCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.changes().get_start_page_token() +/// .team_drive_id("sadipscing") +/// .supports_team_drives(false) +/// .doit(); +/// # } +/// ``` +pub struct ChangeGetStartPageTokenCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _team_drive_id: Option, + _supports_team_drives: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ChangeGetStartPageTokenCall<'a, C, A> {} + +impl<'a, C, A> ChangeGetStartPageTokenCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, StartPageToken)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.changes.getStartPageToken", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + if let Some(value) = self._team_drive_id { + params.push(("teamDriveId", value.to_string())); + } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "teamDriveId", "supportsTeamDrives"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v2/changes/startPageToken".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the Team Drive for which the starting pageToken for listing future changes from that Team Drive will be returned. + /// + /// Sets the *team drive id* query property to the given value. + pub fn team_drive_id(mut self, new_value: &str) -> ChangeGetStartPageTokenCall<'a, C, A> { + self._team_drive_id = Some(new_value.to_string()); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> ChangeGetStartPageTokenCall<'a, C, A> { + self._supports_team_drives = 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. + /// + /// 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 Delegate) -> ChangeGetStartPageTokenCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ChangeGetStartPageTokenCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::AppReadonly`. + /// + /// 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: T) -> ChangeGetStartPageTokenCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Subscribe to changes for a user. /// /// A builder for the *watch* method supported by a *change* resource. @@ -16660,12 +18871,16 @@ impl<'a, C, A> PermissionGetIdForEmailCall<'a, C, A> where C: BorrowMut hub: &'a Drive, _request: Channel, + _team_drive_id: Option, + _supports_team_drives: Option, _start_change_id: Option, _spaces: Option, _page_token: Option, _max_results: Option, + _include_team_drive_items: Option, _include_subscribed: Option, _include_deleted: Option, + _include_corpus_removals: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -16701,7 +18920,13 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o }; dlg.begin(MethodInfo { id: "drive.changes.watch", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((13 + self._additional_params.len())); + if let Some(value) = self._team_drive_id { + params.push(("teamDriveId", value.to_string())); + } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._start_change_id { params.push(("startChangeId", value.to_string())); } @@ -16714,13 +18939,19 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o if let Some(value) = self._max_results { params.push(("maxResults", value.to_string())); } + if let Some(value) = self._include_team_drive_items { + params.push(("includeTeamDriveItems", value.to_string())); + } if let Some(value) = self._include_subscribed { params.push(("includeSubscribed", value.to_string())); } if let Some(value) = self._include_deleted { params.push(("includeDeleted", value.to_string())); } - for &field in ["alt", "startChangeId", "spaces", "pageToken", "maxResults", "includeSubscribed", "includeDeleted"].iter() { + if let Some(value) = self._include_corpus_removals { + params.push(("includeCorpusRemovals", value.to_string())); + } + for &field in ["alt", "teamDriveId", "supportsTeamDrives", "startChangeId", "spaces", "pageToken", "maxResults", "includeTeamDriveItems", "includeSubscribed", "includeDeleted", "includeCorpusRemovals"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -16838,6 +19069,20 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o self._request = new_value; self } + /// The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier. + /// + /// Sets the *team drive id* query property to the given value. + pub fn team_drive_id(mut self, new_value: &str) -> ChangeWatchCall<'a, C, A> { + self._team_drive_id = Some(new_value.to_string()); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Change ID to start listing changes from. /// /// Sets the *start change id* query property to the given value. @@ -16852,7 +19097,7 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o self._spaces = Some(new_value.to_string()); self } - /// Page token for changes. + /// The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ChangeWatchCall<'a, C, A> { @@ -16866,6 +19111,13 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o self._max_results = Some(new_value); self } + /// Whether Team Drive files or changes should be included in results. + /// + /// Sets the *include team drive items* query property to the given value. + pub fn include_team_drive_items(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { + self._include_team_drive_items = Some(new_value); + self + } /// Whether to include public files the user has opened and shared files. When set to false, the list only includes owned files plus any shared or public files the user has explicitly added to a folder they own. /// /// Sets the *include subscribed* query property to the given value. @@ -16873,13 +19125,20 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o self._include_subscribed = Some(new_value); self } - /// Whether to include deleted items. + /// Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. /// /// Sets the *include deleted* query property to the given value. pub fn include_deleted(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { self._include_deleted = Some(new_value); self } + /// Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. + /// + /// Sets the *include corpus removals* query property to the given value. + pub fn include_corpus_removals(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { + self._include_corpus_removals = 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. /// @@ -16932,7 +19191,7 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o } -/// Lists the changes for a user. +/// Lists the changes for a user or Team Drive. /// /// A builder for the *list* method supported by a *change* resource. /// It is not used directly, but through a `ChangeMethods` instance. @@ -16959,12 +19218,16 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.changes().list() -/// .start_change_id("consetetur") -/// .spaces("sea") -/// .page_token("elitr") -/// .max_results(-77) +/// .team_drive_id("consetetur") +/// .supports_team_drives(true) +/// .start_change_id("justo") +/// .spaces("tempor") +/// .page_token("gubergren") +/// .max_results(-84) +/// .include_team_drive_items(false) /// .include_subscribed(true) /// .include_deleted(false) +/// .include_corpus_removals(false) /// .doit(); /// # } /// ``` @@ -16972,12 +19235,16 @@ pub struct ChangeListCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Drive, + _team_drive_id: Option, + _supports_team_drives: Option, _start_change_id: Option, _spaces: Option, _page_token: Option, _max_results: Option, + _include_team_drive_items: Option, _include_subscribed: Option, _include_deleted: Option, + _include_corpus_removals: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -16999,7 +19266,13 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa }; dlg.begin(MethodInfo { id: "drive.changes.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); + if let Some(value) = self._team_drive_id { + params.push(("teamDriveId", value.to_string())); + } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._start_change_id { params.push(("startChangeId", value.to_string())); } @@ -17012,13 +19285,19 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa if let Some(value) = self._max_results { params.push(("maxResults", value.to_string())); } + if let Some(value) = self._include_team_drive_items { + params.push(("includeTeamDriveItems", value.to_string())); + } if let Some(value) = self._include_subscribed { params.push(("includeSubscribed", value.to_string())); } if let Some(value) = self._include_deleted { params.push(("includeDeleted", value.to_string())); } - for &field in ["alt", "startChangeId", "spaces", "pageToken", "maxResults", "includeSubscribed", "includeDeleted"].iter() { + if let Some(value) = self._include_corpus_removals { + params.push(("includeCorpusRemovals", value.to_string())); + } + for &field in ["alt", "teamDriveId", "supportsTeamDrives", "startChangeId", "spaces", "pageToken", "maxResults", "includeTeamDriveItems", "includeSubscribed", "includeDeleted", "includeCorpusRemovals"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -17112,6 +19391,20 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa } + /// The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier. + /// + /// Sets the *team drive id* query property to the given value. + pub fn team_drive_id(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { + self._team_drive_id = Some(new_value.to_string()); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Change ID to start listing changes from. /// /// Sets the *start change id* query property to the given value. @@ -17126,7 +19419,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa self._spaces = Some(new_value.to_string()); self } - /// Page token for changes. + /// The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { @@ -17140,6 +19433,13 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa self._max_results = Some(new_value); self } + /// Whether Team Drive files or changes should be included in results. + /// + /// Sets the *include team drive items* query property to the given value. + pub fn include_team_drive_items(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { + self._include_team_drive_items = Some(new_value); + self + } /// Whether to include public files the user has opened and shared files. When set to false, the list only includes owned files plus any shared or public files the user has explicitly added to a folder they own. /// /// Sets the *include subscribed* query property to the given value. @@ -17147,13 +19447,20 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa self._include_subscribed = Some(new_value); self } - /// Whether to include deleted items. + /// Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. /// /// Sets the *include deleted* query property to the given value. pub fn include_deleted(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { self._include_deleted = Some(new_value); self } + /// Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. + /// + /// Sets the *include corpus removals* query property to the given value. + pub fn include_corpus_removals(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { + self._include_corpus_removals = 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. /// @@ -17233,6 +19540,8 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.changes().get("changeId") +/// .team_drive_id("ipsum") +/// .supports_team_drives(true) /// .doit(); /// # } /// ``` @@ -17241,6 +19550,8 @@ pub struct ChangeGetCall<'a, C, A> hub: &'a Drive, _change_id: String, + _team_drive_id: Option, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -17262,9 +19573,15 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau }; dlg.begin(MethodInfo { id: "drive.changes.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("changeId", self._change_id.to_string())); - for &field in ["alt", "changeId"].iter() { + if let Some(value) = self._team_drive_id { + params.push(("teamDriveId", value.to_string())); + } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "changeId", "teamDriveId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -17389,6 +19706,20 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau self._change_id = new_value.to_string(); self } + /// The Team Drive from which the change will be returned. + /// + /// Sets the *team drive id* query property to the given value. + pub fn team_drive_id(mut self, new_value: &str) -> ChangeGetCall<'a, C, A> { + self._team_drive_id = Some(new_value.to_string()); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> ChangeGetCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -17474,7 +19805,7 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.properties().patch(req, "fileId", "propertyKey") -/// .visibility("consetetur") +/// .visibility("diam") /// .doit(); /// # } /// ``` @@ -17758,7 +20089,7 @@ impl<'a, C, A> PropertyPatchCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.properties().delete("fileId", "propertyKey") -/// .visibility("elitr") +/// .visibility("diam") /// .doit(); /// # } /// ``` @@ -18513,7 +20844,7 @@ impl<'a, C, A> PropertyListCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.properties().update(req, "fileId", "propertyKey") -/// .visibility("dolor") +/// .visibility("vero") /// .doit(); /// # } /// ``` @@ -18797,7 +21128,7 @@ impl<'a, C, A> PropertyUpdateCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.properties().get("fileId", "propertyKey") -/// .visibility("Lorem") +/// .visibility("dolores") /// .doit(); /// # } /// ``` @@ -20095,8 +22426,8 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.revisions().list("fileId") -/// .page_token("Lorem") -/// .max_results(-16) +/// .page_token("nonumy") +/// .max_results(-47) /// .doit(); /// # } /// ``` diff --git a/gen/drive3-cli/Cargo.toml b/gen/drive3-cli/Cargo.toml index c4b2548eac..147e2f2d54 100644 --- a/gen/drive3-cli/Cargo.toml +++ b/gen/drive3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-drive3-cli" -version = "1.0.4+20161212" +version = "1.0.4+20170512" authors = ["Sebastian Thiel "] description = "A complete library to interact with drive (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/drive3-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-drive3] path = "../drive3" -version = "1.0.4+20161212" +version = "1.0.4+20170512" diff --git a/gen/drive3-cli/README.md b/gen/drive3-cli/README.md index 041b9b614e..5ffd73d417 100644 --- a/gen/drive3-cli/README.md +++ b/gen/drive3-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *drive* API at revision *20161212*. The CLI is at version *1.0.4*. +This documentation was generated from the *drive* API at revision *20170512*. The CLI is at version *1.0.4*. ```bash drive3 [options] @@ -71,6 +71,12 @@ drive3 [options] get [-p ]... [-o ] list [-p ]... [-o ] update (-r )... [-p ]... [-o ] + teamdrives + create (-r )... [-p ]... [-o ] + delete [-p ]... + get [-p ]... [-o ] + list [-p ]... [-o ] + update (-r )... [-p ]... [-o ] drive3 --help Configuration: diff --git a/gen/drive3-cli/mkdocs.yml b/gen/drive3-cli/mkdocs.yml index 6a4d9e2e46..e3146b941d 100644 --- a/gen/drive3-cli/mkdocs.yml +++ b/gen/drive3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: drive v1.0.4+20161212 +site_name: drive v1.0.4+20170512 site_url: http://byron.github.io/google-apis-rs/google-drive3-cli site_description: A complete library to interact with drive (protocol v3) @@ -43,6 +43,11 @@ pages: - ['revisions_get.md', 'Revisions', 'Get'] - ['revisions_list.md', 'Revisions', 'List'] - ['revisions_update.md', 'Revisions', 'Update'] +- ['teamdrives_create.md', 'Teamdrives', 'Create'] +- ['teamdrives_delete.md', 'Teamdrives', 'Delete'] +- ['teamdrives_get.md', 'Teamdrives', 'Get'] +- ['teamdrives_list.md', 'Teamdrives', 'List'] +- ['teamdrives_update.md', 'Teamdrives', 'Update'] theme: readthedocs diff --git a/gen/drive3-cli/src/main.rs b/gen/drive3-cli/src/main.rs index 25b3c555c8..e9a187c352 100644 --- a/gen/drive3-cli/src/main.rs +++ b/gen/drive3-cli/src/main.rs @@ -104,6 +104,12 @@ impl<'n> Engine<'n> { 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 { + "team-drive-id" => { + call = call.team_drive_id(value.unwrap_or("")); + }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -117,6 +123,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["team-drive-id", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -156,6 +163,12 @@ impl<'n> Engine<'n> { 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 { + "team-drive-id" => { + call = call.team_drive_id(value.unwrap_or("")); + }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "spaces" => { call = call.spaces(value.unwrap_or("")); }, @@ -165,9 +178,15 @@ impl<'n> Engine<'n> { "page-size" => { call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); }, + "include-team-drive-items" => { + call = call.include_team_drive_items(arg_from_str(value.unwrap_or("false"), err, "include-team-drive-items", "boolean")); + }, "include-removed" => { call = call.include_removed(arg_from_str(value.unwrap_or("false"), err, "include-removed", "boolean")); }, + "include-corpus-removals" => { + call = call.include_corpus_removals(arg_from_str(value.unwrap_or("false"), err, "include-corpus-removals", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -181,7 +200,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["spaces", "page-size", "restrict-to-my-drive", "include-removed"].iter().map(|v|*v)); + v.extend(["page-size", "include-team-drive-items", "restrict-to-my-drive", "spaces", "supports-team-drives", "include-corpus-removals", "team-drive-id", "include-removed"].iter().map(|v|*v)); v } )); } } @@ -263,6 +282,12 @@ impl<'n> Engine<'n> { 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 { + "team-drive-id" => { + call = call.team_drive_id(value.unwrap_or("")); + }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "spaces" => { call = call.spaces(value.unwrap_or("")); }, @@ -272,9 +297,15 @@ impl<'n> Engine<'n> { "page-size" => { call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); }, + "include-team-drive-items" => { + call = call.include_team_drive_items(arg_from_str(value.unwrap_or("false"), err, "include-team-drive-items", "boolean")); + }, "include-removed" => { call = call.include_removed(arg_from_str(value.unwrap_or("false"), err, "include-removed", "boolean")); }, + "include-corpus-removals" => { + call = call.include_corpus_removals(arg_from_str(value.unwrap_or("false"), err, "include-corpus-removals", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -288,7 +319,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["spaces", "page-size", "restrict-to-my-drive", "include-removed"].iter().map(|v|*v)); + v.extend(["page-size", "include-team-drive-items", "restrict-to-my-drive", "spaces", "supports-team-drives", "include-corpus-removals", "team-drive-id", "include-removed"].iter().map(|v|*v)); v } )); } } @@ -828,10 +859,23 @@ impl<'n> Engine<'n> { "folder-color-rgb" => Some(("folderColorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "app-properties" => Some(("appProperties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-untrash" => Some(("capabilities.canUntrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete" => Some(("capabilities.canDelete", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-team-drive-item" => Some(("capabilities.canMoveTeamDriveItem", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-item-into-team-drive" => Some(("capabilities.canMoveItemIntoTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-trash" => Some(("capabilities.canTrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-viewers-can-copy-content" => Some(("capabilities.canChangeViewersCanCopyContent", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-read-team-drive" => Some(("capabilities.canReadTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashed-time" => Some(("trashedTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-view-link" => Some(("webViewLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "parents" => Some(("parents", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), @@ -845,6 +889,7 @@ impl<'n> Engine<'n> { "viewed-by-me" => Some(("viewedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "modified-by-me" => Some(("modifiedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "quota-bytes-used" => Some(("quotaBytesUsed", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "team-drive-id" => Some(("teamDriveId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "file-extension" => Some(("fileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "properties" => Some(("properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "md5-checksum" => Some(("md5Checksum", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -875,16 +920,23 @@ impl<'n> Engine<'n> { "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-content-link" => Some(("webContentLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.me" => Some(("trashingUser.me", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashing-user.kind" => Some(("trashingUser.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.display-name" => Some(("trashingUser.displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.permission-id" => Some(("trashingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.email-address" => Some(("trashingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.photo-link" => Some(("trashingUser.photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "trashed" => Some(("trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "content-hints.indexable-text" => Some(("contentHints.indexableText", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "content-hints.thumbnail.mime-type" => Some(("contentHints.thumbnail.mimeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "content-hints.thumbnail.image" => Some(("contentHints.thumbnail.image", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "created-time" => Some(("createdTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "has-augmented-permissions" => Some(("hasAugmentedPermissions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-comment", "can-copy", "can-edit", "can-read-revisions", "can-share", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-thumbnail", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "thumbnail", "thumbnail-link", "thumbnail-version", "time", "trashed", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-add-children", "can-change-viewers-can-copy-content", "can-comment", "can-copy", "can-delete", "can-download", "can-edit", "can-list-children", "can-move-item-into-team-drive", "can-move-team-drive-item", "can-read-revisions", "can-read-team-drive", "can-remove-children", "can-rename", "can-share", "can-trash", "can-untrash", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-augmented-permissions", "has-thumbnail", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "team-drive-id", "thumbnail", "thumbnail-link", "thumbnail-version", "time", "trashed", "trashed-time", "trashing-user", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -898,6 +950,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "ocr-language" => { call = call.ocr_language(value.unwrap_or("")); }, @@ -920,7 +975,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["keep-revision-forever", "ocr-language", "ignore-default-visibility"].iter().map(|v|*v)); + v.extend(["keep-revision-forever", "ignore-default-visibility", "ocr-language", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1007,10 +1062,23 @@ impl<'n> Engine<'n> { "folder-color-rgb" => Some(("folderColorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "app-properties" => Some(("appProperties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-untrash" => Some(("capabilities.canUntrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete" => Some(("capabilities.canDelete", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-team-drive-item" => Some(("capabilities.canMoveTeamDriveItem", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-item-into-team-drive" => Some(("capabilities.canMoveItemIntoTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-trash" => Some(("capabilities.canTrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-viewers-can-copy-content" => Some(("capabilities.canChangeViewersCanCopyContent", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-read-team-drive" => Some(("capabilities.canReadTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashed-time" => Some(("trashedTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-view-link" => Some(("webViewLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "parents" => Some(("parents", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), @@ -1024,6 +1092,7 @@ impl<'n> Engine<'n> { "viewed-by-me" => Some(("viewedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "modified-by-me" => Some(("modifiedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "quota-bytes-used" => Some(("quotaBytesUsed", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "team-drive-id" => Some(("teamDriveId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "file-extension" => Some(("fileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "properties" => Some(("properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "md5-checksum" => Some(("md5Checksum", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1054,16 +1123,23 @@ impl<'n> Engine<'n> { "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-content-link" => Some(("webContentLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.me" => Some(("trashingUser.me", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashing-user.kind" => Some(("trashingUser.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.display-name" => Some(("trashingUser.displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.permission-id" => Some(("trashingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.email-address" => Some(("trashingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.photo-link" => Some(("trashingUser.photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "trashed" => Some(("trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "content-hints.indexable-text" => Some(("contentHints.indexableText", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "content-hints.thumbnail.mime-type" => Some(("contentHints.thumbnail.mimeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "content-hints.thumbnail.image" => Some(("contentHints.thumbnail.image", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "created-time" => Some(("createdTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "has-augmented-permissions" => Some(("hasAugmentedPermissions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-comment", "can-copy", "can-edit", "can-read-revisions", "can-share", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-thumbnail", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "thumbnail", "thumbnail-link", "thumbnail-version", "time", "trashed", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-add-children", "can-change-viewers-can-copy-content", "can-comment", "can-copy", "can-delete", "can-download", "can-edit", "can-list-children", "can-move-item-into-team-drive", "can-move-team-drive-item", "can-read-revisions", "can-read-team-drive", "can-remove-children", "can-rename", "can-share", "can-trash", "can-untrash", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-augmented-permissions", "has-thumbnail", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "team-drive-id", "thumbnail", "thumbnail-link", "thumbnail-version", "time", "trashed", "trashed-time", "trashing-user", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1080,6 +1156,9 @@ impl<'n> Engine<'n> { "use-content-as-indexable-text" => { call = call.use_content_as_indexable_text(arg_from_str(value.unwrap_or("false"), err, "use-content-as-indexable-text", "boolean")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "ocr-language" => { call = call.ocr_language(value.unwrap_or("")); }, @@ -1102,7 +1181,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["keep-revision-forever", "use-content-as-indexable-text", "ocr-language", "ignore-default-visibility"].iter().map(|v|*v)); + v.extend(["keep-revision-forever", "ignore-default-visibility", "use-content-as-indexable-text", "ocr-language", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1146,6 +1225,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1159,6 +1241,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1351,6 +1434,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "acknowledge-abuse" => { call = call.acknowledge_abuse(arg_from_str(value.unwrap_or("false"), err, "acknowledge-abuse", "boolean")); }, @@ -1370,7 +1456,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["acknowledge-abuse"].iter().map(|v|*v)); + v.extend(["acknowledge-abuse", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1415,6 +1501,12 @@ impl<'n> Engine<'n> { 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 { + "team-drive-id" => { + call = call.team_drive_id(value.unwrap_or("")); + }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "spaces" => { call = call.spaces(value.unwrap_or("")); }, @@ -1430,9 +1522,15 @@ impl<'n> Engine<'n> { "order-by" => { call = call.order_by(value.unwrap_or("")); }, + "include-team-drive-items" => { + call = call.include_team_drive_items(arg_from_str(value.unwrap_or("false"), err, "include-team-drive-items", "boolean")); + }, "corpus" => { call = call.corpus(value.unwrap_or("")); }, + "corpora" => { + call = call.corpora(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1446,7 +1544,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["order-by", "page-size", "q", "page-token", "spaces", "corpus"].iter().map(|v|*v)); + v.extend(["order-by", "include-team-drive-items", "page-size", "corpora", "supports-team-drives", "q", "page-token", "spaces", "team-drive-id", "corpus"].iter().map(|v|*v)); v } )); } } @@ -1533,10 +1631,23 @@ impl<'n> Engine<'n> { "folder-color-rgb" => Some(("folderColorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "app-properties" => Some(("appProperties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-untrash" => Some(("capabilities.canUntrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete" => Some(("capabilities.canDelete", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-team-drive-item" => Some(("capabilities.canMoveTeamDriveItem", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-move-item-into-team-drive" => Some(("capabilities.canMoveItemIntoTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-trash" => Some(("capabilities.canTrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-viewers-can-copy-content" => Some(("capabilities.canChangeViewersCanCopyContent", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-read-team-drive" => Some(("capabilities.canReadTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashed-time" => Some(("trashedTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-view-link" => Some(("webViewLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "parents" => Some(("parents", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), @@ -1550,6 +1661,7 @@ impl<'n> Engine<'n> { "viewed-by-me" => Some(("viewedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "modified-by-me" => Some(("modifiedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "quota-bytes-used" => Some(("quotaBytesUsed", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "team-drive-id" => Some(("teamDriveId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "file-extension" => Some(("fileExtension", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "properties" => Some(("properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "md5-checksum" => Some(("md5Checksum", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1580,16 +1692,23 @@ impl<'n> Engine<'n> { "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "web-content-link" => Some(("webContentLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.me" => Some(("trashingUser.me", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "trashing-user.kind" => Some(("trashingUser.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.display-name" => Some(("trashingUser.displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.permission-id" => Some(("trashingUser.permissionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.email-address" => Some(("trashingUser.emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "trashing-user.photo-link" => Some(("trashingUser.photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "spaces" => Some(("spaces", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "trashed" => Some(("trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "content-hints.indexable-text" => Some(("contentHints.indexableText", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "content-hints.thumbnail.mime-type" => Some(("contentHints.thumbnail.mimeType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "content-hints.thumbnail.image" => Some(("contentHints.thumbnail.image", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "created-time" => Some(("createdTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "has-augmented-permissions" => Some(("hasAugmentedPermissions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-comment", "can-copy", "can-edit", "can-read-revisions", "can-share", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-thumbnail", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "thumbnail", "thumbnail-link", "thumbnail-version", "time", "trashed", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-add-children", "can-change-viewers-can-copy-content", "can-comment", "can-copy", "can-delete", "can-download", "can-edit", "can-list-children", "can-move-item-into-team-drive", "can-move-team-drive-item", "can-read-revisions", "can-read-team-drive", "can-remove-children", "can-rename", "can-share", "can-trash", "can-untrash", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "has-augmented-permissions", "has-thumbnail", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "team-drive-id", "thumbnail", "thumbnail-link", "thumbnail-version", "time", "trashed", "trashed-time", "trashing-user", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1606,6 +1725,9 @@ impl<'n> Engine<'n> { "use-content-as-indexable-text" => { call = call.use_content_as_indexable_text(arg_from_str(value.unwrap_or("false"), err, "use-content-as-indexable-text", "boolean")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "remove-parents" => { call = call.remove_parents(value.unwrap_or("")); }, @@ -1631,7 +1753,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["add-parents", "keep-revision-forever", "use-content-as-indexable-text", "ocr-language", "remove-parents"].iter().map(|v|*v)); + v.extend(["add-parents", "use-content-as-indexable-text", "keep-revision-forever", "supports-team-drives", "ocr-language", "remove-parents"].iter().map(|v|*v)); v } )); } } @@ -1718,6 +1840,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "acknowledge-abuse" => { call = call.acknowledge_abuse(arg_from_str(value.unwrap_or("false"), err, "acknowledge-abuse", "boolean")); }, @@ -1737,7 +1862,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["acknowledge-abuse"].iter().map(|v|*v)); + v.extend(["acknowledge-abuse", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1802,6 +1927,7 @@ impl<'n> Engine<'n> { "domain" => Some(("domain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "allow-file-discovery" => Some(("allowFileDiscovery", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "deleted" => Some(("deleted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "email-address" => Some(("emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "photo-link" => Some(("photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1810,7 +1936,7 @@ impl<'n> Engine<'n> { "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-file-discovery", "display-name", "domain", "email-address", "expiration-time", "id", "kind", "photo-link", "role", "type"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-file-discovery", "deleted", "display-name", "domain", "email-address", "expiration-time", "id", "kind", "photo-link", "role", "type"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1827,6 +1953,9 @@ impl<'n> Engine<'n> { "transfer-ownership" => { call = call.transfer_ownership(arg_from_str(value.unwrap_or("false"), err, "transfer-ownership", "boolean")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "send-notification-email" => { call = call.send_notification_email(arg_from_str(value.unwrap_or("false"), err, "send-notification-email", "boolean")); }, @@ -1846,7 +1975,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["send-notification-email", "email-message", "transfer-ownership"].iter().map(|v|*v)); + v.extend(["send-notification-email", "email-message", "transfer-ownership", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1886,6 +2015,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1899,6 +2031,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1930,6 +2063,9 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1943,6 +2079,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -1982,6 +2119,15 @@ impl<'n> Engine<'n> { 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 { + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1995,6 +2141,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["page-token", "page-size", "supports-team-drives"].iter().map(|v|*v)); v } )); } } @@ -2054,6 +2201,7 @@ impl<'n> Engine<'n> { "domain" => Some(("domain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "allow-file-discovery" => Some(("allowFileDiscovery", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "deleted" => Some(("deleted", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "email-address" => Some(("emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "photo-link" => Some(("photoLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2062,7 +2210,7 @@ impl<'n> Engine<'n> { "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-file-discovery", "display-name", "domain", "email-address", "expiration-time", "id", "kind", "photo-link", "role", "type"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-file-discovery", "deleted", "display-name", "domain", "email-address", "expiration-time", "id", "kind", "photo-link", "role", "type"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2079,6 +2227,9 @@ impl<'n> Engine<'n> { "transfer-ownership" => { call = call.transfer_ownership(arg_from_str(value.unwrap_or("false"), err, "transfer-ownership", "boolean")); }, + "supports-team-drives" => { + call = call.supports_team_drives(arg_from_str(value.unwrap_or("false"), err, "supports-team-drives", "boolean")); + }, "remove-expiration" => { call = call.remove_expiration(arg_from_str(value.unwrap_or("false"), err, "remove-expiration", "boolean")); }, @@ -2095,7 +2246,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["transfer-ownership", "remove-expiration"].iter().map(|v|*v)); + v.extend(["transfer-ownership", "supports-team-drives", "remove-expiration"].iter().map(|v|*v)); v } )); } } @@ -2756,6 +2907,377 @@ impl<'n> Engine<'n> { } } + fn _teamdrives_create(&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()[..] { + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "background-image-link" => Some(("backgroundImageLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "theme-id" => Some(("themeId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "color-rgb" => Some(("colorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-manage-members" => Some(("capabilities.canManageMembers", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-team-drive-background" => Some(("capabilities.canChangeTeamDriveBackground", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete-team-drive" => Some(("capabilities.canDeleteTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename-team-drive" => Some(("capabilities.canRenameTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "background-image-file.width" => Some(("backgroundImageFile.width", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "background-image-file.y-coordinate" => Some(("backgroundImageFile.yCoordinate", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "background-image-file.id" => Some(("backgroundImageFile.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "background-image-file.x-coordinate" => Some(("backgroundImageFile.xCoordinate", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["background-image-file", "background-image-link", "can-add-children", "can-change-team-drive-background", "can-comment", "can-copy", "can-delete-team-drive", "can-download", "can-edit", "can-list-children", "can-manage-members", "can-read-revisions", "can-remove-children", "can-rename", "can-rename-team-drive", "can-share", "capabilities", "color-rgb", "id", "kind", "name", "theme-id", "width", "x-coordinate", "y-coordinate"]); + 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::TeamDrive = json::value::from_value(object).unwrap(); + let mut call = self.hub.teamdrives().create(request, opt.value_of("request-id").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(), + _ => 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(()) + } + } + } + } + + fn _teamdrives_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.teamdrives().delete(opt.value_of("team-drive-id").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); + } + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok(mut response) => { + Ok(()) + } + } + } + } + + fn _teamdrives_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.teamdrives().get(opt.value_of("team-drive-id").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(), + _ => 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(()) + } + } + } + } + + fn _teamdrives_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.teamdrives().list(); + 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(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + _ => { + 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-token", "page-size"].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(), + _ => 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(()) + } + } + } + } + + fn _teamdrives_update(&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()[..] { + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "background-image-link" => Some(("backgroundImageLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "theme-id" => Some(("themeId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "color-rgb" => Some(("colorRgb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "capabilities.can-read-revisions" => Some(("capabilities.canReadRevisions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-copy" => Some(("capabilities.canCopy", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename" => Some(("capabilities.canRename", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-list-children" => Some(("capabilities.canListChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-share" => Some(("capabilities.canShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-manage-members" => Some(("capabilities.canManageMembers", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-download" => Some(("capabilities.canDownload", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-comment" => Some(("capabilities.canComment", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-change-team-drive-background" => Some(("capabilities.canChangeTeamDriveBackground", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-delete-team-drive" => Some(("capabilities.canDeleteTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-rename-team-drive" => Some(("capabilities.canRenameTeamDrive", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-remove-children" => Some(("capabilities.canRemoveChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-add-children" => Some(("capabilities.canAddChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "capabilities.can-edit" => Some(("capabilities.canEdit", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "background-image-file.width" => Some(("backgroundImageFile.width", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "background-image-file.y-coordinate" => Some(("backgroundImageFile.yCoordinate", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "background-image-file.id" => Some(("backgroundImageFile.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "background-image-file.x-coordinate" => Some(("backgroundImageFile.xCoordinate", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["background-image-file", "background-image-link", "can-add-children", "can-change-team-drive-background", "can-comment", "can-copy", "can-delete-team-drive", "can-download", "can-edit", "can-list-children", "can-manage-members", "can-read-revisions", "can-remove-children", "can-rename", "can-rename-team-drive", "can-share", "capabilities", "color-rgb", "id", "kind", "name", "theme-id", "width", "x-coordinate", "y-coordinate"]); + 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::TeamDrive = json::value::from_value(object).unwrap(); + let mut call = self.hub.teamdrives().update(request, opt.value_of("team-drive-id").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(), + _ => 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(()) + } + } + } + } + fn _doit(&self, dry_run: bool) -> Result, Option> { let mut err = InvalidOptionsError::new(); let mut call_result: Result<(), DoitError> = Ok(()); @@ -2927,6 +3449,29 @@ impl<'n> Engine<'n> { } } }, + ("teamdrives", Some(opt)) => { + match opt.subcommand() { + ("create", Some(opt)) => { + call_result = self._teamdrives_create(opt, dry_run, &mut err); + }, + ("delete", Some(opt)) => { + call_result = self._teamdrives_delete(opt, dry_run, &mut err); + }, + ("get", Some(opt)) => { + call_result = self._teamdrives_get(opt, dry_run, &mut err); + }, + ("list", Some(opt)) => { + call_result = self._teamdrives_list(opt, dry_run, &mut err); + }, + ("update", Some(opt)) => { + call_result = self._teamdrives_update(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("teamdrives".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, _ => { err.issues.push(CLIError::MissingCommandError); writeln!(io::stderr(), "{}\n", self.opt.usage()).ok(); @@ -3047,7 +3592,7 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Lists changes for a user."##), + Some(r##"Lists the changes for a user or Team Drive."##), "Details at http://byron.github.io/google-apis-rs/google_drive3_cli/changes_list", vec![ (Some(r##"page-token"##), @@ -3312,7 +3857,7 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Permanently deletes a file owned by the user without moving it to the trash. If the target is a folder, all descendants owned by the user are also deleted."##), + Some(r##"Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a Team Drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted."##), "Details at http://byron.github.io/google-apis-rs/google_drive3_cli/files_delete", vec![ (Some(r##"file-id"##), @@ -3485,12 +4030,12 @@ fn main() { ("permissions", "methods: 'create', 'delete', 'get', 'list' and 'update'", vec![ ("create", - Some(r##"Creates a permission for a file."##), + Some(r##"Creates a permission for a file or Team Drive."##), "Details at http://byron.github.io/google-apis-rs/google_drive3_cli/permissions_create", vec![ (Some(r##"file-id"##), None, - Some(r##"The ID of the file."##), + Some(r##"The ID of the file or Team Drive."##), Some(true), Some(false)), @@ -3518,7 +4063,7 @@ fn main() { vec![ (Some(r##"file-id"##), None, - Some(r##"The ID of the file."##), + Some(r##"The ID of the file or Team Drive."##), Some(true), Some(false)), @@ -3563,12 +4108,12 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Lists a file's permissions."##), + Some(r##"Lists a file's or Team Drive's permissions."##), "Details at http://byron.github.io/google-apis-rs/google_drive3_cli/permissions_list", vec![ (Some(r##"file-id"##), None, - Some(r##"The ID of the file."##), + Some(r##"The ID of the file or Team Drive."##), Some(true), Some(false)), @@ -3590,7 +4135,7 @@ fn main() { vec![ (Some(r##"file-id"##), None, - Some(r##"The ID of the file."##), + Some(r##"The ID of the file or Team Drive."##), Some(true), Some(false)), @@ -3896,11 +4441,124 @@ fn main() { ]), ]), + ("teamdrives", "methods: 'create', 'delete', 'get', 'list' and 'update'", vec![ + ("create", + Some(r##"Creates a new Team Drive."##), + "Details at http://byron.github.io/google-apis-rs/google_drive3_cli/teamdrives_create", + vec![ + (Some(r##"request-id"##), + None, + Some(r##"An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned."##), + 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)), + ]), + ("delete", + Some(r##"Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items."##), + "Details at http://byron.github.io/google-apis-rs/google_drive3_cli/teamdrives_delete", + vec![ + (Some(r##"team-drive-id"##), + None, + Some(r##"The ID of the Team Drive"##), + 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)), + ]), + ("get", + Some(r##"Gets a Team Drive's metadata by ID."##), + "Details at http://byron.github.io/google-apis-rs/google_drive3_cli/teamdrives_get", + vec![ + (Some(r##"team-drive-id"##), + None, + Some(r##"The ID of the Team Drive"##), + 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)), + ]), + ("list", + Some(r##"Lists the user's Team Drives."##), + "Details at http://byron.github.io/google-apis-rs/google_drive3_cli/teamdrives_list", + vec![ + (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)), + ]), + ("update", + Some(r##"Updates a Team Drive's metadata"##), + "Details at http://byron.github.io/google-apis-rs/google_drive3_cli/teamdrives_update", + vec![ + (Some(r##"team-drive-id"##), + None, + Some(r##"The ID of the Team Drive"##), + 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("drive3") .author("Sebastian Thiel ") - .version("1.0.4+20161212") + .version("1.0.4+20170512") .about("Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_drive3_cli") .arg(Arg::with_name("url") diff --git a/gen/drive3/Cargo.toml b/gen/drive3/Cargo.toml index 498a982f9d..1ef9637061 100644 --- a/gen/drive3/Cargo.toml +++ b/gen/drive3/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-drive3" -version = "1.0.4+20161212" +version = "1.0.4+20170512" authors = ["Sebastian Thiel "] description = "A complete library to interact with drive (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/drive3" homepage = "https://developers.google.com/drive/" -documentation = "https://docs.rs/google-drive3/1.0.4+20161212" +documentation = "https://docs.rs/google-drive3/1.0.4+20170512" license = "MIT" keywords = ["drive", "google", "protocol", "web", "api"] diff --git a/gen/drive3/README.md b/gen/drive3/README.md index 31d8669afd..9c6aa7e66e 100644 --- a/gen/drive3/README.md +++ b/gen/drive3/README.md @@ -5,51 +5,53 @@ DO NOT EDIT ! --> The `google-drive3` library allows access to all features of the *Google drive* service. -This documentation was generated from *drive* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *drive* crate version *1.0.4+20170512*, where *20170512* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *drive* *v3* API can be found at the [official documentation site](https://developers.google.com/drive/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.Drive.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.Drive.html) ... -* [about](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.About.html) - * [*get*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.AboutGetCall.html) -* [changes](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.Change.html) - * [*get start page token*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ChangeGetStartPageTokenCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ChangeListCall.html) and [*watch*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ChangeWatchCall.html) -* [channels](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.Channel.html) - * [*stop*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ChannelStopCall.html) -* [comments](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.Comment.html) - * [*create*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.CommentCreateCall.html), [*delete*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.CommentDeleteCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.CommentGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.CommentListCall.html) and [*update*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.CommentUpdateCall.html) -* [files](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.File.html) - * [*copy*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileCopyCall.html), [*create*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileCreateCall.html), [*delete*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileDeleteCall.html), [*empty trash*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileEmptyTrashCall.html), [*export*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileExportCall.html), [*generate ids*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileGenerateIdCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileListCall.html), [*update*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileUpdateCall.html) and [*watch*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileWatchCall.html) -* [permissions](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.Permission.html) - * [*create*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.PermissionCreateCall.html), [*delete*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.PermissionDeleteCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.PermissionGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.PermissionListCall.html) and [*update*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.PermissionUpdateCall.html) -* [replies](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.Reply.html) - * [*create*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ReplyCreateCall.html), [*delete*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ReplyDeleteCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ReplyGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ReplyListCall.html) and [*update*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ReplyUpdateCall.html) -* [revisions](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.Revision.html) - * [*delete*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.RevisionDeleteCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.RevisionGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.RevisionListCall.html) and [*update*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.RevisionUpdateCall.html) +* [about](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.About.html) + * [*get*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.AboutGetCall.html) +* [changes](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.Change.html) + * [*get start page token*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ChangeGetStartPageTokenCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ChangeListCall.html) and [*watch*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ChangeWatchCall.html) +* [channels](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.Channel.html) + * [*stop*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ChannelStopCall.html) +* [comments](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.Comment.html) + * [*create*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.CommentCreateCall.html), [*delete*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.CommentDeleteCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.CommentGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.CommentListCall.html) and [*update*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.CommentUpdateCall.html) +* [files](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.File.html) + * [*copy*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileCopyCall.html), [*create*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileCreateCall.html), [*delete*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileDeleteCall.html), [*empty trash*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileEmptyTrashCall.html), [*export*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileExportCall.html), [*generate ids*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileGenerateIdCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileListCall.html), [*update*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileUpdateCall.html) and [*watch*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileWatchCall.html) +* [permissions](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.Permission.html) + * [*create*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.PermissionCreateCall.html), [*delete*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.PermissionDeleteCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.PermissionGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.PermissionListCall.html) and [*update*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.PermissionUpdateCall.html) +* [replies](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.Reply.html) + * [*create*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ReplyCreateCall.html), [*delete*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ReplyDeleteCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ReplyGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ReplyListCall.html) and [*update*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ReplyUpdateCall.html) +* [revisions](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.Revision.html) + * [*delete*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.RevisionDeleteCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.RevisionGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.RevisionListCall.html) and [*update*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.RevisionUpdateCall.html) +* teamdrives + * [*create*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.TeamdriveCreateCall.html), [*delete*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.TeamdriveDeleteCall.html), [*get*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.TeamdriveGetCall.html), [*list*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.TeamdriveListCall.html) and [*update*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.TeamdriveUpdateCall.html) Upload supported by ... -* [*update files*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileUpdateCall.html) -* [*create files*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileCreateCall.html) +* [*update files*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileUpdateCall.html) +* [*create files*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileCreateCall.html) Download supported by ... -* [*watch files*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileWatchCall.html) -* [*export files*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileExportCall.html) -* [*get revisions*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.RevisionGetCall.html) -* [*get files*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileGetCall.html) +* [*watch files*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileWatchCall.html) +* [*export files*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileExportCall.html) +* [*get revisions*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.RevisionGetCall.html) +* [*get files*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileGetCall.html) Subscription supported by ... -* [*watch changes*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ChangeWatchCall.html) -* [*watch files*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileWatchCall.html) -* [*list changes*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.ChangeListCall.html) -* [*create files*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileCreateCall.html) -* [*get files*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.FileGetCall.html) +* [*watch files*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileWatchCall.html) +* [*watch changes*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ChangeWatchCall.html) +* [*list changes*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.ChangeListCall.html) +* [*create files*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileCreateCall.html) +* [*get files*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.FileGetCall.html) @@ -57,17 +59,17 @@ Subscription supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/struct.Drive.html)** +* **[Hub](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/struct.Drive.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.Part.html)** + * **[Parts](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -115,9 +117,7 @@ google-drive3 = "*" extern crate hyper; extern crate yup_oauth2 as oauth2; extern crate google_drive3 as drive3; -use drive3::File; use drive3::{Result, Error}; -use std::fs; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use drive3::Drive; @@ -134,21 +134,21 @@ let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::new(), ::default(), None); let mut hub = Drive::new(hyper::Client::new(), 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 = File::default(); - // You can configure optional parameters by calling the respective setters at will, and -// execute the final call using `upload_resumable(...)`. +// execute the final call using `doit()`. // Values shown here are possibly random and not representative ! -let result = hub.files().update(req, "fileId") - .use_content_as_indexable_text(true) - .remove_parents("Stet") - .ocr_language("sed") - .keep_revision_forever(false) - .add_parents("dolores") - .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); +let result = hub.files().list() + .team_drive_id("eirmod") + .supports_team_drives(true) + .spaces("Stet") + .q("sed") + .page_token("et") + .page_size(-18) + .order_by("kasd") + .include_team_drive_items(true) + .corpus("takimata") + .corpora("justo") + .doit(); match result { Err(e) => match e { @@ -170,17 +170,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.Delegate.html), 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-drive3/1.0.4+20161212/google_drive3/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.ResponseResult.html), 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")`. @@ -190,29 +190,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.CallBuilder.html) 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-drive3/1.0.4+20161212/google_drive3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.RequestValue.html) and -[decodable](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.RequestValue.html) and +[decodable](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-drive3/1.0.4+20161212/google_drive3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.CallBuilder.html), 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-drive3/1.0.4+20161212/google_drive3/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-drive3/1.0.4+20170512/google_drive3/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/drive3/src/lib.rs b/gen/drive3/src/lib.rs index 28addde23c..55bc87dd22 100644 --- a/gen/drive3/src/lib.rs +++ b/gen/drive3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *drive* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *drive* crate version *1.0.4+20170512*, where *20170512* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *drive* *v3* API can be found at the //! [official documentation site](https://developers.google.com/drive/). @@ -27,6 +27,8 @@ //! * [*create*](struct.ReplyCreateCall.html), [*delete*](struct.ReplyDeleteCall.html), [*get*](struct.ReplyGetCall.html), [*list*](struct.ReplyListCall.html) and [*update*](struct.ReplyUpdateCall.html) //! * [revisions](struct.Revision.html) //! * [*delete*](struct.RevisionDeleteCall.html), [*get*](struct.RevisionGetCall.html), [*list*](struct.RevisionListCall.html) and [*update*](struct.RevisionUpdateCall.html) +//! * teamdrives +//! * [*create*](struct.TeamdriveCreateCall.html), [*delete*](struct.TeamdriveDeleteCall.html), [*get*](struct.TeamdriveGetCall.html), [*list*](struct.TeamdriveListCall.html) and [*update*](struct.TeamdriveUpdateCall.html) //! //! //! Upload supported by ... @@ -43,8 +45,8 @@ //! //! Subscription supported by ... //! -//! * [*watch changes*](struct.ChangeWatchCall.html) //! * [*watch files*](struct.FileWatchCall.html) +//! * [*watch changes*](struct.ChangeWatchCall.html) //! * [*list changes*](struct.ChangeListCall.html) //! * [*create files*](struct.FileCreateCall.html) //! * [*get files*](struct.FileGetCall.html) @@ -115,9 +117,7 @@ //! extern crate hyper; //! extern crate yup_oauth2 as oauth2; //! extern crate google_drive3 as drive3; -//! use drive3::File; //! use drive3::{Result, Error}; -//! use std::fs; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -135,21 +135,21 @@ //! hyper::Client::new(), //! ::default(), None); //! let mut hub = Drive::new(hyper::Client::new(), 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 = File::default(); -//! //! // You can configure optional parameters by calling the respective setters at will, and -//! // execute the final call using `upload_resumable(...)`. +//! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! -//! let result = hub.files().update(req, "fileId") -//! .use_content_as_indexable_text(true) -//! .remove_parents("takimata") -//! .ocr_language("justo") -//! .keep_revision_forever(true) -//! .add_parents("erat") -//! .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); +//! let result = hub.files().list() +//! .team_drive_id("amet.") +//! .supports_team_drives(false) +//! .spaces("labore") +//! .q("sea") +//! .page_token("nonumy") +//! .page_size(-19) +//! .order_by("gubergren") +//! .include_team_drive_items(false) +//! .corpus("aliquyam") +//! .corpora("ea") +//! .doit(); //! //! match result { //! Err(e) => match e { @@ -332,9 +332,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate yup_oauth2 as oauth2; /// extern crate google_drive3 as drive3; -/// use drive3::File; /// use drive3::{Result, Error}; -/// use std::fs; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -352,21 +350,21 @@ impl Default for Scope { /// hyper::Client::new(), /// ::default(), None); /// let mut hub = Drive::new(hyper::Client::new(), 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 = File::default(); -/// /// // You can configure optional parameters by calling the respective setters at will, and -/// // execute the final call using `upload_resumable(...)`. +/// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! -/// let result = hub.files().update(req, "fileId") -/// .use_content_as_indexable_text(true) -/// .remove_parents("nonumy") -/// .ocr_language("dolores") -/// .keep_revision_forever(false) -/// .add_parents("sadipscing") -/// .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); +/// let result = hub.files().list() +/// .team_drive_id("no") +/// .supports_team_drives(true) +/// .spaces("justo") +/// .q("et") +/// .page_token("et") +/// .page_size(-41) +/// .order_by("ipsum") +/// .include_team_drive_items(true) +/// .corpus("et") +/// .corpora("duo") +/// .doit(); /// /// match result { /// Err(e) => match e { @@ -429,6 +427,9 @@ impl<'a, C, A> Drive pub fn revisions(&'a self) -> RevisionMethods<'a, C, A> { RevisionMethods { hub: &self } } + pub fn teamdrives(&'a self) -> TeamdriveMethods<'a, C, A> { + TeamdriveMethods { hub: &self } + } /// Set the user-agent header field to use in all requests to the server. /// It defaults to `google-api-rust-client/1.0.4`. @@ -511,6 +512,9 @@ pub struct About { /// A map of source MIME type to possible targets for all supported exports. #[serde(rename="exportFormats")] pub export_formats: Option>>, + /// A list of themes that are supported for Team Drives. + #[serde(rename="teamDriveThemes")] + pub team_drive_themes: Option>, /// A map of maximum import sizes by MIME type, in bytes. #[serde(rename="maxImportSizes")] pub max_import_sizes: Option>, @@ -536,21 +540,128 @@ pub struct About { impl ResponseResult for About {} -/// Additional information about the content of the file. These fields are never populated in responses. +/// Details of whether the permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FileContentHints { - /// Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. - #[serde(rename="indexableText")] - pub indexable_text: Option, - /// A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail. - pub thumbnail: Option, +pub struct PermissionTeamDrivePermissionDetails { + /// Whether this permission is inherited. This field is always populated. This is an output-only field. + pub inherited: Option, + /// The Team Drive permission type for this user. While new values may be added in future, the following are currently possible: + /// - file + /// - member + #[serde(rename="teamDrivePermissionType")] + pub team_drive_permission_type: Option, + /// The primary role for this user. While new values may be added in the future, the following are currently possible: + /// - organizer + /// - writer + /// - commenter + /// - reader + pub role: Option, + /// The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive. + #[serde(rename="inheritedFrom")] + pub inherited_from: Option, } -impl NestedType for FileContentHints {} -impl Part for FileContentHints {} +impl NestedType for PermissionTeamDrivePermissionDetails {} +impl Part for PermissionTeamDrivePermissionDetails {} + + +/// A list of themes that are supported for Team Drives. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AboutTeamDriveThemes { + /// The color of this Team Drive theme as an RGB hex string. + #[serde(rename="colorRgb")] + pub color_rgb: Option, + /// A link to this Team Drive theme's background image. + #[serde(rename="backgroundImageLink")] + pub background_image_link: Option, + /// The ID of the theme. + pub id: Option, +} + +impl NestedType for AboutTeamDriveThemes {} +impl Part for AboutTeamDriveThemes {} + + +/// Capabilities the current user has on this Team Drive. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TeamDriveCapabilities { + /// Whether the current user can read the revisions resource of files in this Team Drive. + #[serde(rename="canReadRevisions")] + pub can_read_revisions: Option, + /// Whether the current user can copy files in this Team Drive. + #[serde(rename="canCopy")] + pub can_copy: Option, + /// Whether the current user can edit files in this Team Drive + #[serde(rename="canEdit")] + pub can_edit: Option, + /// Whether the current user can add children to folders in this Team Drive. + #[serde(rename="canAddChildren")] + pub can_add_children: Option, + /// Whether the current user can share files or folders in this Team Drive. + #[serde(rename="canShare")] + pub can_share: Option, + /// Whether the current user can add members to this Team Drive or remove them or change their role. + #[serde(rename="canManageMembers")] + pub can_manage_members: Option, + /// Whether the current user can download files in this Team Drive. + #[serde(rename="canDownload")] + pub can_download: Option, + /// Whether the current user can comment on files in this Team Drive. + #[serde(rename="canComment")] + pub can_comment: Option, + /// Whether the current user can change the background of this Team Drive. + #[serde(rename="canChangeTeamDriveBackground")] + pub can_change_team_drive_background: Option, + /// Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive. + #[serde(rename="canDeleteTeamDrive")] + pub can_delete_team_drive: Option, + /// Whether the current user can rename this Team Drive. + #[serde(rename="canRenameTeamDrive")] + pub can_rename_team_drive: Option, + /// Whether the current user can remove children from folders in this Team Drive. + #[serde(rename="canRemoveChildren")] + pub can_remove_children: Option, + /// Whether the current user can list the children of folders in this Team Drive. + #[serde(rename="canListChildren")] + pub can_list_children: Option, + /// Whether the current user can rename files or folders in this Team Drive. + #[serde(rename="canRename")] + pub can_rename: Option, +} + +impl NestedType for TeamDriveCapabilities {} +impl Part for TeamDriveCapabilities {} + + +/// An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TeamDriveBackgroundImageFile { + /// The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high. + pub width: Option, + /// The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image. + #[serde(rename="yCoordinate")] + pub y_coordinate: Option, + /// The ID of an image file in Drive to use for the background image. + pub id: Option, + /// The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image. + #[serde(rename="xCoordinate")] + pub x_coordinate: Option, +} + +impl NestedType for TeamDriveBackgroundImageFile {} +impl Part for TeamDriveBackgroundImageFile {} /// A list of changes for a user. @@ -564,12 +675,12 @@ impl Part for FileContentHints {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChangeList { - /// The page token for the next page of changes. This will be absent if the end of the current changes list has been reached. + /// The page token for the next page of changes. This will be absent if the end of the changes list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// Identifies what kind of resource this is. Value: the fixed string "drive#changeList". pub kind: Option, - /// The page of changes. + /// The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. pub changes: Option>, /// The starting page token for future changes. This will be present only if the end of the current changes list has been reached. #[serde(rename="newStartPageToken")] @@ -590,12 +701,12 @@ impl ResponseResult for ChangeList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReplyList { - /// The page token for the next page of replies. This will be absent if the end of the replies list has been reached. + /// The page token for the next page of replies. This will be absent if the end of the replies list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// Identifies what kind of resource this is. Value: the fixed string "drive#replyList". pub kind: Option, - /// The page of replies. + /// The list of replies. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. pub replies: Option>, } @@ -697,12 +808,12 @@ impl Part for FileImageMediaMetadata {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RevisionList { - /// The page token for the next page of revisions. This will be absent if the end of the revisions list has been reached. + /// The page token for the next page of revisions. This will be absent if the end of the revisions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// Identifies what kind of resource this is. Value: the fixed string "drive#revisionList". pub kind: Option, - /// The full list of revisions. + /// The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. pub revisions: Option>, } @@ -898,18 +1009,35 @@ impl ResponseResult for Revision {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentList { - /// The page token for the next page of comments. This will be absent if the end of the comments list has been reached. + /// The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// Identifies what kind of resource this is. Value: the fixed string "drive#commentList". pub kind: Option, - /// The page of comments. + /// The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. pub comments: Option>, } impl ResponseResult for CommentList {} +/// Additional information about the content of the file. These fields are never populated in responses. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileContentHints { + /// Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. + #[serde(rename="indexableText")] + pub indexable_text: Option, + /// A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail. + pub thumbnail: Option, +} + +impl NestedType for FileContentHints {} +impl Part for FileContentHints {} + + /// Geographic location information stored in the image. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -951,23 +1079,32 @@ pub struct Permission { /// Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. #[serde(rename="allowFileDiscovery")] pub allow_file_discovery: Option, + /// Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. + pub deleted: Option, /// Identifies what kind of resource this is. Value: the fixed string "drive#permission". pub kind: Option, - /// The email address of the user or group to which this permission refers. - #[serde(rename="emailAddress")] - pub email_address: Option, + /// Details of whether the permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items. + #[serde(rename="teamDrivePermissionDetails")] + pub team_drive_permission_details: Option>, /// A link to the user's profile photo, if available. #[serde(rename="photoLink")] pub photo_link: Option, - /// The role granted by this permission. Valid values are: + /// The email address of the user or group to which this permission refers. + #[serde(rename="emailAddress")] + pub email_address: Option, + /// The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: + /// - They can only be set on user and group permissions + /// - The time must be in the future + /// - The time cannot be more than a year in the future + #[serde(rename="expirationTime")] + pub expiration_time: Option, + /// The role granted by this permission. While new values may be supported in the future, the following are currently allowed: + /// - organizer /// - owner /// - writer /// - commenter /// - reader pub role: Option, - /// The time at which this permission will expire (RFC 3339 date-time). - #[serde(rename="expirationTime")] - pub expiration_time: Option, /// The type of the grantee. Valid values are: /// - user /// - group @@ -984,33 +1121,88 @@ impl Resource for Permission {} impl ResponseResult for Permission {} -/// Capabilities the current user has on the file. +/// Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FileCapabilities { - /// Whether the current user has read access to the Revisions resource of the file. + /// Whether the current user can read the revisions resource of this file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read. #[serde(rename="canReadRevisions")] pub can_read_revisions: Option, - /// Whether the user can copy the file. + /// Whether the current user can restore this file from trash. + #[serde(rename="canUntrash")] + pub can_untrash: Option, + /// Whether the current user can copy this file. For a Team Drive item, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder. #[serde(rename="canCopy")] pub can_copy: Option, - /// Whether the user can modify the file's permissions and sharing settings. - #[serde(rename="canShare")] - pub can_share: Option, - /// Whether the user can edit the file's content. - #[serde(rename="canEdit")] - pub can_edit: Option, - /// Whether the user can comment on the file. + /// Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem. + #[serde(rename="canMoveItemIntoTeamDrive")] + pub can_move_item_into_team_drive: Option, + /// Whether the current user can comment on this file. #[serde(rename="canComment")] pub can_comment: Option, + /// Whether the current user can list the children of this folder. This is always false when the item is not a folder. + #[serde(rename="canListChildren")] + pub can_list_children: Option, + /// Whether the current user can rename this file. + #[serde(rename="canRename")] + pub can_rename: Option, + /// Whether the current user can move this file to trash. + #[serde(rename="canTrash")] + pub can_trash: Option, + /// Whether the current user can delete this file. + #[serde(rename="canDelete")] + pub can_delete: Option, + /// Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files. + #[serde(rename="canMoveTeamDriveItem")] + pub can_move_team_drive_item: Option, + /// Whether the current user can add children to this folder. This is always false when the item is not a folder. + #[serde(rename="canAddChildren")] + pub can_add_children: Option, + /// Whether the current user can modify the sharing settings for this file. + #[serde(rename="canShare")] + pub can_share: Option, + /// Whether the current user can download this file. + #[serde(rename="canDownload")] + pub can_download: Option, + /// Whether the current user can change whether viewers can copy the contents of this file. + #[serde(rename="canChangeViewersCanCopyContent")] + pub can_change_viewers_can_copy_content: Option, + /// Whether the current user can remove children from this folder. This is always false when the item is not a folder. + #[serde(rename="canRemoveChildren")] + pub can_remove_children: Option, + /// Whether the current user can read the Team Drive to which this file belongs. Only populated for Team Drive files. + #[serde(rename="canReadTeamDrive")] + pub can_read_team_drive: Option, + /// Whether the current user can edit this file. + #[serde(rename="canEdit")] + pub can_edit: Option, } impl NestedType for FileCapabilities {} impl Part for FileCapabilities {} +/// Additional metadata about video media. This may not be available immediately upon upload. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileVideoMediaMetadata { + /// The width of the video in pixels. + pub width: Option, + /// The duration of the video in milliseconds. + #[serde(rename="durationMillis")] + pub duration_millis: Option, + /// The height of the video in pixels. + pub height: Option, +} + +impl NestedType for FileVideoMediaMetadata {} +impl Part for FileVideoMediaMetadata {} + + /// The user's storage quota limits and usage. All fields are measured in bytes. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1044,18 +1236,61 @@ impl Part for AboutStorageQuota {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FileList { - /// The page of files. + /// The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. pub files: Option>, - /// The page token for the next page of files. This will be absent if the end of the files list has been reached. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, + /// Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple Team Drives with the "user,allTeamDrives" corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as "user" or "teamDrive". + #[serde(rename="incompleteSearch")] + pub incomplete_search: Option, /// Identifies what kind of resource this is. Value: the fixed string "drive#fileList". pub kind: Option, + /// The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, } impl ResponseResult for FileList {} +/// Representation of a Team Drive. +/// +/// # 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*). +/// +/// * [get teamdrives](struct.TeamdriveGetCall.html) (response) +/// * [create teamdrives](struct.TeamdriveCreateCall.html) (request|response) +/// * [update teamdrives](struct.TeamdriveUpdateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TeamDrive { + /// Identifies what kind of resource this is. Value: the fixed string "drive#teamDrive". + pub kind: Option, + /// A short-lived link to this Team Drive's background image. + #[serde(rename="backgroundImageLink")] + pub background_image_link: Option, + /// The name of this Team Drive. + pub name: Option, + /// The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. + #[serde(rename="themeId")] + pub theme_id: Option, + /// The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId. + #[serde(rename="colorRgb")] + pub color_rgb: Option, + /// Capabilities the current user has on this Team Drive. + pub capabilities: Option, + /// An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set. + #[serde(rename="backgroundImageFile")] + pub background_image_file: Option, + /// The ID of this Team Drive which is also the ID of the top level folder for this Team Drive. + pub id: Option, +} + +impl RequestValue for TeamDrive {} +impl Resource for TeamDrive {} +impl ResponseResult for TeamDrive {} + + /// Information about a Drive user. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1103,7 +1338,7 @@ impl Part for User {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct File { - /// Whether this file has a thumbnail. + /// Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field. #[serde(rename="hasThumbnail")] pub has_thumbnail: Option, /// The MIME type of the file. @@ -1117,7 +1352,7 @@ pub struct File { /// A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. #[serde(rename="thumbnailLink")] pub thumbnail_link: Option, - /// The thumbnail version for use in client-contructable thumbnail URLs or thumbnail cache invalidation. + /// The thumbnail version for use in thumbnail cache invalidation. #[serde(rename="thumbnailVersion")] pub thumbnail_version: Option, /// Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. @@ -1126,10 +1361,10 @@ pub struct File { /// Whether the file was created or opened by the requesting app. #[serde(rename="isAppAuthorized")] pub is_app_authorized: Option, - /// Whether users with only writer permission can modify the file's permissions. + /// Whether users with only writer permission can modify the file's permissions. Not populated for Team Drive files. #[serde(rename="writersCanShare")] pub writers_can_share: Option, - /// Whether the user owns the file. + /// Whether the user owns the file. Not populated for Team Drive files. #[serde(rename="ownedByMe")] pub owned_by_me: Option, /// The last time the file was viewed by the user (RFC 3339 date-time). @@ -1156,8 +1391,11 @@ pub struct File { /// Entries with null values are cleared in update and copy requests. #[serde(rename="appProperties")] pub app_properties: Option>, - /// Capabilities the current user has on the file. + /// Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. pub capabilities: Option, + /// A collection of arbitrary key-value pairs which are visible to all apps. + /// Entries with null values are cleared in update and copy requests. + pub properties: Option>, /// A link for opening the file in a relevant Google editor or viewer in a browser. #[serde(rename="webViewLink")] pub web_view_link: Option, @@ -1169,7 +1407,7 @@ pub struct File { /// The MD5 checksum for the content of the file. This is only applicable to files with binary content in Drive. #[serde(rename="md5Checksum")] pub md5_checksum: Option, - /// Whether the file has been shared. + /// Whether the file has been shared. Not populated for Team Drive files. pub shared: Option, /// A static, unauthenticated link to the file's icon. #[serde(rename="iconLink")] @@ -1204,24 +1442,30 @@ pub struct File { /// The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. #[serde(rename="quotaBytesUsed")] pub quota_bytes_used: Option, - /// A collection of arbitrary key-value pairs which are visible to all apps. - /// Entries with null values are cleared in update and copy requests. - pub properties: Option>, + /// ID of the Team Drive the file resides in. + #[serde(rename="teamDriveId")] + pub team_drive_id: Option, + /// The time that the item was trashed (RFC 3339 date-time). Only populated for Team Drive files. + #[serde(rename="trashedTime")] + pub trashed_time: Option, /// The time at which the file was shared with the user, if applicable (RFC 3339 date-time). #[serde(rename="sharedWithMeTime")] pub shared_with_me_time: Option, - /// The full list of permissions for the file. This is only available if the requesting user can share the file. + /// The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for Team Drive files. pub permissions: Option>, /// Whether users with only reader or commenter permission can copy the file's content. This affects copy, download, and print operations. #[serde(rename="viewersCanCopyContent")] pub viewers_can_copy_content: Option, - /// The owners of the file. Currently, only certain legacy files may have more than one owner. + /// The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for Team Drive files. pub owners: Option>, - /// The name of the file. This is not necessarily unique within a folder. + /// The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of Team Drives, My Drive root folder, and Application Data folder the name is constant. pub name: Option, /// A link for downloading the content of the file in a browser. This is only available for files with binary content in Drive. #[serde(rename="webContentLink")] pub web_content_link: Option, + /// If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files. + #[serde(rename="trashingUser")] + pub trashing_user: Option, /// The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. pub spaces: Option>, /// Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash. @@ -1232,6 +1476,9 @@ pub struct File { /// The final component of fullFileExtension. This is only available for files with binary content in Drive. #[serde(rename="fileExtension")] pub file_extension: Option, + /// Whether any users are granted file access directly on this file. This field is only populated for Team Drive files. + #[serde(rename="hasAugmentedPermissions")] + pub has_augmented_permissions: Option, /// Whether the user has starred the file. pub starred: Option, /// The ID of the file's head revision. This is currently only available for files with binary content in Drive. @@ -1255,32 +1502,40 @@ impl ResponseResult for File {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PermissionList { + /// The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// Identifies what kind of resource this is. Value: the fixed string "drive#permissionList". pub kind: Option, - /// The full list of permissions. + /// The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. pub permissions: Option>, } impl ResponseResult for PermissionList {} -/// Additional metadata about video media. This may not be available immediately upon upload. +/// A list of Team Drives. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [list teamdrives](struct.TeamdriveListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FileVideoMediaMetadata { - /// The width of the video in pixels. - pub width: Option, - /// The duration of the video in milliseconds. - #[serde(rename="durationMillis")] - pub duration_millis: Option, - /// The height of the video in pixels. - pub height: Option, +pub struct TeamDriveList { + /// The page token for the next page of Team Drives. This will be absent if the end of the Team Drives list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// Identifies what kind of resource this is. Value: the fixed string "drive#teamDriveList". + pub kind: Option, + /// The list of Team Drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. + #[serde(rename="teamDrives")] + pub team_drives: Option>, } -impl NestedType for FileVideoMediaMetadata {} -impl Part for FileVideoMediaMetadata {} +impl ResponseResult for TeamDriveList {} /// There is no detailed description. @@ -1304,7 +1559,7 @@ pub struct StartPageToken { impl ResponseResult for StartPageToken {} -/// A change to a file. +/// A change to a file or Team Drive. /// /// # Activities /// @@ -1317,17 +1572,26 @@ impl ResponseResult for StartPageToken {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Change { + /// The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member of the Team Drive, and the Team Drive has not been removed. + #[serde(rename="teamDrive")] + pub team_drive: Option, /// Identifies what kind of resource this is. Value: the fixed string "drive#change". pub kind: Option, - /// Whether the file has been removed from the view of the changes list, for example by deletion or lost access. - pub removed: Option, - /// The ID of the file which has changed. - #[serde(rename="fileId")] - pub file_id: Option, - /// The updated state of the file. Present if the file has not been removed. + /// The updated state of the file. Present if the type is file and the file has not been removed from this list of changes. pub file: Option, /// The time of this change (RFC 3339 date-time). pub time: Option, + /// The ID of the Team Drive associated with this change. + #[serde(rename="teamDriveId")] + pub team_drive_id: Option, + /// Whether the file or Team Drive has been removed from this list of changes, for example by deletion or loss of access. + pub removed: Option, + /// The type of the change. Possible values are file and teamDrive. + #[serde(rename="type")] + pub type_: Option, + /// The ID of the file which has changed. + #[serde(rename="fileId")] + pub file_id: Option, } impl Resource for Change {} @@ -1376,6 +1640,27 @@ impl<'a, C, A> MethodsBuilder for FileMethods<'a, C, A> {} impl<'a, C, A> FileMethods<'a, C, A> { + /// Create a builder to help you perform the following task: + /// + /// Subscribes to changes to a file + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `fileId` - The ID of the file. + pub fn watch(&self, request: Channel, file_id: &str) -> FileWatchCall<'a, C, A> { + FileWatchCall { + hub: self.hub, + _request: request, + _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), + _acknowledge_abuse: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Updates a file's metadata and/or content with patch semantics. @@ -1390,6 +1675,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { _request: request, _file_id: file_id.to_string(), _use_content_as_indexable_text: Default::default(), + _supports_team_drives: Default::default(), _remove_parents: Default::default(), _ocr_language: Default::default(), _keep_revision_forever: Default::default(), @@ -1400,48 +1686,6 @@ impl<'a, C, A> FileMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Subscribes to changes to a file - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `fileId` - The ID of the file. - pub fn watch(&self, request: Channel, file_id: &str) -> FileWatchCall<'a, C, A> { - FileWatchCall { - hub: self.hub, - _request: request, - _file_id: file_id.to_string(), - _acknowledge_abuse: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Creates a copy of a file and applies any requested updates with patch semantics. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `fileId` - The ID of the file. - pub fn copy(&self, request: File, file_id: &str) -> FileCopyCall<'a, C, A> { - FileCopyCall { - hub: self.hub, - _request: request, - _file_id: file_id.to_string(), - _ocr_language: Default::default(), - _keep_revision_forever: Default::default(), - _ignore_default_visibility: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Exports a Google Doc to the requested MIME type and returns the exported content. @@ -1461,6 +1705,29 @@ impl<'a, C, A> FileMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Creates a copy of a file and applies any requested updates with patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `fileId` - The ID of the file. + pub fn copy(&self, request: File, file_id: &str) -> FileCopyCall<'a, C, A> { + FileCopyCall { + hub: self.hub, + _request: request, + _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), + _ocr_language: Default::default(), + _keep_revision_forever: Default::default(), + _ignore_default_visibility: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Permanently deletes all of the user's trashed files. @@ -1479,12 +1746,16 @@ impl<'a, C, A> FileMethods<'a, C, A> { pub fn list(&self) -> FileListCall<'a, C, A> { FileListCall { hub: self.hub, + _team_drive_id: Default::default(), + _supports_team_drives: Default::default(), _spaces: Default::default(), _q: Default::default(), _page_token: Default::default(), _page_size: Default::default(), _order_by: Default::default(), + _include_team_drive_items: Default::default(), _corpus: Default::default(), + _corpora: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1517,6 +1788,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { hub: self.hub, _request: request, _use_content_as_indexable_text: Default::default(), + _supports_team_drives: Default::default(), _ocr_language: Default::default(), _keep_revision_forever: Default::default(), _ignore_default_visibility: Default::default(), @@ -1528,7 +1800,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Permanently deletes a file owned by the user without moving it to the trash. If the target is a folder, all descendants owned by the user are also deleted. + /// Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a Team Drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted. /// /// # Arguments /// @@ -1537,6 +1809,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { FileDeleteCall { hub: self.hub, _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1554,6 +1827,7 @@ impl<'a, C, A> FileMethods<'a, C, A> { FileGetCall { hub: self.hub, _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), _acknowledge_abuse: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -1564,6 +1838,133 @@ impl<'a, C, A> FileMethods<'a, C, A> { +/// A builder providing access to all methods supported on *teamdrive* resources. +/// It is not used directly, but through the `Drive` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_drive3 as drive3; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use drive3::Drive; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Drive::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `create(...)`, `delete(...)`, `get(...)`, `list(...)` and `update(...)` +/// // to build up your call. +/// let rb = hub.teamdrives(); +/// # } +/// ``` +pub struct TeamdriveMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, +} + +impl<'a, C, A> MethodsBuilder for TeamdriveMethods<'a, C, A> {} + +impl<'a, C, A> TeamdriveMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Gets a Team Drive's metadata by ID. + /// + /// # Arguments + /// + /// * `teamDriveId` - The ID of the Team Drive + pub fn get(&self, team_drive_id: &str) -> TeamdriveGetCall<'a, C, A> { + TeamdriveGetCall { + hub: self.hub, + _team_drive_id: team_drive_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a new Team Drive. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `requestId` - An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned. + pub fn create(&self, request: TeamDrive, request_id: &str) -> TeamdriveCreateCall<'a, C, A> { + TeamdriveCreateCall { + hub: self.hub, + _request: request, + _request_id: request_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists the user's Team Drives. + pub fn list(&self) -> TeamdriveListCall<'a, C, A> { + TeamdriveListCall { + hub: self.hub, + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. + /// + /// # Arguments + /// + /// * `teamDriveId` - The ID of the Team Drive + pub fn delete(&self, team_drive_id: &str) -> TeamdriveDeleteCall<'a, C, A> { + TeamdriveDeleteCall { + hub: self.hub, + _team_drive_id: team_drive_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates a Team Drive's metadata + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `teamDriveId` - The ID of the Team Drive + pub fn update(&self, request: TeamDrive, team_drive_id: &str) -> TeamdriveUpdateCall<'a, C, A> { + TeamdriveUpdateCall { + hub: self.hub, + _request: request, + _team_drive_id: team_drive_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *about* resources. /// It is not used directly, but through the `Drive` hub. /// @@ -1875,27 +2276,6 @@ impl<'a, C, A> ReplyMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Deletes a reply. - /// - /// # Arguments - /// - /// * `fileId` - The ID of the file. - /// * `commentId` - The ID of the comment. - /// * `replyId` - The ID of the reply. - pub fn delete(&self, file_id: &str, comment_id: &str, reply_id: &str) -> ReplyDeleteCall<'a, C, A> { - ReplyDeleteCall { - hub: self.hub, - _file_id: file_id.to_string(), - _comment_id: comment_id.to_string(), - _reply_id: reply_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Lists a comment's replies. @@ -1940,6 +2320,27 @@ impl<'a, C, A> ReplyMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Deletes a reply. + /// + /// # Arguments + /// + /// * `fileId` - The ID of the file. + /// * `commentId` - The ID of the comment. + /// * `replyId` - The ID of the reply. + pub fn delete(&self, file_id: &str, comment_id: &str, reply_id: &str) -> ReplyDeleteCall<'a, C, A> { + ReplyDeleteCall { + hub: self.hub, + _file_id: file_id.to_string(), + _comment_id: comment_id.to_string(), + _reply_id: reply_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Updates a reply with patch semantics. @@ -2124,12 +2525,39 @@ impl<'a, C, A> MethodsBuilder for ChangeMethods<'a, C, A> {} impl<'a, C, A> ChangeMethods<'a, C, A> { + /// Create a builder to help you perform the following task: + /// + /// Lists the changes for a user or Team Drive. + /// + /// # Arguments + /// + /// * `pageToken` - The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. + pub fn list(&self, page_token: &str) -> ChangeListCall<'a, C, A> { + ChangeListCall { + hub: self.hub, + _page_token: page_token.to_string(), + _team_drive_id: Default::default(), + _supports_team_drives: Default::default(), + _spaces: Default::default(), + _restrict_to_my_drive: Default::default(), + _page_size: Default::default(), + _include_team_drive_items: Default::default(), + _include_removed: Default::default(), + _include_corpus_removals: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Gets the starting pageToken for listing future changes. pub fn get_start_page_token(&self) -> ChangeGetStartPageTokenCall<'a, C, A> { ChangeGetStartPageTokenCall { hub: self.hub, + _team_drive_id: Default::default(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2149,31 +2577,14 @@ impl<'a, C, A> ChangeMethods<'a, C, A> { hub: self.hub, _request: request, _page_token: page_token.to_string(), + _team_drive_id: Default::default(), + _supports_team_drives: Default::default(), _spaces: Default::default(), _restrict_to_my_drive: Default::default(), _page_size: Default::default(), + _include_team_drive_items: Default::default(), _include_removed: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Lists changes for a user. - /// - /// # Arguments - /// - /// * `pageToken` - The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. - pub fn list(&self, page_token: &str) -> ChangeListCall<'a, C, A> { - ChangeListCall { - hub: self.hub, - _page_token: page_token.to_string(), - _spaces: Default::default(), - _restrict_to_my_drive: Default::default(), - _page_size: Default::default(), - _include_removed: Default::default(), + _include_corpus_removals: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2227,30 +2638,14 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// /// # Arguments /// - /// * `fileId` - The ID of the file. + /// * `fileId` - The ID of the file or Team Drive. /// * `permissionId` - The ID of the permission. pub fn delete(&self, file_id: &str, permission_id: &str) -> PermissionDeleteCall<'a, C, A> { PermissionDeleteCall { hub: self.hub, _file_id: file_id.to_string(), _permission_id: permission_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Lists a file's permissions. - /// - /// # Arguments - /// - /// * `fileId` - The ID of the file. - pub fn list(&self, file_id: &str) -> PermissionListCall<'a, C, A> { - PermissionListCall { - hub: self.hub, - _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2264,7 +2659,7 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `fileId` - The ID of the file. + /// * `fileId` - The ID of the file or Team Drive. /// * `permissionId` - The ID of the permission. pub fn update(&self, request: Permission, file_id: &str, permission_id: &str) -> PermissionUpdateCall<'a, C, A> { PermissionUpdateCall { @@ -2273,6 +2668,7 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { _file_id: file_id.to_string(), _permission_id: permission_id.to_string(), _transfer_ownership: Default::default(), + _supports_team_drives: Default::default(), _remove_expiration: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -2280,6 +2676,26 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Lists a file's or Team Drive's permissions. + /// + /// # Arguments + /// + /// * `fileId` - The ID of the file or Team Drive. + pub fn list(&self, file_id: &str) -> PermissionListCall<'a, C, A> { + PermissionListCall { + hub: self.hub, + _file_id: file_id.to_string(), + _supports_team_drives: Default::default(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Gets a permission by ID. @@ -2293,6 +2709,7 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { hub: self.hub, _file_id: file_id.to_string(), _permission_id: permission_id.to_string(), + _supports_team_drives: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2301,18 +2718,19 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a permission for a file. + /// Creates a permission for a file or Team Drive. /// /// # Arguments /// /// * `request` - No description provided. - /// * `fileId` - The ID of the file. + /// * `fileId` - The ID of the file or Team Drive. pub fn create(&self, request: Permission, file_id: &str) -> PermissionCreateCall<'a, C, A> { PermissionCreateCall { hub: self.hub, _request: request, _file_id: file_id.to_string(), _transfer_ownership: Default::default(), + _supports_team_drives: Default::default(), _send_notification_email: Default::default(), _email_message: Default::default(), _delegate: Default::default(), @@ -2330,6 +2748,317 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { // CallBuilders ### // ################# +/// Subscribes to changes to a file +/// +/// This method supports **media download**. To enable it, adjust the builder like this: +/// `.param("alt", "media")`. +/// Please note that due to missing multi-part support on the server side, you will only receive the media, +/// but not the `Channel` structure that you would usually get. The latter will be a default value. +/// +/// A builder for the *watch* method supported by a *file* resource. +/// It is not used directly, but through a `FileMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// use drive3::Channel; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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 = Channel::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.files().watch(req, "fileId") +/// .supports_team_drives(true) +/// .acknowledge_abuse(false) +/// .doit(); +/// # } +/// ``` +pub struct FileWatchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _request: Channel, + _file_id: String, + _supports_team_drives: Option, + _acknowledge_abuse: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for FileWatchCall<'a, C, A> {} + +impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.files.watch", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("fileId", self._file_id.to_string())); + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + if let Some(value) = self._acknowledge_abuse { + params.push(("acknowledgeAbuse", value.to_string())); + } + for &field in ["fileId", "supportsTeamDrives", "acknowledgeAbuse"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + let (json_field_missing, enable_resource_parsing) = { + let mut enable = true; + let mut field_present = true; + for &(name, ref value) in params.iter() { + if name == "alt" { + field_present = false; + if >::as_ref(&value) != "json" { + enable = false; + } + break; + } + } + (field_present, enable) + }; + if json_field_missing { + params.push(("alt", "json".to_string())); + } + + let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/watch".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["fileId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = if enable_resource_parsing { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + } else { (res, Default::default()) }; + + 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: Channel) -> FileWatchCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the file. + /// + /// Sets the *file id* 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 file_id(mut self, new_value: &str) -> FileWatchCall<'a, C, A> { + self._file_id = new_value.to_string(); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileWatchCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } + /// Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. + /// + /// Sets the *acknowledge abuse* query property to the given value. + pub fn acknowledge_abuse(mut self, new_value: bool) -> FileWatchCall<'a, C, A> { + self._acknowledge_abuse = 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. + /// + /// 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 Delegate) -> FileWatchCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> FileWatchCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> FileWatchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Updates a file's metadata and/or content with patch semantics. /// /// A builder for the *update* method supported by a *file* resource. @@ -2365,10 +3094,11 @@ impl<'a, C, A> PermissionMethods<'a, C, A> { /// // Values shown here are possibly random and not representative ! /// let result = hub.files().update(req, "fileId") /// .use_content_as_indexable_text(false) -/// .remove_parents("no") -/// .ocr_language("justo") +/// .supports_team_drives(false) +/// .remove_parents("dolor") +/// .ocr_language("eirmod") /// .keep_revision_forever(true) -/// .add_parents("et") +/// .add_parents("amet") /// .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); /// # } /// ``` @@ -2379,6 +3109,7 @@ pub struct FileUpdateCall<'a, C, A> _request: File, _file_id: String, _use_content_as_indexable_text: Option, + _supports_team_drives: Option, _remove_parents: Option, _ocr_language: Option, _keep_revision_forever: Option, @@ -2405,11 +3136,14 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa }; dlg.begin(MethodInfo { id: "drive.files.update", http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((10 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); if let Some(value) = self._use_content_as_indexable_text { params.push(("useContentAsIndexableText", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._remove_parents { params.push(("removeParents", value.to_string())); } @@ -2422,7 +3156,7 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa if let Some(value) = self._add_parents { params.push(("addParents", value.to_string())); } - for &field in ["alt", "fileId", "useContentAsIndexableText", "removeParents", "ocrLanguage", "keepRevisionForever", "addParents"].iter() { + for &field in ["alt", "fileId", "useContentAsIndexableText", "supportsTeamDrives", "removeParents", "ocrLanguage", "keepRevisionForever", "addParents"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2690,6 +3424,13 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa self._use_content_as_indexable_text = Some(new_value); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileUpdateCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// A comma-separated list of parent IDs to remove. /// /// Sets the *remove parents* query property to the given value. @@ -2770,607 +3511,6 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa } -/// Subscribes to changes to a file -/// -/// This method supports **media download**. To enable it, adjust the builder like this: -/// `.param("alt", "media")`. -/// Please note that due to missing multi-part support on the server side, you will only receive the media, -/// but not the `Channel` structure that you would usually get. The latter will be a default value. -/// -/// A builder for the *watch* method supported by a *file* resource. -/// It is not used directly, but through a `FileMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_drive3 as drive3; -/// use drive3::Channel; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use drive3::Drive; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Drive::new(hyper::Client::new(), 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 = Channel::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.files().watch(req, "fileId") -/// .acknowledge_abuse(true) -/// .doit(); -/// # } -/// ``` -pub struct FileWatchCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Drive, - _request: Channel, - _file_id: String, - _acknowledge_abuse: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for FileWatchCall<'a, C, A> {} - -impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "drive.files.watch", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("fileId", self._file_id.to_string())); - if let Some(value) = self._acknowledge_abuse { - params.push(("acknowledgeAbuse", value.to_string())); - } - for &field in ["fileId", "acknowledgeAbuse"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - let (json_field_missing, enable_resource_parsing) = { - let mut enable = true; - let mut field_present = true; - for &(name, ref value) in params.iter() { - if name == "alt" { - field_present = false; - if >::as_ref(&value) != "json" { - enable = false; - } - break; - } - } - (field_present, enable) - }; - if json_field_missing { - params.push(("alt", "json".to_string())); - } - - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/watch".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["fileId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = if enable_resource_parsing { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - } else { (res, Default::default()) }; - - 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: Channel) -> FileWatchCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the file. - /// - /// Sets the *file id* 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 file_id(mut self, new_value: &str) -> FileWatchCall<'a, C, A> { - self._file_id = new_value.to_string(); - self - } - /// Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. - /// - /// Sets the *acknowledge abuse* query property to the given value. - pub fn acknowledge_abuse(mut self, new_value: bool) -> FileWatchCall<'a, C, A> { - self._acknowledge_abuse = 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. - /// - /// 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 Delegate) -> FileWatchCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> FileWatchCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> FileWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Creates a copy of a file and applies any requested updates with patch semantics. -/// -/// A builder for the *copy* method supported by a *file* resource. -/// It is not used directly, but through a `FileMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_drive3 as drive3; -/// use drive3::File; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use drive3::Drive; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Drive::new(hyper::Client::new(), 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 = File::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.files().copy(req, "fileId") -/// .ocr_language("Lorem") -/// .keep_revision_forever(true) -/// .ignore_default_visibility(false) -/// .doit(); -/// # } -/// ``` -pub struct FileCopyCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Drive, - _request: File, - _file_id: String, - _ocr_language: Option, - _keep_revision_forever: Option, - _ignore_default_visibility: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for FileCopyCall<'a, C, A> {} - -impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "drive.files.copy", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); - params.push(("fileId", self._file_id.to_string())); - if let Some(value) = self._ocr_language { - params.push(("ocrLanguage", value.to_string())); - } - if let Some(value) = self._keep_revision_forever { - params.push(("keepRevisionForever", value.to_string())); - } - if let Some(value) = self._ignore_default_visibility { - params.push(("ignoreDefaultVisibility", value.to_string())); - } - for &field in ["alt", "fileId", "ocrLanguage", "keepRevisionForever", "ignoreDefaultVisibility"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/copy".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["fileId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: File) -> FileCopyCall<'a, C, A> { - self._request = new_value; - self - } - /// The ID of the file. - /// - /// Sets the *file id* 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 file_id(mut self, new_value: &str) -> FileCopyCall<'a, C, A> { - self._file_id = new_value.to_string(); - self - } - /// A language hint for OCR processing during image import (ISO 639-1 code). - /// - /// Sets the *ocr language* query property to the given value. - pub fn ocr_language(mut self, new_value: &str) -> FileCopyCall<'a, C, A> { - self._ocr_language = Some(new_value.to_string()); - self - } - /// Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Drive. - /// - /// Sets the *keep revision forever* query property to the given value. - pub fn keep_revision_forever(mut self, new_value: bool) -> FileCopyCall<'a, C, A> { - self._keep_revision_forever = Some(new_value); - self - } - /// Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. - /// - /// Sets the *ignore default visibility* query property to the given value. - pub fn ignore_default_visibility(mut self, new_value: bool) -> FileCopyCall<'a, C, A> { - self._ignore_default_visibility = 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. - /// - /// 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 Delegate) -> FileCopyCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> FileCopyCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> FileCopyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Exports a Google Doc to the requested MIME type and returns the exported content. /// /// This method supports **media download**. To enable it, adjust the builder like this: @@ -3610,6 +3750,320 @@ impl<'a, C, A> FileExportCall<'a, C, A> where C: BorrowMut, A: oa } +/// Creates a copy of a file and applies any requested updates with patch semantics. +/// +/// A builder for the *copy* method supported by a *file* resource. +/// It is not used directly, but through a `FileMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// use drive3::File; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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 = File::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.files().copy(req, "fileId") +/// .supports_team_drives(true) +/// .ocr_language("invidunt") +/// .keep_revision_forever(false) +/// .ignore_default_visibility(false) +/// .doit(); +/// # } +/// ``` +pub struct FileCopyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _request: File, + _file_id: String, + _supports_team_drives: Option, + _ocr_language: Option, + _keep_revision_forever: Option, + _ignore_default_visibility: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for FileCopyCall<'a, C, A> {} + +impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.files.copy", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + params.push(("fileId", self._file_id.to_string())); + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + if let Some(value) = self._ocr_language { + params.push(("ocrLanguage", value.to_string())); + } + if let Some(value) = self._keep_revision_forever { + params.push(("keepRevisionForever", value.to_string())); + } + if let Some(value) = self._ignore_default_visibility { + params.push(("ignoreDefaultVisibility", value.to_string())); + } + for &field in ["alt", "fileId", "supportsTeamDrives", "ocrLanguage", "keepRevisionForever", "ignoreDefaultVisibility"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/copy".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["fileId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: File) -> FileCopyCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the file. + /// + /// Sets the *file id* 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 file_id(mut self, new_value: &str) -> FileCopyCall<'a, C, A> { + self._file_id = new_value.to_string(); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileCopyCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } + /// A language hint for OCR processing during image import (ISO 639-1 code). + /// + /// Sets the *ocr language* query property to the given value. + pub fn ocr_language(mut self, new_value: &str) -> FileCopyCall<'a, C, A> { + self._ocr_language = Some(new_value.to_string()); + self + } + /// Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Drive. + /// + /// Sets the *keep revision forever* query property to the given value. + pub fn keep_revision_forever(mut self, new_value: bool) -> FileCopyCall<'a, C, A> { + self._keep_revision_forever = Some(new_value); + self + } + /// Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. + /// + /// Sets the *ignore default visibility* query property to the given value. + pub fn ignore_default_visibility(mut self, new_value: bool) -> FileCopyCall<'a, C, A> { + self._ignore_default_visibility = 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. + /// + /// 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 Delegate) -> FileCopyCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> FileCopyCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> FileCopyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Permanently deletes all of the user's trashed files. /// /// A builder for the *emptyTrash* method supported by a *file* resource. @@ -3828,12 +4282,16 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().list() -/// .spaces("Lorem") -/// .q("eos") -/// .page_token("erat") -/// .page_size(-95) -/// .order_by("dolor") -/// .corpus("eirmod") +/// .team_drive_id("Lorem") +/// .supports_team_drives(true) +/// .spaces("et") +/// .q("duo") +/// .page_token("et") +/// .page_size(-40) +/// .order_by("sanctus") +/// .include_team_drive_items(true) +/// .corpus("amet") +/// .corpora("et") /// .doit(); /// # } /// ``` @@ -3841,12 +4299,16 @@ pub struct FileListCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Drive, + _team_drive_id: Option, + _supports_team_drives: Option, _spaces: Option, _q: Option, _page_token: Option, _page_size: Option, _order_by: Option, + _include_team_drive_items: Option, _corpus: Option, + _corpora: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -3868,7 +4330,13 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut }; dlg.begin(MethodInfo { id: "drive.files.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); + if let Some(value) = self._team_drive_id { + params.push(("teamDriveId", value.to_string())); + } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._spaces { params.push(("spaces", value.to_string())); } @@ -3884,10 +4352,16 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut if let Some(value) = self._order_by { params.push(("orderBy", value.to_string())); } + if let Some(value) = self._include_team_drive_items { + params.push(("includeTeamDriveItems", value.to_string())); + } if let Some(value) = self._corpus { params.push(("corpus", value.to_string())); } - for &field in ["alt", "spaces", "q", "pageToken", "pageSize", "orderBy", "corpus"].iter() { + if let Some(value) = self._corpora { + params.push(("corpora", value.to_string())); + } + for &field in ["alt", "teamDriveId", "supportsTeamDrives", "spaces", "q", "pageToken", "pageSize", "orderBy", "includeTeamDriveItems", "corpus", "corpora"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -3981,6 +4455,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// ID of Team Drive to search. + /// + /// Sets the *team drive id* query property to the given value. + pub fn team_drive_id(mut self, new_value: &str) -> FileListCall<'a, C, A> { + self._team_drive_id = Some(new_value.to_string()); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileListCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// A comma-separated list of spaces to query within the corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. /// /// Sets the *spaces* query property to the given value. @@ -4002,7 +4490,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut self._page_token = Some(new_value.to_string()); self } - /// The maximum number of files to return per page. + /// The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> FileListCall<'a, C, A> { @@ -4016,13 +4504,27 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut self._order_by = Some(new_value.to_string()); self } - /// The source of files to list. + /// Whether Team Drive items should be included in results. + /// + /// Sets the *include team drive items* query property to the given value. + pub fn include_team_drive_items(mut self, new_value: bool) -> FileListCall<'a, C, A> { + self._include_team_drive_items = Some(new_value); + self + } + /// The source of files to list. Deprecated: use 'corpora' instead. /// /// Sets the *corpus* query property to the given value. pub fn corpus(mut self, new_value: &str) -> FileListCall<'a, C, A> { self._corpus = Some(new_value.to_string()); self } + /// Comma-separated list of bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with 'user'; all other values must be used in isolation. Prefer 'user' or 'teamDrive' to 'allTeamDrives' for efficiency. + /// + /// Sets the *corpora* query property to the given value. + pub fn corpora(mut self, new_value: &str) -> FileListCall<'a, C, A> { + self._corpora = 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. /// @@ -4102,8 +4604,8 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().generate_ids() -/// .space("elitr") -/// .count(-97) +/// .space("consetetur") +/// .count(-36) /// .doit(); /// # } /// ``` @@ -4335,8 +4837,9 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `upload_resumable(...)`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().create(req) -/// .use_content_as_indexable_text(false) -/// .ocr_language("labore") +/// .use_content_as_indexable_text(true) +/// .supports_team_drives(false) +/// .ocr_language("dolor") /// .keep_revision_forever(true) /// .ignore_default_visibility(true) /// .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); @@ -4348,6 +4851,7 @@ pub struct FileCreateCall<'a, C, A> hub: &'a Drive, _request: File, _use_content_as_indexable_text: Option, + _supports_team_drives: Option, _ocr_language: Option, _keep_revision_forever: Option, _ignore_default_visibility: Option, @@ -4373,10 +4877,13 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa }; dlg.begin(MethodInfo { id: "drive.files.create", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); if let Some(value) = self._use_content_as_indexable_text { params.push(("useContentAsIndexableText", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._ocr_language { params.push(("ocrLanguage", value.to_string())); } @@ -4386,7 +4893,7 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa if let Some(value) = self._ignore_default_visibility { params.push(("ignoreDefaultVisibility", value.to_string())); } - for &field in ["alt", "useContentAsIndexableText", "ocrLanguage", "keepRevisionForever", "ignoreDefaultVisibility"].iter() { + for &field in ["alt", "useContentAsIndexableText", "supportsTeamDrives", "ocrLanguage", "keepRevisionForever", "ignoreDefaultVisibility"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4623,6 +5130,13 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa self._use_content_as_indexable_text = Some(new_value); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileCreateCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// A language hint for OCR processing during image import (ISO 639-1 code). /// /// Sets the *ocr language* query property to the given value. @@ -4696,7 +5210,7 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa } -/// Permanently deletes a file owned by the user without moving it to the trash. If the target is a folder, all descendants owned by the user are also deleted. +/// Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a Team Drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted. /// /// A builder for the *delete* method supported by a *file* resource. /// It is not used directly, but through a `FileMethods` instance. @@ -4723,6 +5237,7 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().delete("fileId") +/// .supports_team_drives(false) /// .doit(); /// # } /// ``` @@ -4731,6 +5246,7 @@ pub struct FileDeleteCall<'a, C, A> hub: &'a Drive, _file_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -4752,9 +5268,12 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa }; dlg.begin(MethodInfo { id: "drive.files.delete", http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); - for &field in ["fileId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["fileId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4868,6 +5387,13 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa self._file_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileDeleteCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -4952,6 +5478,7 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.files().get("fileId") +/// .supports_team_drives(true) /// .acknowledge_abuse(false) /// .doit(); /// # } @@ -4961,6 +5488,7 @@ pub struct FileGetCall<'a, C, A> hub: &'a Drive, _file_id: String, + _supports_team_drives: Option, _acknowledge_abuse: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -4983,12 +5511,15 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth }; dlg.begin(MethodInfo { id: "drive.files.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._acknowledge_abuse { params.push(("acknowledgeAbuse", value.to_string())); } - for &field in ["fileId", "acknowledgeAbuse"].iter() { + for &field in ["fileId", "supportsTeamDrives", "acknowledgeAbuse"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -5129,6 +5660,13 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth self._file_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> FileGetCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. /// /// Sets the *acknowledge abuse* query property to the given value. @@ -5188,6 +5726,1202 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } +/// Gets a Team Drive's metadata by ID. +/// +/// A builder for the *get* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.teamdrives().get("teamDriveId") +/// .doit(); +/// # } +/// ``` +pub struct TeamdriveGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _team_drive_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TeamdriveGetCall<'a, C, A> {} + +impl<'a, C, A> TeamdriveGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TeamDrive)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.teamdrives.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("teamDriveId", self._team_drive_id.to_string())); + for &field in ["alt", "teamDriveId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v3/teamdrives/{teamDriveId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{teamDriveId}", "teamDriveId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["teamDriveId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the Team Drive + /// + /// Sets the *team drive id* 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 team_drive_id(mut self, new_value: &str) -> TeamdriveGetCall<'a, C, A> { + self._team_drive_id = 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. + /// + /// 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 Delegate) -> TeamdriveGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> TeamdriveGetCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Readonly`. + /// + /// 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: T) -> TeamdriveGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates a new Team Drive. +/// +/// A builder for the *create* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// use drive3::TeamDrive; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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 = TeamDrive::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.teamdrives().create(req, "requestId") +/// .doit(); +/// # } +/// ``` +pub struct TeamdriveCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _request: TeamDrive, + _request_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TeamdriveCreateCall<'a, C, A> {} + +impl<'a, C, A> TeamdriveCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TeamDrive)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.teamdrives.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("requestId", self._request_id.to_string())); + for &field in ["alt", "requestId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v3/teamdrives".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: TeamDrive) -> TeamdriveCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned. + /// + /// Sets the *request id* query 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_id(mut self, new_value: &str) -> TeamdriveCreateCall<'a, C, A> { + self._request_id = 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. + /// + /// 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 Delegate) -> TeamdriveCreateCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> TeamdriveCreateCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> TeamdriveCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists the user's Team Drives. +/// +/// A builder for the *list* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.teamdrives().list() +/// .page_token("sit") +/// .page_size(-26) +/// .doit(); +/// # } +/// ``` +pub struct TeamdriveListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TeamdriveListCall<'a, C, A> {} + +impl<'a, C, A> TeamdriveListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TeamDriveList)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.teamdrives.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v3/teamdrives".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Page token for Team Drives. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> TeamdriveListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Maximum number of Team Drives to return. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> TeamdriveListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> TeamdriveListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> TeamdriveListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Readonly`. + /// + /// 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: T) -> TeamdriveListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. +/// +/// A builder for the *delete* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.teamdrives().delete("teamDriveId") +/// .doit(); +/// # } +/// ``` +pub struct TeamdriveDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _team_drive_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TeamdriveDeleteCall<'a, C, A> {} + +impl<'a, C, A> TeamdriveDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.teamdrives.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); + params.push(("teamDriveId", self._team_drive_id.to_string())); + for &field in ["teamDriveId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/drive/v3/teamdrives/{teamDriveId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{teamDriveId}", "teamDriveId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["teamDriveId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the Team Drive + /// + /// Sets the *team drive id* 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 team_drive_id(mut self, new_value: &str) -> TeamdriveDeleteCall<'a, C, A> { + self._team_drive_id = 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. + /// + /// 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 Delegate) -> TeamdriveDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> TeamdriveDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> TeamdriveDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates a Team Drive's metadata +/// +/// A builder for the *update* method supported by a *teamdrive* resource. +/// It is not used directly, but through a `TeamdriveMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// use drive3::TeamDrive; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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 = TeamDrive::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.teamdrives().update(req, "teamDriveId") +/// .doit(); +/// # } +/// ``` +pub struct TeamdriveUpdateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _request: TeamDrive, + _team_drive_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TeamdriveUpdateCall<'a, C, A> {} + +impl<'a, C, A> TeamdriveUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TeamDrive)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.teamdrives.update", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("teamDriveId", self._team_drive_id.to_string())); + for &field in ["alt", "teamDriveId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v3/teamdrives/{teamDriveId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{teamDriveId}", "teamDriveId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["teamDriveId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: TeamDrive) -> TeamdriveUpdateCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the Team Drive + /// + /// Sets the *team drive id* 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 team_drive_id(mut self, new_value: &str) -> TeamdriveUpdateCall<'a, C, A> { + self._team_drive_id = 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. + /// + /// 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 Delegate) -> TeamdriveUpdateCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> TeamdriveUpdateCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> TeamdriveUpdateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Gets information about the user, the user's Drive, and system capabilities. /// /// A builder for the *get* method supported by a *about* resource. @@ -5653,7 +7387,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.comments().get("fileId", "commentId") -/// .include_deleted(true) +/// .include_deleted(false) /// .doit(); /// # } /// ``` @@ -6456,9 +8190,9 @@ impl<'a, C, A> CommentCreateCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.comments().list("fileId") -/// .start_modified_time("et") -/// .page_token("consetetur") -/// .page_size(-36) +/// .start_modified_time("Lorem") +/// .page_token("et") +/// .page_size(-13) /// .include_deleted(true) /// .doit(); /// # } @@ -7212,254 +8946,6 @@ impl<'a, C, A> ReplyCreateCall<'a, C, A> where C: BorrowMut, A: o } -/// Deletes a reply. -/// -/// A builder for the *delete* method supported by a *reply* resource. -/// It is not used directly, but through a `ReplyMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_drive3 as drive3; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use drive3::Drive; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Drive::new(hyper::Client::new(), 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.replies().delete("fileId", "commentId", "replyId") -/// .doit(); -/// # } -/// ``` -pub struct ReplyDeleteCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Drive, - _file_id: String, - _comment_id: String, - _reply_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ReplyDeleteCall<'a, C, A> {} - -impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "drive.replies.delete", - http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("fileId", self._file_id.to_string())); - params.push(("commentId", self._comment_id.to_string())); - params.push(("replyId", self._reply_id.to_string())); - for &field in ["fileId", "commentId", "replyId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{fileId}", "fileId"), ("{commentId}", "commentId"), ("{replyId}", "replyId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(3); - for param_name in ["replyId", "commentId", "fileId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = res; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the file. - /// - /// Sets the *file id* 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 file_id(mut self, new_value: &str) -> ReplyDeleteCall<'a, C, A> { - self._file_id = new_value.to_string(); - self - } - /// The ID of the comment. - /// - /// Sets the *comment id* 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 comment_id(mut self, new_value: &str) -> ReplyDeleteCall<'a, C, A> { - self._comment_id = new_value.to_string(); - self - } - /// The ID of the reply. - /// - /// Sets the *reply id* 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 reply_id(mut self, new_value: &str) -> ReplyDeleteCall<'a, C, A> { - self._reply_id = 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. - /// - /// 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 Delegate) -> ReplyDeleteCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ReplyDeleteCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> ReplyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Lists a comment's replies. /// /// A builder for the *list* method supported by a *reply* resource. @@ -7487,9 +8973,9 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.replies().list("fileId", "commentId") -/// .page_token("voluptua.") -/// .page_size(-56) -/// .include_deleted(true) +/// .page_token("takimata") +/// .page_size(-27) +/// .include_deleted(false) /// .doit(); /// # } /// ``` @@ -7770,7 +9256,7 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.replies().get("fileId", "commentId", "replyId") -/// .include_deleted(true) +/// .include_deleted(false) /// .doit(); /// # } /// ``` @@ -8014,6 +9500,254 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut } +/// Deletes a reply. +/// +/// A builder for the *delete* method supported by a *reply* resource. +/// It is not used directly, but through a `ReplyMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.replies().delete("fileId", "commentId", "replyId") +/// .doit(); +/// # } +/// ``` +pub struct ReplyDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _file_id: String, + _comment_id: String, + _reply_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ReplyDeleteCall<'a, C, A> {} + +impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.replies.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("fileId", self._file_id.to_string())); + params.push(("commentId", self._comment_id.to_string())); + params.push(("replyId", self._reply_id.to_string())); + for &field in ["fileId", "commentId", "replyId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{fileId}", "fileId"), ("{commentId}", "commentId"), ("{replyId}", "replyId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["replyId", "commentId", "fileId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the file. + /// + /// Sets the *file id* 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 file_id(mut self, new_value: &str) -> ReplyDeleteCall<'a, C, A> { + self._file_id = new_value.to_string(); + self + } + /// The ID of the comment. + /// + /// Sets the *comment id* 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 comment_id(mut self, new_value: &str) -> ReplyDeleteCall<'a, C, A> { + self._comment_id = new_value.to_string(); + self + } + /// The ID of the reply. + /// + /// Sets the *reply id* 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 reply_id(mut self, new_value: &str) -> ReplyDeleteCall<'a, C, A> { + self._reply_id = 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. + /// + /// 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 Delegate) -> ReplyDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ReplyDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> ReplyDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Updates a reply with patch semantics. /// /// A builder for the *update* method supported by a *reply* resource. @@ -9125,8 +10859,8 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.revisions().list("fileId") -/// .page_token("et") -/// .page_size(-13) +/// .page_token("sea") +/// .page_size(-85) /// .doit(); /// # } /// ``` @@ -9357,6 +11091,316 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: } +/// Lists the changes for a user or Team Drive. +/// +/// A builder for the *list* method supported by a *change* resource. +/// It is not used directly, but through a `ChangeMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.changes().list("pageToken") +/// .team_drive_id("aliquyam") +/// .supports_team_drives(false) +/// .spaces("sit") +/// .restrict_to_my_drive(true) +/// .page_size(-37) +/// .include_team_drive_items(false) +/// .include_removed(true) +/// .include_corpus_removals(true) +/// .doit(); +/// # } +/// ``` +pub struct ChangeListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _page_token: String, + _team_drive_id: Option, + _supports_team_drives: Option, + _spaces: Option, + _restrict_to_my_drive: Option, + _page_size: Option, + _include_team_drive_items: Option, + _include_removed: Option, + _include_corpus_removals: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ChangeListCall<'a, C, A> {} + +impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeList)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.changes.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + params.push(("pageToken", self._page_token.to_string())); + if let Some(value) = self._team_drive_id { + params.push(("teamDriveId", value.to_string())); + } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + if let Some(value) = self._spaces { + params.push(("spaces", value.to_string())); + } + if let Some(value) = self._restrict_to_my_drive { + params.push(("restrictToMyDrive", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._include_team_drive_items { + params.push(("includeTeamDriveItems", value.to_string())); + } + if let Some(value) = self._include_removed { + params.push(("includeRemoved", value.to_string())); + } + if let Some(value) = self._include_corpus_removals { + params.push(("includeCorpusRemovals", value.to_string())); + } + for &field in ["alt", "pageToken", "teamDriveId", "supportsTeamDrives", "spaces", "restrictToMyDrive", "pageSize", "includeTeamDriveItems", "includeRemoved", "includeCorpusRemovals"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v3/changes".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. + /// + /// Sets the *page token* query 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 page_token(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { + self._page_token = new_value.to_string(); + self + } + /// The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier. + /// + /// Sets the *team drive id* query property to the given value. + pub fn team_drive_id(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { + self._team_drive_id = Some(new_value.to_string()); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } + /// A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. + /// + /// Sets the *spaces* query property to the given value. + pub fn spaces(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { + self._spaces = Some(new_value.to_string()); + self + } + /// Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive. + /// + /// Sets the *restrict to my drive* query property to the given value. + pub fn restrict_to_my_drive(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { + self._restrict_to_my_drive = Some(new_value); + self + } + /// The maximum number of changes to return per page. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ChangeListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// Whether Team Drive files or changes should be included in results. + /// + /// Sets the *include team drive items* query property to the given value. + pub fn include_team_drive_items(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { + self._include_team_drive_items = Some(new_value); + self + } + /// Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. + /// + /// Sets the *include removed* query property to the given value. + pub fn include_removed(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { + self._include_removed = Some(new_value); + self + } + /// Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. + /// + /// Sets the *include corpus removals* query property to the given value. + pub fn include_corpus_removals(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { + self._include_corpus_removals = 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. + /// + /// 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 Delegate) -> ChangeListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ChangeListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::MetadataReadonly`. + /// + /// 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: T) -> ChangeListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Gets the starting pageToken for listing future changes. /// /// A builder for the *getStartPageToken* method supported by a *change* resource. @@ -9384,6 +11428,8 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.changes().get_start_page_token() +/// .team_drive_id("accusam") +/// .supports_team_drives(true) /// .doit(); /// # } /// ``` @@ -9391,6 +11437,8 @@ pub struct ChangeGetStartPageTokenCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Drive, + _team_drive_id: Option, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -9412,8 +11460,14 @@ impl<'a, C, A> ChangeGetStartPageTokenCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((2 + self._additional_params.len())); - for &field in ["alt"].iter() { + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + if let Some(value) = self._team_drive_id { + params.push(("teamDriveId", value.to_string())); + } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "teamDriveId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -9507,6 +11561,20 @@ impl<'a, C, A> ChangeGetStartPageTokenCall<'a, C, A> where C: BorrowMut ChangeGetStartPageTokenCall<'a, C, A> { + self._team_drive_id = Some(new_value.to_string()); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> ChangeGetStartPageTokenCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -9592,10 +11660,14 @@ impl<'a, C, A> ChangeGetStartPageTokenCall<'a, C, A> where C: BorrowMut hub: &'a Drive, _request: Channel, _page_token: String, + _team_drive_id: Option, + _supports_team_drives: Option, _spaces: Option, _restrict_to_my_drive: Option, _page_size: Option, + _include_team_drive_items: Option, _include_removed: Option, + _include_corpus_removals: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -9630,8 +11706,14 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o }; dlg.begin(MethodInfo { id: "drive.changes.watch", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); params.push(("pageToken", self._page_token.to_string())); + if let Some(value) = self._team_drive_id { + params.push(("teamDriveId", value.to_string())); + } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._spaces { params.push(("spaces", value.to_string())); } @@ -9641,10 +11723,16 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o if let Some(value) = self._page_size { params.push(("pageSize", value.to_string())); } + if let Some(value) = self._include_team_drive_items { + params.push(("includeTeamDriveItems", value.to_string())); + } if let Some(value) = self._include_removed { params.push(("includeRemoved", value.to_string())); } - for &field in ["alt", "pageToken", "spaces", "restrictToMyDrive", "pageSize", "includeRemoved"].iter() { + if let Some(value) = self._include_corpus_removals { + params.push(("includeCorpusRemovals", value.to_string())); + } + for &field in ["alt", "pageToken", "teamDriveId", "supportsTeamDrives", "spaces", "restrictToMyDrive", "pageSize", "includeTeamDriveItems", "includeRemoved", "includeCorpusRemovals"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -9772,6 +11860,20 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o self._page_token = new_value.to_string(); self } + /// The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier. + /// + /// Sets the *team drive id* query property to the given value. + pub fn team_drive_id(mut self, new_value: &str) -> ChangeWatchCall<'a, C, A> { + self._team_drive_id = Some(new_value.to_string()); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. /// /// Sets the *spaces* query property to the given value. @@ -9793,13 +11895,27 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o self._page_size = Some(new_value); self } - /// Whether to include changes indicating that items have left the view of the changes list, for example by deletion or lost access. + /// Whether Team Drive files or changes should be included in results. + /// + /// Sets the *include team drive items* query property to the given value. + pub fn include_team_drive_items(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { + self._include_team_drive_items = Some(new_value); + self + } + /// Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. /// /// Sets the *include removed* query property to the given value. pub fn include_removed(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { self._include_removed = Some(new_value); self } + /// Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. + /// + /// Sets the *include corpus removals* query property to the given value. + pub fn include_corpus_removals(mut self, new_value: bool) -> ChangeWatchCall<'a, C, A> { + self._include_corpus_removals = 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. /// @@ -9852,268 +11968,6 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o } -/// Lists changes for a user. -/// -/// A builder for the *list* method supported by a *change* resource. -/// It is not used directly, but through a `ChangeMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_drive3 as drive3; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use drive3::Drive; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Drive::new(hyper::Client::new(), 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.changes().list("pageToken") -/// .spaces("At") -/// .restrict_to_my_drive(false) -/// .page_size(-37) -/// .include_removed(false) -/// .doit(); -/// # } -/// ``` -pub struct ChangeListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Drive, - _page_token: String, - _spaces: Option, - _restrict_to_my_drive: Option, - _page_size: Option, - _include_removed: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ChangeListCall<'a, C, A> {} - -impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeList)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "drive.changes.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); - params.push(("pageToken", self._page_token.to_string())); - if let Some(value) = self._spaces { - params.push(("spaces", value.to_string())); - } - if let Some(value) = self._restrict_to_my_drive { - params.push(("restrictToMyDrive", value.to_string())); - } - if let Some(value) = self._page_size { - params.push(("pageSize", value.to_string())); - } - if let Some(value) = self._include_removed { - params.push(("includeRemoved", value.to_string())); - } - for &field in ["alt", "pageToken", "spaces", "restrictToMyDrive", "pageSize", "includeRemoved"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/drive/v3/changes".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. - /// - /// Sets the *page token* query 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 page_token(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { - self._page_token = new_value.to_string(); - self - } - /// A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'. - /// - /// Sets the *spaces* query property to the given value. - pub fn spaces(mut self, new_value: &str) -> ChangeListCall<'a, C, A> { - self._spaces = Some(new_value.to_string()); - self - } - /// Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive. - /// - /// Sets the *restrict to my drive* query property to the given value. - pub fn restrict_to_my_drive(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { - self._restrict_to_my_drive = Some(new_value); - self - } - /// The maximum number of changes to return per page. - /// - /// Sets the *page size* query property to the given value. - pub fn page_size(mut self, new_value: i32) -> ChangeListCall<'a, C, A> { - self._page_size = Some(new_value); - self - } - /// Whether to include changes indicating that items have left the view of the changes list, for example by deletion or lost access. - /// - /// Sets the *include removed* query property to the given value. - pub fn include_removed(mut self, new_value: bool) -> ChangeListCall<'a, C, A> { - self._include_removed = 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. - /// - /// 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 Delegate) -> ChangeListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ChangeListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::MetadataReadonly`. - /// - /// 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: T) -> ChangeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Deletes a permission. /// /// A builder for the *delete* method supported by a *permission* resource. @@ -10141,6 +11995,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().delete("fileId", "permissionId") +/// .supports_team_drives(true) /// .doit(); /// # } /// ``` @@ -10150,6 +12005,7 @@ pub struct PermissionDeleteCall<'a, C, A> hub: &'a Drive, _file_id: String, _permission_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -10171,10 +12027,13 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, }; dlg.begin(MethodInfo { id: "drive.permissions.delete", http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); params.push(("permissionId", self._permission_id.to_string())); - for &field in ["fileId", "permissionId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["fileId", "permissionId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -10278,7 +12137,7 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, } - /// The ID of the file. + /// The ID of the file or Team Drive. /// /// Sets the *file id* path property to the given value. /// @@ -10298,6 +12157,13 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, self._permission_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionDeleteCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -10350,241 +12216,6 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, } -/// Lists a file's permissions. -/// -/// A builder for the *list* method supported by a *permission* resource. -/// It is not used directly, but through a `PermissionMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_drive3 as drive3; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use drive3::Drive; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Drive::new(hyper::Client::new(), 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.permissions().list("fileId") -/// .doit(); -/// # } -/// ``` -pub struct PermissionListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Drive, - _file_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for PermissionListCall<'a, C, A> {} - -impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, PermissionList)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "drive.permissions.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("fileId", self._file_id.to_string())); - for &field in ["alt", "fileId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/permissions".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["fileId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the file. - /// - /// Sets the *file id* 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 file_id(mut self, new_value: &str) -> PermissionListCall<'a, C, A> { - self._file_id = 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. - /// - /// 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 Delegate) -> PermissionListCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> PermissionListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::MetadataReadonly`. - /// - /// 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: T) -> PermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Updates a permission with patch semantics. /// /// A builder for the *update* method supported by a *permission* resource. @@ -10619,7 +12250,8 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().update(req, "fileId", "permissionId") /// .transfer_ownership(false) -/// .remove_expiration(false) +/// .supports_team_drives(true) +/// .remove_expiration(true) /// .doit(); /// # } /// ``` @@ -10631,6 +12263,7 @@ pub struct PermissionUpdateCall<'a, C, A> _file_id: String, _permission_id: String, _transfer_ownership: Option, + _supports_team_drives: Option, _remove_expiration: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -10653,16 +12286,19 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, }; dlg.begin(MethodInfo { id: "drive.permissions.update", http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); params.push(("permissionId", self._permission_id.to_string())); if let Some(value) = self._transfer_ownership { params.push(("transferOwnership", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._remove_expiration { params.push(("removeExpiration", value.to_string())); } - for &field in ["alt", "fileId", "permissionId", "transferOwnership", "removeExpiration"].iter() { + for &field in ["alt", "fileId", "permissionId", "transferOwnership", "supportsTeamDrives", "removeExpiration"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -10801,7 +12437,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, self._request = new_value; self } - /// The ID of the file. + /// The ID of the file or Team Drive. /// /// Sets the *file id* path property to the given value. /// @@ -10828,6 +12464,13 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, self._transfer_ownership = Some(new_value); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionUpdateCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether to remove the expiration date. /// /// Sets the *remove expiration* query property to the given value. @@ -10887,6 +12530,277 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, } +/// Lists a file's or Team Drive's permissions. +/// +/// A builder for the *list* method supported by a *permission* resource. +/// It is not used directly, but through a `PermissionMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_drive3 as drive3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use drive3::Drive; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Drive::new(hyper::Client::new(), 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.permissions().list("fileId") +/// .supports_team_drives(false) +/// .page_token("rebum.") +/// .page_size(-51) +/// .doit(); +/// # } +/// ``` +pub struct PermissionListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Drive, + _file_id: String, + _supports_team_drives: Option, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for PermissionListCall<'a, C, A> {} + +impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, PermissionList)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "drive.permissions.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("fileId", self._file_id.to_string())); + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "fileId", "supportsTeamDrives", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/permissions".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["fileId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the file or Team Drive. + /// + /// Sets the *file id* 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 file_id(mut self, new_value: &str) -> PermissionListCall<'a, C, A> { + self._file_id = new_value.to_string(); + self + } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionListCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } + /// The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> PermissionListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire list will be returned. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> PermissionListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> PermissionListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> PermissionListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::MetadataReadonly`. + /// + /// 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: T) -> PermissionListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Gets a permission by ID. /// /// A builder for the *get* method supported by a *permission* resource. @@ -10914,6 +12828,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().get("fileId", "permissionId") +/// .supports_team_drives(false) /// .doit(); /// # } /// ``` @@ -10923,6 +12838,7 @@ pub struct PermissionGetCall<'a, C, A> hub: &'a Drive, _file_id: String, _permission_id: String, + _supports_team_drives: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -10944,10 +12860,13 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "drive.permissions.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); params.push(("permissionId", self._permission_id.to_string())); - for &field in ["alt", "fileId", "permissionId"].iter() { + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } + for &field in ["alt", "fileId", "permissionId", "supportsTeamDrives"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -11082,6 +13001,13 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: self._permission_id = new_value.to_string(); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionGetCall<'a, C, A> { + self._supports_team_drives = 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. /// @@ -11134,7 +13060,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: } -/// Creates a permission for a file. +/// Creates a permission for a file or Team Drive. /// /// A builder for the *create* method supported by a *permission* resource. /// It is not used directly, but through a `PermissionMethods` instance. @@ -11167,9 +13093,10 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.permissions().create(req, "fileId") -/// .transfer_ownership(true) -/// .send_notification_email(true) -/// .email_message("gubergren") +/// .transfer_ownership(false) +/// .supports_team_drives(true) +/// .send_notification_email(false) +/// .email_message("sit") /// .doit(); /// # } /// ``` @@ -11180,6 +13107,7 @@ pub struct PermissionCreateCall<'a, C, A> _request: Permission, _file_id: String, _transfer_ownership: Option, + _supports_team_drives: Option, _send_notification_email: Option, _email_message: Option, _delegate: Option<&'a mut Delegate>, @@ -11203,18 +13131,21 @@ impl<'a, C, A> PermissionCreateCall<'a, C, A> where C: BorrowMut, }; dlg.begin(MethodInfo { id: "drive.permissions.create", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); params.push(("fileId", self._file_id.to_string())); if let Some(value) = self._transfer_ownership { params.push(("transferOwnership", value.to_string())); } + if let Some(value) = self._supports_team_drives { + params.push(("supportsTeamDrives", value.to_string())); + } if let Some(value) = self._send_notification_email { params.push(("sendNotificationEmail", value.to_string())); } if let Some(value) = self._email_message { params.push(("emailMessage", value.to_string())); } - for &field in ["alt", "fileId", "transferOwnership", "sendNotificationEmail", "emailMessage"].iter() { + for &field in ["alt", "fileId", "transferOwnership", "supportsTeamDrives", "sendNotificationEmail", "emailMessage"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -11353,7 +13284,7 @@ impl<'a, C, A> PermissionCreateCall<'a, C, A> where C: BorrowMut, self._request = new_value; self } - /// The ID of the file. + /// The ID of the file or Team Drive. /// /// Sets the *file id* path property to the given value. /// @@ -11370,6 +13301,13 @@ impl<'a, C, A> PermissionCreateCall<'a, C, A> where C: BorrowMut, self._transfer_ownership = Some(new_value); self } + /// Whether the requesting application supports Team Drives. + /// + /// Sets the *supports team drives* query property to the given value. + pub fn supports_team_drives(mut self, new_value: bool) -> PermissionCreateCall<'a, C, A> { + self._supports_team_drives = Some(new_value); + self + } /// Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers. /// /// Sets the *send notification email* query property to the given value. diff --git a/gen/firebasedynamiclinks1-cli/Cargo.toml b/gen/firebasedynamiclinks1-cli/Cargo.toml index a18b5b377b..33254cf1cb 100644 --- a/gen/firebasedynamiclinks1-cli/Cargo.toml +++ b/gen/firebasedynamiclinks1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-firebasedynamiclinks1-cli" -version = "1.0.4+20161118" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with Firebase Dynamic Links (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/firebasedynamiclinks1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-firebasedynamiclinks1] path = "../firebasedynamiclinks1" -version = "1.0.4+20161118" +version = "1.0.4+20170517" diff --git a/gen/firebasedynamiclinks1-cli/README.md b/gen/firebasedynamiclinks1-cli/README.md index dce6d245ef..5e4919a681 100644 --- a/gen/firebasedynamiclinks1-cli/README.md +++ b/gen/firebasedynamiclinks1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Firebase Dynamic Links* API at revision *20161118*. The CLI is at version *1.0.4*. +This documentation was generated from the *Firebase Dynamic Links* API at revision *20170517*. The CLI is at version *1.0.4*. ```bash firebasedynamiclinks1 [options] diff --git a/gen/firebasedynamiclinks1-cli/mkdocs.yml b/gen/firebasedynamiclinks1-cli/mkdocs.yml index 28affa9ef3..9fa5b5da76 100644 --- a/gen/firebasedynamiclinks1-cli/mkdocs.yml +++ b/gen/firebasedynamiclinks1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Firebase Dynamic Links v1.0.4+20161118 +site_name: Firebase Dynamic Links v1.0.4+20170517 site_url: http://byron.github.io/google-apis-rs/google-firebasedynamiclinks1-cli site_description: A complete library to interact with Firebase Dynamic Links (protocol v1) diff --git a/gen/firebasedynamiclinks1-cli/src/main.rs b/gen/firebasedynamiclinks1-cli/src/main.rs index 003d464cfc..ce5978c67e 100644 --- a/gen/firebasedynamiclinks1-cli/src/main.rs +++ b/gen/firebasedynamiclinks1-cli/src/main.rs @@ -69,6 +69,7 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "dynamic-link-info.navigation-info.enable-forced-redirect" => Some(("dynamicLinkInfo.navigationInfo.enableForcedRedirect", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "dynamic-link-info.analytics-info.google-play-analytics.utm-medium" => Some(("dynamicLinkInfo.analyticsInfo.googlePlayAnalytics.utmMedium", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "dynamic-link-info.analytics-info.google-play-analytics.utm-source" => Some(("dynamicLinkInfo.analyticsInfo.googlePlayAnalytics.utmSource", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "dynamic-link-info.analytics-info.google-play-analytics.gclid" => Some(("dynamicLinkInfo.analyticsInfo.googlePlayAnalytics.gclid", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -97,7 +98,7 @@ impl<'n> Engine<'n> { "long-dynamic-link" => Some(("longDynamicLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "suffix.option" => Some(("suffix.option", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["analytics-info", "android-fallback-link", "android-info", "android-link", "android-min-package-version-code", "android-package-name", "at", "ct", "dynamic-link-domain", "dynamic-link-info", "gclid", "google-play-analytics", "ios-app-store-id", "ios-bundle-id", "ios-custom-scheme", "ios-fallback-link", "ios-info", "ios-ipad-bundle-id", "ios-ipad-fallback-link", "itunes-connect-analytics", "link", "long-dynamic-link", "mt", "option", "pt", "social-description", "social-image-link", "social-meta-tag-info", "social-title", "suffix", "utm-campaign", "utm-content", "utm-medium", "utm-source", "utm-term"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["analytics-info", "android-fallback-link", "android-info", "android-link", "android-min-package-version-code", "android-package-name", "at", "ct", "dynamic-link-domain", "dynamic-link-info", "enable-forced-redirect", "gclid", "google-play-analytics", "ios-app-store-id", "ios-bundle-id", "ios-custom-scheme", "ios-fallback-link", "ios-info", "ios-ipad-bundle-id", "ios-ipad-fallback-link", "itunes-connect-analytics", "link", "long-dynamic-link", "mt", "navigation-info", "option", "pt", "social-description", "social-image-link", "social-meta-tag-info", "social-title", "suffix", "utm-campaign", "utm-content", "utm-medium", "utm-source", "utm-term"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -296,8 +297,8 @@ fn main() { let mut app = App::new("firebasedynamiclinks1") .author("Sebastian Thiel ") - .version("1.0.4+20161118") - .about("Firebase Dynamic Links API enables third party developers to programmatically create and manage Dynamic Links.") + .version("1.0.4+20170517") + .about("Programmatically creates and manages Firebase Dynamic Links.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_firebasedynamiclinks1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/firebasedynamiclinks1/Cargo.toml b/gen/firebasedynamiclinks1/Cargo.toml index d5ff63af3a..64766e3258 100644 --- a/gen/firebasedynamiclinks1/Cargo.toml +++ b/gen/firebasedynamiclinks1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-firebasedynamiclinks1" -version = "1.0.4+20161118" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with Firebase Dynamic Links (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/firebasedynamiclinks1" homepage = "https://firebase.google.com/docs/dynamic-links/" -documentation = "https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118" +documentation = "https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517" license = "MIT" keywords = ["firebasedynamiclinks", "google", "protocol", "web", "api"] diff --git a/gen/firebasedynamiclinks1/README.md b/gen/firebasedynamiclinks1/README.md index 8179395686..798b063f30 100644 --- a/gen/firebasedynamiclinks1/README.md +++ b/gen/firebasedynamiclinks1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-firebasedynamiclinks1` library allows access to all features of the *Google Firebase Dynamic Links* service. -This documentation was generated from *Firebase Dynamic Links* crate version *1.0.4+20161118*, where *20161118* is the exact revision of the *firebasedynamiclinks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Firebase Dynamic Links* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *firebasedynamiclinks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Firebase Dynamic Links* *v1* API can be found at the [official documentation site](https://firebase.google.com/docs/dynamic-links/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/struct.FirebaseDynamicLinks.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/struct.FirebaseDynamicLinks.html) ... * short links - * [*create*](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/struct.ShortLinkCreateCall.html) + * [*create*](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/struct.ShortLinkCreateCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/struct.FirebaseDynamicLinks.html)** +* **[Hub](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/struct.FirebaseDynamicLinks.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.Part.html)** + * **[Parts](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -121,17 +121,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.Delegate.html), 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-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.ResponseResult.html), 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")`. @@ -141,29 +141,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.CallBuilder.html) 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-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.CallBuilder.html), 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-firebasedynamiclinks1/1.0.4+20161118/google_firebasedynamiclinks1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-firebasedynamiclinks1/1.0.4+20170517/google_firebasedynamiclinks1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/firebasedynamiclinks1/src/lib.rs b/gen/firebasedynamiclinks1/src/lib.rs index 870a7f6fea..1e2ac15cd1 100644 --- a/gen/firebasedynamiclinks1/src/lib.rs +++ b/gen/firebasedynamiclinks1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Firebase Dynamic Links* crate version *1.0.4+20161118*, where *20161118* is the exact revision of the *firebasedynamiclinks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Firebase Dynamic Links* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *firebasedynamiclinks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Firebase Dynamic Links* *v1* API can be found at the //! [official documentation site](https://firebase.google.com/docs/dynamic-links/). @@ -341,6 +341,21 @@ impl<'a, C, A> FirebaseDynamicLinks // ############ // SCHEMAS ### // ########## +/// Information of navigation behavior. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct NavigationInfo { + /// If this option is on, FDL click will be forced to redirect rather than + /// show an interstitial page. + #[serde(rename="enableForcedRedirect")] + pub enable_forced_redirect: Option, +} + +impl Part for NavigationInfo {} + + /// Tracking parameters supported by Dynamic Link. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -553,23 +568,26 @@ impl Part for GooglePlayAnalytics {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DynamicLinkInfo { + /// Information of navigation behavior of a Firebase Dynamic Links. + #[serde(rename="navigationInfo")] + pub navigation_info: Option, /// Parameters used for tracking. See all tracking parameters in the - /// [documentation](https://firebase.google.com/docs/dynamic-links/android#create-a-dynamic-link-programmatically). + /// [documentation](https://firebase.google.com/docs/dynamic-links/create-manually). #[serde(rename="analyticsInfo")] pub analytics_info: Option, /// The link your app will open, You can specify any URL your app can handle. /// This link must be a well-formatted URL, be properly URL-encoded, and use /// the HTTP or HTTPS scheme. See 'link' parameters in the - /// [documentation](https://firebase.google.com/docs/dynamic-links/android#create-a-dynamic-link-programmatically). + /// [documentation](https://firebase.google.com/docs/dynamic-links/create-manually). /// /// Required. pub link: Option, /// iOS related information. See iOS related parameters in the - /// [documentation](https://firebase.google.com/docs/dynamic-links/ios#create-a-dynamic-link-programmatically). + /// [documentation](https://firebase.google.com/docs/dynamic-links/create-manually). #[serde(rename="iosInfo")] pub ios_info: Option, /// Android related information. See Android related parameters in the - /// [documentation](https://firebase.google.com/docs/dynamic-links/android#create-a-dynamic-link-programmatically). + /// [documentation](https://firebase.google.com/docs/dynamic-links/create-manually). #[serde(rename="androidInfo")] pub android_info: Option, /// Parameters for social meta tag params. @@ -577,7 +595,7 @@ pub struct DynamicLinkInfo { #[serde(rename="socialMetaTagInfo")] pub social_meta_tag_info: Option, /// Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl - /// [Learn more](https://firebase.google.com/docs/dynamic-links/android#set-up-firebase-and-the-dynamic-links-sdk) + /// [Learn more](https://firebase.google.com/docs/dynamic-links/android/receive) /// on how to set up Dynamic Link domain associated with your Firebase project. /// /// Required. @@ -599,14 +617,14 @@ impl Part for DynamicLinkInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreateShortDynamicLinkResponse { - /// Preivew link to show the link flow chart. - #[serde(rename="previewLink")] - pub preview_link: Option, - /// Information about potential warnings on link creation. - pub warning: Option>, /// Short Dynamic Link value. e.g. https://abcd.app.goo.gl/wxyz #[serde(rename="shortLink")] pub short_link: Option, + /// Information about potential warnings on link creation. + pub warning: Option>, + /// Preivew link to show the link flow chart. + #[serde(rename="previewLink")] + pub preview_link: Option, } impl ResponseResult for CreateShortDynamicLinkResponse {} diff --git a/gen/fitness1-cli/Cargo.toml b/gen/fitness1-cli/Cargo.toml index 45a20309d0..43264c5aa0 100644 --- a/gen/fitness1-cli/Cargo.toml +++ b/gen/fitness1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/fusiontables2-cli/Cargo.toml b/gen/fusiontables2-cli/Cargo.toml index 9196b1b584..2c2f4163cc 100644 --- a/gen/fusiontables2-cli/Cargo.toml +++ b/gen/fusiontables2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-fusiontables2-cli" -version = "1.0.4+20160526" +version = "1.0.4+20170413" authors = ["Sebastian Thiel "] description = "A complete library to interact with fusiontables (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/fusiontables2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-fusiontables2] path = "../fusiontables2" -version = "1.0.4+20160526" +version = "1.0.4+20170413" diff --git a/gen/fusiontables2-cli/README.md b/gen/fusiontables2-cli/README.md index 632dcc9c60..d4f98627f4 100644 --- a/gen/fusiontables2-cli/README.md +++ b/gen/fusiontables2-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *fusiontables* API at revision *20160526*. The CLI is at version *1.0.4*. +This documentation was generated from the *fusiontables* API at revision *20170413*. The CLI is at version *1.0.4*. ```bash fusiontables2 [options] diff --git a/gen/fusiontables2-cli/mkdocs.yml b/gen/fusiontables2-cli/mkdocs.yml index 14a631afab..09da7c1222 100644 --- a/gen/fusiontables2-cli/mkdocs.yml +++ b/gen/fusiontables2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: fusiontables v1.0.4+20160526 +site_name: fusiontables v1.0.4+20170413 site_url: http://byron.github.io/google-apis-rs/google-fusiontables2-cli site_description: A complete library to interact with fusiontables (protocol v2) diff --git a/gen/fusiontables2-cli/src/main.rs b/gen/fusiontables2-cli/src/main.rs index 885f6c1370..a455977374 100644 --- a/gen/fusiontables2-cli/src/main.rs +++ b/gen/fusiontables2-cli/src/main.rs @@ -3586,7 +3586,7 @@ fn main() { let mut app = App::new("fusiontables2") .author("Sebastian Thiel ") - .version("1.0.4+20160526") + .version("1.0.4+20170413") .about("API for working with Fusion Tables data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_fusiontables2_cli") .arg(Arg::with_name("url") diff --git a/gen/fusiontables2/Cargo.toml b/gen/fusiontables2/Cargo.toml index 74dd034f3b..d38b1a1319 100644 --- a/gen/fusiontables2/Cargo.toml +++ b/gen/fusiontables2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-fusiontables2" -version = "1.0.4+20160526" +version = "1.0.4+20170413" authors = ["Sebastian Thiel "] description = "A complete library to interact with fusiontables (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/fusiontables2" homepage = "https://developers.google.com/fusiontables" -documentation = "https://docs.rs/google-fusiontables2/1.0.4+20160526" +documentation = "https://docs.rs/google-fusiontables2/1.0.4+20170413" license = "MIT" keywords = ["fusiontables", "google", "protocol", "web", "api"] diff --git a/gen/fusiontables2/README.md b/gen/fusiontables2/README.md index 64753f76cd..9f9f3fb3de 100644 --- a/gen/fusiontables2/README.md +++ b/gen/fusiontables2/README.md @@ -5,38 +5,38 @@ DO NOT EDIT ! --> The `google-fusiontables2` library allows access to all features of the *Google fusiontables* service. -This documentation was generated from *fusiontables* crate version *1.0.4+20160526*, where *20160526* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *fusiontables* crate version *1.0.4+20170413*, where *20170413* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *fusiontables* *v2* API can be found at the [official documentation site](https://developers.google.com/fusiontables). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.Fusiontables.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.Fusiontables.html) ... -* [column](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.Column.html) - * [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.ColumnDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.ColumnGetCall.html), [*insert*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.ColumnInsertCall.html), [*list*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.ColumnListCall.html), [*patch*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.ColumnPatchCall.html) and [*update*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.ColumnUpdateCall.html) +* [column](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.Column.html) + * [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.ColumnDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.ColumnGetCall.html), [*insert*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.ColumnInsertCall.html), [*list*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.ColumnListCall.html), [*patch*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.ColumnPatchCall.html) and [*update*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.ColumnUpdateCall.html) * query - * [*sql*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.QuerySqlCall.html) and [*sql get*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.QuerySqlGetCall.html) + * [*sql*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.QuerySqlCall.html) and [*sql get*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.QuerySqlGetCall.html) * style - * [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.StyleDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.StyleGetCall.html), [*insert*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.StyleInsertCall.html), [*list*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.StyleListCall.html), [*patch*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.StylePatchCall.html) and [*update*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.StyleUpdateCall.html) -* [table](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.Table.html) - * [*copy*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableCopyCall.html), [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableGetCall.html), [*import rows*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableImportRowCall.html), [*import table*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableImportTableCall.html), [*insert*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableInsertCall.html), [*list*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableListCall.html), [*patch*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TablePatchCall.html), [*replace rows*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableReplaceRowCall.html) and [*update*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableUpdateCall.html) -* [task](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.Task.html) - * [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TaskDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TaskGetCall.html) and [*list*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TaskListCall.html) -* [template](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.Template.html) - * [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TemplateDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TemplateGetCall.html), [*insert*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TemplateInsertCall.html), [*list*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TemplateListCall.html), [*patch*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TemplatePatchCall.html) and [*update*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TemplateUpdateCall.html) + * [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.StyleDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.StyleGetCall.html), [*insert*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.StyleInsertCall.html), [*list*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.StyleListCall.html), [*patch*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.StylePatchCall.html) and [*update*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.StyleUpdateCall.html) +* [table](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.Table.html) + * [*copy*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableCopyCall.html), [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableGetCall.html), [*import rows*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableImportRowCall.html), [*import table*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableImportTableCall.html), [*insert*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableInsertCall.html), [*list*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableListCall.html), [*patch*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TablePatchCall.html), [*replace rows*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableReplaceRowCall.html) and [*update*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableUpdateCall.html) +* [task](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.Task.html) + * [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TaskDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TaskGetCall.html) and [*list*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TaskListCall.html) +* [template](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.Template.html) + * [*delete*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TemplateDeleteCall.html), [*get*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TemplateGetCall.html), [*insert*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TemplateInsertCall.html), [*list*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TemplateListCall.html), [*patch*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TemplatePatchCall.html) and [*update*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TemplateUpdateCall.html) Upload supported by ... -* [*replace rows table*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableReplaceRowCall.html) -* [*import rows table*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableImportRowCall.html) -* [*import table table*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.TableImportTableCall.html) +* [*replace rows table*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableReplaceRowCall.html) +* [*import rows table*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableImportRowCall.html) +* [*import table table*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.TableImportTableCall.html) Download supported by ... -* [*sql get query*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.QuerySqlGetCall.html) -* [*sql query*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.QuerySqlCall.html) +* [*sql get query*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.QuerySqlGetCall.html) +* [*sql query*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.QuerySqlCall.html) @@ -44,17 +44,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/struct.Fusiontables.html)** +* **[Hub](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/struct.Fusiontables.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.Part.html)** + * **[Parts](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -144,17 +144,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.Delegate.html), 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-fusiontables2/1.0.4+20160526/google_fusiontables2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.ResponseResult.html), 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")`. @@ -164,29 +164,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.CallBuilder.html) 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-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.CallBuilder.html), 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-fusiontables2/1.0.4+20160526/google_fusiontables2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-fusiontables2/1.0.4+20170413/google_fusiontables2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/fusiontables2/src/lib.rs b/gen/fusiontables2/src/lib.rs index fa6ab1d43a..6248066f88 100644 --- a/gen/fusiontables2/src/lib.rs +++ b/gen/fusiontables2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *fusiontables* crate version *1.0.4+20160526*, where *20160526* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *fusiontables* crate version *1.0.4+20170413*, where *20170413* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *fusiontables* *v2* API can be found at the //! [official documentation site](https://developers.google.com/fusiontables). diff --git a/gen/games1-cli/Cargo.toml b/gen/games1-cli/Cargo.toml index 8adb6956a5..2f5b0d72f0 100644 --- a/gen/games1-cli/Cargo.toml +++ b/gen/games1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-games1-cli" -version = "1.0.4+20161207" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/games1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-games1] path = "../games1" -version = "1.0.4+20161207" +version = "1.0.4+20170511" diff --git a/gen/games1-cli/README.md b/gen/games1-cli/README.md index a76283c67f..0ca224bc66 100644 --- a/gen/games1-cli/README.md +++ b/gen/games1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Games* API at revision *20161207*. The CLI is at version *1.0.4*. +This documentation was generated from the *Games* API at revision *20170511*. The CLI is at version *1.0.4*. ```bash games1 [options] diff --git a/gen/games1-cli/mkdocs.yml b/gen/games1-cli/mkdocs.yml index 55de514eee..3f4927e742 100644 --- a/gen/games1-cli/mkdocs.yml +++ b/gen/games1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Games v1.0.4+20161207 +site_name: Games v1.0.4+20170511 site_url: http://byron.github.io/google-apis-rs/google-games1-cli site_description: A complete library to interact with Games (protocol v1) diff --git a/gen/games1-cli/src/main.rs b/gen/games1-cli/src/main.rs index 5441bc45fe..f0aaf00e8b 100644 --- a/gen/games1-cli/src/main.rs +++ b/gen/games1-cli/src/main.rs @@ -5260,7 +5260,7 @@ fn main() { let mut app = App::new("games1") .author("Sebastian Thiel ") - .version("1.0.4+20161207") + .version("1.0.4+20170511") .about("The API for Google Play Game Services.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_games1_cli") .arg(Arg::with_name("url") diff --git a/gen/games1/Cargo.toml b/gen/games1/Cargo.toml index ba83b687bd..0923351d8d 100644 --- a/gen/games1/Cargo.toml +++ b/gen/games1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-games1" -version = "1.0.4+20161207" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/games1" homepage = "https://developers.google.com/games/services/" -documentation = "https://docs.rs/google-games1/1.0.4+20161207" +documentation = "https://docs.rs/google-games1/1.0.4+20170511" license = "MIT" keywords = ["games", "google", "protocol", "web", "api"] diff --git a/gen/games1/README.md b/gen/games1/README.md index 73a741e516..0335386dca 100644 --- a/gen/games1/README.md +++ b/gen/games1/README.md @@ -5,44 +5,44 @@ DO NOT EDIT ! --> The `google-games1` library allows access to all features of the *Google Games* service. -This documentation was generated from *Games* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *games:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Games* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *games:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Games* *v1* API can be found at the [official documentation site](https://developers.google.com/games/services/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.Games.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.Games.html) ... -* [achievement definitions](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.AchievementDefinition.html) - * [*list*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.AchievementDefinitionListCall.html) +* [achievement definitions](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.AchievementDefinition.html) + * [*list*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.AchievementDefinitionListCall.html) * achievements - * [*increment*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.AchievementIncrementCall.html), [*list*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.AchievementListCall.html), [*reveal*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.AchievementRevealCall.html), [*set steps at least*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.AchievementSetStepsAtLeastCall.html), [*unlock*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.AchievementUnlockCall.html) and [*update multiple*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.AchievementUpdateMultipleCall.html) -* [applications](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.Application.html) - * [*get*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.ApplicationGetCall.html), [*played*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.ApplicationPlayedCall.html) and [*verify*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.ApplicationVerifyCall.html) + * [*increment*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.AchievementIncrementCall.html), [*list*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.AchievementListCall.html), [*reveal*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.AchievementRevealCall.html), [*set steps at least*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.AchievementSetStepsAtLeastCall.html), [*unlock*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.AchievementUnlockCall.html) and [*update multiple*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.AchievementUpdateMultipleCall.html) +* [applications](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.Application.html) + * [*get*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.ApplicationGetCall.html), [*played*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.ApplicationPlayedCall.html) and [*verify*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.ApplicationVerifyCall.html) * events - * [*list by player*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.EventListByPlayerCall.html), [*list definitions*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.EventListDefinitionCall.html) and [*record*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.EventRecordCall.html) -* [leaderboards](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.Leaderboard.html) - * [*get*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.LeaderboardGetCall.html) and [*list*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.LeaderboardListCall.html) + * [*list by player*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.EventListByPlayerCall.html), [*list definitions*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.EventListDefinitionCall.html) and [*record*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.EventRecordCall.html) +* [leaderboards](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.Leaderboard.html) + * [*get*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.LeaderboardGetCall.html) and [*list*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.LeaderboardListCall.html) * metagame - * [*get metagame config*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.MetagameGetMetagameConfigCall.html) and [*list categories by player*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.MetagameListCategoriesByPlayerCall.html) -* [players](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.Player.html) - * [*get*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.PlayerGetCall.html) and [*list*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.PlayerListCall.html) + * [*get metagame config*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.MetagameGetMetagameConfigCall.html) and [*list categories by player*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.MetagameListCategoriesByPlayerCall.html) +* [players](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.Player.html) + * [*get*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.PlayerGetCall.html) and [*list*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.PlayerListCall.html) * pushtokens - * [*remove*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.PushtokenRemoveCall.html) and [*update*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.PushtokenUpdateCall.html) -* [quest milestones](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.QuestMilestone.html) - * [*claim*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.QuestMilestoneClaimCall.html) -* [quests](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.Quest.html) - * [*accept*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.QuestAcceptCall.html) and [*list*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.QuestListCall.html) + * [*remove*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.PushtokenRemoveCall.html) and [*update*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.PushtokenUpdateCall.html) +* [quest milestones](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.QuestMilestone.html) + * [*claim*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.QuestMilestoneClaimCall.html) +* [quests](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.Quest.html) + * [*accept*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.QuestAcceptCall.html) and [*list*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.QuestListCall.html) * revisions - * [*check*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.RevisionCheckCall.html) -* [rooms](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.Room.html) - * [*create*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.RoomCreateCall.html), [*decline*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.RoomDeclineCall.html), [*dismiss*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.RoomDismisCall.html), [*get*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.RoomGetCall.html), [*join*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.RoomJoinCall.html), [*leave*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.RoomLeaveCall.html), [*list*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.RoomListCall.html) and [*report status*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.RoomReportStatuCall.html) + * [*check*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.RevisionCheckCall.html) +* [rooms](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.Room.html) + * [*create*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.RoomCreateCall.html), [*decline*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.RoomDeclineCall.html), [*dismiss*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.RoomDismisCall.html), [*get*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.RoomGetCall.html), [*join*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.RoomJoinCall.html), [*leave*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.RoomLeaveCall.html), [*list*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.RoomListCall.html) and [*report status*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.RoomReportStatuCall.html) * scores - * [*get*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.ScoreGetCall.html), [*list*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.ScoreListCall.html), [*list window*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.ScoreListWindowCall.html), [*submit*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.ScoreSubmitCall.html) and [*submit multiple*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.ScoreSubmitMultipleCall.html) -* [snapshots](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.Snapshot.html) - * [*get*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.SnapshotGetCall.html) and [*list*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.SnapshotListCall.html) + * [*get*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.ScoreGetCall.html), [*list*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.ScoreListCall.html), [*list window*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.ScoreListWindowCall.html), [*submit*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.ScoreSubmitCall.html) and [*submit multiple*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.ScoreSubmitMultipleCall.html) +* [snapshots](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.Snapshot.html) + * [*get*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.SnapshotGetCall.html) and [*list*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.SnapshotListCall.html) * turn based matches - * [*cancel*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheCancelCall.html), [*create*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheCreateCall.html), [*decline*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheDeclineCall.html), [*dismiss*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheDismisCall.html), [*finish*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheFinishCall.html), [*get*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheGetCall.html), [*join*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheJoinCall.html), [*leave*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheLeaveCall.html), [*leave turn*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheLeaveTurnCall.html), [*list*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheListCall.html), [*rematch*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheRematchCall.html), [*sync*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheSyncCall.html) and [*take turn*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.TurnBasedMatcheTakeTurnCall.html) + * [*cancel*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheCancelCall.html), [*create*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheCreateCall.html), [*decline*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheDeclineCall.html), [*dismiss*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheDismisCall.html), [*finish*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheFinishCall.html), [*get*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheGetCall.html), [*join*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheJoinCall.html), [*leave*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheLeaveCall.html), [*leave turn*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheLeaveTurnCall.html), [*list*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheListCall.html), [*rematch*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheRematchCall.html), [*sync*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheSyncCall.html) and [*take turn*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.TurnBasedMatcheTakeTurnCall.html) @@ -51,17 +51,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-games1/1.0.4+20161207/google_games1/struct.Games.html)** +* **[Hub](https://docs.rs/google-games1/1.0.4+20170511/google_games1/struct.Games.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.Part.html)** + * **[Parts](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -153,17 +153,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-games1/1.0.4+20161207/google_games1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-games1/1.0.4+20170511/google_games1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.Delegate.html), 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-games1/1.0.4+20161207/google_games1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-games1/1.0.4+20170511/google_games1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.ResponseResult.html), 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")`. @@ -173,29 +173,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.CallBuilder.html) 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-games1/1.0.4+20161207/google_games1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-games1/1.0.4+20161207/google_games1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.CallBuilder.html), 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-games1/1.0.4+20161207/google_games1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-games1/1.0.4+20170511/google_games1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/games1/src/lib.rs b/gen/games1/src/lib.rs index 87d598b394..317fb39e16 100644 --- a/gen/games1/src/lib.rs +++ b/gen/games1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Games* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *games:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Games* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *games:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Games* *v1* API can be found at the //! [official documentation site](https://developers.google.com/games/services/). diff --git a/gen/gamesconfiguration1_configuration-cli/Cargo.toml b/gen/gamesconfiguration1_configuration-cli/Cargo.toml index 15017dca42..26f69a4ba0 100644 --- a/gen/gamesconfiguration1_configuration-cli/Cargo.toml +++ b/gen/gamesconfiguration1_configuration-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-gamesconfiguration1_configuration-cli" -version = "1.0.4+20161207" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games Configuration (protocol v1configuration)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gamesconfiguration1_configuration-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-gamesconfiguration1_configuration] path = "../gamesconfiguration1_configuration" -version = "1.0.4+20161207" +version = "1.0.4+20170511" diff --git a/gen/gamesconfiguration1_configuration-cli/README.md b/gen/gamesconfiguration1_configuration-cli/README.md index 8d178af766..94164ce53e 100644 --- a/gen/gamesconfiguration1_configuration-cli/README.md +++ b/gen/gamesconfiguration1_configuration-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Games Configuration* API at revision *20161207*. The CLI is at version *1.0.4*. +This documentation was generated from the *Games Configuration* API at revision *20170511*. The CLI is at version *1.0.4*. ```bash gamesconfiguration1-configuration [options] diff --git a/gen/gamesconfiguration1_configuration-cli/mkdocs.yml b/gen/gamesconfiguration1_configuration-cli/mkdocs.yml index 87b2fcad3f..ba2b6ab7dd 100644 --- a/gen/gamesconfiguration1_configuration-cli/mkdocs.yml +++ b/gen/gamesconfiguration1_configuration-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Games Configuration v1.0.4+20161207 +site_name: Games Configuration v1.0.4+20170511 site_url: http://byron.github.io/google-apis-rs/google-gamesconfiguration1_configuration-cli site_description: A complete library to interact with Games Configuration (protocol v1configuration) diff --git a/gen/gamesconfiguration1_configuration-cli/src/main.rs b/gen/gamesconfiguration1_configuration-cli/src/main.rs index 66b29d2a3e..43ed9a66ad 100644 --- a/gen/gamesconfiguration1_configuration-cli/src/main.rs +++ b/gen/gamesconfiguration1_configuration-cli/src/main.rs @@ -1552,7 +1552,7 @@ fn main() { let mut app = App::new("gamesconfiguration1-configuration") .author("Sebastian Thiel ") - .version("1.0.4+20161207") + .version("1.0.4+20170511") .about("The Publishing API for Google Play Game Services.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_gamesconfiguration1_configuration_cli") .arg(Arg::with_name("url") diff --git a/gen/gamesconfiguration1_configuration/Cargo.toml b/gen/gamesconfiguration1_configuration/Cargo.toml index 9a816284d9..22d8643a3c 100644 --- a/gen/gamesconfiguration1_configuration/Cargo.toml +++ b/gen/gamesconfiguration1_configuration/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-gamesconfiguration1_configuration" -version = "1.0.4+20161207" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games Configuration (protocol v1configuration)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gamesconfiguration1_configuration" homepage = "https://developers.google.com/games/services" -documentation = "https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207" +documentation = "https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511" license = "MIT" keywords = ["gamesConfiguration", "google", "protocol", "web", "api"] diff --git a/gen/gamesconfiguration1_configuration/README.md b/gen/gamesconfiguration1_configuration/README.md index 8b6e19deef..3c8f0c82f1 100644 --- a/gen/gamesconfiguration1_configuration/README.md +++ b/gen/gamesconfiguration1_configuration/README.md @@ -5,25 +5,25 @@ DO NOT EDIT ! --> The `google-gamesconfiguration1_configuration` library allows access to all features of the *Google Games Configuration* service. -This documentation was generated from *Games Configuration* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *gamesConfiguration:v1configuration* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Games Configuration* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *gamesConfiguration:v1configuration* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Games Configuration* *v1_configuration* API can be found at the [official documentation site](https://developers.google.com/games/services). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.GamesConfiguration.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.GamesConfiguration.html) ... -* [achievement configurations](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.AchievementConfiguration.html) - * [*delete*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.AchievementConfigurationDeleteCall.html), [*get*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.AchievementConfigurationGetCall.html), [*insert*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.AchievementConfigurationInsertCall.html), [*list*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.AchievementConfigurationListCall.html), [*patch*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.AchievementConfigurationPatchCall.html) and [*update*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.AchievementConfigurationUpdateCall.html) -* [image configurations](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.ImageConfiguration.html) - * [*upload*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.ImageConfigurationUploadCall.html) -* [leaderboard configurations](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.LeaderboardConfiguration.html) - * [*delete*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationDeleteCall.html), [*get*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationGetCall.html), [*insert*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationInsertCall.html), [*list*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationListCall.html), [*patch*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationPatchCall.html) and [*update*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationUpdateCall.html) +* [achievement configurations](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.AchievementConfiguration.html) + * [*delete*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.AchievementConfigurationDeleteCall.html), [*get*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.AchievementConfigurationGetCall.html), [*insert*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.AchievementConfigurationInsertCall.html), [*list*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.AchievementConfigurationListCall.html), [*patch*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.AchievementConfigurationPatchCall.html) and [*update*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.AchievementConfigurationUpdateCall.html) +* [image configurations](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.ImageConfiguration.html) + * [*upload*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.ImageConfigurationUploadCall.html) +* [leaderboard configurations](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.LeaderboardConfiguration.html) + * [*delete*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationDeleteCall.html), [*get*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationGetCall.html), [*insert*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationInsertCall.html), [*list*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationListCall.html), [*patch*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationPatchCall.html) and [*update*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.LeaderboardConfigurationUpdateCall.html) Upload supported by ... -* [*upload image configurations*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.ImageConfigurationUploadCall.html) +* [*upload image configurations*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.ImageConfigurationUploadCall.html) @@ -31,17 +31,17 @@ Upload supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/struct.GamesConfiguration.html)** +* **[Hub](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/struct.GamesConfiguration.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.Part.html)** + * **[Parts](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -130,17 +130,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.Delegate.html), 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-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.ResponseResult.html), 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")`. @@ -150,29 +150,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.CallBuilder.html) 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-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.RequestValue.html) and -[decodable](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.RequestValue.html) and +[decodable](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.CallBuilder.html), 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-gamesconfiguration1_configuration/1.0.4+20161207/google_gamesconfiguration1_configuration/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-gamesconfiguration1_configuration/1.0.4+20170511/google_gamesconfiguration1_configuration/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/gamesconfiguration1_configuration/src/lib.rs b/gen/gamesconfiguration1_configuration/src/lib.rs index 675f4b7de7..c02e64543e 100644 --- a/gen/gamesconfiguration1_configuration/src/lib.rs +++ b/gen/gamesconfiguration1_configuration/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Games Configuration* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *gamesConfiguration:v1configuration* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Games Configuration* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *gamesConfiguration:v1configuration* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Games Configuration* *v1_configuration* API can be found at the //! [official documentation site](https://developers.google.com/games/services). diff --git a/gen/gamesmanagement1_management-cli/Cargo.toml b/gen/gamesmanagement1_management-cli/Cargo.toml index 59668c4f99..29f39ebc9e 100644 --- a/gen/gamesmanagement1_management-cli/Cargo.toml +++ b/gen/gamesmanagement1_management-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-gamesmanagement1_management-cli" -version = "1.0.4+20161207" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games Management (protocol v1management)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gamesmanagement1_management-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-gamesmanagement1_management] path = "../gamesmanagement1_management" -version = "1.0.4+20161207" +version = "1.0.4+20170511" diff --git a/gen/gamesmanagement1_management-cli/README.md b/gen/gamesmanagement1_management-cli/README.md index 08d35210d8..3a8da98a43 100644 --- a/gen/gamesmanagement1_management-cli/README.md +++ b/gen/gamesmanagement1_management-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Games Management* API at revision *20161207*. The CLI is at version *1.0.4*. +This documentation was generated from the *Games Management* API at revision *20170511*. The CLI is at version *1.0.4*. ```bash gamesmanagement1-management [options] diff --git a/gen/gamesmanagement1_management-cli/mkdocs.yml b/gen/gamesmanagement1_management-cli/mkdocs.yml index 22bb1c238d..5d92bd6a3a 100644 --- a/gen/gamesmanagement1_management-cli/mkdocs.yml +++ b/gen/gamesmanagement1_management-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Games Management v1.0.4+20161207 +site_name: Games Management v1.0.4+20170511 site_url: http://byron.github.io/google-apis-rs/google-gamesmanagement1_management-cli site_description: A complete library to interact with Games Management (protocol v1management) diff --git a/gen/gamesmanagement1_management-cli/src/main.rs b/gen/gamesmanagement1_management-cli/src/main.rs index cefd24d4c3..93e170864f 100644 --- a/gen/gamesmanagement1_management-cli/src/main.rs +++ b/gen/gamesmanagement1_management-cli/src/main.rs @@ -2079,7 +2079,7 @@ fn main() { let mut app = App::new("gamesmanagement1-management") .author("Sebastian Thiel ") - .version("1.0.4+20161207") + .version("1.0.4+20170511") .about("The Management API for Google Play Game Services.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_gamesmanagement1_management_cli") .arg(Arg::with_name("url") diff --git a/gen/gamesmanagement1_management/Cargo.toml b/gen/gamesmanagement1_management/Cargo.toml index 7de56aded5..ba10bdead5 100644 --- a/gen/gamesmanagement1_management/Cargo.toml +++ b/gen/gamesmanagement1_management/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-gamesmanagement1_management" -version = "1.0.4+20161207" +version = "1.0.4+20170511" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games Management (protocol v1management)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gamesmanagement1_management" homepage = "https://developers.google.com/games/services" -documentation = "https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207" +documentation = "https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511" license = "MIT" keywords = ["gamesManagement", "google", "protocol", "web", "api"] diff --git a/gen/gamesmanagement1_management/README.md b/gen/gamesmanagement1_management/README.md index 1a0420a805..05dd21fff3 100644 --- a/gen/gamesmanagement1_management/README.md +++ b/gen/gamesmanagement1_management/README.md @@ -5,30 +5,30 @@ DO NOT EDIT ! --> The `google-gamesmanagement1_management` library allows access to all features of the *Google Games Management* service. -This documentation was generated from *Games Management* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *gamesManagement:v1management* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Games Management* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *gamesManagement:v1management* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Games Management* *v1_management* API can be found at the [official documentation site](https://developers.google.com/games/services). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.GamesManagement.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.GamesManagement.html) ... * achievements - * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.AchievementResetCall.html), [*reset all*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.AchievementResetAllCall.html), [*reset all for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.AchievementResetAllForAllPlayerCall.html), [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.AchievementResetForAllPlayerCall.html) and [*reset multiple for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.AchievementResetMultipleForAllPlayerCall.html) + * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.AchievementResetCall.html), [*reset all*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.AchievementResetAllCall.html), [*reset all for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.AchievementResetAllForAllPlayerCall.html), [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.AchievementResetForAllPlayerCall.html) and [*reset multiple for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.AchievementResetMultipleForAllPlayerCall.html) * applications - * [*list hidden*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.ApplicationListHiddenCall.html) + * [*list hidden*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.ApplicationListHiddenCall.html) * events - * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.EventResetCall.html), [*reset all*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.EventResetAllCall.html), [*reset all for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.EventResetAllForAllPlayerCall.html), [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.EventResetForAllPlayerCall.html) and [*reset multiple for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.EventResetMultipleForAllPlayerCall.html) -* [players](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.Player.html) - * [*hide*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.PlayerHideCall.html) and [*unhide*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.PlayerUnhideCall.html) + * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.EventResetCall.html), [*reset all*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.EventResetAllCall.html), [*reset all for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.EventResetAllForAllPlayerCall.html), [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.EventResetForAllPlayerCall.html) and [*reset multiple for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.EventResetMultipleForAllPlayerCall.html) +* [players](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.Player.html) + * [*hide*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.PlayerHideCall.html) and [*unhide*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.PlayerUnhideCall.html) * quests - * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.QuestResetCall.html), [*reset all*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.QuestResetAllCall.html), [*reset all for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.QuestResetAllForAllPlayerCall.html), [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.QuestResetForAllPlayerCall.html) and [*reset multiple for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.QuestResetMultipleForAllPlayerCall.html) + * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.QuestResetCall.html), [*reset all*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.QuestResetAllCall.html), [*reset all for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.QuestResetAllForAllPlayerCall.html), [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.QuestResetForAllPlayerCall.html) and [*reset multiple for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.QuestResetMultipleForAllPlayerCall.html) * rooms - * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.RoomResetCall.html) and [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.RoomResetForAllPlayerCall.html) + * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.RoomResetCall.html) and [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.RoomResetForAllPlayerCall.html) * scores - * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.ScoreResetCall.html), [*reset all*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.ScoreResetAllCall.html), [*reset all for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.ScoreResetAllForAllPlayerCall.html), [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.ScoreResetForAllPlayerCall.html) and [*reset multiple for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.ScoreResetMultipleForAllPlayerCall.html) + * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.ScoreResetCall.html), [*reset all*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.ScoreResetAllCall.html), [*reset all for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.ScoreResetAllForAllPlayerCall.html), [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.ScoreResetForAllPlayerCall.html) and [*reset multiple for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.ScoreResetMultipleForAllPlayerCall.html) * turn based matches - * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.TurnBasedMatcheResetCall.html) and [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.TurnBasedMatcheResetForAllPlayerCall.html) + * [*reset*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.TurnBasedMatcheResetCall.html) and [*reset for all players*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.TurnBasedMatcheResetForAllPlayerCall.html) @@ -37,17 +37,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/struct.GamesManagement.html)** +* **[Hub](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/struct.GamesManagement.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.Part.html)** + * **[Parts](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -130,17 +130,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.Delegate.html), 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-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.ResponseResult.html), 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")`. @@ -150,29 +150,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.CallBuilder.html) 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-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.RequestValue.html) and -[decodable](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.RequestValue.html) and +[decodable](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.CallBuilder.html), 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-gamesmanagement1_management/1.0.4+20161207/google_gamesmanagement1_management/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-gamesmanagement1_management/1.0.4+20170511/google_gamesmanagement1_management/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/gamesmanagement1_management/src/lib.rs b/gen/gamesmanagement1_management/src/lib.rs index 378f7b73f7..d2db13471f 100644 --- a/gen/gamesmanagement1_management/src/lib.rs +++ b/gen/gamesmanagement1_management/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Games Management* crate version *1.0.4+20161207*, where *20161207* is the exact revision of the *gamesManagement:v1management* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Games Management* crate version *1.0.4+20170511*, where *20170511* is the exact revision of the *gamesManagement:v1management* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Games Management* *v1_management* API can be found at the //! [official documentation site](https://developers.google.com/games/services). diff --git a/gen/gan1_beta1-cli/Cargo.toml b/gen/gan1_beta1-cli/Cargo.toml index 07f333564b..0f61a26dc8 100644 --- a/gen/gan1_beta1-cli/Cargo.toml +++ b/gen/gan1_beta1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/genomics1-cli/Cargo.toml b/gen/genomics1-cli/Cargo.toml index a2949f82e6..cecbb3cc8a 100644 --- a/gen/genomics1-cli/Cargo.toml +++ b/gen/genomics1-cli/Cargo.toml @@ -4,11 +4,11 @@ [package] name = "google-genomics1-cli" -version = "1.0.4+20160928" +version = "1.0.4+20170520" authors = ["Sebastian Thiel "] description = "A complete library to interact with genomics (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/genomics1-cli" -homepage = "https://cloud.google.com/genomics/" +homepage = "https://cloud.google.com/genomics" documentation = "http://byron.github.io/google-apis-rs/google_genomics1_cli" license = "MIT" keywords = ["genomics", "google", "cli"] @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-genomics1] path = "../genomics1" -version = "1.0.4+20160928" +version = "1.0.4+20170520" diff --git a/gen/genomics1-cli/README.md b/gen/genomics1-cli/README.md index 246a068afe..e08f97019a 100644 --- a/gen/genomics1-cli/README.md +++ b/gen/genomics1-cli/README.md @@ -11,7 +11,7 @@ capabilities. Errors will be printed to standard error, and cause the program's 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 *genomics* API can be found at the -[official documentation site](https://cloud.google.com/genomics/). +[official documentation site](https://cloud.google.com/genomics). # Installation and Source Code @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *genomics* API at revision *20160928*. The CLI is at version *1.0.4*. +This documentation was generated from the *genomics* API at revision *20170520*. The CLI is at version *1.0.4*. ```bash genomics1 [options] @@ -72,7 +72,6 @@ genomics1 [options] search (-r )... [-p ]... [-o ] reads search (-r )... [-p ]... [-o ] - stream (-r )... [-p ]... [-o ] references bases-list [-p ]... [-o ] get [-p ]... [-o ] @@ -88,7 +87,6 @@ genomics1 [options] merge (-r )... [-p ]... [-o ] patch (-r )... [-p ]... [-o ] search (-r )... [-p ]... [-o ] - stream (-r )... [-p ]... [-o ] variantsets create (-r )... [-p ]... [-o ] delete [-p ]... [-o ] diff --git a/gen/genomics1-cli/mkdocs.yml b/gen/genomics1-cli/mkdocs.yml index 88fc887c03..7998e2a063 100644 --- a/gen/genomics1-cli/mkdocs.yml +++ b/gen/genomics1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: genomics v1.0.4+20160928 +site_name: genomics v1.0.4+20170520 site_url: http://byron.github.io/google-apis-rs/google-genomics1-cli site_description: A complete library to interact with genomics (protocol v1) @@ -45,7 +45,6 @@ pages: - ['readgroupsets_patch.md', 'Readgroupsets', 'Patch'] - ['readgroupsets_search.md', 'Readgroupsets', 'Search'] - ['reads_search.md', 'Reads', 'Search'] -- ['reads_stream.md', 'Reads', 'Stream'] - ['references_bases-list.md', 'References', 'Bases List'] - ['references_get.md', 'References', 'Get'] - ['references_search.md', 'References', 'Search'] @@ -58,7 +57,6 @@ pages: - ['variants_merge.md', 'Variants', 'Merge'] - ['variants_patch.md', 'Variants', 'Patch'] - ['variants_search.md', 'Variants', 'Search'] -- ['variants_stream.md', 'Variants', 'Stream'] - ['variantsets_create.md', 'Variantsets', 'Create'] - ['variantsets_delete.md', 'Variantsets', 'Delete'] - ['variantsets_export.md', 'Variantsets', 'Export'] diff --git a/gen/genomics1-cli/src/main.rs b/gen/genomics1-cli/src/main.rs index af630a84b8..250943052d 100644 --- a/gen/genomics1-cli/src/main.rs +++ b/gen/genomics1-cli/src/main.rs @@ -157,9 +157,7 @@ impl<'n> Engine<'n> { "reference-id" => Some(("referenceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "transcript.coding-sequence.start" => Some(("transcript.codingSequence.start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "transcript.coding-sequence.end" => Some(("transcript.codingSequence.end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "transcript.gene-id" => Some(("transcript.geneId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "variant.effect" => Some(("variant.effect", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "variant.transcript-ids" => Some(("variant.transcriptIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "variant.alternate-bases" => Some(("variant.alternateBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -170,7 +168,9 @@ impl<'n> Engine<'n> { "annotation-set-id" => Some(("annotationSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "reverse-strand" => Some(("reverseStrand", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.coding-sequence.start" => Some(("transcript.codingSequence.start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.coding-sequence.end" => Some(("transcript.codingSequence.end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.gene-id" => Some(("transcript.geneId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-bases", "annotation-set-id", "clinical-significance", "coding-sequence", "effect", "end", "gene-id", "id", "name", "reference-id", "reference-name", "reverse-strand", "start", "transcript", "transcript-ids", "type", "variant"]); @@ -454,9 +454,7 @@ impl<'n> Engine<'n> { "reference-id" => Some(("referenceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "transcript.coding-sequence.start" => Some(("transcript.codingSequence.start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "transcript.coding-sequence.end" => Some(("transcript.codingSequence.end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "transcript.gene-id" => Some(("transcript.geneId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "variant.effect" => Some(("variant.effect", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "variant.transcript-ids" => Some(("variant.transcriptIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "variant.alternate-bases" => Some(("variant.alternateBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -467,7 +465,9 @@ impl<'n> Engine<'n> { "annotation-set-id" => Some(("annotationSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "reverse-strand" => Some(("reverseStrand", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.coding-sequence.start" => Some(("transcript.codingSequence.start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.coding-sequence.end" => Some(("transcript.codingSequence.end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.gene-id" => Some(("transcript.geneId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-bases", "annotation-set-id", "clinical-significance", "coding-sequence", "effect", "end", "gene-id", "id", "name", "reference-id", "reference-name", "reverse-strand", "start", "transcript", "transcript-ids", "type", "variant"]); @@ -559,8 +559,8 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "source-uri" => Some(("sourceUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "dataset-id" => Some(("datasetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { @@ -753,9 +753,9 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "dataset-ids" => Some(("datasetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "dataset-ids" => Some(("datasetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "types" => Some(("types", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["dataset-ids", "name", "page-size", "page-token", "reference-set-id", "types"]); @@ -843,8 +843,8 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "source-uri" => Some(("sourceUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "dataset-id" => Some(("datasetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { @@ -1739,8 +1739,8 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -2315,9 +2315,9 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "reference-names" => Some(("referenceNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "export-uri" => Some(("exportUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-names" => Some(("referenceNames", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["export-uri", "project-id", "reference-names"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -2726,8 +2726,8 @@ impl<'n> Engine<'n> { "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "read-group-ids" => Some(("readGroupIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "start" => Some(("start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "read-group-set-ids" => Some(("readGroupSetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), _ => { @@ -2791,97 +2791,6 @@ impl<'n> Engine<'n> { } } - fn _reads_stream(&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()[..] { - "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "total-shards" => Some(("totalShards", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "read-group-set-id" => Some(("readGroupSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "shard" => Some(("shard", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "start" => Some(("start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["end", "project-id", "read-group-set-id", "reference-name", "shard", "start", "total-shards"]); - 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::StreamReadsRequest = json::value::from_value(object).unwrap(); - let mut call = self.hub.reads().stream(request); - 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(), - _ => 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(()) - } - } - } - } - fn _references_bases_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.references().bases_list(opt.value_of("reference-id").unwrap_or("")); @@ -3164,10 +3073,10 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "md5checksums" => Some(("md5checksums", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "assembly-id" => Some(("assemblyId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "accessions" => Some(("accessions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "assembly-id" => Some(("assemblyId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["accessions", "assembly-id", "md5checksums", "page-size", "page-token"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -3255,14 +3164,14 @@ impl<'n> Engine<'n> { "variant-set-id" => Some(("variantSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "created" => Some(("created", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "reference-bases" => Some(("referenceBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "start" => Some(("start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "names" => Some(("names", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "alternate-bases" => Some(("alternateBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "quality" => Some(("quality", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), - "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-bases" => Some(("referenceBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-bases", "created", "end", "filter", "id", "names", "quality", "reference-bases", "reference-name", "start", "variant-set-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -3452,10 +3361,10 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "variant-set-id" => Some(("variantSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "normalize-reference-names" => Some(("normalizeReferenceNames", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "format" => Some(("format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "source-uris" => Some(("sourceUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "info-merge-config" => Some(("infoMergeConfig", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), - "format" => Some(("format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "normalize-reference-names" => Some(("normalizeReferenceNames", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["format", "info-merge-config", "normalize-reference-names", "source-uris", "variant-set-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -3629,14 +3538,14 @@ impl<'n> Engine<'n> { "variant-set-id" => Some(("variantSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "created" => Some(("created", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "reference-bases" => Some(("referenceBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "start" => Some(("start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "names" => Some(("names", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "alternate-bases" => Some(("alternateBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "quality" => Some(("quality", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), - "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-bases" => Some(("referenceBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-bases", "created", "end", "filter", "id", "names", "quality", "reference-bases", "reference-name", "start", "variant-set-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -3730,10 +3639,10 @@ impl<'n> Engine<'n> { "start" => Some(("start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "max-calls" => Some(("maxCalls", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "call-set-ids" => Some(("callSetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "variant-set-ids" => Some(("variantSetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "variant-name" => Some(("variantName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "variant-set-ids" => Some(("variantSetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "call-set-ids" => Some(("callSetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["call-set-ids", "end", "max-calls", "page-size", "page-token", "reference-name", "start", "variant-name", "variant-set-ids"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -3795,96 +3704,6 @@ impl<'n> Engine<'n> { } } - fn _variants_stream(&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()[..] { - "variant-set-id" => Some(("variantSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "start" => Some(("start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "call-set-ids" => Some(("callSetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["call-set-ids", "end", "project-id", "reference-name", "start", "variant-set-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::StreamVariantsRequest = json::value::from_value(object).unwrap(); - let mut call = self.hub.variants().stream(request); - 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(), - _ => 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(()) - } - } - } - } - fn _variantsets_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -3908,9 +3727,9 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "dataset-id" => Some(("datasetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { @@ -4049,10 +3868,10 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "bigquery-table" => Some(("bigqueryTable", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "bigquery-dataset" => Some(("bigqueryDataset", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "bigquery-table" => Some(("bigqueryTable", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "call-set-ids" => Some(("callSetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "format" => Some(("format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["bigquery-dataset", "bigquery-table", "call-set-ids", "format", "project-id"]); @@ -4190,9 +4009,9 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "dataset-id" => Some(("datasetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { @@ -4510,9 +4329,6 @@ impl<'n> Engine<'n> { ("search", Some(opt)) => { call_result = self._reads_search(opt, dry_run, &mut err); }, - ("stream", Some(opt)) => { - call_result = self._reads_stream(opt, dry_run, &mut err); - }, _ => { err.issues.push(CLIError::MissingMethodError("reads".to_string())); writeln!(io::stderr(), "{}\n", opt.usage()).ok(); @@ -4573,9 +4389,6 @@ impl<'n> Engine<'n> { ("search", Some(opt)) => { call_result = self._variants_search(opt, dry_run, &mut err); }, - ("stream", Some(opt)) => { - call_result = self._variants_stream(opt, dry_run, &mut err); - }, _ => { err.issues.push(CLIError::MissingMethodError("variants".to_string())); writeln!(io::stderr(), "{}\n", opt.usage()).ok(); @@ -4696,7 +4509,20 @@ fn main() { let arg_data = [ ("annotations", "methods: 'batch-create', 'create', 'delete', 'get', 'search' and 'update'", vec![ ("batch-create", - Some(r##"Creates one or more new annotations atomically. All annotations must belong to the same annotation set. Caller must have WRITE permission for this annotation set. For optimal performance, batch positionally adjacent annotations together. If the request has a systemic issue, such as an attempt to write to an inaccessible annotation set, the entire RPC will fail accordingly. For lesser data issues, when possible an error will be isolated to the corresponding batch entry in the response; the remaining well formed annotations will be created normally. For details on the requirements for each individual annotation resource, see CreateAnnotation."##), + Some(r##"Creates one or more new annotations atomically. All annotations must + belong to the same annotation set. Caller must have WRITE + permission for this annotation set. For optimal performance, batch + positionally adjacent annotations together. + + If the request has a systemic issue, such as an attempt to write to + an inaccessible annotation set, the entire RPC will fail accordingly. For + lesser data issues, when possible an error will be isolated to the + corresponding batch entry in the response; the remaining well formed + annotations will be created normally. + + For details on the requirements for each individual annotation resource, + see + CreateAnnotation."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_batch-create", vec![ (Some(r##"kv"##), @@ -4718,7 +4544,28 @@ fn main() { Some(false)), ]), ("create", - Some(r##"Creates a new annotation. Caller must have WRITE permission for the associated annotation set. The following fields are required: * annotationSetId * referenceName or referenceId ### Transcripts For annotations of type TRANSCRIPT, the following fields of transcript must be provided: * exons.start * exons.end All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). The annotated range must be no longer than 100Mbp (mega base pairs). See the Annotation resource for additional restrictions on each field."##), + Some(r##"Creates a new annotation. Caller must have WRITE permission + for the associated annotation set. + + The following fields are required: + + * annotationSetId + * referenceName or + referenceId + + ### Transcripts + + For annotations of type TRANSCRIPT, the following fields of + transcript must be provided: + + * exons.start + * exons.end + + All other fields may be optionally specified, unless documented as being + server-generated (for example, the `id` field). The annotated + range must be no longer than 100Mbp (mega base pairs). See the + Annotation resource + for additional restrictions on each field."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_create", vec![ (Some(r##"kv"##), @@ -4740,7 +4587,8 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes an annotation. Caller must have WRITE permission for the associated annotation set."##), + Some(r##"Deletes an annotation. Caller must have WRITE permission for + the associated annotation set."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_delete", vec![ (Some(r##"annotation-id"##), @@ -4762,7 +4610,8 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets an annotation. Caller must have READ permission for the associated annotation set."##), + Some(r##"Gets an annotation. Caller must have READ permission + for the associated annotation set."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_get", vec![ (Some(r##"annotation-id"##), @@ -4784,7 +4633,13 @@ fn main() { Some(false)), ]), ("search", - Some(r##"Searches for annotations that match the given criteria. Results are ordered by genomic coordinate (by reference sequence, then position). Annotations with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotations in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried annotation sets."##), + Some(r##"Searches for annotations that match the given criteria. Results are + ordered by genomic coordinate (by reference sequence, then position). + Annotations with equivalent genomic coordinates are returned in an + unspecified order. This order is consistent, such that two queries for the + same content (regardless of page size) yield annotations in the same order + across their respective streams of paginated responses. Caller must have + READ permission for the queried annotation sets."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_search", vec![ (Some(r##"kv"##), @@ -4806,7 +4661,8 @@ fn main() { Some(false)), ]), ("update", - Some(r##"Updates an annotation. Caller must have WRITE permission for the associated dataset."##), + Some(r##"Updates an annotation. Caller must have + WRITE permission for the associated dataset."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_update", vec![ (Some(r##"annotation-id"##), @@ -4837,7 +4693,16 @@ fn main() { ("annotationsets", "methods: 'create', 'delete', 'get', 'search' and 'update'", vec![ ("create", - Some(r##"Creates a new annotation set. Caller must have WRITE permission for the associated dataset. The following fields are required: * datasetId * referenceSetId All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field)."##), + Some(r##"Creates a new annotation set. Caller must have WRITE permission for the + associated dataset. + + The following fields are required: + + * datasetId + * referenceSetId + + All other fields may be optionally specified, unless documented as being + server-generated (for example, the `id` field)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_create", vec![ (Some(r##"kv"##), @@ -4859,7 +4724,8 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes an annotation set. Caller must have WRITE permission for the associated annotation set."##), + Some(r##"Deletes an annotation set. Caller must have WRITE permission + for the associated annotation set."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_delete", vec![ (Some(r##"annotation-set-id"##), @@ -4881,7 +4747,8 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets an annotation set. Caller must have READ permission for the associated dataset."##), + Some(r##"Gets an annotation set. Caller must have READ permission for + the associated dataset."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_get", vec![ (Some(r##"annotation-set-id"##), @@ -4903,7 +4770,11 @@ fn main() { Some(false)), ]), ("search", - Some(r##"Searches for annotation sets that match the given criteria. Annotation sets are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotation sets in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried datasets."##), + Some(r##"Searches for annotation sets that match the given criteria. Annotation sets + are returned in an unspecified order. This order is consistent, such that + two queries for the same content (regardless of page size) yield annotation + sets in the same order across their respective streams of paginated + responses. Caller must have READ permission for the queried datasets."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_search", vec![ (Some(r##"kv"##), @@ -4925,7 +4796,9 @@ fn main() { Some(false)), ]), ("update", - Some(r##"Updates an annotation set. The update must respect all mutability restrictions and other invariants described on the annotation set resource. Caller must have WRITE permission for the associated dataset."##), + Some(r##"Updates an annotation set. The update must respect all mutability + restrictions and other invariants described on the annotation set resource. + Caller must have WRITE permission for the associated dataset."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_update", vec![ (Some(r##"annotation-set-id"##), @@ -4956,7 +4829,11 @@ fn main() { ("callsets", "methods: 'create', 'delete', 'get', 'patch' and 'search'", vec![ ("create", - Some(r##"Creates a new call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Creates a new call set. + + For the definitions of call sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/callsets_create", vec![ (Some(r##"kv"##), @@ -4978,7 +4855,11 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Deletes a call set. + + For the definitions of call sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/callsets_delete", vec![ (Some(r##"call-set-id"##), @@ -5000,7 +4881,11 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets a call set by ID. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Gets a call set by ID. + + For the definitions of call sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/callsets_get", vec![ (Some(r##"call-set-id"##), @@ -5022,7 +4907,13 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics."##), + Some(r##"Updates a call set. + + For the definitions of call sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + This method supports patch semantics."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/callsets_patch", vec![ (Some(r##"call-set-id"##), @@ -5050,7 +4941,14 @@ fn main() { Some(false)), ]), ("search", - Some(r##"Gets a list of call sets matching the criteria. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178)."##), + Some(r##"Gets a list of call sets matching the criteria. + + For the definitions of call sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Implements + [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/callsets_search", vec![ (Some(r##"kv"##), @@ -5075,7 +4973,11 @@ fn main() { ("datasets", "methods: 'create', 'delete', 'get', 'get-iam-policy', 'list', 'patch', 'set-iam-policy', 'test-iam-permissions' and 'undelete'", vec![ ("create", - Some(r##"Creates a new dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Creates a new dataset. + + For the definitions of datasets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_create", vec![ (Some(r##"kv"##), @@ -5097,7 +4999,16 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes a dataset and all of its contents (all read group sets, reference sets, variant sets, call sets, annotation sets, etc.) This is reversible (up to one week after the deletion) via the datasets.undelete operation. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Deletes a dataset and all of its contents (all read group sets, + reference sets, variant sets, call sets, annotation sets, etc.) + This is reversible (up to one week after the deletion) via + the + datasets.undelete + operation. + + For the definitions of datasets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_delete", vec![ (Some(r##"dataset-id"##), @@ -5119,7 +5030,11 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets a dataset by ID. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Gets a dataset by ID. + + For the definitions of datasets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_get", vec![ (Some(r##"dataset-id"##), @@ -5141,12 +5056,21 @@ fn main() { Some(false)), ]), ("get-iam-policy", - Some(r##"Gets the access control policy for the dataset. This is empty if the policy or resource does not exist. See Getting a Policy for more information. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Gets the access control policy for the dataset. This is empty if the + policy or resource does not exist. + + See Getting a + Policy for more information. + + For the definitions of datasets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_get-iam-policy", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being specified. Format is `datasets/`."##), + Some(r##"REQUIRED: The resource for which policy is being specified. Format is + `datasets/`."##), Some(true), Some(false)), @@ -5169,7 +5093,11 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Lists datasets within a project. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Lists datasets within a project. + + For the definitions of datasets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_list", vec![ (Some(r##"v"##), @@ -5185,7 +5113,13 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates a dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics."##), + Some(r##"Updates a dataset. + + For the definitions of datasets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + This method supports patch semantics."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_patch", vec![ (Some(r##"dataset-id"##), @@ -5213,12 +5147,21 @@ fn main() { Some(false)), ]), ("set-iam-policy", - Some(r##"Sets the access control policy on the specified dataset. Replaces any existing policy. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) See Setting a Policy for more information."##), + Some(r##"Sets the access control policy on the specified dataset. Replaces any + existing policy. + + For the definitions of datasets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + See Setting a + Policy for more information."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_set-iam-policy", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being specified. Format is `datasets/`."##), + Some(r##"REQUIRED: The resource for which policy is being specified. Format is + `datasets/`."##), Some(true), Some(false)), @@ -5241,12 +5184,19 @@ fn main() { Some(false)), ]), ("test-iam-permissions", - Some(r##"Returns permissions that a caller has on the specified resource. See Testing Permissions for more information. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Returns permissions that a caller has on the specified resource. + See Testing + Permissions for more information. + + For the definitions of datasets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_test-iam-permissions", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being specified. Format is `datasets/`."##), + Some(r##"REQUIRED: The resource for which policy is being specified. Format is + `datasets/`."##), Some(true), Some(false)), @@ -5269,7 +5219,13 @@ fn main() { Some(false)), ]), ("undelete", - Some(r##"Undeletes a dataset by restoring a dataset which was deleted via this API. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This operation is only possible for a week after the deletion occurred."##), + Some(r##"Undeletes a dataset by restoring a dataset which was deleted via this API. + + For the definitions of datasets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + This operation is only possible for a week after the deletion occurred."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_undelete", vec![ (Some(r##"dataset-id"##), @@ -5328,7 +5284,9 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service."##), + Some(r##"Gets the latest state of a long-running operation. Clients can use this + method to poll the operation result at intervals as recommended by the API + service."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/operations_get", vec![ (Some(r##"name"##), @@ -5375,7 +5333,19 @@ fn main() { ("readgroupsets", "methods: 'coveragebuckets-list', 'delete', 'export', 'get', 'import', 'patch' and 'search'", vec![ ("coveragebuckets-list", - Some(r##"Lists fixed width coverage buckets for a read group set, each of which correspond to a range of a reference sequence. Each bucket summarizes coverage information across its corresponding genomic range. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Coverage is defined as the number of reads which are aligned to a given base in the reference sequence. Coverage buckets are available at several precomputed bucket widths, enabling retrieval of various coverage 'zoom levels'. The caller must have READ permissions for the target read group set."##), + Some(r##"Lists fixed width coverage buckets for a read group set, each of which + correspond to a range of a reference sequence. Each bucket summarizes + coverage information across its corresponding genomic range. + + For the definitions of read group sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Coverage is defined as the number of reads which are aligned to a given + base in the reference sequence. Coverage buckets are available at several + precomputed bucket widths, enabling retrieval of various coverage 'zoom + levels'. The caller must have READ permissions for the target read group + set."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/readgroupsets_coveragebuckets-list", vec![ (Some(r##"read-group-set-id"##), @@ -5397,12 +5367,17 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Deletes a read group set. + + For the definitions of read group sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/readgroupsets_delete", vec![ (Some(r##"read-group-set-id"##), None, - Some(r##"The ID of the read group set to be deleted. The caller must have WRITE permissions to the dataset associated with this read group set."##), + Some(r##"The ID of the read group set to be deleted. The caller must have WRITE + permissions to the dataset associated with this read group set."##), Some(true), Some(false)), @@ -5419,12 +5394,22 @@ fn main() { Some(false)), ]), ("export", - Some(r##"Exports a read group set to a BAM file in Google Cloud Storage. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Note that currently there may be some differences between exported BAM files and the original BAM file at the time of import. See ImportReadGroupSets for caveats."##), + Some(r##"Exports a read group set to a BAM file in Google Cloud Storage. + + For the definitions of read group sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Note that currently there may be some differences between exported BAM + files and the original BAM file at the time of import. See + ImportReadGroupSets + for caveats."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/readgroupsets_export", vec![ (Some(r##"read-group-set-id"##), None, - Some(r##"Required. The ID of the read group set to export. The caller must have READ access to this read group set."##), + Some(r##"Required. The ID of the read group set to export. The caller must have + READ access to this read group set."##), Some(true), Some(false)), @@ -5447,7 +5432,11 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets a read group set by ID. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Gets a read group set by ID. + + For the definitions of read group sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/readgroupsets_get", vec![ (Some(r##"read-group-set-id"##), @@ -5469,7 +5458,24 @@ fn main() { Some(false)), ]), ("import", - Some(r##"Creates read group sets by asynchronously importing the provided information. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The caller must have WRITE permissions to the dataset. ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import - Tags will be converted to strings - tag types are not preserved - Comments (`@CO`) in the input file header will not be preserved - Original header order of references (`@SQ`) will not be preserved - Any reverse stranded unmapped reads will be reverse complemented, and their qualities (also the "BQ" and "OQ" tags, if any) will be reversed - Unmapped reads will be stripped of positional information (reference name and position)"##), + Some(r##"Creates read group sets by asynchronously importing the provided + information. + + For the definitions of read group sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + The caller must have WRITE permissions to the dataset. + + ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import + + - Tags will be converted to strings - tag types are not preserved + - Comments (`@CO`) in the input file header will not be preserved + - Original header order of references (`@SQ`) will not be preserved + - Any reverse stranded unmapped reads will be reverse complemented, and + their qualities (also the "BQ" and "OQ" tags, if any) will be reversed + - Unmapped reads will be stripped of positional information (reference name + and position)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/readgroupsets_import", vec![ (Some(r##"kv"##), @@ -5491,12 +5497,19 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics."##), + Some(r##"Updates a read group set. + + For the definitions of read group sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + This method supports patch semantics."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/readgroupsets_patch", vec![ (Some(r##"read-group-set-id"##), None, - Some(r##"The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set."##), + Some(r##"The ID of the read group set to be updated. The caller must have WRITE + permissions to the dataset associated with this read group set."##), Some(true), Some(false)), @@ -5519,7 +5532,14 @@ fn main() { Some(false)), ]), ("search", - Some(r##"Searches for read group sets matching the criteria. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135)."##), + Some(r##"Searches for read group sets matching the criteria. + + For the definitions of read group sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Implements + [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/readgroupsets_search", vec![ (Some(r##"kv"##), @@ -5542,9 +5562,32 @@ fn main() { ]), ]), - ("reads", "methods: 'search' and 'stream'", vec![ + ("reads", "methods: 'search'", vec![ ("search", - Some(r##"Gets a list of reads for one or more read group sets. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Reads search operates over a genomic coordinate space of reference sequence & position defined over the reference sequences to which the requested read group sets are aligned. If a target positional range is specified, search returns all reads whose alignment to the reference genome overlap the range. A query which specifies only read group set IDs yields all reads in those read group sets, including unmapped reads. All reads returned (including reads on subsequent pages) are ordered by genomic coordinate (by reference sequence, then position). Reads with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield reads in the same order across their respective streams of paginated responses. Implements [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85)."##), + Some(r##"Gets a list of reads for one or more read group sets. + + For the definitions of read group sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Reads search operates over a genomic coordinate space of reference sequence + & position defined over the reference sequences to which the requested + read group sets are aligned. + + If a target positional range is specified, search returns all reads whose + alignment to the reference genome overlap the range. A query which + specifies only read group set IDs yields all reads in those read group + sets, including unmapped reads. + + All reads returned (including reads on subsequent pages) are ordered by + genomic coordinate (by reference sequence, then position). Reads with + equivalent genomic coordinates are returned in an unspecified order. This + order is consistent, such that two queries for the same content (regardless + of page size) yield reads in the same order across their respective streams + of paginated responses. + + Implements + [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/reads_search", vec![ (Some(r##"kv"##), @@ -5559,28 +5602,6 @@ fn main() { 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)), - ]), - ("stream", - Some(r##"Returns a stream of all the reads matching the search request, ordered by reference name, position, and ID."##), - "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/reads_stream", - vec![ - (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"##), @@ -5591,7 +5612,14 @@ fn main() { ("references", "methods: 'bases-list', 'get' and 'search'", vec![ ("bases-list", - Some(r##"Lists the bases in a reference, optionally restricted to a range. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221)."##), + Some(r##"Lists the bases in a reference, optionally restricted to a range. + + For the definitions of references and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Implements + [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/references_bases-list", vec![ (Some(r##"reference-id"##), @@ -5613,7 +5641,14 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets a reference. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158)."##), + Some(r##"Gets a reference. + + For the definitions of references and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Implements + [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/references_get", vec![ (Some(r##"reference-id"##), @@ -5635,7 +5670,14 @@ fn main() { Some(false)), ]), ("search", - Some(r##"Searches for references which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146)."##), + Some(r##"Searches for references which match the given criteria. + + For the definitions of references and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Implements + [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/references_search", vec![ (Some(r##"kv"##), @@ -5660,7 +5702,14 @@ fn main() { ("referencesets", "methods: 'get' and 'search'", vec![ ("get", - Some(r##"Gets a reference set. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83)."##), + Some(r##"Gets a reference set. + + For the definitions of references and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Implements + [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/referencesets_get", vec![ (Some(r##"reference-set-id"##), @@ -5682,7 +5731,14 @@ fn main() { Some(false)), ]), ("search", - Some(r##"Searches for reference sets which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)"##), + Some(r##"Searches for reference sets which match the given criteria. + + For the definitions of references and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Implements + [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/referencesets_search", vec![ (Some(r##"kv"##), @@ -5705,9 +5761,13 @@ fn main() { ]), ]), - ("variants", "methods: 'create', 'delete', 'get', 'import', 'merge', 'patch', 'search' and 'stream'", vec![ + ("variants", "methods: 'create', 'delete', 'get', 'import', 'merge', 'patch' and 'search'", vec![ ("create", - Some(r##"Creates a new variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Creates a new variant. + + For the definitions of variants and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_create", vec![ (Some(r##"kv"##), @@ -5729,7 +5789,11 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Deletes a variant. + + For the definitions of variants and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_delete", vec![ (Some(r##"variant-id"##), @@ -5751,7 +5815,11 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets a variant by ID. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Gets a variant by ID. + + For the definitions of variants and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_get", vec![ (Some(r##"variant-id"##), @@ -5773,7 +5841,24 @@ fn main() { Some(false)), ]), ("import", - Some(r##"Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and Variant info fields are merged as specified in infoMergeConfig. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set."##), + Some(r##"Creates variant data by asynchronously importing the provided information. + + For the definitions of variant sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + The variants for import will be merged with any existing variant that + matches its reference sequence, start, end, reference bases, and + alternative bases. If no such variant exists, a new one will be created. + + When variants are merged, the call information from the new variant + is added to the existing variant, and Variant info fields are merged + as specified in + infoMergeConfig. + As a special case, for single-sample VCF files, QUAL and FILTER fields will + be moved to the call level; these are sometimes interpreted in a + call-specific context. + Imported VCF headers are appended to the metadata already in a variant set."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_import", vec![ (Some(r##"kv"##), @@ -5795,7 +5880,97 @@ fn main() { Some(false)), ]), ("merge", - Some(r##"Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant. Variant info fields are merged as specified in the infoMergeConfig field of the MergeVariantsRequest. Please exercise caution when using this method! It is easy to introduce mistakes in existing variants and difficult to back out of them. For example, suppose you were trying to merge a new variant with an existing one and both variants contain calls that belong to callsets with the same callset ID. // Existing variant - irrelevant fields trimmed for clarity { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 0, 1 ], } ] } // New variant with conflicting call information { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } The resulting merged variant would overwrite the existing calls with those from the new variant: { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } This may be the desired outcome, but it is up to the user to determine if if that is indeed the case."##), + Some(r##"Merges the given variants with existing variants. + + For the definitions of variants and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Each variant will be + merged with an existing variant that matches its reference sequence, + start, end, reference bases, and alternative bases. If no such variant + exists, a new one will be created. + + When variants are merged, the call information from the new variant + is added to the existing variant. Variant info fields are merged as + specified in the + infoMergeConfig + field of the MergeVariantsRequest. + + Please exercise caution when using this method! It is easy to introduce + mistakes in existing variants and difficult to back out of them. For + example, + suppose you were trying to merge a new variant with an existing one and + both + variants contain calls that belong to callsets with the same callset ID. + + // Existing variant - irrelevant fields trimmed for clarity + { + "variantSetId": "10473108253681171589", + "referenceName": "1", + "start": "10582", + "referenceBases": "G", + "alternateBases": [ + "A" + ], + "calls": [ + { + "callSetId": "10473108253681171589-0", + "callSetName": "CALLSET0", + "genotype": [ + 0, + 1 + ], + } + ] + } + + // New variant with conflicting call information + { + "variantSetId": "10473108253681171589", + "referenceName": "1", + "start": "10582", + "referenceBases": "G", + "alternateBases": [ + "A" + ], + "calls": [ + { + "callSetId": "10473108253681171589-0", + "callSetName": "CALLSET0", + "genotype": [ + 1, + 1 + ], + } + ] + } + + The resulting merged variant would overwrite the existing calls with those + from the new variant: + + { + "variantSetId": "10473108253681171589", + "referenceName": "1", + "start": "10582", + "referenceBases": "G", + "alternateBases": [ + "A" + ], + "calls": [ + { + "callSetId": "10473108253681171589-0", + "callSetName": "CALLSET0", + "genotype": [ + 1, + 1 + ], + } + ] + } + + This may be the desired outcome, but it is up to the user to determine if + if that is indeed the case."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_merge", vec![ (Some(r##"kv"##), @@ -5817,7 +5992,14 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. Returns the modified variant without its calls."##), + Some(r##"Updates a variant. + + For the definitions of variants and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + This method supports patch semantics. Returns the modified variant without + its calls."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_patch", vec![ (Some(r##"variant-id"##), @@ -5845,7 +6027,14 @@ fn main() { Some(false)), ]), ("search", - Some(r##"Gets a list of variants matching the criteria. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126)."##), + Some(r##"Gets a list of variants matching the criteria. + + For the definitions of variants and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Implements + [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_search", vec![ (Some(r##"kv"##), @@ -5860,28 +6049,6 @@ fn main() { 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)), - ]), - ("stream", - Some(r##"Returns a stream of all the variants matching the search request, ordered by reference name, position, and ID."##), - "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_stream", - vec![ - (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"##), @@ -5892,7 +6059,15 @@ fn main() { ("variantsets", "methods: 'create', 'delete', 'export', 'get', 'patch' and 'search'", vec![ ("create", - Some(r##"Creates a new variant set. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The provided variant set must have a valid `datasetId` set - all other fields are optional. Note that the `id` field will be ignored, as this is assigned by the server."##), + Some(r##"Creates a new variant set. + + For the definitions of variant sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + The provided variant set must have a valid `datasetId` set - all other + fields are optional. Note that the `id` field will be ignored, as this is + assigned by the server."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variantsets_create", vec![ (Some(r##"kv"##), @@ -5914,7 +6089,12 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes a variant set including all variants, call sets, and calls within. This is not reversible. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Deletes a variant set including all variants, call sets, and calls within. + This is not reversible. + + For the definitions of variant sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variantsets_delete", vec![ (Some(r##"variant-set-id"##), @@ -5936,12 +6116,17 @@ fn main() { Some(false)), ]), ("export", - Some(r##"Exports variant set data to an external destination. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Exports variant set data to an external destination. + + For the definitions of variant sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variantsets_export", vec![ (Some(r##"variant-set-id"##), None, - Some(r##"Required. The ID of the variant set that contains variant data which should be exported. The caller must have READ access to this variant set."##), + Some(r##"Required. The ID of the variant set that contains variant data which + should be exported. The caller must have READ access to this variant set."##), Some(true), Some(false)), @@ -5964,7 +6149,11 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets a variant set by ID. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Gets a variant set by ID. + + For the definitions of variant sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variantsets_get", vec![ (Some(r##"variant-set-id"##), @@ -5986,7 +6175,11 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates a variant set using patch semantics. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Updates a variant set using patch semantics. + + For the definitions of variant sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variantsets_patch", vec![ (Some(r##"variant-set-id"##), @@ -6014,7 +6207,14 @@ fn main() { Some(false)), ]), ("search", - Some(r##"Returns a list of all variant sets matching search criteria. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49)."##), + Some(r##"Returns a list of all variant sets matching search criteria. + + For the definitions of variant sets and other genomics resources, see + [Fundamentals of Google + Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + + Implements + [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49)."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variantsets_search", vec![ (Some(r##"kv"##), @@ -6041,8 +6241,8 @@ fn main() { let mut app = App::new("genomics1") .author("Sebastian Thiel ") - .version("1.0.4+20160928") - .about("Stores, processes, explores and shares genomic data.") + .version("1.0.4+20170520") + .about("Upload, process, query, and search Genomics data in the cloud.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_genomics1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/genomics1/Cargo.toml b/gen/genomics1/Cargo.toml index 6a3b057245..5a2e55e57c 100644 --- a/gen/genomics1/Cargo.toml +++ b/gen/genomics1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-genomics1" -version = "1.0.4+20160928" +version = "1.0.4+20170520" authors = ["Sebastian Thiel "] description = "A complete library to interact with genomics (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/genomics1" -homepage = "https://cloud.google.com/genomics/" -documentation = "https://docs.rs/google-genomics1/1.0.4+20160928" +homepage = "https://cloud.google.com/genomics" +documentation = "https://docs.rs/google-genomics1/1.0.4+20170520" license = "MIT" keywords = ["genomics", "google", "protocol", "web", "api"] diff --git a/gen/genomics1/README.md b/gen/genomics1/README.md index e16873f78a..6a1a26323f 100644 --- a/gen/genomics1/README.md +++ b/gen/genomics1/README.md @@ -5,36 +5,36 @@ DO NOT EDIT ! --> The `google-genomics1` library allows access to all features of the *Google genomics* service. -This documentation was generated from *genomics* crate version *1.0.4+20160928*, where *20160928* is the exact revision of the *genomics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *genomics* crate version *1.0.4+20170520*, where *20170520* is the exact revision of the *genomics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *genomics* *v1* API can be found at the -[official documentation site](https://cloud.google.com/genomics/). +[official documentation site](https://cloud.google.com/genomics). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.Genomics.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.Genomics.html) ... -* [annotations](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.Annotation.html) - * [*batch create*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationBatchCreateCall.html), [*create*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationGetCall.html), [*search*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationSearchCall.html) and [*update*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationUpdateCall.html) +* [annotations](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.Annotation.html) + * [*batch create*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationBatchCreateCall.html), [*create*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationGetCall.html), [*search*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationSearchCall.html) and [*update*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationUpdateCall.html) * annotationsets - * [*create*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationsetCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationsetDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationsetGetCall.html), [*search*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationsetSearchCall.html) and [*update*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.AnnotationsetUpdateCall.html) + * [*create*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationsetCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationsetDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationsetGetCall.html), [*search*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationsetSearchCall.html) and [*update*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.AnnotationsetUpdateCall.html) * callsets - * [*create*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.CallsetCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.CallsetDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.CallsetGetCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.CallsetPatchCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.CallsetSearchCall.html) -* [datasets](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.Dataset.html) - * [*create*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.DatasetCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.DatasetDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.DatasetGetCall.html), [*get iam policy*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.DatasetGetIamPolicyCall.html), [*list*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.DatasetListCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.DatasetPatchCall.html), [*set iam policy*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.DatasetSetIamPolicyCall.html), [*test iam permissions*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.DatasetTestIamPermissionCall.html) and [*undelete*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.DatasetUndeleteCall.html) -* [operations](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.Operation.html) - * [*cancel*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.OperationCancelCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.OperationGetCall.html) and [*list*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.OperationListCall.html) + * [*create*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.CallsetCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.CallsetDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.CallsetGetCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.CallsetPatchCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.CallsetSearchCall.html) +* [datasets](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.Dataset.html) + * [*create*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.DatasetCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.DatasetDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.DatasetGetCall.html), [*get iam policy*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.DatasetGetIamPolicyCall.html), [*list*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.DatasetListCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.DatasetPatchCall.html), [*set iam policy*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.DatasetSetIamPolicyCall.html), [*test iam permissions*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.DatasetTestIamPermissionCall.html) and [*undelete*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.DatasetUndeleteCall.html) +* [operations](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.Operation.html) + * [*cancel*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.OperationCancelCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.OperationGetCall.html) and [*list*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.OperationListCall.html) * readgroupsets - * [*coveragebuckets list*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReadgroupsetCoveragebucketListCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReadgroupsetDeleteCall.html), [*export*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReadgroupsetExportCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReadgroupsetGetCall.html), [*import*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReadgroupsetImportCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReadgroupsetPatchCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReadgroupsetSearchCall.html) -* [reads](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.Read.html) - * [*search*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReadSearchCall.html) and [*stream*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReadStreamCall.html) -* [references](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.Reference.html) - * [*bases list*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReferenceBaseListCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReferenceGetCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReferenceSearchCall.html) + * [*coveragebuckets list*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReadgroupsetCoveragebucketListCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReadgroupsetDeleteCall.html), [*export*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReadgroupsetExportCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReadgroupsetGetCall.html), [*import*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReadgroupsetImportCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReadgroupsetPatchCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReadgroupsetSearchCall.html) +* [reads](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.Read.html) + * [*search*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReadSearchCall.html) +* [references](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.Reference.html) + * [*bases list*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReferenceBaseListCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReferenceGetCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReferenceSearchCall.html) * referencesets - * [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReferencesetGetCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.ReferencesetSearchCall.html) -* [variants](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.Variant.html) - * [*create*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantGetCall.html), [*import*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantImportCall.html), [*merge*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantMergeCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantPatchCall.html), [*search*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantSearchCall.html) and [*stream*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantStreamCall.html) + * [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReferencesetGetCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.ReferencesetSearchCall.html) +* [variants](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.Variant.html) + * [*create*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantDeleteCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantGetCall.html), [*import*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantImportCall.html), [*merge*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantMergeCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantPatchCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantSearchCall.html) * variantsets - * [*create*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantsetCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantsetDeleteCall.html), [*export*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantsetExportCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantsetGetCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantsetPatchCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.VariantsetSearchCall.html) + * [*create*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantsetCreateCall.html), [*delete*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantsetDeleteCall.html), [*export*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantsetExportCall.html), [*get*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantsetGetCall.html), [*patch*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantsetPatchCall.html) and [*search*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.VariantsetSearchCall.html) @@ -43,17 +43,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/struct.Genomics.html)** +* **[Hub](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/struct.Genomics.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.Part.html)** + * **[Parts](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -150,17 +150,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.Delegate.html), 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-genomics1/1.0.4+20160928/google_genomics1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.ResponseResult.html), 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")`. @@ -170,29 +170,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.CallBuilder.html) 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-genomics1/1.0.4+20160928/google_genomics1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-genomics1/1.0.4+20160928/google_genomics1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.CallBuilder.html), 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-genomics1/1.0.4+20160928/google_genomics1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-genomics1/1.0.4+20170520/google_genomics1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/genomics1/src/lib.rs b/gen/genomics1/src/lib.rs index a386aef3d8..e1a493ecb5 100644 --- a/gen/genomics1/src/lib.rs +++ b/gen/genomics1/src/lib.rs @@ -2,10 +2,10 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *genomics* crate version *1.0.4+20160928*, where *20160928* is the exact revision of the *genomics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *genomics* crate version *1.0.4+20170520*, where *20170520* is the exact revision of the *genomics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *genomics* *v1* API can be found at the -//! [official documentation site](https://cloud.google.com/genomics/). +//! [official documentation site](https://cloud.google.com/genomics). //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/genomics1). //! # Features //! @@ -24,13 +24,13 @@ //! * readgroupsets //! * [*coveragebuckets list*](struct.ReadgroupsetCoveragebucketListCall.html), [*delete*](struct.ReadgroupsetDeleteCall.html), [*export*](struct.ReadgroupsetExportCall.html), [*get*](struct.ReadgroupsetGetCall.html), [*import*](struct.ReadgroupsetImportCall.html), [*patch*](struct.ReadgroupsetPatchCall.html) and [*search*](struct.ReadgroupsetSearchCall.html) //! * [reads](struct.Read.html) -//! * [*search*](struct.ReadSearchCall.html) and [*stream*](struct.ReadStreamCall.html) +//! * [*search*](struct.ReadSearchCall.html) //! * [references](struct.Reference.html) //! * [*bases list*](struct.ReferenceBaseListCall.html), [*get*](struct.ReferenceGetCall.html) and [*search*](struct.ReferenceSearchCall.html) //! * referencesets //! * [*get*](struct.ReferencesetGetCall.html) and [*search*](struct.ReferencesetSearchCall.html) //! * [variants](struct.Variant.html) -//! * [*create*](struct.VariantCreateCall.html), [*delete*](struct.VariantDeleteCall.html), [*get*](struct.VariantGetCall.html), [*import*](struct.VariantImportCall.html), [*merge*](struct.VariantMergeCall.html), [*patch*](struct.VariantPatchCall.html), [*search*](struct.VariantSearchCall.html) and [*stream*](struct.VariantStreamCall.html) +//! * [*create*](struct.VariantCreateCall.html), [*delete*](struct.VariantDeleteCall.html), [*get*](struct.VariantGetCall.html), [*import*](struct.VariantImportCall.html), [*merge*](struct.VariantMergeCall.html), [*patch*](struct.VariantPatchCall.html) and [*search*](struct.VariantSearchCall.html) //! * variantsets //! * [*create*](struct.VariantsetCreateCall.html), [*delete*](struct.VariantsetDeleteCall.html), [*export*](struct.VariantsetExportCall.html), [*get*](struct.VariantsetGetCall.html), [*patch*](struct.VariantsetPatchCall.html) and [*search*](struct.VariantsetSearchCall.html) //! @@ -250,8 +250,8 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { - /// Manage your data in Google Cloud Storage - DevstorageReadWrite, + /// View and manage Genomics data + Full, /// View Genomics data Readonly, @@ -259,8 +259,8 @@ pub enum Scope { /// View and manage your data across Google Cloud Platform services CloudPlatform, - /// View and manage Genomics data - Full, + /// Manage your data in Google Cloud Storage + DevstorageReadWrite, /// View and manage your data in Google BigQuery Bigquery, @@ -269,10 +269,10 @@ pub enum Scope { impl AsRef for Scope { fn as_ref(&self) -> &str { match *self { - Scope::DevstorageReadWrite => "https://www.googleapis.com/auth/devstorage.read_write", + Scope::Full => "https://www.googleapis.com/auth/genomics", Scope::Readonly => "https://www.googleapis.com/auth/genomics.readonly", Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", - Scope::Full => "https://www.googleapis.com/auth/genomics", + Scope::DevstorageReadWrite => "https://www.googleapis.com/auth/devstorage.read_write", Scope::Bigquery => "https://www.googleapis.com/auth/bigquery", } } @@ -417,39 +417,23 @@ impl<'a, C, A> Genomics // ############ // SCHEMAS ### // ########## -/// There is no detailed description. -/// -/// # 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*). -/// -/// * [stream variants](struct.VariantStreamCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct StreamVariantsResponse { - /// no description provided - pub variants: Option>, -} - -impl ResponseResult for StreamVariantsResponse {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ClinicalCondition { - /// The MedGen concept id associated with this gene. Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/ - #[serde(rename="conceptId")] - pub concept_id: Option, - /// The OMIM id for this condition. Search for these IDs at http://omim.org/ - #[serde(rename="omimId")] - pub omim_id: Option, /// The set of external IDs for this condition. #[serde(rename="externalIds")] pub external_ids: Option>, + /// The OMIM id for this condition. + /// Search for these IDs at http://omim.org/ + #[serde(rename="omimId")] + pub omim_id: Option, + /// The MedGen concept id associated with this gene. + /// Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/ + #[serde(rename="conceptId")] + pub concept_id: Option, /// A set of names for the condition. pub names: Option>, } @@ -468,13 +452,17 @@ impl Part for ClinicalCondition {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchVariantSetsRequest { - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. #[serde(rename="pageToken")] pub page_token: Option, - /// Exactly one dataset ID must be provided here. Only variant sets which belong to this dataset will be returned. + /// Exactly one dataset ID must be provided here. Only variant sets which + /// belong to this dataset will be returned. #[serde(rename="datasetIds")] pub dataset_ids: Option>, - /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 1024. #[serde(rename="pageSize")] pub page_size: Option, } @@ -493,115 +481,88 @@ impl RequestValue for SearchVariantSetsRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExportReadGroupSetRequest { - /// Required. The Google Cloud project ID that owns this export. The caller must have WRITE access to this project. - #[serde(rename="projectId")] - pub project_id: Option, - /// The reference names to export. If this is not specified, all reference sequences, including unmapped reads, are exported. Use `*` to export only unmapped reads. - #[serde(rename="referenceNames")] - pub reference_names: Option>, - /// Required. A Google Cloud Storage URI for the exported BAM file. The currently authenticated user must have write access to the new file. An error will be returned if the URI already contains data. + /// Required. A Google Cloud Storage URI for the exported BAM file. + /// The currently authenticated user must have write access to the new file. + /// An error will be returned if the URI already contains data. #[serde(rename="exportUri")] pub export_uri: Option, + /// The reference names to export. If this is not specified, all reference + /// sequences, including unmapped reads, are exported. + /// Use `*` to export only unmapped reads. + #[serde(rename="referenceNames")] + pub reference_names: Option>, + /// Required. The Google Cloud project ID that owns this + /// export. The caller must have WRITE access to this project. + #[serde(rename="projectId")] + pub project_id: Option, } impl RequestValue for ExportReadGroupSetRequest {} -/// The read group set search request. -/// -/// # 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*). -/// -/// * [search readgroupsets](struct.ReadgroupsetSearchCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchReadGroupSetsRequest { - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. - #[serde(rename="pageToken")] - pub page_token: Option, - /// Restricts this query to read group sets within the given datasets. At least one ID must be provided. - #[serde(rename="datasetIds")] - pub dataset_ids: Option>, - /// Only return read group sets for which a substring of the name matches this string. - pub name: Option, - /// The maximum number of results to return in a single page. If unspecified, defaults to 256. The maximum value is 1024. - #[serde(rename="pageSize")] - pub page_size: Option, -} - -impl RequestValue for SearchReadGroupSetsRequest {} - - -/// There is no detailed description. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct VariantAnnotation { - /// Google annotation IDs of the transcripts affected by this variant. These should be provided when the variant is created. - #[serde(rename="transcriptIds")] - pub transcript_ids: Option>, - /// The alternate allele for this variant. If multiple alternate alleles exist at this location, create a separate variant for each one, as they may represent distinct conditions. - #[serde(rename="alternateBases")] - pub alternate_bases: Option, - /// Describes the clinical significance of a variant. It is adapted from the ClinVar controlled vocabulary for clinical significance described at: http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/ - #[serde(rename="clinicalSignificance")] - pub clinical_significance: Option, - /// The set of conditions associated with this variant. A condition describes the way a variant influences human health. - pub conditions: Option>, - /// Type has been adapted from ClinVar's list of variant types. - #[serde(rename="type")] - pub type_: Option, - /// Effect of the variant on the coding sequence. - pub effect: Option, - /// Google annotation ID of the gene affected by this variant. This should be provided when the variant is created. - #[serde(rename="geneId")] - pub gene_id: Option, -} - -impl Part for VariantAnnotation {} - - -/// There is no detailed description. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Entry { - /// The creation status. - pub status: Option, - /// The created annotation, if creation was successful. - pub annotation: Option, -} - -impl Part for Entry {} - - /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Program { + /// The ID of the program run before this one. + #[serde(rename="prevProgramId")] + pub prev_program_id: Option, /// The command line used to run this program. #[serde(rename="commandLine")] pub command_line: Option, /// The version of the program run. pub version: Option, - /// The user specified locally unique ID of the program. Used along with `prevProgramId` to define an ordering between programs. + /// The user specified locally unique ID of the program. Used along with + /// `prevProgramId` to define an ordering between programs. pub id: Option, - /// The display name of the program. This is typically the colloquial name of the tool used, for example 'bwa' or 'picard'. + /// The display name of the program. This is typically the colloquial name of + /// the tool used, for example 'bwa' or 'picard'. pub name: Option, - /// The ID of the program run before this one. - #[serde(rename="prevProgramId")] - pub prev_program_id: Option, } impl Part for Program {} +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct VariantAnnotation { + /// Google annotation IDs of the transcripts affected by this variant. These + /// should be provided when the variant is created. + #[serde(rename="transcriptIds")] + pub transcript_ids: Option>, + /// The alternate allele for this variant. If multiple alternate alleles + /// exist at this location, create a separate variant for each one, as they + /// may represent distinct conditions. + #[serde(rename="alternateBases")] + pub alternate_bases: Option, + /// Describes the clinical significance of a variant. + /// It is adapted from the ClinVar controlled vocabulary for clinical + /// significance described at: + /// http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/ + #[serde(rename="clinicalSignificance")] + pub clinical_significance: Option, + /// The set of conditions associated with this variant. + /// A condition describes the way a variant influences human health. + pub conditions: Option>, + /// Type has been adapted from ClinVar's list of variant types. + #[serde(rename="type")] + pub type_: Option, + /// Effect of the variant on the coding sequence. + pub effect: Option, + /// Google annotation ID of the gene affected by this variant. This should + /// be provided when the variant is created. + #[serde(rename="geneId")] + pub gene_id: Option, +} + +impl Part for VariantAnnotation {} + + /// The variant data import request. /// /// # Activities @@ -616,23 +577,44 @@ pub struct ImportVariantsRequest { /// Required. The variant set to which variant data should be imported. #[serde(rename="variantSetId")] pub variant_set_id: Option, - /// The format of the variant data being imported. If unspecified, defaults to to `VCF`. - pub format: Option, - /// A list of URIs referencing variant files in Google Cloud Storage. URIs can include wildcards [as described here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). Note that recursive wildcards ('**') are not supported. - #[serde(rename="sourceUris")] - pub source_uris: Option>, - /// A mapping between info field keys and the InfoMergeOperations to be performed on them. This is plumbed down to the MergeVariantRequests generated by the resulting import job. - #[serde(rename="infoMergeConfig")] - pub info_merge_config: Option>, - /// Convert reference names to the canonical representation. hg19 haploytypes (those reference names containing "_hap") are not modified in any way. All other reference names are modified according to the following rules: The reference name is capitalized. The "chr" prefix is dropped for all autosomes and sex chromsomes. For example "chr17" becomes "17" and "chrX" becomes "X". All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". + /// Convert reference names to the canonical representation. + /// hg19 haploytypes (those reference names containing "_hap") + /// are not modified in any way. + /// All other reference names are modified according to the following rules: + /// The reference name is capitalized. + /// The "chr" prefix is dropped for all autosomes and sex chromsomes. + /// For example "chr17" becomes "17" and "chrX" becomes "X". + /// All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". #[serde(rename="normalizeReferenceNames")] pub normalize_reference_names: Option, + /// A list of URIs referencing variant files in Google Cloud Storage. URIs can + /// include wildcards [as described + /// here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). + /// Note that recursive wildcards ('**') are not supported. + #[serde(rename="sourceUris")] + pub source_uris: Option>, + /// A mapping between info field keys and the InfoMergeOperations to + /// be performed on them. This is plumbed down to the MergeVariantRequests + /// generated by the resulting import job. + #[serde(rename="infoMergeConfig")] + pub info_merge_config: Option>, + /// The format of the variant data being imported. If unspecified, defaults to + /// to `VCF`. + pub format: Option, } impl RequestValue for ImportVariantsRequest {} -/// 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); } The JSON representation for `Empty` is empty JSON object `{}`. +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. /// /// # Activities /// @@ -655,17 +637,71 @@ pub struct Empty { _never_set: Option } impl ResponseResult for Empty {} -/// The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. +/// The `Status` type defines a logical error model that is suitable for different +/// programming environments, including REST APIs and RPC APIs. It is used by +/// [gRPC](https://github.com/grpc). The error model is designed to be: +/// +/// - Simple to use and understand for most users +/// - Flexible enough to meet unexpected needs +/// +/// # Overview +/// +/// The `Status` message contains three pieces of data: error code, error message, +/// and error details. The error code should be an enum value of +/// google.rpc.Code, but it may accept additional error codes if needed. The +/// error message should be a developer-facing English message that helps +/// developers *understand* and *resolve* the error. If a localized user-facing +/// error message is needed, put the localized message in the error details or +/// localize it in the client. The optional error details may contain arbitrary +/// information about the error. There is a predefined set of error detail types +/// in the package `google.rpc` that can be used for common error conditions. +/// +/// # Language mapping +/// +/// The `Status` message is the logical representation of the error model, but it +/// is not necessarily the actual wire format. When the `Status` message is +/// exposed in different client libraries and different wire protocols, it can be +/// mapped differently. For example, it will likely be mapped to some exceptions +/// in Java, but more likely mapped to some error codes in C. +/// +/// # Other uses +/// +/// The error model and the `Status` message can be used in a variety of +/// environments, either with or without APIs, to provide a +/// consistent developer experience across different environments. +/// +/// Example uses of this error model include: +/// +/// - Partial errors. If a service needs to return partial errors to the client, +/// it may embed the `Status` in the normal response to indicate the partial +/// errors. +/// +/// - Workflow errors. A typical workflow has multiple steps. Each step may +/// have a `Status` message for error reporting. +/// +/// - Batch operations. If a client uses batch request and batch response, the +/// `Status` message should be used directly inside batch response, one for +/// each error sub-response. +/// +/// - Asynchronous operations. If an API call embeds asynchronous operation +/// results in its response, the status of those operations should be +/// represented directly using the `Status` message. +/// +/// - Logging. If some API errors are stored in logs, the message `Status` could +/// be used directly after any stripping needed for security/privacy reasons. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Status { - /// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + /// A developer-facing error message, which should be in English. Any + /// user-facing error message should be localized and sent in the + /// google.rpc.Status.details field, or localized by the client. pub message: Option, /// The status code, which should be an enum value of google.rpc.Code. pub code: Option, - /// A list of messages that carry the error details. There will be a common set of message types for APIs to use. + /// A list of messages that carry the error details. There will be a + /// common set of message types for APIs to use. pub details: Option>>, } @@ -683,13 +719,21 @@ impl Part for Status {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListCoverageBucketsResponse { - /// The coverage buckets. The list of buckets is sparse; a bucket with 0 overlapping reads is not returned. A bucket never crosses more than one reference sequence. Each bucket has width `bucketWidth`, unless its end is the end of the reference sequence. - #[serde(rename="coverageBuckets")] - pub coverage_buckets: Option>, - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, - /// The length of each coverage bucket in base pairs. Note that buckets at the end of a reference sequence may be shorter. This value is omitted if the bucket width is infinity (the default behaviour, with no range or `targetBucketWidth`). + /// The coverage buckets. The list of buckets is sparse; a bucket with 0 + /// overlapping reads is not returned. A bucket never crosses more than one + /// reference sequence. Each bucket has width `bucketWidth`, unless + /// its end is the end of the reference sequence. + #[serde(rename="coverageBuckets")] + pub coverage_buckets: Option>, + /// The length of each coverage bucket in base pairs. Note that buckets at the + /// end of a reference sequence may be shorter. This value is omitted if the + /// bucket width is infinity (the default behaviour, with no range or + /// `targetBucketWidth`). #[serde(rename="bucketWidth")] pub bucket_width: Option, } @@ -708,7 +752,8 @@ impl ResponseResult for ListCoverageBucketsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TestIamPermissionsResponse { - /// A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + /// A subset of `TestPermissionsRequest.permissions` that the caller is + /// allowed. pub permissions: Option>, } @@ -726,7 +771,9 @@ impl ResponseResult for TestIamPermissionsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchAnnotationsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The matching annotations. @@ -736,26 +783,57 @@ pub struct SearchAnnotationsResponse { impl ResponseResult for SearchAnnotationsResponse {} -/// A transcript represents the assertion that a particular region of the reference genome may be transcribed as RNA. +/// A transcript represents the assertion that a particular region of the +/// reference genome may be transcribed as RNA. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Transcript { - /// The range of the coding sequence for this transcript, if any. To determine the exact ranges of coding sequence, intersect this range with those of the exons, if any. If there are any exons, the codingSequence must start and end within them. Note that in some cases, the reference genome will not exactly match the observed mRNA transcript e.g. due to variance in the source genome from reference. In these cases, exon.frame will not necessarily match the expected reference reading frame and coding exon reference bases cannot necessarily be concatenated to produce the original transcript mRNA. + /// The range of the coding sequence for this transcript, if any. To determine + /// the exact ranges of coding sequence, intersect this range with those of the + /// exons, if any. If there are any + /// exons, the + /// codingSequence must start + /// and end within them. + /// + /// Note that in some cases, the reference genome will not exactly match the + /// observed mRNA transcript e.g. due to variance in the source genome from + /// reference. In these cases, + /// exon.frame will not necessarily + /// match the expected reference reading frame and coding exon reference bases + /// cannot necessarily be concatenated to produce the original transcript mRNA. #[serde(rename="codingSequence")] pub coding_sequence: Option, + /// The exons that compose + /// this transcript. This field should be unset for genomes where transcript + /// splicing does not occur, for example prokaryotes. + /// + /// Introns are regions of the transcript that are not included in the + /// spliced RNA product. Though not explicitly modeled here, intron ranges can + /// be deduced; all regions of this transcript that are not exons are introns. + /// + /// Exonic sequences do not necessarily code for a translational product + /// (amino acids). Only the regions of exons bounded by the + /// codingSequence correspond + /// to coding DNA sequence. + /// + /// Exons are ordered by start position and may not overlap. + pub exons: Option>, /// The annotation ID of the gene from which this transcript is transcribed. #[serde(rename="geneId")] pub gene_id: Option, - /// The exons that compose this transcript. This field should be unset for genomes where transcript splicing does not occur, for example prokaryotes. Introns are regions of the transcript that are not included in the spliced RNA product. Though not explicitly modeled here, intron ranges can be deduced; all regions of this transcript that are not exons are introns. Exonic sequences do not necessarily code for a translational product (amino acids). Only the regions of exons bounded by the codingSequence correspond to coding DNA sequence. Exons are ordered by start position and may not overlap. - pub exons: Option>, } impl Part for Transcript {} -/// An annotation describes a region of reference genome. The value of an annotation may be one of several canonical types, supplemented by arbitrary info tags. An annotation is not inherently associated with a specific sample or individual (though a client could choose to use annotations in this way). Example canonical annotation types are `GENE` and `VARIANT`. +/// An annotation describes a region of reference genome. The value of an +/// annotation may be one of several canonical types, supplemented by arbitrary +/// info tags. An annotation is not inherently associated with a specific +/// sample or individual (though a client could choose to use annotations in +/// this way). Example canonical annotation types are `GENE` and +/// `VARIANT`. /// /// # Activities /// @@ -771,7 +849,8 @@ impl Part for Transcript {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Annotation { - /// A map of additional read alignment information. This must be of the form map (string key mapping to a list of string values). + /// A map of additional read alignment information. This must be of the form + /// map (string key mapping to a list of string values). pub info: Option>>, /// The ID of the Google Genomics reference associated with this range. #[serde(rename="referenceId")] @@ -780,24 +859,34 @@ pub struct Annotation { pub end: Option, /// The display name of this annotation. pub name: Option, - /// The data type for this annotation. Must match the containing annotation set's type. - #[serde(rename="type")] - pub type_: Option, - /// A variant annotation, which describes the effect of a variant on the genome, the coding sequence, and/or higher level consequences at the organism level e.g. pathogenicity. This field is only set for annotations of type `VARIANT`. + /// A transcript value represents the assertion that a particular region of + /// the reference genome may be transcribed as RNA. An alternative splicing + /// pattern would be represented as a separate transcript object. This field + /// is only set for annotations of type `TRANSCRIPT`. + pub transcript: Option, + /// A variant annotation, which describes the effect of a variant on the + /// genome, the coding sequence, and/or higher level consequences at the + /// organism level e.g. pathogenicity. This field is only set for annotations + /// of type `VARIANT`. pub variant: Option, /// The start position of the range on the reference, 0-based inclusive. pub start: Option, /// The annotation set to which this annotation belongs. #[serde(rename="annotationSetId")] pub annotation_set_id: Option, - /// The display name corresponding to the reference specified by `referenceId`, for example `chr1`, `1`, or `chrX`. + /// The display name corresponding to the reference specified by + /// `referenceId`, for example `chr1`, `1`, or `chrX`. #[serde(rename="referenceName")] pub reference_name: Option, - /// Whether this range refers to the reverse strand, as opposed to the forward strand. Note that regardless of this field, the start/end position of the range always refer to the forward strand. + /// Whether this range refers to the reverse strand, as opposed to the forward + /// strand. Note that regardless of this field, the start/end position of the + /// range always refer to the forward strand. #[serde(rename="reverseStrand")] pub reverse_strand: Option, - /// A transcript value represents the assertion that a particular region of the reference genome may be transcribed as RNA. An alternative splicing pattern would be represented as a separate transcript object. This field is only set for annotations of type `TRANSCRIPT`. - pub transcript: Option, + /// The data type for this annotation. Must match the containing annotation + /// set's type. + #[serde(rename="type")] + pub type_: Option, /// The server-generated annotation ID, unique across all annotations. pub id: Option, } @@ -838,7 +927,8 @@ pub struct MergeVariantsRequest { pub variant_set_id: Option, /// The variants to be merged with existing variants. pub variants: Option>, - /// A mapping between info field keys and the InfoMergeOperations to be performed on them. + /// A mapping between info field keys and the InfoMergeOperations to + /// be performed on them. #[serde(rename="infoMergeConfig")] pub info_merge_config: Option>, } @@ -846,26 +936,34 @@ pub struct MergeVariantsRequest { impl RequestValue for MergeVariantsRequest {} -/// Metadata describes a single piece of variant call metadata. These data include a top level key and either a single value string (value) or a list of key-value pairs (info.) Value and info are mutually exclusive. +/// Metadata describes a single piece of variant call metadata. +/// These data include a top level key and either a single value string (value) +/// or a list of key-value pairs (info.) +/// Value and info are mutually exclusive. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VariantSetMetadata { - /// Remaining structured metadata key-value pairs. This must be of the form map (string key mapping to a list of string values). + /// Remaining structured metadata key-value pairs. This must be of the form + /// map (string key mapping to a list of string values). pub info: Option>>, /// A textual description of this metadata. pub description: Option, /// The top-level key. pub key: Option, - /// The type of data. Possible types include: Integer, Float, Flag, Character, and String. + /// The type of data. Possible types include: Integer, Float, + /// Flag, Character, and String. #[serde(rename="type")] pub type_: Option, - /// The number of values that can be included in a field described by this metadata. + /// The number of values that can be included in a field described by this + /// metadata. pub number: Option, /// The value field for simple metadata pub value: Option, - /// User-provided ID field, not enforced by this API. Two or more pieces of structured metadata with identical id and key fields are considered equivalent. + /// User-provided ID field, not enforced by this API. + /// Two or more pieces of structured metadata with identical + /// id and key fields are considered equivalent. pub id: Option, } @@ -883,7 +981,17 @@ impl Part for VariantSetMetadata {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TestIamPermissionsRequest { - /// REQUIRED: The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. Allowed permissions are: * `genomics.datasets.create` * `genomics.datasets.delete` * `genomics.datasets.get` * `genomics.datasets.list` * `genomics.datasets.update` * `genomics.datasets.getIamPolicy` * `genomics.datasets.setIamPolicy` + /// REQUIRED: The set of permissions to check for the 'resource'. + /// Permissions with wildcards (such as '*' or 'storage.*') are not allowed. + /// Allowed permissions are: + /// + /// * `genomics.datasets.create` + /// * `genomics.datasets.delete` + /// * `genomics.datasets.get` + /// * `genomics.datasets.list` + /// * `genomics.datasets.update` + /// * `genomics.datasets.getIamPolicy` + /// * `genomics.datasets.setIamPolicy` pub permissions: Option>, } @@ -906,7 +1014,11 @@ pub struct ExternalId { impl Part for ExternalId {} -/// A call set is a collection of variant calls, typically for one sample. It belongs to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// A call set is a collection of variant calls, typically for one sample. It +/// belongs to a variant set. +/// +/// For more genomics resource definitions, see [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Activities /// @@ -919,9 +1031,14 @@ impl Part for ExternalId {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CallSet { - /// A map of additional call set information. This must be of the form map (string key mapping to a list of string values). + /// A map of additional call set information. This must be of the form + /// map (string key mapping to a list of string values). pub info: Option>>, - /// The IDs of the variant sets this call set belongs to. This field must have exactly length one, as a call set belongs to a single variant set. This field is repeated for compatibility with the [GA4GH 0.5.1 API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76). + /// The IDs of the variant sets this call set belongs to. This field must + /// have exactly length one, as a call set belongs to a single variant set. + /// This field is repeated for compatibility with the + /// [GA4GH 0.5.1 + /// API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76). #[serde(rename="variantSetIds")] pub variant_set_ids: Option>, /// The call set name. @@ -940,7 +1057,10 @@ impl Resource for CallSet {} impl ResponseResult for CallSet {} -/// An abstraction for referring to a genomic position, in relation to some already known reference. For now, represents a genomic position as a reference name, a base number on that reference (0-based), and a determination of forward or reverse strand. +/// An abstraction for referring to a genomic position, in relation to some +/// already known reference. For now, represents a genomic position as a +/// reference name, a base number on that reference (0-based), and a +/// determination of forward or reverse strand. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -948,7 +1068,8 @@ impl ResponseResult for CallSet {} pub struct Position { /// The 0-based offset from the start of the forward strand for that reference. pub position: Option, - /// Whether this position is on the reverse strand, as opposed to the forward strand. + /// Whether this position is on the reverse strand, as opposed to the forward + /// strand. #[serde(rename="reverseStrand")] pub reverse_strand: Option, /// The name of the reference in whatever reference set is being used. @@ -959,21 +1080,36 @@ pub struct Position { impl Part for Position {} -/// ReferenceBound records an upper bound for the starting coordinate of variants in a particular reference. +/// The call set search request. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [search callsets](struct.CallsetSearchCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ReferenceBound { - /// An upper bound (inclusive) on the starting coordinate of any variant in the reference sequence. - #[serde(rename="upperBound")] - pub upper_bound: Option, - /// The name of the reference associated with this reference bound. - #[serde(rename="referenceName")] - pub reference_name: Option, +pub struct SearchCallSetsRequest { + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. + #[serde(rename="pageToken")] + pub page_token: Option, + /// Restrict the query to call sets within the given variant sets. At least one + /// ID must be provided. + #[serde(rename="variantSetIds")] + pub variant_set_ids: Option>, + /// Only return call sets for which a substring of the name matches this + /// string. + pub name: Option, + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 1024. + #[serde(rename="pageSize")] + pub page_size: Option, } -impl Part for ReferenceBound {} +impl RequestValue for SearchCallSetsRequest {} /// There is no detailed description. @@ -983,15 +1119,45 @@ impl Part for ReferenceBound {} /// 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*). /// -/// * [batch create annotations](struct.AnnotationBatchCreateCall.html) (response) +/// * [search annotations](struct.AnnotationSearchCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BatchCreateAnnotationsResponse { - /// The resulting per-annotation entries, ordered consistently with the original request. - pub entries: Option>, +pub struct SearchAnnotationsRequest { + /// The start position of the range on the reference, 0-based inclusive. If + /// specified, + /// referenceId or + /// referenceName + /// must be specified. Defaults to 0. + pub start: Option, + /// The ID of the reference to query. + #[serde(rename="referenceId")] + pub reference_id: Option, + /// The end position of the range on the reference, 0-based exclusive. If + /// referenceId or + /// referenceName + /// must be specified, Defaults to the length of the reference. + pub end: Option, + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 256. The maximum value is 2048. + #[serde(rename="pageSize")] + pub page_size: Option, + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. + #[serde(rename="pageToken")] + pub page_token: Option, + /// The name of the reference to query, within the reference set associated + /// with this query. + #[serde(rename="referenceName")] + pub reference_name: Option, + /// Required. The annotation sets to search within. The caller must have + /// `READ` access to these annotation sets. + /// All queried annotation sets must have the same type. + #[serde(rename="annotationSetIds")] + pub annotation_set_ids: Option>, } -impl ResponseResult for BatchCreateAnnotationsResponse {} +impl RequestValue for SearchAnnotationsRequest {} /// The dataset list response. @@ -1005,7 +1171,9 @@ impl ResponseResult for BatchCreateAnnotationsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListDatasetsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The list of matching Datasets. @@ -1026,16 +1194,30 @@ impl ResponseResult for ListDatasetsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImportReadGroupSetsRequest { - /// The reference set to which the imported read group sets are aligned to, if any. The reference names of this reference set must be a superset of those found in the imported file headers. If no reference set id is provided, a best effort is made to associate with a matching reference set. + /// The reference set to which the imported read group sets are aligned to, if + /// any. The reference names of this reference set must be a superset of those + /// found in the imported file headers. If no reference set id is provided, a + /// best effort is made to associate with a matching reference set. #[serde(rename="referenceSetId")] pub reference_set_id: Option, - /// A list of URIs pointing at [BAM files](https://samtools.github.io/hts-specs/SAMv1.pdf) in Google Cloud Storage. + /// A list of URIs pointing at [BAM + /// files](https://samtools.github.io/hts-specs/SAMv1.pdf) + /// in Google Cloud Storage. + /// Those URIs can include wildcards (*), but do not add or remove + /// matching files before import has completed. + /// + /// Note that Google Cloud Storage object listing is only eventually + /// consistent: files added may be not be immediately visible to + /// everyone. Thus, if using a wildcard it is preferable not to start + /// the import immediately after the files are created. #[serde(rename="sourceUris")] pub source_uris: Option>, - /// The partition strategy describes how read groups are partitioned into read group sets. + /// The partition strategy describes how read groups are partitioned into read + /// group sets. #[serde(rename="partitionStrategy")] pub partition_strategy: Option, - /// Required. The ID of the dataset these read group sets will belong to. The caller must have WRITE permissions to this dataset. + /// Required. The ID of the dataset these read group sets will belong to. The + /// caller must have WRITE permissions to this dataset. #[serde(rename="datasetId")] pub dataset_id: Option, } @@ -1043,7 +1225,13 @@ pub struct ImportReadGroupSetsRequest { impl RequestValue for ImportReadGroupSetsRequest {} -/// A reference is a canonical assembled DNA sequence, intended to act as a reference coordinate space for other genomic annotations. A single reference might represent the human chromosome 1 or mitochandrial DNA, for instance. A reference belongs to one or more reference sets. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// A reference is a canonical assembled DNA sequence, intended to act as a +/// reference coordinate space for other genomic annotations. A single reference +/// might represent the human chromosome 1 or mitochandrial DNA, for instance. A +/// reference belongs to one or more reference sets. +/// +/// For more genomics resource definitions, see [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Activities /// @@ -1056,16 +1244,20 @@ impl RequestValue for ImportReadGroupSetsRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Reference { - /// MD5 of the upper-case sequence excluding all whitespace characters (this is equivalent to SQ:M5 in SAM). This value is represented in lower case hexadecimal format. + /// MD5 of the upper-case sequence excluding all whitespace characters (this + /// is equivalent to SQ:M5 in SAM). This value is represented in lower case + /// hexadecimal format. pub md5checksum: Option, /// The length of this reference's sequence. pub length: Option, /// The name of this reference, for example `22`. pub name: Option, - /// The URI from which the sequence was obtained. Typically specifies a FASTA format file. + /// The URI from which the sequence was obtained. Typically specifies a FASTA + /// format file. #[serde(rename="sourceUri")] pub source_uri: Option, - /// All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with a version number, for example `GCF_000001405.26`. + /// All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally + /// with a version number, for example `GCF_000001405.26`. #[serde(rename="sourceAccessions")] pub source_accessions: Option>, /// The server-generated reference ID, unique across all references. @@ -1079,49 +1271,54 @@ impl Resource for Reference {} impl ResponseResult for Reference {} -/// The variant data export request. -/// -/// # 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*). -/// -/// * [export variantsets](struct.VariantsetExportCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ExportVariantSetRequest { - /// Required. The Google Cloud project ID that owns the destination BigQuery dataset. The caller must have WRITE access to this project. This project will also own the resulting export job. - #[serde(rename="projectId")] - pub project_id: Option, - /// The format for the exported data. - pub format: Option, - /// Required. The BigQuery dataset to export data to. This dataset must already exist. Note that this is distinct from the Genomics concept of "dataset". - #[serde(rename="bigqueryDataset")] - pub bigquery_dataset: Option, - /// If provided, only variant call information from the specified call sets will be exported. By default all variant calls are exported. - #[serde(rename="callSetIds")] - pub call_set_ids: Option>, - /// Required. The BigQuery table to export data to. If the table doesn't exist, it will be created. If it already exists, it will be overwritten. - #[serde(rename="bigqueryTable")] - pub bigquery_table: Option, -} - -impl RequestValue for ExportVariantSetRequest {} - - -/// Associates `members` with a `role`. +/// A call represents the determination of genotype with respect to a particular +/// variant. It may include associated information such as quality and phasing. +/// For example, a call might assign a probability of 0.32 to the occurrence of +/// a SNP named rs1234 in a call set with the name NA12345. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Binding { - /// Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required - pub role: Option, - /// Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. - pub members: Option>, +pub struct VariantCall { + /// A map of additional variant call information. This must be of the form + /// map (string key mapping to a list of string values). + pub info: Option>>, + /// The genotype of this variant call. Each value represents either the value + /// of the `referenceBases` field or a 1-based index into + /// `alternateBases`. If a variant had a `referenceBases` + /// value of `T` and an `alternateBases` + /// value of `["A", "C"]`, and the `genotype` was + /// `[2, 1]`, that would mean the call + /// represented the heterozygous value `CA` for this variant. + /// If the `genotype` was instead `[0, 1]`, the + /// represented value would be `TA`. Ordering of the + /// genotype values is important if the `phaseset` is present. + /// If a genotype is not called (that is, a `.` is present in the + /// GT string) -1 is returned. + pub genotype: Option>, + /// The ID of the call set this variant call belongs to. + #[serde(rename="callSetId")] + pub call_set_id: Option, + /// If this field is present, this variant call's genotype ordering implies + /// the phase of the bases and is consistent with any other variant calls in + /// the same reference sequence which have the same phaseset value. + /// When importing data from VCF, if the genotype data was phased but no + /// phase set was specified this field will be set to `*`. + pub phaseset: Option, + /// The genotype likelihoods for this variant call. Each array entry + /// represents how likely a specific genotype is for this call. The value + /// ordering is defined by the GL tag in the VCF spec. + /// If Phred-scaled genotype likelihood scores (PL) are available and + /// log10(P) genotype likelihood scores (GL) are not, PL scores are converted + /// to GL scores. If both are available, PL scores are stored in `info`. + #[serde(rename="genotypeLikelihood")] + pub genotype_likelihood: Option>, + /// The name of the call set this variant call belongs to. + #[serde(rename="callSetName")] + pub call_set_name: Option, } -impl Part for Binding {} +impl Part for VariantCall {} /// There is no detailed description. @@ -1135,17 +1332,24 @@ impl Part for Binding {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReferencesRequest { - /// If present, return references for which the md5checksum matches exactly. + /// If present, return references for which the + /// md5checksum matches exactly. pub md5checksums: Option>, - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. #[serde(rename="pageToken")] pub page_token: Option, /// If present, return only references which belong to this reference set. #[serde(rename="referenceSetId")] pub reference_set_id: Option, - /// If present, return references for which a prefix of any of sourceAccessions match any of these strings. Accession numbers typically have a main number and a version, for example `GCF_000001405.26`. + /// If present, return references for which a prefix of any of + /// sourceAccessions match + /// any of these strings. Accession numbers typically have a main number and a + /// version, for example `GCF_000001405.26`. pub accessions: Option>, - /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 4096. + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 1024. The maximum value is 4096. #[serde(rename="pageSize")] pub page_size: Option, } @@ -1162,13 +1366,19 @@ pub struct Experiment { /// The sequencing center used as part of this experiment. #[serde(rename="sequencingCenter")] pub sequencing_center: Option, - /// A client-supplied library identifier; a library is a collection of DNA fragments which have been prepared for sequencing from a sample. This field is important for quality control as error or bias can be introduced during sample preparation. + /// A client-supplied library identifier; a library is a collection of DNA + /// fragments which have been prepared for sequencing from a sample. This + /// field is important for quality control as error or bias can be introduced + /// during sample preparation. #[serde(rename="libraryId")] pub library_id: Option, - /// The instrument model used as part of this experiment. This maps to sequencing technology in the SAM spec. + /// The instrument model used as part of this experiment. This maps to + /// sequencing technology in the SAM spec. #[serde(rename="instrumentModel")] pub instrument_model: Option, - /// The platform unit used as part of this experiment, for example flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the @RG PU field in the SAM spec. + /// The platform unit used as part of this experiment, for example + /// flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the + /// @RG PU field in the SAM spec. #[serde(rename="platformUnit")] pub platform_unit: Option, } @@ -1182,14 +1392,19 @@ impl Part for Experiment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReadGroup { - /// A map of additional read group information. This must be of the form map (string key mapping to a list of string values). + /// A map of additional read group information. This must be of the form + /// map (string key mapping to a list of string values). pub info: Option>>, - /// The predicted insert size of this read group. The insert size is the length the sequenced DNA fragment from end-to-end, not including the adapters. + /// The predicted insert size of this read group. The insert size is the length + /// the sequenced DNA fragment from end-to-end, not including the adapters. #[serde(rename="predictedInsertSize")] pub predicted_insert_size: Option, - /// A free-form text description of this read group. - pub description: Option, - /// The programs used to generate this read group. Programs are always identical for all read groups within a read group set. For this reason, only the first read group in a returned set will have this field populated. + /// The read group name. This corresponds to the @RG ID field in the SAM spec. + pub name: Option, + /// The programs used to generate this read group. Programs are always + /// identical for all read groups within a read group set. For this reason, + /// only the first read group in a returned set will have this field + /// populated. pub programs: Option>, /// A client-supplied sample identifier for the reads in this read group. #[serde(rename="sampleId")] @@ -1199,13 +1414,15 @@ pub struct ReadGroup { /// The reference set the reads in this read group are aligned to. #[serde(rename="referenceSetId")] pub reference_set_id: Option, - /// The server-generated read group ID, unique for all read groups. Note: This is different than the @RG ID field in the SAM spec. For that value, see name. + /// The server-generated read group ID, unique for all read groups. + /// Note: This is different than the @RG ID field in the SAM spec. For that + /// value, see name. pub id: Option, /// The dataset to which this read group belongs. #[serde(rename="datasetId")] pub dataset_id: Option, - /// The read group name. This corresponds to the @RG ID field in the SAM spec. - pub name: Option, + /// A free-form text description of this read group. + pub description: Option, } impl Part for ReadGroup {} @@ -1222,7 +1439,9 @@ impl Part for ReadGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReadGroupSetsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The list of matching read group sets. @@ -1233,7 +1452,8 @@ pub struct SearchReadGroupSetsResponse { impl ResponseResult for SearchReadGroupSetsResponse {} -/// This resource represents a long-running operation that is the result of a network API call. +/// This resource represents a long-running operation that is the result of a +/// network API call. /// /// # Activities /// @@ -1252,11 +1472,13 @@ impl ResponseResult for SearchReadGroupSetsResponse {} pub struct Operation { /// An OperationMetadata object. This will always be returned with the Operation. pub metadata: Option>, - /// If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available. + /// If the value is `false`, it means the operation is still in progress. + /// If true, the operation is completed, and either `error` or `response` is + /// available. pub done: Option, - /// If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For exports, an empty response is returned. + /// If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For pipelines and exports, an empty response is returned. pub response: Option>, - /// The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw` + /// The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw` pub name: Option, /// The error result of the operation in case of failure or cancellation. pub error: Option, @@ -1266,31 +1488,36 @@ impl Resource for Operation {} impl ResponseResult for Operation {} -/// The call set search request. +/// The read group set search request. /// /// # 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*). /// -/// * [search callsets](struct.CallsetSearchCall.html) (request) +/// * [search readgroupsets](struct.ReadgroupsetSearchCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchCallSetsRequest { - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. +pub struct SearchReadGroupSetsRequest { + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. #[serde(rename="pageToken")] pub page_token: Option, - /// Restrict the query to call sets within the given variant sets. At least one ID must be provided. - #[serde(rename="variantSetIds")] - pub variant_set_ids: Option>, - /// Only return call sets for which a substring of the name matches this string. + /// Restricts this query to read group sets within the given datasets. At least + /// one ID must be provided. + #[serde(rename="datasetIds")] + pub dataset_ids: Option>, + /// Only return read group sets for which a substring of the name matches this + /// string. pub name: Option, - /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 256. The maximum value is 1024. #[serde(rename="pageSize")] pub page_size: Option, } -impl RequestValue for SearchCallSetsRequest {} +impl RequestValue for SearchReadGroupSetsRequest {} /// Request message for `SetIamPolicy` method. @@ -1304,37 +1531,54 @@ impl RequestValue for SearchCallSetsRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SetIamPolicyRequest { - /// REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + /// REQUIRED: The complete policy to be applied to the `resource`. The size of + /// the policy is limited to a few 10s of KB. An empty policy is a + /// valid policy but certain Cloud Platform services (such as Projects) + /// might reject them. pub policy: Option, } impl RequestValue for SetIamPolicyRequest {} -/// A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345. +/// Associates `members` with a `role`. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct VariantCall { - /// A map of additional variant call information. This must be of the form map (string key mapping to a list of string values). - pub info: Option>>, - /// The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned. - pub genotype: Option>, - /// The ID of the call set this variant call belongs to. - #[serde(rename="callSetId")] - pub call_set_id: Option, - /// If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`. - pub phaseset: Option, - /// The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`. - #[serde(rename="genotypeLikelihood")] - pub genotype_likelihood: Option>, - /// The name of the call set this variant call belongs to. - #[serde(rename="callSetName")] - pub call_set_name: Option, +pub struct Binding { + /// Role that is assigned to `members`. + /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + /// Required + pub role: Option, + /// Specifies the identities requesting access for a Cloud Platform resource. + /// `members` can have the following values: + /// + /// * `allUsers`: A special identifier that represents anyone who is + /// on the internet; with or without a Google account. + /// + /// * `allAuthenticatedUsers`: A special identifier that represents anyone + /// who is authenticated with a Google account or a service account. + /// + /// * `user:{emailid}`: An email address that represents a specific Google + /// account. For example, `alice@gmail.com` or `joe@example.com`. + /// + /// + /// * `serviceAccount:{emailid}`: An email address that represents a service + /// account. For example, `my-other-app@appspot.gserviceaccount.com`. + /// + /// * `group:{emailid}`: An email address that represents a Google group. + /// For example, `admins@example.com`. + /// + /// + /// * `domain:{domain}`: A Google Apps domain name that represents all the + /// users of that domain. For example, `google.com` or `example.com`. + /// + /// + pub members: Option>, } -impl Part for VariantCall {} +impl Part for Binding {} /// There is no detailed description. @@ -1348,19 +1592,72 @@ impl Part for VariantCall {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListBasesResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, - /// The offset position (0-based) of the given `sequence` from the start of this `Reference`. This value will differ for each page in a paginated request. - pub offset: Option, /// A substring of the bases that make up this reference. pub sequence: Option, + /// The offset position (0-based) of the given `sequence` from the + /// start of this `Reference`. This value will differ for each page + /// in a paginated request. + pub offset: Option, } impl ResponseResult for ListBasesResponse {} -/// Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). +/// ReferenceBound records an upper bound for the starting coordinate of +/// variants in a particular reference. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ReferenceBound { + /// An upper bound (inclusive) on the starting coordinate of any + /// variant in the reference sequence. + #[serde(rename="upperBound")] + pub upper_bound: Option, + /// The name of the reference associated with this reference bound. + #[serde(rename="referenceName")] + pub reference_name: Option, +} + +impl Part for ReferenceBound {} + + +/// Defines an Identity and Access Management (IAM) policy. It is used to +/// specify access control policies for Cloud Platform resources. +/// +/// +/// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of +/// `members` to a `role`, where the members can be user accounts, Google groups, +/// Google domains, and service accounts. A `role` is a named list of permissions +/// defined by IAM. +/// +/// **Example** +/// +/// { +/// "bindings": [ +/// { +/// "role": "roles/owner", +/// "members": [ +/// "user:mike@example.com", +/// "group:admins@example.com", +/// "domain:google.com", +/// "serviceAccount:my-other-app@appspot.gserviceaccount.com", +/// ] +/// }, +/// { +/// "role": "roles/viewer", +/// "members": ["user:sean@example.com"] +/// } +/// ] +/// } +/// +/// For a description of IAM and its features, see the +/// [IAM developer's guide](https://cloud.google.com/iam). /// /// # Activities /// @@ -1372,12 +1669,23 @@ impl ResponseResult for ListBasesResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Policy { - /// Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error. + /// Associates a list of `members` to a `role`. + /// Multiple `bindings` must not be specified for the same `role`. + /// `bindings` with no members will result in an error. pub bindings: Option>, + /// `etag` is used for optimistic concurrency control as a way to help + /// prevent simultaneous updates of a policy from overwriting each other. + /// It is strongly suggested that systems make use of the `etag` in the + /// read-modify-write cycle to perform policy updates in order to avoid race + /// conditions: An `etag` is returned in the response to `getIamPolicy`, and + /// systems are expected to put that etag in the request to `setIamPolicy` to + /// ensure that their change will be applied to the same version of the policy. + /// + /// If no `etag` is provided in the call to `setIamPolicy`, then the existing + /// policy is overwritten blindly. + pub etag: Option, /// Version of the `Policy`. The default version is 0. pub version: Option, - /// `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. - pub etag: Option, } impl ResponseResult for Policy {} @@ -1394,37 +1702,130 @@ impl ResponseResult for Policy {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchVariantsRequest { - /// The end of the window, 0-based exclusive. If unspecified or 0, defaults to the length of the reference. + /// The end of the window, 0-based exclusive. If unspecified or 0, defaults to + /// the length of the reference. pub end: Option, - /// The maximum number of variants to return in a single page. If unspecified, defaults to 5000. The maximum value is 10000. + /// The maximum number of variants to return in a single page. If unspecified, + /// defaults to 5000. The maximum value is 10000. #[serde(rename="pageSize")] pub page_size: Option, - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. #[serde(rename="pageToken")] pub page_token: Option, - /// The maximum number of calls to return in a single page. Note that this limit may be exceeded in the event that a matching variant contains more calls than the requested maximum. If unspecified, defaults to 5000. The maximum value is 10000. + /// The maximum number of calls to return in a single page. Note that this + /// limit may be exceeded in the event that a matching variant contains more + /// calls than the requested maximum. If unspecified, defaults to 5000. The + /// maximum value is 10000. #[serde(rename="maxCalls")] pub max_calls: Option, - /// The beginning of the window (0-based, inclusive) for which overlapping variants should be returned. If unspecified, defaults to 0. + /// The beginning of the window (0-based, inclusive) for which + /// overlapping variants should be returned. If unspecified, defaults to 0. pub start: Option, - /// Only return variant calls which belong to call sets with these ids. Leaving this blank returns all variant calls. If a variant has no calls belonging to any of these call sets, it won't be returned at all. - #[serde(rename="callSetIds")] - pub call_set_ids: Option>, + /// At most one variant set ID must be provided. Only variants from this + /// variant set will be returned. If omitted, a call set id must be included in + /// the request. + #[serde(rename="variantSetIds")] + pub variant_set_ids: Option>, /// Only return variants which have exactly this name. #[serde(rename="variantName")] pub variant_name: Option, /// Required. Only return variants in this reference sequence. #[serde(rename="referenceName")] pub reference_name: Option, - /// At most one variant set ID must be provided. Only variants from this variant set will be returned. If omitted, a call set id must be included in the request. - #[serde(rename="variantSetIds")] - pub variant_set_ids: Option>, + /// Only return variant calls which belong to call sets with these ids. + /// Leaving this blank returns all variant calls. If a variant has no + /// calls belonging to any of these call sets, it won't be returned at all. + #[serde(rename="callSetIds")] + pub call_set_ids: Option>, } impl RequestValue for SearchVariantsRequest {} -/// A read alignment describes a linear alignment of a string of DNA to a reference sequence, in addition to metadata about the fragment (the molecule of DNA sequenced) and the read (the bases which were read by the sequencer). A read is equivalent to a line in a SAM file. A read belongs to exactly one read group and exactly one read group set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) ### Reverse-stranded reads Mapped reads (reads having a non-null `alignment`) can be aligned to either the forward or the reverse strand of their associated reference. Strandedness of a mapped read is encoded by `alignment.position.reverseStrand`. If we consider the reference to be a forward-stranded coordinate space of `[0, reference.length)` with `0` as the left-most position and `reference.length` as the right-most position, reads are always aligned left to right. That is, `alignment.position.position` always refers to the left-most reference coordinate and `alignment.cigar` describes the alignment of this read to the reference from left to right. All per-base fields such as `alignedSequence` and `alignedQuality` share this same left-to-right orientation; this is true of reads which are aligned to either strand. For reverse-stranded reads, this means that `alignedSequence` is the reverse complement of the bases that were originally reported by the sequencing machine. ### Generating a reference-aligned sequence string When interacting with mapped reads, it's often useful to produce a string representing the local alignment of the read to reference. The following pseudocode demonstrates one way of doing this: out = "" offset = 0 for c in read.alignment.cigar { switch c.operation { case "ALIGNMENT_MATCH", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH": out += read.alignedSequence[offset:offset+c.operationLength] offset += c.operationLength break case "CLIP_SOFT", "INSERT": offset += c.operationLength break case "PAD": out += repeat("*", c.operationLength) break case "DELETE": out += repeat("-", c.operationLength) break case "SKIP": out += repeat(" ", c.operationLength) break case "CLIP_HARD": break } } return out ### Converting to SAM's CIGAR string The following pseudocode generates a SAM CIGAR string from the `cigar` field. Note that this is a lossy conversion (`cigar.referenceSequence` is lost). cigarMap = { "ALIGNMENT_MATCH": "M", "INSERT": "I", "DELETE": "D", "SKIP": "N", "CLIP_SOFT": "S", "CLIP_HARD": "H", "PAD": "P", "SEQUENCE_MATCH": "=", "SEQUENCE_MISMATCH": "X", } cigarStr = "" for c in read.alignment.cigar { cigarStr += c.operationLength + cigarMap[c.operation] } return cigarStr +/// A read alignment describes a linear alignment of a string of DNA to a +/// reference sequence, in addition to metadata +/// about the fragment (the molecule of DNA sequenced) and the read (the bases +/// which were read by the sequencer). A read is equivalent to a line in a SAM +/// file. A read belongs to exactly one read group and exactly one +/// read group set. +/// +/// For more genomics resource definitions, see [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// ### Reverse-stranded reads +/// +/// Mapped reads (reads having a non-null `alignment`) can be aligned to either +/// the forward or the reverse strand of their associated reference. Strandedness +/// of a mapped read is encoded by `alignment.position.reverseStrand`. +/// +/// If we consider the reference to be a forward-stranded coordinate space of +/// `[0, reference.length)` with `0` as the left-most position and +/// `reference.length` as the right-most position, reads are always aligned left +/// to right. That is, `alignment.position.position` always refers to the +/// left-most reference coordinate and `alignment.cigar` describes the alignment +/// of this read to the reference from left to right. All per-base fields such as +/// `alignedSequence` and `alignedQuality` share this same left-to-right +/// orientation; this is true of reads which are aligned to either strand. For +/// reverse-stranded reads, this means that `alignedSequence` is the reverse +/// complement of the bases that were originally reported by the sequencing +/// machine. +/// +/// ### Generating a reference-aligned sequence string +/// +/// When interacting with mapped reads, it's often useful to produce a string +/// representing the local alignment of the read to reference. The following +/// pseudocode demonstrates one way of doing this: +/// +/// out = "" +/// offset = 0 +/// for c in read.alignment.cigar { +/// switch c.operation { +/// case "ALIGNMENT_MATCH", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH": +/// out += read.alignedSequence[offset:offset+c.operationLength] +/// offset += c.operationLength +/// break +/// case "CLIP_SOFT", "INSERT": +/// offset += c.operationLength +/// break +/// case "PAD": +/// out += repeat("*", c.operationLength) +/// break +/// case "DELETE": +/// out += repeat("-", c.operationLength) +/// break +/// case "SKIP": +/// out += repeat(" ", c.operationLength) +/// break +/// case "CLIP_HARD": +/// break +/// } +/// } +/// return out +/// +/// ### Converting to SAM's CIGAR string +/// +/// The following pseudocode generates a SAM CIGAR string from the +/// `cigar` field. Note that this is a lossy conversion +/// (`cigar.referenceSequence` is lost). +/// +/// cigarMap = { +/// "ALIGNMENT_MATCH": "M", +/// "INSERT": "I", +/// "DELETE": "D", +/// "SKIP": "N", +/// "CLIP_SOFT": "S", +/// "CLIP_HARD": "H", +/// "PAD": "P", +/// "SEQUENCE_MATCH": "=", +/// "SEQUENCE_MISMATCH": "X", +/// } +/// cigarStr = "" +/// for c in read.alignment.cigar { +/// cigarStr += c.operationLength + cigarMap[c.operation] +/// } +/// return cigarStr /// /// # Activities /// @@ -1432,56 +1833,94 @@ impl RequestValue for SearchVariantsRequest {} /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [search reads](struct.ReadSearchCall.html) (none) -/// * [stream reads](struct.ReadStreamCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Read { - /// The ID of the read group set this read belongs to. A read belongs to exactly one read group set. + /// The ID of the read group set this read belongs to. A read belongs to + /// exactly one read group set. #[serde(rename="readGroupSetId")] pub read_group_set_id: Option, - /// Whether this read did not pass filters, such as platform or vendor quality controls (SAM flag 0x200). + /// Whether this read did not pass filters, such as platform or vendor quality + /// controls (SAM flag 0x200). #[serde(rename="failedVendorQualityChecks")] pub failed_vendor_quality_checks: Option, /// The fragment name. Equivalent to QNAME (query template name) in SAM. #[serde(rename="fragmentName")] pub fragment_name: Option, - /// The mapping of the primary alignment of the `(readNumber+1)%numberReads` read in the fragment. It replaces mate position and mate strand in SAM. + /// The mapping of the primary alignment of the + /// `(readNumber+1)%numberReads` read in the fragment. It replaces + /// mate position and mate strand in SAM. #[serde(rename="nextMatePosition")] pub next_mate_position: Option, - /// Whether this alignment is supplementary. Equivalent to SAM flag 0x800. Supplementary alignments are used in the representation of a chimeric alignment. In a chimeric alignment, a read is split into multiple linear alignments that map to different reference contigs. The first linear alignment in the read will be designated as the representative alignment; the remaining linear alignments will be designated as supplementary alignments. These alignments may have different mapping quality scores. In each linear alignment in a chimeric alignment, the read will be hard clipped. The `alignedSequence` and `alignedQuality` fields in the alignment record will only represent the bases for its respective linear alignment. + /// Whether this alignment is supplementary. Equivalent to SAM flag 0x800. + /// Supplementary alignments are used in the representation of a chimeric + /// alignment. In a chimeric alignment, a read is split into multiple + /// linear alignments that map to different reference contigs. The first + /// linear alignment in the read will be designated as the representative + /// alignment; the remaining linear alignments will be designated as + /// supplementary alignments. These alignments may have different mapping + /// quality scores. In each linear alignment in a chimeric alignment, the read + /// will be hard clipped. The `alignedSequence` and + /// `alignedQuality` fields in the alignment record will only + /// represent the bases for its respective linear alignment. #[serde(rename="supplementaryAlignment")] pub supplementary_alignment: Option, /// The observed length of the fragment, equivalent to TLEN in SAM. #[serde(rename="fragmentLength")] pub fragment_length: Option, - /// The server-generated read ID, unique across all reads. This is different from the `fragmentName`. - pub id: Option, - /// The linear alignment for this alignment record. This field is null for unmapped reads. + /// The read number in sequencing. 0-based and less than numberReads. This + /// field replaces SAM flag 0x40 and 0x80. + #[serde(rename="readNumber")] + pub read_number: Option, + /// The linear alignment for this alignment record. This field is null for + /// unmapped reads. pub alignment: Option, - /// A map of additional read alignment information. This must be of the form map (string key mapping to a list of string values). + /// A map of additional read alignment information. This must be of the form + /// map (string key mapping to a list of string values). pub info: Option>>, /// The fragment is a PCR or optical duplicate (SAM flag 0x400). #[serde(rename="duplicateFragment")] pub duplicate_fragment: Option, + /// The quality of the read sequence contained in this alignment record + /// (equivalent to QUAL in SAM). + /// `alignedSequence` and `alignedQuality` may be shorter than the full read + /// sequence and quality. This will occur if the alignment is part of a + /// chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR + /// for this read will begin/end with a hard clip operator that will indicate + /// the length of the excised sequence. + #[serde(rename="alignedQuality")] + pub aligned_quality: Option>, + /// The server-generated read ID, unique across all reads. This is different + /// from the `fragmentName`. + pub id: Option, + /// The orientation and the distance between reads from the fragment are + /// consistent with the sequencing protocol (SAM flag 0x2). + #[serde(rename="properPlacement")] + pub proper_placement: Option, + /// The ID of the read group this read belongs to. A read belongs to exactly + /// one read group. This is a server-generated ID which is distinct from SAM's + /// RG tag (for that value, see + /// ReadGroup.name). + #[serde(rename="readGroupId")] + pub read_group_id: Option, /// The number of reads in the fragment (extension to SAM flag 0x1). #[serde(rename="numberReads")] pub number_reads: Option, - /// The read number in sequencing. 0-based and less than numberReads. This field replaces SAM flag 0x40 and 0x80. - #[serde(rename="readNumber")] - pub read_number: Option, - /// The orientation and the distance between reads from the fragment are consistent with the sequencing protocol (SAM flag 0x2). - #[serde(rename="properPlacement")] - pub proper_placement: Option, - /// The ID of the read group this read belongs to. A read belongs to exactly one read group. This is a server-generated ID which is distinct from SAM's RG tag (for that value, see ReadGroup.name). - #[serde(rename="readGroupId")] - pub read_group_id: Option, - /// The quality of the read sequence contained in this alignment record (equivalent to QUAL in SAM). `alignedSequence` and `alignedQuality` may be shorter than the full read sequence and quality. This will occur if the alignment is part of a chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR for this read will begin/end with a hard clip operator that will indicate the length of the excised sequence. - #[serde(rename="alignedQuality")] - pub aligned_quality: Option>, - /// The bases of the read sequence contained in this alignment record, **without CIGAR operations applied** (equivalent to SEQ in SAM). `alignedSequence` and `alignedQuality` may be shorter than the full read sequence and quality. This will occur if the alignment is part of a chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR for this read will begin/end with a hard clip operator that will indicate the length of the excised sequence. + /// The bases of the read sequence contained in this alignment record, + /// **without CIGAR operations applied** (equivalent to SEQ in SAM). + /// `alignedSequence` and `alignedQuality` may be + /// shorter than the full read sequence and quality. This will occur if the + /// alignment is part of a chimeric alignment, or if the read was trimmed. When + /// this occurs, the CIGAR for this read will begin/end with a hard clip + /// operator that will indicate the length of the excised sequence. #[serde(rename="alignedSequence")] pub aligned_sequence: Option, - /// Whether this alignment is secondary. Equivalent to SAM flag 0x100. A secondary alignment represents an alternative to the primary alignment for this read. Aligners may return secondary alignments if a read can map ambiguously to multiple coordinates in the genome. By convention, each read has one and only one alignment where both `secondaryAlignment` and `supplementaryAlignment` are false. + /// Whether this alignment is secondary. Equivalent to SAM flag 0x100. + /// A secondary alignment represents an alternative to the primary alignment + /// for this read. Aligners may return secondary alignments if a read can map + /// ambiguously to multiple coordinates in the genome. By convention, each read + /// has one and only one alignment where both `secondaryAlignment` + /// and `supplementaryAlignment` are false. #[serde(rename="secondaryAlignment")] pub secondary_alignment: Option, } @@ -1489,54 +1928,74 @@ pub struct Read { impl Resource for Read {} -/// A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample. +/// A variant represents a change in DNA sequence relative to a reference +/// sequence. For example, a variant could represent a SNP or an insertion. +/// Variants belong to a variant set. +/// +/// For more genomics resource definitions, see [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Each of the calls on a variant represent a determination of genotype with +/// respect to that variant. For example, a call might assign probability of 0.32 +/// to the occurrence of a SNP named rs1234 in a sample named NA12345. A call +/// belongs to a call set, which contains related calls typically from one +/// sample. /// /// # 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*). /// -/// * [patch variants](struct.VariantPatchCall.html) (request|response) +/// * [import variants](struct.VariantImportCall.html) (none) /// * [delete variants](struct.VariantDeleteCall.html) (none) /// * [create variants](struct.VariantCreateCall.html) (request|response) /// * [get variants](struct.VariantGetCall.html) (response) -/// * [import variants](struct.VariantImportCall.html) (none) +/// * [patch variants](struct.VariantPatchCall.html) (request|response) /// * [merge variants](struct.VariantMergeCall.html) (none) /// * [search variants](struct.VariantSearchCall.html) (none) -/// * [stream variants](struct.VariantStreamCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Variant { - /// A map of additional variant information. This must be of the form map (string key mapping to a list of string values). + /// A map of additional variant information. This must be of the form + /// map (string key mapping to a list of string values). pub info: Option>>, /// The ID of the variant set this variant belongs to. #[serde(rename="variantSetId")] pub variant_set_id: Option, - /// The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions. + /// The end position (0-based) of this variant. This corresponds to the first + /// base after the last base in the reference allele. So, the length of + /// the reference allele is (end - start). This is useful for variants + /// that don't explicitly give alternate bases, for example large deletions. pub end: Option, - /// The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant. + /// The variant calls for this particular variant. Each one represents the + /// determination of genotype with respect to this variant. pub calls: Option>, /// The date this variant was created, in milliseconds from the epoch. pub created: Option, - /// The server-generated variant ID, unique across all variants. - pub id: Option, - /// A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters. + /// The reference bases for this variant. They start at the given + /// position. + #[serde(rename="referenceBases")] + pub reference_bases: Option, + /// A list of filters (normally quality filters) this variant has failed. + /// `PASS` indicates this variant has passed all filters. pub filter: Option>, - /// The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases. + /// The position at which this variant occurs (0-based). + /// This corresponds to the first base of the string of reference bases. pub start: Option, /// Names for the variant, for example a RefSNP ID. pub names: Option>, /// The bases that appear instead of the reference bases. #[serde(rename="alternateBases")] pub alternate_bases: Option>, - /// The reference on which this variant occurs. (such as `chr20` or `X`) + /// The reference on which this variant occurs. + /// (such as `chr20` or `X`) #[serde(rename="referenceName")] pub reference_name: Option, - /// A measure of how likely this variant is to be real. A higher value is better. + /// A measure of how likely this variant is to be real. + /// A higher value is better. pub quality: Option, - /// The reference bases for this variant. They start at the given position. - #[serde(rename="referenceBases")] - pub reference_bases: Option, + /// The server-generated variant ID, unique across all variants. + pub id: Option, } impl RequestValue for Variant {} @@ -1555,7 +2014,9 @@ impl ResponseResult for Variant {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchAnnotationSetsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The matching annotation sets. @@ -1572,11 +2033,27 @@ impl ResponseResult for SearchAnnotationSetsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Exon { - /// The start position of the exon on this annotation's reference sequence, 0-based inclusive. Note that this is relative to the reference start, and **not** the containing annotation start. + /// The start position of the exon on this annotation's reference sequence, + /// 0-based inclusive. Note that this is relative to the reference start, and + /// **not** the containing annotation start. pub start: Option, - /// The frame of this exon. Contains a value of 0, 1, or 2, which indicates the offset of the first coding base of the exon within the reading frame of the coding DNA sequence, if any. This field is dependent on the strandedness of this annotation (see Annotation.reverse_strand). For forward stranded annotations, this offset is relative to the exon.start. For reverse strand annotations, this offset is relative to the exon.end `- 1`. Unset if this exon does not intersect the coding sequence. Upon creation of a transcript, the frame must be populated for all or none of the coding exons. + /// The frame of this exon. Contains a value of 0, 1, or 2, which indicates + /// the offset of the first coding base of the exon within the reading frame + /// of the coding DNA sequence, if any. This field is dependent on the + /// strandedness of this annotation (see + /// Annotation.reverse_strand). + /// For forward stranded annotations, this offset is relative to the + /// exon.start. For reverse + /// strand annotations, this offset is relative to the + /// exon.end `- 1`. + /// + /// Unset if this exon does not intersect the coding sequence. Upon creation + /// of a transcript, the frame must be populated for all or none of the + /// coding exons. pub frame: Option, - /// The end position of the exon on this annotation's reference sequence, 0-based exclusive. Note that this is relative to the reference start, and *not* the containing annotation start. + /// The end position of the exon on this annotation's reference sequence, + /// 0-based exclusive. Note that this is relative to the reference start, and + /// *not* the containing annotation start. pub end: Option, } @@ -1594,7 +2071,9 @@ impl Part for Exon {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchVariantsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The list of matching Variants. @@ -1610,9 +2089,13 @@ impl ResponseResult for SearchVariantsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CodingSequence { - /// The start of the coding sequence on this annotation's reference sequence, 0-based inclusive. Note that this position is relative to the reference start, and *not* the containing annotation start. + /// The start of the coding sequence on this annotation's reference sequence, + /// 0-based inclusive. Note that this position is relative to the reference + /// start, and *not* the containing annotation start. pub start: Option, - /// The end of the coding sequence on this annotation's reference sequence, 0-based exclusive. Note that this position is relative to the reference start, and *not* the containing annotation start. + /// The end of the coding sequence on this annotation's reference sequence, + /// 0-based exclusive. Note that this position is relative to the reference + /// start, and *not* the containing annotation start. pub end: Option, } @@ -1630,11 +2113,18 @@ impl Part for CodingSequence {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BatchCreateAnnotationsRequest { - /// The annotations to be created. At most 4096 can be specified in a single request. - pub annotations: Option>, - /// A unique request ID which enables the server to detect duplicated requests. If provided, duplicated requests will result in the same response; if not provided, duplicated requests may result in duplicated data. For a given annotation set, callers should not reuse `request_id`s when writing different batches of annotations - behavior in this case is undefined. A common approach is to use a UUID. For batch jobs where worker crashes are a possibility, consider using some unique variant of a worker or run ID. + /// A unique request ID which enables the server to detect duplicated requests. + /// If provided, duplicated requests will result in the same response; if not + /// provided, duplicated requests may result in duplicated data. For a given + /// annotation set, callers should not reuse `request_id`s when writing + /// different batches of annotations - behavior in this case is undefined. + /// A common approach is to use a UUID. For batch jobs where worker crashes are + /// a possibility, consider using some unique variant of a worker or run ID. #[serde(rename="requestId")] pub request_id: Option, + /// The annotations to be created. At most 4096 can be specified in a single + /// request. + pub annotations: Option>, } impl RequestValue for BatchCreateAnnotationsRequest {} @@ -1651,7 +2141,9 @@ impl RequestValue for BatchCreateAnnotationsRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReferenceSetsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The matching references sets. @@ -1662,7 +2154,14 @@ pub struct SearchReferenceSetsResponse { impl ResponseResult for SearchReferenceSetsResponse {} -/// A reference set is a set of references which typically comprise a reference assembly for a species, such as `GRCh38` which is representative of the human genome. A reference set defines a common coordinate space for comparing reference-aligned experimental data. A reference set contains 1 or more references. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// A reference set is a set of references which typically comprise a reference +/// assembly for a species, such as `GRCh38` which is representative +/// of the human genome. A reference set defines a common coordinate space for +/// comparing reference-aligned experimental data. A reference set contains 1 or +/// more references. +/// +/// For more genomics resource definitions, see [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Activities /// @@ -1678,21 +2177,31 @@ pub struct ReferenceSet { /// The URI from which the references were obtained. #[serde(rename="sourceUri")] pub source_uri: Option, - /// The IDs of the reference objects that are part of this set. `Reference.md5checksum` must be unique within this set. + /// The IDs of the reference objects that are part of this set. + /// `Reference.md5checksum` must be unique within this set. #[serde(rename="referenceIds")] pub reference_ids: Option>, /// Public id of this reference set, such as `GRCh37`. #[serde(rename="assemblyId")] pub assembly_id: Option, - /// All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with a version number, for example `NC_000001.11`. + /// All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally + /// with a version number, for example `NC_000001.11`. #[serde(rename="sourceAccessions")] pub source_accessions: Option>, - /// ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human) indicating the species which this reference set is intended to model. Note that contained references may specify a different `ncbiTaxonId`, as assemblies may contain reference sequences which do not belong to the modeled species, for example EBV in a human reference genome. + /// ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human) + /// indicating the species which this reference set is intended to model. Note + /// that contained references may specify a different `ncbiTaxonId`, as + /// assemblies may contain reference sequences which do not belong to the + /// modeled species, for example EBV in a human reference genome. #[serde(rename="ncbiTaxonId")] pub ncbi_taxon_id: Option, /// The server-generated reference set ID, unique across all reference sets. pub id: Option, - /// Order-independent MD5 checksum which identifies this reference set. The checksum is computed by sorting all lower case hexidecimal string `reference.md5checksum` (for all reference in this set) in ascending lexicographic order, concatenating, and taking the MD5 of that value. The resulting value is represented in lower case hexadecimal format. + /// Order-independent MD5 checksum which identifies this reference set. The + /// checksum is computed by sorting all lower case hexidecimal string + /// `reference.md5checksum` (for all reference in this set) in + /// ascending lexicographic order, concatenating, and taking the MD5 of that + /// value. The resulting value is represented in lower case hexadecimal format. pub md5checksum: Option, } @@ -1700,7 +2209,11 @@ impl Resource for ReferenceSet {} impl ResponseResult for ReferenceSet {} -/// A variant set is a collection of call sets and variants. It contains summary statistics of those contents. A variant set belongs to a dataset. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// A variant set is a collection of call sets and variants. It contains summary +/// statistics of those contents. A variant set belongs to a dataset. +/// +/// For more genomics resource definitions, see [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Activities /// @@ -1713,14 +2226,24 @@ impl ResponseResult for ReferenceSet {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VariantSet { - /// User-specified, mutable name. - pub name: Option, - /// A list of all references used by the variants in a variant set with associated coordinate upper bounds for each one. - #[serde(rename="referenceBounds")] - pub reference_bounds: Option>, /// The metadata associated with this variant set. pub metadata: Option>, - /// The reference set to which the variant set is mapped. The reference set describes the alignment provenance of the variant set, while the `referenceBounds` describe the shape of the actual variant data. The reference set's reference names are a superset of those found in the `referenceBounds`. For example, given a variant set that is mapped to the GRCh38 reference set and contains a single variant on reference 'X', `referenceBounds` would contain only an entry for 'X', while the associated reference set enumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc. + /// A textual description of this variant set. + pub description: Option, + /// A list of all references used by the variants in a variant set + /// with associated coordinate upper bounds for each one. + #[serde(rename="referenceBounds")] + pub reference_bounds: Option>, + /// The reference set to which the variant set is mapped. The reference set + /// describes the alignment provenance of the variant set, while the + /// `referenceBounds` describe the shape of the actual variant data. The + /// reference set's reference names are a superset of those found in the + /// `referenceBounds`. + /// + /// For example, given a variant set that is mapped to the GRCh38 reference set + /// and contains a single variant on reference 'X', `referenceBounds` would + /// contain only an entry for 'X', while the associated reference set + /// enumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc. #[serde(rename="referenceSetId")] pub reference_set_id: Option, /// The server-generated variant set ID, unique across all variant sets. @@ -1728,8 +2251,8 @@ pub struct VariantSet { /// The dataset to which this variant set belongs. #[serde(rename="datasetId")] pub dataset_id: Option, - /// A textual description of this variant set. - pub description: Option, + /// User-specified, mutable name. + pub name: Option, } impl RequestValue for VariantSet {} @@ -1737,39 +2260,40 @@ impl Resource for VariantSet {} impl ResponseResult for VariantSet {} -/// There is no detailed description. +/// The variant data export request. /// /// # 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*). /// -/// * [search annotations](struct.AnnotationSearchCall.html) (request) +/// * [export variantsets](struct.VariantsetExportCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchAnnotationsRequest { - /// The start position of the range on the reference, 0-based inclusive. If specified, referenceId or referenceName must be specified. Defaults to 0. - pub start: Option, - /// The ID of the reference to query. - #[serde(rename="referenceId")] - pub reference_id: Option, - /// The end position of the range on the reference, 0-based exclusive. If referenceId or referenceName must be specified, Defaults to the length of the reference. - pub end: Option, - /// The maximum number of results to return in a single page. If unspecified, defaults to 256. The maximum value is 2048. - #[serde(rename="pageSize")] - pub page_size: Option, - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. - #[serde(rename="pageToken")] - pub page_token: Option, - /// The name of the reference to query, within the reference set associated with this query. - #[serde(rename="referenceName")] - pub reference_name: Option, - /// Required. The annotation sets to search within. The caller must have `READ` access to these annotation sets. All queried annotation sets must have the same type. - #[serde(rename="annotationSetIds")] - pub annotation_set_ids: Option>, +pub struct ExportVariantSetRequest { + /// Required. The BigQuery dataset to export data to. This dataset must already + /// exist. Note that this is distinct from the Genomics concept of "dataset". + #[serde(rename="bigqueryDataset")] + pub bigquery_dataset: Option, + /// The format for the exported data. + pub format: Option, + /// If provided, only variant call information from the specified call sets + /// will be exported. By default all variant calls are exported. + #[serde(rename="callSetIds")] + pub call_set_ids: Option>, + /// Required. The Google Cloud project ID that owns the destination + /// BigQuery dataset. The caller must have WRITE access to this project. This + /// project will also own the resulting export job. + #[serde(rename="projectId")] + pub project_id: Option, + /// Required. The BigQuery table to export data to. + /// If the table doesn't exist, it will be created. If it already exists, it + /// will be overwritten. + #[serde(rename="bigqueryTable")] + pub bigquery_table: Option, } -impl RequestValue for SearchAnnotationsRequest {} +impl RequestValue for ExportVariantSetRequest {} /// The read search request. @@ -1783,23 +2307,35 @@ impl RequestValue for SearchAnnotationsRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReadsRequest { - /// The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified. - pub start: Option, - /// The IDs of the read groups sets within which to search for reads. All specified read group sets must be aligned against a common set of reference sequences; this defines the genomic coordinates for the query. Must specify one of `readGroupSetIds` or `readGroupIds`. - #[serde(rename="readGroupSetIds")] - pub read_group_set_ids: Option>, - /// The IDs of the read groups within which to search for reads. All specified read groups must belong to the same read group sets. Must specify one of `readGroupSetIds` or `readGroupIds`. - #[serde(rename="readGroupIds")] - pub read_group_ids: Option>, - /// The maximum number of results to return in a single page. If unspecified, defaults to 256. The maximum value is 2048. - #[serde(rename="pageSize")] - pub page_size: Option, - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. #[serde(rename="pageToken")] pub page_token: Option, - /// The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified. + /// The IDs of the read groups sets within which to search for reads. All + /// specified read group sets must be aligned against a common set of reference + /// sequences; this defines the genomic coordinates for the query. Must specify + /// one of `readGroupSetIds` or `readGroupIds`. + #[serde(rename="readGroupSetIds")] + pub read_group_set_ids: Option>, + /// The IDs of the read groups within which to search for reads. All specified + /// read groups must belong to the same read group sets. Must specify one of + /// `readGroupSetIds` or `readGroupIds`. + #[serde(rename="readGroupIds")] + pub read_group_ids: Option>, + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 256. The maximum value is 2048. + #[serde(rename="pageSize")] + pub page_size: Option, + /// The start position of the range on the reference, 0-based inclusive. If + /// specified, `referenceName` must also be specified. + pub start: Option, + /// The end position of the range on the reference, 0-based exclusive. If + /// specified, `referenceName` must also be specified. pub end: Option, - /// The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to `*`, only unmapped reads are returned. If unspecified, all reads (mapped and unmapped) are returned. + /// The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to + /// `*`, only unmapped reads are returned. If unspecified, all reads (mapped + /// and unmapped) are returned. #[serde(rename="referenceName")] pub reference_name: Option, } @@ -1817,7 +2353,8 @@ pub struct Range { pub start: Option, /// The end position of the range on the reference, 0-based exclusive. pub end: Option, - /// The reference sequence name, for example `chr1`, `1`, or `chrX`. + /// The reference sequence name, for example `chr1`, + /// `1`, or `chrX`. #[serde(rename="referenceName")] pub reference_name: Option, } @@ -1825,6 +2362,25 @@ pub struct Range { impl Part for Range {} +/// There is no detailed description. +/// +/// # 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*). +/// +/// * [batch create annotations](struct.AnnotationBatchCreateCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BatchCreateAnnotationsResponse { + /// The resulting per-annotation entries, ordered consistently with the + /// original request. + pub entries: Option>, +} + +impl ResponseResult for BatchCreateAnnotationsResponse {} + + /// There is no detailed description. /// /// # Activities @@ -1836,58 +2392,73 @@ impl Part for Range {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchAnnotationSetsRequest { - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. #[serde(rename="pageToken")] pub page_token: Option, - /// Only return annotations sets for which a substring of the name matches this string (case insensitive). + /// Only return annotations sets for which a substring of the name matches this + /// string (case insensitive). pub name: Option, - /// The maximum number of results to return in a single page. If unspecified, defaults to 128. The maximum value is 1024. + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 128. The maximum value is 1024. #[serde(rename="pageSize")] pub page_size: Option, - /// Required. The dataset IDs to search within. Caller must have `READ` access to these datasets. - #[serde(rename="datasetIds")] - pub dataset_ids: Option>, - /// If specified, only annotation sets associated with the given reference set are returned. + /// If specified, only annotation sets associated with the given reference set + /// are returned. #[serde(rename="referenceSetId")] pub reference_set_id: Option, - /// If specified, only annotation sets that have any of these types are returned. + /// Required. The dataset IDs to search within. Caller must have `READ` access + /// to these datasets. + #[serde(rename="datasetIds")] + pub dataset_ids: Option>, + /// If specified, only annotation sets that have any of these types are + /// returned. pub types: Option>, } impl RequestValue for SearchAnnotationSetsRequest {} -/// There is no detailed description. +/// The read search response. /// /// # 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*). /// -/// * [undelete datasets](struct.DatasetUndeleteCall.html) (request) +/// * [search reads](struct.ReadSearchCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UndeleteDatasetRequest { _never_set: Option } - -impl RequestValue for UndeleteDatasetRequest {} - - -/// There is no detailed description. -/// -/// # 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*). -/// -/// * [stream reads](struct.ReadStreamCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct StreamReadsResponse { - /// no description provided +pub struct SearchReadsResponse { + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of matching alignments sorted by mapped genomic coordinate, + /// if any, ascending in position within the same reference. Unmapped reads, + /// which have no position, are returned contiguously and are sorted in + /// ascending lexicographic order by fragment name. pub alignments: Option>, } -impl ResponseResult for StreamReadsResponse {} +impl ResponseResult for SearchReadsResponse {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Entry { + /// The creation status. + pub status: Option, + /// The created annotation, if creation was successful. + pub annotation: Option, +} + +impl Part for Entry {} /// There is no detailed description. @@ -1901,7 +2472,9 @@ impl ResponseResult for StreamReadsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReferencesResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The matching references. @@ -1911,39 +2484,17 @@ pub struct SearchReferencesResponse { impl ResponseResult for SearchReferencesResponse {} -/// The stream variants request. +/// A read group set is a logical collection of read groups, which are +/// collections of reads produced by a sequencer. A read group set typically +/// models reads corresponding to one sample, sequenced one way, and aligned one +/// way. /// -/// # Activities +/// * A read group set belongs to one dataset. +/// * A read group belongs to one read group set. +/// * A read belongs to one read group. /// -/// 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*). -/// -/// * [stream variants](struct.VariantStreamCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct StreamVariantsRequest { - /// The beginning of the window (0-based, inclusive) for which overlapping variants should be returned. - pub start: Option, - /// The variant set ID from which to stream variants. - #[serde(rename="variantSetId")] - pub variant_set_id: Option, - /// The end of the window (0-based, exclusive) for which overlapping variants should be returned. - pub end: Option, - /// Required. Only return variants in this reference sequence. - #[serde(rename="referenceName")] - pub reference_name: Option, - /// The Google Cloud project ID which will be billed for this access. The caller must have WRITE access to this project. Required. - #[serde(rename="projectId")] - pub project_id: Option, - /// Only return variant calls which belong to call sets with these IDs. Leaving this blank returns all variant calls. - #[serde(rename="callSetIds")] - pub call_set_ids: Option>, -} - -impl RequestValue for StreamVariantsRequest {} - - -/// A read group set is a logical collection of read groups, which are collections of reads produced by a sequencer. A read group set typically models reads corresponding to one sample, sequenced one way, and aligned one way. * A read group set belongs to one dataset. * A read group belongs to one read group set. * A read belongs to one read group. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// For more genomics resource definitions, see [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Activities /// @@ -1960,14 +2511,16 @@ pub struct ReadGroupSet { /// The dataset to which this read group set belongs. #[serde(rename="datasetId")] pub dataset_id: Option, - /// The read group set name. By default this will be initialized to the sample name of the sequenced data contained in this set. + /// The read group set name. By default this will be initialized to the sample + /// name of the sequenced data contained in this set. pub name: Option, /// The reference set to which the reads in this read group set are aligned. #[serde(rename="referenceSetId")] pub reference_set_id: Option, /// The server-generated read group set ID, unique for all read group sets. pub id: Option, - /// The read groups in this set. There are typically 1-10 read groups in a read group set. + /// The read groups in this set. There are typically 1-10 read groups in a read + /// group set. #[serde(rename="readGroups")] pub read_groups: Option>, /// The filename of the original source file for this read group set, if any. @@ -1979,40 +2532,6 @@ impl Resource for ReadGroupSet {} impl ResponseResult for ReadGroupSet {} -/// The stream reads request. -/// -/// # 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*). -/// -/// * [stream reads](struct.ReadStreamCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct StreamReadsRequest { - /// The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified. - pub start: Option, - /// The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified. - pub end: Option, - /// Specifying `totalShards` causes a disjoint subset of the normal response payload to be returned for each query with a unique `shard` parameter specified. A best effort is made to yield equally sized shards. Sharding can be used to distribute processing amongst workers, where each worker is assigned a unique `shard` number and all workers specify the same `totalShards` number. The union of reads returned for all sharded queries `[0, totalShards)` is equal to those returned by a single unsharded query. Queries for different values of `totalShards` with common divisors will share shard boundaries. For example, streaming `shard` 2 of 5 `totalShards` yields the same results as streaming `shard`s 4 and 5 of 10 `totalShards`. This property can be leveraged for adaptive retries. - #[serde(rename="totalShards")] - pub total_shards: Option, - /// The ID of the read group set from which to stream reads. - #[serde(rename="readGroupSetId")] - pub read_group_set_id: Option, - /// The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to *, only unmapped reads are returned. - #[serde(rename="referenceName")] - pub reference_name: Option, - /// The Google Cloud project ID which will be billed for this access. The caller must have WRITE access to this project. Required. - #[serde(rename="projectId")] - pub project_id: Option, - /// Restricts results to a shard containing approximately `1/totalShards` of the normal response payload for this query. Results from a sharded request are disjoint from those returned by all queries which differ only in their shard parameter. A shard may yield 0 results; this is especially likely for large values of `totalShards`. Valid values are `[0, totalShards)`. - pub shard: Option, -} - -impl RequestValue for StreamReadsRequest {} - - /// The response message for Operations.ListOperations. /// /// # Activities @@ -2034,7 +2553,8 @@ pub struct ListOperationsResponse { impl ResponseResult for ListOperationsResponse {} -/// A linear alignment can be represented by one CIGAR string. Describes the mapped position and local alignment of the read to the reference. +/// A linear alignment can be represented by one CIGAR string. Describes the +/// mapped position and local alignment of the read to the reference. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -2042,9 +2562,14 @@ impl ResponseResult for ListOperationsResponse {} pub struct LinearAlignment { /// The position of this alignment. pub position: Option, - /// Represents the local alignment of this sequence (alignment matches, indels, etc) against the reference. + /// Represents the local alignment of this sequence (alignment matches, indels, + /// etc) against the reference. pub cigar: Option>, - /// The mapping quality of this alignment. Represents how likely the read maps to this position as opposed to other locations. Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to the nearest integer. + /// The mapping quality of this alignment. Represents how likely + /// the read maps to this position as opposed to other locations. + /// + /// Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to + /// the nearest integer. #[serde(rename="mappingQuality")] pub mapping_quality: Option, } @@ -2052,7 +2577,9 @@ pub struct LinearAlignment { impl Part for LinearAlignment {} -/// An annotation set is a logical grouping of annotations that share consistent type information and provenance. Examples of annotation sets include 'all genes from refseq', and 'all variant annotations from ClinVar'. +/// An annotation set is a logical grouping of annotations that share consistent +/// type information and provenance. Examples of annotation sets include 'all +/// genes from refseq', and 'all variant annotations from ClinVar'. /// /// # Activities /// @@ -2065,19 +2592,22 @@ impl Part for LinearAlignment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AnnotationSet { - /// A map of additional read alignment information. This must be of the form map (string key mapping to a list of string values). + /// A map of additional read alignment information. This must be of the form + /// map (string key mapping to a list of string values). pub info: Option>>, /// The display name for this annotation set. pub name: Option, - /// The source URI describing the file from which this annotation set was generated, if any. + /// The source URI describing the file from which this annotation set was + /// generated, if any. #[serde(rename="sourceUri")] pub source_uri: Option, - /// The ID of the reference set that defines the coordinate space for this set's annotations. - #[serde(rename="referenceSetId")] - pub reference_set_id: Option, /// The type of annotations contained within this set. #[serde(rename="type")] pub type_: Option, + /// The ID of the reference set that defines the coordinate space for this + /// set's annotations. + #[serde(rename="referenceSetId")] + pub reference_set_id: Option, /// The server-generated annotation set ID, unique across all annotation sets. pub id: Option, /// The dataset to which this annotation set belongs. @@ -2096,7 +2626,10 @@ impl ResponseResult for AnnotationSet {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CigarUnit { - /// `referenceSequence` is only used at mismatches (`SEQUENCE_MISMATCH`) and deletions (`DELETE`). Filling this field replaces SAM's MD tag. If the relevant information is not available, this field is unset. + /// `referenceSequence` is only used at mismatches + /// (`SEQUENCE_MISMATCH`) and deletions (`DELETE`). + /// Filling this field replaces SAM's MD tag. If the relevant information is + /// not available, this field is unset. #[serde(rename="referenceSequence")] pub reference_sequence: Option, /// no description provided @@ -2109,7 +2642,10 @@ pub struct CigarUnit { impl Part for CigarUnit {} -/// A Dataset is a collection of genomic data. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// A Dataset is a collection of genomic data. +/// +/// For more genomics resource definitions, see [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Activities /// @@ -2171,7 +2707,9 @@ impl RequestValue for CancelOperationRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchVariantSetsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The variant sets belonging to the requested dataset. @@ -2182,13 +2720,15 @@ pub struct SearchVariantSetsResponse { impl ResponseResult for SearchVariantSetsResponse {} -/// A bucket over which read coverage has been precomputed. A bucket corresponds to a specific range of the reference sequence. +/// A bucket over which read coverage has been precomputed. A bucket corresponds +/// to a specific range of the reference sequence. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CoverageBucket { - /// The average number of reads which are aligned to each individual reference base in this bucket. + /// The average number of reads which are aligned to each individual + /// reference base in this bucket. #[serde(rename="meanCoverage")] pub mean_coverage: Option, /// The genomic coordinate range spanned by this bucket. @@ -2209,7 +2749,9 @@ impl Part for CoverageBucket {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchCallSetsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + /// The continuation token, which is used to page through large result sets. + /// Provide this value in a subsequent request to return the next page of + /// results. This field will be empty if there aren't any additional results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The list of matching call sets. @@ -2231,43 +2773,45 @@ impl ResponseResult for SearchCallSetsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchReferenceSetsRequest { - /// If present, return reference sets for which the md5checksum matches exactly. + /// If present, return reference sets for which the + /// md5checksum matches exactly. pub md5checksums: Option>, - /// If present, return reference sets for which a substring of their `assemblyId` matches this string (case insensitive). - #[serde(rename="assemblyId")] - pub assembly_id: Option, - /// If present, return reference sets for which a prefix of any of sourceAccessions match any of these strings. Accession numbers typically have a main number and a version, for example `NC_000001.11`. - pub accessions: Option>, - /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 4096. - #[serde(rename="pageSize")] - pub page_size: Option, - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. #[serde(rename="pageToken")] pub page_token: Option, + /// If present, return reference sets for which a prefix of any of + /// sourceAccessions + /// match any of these strings. Accession numbers typically have a main number + /// and a version, for example `NC_000001.11`. + pub accessions: Option>, + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 1024. The maximum value is 4096. + #[serde(rename="pageSize")] + pub page_size: Option, + /// If present, return reference sets for which a substring of their + /// `assemblyId` matches this string (case insensitive). + #[serde(rename="assemblyId")] + pub assembly_id: Option, } impl RequestValue for SearchReferenceSetsRequest {} -/// The read search response. +/// There is no detailed description. /// /// # 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*). /// -/// * [search reads](struct.ReadSearchCall.html) (response) +/// * [undelete datasets](struct.DatasetUndeleteCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchReadsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The list of matching alignments sorted by mapped genomic coordinate, if any, ascending in position within the same reference. Unmapped reads, which have no position, are returned contiguously and are sorted in ascending lexicographic order by fragment name. - pub alignments: Option>, -} +pub struct UndeleteDatasetRequest { _never_set: Option } -impl ResponseResult for SearchReadsResponse {} +impl RequestValue for UndeleteDatasetRequest {} @@ -2334,7 +2878,9 @@ impl<'a, C, A> OperationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + /// Gets the latest state of a long-running operation. Clients can use this + /// method to poll the operation result at intervals as recommended by the API + /// service. /// /// # Arguments /// @@ -2412,7 +2958,11 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Creates a new dataset. + /// + /// For the definitions of datasets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -2429,7 +2979,16 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a dataset and all of its contents (all read group sets, reference sets, variant sets, call sets, annotation sets, etc.) This is reversible (up to one week after the deletion) via the datasets.undelete operation. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Deletes a dataset and all of its contents (all read group sets, + /// reference sets, variant sets, call sets, annotation sets, etc.) + /// This is reversible (up to one week after the deletion) via + /// the + /// datasets.undelete + /// operation. + /// + /// For the definitions of datasets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -2446,7 +3005,13 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Undeletes a dataset by restoring a dataset which was deleted via this API. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This operation is only possible for a week after the deletion occurred. + /// Undeletes a dataset by restoring a dataset which was deleted via this API. + /// + /// For the definitions of datasets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// This operation is only possible for a week after the deletion occurred. /// /// # Arguments /// @@ -2465,12 +3030,21 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Sets the access control policy on the specified dataset. Replaces any existing policy. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) See Setting a Policy for more information. + /// Sets the access control policy on the specified dataset. Replaces any + /// existing policy. + /// + /// For the definitions of datasets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// See Setting a + /// Policy for more information. /// /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy is being specified. Format is `datasets/`. + /// * `resource` - REQUIRED: The resource for which policy is being specified. Format is + /// `datasets/`. pub fn set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> DatasetSetIamPolicyCall<'a, C, A> { DatasetSetIamPolicyCall { hub: self.hub, @@ -2484,12 +3058,19 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns permissions that a caller has on the specified resource. See Testing Permissions for more information. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Returns permissions that a caller has on the specified resource. + /// See Testing + /// Permissions for more information. + /// + /// For the definitions of datasets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy is being specified. Format is `datasets/`. + /// * `resource` - REQUIRED: The resource for which policy is being specified. Format is + /// `datasets/`. pub fn test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> DatasetTestIamPermissionCall<'a, C, A> { DatasetTestIamPermissionCall { hub: self.hub, @@ -2503,7 +3084,11 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a dataset by ID. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Gets a dataset by ID. + /// + /// For the definitions of datasets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -2520,7 +3105,11 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists datasets within a project. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Lists datasets within a project. + /// + /// For the definitions of datasets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) pub fn list(&self) -> DatasetListCall<'a, C, A> { DatasetListCall { hub: self.hub, @@ -2535,12 +3124,21 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the access control policy for the dataset. This is empty if the policy or resource does not exist. See Getting a Policy for more information. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Gets the access control policy for the dataset. This is empty if the + /// policy or resource does not exist. + /// + /// See Getting a + /// Policy for more information. + /// + /// For the definitions of datasets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy is being specified. Format is `datasets/`. + /// * `resource` - REQUIRED: The resource for which policy is being specified. Format is + /// `datasets/`. pub fn get_iam_policy(&self, request: GetIamPolicyRequest, resource: &str) -> DatasetGetIamPolicyCall<'a, C, A> { DatasetGetIamPolicyCall { hub: self.hub, @@ -2554,7 +3152,13 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. + /// Updates a dataset. + /// + /// For the definitions of datasets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// This method supports patch semantics. /// /// # Arguments /// @@ -2615,7 +3219,14 @@ impl<'a, C, A> ReferencesetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Searches for reference sets which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71) + /// Searches for reference sets which match the given criteria. + /// + /// For the definitions of references and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Implements + /// [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71) /// /// # Arguments /// @@ -2632,7 +3243,14 @@ impl<'a, C, A> ReferencesetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a reference set. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83). + /// Gets a reference set. + /// + /// For the definitions of references and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Implements + /// [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83). /// /// # Arguments /// @@ -2690,7 +3308,14 @@ impl<'a, C, A> CallsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a list of call sets matching the criteria. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178). + /// Gets a list of call sets matching the criteria. + /// + /// For the definitions of call sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Implements + /// [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178). /// /// # Arguments /// @@ -2707,7 +3332,13 @@ impl<'a, C, A> CallsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. + /// Updates a call set. + /// + /// For the definitions of call sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// This method supports patch semantics. /// /// # Arguments /// @@ -2727,7 +3358,11 @@ impl<'a, C, A> CallsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Creates a new call set. + /// + /// For the definitions of call sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -2744,7 +3379,11 @@ impl<'a, C, A> CallsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Deletes a call set. + /// + /// For the definitions of call sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -2761,7 +3400,11 @@ impl<'a, C, A> CallsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a call set by ID. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Gets a call set by ID. + /// + /// For the definitions of call sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -2802,7 +3445,7 @@ impl<'a, C, A> CallsetMethods<'a, C, A> { /// ::default(), None); /// let mut hub = Genomics::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `search(...)` and `stream(...)` +/// // like `search(...)` /// // to build up your call. /// let rb = hub.reads(); /// # } @@ -2819,7 +3462,30 @@ impl<'a, C, A> ReadMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a list of reads for one or more read group sets. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Reads search operates over a genomic coordinate space of reference sequence & position defined over the reference sequences to which the requested read group sets are aligned. If a target positional range is specified, search returns all reads whose alignment to the reference genome overlap the range. A query which specifies only read group set IDs yields all reads in those read group sets, including unmapped reads. All reads returned (including reads on subsequent pages) are ordered by genomic coordinate (by reference sequence, then position). Reads with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield reads in the same order across their respective streams of paginated responses. Implements [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85). + /// Gets a list of reads for one or more read group sets. + /// + /// For the definitions of read group sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Reads search operates over a genomic coordinate space of reference sequence + /// & position defined over the reference sequences to which the requested + /// read group sets are aligned. + /// + /// If a target positional range is specified, search returns all reads whose + /// alignment to the reference genome overlap the range. A query which + /// specifies only read group set IDs yields all reads in those read group + /// sets, including unmapped reads. + /// + /// All reads returned (including reads on subsequent pages) are ordered by + /// genomic coordinate (by reference sequence, then position). Reads with + /// equivalent genomic coordinates are returned in an unspecified order. This + /// order is consistent, such that two queries for the same content (regardless + /// of page size) yield reads in the same order across their respective streams + /// of paginated responses. + /// + /// Implements + /// [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85). /// /// # Arguments /// @@ -2833,23 +3499,6 @@ impl<'a, C, A> ReadMethods<'a, C, A> { _additional_params: Default::default(), } } - - /// Create a builder to help you perform the following task: - /// - /// Returns a stream of all the reads matching the search request, ordered by reference name, position, and ID. - /// - /// # Arguments - /// - /// * `request` - No description provided. - pub fn stream(&self, request: StreamReadsRequest) -> ReadStreamCall<'a, C, A> { - ReadStreamCall { - hub: self.hub, - _request: request, - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } } @@ -2894,12 +3543,22 @@ impl<'a, C, A> ReadgroupsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Exports a read group set to a BAM file in Google Cloud Storage. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Note that currently there may be some differences between exported BAM files and the original BAM file at the time of import. See ImportReadGroupSets for caveats. + /// Exports a read group set to a BAM file in Google Cloud Storage. + /// + /// For the definitions of read group sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Note that currently there may be some differences between exported BAM + /// files and the original BAM file at the time of import. See + /// ImportReadGroupSets + /// for caveats. /// /// # Arguments /// /// * `request` - No description provided. - /// * `readGroupSetId` - Required. The ID of the read group set to export. The caller must have READ access to this read group set. + /// * `readGroupSetId` - Required. The ID of the read group set to export. The caller must have + /// READ access to this read group set. pub fn export(&self, request: ExportReadGroupSetRequest, read_group_set_id: &str) -> ReadgroupsetExportCall<'a, C, A> { ReadgroupsetExportCall { hub: self.hub, @@ -2913,7 +3572,24 @@ impl<'a, C, A> ReadgroupsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates read group sets by asynchronously importing the provided information. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The caller must have WRITE permissions to the dataset. ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import - Tags will be converted to strings - tag types are not preserved - Comments (`@CO`) in the input file header will not be preserved - Original header order of references (`@SQ`) will not be preserved - Any reverse stranded unmapped reads will be reverse complemented, and their qualities (also the "BQ" and "OQ" tags, if any) will be reversed - Unmapped reads will be stripped of positional information (reference name and position) + /// Creates read group sets by asynchronously importing the provided + /// information. + /// + /// For the definitions of read group sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// The caller must have WRITE permissions to the dataset. + /// + /// ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import + /// + /// - Tags will be converted to strings - tag types are not preserved + /// - Comments (`@CO`) in the input file header will not be preserved + /// - Original header order of references (`@SQ`) will not be preserved + /// - Any reverse stranded unmapped reads will be reverse complemented, and + /// their qualities (also the "BQ" and "OQ" tags, if any) will be reversed + /// - Unmapped reads will be stripped of positional information (reference name + /// and position) /// /// # Arguments /// @@ -2930,12 +3606,19 @@ impl<'a, C, A> ReadgroupsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. + /// Updates a read group set. + /// + /// For the definitions of read group sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// This method supports patch semantics. /// /// # Arguments /// /// * `request` - No description provided. - /// * `readGroupSetId` - The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set. + /// * `readGroupSetId` - The ID of the read group set to be updated. The caller must have WRITE + /// permissions to the dataset associated with this read group set. pub fn patch(&self, request: ReadGroupSet, read_group_set_id: &str) -> ReadgroupsetPatchCall<'a, C, A> { ReadgroupsetPatchCall { hub: self.hub, @@ -2950,7 +3633,11 @@ impl<'a, C, A> ReadgroupsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a read group set by ID. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Gets a read group set by ID. + /// + /// For the definitions of read group sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -2967,7 +3654,19 @@ impl<'a, C, A> ReadgroupsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists fixed width coverage buckets for a read group set, each of which correspond to a range of a reference sequence. Each bucket summarizes coverage information across its corresponding genomic range. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Coverage is defined as the number of reads which are aligned to a given base in the reference sequence. Coverage buckets are available at several precomputed bucket widths, enabling retrieval of various coverage 'zoom levels'. The caller must have READ permissions for the target read group set. + /// Lists fixed width coverage buckets for a read group set, each of which + /// correspond to a range of a reference sequence. Each bucket summarizes + /// coverage information across its corresponding genomic range. + /// + /// For the definitions of read group sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Coverage is defined as the number of reads which are aligned to a given + /// base in the reference sequence. Coverage buckets are available at several + /// precomputed bucket widths, enabling retrieval of various coverage 'zoom + /// levels'. The caller must have READ permissions for the target read group + /// set. /// /// # Arguments /// @@ -2990,11 +3689,16 @@ impl<'a, C, A> ReadgroupsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Deletes a read group set. + /// + /// For the definitions of read group sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// - /// * `readGroupSetId` - The ID of the read group set to be deleted. The caller must have WRITE permissions to the dataset associated with this read group set. + /// * `readGroupSetId` - The ID of the read group set to be deleted. The caller must have WRITE + /// permissions to the dataset associated with this read group set. pub fn delete(&self, read_group_set_id: &str) -> ReadgroupsetDeleteCall<'a, C, A> { ReadgroupsetDeleteCall { hub: self.hub, @@ -3007,7 +3711,14 @@ impl<'a, C, A> ReadgroupsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Searches for read group sets matching the criteria. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135). + /// Searches for read group sets matching the criteria. + /// + /// For the definitions of read group sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Implements + /// [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135). /// /// # Arguments /// @@ -3065,7 +3776,14 @@ impl<'a, C, A> ReferenceMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the bases in a reference, optionally restricted to a range. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221). + /// Lists the bases in a reference, optionally restricted to a range. + /// + /// For the definitions of references and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Implements + /// [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221). /// /// # Arguments /// @@ -3086,7 +3804,14 @@ impl<'a, C, A> ReferenceMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Searches for references which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146). + /// Searches for references which match the given criteria. + /// + /// For the definitions of references and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Implements + /// [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146). /// /// # Arguments /// @@ -3103,7 +3828,14 @@ impl<'a, C, A> ReferenceMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a reference. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158). + /// Gets a reference. + /// + /// For the definitions of references and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Implements + /// [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158). /// /// # Arguments /// @@ -3144,7 +3876,7 @@ impl<'a, C, A> ReferenceMethods<'a, C, A> { /// ::default(), None); /// let mut hub = Genomics::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `create(...)`, `delete(...)`, `get(...)`, `import(...)`, `merge(...)`, `patch(...)`, `search(...)` and `stream(...)` +/// // like `create(...)`, `delete(...)`, `get(...)`, `import(...)`, `merge(...)`, `patch(...)` and `search(...)` /// // to build up your call. /// let rb = hub.variants(); /// # } @@ -3161,7 +3893,14 @@ impl<'a, C, A> VariantMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a list of variants matching the criteria. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126). + /// Gets a list of variants matching the criteria. + /// + /// For the definitions of variants and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Implements + /// [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126). /// /// # Arguments /// @@ -3178,7 +3917,11 @@ impl<'a, C, A> VariantMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Deletes a variant. + /// + /// For the definitions of variants and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -3195,7 +3938,11 @@ impl<'a, C, A> VariantMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a variant by ID. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Gets a variant by ID. + /// + /// For the definitions of variants and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -3212,7 +3959,97 @@ impl<'a, C, A> VariantMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant. Variant info fields are merged as specified in the infoMergeConfig field of the MergeVariantsRequest. Please exercise caution when using this method! It is easy to introduce mistakes in existing variants and difficult to back out of them. For example, suppose you were trying to merge a new variant with an existing one and both variants contain calls that belong to callsets with the same callset ID. // Existing variant - irrelevant fields trimmed for clarity { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 0, 1 ], } ] } // New variant with conflicting call information { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } The resulting merged variant would overwrite the existing calls with those from the new variant: { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } This may be the desired outcome, but it is up to the user to determine if if that is indeed the case. + /// Merges the given variants with existing variants. + /// + /// For the definitions of variants and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Each variant will be + /// merged with an existing variant that matches its reference sequence, + /// start, end, reference bases, and alternative bases. If no such variant + /// exists, a new one will be created. + /// + /// When variants are merged, the call information from the new variant + /// is added to the existing variant. Variant info fields are merged as + /// specified in the + /// infoMergeConfig + /// field of the MergeVariantsRequest. + /// + /// Please exercise caution when using this method! It is easy to introduce + /// mistakes in existing variants and difficult to back out of them. For + /// example, + /// suppose you were trying to merge a new variant with an existing one and + /// both + /// variants contain calls that belong to callsets with the same callset ID. + /// + /// // Existing variant - irrelevant fields trimmed for clarity + /// { + /// "variantSetId": "10473108253681171589", + /// "referenceName": "1", + /// "start": "10582", + /// "referenceBases": "G", + /// "alternateBases": [ + /// "A" + /// ], + /// "calls": [ + /// { + /// "callSetId": "10473108253681171589-0", + /// "callSetName": "CALLSET0", + /// "genotype": [ + /// 0, + /// 1 + /// ], + /// } + /// ] + /// } + /// + /// // New variant with conflicting call information + /// { + /// "variantSetId": "10473108253681171589", + /// "referenceName": "1", + /// "start": "10582", + /// "referenceBases": "G", + /// "alternateBases": [ + /// "A" + /// ], + /// "calls": [ + /// { + /// "callSetId": "10473108253681171589-0", + /// "callSetName": "CALLSET0", + /// "genotype": [ + /// 1, + /// 1 + /// ], + /// } + /// ] + /// } + /// + /// The resulting merged variant would overwrite the existing calls with those + /// from the new variant: + /// + /// { + /// "variantSetId": "10473108253681171589", + /// "referenceName": "1", + /// "start": "10582", + /// "referenceBases": "G", + /// "alternateBases": [ + /// "A" + /// ], + /// "calls": [ + /// { + /// "callSetId": "10473108253681171589-0", + /// "callSetName": "CALLSET0", + /// "genotype": [ + /// 1, + /// 1 + /// ], + /// } + /// ] + /// } + /// + /// This may be the desired outcome, but it is up to the user to determine if + /// if that is indeed the case. /// /// # Arguments /// @@ -3229,24 +4066,11 @@ impl<'a, C, A> VariantMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and Variant info fields are merged as specified in infoMergeConfig. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set. + /// Creates a new variant. /// - /// # Arguments - /// - /// * `request` - No description provided. - pub fn import(&self, request: ImportVariantsRequest) -> VariantImportCall<'a, C, A> { - VariantImportCall { - hub: self.hub, - _request: request, - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Creates a new variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// For the definitions of variants and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -3263,7 +4087,48 @@ impl<'a, C, A> VariantMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. Returns the modified variant without its calls. + /// Creates variant data by asynchronously importing the provided information. + /// + /// For the definitions of variant sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// The variants for import will be merged with any existing variant that + /// matches its reference sequence, start, end, reference bases, and + /// alternative bases. If no such variant exists, a new one will be created. + /// + /// When variants are merged, the call information from the new variant + /// is added to the existing variant, and Variant info fields are merged + /// as specified in + /// infoMergeConfig. + /// As a special case, for single-sample VCF files, QUAL and FILTER fields will + /// be moved to the call level; these are sometimes interpreted in a + /// call-specific context. + /// Imported VCF headers are appended to the metadata already in a variant set. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn import(&self, request: ImportVariantsRequest) -> VariantImportCall<'a, C, A> { + VariantImportCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates a variant. + /// + /// For the definitions of variants and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// This method supports patch semantics. Returns the modified variant without + /// its calls. /// /// # Arguments /// @@ -3280,23 +4145,6 @@ impl<'a, C, A> VariantMethods<'a, C, A> { _additional_params: Default::default(), } } - - /// Create a builder to help you perform the following task: - /// - /// Returns a stream of all the variants matching the search request, ordered by reference name, position, and ID. - /// - /// # Arguments - /// - /// * `request` - No description provided. - pub fn stream(&self, request: StreamVariantsRequest) -> VariantStreamCall<'a, C, A> { - VariantStreamCall { - hub: self.hub, - _request: request, - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } } @@ -3341,7 +4189,8 @@ impl<'a, C, A> AnnotationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates an annotation. Caller must have WRITE permission for the associated dataset. + /// Updates an annotation. Caller must have + /// WRITE permission for the associated dataset. /// /// # Arguments /// @@ -3361,7 +4210,8 @@ impl<'a, C, A> AnnotationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets an annotation. Caller must have READ permission for the associated annotation set. + /// Gets an annotation. Caller must have READ permission + /// for the associated annotation set. /// /// # Arguments /// @@ -3378,7 +4228,13 @@ impl<'a, C, A> AnnotationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Searches for annotations that match the given criteria. Results are ordered by genomic coordinate (by reference sequence, then position). Annotations with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotations in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried annotation sets. + /// Searches for annotations that match the given criteria. Results are + /// ordered by genomic coordinate (by reference sequence, then position). + /// Annotations with equivalent genomic coordinates are returned in an + /// unspecified order. This order is consistent, such that two queries for the + /// same content (regardless of page size) yield annotations in the same order + /// across their respective streams of paginated responses. Caller must have + /// READ permission for the queried annotation sets. /// /// # Arguments /// @@ -3395,7 +4251,8 @@ impl<'a, C, A> AnnotationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an annotation. Caller must have WRITE permission for the associated annotation set. + /// Deletes an annotation. Caller must have WRITE permission for + /// the associated annotation set. /// /// # Arguments /// @@ -3412,7 +4269,28 @@ impl<'a, C, A> AnnotationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new annotation. Caller must have WRITE permission for the associated annotation set. The following fields are required: * annotationSetId * referenceName or referenceId ### Transcripts For annotations of type TRANSCRIPT, the following fields of transcript must be provided: * exons.start * exons.end All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). The annotated range must be no longer than 100Mbp (mega base pairs). See the Annotation resource for additional restrictions on each field. + /// Creates a new annotation. Caller must have WRITE permission + /// for the associated annotation set. + /// + /// The following fields are required: + /// + /// * annotationSetId + /// * referenceName or + /// referenceId + /// + /// ### Transcripts + /// + /// For annotations of type TRANSCRIPT, the following fields of + /// transcript must be provided: + /// + /// * exons.start + /// * exons.end + /// + /// All other fields may be optionally specified, unless documented as being + /// server-generated (for example, the `id` field). The annotated + /// range must be no longer than 100Mbp (mega base pairs). See the + /// Annotation resource + /// for additional restrictions on each field. /// /// # Arguments /// @@ -3429,7 +4307,20 @@ impl<'a, C, A> AnnotationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates one or more new annotations atomically. All annotations must belong to the same annotation set. Caller must have WRITE permission for this annotation set. For optimal performance, batch positionally adjacent annotations together. If the request has a systemic issue, such as an attempt to write to an inaccessible annotation set, the entire RPC will fail accordingly. For lesser data issues, when possible an error will be isolated to the corresponding batch entry in the response; the remaining well formed annotations will be created normally. For details on the requirements for each individual annotation resource, see CreateAnnotation. + /// Creates one or more new annotations atomically. All annotations must + /// belong to the same annotation set. Caller must have WRITE + /// permission for this annotation set. For optimal performance, batch + /// positionally adjacent annotations together. + /// + /// If the request has a systemic issue, such as an attempt to write to + /// an inaccessible annotation set, the entire RPC will fail accordingly. For + /// lesser data issues, when possible an error will be isolated to the + /// corresponding batch entry in the response; the remaining well formed + /// annotations will be created normally. + /// + /// For details on the requirements for each individual annotation resource, + /// see + /// CreateAnnotation. /// /// # Arguments /// @@ -3487,7 +4378,9 @@ impl<'a, C, A> AnnotationsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates an annotation set. The update must respect all mutability restrictions and other invariants described on the annotation set resource. Caller must have WRITE permission for the associated dataset. + /// Updates an annotation set. The update must respect all mutability + /// restrictions and other invariants described on the annotation set resource. + /// Caller must have WRITE permission for the associated dataset. /// /// # Arguments /// @@ -3507,7 +4400,11 @@ impl<'a, C, A> AnnotationsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Searches for annotation sets that match the given criteria. Annotation sets are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotation sets in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried datasets. + /// Searches for annotation sets that match the given criteria. Annotation sets + /// are returned in an unspecified order. This order is consistent, such that + /// two queries for the same content (regardless of page size) yield annotation + /// sets in the same order across their respective streams of paginated + /// responses. Caller must have READ permission for the queried datasets. /// /// # Arguments /// @@ -3524,7 +4421,16 @@ impl<'a, C, A> AnnotationsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new annotation set. Caller must have WRITE permission for the associated dataset. The following fields are required: * datasetId * referenceSetId All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). + /// Creates a new annotation set. Caller must have WRITE permission for the + /// associated dataset. + /// + /// The following fields are required: + /// + /// * datasetId + /// * referenceSetId + /// + /// All other fields may be optionally specified, unless documented as being + /// server-generated (for example, the `id` field). /// /// # Arguments /// @@ -3541,7 +4447,8 @@ impl<'a, C, A> AnnotationsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an annotation set. Caller must have WRITE permission for the associated annotation set. + /// Deletes an annotation set. Caller must have WRITE permission + /// for the associated annotation set. /// /// # Arguments /// @@ -3558,7 +4465,8 @@ impl<'a, C, A> AnnotationsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets an annotation set. Caller must have READ permission for the associated dataset. + /// Gets an annotation set. Caller must have READ permission for + /// the associated dataset. /// /// # Arguments /// @@ -3616,7 +4524,15 @@ impl<'a, C, A> VariantsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new variant set. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The provided variant set must have a valid `datasetId` set - all other fields are optional. Note that the `id` field will be ignored, as this is assigned by the server. + /// Creates a new variant set. + /// + /// For the definitions of variant sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// The provided variant set must have a valid `datasetId` set - all other + /// fields are optional. Note that the `id` field will be ignored, as this is + /// assigned by the server. /// /// # Arguments /// @@ -3633,7 +4549,12 @@ impl<'a, C, A> VariantsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a variant set including all variants, call sets, and calls within. This is not reversible. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Deletes a variant set including all variants, call sets, and calls within. + /// This is not reversible. + /// + /// For the definitions of variant sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -3650,12 +4571,17 @@ impl<'a, C, A> VariantsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Exports variant set data to an external destination. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Exports variant set data to an external destination. + /// + /// For the definitions of variant sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// /// * `request` - No description provided. - /// * `variantSetId` - Required. The ID of the variant set that contains variant data which should be exported. The caller must have READ access to this variant set. + /// * `variantSetId` - Required. The ID of the variant set that contains variant data which + /// should be exported. The caller must have READ access to this variant set. pub fn export(&self, request: ExportVariantSetRequest, variant_set_id: &str) -> VariantsetExportCall<'a, C, A> { VariantsetExportCall { hub: self.hub, @@ -3669,7 +4595,11 @@ impl<'a, C, A> VariantsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a variant set using patch semantics. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Updates a variant set using patch semantics. + /// + /// For the definitions of variant sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -3689,7 +4619,14 @@ impl<'a, C, A> VariantsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of all variant sets matching search criteria. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49). + /// Returns a list of all variant sets matching search criteria. + /// + /// For the definitions of variant sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// + /// Implements + /// [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49). /// /// # Arguments /// @@ -3706,7 +4643,11 @@ impl<'a, C, A> VariantsetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a variant set by ID. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Gets a variant set by ID. + /// + /// For the definitions of variant sets and other genomics resources, see + /// [Fundamentals of Google + /// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -3968,17 +4909,17 @@ impl<'a, C, A> OperationCancelCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> OperationCancelCall<'a, C, A> @@ -4006,7 +4947,9 @@ impl<'a, C, A> OperationCancelCall<'a, C, A> where C: BorrowMut, } -/// Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. +/// Gets the latest state of a long-running operation. Clients can use this +/// method to poll the operation result at intervals as recommended by the API +/// service. /// /// A builder for the *get* method supported by a *operation* resource. /// It is not used directly, but through a `OperationMethods` instance. @@ -4213,17 +5156,17 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> OperationGetCall<'a, C, A> @@ -4460,14 +5403,32 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: self._page_token = Some(new_value.to_string()); self } - /// The maximum number of results to return. If unspecified, defaults to 256. The maximum value is 2048. + /// The maximum number of results to return. If unspecified, defaults to + /// 256. The maximum value is 2048. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> OperationListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// A string for filtering Operations. The following filter fields are supported: * projectId: Required. Corresponds to OperationMetadata.projectId. * createTime: The time this job was created, in seconds from the [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=` and/or `= 1432140000` * `projectId = my-project AND createTime >= 1432140000 AND createTime <= 1432150000 AND status = RUNNING` * `projectId = my-project AND labels.color = *` * `projectId = my-project AND labels.color = red` + /// A string for filtering Operations. + /// The following filter fields are supported: + /// + /// * projectId: Required. Corresponds to + /// OperationMetadata.projectId. + /// * createTime: The time this job was created, in seconds from the + /// [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=` and/or `<=` + /// operators. + /// * status: Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only + /// one status may be specified. + /// * labels.key where key is a label key. + /// + /// Examples: + /// + /// * `projectId = my-project AND createTime >= 1432140000` + /// * `projectId = my-project AND createTime >= 1432140000 AND createTime <= 1432150000 AND status = RUNNING` + /// * `projectId = my-project AND labels.color = *` + /// * `projectId = my-project AND labels.color = red` /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> OperationListCall<'a, C, A> { @@ -4494,17 +5455,17 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> OperationListCall<'a, C, A> @@ -4532,7 +5493,11 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: } -/// Creates a new dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Creates a new dataset. +/// +/// For the definitions of datasets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *create* method supported by a *dataset* resource. /// It is not used directly, but through a `DatasetMethods` instance. @@ -4733,17 +5698,17 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> DatasetCreateCall<'a, C, A> @@ -4771,7 +5736,16 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: } -/// Deletes a dataset and all of its contents (all read group sets, reference sets, variant sets, call sets, annotation sets, etc.) This is reversible (up to one week after the deletion) via the datasets.undelete operation. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Deletes a dataset and all of its contents (all read group sets, +/// reference sets, variant sets, call sets, annotation sets, etc.) +/// This is reversible (up to one week after the deletion) via +/// the +/// datasets.undelete +/// operation. +/// +/// For the definitions of datasets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *delete* method supported by a *dataset* resource. /// It is not used directly, but through a `DatasetMethods` instance. @@ -4974,17 +5948,17 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> DatasetDeleteCall<'a, C, A> @@ -5012,7 +5986,13 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: } -/// Undeletes a dataset by restoring a dataset which was deleted via this API. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This operation is only possible for a week after the deletion occurred. +/// Undeletes a dataset by restoring a dataset which was deleted via this API. +/// +/// For the definitions of datasets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// This operation is only possible for a week after the deletion occurred. /// /// A builder for the *undelete* method supported by a *dataset* resource. /// It is not used directly, but through a `DatasetMethods` instance. @@ -5246,17 +6226,17 @@ impl<'a, C, A> DatasetUndeleteCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> DatasetUndeleteCall<'a, C, A> @@ -5284,7 +6264,15 @@ impl<'a, C, A> DatasetUndeleteCall<'a, C, A> where C: BorrowMut, } -/// Sets the access control policy on the specified dataset. Replaces any existing policy. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) See Setting a Policy for more information. +/// Sets the access control policy on the specified dataset. Replaces any +/// existing policy. +/// +/// For the definitions of datasets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// See Setting a +/// Policy for more information. /// /// A builder for the *setIamPolicy* method supported by a *dataset* resource. /// It is not used directly, but through a `DatasetMethods` instance. @@ -5492,7 +6480,8 @@ impl<'a, C, A> DatasetSetIamPolicyCall<'a, C, A> where C: BorrowMut`. /// /// Sets the *resource* path property to the given value. /// @@ -5522,17 +6511,17 @@ impl<'a, C, A> DatasetSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> DatasetSetIamPolicyCall<'a, C, A> @@ -5560,7 +6549,13 @@ impl<'a, C, A> DatasetSetIamPolicyCall<'a, C, A> where C: BorrowMutTesting +/// Permissions for more information. +/// +/// For the definitions of datasets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *testIamPermissions* method supported by a *dataset* resource. /// It is not used directly, but through a `DatasetMethods` instance. @@ -5768,7 +6763,8 @@ impl<'a, C, A> DatasetTestIamPermissionCall<'a, C, A> where C: BorrowMut`. /// /// Sets the *resource* path property to the given value. /// @@ -5798,17 +6794,17 @@ impl<'a, C, A> DatasetTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> DatasetTestIamPermissionCall<'a, C, A> @@ -5836,7 +6832,11 @@ impl<'a, C, A> DatasetTestIamPermissionCall<'a, C, A> where C: BorrowMut DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> DatasetGetCall<'a, C, A> @@ -6077,7 +7077,11 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa } -/// Lists datasets within a project. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Lists datasets within a project. +/// +/// For the definitions of datasets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *list* method supported by a *dataset* resource. /// It is not used directly, but through a `DatasetMethods` instance. @@ -6249,14 +7253,17 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o self._project_id = Some(new_value.to_string()); self } - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> DatasetListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// The maximum number of results to return in a single page. If unspecified, defaults to 50. The maximum value is 1024. + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 50. The maximum value is 1024. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> DatasetListCall<'a, C, A> { @@ -6283,17 +7290,17 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> DatasetListCall<'a, C, A> @@ -6321,7 +7328,15 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o } -/// Gets the access control policy for the dataset. This is empty if the policy or resource does not exist. See Getting a Policy for more information. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Gets the access control policy for the dataset. This is empty if the +/// policy or resource does not exist. +/// +/// See Getting a +/// Policy for more information. +/// +/// For the definitions of datasets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *getIamPolicy* method supported by a *dataset* resource. /// It is not used directly, but through a `DatasetMethods` instance. @@ -6529,7 +7544,8 @@ impl<'a, C, A> DatasetGetIamPolicyCall<'a, C, A> where C: BorrowMut`. /// /// Sets the *resource* path property to the given value. /// @@ -6559,17 +7575,17 @@ impl<'a, C, A> DatasetGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> DatasetGetIamPolicyCall<'a, C, A> @@ -6597,7 +7613,13 @@ impl<'a, C, A> DatasetGetIamPolicyCall<'a, C, A> where C: BorrowMut DatasetPatchCall<'a, C, A> where C: BorrowMut, A: self._dataset_id = new_value.to_string(); self } - /// An optional mask specifying which fields to update. At this time, the only mutable field is name. The only acceptable value is "name". If unspecified, all mutable fields will be updated. + /// An optional mask specifying which fields to update. At this time, the only + /// mutable field is name. The only + /// acceptable value is "name". If unspecified, all mutable fields will be + /// updated. /// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> DatasetPatchCall<'a, C, A> { @@ -6843,17 +7868,17 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> DatasetPatchCall<'a, C, A> @@ -6881,7 +7906,14 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: } -/// Searches for reference sets which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71) +/// Searches for reference sets which match the given criteria. +/// +/// For the definitions of references and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Implements +/// [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71) /// /// A builder for the *search* method supported by a *referenceset* resource. /// It is not used directly, but through a `ReferencesetMethods` instance. @@ -7082,17 +8114,17 @@ impl<'a, C, A> ReferencesetSearchCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ReferencesetSearchCall<'a, C, A> @@ -7120,7 +8152,14 @@ impl<'a, C, A> ReferencesetSearchCall<'a, C, A> where C: BorrowMut ReferencesetGetCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ReferencesetGetCall<'a, C, A> @@ -7361,7 +8400,14 @@ impl<'a, C, A> ReferencesetGetCall<'a, C, A> where C: BorrowMut, } -/// Gets a list of call sets matching the criteria. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178). +/// Gets a list of call sets matching the criteria. +/// +/// For the definitions of call sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Implements +/// [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178). /// /// A builder for the *search* method supported by a *callset* resource. /// It is not used directly, but through a `CallsetMethods` instance. @@ -7562,17 +8608,17 @@ impl<'a, C, A> CallsetSearchCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CallsetSearchCall<'a, C, A> @@ -7600,7 +8646,13 @@ impl<'a, C, A> CallsetSearchCall<'a, C, A> where C: BorrowMut, A: } -/// Updates a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. +/// Updates a call set. +/// +/// For the definitions of call sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// This method supports patch semantics. /// /// A builder for the *patch* method supported by a *callset* resource. /// It is not used directly, but through a `CallsetMethods` instance. @@ -7819,7 +8871,10 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: self._call_set_id = new_value.to_string(); self } - /// An optional mask specifying which fields to update. At this time, the only mutable field is name. The only acceptable value is "name". If unspecified, all mutable fields will be updated. + /// An optional mask specifying which fields to update. At this time, the only + /// mutable field is name. The only + /// acceptable value is "name". If unspecified, all mutable fields will be + /// updated. /// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> CallsetPatchCall<'a, C, A> { @@ -7846,17 +8901,17 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CallsetPatchCall<'a, C, A> @@ -7884,7 +8939,11 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: } -/// Creates a new call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Creates a new call set. +/// +/// For the definitions of call sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *create* method supported by a *callset* resource. /// It is not used directly, but through a `CallsetMethods` instance. @@ -8085,17 +9144,17 @@ impl<'a, C, A> CallsetCreateCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CallsetCreateCall<'a, C, A> @@ -8123,7 +9182,11 @@ impl<'a, C, A> CallsetCreateCall<'a, C, A> where C: BorrowMut, A: } -/// Deletes a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Deletes a call set. +/// +/// For the definitions of call sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *delete* method supported by a *callset* resource. /// It is not used directly, but through a `CallsetMethods` instance. @@ -8326,17 +9389,17 @@ impl<'a, C, A> CallsetDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CallsetDeleteCall<'a, C, A> @@ -8364,7 +9427,11 @@ impl<'a, C, A> CallsetDeleteCall<'a, C, A> where C: BorrowMut, A: } -/// Gets a call set by ID. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Gets a call set by ID. +/// +/// For the definitions of call sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *get* method supported by a *callset* resource. /// It is not used directly, but through a `CallsetMethods` instance. @@ -8567,17 +9634,17 @@ impl<'a, C, A> CallsetGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> CallsetGetCall<'a, C, A> @@ -8605,7 +9672,30 @@ impl<'a, C, A> CallsetGetCall<'a, C, A> where C: BorrowMut, A: oa } -/// Gets a list of reads for one or more read group sets. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Reads search operates over a genomic coordinate space of reference sequence & position defined over the reference sequences to which the requested read group sets are aligned. If a target positional range is specified, search returns all reads whose alignment to the reference genome overlap the range. A query which specifies only read group set IDs yields all reads in those read group sets, including unmapped reads. All reads returned (including reads on subsequent pages) are ordered by genomic coordinate (by reference sequence, then position). Reads with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield reads in the same order across their respective streams of paginated responses. Implements [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85). +/// Gets a list of reads for one or more read group sets. +/// +/// For the definitions of read group sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Reads search operates over a genomic coordinate space of reference sequence +/// & position defined over the reference sequences to which the requested +/// read group sets are aligned. +/// +/// If a target positional range is specified, search returns all reads whose +/// alignment to the reference genome overlap the range. A query which +/// specifies only read group set IDs yields all reads in those read group +/// sets, including unmapped reads. +/// +/// All reads returned (including reads on subsequent pages) are ordered by +/// genomic coordinate (by reference sequence, then position). Reads with +/// equivalent genomic coordinates are returned in an unspecified order. This +/// order is consistent, such that two queries for the same content (regardless +/// of page size) yield reads in the same order across their respective streams +/// of paginated responses. +/// +/// Implements +/// [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85). /// /// A builder for the *search* method supported by a *read* resource. /// It is not used directly, but through a `ReadMethods` instance. @@ -8806,17 +9896,17 @@ impl<'a, C, A> ReadSearchCall<'a, C, A> where C: BorrowMut, A: oa /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ReadSearchCall<'a, C, A> @@ -8844,246 +9934,16 @@ impl<'a, C, A> ReadSearchCall<'a, C, A> where C: BorrowMut, A: oa } -/// Returns a stream of all the reads matching the search request, ordered by reference name, position, and ID. -/// -/// A builder for the *stream* method supported by a *read* resource. -/// It is not used directly, but through a `ReadMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_genomics1 as genomics1; -/// use genomics1::StreamReadsRequest; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use genomics1::Genomics; +/// Exports a read group set to a BAM file in Google Cloud Storage. /// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Genomics::new(hyper::Client::new(), 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 = StreamReadsRequest::default(); +/// For the definitions of read group sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// -/// // 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.reads().stream(req) -/// .doit(); -/// # } -/// ``` -pub struct ReadStreamCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Genomics, - _request: StreamReadsRequest, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ReadStreamCall<'a, C, A> {} - -impl<'a, C, A> ReadStreamCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, StreamReadsResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "genomics.reads.stream", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - for &field in ["alt"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://genomics.googleapis.com/v1/reads:stream".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: StreamReadsRequest) -> ReadStreamCall<'a, C, A> { - self._request = 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. - /// - /// 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 Delegate) -> ReadStreamCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> ReadStreamCall<'a, C, A> - 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 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: T) -> ReadStreamCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Exports a read group set to a BAM file in Google Cloud Storage. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Note that currently there may be some differences between exported BAM files and the original BAM file at the time of import. See ImportReadGroupSets for caveats. +/// Note that currently there may be some differences between exported BAM +/// files and the original BAM file at the time of import. See +/// ImportReadGroupSets +/// for caveats. /// /// A builder for the *export* method supported by a *readgroupset* resource. /// It is not used directly, but through a `ReadgroupsetMethods` instance. @@ -9287,7 +10147,8 @@ impl<'a, C, A> ReadgroupsetExportCall<'a, C, A> where C: BorrowMut ReadgroupsetExportCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ReadgroupsetExportCall<'a, C, A> @@ -9355,7 +10216,24 @@ impl<'a, C, A> ReadgroupsetExportCall<'a, C, A> where C: BorrowMut ReadgroupsetImportCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ReadgroupsetImportCall<'a, C, A> @@ -9594,7 +10472,13 @@ impl<'a, C, A> ReadgroupsetImportCall<'a, C, A> where C: BorrowMut ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut self._request = new_value; self } - /// The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set. + /// The ID of the read group set to be updated. The caller must have WRITE + /// permissions to the dataset associated with this read group set. /// /// Sets the *read group set id* path property to the given value. /// @@ -9813,7 +10698,13 @@ impl<'a, C, A> ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut self._read_group_set_id = new_value.to_string(); self } - /// An optional mask specifying which fields to update. Supported fields: * name. * referenceSetId. Leaving `updateMask` unset is equivalent to specifying all mutable fields. + /// An optional mask specifying which fields to update. Supported fields: + /// + /// * name. + /// * referenceSetId. + /// + /// Leaving `updateMask` unset is equivalent to specifying all mutable + /// fields. /// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> ReadgroupsetPatchCall<'a, C, A> { @@ -9840,17 +10731,17 @@ impl<'a, C, A> ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ReadgroupsetPatchCall<'a, C, A> @@ -9878,7 +10769,11 @@ impl<'a, C, A> ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut } -/// Gets a read group set by ID. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Gets a read group set by ID. +/// +/// For the definitions of read group sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *get* method supported by a *readgroupset* resource. /// It is not used directly, but through a `ReadgroupsetMethods` instance. @@ -10081,17 +10976,17 @@ impl<'a, C, A> ReadgroupsetGetCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ReadgroupsetGetCall<'a, C, A> @@ -10119,7 +11014,19 @@ impl<'a, C, A> ReadgroupsetGetCall<'a, C, A> where C: BorrowMut, } -/// Lists fixed width coverage buckets for a read group set, each of which correspond to a range of a reference sequence. Each bucket summarizes coverage information across its corresponding genomic range. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Coverage is defined as the number of reads which are aligned to a given base in the reference sequence. Coverage buckets are available at several precomputed bucket widths, enabling retrieval of various coverage 'zoom levels'. The caller must have READ permissions for the target read group set. +/// Lists fixed width coverage buckets for a read group set, each of which +/// correspond to a range of a reference sequence. Each bucket summarizes +/// coverage information across its corresponding genomic range. +/// +/// For the definitions of read group sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Coverage is defined as the number of reads which are aligned to a given +/// base in the reference sequence. Coverage buckets are available at several +/// precomputed bucket widths, enabling retrieval of various coverage 'zoom +/// levels'. The caller must have READ permissions for the target read group +/// set. /// /// A builder for the *coveragebuckets.list* method supported by a *readgroupset* resource. /// It is not used directly, but through a `ReadgroupsetMethods` instance. @@ -10332,42 +11239,55 @@ impl<'a, C, A> ReadgroupsetCoveragebucketListCall<'a, C, A> where C: BorrowMut ReadgroupsetCoveragebucketListCall<'a, C, A> { self._target_bucket_width = Some(new_value.to_string()); self } - /// The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified. Defaults to 0. + /// The start position of the range on the reference, 0-based inclusive. If + /// specified, `referenceName` must also be specified. Defaults to 0. /// /// Sets the *start* query property to the given value. pub fn start(mut self, new_value: &str) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._start = Some(new_value.to_string()); self } - /// The name of the reference to query, within the reference set associated with this query. Optional. + /// The name of the reference to query, within the reference set associated + /// with this query. Optional. /// /// Sets the *reference name* query property to the given value. pub fn reference_name(mut self, new_value: &str) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._reference_name = Some(new_value.to_string()); self } - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 2048. + /// The maximum number of results to return in a single page. If unspecified, + /// defaults to 1024. The maximum value is 2048. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified. If unset or 0, defaults to the length of the reference. + /// The end position of the range on the reference, 0-based exclusive. If + /// specified, `referenceName` must also be specified. If unset or 0, defaults + /// to the length of the reference. /// /// Sets the *end* query property to the given value. pub fn end(mut self, new_value: &str) -> ReadgroupsetCoveragebucketListCall<'a, C, A> { @@ -10394,17 +11314,17 @@ impl<'a, C, A> ReadgroupsetCoveragebucketListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ReadgroupsetCoveragebucketListCall<'a, C, A> @@ -10432,7 +11352,11 @@ impl<'a, C, A> ReadgroupsetCoveragebucketListCall<'a, C, A> where C: BorrowMut ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ReadgroupsetDeleteCall<'a, C, A> @@ -10673,7 +11598,14 @@ impl<'a, C, A> ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut ReadgroupsetSearchCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ReadgroupsetSearchCall<'a, C, A> @@ -10912,7 +11844,14 @@ impl<'a, C, A> ReadgroupsetSearchCall<'a, C, A> where C: BorrowMut ReferenceBaseListCall<'a, C, A> where C: BorrowMut self._start = Some(new_value.to_string()); self } - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + /// The continuation token, which is used to page through large result sets. + /// To get the next page of results, set this parameter to the value of + /// `nextPageToken` from the previous response. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ReferenceBaseListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// The maximum number of bases to return in a single page. If unspecified, defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base pairs). + /// The maximum number of bases to return in a single page. If unspecified, + /// defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base + /// pairs). /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ReferenceBaseListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// The end position (0-based, exclusive) of this query. Defaults to the length of this reference. + /// The end position (0-based, exclusive) of this query. Defaults to the length + /// of this reference. /// /// Sets the *end* query property to the given value. pub fn end(mut self, new_value: &str) -> ReferenceBaseListCall<'a, C, A> { @@ -11163,17 +12107,17 @@ impl<'a, C, A> ReferenceBaseListCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ReferenceBaseListCall<'a, C, A> @@ -11201,7 +12145,14 @@ impl<'a, C, A> ReferenceBaseListCall<'a, C, A> where C: BorrowMut } -/// Searches for references which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146). +/// Searches for references which match the given criteria. +/// +/// For the definitions of references and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Implements +/// [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146). /// /// A builder for the *search* method supported by a *reference* resource. /// It is not used directly, but through a `ReferenceMethods` instance. @@ -11402,17 +12353,17 @@ impl<'a, C, A> ReferenceSearchCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ReferenceSearchCall<'a, C, A> @@ -11440,7 +12391,14 @@ impl<'a, C, A> ReferenceSearchCall<'a, C, A> where C: BorrowMut, } -/// Gets a reference. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158). +/// Gets a reference. +/// +/// For the definitions of references and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Implements +/// [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158). /// /// A builder for the *get* method supported by a *reference* resource. /// It is not used directly, but through a `ReferenceMethods` instance. @@ -11643,17 +12601,17 @@ impl<'a, C, A> ReferenceGetCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ReferenceGetCall<'a, C, A> @@ -11681,7 +12639,14 @@ impl<'a, C, A> ReferenceGetCall<'a, C, A> where C: BorrowMut, A: } -/// Gets a list of variants matching the criteria. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126). +/// Gets a list of variants matching the criteria. +/// +/// For the definitions of variants and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Implements +/// [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126). /// /// A builder for the *search* method supported by a *variant* resource. /// It is not used directly, but through a `VariantMethods` instance. @@ -11882,17 +12847,17 @@ impl<'a, C, A> VariantSearchCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantSearchCall<'a, C, A> @@ -11920,7 +12885,11 @@ impl<'a, C, A> VariantSearchCall<'a, C, A> where C: BorrowMut, A: } -/// Deletes a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Deletes a variant. +/// +/// For the definitions of variants and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *delete* method supported by a *variant* resource. /// It is not used directly, but through a `VariantMethods` instance. @@ -12123,17 +13092,17 @@ impl<'a, C, A> VariantDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantDeleteCall<'a, C, A> @@ -12161,7 +13130,11 @@ impl<'a, C, A> VariantDeleteCall<'a, C, A> where C: BorrowMut, A: } -/// Gets a variant by ID. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Gets a variant by ID. +/// +/// For the definitions of variants and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *get* method supported by a *variant* resource. /// It is not used directly, but through a `VariantMethods` instance. @@ -12364,17 +13337,17 @@ impl<'a, C, A> VariantGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantGetCall<'a, C, A> @@ -12402,7 +13375,97 @@ impl<'a, C, A> VariantGetCall<'a, C, A> where C: BorrowMut, A: oa } -/// Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant. Variant info fields are merged as specified in the infoMergeConfig field of the MergeVariantsRequest. Please exercise caution when using this method! It is easy to introduce mistakes in existing variants and difficult to back out of them. For example, suppose you were trying to merge a new variant with an existing one and both variants contain calls that belong to callsets with the same callset ID. // Existing variant - irrelevant fields trimmed for clarity { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 0, 1 ], } ] } // New variant with conflicting call information { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } The resulting merged variant would overwrite the existing calls with those from the new variant: { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } This may be the desired outcome, but it is up to the user to determine if if that is indeed the case. +/// Merges the given variants with existing variants. +/// +/// For the definitions of variants and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Each variant will be +/// merged with an existing variant that matches its reference sequence, +/// start, end, reference bases, and alternative bases. If no such variant +/// exists, a new one will be created. +/// +/// When variants are merged, the call information from the new variant +/// is added to the existing variant. Variant info fields are merged as +/// specified in the +/// infoMergeConfig +/// field of the MergeVariantsRequest. +/// +/// Please exercise caution when using this method! It is easy to introduce +/// mistakes in existing variants and difficult to back out of them. For +/// example, +/// suppose you were trying to merge a new variant with an existing one and +/// both +/// variants contain calls that belong to callsets with the same callset ID. +/// +/// // Existing variant - irrelevant fields trimmed for clarity +/// { +/// "variantSetId": "10473108253681171589", +/// "referenceName": "1", +/// "start": "10582", +/// "referenceBases": "G", +/// "alternateBases": [ +/// "A" +/// ], +/// "calls": [ +/// { +/// "callSetId": "10473108253681171589-0", +/// "callSetName": "CALLSET0", +/// "genotype": [ +/// 0, +/// 1 +/// ], +/// } +/// ] +/// } +/// +/// // New variant with conflicting call information +/// { +/// "variantSetId": "10473108253681171589", +/// "referenceName": "1", +/// "start": "10582", +/// "referenceBases": "G", +/// "alternateBases": [ +/// "A" +/// ], +/// "calls": [ +/// { +/// "callSetId": "10473108253681171589-0", +/// "callSetName": "CALLSET0", +/// "genotype": [ +/// 1, +/// 1 +/// ], +/// } +/// ] +/// } +/// +/// The resulting merged variant would overwrite the existing calls with those +/// from the new variant: +/// +/// { +/// "variantSetId": "10473108253681171589", +/// "referenceName": "1", +/// "start": "10582", +/// "referenceBases": "G", +/// "alternateBases": [ +/// "A" +/// ], +/// "calls": [ +/// { +/// "callSetId": "10473108253681171589-0", +/// "callSetName": "CALLSET0", +/// "genotype": [ +/// 1, +/// 1 +/// ], +/// } +/// ] +/// } +/// +/// This may be the desired outcome, but it is up to the user to determine if +/// if that is indeed the case. /// /// A builder for the *merge* method supported by a *variant* resource. /// It is not used directly, but through a `VariantMethods` instance. @@ -12603,17 +13666,17 @@ impl<'a, C, A> VariantMergeCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantMergeCall<'a, C, A> @@ -12641,246 +13704,11 @@ impl<'a, C, A> VariantMergeCall<'a, C, A> where C: BorrowMut, A: } -/// Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and Variant info fields are merged as specified in infoMergeConfig. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set. -/// -/// A builder for the *import* method supported by a *variant* resource. -/// It is not used directly, but through a `VariantMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_genomics1 as genomics1; -/// use genomics1::ImportVariantsRequest; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use genomics1::Genomics; +/// Creates a new variant. /// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Genomics::new(hyper::Client::new(), 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 = ImportVariantsRequest::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.variants().import(req) -/// .doit(); -/// # } -/// ``` -pub struct VariantImportCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Genomics, - _request: ImportVariantsRequest, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for VariantImportCall<'a, C, A> {} - -impl<'a, C, A> VariantImportCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "genomics.variants.import", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - for &field in ["alt"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://genomics.googleapis.com/v1/variants:import".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: ImportVariantsRequest) -> VariantImportCall<'a, C, A> { - self._request = 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. - /// - /// 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 Delegate) -> VariantImportCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> VariantImportCall<'a, C, A> - 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 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: T) -> VariantImportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Creates a new variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// For the definitions of variants and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *create* method supported by a *variant* resource. /// It is not used directly, but through a `VariantMethods` instance. @@ -13081,17 +13909,17 @@ impl<'a, C, A> VariantCreateCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantCreateCall<'a, C, A> @@ -13119,7 +13947,270 @@ impl<'a, C, A> VariantCreateCall<'a, C, A> where C: BorrowMut, A: } -/// Updates a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. Returns the modified variant without its calls. +/// Creates variant data by asynchronously importing the provided information. +/// +/// For the definitions of variant sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// The variants for import will be merged with any existing variant that +/// matches its reference sequence, start, end, reference bases, and +/// alternative bases. If no such variant exists, a new one will be created. +/// +/// When variants are merged, the call information from the new variant +/// is added to the existing variant, and Variant info fields are merged +/// as specified in +/// infoMergeConfig. +/// As a special case, for single-sample VCF files, QUAL and FILTER fields will +/// be moved to the call level; these are sometimes interpreted in a +/// call-specific context. +/// Imported VCF headers are appended to the metadata already in a variant set. +/// +/// A builder for the *import* method supported by a *variant* resource. +/// It is not used directly, but through a `VariantMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// use genomics1::ImportVariantsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), 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 = ImportVariantsRequest::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.variants().import(req) +/// .doit(); +/// # } +/// ``` +pub struct VariantImportCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _request: ImportVariantsRequest, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for VariantImportCall<'a, C, A> {} + +impl<'a, C, A> VariantImportCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.variants.import", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/variants:import".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ImportVariantsRequest) -> VariantImportCall<'a, C, A> { + self._request = 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. + /// + /// 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 Delegate) -> VariantImportCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> VariantImportCall<'a, C, A> + 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 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: T) -> VariantImportCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates a variant. +/// +/// For the definitions of variants and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// This method supports patch semantics. Returns the modified variant without +/// its calls. /// /// A builder for the *patch* method supported by a *variant* resource. /// It is not used directly, but through a `VariantMethods` instance. @@ -13338,7 +14429,10 @@ impl<'a, C, A> VariantPatchCall<'a, C, A> where C: BorrowMut, A: self._variant_id = new_value.to_string(); self } - /// An optional mask specifying which fields to update. At this time, mutable fields are names and info. Acceptable values are "names" and "info". If unspecified, all mutable fields will be updated. + /// An optional mask specifying which fields to update. At this time, mutable + /// fields are names and + /// info. Acceptable values are "names" and + /// "info". If unspecified, all mutable fields will be updated. /// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> VariantPatchCall<'a, C, A> { @@ -13365,17 +14459,17 @@ impl<'a, C, A> VariantPatchCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantPatchCall<'a, C, A> @@ -13403,246 +14497,8 @@ impl<'a, C, A> VariantPatchCall<'a, C, A> where C: BorrowMut, A: } -/// Returns a stream of all the variants matching the search request, ordered by reference name, position, and ID. -/// -/// A builder for the *stream* method supported by a *variant* resource. -/// It is not used directly, but through a `VariantMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_genomics1 as genomics1; -/// use genomics1::StreamVariantsRequest; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use genomics1::Genomics; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Genomics::new(hyper::Client::new(), 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 = StreamVariantsRequest::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.variants().stream(req) -/// .doit(); -/// # } -/// ``` -pub struct VariantStreamCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Genomics, - _request: StreamVariantsRequest, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for VariantStreamCall<'a, C, A> {} - -impl<'a, C, A> VariantStreamCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, StreamVariantsResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "genomics.variants.stream", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - for &field in ["alt"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://genomics.googleapis.com/v1/variants:stream".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: StreamVariantsRequest) -> VariantStreamCall<'a, C, A> { - self._request = 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. - /// - /// 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 Delegate) -> VariantStreamCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> VariantStreamCall<'a, C, A> - 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 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: T) -> VariantStreamCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Updates an annotation. Caller must have WRITE permission for the associated dataset. +/// Updates an annotation. Caller must have +/// WRITE permission for the associated dataset. /// /// A builder for the *update* method supported by a *annotation* resource. /// It is not used directly, but through a `AnnotationMethods` instance. @@ -13861,7 +14717,12 @@ impl<'a, C, A> AnnotationUpdateCall<'a, C, A> where C: BorrowMut, self._annotation_id = new_value.to_string(); self } - /// An optional mask specifying which fields to update. Mutable fields are name, variant, transcript, and info. If unspecified, all mutable fields will be updated. + /// An optional mask specifying which fields to update. Mutable fields are + /// name, + /// variant, + /// transcript, and + /// info. If unspecified, all mutable + /// fields will be updated. /// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> AnnotationUpdateCall<'a, C, A> { @@ -13888,17 +14749,17 @@ impl<'a, C, A> AnnotationUpdateCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AnnotationUpdateCall<'a, C, A> @@ -13926,7 +14787,8 @@ impl<'a, C, A> AnnotationUpdateCall<'a, C, A> where C: BorrowMut, } -/// Gets an annotation. Caller must have READ permission for the associated annotation set. +/// Gets an annotation. Caller must have READ permission +/// for the associated annotation set. /// /// A builder for the *get* method supported by a *annotation* resource. /// It is not used directly, but through a `AnnotationMethods` instance. @@ -14129,17 +14991,17 @@ impl<'a, C, A> AnnotationGetCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AnnotationGetCall<'a, C, A> @@ -14167,7 +15029,13 @@ impl<'a, C, A> AnnotationGetCall<'a, C, A> where C: BorrowMut, A: } -/// Searches for annotations that match the given criteria. Results are ordered by genomic coordinate (by reference sequence, then position). Annotations with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotations in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried annotation sets. +/// Searches for annotations that match the given criteria. Results are +/// ordered by genomic coordinate (by reference sequence, then position). +/// Annotations with equivalent genomic coordinates are returned in an +/// unspecified order. This order is consistent, such that two queries for the +/// same content (regardless of page size) yield annotations in the same order +/// across their respective streams of paginated responses. Caller must have +/// READ permission for the queried annotation sets. /// /// A builder for the *search* method supported by a *annotation* resource. /// It is not used directly, but through a `AnnotationMethods` instance. @@ -14368,17 +15236,17 @@ impl<'a, C, A> AnnotationSearchCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AnnotationSearchCall<'a, C, A> @@ -14406,7 +15274,8 @@ impl<'a, C, A> AnnotationSearchCall<'a, C, A> where C: BorrowMut, } -/// Deletes an annotation. Caller must have WRITE permission for the associated annotation set. +/// Deletes an annotation. Caller must have WRITE permission for +/// the associated annotation set. /// /// A builder for the *delete* method supported by a *annotation* resource. /// It is not used directly, but through a `AnnotationMethods` instance. @@ -14609,17 +15478,17 @@ impl<'a, C, A> AnnotationDeleteCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AnnotationDeleteCall<'a, C, A> @@ -14647,7 +15516,28 @@ impl<'a, C, A> AnnotationDeleteCall<'a, C, A> where C: BorrowMut, } -/// Creates a new annotation. Caller must have WRITE permission for the associated annotation set. The following fields are required: * annotationSetId * referenceName or referenceId ### Transcripts For annotations of type TRANSCRIPT, the following fields of transcript must be provided: * exons.start * exons.end All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). The annotated range must be no longer than 100Mbp (mega base pairs). See the Annotation resource for additional restrictions on each field. +/// Creates a new annotation. Caller must have WRITE permission +/// for the associated annotation set. +/// +/// The following fields are required: +/// +/// * annotationSetId +/// * referenceName or +/// referenceId +/// +/// ### Transcripts +/// +/// For annotations of type TRANSCRIPT, the following fields of +/// transcript must be provided: +/// +/// * exons.start +/// * exons.end +/// +/// All other fields may be optionally specified, unless documented as being +/// server-generated (for example, the `id` field). The annotated +/// range must be no longer than 100Mbp (mega base pairs). See the +/// Annotation resource +/// for additional restrictions on each field. /// /// A builder for the *create* method supported by a *annotation* resource. /// It is not used directly, but through a `AnnotationMethods` instance. @@ -14848,17 +15738,17 @@ impl<'a, C, A> AnnotationCreateCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AnnotationCreateCall<'a, C, A> @@ -14886,7 +15776,20 @@ impl<'a, C, A> AnnotationCreateCall<'a, C, A> where C: BorrowMut, } -/// Creates one or more new annotations atomically. All annotations must belong to the same annotation set. Caller must have WRITE permission for this annotation set. For optimal performance, batch positionally adjacent annotations together. If the request has a systemic issue, such as an attempt to write to an inaccessible annotation set, the entire RPC will fail accordingly. For lesser data issues, when possible an error will be isolated to the corresponding batch entry in the response; the remaining well formed annotations will be created normally. For details on the requirements for each individual annotation resource, see CreateAnnotation. +/// Creates one or more new annotations atomically. All annotations must +/// belong to the same annotation set. Caller must have WRITE +/// permission for this annotation set. For optimal performance, batch +/// positionally adjacent annotations together. +/// +/// If the request has a systemic issue, such as an attempt to write to +/// an inaccessible annotation set, the entire RPC will fail accordingly. For +/// lesser data issues, when possible an error will be isolated to the +/// corresponding batch entry in the response; the remaining well formed +/// annotations will be created normally. +/// +/// For details on the requirements for each individual annotation resource, +/// see +/// CreateAnnotation. /// /// A builder for the *batchCreate* method supported by a *annotation* resource. /// It is not used directly, but through a `AnnotationMethods` instance. @@ -15087,17 +15990,17 @@ impl<'a, C, A> AnnotationBatchCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AnnotationBatchCreateCall<'a, C, A> @@ -15125,7 +16028,9 @@ impl<'a, C, A> AnnotationBatchCreateCall<'a, C, A> where C: BorrowMut AnnotationsetUpdateCall<'a, C, A> where C: BorrowMut AnnotationsetUpdateCall<'a, C, A> { @@ -15371,17 +16280,17 @@ impl<'a, C, A> AnnotationsetUpdateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AnnotationsetUpdateCall<'a, C, A> @@ -15409,7 +16318,11 @@ impl<'a, C, A> AnnotationsetUpdateCall<'a, C, A> where C: BorrowMut AnnotationsetSearchCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AnnotationsetSearchCall<'a, C, A> @@ -15648,7 +16561,16 @@ impl<'a, C, A> AnnotationsetSearchCall<'a, C, A> where C: BorrowMut AnnotationsetCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AnnotationsetCreateCall<'a, C, A> @@ -15887,7 +16809,8 @@ impl<'a, C, A> AnnotationsetCreateCall<'a, C, A> where C: BorrowMut AnnotationsetDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AnnotationsetDeleteCall<'a, C, A> @@ -16128,7 +17051,8 @@ impl<'a, C, A> AnnotationsetDeleteCall<'a, C, A> where C: BorrowMut AnnotationsetGetCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AnnotationsetGetCall<'a, C, A> @@ -16369,7 +17293,15 @@ impl<'a, C, A> AnnotationsetGetCall<'a, C, A> where C: BorrowMut, } -/// Creates a new variant set. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The provided variant set must have a valid `datasetId` set - all other fields are optional. Note that the `id` field will be ignored, as this is assigned by the server. +/// Creates a new variant set. +/// +/// For the definitions of variant sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// The provided variant set must have a valid `datasetId` set - all other +/// fields are optional. Note that the `id` field will be ignored, as this is +/// assigned by the server. /// /// A builder for the *create* method supported by a *variantset* resource. /// It is not used directly, but through a `VariantsetMethods` instance. @@ -16570,17 +17502,17 @@ impl<'a, C, A> VariantsetCreateCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantsetCreateCall<'a, C, A> @@ -16608,7 +17540,12 @@ impl<'a, C, A> VariantsetCreateCall<'a, C, A> where C: BorrowMut, } -/// Deletes a variant set including all variants, call sets, and calls within. This is not reversible. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Deletes a variant set including all variants, call sets, and calls within. +/// This is not reversible. +/// +/// For the definitions of variant sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *delete* method supported by a *variantset* resource. /// It is not used directly, but through a `VariantsetMethods` instance. @@ -16811,17 +17748,17 @@ impl<'a, C, A> VariantsetDeleteCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantsetDeleteCall<'a, C, A> @@ -16849,7 +17786,11 @@ impl<'a, C, A> VariantsetDeleteCall<'a, C, A> where C: BorrowMut, } -/// Exports variant set data to an external destination. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Exports variant set data to an external destination. +/// +/// For the definitions of variant sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *export* method supported by a *variantset* resource. /// It is not used directly, but through a `VariantsetMethods` instance. @@ -17053,7 +17994,8 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, self._request = new_value; self } - /// Required. The ID of the variant set that contains variant data which should be exported. The caller must have READ access to this variant set. + /// Required. The ID of the variant set that contains variant data which + /// should be exported. The caller must have READ access to this variant set. /// /// Sets the *variant set id* path property to the given value. /// @@ -17083,17 +18025,17 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantsetExportCall<'a, C, A> @@ -17121,7 +18063,11 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, } -/// Updates a variant set using patch semantics. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Updates a variant set using patch semantics. +/// +/// For the definitions of variant sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *patch* method supported by a *variantset* resource. /// It is not used directly, but through a `VariantsetMethods` instance. @@ -17340,7 +18286,14 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, self._variant_set_id = new_value.to_string(); self } - /// An optional mask specifying which fields to update. Supported fields: * metadata. * name. * description. Leaving `updateMask` unset is equivalent to specifying all mutable fields. + /// An optional mask specifying which fields to update. Supported fields: + /// + /// * metadata. + /// * name. + /// * description. + /// + /// Leaving `updateMask` unset is equivalent to specifying all mutable + /// fields. /// /// Sets the *update mask* query property to the given value. pub fn update_mask(mut self, new_value: &str) -> VariantsetPatchCall<'a, C, A> { @@ -17367,17 +18320,17 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantsetPatchCall<'a, C, A> @@ -17405,7 +18358,14 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, } -/// Returns a list of all variant sets matching search criteria. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49). +/// Returns a list of all variant sets matching search criteria. +/// +/// For the definitions of variant sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// Implements +/// [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49). /// /// A builder for the *search* method supported by a *variantset* resource. /// It is not used directly, but through a `VariantsetMethods` instance. @@ -17606,17 +18566,17 @@ impl<'a, C, A> VariantsetSearchCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantsetSearchCall<'a, C, A> @@ -17644,7 +18604,11 @@ impl<'a, C, A> VariantsetSearchCall<'a, C, A> where C: BorrowMut, } -/// Gets a variant set by ID. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Gets a variant set by ID. +/// +/// For the definitions of variant sets and other genomics resources, see +/// [Fundamentals of Google +/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *get* method supported by a *variantset* resource. /// It is not used directly, but through a `VariantsetMethods` instance. @@ -17847,17 +18811,17 @@ impl<'a, C, A> VariantsetGetCall<'a, C, A> where C: BorrowMut, A: /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> VariantsetGetCall<'a, C, A> diff --git a/gen/gmail1-cli/Cargo.toml b/gen/gmail1-cli/Cargo.toml index 73458c1932..f281262a57 100644 --- a/gen/gmail1-cli/Cargo.toml +++ b/gen/gmail1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-gmail1-cli" -version = "1.0.4+20161206" +version = "1.0.4+20170510" authors = ["Sebastian Thiel "] description = "A complete library to interact with gmail (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gmail1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-gmail1] path = "../gmail1" -version = "1.0.4+20161206" +version = "1.0.4+20170510" diff --git a/gen/gmail1-cli/README.md b/gen/gmail1-cli/README.md index 6d563768d9..1aaa677856 100644 --- a/gen/gmail1-cli/README.md +++ b/gen/gmail1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *gmail* API at revision *20161206*. The CLI is at version *1.0.4*. +This documentation was generated from the *gmail* API at revision *20170510*. The CLI is at version *1.0.4*. ```bash gmail1 [options] @@ -73,6 +73,11 @@ gmail1 [options] settings-send-as-get [-p ]... [-o ] settings-send-as-list [-p ]... [-o ] settings-send-as-patch (-r )... [-p ]... [-o ] + settings-send-as-smime-info-delete [-p ]... + settings-send-as-smime-info-get [-p ]... [-o ] + settings-send-as-smime-info-insert (-r )... [-p ]... [-o ] + settings-send-as-smime-info-list [-p ]... [-o ] + settings-send-as-smime-info-set-default [-p ]... settings-send-as-update (-r )... [-p ]... [-o ] settings-send-as-verify [-p ]... settings-update-auto-forwarding (-r )... [-p ]... [-o ] diff --git a/gen/gmail1-cli/mkdocs.yml b/gen/gmail1-cli/mkdocs.yml index a3916b6bde..5e31fd8e3f 100644 --- a/gen/gmail1-cli/mkdocs.yml +++ b/gen/gmail1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: gmail v1.0.4+20161206 +site_name: gmail v1.0.4+20170510 site_url: http://byron.github.io/google-apis-rs/google-gmail1-cli site_description: A complete library to interact with gmail (protocol v1) @@ -52,6 +52,11 @@ pages: - ['users_settings-send-as-get.md', 'Users', 'Settings Send As Get'] - ['users_settings-send-as-list.md', 'Users', 'Settings Send As List'] - ['users_settings-send-as-patch.md', 'Users', 'Settings Send As Patch'] +- ['users_settings-send-as-smime-info-delete.md', 'Users', 'Settings Send As Smime Info Delete'] +- ['users_settings-send-as-smime-info-get.md', 'Users', 'Settings Send As Smime Info Get'] +- ['users_settings-send-as-smime-info-insert.md', 'Users', 'Settings Send As Smime Info Insert'] +- ['users_settings-send-as-smime-info-list.md', 'Users', 'Settings Send As Smime Info List'] +- ['users_settings-send-as-smime-info-set-default.md', 'Users', 'Settings Send As Smime Info Set Default'] - ['users_settings-send-as-update.md', 'Users', 'Settings Send As Update'] - ['users_settings-send-as-verify.md', 'Users', 'Settings Send As Verify'] - ['users_settings-update-auto-forwarding.md', 'Users', 'Settings Update Auto Forwarding'] diff --git a/gen/gmail1-cli/src/main.rs b/gen/gmail1-cli/src/main.rs index 3b5732ff11..4b7aa8a6df 100644 --- a/gen/gmail1-cli/src/main.rs +++ b/gen/gmail1-cli/src/main.rs @@ -590,6 +590,9 @@ impl<'n> Engine<'n> { "label-id" => { call = call.label_id(value.unwrap_or("")); }, + "history-types" => { + call = call.add_history_types(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -603,7 +606,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["page-token", "label-id", "start-history-id", "max-results"].iter().map(|v|*v)); + v.extend(["page-token", "label-id", "start-history-id", "max-results", "history-types"].iter().map(|v|*v)); v } )); } } @@ -2988,6 +2991,289 @@ impl<'n> Engine<'n> { } } + fn _users_settings_send_as_smime_info_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.users().settings_send_as_smime_info_delete(opt.value_of("user-id").unwrap_or(""), opt.value_of("send-as-email").unwrap_or(""), opt.value_of("id").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); + } + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok(mut response) => { + Ok(()) + } + } + } + } + + fn _users_settings_send_as_smime_info_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.users().settings_send_as_smime_info_get(opt.value_of("user-id").unwrap_or(""), opt.value_of("send-as-email").unwrap_or(""), opt.value_of("id").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(), + _ => 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(()) + } + } + } + } + + fn _users_settings_send_as_smime_info_insert(&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()[..] { + "pkcs12" => Some(("pkcs12", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "pem" => Some(("pem", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "expiration" => Some(("expiration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "encrypted-key-password" => Some(("encryptedKeyPassword", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "issuer-cn" => Some(("issuerCn", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-default" => Some(("isDefault", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["encrypted-key-password", "expiration", "id", "is-default", "issuer-cn", "pem", "pkcs12"]); + 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::SmimeInfo = json::value::from_value(object).unwrap(); + let mut call = self.hub.users().settings_send_as_smime_info_insert(request, opt.value_of("user-id").unwrap_or(""), opt.value_of("send-as-email").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(), + _ => 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(()) + } + } + } + } + + fn _users_settings_send_as_smime_info_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.users().settings_send_as_smime_info_list(opt.value_of("user-id").unwrap_or(""), opt.value_of("send-as-email").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(), + _ => 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(()) + } + } + } + } + + fn _users_settings_send_as_smime_info_set_default(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.users().settings_send_as_smime_info_set_default(opt.value_of("user-id").unwrap_or(""), opt.value_of("send-as-email").unwrap_or(""), opt.value_of("id").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); + } + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok(mut response) => { + Ok(()) + } + } + } + } + fn _users_settings_send_as_update(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -4110,6 +4396,21 @@ impl<'n> Engine<'n> { ("settings-send-as-patch", Some(opt)) => { call_result = self._users_settings_send_as_patch(opt, dry_run, &mut err); }, + ("settings-send-as-smime-info-delete", Some(opt)) => { + call_result = self._users_settings_send_as_smime_info_delete(opt, dry_run, &mut err); + }, + ("settings-send-as-smime-info-get", Some(opt)) => { + call_result = self._users_settings_send_as_smime_info_get(opt, dry_run, &mut err); + }, + ("settings-send-as-smime-info-insert", Some(opt)) => { + call_result = self._users_settings_send_as_smime_info_insert(opt, dry_run, &mut err); + }, + ("settings-send-as-smime-info-list", Some(opt)) => { + call_result = self._users_settings_send_as_smime_info_list(opt, dry_run, &mut err); + }, + ("settings-send-as-smime-info-set-default", Some(opt)) => { + call_result = self._users_settings_send_as_smime_info_set_default(opt, dry_run, &mut err); + }, ("settings-send-as-update", Some(opt)) => { call_result = self._users_settings_send_as_update(opt, dry_run, &mut err); }, @@ -4241,7 +4542,7 @@ fn main() { let mut exit_status = 0i32; let upload_value_names = ["mode", "file"]; let arg_data = [ - ("users", "methods: 'drafts-create', 'drafts-delete', 'drafts-get', 'drafts-list', 'drafts-send', 'drafts-update', 'get-profile', 'history-list', 'labels-create', 'labels-delete', 'labels-get', 'labels-list', 'labels-patch', 'labels-update', 'messages-attachments-get', 'messages-batch-delete', 'messages-batch-modify', 'messages-delete', 'messages-get', 'messages-import', 'messages-insert', 'messages-list', 'messages-modify', 'messages-send', 'messages-trash', 'messages-untrash', 'settings-filters-create', 'settings-filters-delete', 'settings-filters-get', 'settings-filters-list', 'settings-forwarding-addresses-create', 'settings-forwarding-addresses-delete', 'settings-forwarding-addresses-get', 'settings-forwarding-addresses-list', 'settings-get-auto-forwarding', 'settings-get-imap', 'settings-get-pop', 'settings-get-vacation', 'settings-send-as-create', 'settings-send-as-delete', 'settings-send-as-get', 'settings-send-as-list', 'settings-send-as-patch', 'settings-send-as-update', 'settings-send-as-verify', 'settings-update-auto-forwarding', 'settings-update-imap', 'settings-update-pop', 'settings-update-vacation', 'stop', 'threads-delete', 'threads-get', 'threads-list', 'threads-modify', 'threads-trash', 'threads-untrash' and 'watch'", vec![ + ("users", "methods: 'drafts-create', 'drafts-delete', 'drafts-get', 'drafts-list', 'drafts-send', 'drafts-update', 'get-profile', 'history-list', 'labels-create', 'labels-delete', 'labels-get', 'labels-list', 'labels-patch', 'labels-update', 'messages-attachments-get', 'messages-batch-delete', 'messages-batch-modify', 'messages-delete', 'messages-get', 'messages-import', 'messages-insert', 'messages-list', 'messages-modify', 'messages-send', 'messages-trash', 'messages-untrash', 'settings-filters-create', 'settings-filters-delete', 'settings-filters-get', 'settings-filters-list', 'settings-forwarding-addresses-create', 'settings-forwarding-addresses-delete', 'settings-forwarding-addresses-get', 'settings-forwarding-addresses-list', 'settings-get-auto-forwarding', 'settings-get-imap', 'settings-get-pop', 'settings-get-vacation', 'settings-send-as-create', 'settings-send-as-delete', 'settings-send-as-get', 'settings-send-as-list', 'settings-send-as-patch', 'settings-send-as-smime-info-delete', 'settings-send-as-smime-info-get', 'settings-send-as-smime-info-insert', 'settings-send-as-smime-info-list', 'settings-send-as-smime-info-set-default', 'settings-send-as-update', 'settings-send-as-verify', 'settings-update-auto-forwarding', 'settings-update-imap', 'settings-update-pop', 'settings-update-vacation', 'stop', 'threads-delete', 'threads-get', 'threads-list', 'threads-modify', 'threads-trash', 'threads-untrash' and 'watch'", vec![ ("drafts-create", Some(r##"Creates a new draft with the DRAFT label."##), "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_drafts-create", @@ -5077,7 +5378,9 @@ fn main() { Some(false)), ]), ("settings-forwarding-addresses-create", - Some(r##"Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted."##), + Some(r##"Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. + + This method is only available to service account clients that have been delegated domain-wide authority."##), "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-forwarding-addresses-create", vec![ (Some(r##"user-id"##), @@ -5105,7 +5408,9 @@ fn main() { Some(false)), ]), ("settings-forwarding-addresses-delete", - Some(r##"Deletes the specified forwarding address and revokes any verification that may have been required."##), + Some(r##"Deletes the specified forwarding address and revokes any verification that may have been required. + + This method is only available to service account clients that have been delegated domain-wide authority."##), "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-forwarding-addresses-delete", vec![ (Some(r##"user-id"##), @@ -5265,7 +5570,9 @@ fn main() { Some(false)), ]), ("settings-send-as-create", - Some(r##"Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias."##), + Some(r##"Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. + + This method is only available to service account clients that have been delegated domain-wide authority."##), "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-create", vec![ (Some(r##"user-id"##), @@ -5293,7 +5600,9 @@ fn main() { Some(false)), ]), ("settings-send-as-delete", - Some(r##"Deletes the specified send-as alias. Revokes any verification that may have been required for using it."##), + Some(r##"Deletes the specified send-as alias. Revokes any verification that may have been required for using it. + + This method is only available to service account clients that have been delegated domain-wide authority."##), "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-delete", vec![ (Some(r##"user-id"##), @@ -5365,7 +5674,9 @@ fn main() { Some(false)), ]), ("settings-send-as-patch", - Some(r##"Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. This method supports patch semantics."##), + Some(r##"Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. + + Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. This method supports patch semantics."##), "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-patch", vec![ (Some(r##"user-id"##), @@ -5398,8 +5709,162 @@ fn main() { Some(false), Some(false)), ]), + ("settings-send-as-smime-info-delete", + Some(r##"Deletes the specified S/MIME config for the specified send-as alias."##), + "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-smime-info-delete", + vec![ + (Some(r##"user-id"##), + None, + Some(r##"The user's email address. The special value me can be used to indicate the authenticated user."##), + Some(true), + Some(false)), + + (Some(r##"send-as-email"##), + None, + Some(r##"The email address that appears in the "From:" header for mail sent using this alias."##), + Some(true), + Some(false)), + + (Some(r##"id"##), + None, + Some(r##"The immutable ID for the SmimeInfo."##), + 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)), + ]), + ("settings-send-as-smime-info-get", + Some(r##"Gets the specified S/MIME config for the specified send-as alias."##), + "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-smime-info-get", + vec![ + (Some(r##"user-id"##), + None, + Some(r##"The user's email address. The special value me can be used to indicate the authenticated user."##), + Some(true), + Some(false)), + + (Some(r##"send-as-email"##), + None, + Some(r##"The email address that appears in the "From:" header for mail sent using this alias."##), + Some(true), + Some(false)), + + (Some(r##"id"##), + None, + Some(r##"The immutable ID for the SmimeInfo."##), + 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)), + ]), + ("settings-send-as-smime-info-insert", + Some(r##"Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key."##), + "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-smime-info-insert", + vec![ + (Some(r##"user-id"##), + None, + Some(r##"The user's email address. The special value me can be used to indicate the authenticated user."##), + Some(true), + Some(false)), + + (Some(r##"send-as-email"##), + None, + Some(r##"The email address that appears in the "From:" header for mail sent using this alias."##), + 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)), + ]), + ("settings-send-as-smime-info-list", + Some(r##"Lists S/MIME configs for the specified send-as alias."##), + "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-smime-info-list", + vec![ + (Some(r##"user-id"##), + None, + Some(r##"The user's email address. The special value me can be used to indicate the authenticated user."##), + Some(true), + Some(false)), + + (Some(r##"send-as-email"##), + None, + Some(r##"The email address that appears in the "From:" header for mail sent using this alias."##), + 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)), + ]), + ("settings-send-as-smime-info-set-default", + Some(r##"Sets the default S/MIME config for the specified send-as alias."##), + "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-smime-info-set-default", + vec![ + (Some(r##"user-id"##), + None, + Some(r##"The user's email address. The special value me can be used to indicate the authenticated user."##), + Some(true), + Some(false)), + + (Some(r##"send-as-email"##), + None, + Some(r##"The email address that appears in the "From:" header for mail sent using this alias."##), + Some(true), + Some(false)), + + (Some(r##"id"##), + None, + Some(r##"The immutable ID for the SmimeInfo."##), + 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)), + ]), ("settings-send-as-update", - Some(r##"Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias."##), + Some(r##"Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. + + Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority."##), "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-update", vec![ (Some(r##"user-id"##), @@ -5433,7 +5898,9 @@ fn main() { Some(false)), ]), ("settings-send-as-verify", - Some(r##"Sends a verification email to the specified send-as alias address. The verification status must be pending."##), + Some(r##"Sends a verification email to the specified send-as alias address. The verification status must be pending. + + This method is only available to service account clients that have been delegated domain-wide authority."##), "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-send-as-verify", vec![ (Some(r##"user-id"##), @@ -5455,7 +5922,9 @@ fn main() { Some(true)), ]), ("settings-update-auto-forwarding", - Some(r##"Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled."##), + Some(r##"Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. + + This method is only available to service account clients that have been delegated domain-wide authority."##), "Details at http://byron.github.io/google-apis-rs/google_gmail1_cli/users_settings-update-auto-forwarding", vec![ (Some(r##"user-id"##), @@ -5778,7 +6247,7 @@ fn main() { let mut app = App::new("gmail1") .author("Sebastian Thiel ") - .version("1.0.4+20161206") + .version("1.0.4+20170510") .about("Access Gmail mailboxes including sending user email.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_gmail1_cli") .arg(Arg::with_name("url") diff --git a/gen/gmail1/Cargo.toml b/gen/gmail1/Cargo.toml index ce7439ab4b..5e54a81cef 100644 --- a/gen/gmail1/Cargo.toml +++ b/gen/gmail1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-gmail1" -version = "1.0.4+20161206" +version = "1.0.4+20170510" authors = ["Sebastian Thiel "] description = "A complete library to interact with gmail (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gmail1" homepage = "https://developers.google.com/gmail/api/" -documentation = "https://docs.rs/google-gmail1/1.0.4+20161206" +documentation = "https://docs.rs/google-gmail1/1.0.4+20170510" license = "MIT" keywords = ["gmail", "google", "protocol", "web", "api"] diff --git a/gen/gmail1/README.md b/gen/gmail1/README.md index 7fb54a6973..51c447f133 100644 --- a/gen/gmail1/README.md +++ b/gen/gmail1/README.md @@ -5,26 +5,26 @@ DO NOT EDIT ! --> The `google-gmail1` library allows access to all features of the *Google gmail* service. -This documentation was generated from *gmail* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *gmail* crate version *1.0.4+20170510*, where *20170510* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *gmail* *v1* API can be found at the [official documentation site](https://developers.google.com/gmail/api/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.Gmail.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.Gmail.html) ... * users - * [*drafts create*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserDraftCreateCall.html), [*drafts delete*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserDraftDeleteCall.html), [*drafts get*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserDraftGetCall.html), [*drafts list*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserDraftListCall.html), [*drafts send*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserDraftSendCall.html), [*drafts update*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserDraftUpdateCall.html), [*get profile*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserGetProfileCall.html), [*history list*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserHistoryListCall.html), [*labels create*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserLabelCreateCall.html), [*labels delete*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserLabelDeleteCall.html), [*labels get*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserLabelGetCall.html), [*labels list*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserLabelListCall.html), [*labels patch*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserLabelPatchCall.html), [*labels update*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserLabelUpdateCall.html), [*messages attachments get*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageAttachmentGetCall.html), [*messages batch delete*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageBatchDeleteCall.html), [*messages batch modify*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageBatchModifyCall.html), [*messages delete*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageDeleteCall.html), [*messages get*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageGetCall.html), [*messages import*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageImportCall.html), [*messages insert*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageInsertCall.html), [*messages list*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageListCall.html), [*messages modify*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageModifyCall.html), [*messages send*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageSendCall.html), [*messages trash*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageTrashCall.html), [*messages untrash*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageUntrashCall.html), [*settings filters create*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingFilterCreateCall.html), [*settings filters delete*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingFilterDeleteCall.html), [*settings filters get*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingFilterGetCall.html), [*settings filters list*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingFilterListCall.html), [*settings forwarding addresses create*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingForwardingAddresseCreateCall.html), [*settings forwarding addresses delete*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingForwardingAddresseDeleteCall.html), [*settings forwarding addresses get*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingForwardingAddresseGetCall.html), [*settings forwarding addresses list*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingForwardingAddresseListCall.html), [*settings get auto forwarding*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingGetAutoForwardingCall.html), [*settings get imap*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingGetImapCall.html), [*settings get pop*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingGetPopCall.html), [*settings get vacation*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingGetVacationCall.html), [*settings send as create*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingSendACreateCall.html), [*settings send as delete*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingSendADeleteCall.html), [*settings send as get*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingSendAGetCall.html), [*settings send as list*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingSendAListCall.html), [*settings send as patch*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingSendAPatchCall.html), [*settings send as update*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingSendAUpdateCall.html), [*settings send as verify*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingSendAVerifyCall.html), [*settings update auto forwarding*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingUpdateAutoForwardingCall.html), [*settings update imap*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingUpdateImapCall.html), [*settings update pop*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingUpdatePopCall.html), [*settings update vacation*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserSettingUpdateVacationCall.html), [*stop*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserStopCall.html), [*threads delete*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserThreadDeleteCall.html), [*threads get*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserThreadGetCall.html), [*threads list*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserThreadListCall.html), [*threads modify*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserThreadModifyCall.html), [*threads trash*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserThreadTrashCall.html), [*threads untrash*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserThreadUntrashCall.html) and [*watch*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserWatchCall.html) + * [*drafts create*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserDraftCreateCall.html), [*drafts delete*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserDraftDeleteCall.html), [*drafts get*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserDraftGetCall.html), [*drafts list*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserDraftListCall.html), [*drafts send*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserDraftSendCall.html), [*drafts update*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserDraftUpdateCall.html), [*get profile*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserGetProfileCall.html), [*history list*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserHistoryListCall.html), [*labels create*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserLabelCreateCall.html), [*labels delete*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserLabelDeleteCall.html), [*labels get*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserLabelGetCall.html), [*labels list*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserLabelListCall.html), [*labels patch*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserLabelPatchCall.html), [*labels update*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserLabelUpdateCall.html), [*messages attachments get*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageAttachmentGetCall.html), [*messages batch delete*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageBatchDeleteCall.html), [*messages batch modify*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageBatchModifyCall.html), [*messages delete*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageDeleteCall.html), [*messages get*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageGetCall.html), [*messages import*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageImportCall.html), [*messages insert*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageInsertCall.html), [*messages list*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageListCall.html), [*messages modify*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageModifyCall.html), [*messages send*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageSendCall.html), [*messages trash*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageTrashCall.html), [*messages untrash*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageUntrashCall.html), [*settings filters create*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingFilterCreateCall.html), [*settings filters delete*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingFilterDeleteCall.html), [*settings filters get*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingFilterGetCall.html), [*settings filters list*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingFilterListCall.html), [*settings forwarding addresses create*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingForwardingAddresseCreateCall.html), [*settings forwarding addresses delete*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingForwardingAddresseDeleteCall.html), [*settings forwarding addresses get*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingForwardingAddresseGetCall.html), [*settings forwarding addresses list*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingForwardingAddresseListCall.html), [*settings get auto forwarding*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingGetAutoForwardingCall.html), [*settings get imap*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingGetImapCall.html), [*settings get pop*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingGetPopCall.html), [*settings get vacation*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingGetVacationCall.html), [*settings send as create*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendACreateCall.html), [*settings send as delete*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendADeleteCall.html), [*settings send as get*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendAGetCall.html), [*settings send as list*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendAListCall.html), [*settings send as patch*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendAPatchCall.html), [*settings send as smime info delete*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendASmimeInfoDeleteCall.html), [*settings send as smime info get*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendASmimeInfoGetCall.html), [*settings send as smime info insert*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendASmimeInfoInsertCall.html), [*settings send as smime info list*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendASmimeInfoListCall.html), [*settings send as smime info set default*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendASmimeInfoSetDefaultCall.html), [*settings send as update*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendAUpdateCall.html), [*settings send as verify*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingSendAVerifyCall.html), [*settings update auto forwarding*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingUpdateAutoForwardingCall.html), [*settings update imap*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingUpdateImapCall.html), [*settings update pop*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingUpdatePopCall.html), [*settings update vacation*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserSettingUpdateVacationCall.html), [*stop*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserStopCall.html), [*threads delete*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserThreadDeleteCall.html), [*threads get*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserThreadGetCall.html), [*threads list*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserThreadListCall.html), [*threads modify*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserThreadModifyCall.html), [*threads trash*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserThreadTrashCall.html), [*threads untrash*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserThreadUntrashCall.html) and [*watch*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserWatchCall.html) Upload supported by ... -* [*messages import users*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageImportCall.html) -* [*drafts create users*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserDraftCreateCall.html) -* [*drafts send users*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserDraftSendCall.html) -* [*messages send users*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageSendCall.html) -* [*drafts update users*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserDraftUpdateCall.html) -* [*messages insert users*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.UserMessageInsertCall.html) +* [*messages import users*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageImportCall.html) +* [*drafts create users*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserDraftCreateCall.html) +* [*drafts send users*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserDraftSendCall.html) +* [*messages send users*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageSendCall.html) +* [*drafts update users*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserDraftUpdateCall.html) +* [*messages insert users*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.UserMessageInsertCall.html) @@ -32,17 +32,17 @@ Upload supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/struct.Gmail.html)** +* **[Hub](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/struct.Gmail.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.Part.html)** + * **[Parts](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -142,17 +142,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.Delegate.html), 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-gmail1/1.0.4+20161206/google_gmail1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.ResponseResult.html), 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")`. @@ -162,29 +162,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.CallBuilder.html) 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-gmail1/1.0.4+20161206/google_gmail1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-gmail1/1.0.4+20161206/google_gmail1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.CallBuilder.html), 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-gmail1/1.0.4+20161206/google_gmail1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-gmail1/1.0.4+20170510/google_gmail1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/gmail1/src/lib.rs b/gen/gmail1/src/lib.rs index 1f1cefae38..39c7644965 100644 --- a/gen/gmail1/src/lib.rs +++ b/gen/gmail1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *gmail* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *gmail* crate version *1.0.4+20170510*, where *20170510* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *gmail* *v1* API can be found at the //! [official documentation site](https://developers.google.com/gmail/api/). @@ -12,7 +12,7 @@ //! Handle the following *Resources* with ease from the central [hub](struct.Gmail.html) ... //! //! * users -//! * [*drafts create*](struct.UserDraftCreateCall.html), [*drafts delete*](struct.UserDraftDeleteCall.html), [*drafts get*](struct.UserDraftGetCall.html), [*drafts list*](struct.UserDraftListCall.html), [*drafts send*](struct.UserDraftSendCall.html), [*drafts update*](struct.UserDraftUpdateCall.html), [*get profile*](struct.UserGetProfileCall.html), [*history list*](struct.UserHistoryListCall.html), [*labels create*](struct.UserLabelCreateCall.html), [*labels delete*](struct.UserLabelDeleteCall.html), [*labels get*](struct.UserLabelGetCall.html), [*labels list*](struct.UserLabelListCall.html), [*labels patch*](struct.UserLabelPatchCall.html), [*labels update*](struct.UserLabelUpdateCall.html), [*messages attachments get*](struct.UserMessageAttachmentGetCall.html), [*messages batch delete*](struct.UserMessageBatchDeleteCall.html), [*messages batch modify*](struct.UserMessageBatchModifyCall.html), [*messages delete*](struct.UserMessageDeleteCall.html), [*messages get*](struct.UserMessageGetCall.html), [*messages import*](struct.UserMessageImportCall.html), [*messages insert*](struct.UserMessageInsertCall.html), [*messages list*](struct.UserMessageListCall.html), [*messages modify*](struct.UserMessageModifyCall.html), [*messages send*](struct.UserMessageSendCall.html), [*messages trash*](struct.UserMessageTrashCall.html), [*messages untrash*](struct.UserMessageUntrashCall.html), [*settings filters create*](struct.UserSettingFilterCreateCall.html), [*settings filters delete*](struct.UserSettingFilterDeleteCall.html), [*settings filters get*](struct.UserSettingFilterGetCall.html), [*settings filters list*](struct.UserSettingFilterListCall.html), [*settings forwarding addresses create*](struct.UserSettingForwardingAddresseCreateCall.html), [*settings forwarding addresses delete*](struct.UserSettingForwardingAddresseDeleteCall.html), [*settings forwarding addresses get*](struct.UserSettingForwardingAddresseGetCall.html), [*settings forwarding addresses list*](struct.UserSettingForwardingAddresseListCall.html), [*settings get auto forwarding*](struct.UserSettingGetAutoForwardingCall.html), [*settings get imap*](struct.UserSettingGetImapCall.html), [*settings get pop*](struct.UserSettingGetPopCall.html), [*settings get vacation*](struct.UserSettingGetVacationCall.html), [*settings send as create*](struct.UserSettingSendACreateCall.html), [*settings send as delete*](struct.UserSettingSendADeleteCall.html), [*settings send as get*](struct.UserSettingSendAGetCall.html), [*settings send as list*](struct.UserSettingSendAListCall.html), [*settings send as patch*](struct.UserSettingSendAPatchCall.html), [*settings send as update*](struct.UserSettingSendAUpdateCall.html), [*settings send as verify*](struct.UserSettingSendAVerifyCall.html), [*settings update auto forwarding*](struct.UserSettingUpdateAutoForwardingCall.html), [*settings update imap*](struct.UserSettingUpdateImapCall.html), [*settings update pop*](struct.UserSettingUpdatePopCall.html), [*settings update vacation*](struct.UserSettingUpdateVacationCall.html), [*stop*](struct.UserStopCall.html), [*threads delete*](struct.UserThreadDeleteCall.html), [*threads get*](struct.UserThreadGetCall.html), [*threads list*](struct.UserThreadListCall.html), [*threads modify*](struct.UserThreadModifyCall.html), [*threads trash*](struct.UserThreadTrashCall.html), [*threads untrash*](struct.UserThreadUntrashCall.html) and [*watch*](struct.UserWatchCall.html) +//! * [*drafts create*](struct.UserDraftCreateCall.html), [*drafts delete*](struct.UserDraftDeleteCall.html), [*drafts get*](struct.UserDraftGetCall.html), [*drafts list*](struct.UserDraftListCall.html), [*drafts send*](struct.UserDraftSendCall.html), [*drafts update*](struct.UserDraftUpdateCall.html), [*get profile*](struct.UserGetProfileCall.html), [*history list*](struct.UserHistoryListCall.html), [*labels create*](struct.UserLabelCreateCall.html), [*labels delete*](struct.UserLabelDeleteCall.html), [*labels get*](struct.UserLabelGetCall.html), [*labels list*](struct.UserLabelListCall.html), [*labels patch*](struct.UserLabelPatchCall.html), [*labels update*](struct.UserLabelUpdateCall.html), [*messages attachments get*](struct.UserMessageAttachmentGetCall.html), [*messages batch delete*](struct.UserMessageBatchDeleteCall.html), [*messages batch modify*](struct.UserMessageBatchModifyCall.html), [*messages delete*](struct.UserMessageDeleteCall.html), [*messages get*](struct.UserMessageGetCall.html), [*messages import*](struct.UserMessageImportCall.html), [*messages insert*](struct.UserMessageInsertCall.html), [*messages list*](struct.UserMessageListCall.html), [*messages modify*](struct.UserMessageModifyCall.html), [*messages send*](struct.UserMessageSendCall.html), [*messages trash*](struct.UserMessageTrashCall.html), [*messages untrash*](struct.UserMessageUntrashCall.html), [*settings filters create*](struct.UserSettingFilterCreateCall.html), [*settings filters delete*](struct.UserSettingFilterDeleteCall.html), [*settings filters get*](struct.UserSettingFilterGetCall.html), [*settings filters list*](struct.UserSettingFilterListCall.html), [*settings forwarding addresses create*](struct.UserSettingForwardingAddresseCreateCall.html), [*settings forwarding addresses delete*](struct.UserSettingForwardingAddresseDeleteCall.html), [*settings forwarding addresses get*](struct.UserSettingForwardingAddresseGetCall.html), [*settings forwarding addresses list*](struct.UserSettingForwardingAddresseListCall.html), [*settings get auto forwarding*](struct.UserSettingGetAutoForwardingCall.html), [*settings get imap*](struct.UserSettingGetImapCall.html), [*settings get pop*](struct.UserSettingGetPopCall.html), [*settings get vacation*](struct.UserSettingGetVacationCall.html), [*settings send as create*](struct.UserSettingSendACreateCall.html), [*settings send as delete*](struct.UserSettingSendADeleteCall.html), [*settings send as get*](struct.UserSettingSendAGetCall.html), [*settings send as list*](struct.UserSettingSendAListCall.html), [*settings send as patch*](struct.UserSettingSendAPatchCall.html), [*settings send as smime info delete*](struct.UserSettingSendASmimeInfoDeleteCall.html), [*settings send as smime info get*](struct.UserSettingSendASmimeInfoGetCall.html), [*settings send as smime info insert*](struct.UserSettingSendASmimeInfoInsertCall.html), [*settings send as smime info list*](struct.UserSettingSendASmimeInfoListCall.html), [*settings send as smime info set default*](struct.UserSettingSendASmimeInfoSetDefaultCall.html), [*settings send as update*](struct.UserSettingSendAUpdateCall.html), [*settings send as verify*](struct.UserSettingSendAVerifyCall.html), [*settings update auto forwarding*](struct.UserSettingUpdateAutoForwardingCall.html), [*settings update imap*](struct.UserSettingUpdateImapCall.html), [*settings update pop*](struct.UserSettingUpdatePopCall.html), [*settings update vacation*](struct.UserSettingUpdateVacationCall.html), [*stop*](struct.UserStopCall.html), [*threads delete*](struct.UserThreadDeleteCall.html), [*threads get*](struct.UserThreadGetCall.html), [*threads list*](struct.UserThreadListCall.html), [*threads modify*](struct.UserThreadModifyCall.html), [*threads trash*](struct.UserThreadTrashCall.html), [*threads untrash*](struct.UserThreadUntrashCall.html) and [*watch*](struct.UserWatchCall.html) //! //! //! Upload supported by ... @@ -245,7 +245,7 @@ pub enum Scope { /// Manage your basic mail settings SettingBasic, - /// View and manage your mail + /// Read, send, delete, and manage your email Gmai, /// Send email on your behalf @@ -403,6 +403,25 @@ impl<'a, C, A> Gmail // ############ // SCHEMAS ### // ########## +/// There is no detailed description. +/// +/// # 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*). +/// +/// * [settings send as smime info list users](struct.UserSettingSendASmimeInfoListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListSmimeInfoResponse { + /// List of SmimeInfo. + #[serde(rename="smimeInfo")] + pub smime_info: Option>, +} + +impl ResponseResult for ListSmimeInfoResponse {} + + /// Push notification watch response. /// /// # Activities @@ -496,20 +515,29 @@ impl RequestValue for Draft {} impl ResponseResult for Draft {} -/// There is no detailed description. +/// A single MIME message part. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct HistoryLabelRemoved { - /// Label IDs removed from the message. - #[serde(rename="labelIds")] - pub label_ids: Option>, - /// no description provided - pub message: Option, +pub struct MessagePart { + /// The message part body for this part, which may be empty for container MIME message parts. + pub body: Option, + /// The MIME type of the message part. + #[serde(rename="mimeType")] + pub mime_type: Option, + /// The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521. + pub parts: Option>, + /// The immutable ID of the message part. + #[serde(rename="partId")] + pub part_id: Option, + /// List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject. + pub headers: Option>, + /// The filename of the attachment. Only present if this message part represents an attachment. + pub filename: Option, } -impl Part for HistoryLabelRemoved {} +impl Part for MessagePart {} /// The body of a single MIME message part. @@ -1059,7 +1087,7 @@ pub struct VacationSettings { /// Response body in HTML format. Gmail will sanitize the HTML before storing it. #[serde(rename="responseBodyHtml")] pub response_body_html: Option, - /// Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for Google Apps users. + /// Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for G Suite users. #[serde(rename="restrictToDomain")] pub restrict_to_domain: Option, } @@ -1161,6 +1189,41 @@ pub struct WatchRequest { impl RequestValue for WatchRequest {} +/// An S/MIME email config. +/// +/// # 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*). +/// +/// * [settings send as smime info insert users](struct.UserSettingSendASmimeInfoInsertCall.html) (request|response) +/// * [settings send as smime info get users](struct.UserSettingSendASmimeInfoGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SmimeInfo { + /// PEM formatted X509 concatenated certificate string (standard base64 encoding). Format used for returning key, which includes public key as well as certificate chain (not private key). + pub pem: Option, + /// When the certificate expires (in milliseconds since epoch). + pub expiration: Option, + /// Encrypted key password, when key is encrypted. + #[serde(rename="encryptedKeyPassword")] + pub encrypted_key_password: Option, + /// The S/MIME certificate issuer's common name. + #[serde(rename="issuerCn")] + pub issuer_cn: Option, + /// The immutable ID for the SmimeInfo. + pub id: Option, + /// PKCS#12 format containing a single private/public key pair and certificate chain. This format is only accepted from client for creating a new SmimeInfo and is never returned, because the private key is not intended to be exported. PKCS#12 may be encrypted, in which case encryptedKeyPassword should be set appropriately. + pub pkcs12: Option, + /// Whether this SmimeInfo is the default one for this user's send-as address. + #[serde(rename="isDefault")] + pub is_default: Option, +} + +impl RequestValue for SmimeInfo {} +impl ResponseResult for SmimeInfo {} + + /// An email message. /// /// # Activities @@ -1292,29 +1355,20 @@ impl RequestValue for ImapSettings {} impl ResponseResult for ImapSettings {} -/// A single MIME message part. +/// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct MessagePart { - /// The message part body for this part, which may be empty for container MIME message parts. - pub body: Option, - /// The MIME type of the message part. - #[serde(rename="mimeType")] - pub mime_type: Option, - /// The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521. - pub parts: Option>, - /// The immutable ID of the message part. - #[serde(rename="partId")] - pub part_id: Option, - /// List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject. - pub headers: Option>, - /// The filename of the attachment. Only present if this message part represents an attachment. - pub filename: Option, +pub struct HistoryLabelRemoved { + /// Label IDs removed from the message. + #[serde(rename="labelIds")] + pub label_ids: Option>, + /// no description provided + pub message: Option, } -impl Part for MessagePart {} +impl Part for HistoryLabelRemoved {} @@ -1345,7 +1399,7 @@ impl Part for MessagePart {} /// ::default(), None); /// let mut hub = Gmail::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `drafts_create(...)`, `drafts_delete(...)`, `drafts_get(...)`, `drafts_list(...)`, `drafts_send(...)`, `drafts_update(...)`, `get_profile(...)`, `history_list(...)`, `labels_create(...)`, `labels_delete(...)`, `labels_get(...)`, `labels_list(...)`, `labels_patch(...)`, `labels_update(...)`, `messages_attachments_get(...)`, `messages_batch_delete(...)`, `messages_batch_modify(...)`, `messages_delete(...)`, `messages_get(...)`, `messages_import(...)`, `messages_insert(...)`, `messages_list(...)`, `messages_modify(...)`, `messages_send(...)`, `messages_trash(...)`, `messages_untrash(...)`, `settings_filters_create(...)`, `settings_filters_delete(...)`, `settings_filters_get(...)`, `settings_filters_list(...)`, `settings_forwarding_addresses_create(...)`, `settings_forwarding_addresses_delete(...)`, `settings_forwarding_addresses_get(...)`, `settings_forwarding_addresses_list(...)`, `settings_get_auto_forwarding(...)`, `settings_get_imap(...)`, `settings_get_pop(...)`, `settings_get_vacation(...)`, `settings_send_as_create(...)`, `settings_send_as_delete(...)`, `settings_send_as_get(...)`, `settings_send_as_list(...)`, `settings_send_as_patch(...)`, `settings_send_as_update(...)`, `settings_send_as_verify(...)`, `settings_update_auto_forwarding(...)`, `settings_update_imap(...)`, `settings_update_pop(...)`, `settings_update_vacation(...)`, `stop(...)`, `threads_delete(...)`, `threads_get(...)`, `threads_list(...)`, `threads_modify(...)`, `threads_trash(...)`, `threads_untrash(...)` and `watch(...)` +/// // like `drafts_create(...)`, `drafts_delete(...)`, `drafts_get(...)`, `drafts_list(...)`, `drafts_send(...)`, `drafts_update(...)`, `get_profile(...)`, `history_list(...)`, `labels_create(...)`, `labels_delete(...)`, `labels_get(...)`, `labels_list(...)`, `labels_patch(...)`, `labels_update(...)`, `messages_attachments_get(...)`, `messages_batch_delete(...)`, `messages_batch_modify(...)`, `messages_delete(...)`, `messages_get(...)`, `messages_import(...)`, `messages_insert(...)`, `messages_list(...)`, `messages_modify(...)`, `messages_send(...)`, `messages_trash(...)`, `messages_untrash(...)`, `settings_filters_create(...)`, `settings_filters_delete(...)`, `settings_filters_get(...)`, `settings_filters_list(...)`, `settings_forwarding_addresses_create(...)`, `settings_forwarding_addresses_delete(...)`, `settings_forwarding_addresses_get(...)`, `settings_forwarding_addresses_list(...)`, `settings_get_auto_forwarding(...)`, `settings_get_imap(...)`, `settings_get_pop(...)`, `settings_get_vacation(...)`, `settings_send_as_create(...)`, `settings_send_as_delete(...)`, `settings_send_as_get(...)`, `settings_send_as_list(...)`, `settings_send_as_patch(...)`, `settings_send_as_smime_info_delete(...)`, `settings_send_as_smime_info_get(...)`, `settings_send_as_smime_info_insert(...)`, `settings_send_as_smime_info_list(...)`, `settings_send_as_smime_info_set_default(...)`, `settings_send_as_update(...)`, `settings_send_as_verify(...)`, `settings_update_auto_forwarding(...)`, `settings_update_imap(...)`, `settings_update_pop(...)`, `settings_update_vacation(...)`, `stop(...)`, `threads_delete(...)`, `threads_get(...)`, `threads_list(...)`, `threads_modify(...)`, `threads_trash(...)`, `threads_untrash(...)` and `watch(...)` /// // to build up your call. /// let rb = hub.users(); /// # } @@ -1381,17 +1435,19 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new label. + /// Gets the specified S/MIME config for the specified send-as alias. /// /// # Arguments /// - /// * `request` - No description provided. /// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user. - pub fn labels_create(&self, request: Label, user_id: &str) -> UserLabelCreateCall<'a, C, A> { - UserLabelCreateCall { + /// * `sendAsEmail` - The email address that appears in the "From:" header for mail sent using this alias. + /// * `id` - The immutable ID for the SmimeInfo. + pub fn settings_send_as_smime_info_get(&self, user_id: &str, send_as_email: &str, id: &str) -> UserSettingSendASmimeInfoGetCall<'a, C, A> { + UserSettingSendASmimeInfoGetCall { hub: self.hub, - _request: request, _user_id: user_id.to_string(), + _send_as_email: send_as_email.to_string(), + _id: id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1506,6 +1562,7 @@ impl<'a, C, A> UserMethods<'a, C, A> { _page_token: Default::default(), _max_results: Default::default(), _label_id: Default::default(), + _history_types: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1777,17 +1834,15 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the specified label. + /// Deletes a filter. /// /// # Arguments /// - /// * `request` - No description provided. - /// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user. - /// * `id` - The ID of the label to update. - pub fn labels_update(&self, request: Label, user_id: &str, id: &str) -> UserLabelUpdateCall<'a, C, A> { - UserLabelUpdateCall { + /// * `userId` - User's email address. The special value "me" can be used to indicate the authenticated user. + /// * `id` - The ID of the filter to be deleted. + pub fn settings_filters_delete(&self, user_id: &str, id: &str) -> UserSettingFilterDeleteCall<'a, C, A> { + UserSettingFilterDeleteCall { hub: self.hub, - _request: request, _user_id: user_id.to_string(), _id: id.to_string(), _delegate: Default::default(), @@ -1877,6 +1932,27 @@ impl<'a, C, A> UserMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Updates the specified label. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user. + /// * `id` - The ID of the label to update. + pub fn labels_update(&self, request: Label, user_id: &str, id: &str) -> UserLabelUpdateCall<'a, C, A> { + UserLabelUpdateCall { + hub: self.hub, + _request: request, + _user_id: user_id.to_string(), + _id: id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Immediately and permanently deletes the specified draft. Does not simply trash it. @@ -1900,6 +1976,8 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// /// Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. /// + /// This method is only available to service account clients that have been delegated domain-wide authority. + /// /// # Arguments /// /// * `request` - No description provided. @@ -1919,6 +1997,8 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// /// Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. /// + /// This method is only available to service account clients that have been delegated domain-wide authority. + /// /// # Arguments /// /// * `request` - No description provided. @@ -1934,6 +2014,25 @@ impl<'a, C, A> UserMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Creates a new label. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user. + pub fn labels_create(&self, request: Label, user_id: &str) -> UserLabelCreateCall<'a, C, A> { + UserLabelCreateCall { + hub: self.hub, + _request: request, + _user_id: user_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Removes the specified thread from the trash. @@ -1955,7 +2054,28 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. This method supports patch semantics. + /// Lists S/MIME configs for the specified send-as alias. + /// + /// # Arguments + /// + /// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user. + /// * `sendAsEmail` - The email address that appears in the "From:" header for mail sent using this alias. + pub fn settings_send_as_smime_info_list(&self, user_id: &str, send_as_email: &str) -> UserSettingSendASmimeInfoListCall<'a, C, A> { + UserSettingSendASmimeInfoListCall { + hub: self.hub, + _user_id: user_id.to_string(), + _send_as_email: send_as_email.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. + /// + /// Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. This method supports patch semantics. /// /// # Arguments /// @@ -2016,15 +2136,19 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the forwarding addresses for the specified account. + /// Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key. /// /// # Arguments /// - /// * `userId` - User's email address. The special value "me" can be used to indicate the authenticated user. - pub fn settings_forwarding_addresses_list(&self, user_id: &str) -> UserSettingForwardingAddresseListCall<'a, C, A> { - UserSettingForwardingAddresseListCall { + /// * `request` - No description provided. + /// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user. + /// * `sendAsEmail` - The email address that appears in the "From:" header for mail sent using this alias. + pub fn settings_send_as_smime_info_insert(&self, request: SmimeInfo, user_id: &str, send_as_email: &str) -> UserSettingSendASmimeInfoInsertCall<'a, C, A> { + UserSettingSendASmimeInfoInsertCall { hub: self.hub, + _request: request, _user_id: user_id.to_string(), + _send_as_email: send_as_email.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2115,17 +2239,19 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a filter. + /// Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. + /// + /// This method is only available to service account clients that have been delegated domain-wide authority. /// /// # Arguments /// + /// * `request` - No description provided. /// * `userId` - User's email address. The special value "me" can be used to indicate the authenticated user. - /// * `id` - The ID of the filter to be deleted. - pub fn settings_filters_delete(&self, user_id: &str, id: &str) -> UserSettingFilterDeleteCall<'a, C, A> { - UserSettingFilterDeleteCall { + pub fn settings_forwarding_addresses_create(&self, request: ForwardingAddress, user_id: &str) -> UserSettingForwardingAddresseCreateCall<'a, C, A> { + UserSettingForwardingAddresseCreateCall { hub: self.hub, + _request: request, _user_id: user_id.to_string(), - _id: id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2229,17 +2355,19 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. + /// Sets the default S/MIME config for the specified send-as alias. /// /// # Arguments /// - /// * `request` - No description provided. - /// * `userId` - User's email address. The special value "me" can be used to indicate the authenticated user. - pub fn settings_forwarding_addresses_create(&self, request: ForwardingAddress, user_id: &str) -> UserSettingForwardingAddresseCreateCall<'a, C, A> { - UserSettingForwardingAddresseCreateCall { + /// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user. + /// * `sendAsEmail` - The email address that appears in the "From:" header for mail sent using this alias. + /// * `id` - The immutable ID for the SmimeInfo. + pub fn settings_send_as_smime_info_set_default(&self, user_id: &str, send_as_email: &str, id: &str) -> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> { + UserSettingSendASmimeInfoSetDefaultCall { hub: self.hub, - _request: request, _user_id: user_id.to_string(), + _send_as_email: send_as_email.to_string(), + _id: id.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2272,6 +2400,8 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// /// Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. /// + /// Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. + /// /// # Arguments /// /// * `request` - No description provided. @@ -2308,6 +2438,27 @@ impl<'a, C, A> UserMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Deletes the specified S/MIME config for the specified send-as alias. + /// + /// # Arguments + /// + /// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user. + /// * `sendAsEmail` - The email address that appears in the "From:" header for mail sent using this alias. + /// * `id` - The immutable ID for the SmimeInfo. + pub fn settings_send_as_smime_info_delete(&self, user_id: &str, send_as_email: &str, id: &str) -> UserSettingSendASmimeInfoDeleteCall<'a, C, A> { + UserSettingSendASmimeInfoDeleteCall { + hub: self.hub, + _user_id: user_id.to_string(), + _send_as_email: send_as_email.to_string(), + _id: id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Moves the specified message to the trash. @@ -2369,6 +2520,8 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// /// Sends a verification email to the specified send-as alias address. The verification status must be pending. /// + /// This method is only available to service account clients that have been delegated domain-wide authority. + /// /// # Arguments /// /// * `userId` - User's email address. The special value "me" can be used to indicate the authenticated user. @@ -2384,6 +2537,23 @@ impl<'a, C, A> UserMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Lists the forwarding addresses for the specified account. + /// + /// # Arguments + /// + /// * `userId` - User's email address. The special value "me" can be used to indicate the authenticated user. + pub fn settings_forwarding_addresses_list(&self, user_id: &str) -> UserSettingForwardingAddresseListCall<'a, C, A> { + UserSettingForwardingAddresseListCall { + hub: self.hub, + _user_id: user_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message. @@ -2426,6 +2596,8 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// /// Deletes the specified send-as alias. Revokes any verification that may have been required for using it. /// + /// This method is only available to service account clients that have been delegated domain-wide authority. + /// /// # Arguments /// /// * `userId` - User's email address. The special value "me" can be used to indicate the authenticated user. @@ -2445,6 +2617,8 @@ impl<'a, C, A> UserMethods<'a, C, A> { /// /// Deletes the specified forwarding address and revokes any verification that may have been required. /// + /// This method is only available to service account clients that have been delegated domain-wide authority. + /// /// # Arguments /// /// * `userId` - User's email address. The special value "me" can be used to indicate the authenticated user. @@ -2735,9 +2909,9 @@ impl<'a, C, A> UserSettingUpdateVacationCall<'a, C, A> where C: BorrowMut UserSettingUpdateVacationCall<'a, C, A> where C: BorrowMut UserSettingUpdateVacationCall<'a, C, A> where C: BorrowMut::default(), None); /// # let mut hub = Gmail::new(hyper::Client::new(), 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 = Label::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.users().labels_create(req, "userId") +/// let result = hub.users().settings_send_as_smime_info_get("userId", "sendAsEmail", "id") /// .doit(); /// # } /// ``` -pub struct UserLabelCreateCall<'a, C, A> +pub struct UserSettingSendASmimeInfoGetCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Gmail, - _request: Label, _user_id: String, + _send_as_email: String, + _id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for UserLabelCreateCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for UserSettingSendASmimeInfoGetCall<'a, C, A> {} -impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> UserSettingSendASmimeInfoGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Label)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, SmimeInfo)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -2796,11 +2965,13 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "gmail.users.labels.create", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "gmail.users.settings.sendAs.smimeInfo.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "userId"].iter() { + params.push(("sendAsEmail", self._send_as_email.to_string())); + params.push(("id", self._id.to_string())); + for &field in ["alt", "userId", "sendAsEmail", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2812,12 +2983,12 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels".to_string(); + let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{userId}", "userId")].iter() { + for &(find_this, param_name) in [("{userId}", "userId"), ("{sendAsEmail}", "sendAsEmail"), ("{id}", "id")].iter() { let mut replace_with: Option<&str> = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -2828,8 +2999,8 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, url = url.replace(find_this, replace_with.expect("to find substitution value in params")); } { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["userId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["id", "sendAsEmail", "userId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -2844,17 +3015,6 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, url.push_str(&url::form_urlencoded::serialize(params)); } - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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 { @@ -2871,15 +3031,11 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, } }; let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); + .header(auth_header.clone()); dlg.pre_request(); req.send() @@ -2930,32 +3086,43 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, } - /// - /// 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: Label) -> UserLabelCreateCall<'a, C, A> { - self._request = new_value; - self - } /// The user's email address. The special value me can be used to indicate the authenticated user. /// /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserLabelCreateCall<'a, C, A> { + pub fn user_id(mut self, new_value: &str) -> UserSettingSendASmimeInfoGetCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The email address that appears in the "From:" header for mail sent using this alias. + /// + /// Sets the *send as email* 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 send_as_email(mut self, new_value: &str) -> UserSettingSendASmimeInfoGetCall<'a, C, A> { + self._send_as_email = new_value.to_string(); + self + } + /// The immutable ID for the SmimeInfo. + /// + /// Sets the *id* 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 id(mut self, new_value: &str) -> UserSettingSendASmimeInfoGetCall<'a, C, A> { + self._id = 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. /// /// 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 Delegate) -> UserLabelCreateCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> UserSettingSendASmimeInfoGetCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -2976,7 +3143,7 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserLabelCreateCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> UserSettingSendASmimeInfoGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -2985,7 +3152,7 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// /// Use this method to actively specify which scope should be used, instead the default `Scope` variant - /// `Scope::Gmai`. + /// `Scope::Readonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -2993,7 +3160,7 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, /// 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: T) -> UserLabelCreateCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> UserSettingSendASmimeInfoGetCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -3505,9 +3672,9 @@ impl<'a, C, A> UserSettingGetImapCall<'a, C, A> where C: BorrowMut UserMessageImportCall<'a, C, A> where C: BorrowMut mp_reader.reserve_exact(2); let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); - if size > 36700160 { - return Err(Error::UploadSizeLimitExceeded(size, 36700160)) + if size > 52428800 { + return Err(Error::UploadSizeLimitExceeded(size, 52428800)) } mp_reader.add_part(&mut request_value_reader, request_size, json_mime_type.clone()) .add_part(&mut reader, size, reader_mime_type.clone()); @@ -3712,8 +3879,8 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut if protocol == "resumable" { let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); - if size > 36700160 { - return Err(Error::UploadSizeLimitExceeded(size, 36700160)) + if size > 52428800 { + return Err(Error::UploadSizeLimitExceeded(size, 52428800)) } let mut client = &mut *self.hub.client.borrow_mut(); let upload_result = { @@ -3776,7 +3943,7 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut /// Upload media all at once. /// If the upload fails for whichever reason, all progress is lost. /// - /// * *max size*: 35MB + /// * *max size*: 50MB /// * *multipart*: yes /// * *valid mime types*: 'message/rfc822' pub fn upload(self, stream: RS, mime_type: mime::Mime) -> Result<(hyper::client::Response, Message)> @@ -3792,7 +3959,7 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut /// may specify the `chunk_size()` and may cancel the operation before each chunk is uploaded, using /// `cancel_chunk_upload(...)`. /// - /// * *max size*: 35MB + /// * *max size*: 50MB /// * *multipart*: yes /// * *valid mime types*: 'message/rfc822' pub fn upload_resumable(self, resumeable_stream: RS, mime_type: mime::Mime) -> Result<(hyper::client::Response, Message)> @@ -3840,7 +4007,7 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut self._internal_date_source = Some(new_value.to_string()); self } - /// Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts. + /// Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts. /// /// Sets the *deleted* query property to the given value. pub fn deleted(mut self, new_value: bool) -> UserMessageImportCall<'a, C, A> { @@ -4408,10 +4575,11 @@ impl<'a, C, A> UserSettingForwardingAddresseGetCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.users().history_list("userId") -/// .start_history_id("et") -/// .page_token("duo") -/// .max_results(69) -/// .label_id("sea") +/// .start_history_id("aliquyam") +/// .page_token("sea") +/// .max_results(46) +/// .label_id("eos") +/// .add_history_types("erat") /// .doit(); /// # } /// ``` @@ -4424,6 +4592,7 @@ pub struct UserHistoryListCall<'a, C, A> _page_token: Option, _max_results: Option, _label_id: Option, + _history_types: Vec, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -4445,7 +4614,7 @@ impl<'a, C, A> UserHistoryListCall<'a, C, A> where C: BorrowMut, }; dlg.begin(MethodInfo { id: "gmail.users.history.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); params.push(("userId", self._user_id.to_string())); if let Some(value) = self._start_history_id { params.push(("startHistoryId", value.to_string())); @@ -4459,7 +4628,12 @@ impl<'a, C, A> UserHistoryListCall<'a, C, A> where C: BorrowMut, if let Some(value) = self._label_id { params.push(("labelId", value.to_string())); } - for &field in ["alt", "userId", "startHistoryId", "pageToken", "maxResults", "labelId"].iter() { + if self._history_types.len() > 0 { + for f in self._history_types.iter() { + params.push(("historyTypes", f.to_string())); + } + } + for &field in ["alt", "userId", "startHistoryId", "pageToken", "maxResults", "labelId", "historyTypes"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4612,6 +4786,14 @@ impl<'a, C, A> UserHistoryListCall<'a, C, A> where C: BorrowMut, self._label_id = Some(new_value.to_string()); self } + /// History types to be returned by the function + /// + /// Append the given value to the *history types* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_history_types(mut self, new_value: &str) -> UserHistoryListCall<'a, C, A> { + self._history_types.push(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. /// @@ -8514,9 +8696,9 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut, } -/// Updates the specified label. +/// Deletes a filter. /// -/// A builder for the *labels.update* method supported by a *user* resource. +/// A builder for the *settings.filters.delete* method supported by a *user* resource. /// It is not used directly, but through a `UserMethods` instance. /// /// # Example @@ -8527,7 +8709,6 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut, /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_gmail1 as gmail1; -/// use gmail1::Label; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -8538,23 +8719,17 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut, /// # hyper::Client::new(), /// # ::default(), None); /// # let mut hub = Gmail::new(hyper::Client::new(), 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 = Label::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.users().labels_update(req, "userId", "id") +/// let result = hub.users().settings_filters_delete("userId", "id") /// .doit(); /// # } /// ``` -pub struct UserLabelUpdateCall<'a, C, A> +pub struct UserSettingFilterDeleteCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Gmail, - _request: Label, _user_id: String, _id: String, _delegate: Option<&'a mut Delegate>, @@ -8562,13 +8737,13 @@ pub struct UserLabelUpdateCall<'a, C, A> _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for UserLabelUpdateCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for UserSettingFilterDeleteCall<'a, C, A> {} -impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Label)> { + pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -8576,12 +8751,12 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "gmail.users.labels.update", - http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "gmail.users.settings.filters.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); params.push(("userId", self._user_id.to_string())); params.push(("id", self._id.to_string())); - for &field in ["alt", "userId", "id"].iter() { + for &field in ["userId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -8591,11 +8766,10 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, params.push((&name, value.clone())); } - params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}".to_string(); + let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/filters/{id}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); + self._scopes.insert(Scope::SettingBasic.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{userId}", "userId"), ("{id}", "id")].iter() { @@ -8625,17 +8799,6 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, url.push_str(&url::form_urlencoded::serialize(params)); } - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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 { @@ -8652,15 +8815,11 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, } }; let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); + .header(auth_header.clone()); dlg.pre_request(); req.send() @@ -8691,17 +8850,7 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, Ok(serr) => Err(Error::BadRequest(serr)) } } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; + let result_value = res; dlg.finished(true); return Ok(result_value) @@ -8711,32 +8860,23 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, } - /// - /// 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: Label) -> UserLabelUpdateCall<'a, C, A> { - self._request = new_value; - self - } - /// The user's email address. The special value me can be used to indicate the authenticated user. + /// User's email address. The special value "me" can be used to indicate the authenticated user. /// /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserLabelUpdateCall<'a, C, A> { + pub fn user_id(mut self, new_value: &str) -> UserSettingFilterDeleteCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// The ID of the label to update. + /// The ID of the filter to be deleted. /// /// Sets the *id* 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 id(mut self, new_value: &str) -> UserLabelUpdateCall<'a, C, A> { + pub fn id(mut self, new_value: &str) -> UserSettingFilterDeleteCall<'a, C, A> { self._id = new_value.to_string(); self } @@ -8746,7 +8886,7 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, /// 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 Delegate) -> UserLabelUpdateCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> UserSettingFilterDeleteCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -8767,7 +8907,7 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserLabelUpdateCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> UserSettingFilterDeleteCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -8776,7 +8916,7 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, /// Identifies the authorization scope for the method you are building. /// /// Use this method to actively specify which scope should be used, instead the default `Scope` variant - /// `Scope::Gmai`. + /// `Scope::SettingBasic`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -8784,7 +8924,7 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, /// 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: T) -> UserLabelUpdateCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> UserSettingFilterDeleteCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -8819,10 +8959,10 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.users().threads_list("userId") -/// .q("consetetur") -/// .page_token("ut") -/// .max_results(85) -/// .add_label_ids("sed") +/// .q("sed") +/// .page_token("dolor") +/// .max_results(53) +/// .add_label_ids("dolor") /// .include_spam_trash(true) /// .doit(); /// # } @@ -9870,6 +10010,284 @@ impl<'a, C, A> UserLabelPatchCall<'a, C, A> where C: BorrowMut, A } +/// Updates the specified label. +/// +/// A builder for the *labels.update* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_gmail1 as gmail1; +/// use gmail1::Label; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use gmail1::Gmail; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Gmail::new(hyper::Client::new(), 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 = Label::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.users().labels_update(req, "userId", "id") +/// .doit(); +/// # } +/// ``` +pub struct UserLabelUpdateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Gmail, + _request: Label, + _user_id: String, + _id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserLabelUpdateCall<'a, C, A> {} + +impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Label)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "gmail.users.labels.update", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("userId", self._user_id.to_string())); + params.push(("id", self._id.to_string())); + for &field in ["alt", "userId", "id"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{userId}", "userId"), ("{id}", "id")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["id", "userId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Label) -> UserLabelUpdateCall<'a, C, A> { + self._request = new_value; + self + } + /// The user's email address. The special value me can be used to indicate the authenticated user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserLabelUpdateCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// The ID of the label to update. + /// + /// Sets the *id* 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 id(mut self, new_value: &str) -> UserLabelUpdateCall<'a, C, A> { + self._id = 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. + /// + /// 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 Delegate) -> UserLabelUpdateCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserLabelUpdateCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Gmai`. + /// + /// 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: T) -> UserLabelUpdateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Immediately and permanently deletes the specified draft. Does not simply trash it. /// /// A builder for the *drafts.delete* method supported by a *user* resource. @@ -10107,6 +10525,8 @@ impl<'a, C, A> UserDraftDeleteCall<'a, C, A> where C: BorrowMut, /// Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. +/// +/// This method is only available to service account clients that have been delegated domain-wide authority. /// /// A builder for the *settings.sendAs.create* method supported by a *user* resource. /// It is not used directly, but through a `UserMethods` instance. @@ -10373,6 +10793,8 @@ impl<'a, C, A> UserSettingSendACreateCall<'a, C, A> where C: BorrowMut UserSettingUpdateAutoForwardingCall<'a, C, A> where C: BorrowMut< } +/// Creates a new label. +/// +/// A builder for the *labels.create* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_gmail1 as gmail1; +/// use gmail1::Label; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use gmail1::Gmail; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Gmail::new(hyper::Client::new(), 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 = Label::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.users().labels_create(req, "userId") +/// .doit(); +/// # } +/// ``` +pub struct UserLabelCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Gmail, + _request: Label, + _user_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserLabelCreateCall<'a, C, A> {} + +impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Label)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "gmail.users.labels.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("userId", self._user_id.to_string())); + for &field in ["alt", "userId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["userId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Label) -> UserLabelCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// The user's email address. The special value me can be used to indicate the authenticated user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserLabelCreateCall<'a, C, A> { + self._user_id = 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. + /// + /// 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 Delegate) -> UserLabelCreateCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserLabelCreateCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Gmai`. + /// + /// 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: T) -> UserLabelCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Removes the specified thread from the trash. /// /// A builder for the *threads.untrash* method supported by a *user* resource. @@ -10885,7 +11573,256 @@ impl<'a, C, A> UserThreadUntrashCall<'a, C, A> where C: BorrowMut } -/// Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. This method supports patch semantics. +/// Lists S/MIME configs for the specified send-as alias. +/// +/// A builder for the *settings.sendAs.smimeInfo.list* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_gmail1 as gmail1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use gmail1::Gmail; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Gmail::new(hyper::Client::new(), 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.users().settings_send_as_smime_info_list("userId", "sendAsEmail") +/// .doit(); +/// # } +/// ``` +pub struct UserSettingSendASmimeInfoListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Gmail, + _user_id: String, + _send_as_email: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserSettingSendASmimeInfoListCall<'a, C, A> {} + +impl<'a, C, A> UserSettingSendASmimeInfoListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListSmimeInfoResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "gmail.users.settings.sendAs.smimeInfo.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("userId", self._user_id.to_string())); + params.push(("sendAsEmail", self._send_as_email.to_string())); + for &field in ["alt", "userId", "sendAsEmail"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{userId}", "userId"), ("{sendAsEmail}", "sendAsEmail")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["sendAsEmail", "userId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The user's email address. The special value me can be used to indicate the authenticated user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserSettingSendASmimeInfoListCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// The email address that appears in the "From:" header for mail sent using this alias. + /// + /// Sets the *send as email* 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 send_as_email(mut self, new_value: &str) -> UserSettingSendASmimeInfoListCall<'a, C, A> { + self._send_as_email = 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. + /// + /// 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 Delegate) -> UserSettingSendASmimeInfoListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserSettingSendASmimeInfoListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Readonly`. + /// + /// 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: T) -> UserSettingSendASmimeInfoListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. +/// +/// Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. This method supports patch semantics. /// /// A builder for the *settings.sendAs.patch* method supported by a *user* resource. /// It is not used directly, but through a `UserMethods` instance. @@ -11677,9 +12614,9 @@ impl<'a, C, A> UserThreadDeleteCall<'a, C, A> where C: BorrowMut, } -/// Lists the forwarding addresses for the specified account. +/// Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key. /// -/// A builder for the *settings.forwardingAddresses.list* method supported by a *user* resource. +/// A builder for the *settings.sendAs.smimeInfo.insert* method supported by a *user* resource. /// It is not used directly, but through a `UserMethods` instance. /// /// # Example @@ -11690,6 +12627,7 @@ impl<'a, C, A> UserThreadDeleteCall<'a, C, A> where C: BorrowMut, /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_gmail1 as gmail1; +/// use gmail1::SmimeInfo; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -11700,30 +12638,37 @@ impl<'a, C, A> UserThreadDeleteCall<'a, C, A> where C: BorrowMut, /// # hyper::Client::new(), /// # ::default(), None); /// # let mut hub = Gmail::new(hyper::Client::new(), 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 = SmimeInfo::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.users().settings_forwarding_addresses_list("userId") +/// let result = hub.users().settings_send_as_smime_info_insert(req, "userId", "sendAsEmail") /// .doit(); /// # } /// ``` -pub struct UserSettingForwardingAddresseListCall<'a, C, A> +pub struct UserSettingSendASmimeInfoInsertCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Gmail, + _request: SmimeInfo, _user_id: String, + _send_as_email: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for UserSettingForwardingAddresseListCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for UserSettingSendASmimeInfoInsertCall<'a, C, A> {} -impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> UserSettingSendASmimeInfoInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ListForwardingAddressesResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, SmimeInfo)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -11731,11 +12676,12 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "gmail.users.settings.forwardingAddresses.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "gmail.users.settings.sendAs.smimeInfo.insert", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "userId"].iter() { + params.push(("sendAsEmail", self._send_as_email.to_string())); + for &field in ["alt", "userId", "sendAsEmail"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -11747,12 +12693,12 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/forwardingAddresses".to_string(); + let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::SettingBasic.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{userId}", "userId")].iter() { + for &(find_this, param_name) in [("{userId}", "userId"), ("{sendAsEmail}", "sendAsEmail")].iter() { let mut replace_with: Option<&str> = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -11763,8 +12709,8 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu url = url.replace(find_this, replace_with.expect("to find substitution value in params")); } { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["userId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["sendAsEmail", "userId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -11779,6 +12725,17 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu url.push_str(&url::form_urlencoded::serialize(params)); } + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { @@ -11795,11 +12752,15 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu } }; let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); dlg.pre_request(); req.send() @@ -11850,23 +12811,42 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu } - /// User's email address. The special value "me" can be used to indicate the authenticated user. + /// + /// 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: SmimeInfo) -> UserSettingSendASmimeInfoInsertCall<'a, C, A> { + self._request = new_value; + self + } + /// The user's email address. The special value me can be used to indicate the authenticated user. /// /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserSettingForwardingAddresseListCall<'a, C, A> { + pub fn user_id(mut self, new_value: &str) -> UserSettingSendASmimeInfoInsertCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The email address that appears in the "From:" header for mail sent using this alias. + /// + /// Sets the *send as email* 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 send_as_email(mut self, new_value: &str) -> UserSettingSendASmimeInfoInsertCall<'a, C, A> { + self._send_as_email = 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. /// /// 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 Delegate) -> UserSettingForwardingAddresseListCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> UserSettingSendASmimeInfoInsertCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -11887,7 +12867,7 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserSettingForwardingAddresseListCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> UserSettingSendASmimeInfoInsertCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -11896,7 +12876,7 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu /// Identifies the authorization scope for the method you are building. /// /// Use this method to actively specify which scope should be used, instead the default `Scope` variant - /// `Scope::Readonly`. + /// `Scope::SettingBasic`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -11904,7 +12884,7 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu /// 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: T) -> UserSettingForwardingAddresseListCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> UserSettingSendASmimeInfoInsertCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -12476,8 +13456,8 @@ impl<'a, C, A> UserMessageModifyCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.users().messages_get("userId", "id") -/// .add_metadata_headers("consetetur") -/// .format("takimata") +/// .add_metadata_headers("ea") +/// .format("sadipscing") /// .doit(); /// # } /// ``` @@ -12989,9 +13969,11 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau } -/// Deletes a filter. +/// Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. +/// +/// This method is only available to service account clients that have been delegated domain-wide authority. /// -/// A builder for the *settings.filters.delete* method supported by a *user* resource. +/// A builder for the *settings.forwardingAddresses.create* method supported by a *user* resource. /// It is not used directly, but through a `UserMethods` instance. /// /// # Example @@ -13002,6 +13984,7 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_gmail1 as gmail1; +/// use gmail1::ForwardingAddress; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -13012,31 +13995,36 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau /// # hyper::Client::new(), /// # ::default(), None); /// # let mut hub = Gmail::new(hyper::Client::new(), 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 = ForwardingAddress::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.users().settings_filters_delete("userId", "id") +/// let result = hub.users().settings_forwarding_addresses_create(req, "userId") /// .doit(); /// # } /// ``` -pub struct UserSettingFilterDeleteCall<'a, C, A> +pub struct UserSettingForwardingAddresseCreateCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Gmail, + _request: ForwardingAddress, _user_id: String, - _id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for UserSettingFilterDeleteCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for UserSettingForwardingAddresseCreateCall<'a, C, A> {} -impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result { + pub fn doit(mut self) -> Result<(hyper::client::Response, ForwardingAddress)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -13044,12 +14032,11 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "gmail.users.settings.filters.delete", - http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "gmail.users.settings.forwardingAddresses.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("userId", self._user_id.to_string())); - params.push(("id", self._id.to_string())); - for &field in ["userId", "id"].iter() { + for &field in ["alt", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -13059,13 +14046,14 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -13076,8 +14064,8 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(2); - for param_name in ["id", "userId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["userId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -13092,6 +14080,17 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut Err(Error::BadRequest(serr)) } } - let result_value = res; + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; dlg.finished(true); return Ok(result_value) @@ -13153,33 +14166,32 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut UserSettingForwardingAddresseCreateCall<'a, C, A> { + self._request = new_value; + self + } /// User's email address. The special value "me" can be used to indicate the authenticated user. /// /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserSettingFilterDeleteCall<'a, C, A> { + pub fn user_id(mut self, new_value: &str) -> UserSettingForwardingAddresseCreateCall<'a, C, A> { self._user_id = new_value.to_string(); self } - /// The ID of the filter to be deleted. - /// - /// Sets the *id* 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 id(mut self, new_value: &str) -> UserSettingFilterDeleteCall<'a, C, A> { - self._id = 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. /// /// 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 Delegate) -> UserSettingFilterDeleteCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> UserSettingForwardingAddresseCreateCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -13200,7 +14212,7 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> UserSettingFilterDeleteCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> UserSettingForwardingAddresseCreateCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -13209,7 +14221,7 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingFilterDeleteCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> UserSettingForwardingAddresseCreateCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -13252,10 +14264,10 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut UserStopCall<'a, C, A> where C: BorrowMut, A: oaut } -/// Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. +/// Sets the default S/MIME config for the specified send-as alias. /// -/// A builder for the *settings.forwardingAddresses.create* method supported by a *user* resource. +/// A builder for the *settings.sendAs.smimeInfo.setDefault* method supported by a *user* resource. /// It is not used directly, but through a `UserMethods` instance. /// /// # Example @@ -14638,7 +15650,6 @@ impl<'a, C, A> UserStopCall<'a, C, A> where C: BorrowMut, A: oaut /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_gmail1 as gmail1; -/// use gmail1::ForwardingAddress; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -14649,36 +15660,32 @@ impl<'a, C, A> UserStopCall<'a, C, A> where C: BorrowMut, A: oaut /// # hyper::Client::new(), /// # ::default(), None); /// # let mut hub = Gmail::new(hyper::Client::new(), 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 = ForwardingAddress::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.users().settings_forwarding_addresses_create(req, "userId") +/// let result = hub.users().settings_send_as_smime_info_set_default("userId", "sendAsEmail", "id") /// .doit(); /// # } /// ``` -pub struct UserSettingForwardingAddresseCreateCall<'a, C, A> +pub struct UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Gmail, - _request: ForwardingAddress, _user_id: String, + _send_as_email: String, + _id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for UserSettingForwardingAddresseCreateCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> {} -impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ForwardingAddress)> { + pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -14686,11 +15693,13 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "gmail.users.settings.forwardingAddresses.create", + dlg.begin(MethodInfo { id: "gmail.users.settings.sendAs.smimeInfo.setDefault", http_method: hyper::method::Method::Post }); let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("userId", self._user_id.to_string())); - for &field in ["alt", "userId"].iter() { + params.push(("sendAsEmail", self._send_as_email.to_string())); + params.push(("id", self._id.to_string())); + for &field in ["userId", "sendAsEmail", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -14700,14 +15709,13 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow params.push((&name, value.clone())); } - params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/forwardingAddresses".to_string(); + let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::SettingSharing.as_ref().to_string(), ()); + self._scopes.insert(Scope::SettingBasic.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{userId}", "userId")].iter() { + for &(find_this, param_name) in [("{userId}", "userId"), ("{sendAsEmail}", "sendAsEmail"), ("{id}", "id")].iter() { let mut replace_with: Option<&str> = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -14718,8 +15726,8 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow url = url.replace(find_this, replace_with.expect("to find substitution value in params")); } { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["userId"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["id", "sendAsEmail", "userId"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -14734,17 +15742,6 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow url.push_str(&url::form_urlencoded::serialize(params)); } - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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 { @@ -14761,15 +15758,11 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow } }; let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); + .header(auth_header.clone()); dlg.pre_request(); req.send() @@ -14800,17 +15793,7 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow Ok(serr) => Err(Error::BadRequest(serr)) } } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; + let result_value = res; dlg.finished(true); return Ok(result_value) @@ -14820,32 +15803,43 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow } - /// - /// 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: ForwardingAddress) -> UserSettingForwardingAddresseCreateCall<'a, C, A> { - self._request = new_value; - self - } - /// User's email address. The special value "me" can be used to indicate the authenticated user. + /// The user's email address. The special value me can be used to indicate the authenticated user. /// /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserSettingForwardingAddresseCreateCall<'a, C, A> { + pub fn user_id(mut self, new_value: &str) -> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> { self._user_id = new_value.to_string(); self } + /// The email address that appears in the "From:" header for mail sent using this alias. + /// + /// Sets the *send as email* 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 send_as_email(mut self, new_value: &str) -> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> { + self._send_as_email = new_value.to_string(); + self + } + /// The immutable ID for the SmimeInfo. + /// + /// Sets the *id* 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 id(mut self, new_value: &str) -> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> { + self._id = 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. /// /// 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 Delegate) -> UserSettingForwardingAddresseCreateCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -14866,7 +15860,7 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> UserSettingForwardingAddresseCreateCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -14875,7 +15869,7 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow /// Identifies the authorization scope for the method you are building. /// /// Use this method to actively specify which scope should be used, instead the default `Scope` variant - /// `Scope::SettingSharing`. + /// `Scope::SettingBasic`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -14883,7 +15877,7 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow /// 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: T) -> UserSettingForwardingAddresseCreateCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -14918,11 +15912,11 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.users().messages_list("userId") -/// .q("eirmod") -/// .page_token("consetetur") -/// .max_results(16) -/// .add_label_ids("sed") -/// .include_spam_trash(true) +/// .q("labore") +/// .page_token("ipsum") +/// .max_results(70) +/// .add_label_ids("dolores") +/// .include_spam_trash(false) /// .doit(); /// # } /// ``` @@ -15101,7 +16095,7 @@ impl<'a, C, A> UserMessageListCall<'a, C, A> where C: BorrowMut, self._user_id = new_value.to_string(); self } - /// Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope. + /// Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope. /// /// Sets the *q* query property to the given value. pub fn q(mut self, new_value: &str) -> UserMessageListCall<'a, C, A> { @@ -15190,6 +16184,8 @@ impl<'a, C, A> UserMessageListCall<'a, C, A> where C: BorrowMut, /// Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. +/// +/// Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. /// /// A builder for the *settings.sendAs.update* method supported by a *user* resource. /// It is not used directly, but through a `UserMethods` instance. @@ -15733,6 +16729,254 @@ impl<'a, C, A> UserSettingFilterCreateCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Gmail::new(hyper::Client::new(), 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.users().settings_send_as_smime_info_delete("userId", "sendAsEmail", "id") +/// .doit(); +/// # } +/// ``` +pub struct UserSettingSendASmimeInfoDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Gmail, + _user_id: String, + _send_as_email: String, + _id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserSettingSendASmimeInfoDeleteCall<'a, C, A> {} + +impl<'a, C, A> UserSettingSendASmimeInfoDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "gmail.users.settings.sendAs.smimeInfo.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("userId", self._user_id.to_string())); + params.push(("sendAsEmail", self._send_as_email.to_string())); + params.push(("id", self._id.to_string())); + for &field in ["userId", "sendAsEmail", "id"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::SettingBasic.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{userId}", "userId"), ("{sendAsEmail}", "sendAsEmail"), ("{id}", "id")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["id", "sendAsEmail", "userId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The user's email address. The special value me can be used to indicate the authenticated user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserSettingSendASmimeInfoDeleteCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// The email address that appears in the "From:" header for mail sent using this alias. + /// + /// Sets the *send as email* 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 send_as_email(mut self, new_value: &str) -> UserSettingSendASmimeInfoDeleteCall<'a, C, A> { + self._send_as_email = new_value.to_string(); + self + } + /// The immutable ID for the SmimeInfo. + /// + /// Sets the *id* 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 id(mut self, new_value: &str) -> UserSettingSendASmimeInfoDeleteCall<'a, C, A> { + self._id = 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. + /// + /// 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 Delegate) -> UserSettingSendASmimeInfoDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserSettingSendASmimeInfoDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::SettingBasic`. + /// + /// 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: T) -> UserSettingSendASmimeInfoDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Moves the specified message to the trash. /// /// A builder for the *messages.trash* method supported by a *user* resource. @@ -16242,8 +17486,8 @@ impl<'a, C, A> UserGetProfileCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.users().threads_get("userId", "id") -/// .add_metadata_headers("dolores") -/// .format("sit") +/// .add_metadata_headers("invidunt") +/// .format("ut") /// .doit(); /// # } /// ``` @@ -16490,6 +17734,8 @@ impl<'a, C, A> UserThreadGetCall<'a, C, A> where C: BorrowMut, A: /// Sends a verification email to the specified send-as alias address. The verification status must be pending. +/// +/// This method is only available to service account clients that have been delegated domain-wide authority. /// /// A builder for the *settings.sendAs.verify* method supported by a *user* resource. /// It is not used directly, but through a `UserMethods` instance. @@ -16725,6 +17971,241 @@ impl<'a, C, A> UserSettingSendAVerifyCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Gmail::new(hyper::Client::new(), 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.users().settings_forwarding_addresses_list("userId") +/// .doit(); +/// # } +/// ``` +pub struct UserSettingForwardingAddresseListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Gmail, + _user_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for UserSettingForwardingAddresseListCall<'a, C, A> {} + +impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListForwardingAddressesResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "gmail.users.settings.forwardingAddresses.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("userId", self._user_id.to_string())); + for &field in ["alt", "userId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/forwardingAddresses".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["userId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// User's email address. The special value "me" can be used to indicate the authenticated user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserSettingForwardingAddresseListCall<'a, C, A> { + self._user_id = 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. + /// + /// 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 Delegate) -> UserSettingForwardingAddresseListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> UserSettingForwardingAddresseListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Readonly`. + /// + /// 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: T) -> UserSettingForwardingAddresseListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message. /// /// A builder for the *messages.insert* method supported by a *user* resource. @@ -16759,7 +18240,7 @@ impl<'a, C, A> UserSettingSendAVerifyCall<'a, C, A> where C: BorrowMut UserMessageInsertCall<'a, C, A> where C: BorrowMut mp_reader.reserve_exact(2); let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); - if size > 36700160 { - return Err(Error::UploadSizeLimitExceeded(size, 36700160)) + if size > 52428800 { + return Err(Error::UploadSizeLimitExceeded(size, 52428800)) } mp_reader.add_part(&mut request_value_reader, request_size, json_mime_type.clone()) .add_part(&mut reader, size, reader_mime_type.clone()); @@ -16956,8 +18437,8 @@ impl<'a, C, A> UserMessageInsertCall<'a, C, A> where C: BorrowMut if protocol == "resumable" { let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); - if size > 36700160 { - return Err(Error::UploadSizeLimitExceeded(size, 36700160)) + if size > 52428800 { + return Err(Error::UploadSizeLimitExceeded(size, 52428800)) } let mut client = &mut *self.hub.client.borrow_mut(); let upload_result = { @@ -17020,7 +18501,7 @@ impl<'a, C, A> UserMessageInsertCall<'a, C, A> where C: BorrowMut /// Upload media all at once. /// If the upload fails for whichever reason, all progress is lost. /// - /// * *max size*: 35MB + /// * *max size*: 50MB /// * *multipart*: yes /// * *valid mime types*: 'message/rfc822' pub fn upload(self, stream: RS, mime_type: mime::Mime) -> Result<(hyper::client::Response, Message)> @@ -17036,7 +18517,7 @@ impl<'a, C, A> UserMessageInsertCall<'a, C, A> where C: BorrowMut /// may specify the `chunk_size()` and may cancel the operation before each chunk is uploaded, using /// `cancel_chunk_upload(...)`. /// - /// * *max size*: 35MB + /// * *max size*: 50MB /// * *multipart*: yes /// * *valid mime types*: 'message/rfc822' pub fn upload_resumable(self, resumeable_stream: RS, mime_type: mime::Mime) -> Result<(hyper::client::Response, Message)> @@ -17070,7 +18551,7 @@ impl<'a, C, A> UserMessageInsertCall<'a, C, A> where C: BorrowMut self._internal_date_source = Some(new_value.to_string()); self } - /// Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts. + /// Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts. /// /// Sets the *deleted* query property to the given value. pub fn deleted(mut self, new_value: bool) -> UserMessageInsertCall<'a, C, A> { @@ -17365,6 +18846,8 @@ impl<'a, C, A> UserSettingGetAutoForwardingCall<'a, C, A> where C: BorrowMut UserSettingSendADeleteCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with iam (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/iam1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-iam1] path = "../iam1" -version = "1.0.4+20160915" +version = "1.0.4+20170515" diff --git a/gen/iam1-cli/README.md b/gen/iam1-cli/README.md index 5d99cc845c..eb1aa9d73e 100644 --- a/gen/iam1-cli/README.md +++ b/gen/iam1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *iam* API at revision *20160915*. The CLI is at version *1.0.4*. +This documentation was generated from the *iam* API at revision *20170515*. The CLI is at version *1.0.4*. ```bash iam1 [options] @@ -41,6 +41,7 @@ iam1 [options] service-accounts-list [-p ]... [-o ] service-accounts-set-iam-policy (-r )... [-p ]... [-o ] service-accounts-sign-blob (-r )... [-p ]... [-o ] + service-accounts-sign-jwt (-r )... [-p ]... [-o ] service-accounts-test-iam-permissions (-r )... [-p ]... [-o ] service-accounts-update (-r )... [-p ]... [-o ] roles diff --git a/gen/iam1-cli/mkdocs.yml b/gen/iam1-cli/mkdocs.yml index 6d08b5b543..17c991dedd 100644 --- a/gen/iam1-cli/mkdocs.yml +++ b/gen/iam1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: iam v1.0.4+20160915 +site_name: iam v1.0.4+20170515 site_url: http://byron.github.io/google-apis-rs/google-iam1-cli site_description: A complete library to interact with iam (protocol v1) @@ -20,6 +20,7 @@ pages: - ['projects_service-accounts-list.md', 'Projects', 'Service Accounts List'] - ['projects_service-accounts-set-iam-policy.md', 'Projects', 'Service Accounts Set Iam Policy'] - ['projects_service-accounts-sign-blob.md', 'Projects', 'Service Accounts Sign Blob'] +- ['projects_service-accounts-sign-jwt.md', 'Projects', 'Service Accounts Sign Jwt'] - ['projects_service-accounts-test-iam-permissions.md', 'Projects', 'Service Accounts Test Iam Permissions'] - ['projects_service-accounts-update.md', 'Projects', 'Service Accounts Update'] - ['roles_query-grantable-roles.md', 'Roles', 'Query Grantable Roles'] diff --git a/gen/iam1-cli/src/main.rs b/gen/iam1-cli/src/main.rs index 24b90307dc..da7410c171 100644 --- a/gen/iam1-cli/src/main.rs +++ b/gen/iam1-cli/src/main.rs @@ -318,9 +318,10 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "private-key-type" => Some(("privateKeyType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-public-key-data" => Some(("includePublicKeyData", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "key-algorithm" => Some(("keyAlgorithm", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["key-algorithm", "private-key-type"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["include-public-key-data", "key-algorithm", "private-key-type"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -626,8 +627,8 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "policy.etag" => Some(("policy.etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "policy.version" => Some(("policy.version", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "policy", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -774,6 +775,91 @@ impl<'n> Engine<'n> { } } + fn _projects_service_accounts_sign_jwt(&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()[..] { + "payload" => Some(("payload", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["payload"]); + 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::SignJwtRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().service_accounts_sign_jwt(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(), + _ => 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(()) + } + } + } + } + fn _projects_service_accounts_test_iam_permissions(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -973,9 +1059,11 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "full-resource-name" => Some(("fullResourceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["full-resource-name"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["full-resource-name", "page-size", "page-token"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1075,6 +1163,9 @@ impl<'n> Engine<'n> { ("service-accounts-sign-blob", Some(opt)) => { call_result = self._projects_service_accounts_sign_blob(opt, dry_run, &mut err); }, + ("service-accounts-sign-jwt", Some(opt)) => { + call_result = self._projects_service_accounts_sign_jwt(opt, dry_run, &mut err); + }, ("service-accounts-test-iam-permissions", Some(opt)) => { call_result = self._projects_service_accounts_test_iam_permissions(opt, dry_run, &mut err); }, @@ -1184,14 +1275,16 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ - ("projects", "methods: 'service-accounts-create', 'service-accounts-delete', 'service-accounts-get', 'service-accounts-get-iam-policy', 'service-accounts-keys-create', 'service-accounts-keys-delete', 'service-accounts-keys-get', 'service-accounts-keys-list', 'service-accounts-list', 'service-accounts-set-iam-policy', 'service-accounts-sign-blob', 'service-accounts-test-iam-permissions' and 'service-accounts-update'", vec![ + ("projects", "methods: 'service-accounts-create', 'service-accounts-delete', 'service-accounts-get', 'service-accounts-get-iam-policy', 'service-accounts-keys-create', 'service-accounts-keys-delete', 'service-accounts-keys-get', 'service-accounts-keys-list', 'service-accounts-list', 'service-accounts-set-iam-policy', 'service-accounts-sign-blob', 'service-accounts-sign-jwt', 'service-accounts-test-iam-permissions' and 'service-accounts-update'", vec![ ("service-accounts-create", - Some(r##"Creates a ServiceAccount and returns it."##), + Some(r##"Creates a ServiceAccount + and returns it."##), "Details at http://byron.github.io/google-apis-rs/google_iam1_cli/projects_service-accounts-create", vec![ (Some(r##"name"##), None, - Some(r##"Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`."##), + Some(r##"Required. The resource name of the project associated with the service + accounts, such as `projects/my-project-123`."##), Some(true), Some(false)), @@ -1219,7 +1312,11 @@ fn main() { vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account."##), + Some(r##"The resource name of the service account in the following format: + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + Using `-` as a wildcard for the project will infer the project from + the account. The `account` value can be the `email` address or the + `unique_id` of the service account."##), Some(true), Some(false)), @@ -1241,7 +1338,11 @@ fn main() { vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account."##), + Some(r##"The resource name of the service account in the following format: + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + Using `-` as a wildcard for the project will infer the project from + the account. The `account` value can be the `email` address or the + `unique_id` of the service account."##), Some(true), Some(false)), @@ -1258,12 +1359,14 @@ fn main() { Some(false)), ]), ("service-accounts-get-iam-policy", - Some(r##"Returns the IAM access control policy for a ServiceAccount."##), + Some(r##"Returns the IAM access control policy for a + ServiceAccount."##), "Details at http://byron.github.io/google-apis-rs/google_iam1_cli/projects_service-accounts-get-iam-policy", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`."##), + Some(r##"REQUIRED: The resource for which the policy is being requested. + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1280,12 +1383,17 @@ fn main() { Some(false)), ]), ("service-accounts-keys-create", - Some(r##"Creates a ServiceAccountKey and returns it."##), + Some(r##"Creates a ServiceAccountKey + and returns it."##), "Details at http://byron.github.io/google-apis-rs/google_iam1_cli/projects_service-accounts-keys-create", vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account."##), + Some(r##"The resource name of the service account in the following format: + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + Using `-` as a wildcard for the project will infer the project from + the account. The `account` value can be the `email` address or the + `unique_id` of the service account."##), Some(true), Some(false)), @@ -1313,7 +1421,11 @@ fn main() { vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account."##), + Some(r##"The resource name of the service account key in the following format: + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. + Using `-` as a wildcard for the project will infer the project from + the account. The `account` value can be the `email` address or the + `unique_id` of the service account."##), Some(true), Some(false)), @@ -1330,12 +1442,18 @@ fn main() { Some(false)), ]), ("service-accounts-keys-get", - Some(r##"Gets the ServiceAccountKey by key id."##), + Some(r##"Gets the ServiceAccountKey + by key id."##), "Details at http://byron.github.io/google-apis-rs/google_iam1_cli/projects_service-accounts-keys-get", vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account."##), + Some(r##"The resource name of the service account key in the following format: + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. + + Using `-` as a wildcard for the project will infer the project from + the account. The `account` value can be the `email` address or the + `unique_id` of the service account."##), Some(true), Some(false)), @@ -1357,7 +1475,12 @@ fn main() { vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project, will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account."##), + Some(r##"The resource name of the service account in the following format: + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + + Using `-` as a wildcard for the project, will infer the project from + the account. The `account` value can be the `email` address or the + `unique_id` of the service account."##), Some(true), Some(false)), @@ -1379,7 +1502,8 @@ fn main() { vec![ (Some(r##"name"##), None, - Some(r##"Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`."##), + Some(r##"Required. The resource name of the project associated with the service + accounts, such as `projects/my-project-123`."##), Some(true), Some(false)), @@ -1396,12 +1520,14 @@ fn main() { Some(false)), ]), ("service-accounts-set-iam-policy", - Some(r##"Sets the IAM access control policy for a ServiceAccount."##), + Some(r##"Sets the IAM access control policy for a + ServiceAccount."##), "Details at http://byron.github.io/google-apis-rs/google_iam1_cli/projects_service-accounts-set-iam-policy", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`."##), + Some(r##"REQUIRED: The resource for which the policy is being specified. + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1429,7 +1555,47 @@ fn main() { vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account."##), + Some(r##"The resource name of the service account in the following format: + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + Using `-` as a wildcard for the project will infer the project from + the account. The `account` value can be the `email` address or the + `unique_id` of the service 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)), + ]), + ("service-accounts-sign-jwt", + Some(r##"Signs a JWT using a service account's system-managed private key. + + If no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an + an expiry time of one hour by default. If you request an expiry time of + more than one hour, the request will fail."##), + "Details at http://byron.github.io/google-apis-rs/google_iam1_cli/projects_service-accounts-sign-jwt", + vec![ + (Some(r##"name"##), + None, + Some(r##"The resource name of the service account in the following format: + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + Using `-` as a wildcard for the project will infer the project from + the account. The `account` value can be the `email` address or the + `unique_id` of the service account."##), Some(true), Some(false)), @@ -1452,12 +1618,14 @@ fn main() { Some(false)), ]), ("service-accounts-test-iam-permissions", - Some(r##"Tests the specified permissions against the IAM access control policy for a ServiceAccount."##), + Some(r##"Tests the specified permissions against the IAM access control policy + for a ServiceAccount."##), "Details at http://byron.github.io/google-apis-rs/google_iam1_cli/projects_service-accounts-test-iam-permissions", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`."##), + Some(r##"REQUIRED: The resource for which the policy detail is being requested. + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1480,12 +1648,24 @@ fn main() { Some(false)), ]), ("service-accounts-update", - Some(r##"Updates a ServiceAccount. Currently, only the following fields are updatable: `display_name` . The `etag` is mandatory."##), + Some(r##"Updates a ServiceAccount. + + Currently, only the following fields are updatable: + `display_name` . + The `etag` is mandatory."##), "Details at http://byron.github.io/google-apis-rs/google_iam1_cli/projects_service-accounts-update", vec![ (Some(r##"name"##), None, - Some(r##"The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a wildcard for the project will infer the project from the `account` and the `account` value can be the `email` address or the `unique_id` of the service account. In responses the resource name will always be in the format `projects/{project}/serviceAccounts/{email}`."##), + Some(r##"The resource name of the service account in the following format: + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + + Requests using `-` as a wildcard for the project will infer the project + from the `account` and the `account` value can be the `email` address or + the `unique_id` of the service account. + + In responses the resource name will always be in the format + `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`."##), Some(true), Some(false)), @@ -1511,7 +1691,9 @@ fn main() { ("roles", "methods: 'query-grantable-roles'", vec![ ("query-grantable-roles", - Some(r##"Queries roles that can be granted on a particular resource. A role is grantable if it can be used as the role in a binding for a policy for that resource."##), + Some(r##"Queries roles that can be granted on a particular resource. + A role is grantable if it can be used as the role in a binding for a policy + for that resource."##), "Details at http://byron.github.io/google-apis-rs/google_iam1_cli/roles_query-grantable-roles", vec![ (Some(r##"kv"##), @@ -1538,7 +1720,7 @@ fn main() { let mut app = App::new("iam1") .author("Sebastian Thiel ") - .version("1.0.4+20160915") + .version("1.0.4+20170515") .about("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.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_iam1_cli") .arg(Arg::with_name("url") diff --git a/gen/iam1/Cargo.toml b/gen/iam1/Cargo.toml index bdc3610a0f..ed9eb41d3c 100644 --- a/gen/iam1/Cargo.toml +++ b/gen/iam1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-iam1" -version = "1.0.4+20160915" +version = "1.0.4+20170515" authors = ["Sebastian Thiel "] description = "A complete library to interact with iam (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/iam1" homepage = "https://cloud.google.com/iam/" -documentation = "https://docs.rs/google-iam1/1.0.4+20160915" +documentation = "https://docs.rs/google-iam1/1.0.4+20170515" license = "MIT" keywords = ["iam", "google", "protocol", "web", "api"] diff --git a/gen/iam1/README.md b/gen/iam1/README.md index 42f8179fd7..3e78f466e2 100644 --- a/gen/iam1/README.md +++ b/gen/iam1/README.md @@ -5,18 +5,18 @@ DO NOT EDIT ! --> The `google-iam1` library allows access to all features of the *Google iam* service. -This documentation was generated from *iam* crate version *1.0.4+20160915*, where *20160915* is the exact revision of the *iam:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *iam* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *iam:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *iam* *v1* API can be found at the [official documentation site](https://cloud.google.com/iam/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.Iam.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.Iam.html) ... * projects - * [*service accounts create*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountCreateCall.html), [*service accounts delete*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountDeleteCall.html), [*service accounts get*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountGetCall.html), [*service accounts get iam policy*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountGetIamPolicyCall.html), [*service accounts keys create*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountKeyCreateCall.html), [*service accounts keys delete*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountKeyDeleteCall.html), [*service accounts keys get*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountKeyGetCall.html), [*service accounts keys list*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountKeyListCall.html), [*service accounts list*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountListCall.html), [*service accounts set iam policy*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountSetIamPolicyCall.html), [*service accounts sign blob*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountSignBlobCall.html), [*service accounts test iam permissions*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountTestIamPermissionCall.html) and [*service accounts update*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.ProjectServiceAccountUpdateCall.html) -* [roles](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.Role.html) - * [*query grantable roles*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.RoleQueryGrantableRoleCall.html) + * [*service accounts create*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountCreateCall.html), [*service accounts delete*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountDeleteCall.html), [*service accounts get*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountGetCall.html), [*service accounts get iam policy*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountGetIamPolicyCall.html), [*service accounts keys create*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountKeyCreateCall.html), [*service accounts keys delete*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountKeyDeleteCall.html), [*service accounts keys get*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountKeyGetCall.html), [*service accounts keys list*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountKeyListCall.html), [*service accounts list*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountListCall.html), [*service accounts set iam policy*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountSetIamPolicyCall.html), [*service accounts sign blob*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountSignBlobCall.html), [*service accounts sign jwt*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountSignJwtCall.html), [*service accounts test iam permissions*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountTestIamPermissionCall.html) and [*service accounts update*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.ProjectServiceAccountUpdateCall.html) +* [roles](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.Role.html) + * [*query grantable roles*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.RoleQueryGrantableRoleCall.html) @@ -25,17 +25,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/struct.Iam.html)** +* **[Hub](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/struct.Iam.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.Part.html)** + * **[Parts](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -125,17 +125,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.Delegate.html), 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-iam1/1.0.4+20160915/google_iam1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.ResponseResult.html), 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")`. @@ -145,29 +145,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.CallBuilder.html) 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-iam1/1.0.4+20160915/google_iam1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-iam1/1.0.4+20160915/google_iam1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.CallBuilder.html), 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-iam1/1.0.4+20160915/google_iam1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-iam1/1.0.4+20170515/google_iam1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/iam1/src/lib.rs b/gen/iam1/src/lib.rs index 0241553db3..29a62ace7b 100644 --- a/gen/iam1/src/lib.rs +++ b/gen/iam1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *iam* crate version *1.0.4+20160915*, where *20160915* is the exact revision of the *iam:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *iam* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *iam:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *iam* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/iam/). @@ -12,7 +12,7 @@ //! Handle the following *Resources* with ease from the central [hub](struct.Iam.html) ... //! //! * projects -//! * [*service accounts create*](struct.ProjectServiceAccountCreateCall.html), [*service accounts delete*](struct.ProjectServiceAccountDeleteCall.html), [*service accounts get*](struct.ProjectServiceAccountGetCall.html), [*service accounts get iam policy*](struct.ProjectServiceAccountGetIamPolicyCall.html), [*service accounts keys create*](struct.ProjectServiceAccountKeyCreateCall.html), [*service accounts keys delete*](struct.ProjectServiceAccountKeyDeleteCall.html), [*service accounts keys get*](struct.ProjectServiceAccountKeyGetCall.html), [*service accounts keys list*](struct.ProjectServiceAccountKeyListCall.html), [*service accounts list*](struct.ProjectServiceAccountListCall.html), [*service accounts set iam policy*](struct.ProjectServiceAccountSetIamPolicyCall.html), [*service accounts sign blob*](struct.ProjectServiceAccountSignBlobCall.html), [*service accounts test iam permissions*](struct.ProjectServiceAccountTestIamPermissionCall.html) and [*service accounts update*](struct.ProjectServiceAccountUpdateCall.html) +//! * [*service accounts create*](struct.ProjectServiceAccountCreateCall.html), [*service accounts delete*](struct.ProjectServiceAccountDeleteCall.html), [*service accounts get*](struct.ProjectServiceAccountGetCall.html), [*service accounts get iam policy*](struct.ProjectServiceAccountGetIamPolicyCall.html), [*service accounts keys create*](struct.ProjectServiceAccountKeyCreateCall.html), [*service accounts keys delete*](struct.ProjectServiceAccountKeyDeleteCall.html), [*service accounts keys get*](struct.ProjectServiceAccountKeyGetCall.html), [*service accounts keys list*](struct.ProjectServiceAccountKeyListCall.html), [*service accounts list*](struct.ProjectServiceAccountListCall.html), [*service accounts set iam policy*](struct.ProjectServiceAccountSetIamPolicyCall.html), [*service accounts sign blob*](struct.ProjectServiceAccountSignBlobCall.html), [*service accounts sign jwt*](struct.ProjectServiceAccountSignJwtCall.html), [*service accounts test iam permissions*](struct.ProjectServiceAccountTestIamPermissionCall.html) and [*service accounts update*](struct.ProjectServiceAccountUpdateCall.html) //! * [roles](struct.Role.html) //! * [*query grantable roles*](struct.RoleQueryGrantableRoleCall.html) //! @@ -359,7 +359,10 @@ impl<'a, C, A> Iam /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TestIamPermissionsRequest { - /// The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + /// The set of permissions to check for the `resource`. Permissions with + /// wildcards (such as '*' or 'storage.*') are not allowed. For more + /// information see + /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). pub permissions: Option>, } @@ -377,7 +380,10 @@ impl RequestValue for TestIamPermissionsRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SetIamPolicyRequest { - /// REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + /// REQUIRED: The complete policy to be applied to the `resource`. The size of + /// the policy is limited to a few 10s of KB. An empty policy is a + /// valid policy but certain Cloud Platform services (such as Projects) + /// might reject them. pub policy: Option, } @@ -402,7 +408,41 @@ pub struct ListServiceAccountKeysResponse { impl ResponseResult for ListServiceAccountKeysResponse {} -/// A service account in the Identity and Access Management API. To create a service account, specify the `project_id` and the `account_id` for the account. The `account_id` is unique within the project, and is used to generate the service account email address and a stable `unique_id`. If the account already exists, the account's resource name is returned in util::Status's ResourceInfo.resource_name in the format of projects/{project}/serviceAccounts/{email}. The caller can use the name in other methods to access the account. All other methods can identify the service account using the format `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account. +/// The service account sign JWT request. +/// +/// # 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*). +/// +/// * [service accounts sign jwt projects](struct.ProjectServiceAccountSignJwtCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SignJwtRequest { + /// The JWT payload to sign, a JSON JWT Claim set. + pub payload: Option, +} + +impl RequestValue for SignJwtRequest {} + + +/// A service account in the Identity and Access Management API. +/// +/// To create a service account, specify the `project_id` and the `account_id` +/// for the account. The `account_id` is unique within the project, and is used +/// to generate the service account email address and a stable +/// `unique_id`. +/// +/// If the account already exists, the account's resource name is returned +/// in util::Status's ResourceInfo.resource_name in the format of +/// projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}. The caller can +/// use the name in other methods to access the account. +/// +/// All other methods can identify the service account using the format +/// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. +/// Using `-` as a wildcard for the project will infer the project from +/// the account. The `account` value can be the `email` address or the +/// `unique_id` of the service account. /// /// # Activities /// @@ -415,15 +455,26 @@ impl ResponseResult for ListServiceAccountKeysResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ServiceAccount { - /// @OutputOnly. The OAuth2 client id for the service account. This is used in conjunction with the OAuth2 clientconfig API to make three legged OAuth2 (3LO) flows to access the data of Google users. + /// @OutputOnly. The OAuth2 client id for the service account. + /// This is used in conjunction with the OAuth2 clientconfig API to make + /// three legged OAuth2 (3LO) flows to access the data of Google users. #[serde(rename="oauth2ClientId")] pub oauth2_client_id: Option, /// Used to perform a consistent read-modify-write. pub etag: Option, - /// Optional. A user-specified description of the service account. Must be fewer than 100 UTF-8 bytes. + /// Optional. A user-specified description of the service account. Must be + /// fewer than 100 UTF-8 bytes. #[serde(rename="displayName")] pub display_name: Option, - /// The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a wildcard for the project will infer the project from the `account` and the `account` value can be the `email` address or the `unique_id` of the service account. In responses the resource name will always be in the format `projects/{project}/serviceAccounts/{email}`. + /// The resource name of the service account in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + /// + /// Requests using `-` as a wildcard for the project will infer the project + /// from the `account` and the `account` value can be the `email` address or + /// the `unique_id` of the service account. + /// + /// In responses the resource name will always be in the format + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. pub name: Option, /// @OutputOnly The unique and stable id of the service account. #[serde(rename="uniqueId")] @@ -450,6 +501,10 @@ impl ResponseResult for ServiceAccount {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QueryGrantableRolesResponse { + /// To retrieve the next page of results, set + /// `QueryGrantableRolesRequest.page_token` to this value. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, /// The list of matching roles. pub roles: Option>, } @@ -468,12 +523,19 @@ impl ResponseResult for QueryGrantableRolesResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Role { - /// Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. - pub title: Option, - /// Optional. A human-readable description for the role. + /// Optional. A human-readable description for the role. pub description: Option, - /// The name of the role. When Role is used in CreateRole, the role name must not be set. When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for curated roles and organizations/{organization-id}/roles/logging.viewer for custom roles. + /// The name of the role. + /// + /// When Role is used in CreateRole, the role name must not be set. + /// + /// When Role is used in output and other input such as UpdateRole, the role + /// name is the complete path, e.g., roles/logging.viewer for curated roles + /// and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles. pub name: Option, + /// Optional. A human-readable title for the role. Typically this + /// is limited to 100 UTF-8 bytes. + pub title: Option, } impl Resource for Role {} @@ -509,7 +571,9 @@ impl RequestValue for SignBlobRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListServiceAccountsResponse { - /// To retrieve the next page of results, set ListServiceAccountsRequest.page_token to this value. + /// To retrieve the next page of results, set + /// ListServiceAccountsRequest.page_token + /// to this value. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The list of matching service accounts. @@ -519,7 +583,37 @@ pub struct ListServiceAccountsResponse { impl ResponseResult for ListServiceAccountsResponse {} -/// Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). +/// Defines an Identity and Access Management (IAM) policy. It is used to +/// specify access control policies for Cloud Platform resources. +/// +/// +/// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of +/// `members` to a `role`, where the members can be user accounts, Google groups, +/// Google domains, and service accounts. A `role` is a named list of permissions +/// defined by IAM. +/// +/// **Example** +/// +/// { +/// "bindings": [ +/// { +/// "role": "roles/owner", +/// "members": [ +/// "user:mike@example.com", +/// "group:admins@example.com", +/// "domain:google.com", +/// "serviceAccount:my-other-app@appspot.gserviceaccount.com", +/// ] +/// }, +/// { +/// "role": "roles/viewer", +/// "members": ["user:sean@example.com"] +/// } +/// ] +/// } +/// +/// For a description of IAM and its features, see the +/// [IAM developer's guide](https://cloud.google.com/iam). /// /// # Activities /// @@ -531,12 +625,23 @@ impl ResponseResult for ListServiceAccountsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Policy { - /// Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error. + /// Associates a list of `members` to a `role`. + /// Multiple `bindings` must not be specified for the same `role`. + /// `bindings` with no members will result in an error. pub bindings: Option>, + /// `etag` is used for optimistic concurrency control as a way to help + /// prevent simultaneous updates of a policy from overwriting each other. + /// It is strongly suggested that systems make use of the `etag` in the + /// read-modify-write cycle to perform policy updates in order to avoid race + /// conditions: An `etag` is returned in the response to `getIamPolicy`, and + /// systems are expected to put that etag in the request to `setIamPolicy` to + /// ensure that their change will be applied to the same version of the policy. + /// + /// If no `etag` is provided in the call to `setIamPolicy`, then the existing + /// policy is overwritten blindly. + pub etag: Option, /// Version of the `Policy`. The default version is 0. pub version: Option, - /// `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. - pub etag: Option, } impl ResponseResult for Policy {} @@ -553,15 +658,34 @@ impl ResponseResult for Policy {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QueryGrantableRolesRequest { - /// Required. The full resource name to query from the list of grantable roles. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`. + /// Optional pagination token returned in an earlier + /// QueryGrantableRolesResponse. + #[serde(rename="pageToken")] + pub page_token: Option, + /// Required. The full resource name to query from the list of grantable roles. + /// + /// The name follows the Google Cloud Platform resource format. + /// For example, a Cloud Platform project with id `my-project` will be named + /// `//cloudresourcemanager.googleapis.com/projects/my-project`. #[serde(rename="fullResourceName")] pub full_resource_name: Option, + /// Optional limit on the number of roles to include in the response. + #[serde(rename="pageSize")] + pub page_size: Option, } impl RequestValue for QueryGrantableRolesRequest {} -/// 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); } The JSON representation for `Empty` is empty JSON object `{}`. +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. /// /// # Activities /// @@ -588,29 +712,92 @@ impl ResponseResult for Empty {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TestIamPermissionsResponse { - /// A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + /// A subset of `TestPermissionsRequest.permissions` that the caller is + /// allowed. pub permissions: Option>, } impl ResponseResult for TestIamPermissionsResponse {} +/// The service account sign JWT response. +/// +/// # 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*). +/// +/// * [service accounts sign jwt projects](struct.ProjectServiceAccountSignJwtCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SignJwtResponse { + /// The id of the key used to sign the JWT. + #[serde(rename="keyId")] + pub key_id: Option, + /// The signed JWT. + #[serde(rename="signedJwt")] + pub signed_jwt: Option, +} + +impl ResponseResult for SignJwtResponse {} + + /// Associates `members` with a `role`. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Binding { - /// Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required + /// Role that is assigned to `members`. + /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + /// Required pub role: Option, - /// Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. + /// Specifies the identities requesting access for a Cloud Platform resource. + /// `members` can have the following values: + /// + /// * `allUsers`: A special identifier that represents anyone who is + /// on the internet; with or without a Google account. + /// + /// * `allAuthenticatedUsers`: A special identifier that represents anyone + /// who is authenticated with a Google account or a service account. + /// + /// * `user:{emailid}`: An email address that represents a specific Google + /// account. For example, `alice@gmail.com` or `joe@example.com`. + /// + /// + /// * `serviceAccount:{emailid}`: An email address that represents a service + /// account. For example, `my-other-app@appspot.gserviceaccount.com`. + /// + /// * `group:{emailid}`: An email address that represents a Google group. + /// For example, `admins@example.com`. + /// + /// + /// * `domain:{domain}`: A Google Apps domain name that represents all the + /// users of that domain. For example, `google.com` or `example.com`. + /// + /// pub members: Option>, } impl Part for Binding {} -/// Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed key-pairs are managed automatically by Google, and rotated daily without user intervention. The private key never leaves Google's servers to maximize security. Public keys for all service accounts are also published at the OAuth2 Service Account API. +/// Represents a service account key. +/// +/// A service account has two sets of key-pairs: user-managed, and +/// system-managed. +/// +/// User-managed key-pairs can be created and deleted by users. Users are +/// responsible for rotating these keys periodically to ensure security of +/// their service accounts. Users retain the private key of these key-pairs, +/// and Google retains ONLY the public key. +/// +/// System-managed key-pairs are managed automatically by Google, and rotated +/// daily without user intervention. The private key never leaves Google's +/// servers to maximize security. +/// +/// Public keys for all service accounts are also published at the OAuth2 +/// Service Account API. /// /// # Activities /// @@ -622,16 +809,22 @@ impl Part for Binding {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ServiceAccountKey { + /// The private key data. Only provided in `CreateServiceAccountKey` + /// responses. + #[serde(rename="privateKeyData")] + pub private_key_data: Option, + /// The resource name of the service account key in the following format + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. + pub name: Option, /// Specifies the algorithm (and possibly key size) for the key. #[serde(rename="keyAlgorithm")] pub key_algorithm: Option, - /// The key can be used after this timestamp. - #[serde(rename="validAfterTime")] - pub valid_after_time: Option, - /// The private key data. Only provided in `CreateServiceAccountKey` responses. - #[serde(rename="privateKeyData")] - pub private_key_data: Option, - /// The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys. + /// The output format for the private key. + /// Only provided in `CreateServiceAccountKey` responses, not + /// in `GetServiceAccountKey` or `ListServiceAccountKey` responses. + /// + /// Google never exposes system-managed private keys, and never retains + /// user-managed private keys. #[serde(rename="privateKeyType")] pub private_key_type: Option, /// The key can be used before this timestamp. @@ -640,8 +833,9 @@ pub struct ServiceAccountKey { /// The public key data. Only provided in `GetServiceAccountKey` responses. #[serde(rename="publicKeyData")] pub public_key_data: Option, - /// The resource name of the service account key in the following format `projects/{project}/serviceAccounts/{account}/keys/{key}`. - pub name: Option, + /// The key can be used after this timestamp. + #[serde(rename="validAfterTime")] + pub valid_after_time: Option, } impl ResponseResult for ServiceAccountKey {} @@ -679,10 +873,16 @@ impl ResponseResult for SignBlobResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreateServiceAccountKeyRequest { - /// The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the default output format. + /// The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the + /// default output format. #[serde(rename="privateKeyType")] pub private_key_type: Option, - /// Which type of key and algorithm to use for the key. The default is currently a 4K RSA key. However this may change in the future. + /// no description provided + #[serde(rename="includePublicKeyData")] + pub include_public_key_data: Option, + /// Which type of key and algorithm to use for the key. + /// The default is currently a 2K RSA key. However this may change in the + /// future. #[serde(rename="keyAlgorithm")] pub key_algorithm: Option, } @@ -701,10 +901,15 @@ impl RequestValue for CreateServiceAccountKeyRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreateServiceAccountRequest { - /// The ServiceAccount resource to create. Currently, only the following values are user assignable: `display_name` . + /// The ServiceAccount resource to create. + /// Currently, only the following values are user assignable: + /// `display_name` . #[serde(rename="serviceAccount")] pub service_account: Option, - /// Required. The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. + /// Required. The account id that is used to generate the service account + /// email address and a stable unique id. It is unique within a project, + /// must be 6-30 characters long, and match the regular expression + /// `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. #[serde(rename="accountId")] pub account_id: Option, } @@ -757,7 +962,9 @@ impl<'a, C, A> RoleMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Queries roles that can be granted on a particular resource. A role is grantable if it can be used as the role in a binding for a policy for that resource. + /// Queries roles that can be granted on a particular resource. + /// A role is grantable if it can be used as the role in a binding for a policy + /// for that resource. /// /// # Arguments /// @@ -798,7 +1005,7 @@ impl<'a, C, A> RoleMethods<'a, C, A> { /// ::default(), None); /// let mut hub = Iam::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `service_accounts_create(...)`, `service_accounts_delete(...)`, `service_accounts_get(...)`, `service_accounts_get_iam_policy(...)`, `service_accounts_keys_create(...)`, `service_accounts_keys_delete(...)`, `service_accounts_keys_get(...)`, `service_accounts_keys_list(...)`, `service_accounts_list(...)`, `service_accounts_set_iam_policy(...)`, `service_accounts_sign_blob(...)`, `service_accounts_test_iam_permissions(...)` and `service_accounts_update(...)` +/// // like `service_accounts_create(...)`, `service_accounts_delete(...)`, `service_accounts_get(...)`, `service_accounts_get_iam_policy(...)`, `service_accounts_keys_create(...)`, `service_accounts_keys_delete(...)`, `service_accounts_keys_get(...)`, `service_accounts_keys_list(...)`, `service_accounts_list(...)`, `service_accounts_set_iam_policy(...)`, `service_accounts_sign_blob(...)`, `service_accounts_sign_jwt(...)`, `service_accounts_test_iam_permissions(...)` and `service_accounts_update(...)` /// // to build up your call. /// let rb = hub.projects(); /// # } @@ -819,7 +1026,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `name` - The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project, will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account. + /// * `name` - The resource name of the service account in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + /// Using `-` as a wildcard for the project, will infer the project from + /// the account. The `account` value can be the `email` address or the + /// `unique_id` of the service account. pub fn service_accounts_keys_list(&self, name: &str) -> ProjectServiceAccountKeyListCall<'a, C, A> { ProjectServiceAccountKeyListCall { hub: self.hub, @@ -833,12 +1044,14 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Sets the IAM access control policy for a ServiceAccount. + /// Sets the IAM access control policy for a + /// ServiceAccount. /// /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + /// * `resource` - REQUIRED: The resource for which the policy is being specified. + /// See the operation documentation for the appropriate value for this field. pub fn service_accounts_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectServiceAccountSetIamPolicyCall<'a, C, A> { ProjectServiceAccountSetIamPolicyCall { hub: self.hub, @@ -856,7 +1069,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `name` - The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account. + /// * `name` - The resource name of the service account key in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. + /// Using `-` as a wildcard for the project will infer the project from + /// the account. The `account` value can be the `email` address or the + /// `unique_id` of the service account. pub fn service_accounts_keys_delete(&self, name: &str) -> ProjectServiceAccountKeyDeleteCall<'a, C, A> { ProjectServiceAccountKeyDeleteCall { hub: self.hub, @@ -869,12 +1086,17 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a ServiceAccountKey and returns it. + /// Creates a ServiceAccountKey + /// and returns it. /// /// # Arguments /// /// * `request` - No description provided. - /// * `name` - The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account. + /// * `name` - The resource name of the service account in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + /// Using `-` as a wildcard for the project will infer the project from + /// the account. The `account` value can be the `email` address or the + /// `unique_id` of the service account. pub fn service_accounts_keys_create(&self, request: CreateServiceAccountKeyRequest, name: &str) -> ProjectServiceAccountKeyCreateCall<'a, C, A> { ProjectServiceAccountKeyCreateCall { hub: self.hub, @@ -893,7 +1115,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `name` - The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account. + /// * `name` - The resource name of the service account in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + /// Using `-` as a wildcard for the project will infer the project from + /// the account. The `account` value can be the `email` address or the + /// `unique_id` of the service account. pub fn service_accounts_sign_blob(&self, request: SignBlobRequest, name: &str) -> ProjectServiceAccountSignBlobCall<'a, C, A> { ProjectServiceAccountSignBlobCall { hub: self.hub, @@ -907,12 +1133,22 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a ServiceAccount. Currently, only the following fields are updatable: `display_name` . The `etag` is mandatory. + /// Updates a ServiceAccount. + /// + /// Currently, only the following fields are updatable: + /// `display_name` . + /// The `etag` is mandatory. /// /// # Arguments /// /// * `request` - No description provided. - /// * `name` - The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a wildcard for the project will infer the project from the `account` and the `account` value can be the `email` address or the `unique_id` of the service account. In responses the resource name will always be in the format `projects/{project}/serviceAccounts/{email}`. + /// * `name` - The resource name of the service account in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + /// Requests using `-` as a wildcard for the project will infer the project + /// from the `account` and the `account` value can be the `email` address or + /// the `unique_id` of the service account. + /// In responses the resource name will always be in the format + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. pub fn service_accounts_update(&self, request: ServiceAccount, name: &str) -> ProjectServiceAccountUpdateCall<'a, C, A> { ProjectServiceAccountUpdateCall { hub: self.hub, @@ -930,7 +1166,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `name` - Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`. + /// * `name` - Required. The resource name of the project associated with the service + /// accounts, such as `projects/my-project-123`. pub fn service_accounts_list(&self, name: &str) -> ProjectServiceAccountListCall<'a, C, A> { ProjectServiceAccountListCall { hub: self.hub, @@ -949,7 +1186,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `name` - The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account. + /// * `name` - The resource name of the service account in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + /// Using `-` as a wildcard for the project will infer the project from + /// the account. The `account` value can be the `email` address or the + /// `unique_id` of the service account. pub fn service_accounts_delete(&self, name: &str) -> ProjectServiceAccountDeleteCall<'a, C, A> { ProjectServiceAccountDeleteCall { hub: self.hub, @@ -962,11 +1203,16 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the ServiceAccountKey by key id. + /// Gets the ServiceAccountKey + /// by key id. /// /// # Arguments /// - /// * `name` - The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account. + /// * `name` - The resource name of the service account key in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. + /// Using `-` as a wildcard for the project will infer the project from + /// the account. The `account` value can be the `email` address or the + /// `unique_id` of the service account. pub fn service_accounts_keys_get(&self, name: &str) -> ProjectServiceAccountKeyGetCall<'a, C, A> { ProjectServiceAccountKeyGetCall { hub: self.hub, @@ -980,11 +1226,13 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns the IAM access control policy for a ServiceAccount. + /// Returns the IAM access control policy for a + /// ServiceAccount. /// /// # Arguments /// - /// * `resource` - REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + /// * `resource` - REQUIRED: The resource for which the policy is being requested. + /// See the operation documentation for the appropriate value for this field. pub fn service_accounts_get_iam_policy(&self, resource: &str) -> ProjectServiceAccountGetIamPolicyCall<'a, C, A> { ProjectServiceAccountGetIamPolicyCall { hub: self.hub, @@ -997,12 +1245,14 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Tests the specified permissions against the IAM access control policy for a ServiceAccount. + /// Tests the specified permissions against the IAM access control policy + /// for a ServiceAccount. /// /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. + /// See the operation documentation for the appropriate value for this field. pub fn service_accounts_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectServiceAccountTestIamPermissionCall<'a, C, A> { ProjectServiceAccountTestIamPermissionCall { hub: self.hub, @@ -1016,12 +1266,14 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a ServiceAccount and returns it. + /// Creates a ServiceAccount + /// and returns it. /// /// # Arguments /// /// * `request` - No description provided. - /// * `name` - Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`. + /// * `name` - Required. The resource name of the project associated with the service + /// accounts, such as `projects/my-project-123`. pub fn service_accounts_create(&self, request: CreateServiceAccountRequest, name: &str) -> ProjectServiceAccountCreateCall<'a, C, A> { ProjectServiceAccountCreateCall { hub: self.hub, @@ -1033,13 +1285,44 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Signs a JWT using a service account's system-managed private key. + /// + /// If no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an + /// an expiry time of one hour by default. If you request an expiry time of + /// more than one hour, the request will fail. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - The resource name of the service account in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + /// Using `-` as a wildcard for the project will infer the project from + /// the account. The `account` value can be the `email` address or the + /// `unique_id` of the service account. + pub fn service_accounts_sign_jwt(&self, request: SignJwtRequest, name: &str) -> ProjectServiceAccountSignJwtCall<'a, C, A> { + ProjectServiceAccountSignJwtCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Gets a ServiceAccount. /// /// # Arguments /// - /// * `name` - The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account. + /// * `name` - The resource name of the service account in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + /// Using `-` as a wildcard for the project will infer the project from + /// the account. The `account` value can be the `email` address or the + /// `unique_id` of the service account. pub fn service_accounts_get(&self, name: &str) -> ProjectServiceAccountGetCall<'a, C, A> { ProjectServiceAccountGetCall { hub: self.hub, @@ -1059,7 +1342,9 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { // CallBuilders ### // ################# -/// Queries roles that can be granted on a particular resource. A role is grantable if it can be used as the role in a binding for a policy for that resource. +/// Queries roles that can be granted on a particular resource. +/// A role is grantable if it can be used as the role in a binding for a policy +/// for that resource. /// /// A builder for the *queryGrantableRoles* method supported by a *role* resource. /// It is not used directly, but through a `RoleMethods` instance. @@ -1265,12 +1550,12 @@ impl<'a, C, A> RoleQueryGrantableRoleCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> RoleQueryGrantableRoleCall<'a, C, A> @@ -1482,7 +1767,12 @@ impl<'a, C, A> ProjectServiceAccountKeyListCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyListCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountKeyListCall<'a, C, A> @@ -1558,7 +1850,8 @@ impl<'a, C, A> ProjectServiceAccountKeyListCall<'a, C, A> where C: BorrowMut ProjectServiceAccountSetIamPolicyCall<'a, C, A> where C: BorrowMu self._request = new_value; self } - /// REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + /// REQUIRED: The resource for which the policy is being specified. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// @@ -1801,12 +2095,12 @@ impl<'a, C, A> ProjectServiceAccountSetIamPolicyCall<'a, C, A> where C: BorrowMu /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectServiceAccountSetIamPolicyCall<'a, C, A> @@ -2011,7 +2305,11 @@ impl<'a, C, A> ProjectServiceAccountKeyDeleteCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountKeyDeleteCall<'a, C, A> @@ -2079,7 +2377,8 @@ impl<'a, C, A> ProjectServiceAccountKeyDeleteCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyCreateCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountKeyCreateCall<'a, C, A> @@ -2563,7 +2866,11 @@ impl<'a, C, A> ProjectServiceAccountSignBlobCall<'a, C, A> where C: BorrowMut ProjectServiceAccountSignBlobCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountSignBlobCall<'a, C, A> @@ -2631,7 +2938,11 @@ impl<'a, C, A> ProjectServiceAccountSignBlobCall<'a, C, A> where C: BorrowMut ProjectServiceAccountUpdateCall<'a, C, A> where C: BorrowMut ProjectServiceAccountUpdateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountUpdateCall<'a, C, A> @@ -3094,7 +3413,8 @@ impl<'a, C, A> ProjectServiceAccountListCall<'a, C, A> where C: BorrowMut ProjectServiceAccountListCall<'a, C, A> where C: BorrowMut ProjectServiceAccountListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the ListServiceAccountsResponse.next_page_token in a subsequent request. + /// Optional limit on the number of service accounts to include in the + /// response. Further accounts can subsequently be obtained by including the + /// ListServiceAccountsResponse.next_page_token + /// in a subsequent request. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ProjectServiceAccountListCall<'a, C, A> { @@ -3143,12 +3467,12 @@ impl<'a, C, A> ProjectServiceAccountListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountListCall<'a, C, A> @@ -3353,7 +3677,11 @@ impl<'a, C, A> ProjectServiceAccountDeleteCall<'a, C, A> where C: BorrowMut ProjectServiceAccountDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountDeleteCall<'a, C, A> @@ -3421,7 +3749,8 @@ impl<'a, C, A> ProjectServiceAccountDeleteCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyGetCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyGetCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyGetCall<'a, C, A> { @@ -3645,12 +3980,12 @@ impl<'a, C, A> ProjectServiceAccountKeyGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountKeyGetCall<'a, C, A> @@ -3678,7 +4013,8 @@ impl<'a, C, A> ProjectServiceAccountKeyGetCall<'a, C, A> where C: BorrowMut ProjectServiceAccountGetIamPolicyCall<'a, C, A> where C: BorrowMu } - /// REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + /// REQUIRED: The resource for which the policy is being requested. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// @@ -3890,12 +4227,12 @@ impl<'a, C, A> ProjectServiceAccountGetIamPolicyCall<'a, C, A> where C: BorrowMu /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectServiceAccountGetIamPolicyCall<'a, C, A> @@ -3923,7 +4260,8 @@ impl<'a, C, A> ProjectServiceAccountGetIamPolicyCall<'a, C, A> where C: BorrowMu } -/// Tests the specified permissions against the IAM access control policy for a ServiceAccount. +/// Tests the specified permissions against the IAM access control policy +/// for a ServiceAccount. /// /// A builder for the *serviceAccounts.testIamPermissions* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -4131,7 +4469,8 @@ impl<'a, C, A> ProjectServiceAccountTestIamPermissionCall<'a, C, A> where C: Bor self._request = new_value; self } - /// REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. + /// REQUIRED: The resource for which the policy detail is being requested. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// @@ -4166,12 +4505,12 @@ impl<'a, C, A> ProjectServiceAccountTestIamPermissionCall<'a, C, A> where C: Bor /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectServiceAccountTestIamPermissionCall<'a, C, A> @@ -4199,7 +4538,8 @@ impl<'a, C, A> ProjectServiceAccountTestIamPermissionCall<'a, C, A> where C: Bor } -/// Creates a ServiceAccount and returns it. +/// Creates a ServiceAccount +/// and returns it. /// /// A builder for the *serviceAccounts.create* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -4407,7 +4747,8 @@ impl<'a, C, A> ProjectServiceAccountCreateCall<'a, C, A> where C: BorrowMut ProjectServiceAccountCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountCreateCall<'a, C, A> @@ -4475,6 +4816,290 @@ impl<'a, C, A> ProjectServiceAccountCreateCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Iam::new(hyper::Client::new(), 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 = SignJwtRequest::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.projects().service_accounts_sign_jwt(req, "name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectServiceAccountSignJwtCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Iam, + _request: SignJwtRequest, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectServiceAccountSignJwtCall<'a, C, A> {} + +impl<'a, C, A> ProjectServiceAccountSignJwtCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SignJwtResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "iam.projects.serviceAccounts.signJwt", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://iam.googleapis.com/v1/{+name}:signJwt".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: SignJwtRequest) -> ProjectServiceAccountSignJwtCall<'a, C, A> { + self._request = new_value; + self + } + /// The resource name of the service account in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. + /// Using `-` as a wildcard for the project will infer the project from + /// the account. The `account` value can be the `email` address or the + /// `unique_id` of the service 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) -> ProjectServiceAccountSignJwtCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectServiceAccountSignJwtCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectServiceAccountSignJwtCall<'a, C, A> + 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 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: T) -> ProjectServiceAccountSignJwtCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Gets a ServiceAccount. /// /// A builder for the *serviceAccounts.get* method supported by a *project* resource. @@ -4652,7 +5277,11 @@ impl<'a, C, A> ProjectServiceAccountGetCall<'a, C, A> where C: BorrowMut ProjectServiceAccountGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectServiceAccountGetCall<'a, C, A> diff --git a/gen/identitytoolkit3-cli/Cargo.toml b/gen/identitytoolkit3-cli/Cargo.toml index 51ab996e47..298ef182e0 100644 --- a/gen/identitytoolkit3-cli/Cargo.toml +++ b/gen/identitytoolkit3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-identitytoolkit3-cli" -version = "1.0.4+20161206" +version = "1.0.4+20170425" authors = ["Sebastian Thiel "] description = "A complete library to interact with Identity Toolkit (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/identitytoolkit3-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-identitytoolkit3] path = "../identitytoolkit3" -version = "1.0.4+20161206" +version = "1.0.4+20170425" diff --git a/gen/identitytoolkit3-cli/README.md b/gen/identitytoolkit3-cli/README.md index 33a755277c..7b7966fa31 100644 --- a/gen/identitytoolkit3-cli/README.md +++ b/gen/identitytoolkit3-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Identity Toolkit* API at revision *20161206*. The CLI is at version *1.0.4*. +This documentation was generated from the *Identity Toolkit* API at revision *20170425*. The CLI is at version *1.0.4*. ```bash identitytoolkit3 [options] diff --git a/gen/identitytoolkit3-cli/mkdocs.yml b/gen/identitytoolkit3-cli/mkdocs.yml index 7551cb1d91..c614390c8f 100644 --- a/gen/identitytoolkit3-cli/mkdocs.yml +++ b/gen/identitytoolkit3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Identity Toolkit v1.0.4+20161206 +site_name: Identity Toolkit v1.0.4+20170425 site_url: http://byron.github.io/google-apis-rs/google-identitytoolkit3-cli site_description: A complete library to interact with Identity Toolkit (protocol v3) diff --git a/gen/identitytoolkit3-cli/src/main.rs b/gen/identitytoolkit3-cli/src/main.rs index 532476da77..c8d1f21df7 100644 --- a/gen/identitytoolkit3-cli/src/main.rs +++ b/gen/identitytoolkit3-cli/src/main.rs @@ -430,16 +430,23 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "can-handle-code-in-app" => Some(("canHandleCodeInApp", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "request-type" => Some(("requestType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "i-os-bundle-id" => Some(("iOSBundleId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "android-minimum-version" => Some(("androidMinimumVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "new-email" => Some(("newEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "android-package-name" => Some(("androidPackageName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id-token" => Some(("idToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "challenge" => Some(("challenge", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "new-email" => Some(("newEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "user-ip" => Some(("userIp", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "i-os-app-store-id" => Some(("iOSAppStoreId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "email" => Some(("email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "request-type" => Some(("requestType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "android-install-app" => Some(("androidInstallApp", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "user-ip" => Some(("userIp", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "continue-url" => Some(("continueUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "captcha-resp" => Some(("captchaResp", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["captcha-resp", "challenge", "email", "id-token", "kind", "new-email", "request-type", "user-ip"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["android-install-app", "android-minimum-version", "android-package-name", "can-handle-code-in-app", "captcha-resp", "challenge", "continue-url", "email", "i-os-app-store-id", "i-os-bundle-id", "id-token", "kind", "new-email", "request-type", "user-ip"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1079,6 +1086,7 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "local-id" => Some(("localId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "photo-url" => Some(("photoUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "instance-id" => Some(("instanceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "email-verified" => Some(("emailVerified", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -1089,7 +1097,7 @@ impl<'n> Engine<'n> { "password" => Some(("password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "email" => Some(("email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["captcha-challenge", "captcha-response", "disabled", "display-name", "email", "email-verified", "id-token", "instance-id", "password", "photo-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["captcha-challenge", "captcha-response", "disabled", "display-name", "email", "email-verified", "id-token", "instance-id", "local-id", "password", "photo-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1273,10 +1281,11 @@ impl<'n> Engine<'n> { "session-id" => Some(("sessionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "request-uri" => Some(("requestUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "return-secure-token" => Some(("returnSecureToken", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "auto-create" => Some(("autoCreate", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "return-refresh-token" => Some(("returnRefreshToken", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "return-idp-credential" => Some(("returnIdpCredential", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["delegated-project-number", "id-token", "instance-id", "pending-id-token", "post-body", "request-uri", "return-idp-credential", "return-refresh-token", "return-secure-token", "session-id"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["auto-create", "delegated-project-number", "id-token", "instance-id", "pending-id-token", "post-body", "request-uri", "return-idp-credential", "return-refresh-token", "return-secure-token", "session-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2026,7 +2035,7 @@ fn main() { let mut app = App::new("identitytoolkit3") .author("Sebastian Thiel ") - .version("1.0.4+20161206") + .version("1.0.4+20170425") .about("Help the third party sites to implement federated login.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_identitytoolkit3_cli") .arg(Arg::with_name("url") diff --git a/gen/identitytoolkit3/Cargo.toml b/gen/identitytoolkit3/Cargo.toml index e46bc95494..78e7ec1f9d 100644 --- a/gen/identitytoolkit3/Cargo.toml +++ b/gen/identitytoolkit3/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-identitytoolkit3" -version = "1.0.4+20161206" +version = "1.0.4+20170425" authors = ["Sebastian Thiel "] description = "A complete library to interact with Identity Toolkit (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/identitytoolkit3" homepage = "https://developers.google.com/identity-toolkit/v3/" -documentation = "https://docs.rs/google-identitytoolkit3/1.0.4+20161206" +documentation = "https://docs.rs/google-identitytoolkit3/1.0.4+20170425" license = "MIT" keywords = ["identitytoolkit", "google", "protocol", "web", "api"] diff --git a/gen/identitytoolkit3/README.md b/gen/identitytoolkit3/README.md index fefd8ebf78..e6b1d1b4a7 100644 --- a/gen/identitytoolkit3/README.md +++ b/gen/identitytoolkit3/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-identitytoolkit3` library allows access to all features of the *Google Identity Toolkit* service. -This documentation was generated from *Identity Toolkit* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *identitytoolkit:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Identity Toolkit* crate version *1.0.4+20170425*, where *20170425* is the exact revision of the *identitytoolkit:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Identity Toolkit* *v3* API can be found at the [official documentation site](https://developers.google.com/identity-toolkit/v3/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.IdentityToolkit.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.IdentityToolkit.html) ... -* [relyingparty](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.Relyingparty.html) - * [*create auth uri*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyCreateAuthUriCall.html), [*delete account*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyDeleteAccountCall.html), [*download account*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyDownloadAccountCall.html), [*get account info*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyGetAccountInfoCall.html), [*get oob confirmation code*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyGetOobConfirmationCodeCall.html), [*get project config*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyGetProjectConfigCall.html), [*get public keys*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyGetPublicKeyCall.html), [*get recaptcha param*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyGetRecaptchaParamCall.html), [*reset password*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyResetPasswordCall.html), [*set account info*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartySetAccountInfoCall.html), [*set project config*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartySetProjectConfigCall.html), [*sign out user*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartySignOutUserCall.html), [*signup new user*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartySignupNewUserCall.html), [*upload account*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyUploadAccountCall.html), [*verify assertion*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyVerifyAssertionCall.html), [*verify custom token*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyVerifyCustomTokenCall.html) and [*verify password*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.RelyingpartyVerifyPasswordCall.html) +* [relyingparty](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.Relyingparty.html) + * [*create auth uri*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyCreateAuthUriCall.html), [*delete account*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyDeleteAccountCall.html), [*download account*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyDownloadAccountCall.html), [*get account info*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyGetAccountInfoCall.html), [*get oob confirmation code*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyGetOobConfirmationCodeCall.html), [*get project config*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyGetProjectConfigCall.html), [*get public keys*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyGetPublicKeyCall.html), [*get recaptcha param*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyGetRecaptchaParamCall.html), [*reset password*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyResetPasswordCall.html), [*set account info*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartySetAccountInfoCall.html), [*set project config*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartySetProjectConfigCall.html), [*sign out user*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartySignOutUserCall.html), [*signup new user*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartySignupNewUserCall.html), [*upload account*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyUploadAccountCall.html), [*verify assertion*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyVerifyAssertionCall.html), [*verify custom token*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyVerifyCustomTokenCall.html) and [*verify password*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.RelyingpartyVerifyPasswordCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/struct.IdentityToolkit.html)** +* **[Hub](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/struct.IdentityToolkit.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.Part.html)** + * **[Parts](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -121,17 +121,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.Delegate.html), 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-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.ResponseResult.html), 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")`. @@ -141,29 +141,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.CallBuilder.html) 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-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.RequestValue.html) and -[decodable](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.RequestValue.html) and +[decodable](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.CallBuilder.html), 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-identitytoolkit3/1.0.4+20161206/google_identitytoolkit3/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-identitytoolkit3/1.0.4+20170425/google_identitytoolkit3/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/identitytoolkit3/src/lib.rs b/gen/identitytoolkit3/src/lib.rs index 85d83d917c..eb758a2a74 100644 --- a/gen/identitytoolkit3/src/lib.rs +++ b/gen/identitytoolkit3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Identity Toolkit* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *identitytoolkit:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Identity Toolkit* crate version *1.0.4+20170425*, where *20170425* is the exact revision of the *identitytoolkit:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Identity Toolkit* *v3* API can be found at the //! [official documentation site](https://developers.google.com/identity-toolkit/v3/). @@ -481,7 +481,7 @@ pub struct IdentitytoolkitRelyingpartyGetAccountInfoRequest { impl RequestValue for IdentitytoolkitRelyingpartyGetAccountInfoRequest {} -/// Respone of downloading accounts in batch. +/// Response of downloading accounts in batch. /// /// # Activities /// @@ -782,6 +782,9 @@ pub struct IdentitytoolkitRelyingpartySignupNewUserRequest { /// The name of the user. #[serde(rename="displayName")] pub display_name: Option, + /// Privileged caller can create user with specified user id. + #[serde(rename="localId")] + pub local_id: Option, /// The photo url of the user. #[serde(rename="photoUrl")] pub photo_url: Option, @@ -950,15 +953,18 @@ pub struct SetAccountInfoResponse { /// The photo url of the user. #[serde(rename="photoUrl")] pub photo_url: Option, - /// The Gitkit id token to login the newly sign up user. - #[serde(rename="idToken")] - pub id_token: Option, + /// If email has been verified. + #[serde(rename="emailVerified")] + pub email_verified: Option, /// The user's hashed password. #[serde(rename="passwordHash")] pub password_hash: Option, /// The new email the user attempts to change to. #[serde(rename="newEmail")] pub new_email: Option, + /// The Gitkit id token to login the newly sign up user. + #[serde(rename="idToken")] + pub id_token: Option, /// If idToken is STS id token, then this field will be refresh token. #[serde(rename="refreshToken")] pub refresh_token: Option, @@ -1007,6 +1013,9 @@ pub struct IdentitytoolkitRelyingpartyVerifyAssertionRequest { /// Whether return sts id token and refresh token instead of gitkit token. #[serde(rename="returnSecureToken")] pub return_secure_token: Option, + /// When it's true, automatically creates a new account if the user doesn't exist. When it's false, allows existing user to sign in normally and throws exception if the user doesn't exist. + #[serde(rename="autoCreate")] + pub auto_create: Option, /// Whether to return refresh tokens. #[serde(rename="returnRefreshToken")] pub return_refresh_token: Option, @@ -1029,16 +1038,37 @@ impl RequestValue for IdentitytoolkitRelyingpartyVerifyAssertionRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Relyingparty { + /// whether or not the app can handle the oob code without first going to web + #[serde(rename="canHandleCodeInApp")] + pub can_handle_code_in_app: Option, /// The fixed string "identitytoolkit#relyingparty". pub kind: Option, - /// The request type. - #[serde(rename="requestType")] - pub request_type: Option, + /// the iOS bundle id of iOS app to handle the action code + #[serde(rename="iOSBundleId")] + pub i_os_bundle_id: Option, + /// minimum version of the app. if the version on the device is lower than this version then the user is taken to the play store to upgrade the app + #[serde(rename="androidMinimumVersion")] + pub android_minimum_version: Option, + /// whether or not to install the android app on the device where the link is opened + #[serde(rename="androidInstallApp")] + pub android_install_app: Option, + /// android package name of the android app to handle the action code + #[serde(rename="androidPackageName")] + pub android_package_name: Option, /// The user's Gitkit login token for email change. #[serde(rename="idToken")] pub id_token: Option, /// The recaptcha challenge presented to the user. pub challenge: Option, + /// iOS app store id to download the app if it's not already installed + #[serde(rename="iOSAppStoreId")] + pub i_os_app_store_id: Option, + /// The url to continue to the Gitkit app + #[serde(rename="continueUrl")] + pub continue_url: Option, + /// The request type. + #[serde(rename="requestType")] + pub request_type: Option, /// The new email if the code is for email change. #[serde(rename="newEmail")] pub new_email: Option, @@ -1217,15 +1247,18 @@ pub struct UserInfoProviderUserInfo { /// User's identifier at IDP. #[serde(rename="federatedId")] pub federated_id: Option, - /// The IdP ID. For white listed IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier. - #[serde(rename="providerId")] - pub provider_id: Option, /// The user's display name at the IDP. #[serde(rename="displayName")] pub display_name: Option, /// The user's photo url at the IDP. #[serde(rename="photoUrl")] pub photo_url: Option, + /// The IdP ID. For white listed IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier. + #[serde(rename="providerId")] + pub provider_id: Option, + /// User's phone number. + #[serde(rename="phoneNumber")] + pub phone_number: Option, /// User's raw identifier directly returned from IDP. #[serde(rename="rawId")] pub raw_id: Option, @@ -1309,6 +1342,9 @@ pub struct VerifyAssertionResponse { /// The URI of the public accessible profiel picture. #[serde(rename="photoUrl")] pub photo_url: Option, + /// True if it's a new user sign-in, false if it's a returning user. + #[serde(rename="isNewUser")] + pub is_new_user: Option, /// It's the identifier param in the createAuthUri request if the identifier is an email. It can be used to check whether the user input email is different from the asserted email. #[serde(rename="inputEmail")] pub input_email: Option, @@ -1563,6 +1599,9 @@ pub struct UserInfo { pub email_verified: Option, /// Version of the user's password. pub version: Option, + /// User's phone number. + #[serde(rename="phoneNumber")] + pub phone_number: Option, /// The IDP of the user. #[serde(rename="providerUserInfo")] pub provider_user_info: Option>, diff --git a/gen/kgsearch1-cli/Cargo.toml b/gen/kgsearch1-cli/Cargo.toml index f164ef6f50..367c39315e 100644 --- a/gen/kgsearch1-cli/Cargo.toml +++ b/gen/kgsearch1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-kgsearch1-cli" -version = "1.0.4+20151215" +version = "1.0.4+20170109" authors = ["Sebastian Thiel "] description = "A complete library to interact with kgsearch (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/kgsearch1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-kgsearch1] path = "../kgsearch1" -version = "1.0.4+20151215" +version = "1.0.4+20170109" diff --git a/gen/kgsearch1-cli/README.md b/gen/kgsearch1-cli/README.md index 6dd504b2a2..ce9a067495 100644 --- a/gen/kgsearch1-cli/README.md +++ b/gen/kgsearch1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *kgsearch* API at revision *20151215*. The CLI is at version *1.0.4*. +This documentation was generated from the *kgsearch* API at revision *20170109*. The CLI is at version *1.0.4*. ```bash kgsearch1 [options] diff --git a/gen/kgsearch1-cli/mkdocs.yml b/gen/kgsearch1-cli/mkdocs.yml index d767c43ad4..3cb93e2fe7 100644 --- a/gen/kgsearch1-cli/mkdocs.yml +++ b/gen/kgsearch1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: kgsearch v1.0.4+20151215 +site_name: kgsearch v1.0.4+20170109 site_url: http://byron.github.io/google-apis-rs/google-kgsearch1-cli site_description: A complete library to interact with kgsearch (protocol v1) diff --git a/gen/kgsearch1-cli/src/main.rs b/gen/kgsearch1-cli/src/main.rs index e6861b4564..ab43ec4dd7 100644 --- a/gen/kgsearch1-cli/src/main.rs +++ b/gen/kgsearch1-cli/src/main.rs @@ -221,7 +221,9 @@ fn main() { let arg_data = [ ("entities", "methods: 'search'", vec![ ("search", - Some(r##"Searches Knowledge Graph for entities that match the constraints. A list of matched entities will be returned in response, which will be in JSON-LD format and compatible with http://schema.org"##), + Some(r##"Searches Knowledge Graph for entities that match the constraints. + A list of matched entities will be returned in response, which will be in + JSON-LD format and compatible with http://schema.org"##), "Details at http://byron.github.io/google-apis-rs/google_kgsearch1_cli/entities_search", vec![ (Some(r##"v"##), @@ -242,8 +244,8 @@ fn main() { let mut app = App::new("kgsearch1") .author("Sebastian Thiel ") - .version("1.0.4+20151215") - .about("Knowledge Graph Search API allows developers to search the Google Knowledge Graph for entities.") + .version("1.0.4+20170109") + .about("Searches the Google Knowledge Graph for entities.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_kgsearch1_cli") .arg(Arg::with_name("folder") .long("config-dir") diff --git a/gen/kgsearch1/Cargo.toml b/gen/kgsearch1/Cargo.toml index dbbb602bbd..b4ae8338d2 100644 --- a/gen/kgsearch1/Cargo.toml +++ b/gen/kgsearch1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-kgsearch1" -version = "1.0.4+20151215" +version = "1.0.4+20170109" authors = ["Sebastian Thiel "] description = "A complete library to interact with kgsearch (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/kgsearch1" homepage = "https://developers.google.com/knowledge-graph/" -documentation = "https://docs.rs/google-kgsearch1/1.0.4+20151215" +documentation = "https://docs.rs/google-kgsearch1/1.0.4+20170109" license = "MIT" keywords = ["kgsearch", "google", "protocol", "web", "api"] diff --git a/gen/kgsearch1/README.md b/gen/kgsearch1/README.md index 052de2a863..aa66cf4b12 100644 --- a/gen/kgsearch1/README.md +++ b/gen/kgsearch1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-kgsearch1` library allows access to all features of the *Google kgsearch* service. -This documentation was generated from *kgsearch* crate version *1.0.4+20151215*, where *20151215* is the exact revision of the *kgsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *kgsearch* crate version *1.0.4+20170109*, where *20170109* is the exact revision of the *kgsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *kgsearch* *v1* API can be found at the [official documentation site](https://developers.google.com/knowledge-graph/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/struct.Kgsearch.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/struct.Kgsearch.html) ... * entities - * [*search*](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/struct.EntitySearchCall.html) + * [*search*](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/struct.EntitySearchCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/struct.Kgsearch.html)** +* **[Hub](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/struct.Kgsearch.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.Part.html)** + * **[Parts](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -122,17 +122,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.Delegate.html), 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-kgsearch1/1.0.4+20151215/google_kgsearch1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.ResponseResult.html), 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")`. @@ -142,29 +142,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.CallBuilder.html) 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-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.CallBuilder.html), 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-kgsearch1/1.0.4+20151215/google_kgsearch1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-kgsearch1/1.0.4+20170109/google_kgsearch1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/kgsearch1/src/lib.rs b/gen/kgsearch1/src/lib.rs index 64fdc964fd..31f90e2d30 100644 --- a/gen/kgsearch1/src/lib.rs +++ b/gen/kgsearch1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *kgsearch* crate version *1.0.4+20151215*, where *20151215* is the exact revision of the *kgsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *kgsearch* crate version *1.0.4+20170109*, where *20170109* is the exact revision of the *kgsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *kgsearch* *v1* API can be found at the //! [official documentation site](https://developers.google.com/knowledge-graph/). @@ -321,7 +321,8 @@ impl<'a, C, A> Kgsearch // ############ // SCHEMAS ### // ########## -/// Response message includes the context and a list of matching results which contain the detail of associated entities. +/// Response message includes the context and a list of matching results +/// which contain the detail of associated entities. /// /// # Activities /// @@ -332,14 +333,14 @@ impl<'a, C, A> Kgsearch /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SearchResponse { - /// The schema type of top-level JSON-LD object, e.g. ItemList. - #[serde(rename="type")] - pub type_: Option, + /// The local context applicable for the response. See more details at + /// http://www.w3.org/TR/json-ld/#context-definitions. + pub @context: Option, /// The item list of search results. #[serde(rename="itemListElement")] pub item_list_element: Option>, - /// The local context applicable for the response. See more details at http://www.w3.org/TR/json-ld/#context-definitions. - pub context: Option, + /// The schema type of top-level JSON-LD object, e.g. ItemList. + pub @type: Option, } impl ResponseResult for SearchResponse {} @@ -390,7 +391,9 @@ impl<'a, C, A> EntityMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Searches Knowledge Graph for entities that match the constraints. A list of matched entities will be returned in response, which will be in JSON-LD format and compatible with http://schema.org + /// Searches Knowledge Graph for entities that match the constraints. + /// A list of matched entities will be returned in response, which will be in + /// JSON-LD format and compatible with http://schema.org pub fn search(&self) -> EntitySearchCall<'a, C, A> { EntitySearchCall { hub: self.hub, @@ -415,7 +418,9 @@ impl<'a, C, A> EntityMethods<'a, C, A> { // CallBuilders ### // ################# -/// Searches Knowledge Graph for entities that match the constraints. A list of matched entities will be returned in response, which will be in JSON-LD format and compatible with http://schema.org +/// Searches Knowledge Graph for entities that match the constraints. +/// A list of matched entities will be returned in response, which will be in +/// JSON-LD format and compatible with http://schema.org /// /// A builder for the *search* method supported by a *entity* resource. /// It is not used directly, but through a `EntityMethods` instance. @@ -600,7 +605,9 @@ impl<'a, C, A> EntitySearchCall<'a, C, A> where C: BorrowMut, A: } - /// Restricts returned entities with these types, e.g. Person (as defined in http://schema.org/Person). + /// Restricts returned entities with these types, e.g. Person + /// (as defined in http://schema.org/Person). If multiple types are specified, + /// returned entities will contain one or more of these types. /// /// Append the given value to the *types* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -629,7 +636,8 @@ impl<'a, C, A> EntitySearchCall<'a, C, A> where C: BorrowMut, A: self._limit = Some(new_value); self } - /// The list of language codes (defined in ISO 693) to run the query with, e.g. 'en'. + /// The list of language codes (defined in ISO 693) to run the query with, + /// e.g. 'en'. /// /// Append the given value to the *languages* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -645,6 +653,8 @@ impl<'a, C, A> EntitySearchCall<'a, C, A> where C: BorrowMut, A: self } /// The list of entity id to be used for search instead of query string. + /// To specify multiple ids in the HTTP request, repeat the parameter in the + /// URL as in ...?ids=A&ids=B /// /// Append the given value to the *ids* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -677,12 +687,12 @@ impl<'a, C, A> EntitySearchCall<'a, C, A> where C: BorrowMut, A: /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> EntitySearchCall<'a, C, A> diff --git a/gen/licensing1-cli/Cargo.toml b/gen/licensing1-cli/Cargo.toml index 51ed084225..f513274530 100644 --- a/gen/licensing1-cli/Cargo.toml +++ b/gen/licensing1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-licensing1-cli" -version = "1.0.4+20150901" +version = "1.0.4+20170213" authors = ["Sebastian Thiel "] description = "A complete library to interact with licensing (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/licensing1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-licensing1] path = "../licensing1" -version = "1.0.4+20150901" +version = "1.0.4+20170213" diff --git a/gen/licensing1-cli/README.md b/gen/licensing1-cli/README.md index cf3a32a836..264c213264 100644 --- a/gen/licensing1-cli/README.md +++ b/gen/licensing1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *licensing* API at revision *20150901*. The CLI is at version *1.0.4*. +This documentation was generated from the *licensing* API at revision *20170213*. The CLI is at version *1.0.4*. ```bash licensing1 [options] diff --git a/gen/licensing1-cli/mkdocs.yml b/gen/licensing1-cli/mkdocs.yml index 6e07f92737..ac30a9f02d 100644 --- a/gen/licensing1-cli/mkdocs.yml +++ b/gen/licensing1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: licensing v1.0.4+20150901 +site_name: licensing v1.0.4+20170213 site_url: http://byron.github.io/google-apis-rs/google-licensing1-cli site_description: A complete library to interact with licensing (protocol v1) diff --git a/gen/licensing1-cli/src/main.rs b/gen/licensing1-cli/src/main.rs index 296ebbf2b3..c00bd3a304 100644 --- a/gen/licensing1-cli/src/main.rs +++ b/gen/licensing1-cli/src/main.rs @@ -371,11 +371,13 @@ impl<'n> Engine<'n> { "sku-id" => Some(("skuId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-id" => Some(("userId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "product-name" => Some(("productName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "sku-name" => Some(("skuName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "etags" => Some(("etags", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["etags", "kind", "product-id", "self-link", "sku-id", "user-id"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["etags", "kind", "product-id", "product-name", "self-link", "sku-id", "sku-name", "user-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -461,11 +463,13 @@ impl<'n> Engine<'n> { "sku-id" => Some(("skuId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-id" => Some(("userId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "product-name" => Some(("productName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "sku-name" => Some(("skuName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "etags" => Some(("etags", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["etags", "kind", "product-id", "self-link", "sku-id", "user-id"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["etags", "kind", "product-id", "product-name", "self-link", "sku-id", "sku-name", "user-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -886,8 +890,8 @@ fn main() { let mut app = App::new("licensing1") .author("Sebastian Thiel ") - .version("1.0.4+20150901") - .about("Licensing API to view and manage license for your domain.") + .version("1.0.4+20170213") + .about("Views and manages licenses for your domain.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_licensing1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/licensing1/Cargo.toml b/gen/licensing1/Cargo.toml index efc8f75030..52438c08a3 100644 --- a/gen/licensing1/Cargo.toml +++ b/gen/licensing1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-licensing1" -version = "1.0.4+20150901" +version = "1.0.4+20170213" authors = ["Sebastian Thiel "] description = "A complete library to interact with licensing (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/licensing1" homepage = "https://developers.google.com/google-apps/licensing/" -documentation = "https://docs.rs/google-licensing1/1.0.4+20150901" +documentation = "https://docs.rs/google-licensing1/1.0.4+20170213" license = "MIT" keywords = ["licensing", "google", "protocol", "web", "api"] diff --git a/gen/licensing1/README.md b/gen/licensing1/README.md index 928d2fa9cd..314ee4c498 100644 --- a/gen/licensing1/README.md +++ b/gen/licensing1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-licensing1` library allows access to all features of the *Google licensing* service. -This documentation was generated from *licensing* crate version *1.0.4+20150901*, where *20150901* is the exact revision of the *licensing:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *licensing* crate version *1.0.4+20170213*, where *20170213* is the exact revision of the *licensing:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *licensing* *v1* API can be found at the [official documentation site](https://developers.google.com/google-apps/licensing/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.Licensing.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.Licensing.html) ... -* [license assignments](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.LicenseAssignment.html) - * [*delete*](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.LicenseAssignmentDeleteCall.html), [*get*](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.LicenseAssignmentGetCall.html), [*insert*](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.LicenseAssignmentInsertCall.html), [*list for product*](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.LicenseAssignmentListForProductCall.html), [*list for product and sku*](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.LicenseAssignmentListForProductAndSkuCall.html), [*patch*](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.LicenseAssignmentPatchCall.html) and [*update*](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.LicenseAssignmentUpdateCall.html) +* [license assignments](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.LicenseAssignment.html) + * [*delete*](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.LicenseAssignmentDeleteCall.html), [*get*](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.LicenseAssignmentGetCall.html), [*insert*](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.LicenseAssignmentInsertCall.html), [*list for product*](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.LicenseAssignmentListForProductCall.html), [*list for product and sku*](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.LicenseAssignmentListForProductAndSkuCall.html), [*patch*](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.LicenseAssignmentPatchCall.html) and [*update*](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.LicenseAssignmentUpdateCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/struct.Licensing.html)** +* **[Hub](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/struct.Licensing.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.Part.html)** + * **[Parts](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -123,17 +123,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.Delegate.html), 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-licensing1/1.0.4+20150901/google_licensing1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.ResponseResult.html), 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")`. @@ -143,29 +143,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.CallBuilder.html) 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-licensing1/1.0.4+20150901/google_licensing1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-licensing1/1.0.4+20150901/google_licensing1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.CallBuilder.html), 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-licensing1/1.0.4+20150901/google_licensing1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-licensing1/1.0.4+20170213/google_licensing1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/licensing1/src/lib.rs b/gen/licensing1/src/lib.rs index 81b3f6603b..8f39fc54ce 100644 --- a/gen/licensing1/src/lib.rs +++ b/gen/licensing1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *licensing* crate version *1.0.4+20150901*, where *20150901* is the exact revision of the *licensing:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *licensing* crate version *1.0.4+20170213*, where *20170213* is the exact revision of the *licensing:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *licensing* *v1* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/licensing/). @@ -223,7 +223,7 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { - /// View and manage Google Apps licenses for your domain + /// View and manage G Suite licenses for your domain AppLicensing, } @@ -356,20 +356,26 @@ impl<'a, C, A> Licensing /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LicenseAssignment { - /// Name of the sku of the product. + /// Id of the sku of the product. #[serde(rename="skuId")] pub sku_id: Option, /// Identifies the resource as a LicenseAssignment. pub kind: Option, - /// ETag of the resource. - pub etags: Option, /// Email id of the user. #[serde(rename="userId")] pub user_id: Option, + /// Display Name of the product. + #[serde(rename="productName")] + pub product_name: Option, + /// Display Name of the sku of the product. + #[serde(rename="skuName")] + pub sku_name: Option, + /// ETag of the resource. + pub etags: Option, /// Link to this page. #[serde(rename="selfLink")] pub self_link: Option, - /// Name of the product. + /// Id of the product. #[serde(rename="productId")] pub product_id: Option, } diff --git a/gen/logging2-cli/Cargo.toml b/gen/logging2-cli/Cargo.toml index e0b9384992..a7ec0eee56 100644 --- a/gen/logging2-cli/Cargo.toml +++ b/gen/logging2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-logging2-cli" -version = "1.0.4+20161206" +version = "1.0.4+20170516" authors = ["Sebastian Thiel "] description = "A complete library to interact with Logging (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/logging2-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-logging2] path = "../logging2" -version = "1.0.4+20161206" +version = "1.0.4+20170516" diff --git a/gen/logging2-cli/README.md b/gen/logging2-cli/README.md index c2e4dd6eb2..e07c7cbc31 100644 --- a/gen/logging2-cli/README.md +++ b/gen/logging2-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Logging* API at revision *20161206*. The CLI is at version *1.0.4*. +This documentation was generated from the *Logging* API at revision *20170516*. The CLI is at version *1.0.4*. ```bash logging2 [options] diff --git a/gen/logging2-cli/mkdocs.yml b/gen/logging2-cli/mkdocs.yml index d93b6222c6..dfcc98d2b8 100644 --- a/gen/logging2-cli/mkdocs.yml +++ b/gen/logging2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Logging v1.0.4+20161206 +site_name: Logging v1.0.4+20170516 site_url: http://byron.github.io/google-apis-rs/google-logging2-cli site_description: A complete library to interact with Logging (protocol v2) diff --git a/gen/logging2-cli/src/main.rs b/gen/logging2-cli/src/main.rs index 09005e3a4e..7f0a5e9b3d 100644 --- a/gen/logging2-cli/src/main.rs +++ b/gen/logging2-cli/src/main.rs @@ -187,8 +187,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -445,8 +446,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -830,8 +832,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1088,8 +1091,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1353,8 +1357,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1611,8 +1616,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1812,8 +1818,8 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["description", "filter", "name", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -2063,8 +2069,8 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["description", "filter", "name", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -2156,8 +2162,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2414,8 +2421,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2728,7 +2736,7 @@ fn main() { let arg_data = [ ("billing-accounts", "methods: 'logs-delete', 'logs-list', 'sinks-create', 'sinks-delete', 'sinks-get', 'sinks-list' and 'sinks-update'", vec![ ("logs-delete", - Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries."##), + Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_cli/billing-accounts_logs-delete", vec![ (Some(r##"log-name"##), @@ -2736,6 +2744,8 @@ fn main() { Some(r##"Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry."##), Some(true), Some(false)), @@ -2753,7 +2763,7 @@ fn main() { Some(false)), ]), ("logs-list", - Some(r##"Lists the logs in projects or organizations. Only logs that have entries are listed."##), + Some(r##"Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_cli/billing-accounts_logs-list", vec![ (Some(r##"parent"##), @@ -2761,6 +2771,8 @@ fn main() { Some(r##"Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" "##), Some(true), Some(false)), @@ -2786,6 +2798,8 @@ fn main() { Some(r##"Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: "projects/my-logging-project", "organizations/123456789"."##), Some(true), Some(false)), @@ -2817,7 +2831,9 @@ fn main() { Some(r##"Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist."##), + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" + Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -2839,9 +2855,11 @@ fn main() { vec![ (Some(r##"sink-name"##), None, - Some(r##"Required. The parent resource name of the sink: + Some(r##"Required. The resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -2864,7 +2882,12 @@ fn main() { vec![ (Some(r##"parent"##), None, - Some(r##"Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789"."##), + Some(r##"Required. The parent resource whose sinks are to be listed: + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + "##), Some(true), Some(false)), @@ -2889,6 +2912,8 @@ fn main() { Some(r##"Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -2937,7 +2962,7 @@ fn main() { Some(false)), ]), ("write", - Some(r##"Writes log entries to Stackdriver Logging. All log entries are written by this method."##), + Some(r##"Writes log entries to Stackdriver Logging."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_cli/entries_write", vec![ (Some(r##"kv"##), @@ -2962,7 +2987,7 @@ fn main() { ("folders", "methods: 'logs-delete', 'logs-list', 'sinks-create', 'sinks-delete', 'sinks-get', 'sinks-list' and 'sinks-update'", vec![ ("logs-delete", - Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries."##), + Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_cli/folders_logs-delete", vec![ (Some(r##"log-name"##), @@ -2970,6 +2995,8 @@ fn main() { Some(r##"Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry."##), Some(true), Some(false)), @@ -2987,7 +3014,7 @@ fn main() { Some(false)), ]), ("logs-list", - Some(r##"Lists the logs in projects or organizations. Only logs that have entries are listed."##), + Some(r##"Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_cli/folders_logs-list", vec![ (Some(r##"parent"##), @@ -2995,6 +3022,8 @@ fn main() { Some(r##"Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" "##), Some(true), Some(false)), @@ -3020,6 +3049,8 @@ fn main() { Some(r##"Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: "projects/my-logging-project", "organizations/123456789"."##), Some(true), Some(false)), @@ -3051,7 +3082,9 @@ fn main() { Some(r##"Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist."##), + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" + Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -3073,9 +3106,11 @@ fn main() { vec![ (Some(r##"sink-name"##), None, - Some(r##"Required. The parent resource name of the sink: + Some(r##"Required. The resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -3098,7 +3133,12 @@ fn main() { vec![ (Some(r##"parent"##), None, - Some(r##"Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789"."##), + Some(r##"Required. The parent resource whose sinks are to be listed: + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + "##), Some(true), Some(false)), @@ -3123,6 +3163,8 @@ fn main() { Some(r##"Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -3168,7 +3210,7 @@ fn main() { ("organizations", "methods: 'logs-delete', 'logs-list', 'sinks-create', 'sinks-delete', 'sinks-get', 'sinks-list' and 'sinks-update'", vec![ ("logs-delete", - Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries."##), + Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_cli/organizations_logs-delete", vec![ (Some(r##"log-name"##), @@ -3176,6 +3218,8 @@ fn main() { Some(r##"Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry."##), Some(true), Some(false)), @@ -3193,7 +3237,7 @@ fn main() { Some(false)), ]), ("logs-list", - Some(r##"Lists the logs in projects or organizations. Only logs that have entries are listed."##), + Some(r##"Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_cli/organizations_logs-list", vec![ (Some(r##"parent"##), @@ -3201,6 +3245,8 @@ fn main() { Some(r##"Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" "##), Some(true), Some(false)), @@ -3226,6 +3272,8 @@ fn main() { Some(r##"Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: "projects/my-logging-project", "organizations/123456789"."##), Some(true), Some(false)), @@ -3257,7 +3305,9 @@ fn main() { Some(r##"Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist."##), + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" + Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -3279,9 +3329,11 @@ fn main() { vec![ (Some(r##"sink-name"##), None, - Some(r##"Required. The parent resource name of the sink: + Some(r##"Required. The resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -3304,7 +3356,12 @@ fn main() { vec![ (Some(r##"parent"##), None, - Some(r##"Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789"."##), + Some(r##"Required. The parent resource whose sinks are to be listed: + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + "##), Some(true), Some(false)), @@ -3329,6 +3386,8 @@ fn main() { Some(r##"Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -3355,7 +3414,7 @@ fn main() { ("projects", "methods: 'logs-delete', 'logs-list', 'metrics-create', 'metrics-delete', 'metrics-get', 'metrics-list', 'metrics-update', 'sinks-create', 'sinks-delete', 'sinks-get', 'sinks-list' and 'sinks-update'", vec![ ("logs-delete", - Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries."##), + Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_cli/projects_logs-delete", vec![ (Some(r##"log-name"##), @@ -3363,6 +3422,8 @@ fn main() { Some(r##"Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry."##), Some(true), Some(false)), @@ -3380,7 +3441,7 @@ fn main() { Some(false)), ]), ("logs-list", - Some(r##"Lists the logs in projects or organizations. Only logs that have entries are listed."##), + Some(r##"Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_cli/projects_logs-list", vec![ (Some(r##"parent"##), @@ -3388,6 +3449,8 @@ fn main() { Some(r##"Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" "##), Some(true), Some(false)), @@ -3545,6 +3608,8 @@ fn main() { Some(r##"Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: "projects/my-logging-project", "organizations/123456789"."##), Some(true), Some(false)), @@ -3576,7 +3641,9 @@ fn main() { Some(r##"Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist."##), + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" + Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -3598,9 +3665,11 @@ fn main() { vec![ (Some(r##"sink-name"##), None, - Some(r##"Required. The parent resource name of the sink: + Some(r##"Required. The resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -3623,7 +3692,12 @@ fn main() { vec![ (Some(r##"parent"##), None, - Some(r##"Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789"."##), + Some(r##"Required. The parent resource whose sinks are to be listed: + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + "##), Some(true), Some(false)), @@ -3648,6 +3722,8 @@ fn main() { Some(r##"Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -3676,7 +3752,7 @@ fn main() { let mut app = App::new("logging2") .author("Sebastian Thiel ") - .version("1.0.4+20161206") + .version("1.0.4+20170516") .about("Writes log entries and manages your Stackdriver Logging configuration.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_logging2_cli") .arg(Arg::with_name("url") diff --git a/gen/logging2/Cargo.toml b/gen/logging2/Cargo.toml index c2eb8ef5cb..bcb253dd01 100644 --- a/gen/logging2/Cargo.toml +++ b/gen/logging2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-logging2" -version = "1.0.4+20161206" +version = "1.0.4+20170516" authors = ["Sebastian Thiel "] description = "A complete library to interact with Logging (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/logging2" homepage = "https://cloud.google.com/logging/docs/" -documentation = "https://docs.rs/google-logging2/1.0.4+20161206" +documentation = "https://docs.rs/google-logging2/1.0.4+20170516" license = "MIT" keywords = ["logging", "google", "protocol", "web", "api"] diff --git a/gen/logging2/README.md b/gen/logging2/README.md index e3c0340356..117be83d9e 100644 --- a/gen/logging2/README.md +++ b/gen/logging2/README.md @@ -5,26 +5,26 @@ DO NOT EDIT ! --> The `google-logging2` library allows access to all features of the *Google Logging* service. -This documentation was generated from *Logging* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *logging:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Logging* crate version *1.0.4+20170516*, where *20170516* is the exact revision of the *logging:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Logging* *v2* API can be found at the [official documentation site](https://cloud.google.com/logging/docs/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.Logging.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.Logging.html) ... * billing accounts - * [*logs delete*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.BillingAccountLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.BillingAccountLogListCall.html), [*sinks create*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.BillingAccountSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.BillingAccountSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.BillingAccountSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.BillingAccountSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.BillingAccountSinkUpdateCall.html) + * [*logs delete*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.BillingAccountLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.BillingAccountLogListCall.html), [*sinks create*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.BillingAccountSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.BillingAccountSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.BillingAccountSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.BillingAccountSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.BillingAccountSinkUpdateCall.html) * entries - * [*list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.EntryListCall.html) and [*write*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.EntryWriteCall.html) + * [*list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.EntryListCall.html) and [*write*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.EntryWriteCall.html) * folders - * [*logs delete*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.FolderLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.FolderLogListCall.html), [*sinks create*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.FolderSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.FolderSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.FolderSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.FolderSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.FolderSinkUpdateCall.html) -* [monitored resource descriptors](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.MonitoredResourceDescriptor.html) - * [*list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.MonitoredResourceDescriptorListCall.html) + * [*logs delete*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.FolderLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.FolderLogListCall.html), [*sinks create*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.FolderSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.FolderSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.FolderSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.FolderSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.FolderSinkUpdateCall.html) +* [monitored resource descriptors](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.MonitoredResourceDescriptor.html) + * [*list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.MonitoredResourceDescriptorListCall.html) * organizations - * [*logs delete*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.OrganizationLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.OrganizationLogListCall.html), [*sinks create*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.OrganizationSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.OrganizationSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.OrganizationSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.OrganizationSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.OrganizationSinkUpdateCall.html) + * [*logs delete*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.OrganizationLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.OrganizationLogListCall.html), [*sinks create*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.OrganizationSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.OrganizationSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.OrganizationSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.OrganizationSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.OrganizationSinkUpdateCall.html) * projects - * [*logs delete*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectLogListCall.html), [*metrics create*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectMetricCreateCall.html), [*metrics delete*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectMetricDeleteCall.html), [*metrics get*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectMetricGetCall.html), [*metrics list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectMetricListCall.html), [*metrics update*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectMetricUpdateCall.html), [*sinks create*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.ProjectSinkUpdateCall.html) + * [*logs delete*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectLogListCall.html), [*metrics create*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectMetricCreateCall.html), [*metrics delete*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectMetricDeleteCall.html), [*metrics get*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectMetricGetCall.html), [*metrics list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectMetricListCall.html), [*metrics update*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectMetricUpdateCall.html), [*sinks create*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.ProjectSinkUpdateCall.html) @@ -33,17 +33,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/struct.Logging.html)** +* **[Hub](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/struct.Logging.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.Part.html)** + * **[Parts](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -143,17 +143,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.Delegate.html), 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-logging2/1.0.4+20161206/google_logging2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.ResponseResult.html), 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")`. @@ -163,29 +163,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.CallBuilder.html) 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-logging2/1.0.4+20161206/google_logging2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-logging2/1.0.4+20161206/google_logging2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.CallBuilder.html), 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-logging2/1.0.4+20161206/google_logging2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-logging2/1.0.4+20170516/google_logging2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/logging2/src/lib.rs b/gen/logging2/src/lib.rs index 35ce9b5e40..f0eb50a68e 100644 --- a/gen/logging2/src/lib.rs +++ b/gen/logging2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Logging* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *logging:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Logging* crate version *1.0.4+20170516*, where *20170516* is the exact revision of the *logging:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Logging* *v2* API can be found at the //! [official documentation site](https://cloud.google.com/logging/docs/). @@ -243,15 +243,15 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { + /// Administrate log data for your projects + Admin, + /// View log data for your projects Read, /// Submit log data for your projects Write, - /// Administrate log data for your projects - Admin, - /// View and manage your data across Google Cloud Platform services CloudPlatform, @@ -262,9 +262,9 @@ pub enum Scope { impl AsRef for Scope { fn as_ref(&self) -> &str { match *self { + Scope::Admin => "https://www.googleapis.com/auth/logging.admin", Scope::Read => "https://www.googleapis.com/auth/logging.read", Scope::Write => "https://www.googleapis.com/auth/logging.write", - Scope::Admin => "https://www.googleapis.com/auth/logging.admin", Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", Scope::CloudPlatformReadOnly => "https://www.googleapis.com/auth/cloud-platform.read-only", } @@ -489,9 +489,9 @@ impl ResponseResult for ListLogMetricsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MonitoredResource { - /// Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels "database_id" and "zone". + /// Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone". pub labels: Option>, - /// Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is "cloudsql_database". + /// Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. #[serde(rename="type")] pub type_: Option, } @@ -518,7 +518,7 @@ pub struct LogEntryOperation { impl Part for LogEntryOperation {} -/// Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project or organization. +/// Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder. /// /// # Activities /// @@ -540,30 +540,36 @@ impl Part for LogEntryOperation {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LogSink { - /// Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format: - /// logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - /// - pub filter: Option, + /// Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API. + #[serde(rename="outputVersionFormat")] + pub output_version_format: Option, + /// Required. The client-assigned sink identifier, unique within the project. Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods. + pub name: Option, /// Required. The export destination: /// "storage.googleapis.com/[GCS_BUCKET]" /// "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" /// "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" /// The sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks. pub destination: Option, - /// Required. The client-assigned sink identifier, unique within the project. Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods. - pub name: Option, + /// Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format: + /// logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + /// + pub filter: Option, /// Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated. #[serde(rename="startTime")] pub start_time: Option, - /// Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API. - #[serde(rename="outputVersionFormat")] - pub output_version_format: Option, - /// Output only. An IAM identity—a service account or group—under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity. - #[serde(rename="writerIdentity")] - pub writer_identity: Option, /// Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time. #[serde(rename="endTime")] pub end_time: Option, + /// Output only. An IAM identity—a service account or group—under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity. + #[serde(rename="writerIdentity")] + pub writer_identity: Option, + /// Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log name: + /// logName:("projects/test-project1/" OR "projects/test-project2/") AND + /// resource.type=gce_instance + /// + #[serde(rename="includeChildren")] + pub include_children: Option, } impl RequestValue for LogSink {} @@ -581,19 +587,21 @@ impl ResponseResult for LogSink {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListLogEntriesRequest { - /// Optional. How the results should be sorted. Presently, the only permitted values are "timestamp asc" (default) and "timestamp desc". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of LogEntry.insertId. + /// Optional. How the results should be sorted. Presently, the only permitted values are "timestamp asc" (default) and "timestamp desc". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values. #[serde(rename="orderBy")] pub order_by: Option, - /// Required. Names of one or more resources from which to retrieve log entries: + /// Required. Names of one or more parent resources from which to retrieve log entries: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Projects listed in the project_ids field are added to this list. #[serde(rename="resourceNames")] pub resource_names: Option>, - /// Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + /// Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available. #[serde(rename="pageSize")] pub page_size: Option, - /// Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + /// Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call. #[serde(rename="pageToken")] pub page_token: Option, /// Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: "my-project-1A". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names. @@ -758,10 +766,12 @@ pub struct WriteLogEntriesRequest { /// Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. #[serde(rename="logName")] pub log_name: Option, - /// Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, the response status will be the error associated with one of the failed entries and include error details in the form of WriteLogEntriesPartialErrors. + /// Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries' zero-based index in the entries.write method. #[serde(rename="partialSuccess")] pub partial_success: Option, /// Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry. @@ -772,7 +782,7 @@ pub struct WriteLogEntriesRequest { /// "zone": "us-central1-a", "instance_id": "00000000000000000000" }} /// See LogEntry. pub resource: Option, - /// Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are added to those log entries that do not provide their own values for the fields.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry. + /// Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are inserted into those log entries in this list that do not provide their own values.Stackdriver Logging also creates and inserts values for timestamp and insert_id if the entries do not provide them. The created insert_id for the N'th entry in this list will be greater than earlier entries and less than later entries. Otherwise, the order of log entries in this list does not matter.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry. pub entries: Option>, } @@ -808,12 +818,14 @@ pub struct LogEntry { pub http_request: Option, /// Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error. pub resource: Option, + /// Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT. + pub severity: Option, + /// Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 + pub trace: Option, /// The log entry payload, represented as a Unicode string (UTF-8). #[serde(rename="textPayload")] pub text_payload: Option, - /// Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 - pub trace: Option, - /// Optional. The time the event described by the log entry occurred. If omitted, Stackdriver Logging will use the time the log entry is received. + /// Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted. pub timestamp: Option, /// Optional. A set of user-defined (key, value) data that provides additional information about the log entry. pub labels: Option>, @@ -826,10 +838,15 @@ pub struct LogEntry { /// Required. The resource name of the log to which this log entry belongs: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded within log_name. Example: "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results. #[serde(rename="logName")] pub log_name: Option, - /// Optional. A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same project with the same ID as duplicates which can be removed. If omitted, Stackdriver Logging will generate a unique ID for this log entry. + /// Output only. The time the log entry was received by Stackdriver Logging. + #[serde(rename="receiveTimestamp")] + pub receive_timestamp: Option, + /// Optional. A unique identifier for the log entry. If you provide a value, then Stackdriver Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which can be removed. If omitted in new log entries, then Stackdriver Logging will insert its own unique identifier. The insert_id is used to order log entries that have the same timestamp value. #[serde(rename="insertId")] pub insert_id: Option, /// Optional. Information about an operation associated with the log entry, if applicable. @@ -837,8 +854,6 @@ pub struct LogEntry { /// Optional. Source code location information associated with the log entry, if any. #[serde(rename="sourceLocation")] pub source_location: Option, - /// Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT. - pub severity: Option, } impl Part for LogEntry {} @@ -852,8 +867,8 @@ impl Part for LogEntry {} /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [metrics create projects](struct.ProjectMetricCreateCall.html) (request|response) -/// * [metrics get projects](struct.ProjectMetricGetCall.html) (response) /// * [metrics update projects](struct.ProjectMetricUpdateCall.html) (request|response) +/// * [metrics get projects](struct.ProjectMetricGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LogMetric { @@ -863,10 +878,10 @@ pub struct LogMetric { pub filter: Option, /// Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed. pub version: Option, - /// Optional. A description of this metric, which is used in documentation. - pub description: Option, /// Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". pub name: Option, + /// Optional. A description of this metric, which is used in documentation. + pub description: Option, } impl RequestValue for LogMetric {} @@ -892,10 +907,10 @@ pub struct MonitoredResourceDescriptor { /// Required. The monitored resource type. For example, the type "cloudsql_database" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters. #[serde(rename="type")] pub type_: Option, - /// Optional. A detailed description of the monitored resource type that might be used in documentation. - pub description: Option, /// Optional. The resource name of the monitored resource descriptor: "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format "monitoredResourceDescriptors/{type}". pub name: Option, + /// Optional. A detailed description of the monitored resource type that might be used in documentation. + pub description: Option, } impl Resource for MonitoredResourceDescriptor {} @@ -950,7 +965,12 @@ impl<'a, C, A> FolderMethods<'a, C, A> { /// /// # Arguments /// - /// * `parent` - Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + /// * `parent` - Required. The parent resource whose sinks are to be listed: + /// "projects/[PROJECT_ID]" + /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" + /// pub fn sinks_list(&self, parent: &str) -> FolderSinkListCall<'a, C, A> { FolderSinkListCall { hub: self.hub, @@ -973,6 +993,8 @@ impl<'a, C, A> FolderMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to update, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_update(&self, request: LogSink, sink_name: &str) -> FolderSinkUpdateCall<'a, C, A> { FolderSinkUpdateCall { @@ -992,9 +1014,11 @@ impl<'a, C, A> FolderMethods<'a, C, A> { /// /// # Arguments /// - /// * `sinkName` - Required. The parent resource name of the sink: + /// * `sinkName` - Required. The resource name of the sink: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_get(&self, sink_name: &str) -> FolderSinkGetCall<'a, C, A> { FolderSinkGetCall { @@ -1016,6 +1040,8 @@ impl<'a, C, A> FolderMethods<'a, C, A> { /// * `parent` - Required. The resource in which to create the sink: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Examples: "projects/my-logging-project", "organizations/123456789". pub fn sinks_create(&self, request: LogSink, parent: &str) -> FolderSinkCreateCall<'a, C, A> { FolderSinkCreateCall { @@ -1038,7 +1064,9 @@ impl<'a, C, A> FolderMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - /// It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" + /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_delete(&self, sink_name: &str) -> FolderSinkDeleteCall<'a, C, A> { FolderSinkDeleteCall { hub: self.hub, @@ -1051,13 +1079,15 @@ impl<'a, C, A> FolderMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the logs in projects or organizations. Only logs that have entries are listed. + /// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// # Arguments /// /// * `parent` - Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// pub fn logs_list(&self, parent: &str) -> FolderLogListCall<'a, C, A> { FolderLogListCall { @@ -1073,13 +1103,15 @@ impl<'a, C, A> FolderMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes all the log entries in a log. The log reappears if it receives new entries. + /// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// # Arguments /// /// * `logName` - Required. The resource name of the log to delete: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. pub fn logs_delete(&self, log_name: &str) -> FolderLogDeleteCall<'a, C, A> { FolderLogDeleteCall { @@ -1134,13 +1166,15 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the logs in projects or organizations. Only logs that have entries are listed. + /// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// # Arguments /// /// * `parent` - Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// pub fn logs_list(&self, parent: &str) -> OrganizationLogListCall<'a, C, A> { OrganizationLogListCall { @@ -1156,13 +1190,15 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes all the log entries in a log. The log reappears if it receives new entries. + /// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// # Arguments /// /// * `logName` - Required. The resource name of the log to delete: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. pub fn logs_delete(&self, log_name: &str) -> OrganizationLogDeleteCall<'a, C, A> { OrganizationLogDeleteCall { @@ -1184,6 +1220,8 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to update, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_update(&self, request: LogSink, sink_name: &str) -> OrganizationSinkUpdateCall<'a, C, A> { OrganizationSinkUpdateCall { @@ -1203,9 +1241,11 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// /// # Arguments /// - /// * `sinkName` - Required. The parent resource name of the sink: + /// * `sinkName` - Required. The resource name of the sink: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_get(&self, sink_name: &str) -> OrganizationSinkGetCall<'a, C, A> { OrganizationSinkGetCall { @@ -1223,7 +1263,12 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// /// # Arguments /// - /// * `parent` - Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + /// * `parent` - Required. The parent resource whose sinks are to be listed: + /// "projects/[PROJECT_ID]" + /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" + /// pub fn sinks_list(&self, parent: &str) -> OrganizationSinkListCall<'a, C, A> { OrganizationSinkListCall { hub: self.hub, @@ -1245,7 +1290,9 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - /// It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" + /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_delete(&self, sink_name: &str) -> OrganizationSinkDeleteCall<'a, C, A> { OrganizationSinkDeleteCall { hub: self.hub, @@ -1266,6 +1313,8 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// * `parent` - Required. The resource in which to create the sink: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Examples: "projects/my-logging-project", "organizations/123456789". pub fn sinks_create(&self, request: LogSink, parent: &str) -> OrganizationSinkCreateCall<'a, C, A> { OrganizationSinkCreateCall { @@ -1322,7 +1371,7 @@ impl<'a, C, A> EntryMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Writes log entries to Stackdriver Logging. All log entries are written by this method. + /// Writes log entries to Stackdriver Logging. /// /// # Arguments /// @@ -1405,6 +1454,8 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// * `parent` - Required. The resource in which to create the sink: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Examples: "projects/my-logging-project", "organizations/123456789". pub fn sinks_create(&self, request: LogSink, parent: &str) -> BillingAccountSinkCreateCall<'a, C, A> { BillingAccountSinkCreateCall { @@ -1420,13 +1471,15 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the logs in projects or organizations. Only logs that have entries are listed. + /// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// # Arguments /// /// * `parent` - Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// pub fn logs_list(&self, parent: &str) -> BillingAccountLogListCall<'a, C, A> { BillingAccountLogListCall { @@ -1446,7 +1499,12 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// /// # Arguments /// - /// * `parent` - Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + /// * `parent` - Required. The parent resource whose sinks are to be listed: + /// "projects/[PROJECT_ID]" + /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" + /// pub fn sinks_list(&self, parent: &str) -> BillingAccountSinkListCall<'a, C, A> { BillingAccountSinkListCall { hub: self.hub, @@ -1468,7 +1526,9 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - /// It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" + /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_delete(&self, sink_name: &str) -> BillingAccountSinkDeleteCall<'a, C, A> { BillingAccountSinkDeleteCall { hub: self.hub, @@ -1485,9 +1545,11 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// /// # Arguments /// - /// * `sinkName` - Required. The parent resource name of the sink: + /// * `sinkName` - Required. The resource name of the sink: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_get(&self, sink_name: &str) -> BillingAccountSinkGetCall<'a, C, A> { BillingAccountSinkGetCall { @@ -1509,6 +1571,8 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to update, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_update(&self, request: LogSink, sink_name: &str) -> BillingAccountSinkUpdateCall<'a, C, A> { BillingAccountSinkUpdateCall { @@ -1524,13 +1588,15 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes all the log entries in a log. The log reappears if it receives new entries. + /// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// # Arguments /// /// * `logName` - Required. The resource name of the log to delete: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. pub fn logs_delete(&self, log_name: &str) -> BillingAccountLogDeleteCall<'a, C, A> { BillingAccountLogDeleteCall { @@ -1640,13 +1706,15 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes all the log entries in a log. The log reappears if it receives new entries. + /// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// # Arguments /// /// * `logName` - Required. The resource name of the log to delete: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. pub fn logs_delete(&self, log_name: &str) -> ProjectLogDeleteCall<'a, C, A> { ProjectLogDeleteCall { @@ -1679,13 +1747,15 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the logs in projects or organizations. Only logs that have entries are listed. + /// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// # Arguments /// /// * `parent` - Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// pub fn logs_list(&self, parent: &str) -> ProjectLogListCall<'a, C, A> { ProjectLogListCall { @@ -1751,6 +1821,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to update, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_update(&self, request: LogSink, sink_name: &str) -> ProjectSinkUpdateCall<'a, C, A> { ProjectSinkUpdateCall { @@ -1770,7 +1842,12 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `parent` - Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + /// * `parent` - Required. The parent resource whose sinks are to be listed: + /// "projects/[PROJECT_ID]" + /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" + /// pub fn sinks_list(&self, parent: &str) -> ProjectSinkListCall<'a, C, A> { ProjectSinkListCall { hub: self.hub, @@ -1789,9 +1866,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `sinkName` - Required. The parent resource name of the sink: + /// * `sinkName` - Required. The resource name of the sink: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_get(&self, sink_name: &str) -> ProjectSinkGetCall<'a, C, A> { ProjectSinkGetCall { @@ -1812,7 +1891,9 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - /// It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" + /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_delete(&self, sink_name: &str) -> ProjectSinkDeleteCall<'a, C, A> { ProjectSinkDeleteCall { hub: self.hub, @@ -1833,6 +1914,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// * `parent` - Required. The resource in which to create the sink: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Examples: "projects/my-logging-project", "organizations/123456789". pub fn sinks_create(&self, request: LogSink, parent: &str) -> ProjectSinkCreateCall<'a, C, A> { ProjectSinkCreateCall { @@ -2082,7 +2165,12 @@ impl<'a, C, A> FolderSinkListCall<'a, C, A> where C: BorrowMut, A } - /// Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + /// Required. The parent resource whose sinks are to be listed: + /// "projects/[PROJECT_ID]" + /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" + /// /// /// Sets the *parent* path property to the given value. /// @@ -2380,6 +2468,8 @@ impl<'a, C, A> FolderSinkUpdateCall<'a, C, A> where C: BorrowMut, /// Required. The full resource name of the sink to update, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". /// /// Sets the *sink name* path property to the given value. @@ -2392,8 +2482,8 @@ impl<'a, C, A> FolderSinkUpdateCall<'a, C, A> where C: BorrowMut, } /// Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: /// If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. - /// If the old value was false and the new value is true, then writer_identity is changed to a unique service account. - /// It is an error if the old value was true and the new value is false. + /// If the old value is false and the new value is true, then writer_identity is changed to a unique service account. + /// It is an error if the old value is true and the new value is false. /// /// Sets the *unique writer identity* query property to the given value. pub fn unique_writer_identity(mut self, new_value: bool) -> FolderSinkUpdateCall<'a, C, A> { @@ -2635,9 +2725,11 @@ impl<'a, C, A> FolderSinkGetCall<'a, C, A> where C: BorrowMut, A: } - /// Required. The parent resource name of the sink: + /// Required. The resource name of the sink: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". /// /// Sets the *sink name* path property to the given value. @@ -2922,6 +3014,8 @@ impl<'a, C, A> FolderSinkCreateCall<'a, C, A> where C: BorrowMut, /// Required. The resource in which to create the sink: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Examples: "projects/my-logging-project", "organizations/123456789". /// /// Sets the *parent* path property to the given value. @@ -2932,7 +3026,7 @@ impl<'a, C, A> FolderSinkCreateCall<'a, C, A> where C: BorrowMut, self._parent = new_value.to_string(); self } - /// Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + /// Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. /// /// Sets the *unique writer identity* query property to the given value. pub fn unique_writer_identity(mut self, new_value: bool) -> FolderSinkCreateCall<'a, C, A> { @@ -3177,7 +3271,9 @@ impl<'a, C, A> FolderSinkDeleteCall<'a, C, A> where C: BorrowMut, /// Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - /// It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" + /// Example: "projects/my-project-id/sinks/my-sink-id". /// /// Sets the *sink name* path property to the given value. /// @@ -3245,7 +3341,7 @@ impl<'a, C, A> FolderSinkDeleteCall<'a, C, A> where C: BorrowMut, } -/// Lists the logs in projects or organizations. Only logs that have entries are listed. +/// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// A builder for the *logs.list* method supported by a *folder* resource. /// It is not used directly, but through a `FolderMethods` instance. @@ -3435,6 +3531,8 @@ impl<'a, C, A> FolderLogListCall<'a, C, A> where C: BorrowMut, A: /// Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// /// /// Sets the *parent* path property to the given value. @@ -3517,7 +3615,7 @@ impl<'a, C, A> FolderLogListCall<'a, C, A> where C: BorrowMut, A: } -/// Deletes all the log entries in a log. The log reappears if it receives new entries. +/// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// A builder for the *logs.delete* method supported by a *folder* resource. /// It is not used directly, but through a `FolderMethods` instance. @@ -3697,6 +3795,8 @@ impl<'a, C, A> FolderLogDeleteCall<'a, C, A> where C: BorrowMut, /// Required. The resource name of the log to delete: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. /// /// Sets the *log name* path property to the given value. @@ -3765,7 +3865,7 @@ impl<'a, C, A> FolderLogDeleteCall<'a, C, A> where C: BorrowMut, } -/// Lists the logs in projects or organizations. Only logs that have entries are listed. +/// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// A builder for the *logs.list* method supported by a *organization* resource. /// It is not used directly, but through a `OrganizationMethods` instance. @@ -3955,6 +4055,8 @@ impl<'a, C, A> OrganizationLogListCall<'a, C, A> where C: BorrowMut OrganizationLogListCall<'a, C, A> where C: BorrowMut OrganizationLogDeleteCall<'a, C, A> where C: BorrowMut OrganizationSinkUpdateCall<'a, C, A> where C: BorrowMut OrganizationSinkUpdateCall<'a, C, A> where C: BorrowMut OrganizationSinkUpdateCall<'a, C, A> { @@ -4756,9 +4862,11 @@ impl<'a, C, A> OrganizationSinkGetCall<'a, C, A> where C: BorrowMut OrganizationSinkListCall<'a, C, A> where C: BorrowMut OrganizationSinkDeleteCall<'a, C, A> where C: BorrowMut OrganizationSinkCreateCall<'a, C, A> where C: BorrowMut OrganizationSinkCreateCall<'a, C, A> where C: BorrowMut OrganizationSinkCreateCall<'a, C, A> { @@ -5635,7 +5752,7 @@ impl<'a, C, A> OrganizationSinkCreateCall<'a, C, A> where C: BorrowMut BillingAccountSinkCreateCall<'a, C, A> where C: BorrowMut BillingAccountSinkCreateCall<'a, C, A> where C: BorrowMut BillingAccountSinkCreateCall<'a, C, A> { @@ -6404,7 +6523,7 @@ impl<'a, C, A> BillingAccountSinkCreateCall<'a, C, A> where C: BorrowMut BillingAccountLogListCall<'a, C, A> where C: BorrowMut BillingAccountSinkListCall<'a, C, A> where C: BorrowMut BillingAccountSinkDeleteCall<'a, C, A> where C: BorrowMut BillingAccountSinkGetCall<'a, C, A> where C: BorrowMut BillingAccountSinkUpdateCall<'a, C, A> where C: BorrowMut BillingAccountSinkUpdateCall<'a, C, A> where C: BorrowMut BillingAccountSinkUpdateCall<'a, C, A> { @@ -7735,7 +7867,7 @@ impl<'a, C, A> BillingAccountSinkUpdateCall<'a, C, A> where C: BorrowMut BillingAccountLogDeleteCall<'a, C, A> where C: BorrowMut MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< } -/// Deletes all the log entries in a log. The log reappears if it receives new entries. +/// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// A builder for the *logs.delete* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -8395,6 +8529,8 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, /// Required. The resource name of the log to delete: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. /// /// Sets the *log name* path property to the given value. @@ -8710,7 +8846,7 @@ impl<'a, C, A> ProjectMetricGetCall<'a, C, A> where C: BorrowMut, } -/// Lists the logs in projects or organizations. Only logs that have entries are listed. +/// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// A builder for the *logs.list* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -8900,6 +9036,8 @@ impl<'a, C, A> ProjectLogListCall<'a, C, A> where C: BorrowMut, A /// Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// /// /// Sets the *parent* path property to the given value. @@ -9747,6 +9885,8 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut /// Required. The full resource name of the sink to update, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". /// /// Sets the *sink name* path property to the given value. @@ -9759,8 +9899,8 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut } /// Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: /// If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. - /// If the old value was false and the new value is true, then writer_identity is changed to a unique service account. - /// It is an error if the old value was true and the new value is false. + /// If the old value is false and the new value is true, then writer_identity is changed to a unique service account. + /// It is an error if the old value is true and the new value is false. /// /// Sets the *unique writer identity* query property to the given value. pub fn unique_writer_identity(mut self, new_value: bool) -> ProjectSinkUpdateCall<'a, C, A> { @@ -10012,7 +10152,12 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, } - /// Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + /// Required. The parent resource whose sinks are to be listed: + /// "projects/[PROJECT_ID]" + /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" + /// /// /// Sets the *parent* path property to the given value. /// @@ -10271,9 +10416,11 @@ impl<'a, C, A> ProjectSinkGetCall<'a, C, A> where C: BorrowMut, A } - /// Required. The parent resource name of the sink: + /// Required. The resource name of the sink: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". /// /// Sets the *sink name* path property to the given value. @@ -10522,7 +10669,9 @@ impl<'a, C, A> ProjectSinkDeleteCall<'a, C, A> where C: BorrowMut /// Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - /// It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" + /// Example: "projects/my-project-id/sinks/my-sink-id". /// /// Sets the *sink name* path property to the given value. /// @@ -10806,6 +10955,8 @@ impl<'a, C, A> ProjectSinkCreateCall<'a, C, A> where C: BorrowMut /// Required. The resource in which to create the sink: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Examples: "projects/my-logging-project", "organizations/123456789". /// /// Sets the *parent* path property to the given value. @@ -10816,7 +10967,7 @@ impl<'a, C, A> ProjectSinkCreateCall<'a, C, A> where C: BorrowMut self._parent = new_value.to_string(); self } - /// Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + /// Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. /// /// Sets the *unique writer identity* query property to the given value. pub fn unique_writer_identity(mut self, new_value: bool) -> ProjectSinkCreateCall<'a, C, A> { diff --git a/gen/logging2_beta1-cli/Cargo.toml b/gen/logging2_beta1-cli/Cargo.toml index c55cfe673e..047e3fa7e4 100644 --- a/gen/logging2_beta1-cli/Cargo.toml +++ b/gen/logging2_beta1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-logging2_beta1-cli" -version = "1.0.4+20161206" +version = "1.0.4+20170516" authors = ["Sebastian Thiel "] description = "A complete library to interact with Logging (protocol v2beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/logging2_beta1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-logging2_beta1] path = "../logging2_beta1" -version = "1.0.4+20161206" +version = "1.0.4+20170516" diff --git a/gen/logging2_beta1-cli/README.md b/gen/logging2_beta1-cli/README.md index a1238b269b..600a4d323b 100644 --- a/gen/logging2_beta1-cli/README.md +++ b/gen/logging2_beta1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Logging* API at revision *20161206*. The CLI is at version *1.0.4*. +This documentation was generated from the *Logging* API at revision *20170516*. The CLI is at version *1.0.4*. ```bash logging2-beta1 [options] diff --git a/gen/logging2_beta1-cli/mkdocs.yml b/gen/logging2_beta1-cli/mkdocs.yml index 8fe783295c..00888598d6 100644 --- a/gen/logging2_beta1-cli/mkdocs.yml +++ b/gen/logging2_beta1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Logging v1.0.4+20161206 +site_name: Logging v1.0.4+20170516 site_url: http://byron.github.io/google-apis-rs/google-logging2_beta1-cli site_description: A complete library to interact with Logging (protocol v2beta1) diff --git a/gen/logging2_beta1-cli/src/main.rs b/gen/logging2_beta1-cli/src/main.rs index 6cb446866e..793d020619 100644 --- a/gen/logging2_beta1-cli/src/main.rs +++ b/gen/logging2_beta1-cli/src/main.rs @@ -642,8 +642,8 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["description", "filter", "name", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -893,8 +893,8 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "version" => Some(("version", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["description", "filter", "name", "version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -986,8 +986,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1244,8 +1245,9 @@ impl<'n> Engine<'n> { "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "output-version-format" => Some(("outputVersionFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writer-identity" => Some(("writerIdentity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "include-children" => Some(("includeChildren", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "name", "output-version-format", "start-time", "writer-identity"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["destination", "end-time", "filter", "include-children", "name", "output-version-format", "start-time", "writer-identity"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1499,7 +1501,7 @@ fn main() { let arg_data = [ ("billing-accounts", "methods: 'logs-delete' and 'logs-list'", vec![ ("logs-delete", - Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries."##), + Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_beta1_cli/billing-accounts_logs-delete", vec![ (Some(r##"log-name"##), @@ -1507,6 +1509,8 @@ fn main() { Some(r##"Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry."##), Some(true), Some(false)), @@ -1524,7 +1528,7 @@ fn main() { Some(false)), ]), ("logs-list", - Some(r##"Lists the logs in projects or organizations. Only logs that have entries are listed."##), + Some(r##"Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_beta1_cli/billing-accounts_logs-list", vec![ (Some(r##"parent"##), @@ -1532,6 +1536,8 @@ fn main() { Some(r##"Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" "##), Some(true), Some(false)), @@ -1574,7 +1580,7 @@ fn main() { Some(false)), ]), ("write", - Some(r##"Writes log entries to Stackdriver Logging. All log entries are written by this method."##), + Some(r##"Writes log entries to Stackdriver Logging."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_beta1_cli/entries_write", vec![ (Some(r##"kv"##), @@ -1618,7 +1624,7 @@ fn main() { ("organizations", "methods: 'logs-delete' and 'logs-list'", vec![ ("logs-delete", - Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries."##), + Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_beta1_cli/organizations_logs-delete", vec![ (Some(r##"log-name"##), @@ -1626,6 +1632,8 @@ fn main() { Some(r##"Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry."##), Some(true), Some(false)), @@ -1643,7 +1651,7 @@ fn main() { Some(false)), ]), ("logs-list", - Some(r##"Lists the logs in projects or organizations. Only logs that have entries are listed."##), + Some(r##"Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_beta1_cli/organizations_logs-list", vec![ (Some(r##"parent"##), @@ -1651,6 +1659,8 @@ fn main() { Some(r##"Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" "##), Some(true), Some(false)), @@ -1671,7 +1681,7 @@ fn main() { ("projects", "methods: 'logs-delete', 'logs-list', 'metrics-create', 'metrics-delete', 'metrics-get', 'metrics-list', 'metrics-update', 'sinks-create', 'sinks-delete', 'sinks-get', 'sinks-list' and 'sinks-update'", vec![ ("logs-delete", - Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries."##), + Some(r##"Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_beta1_cli/projects_logs-delete", vec![ (Some(r##"log-name"##), @@ -1679,6 +1689,8 @@ fn main() { Some(r##"Required. The resource name of the log to delete: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry."##), Some(true), Some(false)), @@ -1696,7 +1708,7 @@ fn main() { Some(false)), ]), ("logs-list", - Some(r##"Lists the logs in projects or organizations. Only logs that have entries are listed."##), + Some(r##"Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed."##), "Details at http://byron.github.io/google-apis-rs/google_logging2_beta1_cli/projects_logs-list", vec![ (Some(r##"parent"##), @@ -1704,6 +1716,8 @@ fn main() { Some(r##"Required. The resource name that owns the logs: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" "##), Some(true), Some(false)), @@ -1861,6 +1875,8 @@ fn main() { Some(r##"Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: "projects/my-logging-project", "organizations/123456789"."##), Some(true), Some(false)), @@ -1892,7 +1908,9 @@ fn main() { Some(r##"Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist."##), + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" + Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -1914,9 +1932,11 @@ fn main() { vec![ (Some(r##"sink-name"##), None, - Some(r##"Required. The parent resource name of the sink: + Some(r##"Required. The resource name of the sink: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -1939,7 +1959,12 @@ fn main() { vec![ (Some(r##"parent"##), None, - Some(r##"Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789"."##), + Some(r##"Required. The parent resource whose sinks are to be listed: + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + "##), Some(true), Some(false)), @@ -1964,6 +1989,8 @@ fn main() { Some(r##"Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id"."##), Some(true), Some(false)), @@ -1992,7 +2019,7 @@ fn main() { let mut app = App::new("logging2-beta1") .author("Sebastian Thiel ") - .version("1.0.4+20161206") + .version("1.0.4+20170516") .about("Writes log entries and manages your Stackdriver Logging configuration.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_logging2_beta1_cli") .arg(Arg::with_name("url") diff --git a/gen/logging2_beta1/Cargo.toml b/gen/logging2_beta1/Cargo.toml index 53c7fd5140..242e4286a1 100644 --- a/gen/logging2_beta1/Cargo.toml +++ b/gen/logging2_beta1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-logging2_beta1" -version = "1.0.4+20161206" +version = "1.0.4+20170516" authors = ["Sebastian Thiel "] description = "A complete library to interact with Logging (protocol v2beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/logging2_beta1" homepage = "https://cloud.google.com/logging/docs/" -documentation = "https://docs.rs/google-logging2_beta1/1.0.4+20161206" +documentation = "https://docs.rs/google-logging2_beta1/1.0.4+20170516" license = "MIT" keywords = ["logging", "google", "protocol", "web", "api"] diff --git a/gen/logging2_beta1/README.md b/gen/logging2_beta1/README.md index 31458fd6b8..e724a7924d 100644 --- a/gen/logging2_beta1/README.md +++ b/gen/logging2_beta1/README.md @@ -5,24 +5,24 @@ DO NOT EDIT ! --> The `google-logging2_beta1` library allows access to all features of the *Google Logging* service. -This documentation was generated from *Logging* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *logging:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Logging* crate version *1.0.4+20170516*, where *20170516* is the exact revision of the *logging:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Logging* *v2_beta1* API can be found at the [official documentation site](https://cloud.google.com/logging/docs/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.Logging.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.Logging.html) ... * billing accounts - * [*logs delete*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.BillingAccountLogDeleteCall.html) and [*logs list*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.BillingAccountLogListCall.html) + * [*logs delete*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.BillingAccountLogDeleteCall.html) and [*logs list*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.BillingAccountLogListCall.html) * entries - * [*list*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.EntryListCall.html) and [*write*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.EntryWriteCall.html) -* [monitored resource descriptors](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.MonitoredResourceDescriptor.html) - * [*list*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.MonitoredResourceDescriptorListCall.html) + * [*list*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.EntryListCall.html) and [*write*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.EntryWriteCall.html) +* [monitored resource descriptors](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.MonitoredResourceDescriptor.html) + * [*list*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.MonitoredResourceDescriptorListCall.html) * organizations - * [*logs delete*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.OrganizationLogDeleteCall.html) and [*logs list*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.OrganizationLogListCall.html) + * [*logs delete*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.OrganizationLogDeleteCall.html) and [*logs list*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.OrganizationLogListCall.html) * projects - * [*logs delete*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectLogListCall.html), [*metrics create*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectMetricCreateCall.html), [*metrics delete*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectMetricDeleteCall.html), [*metrics get*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectMetricGetCall.html), [*metrics list*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectMetricListCall.html), [*metrics update*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectMetricUpdateCall.html), [*sinks create*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.ProjectSinkUpdateCall.html) + * [*logs delete*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectLogDeleteCall.html), [*logs list*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectLogListCall.html), [*metrics create*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectMetricCreateCall.html), [*metrics delete*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectMetricDeleteCall.html), [*metrics get*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectMetricGetCall.html), [*metrics list*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectMetricListCall.html), [*metrics update*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectMetricUpdateCall.html), [*sinks create*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectSinkCreateCall.html), [*sinks delete*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectSinkDeleteCall.html), [*sinks get*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectSinkGetCall.html), [*sinks list*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectSinkListCall.html) and [*sinks update*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.ProjectSinkUpdateCall.html) @@ -31,17 +31,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/struct.Logging.html)** +* **[Hub](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/struct.Logging.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.Part.html)** + * **[Parts](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -127,17 +127,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.Delegate.html), 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-logging2_beta1/1.0.4+20161206/google_logging2_beta1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.ResponseResult.html), 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")`. @@ -147,29 +147,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.CallBuilder.html) 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-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.CallBuilder.html), 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-logging2_beta1/1.0.4+20161206/google_logging2_beta1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-logging2_beta1/1.0.4+20170516/google_logging2_beta1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/logging2_beta1/src/lib.rs b/gen/logging2_beta1/src/lib.rs index 62ac92dba9..3f1c13ba18 100644 --- a/gen/logging2_beta1/src/lib.rs +++ b/gen/logging2_beta1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Logging* crate version *1.0.4+20161206*, where *20161206* is the exact revision of the *logging:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Logging* crate version *1.0.4+20170516*, where *20170516* is the exact revision of the *logging:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Logging* *v2_beta1* API can be found at the //! [official documentation site](https://cloud.google.com/logging/docs/). @@ -227,15 +227,15 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { + /// Administrate log data for your projects + Admin, + /// View log data for your projects Read, /// Submit log data for your projects Write, - /// Administrate log data for your projects - Admin, - /// View and manage your data across Google Cloud Platform services CloudPlatform, @@ -246,9 +246,9 @@ pub enum Scope { impl AsRef for Scope { fn as_ref(&self) -> &str { match *self { + Scope::Admin => "https://www.googleapis.com/auth/logging.admin", Scope::Read => "https://www.googleapis.com/auth/logging.read", Scope::Write => "https://www.googleapis.com/auth/logging.write", - Scope::Admin => "https://www.googleapis.com/auth/logging.admin", Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", Scope::CloudPlatformReadOnly => "https://www.googleapis.com/auth/cloud-platform.read-only", } @@ -462,9 +462,9 @@ impl ResponseResult for ListLogMetricsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MonitoredResource { - /// Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels "database_id" and "zone". + /// Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone". pub labels: Option>, - /// Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is "cloudsql_database". + /// Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. #[serde(rename="type")] pub type_: Option, } @@ -491,7 +491,7 @@ pub struct LogEntryOperation { impl Part for LogEntryOperation {} -/// Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project or organization. +/// Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder. /// /// # Activities /// @@ -504,30 +504,36 @@ impl Part for LogEntryOperation {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LogSink { - /// Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format: - /// logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - /// - pub filter: Option, + /// Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API. + #[serde(rename="outputVersionFormat")] + pub output_version_format: Option, + /// Required. The client-assigned sink identifier, unique within the project. Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods. + pub name: Option, /// Required. The export destination: /// "storage.googleapis.com/[GCS_BUCKET]" /// "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" /// "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" /// The sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks. pub destination: Option, - /// Required. The client-assigned sink identifier, unique within the project. Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods. - pub name: Option, + /// Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. The filter must use the log entry format specified by the output_version_format parameter. For example, in the v2 format: + /// logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + /// + pub filter: Option, /// Optional. The time at which this sink will begin exporting log entries. Log entries are exported only if their timestamp is not earlier than the start time. The default value of this field is the time the sink is created or updated. #[serde(rename="startTime")] pub start_time: Option, - /// Optional. The log entry format to use for this sink's exported log entries. The v2 format is used by default. The v1 format is deprecated and should be used only as part of a migration effort to v2. See Migration to the v2 API. - #[serde(rename="outputVersionFormat")] - pub output_version_format: Option, - /// Output only. An IAM identity—a service account or group—under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity. - #[serde(rename="writerIdentity")] - pub writer_identity: Option, /// Optional. The time at which this sink will stop exporting log entries. Log entries are exported only if their timestamp is earlier than the end time. If this field is not supplied, there is no end time. If both a start time and an end time are provided, then the end time must be later than the start time. #[serde(rename="endTime")] pub end_time: Option, + /// Output only. An IAM identity—a service account or group—under which Stackdriver Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity. + #[serde(rename="writerIdentity")] + pub writer_identity: Option, + /// Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression. For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log name: + /// logName:("projects/test-project1/" OR "projects/test-project2/") AND + /// resource.type=gce_instance + /// + #[serde(rename="includeChildren")] + pub include_children: Option, } impl RequestValue for LogSink {} @@ -545,19 +551,21 @@ impl ResponseResult for LogSink {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListLogEntriesRequest { - /// Optional. How the results should be sorted. Presently, the only permitted values are "timestamp asc" (default) and "timestamp desc". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of LogEntry.insertId. + /// Optional. How the results should be sorted. Presently, the only permitted values are "timestamp asc" (default) and "timestamp desc". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values. #[serde(rename="orderBy")] pub order_by: Option, - /// Required. Names of one or more resources from which to retrieve log entries: + /// Required. Names of one or more parent resources from which to retrieve log entries: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Projects listed in the project_ids field are added to this list. #[serde(rename="resourceNames")] pub resource_names: Option>, - /// Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + /// Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of next_page_token in the response indicates that more results might be available. #[serde(rename="pageSize")] pub page_size: Option, - /// Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + /// Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call. #[serde(rename="pageToken")] pub page_token: Option, /// Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: "my-project-1A". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names. @@ -715,10 +723,12 @@ pub struct WriteLogEntriesRequest { /// Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. #[serde(rename="logName")] pub log_name: Option, - /// Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, the response status will be the error associated with one of the failed entries and include error details in the form of WriteLogEntriesPartialErrors. + /// Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed by the entries' zero-based index in the entries.write method. #[serde(rename="partialSuccess")] pub partial_success: Option, /// Optional. Default labels that are added to the labels field of all log entries in entries. If a log entry already has a label with the same key as a label in this parameter, then the log entry's label is not changed. See LogEntry. @@ -729,7 +739,7 @@ pub struct WriteLogEntriesRequest { /// "zone": "us-central1-a", "instance_id": "00000000000000000000" }} /// See LogEntry. pub resource: Option, - /// Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are added to those log entries that do not provide their own values for the fields.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry. + /// Required. The log entries to write. Values supplied for the fields log_name, resource, and labels in this entries.write request are inserted into those log entries in this list that do not provide their own values.Stackdriver Logging also creates and inserts values for timestamp and insert_id if the entries do not provide them. The created insert_id for the N'th entry in this list will be greater than earlier entries and less than later entries. Otherwise, the order of log entries in this list does not matter.To improve throughput and to avoid exceeding the quota limit for calls to entries.write, you should write multiple log entries at once rather than calling this method for each individual log entry. pub entries: Option>, } @@ -765,15 +775,18 @@ pub struct LogEntry { pub http_request: Option, /// Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error. pub resource: Option, + /// Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT. + pub severity: Option, /// The log entry payload, represented as a Unicode string (UTF-8). #[serde(rename="textPayload")] pub text_payload: Option, - /// Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 - pub trace: Option, - /// Optional. The time the event described by the log entry occurred. If omitted, Stackdriver Logging will use the time the log entry is received. + /// Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted. pub timestamp: Option, /// Optional. A set of user-defined (key, value) data that provides additional information about the log entry. pub labels: Option>, + /// Optional. A unique identifier for the log entry. If you provide a value, then Stackdriver Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which can be removed. If omitted in new log entries, then Stackdriver Logging will insert its own unique identifier. The insert_id is used to order log entries that have the same timestamp value. + #[serde(rename="insertId")] + pub insert_id: Option, /// The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. #[serde(rename="protoPayload")] pub proto_payload: Option>, @@ -783,19 +796,21 @@ pub struct LogEntry { /// Required. The resource name of the log to which this log entry belongs: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded within log_name. Example: "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results. #[serde(rename="logName")] pub log_name: Option, - /// Optional. A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same project with the same ID as duplicates which can be removed. If omitted, Stackdriver Logging will generate a unique ID for this log entry. - #[serde(rename="insertId")] - pub insert_id: Option, + /// Output only. The time the log entry was received by Stackdriver Logging. + #[serde(rename="receiveTimestamp")] + pub receive_timestamp: Option, + /// Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 + pub trace: Option, /// Optional. Information about an operation associated with the log entry, if applicable. pub operation: Option, /// Optional. Source code location information associated with the log entry, if any. #[serde(rename="sourceLocation")] pub source_location: Option, - /// Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT. - pub severity: Option, } impl Part for LogEntry {} @@ -809,8 +824,8 @@ impl Part for LogEntry {} /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [metrics create projects](struct.ProjectMetricCreateCall.html) (request|response) -/// * [metrics get projects](struct.ProjectMetricGetCall.html) (response) /// * [metrics update projects](struct.ProjectMetricUpdateCall.html) (request|response) +/// * [metrics get projects](struct.ProjectMetricGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LogMetric { @@ -820,10 +835,10 @@ pub struct LogMetric { pub filter: Option, /// Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed. pub version: Option, - /// Optional. A description of this metric, which is used in documentation. - pub description: Option, /// Required. The client-assigned metric identifier. Examples: "error_count", "nginx/requests".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". pub name: Option, + /// Optional. A description of this metric, which is used in documentation. + pub description: Option, } impl RequestValue for LogMetric {} @@ -841,18 +856,18 @@ impl ResponseResult for LogMetric {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MonitoredResourceDescriptor { - /// Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, "Google Cloud SQL Database". - #[serde(rename="displayName")] - pub display_name: Option, - /// Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels "database_id" and "zone". - pub labels: Option>, /// Required. The monitored resource type. For example, the type "cloudsql_database" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters. #[serde(rename="type")] pub type_: Option, - /// Optional. A detailed description of the monitored resource type that might be used in documentation. - pub description: Option, + /// Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels "database_id" and "zone". + pub labels: Option>, + /// Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, "Google Cloud SQL Database". + #[serde(rename="displayName")] + pub display_name: Option, /// Optional. The resource name of the monitored resource descriptor: "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format "monitoredResourceDescriptors/{type}". pub name: Option, + /// Optional. A detailed description of the monitored resource type that might be used in documentation. + pub description: Option, } impl Resource for MonitoredResourceDescriptor {} @@ -903,13 +918,15 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes all the log entries in a log. The log reappears if it receives new entries. + /// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// # Arguments /// /// * `logName` - Required. The resource name of the log to delete: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. pub fn logs_delete(&self, log_name: &str) -> OrganizationLogDeleteCall<'a, C, A> { OrganizationLogDeleteCall { @@ -923,13 +940,15 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the logs in projects or organizations. Only logs that have entries are listed. + /// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// # Arguments /// /// * `parent` - Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// pub fn logs_list(&self, parent: &str) -> OrganizationLogListCall<'a, C, A> { OrganizationLogListCall { @@ -986,13 +1005,15 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes all the log entries in a log. The log reappears if it receives new entries. + /// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// # Arguments /// /// * `logName` - Required. The resource name of the log to delete: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. pub fn logs_delete(&self, log_name: &str) -> BillingAccountLogDeleteCall<'a, C, A> { BillingAccountLogDeleteCall { @@ -1006,13 +1027,15 @@ impl<'a, C, A> BillingAccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the logs in projects or organizations. Only logs that have entries are listed. + /// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// # Arguments /// /// * `parent` - Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// pub fn logs_list(&self, parent: &str) -> BillingAccountLogListCall<'a, C, A> { BillingAccountLogListCall { @@ -1122,13 +1145,59 @@ impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} impl<'a, C, A> ProjectMethods<'a, C, A> { + /// Create a builder to help you perform the following task: + /// + /// Gets a logs-based metric. + /// + /// # Arguments + /// + /// * `metricName` - The resource name of the desired metric: + /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + /// + pub fn metrics_get(&self, metric_name: &str) -> ProjectMetricGetCall<'a, C, A> { + ProjectMetricGetCall { + hub: self.hub, + _metric_name: metric_name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. + /// + /// # Arguments + /// + /// * `logName` - Required. The resource name of the log to delete: + /// "projects/[PROJECT_ID]/logs/[LOG_ID]" + /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" + /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. + pub fn logs_delete(&self, log_name: &str) -> ProjectLogDeleteCall<'a, C, A> { + ProjectLogDeleteCall { + hub: self.hub, + _log_name: log_name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Lists sinks. /// /// # Arguments /// - /// * `parent` - Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + /// * `parent` - Required. The parent resource whose sinks are to be listed: + /// "projects/[PROJECT_ID]" + /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" + /// pub fn sinks_list(&self, parent: &str) -> ProjectSinkListCall<'a, C, A> { ProjectSinkListCall { hub: self.hub, @@ -1141,35 +1210,17 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Deletes all the log entries in a log. The log reappears if it receives new entries. - /// - /// # Arguments - /// - /// * `logName` - Required. The resource name of the log to delete: - /// "projects/[PROJECT_ID]/logs/[LOG_ID]" - /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. - pub fn logs_delete(&self, log_name: &str) -> ProjectLogDeleteCall<'a, C, A> { - ProjectLogDeleteCall { - hub: self.hub, - _log_name: log_name.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Gets a sink. /// /// # Arguments /// - /// * `sinkName` - Required. The parent resource name of the sink: + /// * `sinkName` - Required. The resource name of the sink: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_get(&self, sink_name: &str) -> ProjectSinkGetCall<'a, C, A> { ProjectSinkGetCall { @@ -1202,25 +1253,6 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Gets a logs-based metric. - /// - /// # Arguments - /// - /// * `metricName` - The resource name of the desired metric: - /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - /// - pub fn metrics_get(&self, metric_name: &str) -> ProjectMetricGetCall<'a, C, A> { - ProjectMetricGetCall { - hub: self.hub, - _metric_name: metric_name.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field. @@ -1231,6 +1263,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to update, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_update(&self, request: LogSink, sink_name: &str) -> ProjectSinkUpdateCall<'a, C, A> { ProjectSinkUpdateCall { @@ -1246,13 +1280,15 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists the logs in projects or organizations. Only logs that have entries are listed. + /// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// # Arguments /// /// * `parent` - Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// pub fn logs_list(&self, parent: &str) -> ProjectLogListCall<'a, C, A> { ProjectLogListCall { @@ -1295,6 +1331,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// * `parent` - Required. The resource in which to create the sink: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Examples: "projects/my-logging-project", "organizations/123456789". pub fn sinks_create(&self, request: LogSink, parent: &str) -> ProjectSinkCreateCall<'a, C, A> { ProjectSinkCreateCall { @@ -1359,7 +1397,9 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// * `sinkName` - Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - /// It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" + /// Example: "projects/my-project-id/sinks/my-sink-id". pub fn sinks_delete(&self, sink_name: &str) -> ProjectSinkDeleteCall<'a, C, A> { ProjectSinkDeleteCall { hub: self.hub, @@ -1430,7 +1470,7 @@ impl<'a, C, A> EntryMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Writes log entries to Stackdriver Logging. All log entries are written by this method. + /// Writes log entries to Stackdriver Logging. /// /// # Arguments /// @@ -1454,7 +1494,7 @@ impl<'a, C, A> EntryMethods<'a, C, A> { // CallBuilders ### // ################# -/// Deletes all the log entries in a log. The log reappears if it receives new entries. +/// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// A builder for the *logs.delete* method supported by a *organization* resource. /// It is not used directly, but through a `OrganizationMethods` instance. @@ -1634,6 +1674,8 @@ impl<'a, C, A> OrganizationLogDeleteCall<'a, C, A> where C: BorrowMut OrganizationLogDeleteCall<'a, C, A> where C: BorrowMut OrganizationLogDeleteCall<'a, C, A> where C: BorrowMut OrganizationLogListCall<'a, C, A> where C: BorrowMut OrganizationLogListCall<'a, C, A> where C: BorrowMut OrganizationLogListCall<'a, C, A> where C: BorrowMut BillingAccountLogDeleteCall<'a, C, A> where C: BorrowMut BillingAccountLogDeleteCall<'a, C, A> where C: BorrowMut BillingAccountLogDeleteCall<'a, C, A> where C: BorrowMut BillingAccountLogListCall<'a, C, A> where C: BorrowMut BillingAccountLogListCall<'a, C, A> where C: BorrowMut MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -2726,9 +2774,9 @@ impl<'a, C, A> MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< } -/// Lists sinks. +/// Gets a logs-based metric. /// -/// A builder for the *sinks.list* method supported by a *project* resource. +/// A builder for the *metrics.get* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example @@ -2752,31 +2800,27 @@ impl<'a, C, A> MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< /// // 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.projects().sinks_list("parent") -/// .page_token("nonumy") -/// .page_size(-19) +/// let result = hub.projects().metrics_get("metricName") /// .doit(); /// # } /// ``` -pub struct ProjectSinkListCall<'a, C, A> +pub struct ProjectMetricGetCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Logging, - _parent: String, - _page_token: Option, - _page_size: Option, + _metric_name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectSinkListCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectMetricGetCall<'a, C, A> {} -impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectMetricGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ListSinksResponse)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, LogMetric)> { use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; @@ -2785,17 +2829,11 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "logging.projects.sinks.list", + dlg.begin(MethodInfo { id: "logging.projects.metrics.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("parent", self._parent.to_string())); - if let Some(value) = self._page_token { - params.push(("pageToken", value.to_string())); - } - if let Some(value) = self._page_size { - params.push(("pageSize", value.to_string())); - } - for &field in ["alt", "parent", "pageToken", "pageSize"].iter() { + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("metricName", self._metric_name.to_string())); + for &field in ["alt", "metricName"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2807,12 +2845,12 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+parent}/sinks".to_string(); + let mut url = "https://logging.googleapis.com/v2beta1/{+metricName}".to_string(); if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } - for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + for &(find_this, param_name) in [("{+metricName}", "metricName")].iter() { let mut replace_with = String::new(); for &(name, ref value) in params.iter() { if name == param_name { @@ -2827,7 +2865,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, } { let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["parent"].iter() { + for param_name in ["metricName"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -2913,28 +2951,16 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, } - /// Required. The parent resource whose sinks are to be listed. Examples: "projects/my-logging-project", "organizations/123456789". + /// The resource name of the desired metric: + /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + /// /// - /// Sets the *parent* path property to the given value. + /// Sets the *metric 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 parent(mut self, new_value: &str) -> ProjectSinkListCall<'a, C, A> { - self._parent = new_value.to_string(); - self - } - /// Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - /// - /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> ProjectSinkListCall<'a, C, A> { - self._page_token = Some(new_value.to_string()); - self - } - /// Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. - /// - /// Sets the *page size* query property to the given value. - pub fn page_size(mut self, new_value: i32) -> ProjectSinkListCall<'a, C, A> { - self._page_size = Some(new_value); + pub fn metric_name(mut self, new_value: &str) -> ProjectMetricGetCall<'a, C, A> { + self._metric_name = new_value.to_string(); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -2943,7 +2969,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, /// 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 Delegate) -> ProjectSinkListCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectMetricGetCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -2957,10 +2983,10 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -2970,7 +2996,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> ProjectSinkListCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectMetricGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -2987,7 +3013,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, /// 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: T) -> ProjectSinkListCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectMetricGetCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -2995,7 +3021,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, } -/// Deletes all the log entries in a log. The log reappears if it receives new entries. +/// Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. /// /// A builder for the *logs.delete* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -3175,6 +3201,8 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, /// Required. The resource name of the log to delete: /// "projects/[PROJECT_ID]/logs/[LOG_ID]" /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + /// "folders/[FOLDER_ID]/logs/[LOG_ID]" /// [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog", "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". For more information about log names, see LogEntry. /// /// Sets the *log name* path property to the given value. @@ -3205,10 +3233,10 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -3243,6 +3271,280 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, } +/// Lists sinks. +/// +/// A builder for the *sinks.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_logging2_beta1 as logging2_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use logging2_beta1::Logging; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Logging::new(hyper::Client::new(), 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.projects().sinks_list("parent") +/// .page_token("gubergren") +/// .page_size(-95) +/// .doit(); +/// # } +/// ``` +pub struct ProjectSinkListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Logging, + _parent: String, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectSinkListCall<'a, C, A> {} + +impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListSinksResponse)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "logging.projects.sinks.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("parent", self._parent.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "parent", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://logging.googleapis.com/v2beta1/{+parent}/sinks".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["parent"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Required. The parent resource whose sinks are to be listed: + /// "projects/[PROJECT_ID]" + /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" + /// + /// + /// 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) -> ProjectSinkListCall<'a, C, A> { + self._parent = new_value.to_string(); + self + } + /// Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectSinkListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectSinkListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> ProjectSinkListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectSinkListCall<'a, C, A> + 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 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: T) -> ProjectSinkListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Gets a sink. /// /// A builder for the *sinks.get* method supported by a *project* resource. @@ -3420,9 +3722,11 @@ impl<'a, C, A> ProjectSinkGetCall<'a, C, A> where C: BorrowMut, A } - /// Required. The parent resource name of the sink: + /// Required. The resource name of the sink: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". /// /// Sets the *sink name* path property to the given value. @@ -3453,10 +3757,10 @@ impl<'a, C, A> ProjectSinkGetCall<'a, C, A> where C: BorrowMut, A /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -3731,10 +4035,10 @@ impl<'a, C, A> ProjectMetricUpdateCall<'a, C, A> where C: BorrowMut ProjectMetricUpdateCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Logging::new(hyper::Client::new(), 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.projects().metrics_get("metricName") -/// .doit(); -/// # } -/// ``` -pub struct ProjectMetricGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Logging, - _metric_name: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ProjectMetricGetCall<'a, C, A> {} - -impl<'a, C, A> ProjectMetricGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, LogMetric)> { - use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "logging.projects.metrics.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("metricName", self._metric_name.to_string())); - for &field in ["alt", "metricName"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://logging.googleapis.com/v2beta1/{+metricName}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{+metricName}", "metricName")].iter() { - let mut replace_with = String::new(); - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = value.to_string(); - break; - } - } - if find_this.as_bytes()[1] == '+' as u8 { - replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); - } - url = url.replace(find_this, &replace_with); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["metricName"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The resource name of the desired metric: - /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - /// - /// - /// Sets the *metric 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 metric_name(mut self, new_value: &str) -> ProjectMetricGetCall<'a, C, A> { - self._metric_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. - /// - /// 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 Delegate) -> ProjectMetricGetCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> ProjectMetricGetCall<'a, C, A> - 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 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: T) -> ProjectMetricGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field. /// /// A builder for the *sinks.update* method supported by a *project* resource. @@ -4232,6 +4289,8 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut /// Required. The full resource name of the sink to update, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" /// Example: "projects/my-project-id/sinks/my-sink-id". /// /// Sets the *sink name* path property to the given value. @@ -4244,8 +4303,8 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut } /// Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: /// If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. - /// If the old value was false and the new value is true, then writer_identity is changed to a unique service account. - /// It is an error if the old value was true and the new value is false. + /// If the old value is false and the new value is true, then writer_identity is changed to a unique service account. + /// It is an error if the old value is true and the new value is false. /// /// Sets the *unique writer identity* query property to the given value. pub fn unique_writer_identity(mut self, new_value: bool) -> ProjectSinkUpdateCall<'a, C, A> { @@ -4272,10 +4331,10 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -4310,7 +4369,7 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut } -/// Lists the logs in projects or organizations. Only logs that have entries are listed. +/// Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. /// /// A builder for the *logs.list* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -4500,6 +4559,8 @@ impl<'a, C, A> ProjectLogListCall<'a, C, A> where C: BorrowMut, A /// Required. The resource name that owns the logs: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// /// /// Sets the *parent* path property to the given value. @@ -4544,10 +4605,10 @@ impl<'a, C, A> ProjectLogListCall<'a, C, A> where C: BorrowMut, A /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -4791,10 +4852,10 @@ impl<'a, C, A> ProjectMetricDeleteCall<'a, C, A> where C: BorrowMut ProjectSinkCreateCall<'a, C, A> where C: BorrowMut /// Required. The resource in which to create the sink: /// "projects/[PROJECT_ID]" /// "organizations/[ORGANIZATION_ID]" + /// "billingAccounts/[BILLING_ACCOUNT_ID]" + /// "folders/[FOLDER_ID]" /// Examples: "projects/my-logging-project", "organizations/123456789". /// /// Sets the *parent* path property to the given value. @@ -5055,7 +5118,7 @@ impl<'a, C, A> ProjectSinkCreateCall<'a, C, A> where C: BorrowMut self._parent = new_value.to_string(); self } - /// Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is cloud-logs@google.com, the same identity used before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + /// Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Stackdriver Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. /// /// Sets the *unique writer identity* query property to the given value. pub fn unique_writer_identity(mut self, new_value: bool) -> ProjectSinkCreateCall<'a, C, A> { @@ -5082,10 +5145,10 @@ impl<'a, C, A> ProjectSinkCreateCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -5360,10 +5423,10 @@ impl<'a, C, A> ProjectMetricCreateCall<'a, C, A> where C: BorrowMut ProjectMetricListCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -5849,7 +5912,9 @@ impl<'a, C, A> ProjectSinkDeleteCall<'a, C, A> where C: BorrowMut /// Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - /// It is an error if the sink does not exist. Example: "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does not exist. + /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" + /// Example: "projects/my-project-id/sinks/my-sink-id". /// /// Sets the *sink name* path property to the given value. /// @@ -5879,10 +5944,10 @@ impl<'a, C, A> ProjectSinkDeleteCall<'a, C, A> where C: BorrowMut /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -6118,10 +6183,10 @@ impl<'a, C, A> EntryListCall<'a, C, A> where C: BorrowMut, A: oau /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -6156,7 +6221,7 @@ impl<'a, C, A> EntryListCall<'a, C, A> where C: BorrowMut, A: oau } -/// Writes log entries to Stackdriver Logging. All log entries are written by this method. +/// Writes log entries to Stackdriver Logging. /// /// A builder for the *write* method supported by a *entry* resource. /// It is not used directly, but through a `EntryMethods` instance. @@ -6357,10 +6422,10 @@ impl<'a, C, A> EntryWriteCall<'a, C, A> where C: BorrowMut, A: oa /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. diff --git a/gen/manager1_beta2-cli/Cargo.toml b/gen/manager1_beta2-cli/Cargo.toml index 3a161152c4..15c78cd527 100644 --- a/gen/manager1_beta2-cli/Cargo.toml +++ b/gen/manager1_beta2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/manufacturers1-cli/Cargo.toml b/gen/manufacturers1-cli/Cargo.toml index a6bebf396b..57233a9553 100644 --- a/gen/manufacturers1-cli/Cargo.toml +++ b/gen/manufacturers1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-manufacturers1-cli" -version = "1.0.4+20161028" +version = "1.0.4+20170412" authors = ["Sebastian Thiel "] description = "A complete library to interact with Manufacturer Center (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/manufacturers1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-manufacturers1] path = "../manufacturers1" -version = "1.0.4+20161028" +version = "1.0.4+20170412" diff --git a/gen/manufacturers1-cli/README.md b/gen/manufacturers1-cli/README.md index f377e79247..8003a66d6b 100644 --- a/gen/manufacturers1-cli/README.md +++ b/gen/manufacturers1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Manufacturer Center* API at revision *20161028*. The CLI is at version *1.0.4*. +This documentation was generated from the *Manufacturer Center* API at revision *20170412*. The CLI is at version *1.0.4*. ```bash manufacturers1 [options] diff --git a/gen/manufacturers1-cli/mkdocs.yml b/gen/manufacturers1-cli/mkdocs.yml index 889549c0fa..342a96046b 100644 --- a/gen/manufacturers1-cli/mkdocs.yml +++ b/gen/manufacturers1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Manufacturer Center v1.0.4+20161028 +site_name: Manufacturer Center v1.0.4+20170412 site_url: http://byron.github.io/google-apis-rs/google-manufacturers1-cli site_description: A complete library to interact with Manufacturer Center (protocol v1) diff --git a/gen/manufacturers1-cli/src/main.rs b/gen/manufacturers1-cli/src/main.rs index 935bc2d963..fb263b3e70 100644 --- a/gen/manufacturers1-cli/src/main.rs +++ b/gen/manufacturers1-cli/src/main.rs @@ -333,7 +333,7 @@ fn main() { let mut app = App::new("manufacturers1") .author("Sebastian Thiel ") - .version("1.0.4+20161028") + .version("1.0.4+20170412") .about("Public API for managing Manufacturer Center related data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_manufacturers1_cli") .arg(Arg::with_name("url") diff --git a/gen/manufacturers1/Cargo.toml b/gen/manufacturers1/Cargo.toml index 67167a4556..63c48405b8 100644 --- a/gen/manufacturers1/Cargo.toml +++ b/gen/manufacturers1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-manufacturers1" -version = "1.0.4+20161028" +version = "1.0.4+20170412" authors = ["Sebastian Thiel "] description = "A complete library to interact with Manufacturer Center (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/manufacturers1" homepage = "https://developers.google.com/manufacturers/" -documentation = "https://docs.rs/google-manufacturers1/1.0.4+20161028" +documentation = "https://docs.rs/google-manufacturers1/1.0.4+20170412" license = "MIT" keywords = ["manufacturers", "google", "protocol", "web", "api"] diff --git a/gen/manufacturers1/README.md b/gen/manufacturers1/README.md index 49328e767d..3f9624f89b 100644 --- a/gen/manufacturers1/README.md +++ b/gen/manufacturers1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-manufacturers1` library allows access to all features of the *Google Manufacturer Center* service. -This documentation was generated from *Manufacturer Center* crate version *1.0.4+20161028*, where *20161028* is the exact revision of the *manufacturers:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Manufacturer Center* crate version *1.0.4+20170412*, where *20170412* is the exact revision of the *manufacturers:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Manufacturer Center* *v1* API can be found at the [official documentation site](https://developers.google.com/manufacturers/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/struct.ManufacturerCenter.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/struct.ManufacturerCenter.html) ... * accounts - * [*products get*](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/struct.AccountProductGetCall.html) and [*products list*](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/struct.AccountProductListCall.html) + * [*products get*](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/struct.AccountProductGetCall.html) and [*products list*](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/struct.AccountProductListCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/struct.ManufacturerCenter.html)** +* **[Hub](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/struct.ManufacturerCenter.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.Part.html)** + * **[Parts](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -115,17 +115,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.Delegate.html), 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-manufacturers1/1.0.4+20161028/google_manufacturers1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.ResponseResult.html), 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")`. @@ -135,29 +135,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.CallBuilder.html) 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-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.CallBuilder.html), 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-manufacturers1/1.0.4+20161028/google_manufacturers1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-manufacturers1/1.0.4+20170412/google_manufacturers1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/manufacturers1/src/lib.rs b/gen/manufacturers1/src/lib.rs index 096ac63632..b8d9e365c2 100644 --- a/gen/manufacturers1/src/lib.rs +++ b/gen/manufacturers1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Manufacturer Center* crate version *1.0.4+20161028*, where *20161028* is the exact revision of the *manufacturers:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Manufacturer Center* crate version *1.0.4+20170412*, where *20170412* is the exact revision of the *manufacturers:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Manufacturer Center* *v1* API can be found at the //! [official documentation site](https://developers.google.com/manufacturers/). @@ -329,46 +329,20 @@ impl<'a, C, A> ManufacturerCenter // ############ // SCHEMAS ### // ########## -/// Attributes of the product. For more information, see -/// https://support.google.com/manufacturers/answer/6124116. +/// The number of products in a single package. For more information, see +/// https://support.google.com/manufacturers/answer/6124116#count. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Attributes { - /// The name of the group of products related to the product. For more - /// information, see - /// https://support.google.com/manufacturers/answer/6124116#productline. - #[serde(rename="productLine")] - pub product_line: Option, - /// The title of the product. For more information, see - /// https://support.google.com/manufacturers/answer/6124116#title. - pub title: Option, - /// The Manufacturer Part Number (MPN) of the product. For more information, - /// see https://support.google.com/manufacturers/answer/6124116#mpn. - pub mpn: Option, - /// The brand name of the product. For more information, see - /// https://support.google.com/manufacturers/answer/6124116#brand. - pub brand: Option, - /// The canonical name of the product. For more information, see - /// https://support.google.com/manufacturers/answer/6124116#productname. - #[serde(rename="productName")] - pub product_name: Option, - /// The URL of the manufacturer's detail page of the product. For more - /// information, see - /// https://support.google.com/manufacturers/answer/6124116#productpage. - #[serde(rename="productPageUrl")] - pub product_page_url: Option, - /// The Global Trade Item Number (GTIN) of the product. For more information, - /// see https://support.google.com/manufacturers/answer/6124116#gtin. - pub gtin: Option>, - /// The manufacturer's category of the product. For more information, see - /// https://support.google.com/manufacturers/answer/6124116#producttype. - #[serde(rename="productType")] - pub product_type: Option>, +pub struct Count { + /// The numeric value of the number of products in a package. + pub value: Option, + /// The unit in which these products are counted. + pub unit: Option, } -impl Part for Attributes {} +impl Part for Count {} /// Product data. @@ -402,6 +376,18 @@ pub struct Product { /// @OutputOnly #[serde(rename="contentLanguage")] pub content_language: Option, + /// Name in the format `{target_country}:{content_language}:{product_id}`. + /// + /// `target_country` - The target country of the product as a CLDR territory + /// code (for example, US). + /// + /// `content_language` - The content language of the product as a two-letter + /// ISO 639-1 language code (for example, en). + /// + /// `product_id` - The ID of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#id. + /// @OutputOnly + pub name: Option, /// Attributes of the product provided manually via the Manufacturer Center UI. /// @OutputOnly #[serde(rename="manuallyProvidedAttributes")] @@ -417,52 +403,56 @@ pub struct Product { /// feeds. #[serde(rename="uploadedAttributes")] pub uploaded_attributes: Option, + /// A server-generated list of issues associated with the product. + /// @OutputOnly + pub issues: Option>, /// The ID of the product. For more information, see /// https://support.google.com/manufacturers/answer/6124116#id. /// @OutputOnly #[serde(rename="productId")] pub product_id: Option, - /// A server-generated list of issues associated with the product. - /// @OutputOnly - pub issues: Option>, - /// Name in the format `{target_country}:{content_language}:{product_id}`. - /// - /// `target_country` - The target country of the product as a CLDR territory - /// code (for example, US). - /// - /// `content_language` - The content language of the product as a two-letter - /// ISO 639-1 language code (for example, en). - /// - /// `product_id` - The ID of the product. For more information, see - /// https://support.google.com/manufacturers/answer/6124116#id. - /// @OutputOnly - pub name: Option, } impl ResponseResult for Product {} -/// Product issue. +/// The capacity of a product. For more information, see +/// https://support.google.com/manufacturers/answer/6124116#capacity. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Issue { - /// If present, the attribute that triggered the issue. For more information - /// about attributes, see - /// https://support.google.com/manufacturers/answer/6124116. - pub attribute: Option, - /// The server-generated type of the issue, for example, - /// “INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc. - #[serde(rename="type")] - pub type_: Option, - /// The severity of the issue. - pub severity: Option, - /// Description of the issue. - pub description: Option, +pub struct Capacity { + /// The numeric value of the capacity. + pub value: Option, + /// The unit of the capacity, i.e., MB, GB, or TB. + pub unit: Option, } -impl Part for Issue {} +impl Part for Capacity {} + + +/// An image. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Image { + /// The status of the image. + /// @OutputOnly + pub status: Option, + /// The URL of the image. For crawled images, this is the provided URL. For + /// uploaded images, this is a serving URL from Google if the image has been + /// processed successfully. + #[serde(rename="imageUrl")] + pub image_url: Option, + /// The type of the image, i.e., crawled or uploaded. + /// @OutputOnly + #[serde(rename="type")] + pub type_: Option, +} + +impl Part for Image {} /// There is no detailed description. @@ -486,6 +476,210 @@ pub struct ListProductsResponse { impl ResponseResult for ListProductsResponse {} +/// A feature description of the product. For more information, see +/// https://support.google.com/manufacturers/answer/6124116#featuredesc. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FeatureDescription { + /// A short description of the feature. + pub headline: Option, + /// A detailed description of the feature. + pub text: Option, + /// An optional image describing the feature. + pub image: Option, +} + +impl Part for FeatureDescription {} + + +/// A product detail of the product. For more information, see +/// https://support.google.com/manufacturers/answer/6124116#productdetail. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ProductDetail { + /// The name of the attribute. + #[serde(rename="attributeName")] + pub attribute_name: Option, + /// The value of the attribute. + #[serde(rename="attributeValue")] + pub attribute_value: Option, + /// A short section name that can be reused between multiple product details. + #[serde(rename="sectionName")] + pub section_name: Option, +} + +impl Part for ProductDetail {} + + +/// Attributes of the product. For more information, see +/// https://support.google.com/manufacturers/answer/6124116. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Attributes { + /// The name of the group of products related to the product. For more + /// information, see + /// https://support.google.com/manufacturers/answer/6124116#productline. + #[serde(rename="productLine")] + pub product_line: Option, + /// The color of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#color. + pub color: Option, + /// The release date of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#release. + #[serde(rename="releaseDate")] + pub release_date: Option, + /// The item group id of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#itemgroupid. + #[serde(rename="itemGroupId")] + pub item_group_id: Option, + /// The videos of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#video. + #[serde(rename="videoLink")] + pub video_link: Option>, + /// The flavor of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#flavor. + pub flavor: Option, + /// The scent of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#scent. + pub scent: Option, + /// The size of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#size. + pub size: Option, + /// The capacity of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#capacity. + pub capacity: Option, + /// The title of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#title. + pub title: Option, + /// The pattern of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#pattern. + pub pattern: Option, + /// The disclosure date of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#disclosure. + #[serde(rename="disclosureDate")] + pub disclosure_date: Option, + /// The theme of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#theme. + pub theme: Option, + /// The suggested retail price (MSRP) of the product. For more information, + /// see https://support.google.com/manufacturers/answer/6124116#price. + #[serde(rename="suggestedRetailPrice")] + pub suggested_retail_price: Option, + /// The material of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#material. + pub material: Option, + /// The description of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#description. + pub description: Option, + /// The format of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#format. + pub format: Option, + /// The Manufacturer Part Number (MPN) of the product. For more information, + /// see https://support.google.com/manufacturers/answer/6124116#mpn. + pub mpn: Option, + /// The brand name of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#brand. + pub brand: Option, + /// The details of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#productdetail. + #[serde(rename="productDetail")] + pub product_detail: Option>, + /// The canonical name of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#productname. + #[serde(rename="productName")] + pub product_name: Option, + /// The rich format description of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#featuredesc. + #[serde(rename="featureDescription")] + pub feature_description: Option>, + /// The size system of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#sizesystem. + #[serde(rename="sizeSystem")] + pub size_system: Option, + /// The size type of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#sizetype. + #[serde(rename="sizeType")] + pub size_type: Option, + /// The additional images of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#addlimage. + #[serde(rename="additionalImageLink")] + pub additional_image_link: Option>, + /// The count of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#count. + pub count: Option, + /// The target gender of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#gender. + pub gender: Option, + /// The URL of the detail page of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#productpage. + #[serde(rename="productPageUrl")] + pub product_page_url: Option, + /// The image of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#image. + #[serde(rename="imageLink")] + pub image_link: Option, + /// The category of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#producttype. + #[serde(rename="productType")] + pub product_type: Option>, + /// The Global Trade Item Number (GTIN) of the product. For more information, + /// see https://support.google.com/manufacturers/answer/6124116#gtin. + pub gtin: Option>, + /// The target age group of the product. For more information, see + /// https://support.google.com/manufacturers/answer/6124116#agegroup. + #[serde(rename="ageGroup")] + pub age_group: Option, +} + +impl Part for Attributes {} + + +/// Product issue. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Issue { + /// If present, the attribute that triggered the issue. For more information + /// about attributes, see + /// https://support.google.com/manufacturers/answer/6124116. + pub attribute: Option, + /// The server-generated type of the issue, for example, + /// “INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc. + #[serde(rename="type")] + pub type_: Option, + /// Description of the issue. + pub description: Option, + /// The severity of the issue. + pub severity: Option, + /// The timestamp when this issue appeared. + pub timestamp: Option, +} + +impl Part for Issue {} + + +/// A price. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Price { + /// The currency in which the price is denoted. + pub currency: Option, + /// The numeric value of the price. + pub amount: Option, +} + +impl Part for Price {} + + // ################### // MethodBuilders ### @@ -824,12 +1018,12 @@ impl<'a, C, A> AccountProductListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AccountProductListCall<'a, C, A> @@ -1093,12 +1287,12 @@ impl<'a, C, A> AccountProductGetCall<'a, C, A> where C: BorrowMut /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AccountProductGetCall<'a, C, A> diff --git a/gen/mirror1-cli/Cargo.toml b/gen/mirror1-cli/Cargo.toml index 334364a560..d709bfc3c6 100644 --- a/gen/mirror1-cli/Cargo.toml +++ b/gen/mirror1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-mirror1-cli" -version = "1.0.4+20160616" +version = "1.0.4+20170419" authors = ["Sebastian Thiel "] description = "A complete library to interact with mirror (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/mirror1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-mirror1] path = "../mirror1" -version = "1.0.4+20160616" +version = "1.0.4+20170419" diff --git a/gen/mirror1-cli/README.md b/gen/mirror1-cli/README.md index 5dc8621f26..07359067eb 100644 --- a/gen/mirror1-cli/README.md +++ b/gen/mirror1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *mirror* API at revision *20160616*. The CLI is at version *1.0.4*. +This documentation was generated from the *mirror* API at revision *20170419*. The CLI is at version *1.0.4*. ```bash mirror1 [options] diff --git a/gen/mirror1-cli/mkdocs.yml b/gen/mirror1-cli/mkdocs.yml index f16c452181..4568cb607f 100644 --- a/gen/mirror1-cli/mkdocs.yml +++ b/gen/mirror1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: mirror v1.0.4+20160616 +site_name: mirror v1.0.4+20170419 site_url: http://byron.github.io/google-apis-rs/google-mirror1-cli site_description: A complete library to interact with mirror (protocol v1) diff --git a/gen/mirror1-cli/src/main.rs b/gen/mirror1-cli/src/main.rs index b4bcdc072f..569606ed0b 100644 --- a/gen/mirror1-cli/src/main.rs +++ b/gen/mirror1-cli/src/main.rs @@ -2564,7 +2564,7 @@ fn main() { let mut app = App::new("mirror1") .author("Sebastian Thiel ") - .version("1.0.4+20160616") + .version("1.0.4+20170419") .about("Interacts with Glass users via the timeline.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_mirror1_cli") .arg(Arg::with_name("url") diff --git a/gen/mirror1/Cargo.toml b/gen/mirror1/Cargo.toml index e9da804e25..0acdf9a2e7 100644 --- a/gen/mirror1/Cargo.toml +++ b/gen/mirror1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-mirror1" -version = "1.0.4+20160616" +version = "1.0.4+20170419" authors = ["Sebastian Thiel "] description = "A complete library to interact with mirror (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/mirror1" homepage = "https://developers.google.com/glass" -documentation = "https://docs.rs/google-mirror1/1.0.4+20160616" +documentation = "https://docs.rs/google-mirror1/1.0.4+20170419" license = "MIT" keywords = ["mirror", "google", "protocol", "web", "api"] diff --git a/gen/mirror1/README.md b/gen/mirror1/README.md index 10473175a7..4d166047cf 100644 --- a/gen/mirror1/README.md +++ b/gen/mirror1/README.md @@ -5,37 +5,37 @@ DO NOT EDIT ! --> The `google-mirror1` library allows access to all features of the *Google mirror* service. -This documentation was generated from *mirror* crate version *1.0.4+20160616*, where *20160616* is the exact revision of the *mirror:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *mirror* crate version *1.0.4+20170419*, where *20170419* is the exact revision of the *mirror:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *mirror* *v1* API can be found at the [official documentation site](https://developers.google.com/glass). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.Mirror.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.Mirror.html) ... -* [accounts](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.Account.html) - * [*insert*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.AccountInsertCall.html) -* [contacts](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.Contact.html) - * [*delete*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.ContactDeleteCall.html), [*get*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.ContactGetCall.html), [*insert*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.ContactInsertCall.html), [*list*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.ContactListCall.html), [*patch*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.ContactPatchCall.html) and [*update*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.ContactUpdateCall.html) -* [locations](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.Location.html) - * [*get*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.LocationGetCall.html) and [*list*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.LocationListCall.html) -* [settings](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.Setting.html) - * [*get*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.SettingGetCall.html) -* [subscriptions](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.Subscription.html) - * [*delete*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.SubscriptionDeleteCall.html), [*insert*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.SubscriptionInsertCall.html), [*list*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.SubscriptionListCall.html) and [*update*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.SubscriptionUpdateCall.html) +* [accounts](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.Account.html) + * [*insert*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.AccountInsertCall.html) +* [contacts](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.Contact.html) + * [*delete*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.ContactDeleteCall.html), [*get*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.ContactGetCall.html), [*insert*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.ContactInsertCall.html), [*list*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.ContactListCall.html), [*patch*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.ContactPatchCall.html) and [*update*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.ContactUpdateCall.html) +* [locations](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.Location.html) + * [*get*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.LocationGetCall.html) and [*list*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.LocationListCall.html) +* [settings](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.Setting.html) + * [*get*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.SettingGetCall.html) +* [subscriptions](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.Subscription.html) + * [*delete*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.SubscriptionDeleteCall.html), [*insert*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.SubscriptionInsertCall.html), [*list*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.SubscriptionListCall.html) and [*update*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.SubscriptionUpdateCall.html) * timeline - * [*attachments delete*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineAttachmentDeleteCall.html), [*attachments get*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineAttachmentGetCall.html), [*attachments insert*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineAttachmentInsertCall.html), [*attachments list*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineAttachmentListCall.html), [*delete*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineDeleteCall.html), [*get*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineGetCall.html), [*insert*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineInsertCall.html), [*list*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineListCall.html), [*patch*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelinePatchCall.html) and [*update*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineUpdateCall.html) + * [*attachments delete*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineAttachmentDeleteCall.html), [*attachments get*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineAttachmentGetCall.html), [*attachments insert*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineAttachmentInsertCall.html), [*attachments list*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineAttachmentListCall.html), [*delete*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineDeleteCall.html), [*get*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineGetCall.html), [*insert*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineInsertCall.html), [*list*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineListCall.html), [*patch*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelinePatchCall.html) and [*update*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineUpdateCall.html) Upload supported by ... -* [*update timeline*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineUpdateCall.html) -* [*insert timeline*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineInsertCall.html) -* [*attachments insert timeline*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineAttachmentInsertCall.html) +* [*update timeline*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineUpdateCall.html) +* [*insert timeline*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineInsertCall.html) +* [*attachments insert timeline*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineAttachmentInsertCall.html) Download supported by ... -* [*attachments get timeline*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.TimelineAttachmentGetCall.html) +* [*attachments get timeline*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.TimelineAttachmentGetCall.html) @@ -43,17 +43,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/struct.Mirror.html)** +* **[Hub](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/struct.Mirror.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.Part.html)** + * **[Parts](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -146,17 +146,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.Delegate.html), 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-mirror1/1.0.4+20160616/google_mirror1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.ResponseResult.html), 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")`. @@ -166,29 +166,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.CallBuilder.html) 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-mirror1/1.0.4+20160616/google_mirror1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-mirror1/1.0.4+20160616/google_mirror1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.CallBuilder.html), 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-mirror1/1.0.4+20160616/google_mirror1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-mirror1/1.0.4+20170419/google_mirror1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/mirror1/src/lib.rs b/gen/mirror1/src/lib.rs index ca8c43d2de..f9785a597d 100644 --- a/gen/mirror1/src/lib.rs +++ b/gen/mirror1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *mirror* crate version *1.0.4+20160616*, where *20160616* is the exact revision of the *mirror:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *mirror* crate version *1.0.4+20170419*, where *20170419* is the exact revision of the *mirror:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *mirror* *v1* API can be found at the //! [official documentation site](https://developers.google.com/glass). diff --git a/gen/ml1_beta1-cli/Cargo.toml b/gen/ml1_beta1-cli/Cargo.toml index 73705dfe73..72f1b57201 100644 --- a/gen/ml1_beta1-cli/Cargo.toml +++ b/gen/ml1_beta1-cli/Cargo.toml @@ -4,9 +4,9 @@ [package] name = "google-ml1_beta1-cli" -version = "1.0.4+20161212" +version = "1.0.4+20170515" authors = ["Sebastian Thiel "] -description = "A complete library to interact with Cloud Machine Learning (protocol v1beta1)" +description = "A complete library to interact with Cloud Machine Learning Engine (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/ml1_beta1-cli" homepage = "https://cloud.google.com/ml/" documentation = "http://byron.github.io/google-apis-rs/google_ml1_beta1_cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-ml1_beta1] path = "../ml1_beta1" -version = "1.0.4+20161212" +version = "1.0.4+20170515" diff --git a/gen/ml1_beta1-cli/README.md b/gen/ml1_beta1-cli/README.md index 37821d3401..91af8e15e3 100644 --- a/gen/ml1_beta1-cli/README.md +++ b/gen/ml1_beta1-cli/README.md @@ -3,14 +3,14 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/cli/README.md.mako' DO NOT EDIT ! --> -The `ml1-beta1` command-line interface *(CLI)* allows to use most features of the *Google Cloud Machine Learning* service from the comfort of your terminal. +The `ml1-beta1` command-line interface *(CLI)* allows to use most features of the *Google Cloud Machine Learning Engine* 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 Machine Learning* API can be found at the +Everything else about the *Cloud Machine Learning Engine* API can be found at the [official documentation site](https://cloud.google.com/ml/). # Installation and Source Code @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Cloud Machine Learning* API at revision *20161212*. The CLI is at version *1.0.4*. +This documentation was generated from the *Cloud Machine Learning Engine* API at revision *20170515*. The CLI is at version *1.0.4*. ```bash ml1-beta1 [options] diff --git a/gen/ml1_beta1-cli/mkdocs.yml b/gen/ml1_beta1-cli/mkdocs.yml index 919de4156c..f19b088b8a 100644 --- a/gen/ml1_beta1-cli/mkdocs.yml +++ b/gen/ml1_beta1-cli/mkdocs.yml @@ -1,6 +1,6 @@ -site_name: Cloud Machine Learning v1.0.4+20161212 +site_name: Cloud Machine Learning Engine v1.0.4+20170515 site_url: http://byron.github.io/google-apis-rs/google-ml1_beta1-cli -site_description: A complete library to interact with Cloud Machine Learning (protocol v1beta1) +site_description: A complete library to interact with Cloud Machine Learning Engine (protocol v1beta1) repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/ml1_beta1-cli diff --git a/gen/ml1_beta1-cli/src/main.rs b/gen/ml1_beta1-cli/src/main.rs index de57576019..c75d6997d1 100644 --- a/gen/ml1_beta1-cli/src/main.rs +++ b/gen/ml1_beta1-cli/src/main.rs @@ -39,7 +39,7 @@ enum DoitError { struct Engine<'n> { opt: ArgMatches<'n>, - hub: api::CloudMachineLearning>, + hub: api::CloudMachineLearningEngine>, gp: Vec<&'static str>, gpm: Vec<(&'static str, &'static str)>, } @@ -205,39 +205,46 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "training-output.consumed-ml-units" => Some(("trainingOutput.consumedMlUnits", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "training-output.completed-trial-count" => Some(("trainingOutput.completedTrialCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "error-message" => Some(("errorMessage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "job-id" => Some(("jobId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "prediction-input.model-name" => Some(("predictionInput.modelName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "prediction-input.input-paths" => Some(("predictionInput.inputPaths", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "prediction-input.max-worker-count" => Some(("predictionInput.maxWorkerCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "prediction-input.output-path" => Some(("predictionInput.outputPath", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "prediction-input.data-format" => Some(("predictionInput.dataFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "prediction-input.version-name" => Some(("predictionInput.versionName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "prediction-input.region" => Some(("predictionInput.region", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "training-output.is-hyperparameter-tuning-job" => Some(("trainingOutput.isHyperparameterTuningJob", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "training-output.consumed-ml-units" => Some(("trainingOutput.consumedMLUnits", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "training-input.worker-type" => Some(("trainingInput.workerType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "training-input.runtime-version" => Some(("trainingInput.runtimeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "training-input.scale-tier" => Some(("trainingInput.scaleTier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "training-input.master-type" => Some(("trainingInput.masterType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "training-input.hyperparameters.max-trials" => Some(("trainingInput.hyperparameters.maxTrials", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "training-input.hyperparameters.hyperparameter-metric-tag" => Some(("trainingInput.hyperparameters.hyperparameterMetricTag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "training-input.hyperparameters.max-parallel-trials" => Some(("trainingInput.hyperparameters.maxParallelTrials", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "training-input.hyperparameters.goal" => Some(("trainingInput.hyperparameters.goal", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "training-input.region" => Some(("trainingInput.region", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "training-input.args" => Some(("trainingInput.args", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "training-input.python-module" => Some(("trainingInput.pythonModule", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "training-input.job-dir" => Some(("trainingInput.jobDir", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "training-input.package-uris" => Some(("trainingInput.packageUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "training-input.worker-count" => Some(("trainingInput.workerCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "training-input.parameter-server-type" => Some(("trainingInput.parameterServerType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "training-input.parameter-server-count" => Some(("trainingInput.parameterServerCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "prediction-input.model-name" => Some(("predictionInput.modelName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "prediction-input.runtime-version" => Some(("predictionInput.runtimeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "prediction-input.region" => Some(("predictionInput.region", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "prediction-input.max-worker-count" => Some(("predictionInput.maxWorkerCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "prediction-input.uri" => Some(("predictionInput.uri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "prediction-input.output-path" => Some(("predictionInput.outputPath", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "prediction-input.data-format" => Some(("predictionInput.dataFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "prediction-input.version-name" => Some(("predictionInput.versionName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "prediction-input.input-paths" => Some(("predictionInput.inputPaths", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "error-message" => Some(("errorMessage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "job-id" => Some(("jobId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "start-time" => Some(("startTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "end-time" => Some(("endTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "prediction-output.output-path" => Some(("predictionOutput.outputPath", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "prediction-output.node-hours" => Some(("predictionOutput.nodeHours", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "prediction-output.prediction-count" => Some(("predictionOutput.predictionCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "prediction-output.error-count" => Some(("predictionOutput.errorCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["args", "completed-trial-count", "consumed-ml-units", "create-time", "data-format", "end-time", "error-count", "error-message", "goal", "hyperparameters", "input-paths", "job-id", "master-type", "max-parallel-trials", "max-trials", "max-worker-count", "model-name", "output-path", "package-uris", "parameter-server-count", "parameter-server-type", "prediction-count", "prediction-input", "prediction-output", "python-module", "region", "scale-tier", "start-time", "state", "training-input", "training-output", "version-name", "worker-count", "worker-type"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["args", "completed-trial-count", "consumed-ml-units", "create-time", "data-format", "end-time", "error-count", "error-message", "goal", "hyperparameter-metric-tag", "hyperparameters", "input-paths", "is-hyperparameter-tuning-job", "job-dir", "job-id", "master-type", "max-parallel-trials", "max-trials", "max-worker-count", "model-name", "node-hours", "output-path", "package-uris", "parameter-server-count", "parameter-server-type", "prediction-count", "prediction-input", "prediction-output", "python-module", "region", "runtime-version", "scale-tier", "start-time", "state", "training-input", "training-output", "uri", "version-name", "worker-count", "worker-type"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -434,16 +441,20 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "regions" => Some(("regions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "default-version.description" => Some(("defaultVersion.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "default-version.runtime-version" => Some(("defaultVersion.runtimeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "default-version.manual-scaling.nodes" => Some(("defaultVersion.manualScaling.nodes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "default-version.last-use-time" => Some(("defaultVersion.lastUseTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-version.deployment-uri" => Some(("defaultVersion.deploymentUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-version.create-time" => Some(("defaultVersion.createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-version.is-default" => Some(("defaultVersion.isDefault", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "default-version.name" => Some(("defaultVersion.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "online-prediction-logging" => Some(("onlinePredictionLogging", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "default-version", "deployment-uri", "description", "is-default", "last-use-time", "name"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "default-version", "deployment-uri", "description", "is-default", "last-use-time", "manual-scaling", "name", "nodes", "online-prediction-logging", "regions", "runtime-version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -690,13 +701,15 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "runtime-version" => Some(("runtimeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "manual-scaling.nodes" => Some(("manualScaling.nodes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "last-use-time" => Some(("lastUseTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "deployment-uri" => Some(("deploymentUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "is-default" => Some(("isDefault", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "deployment-uri", "description", "is-default", "last-use-time", "name"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "deployment-uri", "description", "is-default", "last-use-time", "manual-scaling", "name", "nodes", "runtime-version"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1431,7 +1444,7 @@ impl<'n> Engine<'n> { }; let engine = Engine { opt: opt, - hub: api::CloudMachineLearning::new(client, auth), + hub: api::CloudMachineLearningEngine::new(client, auth), gp: vec!["$-xgafv", "access-token", "alt", "bearer-token", "callback", "fields", "key", "oauth-token", "pp", "pretty-print", "quota-user", "upload-type", "upload-protocol"], gpm: vec![ ("$-xgafv", "$.xgafv"), @@ -1604,7 +1617,7 @@ fn main() { You must add at least one version before you can request predictions from the model. Add versions by calling - [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)."##), + [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create)."##), "Details at http://byron.github.io/google-apis-rs/google_ml1_beta1_cli/projects_models-create", vec![ (Some(r##"parent"##), @@ -1638,7 +1651,7 @@ fn main() { You can only delete a model if there are no versions in it. You can delete versions by calling - [projects.models.versions.delete](/ml/reference/rest/v1beta1/projects.models.versions/delete)."##), + [projects.models.versions.delete](/ml-engine/reference/rest/v1beta1/projects.models.versions/delete)."##), "Details at http://byron.github.io/google-apis-rs/google_ml1_beta1_cli/projects_models-delete", vec![ (Some(r##"name"##), @@ -1722,7 +1735,7 @@ fn main() { model. When you add a version to a model that already has one or more versions, the default version does not automatically change. If you want a new version to be the default, you must call - [projects.models.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault)."##), + [projects.models.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault)."##), "Details at http://byron.github.io/google-apis-rs/google_ml1_beta1_cli/projects_models-versions-create", vec![ (Some(r##"parent"##), @@ -1765,7 +1778,7 @@ fn main() { None, Some(r##"Required. The name of the version. You can get the names of all the versions of a model by calling - [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list). + [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list). Authorization: requires `Editor` role on the parent project."##), Some(true), @@ -1787,7 +1800,7 @@ fn main() { Some(r##"Gets information about a model version. Models can have multiple versions. You can call - [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list) + [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list) to get the same information that this method returns for all of the versions of a model."##), "Details at http://byron.github.io/google-apis-rs/google_ml1_beta1_cli/projects_models-versions-get", @@ -1855,7 +1868,7 @@ fn main() { None, Some(r##"Required. The name of the version to make the default for the model. You can get the names of all the versions of a model by calling - [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list). + [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list). Authorization: requires `Editor` role on the parent project."##), Some(true), @@ -1988,51 +2001,7 @@ fn main() { ("predict", Some(r##"Performs prediction on the data in the request. - Responses are very similar to requests. There are two top-level fields, - each of which are JSON lists: - -
-
predictions
-
The list of predictions, one per instance in the request.
-
error
-
An error message returned instead of a prediction list if any - instance produced an error.
-
- - If the call is successful, the response body will contain one prediction - entry per instance in the request body. If prediction fails for any - instance, the response body will contain no predictions and will contian - a single error entry instead. - - Even though there is one prediction per instance, the format of a - prediction is not directly related to the format of an instance. - Predictions take whatever format is specified in the outputs collection - defined in the model. The collection of predictions is returned in a JSON - list. Each member of the list can be a simple value, a list, or a JSON - object of any complexity. If your model has more than one output tensor, - each prediction will be a JSON object containing a name/value pair for each - output. The names identify the output aliases in the graph. - - The following examples show some possible responses: - - A simple set of predictions for three input instances, where each - prediction is an integer value: -
-        {"predictions": [5, 4, 3]}
-        
- A more complex set of predictions, each containing two named values that - correspond to output tensors, named **label** and **scores** respectively. - The value of **label** is the predicted category ("car" or "beach") and - **scores** contains a list of probabilities for that instance across the - possible categories. -
-        {"predictions": [{"label": "beach", "scores": [0.1, 0.9]},
-                         {"label": "car", "scores": [0.75, 0.25]}]}
-        
- A response when there is an error processing an input instance: -
-        {"error": "Divide by zero"}
-        
"##), + **** REMOVE FROM GENERATED DOCUMENTATION"##), "Details at http://byron.github.io/google-apis-rs/google_ml1_beta1_cli/projects_predict", vec![ (Some(r##"name"##), @@ -2067,7 +2036,7 @@ fn main() { let mut app = App::new("ml1-beta1") .author("Sebastian Thiel ") - .version("1.0.4+20161212") + .version("1.0.4+20170515") .about("An API to enable creating and using machine learning models.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_ml1_beta1_cli") .arg(Arg::with_name("url") diff --git a/gen/ml1_beta1/Cargo.toml b/gen/ml1_beta1/Cargo.toml index c142f25a3f..0168293b31 100644 --- a/gen/ml1_beta1/Cargo.toml +++ b/gen/ml1_beta1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-ml1_beta1" -version = "1.0.4+20161212" +version = "1.0.4+20170515" authors = ["Sebastian Thiel "] -description = "A complete library to interact with Cloud Machine Learning (protocol v1beta1)" +description = "A complete library to interact with Cloud Machine Learning Engine (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/ml1_beta1" homepage = "https://cloud.google.com/ml/" -documentation = "https://docs.rs/google-ml1_beta1/1.0.4+20161212" +documentation = "https://docs.rs/google-ml1_beta1/1.0.4+20170515" license = "MIT" keywords = ["ml", "google", "protocol", "web", "api"] diff --git a/gen/ml1_beta1/README.md b/gen/ml1_beta1/README.md index 28434fb3c8..46d6c436b0 100644 --- a/gen/ml1_beta1/README.md +++ b/gen/ml1_beta1/README.md @@ -3,18 +3,18 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/api/README.md.mako' DO NOT EDIT ! --> -The `google-ml1_beta1` library allows access to all features of the *Google Cloud Machine Learning* service. +The `google-ml1_beta1` library allows access to all features of the *Google Cloud Machine Learning Engine* service. -This documentation was generated from *Cloud Machine Learning* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *ml:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Cloud Machine Learning Engine* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *ml:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. -Everything else about the *Cloud Machine Learning* *v1_beta1* API can be found at the +Everything else about the *Cloud Machine Learning Engine* *v1_beta1* API can be found at the [official documentation site](https://cloud.google.com/ml/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.CloudMachineLearning.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.CloudMachineLearningEngine.html) ... * projects - * [*get config*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectGetConfigCall.html), [*jobs cancel*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectJobCancelCall.html), [*jobs create*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectJobCreateCall.html), [*jobs get*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectJobGetCall.html), [*jobs list*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectJobListCall.html), [*models create*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectModelCreateCall.html), [*models delete*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectModelDeleteCall.html), [*models get*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectModelGetCall.html), [*models list*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectModelListCall.html), [*models versions create*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectModelVersionCreateCall.html), [*models versions delete*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectModelVersionDeleteCall.html), [*models versions get*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectModelVersionGetCall.html), [*models versions list*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectModelVersionListCall.html), [*models versions set default*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectModelVersionSetDefaultCall.html), [*operations cancel*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectOperationCancelCall.html), [*operations delete*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectOperationDeleteCall.html), [*operations get*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectOperationGetCall.html), [*operations list*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectOperationListCall.html) and [*predict*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.ProjectPredictCall.html) + * [*get config*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectGetConfigCall.html), [*jobs cancel*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectJobCancelCall.html), [*jobs create*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectJobCreateCall.html), [*jobs get*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectJobGetCall.html), [*jobs list*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectJobListCall.html), [*models create*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectModelCreateCall.html), [*models delete*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectModelDeleteCall.html), [*models get*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectModelGetCall.html), [*models list*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectModelListCall.html), [*models versions create*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectModelVersionCreateCall.html), [*models versions delete*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectModelVersionDeleteCall.html), [*models versions get*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectModelVersionGetCall.html), [*models versions list*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectModelVersionListCall.html), [*models versions set default*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectModelVersionSetDefaultCall.html), [*operations cancel*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectOperationCancelCall.html), [*operations delete*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectOperationDeleteCall.html), [*operations get*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectOperationGetCall.html), [*operations list*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectOperationListCall.html) and [*predict*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.ProjectPredictCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/struct.CloudMachineLearning.html)** +* **[Hub](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/struct.CloudMachineLearningEngine.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.Part.html)** + * **[Parts](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -48,9 +48,9 @@ Or specifically ... ```ignore let r = hub.projects().models_versions_delete(...).doit() -let r = hub.projects().operations_get(...).doit() -let r = hub.projects().models_versions_create(...).doit() let r = hub.projects().models_delete(...).doit() +let r = hub.projects().models_versions_create(...).doit() +let r = hub.projects().operations_get(...).doit() ``` The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -79,7 +79,7 @@ use ml1_beta1::GoogleCloudMlV1beta1__Version; use ml1_beta1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -use ml1_beta1::CloudMachineLearning; +use ml1_beta1::CloudMachineLearningEngine; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. @@ -92,7 +92,7 @@ let secret: ApplicationSecret = Default::default(); let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::new(), ::default(), None); -let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -124,17 +124,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.Delegate.html), 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-ml1_beta1/1.0.4+20161212/google_ml1_beta1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.ResponseResult.html), 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")`. @@ -144,29 +144,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.CallBuilder.html) 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-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.CallBuilder.html), 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-ml1_beta1/1.0.4+20161212/google_ml1_beta1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-ml1_beta1/1.0.4+20170515/google_ml1_beta1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/ml1_beta1/src/lib.rs b/gen/ml1_beta1/src/lib.rs index ae64622c15..88b888395c 100644 --- a/gen/ml1_beta1/src/lib.rs +++ b/gen/ml1_beta1/src/lib.rs @@ -2,14 +2,14 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Cloud Machine Learning* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *ml:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Cloud Machine Learning Engine* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *ml:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! -//! Everything else about the *Cloud Machine Learning* *v1_beta1* API can be found at the +//! Everything else about the *Cloud Machine Learning Engine* *v1_beta1* API can be found at the //! [official documentation site](https://cloud.google.com/ml/). //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/ml1_beta1). //! # Features //! -//! Handle the following *Resources* with ease from the central [hub](struct.CloudMachineLearning.html) ... +//! Handle the following *Resources* with ease from the central [hub](struct.CloudMachineLearningEngine.html) ... //! //! * projects //! * [*get config*](struct.ProjectGetConfigCall.html), [*jobs cancel*](struct.ProjectJobCancelCall.html), [*jobs create*](struct.ProjectJobCreateCall.html), [*jobs get*](struct.ProjectJobGetCall.html), [*jobs list*](struct.ProjectJobListCall.html), [*models create*](struct.ProjectModelCreateCall.html), [*models delete*](struct.ProjectModelDeleteCall.html), [*models get*](struct.ProjectModelGetCall.html), [*models list*](struct.ProjectModelListCall.html), [*models versions create*](struct.ProjectModelVersionCreateCall.html), [*models versions delete*](struct.ProjectModelVersionDeleteCall.html), [*models versions get*](struct.ProjectModelVersionGetCall.html), [*models versions list*](struct.ProjectModelVersionListCall.html), [*models versions set default*](struct.ProjectModelVersionSetDefaultCall.html), [*operations cancel*](struct.ProjectOperationCancelCall.html), [*operations delete*](struct.ProjectOperationDeleteCall.html), [*operations get*](struct.ProjectOperationGetCall.html), [*operations list*](struct.ProjectOperationListCall.html) and [*predict*](struct.ProjectPredictCall.html) @@ -23,7 +23,7 @@ //! //! The API is structured into the following primary items: //! -//! * **[Hub](struct.CloudMachineLearning.html)** +//! * **[Hub](struct.CloudMachineLearningEngine.html)** //! * a central object to maintain state and allow accessing all *Activities* //! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn //! allow access to individual [*Call Builders*](trait.CallBuilder.html) @@ -48,9 +48,9 @@ //! //! ```ignore //! let r = hub.projects().models_versions_delete(...).doit() -//! let r = hub.projects().operations_get(...).doit() -//! let r = hub.projects().models_versions_create(...).doit() //! let r = hub.projects().models_delete(...).doit() +//! let r = hub.projects().models_versions_create(...).doit() +//! let r = hub.projects().operations_get(...).doit() //! ``` //! //! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -80,7 +80,7 @@ //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -//! use ml1_beta1::CloudMachineLearning; +//! use ml1_beta1::CloudMachineLearningEngine; //! //! // Get an ApplicationSecret instance by some means. It contains the `client_id` and //! // `client_secret`, among other things. @@ -93,7 +93,7 @@ //! let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, //! hyper::Client::new(), //! ::default(), None); -//! let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +//! let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -248,7 +248,7 @@ impl Default for Scope { // HUB ### // ###### -/// Central instance to access all CloudMachineLearning related resource activities +/// Central instance to access all CloudMachineLearningEngine related resource activities /// /// # Examples /// @@ -263,7 +263,7 @@ impl Default for Scope { /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use ml1_beta1::CloudMachineLearning; +/// use ml1_beta1::CloudMachineLearningEngine; /// /// // Get an ApplicationSecret instance by some means. It contains the `client_id` and /// // `client_secret`, among other things. @@ -276,7 +276,7 @@ impl Default for Scope { /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); -/// let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -306,19 +306,19 @@ impl Default for Scope { /// } /// # } /// ``` -pub struct CloudMachineLearning { +pub struct CloudMachineLearningEngine { client: RefCell, auth: RefCell, _user_agent: String, } -impl<'a, C, A> Hub for CloudMachineLearning {} +impl<'a, C, A> Hub for CloudMachineLearningEngine {} -impl<'a, C, A> CloudMachineLearning +impl<'a, C, A> CloudMachineLearningEngine where C: BorrowMut, A: oauth2::GetToken { - pub fn new(client: C, authenticator: A) -> CloudMachineLearning { - CloudMachineLearning { + pub fn new(client: C, authenticator: A) -> CloudMachineLearningEngine { + CloudMachineLearningEngine { client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), @@ -396,6 +396,9 @@ pub struct GoogleCloudMlV1beta1__PredictionOutput { /// The output Google Cloud Storage location provided at the job creation time. #[serde(rename="outputPath")] pub output_path: Option, + /// Node hours used by the batch prediction job. + #[serde(rename="nodeHours")] + pub node_hours: Option, /// The number of generated predictions. #[serde(rename="predictionCount")] pub prediction_count: Option, @@ -432,41 +435,6 @@ pub struct GoogleCloudMlV1beta1__HyperparameterOutput { impl Part for GoogleCloudMlV1beta1__HyperparameterOutput {} -/// Represents a machine learning solution. -/// -/// A model can have multiple versions, each of which is a deployed, trained -/// model ready to receive prediction requests. The model itself is just a -/// container. -/// -/// # 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*). -/// -/// * [models get projects](struct.ProjectModelGetCall.html) (response) -/// * [models create projects](struct.ProjectModelCreateCall.html) (request|response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GoogleCloudMlV1beta1__Model { - /// Output only. The default version of the model. This version will be used to - /// handle prediction requests that do not specify a version. - /// - /// You can change the default version by calling - /// [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault). - #[serde(rename="defaultVersion")] - pub default_version: Option, - /// Optional. The description specified for the model when it was created. - pub description: Option, - /// Required. The name specified for the model when it was created. - /// - /// The model name must be unique within the project it is created in. - pub name: Option, -} - -impl RequestValue for GoogleCloudMlV1beta1__Model {} -impl ResponseResult for GoogleCloudMlV1beta1__Model {} - - /// An observed value of a metric. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -533,6 +501,13 @@ pub struct GoogleCloudMlV1beta1__HyperparameterSpec { /// Defaults to one. #[serde(rename="maxTrials")] pub max_trials: Option, + /// Optional. The Tensorflow summary tag name to use for optimizing trials. For + /// current versions of Tensorflow, this tag name should exactly match what is + /// shown in Tensorboard, including all scopes. For versions of Tensorflow + /// prior to 0.12, this should be only the tag passed to tf.Summary. + /// By default, "training/hptuning/metric" will be used. + #[serde(rename="hyperparameterMetricTag")] + pub hyperparameter_metric_tag: Option, /// Required. The set of parameters to tune. pub params: Option>, /// Optional. The number of training trials to run concurrently. @@ -557,6 +532,78 @@ pub struct GoogleCloudMlV1beta1__HyperparameterSpec { impl Part for GoogleCloudMlV1beta1__HyperparameterSpec {} +/// Response message for the ListModels method. +/// +/// # 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*). +/// +/// * [models list projects](struct.ProjectModelListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GoogleCloudMlV1beta1__ListModelsResponse { + /// The list of models. + pub models: Option>, + /// Optional. Pass this token as the `page_token` field of the request for a + /// subsequent call. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, +} + +impl ResponseResult for GoogleCloudMlV1beta1__ListModelsResponse {} + + +/// Represents input parameters for a prediction job. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GoogleCloudMlV1beta1__PredictionInput { + /// Use this field if you want to use the default version for the specified + /// model. The string must use the following format: + /// + /// `"projects/[YOUR_PROJECT]/models/[YOUR_MODEL]"` + #[serde(rename="modelName")] + pub model_name: Option, + /// Optional. The Google Cloud ML runtime version to use for this batch + /// prediction. If not set, Google Cloud ML will pick the runtime version used + /// during the CreateVersion request for this model version, or choose the + /// latest stable version when model version information is not available + /// such as when the model is specified by uri. + #[serde(rename="runtimeVersion")] + pub runtime_version: Option, + /// Required. The Google Compute Engine region to run the prediction job in. + pub region: Option, + /// Optional. The maximum number of workers to be used for parallel processing. + /// Defaults to 10 if not specified. + #[serde(rename="maxWorkerCount")] + pub max_worker_count: Option, + /// Use this field if you want to specify a Google Cloud Storage path for + /// the model to use. + pub uri: Option, + /// Required. The output Google Cloud Storage location. + #[serde(rename="outputPath")] + pub output_path: Option, + /// Required. The format of the input data files. + #[serde(rename="dataFormat")] + pub data_format: Option, + /// Use this field if you want to specify a version of the model to use. The + /// string is formatted the same way as `model_version`, with the addition + /// of the version information: + /// + /// `"projects/[YOUR_PROJECT]/models/YOUR_MODEL/versions/[YOUR_VERSION]"` + #[serde(rename="versionName")] + pub version_name: Option, + /// Required. The Google Cloud Storage location of the input data files. + /// May contain wildcards. + #[serde(rename="inputPaths")] + pub input_paths: Option>, +} + +impl Part for GoogleCloudMlV1beta1__PredictionInput {} + + /// Message that represents an arbitrary HTTP body. It should only be used for /// payload formats that can't be represented as JSON, such as raw binary or /// an HTML page. @@ -615,68 +662,6 @@ pub struct GoogleApi__HttpBody { impl ResponseResult for GoogleApi__HttpBody {} -/// Represents input parameters for a prediction job. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GoogleCloudMlV1beta1__PredictionInput { - /// Required. The output Google Cloud Storage location. - #[serde(rename="outputPath")] - pub output_path: Option, - /// Use this field if you want to use the default version for the specified - /// model. The string must use the following format: - /// - /// `"projects/[YOUR_PROJECT]/models/[YOUR_MODEL]"` - #[serde(rename="modelName")] - pub model_name: Option, - /// Required. The format of the input data files. - #[serde(rename="dataFormat")] - pub data_format: Option, - /// Use this field if you want to specify a version of the model to use. The - /// string is formatted the same way as `model_version`, with the addition - /// of the version information: - /// - /// `"projects/[YOUR_PROJECT]/models/YOUR_MODEL/versions/[YOUR_VERSION]"` - #[serde(rename="versionName")] - pub version_name: Option, - /// Required. The Google Cloud Storage location of the input data files. - /// May contain wildcards. - #[serde(rename="inputPaths")] - pub input_paths: Option>, - /// Optional. The maximum number of workers to be used for parallel processing. - /// Defaults to 10 if not specified. - #[serde(rename="maxWorkerCount")] - pub max_worker_count: Option, - /// Required. The Google Compute Engine region to run the prediction job in. - pub region: Option, -} - -impl Part for GoogleCloudMlV1beta1__PredictionInput {} - - -/// Response message for the ListModels method. -/// -/// # 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*). -/// -/// * [models list projects](struct.ProjectModelListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GoogleCloudMlV1beta1__ListModelsResponse { - /// The list of models. - pub models: Option>, - /// Optional. Pass this token as the `page_token` field of the request for a - /// subsequent call. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, -} - -impl ResponseResult for GoogleCloudMlV1beta1__ListModelsResponse {} - - /// 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: @@ -702,19 +687,24 @@ pub struct GoogleProtobuf__Empty { _never_set: Option } impl ResponseResult for GoogleProtobuf__Empty {} -/// Represents results of a training job. +/// Represents results of a training job. Output only. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoogleCloudMlV1beta1__TrainingOutput { - /// The amount of ML units consumed by the job. - #[serde(rename="consumedMlUnits")] - pub consumed_ml_units: Option, /// The number of hyperparameter tuning trials that completed successfully. + /// Only set for hyperparameter tuning jobs. #[serde(rename="completedTrialCount")] pub completed_trial_count: Option, + /// Whether this job is a hyperparameter tuning job. + #[serde(rename="isHyperparameterTuningJob")] + pub is_hyperparameter_tuning_job: Option, + /// The amount of ML units consumed by the job. + #[serde(rename="consumedMLUnits")] + pub consumed_ml_units: Option, /// Results for individual Hyperparameter trials. + /// Only set for hyperparameter tuning jobs. pub trials: Option>, } @@ -730,14 +720,17 @@ impl Part for GoogleCloudMlV1beta1__TrainingOutput {} /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [models versions delete projects](struct.ProjectModelVersionDeleteCall.html) (response) -/// * [operations get projects](struct.ProjectOperationGetCall.html) (response) -/// * [models versions create projects](struct.ProjectModelVersionCreateCall.html) (response) /// * [models delete projects](struct.ProjectModelDeleteCall.html) (response) +/// * [models versions create projects](struct.ProjectModelVersionCreateCall.html) (response) +/// * [operations get projects](struct.ProjectOperationGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoogleLongrunning__Operation { - /// The error result of the operation in case of failure or cancellation. - pub error: Option, + /// Service-specific metadata associated with the operation. It typically + /// contains progress information and common metadata such as create time. + /// Some services might not provide such metadata. Any method that returns a + /// long-running operation should document the metadata type, if any. + pub metadata: Option>, /// If the value is `false`, it means the operation is still in progress. /// If true, the operation is completed, and either `error` or `response` is /// available. @@ -755,16 +748,29 @@ pub struct GoogleLongrunning__Operation { /// originally returns it. If you use the default HTTP mapping, the /// `name` should have the format of `operations/some/unique/name`. pub name: Option, - /// Service-specific metadata associated with the operation. It typically - /// contains progress information and common metadata such as create time. - /// Some services might not provide such metadata. Any method that returns a - /// long-running operation should document the metadata type, if any. - pub metadata: Option>, + /// The error result of the operation in case of failure or cancellation. + pub error: Option, } impl ResponseResult for GoogleLongrunning__Operation {} +/// Options for manually scaling a model. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GoogleCloudMlV1beta1__ManualScaling { + /// The number of nodes to allocate for this model. These nodes are always up, + /// starting from the time the model is deployed, so the cost of operating + /// this model will be proportional to nodes * number of hours since + /// deployment. + pub nodes: Option, +} + +impl Part for GoogleCloudMlV1beta1__ManualScaling {} + + /// Response message for the ListVersions method. /// /// # Activities @@ -787,12 +793,61 @@ pub struct GoogleCloudMlV1beta1__ListVersionsResponse { impl ResponseResult for GoogleCloudMlV1beta1__ListVersionsResponse {} +/// Represents a machine learning solution. +/// +/// A model can have multiple versions, each of which is a deployed, trained +/// model ready to receive prediction requests. The model itself is just a +/// container. +/// +/// # 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*). +/// +/// * [models get projects](struct.ProjectModelGetCall.html) (response) +/// * [models create projects](struct.ProjectModelCreateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GoogleCloudMlV1beta1__Model { + /// Optional. The list of regions where the model is going to be deployed. + /// Currently only one region per model is supported. + /// Defaults to 'us-central1' if nothing is set. + /// Note: + /// * No matter where a model is deployed, it can always be accessed by + /// users from anywhere, both for online and batch prediction. + /// * The region for a batch prediction job is set by the region field when + /// submitting the batch prediction job and does not take its value from + /// this field. + pub regions: Option>, + /// Output only. The default version of the model. This version will be used to + /// handle prediction requests that do not specify a version. + /// + /// You can change the default version by calling + /// [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault). + #[serde(rename="defaultVersion")] + pub default_version: Option, + /// Required. The name specified for the model when it was created. + /// + /// The model name must be unique within the project it is created in. + pub name: Option, + /// Optional. If true, enables StackDriver Logging for online prediction. + /// Default is false. + #[serde(rename="onlinePredictionLogging")] + pub online_prediction_logging: Option, + /// Optional. The description specified for the model when it was created. + pub description: Option, +} + +impl RequestValue for GoogleCloudMlV1beta1__Model {} +impl ResponseResult for GoogleCloudMlV1beta1__Model {} + + /// Represents a version of the model. /// /// Each version is a trained model deployed in the cloud, ready to handle /// prediction requests. A model can have multiple versions. You can get /// information about all of the versions of a given model by calling -/// [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list). +/// [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list). /// /// # Activities /// @@ -807,20 +862,33 @@ impl ResponseResult for GoogleCloudMlV1beta1__ListVersionsResponse {} pub struct GoogleCloudMlV1beta1__Version { /// Optional. The description specified for the version when it was created. pub description: Option, - /// Required.The name specified for the version when it was created. - /// - /// The version name must be unique within the model it is created in. - pub name: Option, + /// Optional. The Google Cloud ML runtime version to use for this deployment. + /// If not set, Google Cloud ML will choose a version. + #[serde(rename="runtimeVersion")] + pub runtime_version: Option, + /// Optional. Manually select the number of nodes to use for serving the + /// model. If unset (i.e., by default), the number of nodes used to serve + /// the model automatically scales with traffic. However, care should be + /// taken to ramp up traffic according to the model's ability to scale. If + /// your model needs to handle bursts of traffic beyond it's ability to + /// scale, it is recommended you set this field appropriately. + #[serde(rename="manualScaling")] + pub manual_scaling: Option, + /// Output only. The time the version was last used for prediction. + #[serde(rename="lastUseTime")] + pub last_use_time: Option, /// Required. The Google Cloud Storage location of the trained model used to /// create the version. See the - /// [overview of model deployment](/ml/docs/concepts/deployment-overview) for - /// more informaiton. + /// [overview of model + /// deployment](/ml-engine/docs/concepts/deployment-overview) for more + /// informaiton. /// /// When passing Version to - /// [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create) + /// [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create) /// the model service uses the specified location as the source of the model. /// Once deployed, the model version is hosted by the prediction service, so /// this location is useful only as a historical record. + /// The total number of model files can't exceed 1000. #[serde(rename="deploymentUri")] pub deployment_uri: Option, /// Output only. The time the version was created. @@ -830,12 +898,13 @@ pub struct GoogleCloudMlV1beta1__Version { /// requests that do not specify a version. /// /// You can change the default version by calling - /// [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault). + /// [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault). #[serde(rename="isDefault")] pub is_default: Option, - /// Output only. The time the version was last used for prediction. - #[serde(rename="lastUseTime")] - pub last_use_time: Option, + /// Required.The name specified for the version when it was created. + /// + /// The version name must be unique within the model it is created in. + pub name: Option, } impl RequestValue for GoogleCloudMlV1beta1__Version {} @@ -857,7 +926,7 @@ impl ResponseResult for GoogleCloudMlV1beta1__Version {} /// model's input definition. Instances can include named inputs or can contain /// only unlabeled values. /// -/// Most data does not include named inputs. Some instances will be simple +/// Not all data includes named inputs. Some instances will be simple /// JSON values (boolean, number, or string). However, instances are often lists /// of simple values, or complex nested lists. Here are some examples of request /// bodies: @@ -872,7 +941,13 @@ impl ResponseResult for GoogleCloudMlV1beta1__Version {} /// /// Sentences encoded as lists of words (vectors of strings): ///
-/// {"instances": [["the","quick","brown"], ["la","bruja","le"]]}
+/// {
+///   "instances": [
+///     ["the","quick","brown"],
+///     ["la","bruja","le"],
+///     ...
+///   ]
+/// }
 /// 
/// Floating point scalar values: ///
@@ -880,22 +955,53 @@ impl ResponseResult for GoogleCloudMlV1beta1__Version {}
 /// 
/// Vectors of integers: ///
-/// {"instances": [[0, 1, 2], [3, 4, 5],...]}
+/// {
+///   "instances": [
+///     [0, 1, 2],
+///     [3, 4, 5],
+///     ...
+///   ]
+/// }
 /// 
/// Tensors (in this case, two-dimensional tensors): ///
-/// {"instances": [[[0, 1, 2], [3, 4, 5]], ...]}
+/// {
+///   "instances": [
+///     [
+///       [0, 1, 2],
+///       [3, 4, 5]
+///     ],
+///     ...
+///   ]
+/// }
 /// 
-/// Images represented as a three-dimensional list. In this encoding scheme the -/// first two dimensions represent the rows and columns of the image, and the -/// third contains the R, G, and B values for each pixel. +/// Images can be represented different ways. In this encoding scheme the first +/// two dimensions represent the rows and columns of the image, and the third +/// contains lists (vectors) of the R, G, and B values for each pixel. ///
-/// {"instances": [[[[138, 30, 66], [130, 20, 56], ...]]]]}
+/// {
+///   "instances": [
+///     [
+///       [
+///         [138, 30, 66],
+///         [130, 20, 56],
+///         ...
+///       ],
+///       [
+///         [126, 38, 61],
+///         [122, 24, 57],
+///         ...
+///       ],
+///       ...
+///     ],
+///     ...
+///   ]
+/// }
 /// 
-/// Data must be encoded as UTF-8. If your data uses another character encoding, -/// you must base64 encode the data and mark it as binary. To mark a JSON string -/// as binary, replace it with an object with a single attribute named `b`: -///
{"b": "..."} 
+/// JSON strings must be encoded as UTF-8. To send binary data, you must +/// base64-encode the data and mark it as binary. To mark a JSON string +/// as binary, replace it with a JSON object with a single attribute named `b64`: +///
{"b64": "..."} 
/// For example: /// /// Two Serialized tf.Examples (fake data, for illustrative purposes only): @@ -911,8 +1017,20 @@ impl ResponseResult for GoogleCloudMlV1beta1__Version {} /// /// JSON input data to be preprocessed: ///
-/// {"instances": [{"a": 1.0,  "b": true,  "c": "x"},
-///                {"a": -2.0, "b": false, "c": "y"}]}
+/// {
+///   "instances": [
+///     {
+///       "a": 1.0,
+///       "b": true,
+///       "c": "x"
+///     },
+///     {
+///       "a": -2.0,
+///       "b": false,
+///       "c": "y"
+///     }
+///   ]
+/// }
 /// 
/// Some models have an underlying TensorFlow graph that accepts multiple input /// tensors. In this case, you should use the names of JSON name/value pairs to @@ -921,14 +1039,59 @@ impl ResponseResult for GoogleCloudMlV1beta1__Version {} /// For a graph with input tensor aliases "tag" (string) and "image" /// (base64-encoded string): ///
-/// {"instances": [{"tag": "beach", "image": {"b64": "ASa8asdf"}},
-///                {"tag": "car", "image": {"b64": "JLK7ljk3"}}]}
+/// {
+///   "instances": [
+///     {
+///       "tag": "beach",
+///       "image": {"b64": "ASa8asdf"}
+///     },
+///     {
+///       "tag": "car",
+///       "image": {"b64": "JLK7ljk3"}
+///     }
+///   ]
+/// }
 /// 
/// For a graph with input tensor aliases "tag" (string) and "image" /// (3-dimensional array of 8-bit ints): ///
-/// {"instances": [{"tag": "beach", "image": [[[263, 1, 10], [262, 2, 11], ...]]},
-///                {"tag": "car", "image": [[[10, 11, 24], [23, 10, 15], ...]]}]}
+/// {
+///   "instances": [
+///     {
+///       "tag": "beach",
+///       "image": [
+///         [
+///           [138, 30, 66],
+///           [130, 20, 56],
+///           ...
+///         ],
+///         [
+///           [126, 38, 61],
+///           [122, 24, 57],
+///           ...
+///         ],
+///         ...
+///       ]
+///     },
+///     {
+///       "tag": "car",
+///       "image": [
+///         [
+///           [255, 0, 102],
+///           [255, 0, 97],
+///           ...
+///         ],
+///         [
+///           [254, 1, 101],
+///           [254, 2, 93],
+///           ...
+///         ],
+///         ...
+///       ]
+///     },
+///     ...
+///   ]
+/// }
 /// 
/// If the call is successful, the response body will contain one prediction /// entry per instance in the request body. If prediction fails for any @@ -976,11 +1139,9 @@ pub struct GoogleCloudMlV1beta1__ParameterSpec { /// a HyperparameterSpec message. E.g., "learning_rate". #[serde(rename="parameterName")] pub parameter_name: Option, - /// Required if type is `DOUBLE` or `INTEGER`. This field - /// should be unset if type is `CATEGORICAL`. This value should be integers if - /// type is INTEGER. - #[serde(rename="minValue")] - pub min_value: Option, + /// Required if type is `CATEGORICAL`. The list of possible categories. + #[serde(rename="categoricalValues")] + pub categorical_values: Option>, /// Required. The type of the parameter. #[serde(rename="type")] pub type_: Option, @@ -989,9 +1150,11 @@ pub struct GoogleCloudMlV1beta1__ParameterSpec { /// type is `INTEGER`. #[serde(rename="maxValue")] pub max_value: Option, - /// Required if type is `CATEGORICAL`. The list of possible categories. - #[serde(rename="categoricalValues")] - pub categorical_values: Option>, + /// Required if type is `DOUBLE` or `INTEGER`. This field + /// should be unset if type is `CATEGORICAL`. This value should be integers if + /// type is INTEGER. + #[serde(rename="minValue")] + pub min_value: Option, } impl Part for GoogleCloudMlV1beta1__ParameterSpec {} @@ -1009,15 +1172,18 @@ impl Part for GoogleCloudMlV1beta1__ParameterSpec {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoogleCloudMlV1beta1__Job { + /// Output only. The details of a failure or a cancellation. + #[serde(rename="errorMessage")] + pub error_message: Option, /// The current training job result. #[serde(rename="trainingOutput")] pub training_output: Option, /// Output only. When the job processing was started. #[serde(rename="startTime")] pub start_time: Option, - /// Output only. The details of a failure or a cancellation. - #[serde(rename="errorMessage")] - pub error_message: Option, + /// Input parameters to create a training job. + #[serde(rename="trainingInput")] + pub training_input: Option, /// Required. The user-specified id of the job. #[serde(rename="jobId")] pub job_id: Option, @@ -1026,9 +1192,6 @@ pub struct GoogleCloudMlV1beta1__Job { /// Input parameters to create a prediction job. #[serde(rename="predictionInput")] pub prediction_input: Option, - /// Input parameters to create a training job. - #[serde(rename="trainingInput")] - pub training_input: Option, /// Output only. When the job processing was completed. #[serde(rename="endTime")] pub end_time: Option, @@ -1075,6 +1238,10 @@ pub struct GoogleCloudMlV1beta1__TrainingInput { /// `workerCount` is greater than zero. #[serde(rename="workerType")] pub worker_type: Option, + /// Optional. The Google Cloud ML runtime version to use for training. If not + /// set, Google Cloud ML will choose the latest stable version. + #[serde(rename="runtimeVersion")] + pub runtime_version: Option, /// Required. Specifies the machine types, the number of replicas for workers /// and parameter servers. #[serde(rename="scaleTier")] @@ -1112,6 +1279,19 @@ pub struct GoogleCloudMlV1beta1__TrainingInput { /// A machine with roughly twice the number of cores and roughly double the /// memory of complex_model_m. /// + ///
standard_gpu
+ ///
+ /// A machine equivalent to standard that + /// also includes a + /// + /// GPU that you can use in your trainer. + ///
+ ///
complex_model_m_gpu
+ ///
+ /// A machine equivalent to + /// complex_model_m that also includes + /// four GPUs. + ///
/// /// /// You must set this value when `scaleTier` is set to `CUSTOM`. @@ -1126,8 +1306,15 @@ pub struct GoogleCloudMlV1beta1__TrainingInput { /// Required. The Python module name to run after installing the packages. #[serde(rename="pythonModule")] pub python_module: Option, + /// Optional. A Google Cloud Storage path in which to store training outputs + /// and other data needed for training. This path is passed to your TensorFlow + /// program as the 'job_dir' command-line argument. The benefit of specifying + /// this field is that Cloud ML validates the path for use in training. + #[serde(rename="jobDir")] + pub job_dir: Option, /// Required. The Google Cloud Storage location of the packages with /// the training program and any additional dependencies. + /// The maximum number of package URIs is 100. #[serde(rename="packageUris")] pub package_uris: Option>, /// Optional. The number of worker replicas to use for the training job. Each @@ -1177,7 +1364,7 @@ impl Part for GoogleCloudMlV1beta1__TrainingInput {} /// error message is needed, put the localized message in the error details or /// localize it in the client. The optional error details may contain arbitrary /// information about the error. There is a predefined set of error detail types -/// in the package `google.rpc` which can be used for common error conditions. +/// in the package `google.rpc` that can be used for common error conditions. /// /// # Language mapping /// @@ -1200,7 +1387,7 @@ impl Part for GoogleCloudMlV1beta1__TrainingInput {} /// errors. /// /// - Workflow errors. A typical workflow has multiple steps. Each step may -/// have a `Status` message for error reporting purpose. +/// have a `Status` message for error reporting. /// /// - Batch operations. If a client uses batch request and batch response, the /// `Status` message should be used directly inside batch response, one for @@ -1237,7 +1424,7 @@ impl Part for GoogleRpc__Status {} // ################# /// A builder providing access to all methods supported on *project* resources. -/// It is not used directly, but through the `CloudMachineLearning` hub. +/// It is not used directly, but through the `CloudMachineLearningEngine` hub. /// /// # Example /// @@ -1251,13 +1438,13 @@ impl Part for GoogleRpc__Status {} /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use ml1_beta1::CloudMachineLearning; +/// use ml1_beta1::CloudMachineLearningEngine; /// /// let secret: ApplicationSecret = Default::default(); /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); -/// let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* /// // like `get_config(...)`, `jobs_cancel(...)`, `jobs_create(...)`, `jobs_get(...)`, `jobs_list(...)`, `models_create(...)`, `models_delete(...)`, `models_get(...)`, `models_list(...)`, `models_versions_create(...)`, `models_versions_delete(...)`, `models_versions_get(...)`, `models_versions_list(...)`, `models_versions_set_default(...)`, `operations_cancel(...)`, `operations_delete(...)`, `operations_get(...)`, `operations_list(...)` and `predict(...)` /// // to build up your call. @@ -1267,7 +1454,7 @@ impl Part for GoogleRpc__Status {} pub struct ProjectMethods<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, } impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} @@ -1327,7 +1514,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// model. When you add a version to a model that already has one or more /// versions, the default version does not automatically change. If you want a /// new version to be the default, you must call - /// [projects.models.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault). + /// [projects.models.versions.setDefault](/ml-engine/reference/rest/v1beta1/projects.models.versions/setDefault). /// /// # Arguments /// @@ -1402,7 +1589,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// * `name` - Required. The name of the version. You can get the names of all the /// versions of a model by calling - /// [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list). + /// [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list). /// Authorization: requires `Editor` role on the parent project. pub fn models_versions_delete(&self, name: &str) -> ProjectModelVersionDeleteCall<'a, C, A> { ProjectModelVersionDeleteCall { @@ -1436,26 +1623,19 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Designates a version to be the default for the model. + /// Deletes a model. /// - /// The default version is used for prediction requests made against the model - /// that don't specify a version. - /// - /// The first version to be created for a model is automatically set as the - /// default. You must make any subsequent changes to the default version - /// setting manually using this method. + /// You can only delete a model if there are no versions in it. You can delete + /// versions by calling + /// [projects.models.versions.delete](/ml-engine/reference/rest/v1beta1/projects.models.versions/delete). /// /// # Arguments /// - /// * `request` - No description provided. - /// * `name` - Required. The name of the version to make the default for the model. You - /// can get the names of all the versions of a model by calling - /// [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list). + /// * `name` - Required. The name of the model. /// Authorization: requires `Editor` role on the parent project. - pub fn models_versions_set_default(&self, request: GoogleCloudMlV1beta1__SetDefaultVersionRequest, name: &str) -> ProjectModelVersionSetDefaultCall<'a, C, A> { - ProjectModelVersionSetDefaultCall { + pub fn models_delete(&self, name: &str) -> ProjectModelDeleteCall<'a, C, A> { + ProjectModelDeleteCall { hub: self.hub, - _request: request, _name: name.to_string(), _delegate: Default::default(), _scopes: Default::default(), @@ -1467,51 +1647,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// Performs prediction on the data in the request. /// - /// Responses are very similar to requests. There are two top-level fields, - /// each of which are JSON lists: - /// - ///
- ///
predictions
- ///
The list of predictions, one per instance in the request.
- ///
error
- ///
An error message returned instead of a prediction list if any - /// instance produced an error.
- ///
- /// - /// If the call is successful, the response body will contain one prediction - /// entry per instance in the request body. If prediction fails for any - /// instance, the response body will contain no predictions and will contian - /// a single error entry instead. - /// - /// Even though there is one prediction per instance, the format of a - /// prediction is not directly related to the format of an instance. - /// Predictions take whatever format is specified in the outputs collection - /// defined in the model. The collection of predictions is returned in a JSON - /// list. Each member of the list can be a simple value, a list, or a JSON - /// object of any complexity. If your model has more than one output tensor, - /// each prediction will be a JSON object containing a name/value pair for each - /// output. The names identify the output aliases in the graph. - /// - /// The following examples show some possible responses: - /// - /// A simple set of predictions for three input instances, where each - /// prediction is an integer value: - ///
-    /// {"predictions": [5, 4, 3]}
-    /// 
- /// A more complex set of predictions, each containing two named values that - /// correspond to output tensors, named **label** and **scores** respectively. - /// The value of **label** is the predicted category ("car" or "beach") and - /// **scores** contains a list of probabilities for that instance across the - /// possible categories. - ///
-    /// {"predictions": [{"label": "beach", "scores": [0.1, 0.9]},
-    ///                  {"label": "car", "scores": [0.75, 0.25]}]}
-    /// 
- /// A response when there is an error processing an input instance: - ///
-    /// {"error": "Divide by zero"}
-    /// 
+ /// **** REMOVE FROM GENERATED DOCUMENTATION /// /// # Arguments /// @@ -1531,18 +1667,19 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a model. + /// Gets information about a model version. /// - /// You can only delete a model if there are no versions in it. You can delete - /// versions by calling - /// [projects.models.versions.delete](/ml/reference/rest/v1beta1/projects.models.versions/delete). + /// Models can have multiple versions. You can call + /// [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list) + /// to get the same information that this method returns for all of the + /// versions of a model. /// /// # Arguments /// - /// * `name` - Required. The name of the model. - /// Authorization: requires `Editor` role on the parent project. - pub fn models_delete(&self, name: &str) -> ProjectModelDeleteCall<'a, C, A> { - ProjectModelDeleteCall { + /// * `name` - Required. The name of the version. + /// Authorization: requires `Viewer` role on the parent project. + pub fn models_versions_get(&self, name: &str) -> ProjectModelVersionGetCall<'a, C, A> { + ProjectModelVersionGetCall { hub: self.hub, _name: name.to_string(), _delegate: Default::default(), @@ -1622,7 +1759,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// You must add at least one version before you can request predictions from /// the model. Add versions by calling - /// [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create). + /// [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.models.versions/create). /// /// # Arguments /// @@ -1642,20 +1779,26 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets information about a model version. + /// Designates a version to be the default for the model. /// - /// Models can have multiple versions. You can call - /// [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list) - /// to get the same information that this method returns for all of the - /// versions of a model. + /// The default version is used for prediction requests made against the model + /// that don't specify a version. + /// + /// The first version to be created for a model is automatically set as the + /// default. You must make any subsequent changes to the default version + /// setting manually using this method. /// /// # Arguments /// - /// * `name` - Required. The name of the version. - /// Authorization: requires `Viewer` role on the parent project. - pub fn models_versions_get(&self, name: &str) -> ProjectModelVersionGetCall<'a, C, A> { - ProjectModelVersionGetCall { + /// * `request` - No description provided. + /// * `name` - Required. The name of the version to make the default for the model. You + /// can get the names of all the versions of a model by calling + /// [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list). + /// Authorization: requires `Editor` role on the parent project. + pub fn models_versions_set_default(&self, request: GoogleCloudMlV1beta1__SetDefaultVersionRequest, name: &str) -> ProjectModelVersionSetDefaultCall<'a, C, A> { + ProjectModelVersionSetDefaultCall { hub: self.hub, + _request: request, _name: name.to_string(), _delegate: Default::default(), _scopes: Default::default(), @@ -1776,13 +1919,13 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use ml1_beta1::CloudMachineLearning; +/// # use ml1_beta1::CloudMachineLearningEngine; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -1796,7 +1939,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { pub struct ProjectOperationListCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _name: String, _page_token: Option, _page_size: Option, @@ -2060,13 +2203,13 @@ impl<'a, C, A> ProjectOperationListCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -2077,7 +2220,7 @@ impl<'a, C, A> ProjectOperationListCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -2296,7 +2439,7 @@ impl<'a, C, A> ProjectOperationDeleteCall<'a, C, A> where C: BorrowMut ProjectOperationDeleteCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -2335,7 +2478,7 @@ impl<'a, C, A> ProjectOperationDeleteCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _request: GoogleCloudMlV1beta1__Version, _parent: String, _delegate: Option<&'a mut Delegate>, @@ -2594,13 +2737,13 @@ impl<'a, C, A> ProjectModelVersionCreateCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -2613,7 +2756,7 @@ impl<'a, C, A> ProjectModelVersionCreateCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _parent: String, _page_token: Option, _page_size: Option, @@ -2874,13 +3017,13 @@ impl<'a, C, A> ProjectModelVersionListCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -2891,7 +3034,7 @@ impl<'a, C, A> ProjectModelVersionListCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -3125,13 +3268,13 @@ impl<'a, C, A> ProjectOperationGetCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -3142,7 +3285,7 @@ impl<'a, C, A> ProjectOperationGetCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -3288,7 +3431,7 @@ impl<'a, C, A> ProjectModelVersionDeleteCall<'a, C, A> where C: BorrowMut ProjectModelVersionDeleteCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -3397,7 +3540,7 @@ impl<'a, C, A> ProjectModelVersionDeleteCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _request: GoogleCloudMlV1beta1__Job, _parent: String, _delegate: Option<&'a mut Delegate>, @@ -3636,16 +3779,13 @@ impl<'a, C, A> ProjectJobCreateCall<'a, C, A> where C: BorrowMut, } -/// Designates a version to be the default for the model. +/// Deletes a model. /// -/// The default version is used for prediction requests made against the model -/// that don't specify a version. -/// -/// The first version to be created for a model is automatically set as the -/// default. You must make any subsequent changes to the default version -/// setting manually using this method. +/// You can only delete a model if there are no versions in it. You can delete +/// versions by calling +/// [projects.models.versions.delete](/ml-engine/reference/rest/v1beta1/projects.models.versions/delete). /// -/// A builder for the *models.versions.setDefault* method supported by a *project* resource. +/// A builder for the *models.delete* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example @@ -3656,47 +3796,40 @@ impl<'a, C, A> ProjectJobCreateCall<'a, C, A> where C: BorrowMut, /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_ml1_beta1 as ml1_beta1; -/// use ml1_beta1::GoogleCloudMlV1beta1__SetDefaultVersionRequest; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use ml1_beta1::CloudMachineLearning; +/// # use ml1_beta1::CloudMachineLearningEngine; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), 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 = GoogleCloudMlV1beta1__SetDefaultVersionRequest::default(); -/// +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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.projects().models_versions_set_default(req, "name") +/// let result = hub.projects().models_delete("name") /// .doit(); /// # } /// ``` -pub struct ProjectModelVersionSetDefaultCall<'a, C, A> +pub struct ProjectModelDeleteCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, - _request: GoogleCloudMlV1beta1__SetDefaultVersionRequest, + hub: &'a CloudMachineLearningEngine, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectModelVersionSetDefaultCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectModelDeleteCall<'a, C, A> {} -impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, GoogleCloudMlV1beta1__Version)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, GoogleLongrunning__Operation)> { use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; @@ -3705,9 +3838,9 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "ml.projects.models.versions.setDefault", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "ml.projects.models.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); params.push(("name", self._name.to_string())); for &field in ["alt", "name"].iter() { if self._additional_params.contains_key(field) { @@ -3721,7 +3854,7 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut ProjectModelVersionSetDefaultCall<'a, C, A> { - self._request = new_value; - self - } - /// Required. The name of the version to make the default for the model. You - /// can get the names of all the versions of a model by calling - /// [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list). + /// Required. The name of the model. /// /// Authorization: requires `Editor` role on the parent project. /// @@ -3861,7 +3968,7 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut ProjectModelVersionSetDefaultCall<'a, C, A> { + pub fn name(mut self, new_value: &str) -> ProjectModelDeleteCall<'a, C, A> { self._name = new_value.to_string(); self } @@ -3871,7 +3978,7 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut ProjectModelVersionSetDefaultCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectModelDeleteCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -3898,7 +4005,7 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectModelVersionSetDefaultCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectModelDeleteCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -3915,7 +4022,7 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelVersionSetDefaultCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectModelDeleteCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -3925,51 +4032,7 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut -///
predictions
-///
The list of predictions, one per instance in the request.
-///
error
-///
An error message returned instead of a prediction list if any -/// instance produced an error.
-/// -/// -/// If the call is successful, the response body will contain one prediction -/// entry per instance in the request body. If prediction fails for any -/// instance, the response body will contain no predictions and will contian -/// a single error entry instead. -/// -/// Even though there is one prediction per instance, the format of a -/// prediction is not directly related to the format of an instance. -/// Predictions take whatever format is specified in the outputs collection -/// defined in the model. The collection of predictions is returned in a JSON -/// list. Each member of the list can be a simple value, a list, or a JSON -/// object of any complexity. If your model has more than one output tensor, -/// each prediction will be a JSON object containing a name/value pair for each -/// output. The names identify the output aliases in the graph. -/// -/// The following examples show some possible responses: -/// -/// A simple set of predictions for three input instances, where each -/// prediction is an integer value: -///
-/// {"predictions": [5, 4, 3]}
-/// 
-/// A more complex set of predictions, each containing two named values that -/// correspond to output tensors, named **label** and **scores** respectively. -/// The value of **label** is the predicted category ("car" or "beach") and -/// **scores** contains a list of probabilities for that instance across the -/// possible categories. -///
-/// {"predictions": [{"label": "beach", "scores": [0.1, 0.9]},
-///                  {"label": "car", "scores": [0.75, 0.25]}]}
-/// 
-/// A response when there is an error processing an input instance: -///
-/// {"error": "Divide by zero"}
-/// 
+/// **** REMOVE FROM GENERATED DOCUMENTATION /// /// A builder for the *predict* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -3986,13 +4049,13 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -4008,7 +4071,7 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _request: GoogleCloudMlV1beta1__PredictRequest, _name: String, _delegate: Option<&'a mut Delegate>, @@ -4247,13 +4310,14 @@ impl<'a, C, A> ProjectPredictCall<'a, C, A> where C: BorrowMut, A } -/// Deletes a model. +/// Gets information about a model version. /// -/// You can only delete a model if there are no versions in it. You can delete -/// versions by calling -/// [projects.models.versions.delete](/ml/reference/rest/v1beta1/projects.models.versions/delete). +/// Models can have multiple versions. You can call +/// [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list) +/// to get the same information that this method returns for all of the +/// versions of a model. /// -/// A builder for the *models.delete* method supported by a *project* resource. +/// A builder for the *models.versions.get* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example @@ -4267,37 +4331,37 @@ impl<'a, C, A> ProjectPredictCall<'a, C, A> where C: BorrowMut, A /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use ml1_beta1::CloudMachineLearning; +/// # use ml1_beta1::CloudMachineLearningEngine; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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.projects().models_delete("name") +/// let result = hub.projects().models_versions_get("name") /// .doit(); /// # } /// ``` -pub struct ProjectModelDeleteCall<'a, C, A> +pub struct ProjectModelVersionGetCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectModelDeleteCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectModelVersionGetCall<'a, C, A> {} -impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, GoogleLongrunning__Operation)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, GoogleCloudMlV1beta1__Version)> { use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; @@ -4306,8 +4370,8 @@ impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "ml.projects.models.delete", - http_method: hyper::method::Method::Delete }); + dlg.begin(MethodInfo { id: "ml.projects.models.versions.get", + http_method: hyper::method::Method::Get }); let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); params.push(("name", self._name.to_string())); for &field in ["alt", "name"].iter() { @@ -4375,7 +4439,7 @@ impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut ProjectModelDeleteCall<'a, C, A> where C: BorrowMut ProjectModelDeleteCall<'a, C, A> { + pub fn name(mut self, new_value: &str) -> ProjectModelVersionGetCall<'a, C, A> { self._name = new_value.to_string(); self } @@ -4446,7 +4510,7 @@ impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut ProjectModelDeleteCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectModelVersionGetCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -4473,7 +4537,7 @@ impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectModelDeleteCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectModelVersionGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -4490,7 +4554,7 @@ impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelDeleteCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectModelVersionGetCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -4517,13 +4581,13 @@ impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -4534,7 +4598,7 @@ impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -4764,13 +4828,13 @@ impl<'a, C, A> ProjectGetConfigCall<'a, C, A> where C: BorrowMut, /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use ml1_beta1::CloudMachineLearning; +/// # use ml1_beta1::CloudMachineLearningEngine; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -4781,7 +4845,7 @@ impl<'a, C, A> ProjectGetConfigCall<'a, C, A> where C: BorrowMut, pub struct ProjectJobGetCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -5020,13 +5084,13 @@ impl<'a, C, A> ProjectJobGetCall<'a, C, A> where C: BorrowMut, A: /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use ml1_beta1::CloudMachineLearning; +/// # use ml1_beta1::CloudMachineLearningEngine; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -5037,7 +5101,7 @@ impl<'a, C, A> ProjectJobGetCall<'a, C, A> where C: BorrowMut, A: pub struct ProjectOperationCancelCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -5253,7 +5317,7 @@ impl<'a, C, A> ProjectOperationCancelCall<'a, C, A> where C: BorrowMut ProjectOperationCancelCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -5292,7 +5356,7 @@ impl<'a, C, A> ProjectOperationCancelCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _request: GoogleCloudMlV1beta1__Model, _parent: String, _delegate: Option<&'a mut Delegate>, @@ -5531,14 +5595,16 @@ impl<'a, C, A> ProjectModelCreateCall<'a, C, A> where C: BorrowMut ProjectModelCreateCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 = GoogleCloudMlV1beta1__SetDefaultVersionRequest::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.projects().models_versions_get("name") +/// let result = hub.projects().models_versions_set_default(req, "name") /// .doit(); /// # } /// ``` -pub struct ProjectModelVersionGetCall<'a, C, A> +pub struct ProjectModelVersionSetDefaultCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, + _request: GoogleCloudMlV1beta1__SetDefaultVersionRequest, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectModelVersionGetCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectModelVersionSetDefaultCall<'a, C, A> {} -impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. @@ -5591,9 +5664,9 @@ impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "ml.projects.models.versions.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "ml.projects.models.versions.setDefault", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("name", self._name.to_string())); for &field in ["alt", "name"].iter() { if self._additional_params.contains_key(field) { @@ -5607,7 +5680,7 @@ impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut ProjectModelVersionSetDefaultCall<'a, C, A> { + self._request = new_value; + self + } + /// Required. The name of the version to make the default for the model. You + /// can get the names of all the versions of a model by calling + /// [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.models.versions/list). /// - /// Authorization: requires `Viewer` role on the parent project. + /// Authorization: requires `Editor` role on the parent project. /// /// 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) -> ProjectModelVersionGetCall<'a, C, A> { + pub fn name(mut self, new_value: &str) -> ProjectModelVersionSetDefaultCall<'a, C, A> { self._name = new_value.to_string(); self } @@ -5731,7 +5830,7 @@ impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut ProjectModelVersionGetCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectModelVersionSetDefaultCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -5758,7 +5857,7 @@ impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectModelVersionGetCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectModelVersionSetDefaultCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -5775,7 +5874,7 @@ impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelVersionGetCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectModelVersionSetDefaultCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -5799,13 +5898,13 @@ impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -5819,7 +5918,7 @@ impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _parent: String, _page_token: Option, _page_size: Option, @@ -6090,13 +6189,13 @@ impl<'a, C, A> ProjectJobListCall<'a, C, A> where C: BorrowMut, A /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use ml1_beta1::CloudMachineLearning; +/// # use ml1_beta1::CloudMachineLearningEngine; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -6112,7 +6211,7 @@ impl<'a, C, A> ProjectJobListCall<'a, C, A> where C: BorrowMut, A pub struct ProjectJobCancelCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _request: GoogleCloudMlV1beta1__CancelJobRequest, _name: String, _delegate: Option<&'a mut Delegate>, @@ -6369,13 +6468,13 @@ impl<'a, C, A> ProjectJobCancelCall<'a, C, A> where C: BorrowMut, /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use ml1_beta1::CloudMachineLearning; +/// # use ml1_beta1::CloudMachineLearningEngine; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -6386,7 +6485,7 @@ impl<'a, C, A> ProjectJobCancelCall<'a, C, A> where C: BorrowMut, pub struct ProjectModelGetCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _name: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -6619,13 +6718,13 @@ impl<'a, C, A> ProjectModelGetCall<'a, C, A> where C: BorrowMut, /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use ml1_beta1::CloudMachineLearning; +/// # use ml1_beta1::CloudMachineLearningEngine; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = CloudMachineLearning::new(hyper::Client::new(), auth); +/// # let mut hub = CloudMachineLearningEngine::new(hyper::Client::new(), 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 ! @@ -6638,7 +6737,7 @@ impl<'a, C, A> ProjectModelGetCall<'a, C, A> where C: BorrowMut, pub struct ProjectModelListCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a CloudMachineLearning, + hub: &'a CloudMachineLearningEngine, _parent: String, _page_token: Option, _page_size: Option, diff --git a/gen/monitoring3-cli/Cargo.toml b/gen/monitoring3-cli/Cargo.toml index 54ea28d546..1fb2504591 100644 --- a/gen/monitoring3-cli/Cargo.toml +++ b/gen/monitoring3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-monitoring3-cli" -version = "1.0.4+20161212" +version = "1.0.4+20170519" authors = ["Sebastian Thiel "] description = "A complete library to interact with Monitoring (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-monitoring3] path = "../monitoring3" -version = "1.0.4+20161212" +version = "1.0.4+20170519" diff --git a/gen/monitoring3-cli/README.md b/gen/monitoring3-cli/README.md index f5b3237fce..b2793d5338 100644 --- a/gen/monitoring3-cli/README.md +++ b/gen/monitoring3-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Monitoring* API at revision *20161212*. The CLI is at version *1.0.4*. +This documentation was generated from the *Monitoring* API at revision *20170519*. The CLI is at version *1.0.4*. ```bash monitoring3 [options] diff --git a/gen/monitoring3-cli/mkdocs.yml b/gen/monitoring3-cli/mkdocs.yml index eb1b4aa32a..26c9acb414 100644 --- a/gen/monitoring3-cli/mkdocs.yml +++ b/gen/monitoring3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Monitoring v1.0.4+20161212 +site_name: Monitoring v1.0.4+20170519 site_url: http://byron.github.io/google-apis-rs/google-monitoring3-cli site_description: A complete library to interact with Monitoring (protocol v3) diff --git a/gen/monitoring3-cli/src/main.rs b/gen/monitoring3-cli/src/main.rs index 442c48c80d..ad08c366f5 100644 --- a/gen/monitoring3-cli/src/main.rs +++ b/gen/monitoring3-cli/src/main.rs @@ -1611,7 +1611,7 @@ fn main() { let mut app = App::new("monitoring3") .author("Sebastian Thiel ") - .version("1.0.4+20161212") + .version("1.0.4+20170519") .about("Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_monitoring3_cli") .arg(Arg::with_name("url") diff --git a/gen/monitoring3/Cargo.toml b/gen/monitoring3/Cargo.toml index 7b2ad9a095..a704895ebc 100644 --- a/gen/monitoring3/Cargo.toml +++ b/gen/monitoring3/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-monitoring3" -version = "1.0.4+20161212" +version = "1.0.4+20170519" authors = ["Sebastian Thiel "] description = "A complete library to interact with Monitoring (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3" homepage = "https://cloud.google.com/monitoring/api/" -documentation = "https://docs.rs/google-monitoring3/1.0.4+20161212" +documentation = "https://docs.rs/google-monitoring3/1.0.4+20170519" license = "MIT" keywords = ["monitoring", "google", "protocol", "web", "api"] diff --git a/gen/monitoring3/README.md b/gen/monitoring3/README.md index d158be7bfa..349cc4659b 100644 --- a/gen/monitoring3/README.md +++ b/gen/monitoring3/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-monitoring3` library allows access to all features of the *Google Monitoring* service. -This documentation was generated from *Monitoring* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *monitoring:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Monitoring* crate version *1.0.4+20170519*, where *20170519* is the exact revision of the *monitoring:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Monitoring* *v3* API can be found at the [official documentation site](https://cloud.google.com/monitoring/api/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.Monitoring.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.Monitoring.html) ... * projects - * [*collectd time series create*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectCollectdTimeSeryCreateCall.html), [*groups create*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectGroupCreateCall.html), [*groups delete*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectGroupDeleteCall.html), [*groups get*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectGroupGetCall.html), [*groups list*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectGroupListCall.html), [*groups members list*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectGroupMemberListCall.html), [*groups update*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectGroupUpdateCall.html), [*metric descriptors create*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectMetricDescriptorCreateCall.html), [*metric descriptors delete*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectMetricDescriptorDeleteCall.html), [*metric descriptors get*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectMetricDescriptorGetCall.html), [*metric descriptors list*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectMetricDescriptorListCall.html), [*monitored resource descriptors get*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectMonitoredResourceDescriptorGetCall.html), [*monitored resource descriptors list*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectMonitoredResourceDescriptorListCall.html), [*time series create*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectTimeSeryCreateCall.html) and [*time series list*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.ProjectTimeSeryListCall.html) + * [*collectd time series create*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectCollectdTimeSeryCreateCall.html), [*groups create*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectGroupCreateCall.html), [*groups delete*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectGroupDeleteCall.html), [*groups get*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectGroupGetCall.html), [*groups list*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectGroupListCall.html), [*groups members list*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectGroupMemberListCall.html), [*groups update*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectGroupUpdateCall.html), [*metric descriptors create*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectMetricDescriptorCreateCall.html), [*metric descriptors delete*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectMetricDescriptorDeleteCall.html), [*metric descriptors get*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectMetricDescriptorGetCall.html), [*metric descriptors list*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectMetricDescriptorListCall.html), [*monitored resource descriptors get*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectMonitoredResourceDescriptorGetCall.html), [*monitored resource descriptors list*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectMonitoredResourceDescriptorListCall.html), [*time series create*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectTimeSeryCreateCall.html) and [*time series list*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.ProjectTimeSeryListCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/struct.Monitoring.html)** +* **[Hub](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/struct.Monitoring.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.Part.html)** + * **[Parts](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -124,17 +124,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.Delegate.html), 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-monitoring3/1.0.4+20161212/google_monitoring3/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.ResponseResult.html), 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")`. @@ -144,29 +144,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.CallBuilder.html) 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-monitoring3/1.0.4+20161212/google_monitoring3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.RequestValue.html) and -[decodable](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.RequestValue.html) and +[decodable](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-monitoring3/1.0.4+20161212/google_monitoring3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.CallBuilder.html), 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-monitoring3/1.0.4+20161212/google_monitoring3/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-monitoring3/1.0.4+20170519/google_monitoring3/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/monitoring3/src/lib.rs b/gen/monitoring3/src/lib.rs index 8e121084a7..6ed85cf5c7 100644 --- a/gen/monitoring3/src/lib.rs +++ b/gen/monitoring3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Monitoring* crate version *1.0.4+20161212*, where *20161212* is the exact revision of the *monitoring:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Monitoring* crate version *1.0.4+20170519*, where *20170519* is the exact revision of the *monitoring:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Monitoring* *v3* API can be found at the //! [official documentation site](https://cloud.google.com/monitoring/api/). @@ -224,14 +224,14 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { - /// View monitoring data for all of your Google Cloud and third-party projects - Read, + /// Publish metric data to your Google Cloud projects + Write, /// View and manage your data across Google Cloud Platform services CloudPlatform, - /// Publish metric data to your Google Cloud projects - Write, + /// View monitoring data for all of your Google Cloud and third-party projects + Read, /// View and write monitoring data for all of your Google and third-party Cloud and API projects Full, @@ -240,9 +240,9 @@ pub enum Scope { impl AsRef for Scope { fn as_ref(&self) -> &str { match *self { - Scope::Read => "https://www.googleapis.com/auth/monitoring.read", - Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", Scope::Write => "https://www.googleapis.com/auth/monitoring.write", + Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", + Scope::Read => "https://www.googleapis.com/auth/monitoring.read", Scope::Full => "https://www.googleapis.com/auth/monitoring", } } @@ -466,18 +466,18 @@ pub struct TypedValue { /// A Boolean value: true or false. #[serde(rename="boolValue")] pub bool_value: Option, - /// A 64-bit integer. Its range is approximately ±9.2x1018. - #[serde(rename="int64Value")] - pub int64_value: Option, /// A 64-bit double-precision floating-point number. Its magnitude is approximately ±10±300 and it has 16 significant digits of precision. #[serde(rename="doubleValue")] pub double_value: Option, + /// A 64-bit integer. Its range is approximately ±9.2x1018. + #[serde(rename="int64Value")] + pub int64_value: Option, } impl Part for TypedValue {} -/// Specify a sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with these boundaries for bucket i:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). +/// Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -528,7 +528,7 @@ pub struct CollectdPayload { impl Part for CollectdPayload {} -/// A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets with these boundaries for bucket i:Upper bound (0 <= i < N-1): boundsi Lower bound (1 <= i < N); boundsi - 1There must be at least one element in bounds. If bounds has only one element, there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets. +/// Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at least one element. If bounds has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -551,9 +551,9 @@ impl Part for Explicit {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MonitoredResource { - /// Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels "database_id" and "zone". + /// Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone". pub labels: Option>, - /// Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is "cloudsql_database". + /// Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. #[serde(rename="type")] pub type_: Option, } @@ -608,7 +608,7 @@ pub struct TimeSeries { pub metric: Option, /// The data points of this time series. When listing time series, the order of the points is specified by the list method.When creating a time series, this field must contain exactly one point and the point's type must be the same as the value type of the associated metric. If the associated metric's descriptor must be auto-created, then the value type of the descriptor is determined by the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION. pub points: Option>, - /// The associated resource. A fully-specified monitored resource used to identify the time series. + /// The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. pub resource: Option, /// The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field. #[serde(rename="valueType")] @@ -618,15 +618,15 @@ pub struct TimeSeries { impl Part for TimeSeries {} -/// Distribution contains summary statistics for a population of values and, optionally, a histogram representing the distribution of those values across a specified set of histogram buckets.The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values.The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by specifying parameters for a method of computing them (buckets of fixed width or buckets of exponentially increasing width).Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the mean and sum_of_squared_deviation fields meaningless. +/// Distribution contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets.The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths.Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the mean and sum_of_squared_deviation fields meaningless. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Distribution { - /// The number of values in the population. Must be non-negative. + /// The number of values in the population. Must be non-negative. This value must equal the sum of the values in bucket_counts if a histogram is provided. pub count: Option, - /// If bucket_options is given, then the sum of the values in bucket_counts must equal the value in count. If bucket_options is not given, no bucket_counts fields may be given.Bucket counts are given in order under the numbering scheme described above (the underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; the overflow bucket has number N-1).The size of bucket_counts must be no greater than N as defined in bucket_options.Any suffix of trailing zero bucket_count fields may be omitted. + /// Required in the Stackdriver Monitoring API v3. The values for each bucket specified in bucket_options. The sum of the values in bucketCounts must equal the value in the count field of the Distribution object. The order of the bucket counts follows the numbering schemes described for the three bucket types. The underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; and the overflow bucket has number N-1. The size of bucket_counts must not be greater than N. If the size is less than N, then the remaining buckets are assigned values of zero. #[serde(rename="bucketCounts")] pub bucket_counts: Option>, /// The sum of squared deviations from the mean of the values in the population. For values x_i this is: @@ -636,7 +636,7 @@ pub struct Distribution { pub sum_of_squared_deviation: Option, /// If specified, contains the range of the population values. The field must not be present if the count is zero. This field is presently ignored by the Stackdriver Monitoring API v3. pub range: Option, - /// Defines the histogram bucket boundaries. + /// Required in the Stackdriver Monitoring API v3. Defines the histogram bucket boundaries. #[serde(rename="bucketOptions")] pub bucket_options: Option, /// The arithmetic mean of the values in the population. If count is zero then this field must be zero. @@ -690,7 +690,7 @@ pub struct ListTimeSeriesResponse { impl ResponseResult for ListTimeSeriesResponse {} -/// Specify a sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with these boundaries for bucket i:Upper bound (0 <= i < N-1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)). +/// Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)). /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -733,7 +733,7 @@ pub struct MetricDescriptor { pub value_type: Option, /// The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response_latencies metric type has a label for the HTTP response code, response_code, so you can look at latencies for successful responses or just for responses that failed. pub labels: Option>, - /// The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example: + /// The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined custom metric types have the DNS name custom.googleapis.com. Metric types should use a natural hierarchical grouping. For example: /// "custom.googleapis.com/invoice/paid/amount" /// "appengine.googleapis.com/http/server/response_latencies" /// @@ -780,8 +780,8 @@ pub struct MetricDescriptor { /// Annotation is just a comment if it follows a UNIT and is equivalent to 1 if it is used alone. For examples, {requests}/s == 1/s, By{transmitted}/s == By/s. /// NAME is a sequence of non-blank printable ASCII characters not containing '{' or '}'. pub unit: Option, - /// The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project 123456789: - /// "projects/123456789/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount" + /// The resource name of the metric descriptor. Depending on the implementation, the name typically includes: (1) the parent resource name that defines the scope of the metric type or of its data; and (2) the metric's URL-encoded type, which also appears in the type field of this descriptor. For example, following is the resource name of a custom metric within the GCP project my-project-id: + /// "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount" /// pub name: Option, } @@ -821,7 +821,7 @@ pub struct Point { impl Part for Point {} -/// A Distribution may optionally contain a histogram of the values in the population. The histogram is given in bucket_counts as counts of values that fall into one of a sequence of non-overlapping buckets. The sequence of buckets is described by bucket_options.A bucket specifies an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket is strictly greater than the lower bound.The sequence of N buckets for a Distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.BucketOptions describes bucket boundaries in one of three ways. Two describe the boundaries by giving parameters for a formula to generate boundaries and one gives the bucket boundaries explicitly.If bucket_options is not given, then no bucket_counts may be given. +/// BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -862,7 +862,7 @@ pub struct ListGroupsResponse { impl ResponseResult for ListGroupsResponse {} -/// The ListMonitoredResourcDescriptors response. +/// The ListMonitoredResourceDescriptors response. /// /// # Activities /// @@ -964,10 +964,10 @@ pub struct MonitoredResourceDescriptor { /// Required. The monitored resource type. For example, the type "cloudsql_database" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters. #[serde(rename="type")] pub type_: Option, - /// Optional. A detailed description of the monitored resource type that might be used in documentation. - pub description: Option, /// Optional. The resource name of the monitored resource descriptor: "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format "monitoredResourceDescriptors/{type}". pub name: Option, + /// Optional. A detailed description of the monitored resource type that might be used in documentation. + pub description: Option, } impl ResponseResult for MonitoredResourceDescriptor {} @@ -1018,13 +1018,13 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a single metric descriptor. This method does not require a Stackdriver account. + /// Deletes a metric descriptor. Only user-created custom metrics can be deleted. /// /// # Arguments /// - /// * `name` - The metric descriptor on which to execute the request. The format is "projects/{project_id_or_number}/metricDescriptors/{metric_id}". An example value of {metric_id} is "compute.googleapis.com/instance/disk/read_bytes_count". - pub fn metric_descriptors_get(&self, name: &str) -> ProjectMetricDescriptorGetCall<'a, C, A> { - ProjectMetricDescriptorGetCall { + /// * `name` - The metric descriptor on which to execute the request. The format is "projects/{project_id_or_number}/metricDescriptors/{metric_id}". An example of {metric_id} is: "custom.googleapis.com/my_test_metric". + pub fn metric_descriptors_delete(&self, name: &str) -> ProjectMetricDescriptorDeleteCall<'a, C, A> { + ProjectMetricDescriptorDeleteCall { hub: self.hub, _name: name.to_string(), _delegate: Default::default(), @@ -1072,13 +1072,13 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a metric descriptor. Only user-created custom metrics can be deleted. + /// Gets a single metric descriptor. This method does not require a Stackdriver account. /// /// # Arguments /// - /// * `name` - The metric descriptor on which to execute the request. The format is "projects/{project_id_or_number}/metricDescriptors/{metric_id}". An example of {metric_id} is: "custom.googleapis.com/my_test_metric". - pub fn metric_descriptors_delete(&self, name: &str) -> ProjectMetricDescriptorDeleteCall<'a, C, A> { - ProjectMetricDescriptorDeleteCall { + /// * `name` - The metric descriptor on which to execute the request. The format is "projects/{project_id_or_number}/metricDescriptors/{metric_id}". An example value of {metric_id} is "compute.googleapis.com/instance/disk/read_bytes_count". + pub fn metric_descriptors_get(&self, name: &str) -> ProjectMetricDescriptorGetCall<'a, C, A> { + ProjectMetricDescriptorGetCall { hub: self.hub, _name: name.to_string(), _delegate: Default::default(), @@ -1319,9 +1319,9 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { // CallBuilders ### // ################# -/// Gets a single metric descriptor. This method does not require a Stackdriver account. +/// Deletes a metric descriptor. Only user-created custom metrics can be deleted. /// -/// A builder for the *metricDescriptors.get* method supported by a *project* resource. +/// A builder for the *metricDescriptors.delete* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example @@ -1345,11 +1345,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// // 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.projects().metric_descriptors_get("name") +/// let result = hub.projects().metric_descriptors_delete("name") /// .doit(); /// # } /// ``` -pub struct ProjectMetricDescriptorGetCall<'a, C, A> +pub struct ProjectMetricDescriptorDeleteCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Monitoring, @@ -1359,13 +1359,13 @@ pub struct ProjectMetricDescriptorGetCall<'a, C, A> _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectMetricDescriptorGetCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectMetricDescriptorDeleteCall<'a, C, A> {} -impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, MetricDescriptor)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; @@ -1374,8 +1374,8 @@ impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "monitoring.projects.metricDescriptors.get", - http_method: hyper::method::Method::Get }); + dlg.begin(MethodInfo { id: "monitoring.projects.metricDescriptors.delete", + http_method: hyper::method::Method::Delete }); let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); params.push(("name", self._name.to_string())); for &field in ["alt", "name"].iter() { @@ -1443,7 +1443,7 @@ impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut ProjectMetricDescriptorGetCall<'a, C, A> { + pub fn name(mut self, new_value: &str) -> ProjectMetricDescriptorDeleteCall<'a, C, A> { self._name = new_value.to_string(); self } @@ -1512,7 +1512,7 @@ impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut ProjectMetricDescriptorGetCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectMetricDescriptorDeleteCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -1539,7 +1539,7 @@ impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectMetricDescriptorGetCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectMetricDescriptorDeleteCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -1556,7 +1556,7 @@ impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricDescriptorGetCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorDeleteCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -2097,9 +2097,9 @@ impl<'a, C, A> ProjectGroupGetCall<'a, C, A> where C: BorrowMut, } -/// Deletes a metric descriptor. Only user-created custom metrics can be deleted. +/// Gets a single metric descriptor. This method does not require a Stackdriver account. /// -/// A builder for the *metricDescriptors.delete* method supported by a *project* resource. +/// A builder for the *metricDescriptors.get* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example @@ -2123,11 +2123,11 @@ impl<'a, C, A> ProjectGroupGetCall<'a, C, A> where C: BorrowMut, /// // 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.projects().metric_descriptors_delete("name") +/// let result = hub.projects().metric_descriptors_get("name") /// .doit(); /// # } /// ``` -pub struct ProjectMetricDescriptorDeleteCall<'a, C, A> +pub struct ProjectMetricDescriptorGetCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Monitoring, @@ -2137,13 +2137,13 @@ pub struct ProjectMetricDescriptorDeleteCall<'a, C, A> _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ProjectMetricDescriptorDeleteCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ProjectMetricDescriptorGetCall<'a, C, A> {} -impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, MetricDescriptor)> { use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; @@ -2152,8 +2152,8 @@ impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "monitoring.projects.metricDescriptors.delete", - http_method: hyper::method::Method::Delete }); + dlg.begin(MethodInfo { id: "monitoring.projects.metricDescriptors.get", + http_method: hyper::method::Method::Get }); let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); params.push(("name", self._name.to_string())); for &field in ["alt", "name"].iter() { @@ -2221,7 +2221,7 @@ impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut ProjectMetricDescriptorDeleteCall<'a, C, A> { + pub fn name(mut self, new_value: &str) -> ProjectMetricDescriptorGetCall<'a, C, A> { self._name = new_value.to_string(); self } @@ -2290,7 +2290,7 @@ impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut ProjectMetricDescriptorDeleteCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectMetricDescriptorGetCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -2317,7 +2317,7 @@ impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectMetricDescriptorDeleteCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ProjectMetricDescriptorGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -2334,7 +2334,7 @@ impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricDescriptorDeleteCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorGetCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self diff --git a/gen/pagespeedonline2-cli/Cargo.toml b/gen/pagespeedonline2-cli/Cargo.toml index 21131f215c..d1f1cb636b 100644 --- a/gen/pagespeedonline2-cli/Cargo.toml +++ b/gen/pagespeedonline2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/partners2-cli/Cargo.toml b/gen/partners2-cli/Cargo.toml index c2d1a369c3..168897cf10 100644 --- a/gen/partners2-cli/Cargo.toml +++ b/gen/partners2-cli/Cargo.toml @@ -4,9 +4,9 @@ [package] name = "google-partners2-cli" -version = "1.0.4+20151009" +version = "1.0.4+20170503" authors = ["Sebastian Thiel "] -description = "A complete library to interact with partners (protocol v2)" +description = "A complete library to interact with Partners (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/partners2-cli" homepage = "https://developers.google.com/partners/" documentation = "http://byron.github.io/google-apis-rs/google_partners2_cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-partners2] path = "../partners2" -version = "1.0.4+20151009" +version = "1.0.4+20170503" diff --git a/gen/partners2-cli/README.md b/gen/partners2-cli/README.md index 32c0be0404..7ca956176d 100644 --- a/gen/partners2-cli/README.md +++ b/gen/partners2-cli/README.md @@ -3,14 +3,14 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/cli/README.md.mako' DO NOT EDIT ! --> -The `partners2` command-line interface *(CLI)* allows to use most features of the *Google partners* service from the comfort of your terminal. +The `partners2` command-line interface *(CLI)* allows to use most features of the *Google Partners* 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 *partners* API can be found at the +Everything else about the *Partners* API can be found at the [official documentation site](https://developers.google.com/partners/). # Installation and Source Code @@ -25,20 +25,38 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *partners* API at revision *20151009*. The CLI is at version *1.0.4*. +This documentation was generated from the *Partners* API at revision *20170503*. The CLI is at version *1.0.4*. ```bash partners2 [options] + analytics + list [-p ]... [-o ] client-messages log (-r )... [-p ]... [-o ] companies get [-p ]... [-o ] leads-create (-r )... [-p ]... [-o ] list [-p ]... [-o ] + exams + get-token [-p ]... [-o ] + leads + list [-p ]... [-o ] + methods + get-partnersstatus [-p ]... [-o ] + update-companies (-r )... [-p ]... [-o ] + update-leads (-r )... [-p ]... [-o ] + offers + history-list [-p ]... [-o ] + list [-p ]... [-o ] user-events log (-r )... [-p ]... [-o ] user-states list [-p ]... [-o ] + users + create-company-relation (-r )... [-p ]... [-o ] + delete-company-relation [-p ]... [-o ] + get [-p ]... [-o ] + update-profile (-r )... [-p ]... [-o ] partners2 --help Configuration: diff --git a/gen/partners2-cli/mkdocs.yml b/gen/partners2-cli/mkdocs.yml index 61ec40f526..fc686304eb 100644 --- a/gen/partners2-cli/mkdocs.yml +++ b/gen/partners2-cli/mkdocs.yml @@ -1,6 +1,6 @@ -site_name: partners v1.0.4+20151009 +site_name: Partners v1.0.4+20170503 site_url: http://byron.github.io/google-apis-rs/google-partners2-cli -site_description: A complete library to interact with partners (protocol v2) +site_description: A complete library to interact with Partners (protocol v2) repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/partners2-cli @@ -9,12 +9,24 @@ site_dir: build_html pages: - ['index.md', 'Home'] +- ['analytics_list.md', 'Analytics', 'List'] - ['client-messages_log.md', 'Client Messages', 'Log'] - ['companies_get.md', 'Companies', 'Get'] - ['companies_leads-create.md', 'Companies', 'Leads Create'] - ['companies_list.md', 'Companies', 'List'] +- ['exams_get-token.md', 'Exams', 'Get Token'] +- ['leads_list.md', 'Leads', 'List'] +- ['methods_get-partnersstatus.md', 'Methods', 'Get Partnersstatus'] +- ['methods_update-companies.md', 'Methods', 'Update Companies'] +- ['methods_update-leads.md', 'Methods', 'Update Leads'] +- ['offers_history-list.md', 'Offers', 'History List'] +- ['offers_list.md', 'Offers', 'List'] - ['user-events_log.md', 'User Events', 'Log'] - ['user-states_list.md', 'User States', 'List'] +- ['users_create-company-relation.md', 'Users', 'Create Company Relation'] +- ['users_delete-company-relation.md', 'Users', 'Delete Company Relation'] +- ['users_get.md', 'Users', 'Get'] +- ['users_update-profile.md', 'Users', 'Update Profile'] theme: readthedocs diff --git a/gen/partners2-cli/src/main.rs b/gen/partners2-cli/src/main.rs index 6c9c76e61e..5573fff9ca 100644 --- a/gen/partners2-cli/src/main.rs +++ b/gen/partners2-cli/src/main.rs @@ -46,6 +46,83 @@ struct Engine<'n> { impl<'n> Engine<'n> { + fn _analytics_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.analytics().list(); + 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 { + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(value.unwrap_or("")); + }, + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + _ => { + 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(["request-metadata-user-overrides-user-id", "page-size", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "page-token", "request-metadata-traffic-source-traffic-sub-id", "request-metadata-locale", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-source-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + fn _client_messages_log(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -69,7 +146,6 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "client-info" => Some(("clientInfo", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "request-metadata.locale" => Some(("requestMetadata.locale", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "request-metadata.partners-session-id" => Some(("requestMetadata.partnersSessionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "request-metadata.traffic-source.traffic-sub-id" => Some(("requestMetadata.trafficSource.trafficSubId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -77,6 +153,7 @@ impl<'n> Engine<'n> { "request-metadata.user-overrides.user-id" => Some(("requestMetadata.userOverrides.userId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "request-metadata.user-overrides.ip-address" => Some(("requestMetadata.userOverrides.ipAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "request-metadata.experiment-ids" => Some(("requestMetadata.experimentIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "client-info" => Some(("clientInfo", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "details" => Some(("details", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "level" => Some(("level", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { @@ -252,20 +329,25 @@ impl<'n> Engine<'n> { "request-metadata.experiment-ids" => Some(("requestMetadata.experimentIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "recaptcha-challenge.id" => Some(("recaptchaChallenge.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "recaptcha-challenge.response" => Some(("recaptchaChallenge.response", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "lead.marketing-opt-in" => Some(("lead.marketingOptIn", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "lead.language-code" => Some(("lead.languageCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.gps-motivations" => Some(("lead.gpsMotivations", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "lead.create-time" => Some(("lead.createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.family-name" => Some(("lead.familyName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "lead.min-monthly-budget.units" => Some(("lead.minMonthlyBudget.units", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.min-monthly-budget.nanos" => Some(("lead.minMonthlyBudget.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "lead.min-monthly-budget.units" => Some(("lead.minMonthlyBudget.units", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.min-monthly-budget.currency-code" => Some(("lead.minMonthlyBudget.currencyCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.comments" => Some(("lead.comments", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.email" => Some(("lead.email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.website-url" => Some(("lead.websiteUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "lead.state" => Some(("lead.state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.phone-number" => Some(("lead.phoneNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "lead.given-name" => Some(("lead.givenName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.type" => Some(("lead.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "lead.given-name" => Some(("lead.givenName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "lead.adwords-customer-id" => Some(("lead.adwordsCustomerId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.id" => Some(("lead.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["comments", "currency-code", "email", "experiment-ids", "family-name", "given-name", "gps-motivations", "id", "ip-address", "lead", "locale", "min-monthly-budget", "nanos", "partners-session-id", "phone-number", "recaptcha-challenge", "request-metadata", "response", "traffic-source", "traffic-source-id", "traffic-sub-id", "type", "units", "user-id", "user-overrides", "website-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["adwords-customer-id", "comments", "create-time", "currency-code", "email", "experiment-ids", "family-name", "given-name", "gps-motivations", "id", "ip-address", "language-code", "lead", "locale", "marketing-opt-in", "min-monthly-budget", "nanos", "partners-session-id", "phone-number", "recaptcha-challenge", "request-metadata", "response", "state", "traffic-source", "traffic-source-id", "traffic-sub-id", "type", "units", "user-id", "user-overrides", "website-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -334,6 +416,9 @@ impl<'n> Engine<'n> { "view" => { call = call.view(value.unwrap_or("")); }, + "specializations" => { + call = call.add_specializations(value.unwrap_or("")); + }, "services" => { call = call.add_services(value.unwrap_or("")); }, @@ -413,7 +498,646 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["order-by", "page-size", "request-metadata-partners-session-id", "max-monthly-budget-currency-code", "max-monthly-budget-nanos", "language-codes", "min-monthly-budget-nanos", "request-metadata-traffic-source-traffic-sub-id", "industries", "min-monthly-budget-currency-code", "min-monthly-budget-units", "page-token", "request-metadata-locale", "request-metadata-traffic-source-traffic-source-id", "company-name", "address", "services", "request-metadata-experiment-ids", "gps-motivations", "request-metadata-user-overrides-ip-address", "website-url", "request-metadata-user-overrides-user-id", "view", "max-monthly-budget-units"].iter().map(|v|*v)); + v.extend(["order-by", "page-size", "request-metadata-partners-session-id", "max-monthly-budget-currency-code", "max-monthly-budget-nanos", "language-codes", "min-monthly-budget-units", "request-metadata-traffic-source-traffic-sub-id", "industries", "min-monthly-budget-currency-code", "min-monthly-budget-nanos", "page-token", "request-metadata-locale", "specializations", "request-metadata-traffic-source-traffic-source-id", "company-name", "address", "services", "request-metadata-experiment-ids", "gps-motivations", "request-metadata-user-overrides-ip-address", "website-url", "request-metadata-user-overrides-user-id", "view", "max-monthly-budget-units"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _exams_get_token(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.exams().get_token(opt.value_of("exam-type").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 { + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(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(["request-metadata-user-overrides-user-id", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "request-metadata-traffic-source-traffic-sub-id", "request-metadata-locale", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-source-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _leads_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.leads().list(); + 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 { + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(value.unwrap_or("")); + }, + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + "order-by" => { + call = call.order_by(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(["order-by", "request-metadata-user-overrides-user-id", "page-size", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "page-token", "request-metadata-traffic-source-traffic-sub-id", "request-metadata-locale", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-source-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _methods_get_partnersstatus(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.methods().get_partnersstatus(); + 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 { + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(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(["request-metadata-user-overrides-user-id", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "request-metadata-traffic-source-traffic-sub-id", "request-metadata-locale", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-source-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _methods_update_companies(&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()[..] { + "company-types" => Some(("companyTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "original-min-monthly-budget.nanos" => Some(("originalMinMonthlyBudget.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "original-min-monthly-budget.units" => Some(("originalMinMonthlyBudget.units", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "original-min-monthly-budget.currency-code" => Some(("originalMinMonthlyBudget.currencyCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "auto-approval-email-domains" => Some(("autoApprovalEmailDomains", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "badge-tier" => Some(("badgeTier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "profile-status" => Some(("profileStatus", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary-adwords-manager-account-id" => Some(("primaryAdwordsManagerAccountId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "website-url" => Some(("websiteUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "services" => Some(("services", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "additional-websites" => Some(("additionalWebsites", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "industries" => Some(("industries", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "primary-location.language-code" => Some(("primaryLocation.languageCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary-location.address-line" => Some(("primaryLocation.addressLine", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "primary-location.dependent-locality" => Some(("primaryLocation.dependentLocality", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary-location.sorting-code" => Some(("primaryLocation.sortingCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary-location.lat-lng.latitude" => Some(("primaryLocation.latLng.latitude", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "primary-location.lat-lng.longitude" => Some(("primaryLocation.latLng.longitude", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "primary-location.locality" => Some(("primaryLocation.locality", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary-location.region-code" => Some(("primaryLocation.regionCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary-location.administrative-area" => Some(("primaryLocation.administrativeArea", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary-location.address" => Some(("primaryLocation.address", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary-location.postal-code" => Some(("primaryLocation.postalCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "public-profile.url" => Some(("publicProfile.url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "public-profile.profile-image" => Some(("publicProfile.profileImage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "public-profile.display-image-url" => Some(("publicProfile.displayImageUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "public-profile.display-name" => Some(("publicProfile.displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "public-profile.id" => Some(("publicProfile.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "converted-min-monthly-budget.nanos" => Some(("convertedMinMonthlyBudget.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "converted-min-monthly-budget.units" => Some(("convertedMinMonthlyBudget.units", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "converted-min-monthly-budget.currency-code" => Some(("convertedMinMonthlyBudget.currencyCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "primary-language-code" => Some(("primaryLanguageCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-websites", "address", "address-line", "administrative-area", "auto-approval-email-domains", "badge-tier", "company-types", "converted-min-monthly-budget", "currency-code", "dependent-locality", "display-image-url", "display-name", "id", "industries", "language-code", "lat-lng", "latitude", "locality", "longitude", "name", "nanos", "original-min-monthly-budget", "postal-code", "primary-adwords-manager-account-id", "primary-language-code", "primary-location", "profile-image", "profile-status", "public-profile", "region-code", "services", "sorting-code", "units", "url", "website-url"]); + 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::Company = json::value::from_value(object).unwrap(); + let mut call = self.hub.methods().update_companies(request); + 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.unwrap_or("")); + }, + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(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(["request-metadata-locale", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "request-metadata-traffic-source-traffic-source-id", "request-metadata-user-overrides-user-id", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-sub-id", "update-mask"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _methods_update_leads(&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()[..] { + "marketing-opt-in" => Some(("marketingOptIn", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "language-code" => Some(("languageCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "gps-motivations" => Some(("gpsMotivations", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "family-name" => Some(("familyName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "min-monthly-budget.nanos" => Some(("minMonthlyBudget.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "min-monthly-budget.units" => Some(("minMonthlyBudget.units", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "min-monthly-budget.currency-code" => Some(("minMonthlyBudget.currencyCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "comments" => Some(("comments", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "email" => Some(("email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "website-url" => Some(("websiteUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "phone-number" => Some(("phoneNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "given-name" => Some(("givenName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "adwords-customer-id" => Some(("adwordsCustomerId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["adwords-customer-id", "comments", "create-time", "currency-code", "email", "family-name", "given-name", "gps-motivations", "id", "language-code", "marketing-opt-in", "min-monthly-budget", "nanos", "phone-number", "state", "type", "units", "website-url"]); + 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::Lead = json::value::from_value(object).unwrap(); + let mut call = self.hub.methods().update_leads(request); + 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.unwrap_or("")); + }, + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(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(["request-metadata-locale", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "request-metadata-traffic-source-traffic-source-id", "request-metadata-user-overrides-user-id", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-sub-id", "update-mask"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _offers_history_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.offers().history_list(); + 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 { + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(value.unwrap_or("")); + }, + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + "order-by" => { + call = call.order_by(value.unwrap_or("")); + }, + "entire-company" => { + call = call.entire_company(arg_from_str(value.unwrap_or("false"), err, "entire-company", "boolean")); + }, + _ => { + 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(["order-by", "request-metadata-user-overrides-user-id", "page-size", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "page-token", "request-metadata-traffic-source-traffic-sub-id", "request-metadata-locale", "entire-company", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-source-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _offers_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.offers().list(); + 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 { + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(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(["request-metadata-user-overrides-user-id", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "request-metadata-traffic-source-traffic-sub-id", "request-metadata-locale", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-source-id"].iter().map(|v|*v)); v } )); } } @@ -467,21 +1191,26 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "lead.marketing-opt-in" => Some(("lead.marketingOptIn", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "lead.language-code" => Some(("lead.languageCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.gps-motivations" => Some(("lead.gpsMotivations", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "lead.create-time" => Some(("lead.createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.family-name" => Some(("lead.familyName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "lead.min-monthly-budget.units" => Some(("lead.minMonthlyBudget.units", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.min-monthly-budget.nanos" => Some(("lead.minMonthlyBudget.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "lead.min-monthly-budget.units" => Some(("lead.minMonthlyBudget.units", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.min-monthly-budget.currency-code" => Some(("lead.minMonthlyBudget.currencyCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.comments" => Some(("lead.comments", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.email" => Some(("lead.email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.website-url" => Some(("lead.websiteUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "lead.state" => Some(("lead.state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.phone-number" => Some(("lead.phoneNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "lead.given-name" => Some(("lead.givenName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.type" => Some(("lead.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "lead.given-name" => Some(("lead.givenName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "lead.adwords-customer-id" => Some(("lead.adwordsCustomerId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "lead.id" => Some(("lead.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "url" => Some(("url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "event-action" => Some(("eventAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "event-category" => Some(("eventCategory", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "event-action" => Some(("eventAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "request-metadata.locale" => Some(("requestMetadata.locale", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "request-metadata.partners-session-id" => Some(("requestMetadata.partnersSessionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "request-metadata.traffic-source.traffic-sub-id" => Some(("requestMetadata.trafficSource.trafficSubId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -491,7 +1220,7 @@ impl<'n> Engine<'n> { "request-metadata.experiment-ids" => Some(("requestMetadata.experimentIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "event-scope" => Some(("eventScope", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["comments", "currency-code", "email", "event-action", "event-category", "event-scope", "experiment-ids", "family-name", "given-name", "gps-motivations", "id", "ip-address", "lead", "locale", "min-monthly-budget", "nanos", "partners-session-id", "phone-number", "request-metadata", "traffic-source", "traffic-source-id", "traffic-sub-id", "type", "units", "url", "user-id", "user-overrides", "website-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["adwords-customer-id", "comments", "create-time", "currency-code", "email", "event-action", "event-category", "event-scope", "experiment-ids", "family-name", "given-name", "gps-motivations", "id", "ip-address", "language-code", "lead", "locale", "marketing-opt-in", "min-monthly-budget", "nanos", "partners-session-id", "phone-number", "request-metadata", "state", "traffic-source", "traffic-source-id", "traffic-sub-id", "type", "units", "url", "user-id", "user-overrides", "website-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -619,11 +1348,415 @@ impl<'n> Engine<'n> { } } + fn _users_create_company_relation(&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()[..] { + "manager-account" => Some(("managerAccount", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "website" => Some(("website", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "company-id" => Some(("companyId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-pending" => Some(("isPending", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "logo-url" => Some(("logoUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "company-admin" => Some(("companyAdmin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "badge-tier" => Some(("badgeTier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "phone-number" => Some(("phoneNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "address" => Some(("address", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "resolved-timestamp" => Some(("resolvedTimestamp", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "segment" => Some(("segment", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["address", "badge-tier", "company-admin", "company-id", "creation-time", "is-pending", "logo-url", "manager-account", "name", "phone-number", "resolved-timestamp", "segment", "state", "website"]); + 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::CompanyRelation = json::value::from_value(object).unwrap(); + let mut call = self.hub.users().create_company_relation(request, opt.value_of("user-id").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 { + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(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(["request-metadata-user-overrides-user-id", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "request-metadata-traffic-source-traffic-sub-id", "request-metadata-locale", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-source-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _users_delete_company_relation(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.users().delete_company_relation(opt.value_of("user-id").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 { + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(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(["request-metadata-user-overrides-user-id", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "request-metadata-traffic-source-traffic-sub-id", "request-metadata-locale", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-source-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _users_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.users().get(opt.value_of("user-id").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 { + "user-view" => { + call = call.user_view(value.unwrap_or("")); + }, + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(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(["request-metadata-locale", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "request-metadata-traffic-source-traffic-source-id", "request-metadata-user-overrides-user-id", "user-view", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-sub-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _users_update_profile(&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()[..] { + "industries" => Some(("industries", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "primary-country-code" => Some(("primaryCountryCode", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "adwords-manager-account" => Some(("adwordsManagerAccount", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "markets" => Some(("markets", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "email-opt-ins.special-offers" => Some(("emailOptIns.specialOffers", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "email-opt-ins.market-comm" => Some(("emailOptIns.marketComm", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "email-opt-ins.phone-contact" => Some(("emailOptIns.phoneContact", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "email-opt-ins.physical-mail" => Some(("emailOptIns.physicalMail", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "email-opt-ins.performance-suggestions" => Some(("emailOptIns.performanceSuggestions", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "family-name" => Some(("familyName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "languages" => Some(("languages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "email-address" => Some(("emailAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "address.language-code" => Some(("address.languageCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "address.address-line" => Some(("address.addressLine", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "address.dependent-locality" => Some(("address.dependentLocality", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "address.sorting-code" => Some(("address.sortingCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "address.lat-lng.latitude" => Some(("address.latLng.latitude", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "address.lat-lng.longitude" => Some(("address.latLng.longitude", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), + "address.locality" => Some(("address.locality", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "address.region-code" => Some(("address.regionCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "address.administrative-area" => Some(("address.administrativeArea", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "address.address" => Some(("address.address", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "address.postal-code" => Some(("address.postalCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "phone-number" => Some(("phoneNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "given-name" => Some(("givenName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "job-functions" => Some(("jobFunctions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "profile-public" => Some(("profilePublic", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "channels" => Some(("channels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["address", "address-line", "administrative-area", "adwords-manager-account", "channels", "dependent-locality", "email-address", "email-opt-ins", "family-name", "given-name", "industries", "job-functions", "language-code", "languages", "lat-lng", "latitude", "locality", "longitude", "market-comm", "markets", "performance-suggestions", "phone-contact", "phone-number", "physical-mail", "postal-code", "primary-country-code", "profile-public", "region-code", "sorting-code", "special-offers"]); + 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::UserProfile = json::value::from_value(object).unwrap(); + let mut call = self.hub.users().update_profile(request); + 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 { + "request-metadata-user-overrides-user-id" => { + call = call.request_metadata_user_overrides_user_id(value.unwrap_or("")); + }, + "request-metadata-user-overrides-ip-address" => { + call = call.request_metadata_user_overrides_ip_address(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-sub-id" => { + call = call.request_metadata_traffic_source_traffic_sub_id(value.unwrap_or("")); + }, + "request-metadata-traffic-source-traffic-source-id" => { + call = call.request_metadata_traffic_source_traffic_source_id(value.unwrap_or("")); + }, + "request-metadata-partners-session-id" => { + call = call.request_metadata_partners_session_id(value.unwrap_or("")); + }, + "request-metadata-locale" => { + call = call.request_metadata_locale(value.unwrap_or("")); + }, + "request-metadata-experiment-ids" => { + call = call.add_request_metadata_experiment_ids(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(["request-metadata-user-overrides-user-id", "request-metadata-user-overrides-ip-address", "request-metadata-partners-session-id", "request-metadata-traffic-source-traffic-sub-id", "request-metadata-locale", "request-metadata-experiment-ids", "request-metadata-traffic-source-traffic-source-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + 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() { + ("analytics", Some(opt)) => { + match opt.subcommand() { + ("list", Some(opt)) => { + call_result = self._analytics_list(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("analytics".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, ("client-messages", Some(opt)) => { match opt.subcommand() { ("log", Some(opt)) => { @@ -652,6 +1785,59 @@ impl<'n> Engine<'n> { } } }, + ("exams", Some(opt)) => { + match opt.subcommand() { + ("get-token", Some(opt)) => { + call_result = self._exams_get_token(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("exams".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + ("leads", Some(opt)) => { + match opt.subcommand() { + ("list", Some(opt)) => { + call_result = self._leads_list(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("leads".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + ("methods", Some(opt)) => { + match opt.subcommand() { + ("get-partnersstatus", Some(opt)) => { + call_result = self._methods_get_partnersstatus(opt, dry_run, &mut err); + }, + ("update-companies", Some(opt)) => { + call_result = self._methods_update_companies(opt, dry_run, &mut err); + }, + ("update-leads", Some(opt)) => { + call_result = self._methods_update_leads(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("methods".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + ("offers", Some(opt)) => { + match opt.subcommand() { + ("history-list", Some(opt)) => { + call_result = self._offers_history_list(opt, dry_run, &mut err); + }, + ("list", Some(opt)) => { + call_result = self._offers_list(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("offers".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, ("user-events", Some(opt)) => { match opt.subcommand() { ("log", Some(opt)) => { @@ -674,6 +1860,26 @@ impl<'n> Engine<'n> { } } }, + ("users", Some(opt)) => { + match opt.subcommand() { + ("create-company-relation", Some(opt)) => { + call_result = self._users_create_company_relation(opt, dry_run, &mut err); + }, + ("delete-company-relation", Some(opt)) => { + call_result = self._users_delete_company_relation(opt, dry_run, &mut err); + }, + ("get", Some(opt)) => { + call_result = self._users_get(opt, dry_run, &mut err); + }, + ("update-profile", Some(opt)) => { + call_result = self._users_update_profile(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("users".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, _ => { err.issues.push(CLIError::MissingCommandError); writeln!(io::stderr(), "{}\n", self.opt.usage()).ok(); @@ -760,9 +1966,31 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ + ("analytics", "methods: 'list'", vec![ + ("list", + Some(r##"Lists analytics data for a user's associated company. + Should only be called within the context of an authorized logged in user."##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/analytics_list", + vec![ + (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)), + ]), + ]), + ("client-messages", "methods: 'log'", vec![ ("log", - Some(r##"Logs a generic message from the client, such as `Failed to render component`, `Profile page is running slow`, `More than 500 users have accessed this result.`, etc."##), + Some(r##"Logs a generic message from the client, such as + `Failed to render component`, `Profile page is running slow`, + `More than 500 users have accessed this result.`, etc."##), "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/client-messages_log", vec![ (Some(r##"kv"##), @@ -854,6 +2082,151 @@ fn main() { ]), ]), + ("exams", "methods: 'get-token'", vec![ + ("get-token", + Some(r##"Gets an Exam Token for a Partner's user to take an exam in the Exams System"##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/exams_get-token", + vec![ + (Some(r##"exam-type"##), + None, + Some(r##"The exam type we are requesting a token for."##), + 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)), + ]), + ]), + + ("leads", "methods: 'list'", vec![ + ("list", + Some(r##"Lists advertiser leads for a user's associated company. + Should only be called within the context of an authorized logged in user."##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/leads_list", + vec![ + (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)), + ]), + ]), + + ("methods", "methods: 'get-partnersstatus', 'update-companies' and 'update-leads'", vec![ + ("get-partnersstatus", + Some(r##"Gets Partners Status of the logged in user's agency. + Should only be called if the logged in user is the admin of the agency."##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/methods_get-partnersstatus", + vec![ + (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)), + ]), + ("update-companies", + Some(r##"Update company. + Should only be called within the context of an authorized logged in user."##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/methods_update-companies", + vec![ + (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)), + ]), + ("update-leads", + Some(r##"Updates the specified lead."##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/methods_update-leads", + vec![ + (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)), + ]), + ]), + + ("offers", "methods: 'history-list' and 'list'", vec![ + ("history-list", + Some(r##"Lists the Historical Offers for the current user (or user's entire company)"##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/offers_history-list", + vec![ + (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)), + ]), + ("list", + Some(r##"Lists the Offers available for the current user"##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/offers_list", + vec![ + (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)), + ]), + ]), + ("user-events", "methods: 'log'", vec![ ("log", Some(r##"Logs a user event."##), @@ -898,12 +2271,113 @@ fn main() { ]), ]), + ("users", "methods: 'create-company-relation', 'delete-company-relation', 'get' and 'update-profile'", vec![ + ("create-company-relation", + Some(r##"Creates a user's company relation. Affiliates the user to a company."##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/users_create-company-relation", + vec![ + (Some(r##"user-id"##), + None, + Some(r##"The ID of the user. Can be set to me to mean + the currently authenticated user."##), + 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)), + ]), + ("delete-company-relation", + Some(r##"Deletes a user's company relation. Unaffiliaites the user from a company."##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/users_delete-company-relation", + vec![ + (Some(r##"user-id"##), + None, + Some(r##"The ID of the user. Can be set to me to mean + the currently authenticated user."##), + 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)), + ]), + ("get", + Some(r##"Gets a user."##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/users_get", + vec![ + (Some(r##"user-id"##), + None, + Some(r##"Identifier of the user. Can be set to me to mean the currently + authenticated user."##), + 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)), + ]), + ("update-profile", + Some(r##"Updates a user's profile. A user can only update their own profile and + should only be called within the context of a logged in user."##), + "Details at http://byron.github.io/google-apis-rs/google_partners2_cli/users_update-profile", + vec![ + (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("partners2") .author("Sebastian Thiel ") - .version("1.0.4+20151009") - .about("Lets advertisers search certified companies and create contact leads with them, and also audits the usage of clients.") + .version("1.0.4+20170503") + .about("Searches certified companies and creates contact leads with them, and also audits the usage of clients.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_partners2_cli") .arg(Arg::with_name("folder") .long("config-dir") diff --git a/gen/partners2/Cargo.toml b/gen/partners2/Cargo.toml index ab0a331856..27bb6804b3 100644 --- a/gen/partners2/Cargo.toml +++ b/gen/partners2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-partners2" -version = "1.0.4+20151009" +version = "1.0.4+20170503" authors = ["Sebastian Thiel "] -description = "A complete library to interact with partners (protocol v2)" +description = "A complete library to interact with Partners (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/partners2" homepage = "https://developers.google.com/partners/" -documentation = "https://docs.rs/google-partners2/1.0.4+20151009" +documentation = "https://docs.rs/google-partners2/1.0.4+20170503" license = "MIT" keywords = ["partners", "google", "protocol", "web", "api"] diff --git a/gen/partners2/README.md b/gen/partners2/README.md index 3f1a40b6e8..c0e82034ff 100644 --- a/gen/partners2/README.md +++ b/gen/partners2/README.md @@ -3,25 +3,40 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/api/README.md.mako' DO NOT EDIT ! --> -The `google-partners2` library allows access to all features of the *Google partners* service. +The `google-partners2` library allows access to all features of the *Google Partners* service. -This documentation was generated from *partners* crate version *1.0.4+20151009*, where *20151009* is the exact revision of the *partners:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Partners* crate version *1.0.4+20170503*, where *20170503* is the exact revision of the *partners:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. -Everything else about the *partners* *v2* API can be found at the +Everything else about the *Partners* *v2* API can be found at the [official documentation site](https://developers.google.com/partners/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/struct.Partners.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.Partners.html) ... +* analytics + * [*list*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.AnalyticListCall.html) * client messages - * [*log*](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/struct.ClientMessageLogCall.html) -* [companies](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/struct.Company.html) - * [*get*](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/struct.CompanyGetCall.html), [*leads create*](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/struct.CompanyLeadCreateCall.html) and [*list*](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/struct.CompanyListCall.html) + * [*log*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.ClientMessageLogCall.html) +* [companies](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.Company.html) + * [*get*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.CompanyGetCall.html), [*leads create*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.CompanyLeadCreateCall.html) and [*list*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.CompanyListCall.html) +* exams + * [*get token*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.ExamGetTokenCall.html) +* [leads](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.Lead.html) + * [*list*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.LeadListCall.html) +* offers + * [*history list*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.OfferHistoryListCall.html) and [*list*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.OfferListCall.html) * user events - * [*log*](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/struct.UserEventLogCall.html) + * [*log*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.UserEventLogCall.html) * user states - * [*list*](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/struct.UserStateListCall.html) + * [*list*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.UserStateListCall.html) +* [users](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.User.html) + * [*create company relation*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.UserCreateCompanyRelationCall.html), [*delete company relation*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.UserDeleteCompanyRelationCall.html), [*get*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.UserGetCall.html) and [*update profile*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.UserUpdateProfileCall.html) +Other activities are ... + +* [get partnersstatus](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.MethodGetPartnersstatuCall.html) +* [update companies](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.MethodUpdateCompanyCall.html) +* [update leads](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.MethodUpdateLeadCall.html) @@ -29,17 +44,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/struct.Partners.html)** +* **[Hub](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/struct.Partners.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.Part.html)** + * **[Parts](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -53,7 +68,10 @@ let r = hub.resource().activity(...).doit() Or specifically ... ```ignore -let r = hub.user_events().log(...).doit() +let r = hub.users().create_company_relation(...).doit() +let r = hub.users().get(...).doit() +let r = hub.users().update_profile(...).doit() +let r = hub.users().delete_company_relation(...).doit() ``` The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -78,7 +96,7 @@ google-partners2 = "*" extern crate hyper; extern crate yup_oauth2 as oauth2; extern crate google_partners2 as partners2; -use partners2::LogUserEventRequest; +use partners2::CompanyRelation; use partners2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -99,12 +117,19 @@ let mut hub = Partners::new(hyper::Client::new(), 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 = LogUserEventRequest::default(); +let mut req = CompanyRelation::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.user_events().log(req) +let result = hub.users().create_company_relation(req, "userId") + .request_metadata_user_overrides_user_id("sit") + .request_metadata_user_overrides_ip_address("Stet") + .request_metadata_traffic_source_traffic_sub_id("sed") + .request_metadata_traffic_source_traffic_source_id("et") + .request_metadata_partners_session_id("dolores") + .request_metadata_locale("kasd") + .add_request_metadata_experiment_ids("accusam") .doit(); match result { @@ -127,17 +152,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.Delegate.html), 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-partners2/1.0.4+20151009/google_partners2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.ResponseResult.html), 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")`. @@ -147,29 +172,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.CallBuilder.html) 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-partners2/1.0.4+20151009/google_partners2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-partners2/1.0.4+20151009/google_partners2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.CallBuilder.html), 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-partners2/1.0.4+20151009/google_partners2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-partners2/1.0.4+20170503/google_partners2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/partners2/src/lib.rs b/gen/partners2/src/lib.rs index 3ef052feaf..4f4635fb3f 100644 --- a/gen/partners2/src/lib.rs +++ b/gen/partners2/src/lib.rs @@ -2,24 +2,39 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *partners* crate version *1.0.4+20151009*, where *20151009* is the exact revision of the *partners:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Partners* crate version *1.0.4+20170503*, where *20170503* is the exact revision of the *partners:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! -//! Everything else about the *partners* *v2* API can be found at the +//! Everything else about the *Partners* *v2* API can be found at the //! [official documentation site](https://developers.google.com/partners/). //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/partners2). //! # Features //! //! Handle the following *Resources* with ease from the central [hub](struct.Partners.html) ... //! +//! * analytics +//! * [*list*](struct.AnalyticListCall.html) //! * client messages //! * [*log*](struct.ClientMessageLogCall.html) //! * [companies](struct.Company.html) //! * [*get*](struct.CompanyGetCall.html), [*leads create*](struct.CompanyLeadCreateCall.html) and [*list*](struct.CompanyListCall.html) +//! * exams +//! * [*get token*](struct.ExamGetTokenCall.html) +//! * [leads](struct.Lead.html) +//! * [*list*](struct.LeadListCall.html) +//! * offers +//! * [*history list*](struct.OfferHistoryListCall.html) and [*list*](struct.OfferListCall.html) //! * user events //! * [*log*](struct.UserEventLogCall.html) //! * user states //! * [*list*](struct.UserStateListCall.html) +//! * [users](struct.User.html) +//! * [*create company relation*](struct.UserCreateCompanyRelationCall.html), [*delete company relation*](struct.UserDeleteCompanyRelationCall.html), [*get*](struct.UserGetCall.html) and [*update profile*](struct.UserUpdateProfileCall.html) //! +//! Other activities are ... +//! +//! * [get partnersstatus](struct.MethodGetPartnersstatuCall.html) +//! * [update companies](struct.MethodUpdateCompanyCall.html) +//! * [update leads](struct.MethodUpdateLeadCall.html) //! //! //! @@ -53,7 +68,10 @@ //! Or specifically ... //! //! ```ignore -//! let r = hub.user_events().log(...).doit() +//! let r = hub.users().create_company_relation(...).doit() +//! let r = hub.users().get(...).doit() +//! let r = hub.users().update_profile(...).doit() +//! let r = hub.users().delete_company_relation(...).doit() //! ``` //! //! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -78,7 +96,7 @@ //! extern crate hyper; //! extern crate yup_oauth2 as oauth2; //! extern crate google_partners2 as partners2; -//! use partners2::LogUserEventRequest; +//! use partners2::CompanyRelation; //! use partners2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; @@ -100,12 +118,19 @@ //! // 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 = LogUserEventRequest::default(); +//! let mut req = CompanyRelation::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.user_events().log(req) +//! let result = hub.users().create_company_relation(req, "userId") +//! .request_metadata_user_overrides_user_id("justo") +//! .request_metadata_user_overrides_ip_address("amet.") +//! .request_metadata_traffic_source_traffic_sub_id("erat") +//! .request_metadata_traffic_source_traffic_source_id("labore") +//! .request_metadata_partners_session_id("sea") +//! .request_metadata_locale("nonumy") +//! .add_request_metadata_experiment_ids("dolores") //! .doit(); //! //! match result { @@ -239,7 +264,7 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// extern crate hyper; /// extern crate yup_oauth2 as oauth2; /// extern crate google_partners2 as partners2; -/// use partners2::LogUserEventRequest; +/// use partners2::CompanyRelation; /// use partners2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; @@ -261,12 +286,19 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// // 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 = LogUserEventRequest::default(); +/// let mut req = CompanyRelation::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.user_events().log(req) +/// let result = hub.users().create_company_relation(req, "userId") +/// .request_metadata_user_overrides_user_id("sadipscing") +/// .request_metadata_user_overrides_ip_address("aliquyam") +/// .request_metadata_traffic_source_traffic_sub_id("ea") +/// .request_metadata_traffic_source_traffic_source_id("no") +/// .request_metadata_partners_session_id("justo") +/// .request_metadata_locale("justo") +/// .add_request_metadata_experiment_ids("et") /// .doit(); /// /// match result { @@ -306,18 +338,36 @@ impl<'a, C, A> Partners } } + pub fn analytics(&'a self) -> AnalyticMethods<'a, C, A> { + AnalyticMethods { hub: &self } + } pub fn client_messages(&'a self) -> ClientMessageMethods<'a, C, A> { ClientMessageMethods { hub: &self } } pub fn companies(&'a self) -> CompanyMethods<'a, C, A> { CompanyMethods { hub: &self } } + pub fn exams(&'a self) -> ExamMethods<'a, C, A> { + ExamMethods { hub: &self } + } + pub fn leads(&'a self) -> LeadMethods<'a, C, A> { + LeadMethods { hub: &self } + } + pub fn methods(&'a self) -> MethodMethods<'a, C, A> { + MethodMethods { hub: &self } + } + pub fn offers(&'a self) -> OfferMethods<'a, C, A> { + OfferMethods { hub: &self } + } pub fn user_events(&'a self) -> UserEventMethods<'a, C, A> { UserEventMethods { hub: &self } } pub fn user_states(&'a self) -> UserStateMethods<'a, C, A> { UserStateMethods { hub: &self } } + pub fn users(&'a self) -> UserMethods<'a, C, A> { + UserMethods { hub: &self } + } /// Set the user-agent header field to use in all requests to the server. /// It defaults to `google-api-rust-client/1.0.4`. @@ -334,7 +384,806 @@ impl<'a, C, A> Partners // ############ // SCHEMAS ### // ########## -/// Response message for LogUserEvent. +/// Response message for +/// ListUserStates. +/// +/// # 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*). +/// +/// * [list user states](struct.UserStateListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListUserStatesResponse { + /// User's states. + #[serde(rename="userStates")] + pub user_states: Option>, + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, +} + +impl ResponseResult for ListUserStatesResponse {} + + +/// Values to use instead of the user's respective defaults. These are only +/// honored by whitelisted products. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UserOverrides { + /// IP address to use instead of the user's geo-located IP address. + #[serde(rename="ipAddress")] + pub ip_address: Option, + /// Logged-in user ID to impersonate instead of the user's ID. + #[serde(rename="userId")] + pub user_id: Option, +} + +impl Part for UserOverrides {} + + +/// A lead resource that represents an advertiser contact for a `Company`. These +/// are usually generated via Google Partner Search (the advertiser portal). +/// +/// # 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*). +/// +/// * [list leads](struct.LeadListCall.html) (none) +/// * [update leads](struct.MethodUpdateLeadCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Lead { + /// Whether or not the lead signed up for marketing emails + #[serde(rename="marketingOptIn")] + pub marketing_opt_in: Option, + /// Language code of the lead's language preference, as defined by + /// BCP 47 + /// (IETF BCP 47, "Tags for Identifying Languages"). + #[serde(rename="languageCode")] + pub language_code: Option, + /// List of reasons for using Google Partner Search and creating a lead. + #[serde(rename="gpsMotivations")] + pub gps_motivations: Option>, + /// ID of the lead. + pub id: Option, + /// Last name of lead source. + #[serde(rename="familyName")] + pub family_name: Option, + /// The minimum monthly budget lead source is willing to spend. + #[serde(rename="minMonthlyBudget")] + pub min_monthly_budget: Option, + /// Comments lead source gave. + pub comments: Option, + /// Email address of lead source. + pub email: Option, + /// Website URL of lead source. + #[serde(rename="websiteUrl")] + pub website_url: Option, + /// The lead's state in relation to the company. + pub state: Option, + /// Phone number of lead source. + #[serde(rename="phoneNumber")] + pub phone_number: Option, + /// The AdWords Customer ID of the lead. + #[serde(rename="adwordsCustomerId")] + pub adwords_customer_id: Option, + /// First name of lead source. + #[serde(rename="givenName")] + pub given_name: Option, + /// Type of lead. + #[serde(rename="type")] + pub type_: Option, + /// Timestamp of when this lead was created. + #[serde(rename="createTime")] + pub create_time: Option, +} + +impl RequestValue for Lead {} +impl Resource for Lead {} +impl ResponseResult for Lead {} + + +/// Debug information about this request. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct DebugInfo { + /// Server-side debug stack trace. + #[serde(rename="serverTraceInfo")] + pub server_trace_info: Option, + /// URL of the service that handled this request. + #[serde(rename="serviceUrl")] + pub service_url: Option, + /// Info about the server that serviced this request. + #[serde(rename="serverInfo")] + pub server_info: Option, +} + +impl Part for DebugInfo {} + + +/// Response message for +/// LogClientMessage. +/// +/// # 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*). +/// +/// * [log client messages](struct.ClientMessageLogCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct LogMessageResponse { + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, +} + +impl ResponseResult for LogMessageResponse {} + + +/// Available Offers to be distributed. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AvailableOffer { + /// The number of codes for this offer that are available for distribution. + pub available: Option, + /// Offer info by country. + #[serde(rename="countryOfferInfos")] + pub country_offer_infos: Option>, + /// Customers who qualify for this offer. + #[serde(rename="qualifiedCustomer")] + pub qualified_customer: Option>, + /// Terms of the offer. + pub terms: Option, + /// Description of the offer. + pub description: Option, + /// The maximum age of an account [in days] to be eligible. + #[serde(rename="maxAccountAge")] + pub max_account_age: Option, + /// Level of this offer. + #[serde(rename="offerLevel")] + pub offer_level: Option, + /// Should special text be shown on the offers page. + #[serde(rename="showSpecialOfferCopy")] + pub show_special_offer_copy: Option, + /// Type of offer. + #[serde(rename="offerType")] + pub offer_type: Option, + /// ID of this offer. + pub id: Option, + /// Whether or not the list of qualified customers is definitely complete. + #[serde(rename="qualifiedCustomersComplete")] + pub qualified_customers_complete: Option, + /// Name of the offer. + pub name: Option, +} + +impl Part for AvailableOffer {} + + +/// Response for ListOffer. +/// +/// # 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*). +/// +/// * [list offers](struct.OfferListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListOffersResponse { + /// Reason why no Offers are available. + #[serde(rename="noOfferReason")] + pub no_offer_reason: Option, + /// Available Offers to be distributed. + #[serde(rename="availableOffers")] + pub available_offers: Option>, + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, +} + +impl ResponseResult for ListOffersResponse {} + + +/// The localized company information. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct LocalizedCompanyInfo { + /// List of country codes for the localized company info. + #[serde(rename="countryCodes")] + pub country_codes: Option>, + /// Language code of the localized company info, as defined by + /// BCP 47 + /// (IETF BCP 47, "Tags for Identifying Languages"). + #[serde(rename="languageCode")] + pub language_code: Option, + /// Localized display name. + #[serde(rename="displayName")] + pub display_name: Option, + /// Localized brief description that the company uses to advertise themselves. + pub overview: Option, +} + +impl Part for LocalizedCompanyInfo {} + + +/// A location with address and geographic coordinates. May optionally contain a +/// detailed (multi-field) version of the address. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Location { + /// Language code of the address. Should be in BCP 47 format. + #[serde(rename="languageCode")] + pub language_code: Option, + /// The following address lines represent the most specific part of any + /// address. + #[serde(rename="addressLine")] + pub address_line: Option>, + /// Generally refers to the city/town portion of an address. + pub locality: Option, + /// Use of this code is very country-specific, but will refer to a secondary + /// classification code for sorting mail. + #[serde(rename="sortingCode")] + pub sorting_code: Option, + /// The latitude and longitude of the location, in degrees. + #[serde(rename="latLng")] + pub lat_lng: Option, + /// Dependent locality or sublocality. Used for UK dependent localities, or + /// neighborhoods or boroughs in other locations. + #[serde(rename="dependentLocality")] + pub dependent_locality: Option, + /// CLDR (Common Locale Data Repository) region code . + #[serde(rename="regionCode")] + pub region_code: Option, + /// Top-level administrative subdivision of this country. + #[serde(rename="administrativeArea")] + pub administrative_area: Option, + /// The single string version of the address. + pub address: Option, + /// Values are frequently alphanumeric. + #[serde(rename="postalCode")] + pub postal_code: Option, +} + +impl Part for Location {} + + +/// Response message for +/// ListCompanies. +/// +/// # 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*). +/// +/// * [list companies](struct.CompanyListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListCompaniesResponse { + /// A token to retrieve next page of results. + /// Pass this value in the `ListCompaniesRequest.page_token` field in the + /// subsequent call to + /// ListCompanies to retrieve the + /// next page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of companies. + pub companies: Option>, + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, +} + +impl ResponseResult for ListCompaniesResponse {} + + +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. +/// +/// # 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*). +/// +/// * [delete company relation users](struct.UserDeleteCompanyRelationCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Empty { _never_set: Option } + +impl ResponseResult for Empty {} + + +/// A set of opt-ins for a user. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct OptIns { + /// An opt-in about receiving email regarding new features and products. + #[serde(rename="specialOffers")] + pub special_offers: Option, + /// An opt-in about receiving email from Partners marketing teams. Includes + /// member-only events and special promotional offers for Google products. + #[serde(rename="marketComm")] + pub market_comm: Option, + /// An opt-in to allow recieivng phone calls about their Partners account. + #[serde(rename="phoneContact")] + pub phone_contact: Option, + /// An opt-in to receive special promotional gifts and material in the mail. + #[serde(rename="physicalMail")] + pub physical_mail: Option, + /// An opt-in about receiving email with customized AdWords campaign management + /// tips. + #[serde(rename="performanceSuggestions")] + pub performance_suggestions: Option, +} + +impl Part for OptIns {} + + +/// Details of the analytics events for a `Company` within a single day. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AnalyticsDataPoint { + /// Location information of where these events occurred. + #[serde(rename="eventLocations")] + pub event_locations: Option>, + /// Number of times the type of event occurred. + /// Meaning depends on context (e.g. profile views, contacts, etc.). + #[serde(rename="eventCount")] + pub event_count: Option, +} + +impl Part for AnalyticsDataPoint {} + + +/// Offer info by country. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CountryOfferInfo { + /// (localized) Spend X amount for that country's offer. + #[serde(rename="spendXAmount")] + pub spend_x_amount: Option, + /// Country code for which offer codes may be requested. + #[serde(rename="offerCountryCode")] + pub offer_country_code: Option, + /// Type of offer country is eligible for. + #[serde(rename="offerType")] + pub offer_type: Option, + /// (localized) Get Y amount for that country's offer. + #[serde(rename="getYAmount")] + pub get_y_amount: Option, +} + +impl Part for CountryOfferInfo {} + + +/// Response message for CreateLead. +/// +/// # 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*). +/// +/// * [leads create companies](struct.CompanyLeadCreateCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CreateLeadResponse { + /// Lead that was created depending on the outcome of + /// reCaptcha validation. + pub lead: Option, + /// The outcome of reCaptcha + /// validation. + #[serde(rename="recaptchaStatus")] + pub recaptcha_status: Option, + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, +} + +impl ResponseResult for CreateLeadResponse {} + + +/// A company resource in the Google Partners API. Once certified, it qualifies +/// for being searched by advertisers. +/// +/// # 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*). +/// +/// * [update companies](struct.MethodUpdateCompanyCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Company { + /// Company type labels listed on the company's profile. + #[serde(rename="companyTypes")] + pub company_types: Option>, + /// The unconverted minimum monthly budget that the company accepts for partner + /// business. + #[serde(rename="originalMinMonthlyBudget")] + pub original_min_monthly_budget: Option, + /// The list of Google Partners specialization statuses for the company. + #[serde(rename="specializationStatus")] + pub specialization_status: Option>, + /// The public viewability status of the company's profile. + #[serde(rename="profileStatus")] + pub profile_status: Option, + /// The list of all company locations. + /// If set, must include the + /// primary_location + /// in the list. + pub locations: Option>, + /// The primary location of the company. + #[serde(rename="primaryLocation")] + pub primary_location: Option, + /// URL of the company's additional websites used to verify the dynamic badges. + /// These are stored as full URLs as entered by the user, but only the TLD will + /// be used for the actual verification. + #[serde(rename="additionalWebsites")] + pub additional_websites: Option>, + /// Services the company can help with. + pub services: Option>, + /// Basic information from the company's public profile. + #[serde(rename="publicProfile")] + pub public_profile: Option, + /// The ID of the company. + pub id: Option, + /// Industries the company can help with. + pub industries: Option>, + /// URL of the company's website. + #[serde(rename="websiteUrl")] + pub website_url: Option, + /// Email domains that allow users with a matching email address to get + /// auto-approved for associating with this company. + #[serde(rename="autoApprovalEmailDomains")] + pub auto_approval_email_domains: Option>, + /// The name of the company. + pub name: Option, + /// Information related to the ranking of the company within the list of + /// companies. + pub ranks: Option>, + /// Partner badge tier + #[serde(rename="badgeTier")] + pub badge_tier: Option, + /// The list of localized info for the company. + #[serde(rename="localizedInfos")] + pub localized_infos: Option>, + /// The Primary AdWords Manager Account id. + #[serde(rename="primaryAdwordsManagerAccountId")] + pub primary_adwords_manager_account_id: Option, + /// The primary language code of the company, as defined by + /// BCP 47 + /// (IETF BCP 47, "Tags for Identifying Languages"). + #[serde(rename="primaryLanguageCode")] + pub primary_language_code: Option, + /// The list of Google Partners certification statuses for the company. + #[serde(rename="certificationStatuses")] + pub certification_statuses: Option>, + /// The minimum monthly budget that the company accepts for partner business, + /// converted to the requested currency code. + #[serde(rename="convertedMinMonthlyBudget")] + pub converted_min_monthly_budget: Option, +} + +impl RequestValue for Company {} +impl ResponseResult for Company {} + + +/// Request message for +/// LogClientMessage. +/// +/// # 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*). +/// +/// * [log client messages](struct.ClientMessageLogCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct LogMessageRequest { + /// Map of client info, such as URL, browser navigator, browser platform, etc. + #[serde(rename="clientInfo")] + pub client_info: Option>, + /// Current request metadata. + #[serde(rename="requestMetadata")] + pub request_metadata: Option, + /// Details about the client message. + pub details: Option, + /// Message level of client message. + pub level: Option, +} + +impl RequestValue for LogMessageRequest {} + + +/// Information about a particular AdWords Manager Account. +/// Read more at https://support.google.com/adwords/answer/6139186 +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AdWordsManagerAccountInfo { + /// The AdWords Manager Account id. + pub id: Option, + /// Name of the customer this account represents. + #[serde(rename="customerName")] + pub customer_name: Option, +} + +impl Part for AdWordsManagerAccountInfo {} + + +/// Response for ListOfferHistory. +/// +/// # 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*). +/// +/// * [history list offers](struct.OfferHistoryListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListOffersHistoryResponse { + /// Supply this token in a ListOffersHistoryRequest to retrieve the next page. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// True if this response is showing entire company history. + #[serde(rename="showingEntireCompany")] + pub showing_entire_company: Option, + /// True if the user has the option to show entire company history. + #[serde(rename="canShowEntireCompany")] + pub can_show_entire_company: Option, + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, + /// Historical offers meeting request. + pub offers: Option>, + /// Number of results across all pages. + #[serde(rename="totalResults")] + pub total_results: Option, +} + +impl ResponseResult for ListOffersHistoryResponse {} + + +/// Response message for +/// ListAnalytics. +/// +/// # 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*). +/// +/// * [list analytics](struct.AnalyticListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListAnalyticsResponse { + /// A token to retrieve next page of results. + /// Pass this value in the `ListAnalyticsRequest.page_token` field in the + /// subsequent call to + /// ListAnalytics to retrieve the + /// next page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of analytics. + /// Sorted in ascending order of + /// Analytics.event_date. + pub analytics: Option>, + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, + /// Aggregated information across the response's + /// analytics. + #[serde(rename="analyticsSummary")] + pub analytics_summary: Option, +} + +impl ResponseResult for ListAnalyticsResponse {} + + +/// Response message for GetCompany. +/// +/// # 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*). +/// +/// * [get companies](struct.CompanyGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetCompanyResponse { + /// The company. + pub company: Option, + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, +} + +impl ResponseResult for GetCompanyResponse {} + + +/// Common data that is in each API request. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct RequestMetadata { + /// Locale to use for the current request. + pub locale: Option, + /// Google Partners session ID. + #[serde(rename="partnersSessionId")] + pub partners_session_id: Option, + /// Experiment IDs the current request belongs to. + #[serde(rename="experimentIds")] + pub experiment_ids: Option>, + /// Values to use instead of the user's respective defaults for the current + /// request. These are only honored by whitelisted products. + #[serde(rename="userOverrides")] + pub user_overrides: Option, + /// Source of traffic for the current request. + #[serde(rename="trafficSource")] + pub traffic_source: Option, +} + +impl Part for RequestMetadata {} + + +/// A resource representing a user of the Partners platform. +/// +/// # 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*). +/// +/// * [create company relation users](struct.UserCreateCompanyRelationCall.html) (none) +/// * [get users](struct.UserGetCall.html) (response) +/// * [update profile users](struct.UserUpdateProfileCall.html) (none) +/// * [delete company relation users](struct.UserDeleteCompanyRelationCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct User { + /// The email address used by the user used for company verification. + /// @OutputOnly + #[serde(rename="companyVerificationEmail")] + pub company_verification_email: Option, + /// The profile information of a Partners user, contains all the directly + /// editable user information. + pub profile: Option, + /// The list of achieved certifications. These are calculated based on exam + /// results and other requirements. + /// @OutputOnly + #[serde(rename="certificationStatus")] + pub certification_status: Option>, + /// This is the list of AdWords Manager Accounts the user has edit access to. + /// If the user has edit access to multiple accounts, the user can choose the + /// preferred account and we use this when a personal account is needed. Can + /// be empty meaning the user has access to no accounts. + /// @OutputOnly + #[serde(rename="availableAdwordsManagerAccounts")] + pub available_adwords_manager_accounts: Option>, + /// The company that the user is associated with. + /// If not present, the user is not associated with any company. + pub company: Option, + /// The most recent time the user interacted with the Partners site. + /// @OutputOnly + #[serde(rename="lastAccessTime")] + pub last_access_time: Option, + /// The list of exams the user ever taken. For each type of exam, only one + /// entry is listed. + #[serde(rename="examStatus")] + pub exam_status: Option>, + /// The list of emails the user has access to/can select as primary. + /// @OutputOnly + #[serde(rename="primaryEmails")] + pub primary_emails: Option>, + /// Information about a user's external public profile outside Google Partners. + #[serde(rename="publicProfile")] + pub public_profile: Option, + /// The ID of the user. + pub id: Option, +} + +impl Resource for User {} +impl ResponseResult for User {} + + +/// Represents a whole calendar date, e.g. date of birth. The time of day and +/// time zone are either specified elsewhere or are not significant. The date +/// is relative to the Proleptic Gregorian Calendar. The day may be 0 to +/// represent a year and month where the day is not significant, e.g. credit card +/// expiration date. The year may be 0 to represent a month and day independent +/// of year, e.g. anniversary date. Related types are google.type.TimeOfDay +/// and `google.protobuf.Timestamp`. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Date { + /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without + /// a year. + pub year: Option, + /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + /// if specifying a year/month where the day is not significant. + pub day: Option, + /// Month of year. Must be from 1 to 12. + pub month: Option, +} + +impl Part for Date {} + + +/// Basic information from a public profile. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct PublicProfile { + /// The URL of the public profile. + pub url: Option, + /// The URL to the main profile image of the public profile. + #[serde(rename="profileImage")] + pub profile_image: Option, + /// The URL to the main display image of the public profile. Being deprecated. + #[serde(rename="displayImageUrl")] + pub display_image_url: Option, + /// The display name of the public profile. + #[serde(rename="displayName")] + pub display_name: Option, + /// The ID which can be used to retrieve more details about the public profile. + pub id: Option, +} + +impl Part for PublicProfile {} + + +/// Response message for +/// GetPartnersStatus. +/// +/// # 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*). +/// +/// * [get partnersstatus](struct.MethodGetPartnersstatuCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetPartnersStatusResponse { + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, +} + +impl ResponseResult for GetPartnersStatusResponse {} + + +/// Response message for +/// LogUserEvent. /// /// # Activities /// @@ -359,10 +1208,14 @@ impl ResponseResult for LogUserEventResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TrafficSource { - /// Second level identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us. + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. #[serde(rename="trafficSubId")] pub traffic_sub_id: Option, - /// Identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us. + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. #[serde(rename="trafficSourceId")] pub traffic_source_id: Option, } @@ -376,115 +1229,165 @@ impl Part for TrafficSource {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CertificationStatus { - /// The type of the certification. - #[serde(rename="type")] - pub type_: Option, /// Whether certification is passing. #[serde(rename="isCertified")] pub is_certified: Option, /// List of certification exam statuses. #[serde(rename="examStatuses")] pub exam_statuses: Option>, + /// The type of the certification. + #[serde(rename="type")] + pub type_: Option, + /// Number of people who are certified, + #[serde(rename="userCount")] + pub user_count: Option, } impl Part for CertificationStatus {} -/// Response message for LogClientMessage. +/// Historical information about a Google Partners Offer. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct HistoricalOffer { + /// Status of the offer. + pub status: Option, + /// Offer code. + #[serde(rename="offerCode")] + pub offer_code: Option, + /// Country Code for the offer country. + #[serde(rename="offerCountryCode")] + pub offer_country_code: Option, + /// Client's AdWords page URL. + #[serde(rename="adwordsUrl")] + pub adwords_url: Option, + /// Time offer was first created. + #[serde(rename="creationTime")] + pub creation_time: Option, + /// ID of client. + #[serde(rename="clientId")] + pub client_id: Option, + /// Email address for client. + #[serde(rename="clientEmail")] + pub client_email: Option, + /// Time last action was taken. + #[serde(rename="lastModifiedTime")] + pub last_modified_time: Option, + /// Type of offer. + #[serde(rename="offerType")] + pub offer_type: Option, + /// Name (First + Last) of the partners user to whom the incentive is allocated. + #[serde(rename="senderName")] + pub sender_name: Option, + /// Time this offer expires. + #[serde(rename="expirationTime")] + pub expiration_time: Option, + /// Name of the client. + #[serde(rename="clientName")] + pub client_name: Option, +} + +impl Part for HistoricalOffer {} + + +/// Common data that is in each API response. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ResponseMetadata { + /// Debug information about this request. + #[serde(rename="debugInfo")] + pub debug_info: Option, +} + +impl Part for ResponseMetadata {} + + +/// A token that allows a user to take an exam. /// /// # 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*). /// -/// * [log client messages](struct.ClientMessageLogCall.html) (response) +/// * [get token exams](struct.ExamGetTokenCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct LogMessageResponse { - /// Current response metadata. - #[serde(rename="responseMetadata")] - pub response_metadata: Option, +pub struct ExamToken { + /// The type of the exam the token belongs to. + #[serde(rename="examType")] + pub exam_type: Option, + /// The token, only present if the user has access to the exam. + pub token: Option, + /// The id of the exam the token is for. + #[serde(rename="examId")] + pub exam_id: Option, } -impl ResponseResult for LogMessageResponse {} +impl ResponseResult for ExamToken {} -/// Values to use instead of the user's respective defaults. These are only honored by whitelisted products. +/// The profile information of a Partners user. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [update profile users](struct.UserUpdateProfileCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UserOverrides { - /// IP address to use instead of the user's geo-located IP address. - #[serde(rename="ipAddress")] - pub ip_address: Option, - /// Logged-in user ID to impersonate instead of the user's ID. - #[serde(rename="userId")] - pub user_id: Option, -} - -impl Part for UserOverrides {} - - -/// A lead resource that represents an advertiser contact for a `Company`. These are usually generated via Google Partner Search (the advertiser portal). -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Lead { - /// List of reasons for using Google Partner Search and creating a lead. - #[serde(rename="gpsMotivations")] - pub gps_motivations: Option>, - /// Last name of lead source. +pub struct UserProfile { + /// A list of ids representing which industries the user selected. + pub industries: Option>, + /// The user's primary country, an ISO 2-character code. + #[serde(rename="primaryCountryCode")] + pub primary_country_code: Option, + /// If the user has edit access to multiple accounts, the user can choose the + /// preferred account and it is used when a personal account is needed. Can + /// be empty. + #[serde(rename="adwordsManagerAccount")] + pub adwords_manager_account: Option, + /// A list of ids represnting which job categories the user selected. + #[serde(rename="jobFunctions")] + pub job_functions: Option>, + /// The list of opt-ins for the user, related to communication preferences. + #[serde(rename="emailOptIns")] + pub email_opt_ins: Option, + /// The user's family name. #[serde(rename="familyName")] pub family_name: Option, - /// The minimum monthly budget lead source is willing to spend. - #[serde(rename="minMonthlyBudget")] - pub min_monthly_budget: Option, - /// Comments lead source gave. - pub comments: Option, - /// ID of the lead. - pub id: Option, - /// Website URL of lead source. - #[serde(rename="websiteUrl")] - pub website_url: Option, - /// Phone number of lead source. + /// The list of languages this user understands. + pub languages: Option>, + /// The email address the user has selected on the Partners site as primary. + #[serde(rename="emailAddress")] + pub email_address: Option, + /// The user's mailing address, contains multiple fields. + pub address: Option, + /// The user's phone number. #[serde(rename="phoneNumber")] pub phone_number: Option, - /// First name of lead source. + /// The user's given name. #[serde(rename="givenName")] pub given_name: Option, - /// Type of lead. - #[serde(rename="type")] - pub type_: Option, - /// Email address of lead source. - pub email: Option, + /// A list of ids representing which markets the user was interested in. + pub markets: Option>, + /// Whether the user's public profile is visible to anyone with the URL. + #[serde(rename="profilePublic")] + pub profile_public: Option, + /// A list of ids representing which channels the user selected they were in. + pub channels: Option>, } -impl Part for Lead {} +impl RequestValue for UserProfile {} +impl ResponseResult for UserProfile {} -/// Debug information about this request. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct DebugInfo { - /// Server-side debug stack trace. - #[serde(rename="serverTraceInfo")] - pub server_trace_info: Option, - /// URL of the service that handled this request. - #[serde(rename="serviceUrl")] - pub service_url: Option, - /// Info about the server that serviced this request. - #[serde(rename="serverInfo")] - pub server_info: Option, -} - -impl Part for DebugInfo {} - - -/// Request message for LogUserEvent. +/// Request message for +/// LogUserEvent. /// /// # Activities /// @@ -505,83 +1408,83 @@ pub struct LogUserEventRequest { /// List of event data for the event. #[serde(rename="eventDatas")] pub event_datas: Option>, - /// The action that occurred. - #[serde(rename="eventAction")] - pub event_action: Option, - /// The scope of the event. - #[serde(rename="eventScope")] - pub event_scope: Option, /// The category the action belongs to. #[serde(rename="eventCategory")] pub event_category: Option, + /// The scope of the event. + #[serde(rename="eventScope")] + pub event_scope: Option, + /// The action that occurred. + #[serde(rename="eventAction")] + pub event_action: Option, } impl RequestValue for LogUserEventRequest {} -/// The localized company information. +/// A user's information on a specific exam. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct LocalizedCompanyInfo { - /// List of country codes for the localized company info. - #[serde(rename="countryCodes")] - pub country_codes: Option>, - /// Language code of the localized company info, as defined by BCP 47 (IETF BCP 47, "Tags for Identifying Languages"). - #[serde(rename="languageCode")] - pub language_code: Option, - /// Localized display name. - #[serde(rename="displayName")] - pub display_name: Option, - /// Localized brief description that the company uses to advertise themselves. - pub overview: Option, +pub struct ExamStatus { + /// The type of the exam. + #[serde(rename="examType")] + pub exam_type: Option, + /// Whether this exam is in the state of warning. + pub warning: Option, + /// Date this exam is due to expire. + pub expiration: Option, + /// Whether this exam has been passed and not expired. + pub passed: Option, + /// The date the user last taken this exam. + pub taken: Option, + /// The date the user last passed this exam. + #[serde(rename="lastPassed")] + pub last_passed: Option, } -impl Part for LocalizedCompanyInfo {} +impl Part for ExamStatus {} -/// A location with address and geographic coordinates. +/// Customers qualified for an offer. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Location { - /// The latitude and longitude of the location, in degrees. - #[serde(rename="latLng")] - pub lat_lng: Option, - /// The complete address of the location. - pub address: Option, +pub struct OfferCustomer { + /// Name of the customer. + pub name: Option, + /// Country code of the customer. + #[serde(rename="countryCode")] + pub country_code: Option, + /// Formatted Spend X amount with currency code. + #[serde(rename="spendXAmount")] + pub spend_x_amount: Option, + /// URL to the customer's AdWords page. + #[serde(rename="adwordsUrl")] + pub adwords_url: Option, + /// Time the customer was created. + #[serde(rename="creationTime")] + pub creation_time: Option, + /// External CID for the customer. + #[serde(rename="externalCid")] + pub external_cid: Option, + /// Days the customer is still eligible. + #[serde(rename="eligibilityDaysLeft")] + pub eligibility_days_left: Option, + /// Formatted Get Y amount with currency code. + #[serde(rename="getYAmount")] + pub get_y_amount: Option, + /// Type of the offer + #[serde(rename="offerType")] + pub offer_type: Option, } -impl Part for Location {} +impl Part for OfferCustomer {} -/// Response message for ListCompanies. -/// -/// # 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*). -/// -/// * [list companies](struct.CompanyListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListCompaniesResponse { - /// A token to retrieve next page of results. Pass this value in the `ListCompaniesRequest.page_token` field in the subsequent call to ListCompanies to retrieve the next page of results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The list of companies. - pub companies: Option>, - /// Current response metadata. - #[serde(rename="responseMetadata")] - pub response_metadata: Option, -} - -impl ResponseResult for ListCompaniesResponse {} - - -/// reCaptcha challenge info. +/// reCaptcha challenge info. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -596,6 +1499,37 @@ pub struct RecaptchaChallenge { impl Part for RecaptchaChallenge {} +/// Response message for ListLeads. +/// +/// # 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*). +/// +/// * [list leads](struct.LeadListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListLeadsResponse { + /// A token to retrieve next page of results. + /// Pass this value in the `ListLeadsRequest.page_token` field in the + /// subsequent call to + /// ListLeads to retrieve the + /// next page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The total count of leads for the given company. + #[serde(rename="totalSize")] + pub total_size: Option, + /// Current response metadata. + #[serde(rename="responseMetadata")] + pub response_metadata: Option, + /// The list of leads. + pub leads: Option>, +} + +impl ResponseResult for ListLeadsResponse {} + + /// Status for a Google Partners certification exam. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -613,28 +1547,66 @@ pub struct CertificationExamStatus { impl Part for CertificationExamStatus {} -/// Response message for CreateLead. Debug information about this request. +/// Agency specialization status /// -/// # 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*). -/// -/// * [leads create companies](struct.CompanyLeadCreateCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CreateLeadResponse { - /// Lead that was created depending on the outcome of reCaptcha validation. - pub lead: Option, - /// The outcome of reCaptcha validation. - #[serde(rename="recaptchaStatus")] - pub recaptcha_status: Option, - /// Current response metadata. - #[serde(rename="responseMetadata")] - pub response_metadata: Option, +pub struct SpecializationStatus { + /// The specialization this status is for. + #[serde(rename="badgeSpecialization")] + pub badge_specialization: Option, + /// State of agency specialization. + #[serde(rename="badgeSpecializationState")] + pub badge_specialization_state: Option, } -impl ResponseResult for CreateLeadResponse {} +impl Part for SpecializationStatus {} + + +/// Analytics aggregated data for a `Company` for a given date range. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AnalyticsSummary { + /// Aggregated number of times users contacted the `Company` + /// for given date range. + #[serde(rename="contactsCount")] + pub contacts_count: Option, + /// Aggregated number of times users saw the `Company` + /// in Google Partners Search results for given date range. + #[serde(rename="searchViewsCount")] + pub search_views_count: Option, + /// Aggregated number of profile views for the `Company` for given date range. + #[serde(rename="profileViewsCount")] + pub profile_views_count: Option, +} + +impl Part for AnalyticsSummary {} + + +/// A user's information on a specific certification. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Certification { + /// Whether this certification has been achieved. + pub achieved: Option, + /// Whether this certification is in the state of warning. + pub warning: Option, + /// The date the user last achieved certification. + #[serde(rename="lastAchieved")] + pub last_achieved: Option, + /// Date this certification is due to expire. + pub expiration: Option, + /// The type of certification, the area of expertise. + #[serde(rename="certificationType")] + pub certification_type: Option, +} + +impl Part for Certification {} /// Represents an amount of money with its currency type. @@ -643,10 +1615,16 @@ impl ResponseResult for CreateLeadResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Money { - /// The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - pub units: Option, - /// Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + /// Number of nano (10^-9) units of the amount. + /// The value must be between -999,999,999 and +999,999,999 inclusive. + /// If `units` is positive, `nanos` must be positive or zero. + /// If `units` is zero, `nanos` can be positive, zero, or negative. + /// If `units` is negative, `nanos` must be negative or zero. + /// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. pub nanos: Option, + /// The whole units of the amount. + /// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + pub units: Option, /// The 3-letter currency code defined in ISO 4217. #[serde(rename="currencyCode")] pub currency_code: Option, @@ -655,92 +1633,60 @@ pub struct Money { impl Part for Money {} -/// A company resource in the Google Partners API. Once certified, it qualifies for being searched by advertisers. +/// An object representing a latitude/longitude pair. This is expressed as a pair +/// of doubles representing degrees latitude and degrees longitude. Unless +/// specified otherwise, this must conform to the +/// WGS84 +/// standard. Values must be within normalized ranges. +/// +/// Example of normalization code in Python: +/// +/// def NormalizeLongitude(longitude): +/// """Wraps decimal degrees longitude to [-180.0, 180.0].""" +/// q, r = divmod(longitude, 360.0) +/// if r > 180.0 or (r == 180.0 and q <= -1.0): +/// return r - 360.0 +/// return r +/// +/// def NormalizeLatLng(latitude, longitude): +/// """Wraps decimal degrees latitude and longitude to +/// [-90.0, 90.0] and [-180.0, 180.0], respectively.""" +/// r = latitude % 360.0 +/// if r <= 90.0: +/// return r, NormalizeLongitude(longitude) +/// elif r >= 270.0: +/// return r - 360, NormalizeLongitude(longitude) +/// else: +/// return 180 - r, NormalizeLongitude(longitude + 180.0) +/// +/// assert 180.0 == NormalizeLongitude(180.0) +/// assert -180.0 == NormalizeLongitude(-180.0) +/// assert -179.0 == NormalizeLongitude(181.0) +/// assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) +/// assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) +/// assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) +/// assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) +/// assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) +/// assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) +/// assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) +/// assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) +/// assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) +/// assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) +/// +/// The code in logs/storage/validator/logs_validator_traits.cc treats this type +/// as if it were annotated as ST_LOCATION. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Company { - /// Industries the company can help with. - pub industries: Option>, - /// The unconverted minimum monthly budget that the company accepts for partner business. - #[serde(rename="originalMinMonthlyBudget")] - pub original_min_monthly_budget: Option, - /// The minimum monthly budget that the company accepts for partner business, converted to the requested currency code. - #[serde(rename="convertedMinMonthlyBudget")] - pub converted_min_monthly_budget: Option, - /// The name of the company. - pub name: Option, - /// The list of localized info for the company. - #[serde(rename="localizedInfos")] - pub localized_infos: Option>, - /// The list of company locations. - pub locations: Option>, - /// URL of the company's website. - #[serde(rename="websiteUrl")] - pub website_url: Option, - /// Information related to the ranking of the company within the list of companies. - pub ranks: Option>, - /// Services the company can help with. - pub services: Option>, - /// The list of Google Partners certification statuses for the company. - #[serde(rename="certificationStatuses")] - pub certification_statuses: Option>, - /// Basic information from the company's public profile. - #[serde(rename="publicProfile")] - pub public_profile: Option, - /// The ID of the company. - pub id: Option, +pub struct LatLng { + /// The latitude in degrees. It must be in the range [-90.0, +90.0]. + pub latitude: Option, + /// The longitude in degrees. It must be in the range [-180.0, +180.0]. + pub longitude: Option, } -impl Part for Company {} - - -/// Request message for LogClientMessage. -/// -/// # 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*). -/// -/// * [log client messages](struct.ClientMessageLogCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct LogMessageRequest { - /// Current request metadata. - #[serde(rename="requestMetadata")] - pub request_metadata: Option, - /// Map of client info, such as URL, browser navigator, browser platform, etc. - #[serde(rename="clientInfo")] - pub client_info: Option>, - /// Details about the client message. - pub details: Option, - /// Message level of client message. - pub level: Option, -} - -impl RequestValue for LogMessageRequest {} - - -/// Response message for GetCompany. -/// -/// # 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*). -/// -/// * [get companies](struct.CompanyGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GetCompanyResponse { - /// The company. - pub company: Option, - /// Current response metadata. - #[serde(rename="responseMetadata")] - pub response_metadata: Option, -} - -impl ResponseResult for GetCompanyResponse {} +impl Part for LatLng {} /// Information related to ranking of results. @@ -759,6 +1705,31 @@ pub struct Rank { impl Part for Rank {} +/// Analytics data for a `Company` within a single day. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Analytics { + /// Date on which these events occurred. + #[serde(rename="eventDate")] + pub event_date: Option, + /// Instances of users viewing the `Company` profile + /// on the specified date. + #[serde(rename="profileViews")] + pub profile_views: Option, + /// Instances of users seeing the `Company` in Google Partners Search results + /// on the specified date. + #[serde(rename="searchViews")] + pub search_views: Option, + /// Instances of users contacting the `Company` + /// on the specified date. + pub contacts: Option, +} + +impl Part for Analytics {} + + /// Request message for CreateLead. /// /// # Activities @@ -773,75 +1744,76 @@ pub struct CreateLeadRequest { /// Current request metadata. #[serde(rename="requestMetadata")] pub request_metadata: Option, - /// reCaptcha challenge info. + /// reCaptcha challenge info. #[serde(rename="recaptchaChallenge")] pub recaptcha_challenge: Option, - /// The lead resource. The `LeadType` must not be `LEAD_TYPE_UNSPECIFIED` and either `email` or `phone_number` must be provided. + /// The lead resource. The `LeadType` must not be `LEAD_TYPE_UNSPECIFIED` + /// and either `email` or `phone_number` must be provided. pub lead: Option, } impl RequestValue for CreateLeadRequest {} -/// Common data that is in each API request. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct RequestMetadata { - /// Locale to use for the current request. - pub locale: Option, - /// Google Partners session ID. - #[serde(rename="partnersSessionId")] - pub partners_session_id: Option, - /// Experiment IDs the current request belongs to. - #[serde(rename="experimentIds")] - pub experiment_ids: Option>, - /// Values to use instead of the user's respective defaults for the current request. These are only honored by whitelisted products. - #[serde(rename="userOverrides")] - pub user_overrides: Option, - /// Source of traffic for the current request. - #[serde(rename="trafficSource")] - pub traffic_source: Option, -} - -impl Part for RequestMetadata {} - - -/// Response message for ListUserStates. +/// A CompanyRelation resource representing information about a user's +/// affiliation and standing with a company in Partners. /// /// # 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*). /// -/// * [list user states](struct.UserStateListCall.html) (response) +/// * [create company relation users](struct.UserCreateCompanyRelationCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListUserStatesResponse { - /// User's states. - #[serde(rename="userStates")] - pub user_states: Option>, - /// Current response metadata. - #[serde(rename="responseMetadata")] - pub response_metadata: Option, +pub struct CompanyRelation { + /// The AdWords manager account # associated this company. + #[serde(rename="managerAccount")] + pub manager_account: Option, + /// The website URL for this company. + pub website: Option, + /// The name (in the company's primary language) for the company. + pub name: Option, + /// The ID of the company. There may be no id if this is a + /// pending company.5 + #[serde(rename="companyId")] + pub company_id: Option, + /// The flag that indicates if the company is pending verification. + #[serde(rename="isPending")] + pub is_pending: Option, + /// The primary address for this company. + pub address: Option, + /// The timestamp of when affiliation was requested. + /// @OutputOnly + #[serde(rename="creationTime")] + pub creation_time: Option, + /// Indicates if the user is an admin for this company. + #[serde(rename="companyAdmin")] + pub company_admin: Option, + /// Whether the company is a Partner. + #[serde(rename="badgeTier")] + pub badge_tier: Option, + /// The state of relationship, in terms of approvals. + pub state: Option, + /// The phone number for the company's primary address. + #[serde(rename="phoneNumber")] + pub phone_number: Option, + /// A URL to a profile photo, e.g. a G+ profile photo. + #[serde(rename="logoUrl")] + pub logo_url: Option, + /// The timestamp when the user was approved. + /// @OutputOnly + #[serde(rename="resolvedTimestamp")] + pub resolved_timestamp: Option, + /// The segment the company is classified as. + pub segment: Option>, + /// The list of Google Partners specialization statuses for the company. + #[serde(rename="specializationStatus")] + pub specialization_status: Option>, } -impl ResponseResult for ListUserStatesResponse {} - - -/// Common data that is in each API response. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ResponseMetadata { - /// Debug information about this request. - #[serde(rename="debugInfo")] - pub debug_info: Option, -} - -impl Part for ResponseMetadata {} +impl RequestValue for CompanyRelation {} +impl ResponseResult for CompanyRelation {} /// Key value data pair for an event. @@ -859,47 +1831,120 @@ pub struct EventData { impl Part for EventData {} -/// Basic information from a public profile. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct PublicProfile { - /// The URL of the public profile. - pub url: Option, - /// The URL to the main display image of the public profile. - #[serde(rename="displayImageUrl")] - pub display_image_url: Option, - /// The display name of the public profile. - #[serde(rename="displayName")] - pub display_name: Option, - /// The ID which can be used to retrieve more details about the public profile. - pub id: Option, -} - -impl Part for PublicProfile {} - - -/// An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. Example of normalization code in Python: def NormalizeLongitude(longitude): """Wrapsdecimal degrees longitude to [-180.0, 180.0].""" q, r = divmod(longitude, 360.0) if r > 180.0 or (r == 180.0 and q <= -1.0): return r - 360.0 return r def NormalizeLatLng(latitude, longitude): """Wraps decimal degrees latitude and longitude to [-180.0, 180.0] and [-90.0, 90.0], respectively.""" r = latitude % 360.0 if r = 270.0: return r - 360, NormalizeLongitude(longitude) else: return 180 - r, NormalizeLongitude(longitude + 180.0) assert 180.0 == NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0) assert -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct LatLng { - /// The latitude in degrees. It must be in the range [-90.0, +90.0]. - pub latitude: Option, - /// The longitude in degrees. It must be in the range [-180.0, +180.0]. - pub longitude: Option, -} - -impl Part for LatLng {} - - // ################### // MethodBuilders ### // ################# +/// A builder providing access to all free methods, which are not associated with a particular resource. +/// It is not used directly, but through the `Partners` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_partners2 as partners2; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use partners2::Partners; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Partners::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `get_partnersstatus(...)`, `update_companies(...)` and `update_leads(...)` +/// // to build up your call. +/// let rb = hub.methods(); +/// # } +/// ``` +pub struct MethodMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, +} + +impl<'a, C, A> MethodsBuilder for MethodMethods<'a, C, A> {} + +impl<'a, C, A> MethodMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Update company. + /// Should only be called within the context of an authorized logged in user. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn update_companies(&self, request: Company) -> MethodUpdateCompanyCall<'a, C, A> { + MethodUpdateCompanyCall { + hub: self.hub, + _request: request, + _update_mask: Default::default(), + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets Partners Status of the logged in user's agency. + /// Should only be called if the logged in user is the admin of the agency. + pub fn get_partnersstatus(&self) -> MethodGetPartnersstatuCall<'a, C, A> { + MethodGetPartnersstatuCall { + hub: self.hub, + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates the specified lead. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn update_leads(&self, request: Lead) -> MethodUpdateLeadCall<'a, C, A> { + MethodUpdateLeadCall { + hub: self.hub, + _request: request, + _update_mask: Default::default(), + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *userEvent* resources. /// It is not used directly, but through the `Partners` hub. /// @@ -997,7 +2042,9 @@ impl<'a, C, A> ClientMessageMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Logs a generic message from the client, such as `Failed to render component`, `Profile page is running slow`, `More than 500 users have accessed this result.`, etc. + /// Logs a generic message from the client, such as + /// `Failed to render component`, `Profile page is running slow`, + /// `More than 500 users have accessed this result.`, etc. /// /// # Arguments /// @@ -1105,6 +2152,7 @@ impl<'a, C, A> CompanyMethods<'a, C, A> { hub: self.hub, _website_url: Default::default(), _view: Default::default(), + _specializations: Default::default(), _services: Default::default(), _request_metadata_user_overrides_user_id: Default::default(), _request_metadata_user_overrides_ip_address: Default::default(), @@ -1135,6 +2183,276 @@ impl<'a, C, A> CompanyMethods<'a, C, A> { +/// A builder providing access to all methods supported on *lead* resources. +/// It is not used directly, but through the `Partners` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_partners2 as partners2; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use partners2::Partners; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Partners::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `list(...)` +/// // to build up your call. +/// let rb = hub.leads(); +/// # } +/// ``` +pub struct LeadMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, +} + +impl<'a, C, A> MethodsBuilder for LeadMethods<'a, C, A> {} + +impl<'a, C, A> LeadMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Lists advertiser leads for a user's associated company. + /// Should only be called within the context of an authorized logged in user. + pub fn list(&self) -> LeadListCall<'a, C, A> { + LeadListCall { + hub: self.hub, + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _page_token: Default::default(), + _page_size: Default::default(), + _order_by: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *analytic* resources. +/// It is not used directly, but through the `Partners` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_partners2 as partners2; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use partners2::Partners; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Partners::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `list(...)` +/// // to build up your call. +/// let rb = hub.analytics(); +/// # } +/// ``` +pub struct AnalyticMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, +} + +impl<'a, C, A> MethodsBuilder for AnalyticMethods<'a, C, A> {} + +impl<'a, C, A> AnalyticMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Lists analytics data for a user's associated company. + /// Should only be called within the context of an authorized logged in user. + pub fn list(&self) -> AnalyticListCall<'a, C, A> { + AnalyticListCall { + hub: self.hub, + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *offer* resources. +/// It is not used directly, but through the `Partners` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_partners2 as partners2; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use partners2::Partners; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Partners::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `history_list(...)` and `list(...)` +/// // to build up your call. +/// let rb = hub.offers(); +/// # } +/// ``` +pub struct OfferMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, +} + +impl<'a, C, A> MethodsBuilder for OfferMethods<'a, C, A> {} + +impl<'a, C, A> OfferMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Lists the Historical Offers for the current user (or user's entire company) + pub fn history_list(&self) -> OfferHistoryListCall<'a, C, A> { + OfferHistoryListCall { + hub: self.hub, + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _page_token: Default::default(), + _page_size: Default::default(), + _order_by: Default::default(), + _entire_company: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists the Offers available for the current user + pub fn list(&self) -> OfferListCall<'a, C, A> { + OfferListCall { + hub: self.hub, + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *exam* resources. +/// It is not used directly, but through the `Partners` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_partners2 as partners2; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use partners2::Partners; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Partners::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `get_token(...)` +/// // to build up your call. +/// let rb = hub.exams(); +/// # } +/// ``` +pub struct ExamMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, +} + +impl<'a, C, A> MethodsBuilder for ExamMethods<'a, C, A> {} + +impl<'a, C, A> ExamMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Gets an Exam Token for a Partner's user to take an exam in the Exams System + /// + /// # Arguments + /// + /// * `examType` - The exam type we are requesting a token for. + pub fn get_token(&self, exam_type: &str) -> ExamGetTokenCall<'a, C, A> { + ExamGetTokenCall { + hub: self.hub, + _exam_type: exam_type.to_string(), + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *userState* resources. /// It is not used directly, but through the `Partners` hub. /// @@ -1194,12 +2512,1074 @@ impl<'a, C, A> UserStateMethods<'a, C, A> { +/// A builder providing access to all methods supported on *user* resources. +/// It is not used directly, but through the `Partners` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_partners2 as partners2; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use partners2::Partners; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Partners::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `create_company_relation(...)`, `delete_company_relation(...)`, `get(...)` and `update_profile(...)` +/// // to build up your call. +/// let rb = hub.users(); +/// # } +/// ``` +pub struct UserMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, +} + +impl<'a, C, A> MethodsBuilder for UserMethods<'a, C, A> {} + +impl<'a, C, A> UserMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Updates a user's profile. A user can only update their own profile and + /// should only be called within the context of a logged in user. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn update_profile(&self, request: UserProfile) -> UserUpdateProfileCall<'a, C, A> { + UserUpdateProfileCall { + hub: self.hub, + _request: request, + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a user's company relation. Affiliates the user to a company. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userId` - The ID of the user. Can be set to me to mean + /// the currently authenticated user. + pub fn create_company_relation(&self, request: CompanyRelation, user_id: &str) -> UserCreateCompanyRelationCall<'a, C, A> { + UserCreateCompanyRelationCall { + hub: self.hub, + _request: request, + _user_id: user_id.to_string(), + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a user. + /// + /// # Arguments + /// + /// * `userId` - Identifier of the user. Can be set to me to mean the currently + /// authenticated user. + pub fn get(&self, user_id: &str) -> UserGetCall<'a, C, A> { + UserGetCall { + hub: self.hub, + _user_id: user_id.to_string(), + _user_view: Default::default(), + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Deletes a user's company relation. Unaffiliaites the user from a company. + /// + /// # Arguments + /// + /// * `userId` - The ID of the user. Can be set to me to mean + /// the currently authenticated user. + pub fn delete_company_relation(&self, user_id: &str) -> UserDeleteCompanyRelationCall<'a, C, A> { + UserDeleteCompanyRelationCall { + hub: self.hub, + _user_id: user_id.to_string(), + _request_metadata_user_overrides_user_id: Default::default(), + _request_metadata_user_overrides_ip_address: Default::default(), + _request_metadata_traffic_source_traffic_sub_id: Default::default(), + _request_metadata_traffic_source_traffic_source_id: Default::default(), + _request_metadata_partners_session_id: Default::default(), + _request_metadata_locale: Default::default(), + _request_metadata_experiment_ids: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + // ################### // CallBuilders ### // ################# +/// Update company. +/// Should only be called within the context of an authorized logged in user. +/// +/// A builder for the *updateCompanies* method. +/// It is not used directly, but through a `MethodMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// use partners2::Company; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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 = Company::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.methods().update_companies(req) +/// .update_mask("et") +/// .request_metadata_user_overrides_user_id("diam") +/// .request_metadata_user_overrides_ip_address("ipsum") +/// .request_metadata_traffic_source_traffic_sub_id("Lorem") +/// .request_metadata_traffic_source_traffic_source_id("et") +/// .request_metadata_partners_session_id("duo") +/// .request_metadata_locale("aliquyam") +/// .add_request_metadata_experiment_ids("sea") +/// .doit(); +/// # } +/// ``` +pub struct MethodUpdateCompanyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _request: Company, + _update_mask: Option, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for MethodUpdateCompanyCall<'a, C, A> {} + +impl<'a, C, A> MethodUpdateCompanyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Company)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.updateCompanies", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + if let Some(value) = self._update_mask { + params.push(("updateMask", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + for &field in ["alt", "updateMask", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/companies".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Company) -> MethodUpdateCompanyCall<'a, C, A> { + self._request = new_value; + self + } + /// Standard field mask for the set of fields to be updated. + /// Required with at least 1 value in FieldMask's paths. + /// + /// Sets the *update mask* query property to the given value. + pub fn update_mask(mut self, new_value: &str) -> MethodUpdateCompanyCall<'a, C, A> { + self._update_mask = Some(new_value.to_string()); + self + } + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> MethodUpdateCompanyCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> MethodUpdateCompanyCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> MethodUpdateCompanyCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> MethodUpdateCompanyCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> MethodUpdateCompanyCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> MethodUpdateCompanyCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> MethodUpdateCompanyCall<'a, C, A> { + self._request_metadata_experiment_ids.push(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. + /// + /// 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 Delegate) -> MethodUpdateCompanyCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> MethodUpdateCompanyCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Gets Partners Status of the logged in user's agency. +/// Should only be called if the logged in user is the admin of the agency. +/// +/// A builder for the *getPartnersstatus* method. +/// It is not used directly, but through a `MethodMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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.methods().get_partnersstatus() +/// .request_metadata_user_overrides_user_id("Lorem") +/// .request_metadata_user_overrides_ip_address("eos") +/// .request_metadata_traffic_source_traffic_sub_id("erat") +/// .request_metadata_traffic_source_traffic_source_id("sadipscing") +/// .request_metadata_partners_session_id("dolor") +/// .request_metadata_locale("eirmod") +/// .add_request_metadata_experiment_ids("elitr") +/// .doit(); +/// # } +/// ``` +pub struct MethodGetPartnersstatuCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for MethodGetPartnersstatuCall<'a, C, A> {} + +impl<'a, C, A> MethodGetPartnersstatuCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, GetPartnersStatusResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.getPartnersstatus", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + for &field in ["alt", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/partnersstatus".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> MethodGetPartnersstatuCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> MethodGetPartnersstatuCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> MethodGetPartnersstatuCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> MethodGetPartnersstatuCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> MethodGetPartnersstatuCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> MethodGetPartnersstatuCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> MethodGetPartnersstatuCall<'a, C, A> { + self._request_metadata_experiment_ids.push(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. + /// + /// 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 Delegate) -> MethodGetPartnersstatuCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> MethodGetPartnersstatuCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Updates the specified lead. +/// +/// A builder for the *updateLeads* method. +/// It is not used directly, but through a `MethodMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// use partners2::Lead; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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 = Lead::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.methods().update_leads(req) +/// .update_mask("amet") +/// .request_metadata_user_overrides_user_id("no") +/// .request_metadata_user_overrides_ip_address("labore") +/// .request_metadata_traffic_source_traffic_sub_id("eirmod") +/// .request_metadata_traffic_source_traffic_source_id("dolore") +/// .request_metadata_partners_session_id("invidunt") +/// .request_metadata_locale("aliquyam") +/// .add_request_metadata_experiment_ids("accusam") +/// .doit(); +/// # } +/// ``` +pub struct MethodUpdateLeadCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _request: Lead, + _update_mask: Option, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for MethodUpdateLeadCall<'a, C, A> {} + +impl<'a, C, A> MethodUpdateLeadCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Lead)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.updateLeads", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + if let Some(value) = self._update_mask { + params.push(("updateMask", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + for &field in ["alt", "updateMask", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/leads".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Lead) -> MethodUpdateLeadCall<'a, C, A> { + self._request = new_value; + self + } + /// Standard field mask for the set of fields to be updated. + /// Required with at least 1 value in FieldMask's paths. + /// Only `state` and `adwords_customer_id` are currently supported. + /// + /// Sets the *update mask* query property to the given value. + pub fn update_mask(mut self, new_value: &str) -> MethodUpdateLeadCall<'a, C, A> { + self._update_mask = Some(new_value.to_string()); + self + } + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> MethodUpdateLeadCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> MethodUpdateLeadCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> MethodUpdateLeadCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> MethodUpdateLeadCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> MethodUpdateLeadCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> MethodUpdateLeadCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> MethodUpdateLeadCall<'a, C, A> { + self._request_metadata_experiment_ids.push(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. + /// + /// 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 Delegate) -> MethodUpdateLeadCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> MethodUpdateLeadCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + /// Logs a user event. /// /// A builder for the *log* method supported by a *userEvent* resource. @@ -1417,7 +3797,9 @@ impl<'a, C, A> UserEventLogCall<'a, C, A> where C: BorrowMut, A: } -/// Logs a generic message from the client, such as `Failed to render component`, `Profile page is running slow`, `More than 500 users have accessed this result.`, etc. +/// Logs a generic message from the client, such as +/// `Failed to render component`, `Profile page is running slow`, +/// `More than 500 users have accessed this result.`, etc. /// /// A builder for the *log* method supported by a *clientMessage* resource. /// It is not used directly, but through a `ClientMessageMethods` instance. @@ -1661,17 +4043,17 @@ impl<'a, C, A> ClientMessageLogCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.companies().get("companyId") -/// .view("sit") -/// .request_metadata_user_overrides_user_id("Stet") -/// .request_metadata_user_overrides_ip_address("sed") +/// .view("sea") +/// .request_metadata_user_overrides_user_id("et") +/// .request_metadata_user_overrides_ip_address("duo") /// .request_metadata_traffic_source_traffic_sub_id("et") -/// .request_metadata_traffic_source_traffic_source_id("dolores") -/// .request_metadata_partners_session_id("kasd") -/// .request_metadata_locale("accusam") -/// .add_request_metadata_experiment_ids("takimata") -/// .order_by("justo") -/// .currency_code("amet.") -/// .address("erat") +/// .request_metadata_traffic_source_traffic_source_id("eirmod") +/// .request_metadata_partners_session_id("sanctus") +/// .request_metadata_locale("et") +/// .add_request_metadata_experiment_ids("amet") +/// .order_by("et") +/// .currency_code("consetetur") +/// .address("ut") /// .doit(); /// # } /// ``` @@ -1868,7 +4250,8 @@ impl<'a, C, A> CompanyGetCall<'a, C, A> where C: BorrowMut, A: oa self._company_id = new_value.to_string(); self } - /// The view of `Company` resource to be returned. This must not be `COMPANY_VIEW_UNSPECIFIED`. + /// The view of `Company` resource to be returned. This must not be + /// `COMPANY_VIEW_UNSPECIFIED`. /// /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> CompanyGetCall<'a, C, A> { @@ -1889,14 +4272,18 @@ impl<'a, C, A> CompanyGetCall<'a, C, A> where C: BorrowMut, A: oa self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); self } - /// Second level identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us. + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. /// /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> CompanyGetCall<'a, C, A> { self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); self } - /// Identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us. + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. /// /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> CompanyGetCall<'a, C, A> { @@ -1925,21 +4312,27 @@ impl<'a, C, A> CompanyGetCall<'a, C, A> where C: BorrowMut, A: oa self._request_metadata_experiment_ids.push(new_value.to_string()); self } - /// How to order addresses within the returned company. Currently, only `address` and `address desc` is supported which will sorted by closest to farthest in distance from given address and farthest to closest distance from given address respectively. + /// How to order addresses within the returned company. Currently, only + /// `address` and `address desc` is supported which will sorted by closest to + /// farthest in distance from given address and farthest to closest distance + /// from given address respectively. /// /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> CompanyGetCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// If the company's budget is in a different currency code than this one, then the converted budget is converted to this currency code. + /// If the company's budget is in a different currency code than this one, then + /// the converted budget is converted to this currency code. /// /// Sets the *currency code* query property to the given value. pub fn currency_code(mut self, new_value: &str) -> CompanyGetCall<'a, C, A> { self._currency_code = Some(new_value.to_string()); self } - /// The address to use for sorting the company's addresses by proximity. If not given, the geo-located address of the request is used. Used when order_by is set. + /// The address to use for sorting the company's addresses by proximity. + /// If not given, the geo-located address of the request is used. + /// Used when order_by is set. /// /// Sets the *address* query property to the given value. pub fn address(mut self, new_value: &str) -> CompanyGetCall<'a, C, A> { @@ -2265,30 +4658,31 @@ impl<'a, C, A> CompanyLeadCreateCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.companies().list() -/// .website_url("sea") -/// .view("nonumy") -/// .add_services("dolores") -/// .request_metadata_user_overrides_user_id("gubergren") -/// .request_metadata_user_overrides_ip_address("sadipscing") -/// .request_metadata_traffic_source_traffic_sub_id("aliquyam") -/// .request_metadata_traffic_source_traffic_source_id("ea") -/// .request_metadata_partners_session_id("no") -/// .request_metadata_locale("justo") +/// .website_url("sed") +/// .view("dolor") +/// .add_specializations("dolor") +/// .add_services("dolor") +/// .request_metadata_user_overrides_user_id("et") +/// .request_metadata_user_overrides_ip_address("consetetur") +/// .request_metadata_traffic_source_traffic_sub_id("amet.") +/// .request_metadata_traffic_source_traffic_source_id("voluptua.") +/// .request_metadata_partners_session_id("Lorem") +/// .request_metadata_locale("gubergren") /// .add_request_metadata_experiment_ids("justo") -/// .page_token("et") -/// .page_size(-17) +/// .page_token("sit") +/// .page_size(-26) /// .order_by("diam") -/// .min_monthly_budget_units("ipsum") -/// .min_monthly_budget_nanos(-5) -/// .min_monthly_budget_currency_code("et") -/// .max_monthly_budget_units("duo") -/// .max_monthly_budget_nanos(-32) -/// .max_monthly_budget_currency_code("sea") -/// .add_language_codes("Lorem") -/// .add_industries("eos") -/// .add_gps_motivations("erat") -/// .company_name("sadipscing") -/// .address("dolor") +/// .min_monthly_budget_units("rebum.") +/// .min_monthly_budget_nanos(-45) +/// .min_monthly_budget_currency_code("sadipscing") +/// .max_monthly_budget_units("vero") +/// .max_monthly_budget_nanos(-95) +/// .max_monthly_budget_currency_code("invidunt") +/// .add_language_codes("consetetur") +/// .add_industries("dolore") +/// .add_gps_motivations("duo") +/// .company_name("aliquyam") +/// .address("Lorem") /// .doit(); /// # } /// ``` @@ -2298,6 +4692,7 @@ pub struct CompanyListCall<'a, C, A> hub: &'a Partners, _website_url: Option, _view: Option, + _specializations: Vec, _services: Vec, _request_metadata_user_overrides_user_id: Option, _request_metadata_user_overrides_ip_address: Option, @@ -2340,13 +4735,18 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o }; dlg.begin(MethodInfo { id: "partners.companies.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((26 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((27 + self._additional_params.len())); if let Some(value) = self._website_url { params.push(("websiteUrl", value.to_string())); } if let Some(value) = self._view { params.push(("view", value.to_string())); } + if self._specializations.len() > 0 { + for f in self._specializations.iter() { + params.push(("specializations", f.to_string())); + } + } if self._services.len() > 0 { for f in self._services.iter() { params.push(("services", f.to_string())); @@ -2423,7 +4823,7 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o if let Some(value) = self._address { params.push(("address", value.to_string())); } - for &field in ["alt", "websiteUrl", "view", "services", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds", "pageToken", "pageSize", "orderBy", "minMonthlyBudget.units", "minMonthlyBudget.nanos", "minMonthlyBudget.currencyCode", "maxMonthlyBudget.units", "maxMonthlyBudget.nanos", "maxMonthlyBudget.currencyCode", "languageCodes", "industries", "gpsMotivations", "companyName", "address"].iter() { + for &field in ["alt", "websiteUrl", "view", "specializations", "services", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds", "pageToken", "pageSize", "orderBy", "minMonthlyBudget.units", "minMonthlyBudget.nanos", "minMonthlyBudget.currencyCode", "maxMonthlyBudget.units", "maxMonthlyBudget.nanos", "maxMonthlyBudget.currencyCode", "languageCodes", "industries", "gpsMotivations", "companyName", "address"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2512,21 +4912,35 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o } - /// Website URL that will help to find a better matched company. . + /// Website URL that will help to find a better matched company. + /// . /// /// Sets the *website url* query property to the given value. pub fn website_url(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { self._website_url = Some(new_value.to_string()); self } - /// The view of the `Company` resource to be returned. This must not be `COMPANY_VIEW_UNSPECIFIED`. + /// The view of the `Company` resource to be returned. This must not be + /// `COMPANY_VIEW_UNSPECIFIED`. /// /// Sets the *view* query property to the given value. pub fn view(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { self._view = Some(new_value.to_string()); self } - /// List of services the company can help with. + /// List of specializations that the returned agencies should provide. If this + /// is not empty, any returned agency must have at least one of these + /// specializations, or one of the services in the "services" field. + /// + /// Append the given value to the *specializations* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_specializations(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { + self._specializations.push(new_value.to_string()); + self + } + /// List of services that the returned agencies should provide. If this is + /// not empty, any returned agency must have at least one of these services, + /// or one of the specializations in the "specializations" field. /// /// Append the given value to the *services* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -2548,14 +4962,18 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); self } - /// Second level identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us. + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. /// /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); self } - /// Identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us. + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. /// /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { @@ -2584,35 +5002,48 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o self._request_metadata_experiment_ids.push(new_value.to_string()); self } - /// A token identifying a page of results that the server returns. Typically, this is the value of `ListCompaniesResponse.next_page_token` returned from the previous call to ListCompanies. + /// A token identifying a page of results that the server returns. + /// Typically, this is the value of `ListCompaniesResponse.next_page_token` + /// returned from the previous call to + /// ListCompanies. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Requested page size. Server may return fewer companies than requested. If unspecified, server picks an appropriate default. + /// Requested page size. Server may return fewer companies than requested. + /// If unspecified, server picks an appropriate default. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> CompanyListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// How to order addresses within the returned companies. Currently, only `address` and `address desc` is supported which will sorted by closest to farthest in distance from given address and farthest to closest distance from given address respectively. + /// How to order addresses within the returned companies. Currently, only + /// `address` and `address desc` is supported which will sorted by closest to + /// farthest in distance from given address and farthest to closest distance + /// from given address respectively. /// /// Sets the *order by* query property to the given value. pub fn order_by(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { self._order_by = Some(new_value.to_string()); self } - /// The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + /// The whole units of the amount. + /// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. /// /// Sets the *min monthly budget.units* query property to the given value. pub fn min_monthly_budget_units(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { self._min_monthly_budget_units = Some(new_value.to_string()); self } - /// Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + /// Number of nano (10^-9) units of the amount. + /// The value must be between -999,999,999 and +999,999,999 inclusive. + /// If `units` is positive, `nanos` must be positive or zero. + /// If `units` is zero, `nanos` can be positive, zero, or negative. + /// If `units` is negative, `nanos` must be negative or zero. + /// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. /// /// Sets the *min monthly budget.nanos* query property to the given value. pub fn min_monthly_budget_nanos(mut self, new_value: i32) -> CompanyListCall<'a, C, A> { @@ -2626,14 +5057,20 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o self._min_monthly_budget_currency_code = Some(new_value.to_string()); self } - /// The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + /// The whole units of the amount. + /// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. /// /// Sets the *max monthly budget.units* query property to the given value. pub fn max_monthly_budget_units(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { self._max_monthly_budget_units = Some(new_value.to_string()); self } - /// Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + /// Number of nano (10^-9) units of the amount. + /// The value must be between -999,999,999 and +999,999,999 inclusive. + /// If `units` is positive, `nanos` must be positive or zero. + /// If `units` is zero, `nanos` can be positive, zero, or negative. + /// If `units` is negative, `nanos` must be negative or zero. + /// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. /// /// Sets the *max monthly budget.nanos* query property to the given value. pub fn max_monthly_budget_nanos(mut self, new_value: i32) -> CompanyListCall<'a, C, A> { @@ -2647,7 +5084,10 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o self._max_monthly_budget_currency_code = Some(new_value.to_string()); self } - /// List of language codes that company can support. Only primary language subtags are accepted as defined by BCP 47 (IETF BCP 47, "Tags for Identifying Languages"). + /// List of language codes that company can support. Only primary language + /// subtags are accepted as defined by + /// BCP 47 + /// (IETF BCP 47, "Tags for Identifying Languages"). /// /// Append the given value to the *language codes* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -2678,7 +5118,8 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o self._company_name = Some(new_value.to_string()); self } - /// The address to use when searching for companies. If not given, the geo-located address of the request is used. + /// The address to use when searching for companies. + /// If not given, the geo-located address of the request is used. /// /// Sets the *address* query property to the given value. pub fn address(mut self, new_value: &str) -> CompanyListCall<'a, C, A> { @@ -2727,6 +5168,1555 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o } +/// Lists advertiser leads for a user's associated company. +/// Should only be called within the context of an authorized logged in user. +/// +/// A builder for the *list* method supported by a *lead* resource. +/// It is not used directly, but through a `LeadMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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.leads().list() +/// .request_metadata_user_overrides_user_id("et") +/// .request_metadata_user_overrides_ip_address("clita") +/// .request_metadata_traffic_source_traffic_sub_id("consetetur") +/// .request_metadata_traffic_source_traffic_source_id("takimata") +/// .request_metadata_partners_session_id("nonumy") +/// .request_metadata_locale("kasd") +/// .add_request_metadata_experiment_ids("sanctus") +/// .page_token("takimata") +/// .page_size(-27) +/// .order_by("labore") +/// .doit(); +/// # } +/// ``` +pub struct LeadListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _page_token: Option, + _page_size: Option, + _order_by: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for LeadListCall<'a, C, A> {} + +impl<'a, C, A> LeadListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListLeadsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.leads.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._order_by { + params.push(("orderBy", value.to_string())); + } + for &field in ["alt", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds", "pageToken", "pageSize", "orderBy"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/leads".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> LeadListCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> LeadListCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> LeadListCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> LeadListCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> LeadListCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> LeadListCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> LeadListCall<'a, C, A> { + self._request_metadata_experiment_ids.push(new_value.to_string()); + self + } + /// A token identifying a page of results that the server returns. + /// Typically, this is the value of `ListLeadsResponse.next_page_token` + /// returned from the previous call to + /// ListLeads. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> LeadListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Requested page size. Server may return fewer leads than requested. + /// If unspecified, server picks an appropriate default. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> LeadListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// How to order Leads. Currently, only `create_time` + /// and `create_time desc` are supported + /// + /// Sets the *order by* query property to the given value. + pub fn order_by(mut self, new_value: &str) -> LeadListCall<'a, C, A> { + self._order_by = 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. + /// + /// 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 Delegate) -> LeadListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> LeadListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Lists analytics data for a user's associated company. +/// Should only be called within the context of an authorized logged in user. +/// +/// A builder for the *list* method supported by a *analytic* resource. +/// It is not used directly, but through a `AnalyticMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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.analytics().list() +/// .request_metadata_user_overrides_user_id("invidunt") +/// .request_metadata_user_overrides_ip_address("ea") +/// .request_metadata_traffic_source_traffic_sub_id("sadipscing") +/// .request_metadata_traffic_source_traffic_source_id("rebum.") +/// .request_metadata_partners_session_id("dolore") +/// .request_metadata_locale("nonumy") +/// .add_request_metadata_experiment_ids("sed") +/// .page_token("aliquyam") +/// .page_size(-53) +/// .doit(); +/// # } +/// ``` +pub struct AnalyticListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for AnalyticListCall<'a, C, A> {} + +impl<'a, C, A> AnalyticListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListAnalyticsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.analytics.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/analytics".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> AnalyticListCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> AnalyticListCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> AnalyticListCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> AnalyticListCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> AnalyticListCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> AnalyticListCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> AnalyticListCall<'a, C, A> { + self._request_metadata_experiment_ids.push(new_value.to_string()); + self + } + /// A token identifying a page of results that the server returns. + /// Typically, this is the value of `ListAnalyticsResponse.next_page_token` + /// returned from the previous call to + /// ListAnalytics. + /// Will be a date string in `YYYY-MM-DD` format representing the end date + /// of the date range of results to return. + /// If unspecified or set to "", default value is the current date. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> AnalyticListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Requested page size. Server may return fewer analytics than requested. + /// If unspecified or set to 0, default value is 30. + /// Specifies the number of days in the date range when querying analytics. + /// The `page_token` represents the end date of the date range + /// and the start date is calculated using the `page_size` as the number + /// of days BEFORE the end date. + /// Must be a non-negative integer. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> AnalyticListCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> AnalyticListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnalyticListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Lists the Historical Offers for the current user (or user's entire company) +/// +/// A builder for the *history.list* method supported by a *offer* resource. +/// It is not used directly, but through a `OfferMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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.offers().history_list() +/// .request_metadata_user_overrides_user_id("eirmod") +/// .request_metadata_user_overrides_ip_address("consetetur") +/// .request_metadata_traffic_source_traffic_sub_id("labore") +/// .request_metadata_traffic_source_traffic_source_id("sed") +/// .request_metadata_partners_session_id("ea") +/// .request_metadata_locale("gubergren") +/// .add_request_metadata_experiment_ids("aliquyam") +/// .page_token("eos") +/// .page_size(-38) +/// .order_by("sea") +/// .entire_company(false) +/// .doit(); +/// # } +/// ``` +pub struct OfferHistoryListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _page_token: Option, + _page_size: Option, + _order_by: Option, + _entire_company: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for OfferHistoryListCall<'a, C, A> {} + +impl<'a, C, A> OfferHistoryListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListOffersHistoryResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.offers.history.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((13 + self._additional_params.len())); + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._order_by { + params.push(("orderBy", value.to_string())); + } + if let Some(value) = self._entire_company { + params.push(("entireCompany", value.to_string())); + } + for &field in ["alt", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds", "pageToken", "pageSize", "orderBy", "entireCompany"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/offers/history".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> OfferHistoryListCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> OfferHistoryListCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> OfferHistoryListCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> OfferHistoryListCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> OfferHistoryListCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> OfferHistoryListCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> OfferHistoryListCall<'a, C, A> { + self._request_metadata_experiment_ids.push(new_value.to_string()); + self + } + /// Token to retrieve a specific page. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> OfferHistoryListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Maximum number of rows to return per page. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> OfferHistoryListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// Comma-separated list of fields to order by, e.g.: "foo,bar,baz". + /// Use "foo desc" to sort descending. + /// List of valid field names is: name, offer_code, expiration_time, status, + /// last_modified_time, sender_name, creation_time, country_code, + /// offer_type. + /// + /// Sets the *order by* query property to the given value. + pub fn order_by(mut self, new_value: &str) -> OfferHistoryListCall<'a, C, A> { + self._order_by = Some(new_value.to_string()); + self + } + /// if true, show history for the entire company. Requires user to be admin. + /// + /// Sets the *entire company* query property to the given value. + pub fn entire_company(mut self, new_value: bool) -> OfferHistoryListCall<'a, C, A> { + self._entire_company = 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. + /// + /// 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 Delegate) -> OfferHistoryListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> OfferHistoryListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Lists the Offers available for the current user +/// +/// A builder for the *list* method supported by a *offer* resource. +/// It is not used directly, but through a `OfferMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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.offers().list() +/// .request_metadata_user_overrides_user_id("ipsum") +/// .request_metadata_user_overrides_ip_address("aliquyam") +/// .request_metadata_traffic_source_traffic_sub_id("dolores") +/// .request_metadata_traffic_source_traffic_source_id("sit") +/// .request_metadata_partners_session_id("diam") +/// .request_metadata_locale("ut") +/// .add_request_metadata_experiment_ids("justo") +/// .doit(); +/// # } +/// ``` +pub struct OfferListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for OfferListCall<'a, C, A> {} + +impl<'a, C, A> OfferListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListOffersResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.offers.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + for &field in ["alt", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/offers".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> OfferListCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> OfferListCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> OfferListCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> OfferListCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> OfferListCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> OfferListCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> OfferListCall<'a, C, A> { + self._request_metadata_experiment_ids.push(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. + /// + /// 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 Delegate) -> OfferListCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> OfferListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Gets an Exam Token for a Partner's user to take an exam in the Exams System +/// +/// A builder for the *getToken* method supported by a *exam* resource. +/// It is not used directly, but through a `ExamMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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.exams().get_token("examType") +/// .request_metadata_user_overrides_user_id("amet") +/// .request_metadata_user_overrides_ip_address("accusam") +/// .request_metadata_traffic_source_traffic_sub_id("clita") +/// .request_metadata_traffic_source_traffic_source_id("diam") +/// .request_metadata_partners_session_id("justo") +/// .request_metadata_locale("est") +/// .add_request_metadata_experiment_ids("clita") +/// .doit(); +/// # } +/// ``` +pub struct ExamGetTokenCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _exam_type: String, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for ExamGetTokenCall<'a, C, A> {} + +impl<'a, C, A> ExamGetTokenCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ExamToken)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.exams.getToken", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((10 + self._additional_params.len())); + params.push(("examType", self._exam_type.to_string())); + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + for &field in ["alt", "examType", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/exams/{examType}/token".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + for &(find_this, param_name) in [("{examType}", "examType")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["examType"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The exam type we are requesting a token for. + /// + /// Sets the *exam type* 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 exam_type(mut self, new_value: &str) -> ExamGetTokenCall<'a, C, A> { + self._exam_type = new_value.to_string(); + self + } + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> ExamGetTokenCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> ExamGetTokenCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> ExamGetTokenCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> ExamGetTokenCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> ExamGetTokenCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> ExamGetTokenCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> ExamGetTokenCall<'a, C, A> { + self._request_metadata_experiment_ids.push(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. + /// + /// 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 Delegate) -> ExamGetTokenCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ExamGetTokenCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + /// Lists states for current user. /// /// A builder for the *list* method supported by a *userState* resource. @@ -2754,13 +6744,13 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.user_states().list() -/// .request_metadata_user_overrides_user_id("eirmod") -/// .request_metadata_user_overrides_ip_address("elitr") -/// .request_metadata_traffic_source_traffic_sub_id("amet") -/// .request_metadata_traffic_source_traffic_source_id("no") -/// .request_metadata_partners_session_id("labore") -/// .request_metadata_locale("eirmod") -/// .add_request_metadata_experiment_ids("dolore") +/// .request_metadata_user_overrides_user_id("invidunt") +/// .request_metadata_user_overrides_ip_address("ut") +/// .request_metadata_traffic_source_traffic_sub_id("dolores") +/// .request_metadata_traffic_source_traffic_source_id("eos") +/// .request_metadata_partners_session_id("voluptua.") +/// .request_metadata_locale("duo") +/// .add_request_metadata_experiment_ids("sed") /// .doit(); /// # } /// ``` @@ -2922,14 +6912,18 @@ impl<'a, C, A> UserStateListCall<'a, C, A> where C: BorrowMut, A: self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); self } - /// Second level identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us. + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. /// /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> UserStateListCall<'a, C, A> { self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); self } - /// Identifier to indicate where the traffic comes from. An identifier has multiple letters created by a team which redirected the traffic to us. + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. /// /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> UserStateListCall<'a, C, A> { @@ -3000,4 +6994,1289 @@ impl<'a, C, A> UserStateListCall<'a, C, A> where C: BorrowMut, A: } +/// Updates a user's profile. A user can only update their own profile and +/// should only be called within the context of a logged in user. +/// +/// A builder for the *updateProfile* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// use partners2::UserProfile; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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 = UserProfile::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.users().update_profile(req) +/// .request_metadata_user_overrides_user_id("aliquyam") +/// .request_metadata_user_overrides_ip_address("ea") +/// .request_metadata_traffic_source_traffic_sub_id("ea") +/// .request_metadata_traffic_source_traffic_source_id("et") +/// .request_metadata_partners_session_id("dolor") +/// .request_metadata_locale("diam") +/// .add_request_metadata_experiment_ids("kasd") +/// .doit(); +/// # } +/// ``` +pub struct UserUpdateProfileCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _request: UserProfile, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for UserUpdateProfileCall<'a, C, A> {} + +impl<'a, C, A> UserUpdateProfileCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfile)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.users.updateProfile", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((10 + self._additional_params.len())); + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + for &field in ["alt", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/users/profile".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: UserProfile) -> UserUpdateProfileCall<'a, C, A> { + self._request = new_value; + self + } + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> UserUpdateProfileCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> UserUpdateProfileCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> UserUpdateProfileCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> UserUpdateProfileCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> UserUpdateProfileCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> UserUpdateProfileCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> UserUpdateProfileCall<'a, C, A> { + self._request_metadata_experiment_ids.push(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. + /// + /// 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 Delegate) -> UserUpdateProfileCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> UserUpdateProfileCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Creates a user's company relation. Affiliates the user to a company. +/// +/// A builder for the *createCompanyRelation* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// use partners2::CompanyRelation; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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 = CompanyRelation::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.users().create_company_relation(req, "userId") +/// .request_metadata_user_overrides_user_id("rebum.") +/// .request_metadata_user_overrides_ip_address("Lorem") +/// .request_metadata_traffic_source_traffic_sub_id("clita") +/// .request_metadata_traffic_source_traffic_source_id("invidunt") +/// .request_metadata_partners_session_id("eirmod") +/// .request_metadata_locale("At") +/// .add_request_metadata_experiment_ids("consetetur") +/// .doit(); +/// # } +/// ``` +pub struct UserCreateCompanyRelationCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _request: CompanyRelation, + _user_id: String, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for UserCreateCompanyRelationCall<'a, C, A> {} + +impl<'a, C, A> UserCreateCompanyRelationCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, CompanyRelation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.users.createCompanyRelation", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + params.push(("userId", self._user_id.to_string())); + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + for &field in ["alt", "userId", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/users/{userId}/companyRelation".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + for &(find_this, param_name) in [("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["userId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: CompanyRelation) -> UserCreateCompanyRelationCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the user. Can be set to me to mean + /// the currently authenticated user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserCreateCompanyRelationCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> UserCreateCompanyRelationCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> UserCreateCompanyRelationCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> UserCreateCompanyRelationCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> UserCreateCompanyRelationCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> UserCreateCompanyRelationCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> UserCreateCompanyRelationCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> UserCreateCompanyRelationCall<'a, C, A> { + self._request_metadata_experiment_ids.push(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. + /// + /// 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 Delegate) -> UserCreateCompanyRelationCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> UserCreateCompanyRelationCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Gets a user. +/// +/// A builder for the *get* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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.users().get("userId") +/// .user_view("sed") +/// .request_metadata_user_overrides_user_id("sit") +/// .request_metadata_user_overrides_ip_address("takimata") +/// .request_metadata_traffic_source_traffic_sub_id("elitr") +/// .request_metadata_traffic_source_traffic_source_id("nonumy") +/// .request_metadata_partners_session_id("rebum.") +/// .request_metadata_locale("Lorem") +/// .add_request_metadata_experiment_ids("Lorem") +/// .doit(); +/// # } +/// ``` +pub struct UserGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _user_id: String, + _user_view: Option, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for UserGetCall<'a, C, A> {} + +impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.users.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + params.push(("userId", self._user_id.to_string())); + if let Some(value) = self._user_view { + params.push(("userView", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + for &field in ["alt", "userId", "userView", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/users/{userId}".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + for &(find_this, param_name) in [("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["userId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Identifier of the user. Can be set to me to mean the currently + /// authenticated user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// Specifies what parts of the user information to return. + /// + /// Sets the *user view* query property to the given value. + pub fn user_view(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._user_view = Some(new_value.to_string()); + self + } + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> UserGetCall<'a, C, A> { + self._request_metadata_experiment_ids.push(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. + /// + /// 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 Delegate) -> UserGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> UserGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Deletes a user's company relation. Unaffiliaites the user from a company. +/// +/// A builder for the *deleteCompanyRelation* method supported by a *user* resource. +/// It is not used directly, but through a `UserMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_partners2 as partners2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use partners2::Partners; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Partners::new(hyper::Client::new(), 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.users().delete_company_relation("userId") +/// .request_metadata_user_overrides_user_id("ut") +/// .request_metadata_user_overrides_ip_address("ut") +/// .request_metadata_traffic_source_traffic_sub_id("amet.") +/// .request_metadata_traffic_source_traffic_source_id("ipsum") +/// .request_metadata_partners_session_id("ut") +/// .request_metadata_locale("dolor") +/// .add_request_metadata_experiment_ids("sea") +/// .doit(); +/// # } +/// ``` +pub struct UserDeleteCompanyRelationCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Partners, + _user_id: String, + _request_metadata_user_overrides_user_id: Option, + _request_metadata_user_overrides_ip_address: Option, + _request_metadata_traffic_source_traffic_sub_id: Option, + _request_metadata_traffic_source_traffic_source_id: Option, + _request_metadata_partners_session_id: Option, + _request_metadata_locale: Option, + _request_metadata_experiment_ids: Vec, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for UserDeleteCompanyRelationCall<'a, C, A> {} + +impl<'a, C, A> UserDeleteCompanyRelationCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "partners.users.deleteCompanyRelation", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((10 + self._additional_params.len())); + params.push(("userId", self._user_id.to_string())); + if let Some(value) = self._request_metadata_user_overrides_user_id { + params.push(("requestMetadata.userOverrides.userId", value.to_string())); + } + if let Some(value) = self._request_metadata_user_overrides_ip_address { + params.push(("requestMetadata.userOverrides.ipAddress", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_sub_id { + params.push(("requestMetadata.trafficSource.trafficSubId", value.to_string())); + } + if let Some(value) = self._request_metadata_traffic_source_traffic_source_id { + params.push(("requestMetadata.trafficSource.trafficSourceId", value.to_string())); + } + if let Some(value) = self._request_metadata_partners_session_id { + params.push(("requestMetadata.partnersSessionId", value.to_string())); + } + if let Some(value) = self._request_metadata_locale { + params.push(("requestMetadata.locale", value.to_string())); + } + if self._request_metadata_experiment_ids.len() > 0 { + for f in self._request_metadata_experiment_ids.iter() { + params.push(("requestMetadata.experimentIds", f.to_string())); + } + } + for &field in ["alt", "userId", "requestMetadata.userOverrides.userId", "requestMetadata.userOverrides.ipAddress", "requestMetadata.trafficSource.trafficSubId", "requestMetadata.trafficSource.trafficSourceId", "requestMetadata.partnersSessionId", "requestMetadata.locale", "requestMetadata.experimentIds"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://partners.googleapis.com/v2/users/{userId}/companyRelation".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + for &(find_this, param_name) in [("{userId}", "userId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["userId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the user. Can be set to me to mean + /// the currently authenticated user. + /// + /// Sets the *user id* 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 user_id(mut self, new_value: &str) -> UserDeleteCompanyRelationCall<'a, C, A> { + self._user_id = new_value.to_string(); + self + } + /// Logged-in user ID to impersonate instead of the user's ID. + /// + /// Sets the *request metadata.user overrides.user id* query property to the given value. + pub fn request_metadata_user_overrides_user_id(mut self, new_value: &str) -> UserDeleteCompanyRelationCall<'a, C, A> { + self._request_metadata_user_overrides_user_id = Some(new_value.to_string()); + self + } + /// IP address to use instead of the user's geo-located IP address. + /// + /// Sets the *request metadata.user overrides.ip address* query property to the given value. + pub fn request_metadata_user_overrides_ip_address(mut self, new_value: &str) -> UserDeleteCompanyRelationCall<'a, C, A> { + self._request_metadata_user_overrides_ip_address = Some(new_value.to_string()); + self + } + /// Second level identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic sub id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_sub_id(mut self, new_value: &str) -> UserDeleteCompanyRelationCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_sub_id = Some(new_value.to_string()); + self + } + /// Identifier to indicate where the traffic comes from. + /// An identifier has multiple letters created by a team which redirected the + /// traffic to us. + /// + /// Sets the *request metadata.traffic source.traffic source id* query property to the given value. + pub fn request_metadata_traffic_source_traffic_source_id(mut self, new_value: &str) -> UserDeleteCompanyRelationCall<'a, C, A> { + self._request_metadata_traffic_source_traffic_source_id = Some(new_value.to_string()); + self + } + /// Google Partners session ID. + /// + /// Sets the *request metadata.partners session id* query property to the given value. + pub fn request_metadata_partners_session_id(mut self, new_value: &str) -> UserDeleteCompanyRelationCall<'a, C, A> { + self._request_metadata_partners_session_id = Some(new_value.to_string()); + self + } + /// Locale to use for the current request. + /// + /// Sets the *request metadata.locale* query property to the given value. + pub fn request_metadata_locale(mut self, new_value: &str) -> UserDeleteCompanyRelationCall<'a, C, A> { + self._request_metadata_locale = Some(new_value.to_string()); + self + } + /// Experiment IDs the current request belongs to. + /// + /// Append the given value to the *request metadata.experiment ids* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_request_metadata_experiment_ids(mut self, new_value: &str) -> UserDeleteCompanyRelationCall<'a, C, A> { + self._request_metadata_experiment_ids.push(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. + /// + /// 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 Delegate) -> UserDeleteCompanyRelationCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> UserDeleteCompanyRelationCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + diff --git a/gen/people1-cli/Cargo.toml b/gen/people1-cli/Cargo.toml index 79e4d8414a..4fd89acc23 100644 --- a/gen/people1-cli/Cargo.toml +++ b/gen/people1-cli/Cargo.toml @@ -4,9 +4,9 @@ [package] name = "google-people1-cli" -version = "1.0.4+20160210" +version = "1.0.4+20170518" authors = ["Sebastian Thiel "] -description = "A complete library to interact with people (protocol v1)" +description = "A complete library to interact with People Service (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/people1-cli" homepage = "https://developers.google.com/people/" documentation = "http://byron.github.io/google-apis-rs/google_people1_cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-people1] path = "../people1" -version = "1.0.4+20160210" +version = "1.0.4+20170518" diff --git a/gen/people1-cli/README.md b/gen/people1-cli/README.md index 1494a6ed4c..f6217206f3 100644 --- a/gen/people1-cli/README.md +++ b/gen/people1-cli/README.md @@ -3,14 +3,14 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/cli/README.md.mako' DO NOT EDIT ! --> -The `people1` command-line interface *(CLI)* allows to use most features of the *Google people* service from the comfort of your terminal. +The `people1` command-line interface *(CLI)* allows to use most features of the *Google People 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 *people* API can be found at the +Everything else about the *People Service* API can be found at the [official documentation site](https://developers.google.com/people/). # Installation and Source Code @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *people* API at revision *20160210*. The CLI is at version *1.0.4*. +This documentation was generated from the *People Service* API at revision *20170518*. The CLI is at version *1.0.4*. ```bash people1 [options] diff --git a/gen/people1-cli/mkdocs.yml b/gen/people1-cli/mkdocs.yml index 19d7ccf796..fb56e98498 100644 --- a/gen/people1-cli/mkdocs.yml +++ b/gen/people1-cli/mkdocs.yml @@ -1,6 +1,6 @@ -site_name: people v1.0.4+20160210 +site_name: People Service v1.0.4+20170518 site_url: http://byron.github.io/google-apis-rs/google-people1-cli -site_description: A complete library to interact with people (protocol v1) +site_description: A complete library to interact with People Service (protocol v1) repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/people1-cli diff --git a/gen/people1-cli/src/main.rs b/gen/people1-cli/src/main.rs index 654ba17f65..37dfff5f4b 100644 --- a/gen/people1-cli/src/main.rs +++ b/gen/people1-cli/src/main.rs @@ -39,7 +39,7 @@ enum DoitError { struct Engine<'n> { opt: ArgMatches<'n>, - hub: api::People>, + hub: api::PeopleService>, gp: Vec<&'static str>, gpm: Vec<(&'static str, &'static str)>, } @@ -58,6 +58,9 @@ impl<'n> Engine<'n> { "sort-order" => { call = call.sort_order(value.unwrap_or("")); }, + "request-sync-token" => { + call = call.request_sync_token(arg_from_str(value.unwrap_or("false"), err, "request-sync-token", "boolean")); + }, "request-mask-include-field" => { call = call.request_mask_include_field(value.unwrap_or("")); }, @@ -80,7 +83,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["sync-token", "page-size", "sort-order", "page-token", "request-mask-include-field"].iter().map(|v|*v)); + v.extend(["sync-token", "page-size", "request-mask-include-field", "page-token", "sort-order", "request-sync-token"].iter().map(|v|*v)); v } )); } } @@ -305,7 +308,7 @@ impl<'n> Engine<'n> { }; let engine = Engine { opt: opt, - hub: api::People::new(client, auth), + hub: api::PeopleService::new(client, auth), gp: vec!["$-xgafv", "access-token", "alt", "bearer-token", "callback", "fields", "key", "oauth-token", "pp", "pretty-print", "quota-user", "upload-type", "upload-protocol"], gpm: vec![ ("$-xgafv", "$.xgafv"), @@ -339,7 +342,8 @@ fn main() { let arg_data = [ ("people", "methods: 'connections-list', 'get' and 'get-batch-get'", vec![ ("connections-list", - Some(r##"Provides a list of the authenticated user's contacts merged with any linked profiles."##), + Some(r##"Provides a list of the authenticated user's contacts merged with any + linked profiles."##), "Details at http://byron.github.io/google-apis-rs/google_people1_cli/people_connections-list", vec![ (Some(r##"resource-name"##), @@ -361,12 +365,18 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Provides information about a person resource for a resource name. Use `people/me` to indicate the authenticated user."##), + Some(r##"Provides information about a person for a resource name. Use + `people/me` to indicate the authenticated user."##), "Details at http://byron.github.io/google-apis-rs/google_people1_cli/people_get", vec![ (Some(r##"resource-name"##), None, - Some(r##"The resource name of the person to provide information about. - To get information about the authenticated user, specify `people/me`. - To get information about any user, specify the resource name that identifies the user, such as the resource names returned by [`people.connections.list`](/people/api/rest/v1/people.connections/list)."##), + Some(r##"The resource name of the person to provide information about. + + - To get information about the authenticated user, specify `people/me`. + - To get information about any user, specify the resource name that + identifies the user, such as the resource names returned by + [`people.connections.list`](/people/api/rest/v1/people.connections/list)."##), Some(true), Some(false)), @@ -383,7 +393,9 @@ fn main() { Some(false)), ]), ("get-batch-get", - Some(r##"Provides information about a list of specific people by specifying a list of requested resource names. Use `people/me` to indicate the authenticated user."##), + Some(r##"Provides information about a list of specific people by specifying a list + of requested resource names. Use `people/me` to indicate the authenticated + user."##), "Details at http://byron.github.io/google-apis-rs/google_people1_cli/people_get-batch-get", vec![ (Some(r##"v"##), @@ -404,8 +416,8 @@ fn main() { let mut app = App::new("people1") .author("Sebastian Thiel ") - .version("1.0.4+20160210") - .about("The Google People API service gives access to information about profiles and contacts.") + .version("1.0.4+20170518") + .about("Provides access to information about profiles and contacts.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_people1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/people1/Cargo.toml b/gen/people1/Cargo.toml index 18ccf470d3..61c4817753 100644 --- a/gen/people1/Cargo.toml +++ b/gen/people1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-people1" -version = "1.0.4+20160210" +version = "1.0.4+20170518" authors = ["Sebastian Thiel "] -description = "A complete library to interact with people (protocol v1)" +description = "A complete library to interact with People Service (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/people1" homepage = "https://developers.google.com/people/" -documentation = "https://docs.rs/google-people1/1.0.4+20160210" +documentation = "https://docs.rs/google-people1/1.0.4+20170518" license = "MIT" keywords = ["people", "google", "protocol", "web", "api"] diff --git a/gen/people1/README.md b/gen/people1/README.md index d5eed41228..817450ae7f 100644 --- a/gen/people1/README.md +++ b/gen/people1/README.md @@ -3,18 +3,18 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/api/README.md.mako' DO NOT EDIT ! --> -The `google-people1` library allows access to all features of the *Google people* service. +The `google-people1` library allows access to all features of the *Google People Service* service. -This documentation was generated from *people* crate version *1.0.4+20160210*, where *20160210* is the exact revision of the *people:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *People Service* crate version *1.0.4+20170518*, where *20170518* is the exact revision of the *people:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. -Everything else about the *people* *v1* API can be found at the +Everything else about the *People Service* *v1* API can be found at the [official documentation site](https://developers.google.com/people/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-people1/1.0.4+20160210/google_people1/struct.People.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-people1/1.0.4+20170518/google_people1/struct.PeopleService.html) ... * people - * [*connections list*](https://docs.rs/google-people1/1.0.4+20160210/google_people1/struct.PeopleConnectionListCall.html), [*get*](https://docs.rs/google-people1/1.0.4+20160210/google_people1/struct.PeopleGetCall.html) and [*get batch get*](https://docs.rs/google-people1/1.0.4+20160210/google_people1/struct.PeopleGetBatchGetCall.html) + * [*connections list*](https://docs.rs/google-people1/1.0.4+20170518/google_people1/struct.PeopleConnectionListCall.html), [*get*](https://docs.rs/google-people1/1.0.4+20170518/google_people1/struct.PeopleGetCall.html) and [*get batch get*](https://docs.rs/google-people1/1.0.4+20170518/google_people1/struct.PeopleGetBatchGetCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-people1/1.0.4+20160210/google_people1/struct.People.html)** +* **[Hub](https://docs.rs/google-people1/1.0.4+20170518/google_people1/struct.PeopleService.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.Part.html)** + * **[Parts](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -75,7 +75,7 @@ extern crate google_people1 as people1; use people1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -use people1::People; +use people1::PeopleService; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. @@ -88,7 +88,7 @@ let secret: ApplicationSecret = Default::default(); let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::new(), ::default(), None); -let mut hub = People::new(hyper::Client::new(), auth); +let mut hub = PeopleService::new(hyper::Client::new(), 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 ! @@ -116,17 +116,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-people1/1.0.4+20160210/google_people1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-people1/1.0.4+20170518/google_people1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.Delegate.html), 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-people1/1.0.4+20160210/google_people1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-people1/1.0.4+20170518/google_people1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.ResponseResult.html), 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")`. @@ -136,29 +136,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.CallBuilder.html) 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-people1/1.0.4+20160210/google_people1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-people1/1.0.4+20160210/google_people1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.CallBuilder.html), 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-people1/1.0.4+20160210/google_people1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-people1/1.0.4+20170518/google_people1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/people1/src/lib.rs b/gen/people1/src/lib.rs index 8f1acb8a2c..55680ab61b 100644 --- a/gen/people1/src/lib.rs +++ b/gen/people1/src/lib.rs @@ -2,14 +2,14 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *people* crate version *1.0.4+20160210*, where *20160210* is the exact revision of the *people:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *People Service* crate version *1.0.4+20170518*, where *20170518* is the exact revision of the *people:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! -//! Everything else about the *people* *v1* API can be found at the +//! Everything else about the *People Service* *v1* API can be found at the //! [official documentation site](https://developers.google.com/people/). //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/people1). //! # Features //! -//! Handle the following *Resources* with ease from the central [hub](struct.People.html) ... +//! Handle the following *Resources* with ease from the central [hub](struct.PeopleService.html) ... //! //! * people //! * [*connections list*](struct.PeopleConnectionListCall.html), [*get*](struct.PeopleGetCall.html) and [*get batch get*](struct.PeopleGetBatchGetCall.html) @@ -23,7 +23,7 @@ //! //! The API is structured into the following primary items: //! -//! * **[Hub](struct.People.html)** +//! * **[Hub](struct.PeopleService.html)** //! * a central object to maintain state and allow accessing all *Activities* //! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn //! allow access to individual [*Call Builders*](trait.CallBuilder.html) @@ -76,7 +76,7 @@ //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -//! use people1::People; +//! use people1::PeopleService; //! //! // Get an ApplicationSecret instance by some means. It contains the `client_id` and //! // `client_secret`, among other things. @@ -89,7 +89,7 @@ //! let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, //! hyper::Client::new(), //! ::default(), None); -//! let mut hub = People::new(hyper::Client::new(), auth); +//! let mut hub = PeopleService::new(hyper::Client::new(), 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 ! @@ -216,7 +216,7 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { - /// Know your basic profile info and list of people in your circles. + /// Know the list of people in your circles, your age range, and language PluLogin, /// View your complete date of birth @@ -234,14 +234,14 @@ pub enum Scope { /// Manage your contacts Contact, - /// View your phone numbers - UserPhonenumberRead, + /// View your email address + UserinfoEmail, /// View your basic profile info UserinfoProfile, - /// View your email address - UserinfoEmail, + /// View your phone numbers + UserPhonenumberRead, } impl AsRef for Scope { @@ -253,9 +253,9 @@ impl AsRef for Scope { Scope::UserEmailRead => "https://www.googleapis.com/auth/user.emails.read", Scope::UserAddresseRead => "https://www.googleapis.com/auth/user.addresses.read", Scope::Contact => "https://www.googleapis.com/auth/contacts", - Scope::UserPhonenumberRead => "https://www.googleapis.com/auth/user.phonenumbers.read", - Scope::UserinfoProfile => "https://www.googleapis.com/auth/userinfo.profile", Scope::UserinfoEmail => "https://www.googleapis.com/auth/userinfo.email", + Scope::UserinfoProfile => "https://www.googleapis.com/auth/userinfo.profile", + Scope::UserPhonenumberRead => "https://www.googleapis.com/auth/user.phonenumbers.read", } } } @@ -272,7 +272,7 @@ impl Default for Scope { // HUB ### // ###### -/// Central instance to access all People related resource activities +/// Central instance to access all PeopleService related resource activities /// /// # Examples /// @@ -286,7 +286,7 @@ impl Default for Scope { /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use people1::People; +/// use people1::PeopleService; /// /// // Get an ApplicationSecret instance by some means. It contains the `client_id` and /// // `client_secret`, among other things. @@ -299,7 +299,7 @@ impl Default for Scope { /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); -/// let mut hub = People::new(hyper::Client::new(), auth); +/// let mut hub = PeopleService::new(hyper::Client::new(), 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 ! @@ -325,19 +325,19 @@ impl Default for Scope { /// } /// # } /// ``` -pub struct People { +pub struct PeopleService { client: RefCell, auth: RefCell, _user_agent: String, } -impl<'a, C, A> Hub for People {} +impl<'a, C, A> Hub for PeopleService {} -impl<'a, C, A> People +impl<'a, C, A> PeopleService where C: BorrowMut, A: oauth2::GetToken { - pub fn new(client: C, authenticator: A) -> People { - People { + pub fn new(client: C, authenticator: A) -> PeopleService { + PeopleService { client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), @@ -374,29 +374,48 @@ impl<'a, C, A> People /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListConnectionsResponse { - /// The list of people that the requestor is connected to. - pub connections: Option>, /// The token that can be used to retrieve the next page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, + /// The list of people that the requestor is connected to. + pub connections: Option>, /// The token that can be used to retrieve changes since the last request. #[serde(rename="nextSyncToken")] pub next_sync_token: Option, + /// The total number of items in the list without pagination. + #[serde(rename="totalItems")] + pub total_items: Option, + /// DEPRECATED(Please use total_items). The total number of people in the list + /// without pagination. + #[serde(rename="totalPeople")] + pub total_people: Option, } impl ResponseResult for ListConnectionsResponse {} -/// A person's relationship status. +/// A person's read-only relationship status. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RelationshipStatus { - /// The read-only value of the relationship status translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. + /// The read-only value of the relationship status translated and formatted in + /// the viewer's account locale or the `Accept-Language` HTTP header locale. #[serde(rename="formattedValue")] pub formatted_value: Option, - /// The relationship status. The value can be custom or predefined. Possible values include, but are not limited to, the following: * `single` * `inARelationship` * `engaged` * `married` * `itsComplicated` * `openRelationship` * `widowed` * `inDomesticPartnership` * `inCivilUnion` + /// The relationship status. The value can be custom or predefined. + /// Possible values include, but are not limited to, the following: + /// + /// * `single` + /// * `inARelationship` + /// * `engaged` + /// * `married` + /// * `itsComplicated` + /// * `openRelationship` + /// * `widowed` + /// * `inDomesticPartnership` + /// * `inCivilUnion` pub value: Option, /// Metadata about the relationship status. pub metadata: Option, @@ -411,20 +430,29 @@ impl Part for RelationshipStatus {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PersonResponse { - /// The original requested resource name. May be different than the resource name on the returned person. The resource name can change when adding or removing fields that link a contact and profile such as a verified email, verified phone number, or a profile URL. - #[serde(rename="requestedResourceName")] - pub requested_resource_name: Option, + /// The status of the response. + pub status: Option, /// The person. pub person: Option, - /// [HTTP 1.1 status code](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). + /// DEPRECATED(Please use status instead). + /// [HTTP 1.1 status + /// code](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). #[serde(rename="httpStatusCode")] pub http_status_code: Option, + /// The original requested resource name. May be different than the resource + /// name on the returned person. + /// + /// The resource name can change when adding or removing fields that link a + /// contact and profile such as a verified email, verified phone number, or a + /// profile URL. + #[serde(rename="requestedResourceName")] + pub requested_resource_name: Option, } impl Part for PersonResponse {} -/// A brief one-line description of the person. +/// A read-only brief one-line description of the person. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -445,7 +473,13 @@ impl Part for Tagline {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ContactGroupMembership { - /// The contact group ID for the contact group membership. The contact group ID can be custom or predefined. Possible values include, but are not limited to, the following: * `myContacts` * `starred` * A numerical ID for user-created groups. + /// The contact group ID for the contact group membership. The contact group + /// ID can be custom or predefined. Possible values include, but are not + /// limited to, the following: + /// + /// * `myContacts` + /// * `starred` + /// * A numerical ID for user-created groups. #[serde(rename="contactGroupId")] pub contact_group_id: Option, } @@ -459,11 +493,18 @@ impl Part for ContactGroupMembership {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Source { + /// The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the + /// source. Used for web cache validation. Only populated in + /// person.metadata.sources. + pub etag: Option, /// The source type. #[serde(rename="type")] pub type_: Option, - /// A unique identifier within the source type generated by the server. + /// The unique identifier within the source type generated by the server. pub id: Option, + /// Metadata about a source of type PROFILE. + #[serde(rename="profileMetadata")] + pub profile_metadata: Option, } impl Part for Source {} @@ -484,16 +525,18 @@ pub struct Interest { impl Part for Interest {} -/// A person's cover photo. A large image shown on the person's profile page that represents who they are or what they care about. +/// A person's read-only cover photo. A large image shown on the person's +/// profile page that represents who they are or what they care about. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CoverPhoto { + /// True if the cover photo is the default cover photo; + /// false if the cover photo is a user-provided cover photo. + pub default: Option, /// The URL of the cover photo. pub url: Option, - /// True if the cover photo is the default cover photo; false if the cover photo is a user-provided cover photo. - pub default: Option, /// Metadata about the cover photo. pub metadata: Option, } @@ -509,9 +552,12 @@ impl Part for CoverPhoto {} pub struct FieldMetadata { /// The source of the field. pub source: Option, - /// True if the field is verified; false if the field is unverified. A verified field is typically a name, email address, phone number, or website that has been confirmed to be owned by the person. + /// True if the field is verified; false if the field is unverified. A + /// verified field is typically a name, email address, phone number, or + /// website that has been confirmed to be owned by the person. pub verified: Option, - /// True if the field is the primary field; false if the field is a secondary field. + /// True if the field is the primary field; false if the field is a secondary + /// field. pub primary: Option, } @@ -530,12 +576,18 @@ pub struct Name { /// The honorific prefixes, such as `Mrs.` or `Dr.` #[serde(rename="honorificPrefix")] pub honorific_prefix: Option, + /// The read-only display name with the last name first formatted according to + /// the locale specified by the viewer's account or the + /// Accept-Language HTTP header. + #[serde(rename="displayNameLastFirst")] + pub display_name_last_first: Option, + /// The read-only display name formatted according to the locale specified by + /// the viewer's account or the Accept-Language HTTP header. + #[serde(rename="displayName")] + pub display_name: Option, /// The family name spelled as it sounds. #[serde(rename="phoneticFamilyName")] pub phonetic_family_name: Option, - /// The display name formatted according to the locale specified by the viewer's account or the Accept-Language HTTP header. - #[serde(rename="displayName")] - pub display_name: Option, /// The middle name(s). #[serde(rename="middleName")] pub middle_name: Option, @@ -545,6 +597,9 @@ pub struct Name { /// The family name. #[serde(rename="familyName")] pub family_name: Option, + /// The full name spelled as it sounds. + #[serde(rename="phoneticFullName")] + pub phonetic_full_name: Option, /// The given name spelled as it sounds. #[serde(rename="phoneticGivenName")] pub phonetic_given_name: Option, @@ -564,16 +619,25 @@ pub struct Name { impl Part for Name {} -/// The kind of relationship the person is looking for. +/// A person's read-only relationship interest . /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RelationshipInterest { - /// The value of the relationship interest translated and formatted in the viewer's account locale or the locale specified in the Accept-Language HTTP header. + /// The value of the relationship interest translated and formatted in the + /// viewer's account locale or the locale specified in the Accept-Language + /// HTTP header. #[serde(rename="formattedValue")] pub formatted_value: Option, - /// The kind of relationship the person is looking for. The value can be custom or predefined. Possible values include, but are not limited to, the following values: * `friend` * `date` * `relationship` * `networking` + /// The kind of relationship the person is looking for. The value can be custom + /// or predefined. Possible values include, but are not limited to, the + /// following values: + /// + /// * `friend` + /// * `date` + /// * `relationship` + /// * `networking` pub value: Option, /// Metadata about the relationship interest. pub metadata: Option, @@ -597,7 +661,7 @@ pub struct BraggingRights { impl Part for BraggingRights {} -/// A person's membership in a group. +/// A person's read-only membership in a group. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -616,7 +680,9 @@ pub struct Membership { impl Part for Membership {} -/// A person's birthday. At least one of the `date` and `text` fields are specified. The `date` and `text` fields typically represent the same date, but are not guaranteed to. +/// A person's birthday. At least one of the `date` and `text` fields are +/// specified. The `date` and `text` fields typically represent the same +/// date, but are not guaranteed to. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -633,21 +699,25 @@ pub struct Birthday { impl Part for Birthday {} -/// A person's physical address. May be a P.O. box or street address. All fields are optional. +/// A person's physical address. May be a P.O. box or street address. All fields +/// are optional. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Address { - /// The read-only type of the address translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. + /// The read-only type of the address translated and formatted in the viewer's + /// account locale or the `Accept-Language` HTTP header locale. #[serde(rename="formattedType")] pub formatted_type: Option, - /// The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country code of the address. + /// The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country + /// code of the address. #[serde(rename="countryCode")] pub country_code: Option, /// The city of the address. pub city: Option, - /// The read-only value of the address formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. + /// The unstructured value of the address. If this is not set by the user it + /// will be automatically constructed from structured values. #[serde(rename="formattedValue")] pub formatted_value: Option, /// The region of the address; for example, the state or province. @@ -666,7 +736,12 @@ pub struct Address { /// The extended address of the address; for example, the apartment number. #[serde(rename="extendedAddress")] pub extended_address: Option, - /// The type of the address. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `other` + /// The type of the address. The type can be custom or predefined. + /// Possible values include, but are not limited to, the following: + /// + /// * `home` + /// * `work` + /// * `other` #[serde(rename="type")] pub type_: Option, /// Metadata about the address. @@ -676,42 +751,67 @@ pub struct Address { impl Part for Address {} -/// Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The day may be 0 to represent a year and month where the day is not significant. The year may be 0 to represent a month and day independent of year; for example, anniversary date. +/// Represents a whole calendar date, for example a date of birth. The time +/// of day and time zone are either specified elsewhere or are not +/// significant. The date is relative to the +/// [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). +/// The day may be 0 to represent a year and month where the day is not +/// significant. The year may be 0 to represent a month and day independent +/// of year; for example, anniversary date. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Date { - /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year. - pub year: Option, - /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant. - pub day: Option, /// Month of year. Must be from 1 to 12. pub month: Option, + /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + /// if specifying a year/month where the day is not significant. + pub day: Option, + /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without + /// a year. + pub year: Option, } impl Part for Date {} -/// A person's email address. +/// A person's relation to another person. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct EmailAddress { - /// The read-only type of the email address translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. +pub struct Relation { + /// The name of the other person this relation refers to. + pub person: Option, + /// The type of the relation translated and formatted in the viewer's account + /// locale or the locale specified in the Accept-Language HTTP header. #[serde(rename="formattedType")] pub formatted_type: Option, - /// The type of the email address. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `other` + /// The person's relation to the other person. The type can be custom or predefined. + /// Possible values include, but are not limited to, the following values: + /// + /// * `spouse` + /// * `child` + /// * `mother` + /// * `father` + /// * `parent` + /// * `brother` + /// * `sister` + /// * `friend` + /// * `relative` + /// * `domesticPartner` + /// * `manager` + /// * `assistant` + /// * `referredBy` + /// * `partner` #[serde(rename="type")] pub type_: Option, - /// The email address. - pub value: Option, - /// Metadata about the email address. + /// Metadata about the relation. pub metadata: Option, } -impl Part for EmailAddress {} +impl Part for Relation {} /// A person's nickname. @@ -732,6 +832,77 @@ pub struct Nickname { impl Part for Nickname {} +/// The `Status` type defines a logical error model that is suitable for different +/// programming environments, including REST APIs and RPC APIs. It is used by +/// [gRPC](https://github.com/grpc). The error model is designed to be: +/// +/// - Simple to use and understand for most users +/// - Flexible enough to meet unexpected needs +/// +/// # Overview +/// +/// The `Status` message contains three pieces of data: error code, error message, +/// and error details. The error code should be an enum value of +/// google.rpc.Code, but it may accept additional error codes if needed. The +/// error message should be a developer-facing English message that helps +/// developers *understand* and *resolve* the error. If a localized user-facing +/// error message is needed, put the localized message in the error details or +/// localize it in the client. The optional error details may contain arbitrary +/// information about the error. There is a predefined set of error detail types +/// in the package `google.rpc` that can be used for common error conditions. +/// +/// # Language mapping +/// +/// The `Status` message is the logical representation of the error model, but it +/// is not necessarily the actual wire format. When the `Status` message is +/// exposed in different client libraries and different wire protocols, it can be +/// mapped differently. For example, it will likely be mapped to some exceptions +/// in Java, but more likely mapped to some error codes in C. +/// +/// # Other uses +/// +/// The error model and the `Status` message can be used in a variety of +/// environments, either with or without APIs, to provide a +/// consistent developer experience across different environments. +/// +/// Example uses of this error model include: +/// +/// - Partial errors. If a service needs to return partial errors to the client, +/// it may embed the `Status` in the normal response to indicate the partial +/// errors. +/// +/// - Workflow errors. A typical workflow has multiple steps. Each step may +/// have a `Status` message for error reporting. +/// +/// - Batch operations. If a client uses batch request and batch response, the +/// `Status` message should be used directly inside batch response, one for +/// each error sub-response. +/// +/// - Asynchronous operations. If an API call embeds asynchronous operation +/// results in its response, the status of those operations should be +/// represented directly using the `Status` message. +/// +/// - Logging. If some API errors are stored in logs, the message `Status` could +/// be used directly after any stripping needed for security/privacy reasons. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Status { + /// A developer-facing error message, which should be in English. Any + /// user-facing error message should be localized and sent in the + /// google.rpc.Status.details field, or localized by the client. + pub message: Option, + /// The status code, which should be an enum value of google.rpc.Code. + pub code: Option, + /// A list of messages that carry the error details. There will be a + /// common set of message types for APIs to use. + pub details: Option>>, +} + +impl Part for Status {} + + /// A person's instant messaging client. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -740,15 +911,33 @@ impl Part for Nickname {} pub struct ImClient { /// The user name used in the IM client. pub username: Option, - /// The read-only type of the IM client translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. + /// The read-only type of the IM client translated and formatted in the + /// viewer's account locale or the `Accept-Language` HTTP header locale. #[serde(rename="formattedType")] pub formatted_type: Option, - /// The protocol of the IM client. The protocol can be custom or predefined. Possible values include, but are not limited to, the following: * `aim` * `msn` * `yahoo` * `skype` * `qq` * `googleTalk` * `icq` * `jabber` * `netMeeting` + /// The protocol of the IM client. The protocol can be custom or predefined. + /// Possible values include, but are not limited to, the following: + /// + /// * `aim` + /// * `msn` + /// * `yahoo` + /// * `skype` + /// * `qq` + /// * `googleTalk` + /// * `icq` + /// * `jabber` + /// * `netMeeting` pub protocol: Option, - /// The read-only protocol of the IM client formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. + /// The read-only protocol of the IM client formatted in the viewer's account + /// locale or the `Accept-Language` HTTP header locale. #[serde(rename="formattedProtocol")] pub formatted_protocol: Option, - /// The type of the IM client. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `other` + /// The type of the IM client. The type can be custom or predefined. + /// Possible values include, but are not limited to, the following: + /// + /// * `home` + /// * `work` + /// * `other` #[serde(rename="type")] pub type_: Option, /// Metadata about the IM client. @@ -758,6 +947,22 @@ pub struct ImClient { impl Part for ImClient {} +/// A person's age range. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AgeRangeType { + /// The age range. + #[serde(rename="ageRange")] + pub age_range: Option, + /// Metadata about the age range. + pub metadata: Option, +} + +impl Part for AgeRangeType {} + + /// There is no detailed description. /// /// # Activities @@ -782,10 +987,22 @@ impl ResponseResult for GetPeopleResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Url { - /// The read-only type of the URL translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. + /// The read-only type of the URL translated and formatted in the viewer's + /// account locale or the `Accept-Language` HTTP header locale. #[serde(rename="formattedType")] pub formatted_type: Option, - /// The type of the URL. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `blog` * `profile` * `homePage` * `ftp` * `reservations` * `appInstallPage`: website for a Google+ application. * `other` + /// The type of the URL. The type can be custom or predefined. + /// Possible values include, but are not limited to, the following: + /// + /// * `home` + /// * `work` + /// * `blog` + /// * `profile` + /// * `homePage` + /// * `ftp` + /// * `reservations` + /// * `appInstallPage`: website for a Google+ application. + /// * `other` #[serde(rename="type")] pub type_: Option, /// The URL. @@ -803,7 +1020,8 @@ impl Part for Url {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Residence { - /// True if the residence is the person's current residence; false if the residence is a past residence. + /// True if the residence is the person's current residence; + /// false if the residence is a past residence. pub current: Option, /// The address of the residence. pub value: Option, @@ -814,7 +1032,12 @@ pub struct Residence { impl Part for Residence {} -/// Information about a person merged from various data sources such as the authenticated user's contacts and profile data. Fields other than IDs, metadata, and group memberships are user-edited. Most fields can have multiple items. The items in a field have no guaranteed order, but each non-empty field is guaranteed to have exactly one field with `metadata.primary` set to true. +/// Information about a person merged from various data sources such as the +/// authenticated user's contacts and profile data. +/// +/// Most fields can have multiple items. The items in a field have no guaranteed +/// order, but each non-empty field is guaranteed to have exactly one field with +/// `metadata.primary` set to true. /// /// # Activities /// @@ -839,18 +1062,17 @@ pub struct Person { /// The person's phone numbers. #[serde(rename="phoneNumbers")] pub phone_numbers: Option>, - /// The person's age range. - #[serde(rename="ageRange")] - pub age_range: Option, /// The person's photos. pub photos: Option>, /// The person's names. pub names: Option>, - /// The person's biographies. - pub biographies: Option>, + /// DEPRECATED(Please read person.age_ranges instead). The person's age range. + #[serde(rename="ageRange")] + pub age_range: Option, /// The person's residences. pub residences: Option>, - /// The resource name for the person, assigned by the server. An ASCII string with a max length of 27 characters. Always starts with `people/`. + /// The resource name for the person, assigned by the server. An ASCII string + /// with a max length of 27 characters, in the form of `people/`. #[serde(rename="resourceName")] pub resource_name: Option, /// The kind of relationship the person is looking for. @@ -863,17 +1085,23 @@ pub struct Person { pub locales: Option>, /// The person's past or current organizations. pub organizations: Option>, + /// The person's taglines. + pub taglines: Option>, /// The person's skills. pub skills: Option>, + /// The person's age ranges. + #[serde(rename="ageRanges")] + pub age_ranges: Option>, /// The person's birthdays. pub birthdays: Option>, /// The person's relations. pub relations: Option>, /// The person's group memberships. pub memberships: Option>, - /// The person's taglines. - pub taglines: Option>, - /// The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the resource. Used for web cache validation. + /// The person's biographies. + pub biographies: Option>, + /// The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the + /// resource. Used for web cache validation. pub etag: Option, /// The person's associated URLs. pub urls: Option>, @@ -903,10 +1131,18 @@ impl ResponseResult for Person {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Gender { - /// The read-only value of the gender translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. + /// The read-only value of the gender translated and formatted in the viewer's + /// account locale or the `Accept-Language` HTTP header locale. #[serde(rename="formattedValue")] pub formatted_value: Option, - /// The gender for the person. The gender can be custom or predefined. Possible values include, but are not limited to, the following: * `male` * `female` * `other` * `unknown` + /// The gender for the person. The gender can be custom or predefined. + /// Possible values include, but are not limited to, the + /// following: + /// + /// * `male` + /// * `female` + /// * `other` + /// * `unknown` pub value: Option, /// Metadata about the gender. pub metadata: Option, @@ -921,31 +1157,49 @@ impl Part for Gender {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PhoneNumber { - /// The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf) form of the phone number. - #[serde(rename="canonicalForm")] - pub canonical_form: Option, + /// The read-only type of the phone number translated and formatted in the + /// viewer's account locale or the the `Accept-Language` HTTP header locale. + #[serde(rename="formattedType")] + pub formatted_type: Option, /// Metadata about the phone number. pub metadata: Option, - /// The type of the phone number. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `home` * `work` * `mobile` * `homeFax` * `workFax` * `otherFax` * `pager` * `workMobile` * `workPager` * `main` * `googleVoice` * `other` + /// The type of the phone number. The type can be custom or predefined. + /// Possible values include, but are not limited to, the following: + /// + /// * `home` + /// * `work` + /// * `mobile` + /// * `homeFax` + /// * `workFax` + /// * `otherFax` + /// * `pager` + /// * `workMobile` + /// * `workPager` + /// * `main` + /// * `googleVoice` + /// * `other` #[serde(rename="type")] pub type_: Option, /// The phone number. pub value: Option, - /// The read-only type of the phone number translated and formatted in the viewer's account locale or the the `Accept-Language` HTTP header locale. - #[serde(rename="formattedType")] - pub formatted_type: Option, + /// The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf) + /// form of the phone number. + #[serde(rename="canonicalForm")] + pub canonical_form: Option, } impl Part for PhoneNumber {} -/// A person's past or current organization. Overlapping date ranges are permitted. +/// A person's past or current organization. Overlapping date ranges are +/// permitted. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Organization { - /// The read-only type of the organization translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. + /// The read-only type of the organization translated and formatted in the + /// viewer's account locale or the `Accept-Language` HTTP header locale. #[serde(rename="formattedType")] pub formatted_type: Option, /// The domain name associated with the organization; for example, `google.com`. @@ -955,14 +1209,20 @@ pub struct Organization { pub end_date: Option, /// The name of the organization. pub name: Option, - /// The start date when the person joined the organization. - #[serde(rename="startDate")] - pub start_date: Option, - /// The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. - pub symbol: Option, /// The person's job title at the organization. pub title: Option, - /// True if the organization is the person's current organization; false if the organization is a past organization. + /// The type of the organization. The type can be custom or predefined. + /// Possible values include, but are not limited to, the following: + /// + /// * `work` + /// * `school` + #[serde(rename="type")] + pub type_: Option, + /// The symbol associated with the organization; for example, a stock ticker + /// symbol, abbreviation, or acronym. + pub symbol: Option, + /// True if the organization is the person's current organization; + /// false if the organization is a past organization. pub current: Option, /// The person's job description at the organization. #[serde(rename="jobDescription")] @@ -971,9 +1231,9 @@ pub struct Organization { pub location: Option, /// The person's department at the organization. pub department: Option, - /// The type of the organization. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `work` * `school` - #[serde(rename="type")] - pub type_: Option, + /// The start date when the person joined the organization. + #[serde(rename="startDate")] + pub start_date: Option, /// The phonetic name of the organization. #[serde(rename="phoneticName")] pub phonetic_name: Option, @@ -990,7 +1250,8 @@ impl Part for Organization {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Locale { - /// The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) language tag representing the locale. + /// The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) + /// language tag representing the locale. pub value: Option, /// Metadata about the locale. pub metadata: Option, @@ -999,7 +1260,8 @@ pub struct Locale { impl Part for Locale {} -/// A person's photo. A picture shown next to the person's name to help others recognize the person. +/// A person's read-only photo. A picture shown next to the person's name to +/// help others recognize the person. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -1014,19 +1276,31 @@ pub struct Photo { impl Part for Photo {} -/// Metadata about a person. +/// The read-only metadata about a person. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PersonMetadata { - /// Any former resource names this person has had. Populated only for [`connections.list`](/people/api/rest/v1/people.connections/list) requests that include a sync token. The resource name may change when adding or removing fields that link a contact and profile such as a verified email, verified phone number, or profile URL. + /// Any former resource names this person has had. Populated only for + /// [`connections.list`](/people/api/rest/v1/people.connections/list) requests + /// that include a sync token. + /// + /// The resource name may change when adding or removing fields that link a + /// contact and profile such as a verified email, verified phone number, or + /// profile URL. #[serde(rename="previousResourceNames")] pub previous_resource_names: Option>, /// The sources of data for the person. pub sources: Option>, - /// True if the person resource has been deleted. Populated only for [`connections.list`](/people/api/rest/v1/people.connections/list) requests that include a sync token. + /// Resource names of people linked to this resource. + #[serde(rename="linkedPeopleResourceNames")] + pub linked_people_resource_names: Option>, + /// True if the person resource has been deleted. Populated only for + /// [`connections.list`](/people/api/rest/v1/people.connections/list) requests + /// that include a sync token. pub deleted: Option, + /// DEPRECATED(Please read person.metadata.sources.profile_metadata instead). /// The type of the person object. #[serde(rename="objectType")] pub object_type: Option, @@ -1035,25 +1309,34 @@ pub struct PersonMetadata { impl Part for PersonMetadata {} -/// A person's relation to another person. +/// A person's email address. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Relation { - /// The name of the other person this relation refers to. - pub person: Option, - /// Metadata about the relation. - pub metadata: Option, - /// The person's relation to the other person. The type can be custom or predefined. Possible values include, but are not limited to, the following values: * `spouse` * `child` * `mother` * `father` * `parent` * `brother` * `sister` * `friend` * `relative` * `domesticPartner` * `manager` * `assistant` * `referredBy` * `partner` - #[serde(rename="type")] - pub type_: Option, - /// The type of the relation translated and formatted in the viewer's account locale or the locale specified in the Accept-Language HTTP header. +pub struct EmailAddress { + /// The read-only type of the email address translated and formatted in the + /// viewer's account locale or the `Accept-Language` HTTP header locale. #[serde(rename="formattedType")] pub formatted_type: Option, + /// The type of the email address. The type can be custom or predefined. + /// Possible values include, but are not limited to, the following: + /// + /// * `home` + /// * `work` + /// * `other` + #[serde(rename="type")] + pub type_: Option, + /// The display name of the email. + #[serde(rename="displayName")] + pub display_name: Option, + /// The email address. + pub value: Option, + /// Metadata about the email address. + pub metadata: Option, } -impl Part for Relation {} +impl Part for EmailAddress {} /// A skill that the person has. @@ -1071,6 +1354,21 @@ pub struct Skill { impl Part for Skill {} +/// A person's occupation. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Occupation { + /// The occupation; for example, `carpenter`. + pub value: Option, + /// Metadata about the occupation. + pub metadata: Option, +} + +impl Part for Occupation {} + + /// A Google Apps Domain membership. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1093,10 +1391,15 @@ impl Part for DomainMembership {} pub struct Event { /// The date of the event. pub date: Option, - /// The read-only type of the event translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. + /// The read-only type of the event translated and formatted in the + /// viewer's account locale or the `Accept-Language` HTTP header locale. #[serde(rename="formattedType")] pub formatted_type: Option, - /// The type of the event. The type can be custom or predefined. Possible values include, but are not limited to, the following: * `anniversary` * `other` + /// The type of the event. The type can be custom or predefined. + /// Possible values include, but are not limited to, the following: + /// + /// * `anniversary` + /// * `other` #[serde(rename="type")] pub type_: Option, /// Metadata about the event. @@ -1112,6 +1415,9 @@ impl Part for Event {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Biography { + /// The content type of the biography. + #[serde(rename="contentType")] + pub content_type: Option, /// The short biography. pub value: Option, /// Metadata about the biography. @@ -1121,19 +1427,18 @@ pub struct Biography { impl Part for Biography {} -/// A person's occupation. +/// The read-only metadata about a profile. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Occupation { - /// The occupation; for example, `carpenter`. - pub value: Option, - /// Metadata about the occupation. - pub metadata: Option, +pub struct ProfileMetadata { + /// The profile object type. + #[serde(rename="objectType")] + pub object_type: Option, } -impl Part for Occupation {} +impl Part for ProfileMetadata {} @@ -1142,7 +1447,7 @@ impl Part for Occupation {} // ################# /// A builder providing access to all methods supported on *people* resources. -/// It is not used directly, but through the `People` hub. +/// It is not used directly, but through the `PeopleService` hub. /// /// # Example /// @@ -1156,13 +1461,13 @@ impl Part for Occupation {} /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use people1::People; +/// use people1::PeopleService; /// /// let secret: ApplicationSecret = Default::default(); /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); -/// let mut hub = People::new(hyper::Client::new(), auth); +/// let mut hub = PeopleService::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* /// // like `connections_list(...)`, `get(...)` and `get_batch_get(...)` /// // to build up your call. @@ -1172,7 +1477,7 @@ impl Part for Occupation {} pub struct PeopleMethods<'a, C, A> where C: 'a, A: 'a { - hub: &'a People, + hub: &'a PeopleService, } impl<'a, C, A> MethodsBuilder for PeopleMethods<'a, C, A> {} @@ -1181,11 +1486,16 @@ impl<'a, C, A> PeopleMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Provides information about a person resource for a resource name. Use `people/me` to indicate the authenticated user. + /// Provides information about a person for a resource name. Use + /// `people/me` to indicate the authenticated user. /// /// # Arguments /// - /// * `resourceName` - The resource name of the person to provide information about. - To get information about the authenticated user, specify `people/me`. - To get information about any user, specify the resource name that identifies the user, such as the resource names returned by [`people.connections.list`](/people/api/rest/v1/people.connections/list). + /// * `resourceName` - The resource name of the person to provide information about. + /// - To get information about the authenticated user, specify `people/me`. + /// - To get information about any user, specify the resource name that + /// identifies the user, such as the resource names returned by + /// [`people.connections.list`](/people/api/rest/v1/people.connections/list). pub fn get(&self, resource_name: &str) -> PeopleGetCall<'a, C, A> { PeopleGetCall { hub: self.hub, @@ -1199,7 +1509,8 @@ impl<'a, C, A> PeopleMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Provides a list of the authenticated user's contacts merged with any linked profiles. + /// Provides a list of the authenticated user's contacts merged with any + /// linked profiles. /// /// # Arguments /// @@ -1210,6 +1521,7 @@ impl<'a, C, A> PeopleMethods<'a, C, A> { _resource_name: resource_name.to_string(), _sync_token: Default::default(), _sort_order: Default::default(), + _request_sync_token: Default::default(), _request_mask_include_field: Default::default(), _page_token: Default::default(), _page_size: Default::default(), @@ -1221,7 +1533,9 @@ impl<'a, C, A> PeopleMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Provides information about a list of specific people by specifying a list of requested resource names. Use `people/me` to indicate the authenticated user. + /// Provides information about a list of specific people by specifying a list + /// of requested resource names. Use `people/me` to indicate the authenticated + /// user. pub fn get_batch_get(&self) -> PeopleGetBatchGetCall<'a, C, A> { PeopleGetBatchGetCall { hub: self.hub, @@ -1242,7 +1556,8 @@ impl<'a, C, A> PeopleMethods<'a, C, A> { // CallBuilders ### // ################# -/// Provides information about a person resource for a resource name. Use `people/me` to indicate the authenticated user. +/// Provides information about a person for a resource name. Use +/// `people/me` to indicate the authenticated user. /// /// A builder for the *get* method supported by a *people* resource. /// It is not used directly, but through a `PeopleMethods` instance. @@ -1258,13 +1573,13 @@ impl<'a, C, A> PeopleMethods<'a, C, A> { /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use people1::People; +/// # use people1::PeopleService; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = People::new(hyper::Client::new(), auth); +/// # let mut hub = PeopleService::new(hyper::Client::new(), 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 ! @@ -1276,7 +1591,7 @@ impl<'a, C, A> PeopleMethods<'a, C, A> { pub struct PeopleGetCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a People, + hub: &'a PeopleService, _resource_name: String, _request_mask_include_field: Option, _delegate: Option<&'a mut Delegate>, @@ -1424,7 +1739,12 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau } - /// The resource name of the person to provide information about. - To get information about the authenticated user, specify `people/me`. - To get information about any user, specify the resource name that identifies the user, such as the resource names returned by [`people.connections.list`](/people/api/rest/v1/people.connections/list). + /// The resource name of the person to provide information about. + /// + /// - To get information about the authenticated user, specify `people/me`. + /// - To get information about any user, specify the resource name that + /// identifies the user, such as the resource names returned by + /// [`people.connections.list`](/people/api/rest/v1/people.connections/list). /// /// Sets the *resource name* path property to the given value. /// @@ -1434,7 +1754,12 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau self._resource_name = new_value.to_string(); self } - /// Comma-separated list of fields to be included in the response. Omitting this field will include all fields. Each path should start with `person.`: for example, `person.names` or `person.photos`. + /// Comma-separated list of fields to be included in the response. Omitting + /// this field will include all fields except for connections.list requests, + /// which have a default mask that includes common fields like metadata, name, + /// photo, and profile url. + /// Each path should start with `person.`: for example, `person.names` or + /// `person.photos`. /// /// Sets the *request mask.include field* query property to the given value. pub fn request_mask_include_field(mut self, new_value: &str) -> PeopleGetCall<'a, C, A> { @@ -1499,7 +1824,8 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau } -/// Provides a list of the authenticated user's contacts merged with any linked profiles. +/// Provides a list of the authenticated user's contacts merged with any +/// linked profiles. /// /// A builder for the *connections.list* method supported by a *people* resource. /// It is not used directly, but through a `PeopleMethods` instance. @@ -1515,32 +1841,34 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use people1::People; +/// # use people1::PeopleService; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = People::new(hyper::Client::new(), auth); +/// # let mut hub = PeopleService::new(hyper::Client::new(), 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.people().connections_list("resourceName") /// .sync_token("justo") /// .sort_order("amet.") -/// .request_mask_include_field("erat") -/// .page_token("labore") -/// .page_size(-9) +/// .request_sync_token(false) +/// .request_mask_include_field("labore") +/// .page_token("sea") +/// .page_size(-90) /// .doit(); /// # } /// ``` pub struct PeopleConnectionListCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a People, + hub: &'a PeopleService, _resource_name: String, _sync_token: Option, _sort_order: Option, + _request_sync_token: Option, _request_mask_include_field: Option, _page_token: Option, _page_size: Option, @@ -1566,7 +1894,7 @@ impl<'a, C, A> PeopleConnectionListCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((8 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); params.push(("resourceName", self._resource_name.to_string())); if let Some(value) = self._sync_token { params.push(("syncToken", value.to_string())); @@ -1574,6 +1902,9 @@ impl<'a, C, A> PeopleConnectionListCall<'a, C, A> where C: BorrowMut PeopleConnectionListCall<'a, C, A> where C: BorrowMut PeopleConnectionListCall<'a, C, A> where C: BorrowMut PeopleConnectionListCall<'a, C, A> { self._sync_token = Some(new_value.to_string()); self } - /// The order in which the connections should be sorted. Defaults to `LAST_MODIFIED_ASCENDING`. + /// The order in which the connections should be sorted. Defaults to + /// `LAST_MODIFIED_ASCENDING`. /// /// Sets the *sort order* query property to the given value. pub fn sort_order(mut self, new_value: &str) -> PeopleConnectionListCall<'a, C, A> { self._sort_order = Some(new_value.to_string()); self } - /// Comma-separated list of fields to be included in the response. Omitting this field will include all fields. Each path should start with `person.`: for example, `person.names` or `person.photos`. + /// Whether the response should include a sync token, which can be used to get + /// all changes since the last request. + /// + /// Sets the *request sync token* query property to the given value. + pub fn request_sync_token(mut self, new_value: bool) -> PeopleConnectionListCall<'a, C, A> { + self._request_sync_token = Some(new_value); + self + } + /// Comma-separated list of fields to be included in the response. Omitting + /// this field will include all fields except for connections.list requests, + /// which have a default mask that includes common fields like metadata, name, + /// photo, and profile url. + /// Each path should start with `person.`: for example, `person.names` or + /// `person.photos`. /// /// Sets the *request mask.include field* query property to the given value. pub fn request_mask_include_field(mut self, new_value: &str) -> PeopleConnectionListCall<'a, C, A> { @@ -1739,7 +2085,8 @@ impl<'a, C, A> PeopleConnectionListCall<'a, C, A> where C: BorrowMut PeopleConnectionListCall<'a, C, A> { @@ -1804,7 +2151,9 @@ impl<'a, C, A> PeopleConnectionListCall<'a, C, A> where C: BorrowMut PeopleConnectionListCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = People::new(hyper::Client::new(), auth); +/// # let mut hub = PeopleService::new(hyper::Client::new(), 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.people().get_batch_get() -/// .add_resource_names("nonumy") -/// .request_mask_include_field("dolores") +/// .add_resource_names("dolores") +/// .request_mask_include_field("gubergren") /// .doit(); /// # } /// ``` pub struct PeopleGetBatchGetCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a People, + hub: &'a PeopleService, _resource_names: Vec, _request_mask_include_field: Option, _delegate: Option<&'a mut Delegate>, @@ -1966,7 +2315,10 @@ impl<'a, C, A> PeopleGetBatchGetCall<'a, C, A> where C: BorrowMut } - /// The resource name, such as one returned by [`people.connections.list`](/people/api/rest/v1/people.connections/list), of one of the people to provide information about. You can include this parameter up to 50 times in one request. + /// The resource name, such as one returned by + /// [`people.connections.list`](/people/api/rest/v1/people.connections/list), + /// of one of the people to provide information about. You can include this + /// parameter up to 50 times in one request. /// /// Append the given value to the *resource names* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -1974,7 +2326,12 @@ impl<'a, C, A> PeopleGetBatchGetCall<'a, C, A> where C: BorrowMut self._resource_names.push(new_value.to_string()); self } - /// Comma-separated list of fields to be included in the response. Omitting this field will include all fields. Each path should start with `person.`: for example, `person.names` or `person.photos`. + /// Comma-separated list of fields to be included in the response. Omitting + /// this field will include all fields except for connections.list requests, + /// which have a default mask that includes common fields like metadata, name, + /// photo, and profile url. + /// Each path should start with `person.`: for example, `person.names` or + /// `person.photos`. /// /// Sets the *request mask.include field* query property to the given value. pub fn request_mask_include_field(mut self, new_value: &str) -> PeopleGetBatchGetCall<'a, C, A> { diff --git a/gen/playmoviespartner1-cli/Cargo.toml b/gen/playmoviespartner1-cli/Cargo.toml index 2f9a4648f3..e0e67b429a 100644 --- a/gen/playmoviespartner1-cli/Cargo.toml +++ b/gen/playmoviespartner1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-playmoviespartner1-cli" -version = "1.0.4+20160518" +version = "1.0.4+20170516" authors = ["Sebastian Thiel "] description = "A complete library to interact with Play Movies (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/playmoviespartner1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-playmoviespartner1] path = "../playmoviespartner1" -version = "1.0.4+20160518" +version = "1.0.4+20170516" diff --git a/gen/playmoviespartner1-cli/README.md b/gen/playmoviespartner1-cli/README.md index c9d8020e7a..155194d291 100644 --- a/gen/playmoviespartner1-cli/README.md +++ b/gen/playmoviespartner1-cli/README.md @@ -25,17 +25,13 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Play Movies* API at revision *20160518*. The CLI is at version *1.0.4*. +This documentation was generated from the *Play Movies* API at revision *20170516*. The CLI is at version *1.0.4*. ```bash playmoviespartner1 [options] accounts avails-get [-p ]... [-o ] avails-list [-p ]... [-o ] - components-list [-p ]... [-o ] - components-type-get [-p ]... [-o ] - experience-locales-get [-p ]... [-o ] - experience-locales-list [-p ]... [-o ] orders-get [-p ]... [-o ] orders-list [-p ]... [-o ] store-infos-country-get [-p ]... [-o ] diff --git a/gen/playmoviespartner1-cli/mkdocs.yml b/gen/playmoviespartner1-cli/mkdocs.yml index 94179fb1f0..bfab03ca7a 100644 --- a/gen/playmoviespartner1-cli/mkdocs.yml +++ b/gen/playmoviespartner1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Play Movies v1.0.4+20160518 +site_name: Play Movies v1.0.4+20170516 site_url: http://byron.github.io/google-apis-rs/google-playmoviespartner1-cli site_description: A complete library to interact with Play Movies (protocol v1) @@ -11,10 +11,6 @@ pages: - ['index.md', 'Home'] - ['accounts_avails-get.md', 'Accounts', 'Avails Get'] - ['accounts_avails-list.md', 'Accounts', 'Avails List'] -- ['accounts_components-list.md', 'Accounts', 'Components List'] -- ['accounts_components-type-get.md', 'Accounts', 'Components Type Get'] -- ['accounts_experience-locales-get.md', 'Accounts', 'Experience Locales Get'] -- ['accounts_experience-locales-list.md', 'Accounts', 'Experience Locales List'] - ['accounts_orders-get.md', 'Accounts', 'Orders Get'] - ['accounts_orders-list.md', 'Accounts', 'Orders List'] - ['accounts_store-infos-country-get.md', 'Accounts', 'Store Infos Country Get'] diff --git a/gen/playmoviespartner1-cli/src/main.rs b/gen/playmoviespartner1-cli/src/main.rs index 6a4ae941f6..a0bea39472 100644 --- a/gen/playmoviespartner1-cli/src/main.rs +++ b/gen/playmoviespartner1-cli/src/main.rs @@ -178,285 +178,6 @@ impl<'n> Engine<'n> { } } - fn _accounts_components_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.accounts().components_list(opt.value_of("account-id").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 { - "title-level-eidr" => { - call = call.title_level_eidr(value.unwrap_or("")); - }, - "studio-names" => { - call = call.add_studio_names(value.unwrap_or("")); - }, - "status" => { - call = call.add_status(value.unwrap_or("")); - }, - "presentation-id" => { - call = call.presentation_id(value.unwrap_or("")); - }, - "pph-names" => { - call = call.add_pph_names(value.unwrap_or("")); - }, - "playable-sequence-id" => { - call = call.playable_sequence_id(value.unwrap_or("")); - }, - "page-token" => { - call = call.page_token(value.unwrap_or("")); - }, - "page-size" => { - call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); - }, - "inventory-id" => { - call = call.inventory_id(value.unwrap_or("")); - }, - "filename" => { - call = call.filename(value.unwrap_or("")); - }, - "el-id" => { - call = call.el_id(value.unwrap_or("")); - }, - "edit-level-eidr" => { - call = call.edit_level_eidr(value.unwrap_or("")); - }, - "custom-id" => { - call = call.custom_id(value.unwrap_or("")); - }, - "alt-cut-id" => { - call = call.alt_cut_id(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(["status", "presentation-id", "title-level-eidr", "page-size", "alt-cut-id", "studio-names", "filename", "page-token", "pph-names", "edit-level-eidr", "inventory-id", "el-id", "custom-id", "playable-sequence-id"].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(), - _ => 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(()) - } - } - } - } - - fn _accounts_components_type_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.accounts().components_type_get(opt.value_of("account-id").unwrap_or(""), opt.value_of("component-id").unwrap_or(""), opt.value_of("type").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(), - _ => 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(()) - } - } - } - } - - fn _accounts_experience_locales_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.accounts().experience_locales_get(opt.value_of("account-id").unwrap_or(""), opt.value_of("el-id").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(), - _ => 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(()) - } - } - } - } - - fn _accounts_experience_locales_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.accounts().experience_locales_list(opt.value_of("account-id").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 { - "title-level-eidr" => { - call = call.title_level_eidr(value.unwrap_or("")); - }, - "studio-names" => { - call = call.add_studio_names(value.unwrap_or("")); - }, - "status" => { - call = call.add_status(value.unwrap_or("")); - }, - "pph-names" => { - call = call.add_pph_names(value.unwrap_or("")); - }, - "page-token" => { - call = call.page_token(value.unwrap_or("")); - }, - "page-size" => { - call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); - }, - "edit-level-eidr" => { - call = call.edit_level_eidr(value.unwrap_or("")); - }, - "custom-id" => { - call = call.custom_id(value.unwrap_or("")); - }, - "alt-cut-id" => { - call = call.alt_cut_id(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(["status", "pph-names", "title-level-eidr", "page-size", "studio-names", "page-token", "edit-level-eidr", "custom-id", "alt-cut-id"].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(), - _ => 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(()) - } - } - } - } - fn _accounts_orders_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.accounts().orders_get(opt.value_of("account-id").unwrap_or(""), opt.value_of("order-id").unwrap_or("")); @@ -734,18 +455,6 @@ impl<'n> Engine<'n> { ("avails-list", Some(opt)) => { call_result = self._accounts_avails_list(opt, dry_run, &mut err); }, - ("components-list", Some(opt)) => { - call_result = self._accounts_components_list(opt, dry_run, &mut err); - }, - ("components-type-get", Some(opt)) => { - call_result = self._accounts_components_type_get(opt, dry_run, &mut err); - }, - ("experience-locales-get", Some(opt)) => { - call_result = self._accounts_experience_locales_get(opt, dry_run, &mut err); - }, - ("experience-locales-list", Some(opt)) => { - call_result = self._accounts_experience_locales_list(opt, dry_run, &mut err); - }, ("orders-get", Some(opt)) => { call_result = self._accounts_orders_get(opt, dry_run, &mut err); }, @@ -850,7 +559,7 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ - ("accounts", "methods: 'avails-get', 'avails-list', 'components-list', 'components-type-get', 'experience-locales-get', 'experience-locales-list', 'orders-get', 'orders-list', 'store-infos-country-get' and 'store-infos-list'", vec![ + ("accounts", "methods: 'avails-get', 'avails-list', 'orders-get', 'orders-list', 'store-infos-country-get' and 'store-infos-list'", vec![ ("avails-get", Some(r##"Get an Avail given its avail group id and avail id."##), "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_avails-get", @@ -880,7 +589,10 @@ fn main() { Some(false)), ]), ("avails-list", - Some(r##"List Avails owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method."##), + Some(r##"List Avails owned or managed by the partner. + + See _Authentication and Authorization rules_ and + _List methods rules_ for more information about this method."##), "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_avails-list", vec![ (Some(r##"account-id"##), @@ -895,112 +607,6 @@ fn main() { 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)), - ]), - ("components-list", - Some(r##"List Components owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method."##), - "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_components-list", - vec![ - (Some(r##"account-id"##), - None, - Some(r##"REQUIRED. See _General rules_ for more information about this field."##), - 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)), - ]), - ("components-type-get", - Some(r##"Get a Component given its id."##), - "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_components-type-get", - vec![ - (Some(r##"account-id"##), - None, - Some(r##"REQUIRED. See _General rules_ for more information about this field."##), - Some(true), - Some(false)), - - (Some(r##"component-id"##), - None, - Some(r##"REQUIRED. Component ID."##), - Some(true), - Some(false)), - - (Some(r##"type"##), - None, - Some(r##"REQUIRED. Component Type."##), - 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)), - ]), - ("experience-locales-get", - Some(r##"Get an ExperienceLocale given its id. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method."##), - "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_experience-locales-get", - vec![ - (Some(r##"account-id"##), - None, - Some(r##"REQUIRED. See _General rules_ for more information about this field."##), - Some(true), - Some(false)), - - (Some(r##"el-id"##), - None, - Some(r##"REQUIRED. ExperienceLocale ID, as defined by Google."##), - 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)), - ]), - ("experience-locales-list", - Some(r##"List ExperienceLocales owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method."##), - "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_experience-locales-list", - vec![ - (Some(r##"account-id"##), - None, - Some(r##"REQUIRED. See _General rules_ for more information about this field."##), - 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"##), @@ -1008,7 +614,10 @@ fn main() { Some(false)), ]), ("orders-get", - Some(r##"Get an Order given its id. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method."##), + Some(r##"Get an Order given its id. + + See _Authentication and Authorization rules_ and + _Get methods rules_ for more information about this method."##), "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_orders-get", vec![ (Some(r##"account-id"##), @@ -1036,7 +645,10 @@ fn main() { Some(false)), ]), ("orders-list", - Some(r##"List Orders owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method."##), + Some(r##"List Orders owned or managed by the partner. + + See _Authentication and Authorization rules_ and + _List methods rules_ for more information about this method."##), "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_orders-list", vec![ (Some(r##"account-id"##), @@ -1058,7 +670,10 @@ fn main() { Some(false)), ]), ("store-infos-country-get", - Some(r##"Get a StoreInfo given its video id and country. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method."##), + Some(r##"Get a StoreInfo given its video id and country. + + See _Authentication and Authorization rules_ and + _Get methods rules_ for more information about this method."##), "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_store-infos-country-get", vec![ (Some(r##"account-id"##), @@ -1092,7 +707,10 @@ fn main() { Some(false)), ]), ("store-infos-list", - Some(r##"List StoreInfos owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method."##), + Some(r##"List StoreInfos owned or managed by the partner. + + See _Authentication and Authorization rules_ and + _List methods rules_ for more information about this method."##), "Details at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli/accounts_store-infos-list", vec![ (Some(r##"account-id"##), @@ -1119,7 +737,7 @@ fn main() { let mut app = App::new("playmoviespartner1") .author("Sebastian Thiel ") - .version("1.0.4+20160518") + .version("1.0.4+20170516") .about("Gets the delivery status of titles for Google Play Movies Partners.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli") .arg(Arg::with_name("url") diff --git a/gen/playmoviespartner1/Cargo.toml b/gen/playmoviespartner1/Cargo.toml index a1f931cade..bee626b725 100644 --- a/gen/playmoviespartner1/Cargo.toml +++ b/gen/playmoviespartner1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-playmoviespartner1" -version = "1.0.4+20160518" +version = "1.0.4+20170516" authors = ["Sebastian Thiel "] description = "A complete library to interact with Play Movies (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/playmoviespartner1" homepage = "https://developers.google.com/playmoviespartner/" -documentation = "https://docs.rs/google-playmoviespartner1/1.0.4+20160518" +documentation = "https://docs.rs/google-playmoviespartner1/1.0.4+20170516" license = "MIT" keywords = ["playmoviespartner", "google", "protocol", "web", "api"] diff --git a/gen/playmoviespartner1/README.md b/gen/playmoviespartner1/README.md index 44330a2fe1..90e3a38e81 100644 --- a/gen/playmoviespartner1/README.md +++ b/gen/playmoviespartner1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-playmoviespartner1` library allows access to all features of the *Google Play Movies* service. -This documentation was generated from *Play Movies* crate version *1.0.4+20160518*, where *20160518* is the exact revision of the *playmoviespartner:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Play Movies* crate version *1.0.4+20170516*, where *20170516* is the exact revision of the *playmoviespartner:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Play Movies* *v1* API can be found at the [official documentation site](https://developers.google.com/playmoviespartner/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.PlayMovies.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/struct.PlayMovies.html) ... * accounts - * [*avails get*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountAvailGetCall.html), [*avails list*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountAvailListCall.html), [*components list*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountComponentListCall.html), [*components type get*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountComponentTypeGetCall.html), [*experience locales get*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountExperienceLocaleGetCall.html), [*experience locales list*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountExperienceLocaleListCall.html), [*orders get*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountOrderGetCall.html), [*orders list*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountOrderListCall.html), [*store infos country get*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountStoreInfoCountryGetCall.html) and [*store infos list*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.AccountStoreInfoListCall.html) + * [*avails get*](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/struct.AccountAvailGetCall.html), [*avails list*](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/struct.AccountAvailListCall.html), [*orders get*](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/struct.AccountOrderGetCall.html), [*orders list*](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/struct.AccountOrderListCall.html), [*store infos country get*](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/struct.AccountStoreInfoCountryGetCall.html) and [*store infos list*](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/struct.AccountStoreInfoListCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/struct.PlayMovies.html)** +* **[Hub](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/struct.PlayMovies.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.Part.html)** + * **[Parts](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -115,17 +115,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.Delegate.html), 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-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.ResponseResult.html), 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")`. @@ -135,29 +135,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.CallBuilder.html) 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-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.CallBuilder.html), 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-playmoviespartner1/1.0.4+20160518/google_playmoviespartner1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-playmoviespartner1/1.0.4+20170516/google_playmoviespartner1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/playmoviespartner1/src/lib.rs b/gen/playmoviespartner1/src/lib.rs index eac28886bd..d175636f92 100644 --- a/gen/playmoviespartner1/src/lib.rs +++ b/gen/playmoviespartner1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Play Movies* crate version *1.0.4+20160518*, where *20160518* is the exact revision of the *playmoviespartner:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Play Movies* crate version *1.0.4+20170516*, where *20170516* is the exact revision of the *playmoviespartner:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Play Movies* *v1* API can be found at the //! [official documentation site](https://developers.google.com/playmoviespartner/). @@ -12,7 +12,7 @@ //! Handle the following *Resources* with ease from the central [hub](struct.PlayMovies.html) ... //! //! * accounts -//! * [*avails get*](struct.AccountAvailGetCall.html), [*avails list*](struct.AccountAvailListCall.html), [*components list*](struct.AccountComponentListCall.html), [*components type get*](struct.AccountComponentTypeGetCall.html), [*experience locales get*](struct.AccountExperienceLocaleGetCall.html), [*experience locales list*](struct.AccountExperienceLocaleListCall.html), [*orders get*](struct.AccountOrderGetCall.html), [*orders list*](struct.AccountOrderListCall.html), [*store infos country get*](struct.AccountStoreInfoCountryGetCall.html) and [*store infos list*](struct.AccountStoreInfoListCall.html) +//! * [*avails get*](struct.AccountAvailGetCall.html), [*avails list*](struct.AccountAvailListCall.html), [*orders get*](struct.AccountOrderGetCall.html), [*orders list*](struct.AccountOrderListCall.html), [*store infos country get*](struct.AccountStoreInfoCountryGetCall.html) and [*store infos list*](struct.AccountStoreInfoListCall.html) //! //! //! @@ -329,29 +329,188 @@ impl<'a, C, A> PlayMovies // ############ // SCHEMAS ### // ########## -/// Response to the 'ListExperienceLocales' method. +/// An Avail describes the Availability Window of a specific Edit in a given +/// country, which means the period Google is allowed to sell or rent the Edit. +/// +/// Avails are exposed in EMA format Version 1.6b (available at +/// http://www.movielabs.com/md/avails/) +/// +/// Studios can see the Avails for the Titles they own. +/// Post-production houses cannot see any Avails. /// /// # 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*). /// -/// * [experience locales list accounts](struct.AccountExperienceLocaleListCall.html) (response) +/// * [avails get accounts](struct.AccountAvailGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListExperienceLocalesResponse { - /// See _List methods rules_ for info about this field. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// See _List methods rules_ for more information about this field. - #[serde(rename="totalSize")] - pub total_size: Option, - /// List of ExperienceLocales that match the request criteria. - #[serde(rename="experienceLocales")] - pub experience_locales: Option>, +pub struct Avail { + /// Name of the post-production houses that manage the Avail. + /// Not part of EMA Specs. + #[serde(rename="pphNames")] + pub pph_names: Option>, + /// Type of transaction. + #[serde(rename="licenseType")] + pub license_type: Option, + /// Communicating if caption file will be delivered. + #[serde(rename="captionIncluded")] + pub caption_included: Option, + /// Release date of the Title in earliest released territory. + /// Typically it is just the year, but it is free-form as per EMA spec. + /// Examples: "1979", "Oct 2014" + #[serde(rename="releaseDate")] + pub release_date: Option, + /// Other identifier referring to the episode, as defined by partner. + /// Only available on TV avails. + /// Example: "rs_googlers_s1_3". + #[serde(rename="episodeAltId")] + pub episode_alt_id: Option, + /// OPTIONAL.TV Only. Title used by involved parties to refer to this episode. + /// Only available on TV Avails. + /// Example: "Coding at Google". + #[serde(rename="episodeTitleInternalAlias")] + pub episode_title_internal_alias: Option, + /// ID internally generated by Google to uniquely identify an Avail. + /// Not part of EMA Specs. + #[serde(rename="availId")] + pub avail_id: Option, + /// End of term in YYYY-MM-DD format in the timezone of the country + /// of the Avail. + /// "Open" if no end date is available. + /// Example: "2019-02-17" + pub end: Option, + /// Other identifier referring to the Edit, as defined by partner. + /// Example: "GOOGLER_2006" + #[serde(rename="altId")] + pub alt_id: Option, + /// Rating system applied to the version of title within territory + /// of Avail. + /// Rating systems should be formatted as per + /// [EMA ratings spec](http://www.movielabs.com/md/ratings/) + /// Example: "MPAA" + #[serde(rename="ratingSystem")] + pub rating_system: Option, + /// Start of term in YYYY-MM-DD format in the timezone of the + /// country of the Avail. + /// Example: "2013-05-14". + pub start: Option, + /// Title used by involved parties to refer to this content. + /// Example: "Googlers, The". + /// Only available on Movie Avails. + #[serde(rename="titleInternalAlias")] + pub title_internal_alias: Option, + /// Title used by involved parties to refer to this season. + /// Only available on TV Avails. + /// Example: "Googlers, The". + #[serde(rename="seasonTitleInternalAlias")] + pub season_title_internal_alias: Option, + /// ISO 3166-1 alpha-2 country code for the country or territory + /// of this Avail. + /// For Avails, we use Territory in lieu of Country to comply with + /// EMA specifications. + /// But please note that Territory and Country identify the same thing. + /// Example: "US". + pub territory: Option, + /// Manifestation Identifier. This should be the Manifestation + /// Level EIDR. + /// Example: "10.2340/1489-49A2-3956-4B2D-FE16-7" + #[serde(rename="encodeId")] + pub encode_id: Option, + /// Spoken language of the intended audience. + /// Language shall be encoded in accordance with RFC 5646. + /// Example: "fr". + #[serde(rename="storeLanguage")] + pub store_language: Option, + /// The number assigned to the season within a series. + /// Only available on TV Avails. + /// Example: "1". + #[serde(rename="seasonNumber")] + pub season_number: Option, + /// The number assigned to the episode within a season. + /// Only available on TV Avails. + /// Example: "3". + #[serde(rename="episodeNumber")] + pub episode_number: Option, + /// Indicates the format profile covered by the transaction. + #[serde(rename="formatProfile")] + pub format_profile: Option, + /// Value to be applied to the pricing type. + /// Example: "4" or "2.99" + #[serde(rename="priceValue")] + pub price_value: Option, + /// Google-generated ID identifying the video linked to this Avail, once + /// delivered. + /// Not part of EMA Specs. + /// Example: 'gtry456_xc' + #[serde(rename="videoId")] + pub video_id: Option, + /// Communicating an exempt category as defined by FCC regulations. + /// It is not required for non-US Avails. + /// Example: "1" + #[serde(rename="captionExemption")] + pub caption_exemption: Option, + /// Value representing the rating reason. + /// Rating reasons should be formatted as per + /// [EMA ratings spec](http://www.movielabs.com/md/ratings/) + /// and comma-separated for inclusion of multiple reasons. + /// Example: "L, S, V" + #[serde(rename="ratingReason")] + pub rating_reason: Option, + /// Work type as enumerated in EMA. + #[serde(rename="workType")] + pub work_type: Option, + /// The name of the studio that owns the Edit referred in the Avail. + /// This is the equivalent of `studio_name` in other resources, but it follows + /// the EMA nomenclature. + /// Example: "Google Films". + #[serde(rename="displayName")] + pub display_name: Option, + /// Other identifier referring to the season, as defined by partner. + /// Only available on TV avails. + /// Example: "rs_googlers_s1". + #[serde(rename="seasonAltId")] + pub season_alt_id: Option, + /// Title Identifier. This should be the Title Level EIDR. + /// Example: "10.5240/1489-49A2-3956-4B2D-FE16-5". + #[serde(rename="contentId")] + pub content_id: Option, + /// Other identifier referring to the series, as defined by partner. + /// Only available on TV avails. + /// Example: "rs_googlers". + #[serde(rename="seriesAltId")] + pub series_alt_id: Option, + /// Value representing the rating. + /// Ratings should be formatted as per http://www.movielabs.com/md/ratings/ + /// Example: "PG" + #[serde(rename="ratingValue")] + pub rating_value: Option, + /// Title used by involved parties to refer to this series. + /// Only available on TV Avails. + /// Example: "Googlers, The". + #[serde(rename="seriesTitleInternalAlias")] + pub series_title_internal_alias: Option, + /// First date an Edit could be publically announced as becoming + /// available at a specific future date in territory of Avail. + /// *Not* the Avail start date or pre-order start date. + /// Format is YYYY-MM-DD. + /// Only available for pre-orders. + /// Example: "2012-12-10" + #[serde(rename="suppressionLiftDate")] + pub suppression_lift_date: Option, + /// Edit Identifier. This should be the Edit Level EIDR. + /// Example: "10.2340/1489-49A2-3956-4B2D-FE16-6" + #[serde(rename="productId")] + pub product_id: Option, + /// Type of pricing that should be applied to this Avail + /// based on how the partner classify them. + /// Example: "Tier", "WSP", "SRP", or "Category". + #[serde(rename="priceType")] + pub price_type: Option, } -impl ResponseResult for ListExperienceLocalesResponse {} +impl ResponseResult for Avail {} /// Response to the 'ListOrders' method. @@ -389,12 +548,12 @@ impl ResponseResult for ListOrdersResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListStoreInfosResponse { - /// List of StoreInfos that match the request criteria. - #[serde(rename="storeInfos")] - pub store_infos: Option>, /// See 'List methods rules' for info about this field. #[serde(rename="nextPageToken")] pub next_page_token: Option, + /// List of StoreInfos that match the request criteria. + #[serde(rename="storeInfos")] + pub store_infos: Option>, /// See _List methods rules_ for more information about this field. #[serde(rename="totalSize")] pub total_size: Option, @@ -403,276 +562,14 @@ pub struct ListStoreInfosResponse { impl ResponseResult for ListStoreInfosResponse {} -/// A Component is an element (audio, video, subtitle, artwork, trailer, etc...) that is used in a set of ExperienceLocales. A Component is owned by a Studio and managed either by the Studio itself or by one Post-Production House. Each Component is identified by a `component_id` and its `type`. +/// Information about a playable sequence (video) associated with an Edit +/// and available at the Google Play Store. /// -/// # Activities +/// Internally, each StoreInfo is uniquely identified by a `video_id` +/// and `country`. /// -/// 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*). -/// -/// * [components type get accounts](struct.AccountComponentTypeGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Component { - /// High-level status of the Component. - pub status: Option, - /// List of Alternative Cut IDs, sometimes available in lieu of the main Edit-level EIDR IDs. This is not an EIDR ID, but a Partner-provided ID. Example: "206346_79838". - #[serde(rename="altCutIds")] - pub alt_cut_ids: Option>, - /// Processing errors during XML file parsing. Example: 'Invalid input file' - #[serde(rename="processingErrors")] - pub processing_errors: Option>, - /// Name of the studio that owns the Component. - #[serde(rename="studioName")] - pub studio_name: Option, - /// Detailed status of the Component - #[serde(rename="statusDetail")] - pub status_detail: Option, - /// Notes explaining why a Component has been rejected. - #[serde(rename="rejectionNote")] - pub rejection_note: Option, - /// Timestamp when the Component was approved. - #[serde(rename="approvedTime")] - pub approved_time: Option, - /// List of Title-level EIDR IDs. Example: "10.5240/1489-49A2-3956-4B2D-FE16-5". - #[serde(rename="titleLevelEidrs")] - pub title_level_eidrs: Option>, - /// IDs internally generated by Google to uniquely identify the ExperienceLocales for which the Component is used. Example: 'KRZiVjY9h7t' - #[serde(rename="elIds")] - pub el_ids: Option>, - /// Default Edit name, usually in the language of the country of origin. Example: "Googlers, The". - pub name: Option, - /// Language of the component, using the "BCP 47" format. Examples: "en", "en-US", "es", "es-419". - pub language: Option, - /// Type of the playable unit for which the Component is intended. - #[serde(rename="playableUnitType")] - pub playable_unit_type: Option, - /// Detail about the type of the Component. - #[serde(rename="componentDetailType")] - pub component_detail_type: Option, - /// Timestamp when the Component was received. - #[serde(rename="receivedTime")] - pub received_time: Option, - /// List of custom IDs (defined by the partner) linked to the ExperienceLocale using this Component. Example: "R86241" - #[serde(rename="customIds")] - pub custom_ids: Option>, - /// Name of the post-production house that manages the Component. - #[serde(rename="pphName")] - pub pph_name: Option, - /// File name of the Component when delivered. - pub filename: Option, - /// Component priority, as defined by Google. The higher the value, the higher the priority. - pub priority: Option, - /// List of Edit-level EIDR IDs. Example: "10.5240/1489-49A2-3956-4B2D-FE16-6". - #[serde(rename="editLevelEidrs")] - pub edit_level_eidrs: Option>, - /// A simpler representation of the priority. - #[serde(rename="normalizedPriority")] - pub normalized_priority: Option, - /// Type of the Component. Example: AUDIO_51 - #[serde(rename="type")] - pub type_: Option, - /// ID internally generated by Google to uniquely identify the Component. Example: 'wteyrc_647xc' - #[serde(rename="componentId")] - pub component_id: Option, -} - -impl ResponseResult for Component {} - - -/// An Avail describes the Availability Window of a specific Edit in a given country, which means the period Google is allowed to sell or rent the Edit. Avails are exposed in EMA format Version 1.6b (available at http://www.movielabs.com/md/avails/) Studios can see the Avails for the Titles they own. Post-production houses cannot see any Avails. -/// -/// # 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*). -/// -/// * [avails get accounts](struct.AccountAvailGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Avail { - /// Name of the post-production houses that manage the Avail. Not part of EMA Specs. - #[serde(rename="pphNames")] - pub pph_names: Option>, - /// Type of transaction. - #[serde(rename="licenseType")] - pub license_type: Option, - /// Manifestation Identifier. This should be the Manifestation Level EIDR. Example: "10.2340/1489-49A2-3956-4B2D-FE16-7" - #[serde(rename="encodeId")] - pub encode_id: Option, - /// Communicating if caption file will be delivered. - #[serde(rename="captionIncluded")] - pub caption_included: Option, - /// Release date of the Title in earliest released territory. Typically it is just the year, but it is free-form as per EMA spec. Examples: "1979", "Oct 2014" - #[serde(rename="releaseDate")] - pub release_date: Option, - /// Other identifier referring to the episode, as defined by partner. Only available on TV avails. Example: "rs_googlers_s1_3". - #[serde(rename="episodeAltId")] - pub episode_alt_id: Option, - /// OPTIONAL.TV Only. Title used by involved parties to refer to this episode. Only available on TV Avails. Example: "Coding at Google". - #[serde(rename="episodeTitleInternalAlias")] - pub episode_title_internal_alias: Option, - /// ID internally generated by Google to uniquely identify an Avail. Not part of EMA Specs. - #[serde(rename="availId")] - pub avail_id: Option, - /// End of term in YYYY-MM-DD format in the timezone of the country of the Avail. "Open" if no end date is available. Example: "2019-02-17" - pub end: Option, - /// Other identifier referring to the Edit, as defined by partner. Example: "GOOGLER_2006" - #[serde(rename="altId")] - pub alt_id: Option, - /// Other identifier referring to the series, as defined by partner. Only available on TV avails. Example: "rs_googlers". - #[serde(rename="seriesAltId")] - pub series_alt_id: Option, - /// Start of term in YYYY-MM-DD format in the timezone of the country of the Avail. Example: "2013-05-14". - pub start: Option, - /// Title used by involved parties to refer to this content. Example: "Googlers, The". Only available on Movie Avails. - #[serde(rename="titleInternalAlias")] - pub title_internal_alias: Option, - /// Title used by involved parties to refer to this season. Only available on TV Avails. Example: "Googlers, The". - #[serde(rename="seasonTitleInternalAlias")] - pub season_title_internal_alias: Option, - /// ISO 3166-1 alpha-2 country code for the country or territory of this Avail. For Avails, we use Territory in lieu of Country to comply with EMA specifications. But please note that Territory and Country identify the same thing. Example: "US". - pub territory: Option, - /// Edit Identifier. This should be the Edit Level EIDR. Example: "10.2340/1489-49A2-3956-4B2D-FE16-6" - #[serde(rename="productId")] - pub product_id: Option, - /// Spoken language of the intended audience. Language shall be encoded in accordance with RFC 5646. Example: "fr". - #[serde(rename="storeLanguage")] - pub store_language: Option, - /// The number assigned to the season within a series. Only available on TV Avails. Example: "1". - #[serde(rename="seasonNumber")] - pub season_number: Option, - /// The number assigned to the episode within a season. Only available on TV Avails. Example: "3". - #[serde(rename="episodeNumber")] - pub episode_number: Option, - /// Indicates the format profile covered by the transaction. - #[serde(rename="formatProfile")] - pub format_profile: Option, - /// Value to be applied to the pricing type. Example: "4" or "2.99" - #[serde(rename="priceValue")] - pub price_value: Option, - /// Google-generated ID identifying the video linked to this Avail, once delivered. Not part of EMA Specs. Example: 'gtry456_xc' - #[serde(rename="videoId")] - pub video_id: Option, - /// Value representing the rating reason. Rating reasons should be formatted as per [EMA ratings spec](http://www.movielabs.com/md/ratings/) and comma-separated for inclusion of multiple reasons. Example: "L, S, V" - #[serde(rename="ratingReason")] - pub rating_reason: Option, - /// Communicating an exempt category as defined by FCC regulations. It is not required for non-US Avails. Example: "1" - #[serde(rename="captionExemption")] - pub caption_exemption: Option, - /// Work type as enumerated in EMA. - #[serde(rename="workType")] - pub work_type: Option, - /// The name of the studio that owns the Edit referred in the Avail. This is the equivalent of `studio_name` in other resources, but it follows the EMA nomenclature. Example: "Google Films". - #[serde(rename="displayName")] - pub display_name: Option, - /// Other identifier referring to the season, as defined by partner. Only available on TV avails. Example: "rs_googlers_s1". - #[serde(rename="seasonAltId")] - pub season_alt_id: Option, - /// Title Identifier. This should be the Title Level EIDR. Example: "10.5240/1489-49A2-3956-4B2D-FE16-5". - #[serde(rename="contentId")] - pub content_id: Option, - /// Rating system applied to the version of title within territory of Avail. Rating systems should be formatted as per [EMA ratings spec](http://www.movielabs.com/md/ratings/) Example: "MPAA" - #[serde(rename="ratingSystem")] - pub rating_system: Option, - /// Value representing the rating. Ratings should be formatted as per http://www.movielabs.com/md/ratings/ Example: "PG" - #[serde(rename="ratingValue")] - pub rating_value: Option, - /// Title used by involved parties to refer to this series. Only available on TV Avails. Example: "Googlers, The". - #[serde(rename="seriesTitleInternalAlias")] - pub series_title_internal_alias: Option, - /// First date an Edit could be publically announced as becoming available at a specific future date in territory of Avail. *Not* the Avail start date or pre-order start date. Format is YYYY-MM-DD. Only available for pre-orders. Example: "2012-12-10" - #[serde(rename="suppressionLiftDate")] - pub suppression_lift_date: Option, - /// Type of pricing that should be applied to this Avail based on how the partner classify them. Example: "Tier", "WSP", "SRP", or "Category". - #[serde(rename="priceType")] - pub price_type: Option, -} - -impl ResponseResult for Avail {} - - -/// An ExperienceLocale tracks the fulfillment of a Title in a country using a specific language, when delivered using component-based delivery. For example, a Title in Switzerland might have 3 ExperienceLocales: they both share the same country ("CH"), but each has different languages ("de", "fr", and "it"). Each ExperienceLocale is uniquely identified by an `el_id`, which is generated by Google. Externally, an ExperienceLocale can also be identified by partners using its EIDR IDs, AltCutID or `custom_id` (when provided). -/// -/// # 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*). -/// -/// * [experience locales get accounts](struct.AccountExperienceLocaleGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ExperienceLocale { - /// Name of the post-production houses that manage the ExperienceLocale. - #[serde(rename="pphNames")] - pub pph_names: Option>, - /// High-level status of the ExperienceLocale. - pub status: Option, - /// Title-level EIDR ID. Example: "10.5240/1489-49A2-3956-4B2D-FE16-5". - #[serde(rename="titleLevelEidr")] - pub title_level_eidr: Option, - /// Trailer ID, as defined by Google, linked to the trailer video in the ExperienceLocale. Example: 'gtry457_tr'. - #[serde(rename="trailerId")] - pub trailer_id: Option, - /// YouTube Channel ID linked to the ExperienceLocale. Example: "UCRG64darCZhb". - #[serde(rename="channelId")] - pub channel_id: Option, - /// Name of the studio that owns the ExperienceLocale. - #[serde(rename="studioName")] - pub studio_name: Option, - /// Video ID, as defined by Google, linked to the feature video in the ExperienceLocale. Example: 'gtry456_xc'. - #[serde(rename="videoId")] - pub video_id: Option, - /// Timestamp when the ExperienceLocale was approved. - #[serde(rename="approvedTime")] - pub approved_time: Option, - /// Edit-level EIDR ID. Example: "10.5240/1489-49A2-3956-4B2D-FE16-6". - #[serde(rename="editLevelEidr")] - pub edit_level_eidr: Option, - /// InventoryID as defined in the EMA specs. - #[serde(rename="inventoryId")] - pub inventory_id: Option, - /// PlayableSequenceID as defined in the EMA specs. - #[serde(rename="playableSequenceId")] - pub playable_sequence_id: Option, - /// Default Edit name, usually in the language of the country of origin. Example: "Googlers, The". - pub name: Option, - /// ID internally generated by Google to uniquely identify a ExperienceLocale. Example: 'KRZiVjY9h7t' - #[serde(rename="elId")] - pub el_id: Option, - /// PresentationID as defined in the EMA specs. - #[serde(rename="presentationId")] - pub presentation_id: Option, - /// Timestamp of the earliest start date of the Avails linked to this ExperienceLocale. - #[serde(rename="earliestAvailStartTime")] - pub earliest_avail_start_time: Option, - /// Language of the ExperienceLocale, using the "BCP 47" format. Examples: "en", "en-US", "es", "es-419". - pub language: Option, - /// Alternative Cut ID, sometimes available in lieu of the main Edit-level EIDR ID. This is not an EIDR ID, but a Partner-provided ID. Example: "206346_79838". - #[serde(rename="altCutId")] - pub alt_cut_id: Option, - /// List of custom IDs (defined by the partner) linked to this ExperienceLocale. Example: "R86241" - #[serde(rename="customIds")] - pub custom_ids: Option>, - /// ExperienceLocale priority, as defined by Google. The higher the value, the higher the priority. Example: 90 - pub priority: Option, - /// A simpler representation of the priority. - #[serde(rename="normalizedPriority")] - pub normalized_priority: Option, - /// Timestamp when the ExperienceLocale was created. - #[serde(rename="createdTime")] - pub created_time: Option, - /// Country where the ExperienceLocale is available, using the "ISO 3166-1 alpha-2" format. Example: "US". - pub country: Option, - /// Type of the Edit linked to the ExperienceLocale. - #[serde(rename="type")] - pub type_: Option, -} - -impl ResponseResult for ExperienceLocale {} - - -/// Information about a playable sequence (video) associated with an Edit and available at the Google Play Store. Internally, each StoreInfo is uniquely identified by a `video_id` and `country`. Externally, Title-level EIDR or Edit-level EIDR, if provided, can also be used to identify a specific title or edit in a country. +/// Externally, Title-level EIDR or Edit-level EIDR, if provided, +/// can also be used to identify a specific title or edit in a country. /// /// # Activities /// @@ -689,25 +586,30 @@ pub struct StoreInfo { /// Whether the Edit has a EST offer. #[serde(rename="hasEstOffer")] pub has_est_offer: Option, - /// Title-level EIDR ID. Example: "10.5240/1489-49A2-3956-4B2D-FE16-5". + /// Title-level EIDR ID. + /// Example: "10.5240/1489-49A2-3956-4B2D-FE16-5". #[serde(rename="titleLevelEidr")] pub title_level_eidr: Option, /// Whether the Edit has a SD offer. #[serde(rename="hasSdOffer")] pub has_sd_offer: Option, - /// The number assigned to the season within a show. Only available on TV Edits. Example: "1". + /// The number assigned to the season within a show. + /// Only available on TV Edits. + /// Example: "1". #[serde(rename="seasonNumber")] pub season_number: Option, /// Timestamp when the Edit went live on the Store. #[serde(rename="liveTime")] pub live_time: Option, - /// Google-generated ID identifying the trailer linked to the Edit. Example: 'bhd_4e_cx' + /// Google-generated ID identifying the trailer linked to the Edit. + /// Example: 'bhd_4e_cx' #[serde(rename="trailerId")] pub trailer_id: Option, /// Name of the studio that owns the Edit ordered. #[serde(rename="studioName")] pub studio_name: Option, - /// Google-generated ID identifying the video linked to the Edit. Example: 'gtry456_xc' + /// Google-generated ID identifying the video linked to the Edit. + /// Example: 'gtry456_xc' #[serde(rename="videoId")] pub video_id: Option, /// Whether the Edit has a HD offer. @@ -716,30 +618,49 @@ pub struct StoreInfo { /// Whether the Edit has a VOD offer. #[serde(rename="hasVodOffer")] pub has_vod_offer: Option, - /// Edit-level EIDR ID. Example: "10.5240/1489-49A2-3956-4B2D-FE16-6". + /// Edit-level EIDR ID. + /// Example: "10.5240/1489-49A2-3956-4B2D-FE16-6". #[serde(rename="editLevelEidr")] pub edit_level_eidr: Option, /// Subtitles available for this Edit. pub subtitles: Option>, - /// The number assigned to the episode within a season. Only available on TV Edits. Example: "1". + /// The number assigned to the episode within a season. + /// Only available on TV Edits. + /// Example: "1". #[serde(rename="episodeNumber")] pub episode_number: Option, - /// Google-generated ID identifying the show linked to the Edit. Only available for TV Edits. Example: 'et2hsue_x' + /// Google-generated ID identifying the show linked to the Edit. + /// Only available for TV Edits. + /// Example: 'et2hsue_x' #[serde(rename="showId")] pub show_id: Option, - /// Default Edit name, usually in the language of the country of origin. Example: "Googlers, The". + /// Default Edit name, usually in the language of the country of + /// origin. + /// Example: "Googlers, The". pub name: Option, - /// Country where Edit is available in ISO 3166-1 alpha-2 country code. Example: "US". + /// Country where Edit is available in ISO 3166-1 alpha-2 country + /// code. + /// Example: "US". pub country: Option, - /// Google-generated ID identifying the season linked to the Edit. Only available for TV Edits. Example: 'ster23ex' + /// Google-generated ID identifying the season linked to the Edit. + /// Only available for TV Edits. + /// Example: 'ster23ex' #[serde(rename="seasonId")] pub season_id: Option, - /// Knowledge Graph ID associated to this Edit, if available. This ID links the Edit to its knowledge entity, externally accessible at http://freebase.com. In the absense of Title EIDR or Edit EIDR, this ID helps link together multiple Edits across countries. Example: '/m/0ffx29' + /// Knowledge Graph ID associated to this Edit, if available. + /// This ID links the Edit to its knowledge entity, externally accessible + /// at http://freebase.com. + /// In the absense of Title EIDR or Edit EIDR, this ID helps link together + /// multiple Edits across countries. + /// Example: '/m/0ffx29' pub mid: Option, /// Whether the Edit has a 5.1 channel audio track. #[serde(rename="hasAudio51")] pub has_audio51: Option, - /// Default Season name, usually in the language of the country of origin. Only available for TV Edits Example: "Googlers, The - A Brave New World". + /// Default Season name, usually in the language of the country of + /// origin. + /// Only available for TV Edits + /// Example: "Googlers, The - A Brave New World". #[serde(rename="seasonName")] pub season_name: Option, /// Audio tracks available for this Edit. @@ -751,7 +672,10 @@ pub struct StoreInfo { /// Edit type, like Movie, Episode or Season. #[serde(rename="type")] pub type_: Option, - /// Default Show name, usually in the language of the country of origin. Only available for TV Edits Example: "Googlers, The". + /// Default Show name, usually in the language of the country of + /// origin. + /// Only available for TV Edits + /// Example: "Googlers, The". #[serde(rename="showName")] pub show_name: Option, } @@ -783,7 +707,14 @@ pub struct ListAvailsResponse { impl ResponseResult for ListAvailsResponse {} -/// An Order tracks the fulfillment of an Edit when delivered using the legacy, non-component-based delivery. Each Order is uniquely identified by an `order_id`, which is generated by Google. Externally, Orders can also be identified by partners using its `custom_id` (when provided). +/// An Order tracks the fulfillment of an Edit when delivered using the +/// legacy, non-component-based delivery. +/// +/// Each Order is uniquely identified by an `order_id`, which is generated +/// by Google. +/// +/// Externally, Orders can also be identified by partners using its `custom_id` +/// (when provided). /// /// # Activities /// @@ -794,12 +725,14 @@ impl ResponseResult for ListAvailsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Order { - /// ID internally generated by Google to uniquely identify an Order. Example: 'abcde12_x' + /// ID internally generated by Google to uniquely identify an Order. + /// Example: 'abcde12_x' #[serde(rename="orderId")] pub order_id: Option, /// High-level status of the order. pub status: Option, - /// YouTube Channel ID that should be used to fulfill the Order. Example: "UCRG64darCZhb". + /// YouTube Channel ID that should be used to fulfill the Order. + /// Example: "UCRG64darCZhb". #[serde(rename="channelId")] pub channel_id: Option, /// Name of the studio that owns the Edit ordered. @@ -808,27 +741,40 @@ pub struct Order { /// Detailed status of the order #[serde(rename="statusDetail")] pub status_detail: Option, - /// Field explaining why an Order has been rejected. Example: "Trailer audio is 2ch mono, please re-deliver in stereo". + /// Field explaining why an Order has been rejected. + /// Example: "Trailer audio is 2ch mono, please re-deliver in stereo". #[serde(rename="rejectionNote")] pub rejection_note: Option, /// Timestamp when the Order was approved. #[serde(rename="approvedTime")] pub approved_time: Option, - /// Google-generated ID identifying the video linked to this Order, once delivered. Example: 'gtry456_xc'. + /// Google-generated ID identifying the video linked to this Order, once + /// delivered. + /// Example: 'gtry456_xc'. #[serde(rename="videoId")] pub video_id: Option, - /// Default Episode name, usually in the language of the country of origin. Only available for TV Edits Example: "Googlers, The - Pilot". + /// Default Episode name, + /// usually in the language of the country of origin. + /// Only available for TV Edits + /// Example: "Googlers, The - Pilot". #[serde(rename="episodeName")] pub episode_name: Option, - /// Default Edit name, usually in the language of the country of origin. Example: "Googlers, The". - pub name: Option, - /// Default Season name, usually in the language of the country of origin. Only available for TV Edits Example: "Googlers, The - A Brave New World". - #[serde(rename="seasonName")] - pub season_name: Option, - /// Timestamp of the earliest start date of the Avails linked to this Order. + /// Timestamp of the earliest start date of the Avails + /// linked to this Order. #[serde(rename="earliestAvailStartTime")] pub earliest_avail_start_time: Option, - /// Countries where the Order is available, using the "ISO 3166-1 alpha-2" format (example: "US"). + /// Default Season name, + /// usually in the language of the country of origin. + /// Only available for TV Edits + /// Example: "Googlers, The - A Brave New World". + #[serde(rename="seasonName")] + pub season_name: Option, + /// Default Edit name, + /// usually in the language of the country of origin. + /// Example: "Googlers, The". + pub name: Option, + /// Countries where the Order is available, + /// using the "ISO 3166-1 alpha-2" format (example: "US"). pub countries: Option>, /// A simpler representation of the priority. #[serde(rename="normalizedPriority")] @@ -842,21 +788,30 @@ pub struct Order { /// Name of the post-production house that manages the Edit ordered. #[serde(rename="pphName")] pub pph_name: Option, - /// Order priority, as defined by Google. The higher the value, the higher the priority. Example: 90 + /// Order priority, as defined by Google. + /// The higher the value, the higher the priority. + /// Example: 90 pub priority: Option, - /// Legacy Order priority, as defined by Google. Example: 'P0' + /// Legacy Order priority, as defined by Google. + /// Example: 'P0' #[serde(rename="legacyPriority")] pub legacy_priority: Option, - /// ID that can be used to externally identify an Order. This ID is provided by partners when submitting the Avails. Example: 'GOOGLER_2006' + /// ID that can be used to externally identify an Order. + /// This ID is provided by partners when submitting the Avails. + /// Example: 'GOOGLER_2006' #[serde(rename="customId")] pub custom_id: Option, - /// YouTube Channel Name that should be used to fulfill the Order. Example: "Google_channel". + /// YouTube Channel Name that should be used to fulfill the Order. + /// Example: "Google_channel". #[serde(rename="channelName")] pub channel_name: Option, /// Type of the Edit linked to the Order. #[serde(rename="type")] pub type_: Option, - /// Default Show name, usually in the language of the country of origin. Only available for TV Edits Example: "Googlers, The". + /// Default Show name, + /// usually in the language of the country of origin. + /// Only available for TV Edits + /// Example: "Googlers, The". #[serde(rename="showName")] pub show_name: Option, } @@ -864,30 +819,6 @@ pub struct Order { impl ResponseResult for Order {} -/// Response to the 'ListComponents' method. -/// -/// # 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*). -/// -/// * [components list accounts](struct.AccountComponentListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListComponentsResponse { - /// See _List methods rules_ for info about this field. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// See _List methods rules_ for more information about this field. - #[serde(rename="totalSize")] - pub total_size: Option, - /// List of Components that match the request criteria. - pub components: Option>, -} - -impl ResponseResult for ListComponentsResponse {} - - // ################### // MethodBuilders ### @@ -916,7 +847,7 @@ impl ResponseResult for ListComponentsResponse {} /// ::default(), None); /// let mut hub = PlayMovies::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `avails_get(...)`, `avails_list(...)`, `components_list(...)`, `components_type_get(...)`, `experience_locales_get(...)`, `experience_locales_list(...)`, `orders_get(...)`, `orders_list(...)`, `store_infos_country_get(...)` and `store_infos_list(...)` +/// // like `avails_get(...)`, `avails_list(...)`, `orders_get(...)`, `orders_list(...)`, `store_infos_country_get(...)` and `store_infos_list(...)` /// // to build up your call. /// let rb = hub.accounts(); /// # } @@ -933,7 +864,10 @@ impl<'a, C, A> AccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// List Orders owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method. + /// List Orders owned or managed by the partner. + /// + /// See _Authentication and Authorization rules_ and + /// _List methods rules_ for more information about this method. /// /// # Arguments /// @@ -958,7 +892,10 @@ impl<'a, C, A> AccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Get a StoreInfo given its video id and country. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method. + /// Get a StoreInfo given its video id and country. + /// + /// See _Authentication and Authorization rules_ and + /// _Get methods rules_ for more information about this method. /// /// # Arguments /// @@ -979,7 +916,10 @@ impl<'a, C, A> AccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Get an Order given its id. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method. + /// Get an Order given its id. + /// + /// See _Authentication and Authorization rules_ and + /// _Get methods rules_ for more information about this method. /// /// # Arguments /// @@ -1017,7 +957,10 @@ impl<'a, C, A> AccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// List Avails owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method. + /// List Avails owned or managed by the partner. + /// + /// See _Authentication and Authorization rules_ and + /// _List methods rules_ for more information about this method. /// /// # Arguments /// @@ -1043,26 +986,10 @@ impl<'a, C, A> AccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Get an ExperienceLocale given its id. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method. + /// List StoreInfos owned or managed by the partner. /// - /// # Arguments - /// - /// * `accountId` - REQUIRED. See _General rules_ for more information about this field. - /// * `elId` - REQUIRED. ExperienceLocale ID, as defined by Google. - pub fn experience_locales_get(&self, account_id: &str, el_id: &str) -> AccountExperienceLocaleGetCall<'a, C, A> { - AccountExperienceLocaleGetCall { - hub: self.hub, - _account_id: account_id.to_string(), - _el_id: el_id.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// List StoreInfos owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method. + /// See _Authentication and Authorization rules_ and + /// _List methods rules_ for more information about this method. /// /// # Arguments /// @@ -1086,84 +1013,6 @@ impl<'a, C, A> AccountMethods<'a, C, A> { _additional_params: Default::default(), } } - - /// Create a builder to help you perform the following task: - /// - /// List ExperienceLocales owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method. - /// - /// # Arguments - /// - /// * `accountId` - REQUIRED. See _General rules_ for more information about this field. - pub fn experience_locales_list(&self, account_id: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - AccountExperienceLocaleListCall { - hub: self.hub, - _account_id: account_id.to_string(), - _title_level_eidr: Default::default(), - _studio_names: Default::default(), - _status: Default::default(), - _pph_names: Default::default(), - _page_token: Default::default(), - _page_size: Default::default(), - _edit_level_eidr: Default::default(), - _custom_id: Default::default(), - _alt_cut_id: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// List Components owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method. - /// - /// # Arguments - /// - /// * `accountId` - REQUIRED. See _General rules_ for more information about this field. - pub fn components_list(&self, account_id: &str) -> AccountComponentListCall<'a, C, A> { - AccountComponentListCall { - hub: self.hub, - _account_id: account_id.to_string(), - _title_level_eidr: Default::default(), - _studio_names: Default::default(), - _status: Default::default(), - _presentation_id: Default::default(), - _pph_names: Default::default(), - _playable_sequence_id: Default::default(), - _page_token: Default::default(), - _page_size: Default::default(), - _inventory_id: Default::default(), - _filename: Default::default(), - _el_id: Default::default(), - _edit_level_eidr: Default::default(), - _custom_id: Default::default(), - _alt_cut_id: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Get a Component given its id. - /// - /// # Arguments - /// - /// * `accountId` - REQUIRED. See _General rules_ for more information about this field. - /// * `componentId` - REQUIRED. Component ID. - /// * `type` - REQUIRED. Component Type. - pub fn components_type_get(&self, account_id: &str, component_id: &str, type_: &str) -> AccountComponentTypeGetCall<'a, C, A> { - AccountComponentTypeGetCall { - hub: self.hub, - _account_id: account_id.to_string(), - _component_id: component_id.to_string(), - _type_: type_.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } } @@ -1174,7 +1023,10 @@ impl<'a, C, A> AccountMethods<'a, C, A> { // CallBuilders ### // ################# -/// List Orders owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method. +/// List Orders owned or managed by the partner. +/// +/// See _Authentication and Authorization rules_ and +/// _List methods rules_ for more information about this method. /// /// A builder for the *orders.list* method supported by a *account* resource. /// It is not used directly, but through a `AccountMethods` instance. @@ -1451,7 +1303,8 @@ impl<'a, C, A> AccountOrderListCall<'a, C, A> where C: BorrowMut, self._page_size = Some(new_value); self } - /// Filter that matches Orders with a `name`, `show`, `season` or `episode` that contains the given case-insensitive name. + /// Filter that matches Orders with a `name`, `show`, `season` or `episode` + /// that contains the given case-insensitive name. /// /// Sets the *name* query property to the given value. pub fn name(mut self, new_value: &str) -> AccountOrderListCall<'a, C, A> { @@ -1490,12 +1343,12 @@ impl<'a, C, A> AccountOrderListCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AccountOrderListCall<'a, C, A> @@ -1523,7 +1376,10 @@ impl<'a, C, A> AccountOrderListCall<'a, C, A> where C: BorrowMut, } -/// Get a StoreInfo given its video id and country. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method. +/// Get a StoreInfo given its video id and country. +/// +/// See _Authentication and Authorization rules_ and +/// _Get methods rules_ for more information about this method. /// /// A builder for the *storeInfos.country.get* method supported by a *account* resource. /// It is not used directly, but through a `AccountMethods` instance. @@ -1755,12 +1611,12 @@ impl<'a, C, A> AccountStoreInfoCountryGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AccountStoreInfoCountryGetCall<'a, C, A> @@ -1788,7 +1644,10 @@ impl<'a, C, A> AccountStoreInfoCountryGetCall<'a, C, A> where C: BorrowMut AccountOrderGetCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AccountOrderGetCall<'a, C, A> @@ -2261,12 +2120,12 @@ impl<'a, C, A> AccountAvailGetCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AccountAvailGetCall<'a, C, A> @@ -2294,7 +2153,10 @@ impl<'a, C, A> AccountAvailGetCall<'a, C, A> where C: BorrowMut, } -/// List Avails owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method. +/// List Avails owned or managed by the partner. +/// +/// See _Authentication and Authorization rules_ and +/// _List methods rules_ for more information about this method. /// /// A builder for the *avails.list* method supported by a *account* resource. /// It is not used directly, but through a `AccountMethods` instance. @@ -2540,14 +2402,18 @@ impl<'a, C, A> AccountAvailListCall<'a, C, A> where C: BorrowMut, self._video_ids.push(new_value.to_string()); self } - /// Filter that matches Avails with a `title_internal_alias`, `series_title_internal_alias`, `season_title_internal_alias`, or `episode_title_internal_alias` that contains the given case-insensitive title. + /// Filter that matches Avails with a `title_internal_alias`, + /// `series_title_internal_alias`, `season_title_internal_alias`, + /// or `episode_title_internal_alias` that contains the given + /// case-insensitive title. /// /// Sets the *title* query property to the given value. pub fn title(mut self, new_value: &str) -> AccountAvailListCall<'a, C, A> { self._title = Some(new_value.to_string()); self } - /// Filter Avails that match (case-insensitive) any of the given country codes, using the "ISO 3166-1 alpha-2" format (examples: "US", "us", "Us"). + /// Filter Avails that match (case-insensitive) any of the given country codes, + /// using the "ISO 3166-1 alpha-2" format (examples: "US", "us", "Us"). /// /// Append the given value to the *territories* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -2593,7 +2459,9 @@ impl<'a, C, A> AccountAvailListCall<'a, C, A> where C: BorrowMut, self._alt_ids.push(new_value.to_string()); self } - /// Filter Avails that match a case-insensitive, partner-specific custom id. NOTE: this field is deprecated and will be removed on V2; `alt_ids` should be used instead. + /// Filter Avails that match a case-insensitive, partner-specific custom id. + /// NOTE: this field is deprecated and will be removed on V2; `alt_ids` + /// should be used instead. /// /// Sets the *alt id* query property to the given value. pub fn alt_id(mut self, new_value: &str) -> AccountAvailListCall<'a, C, A> { @@ -2625,12 +2493,12 @@ impl<'a, C, A> AccountAvailListCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> AccountAvailListCall<'a, C, A> @@ -2658,260 +2526,10 @@ impl<'a, C, A> AccountAvailListCall<'a, C, A> where C: BorrowMut, } -/// Get an ExperienceLocale given its id. See _Authentication and Authorization rules_ and _Get methods rules_ for more information about this method. -/// -/// A builder for the *experienceLocales.get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_playmoviespartner1 as playmoviespartner1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use playmoviespartner1::PlayMovies; +/// List StoreInfos owned or managed by the partner. /// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = PlayMovies::new(hyper::Client::new(), 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.accounts().experience_locales_get("accountId", "elId") -/// .doit(); -/// # } -/// ``` -pub struct AccountExperienceLocaleGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a PlayMovies, - _account_id: String, - _el_id: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for AccountExperienceLocaleGetCall<'a, C, A> {} - -impl<'a, C, A> AccountExperienceLocaleGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ExperienceLocale)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "playmoviespartner.accounts.experienceLocales.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("accountId", self._account_id.to_string())); - params.push(("elId", self._el_id.to_string())); - for &field in ["alt", "accountId", "elId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://playmoviespartner.googleapis.com/v1/accounts/{accountId}/experienceLocales/{elId}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::PlaymovyPartnerReadonly.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{accountId}", "accountId"), ("{elId}", "elId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["elId", "accountId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// REQUIRED. See _General rules_ for more information about this field. - /// - /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> AccountExperienceLocaleGetCall<'a, C, A> { - self._account_id = new_value.to_string(); - self - } - /// REQUIRED. ExperienceLocale ID, as defined by Google. - /// - /// Sets the *el id* 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 el_id(mut self, new_value: &str) -> AccountExperienceLocaleGetCall<'a, C, A> { - self._el_id = 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. - /// - /// 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 Delegate) -> AccountExperienceLocaleGetCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> AccountExperienceLocaleGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::PlaymovyPartnerReadonly`. - /// - /// 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: T) -> AccountExperienceLocaleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// List StoreInfos owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method. +/// See _Authentication and Authorization rules_ and +/// _List methods rules_ for more information about this method. /// /// A builder for the *storeInfos.list* method supported by a *account* resource. /// It is not used directly, but through a `AccountMethods` instance. @@ -2938,16 +2556,16 @@ impl<'a, C, A> AccountExperienceLocaleGetCall<'a, C, A> where C: BorrowMut AccountStoreInfoListCall<'a, C, A> where C: BorrowMut AccountStoreInfoListCall<'a, C, A> { @@ -3209,7 +2829,8 @@ impl<'a, C, A> AccountStoreInfoListCall<'a, C, A> where C: BorrowMut AccountStoreInfoListCall<'a, C, A> { @@ -3224,7 +2845,8 @@ impl<'a, C, A> AccountStoreInfoListCall<'a, C, A> where C: BorrowMut AccountStoreInfoListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> AccountStoreInfoListCall<'a, C, A> @@ -3290,1045 +2912,4 @@ impl<'a, C, A> AccountStoreInfoListCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = PlayMovies::new(hyper::Client::new(), 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.accounts().experience_locales_list("accountId") -/// .title_level_eidr("accusam") -/// .add_studio_names("Lorem") -/// .add_status("sea") -/// .add_pph_names("et") -/// .page_token("duo") -/// .page_size(-21) -/// .edit_level_eidr("eirmod") -/// .custom_id("sanctus") -/// .alt_cut_id("et") -/// .doit(); -/// # } -/// ``` -pub struct AccountExperienceLocaleListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a PlayMovies, - _account_id: String, - _title_level_eidr: Option, - _studio_names: Vec, - _status: Vec, - _pph_names: Vec, - _page_token: Option, - _page_size: Option, - _edit_level_eidr: Option, - _custom_id: Option, - _alt_cut_id: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for AccountExperienceLocaleListCall<'a, C, A> {} - -impl<'a, C, A> AccountExperienceLocaleListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ListExperienceLocalesResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "playmoviespartner.accounts.experienceLocales.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); - params.push(("accountId", self._account_id.to_string())); - if let Some(value) = self._title_level_eidr { - params.push(("titleLevelEidr", value.to_string())); - } - if self._studio_names.len() > 0 { - for f in self._studio_names.iter() { - params.push(("studioNames", f.to_string())); - } - } - if self._status.len() > 0 { - for f in self._status.iter() { - params.push(("status", f.to_string())); - } - } - if self._pph_names.len() > 0 { - for f in self._pph_names.iter() { - params.push(("pphNames", f.to_string())); - } - } - if let Some(value) = self._page_token { - params.push(("pageToken", value.to_string())); - } - if let Some(value) = self._page_size { - params.push(("pageSize", value.to_string())); - } - if let Some(value) = self._edit_level_eidr { - params.push(("editLevelEidr", value.to_string())); - } - if let Some(value) = self._custom_id { - params.push(("customId", value.to_string())); - } - if let Some(value) = self._alt_cut_id { - params.push(("altCutId", value.to_string())); - } - for &field in ["alt", "accountId", "titleLevelEidr", "studioNames", "status", "pphNames", "pageToken", "pageSize", "editLevelEidr", "customId", "altCutId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://playmoviespartner.googleapis.com/v1/accounts/{accountId}/experienceLocales".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::PlaymovyPartnerReadonly.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{accountId}", "accountId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["accountId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// REQUIRED. See _General rules_ for more information about this field. - /// - /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - self._account_id = new_value.to_string(); - self - } - /// Filter ExperienceLocales that match a given title-level EIDR. - /// - /// Sets the *title level eidr* query property to the given value. - pub fn title_level_eidr(mut self, new_value: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - self._title_level_eidr = Some(new_value.to_string()); - self - } - /// See _List methods rules_ for info about this field. - /// - /// Append the given value to the *studio names* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - pub fn add_studio_names(mut self, new_value: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - self._studio_names.push(new_value.to_string()); - self - } - /// Filter ExperienceLocales that match one of the given status. - /// - /// Append the given value to the *status* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - pub fn add_status(mut self, new_value: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - self._status.push(new_value.to_string()); - self - } - /// See _List methods rules_ for info about this field. - /// - /// Append the given value to the *pph names* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - pub fn add_pph_names(mut self, new_value: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - self._pph_names.push(new_value.to_string()); - self - } - /// See _List methods rules_ for info about this field. - /// - /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - self._page_token = Some(new_value.to_string()); - self - } - /// See _List methods rules_ for info about this field. - /// - /// Sets the *page size* query property to the given value. - pub fn page_size(mut self, new_value: i32) -> AccountExperienceLocaleListCall<'a, C, A> { - self._page_size = Some(new_value); - self - } - /// Filter ExperienceLocales that match a given edit-level EIDR. - /// - /// Sets the *edit level eidr* query property to the given value. - pub fn edit_level_eidr(mut self, new_value: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - self._edit_level_eidr = Some(new_value.to_string()); - self - } - /// Filter ExperienceLocales that match a case-insensitive, partner-specific custom id. - /// - /// Sets the *custom id* query property to the given value. - pub fn custom_id(mut self, new_value: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - self._custom_id = Some(new_value.to_string()); - self - } - /// Filter ExperienceLocales that match a case-insensitive, partner-specific Alternative Cut ID. - /// - /// Sets the *alt cut id* query property to the given value. - pub fn alt_cut_id(mut self, new_value: &str) -> AccountExperienceLocaleListCall<'a, C, A> { - self._alt_cut_id = 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. - /// - /// 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 Delegate) -> AccountExperienceLocaleListCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> AccountExperienceLocaleListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::PlaymovyPartnerReadonly`. - /// - /// 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: T) -> AccountExperienceLocaleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// List Components owned or managed by the partner. See _Authentication and Authorization rules_ and _List methods rules_ for more information about this method. -/// -/// A builder for the *components.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_playmoviespartner1 as playmoviespartner1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use playmoviespartner1::PlayMovies; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = PlayMovies::new(hyper::Client::new(), 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.accounts().components_list("accountId") -/// .title_level_eidr("et") -/// .add_studio_names("consetetur") -/// .add_status("ut") -/// .presentation_id("ea") -/// .add_pph_names("sed") -/// .playable_sequence_id("dolor") -/// .page_token("dolor") -/// .page_size(-48) -/// .inventory_id("et") -/// .filename("consetetur") -/// .el_id("amet.") -/// .edit_level_eidr("voluptua.") -/// .custom_id("Lorem") -/// .alt_cut_id("gubergren") -/// .doit(); -/// # } -/// ``` -pub struct AccountComponentListCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a PlayMovies, - _account_id: String, - _title_level_eidr: Option, - _studio_names: Vec, - _status: Vec, - _presentation_id: Option, - _pph_names: Vec, - _playable_sequence_id: Option, - _page_token: Option, - _page_size: Option, - _inventory_id: Option, - _filename: Option, - _el_id: Option, - _edit_level_eidr: Option, - _custom_id: Option, - _alt_cut_id: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for AccountComponentListCall<'a, C, A> {} - -impl<'a, C, A> AccountComponentListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ListComponentsResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "playmoviespartner.accounts.components.list", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((17 + self._additional_params.len())); - params.push(("accountId", self._account_id.to_string())); - if let Some(value) = self._title_level_eidr { - params.push(("titleLevelEidr", value.to_string())); - } - if self._studio_names.len() > 0 { - for f in self._studio_names.iter() { - params.push(("studioNames", f.to_string())); - } - } - if self._status.len() > 0 { - for f in self._status.iter() { - params.push(("status", f.to_string())); - } - } - if let Some(value) = self._presentation_id { - params.push(("presentationId", value.to_string())); - } - if self._pph_names.len() > 0 { - for f in self._pph_names.iter() { - params.push(("pphNames", f.to_string())); - } - } - if let Some(value) = self._playable_sequence_id { - params.push(("playableSequenceId", value.to_string())); - } - if let Some(value) = self._page_token { - params.push(("pageToken", value.to_string())); - } - if let Some(value) = self._page_size { - params.push(("pageSize", value.to_string())); - } - if let Some(value) = self._inventory_id { - params.push(("inventoryId", value.to_string())); - } - if let Some(value) = self._filename { - params.push(("filename", value.to_string())); - } - if let Some(value) = self._el_id { - params.push(("elId", value.to_string())); - } - if let Some(value) = self._edit_level_eidr { - params.push(("editLevelEidr", value.to_string())); - } - if let Some(value) = self._custom_id { - params.push(("customId", value.to_string())); - } - if let Some(value) = self._alt_cut_id { - params.push(("altCutId", value.to_string())); - } - for &field in ["alt", "accountId", "titleLevelEidr", "studioNames", "status", "presentationId", "pphNames", "playableSequenceId", "pageToken", "pageSize", "inventoryId", "filename", "elId", "editLevelEidr", "customId", "altCutId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://playmoviespartner.googleapis.com/v1/accounts/{accountId}/components".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::PlaymovyPartnerReadonly.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{accountId}", "accountId")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["accountId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// REQUIRED. See _General rules_ for more information about this field. - /// - /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._account_id = new_value.to_string(); - self - } - /// Filter Components that match a given title-level EIDR. - /// - /// Sets the *title level eidr* query property to the given value. - pub fn title_level_eidr(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._title_level_eidr = Some(new_value.to_string()); - self - } - /// See _List methods rules_ for info about this field. - /// - /// Append the given value to the *studio names* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - pub fn add_studio_names(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._studio_names.push(new_value.to_string()); - self - } - /// Filter Components that match one of the given status. - /// - /// Append the given value to the *status* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - pub fn add_status(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._status.push(new_value.to_string()); - self - } - /// PresentationID available in Common Manifest. - /// - /// Sets the *presentation id* query property to the given value. - pub fn presentation_id(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._presentation_id = Some(new_value.to_string()); - self - } - /// See _List methods rules_ for info about this field. - /// - /// Append the given value to the *pph names* query property. - /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. - pub fn add_pph_names(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._pph_names.push(new_value.to_string()); - self - } - /// PlayableSequenceID available in Common Manifest. - /// - /// Sets the *playable sequence id* query property to the given value. - pub fn playable_sequence_id(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._playable_sequence_id = Some(new_value.to_string()); - self - } - /// See _List methods rules_ for info about this field. - /// - /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._page_token = Some(new_value.to_string()); - self - } - /// See _List methods rules_ for info about this field. - /// - /// Sets the *page size* query property to the given value. - pub fn page_size(mut self, new_value: i32) -> AccountComponentListCall<'a, C, A> { - self._page_size = Some(new_value); - self - } - /// InventoryID available in Common Manifest. - /// - /// Sets the *inventory id* query property to the given value. - pub fn inventory_id(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._inventory_id = Some(new_value.to_string()); - self - } - /// Filter Components that match a case-insensitive substring of the physical name of the delivered file. - /// - /// Sets the *filename* query property to the given value. - pub fn filename(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._filename = Some(new_value.to_string()); - self - } - /// Experience ID, as defined by Google. - /// - /// Sets the *el id* query property to the given value. - pub fn el_id(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._el_id = Some(new_value.to_string()); - self - } - /// Filter Components that match a given edit-level EIDR. - /// - /// Sets the *edit level eidr* query property to the given value. - pub fn edit_level_eidr(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._edit_level_eidr = Some(new_value.to_string()); - self - } - /// Filter Components that match a case-insensitive partner-specific custom id. - /// - /// Sets the *custom id* query property to the given value. - pub fn custom_id(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._custom_id = Some(new_value.to_string()); - self - } - /// Filter Components that match a case-insensitive, partner-specific Alternative Cut ID. - /// - /// Sets the *alt cut id* query property to the given value. - pub fn alt_cut_id(mut self, new_value: &str) -> AccountComponentListCall<'a, C, A> { - self._alt_cut_id = 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. - /// - /// 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 Delegate) -> AccountComponentListCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> AccountComponentListCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::PlaymovyPartnerReadonly`. - /// - /// 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: T) -> AccountComponentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Get a Component given its id. -/// -/// A builder for the *components.type.get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_playmoviespartner1 as playmoviespartner1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use playmoviespartner1::PlayMovies; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = PlayMovies::new(hyper::Client::new(), 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.accounts().components_type_get("accountId", "componentId", "type") -/// .doit(); -/// # } -/// ``` -pub struct AccountComponentTypeGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a PlayMovies, - _account_id: String, - _component_id: String, - _type_: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for AccountComponentTypeGetCall<'a, C, A> {} - -impl<'a, C, A> AccountComponentTypeGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Component)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "playmoviespartner.accounts.components.type.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("accountId", self._account_id.to_string())); - params.push(("componentId", self._component_id.to_string())); - params.push(("type", self._type_.to_string())); - for &field in ["alt", "accountId", "componentId", "type"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://playmoviespartner.googleapis.com/v1/accounts/{accountId}/components/{componentId}/type/{type}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::PlaymovyPartnerReadonly.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{accountId}", "accountId"), ("{componentId}", "componentId"), ("{type}", "type")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(3); - for param_name in ["type", "componentId", "accountId"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// REQUIRED. See _General rules_ for more information about this field. - /// - /// Sets the *account id* 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 account_id(mut self, new_value: &str) -> AccountComponentTypeGetCall<'a, C, A> { - self._account_id = new_value.to_string(); - self - } - /// REQUIRED. Component ID. - /// - /// Sets the *component id* 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 component_id(mut self, new_value: &str) -> AccountComponentTypeGetCall<'a, C, A> { - self._component_id = new_value.to_string(); - self - } - /// REQUIRED. Component Type. - /// - /// Sets the *type* 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 type_(mut self, new_value: &str) -> AccountComponentTypeGetCall<'a, C, A> { - self._type_ = 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. - /// - /// 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 Delegate) -> AccountComponentTypeGetCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> AccountComponentTypeGetCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::PlaymovyPartnerReadonly`. - /// - /// 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: T) -> AccountComponentTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - diff --git a/gen/plus1-cli/Cargo.toml b/gen/plus1-cli/Cargo.toml index b4044dd8b3..3b25616af2 100644 --- a/gen/plus1-cli/Cargo.toml +++ b/gen/plus1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-plus1-cli" -version = "1.0.4+20161214" +version = "1.0.4+20170410" authors = ["Sebastian Thiel "] description = "A complete library to interact with plus (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/plus1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-plus1] path = "../plus1" -version = "1.0.4+20161214" +version = "1.0.4+20170410" diff --git a/gen/plus1-cli/README.md b/gen/plus1-cli/README.md index 25782c391b..ea4521b15e 100644 --- a/gen/plus1-cli/README.md +++ b/gen/plus1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *plus* API at revision *20161214*. The CLI is at version *1.0.4*. +This documentation was generated from the *plus* API at revision *20170410*. The CLI is at version *1.0.4*. ```bash plus1 [options] diff --git a/gen/plus1-cli/mkdocs.yml b/gen/plus1-cli/mkdocs.yml index e45110dc0a..458ea6ecbd 100644 --- a/gen/plus1-cli/mkdocs.yml +++ b/gen/plus1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: plus v1.0.4+20161214 +site_name: plus v1.0.4+20170410 site_url: http://byron.github.io/google-apis-rs/google-plus1-cli site_description: A complete library to interact with plus (protocol v1) diff --git a/gen/plus1-cli/src/main.rs b/gen/plus1-cli/src/main.rs index d71c8a7d6b..b03ec87c52 100644 --- a/gen/plus1-cli/src/main.rs +++ b/gen/plus1-cli/src/main.rs @@ -938,7 +938,7 @@ fn main() { let mut app = App::new("plus1") .author("Sebastian Thiel ") - .version("1.0.4+20161214") + .version("1.0.4+20170410") .about("Builds on top of the Google+ platform.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_plus1_cli") .arg(Arg::with_name("url") diff --git a/gen/plus1/Cargo.toml b/gen/plus1/Cargo.toml index 8a258c9fa0..e668296e76 100644 --- a/gen/plus1/Cargo.toml +++ b/gen/plus1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-plus1" -version = "1.0.4+20161214" +version = "1.0.4+20170410" authors = ["Sebastian Thiel "] description = "A complete library to interact with plus (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/plus1" homepage = "https://developers.google.com/+/api/" -documentation = "https://docs.rs/google-plus1/1.0.4+20161214" +documentation = "https://docs.rs/google-plus1/1.0.4+20170410" license = "MIT" keywords = ["plus", "google", "protocol", "web", "api"] diff --git a/gen/plus1/README.md b/gen/plus1/README.md index 00b2042454..f342928c27 100644 --- a/gen/plus1/README.md +++ b/gen/plus1/README.md @@ -5,20 +5,20 @@ DO NOT EDIT ! --> The `google-plus1` library allows access to all features of the *Google plus* service. -This documentation was generated from *plus* crate version *1.0.4+20161214*, where *20161214* is the exact revision of the *plus:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *plus* crate version *1.0.4+20170410*, where *20170410* is the exact revision of the *plus:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *plus* *v1* API can be found at the [official documentation site](https://developers.google.com/+/api/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.Plus.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.Plus.html) ... -* [activities](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.Activity.html) - * [*get*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.ActivityGetCall.html), [*list*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.ActivityListCall.html) and [*search*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.ActivitySearchCall.html) -* [comments](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.Comment.html) - * [*get*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.CommentGetCall.html) and [*list*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.CommentListCall.html) +* [activities](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.Activity.html) + * [*get*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.ActivityGetCall.html), [*list*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.ActivityListCall.html) and [*search*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.ActivitySearchCall.html) +* [comments](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.Comment.html) + * [*get*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.CommentGetCall.html) and [*list*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.CommentListCall.html) * people - * [*get*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.PeopleGetCall.html), [*list*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.PeopleListCall.html), [*list by activity*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.PeopleListByActivityCall.html) and [*search*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.PeopleSearchCall.html) + * [*get*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.PeopleGetCall.html), [*list*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.PeopleListCall.html), [*list by activity*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.PeopleListByActivityCall.html) and [*search*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.PeopleSearchCall.html) @@ -27,17 +27,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/struct.Plus.html)** +* **[Hub](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/struct.Plus.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.Part.html)** + * **[Parts](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -124,17 +124,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.Delegate.html), 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-plus1/1.0.4+20161214/google_plus1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.ResponseResult.html), 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")`. @@ -144,29 +144,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.CallBuilder.html) 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-plus1/1.0.4+20161214/google_plus1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-plus1/1.0.4+20161214/google_plus1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.CallBuilder.html), 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-plus1/1.0.4+20161214/google_plus1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-plus1/1.0.4+20170410/google_plus1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/plus1/src/lib.rs b/gen/plus1/src/lib.rs index 76bfa68105..87b4dc8be2 100644 --- a/gen/plus1/src/lib.rs +++ b/gen/plus1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *plus* crate version *1.0.4+20161214*, where *20161214* is the exact revision of the *plus:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *plus* crate version *1.0.4+20170410*, where *20170410* is the exact revision of the *plus:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *plus* *v1* API can be found at the //! [official documentation site](https://developers.google.com/+/api/). diff --git a/gen/plusdomains1-cli/Cargo.toml b/gen/plusdomains1-cli/Cargo.toml index a035850ef5..b2f9cb23e0 100644 --- a/gen/plusdomains1-cli/Cargo.toml +++ b/gen/plusdomains1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-plusdomains1-cli" -version = "1.0.4+20161214" +version = "1.0.4+20170410" authors = ["Sebastian Thiel "] description = "A complete library to interact with plusDomains (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/plusdomains1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-plusdomains1] path = "../plusdomains1" -version = "1.0.4+20161214" +version = "1.0.4+20170410" diff --git a/gen/plusdomains1-cli/README.md b/gen/plusdomains1-cli/README.md index c61302ee26..206c2e359b 100644 --- a/gen/plusdomains1-cli/README.md +++ b/gen/plusdomains1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *plusDomains* API at revision *20161214*. The CLI is at version *1.0.4*. +This documentation was generated from the *plusDomains* API at revision *20170410*. The CLI is at version *1.0.4*. ```bash plusdomains1 [options] diff --git a/gen/plusdomains1-cli/mkdocs.yml b/gen/plusdomains1-cli/mkdocs.yml index 547edee2f3..a60d236e8b 100644 --- a/gen/plusdomains1-cli/mkdocs.yml +++ b/gen/plusdomains1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: plusDomains v1.0.4+20161214 +site_name: plusDomains v1.0.4+20170410 site_url: http://byron.github.io/google-apis-rs/google-plusdomains1-cli site_description: A complete library to interact with plusDomains (protocol v1) diff --git a/gen/plusdomains1-cli/src/main.rs b/gen/plusdomains1-cli/src/main.rs index 579bc6c6b9..52f8c1b4ed 100644 --- a/gen/plusdomains1-cli/src/main.rs +++ b/gen/plusdomains1-cli/src/main.rs @@ -2164,7 +2164,7 @@ fn main() { let mut app = App::new("plusdomains1") .author("Sebastian Thiel ") - .version("1.0.4+20161214") + .version("1.0.4+20170410") .about("Builds on top of the Google+ platform for Google Apps Domains.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_plusdomains1_cli") .arg(Arg::with_name("url") diff --git a/gen/plusdomains1/Cargo.toml b/gen/plusdomains1/Cargo.toml index af3466025c..7ad44fbea4 100644 --- a/gen/plusdomains1/Cargo.toml +++ b/gen/plusdomains1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-plusdomains1" -version = "1.0.4+20161214" +version = "1.0.4+20170410" authors = ["Sebastian Thiel "] description = "A complete library to interact with plusDomains (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/plusdomains1" homepage = "https://developers.google.com/+/domains/" -documentation = "https://docs.rs/google-plusdomains1/1.0.4+20161214" +documentation = "https://docs.rs/google-plusdomains1/1.0.4+20170410" license = "MIT" keywords = ["plusDomains", "google", "protocol", "web", "api"] diff --git a/gen/plusdomains1/README.md b/gen/plusdomains1/README.md index 7559cd9ba6..aeac0944a1 100644 --- a/gen/plusdomains1/README.md +++ b/gen/plusdomains1/README.md @@ -5,31 +5,31 @@ DO NOT EDIT ! --> The `google-plusdomains1` library allows access to all features of the *Google plusDomains* service. -This documentation was generated from *plusDomains* crate version *1.0.4+20161214*, where *20161214* is the exact revision of the *plusDomains:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *plusDomains* crate version *1.0.4+20170410*, where *20170410* is the exact revision of the *plusDomains:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *plusDomains* *v1* API can be found at the [official documentation site](https://developers.google.com/+/domains/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.PlusDomains.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.PlusDomains.html) ... -* [activities](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.Activity.html) - * [*get*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.ActivityGetCall.html), [*insert*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.ActivityInsertCall.html) and [*list*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.ActivityListCall.html) -* [audiences](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.Audience.html) - * [*list*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.AudienceListCall.html) -* [circles](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.Circle.html) - * [*add people*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CircleAddPeopleCall.html), [*get*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CircleGetCall.html), [*insert*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CircleInsertCall.html), [*list*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CircleListCall.html), [*patch*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CirclePatchCall.html), [*remove*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CircleRemoveCall.html), [*remove people*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CircleRemovePeopleCall.html) and [*update*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CircleUpdateCall.html) -* [comments](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.Comment.html) - * [*get*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CommentGetCall.html), [*insert*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CommentInsertCall.html) and [*list*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.CommentListCall.html) -* [media](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.Media.html) - * [*insert*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.MediaInsertCall.html) +* [activities](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.Activity.html) + * [*get*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.ActivityGetCall.html), [*insert*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.ActivityInsertCall.html) and [*list*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.ActivityListCall.html) +* [audiences](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.Audience.html) + * [*list*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.AudienceListCall.html) +* [circles](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.Circle.html) + * [*add people*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CircleAddPeopleCall.html), [*get*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CircleGetCall.html), [*insert*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CircleInsertCall.html), [*list*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CircleListCall.html), [*patch*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CirclePatchCall.html), [*remove*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CircleRemoveCall.html), [*remove people*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CircleRemovePeopleCall.html) and [*update*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CircleUpdateCall.html) +* [comments](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.Comment.html) + * [*get*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CommentGetCall.html), [*insert*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CommentInsertCall.html) and [*list*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.CommentListCall.html) +* [media](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.Media.html) + * [*insert*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.MediaInsertCall.html) * people - * [*get*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.PeopleGetCall.html), [*list*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.PeopleListCall.html), [*list by activity*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.PeopleListByActivityCall.html) and [*list by circle*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.PeopleListByCircleCall.html) + * [*get*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.PeopleGetCall.html), [*list*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.PeopleListCall.html), [*list by activity*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.PeopleListByActivityCall.html) and [*list by circle*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.PeopleListByCircleCall.html) Upload supported by ... -* [*insert media*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.MediaInsertCall.html) +* [*insert media*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.MediaInsertCall.html) @@ -37,17 +37,17 @@ Upload supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/struct.PlusDomains.html)** +* **[Hub](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/struct.PlusDomains.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.Part.html)** + * **[Parts](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -138,17 +138,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.Delegate.html), 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-plusdomains1/1.0.4+20161214/google_plusdomains1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.ResponseResult.html), 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")`. @@ -158,29 +158,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.CallBuilder.html) 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-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.CallBuilder.html), 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-plusdomains1/1.0.4+20161214/google_plusdomains1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-plusdomains1/1.0.4+20170410/google_plusdomains1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/plusdomains1/src/lib.rs b/gen/plusdomains1/src/lib.rs index 7a9c40fb6b..363e306112 100644 --- a/gen/plusdomains1/src/lib.rs +++ b/gen/plusdomains1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *plusDomains* crate version *1.0.4+20161214*, where *20161214* is the exact revision of the *plusDomains:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *plusDomains* crate version *1.0.4+20170410*, where *20170410* is the exact revision of the *plusDomains:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *plusDomains* *v1* API can be found at the //! [official documentation site](https://developers.google.com/+/domains/). diff --git a/gen/prediction1d6-cli/Cargo.toml b/gen/prediction1d6-cli/Cargo.toml index 221734df74..2f76f93460 100644 --- a/gen/prediction1d6-cli/Cargo.toml +++ b/gen/prediction1d6-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/proximitybeacon1_beta1-cli/Cargo.toml b/gen/proximitybeacon1_beta1-cli/Cargo.toml index 2b9f45dd11..c14f9505d2 100644 --- a/gen/proximitybeacon1_beta1-cli/Cargo.toml +++ b/gen/proximitybeacon1_beta1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-proximitybeacon1_beta1-cli" -version = "1.0.4+20160429" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with proximitybeacon (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/proximitybeacon1_beta1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-proximitybeacon1_beta1] path = "../proximitybeacon1_beta1" -version = "1.0.4+20160429" +version = "1.0.4+20170517" diff --git a/gen/proximitybeacon1_beta1-cli/README.md b/gen/proximitybeacon1_beta1-cli/README.md index a9e1bf95f7..b7b8e5a06a 100644 --- a/gen/proximitybeacon1_beta1-cli/README.md +++ b/gen/proximitybeacon1_beta1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *proximitybeacon* API at revision *20160429*. The CLI is at version *1.0.4*. +This documentation was generated from the *proximitybeacon* API at revision *20170517*. The CLI is at version *1.0.4*. ```bash proximitybeacon1-beta1 [options] @@ -39,6 +39,7 @@ proximitybeacon1-beta1 [options] attachments-list [-p ]... [-o ] deactivate [-p ]... [-o ] decommission [-p ]... [-o ] + delete [-p ]... [-o ] diagnostics-list [-p ]... [-o ] get [-p ]... [-o ] list [-p ]... [-o ] diff --git a/gen/proximitybeacon1_beta1-cli/mkdocs.yml b/gen/proximitybeacon1_beta1-cli/mkdocs.yml index eef03ff658..00286ade6c 100644 --- a/gen/proximitybeacon1_beta1-cli/mkdocs.yml +++ b/gen/proximitybeacon1_beta1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: proximitybeacon v1.0.4+20160429 +site_name: proximitybeacon v1.0.4+20170517 site_url: http://byron.github.io/google-apis-rs/google-proximitybeacon1_beta1-cli site_description: A complete library to interact with proximitybeacon (protocol v1beta1) @@ -17,6 +17,7 @@ pages: - ['beacons_attachments-list.md', 'Beacons', 'Attachments List'] - ['beacons_deactivate.md', 'Beacons', 'Deactivate'] - ['beacons_decommission.md', 'Beacons', 'Decommission'] +- ['beacons_delete.md', 'Beacons', 'Delete'] - ['beacons_diagnostics-list.md', 'Beacons', 'Diagnostics List'] - ['beacons_get.md', 'Beacons', 'Get'] - ['beacons_list.md', 'Beacons', 'List'] diff --git a/gen/proximitybeacon1_beta1-cli/src/main.rs b/gen/proximitybeacon1_beta1-cli/src/main.rs index cce77ec1fc..929d5c5747 100644 --- a/gen/proximitybeacon1_beta1-cli/src/main.rs +++ b/gen/proximitybeacon1_beta1-cli/src/main.rs @@ -267,10 +267,11 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "data" => Some(("data", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time-ms" => Some(("creationTimeMs", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "attachment-name" => Some(("attachmentName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "namespaced-type" => Some(("namespacedType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["attachment-name", "data", "namespaced-type"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["attachment-name", "creation-time-ms", "data", "namespaced-type"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -561,6 +562,62 @@ impl<'n> Engine<'n> { } } + fn _beacons_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.beacons().delete(opt.value_of("beacon-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 { + "project-id" => { + call = call.project_id(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(["project-id"].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(), + _ => 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(()) + } + } + } + } + fn _beacons_diagnostics_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.beacons().diagnostics_list(opt.value_of("beacon-name").unwrap_or("")); @@ -1196,6 +1253,9 @@ impl<'n> Engine<'n> { ("decommission", Some(opt)) => { call_result = self._beacons_decommission(opt, dry_run, &mut err); }, + ("delete", Some(opt)) => { + call_result = self._beacons_delete(opt, dry_run, &mut err); + }, ("diagnostics-list", Some(opt)) => { call_result = self._beacons_diagnostics_list(opt, dry_run, &mut err); }, @@ -1330,7 +1390,10 @@ fn main() { let arg_data = [ ("beaconinfo", "methods: 'getforobserved'", vec![ ("getforobserved", - Some(r##"Given one or more beacon observations, returns any beacon information and attachments accessible to your application. Authorize by using the [API key](https://developers.google.com/beacons/proximity/how-tos/authorizing#APIKey) for the application."##), + Some(r##"Given one or more beacon observations, returns any beacon information + and attachments accessible to your application. Authorize by using the + [API key](https://developers.google.com/beacons/proximity/get-started#request_a_browser_api_key) + for the application."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beaconinfo_getforobserved", vec![ (Some(r##"kv"##), @@ -1353,14 +1416,27 @@ fn main() { ]), ]), - ("beacons", "methods: 'activate', 'attachments-batch-delete', 'attachments-create', 'attachments-delete', 'attachments-list', 'deactivate', 'decommission', 'diagnostics-list', 'get', 'list', 'register' and 'update'", vec![ + ("beacons", "methods: 'activate', 'attachments-batch-delete', 'attachments-create', 'attachments-delete', 'attachments-list', 'deactivate', 'decommission', 'delete', 'diagnostics-list', 'get', 'list', 'register' and 'update'", vec![ ("activate", - Some(r##"Activates a beacon. A beacon that is active will return information and attachment data when queried via `beaconinfo.getforobserved`. Calling this method on an already active beacon will do nothing (but will return a successful response code). Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Activates a beacon. A beacon that is active will return information + and attachment data when queried via `beaconinfo.getforobserved`. + Calling this method on an already active beacon will do nothing (but + will return a successful response code). + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **Is owner** or **Can edit** permissions in the + Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_activate", vec![ (Some(r##"beacon-name"##), None, - Some(r##"Beacon that should be activated. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required."##), + Some(r##"Beacon that should be activated. A beacon name has the format + "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + the beacon and N is a code for the beacon's type. Possible values are + `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + for AltBeacon. For Eddystone-EID beacons, you may use either the + current EID or the beacon's "stable" UID. + Required."##), Some(true), Some(false)), @@ -1377,12 +1453,28 @@ fn main() { Some(false)), ]), ("attachments-batch-delete", - Some(r##"Deletes multiple attachments on a given beacon. This operation is permanent and cannot be undone. You can optionally specify `namespacedType` to choose which attachments should be deleted. If you do not specify `namespacedType`, all your attachments on the given beacon will be deleted. You also may explicitly specify `*/*` to delete all. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Deletes multiple attachments on a given beacon. This operation is + permanent and cannot be undone. + + You can optionally specify `namespacedType` to choose which attachments + should be deleted. If you do not specify `namespacedType`, all your + attachments on the given beacon will be deleted. You also may explicitly + specify `*/*` to delete all. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **Is owner** or **Can edit** permissions in the + Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_attachments-batch-delete", vec![ (Some(r##"beacon-name"##), None, - Some(r##"The beacon whose attachments should be deleted. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required."##), + Some(r##"The beacon whose attachments should be deleted. A beacon name has the + format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast + by the beacon and N is a code for the beacon's type. Possible values are + `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + for AltBeacon. For Eddystone-EID beacons, you may use either the + current EID or the beacon's "stable" UID. + Required."##), Some(true), Some(false)), @@ -1399,14 +1491,33 @@ fn main() { Some(false)), ]), ("attachments-create", - Some(r##"Associates the given data with the specified beacon. Attachment data must contain two parts: - - A namespaced type. - - The actual attachment data itself. The namespaced type consists of two parts, the namespace and the type. The namespace must be one of the values returned by the `namespaces` endpoint, while the type can be a string of any characters except for the forward slash (`/`) up to 100 characters in length. Attachment data can be up to 1024 bytes long. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Associates the given data with the specified beacon. Attachment data must + contain two parts: +
    +
  • A namespaced type.
  • +
  • The actual attachment data itself.
  • +
+ The namespaced type consists of two parts, the namespace and the type. + The namespace must be one of the values returned by the `namespaces` + endpoint, while the type can be a string of any characters except for the + forward slash (`/`) up to 100 characters in length. + + Attachment data can be up to 1024 bytes long. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **Is owner** or **Can edit** permissions in the + Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_attachments-create", vec![ (Some(r##"beacon-name"##), None, - Some(r##"Beacon on which the attachment should be created. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required."##), + Some(r##"Beacon on which the attachment should be created. A beacon name has the + format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast + by the beacon and N is a code for the beacon's type. Possible values are + `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + for AltBeacon. For Eddystone-EID beacons, you may use either the + current EID or the beacon's "stable" UID. + Required."##), Some(true), Some(false)), @@ -1429,12 +1540,25 @@ fn main() { Some(false)), ]), ("attachments-delete", - Some(r##"Deletes the specified attachment for the given beacon. Each attachment has a unique attachment name (`attachmentName`) which is returned when you fetch the attachment data via this API. You specify this with the delete request to control which attachment is removed. This operation cannot be undone. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Deletes the specified attachment for the given beacon. Each attachment has + a unique attachment name (`attachmentName`) which is returned when you + fetch the attachment data via this API. You specify this with the delete + request to control which attachment is removed. This operation cannot be + undone. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **Is owner** or **Can edit** permissions in the + Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_attachments-delete", vec![ (Some(r##"attachment-name"##), None, - Some(r##"The attachment name (`attachmentName`) of the attachment to remove. For example: `beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`. For Eddystone-EID beacons, the beacon ID portion (`3!893737abc9`) may be the beacon's current EID, or its "stable" Eddystone-UID. Required."##), + Some(r##"The attachment name (`attachmentName`) of + the attachment to remove. For example: + `beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`. For + Eddystone-EID beacons, the beacon ID portion (`3!893737abc9`) may be the + beacon's current EID, or its "stable" Eddystone-UID. + Required."##), Some(true), Some(false)), @@ -1451,12 +1575,28 @@ fn main() { Some(false)), ]), ("attachments-list", - Some(r##"Returns the attachments for the specified beacon that match the specified namespaced-type pattern. To control which namespaced types are returned, you add the `namespacedType` query parameter to the request. You must either use `*/*`, to return all attachments, or the namespace must be one of the ones returned from the `namespaces` endpoint. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Returns the attachments for the specified beacon that match the specified + namespaced-type pattern. + + To control which namespaced types are returned, you add the + `namespacedType` query parameter to the request. You must either use + `*/*`, to return all attachments, or the namespace must be one of + the ones returned from the `namespaces` endpoint. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **viewer**, **Is owner** or **Can edit** + permissions in the Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_attachments-list", vec![ (Some(r##"beacon-name"##), None, - Some(r##"Beacon whose attachments should be fetched. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required."##), + Some(r##"Beacon whose attachments should be fetched. A beacon name has the + format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast + by the beacon and N is a code for the beacon's type. Possible values are + `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + for AltBeacon. For Eddystone-EID beacons, you may use either the + current EID or the beacon's "stable" UID. + Required."##), Some(true), Some(false)), @@ -1473,12 +1613,25 @@ fn main() { Some(false)), ]), ("deactivate", - Some(r##"Deactivates a beacon. Once deactivated, the API will not return information nor attachment data for the beacon when queried via `beaconinfo.getforobserved`. Calling this method on an already inactive beacon will do nothing (but will return a successful response code). Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Deactivates a beacon. Once deactivated, the API will not return + information nor attachment data for the beacon when queried via + `beaconinfo.getforobserved`. Calling this method on an already inactive + beacon will do nothing (but will return a successful response code). + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **Is owner** or **Can edit** permissions in the + Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_deactivate", vec![ (Some(r##"beacon-name"##), None, - Some(r##"Beacon that should be deactivated. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required."##), + Some(r##"Beacon that should be deactivated. A beacon name has the format + "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + the beacon and N is a code for the beacon's type. Possible values are + `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + for AltBeacon. For Eddystone-EID beacons, you may use either the + current EID or the beacon's "stable" UID. + Required."##), Some(true), Some(false)), @@ -1495,12 +1648,59 @@ fn main() { Some(false)), ]), ("decommission", - Some(r##"Decommissions the specified beacon in the service. This beacon will no longer be returned from `beaconinfo.getforobserved`. This operation is permanent -- you will not be able to re-register a beacon with this ID again. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Decommissions the specified beacon in the service. This beacon will no + longer be returned from `beaconinfo.getforobserved`. This operation is + permanent -- you will not be able to re-register a beacon with this ID + again. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **Is owner** or **Can edit** permissions in the + Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_decommission", vec![ (Some(r##"beacon-name"##), None, - Some(r##"Beacon that should be decommissioned. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID of the beacon's "stable" UID. Required."##), + Some(r##"Beacon that should be decommissioned. A beacon name has the format + "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + the beacon and N is a code for the beacon's type. Possible values are + `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + for AltBeacon. For Eddystone-EID beacons, you may use either the + current EID of the beacon's "stable" UID. + Required."##), + 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)), + ]), + ("delete", + Some(r##"Deletes the specified beacon including all diagnostics data for the beacon + as well as any attachments on the beacon (including those belonging to + other projects). This operation cannot be undone. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **Is owner** or **Can edit** permissions in the + Google Developers Console project."##), + "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_delete", + vec![ + (Some(r##"beacon-name"##), + None, + Some(r##"Beacon that should be deleted. A beacon name has the format + "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + the beacon and N is a code for the beacon's type. Possible values are + `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + for AltBeacon. For Eddystone-EID beacons, you may use either the + current EID or the beacon's "stable" UID. + Required."##), Some(true), Some(false)), @@ -1517,7 +1717,13 @@ fn main() { Some(false)), ]), ("diagnostics-list", - Some(r##"List the diagnostics for a single beacon. You can also list diagnostics for all the beacons owned by your Google Developers Console project by using the beacon name `beacons/-`. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"List the diagnostics for a single beacon. You can also list diagnostics for + all the beacons owned by your Google Developers Console project by using + the beacon name `beacons/-`. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **viewer**, **Is owner** or **Can edit** + permissions in the Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_diagnostics-list", vec![ (Some(r##"beacon-name"##), @@ -1539,12 +1745,28 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Returns detailed information about the specified beacon. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. Requests may supply an Eddystone-EID beacon name in the form: `beacons/4!beaconId` where the `beaconId` is the base16 ephemeral ID broadcast by the beacon. The returned `Beacon` object will contain the beacon's stable Eddystone-UID. Clients not authorized to resolve the beacon's ephemeral Eddystone-EID broadcast will receive an error."##), + Some(r##"Returns detailed information about the specified beacon. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **viewer**, **Is owner** or **Can edit** + permissions in the Google Developers Console project. + + Requests may supply an Eddystone-EID beacon name in the form: + `beacons/4!beaconId` where the `beaconId` is the base16 ephemeral ID + broadcast by the beacon. The returned `Beacon` object will contain the + beacon's stable Eddystone-UID. Clients not authorized to resolve the + beacon's ephemeral Eddystone-EID broadcast will receive an error."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_get", vec![ (Some(r##"beacon-name"##), None, - Some(r##"Resource name of this beacon. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required."##), + Some(r##"Resource name of this beacon. A beacon name has the format + "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + the beacon and N is a code for the beacon's type. Possible values are + `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + for AltBeacon. For Eddystone-EID beacons, you may use either the + current EID or the beacon's "stable" UID. + Required."##), Some(true), Some(false)), @@ -1561,7 +1783,13 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Searches the beacon registry for beacons that match the given search criteria. Only those beacons that the client has permission to list will be returned. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Searches the beacon registry for beacons that match the given search + criteria. Only those beacons that the client has permission to list + will be returned. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **viewer**, **Is owner** or **Can edit** + permissions in the Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_list", vec![ (Some(r##"v"##), @@ -1577,7 +1805,12 @@ fn main() { Some(false)), ]), ("register", - Some(r##"Registers a previously unregistered beacon given its `advertisedId`. These IDs are unique within the system. An ID can be registered only once. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Registers a previously unregistered beacon given its `advertisedId`. + These IDs are unique within the system. An ID can be registered only once. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **Is owner** or **Can edit** permissions in the + Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_register", vec![ (Some(r##"kv"##), @@ -1599,12 +1832,28 @@ fn main() { Some(false)), ]), ("update", - Some(r##"Updates the information about the specified beacon. **Any field that you do not populate in the submitted beacon will be permanently erased**, so you should follow the "read, modify, write" pattern to avoid inadvertently destroying data. Changes to the beacon status via this method will be silently ignored. To update beacon status, use the separate methods on this API for activation, deactivation, and decommissioning. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Updates the information about the specified beacon. **Any field that you do + not populate in the submitted beacon will be permanently erased**, so you + should follow the "read, modify, write" pattern to avoid inadvertently + destroying data. + + Changes to the beacon status via this method will be silently ignored. + To update beacon status, use the separate methods on this API for + activation, deactivation, and decommissioning. + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **Is owner** or **Can edit** permissions in the + Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/beacons_update", vec![ (Some(r##"beacon-name"##), None, - Some(r##"Resource name of this beacon. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. This field must be left empty when registering. After reading a beacon, clients can use the name for future operations."##), + Some(r##"Resource name of this beacon. A beacon name has the format + "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + the beacon and N is a code for the beacon's type. Possible values are + `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. + + This field must be left empty when registering. After reading a beacon, + clients can use the name for future operations."##), Some(true), Some(false)), @@ -1630,7 +1879,13 @@ fn main() { ("methods", "methods: 'get-eidparams'", vec![ ("get-eidparams", - Some(r##"Gets the Proximity Beacon API's current public key and associated parameters used to initiate the Diffie-Hellman key exchange required to register a beacon that broadcasts the Eddystone-EID format. This key changes periodically; clients may cache it and re-use the same public key to provision and register multiple beacons. However, clients should be prepared to refresh this key when they encounter an error registering an Eddystone-EID beacon."##), + Some(r##"Gets the Proximity Beacon API's current public key and associated + parameters used to initiate the Diffie-Hellman key exchange required to + register a beacon that broadcasts the Eddystone-EID format. This key + changes periodically; clients may cache it and re-use the same public key + to provision and register multiple beacons. However, clients should be + prepared to refresh this key when they encounter an error registering an + Eddystone-EID beacon."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/methods_get-eidparams", vec![ (Some(r##"v"##), @@ -1649,7 +1904,13 @@ fn main() { ("namespaces", "methods: 'list' and 'update'", vec![ ("list", - Some(r##"Lists all attachment namespaces owned by your Google Developers Console project. Attachment data associated with a beacon must include a namespaced type, and the namespace must be owned by your project. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project."##), + Some(r##"Lists all attachment namespaces owned by your Google Developers Console + project. Attachment data associated with a beacon must include a + namespaced type, and the namespace must be owned by your project. + + Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + from a signed-in user with **viewer**, **Is owner** or **Can edit** + permissions in the Google Developers Console project."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/namespaces_list", vec![ (Some(r##"v"##), @@ -1665,12 +1926,14 @@ fn main() { Some(false)), ]), ("update", - Some(r##"Updates the information about the specified namespace. Only the namespace visibility can be updated."##), + Some(r##"Updates the information about the specified namespace. Only the namespace + visibility can be updated."##), "Details at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli/namespaces_update", vec![ (Some(r##"namespace-name"##), None, - Some(r##"Resource name of this namespace. Namespaces names have the format: namespaces/namespace."##), + Some(r##"Resource name of this namespace. Namespaces names have the format: + namespaces/namespace."##), Some(true), Some(false)), @@ -1698,7 +1961,7 @@ fn main() { let mut app = App::new("proximitybeacon1-beta1") .author("Sebastian Thiel ") - .version("1.0.4+20160429") + .version("1.0.4+20170517") .about("Registers, manages, indexes, and searches beacons.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli") .arg(Arg::with_name("url") diff --git a/gen/proximitybeacon1_beta1/Cargo.toml b/gen/proximitybeacon1_beta1/Cargo.toml index a1479cc90d..af137f9ecd 100644 --- a/gen/proximitybeacon1_beta1/Cargo.toml +++ b/gen/proximitybeacon1_beta1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-proximitybeacon1_beta1" -version = "1.0.4+20160429" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with proximitybeacon (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/proximitybeacon1_beta1" homepage = "https://developers.google.com/beacons/proximity/" -documentation = "https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429" +documentation = "https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517" license = "MIT" keywords = ["proximitybeacon", "google", "protocol", "web", "api"] diff --git a/gen/proximitybeacon1_beta1/README.md b/gen/proximitybeacon1_beta1/README.md index 658dcc9f52..10b694786f 100644 --- a/gen/proximitybeacon1_beta1/README.md +++ b/gen/proximitybeacon1_beta1/README.md @@ -5,24 +5,24 @@ DO NOT EDIT ! --> The `google-proximitybeacon1_beta1` library allows access to all features of the *Google proximitybeacon* service. -This documentation was generated from *proximitybeacon* crate version *1.0.4+20160429*, where *20160429* is the exact revision of the *proximitybeacon:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *proximitybeacon* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *proximitybeacon:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *proximitybeacon* *v1_beta1* API can be found at the [official documentation site](https://developers.google.com/beacons/proximity/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.Proximitybeacon.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.Proximitybeacon.html) ... * beaconinfo - * [*getforobserved*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconinfoGetforobservedCall.html) -* [beacons](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.Beacon.html) - * [*activate*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconActivateCall.html), [*attachments batch delete*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconAttachmentBatchDeleteCall.html), [*attachments create*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconAttachmentCreateCall.html), [*attachments delete*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconAttachmentDeleteCall.html), [*attachments list*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconAttachmentListCall.html), [*deactivate*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconDeactivateCall.html), [*decommission*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconDecommissionCall.html), [*diagnostics list*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconDiagnosticListCall.html), [*get*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconGetCall.html), [*list*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconListCall.html), [*register*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconRegisterCall.html) and [*update*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.BeaconUpdateCall.html) -* [namespaces](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.Namespace.html) - * [*list*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.NamespaceListCall.html) and [*update*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.NamespaceUpdateCall.html) + * [*getforobserved*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconinfoGetforobservedCall.html) +* [beacons](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.Beacon.html) + * [*activate*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconActivateCall.html), [*attachments batch delete*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconAttachmentBatchDeleteCall.html), [*attachments create*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconAttachmentCreateCall.html), [*attachments delete*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconAttachmentDeleteCall.html), [*attachments list*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconAttachmentListCall.html), [*deactivate*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconDeactivateCall.html), [*decommission*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconDecommissionCall.html), [*delete*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconDeleteCall.html), [*diagnostics list*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconDiagnosticListCall.html), [*get*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconGetCall.html), [*list*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconListCall.html), [*register*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconRegisterCall.html) and [*update*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.BeaconUpdateCall.html) +* [namespaces](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.Namespace.html) + * [*list*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.NamespaceListCall.html) and [*update*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.NamespaceUpdateCall.html) Other activities are ... -* [get eidparams](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.MethodGetEidparamCall.html) +* [get eidparams](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.MethodGetEidparamCall.html) @@ -30,17 +30,17 @@ Other activities are ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/struct.Proximitybeacon.html)** +* **[Hub](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/struct.Proximitybeacon.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.Part.html)** + * **[Parts](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -64,6 +64,7 @@ let r = hub.beacons().update(...).doit() let r = hub.beacons().attachments_delete(...).doit() let r = hub.beacons().deactivate(...).doit() let r = hub.beacons().register(...).doit() +let r = hub.beacons().delete(...).doit() let r = hub.beacons().diagnostics_list(...).doit() let r = hub.beacons().attachments_batch_delete(...).doit() ``` @@ -137,17 +138,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.Delegate.html), 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-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.ResponseResult.html), 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")`. @@ -157,29 +158,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.CallBuilder.html) 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-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.CallBuilder.html), 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-proximitybeacon1_beta1/1.0.4+20160429/google_proximitybeacon1_beta1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-proximitybeacon1_beta1/1.0.4+20170517/google_proximitybeacon1_beta1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/proximitybeacon1_beta1/src/lib.rs b/gen/proximitybeacon1_beta1/src/lib.rs index e5f3aae2fa..8c2c36744d 100644 --- a/gen/proximitybeacon1_beta1/src/lib.rs +++ b/gen/proximitybeacon1_beta1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *proximitybeacon* crate version *1.0.4+20160429*, where *20160429* is the exact revision of the *proximitybeacon:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *proximitybeacon* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *proximitybeacon:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *proximitybeacon* *v1_beta1* API can be found at the //! [official documentation site](https://developers.google.com/beacons/proximity/). @@ -14,7 +14,7 @@ //! * beaconinfo //! * [*getforobserved*](struct.BeaconinfoGetforobservedCall.html) //! * [beacons](struct.Beacon.html) -//! * [*activate*](struct.BeaconActivateCall.html), [*attachments batch delete*](struct.BeaconAttachmentBatchDeleteCall.html), [*attachments create*](struct.BeaconAttachmentCreateCall.html), [*attachments delete*](struct.BeaconAttachmentDeleteCall.html), [*attachments list*](struct.BeaconAttachmentListCall.html), [*deactivate*](struct.BeaconDeactivateCall.html), [*decommission*](struct.BeaconDecommissionCall.html), [*diagnostics list*](struct.BeaconDiagnosticListCall.html), [*get*](struct.BeaconGetCall.html), [*list*](struct.BeaconListCall.html), [*register*](struct.BeaconRegisterCall.html) and [*update*](struct.BeaconUpdateCall.html) +//! * [*activate*](struct.BeaconActivateCall.html), [*attachments batch delete*](struct.BeaconAttachmentBatchDeleteCall.html), [*attachments create*](struct.BeaconAttachmentCreateCall.html), [*attachments delete*](struct.BeaconAttachmentDeleteCall.html), [*attachments list*](struct.BeaconAttachmentListCall.html), [*deactivate*](struct.BeaconDeactivateCall.html), [*decommission*](struct.BeaconDecommissionCall.html), [*delete*](struct.BeaconDeleteCall.html), [*diagnostics list*](struct.BeaconDiagnosticListCall.html), [*get*](struct.BeaconGetCall.html), [*list*](struct.BeaconListCall.html), [*register*](struct.BeaconRegisterCall.html) and [*update*](struct.BeaconUpdateCall.html) //! * [namespaces](struct.Namespace.html) //! * [*list*](struct.NamespaceListCall.html) and [*update*](struct.NamespaceUpdateCall.html) //! @@ -64,6 +64,7 @@ //! let r = hub.beacons().attachments_delete(...).doit() //! let r = hub.beacons().deactivate(...).doit() //! let r = hub.beacons().register(...).doit() +//! let r = hub.beacons().delete(...).doit() //! let r = hub.beacons().diagnostics_list(...).doit() //! let r = hub.beacons().attachments_batch_delete(...).doit() //! ``` @@ -375,12 +376,25 @@ impl<'a, C, A> Proximitybeacon /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BeaconAttachment { - /// Resource name of this attachment. Attachment names have the format: beacons/beacon_id/attachments/attachment_id. Leave this empty on creation. + /// Resource name of this attachment. Attachment names have the format: + /// beacons/beacon_id/attachments/attachment_id. + /// Leave this empty on creation. #[serde(rename="attachmentName")] pub attachment_name: Option, - /// An opaque data container for client-provided data. Must be [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP requests, and will be so encoded (with padding) in responses. Required. + /// The UTC time when this attachment was created, in milliseconds since the + /// UNIX epoch. + #[serde(rename="creationTimeMs")] + pub creation_time_ms: Option, + /// An opaque data container for client-provided data. Must be + /// [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP + /// requests, and will be so encoded (with padding) in responses. + /// Required. pub data: Option, - /// Specifies what kind of attachment this is. Tells a client how to interpret the `data` field. Format is namespace/type. Namespace provides type separation between clients. Type describes the type of `data`, for use by the client when parsing the `data` field. Required. + /// Specifies what kind of attachment this is. Tells a client how to + /// interpret the `data` field. Format is namespace/type. Namespace + /// provides type separation between clients. Type describes the type of + /// `data`, for use by the client when parsing the `data` field. + /// Required. #[serde(rename="namespacedType")] pub namespaced_type: Option, } @@ -395,10 +409,17 @@ impl ResponseResult for BeaconAttachment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Observation { - /// The ID advertised by the beacon the client has encountered. Clients may submit an Eddystone-EID `advertised_id`. If the client is not authorized to resolve the given Eddystone-EID, no data will be returned for that beacon. Required. + /// The ID advertised by the beacon the client has encountered. + /// + /// If the submitted `advertised_id` type is Eddystone-EID, then the client + /// must be authorized to resolve the given beacon. Otherwise no data will be + /// returned for that beacon. + /// Required. #[serde(rename="advertisedId")] pub advertised_id: Option, - /// The array of telemetry bytes received from the beacon. The server is responsible for parsing it. This field may frequently be empty, as with a beacon that transmits telemetry only occasionally. + /// The array of telemetry bytes received from the beacon. The server is + /// responsible for parsing it. This field may frequently be empty, as + /// with a beacon that transmits telemetry only occasionally. pub telemetry: Option, /// Time when the beacon was observed. #[serde(rename="timestampMs")] @@ -408,7 +429,8 @@ pub struct Observation { impl Part for Observation {} -/// Indoor level, a human-readable string as returned by Google Maps APIs, useful to indicate which floor of a building a beacon is located on. +/// Indoor level, a human-readable string as returned by Google Maps APIs, +/// useful to indicate which floor of a building a beacon is located on. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -432,12 +454,14 @@ impl Part for IndoorLevel {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListBeaconsResponse { - /// The beacons that matched the search criteria. - pub beacons: Option>, - /// An opaque pagination token that the client may provide in their next request to retrieve the next page of results. + /// An opaque pagination token that the client may provide in their next + /// request to retrieve the next page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, - /// Estimate of the total number of beacons matched by the query. Higher values may be less accurate. + /// The beacons that matched the search criteria. + pub beacons: Option>, + /// Estimate of the total number of beacons matched by the query. Higher + /// values may be less accurate. #[serde(rename="totalCount")] pub total_count: Option, } @@ -445,7 +469,8 @@ pub struct ListBeaconsResponse { impl ResponseResult for ListBeaconsResponse {} -/// Request for beacon and attachment information about beacons that a mobile client has encountered "in the wild". +/// Request for beacon and attachment information about beacons that +/// a mobile client has encountered "in the wild". /// /// # Activities /// @@ -456,9 +481,15 @@ impl ResponseResult for ListBeaconsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GetInfoForObservedBeaconsRequest { - /// The beacons that the client has encountered. At least one must be given. + /// The beacons that the client has encountered. + /// At least one must be given. pub observations: Option>, - /// Specifies what kind of attachments to include in the response. When given, the response will include only attachments of the given types. When empty, no attachments will be returned. Must be in the format namespace/type. Accepts `*` to specify all types in all namespaces. Optional. + /// Specifies what kind of attachments to include in the response. + /// When given, the response will include only attachments of the given types. + /// When empty, no attachments will be returned. Must be in the format + /// namespace/type. Accepts `*` to specify all types in + /// all namespaces owned by the client. + /// Optional. #[serde(rename="namespacedTypes")] pub namespaced_types: Option>, } @@ -466,7 +497,9 @@ pub struct GetInfoForObservedBeaconsRequest { impl RequestValue for GetInfoForObservedBeaconsRequest {} -/// An attachment namespace defines read and write access for all the attachments created under it. Each namespace is globally unique, and owned by one project which is the only project that can create attachments under it. +/// An attachment namespace defines read and write access for all the attachments +/// created under it. Each namespace is globally unique, and owned by one +/// project which is the only project that can create attachments under it. /// /// # Activities /// @@ -478,10 +511,12 @@ impl RequestValue for GetInfoForObservedBeaconsRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Namespace { - /// Resource name of this namespace. Namespaces names have the format: namespaces/namespace. + /// Resource name of this namespace. Namespaces names have the format: + /// namespaces/namespace. #[serde(rename="namespaceName")] pub namespace_name: Option, - /// Specifies what clients may receive attachments under this namespace via `beaconinfo.getforobserved`. + /// Specifies what clients may receive attachments under this namespace + /// via `beaconinfo.getforobserved`. #[serde(rename="servingVisibility")] pub serving_visibility: Option, } @@ -491,7 +526,9 @@ impl Resource for Namespace {} impl ResponseResult for Namespace {} -/// A subset of attachment information served via the `beaconinfo.getforobserved` method, used when your users encounter your beacons. +/// A subset of attachment information served via the +/// `beaconinfo.getforobserved` method, used when your users encounter your +/// beacons. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -499,7 +536,9 @@ impl ResponseResult for Namespace {} pub struct AttachmentInfo { /// An opaque data container for client-provided data. pub data: Option, - /// Specifies what kind of attachment this is. Tells a client how to interpret the `data` field. Format is namespace/type, for example scrupulous-wombat-12345/welcome-message + /// Specifies what kind of attachment this is. Tells a client how to + /// interpret the `data` field. Format is namespace/type, for + /// example scrupulous-wombat-12345/welcome-message #[serde(rename="namespacedType")] pub namespaced_type: Option, } @@ -513,142 +552,23 @@ impl Part for AttachmentInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdvertisedId { - /// Specifies the identifier type. Required. + /// Specifies the identifier type. + /// Required. #[serde(rename="type")] pub type_: Option, - /// The actual beacon identifier, as broadcast by the beacon hardware. Must be [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP requests, and will be so encoded (with padding) in responses. The base64 encoding should be of the binary byte-stream and not any textual (such as hex) representation thereof. Required. + /// The actual beacon identifier, as broadcast by the beacon hardware. Must be + /// [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP + /// requests, and will be so encoded (with padding) in responses. The base64 + /// encoding should be of the binary byte-stream and not any textual (such as + /// hex) representation thereof. + /// Required. pub id: Option, } impl Part for AdvertisedId {} -/// Write-only registration parameters for beacons using Eddystone-EID format. Two ways of securely registering an Eddystone-EID beacon with the service are supported: 1. Perform an ECDH key exchange via this API, including a previous call to `GET /v1beta1/eidparams`. In this case the fields `beacon_ecdh_public_key` and `service_ecdh_public_key` should be populated and `beacon_identity_key` should not be populated. This method ensures that only the two parties in the ECDH key exchange can compute the identity key, which becomes a secret between them. 2. Derive or obtain the beacon's identity key via other secure means (perhaps an ECDH key exchange between the beacon and a mobile device or any other secure method), and then submit the resulting identity key to the service. In this case `beacon_identity_key` field should be populated, and neither of `beacon_ecdh_public_key` nor `service_ecdh_public_key` fields should be. The security of this method depends on how securely the parties involved (in particular the bluetooth client) handle the identity key, and obviously on how securely the identity key was generated. See [the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct EphemeralIdRegistration { - /// An initial ephemeral ID calculated using the clock value submitted as `initial_clock_value`, and the secret key generated by the Diffie-Hellman key exchange using `service_ecdh_public_key` and `service_ecdh_public_key`. This initial EID value will be used by the service to confirm that the key exchange process was successful. - #[serde(rename="initialEid")] - pub initial_eid: Option, - /// Indicates the nominal period between each rotation of the beacon's ephemeral ID. "Nominal" because the beacon should randomize the actual interval. See [the spec at github](https://github.com/google/eddystone/tree/master/eddystone-eid) for details. This value corresponds to a power-of-two scaler on the beacon's clock: when the scaler value is K, the beacon will begin broadcasting a new ephemeral ID on average every 2^K seconds. - #[serde(rename="rotationPeriodExponent")] - pub rotation_period_exponent: Option, - /// The beacon's public key used for the Elliptic curve Diffie-Hellman key exchange. When this field is populated, `service_ecdh_public_key` must also be populated, and `beacon_identity_key` must not be. - #[serde(rename="beaconEcdhPublicKey")] - pub beacon_ecdh_public_key: Option, - /// The initial clock value of the beacon. The beacon's clock must have begun counting at this value immediately prior to transmitting this value to the resolving service. Significant delay in transmitting this value to the service risks registration or resolution failures. If a value is not provided, the default is zero. - #[serde(rename="initialClockValue")] - pub initial_clock_value: Option, - /// The service's public key used for the Elliptic curve Diffie-Hellman key exchange. When this field is populated, `beacon_ecdh_public_key` must also be populated, and `beacon_identity_key` must not be. - #[serde(rename="serviceEcdhPublicKey")] - pub service_ecdh_public_key: Option, - /// The private key of the beacon. If this field is populated, `beacon_ecdh_public_key` and `service_ecdh_public_key` must not be populated. - #[serde(rename="beaconIdentityKey")] - pub beacon_identity_key: Option, -} - -impl Part for EphemeralIdRegistration {} - - -/// Diagnostics for a single beacon. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Diagnostics { - /// The date when the battery is expected to be low. If the value is missing then there is no estimate for when the battery will be low. This value is only an estimate, not an exact date. - #[serde(rename="estimatedLowBatteryDate")] - pub estimated_low_battery_date: Option, - /// An unordered list of Alerts that the beacon has. - pub alerts: Option>, - /// Resource name of the beacon. For Eddystone-EID beacons, this may be the beacon's current EID, or the beacon's "stable" Eddystone-UID. - #[serde(rename="beaconName")] - pub beacon_name: Option, -} - -impl Part for Diagnostics {} - - -/// A subset of beacon information served via the `beaconinfo.getforobserved` method, which you call when users of your app encounter your beacons. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BeaconInfo { - /// The ID advertised by the beacon. - #[serde(rename="advertisedId")] - pub advertised_id: Option, - /// Attachments matching the type(s) requested. May be empty if no attachment types were requested, or if none matched. - pub attachments: Option>, - /// The name under which the beacon is registered. - #[serde(rename="beaconName")] - pub beacon_name: Option, -} - -impl Part for BeaconInfo {} - - -/// 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); } The JSON representation for `Empty` is empty JSON object `{}`. -/// -/// # 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*). -/// -/// * [decommission beacons](struct.BeaconDecommissionCall.html) (response) -/// * [attachments delete beacons](struct.BeaconAttachmentDeleteCall.html) (response) -/// * [deactivate beacons](struct.BeaconDeactivateCall.html) (response) -/// * [activate beacons](struct.BeaconActivateCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Empty { _never_set: Option } - -impl ResponseResult for Empty {} - - -/// Information a client needs to provision and register beacons that broadcast Eddystone-EID format beacon IDs, using Elliptic curve Diffie-Hellman key exchange. See [the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub. -/// -/// # 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*). -/// -/// * [get eidparams](struct.MethodGetEidparamCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct EphemeralIdRegistrationParams { - /// Indicates the minimum rotation period supported by the service. See EddystoneEidRegistration.rotation_period_exponent - #[serde(rename="minRotationPeriodExponent")] - pub min_rotation_period_exponent: Option, - /// Indicates the maximum rotation period supported by the service. See EddystoneEidRegistration.rotation_period_exponent - #[serde(rename="maxRotationPeriodExponent")] - pub max_rotation_period_exponent: Option, - /// The beacon service's public key for use by a beacon to derive its Identity Key using Elliptic Curve Diffie-Hellman key exchange. - #[serde(rename="serviceEcdhPublicKey")] - pub service_ecdh_public_key: Option, -} - -impl ResponseResult for EphemeralIdRegistrationParams {} - - -/// An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. Example of normalization code in Python: def NormalizeLongitude(longitude): """Wraps decimal degrees longitude to [-180.0, 180.0].""" q, r = divmod(longitude, 360.0) if r > 180.0 or (r == 180.0 and q <= -1.0): return r - 360.0 return r def NormalizeLatLng(latitude, longitude): """Wraps decimal degrees latitude and longitude to [-90.0, 90.0] and [-180.0, 180.0], respectively.""" r = latitude % 360.0 if r = 270.0: return r - 360, NormalizeLongitude(longitude) else: return 180 - r, NormalizeLongitude(longitude + 180.0) assert 180.0 == NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0) assert -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct LatLng { - /// The latitude in degrees. It must be in the range [-90.0, +90.0]. - pub latitude: Option, - /// The longitude in degrees. It must be in the range [-180.0, +180.0]. - pub longitude: Option, -} - -impl Part for LatLng {} - - -/// Response to ListBeaconAttachments that contains the requested attachments. +/// Response to `ListBeaconAttachments` that contains the requested attachments. /// /// # Activities /// @@ -666,6 +586,223 @@ pub struct ListBeaconAttachmentsResponse { impl ResponseResult for ListBeaconAttachmentsResponse {} +/// Diagnostics for a single beacon. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Diagnostics { + /// The date when the battery is expected to be low. If the value is missing + /// then there is no estimate for when the battery will be low. + /// This value is only an estimate, not an exact date. + #[serde(rename="estimatedLowBatteryDate")] + pub estimated_low_battery_date: Option, + /// An unordered list of Alerts that the beacon has. + pub alerts: Option>, + /// Resource name of the beacon. For Eddystone-EID beacons, this may + /// be the beacon's current EID, or the beacon's "stable" Eddystone-UID. + #[serde(rename="beaconName")] + pub beacon_name: Option, +} + +impl Part for Diagnostics {} + + +/// A subset of beacon information served via the `beaconinfo.getforobserved` +/// method, which you call when users of your app encounter your beacons. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BeaconInfo { + /// The ID advertised by the beacon. + #[serde(rename="advertisedId")] + pub advertised_id: Option, + /// Attachments matching the type(s) requested. + /// May be empty if no attachment types were requested. + pub attachments: Option>, + /// The name under which the beacon is registered. + #[serde(rename="beaconName")] + pub beacon_name: Option, +} + +impl Part for BeaconInfo {} + + +/// Response that contains the requested diagnostics. +/// +/// # 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*). +/// +/// * [diagnostics list beacons](struct.BeaconDiagnosticListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListDiagnosticsResponse { + /// Token that can be used for pagination. Returned only if the + /// request matches more beacons than can be returned in this response. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The diagnostics matching the given request. + pub diagnostics: Option>, +} + +impl ResponseResult for ListDiagnosticsResponse {} + + +/// Information a client needs to provision and register beacons that +/// broadcast Eddystone-EID format beacon IDs, using Elliptic curve +/// Diffie-Hellman key exchange. See +/// [the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub. +/// +/// # 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*). +/// +/// * [get eidparams](struct.MethodGetEidparamCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct EphemeralIdRegistrationParams { + /// Indicates the minimum rotation period supported by the service. + /// See EddystoneEidRegistration.rotation_period_exponent + #[serde(rename="minRotationPeriodExponent")] + pub min_rotation_period_exponent: Option, + /// Indicates the maximum rotation period supported by the service. + /// See EddystoneEidRegistration.rotation_period_exponent + #[serde(rename="maxRotationPeriodExponent")] + pub max_rotation_period_exponent: Option, + /// The beacon service's public key for use by a beacon to derive its + /// Identity Key using Elliptic Curve Diffie-Hellman key exchange. + #[serde(rename="serviceEcdhPublicKey")] + pub service_ecdh_public_key: Option, +} + +impl ResponseResult for EphemeralIdRegistrationParams {} + + +/// An object representing a latitude/longitude pair. This is expressed as a pair +/// of doubles representing degrees latitude and degrees longitude. Unless +/// specified otherwise, this must conform to the +///
WGS84 +/// standard. Values must be within normalized ranges. +/// +/// Example of normalization code in Python: +/// +/// def NormalizeLongitude(longitude): +/// """Wraps decimal degrees longitude to [-180.0, 180.0].""" +/// q, r = divmod(longitude, 360.0) +/// if r > 180.0 or (r == 180.0 and q <= -1.0): +/// return r - 360.0 +/// return r +/// +/// def NormalizeLatLng(latitude, longitude): +/// """Wraps decimal degrees latitude and longitude to +/// [-90.0, 90.0] and [-180.0, 180.0], respectively.""" +/// r = latitude % 360.0 +/// if r <= 90.0: +/// return r, NormalizeLongitude(longitude) +/// elif r >= 270.0: +/// return r - 360, NormalizeLongitude(longitude) +/// else: +/// return 180 - r, NormalizeLongitude(longitude + 180.0) +/// +/// assert 180.0 == NormalizeLongitude(180.0) +/// assert -180.0 == NormalizeLongitude(-180.0) +/// assert -179.0 == NormalizeLongitude(181.0) +/// assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) +/// assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) +/// assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) +/// assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) +/// assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) +/// assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) +/// assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) +/// assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) +/// assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) +/// assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct LatLng { + /// The latitude in degrees. It must be in the range [-90.0, +90.0]. + pub latitude: Option, + /// The longitude in degrees. It must be in the range [-180.0, +180.0]. + pub longitude: Option, +} + +impl Part for LatLng {} + + +/// Write-only registration parameters for beacons using Eddystone-EID format. +/// Two ways of securely registering an Eddystone-EID beacon with the service +/// are supported: +/// +/// 1. Perform an ECDH key exchange via this API, including a previous call +/// to `GET /v1beta1/eidparams`. In this case the fields +/// `beacon_ecdh_public_key` and `service_ecdh_public_key` should be +/// populated and `beacon_identity_key` should not be populated. This +/// method ensures that only the two parties in the ECDH key exchange can +/// compute the identity key, which becomes a secret between them. +/// 2. Derive or obtain the beacon's identity key via other secure means +/// (perhaps an ECDH key exchange between the beacon and a mobile device +/// or any other secure method), and then submit the resulting identity key +/// to the service. In this case `beacon_identity_key` field should be +/// populated, and neither of `beacon_ecdh_public_key` nor +/// `service_ecdh_public_key` fields should be. The security of this method +/// depends on how securely the parties involved (in particular the +/// bluetooth client) handle the identity key, and obviously on how +/// securely the identity key was generated. +/// +/// See [the Eddystone specification](https://github.com/google/eddystone/tree/master/eddystone-eid) at GitHub. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct EphemeralIdRegistration { + /// An initial ephemeral ID calculated using the clock value submitted as + /// `initial_clock_value`, and the secret key generated by the + /// Diffie-Hellman key exchange using `service_ecdh_public_key` and + /// `service_ecdh_public_key`. This initial EID value will be used by the + /// service to confirm that the key exchange process was successful. + #[serde(rename="initialEid")] + pub initial_eid: Option, + /// Indicates the nominal period between each rotation of the beacon's + /// ephemeral ID. "Nominal" because the beacon should randomize the + /// actual interval. See [the spec at github](https://github.com/google/eddystone/tree/master/eddystone-eid) + /// for details. This value corresponds to a power-of-two scaler on the + /// beacon's clock: when the scaler value is K, the beacon will begin + /// broadcasting a new ephemeral ID on average every 2^K seconds. + #[serde(rename="rotationPeriodExponent")] + pub rotation_period_exponent: Option, + /// The beacon's public key used for the Elliptic curve Diffie-Hellman + /// key exchange. When this field is populated, `service_ecdh_public_key` + /// must also be populated, and `beacon_identity_key` must not be. + #[serde(rename="beaconEcdhPublicKey")] + pub beacon_ecdh_public_key: Option, + /// The initial clock value of the beacon. The beacon's clock must have + /// begun counting at this value immediately prior to transmitting this + /// value to the resolving service. Significant delay in transmitting this + /// value to the service risks registration or resolution failures. If a + /// value is not provided, the default is zero. + #[serde(rename="initialClockValue")] + pub initial_clock_value: Option, + /// The service's public key used for the Elliptic curve Diffie-Hellman + /// key exchange. When this field is populated, `beacon_ecdh_public_key` + /// must also be populated, and `beacon_identity_key` must not be. + #[serde(rename="serviceEcdhPublicKey")] + pub service_ecdh_public_key: Option, + /// The private key of the beacon. If this field is populated, + /// `beacon_ecdh_public_key` and `service_ecdh_public_key` must not be + /// populated. + #[serde(rename="beaconIdentityKey")] + pub beacon_identity_key: Option, +} + +impl Part for EphemeralIdRegistration {} + + /// Response to ListNamespacesRequest that contains all the project's namespaces. /// /// # Activities @@ -701,39 +838,79 @@ impl ResponseResult for ListNamespacesResponse {} /// * [attachments delete beacons](struct.BeaconAttachmentDeleteCall.html) (none) /// * [deactivate beacons](struct.BeaconDeactivateCall.html) (none) /// * [register beacons](struct.BeaconRegisterCall.html) (request|response) +/// * [delete beacons](struct.BeaconDeleteCall.html) (none) /// * [diagnostics list beacons](struct.BeaconDiagnosticListCall.html) (none) /// * [attachments batch delete beacons](struct.BeaconAttachmentBatchDeleteCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Beacon { - /// Current status of the beacon. Required. + /// Current status of the beacon. + /// Required. pub status: Option, - /// Free text used to identify and describe the beacon. Maximum length 140 characters. Optional. + /// Free text used to identify and describe the beacon. Maximum length 140 + /// characters. + /// Optional. pub description: Option, - /// The indoor level information for this beacon, if known. As returned by the Google Maps API. Optional. + /// The indoor level information for this beacon, if known. As returned by the + /// Google Maps API. + /// Optional. #[serde(rename="indoorLevel")] pub indoor_level: Option, - /// The location of the beacon, expressed as a latitude and longitude pair. This location is given when the beacon is registered or updated. It does not necessarily indicate the actual current location of the beacon. Optional. + /// The location of the beacon, expressed as a latitude and longitude pair. + /// This location is given when the beacon is registered or updated. It does + /// not necessarily indicate the actual current location of the beacon. + /// Optional. #[serde(rename="latLng")] pub lat_lng: Option, - /// The [Google Places API](/places/place-id) Place ID of the place where the beacon is deployed. This is given when the beacon is registered or updated, not automatically detected in any way. Optional. + /// The [Google Places API](/places/place-id) Place ID of the place where + /// the beacon is deployed. This is given when the beacon is registered or + /// updated, not automatically detected in any way. + /// Optional. #[serde(rename="placeId")] pub place_id: Option, - /// Write-only registration parameters for beacons using Eddystone-EID (remotely resolved ephemeral ID) format. This information will not be populated in API responses. When submitting this data, the `advertised_id` field must contain an ID of type Eddystone-UID. Any other ID type will result in an error. + /// Write-only registration parameters for beacons using Eddystone-EID + /// (remotely resolved ephemeral ID) format. This information will not be + /// populated in API responses. When submitting this data, the `advertised_id` + /// field must contain an ID of type Eddystone-UID. Any other ID type will + /// result in an error. #[serde(rename="ephemeralIdRegistration")] pub ephemeral_id_registration: Option, - /// The identifier of a beacon as advertised by it. This field must be populated when registering. It may be empty when updating a beacon record because it is ignored in updates. When registering a beacon that broadcasts Eddystone-EID, this field should contain a "stable" Eddystone-UID that identifies the beacon and links it to its attachments. The stable Eddystone-UID is only used for administering the beacon. + /// The identifier of a beacon as advertised by it. This field must be + /// populated when registering. It may be empty when updating a beacon + /// record because it is ignored in updates. + /// + /// When registering a beacon that broadcasts Eddystone-EID, this field + /// should contain a "stable" Eddystone-UID that identifies the beacon and + /// links it to its attachments. The stable Eddystone-UID is only used for + /// administering the beacon. #[serde(rename="advertisedId")] pub advertised_id: Option, - /// Resource name of this beacon. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. This field must be left empty when registering. After reading a beacon, clients can use the name for future operations. + /// Resource name of this beacon. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. + /// + /// This field must be left empty when registering. After reading a beacon, + /// clients can use the name for future operations. #[serde(rename="beaconName")] pub beacon_name: Option, - /// Expected location stability. This is set when the beacon is registered or updated, not automatically detected in any way. Optional. + /// Expected location stability. This is set when the beacon is registered or + /// updated, not automatically detected in any way. + /// Optional. #[serde(rename="expectedStability")] pub expected_stability: Option, - /// Properties of the beacon device, for example battery type or firmware version. Optional. + /// Properties of the beacon device, for example battery type or firmware + /// version. + /// Optional. pub properties: Option>, - /// Some beacons may require a user to provide an authorization key before changing any of its configuration (e.g. broadcast frames, transmit power). This field provides a place to store and control access to that key. This field is populated in responses to `GET /v1beta1/beacons/3!beaconId` from users with write access to the given beacon. That is to say: If the user is authorized to write the beacon's confidential data in the service, the service considers them authorized to configure the beacon. Note that this key grants nothing on the service, only on the beacon itself. + /// Some beacons may require a user to provide an authorization key before + /// changing any of its configuration (e.g. broadcast frames, transmit power). + /// This field provides a place to store and control access to that key. + /// This field is populated in responses to `GET /v1beta1/beacons/3!beaconId` + /// from users with write access to the given beacon. That is to say: If the + /// user is authorized to write the beacon's confidential data in the service, + /// the service considers them authorized to configure the beacon. Note + /// that this key grants nothing on the service, only on the beacon itself. #[serde(rename="provisioningKey")] pub provisioning_key: Option, } @@ -743,7 +920,8 @@ impl Resource for Beacon {} impl ResponseResult for Beacon {} -/// Information about the requested beacons, optionally including attachment data. +/// Information about the requested beacons, optionally including attachment +/// data. /// /// # Activities /// @@ -754,43 +932,58 @@ impl ResponseResult for Beacon {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GetInfoForObservedBeaconsResponse { - /// Public information about beacons. May be empty if the request matched no beacons. + /// Public information about beacons. + /// May be empty if the request matched no beacons. pub beacons: Option>, } impl ResponseResult for GetInfoForObservedBeaconsResponse {} -/// Response that contains the requested diagnostics. +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. /// /// # 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*). /// -/// * [diagnostics list beacons](struct.BeaconDiagnosticListCall.html) (response) +/// * [delete beacons](struct.BeaconDeleteCall.html) (response) +/// * [decommission beacons](struct.BeaconDecommissionCall.html) (response) +/// * [attachments delete beacons](struct.BeaconAttachmentDeleteCall.html) (response) +/// * [deactivate beacons](struct.BeaconDeactivateCall.html) (response) +/// * [activate beacons](struct.BeaconActivateCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListDiagnosticsResponse { - /// Token that can be used for pagination. Returned only if the request matches more beacons than can be returned in this response. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The diagnostics matching the given request. - pub diagnostics: Option>, -} +pub struct Empty { _never_set: Option } -impl ResponseResult for ListDiagnosticsResponse {} +impl ResponseResult for Empty {} -/// Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. +/// Represents a whole calendar date, e.g. date of birth. The time of day and +/// time zone are either specified elsewhere or are not significant. The date +/// is relative to the Proleptic Gregorian Calendar. The day may be 0 to +/// represent a year and month where the day is not significant, e.g. credit card +/// expiration date. The year may be 0 to represent a month and day independent +/// of year, e.g. anniversary date. Related types are google.type.TimeOfDay +/// and `google.protobuf.Timestamp`. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Date { - /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year. + /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without + /// a year. pub year: Option, - /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not significant. + /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + /// if specifying a year/month where the day is not significant. pub day: Option, /// Month of year. Must be from 1 to 12. pub month: Option, @@ -846,7 +1039,7 @@ impl ResponseResult for DeleteAttachmentsResponse {} /// ::default(), None); /// let mut hub = Proximitybeacon::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `activate(...)`, `attachments_batch_delete(...)`, `attachments_create(...)`, `attachments_delete(...)`, `attachments_list(...)`, `deactivate(...)`, `decommission(...)`, `diagnostics_list(...)`, `get(...)`, `list(...)`, `register(...)` and `update(...)` +/// // like `activate(...)`, `attachments_batch_delete(...)`, `attachments_create(...)`, `attachments_delete(...)`, `attachments_list(...)`, `deactivate(...)`, `decommission(...)`, `delete(...)`, `diagnostics_list(...)`, `get(...)`, `list(...)`, `register(...)` and `update(...)` /// // to build up your call. /// let rb = hub.beacons(); /// # } @@ -863,11 +1056,27 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns the attachments for the specified beacon that match the specified namespaced-type pattern. To control which namespaced types are returned, you add the `namespacedType` query parameter to the request. You must either use `*/*`, to return all attachments, or the namespace must be one of the ones returned from the `namespaces` endpoint. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Returns the attachments for the specified beacon that match the specified + /// namespaced-type pattern. + /// + /// To control which namespaced types are returned, you add the + /// `namespacedType` query parameter to the request. You must either use + /// `*/*`, to return all attachments, or the namespace must be one of + /// the ones returned from the `namespaces` endpoint. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **viewer**, **Is owner** or **Can edit** + /// permissions in the Google Developers Console project. /// /// # Arguments /// - /// * `beaconName` - Beacon whose attachments should be fetched. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required. + /// * `beaconName` - Beacon whose attachments should be fetched. A beacon name has the + /// format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast + /// by the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. pub fn attachments_list(&self, beacon_name: &str) -> BeaconAttachmentListCall<'a, C, A> { BeaconAttachmentListCall { hub: self.hub, @@ -882,11 +1091,27 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns detailed information about the specified beacon. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. Requests may supply an Eddystone-EID beacon name in the form: `beacons/4!beaconId` where the `beaconId` is the base16 ephemeral ID broadcast by the beacon. The returned `Beacon` object will contain the beacon's stable Eddystone-UID. Clients not authorized to resolve the beacon's ephemeral Eddystone-EID broadcast will receive an error. + /// Returns detailed information about the specified beacon. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **viewer**, **Is owner** or **Can edit** + /// permissions in the Google Developers Console project. + /// + /// Requests may supply an Eddystone-EID beacon name in the form: + /// `beacons/4!beaconId` where the `beaconId` is the base16 ephemeral ID + /// broadcast by the beacon. The returned `Beacon` object will contain the + /// beacon's stable Eddystone-UID. Clients not authorized to resolve the + /// beacon's ephemeral Eddystone-EID broadcast will receive an error. /// /// # Arguments /// - /// * `beaconName` - Resource name of this beacon. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required. + /// * `beaconName` - Resource name of this beacon. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. pub fn get(&self, beacon_name: &str) -> BeaconGetCall<'a, C, A> { BeaconGetCall { hub: self.hub, @@ -900,14 +1125,33 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Associates the given data with the specified beacon. Attachment data must contain two parts: - /// - A namespaced type. - /// - The actual attachment data itself. The namespaced type consists of two parts, the namespace and the type. The namespace must be one of the values returned by the `namespaces` endpoint, while the type can be a string of any characters except for the forward slash (`/`) up to 100 characters in length. Attachment data can be up to 1024 bytes long. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Associates the given data with the specified beacon. Attachment data must + /// contain two parts: + ///
    + ///
  • A namespaced type.
  • + ///
  • The actual attachment data itself.
  • + ///
+ /// The namespaced type consists of two parts, the namespace and the type. + /// The namespace must be one of the values returned by the `namespaces` + /// endpoint, while the type can be a string of any characters except for the + /// forward slash (`/`) up to 100 characters in length. + /// + /// Attachment data can be up to 1024 bytes long. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **Is owner** or **Can edit** permissions in the + /// Google Developers Console project. /// /// # Arguments /// /// * `request` - No description provided. - /// * `beaconName` - Beacon on which the attachment should be created. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required. + /// * `beaconName` - Beacon on which the attachment should be created. A beacon name has the + /// format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast + /// by the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. pub fn attachments_create(&self, request: BeaconAttachment, beacon_name: &str) -> BeaconAttachmentCreateCall<'a, C, A> { BeaconAttachmentCreateCall { hub: self.hub, @@ -922,11 +1166,24 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Decommissions the specified beacon in the service. This beacon will no longer be returned from `beaconinfo.getforobserved`. This operation is permanent -- you will not be able to re-register a beacon with this ID again. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Decommissions the specified beacon in the service. This beacon will no + /// longer be returned from `beaconinfo.getforobserved`. This operation is + /// permanent -- you will not be able to re-register a beacon with this ID + /// again. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **Is owner** or **Can edit** permissions in the + /// Google Developers Console project. /// /// # Arguments /// - /// * `beaconName` - Beacon that should be decommissioned. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID of the beacon's "stable" UID. Required. + /// * `beaconName` - Beacon that should be decommissioned. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID of the beacon's "stable" UID. + /// Required. pub fn decommission(&self, beacon_name: &str) -> BeaconDecommissionCall<'a, C, A> { BeaconDecommissionCall { hub: self.hub, @@ -940,11 +1197,24 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Activates a beacon. A beacon that is active will return information and attachment data when queried via `beaconinfo.getforobserved`. Calling this method on an already active beacon will do nothing (but will return a successful response code). Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Activates a beacon. A beacon that is active will return information + /// and attachment data when queried via `beaconinfo.getforobserved`. + /// Calling this method on an already active beacon will do nothing (but + /// will return a successful response code). + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **Is owner** or **Can edit** permissions in the + /// Google Developers Console project. /// /// # Arguments /// - /// * `beaconName` - Beacon that should be activated. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required. + /// * `beaconName` - Beacon that should be activated. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. pub fn activate(&self, beacon_name: &str) -> BeaconActivateCall<'a, C, A> { BeaconActivateCall { hub: self.hub, @@ -958,7 +1228,13 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Searches the beacon registry for beacons that match the given search criteria. Only those beacons that the client has permission to list will be returned. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Searches the beacon registry for beacons that match the given search + /// criteria. Only those beacons that the client has permission to list + /// will be returned. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **viewer**, **Is owner** or **Can edit** + /// permissions in the Google Developers Console project. pub fn list(&self) -> BeaconListCall<'a, C, A> { BeaconListCall { hub: self.hub, @@ -974,12 +1250,27 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the information about the specified beacon. **Any field that you do not populate in the submitted beacon will be permanently erased**, so you should follow the "read, modify, write" pattern to avoid inadvertently destroying data. Changes to the beacon status via this method will be silently ignored. To update beacon status, use the separate methods on this API for activation, deactivation, and decommissioning. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Updates the information about the specified beacon. **Any field that you do + /// not populate in the submitted beacon will be permanently erased**, so you + /// should follow the "read, modify, write" pattern to avoid inadvertently + /// destroying data. + /// + /// Changes to the beacon status via this method will be silently ignored. + /// To update beacon status, use the separate methods on this API for + /// activation, deactivation, and decommissioning. + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **Is owner** or **Can edit** permissions in the + /// Google Developers Console project. /// /// # Arguments /// /// * `request` - No description provided. - /// * `beaconName` - Resource name of this beacon. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. This field must be left empty when registering. After reading a beacon, clients can use the name for future operations. + /// * `beaconName` - Resource name of this beacon. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. + /// This field must be left empty when registering. After reading a beacon, + /// clients can use the name for future operations. pub fn update(&self, request: Beacon, beacon_name: &str) -> BeaconUpdateCall<'a, C, A> { BeaconUpdateCall { hub: self.hub, @@ -994,11 +1285,24 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified attachment for the given beacon. Each attachment has a unique attachment name (`attachmentName`) which is returned when you fetch the attachment data via this API. You specify this with the delete request to control which attachment is removed. This operation cannot be undone. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Deletes the specified attachment for the given beacon. Each attachment has + /// a unique attachment name (`attachmentName`) which is returned when you + /// fetch the attachment data via this API. You specify this with the delete + /// request to control which attachment is removed. This operation cannot be + /// undone. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **Is owner** or **Can edit** permissions in the + /// Google Developers Console project. /// /// # Arguments /// - /// * `attachmentName` - The attachment name (`attachmentName`) of the attachment to remove. For example: `beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`. For Eddystone-EID beacons, the beacon ID portion (`3!893737abc9`) may be the beacon's current EID, or its "stable" Eddystone-UID. Required. + /// * `attachmentName` - The attachment name (`attachmentName`) of + /// the attachment to remove. For example: + /// `beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`. For + /// Eddystone-EID beacons, the beacon ID portion (`3!893737abc9`) may be the + /// beacon's current EID, or its "stable" Eddystone-UID. + /// Required. pub fn attachments_delete(&self, attachment_name: &str) -> BeaconAttachmentDeleteCall<'a, C, A> { BeaconAttachmentDeleteCall { hub: self.hub, @@ -1012,11 +1316,24 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deactivates a beacon. Once deactivated, the API will not return information nor attachment data for the beacon when queried via `beaconinfo.getforobserved`. Calling this method on an already inactive beacon will do nothing (but will return a successful response code). Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Deactivates a beacon. Once deactivated, the API will not return + /// information nor attachment data for the beacon when queried via + /// `beaconinfo.getforobserved`. Calling this method on an already inactive + /// beacon will do nothing (but will return a successful response code). + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **Is owner** or **Can edit** permissions in the + /// Google Developers Console project. /// /// # Arguments /// - /// * `beaconName` - Beacon that should be deactivated. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required. + /// * `beaconName` - Beacon that should be deactivated. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. pub fn deactivate(&self, beacon_name: &str) -> BeaconDeactivateCall<'a, C, A> { BeaconDeactivateCall { hub: self.hub, @@ -1030,7 +1347,12 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Registers a previously unregistered beacon given its `advertisedId`. These IDs are unique within the system. An ID can be registered only once. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Registers a previously unregistered beacon given its `advertisedId`. + /// These IDs are unique within the system. An ID can be registered only once. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **Is owner** or **Can edit** permissions in the + /// Google Developers Console project. /// /// # Arguments /// @@ -1048,7 +1370,43 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// List the diagnostics for a single beacon. You can also list diagnostics for all the beacons owned by your Google Developers Console project by using the beacon name `beacons/-`. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Deletes the specified beacon including all diagnostics data for the beacon + /// as well as any attachments on the beacon (including those belonging to + /// other projects). This operation cannot be undone. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **Is owner** or **Can edit** permissions in the + /// Google Developers Console project. + /// + /// # Arguments + /// + /// * `beaconName` - Beacon that should be deleted. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. + pub fn delete(&self, beacon_name: &str) -> BeaconDeleteCall<'a, C, A> { + BeaconDeleteCall { + hub: self.hub, + _beacon_name: beacon_name.to_string(), + _project_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// List the diagnostics for a single beacon. You can also list diagnostics for + /// all the beacons owned by your Google Developers Console project by using + /// the beacon name `beacons/-`. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **viewer**, **Is owner** or **Can edit** + /// permissions in the Google Developers Console project. /// /// # Arguments /// @@ -1069,11 +1427,27 @@ impl<'a, C, A> BeaconMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes multiple attachments on a given beacon. This operation is permanent and cannot be undone. You can optionally specify `namespacedType` to choose which attachments should be deleted. If you do not specify `namespacedType`, all your attachments on the given beacon will be deleted. You also may explicitly specify `*/*` to delete all. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Deletes multiple attachments on a given beacon. This operation is + /// permanent and cannot be undone. + /// + /// You can optionally specify `namespacedType` to choose which attachments + /// should be deleted. If you do not specify `namespacedType`, all your + /// attachments on the given beacon will be deleted. You also may explicitly + /// specify `*/*` to delete all. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **Is owner** or **Can edit** permissions in the + /// Google Developers Console project. /// /// # Arguments /// - /// * `beaconName` - The beacon whose attachments should be deleted. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required. + /// * `beaconName` - The beacon whose attachments should be deleted. A beacon name has the + /// format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast + /// by the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. pub fn attachments_batch_delete(&self, beacon_name: &str) -> BeaconAttachmentBatchDeleteCall<'a, C, A> { BeaconAttachmentBatchDeleteCall { hub: self.hub, @@ -1129,7 +1503,10 @@ impl<'a, C, A> BeaconinfoMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Given one or more beacon observations, returns any beacon information and attachments accessible to your application. Authorize by using the [API key](https://developers.google.com/beacons/proximity/how-tos/authorizing#APIKey) for the application. + /// Given one or more beacon observations, returns any beacon information + /// and attachments accessible to your application. Authorize by using the + /// [API key](https://developers.google.com/beacons/proximity/get-started#request_a_browser_api_key) + /// for the application. /// /// # Arguments /// @@ -1186,7 +1563,13 @@ impl<'a, C, A> MethodMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the Proximity Beacon API's current public key and associated parameters used to initiate the Diffie-Hellman key exchange required to register a beacon that broadcasts the Eddystone-EID format. This key changes periodically; clients may cache it and re-use the same public key to provision and register multiple beacons. However, clients should be prepared to refresh this key when they encounter an error registering an Eddystone-EID beacon. + /// Gets the Proximity Beacon API's current public key and associated + /// parameters used to initiate the Diffie-Hellman key exchange required to + /// register a beacon that broadcasts the Eddystone-EID format. This key + /// changes periodically; clients may cache it and re-use the same public key + /// to provision and register multiple beacons. However, clients should be + /// prepared to refresh this key when they encounter an error registering an + /// Eddystone-EID beacon. pub fn get_eidparams(&self) -> MethodGetEidparamCall<'a, C, A> { MethodGetEidparamCall { hub: self.hub, @@ -1239,7 +1622,13 @@ impl<'a, C, A> NamespaceMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists all attachment namespaces owned by your Google Developers Console project. Attachment data associated with a beacon must include a namespaced type, and the namespace must be owned by your project. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. + /// Lists all attachment namespaces owned by your Google Developers Console + /// project. Attachment data associated with a beacon must include a + /// namespaced type, and the namespace must be owned by your project. + /// + /// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) + /// from a signed-in user with **viewer**, **Is owner** or **Can edit** + /// permissions in the Google Developers Console project. pub fn list(&self) -> NamespaceListCall<'a, C, A> { NamespaceListCall { hub: self.hub, @@ -1252,12 +1641,14 @@ impl<'a, C, A> NamespaceMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates the information about the specified namespace. Only the namespace visibility can be updated. + /// Updates the information about the specified namespace. Only the namespace + /// visibility can be updated. /// /// # Arguments /// /// * `request` - No description provided. - /// * `namespaceName` - Resource name of this namespace. Namespaces names have the format: namespaces/namespace. + /// * `namespaceName` - Resource name of this namespace. Namespaces names have the format: + /// namespaces/namespace. pub fn update(&self, request: Namespace, namespace_name: &str) -> NamespaceUpdateCall<'a, C, A> { NamespaceUpdateCall { hub: self.hub, @@ -1279,7 +1670,17 @@ impl<'a, C, A> NamespaceMethods<'a, C, A> { // CallBuilders ### // ################# -/// Returns the attachments for the specified beacon that match the specified namespaced-type pattern. To control which namespaced types are returned, you add the `namespacedType` query parameter to the request. You must either use `*/*`, to return all attachments, or the namespace must be one of the ones returned from the `namespaces` endpoint. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. +/// Returns the attachments for the specified beacon that match the specified +/// namespaced-type pattern. +/// +/// To control which namespaced types are returned, you add the +/// `namespacedType` query parameter to the request. You must either use +/// `*/*`, to return all attachments, or the namespace must be one of +/// the ones returned from the `namespaces` endpoint. +/// +/// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) +/// from a signed-in user with **viewer**, **Is owner** or **Can edit** +/// permissions in the Google Developers Console project. /// /// A builder for the *attachments.list* method supported by a *beacon* resource. /// It is not used directly, but through a `BeaconMethods` instance. @@ -1466,7 +1867,13 @@ impl<'a, C, A> BeaconAttachmentListCall<'a, C, A> where C: BorrowMut BeaconAttachmentListCall<'a, C, A> where C: BorrowMut BeaconAttachmentListCall<'a, C, A> { self._project_id = Some(new_value.to_string()); self } - /// Specifies the namespace and type of attachment to include in response in namespace/type format. Accepts `*/*` to specify "all types in all namespaces". + /// Specifies the namespace and type of attachment to include in response in + /// namespace/type format. Accepts `*/*` to specify + /// "all types in all namespaces". /// /// Sets the *namespaced type* query property to the given value. pub fn namespaced_type(mut self, new_value: &str) -> BeaconAttachmentListCall<'a, C, A> { @@ -1515,12 +1929,12 @@ impl<'a, C, A> BeaconAttachmentListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> BeaconAttachmentListCall<'a, C, A> @@ -1548,7 +1962,17 @@ impl<'a, C, A> BeaconAttachmentListCall<'a, C, A> where C: BorrowMut BeaconGetCall<'a, C, A> where C: BorrowMut, A: oau } - /// Resource name of this beacon. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required. + /// Resource name of this beacon. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. /// /// Sets the *beacon name* path property to the given value. /// @@ -1740,7 +2170,10 @@ impl<'a, C, A> BeaconGetCall<'a, C, A> where C: BorrowMut, A: oau self._beacon_name = new_value.to_string(); self } - /// The project id of the beacon to request. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional. + /// The project id of the beacon to request. If the project id is not specified + /// then the project making the request is used. The project id must match the + /// project that owns the beacon. + /// Optional. /// /// Sets the *project id* query property to the given value. pub fn project_id(mut self, new_value: &str) -> BeaconGetCall<'a, C, A> { @@ -1772,12 +2205,12 @@ impl<'a, C, A> BeaconGetCall<'a, C, A> where C: BorrowMut, A: oau /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> BeaconGetCall<'a, C, A> @@ -1805,9 +2238,22 @@ impl<'a, C, A> BeaconGetCall<'a, C, A> where C: BorrowMut, A: oau } -/// Associates the given data with the specified beacon. Attachment data must contain two parts: -/// - A namespaced type. -/// - The actual attachment data itself. The namespaced type consists of two parts, the namespace and the type. The namespace must be one of the values returned by the `namespaces` endpoint, while the type can be a string of any characters except for the forward slash (`/`) up to 100 characters in length. Attachment data can be up to 1024 bytes long. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. +/// Associates the given data with the specified beacon. Attachment data must +/// contain two parts: +///
    +///
  • A namespaced type.
  • +///
  • The actual attachment data itself.
  • +///
+/// The namespaced type consists of two parts, the namespace and the type. +/// The namespace must be one of the values returned by the `namespaces` +/// endpoint, while the type can be a string of any characters except for the +/// forward slash (`/`) up to 100 characters in length. +/// +/// Attachment data can be up to 1024 bytes long. +/// +/// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) +/// from a signed-in user with **Is owner** or **Can edit** permissions in the +/// Google Developers Console project. /// /// A builder for the *attachments.create* method supported by a *beacon* resource. /// It is not used directly, but through a `BeaconMethods` instance. @@ -2020,7 +2466,13 @@ impl<'a, C, A> BeaconAttachmentCreateCall<'a, C, A> where C: BorrowMut BeaconAttachmentCreateCall<'a, C, A> where C: BorrowMut BeaconAttachmentCreateCall<'a, C, A> { @@ -2062,12 +2517,12 @@ impl<'a, C, A> BeaconAttachmentCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> BeaconAttachmentCreateCall<'a, C, A> @@ -2095,7 +2550,14 @@ impl<'a, C, A> BeaconAttachmentCreateCall<'a, C, A> where C: BorrowMut BeaconDecommissionCall<'a, C, A> where C: BorrowMut BeaconDecommissionCall<'a, C, A> where C: BorrowMut BeaconDecommissionCall<'a, C, A> { @@ -2319,12 +2790,12 @@ impl<'a, C, A> BeaconDecommissionCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> BeaconDecommissionCall<'a, C, A> @@ -2352,7 +2823,14 @@ impl<'a, C, A> BeaconDecommissionCall<'a, C, A> where C: BorrowMut BeaconActivateCall<'a, C, A> where C: BorrowMut, A } - /// Beacon that should be activated. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required. + /// Beacon that should be activated. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. /// /// Sets the *beacon name* path property to the given value. /// @@ -2544,7 +3028,10 @@ impl<'a, C, A> BeaconActivateCall<'a, C, A> where C: BorrowMut, A self._beacon_name = new_value.to_string(); self } - /// The project id of the beacon to activate. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional. + /// The project id of the beacon to activate. If the project id is not + /// specified then the project making the request is used. The project id + /// must match the project that owns the beacon. + /// Optional. /// /// Sets the *project id* query property to the given value. pub fn project_id(mut self, new_value: &str) -> BeaconActivateCall<'a, C, A> { @@ -2576,12 +3063,12 @@ impl<'a, C, A> BeaconActivateCall<'a, C, A> where C: BorrowMut, A /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> BeaconActivateCall<'a, C, A> @@ -2609,7 +3096,13 @@ impl<'a, C, A> BeaconActivateCall<'a, C, A> where C: BorrowMut, A } -/// Searches the beacon registry for beacons that match the given search criteria. Only those beacons that the client has permission to list will be returned. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. +/// Searches the beacon registry for beacons that match the given search +/// criteria. Only those beacons that the client has permission to list +/// will be returned. +/// +/// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) +/// from a signed-in user with **viewer**, **Is owner** or **Can edit** +/// permissions in the Google Developers Console project. /// /// A builder for the *list* method supported by a *beacon* resource. /// It is not used directly, but through a `BeaconMethods` instance. @@ -2779,14 +3272,82 @@ impl<'a, C, A> BeaconListCall<'a, C, A> where C: BorrowMut, A: oa } - /// Filter query string that supports the following field filters: * `description:""` For example: `description:"Room 3"` Returns beacons whose description matches tokens in the string "Room 3" (not necessarily that exact string). The string must be double-quoted. * `status:` For example: `status:active` Returns beacons whose status matches the given value. Values must be one of the Beacon.Status enum values (case insensitive). Accepts multiple filters which will be combined with OR logic. * `stability:` For example: `stability:mobile` Returns beacons whose expected stability matches the given value. Values must be one of the Beacon.Stability enum values (case insensitive). Accepts multiple filters which will be combined with OR logic. * `place_id:""` For example: `place_id:"ChIJVSZzVR8FdkgRXGmmm6SslKw="` Returns beacons explicitly registered at the given place, expressed as a Place ID obtained from [Google Places API](/places/place-id). Does not match places inside the given place. Does not consider the beacon's actual location (which may be different from its registered place). Accepts multiple filters that will be combined with OR logic. The place ID must be double-quoted. * `registration_time[|=]` For example: `registration_time>=1433116800` Returns beacons whose registration time matches the given filter. Supports the operators: , =. Timestamp must be expressed as an integer number of seconds since midnight January 1, 1970 UTC. Accepts at most two filters that will be combined with AND logic, to support "between" semantics. If more than two are supplied, the latter ones are ignored. * `lat: lng: radius:` For example: `lat:51.1232343 lng:-1.093852 radius:1000` Returns beacons whose registered location is within the given circle. When any of these fields are given, all are required. Latitude and longitude must be decimal degrees between -90.0 and 90.0 and between -180.0 and 180.0 respectively. Radius must be an integer number of meters between 10 and 1,000,000 (1000 km). * `property:"="` For example: `property:"battery-type=CR2032"` Returns beacons which have a property of the given name and value. Supports multiple filters which will be combined with OR logic. The entire name=value string must be double-quoted as one string. * `attachment_type:""` For example: `attachment_type:"my-namespace/my-type"` Returns beacons having at least one attachment of the given namespaced type. Supports "any within this namespace" via the partial wildcard syntax: "my-namespace/*". Supports multiple filters which will be combined with OR logic. The string must be double-quoted. Multiple filters on the same field are combined with OR logic (except registration_time which is combined with AND logic). Multiple filters on different fields are combined with AND logic. Filters should be separated by spaces. As with any HTTP query string parameter, the whole filter expression must be URL-encoded. Example REST request: `GET /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000` + /// Filter query string that supports the following field filters: + /// + /// * **description:`""`** + /// For example: **description:"Room 3"** + /// Returns beacons whose description matches tokens in the string "Room 3" + /// (not necessarily that exact string). + /// The string must be double-quoted. + /// * **status:``** + /// For example: **status:active** + /// Returns beacons whose status matches the given value. Values must be + /// one of the Beacon.Status enum values (case insensitive). Accepts + /// multiple filters which will be combined with OR logic. + /// * **stability:``** + /// For example: **stability:mobile** + /// Returns beacons whose expected stability matches the given value. + /// Values must be one of the Beacon.Stability enum values (case + /// insensitive). Accepts multiple filters which will be combined with + /// OR logic. + /// * **place\_id:`""`** + /// For example: **place\_id:"ChIJVSZzVR8FdkgRXGmmm6SslKw="** + /// Returns beacons explicitly registered at the given place, expressed as + /// a Place ID obtained from [Google Places API](/places/place-id). Does not + /// match places inside the given place. Does not consider the beacon's + /// actual location (which may be different from its registered place). + /// Accepts multiple filters that will be combined with OR logic. The place + /// ID must be double-quoted. + /// * **registration\_time`[<|>|<=|>=]`** + /// For example: **registration\_time>=1433116800** + /// Returns beacons whose registration time matches the given filter. + /// Supports the operators: <, >, <=, and >=. Timestamp must be expressed as + /// an integer number of seconds since midnight January 1, 1970 UTC. Accepts + /// at most two filters that will be combined with AND logic, to support + /// "between" semantics. If more than two are supplied, the latter ones are + /// ignored. + /// * **lat:` lng: radius:`** + /// For example: **lat:51.1232343 lng:-1.093852 radius:1000** + /// Returns beacons whose registered location is within the given circle. + /// When any of these fields are given, all are required. Latitude and + /// longitude must be decimal degrees between -90.0 and 90.0 and between + /// -180.0 and 180.0 respectively. Radius must be an integer number of + /// meters between 10 and 1,000,000 (1000 km). + /// * **property:`"="`** + /// For example: **property:"battery-type=CR2032"** + /// Returns beacons which have a property of the given name and value. + /// Supports multiple filters which will be combined with OR logic. + /// The entire name=value string must be double-quoted as one string. + /// * **attachment\_type:`""`** + /// For example: **attachment_type:"my-namespace/my-type"** + /// Returns beacons having at least one attachment of the given namespaced + /// type. Supports "any within this namespace" via the partial wildcard + /// syntax: "my-namespace/*". Supports multiple filters which will be + /// combined with OR logic. The string must be double-quoted. + /// * **indoor\_level:`""`** + /// For example: **indoor\_level:"1"** + /// Returns beacons which are located on the given indoor level. Accepts + /// multiple filters that will be combined with OR logic. + /// + /// Multiple filters on the same field are combined with OR logic (except + /// registration_time which is combined with AND logic). + /// Multiple filters on different fields are combined with AND logic. + /// Filters should be separated by spaces. + /// + /// As with any HTTP query string parameter, the whole filter expression must + /// be URL-encoded. + /// + /// Example REST request: + /// `GET /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000` /// /// Sets the *q* query property to the given value. pub fn q(mut self, new_value: &str) -> BeaconListCall<'a, C, A> { self._q = Some(new_value.to_string()); self } - /// The project id to list beacons under. If not present then the project credential that made the request is used as the project. Optional. + /// The project id to list beacons under. If not present then the project + /// credential that made the request is used as the project. + /// Optional. /// /// Sets the *project id* query property to the given value. pub fn project_id(mut self, new_value: &str) -> BeaconListCall<'a, C, A> { @@ -2800,7 +3361,8 @@ impl<'a, C, A> BeaconListCall<'a, C, A> where C: BorrowMut, A: oa self._page_token = Some(new_value.to_string()); self } - /// The maximum number of records to return for this request, up to a server-defined upper limit. + /// The maximum number of records to return for this request, up to a + /// server-defined upper limit. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> BeaconListCall<'a, C, A> { @@ -2832,12 +3394,12 @@ impl<'a, C, A> BeaconListCall<'a, C, A> where C: BorrowMut, A: oa /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> BeaconListCall<'a, C, A> @@ -2865,7 +3427,17 @@ impl<'a, C, A> BeaconListCall<'a, C, A> where C: BorrowMut, A: oa } -/// Updates the information about the specified beacon. **Any field that you do not populate in the submitted beacon will be permanently erased**, so you should follow the "read, modify, write" pattern to avoid inadvertently destroying data. Changes to the beacon status via this method will be silently ignored. To update beacon status, use the separate methods on this API for activation, deactivation, and decommissioning. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. +/// Updates the information about the specified beacon. **Any field that you do +/// not populate in the submitted beacon will be permanently erased**, so you +/// should follow the "read, modify, write" pattern to avoid inadvertently +/// destroying data. +/// +/// Changes to the beacon status via this method will be silently ignored. +/// To update beacon status, use the separate methods on this API for +/// activation, deactivation, and decommissioning. +/// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) +/// from a signed-in user with **Is owner** or **Can edit** permissions in the +/// Google Developers Console project. /// /// A builder for the *update* method supported by a *beacon* resource. /// It is not used directly, but through a `BeaconMethods` instance. @@ -3078,7 +3650,13 @@ impl<'a, C, A> BeaconUpdateCall<'a, C, A> where C: BorrowMut, A: self._request = new_value; self } - /// Resource name of this beacon. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. This field must be left empty when registering. After reading a beacon, clients can use the name for future operations. + /// Resource name of this beacon. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. + /// + /// This field must be left empty when registering. After reading a beacon, + /// clients can use the name for future operations. /// /// Sets the *beacon name* path property to the given value. /// @@ -3088,7 +3666,10 @@ impl<'a, C, A> BeaconUpdateCall<'a, C, A> where C: BorrowMut, A: self._beacon_name = new_value.to_string(); self } - /// The project id of the beacon to update. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional. + /// The project id of the beacon to update. If the project id is not + /// specified then the project making the request is used. The project id + /// must match the project that owns the beacon. + /// Optional. /// /// Sets the *project id* query property to the given value. pub fn project_id(mut self, new_value: &str) -> BeaconUpdateCall<'a, C, A> { @@ -3120,12 +3701,12 @@ impl<'a, C, A> BeaconUpdateCall<'a, C, A> where C: BorrowMut, A: /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> BeaconUpdateCall<'a, C, A> @@ -3153,7 +3734,15 @@ impl<'a, C, A> BeaconUpdateCall<'a, C, A> where C: BorrowMut, A: } -/// Deletes the specified attachment for the given beacon. Each attachment has a unique attachment name (`attachmentName`) which is returned when you fetch the attachment data via this API. You specify this with the delete request to control which attachment is removed. This operation cannot be undone. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. +/// Deletes the specified attachment for the given beacon. Each attachment has +/// a unique attachment name (`attachmentName`) which is returned when you +/// fetch the attachment data via this API. You specify this with the delete +/// request to control which attachment is removed. This operation cannot be +/// undone. +/// +/// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) +/// from a signed-in user with **Is owner** or **Can edit** permissions in the +/// Google Developers Console project. /// /// A builder for the *attachments.delete* method supported by a *beacon* resource. /// It is not used directly, but through a `BeaconMethods` instance. @@ -3335,7 +3924,12 @@ impl<'a, C, A> BeaconAttachmentDeleteCall<'a, C, A> where C: BorrowMut BeaconAttachmentDeleteCall<'a, C, A> where C: BorrowMut BeaconAttachmentDeleteCall<'a, C, A> { @@ -3377,12 +3973,12 @@ impl<'a, C, A> BeaconAttachmentDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> BeaconAttachmentDeleteCall<'a, C, A> @@ -3410,7 +4006,14 @@ impl<'a, C, A> BeaconAttachmentDeleteCall<'a, C, A> where C: BorrowMut BeaconDeactivateCall<'a, C, A> where C: BorrowMut, } - /// Beacon that should be deactivated. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required. + /// Beacon that should be deactivated. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. /// /// Sets the *beacon name* path property to the given value. /// @@ -3602,7 +4211,10 @@ impl<'a, C, A> BeaconDeactivateCall<'a, C, A> where C: BorrowMut, self._beacon_name = new_value.to_string(); self } - /// The project id of the beacon to deactivate. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional. + /// The project id of the beacon to deactivate. If the project id is not + /// specified then the project making the request is used. The project id must + /// match the project that owns the beacon. + /// Optional. /// /// Sets the *project id* query property to the given value. pub fn project_id(mut self, new_value: &str) -> BeaconDeactivateCall<'a, C, A> { @@ -3634,12 +4246,12 @@ impl<'a, C, A> BeaconDeactivateCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> BeaconDeactivateCall<'a, C, A> @@ -3667,7 +4279,12 @@ impl<'a, C, A> BeaconDeactivateCall<'a, C, A> where C: BorrowMut, } -/// Registers a previously unregistered beacon given its `advertisedId`. These IDs are unique within the system. An ID can be registered only once. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **Is owner** or **Can edit** permissions in the Google Developers Console project. +/// Registers a previously unregistered beacon given its `advertisedId`. +/// These IDs are unique within the system. An ID can be registered only once. +/// +/// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) +/// from a signed-in user with **Is owner** or **Can edit** permissions in the +/// Google Developers Console project. /// /// A builder for the *register* method supported by a *beacon* resource. /// It is not used directly, but through a `BeaconMethods` instance. @@ -3853,7 +4470,10 @@ impl<'a, C, A> BeaconRegisterCall<'a, C, A> where C: BorrowMut, A self._request = new_value; self } - /// The project id of the project the beacon will be registered to. If the project id is not specified then the project making the request is used. Optional. + /// The project id of the project the beacon will be registered to. If + /// the project id is not specified then the project making the request + /// is used. + /// Optional. /// /// Sets the *project id* query property to the given value. pub fn project_id(mut self, new_value: &str) -> BeaconRegisterCall<'a, C, A> { @@ -3885,12 +4505,12 @@ impl<'a, C, A> BeaconRegisterCall<'a, C, A> where C: BorrowMut, A /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> BeaconRegisterCall<'a, C, A> @@ -3918,7 +4538,284 @@ impl<'a, C, A> BeaconRegisterCall<'a, C, A> where C: BorrowMut, A } -/// List the diagnostics for a single beacon. You can also list diagnostics for all the beacons owned by your Google Developers Console project by using the beacon name `beacons/-`. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. +/// Deletes the specified beacon including all diagnostics data for the beacon +/// as well as any attachments on the beacon (including those belonging to +/// other projects). This operation cannot be undone. +/// +/// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) +/// from a signed-in user with **Is owner** or **Can edit** permissions in the +/// Google Developers Console project. +/// +/// A builder for the *delete* method supported by a *beacon* resource. +/// It is not used directly, but through a `BeaconMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_proximitybeacon1_beta1 as proximitybeacon1_beta1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use proximitybeacon1_beta1::Proximitybeacon; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Proximitybeacon::new(hyper::Client::new(), 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.beacons().delete("beaconName") +/// .project_id("elitr") +/// .doit(); +/// # } +/// ``` +pub struct BeaconDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Proximitybeacon, + _beacon_name: String, + _project_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for BeaconDeleteCall<'a, C, A> {} + +impl<'a, C, A> BeaconDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "proximitybeacon.beacons.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("beaconName", self._beacon_name.to_string())); + if let Some(value) = self._project_id { + params.push(("projectId", value.to_string())); + } + for &field in ["alt", "beaconName", "projectId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://proximitybeacon.googleapis.com/v1beta1/{+beaconName}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+beaconName}", "beaconName")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["beaconName"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Beacon that should be deleted. A beacon name has the format + /// "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + /// the beacon and N is a code for the beacon's type. Possible values are + /// `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + /// for AltBeacon. For Eddystone-EID beacons, you may use either the + /// current EID or the beacon's "stable" UID. + /// Required. + /// + /// Sets the *beacon 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 beacon_name(mut self, new_value: &str) -> BeaconDeleteCall<'a, C, A> { + self._beacon_name = new_value.to_string(); + self + } + /// The project id of the beacon to delete. If not provided, the project + /// that is making the request is used. + /// Optional. + /// + /// Sets the *project id* query property to the given value. + pub fn project_id(mut self, new_value: &str) -> BeaconDeleteCall<'a, C, A> { + self._project_id = 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. + /// + /// 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 Delegate) -> BeaconDeleteCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> BeaconDeleteCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::UserlocationBeaconRegistry`. + /// + /// 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: T) -> BeaconDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// List the diagnostics for a single beacon. You can also list diagnostics for +/// all the beacons owned by your Google Developers Console project by using +/// the beacon name `beacons/-`. +/// +/// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) +/// from a signed-in user with **viewer**, **Is owner** or **Can edit** +/// permissions in the Google Developers Console project. /// /// A builder for the *diagnostics.list* method supported by a *beacon* resource. /// It is not used directly, but through a `BeaconMethods` instance. @@ -3945,10 +4842,10 @@ impl<'a, C, A> BeaconRegisterCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.beacons().diagnostics_list("beaconName") -/// .project_id("elitr") -/// .page_token("amet") -/// .page_size(-60) -/// .alert_filter("labore") +/// .project_id("no") +/// .page_token("labore") +/// .page_size(-39) +/// .alert_filter("dolore") /// .doit(); /// # } /// ``` @@ -4125,28 +5022,33 @@ impl<'a, C, A> BeaconDiagnosticListCall<'a, C, A> where C: BorrowMut BeaconDiagnosticListCall<'a, C, A> { self._project_id = Some(new_value.to_string()); self } - /// Requests results that occur after the `page_token`, obtained from the response to a previous request. Optional. + /// Requests results that occur after the `page_token`, obtained from the + /// response to a previous request. Optional. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> BeaconDiagnosticListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Specifies the maximum number of results to return. Defaults to 10. Maximum 1000. Optional. + /// Specifies the maximum number of results to return. Defaults to + /// 10. Maximum 1000. Optional. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> BeaconDiagnosticListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// Requests only beacons that have the given alert. For example, to find beacons that have low batteries use `alert_filter=LOW_BATTERY`. + /// Requests only beacons that have the given alert. For example, to find + /// beacons that have low batteries use `alert_filter=LOW_BATTERY`. /// /// Sets the *alert filter* query property to the given value. pub fn alert_filter(mut self, new_value: &str) -> BeaconDiagnosticListCall<'a, C, A> { @@ -4178,12 +5080,12 @@ impl<'a, C, A> BeaconDiagnosticListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> BeaconDiagnosticListCall<'a, C, A> @@ -4211,7 +5113,17 @@ impl<'a, C, A> BeaconDiagnosticListCall<'a, C, A> where C: BorrowMut BeaconDiagnosticListCall<'a, C, A> where C: BorrowMut BeaconAttachmentBatchDeleteCall<'a, C, A> where C: BorrowMut BeaconAttachmentBatchDeleteCall<'a, C, A> where C: BorrowMut BeaconAttachmentBatchDeleteCall<'a, C, A> { self._project_id = Some(new_value.to_string()); self } - /// Specifies the namespace and type of attachments to delete in `namespace/type` format. Accepts `*/*` to specify "all types in all namespaces". Optional. + /// Specifies the namespace and type of attachments to delete in + /// `namespace/type` format. Accepts `*/*` to specify + /// "all types in all namespaces". + /// Optional. /// /// Sets the *namespaced type* query property to the given value. pub fn namespaced_type(mut self, new_value: &str) -> BeaconAttachmentBatchDeleteCall<'a, C, A> { @@ -4447,12 +5373,12 @@ impl<'a, C, A> BeaconAttachmentBatchDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> BeaconAttachmentBatchDeleteCall<'a, C, A> @@ -4480,7 +5406,10 @@ impl<'a, C, A> BeaconAttachmentBatchDeleteCall<'a, C, A> where C: BorrowMut BeaconinfoGetforobservedCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> BeaconinfoGetforobservedCall<'a, C, A> @@ -4697,7 +5626,13 @@ impl<'a, C, A> BeaconinfoGetforobservedCall<'a, C, A> where C: BorrowMut MethodGetEidparamCall<'a, C, A> where C: BorrowMut /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> MethodGetEidparamCall<'a, C, A> @@ -4905,7 +5840,13 @@ impl<'a, C, A> MethodGetEidparamCall<'a, C, A> where C: BorrowMut } -/// Lists all attachment namespaces owned by your Google Developers Console project. Attachment data associated with a beacon must include a namespaced type, and the namespace must be owned by your project. Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) from a signed-in user with **viewer**, **Is owner** or **Can edit** permissions in the Google Developers Console project. +/// Lists all attachment namespaces owned by your Google Developers Console +/// project. Attachment data associated with a beacon must include a +/// namespaced type, and the namespace must be owned by your project. +/// +/// Authenticate using an [OAuth access token](https://developers.google.com/identity/protocols/OAuth2) +/// from a signed-in user with **viewer**, **Is owner** or **Can edit** +/// permissions in the Google Developers Console project. /// /// A builder for the *list* method supported by a *namespace* resource. /// It is not used directly, but through a `NamespaceMethods` instance. @@ -4932,7 +5873,7 @@ impl<'a, C, A> MethodGetEidparamCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.namespaces().list() -/// .project_id("aliquyam") +/// .project_id("Lorem") /// .doit(); /// # } /// ``` @@ -5060,7 +6001,8 @@ impl<'a, C, A> NamespaceListCall<'a, C, A> where C: BorrowMut, A: } - /// The project id to list namespaces under. Optional. + /// The project id to list namespaces under. + /// Optional. /// /// Sets the *project id* query property to the given value. pub fn project_id(mut self, new_value: &str) -> NamespaceListCall<'a, C, A> { @@ -5092,12 +6034,12 @@ impl<'a, C, A> NamespaceListCall<'a, C, A> where C: BorrowMut, A: /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> NamespaceListCall<'a, C, A> @@ -5125,7 +6067,8 @@ impl<'a, C, A> NamespaceListCall<'a, C, A> where C: BorrowMut, A: } -/// Updates the information about the specified namespace. Only the namespace visibility can be updated. +/// Updates the information about the specified namespace. Only the namespace +/// visibility can be updated. /// /// A builder for the *update* method supported by a *namespace* resource. /// It is not used directly, but through a `NamespaceMethods` instance. @@ -5158,7 +6101,7 @@ impl<'a, C, A> NamespaceListCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.namespaces().update(req, "namespaceName") -/// .project_id("Lorem") +/// .project_id("et") /// .doit(); /// # } /// ``` @@ -5338,7 +6281,8 @@ impl<'a, C, A> NamespaceUpdateCall<'a, C, A> where C: BorrowMut, self._request = new_value; self } - /// Resource name of this namespace. Namespaces names have the format: namespaces/namespace. + /// Resource name of this namespace. Namespaces names have the format: + /// namespaces/namespace. /// /// Sets the *namespace name* path property to the given value. /// @@ -5348,7 +6292,10 @@ impl<'a, C, A> NamespaceUpdateCall<'a, C, A> where C: BorrowMut, self._namespace_name = new_value.to_string(); self } - /// The project id of the namespace to update. If the project id is not specified then the project making the request is used. The project id must match the project that owns the beacon. Optional. + /// The project id of the namespace to update. If the project id is not + /// specified then the project making the request is used. The project id + /// must match the project that owns the beacon. + /// Optional. /// /// Sets the *project id* query property to the given value. pub fn project_id(mut self, new_value: &str) -> NamespaceUpdateCall<'a, C, A> { @@ -5380,12 +6327,12 @@ impl<'a, C, A> NamespaceUpdateCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> NamespaceUpdateCall<'a, C, A> diff --git a/gen/pubsub1-cli/Cargo.toml b/gen/pubsub1-cli/Cargo.toml index 799e524048..c97d86474a 100644 --- a/gen/pubsub1-cli/Cargo.toml +++ b/gen/pubsub1-cli/Cargo.toml @@ -4,9 +4,9 @@ [package] name = "google-pubsub1-cli" -version = "1.0.4+20161122" +version = "1.0.4+20170502" authors = ["Sebastian Thiel "] -description = "A complete library to interact with pubsub (protocol v1)" +description = "A complete library to interact with Pubsub (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1-cli" homepage = "https://cloud.google.com/pubsub/docs" documentation = "http://byron.github.io/google-apis-rs/google_pubsub1_cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-pubsub1] path = "../pubsub1" -version = "1.0.4+20161122" +version = "1.0.4+20170502" diff --git a/gen/pubsub1-cli/README.md b/gen/pubsub1-cli/README.md index 7fb3214b68..883086c05e 100644 --- a/gen/pubsub1-cli/README.md +++ b/gen/pubsub1-cli/README.md @@ -3,14 +3,14 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/cli/README.md.mako' DO NOT EDIT ! --> -The `pubsub1` command-line interface *(CLI)* allows to use most features of the *Google pubsub* service from the comfort of your terminal. +The `pubsub1` command-line interface *(CLI)* allows to use most features of the *Google Pubsub* 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 *pubsub* API can be found at the +Everything else about the *Pubsub* API can be found at the [official documentation site](https://cloud.google.com/pubsub/docs). # Installation and Source Code @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *pubsub* API at revision *20161122*. The CLI is at version *1.0.4*. +This documentation was generated from the *Pubsub* API at revision *20170502*. The CLI is at version *1.0.4*. ```bash pubsub1 [options] diff --git a/gen/pubsub1-cli/mkdocs.yml b/gen/pubsub1-cli/mkdocs.yml index d266bdd505..5bbf03c4c8 100644 --- a/gen/pubsub1-cli/mkdocs.yml +++ b/gen/pubsub1-cli/mkdocs.yml @@ -1,6 +1,6 @@ -site_name: pubsub v1.0.4+20161122 +site_name: Pubsub v1.0.4+20170502 site_url: http://byron.github.io/google-apis-rs/google-pubsub1-cli -site_description: A complete library to interact with pubsub (protocol v1) +site_description: A complete library to interact with Pubsub (protocol v1) repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1-cli diff --git a/gen/pubsub1-cli/src/main.rs b/gen/pubsub1-cli/src/main.rs index d4a78eed6e..29916a2ee3 100644 --- a/gen/pubsub1-cli/src/main.rs +++ b/gen/pubsub1-cli/src/main.rs @@ -1879,8 +1879,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1904,8 +1903,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being specified. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1928,14 +1926,19 @@ fn main() { Some(false)), ]), ("snapshots-test-iam-permissions", - Some(r##"Returns permissions that a caller has on the specified resource."##), + Some(r##"Returns permissions that a caller has on the specified resource. + If the resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building permission-aware + UIs and command-line tools, not for authorization checking. This operation + may "fail open" without warning."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_snapshots-test-iam-permissions", vec![ (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy detail is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2093,8 +2096,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2240,8 +2242,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being specified. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2264,14 +2265,19 @@ fn main() { Some(false)), ]), ("subscriptions-test-iam-permissions", - Some(r##"Returns permissions that a caller has on the specified resource."##), + Some(r##"Returns permissions that a caller has on the specified resource. + If the resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building permission-aware + UIs and command-line tools, not for authorization checking. This operation + may "fail open" without warning."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-test-iam-permissions", vec![ (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy detail is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2385,8 +2391,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2464,8 +2469,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being specified. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2511,14 +2515,19 @@ fn main() { Some(false)), ]), ("topics-test-iam-permissions", - Some(r##"Returns permissions that a caller has on the specified resource."##), + Some(r##"Returns permissions that a caller has on the specified resource. + If the resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building permission-aware + UIs and command-line tools, not for authorization checking. This operation + may "fail open" without warning."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_topics-test-iam-permissions", vec![ (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy detail is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2546,7 +2555,7 @@ fn main() { let mut app = App::new("pubsub1") .author("Sebastian Thiel ") - .version("1.0.4+20161122") + .version("1.0.4+20170502") .about("Provides reliable, many-to-many, asynchronous messaging between applications. ") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_pubsub1_cli") diff --git a/gen/pubsub1/Cargo.toml b/gen/pubsub1/Cargo.toml index 04a00dc4e1..2dba53ffd0 100644 --- a/gen/pubsub1/Cargo.toml +++ b/gen/pubsub1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-pubsub1" -version = "1.0.4+20161122" +version = "1.0.4+20170502" authors = ["Sebastian Thiel "] -description = "A complete library to interact with pubsub (protocol v1)" +description = "A complete library to interact with Pubsub (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1" homepage = "https://cloud.google.com/pubsub/docs" -documentation = "https://docs.rs/google-pubsub1/1.0.4+20161122" +documentation = "https://docs.rs/google-pubsub1/1.0.4+20170502" license = "MIT" keywords = ["pubsub", "google", "protocol", "web", "api"] diff --git a/gen/pubsub1/README.md b/gen/pubsub1/README.md index c0c50de48d..36218ab8db 100644 --- a/gen/pubsub1/README.md +++ b/gen/pubsub1/README.md @@ -3,18 +3,18 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/api/README.md.mako' DO NOT EDIT ! --> -The `google-pubsub1` library allows access to all features of the *Google pubsub* service. +The `google-pubsub1` library allows access to all features of the *Google Pubsub* service. -This documentation was generated from *pubsub* crate version *1.0.4+20161122*, where *20161122* is the exact revision of the *pubsub:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Pubsub* crate version *1.0.4+20170502*, where *20170502* is the exact revision of the *pubsub:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. -Everything else about the *pubsub* *v1* API can be found at the +Everything else about the *Pubsub* *v1* API can be found at the [official documentation site](https://cloud.google.com/pubsub/docs). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.Pubsub.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.Pubsub.html) ... * projects - * [*snapshots get iam policy*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSnapshotGetIamPolicyCall.html), [*snapshots set iam policy*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSnapshotSetIamPolicyCall.html), [*snapshots test iam permissions*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSnapshotTestIamPermissionCall.html), [*subscriptions acknowledge*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionAcknowledgeCall.html), [*subscriptions create*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionCreateCall.html), [*subscriptions delete*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionDeleteCall.html), [*subscriptions get*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionGetCall.html), [*subscriptions get iam policy*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionGetIamPolicyCall.html), [*subscriptions list*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionListCall.html), [*subscriptions modify ack deadline*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionModifyAckDeadlineCall.html), [*subscriptions modify push config*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionModifyPushConfigCall.html), [*subscriptions pull*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionPullCall.html), [*subscriptions set iam policy*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionSetIamPolicyCall.html), [*subscriptions test iam permissions*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectSubscriptionTestIamPermissionCall.html), [*topics create*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectTopicCreateCall.html), [*topics delete*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectTopicDeleteCall.html), [*topics get*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectTopicGetCall.html), [*topics get iam policy*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectTopicGetIamPolicyCall.html), [*topics list*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectTopicListCall.html), [*topics publish*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectTopicPublishCall.html), [*topics set iam policy*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectTopicSetIamPolicyCall.html), [*topics subscriptions list*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectTopicSubscriptionListCall.html) and [*topics test iam permissions*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.ProjectTopicTestIamPermissionCall.html) + * [*snapshots get iam policy*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSnapshotGetIamPolicyCall.html), [*snapshots set iam policy*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSnapshotSetIamPolicyCall.html), [*snapshots test iam permissions*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSnapshotTestIamPermissionCall.html), [*subscriptions acknowledge*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionAcknowledgeCall.html), [*subscriptions create*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionCreateCall.html), [*subscriptions delete*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionDeleteCall.html), [*subscriptions get*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionGetCall.html), [*subscriptions get iam policy*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionGetIamPolicyCall.html), [*subscriptions list*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionListCall.html), [*subscriptions modify ack deadline*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionModifyAckDeadlineCall.html), [*subscriptions modify push config*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionModifyPushConfigCall.html), [*subscriptions pull*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionPullCall.html), [*subscriptions set iam policy*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionSetIamPolicyCall.html), [*subscriptions test iam permissions*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectSubscriptionTestIamPermissionCall.html), [*topics create*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectTopicCreateCall.html), [*topics delete*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectTopicDeleteCall.html), [*topics get*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectTopicGetCall.html), [*topics get iam policy*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectTopicGetIamPolicyCall.html), [*topics list*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectTopicListCall.html), [*topics publish*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectTopicPublishCall.html), [*topics set iam policy*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectTopicSetIamPolicyCall.html), [*topics subscriptions list*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectTopicSubscriptionListCall.html) and [*topics test iam permissions*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.ProjectTopicTestIamPermissionCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/struct.Pubsub.html)** +* **[Hub](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/struct.Pubsub.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.Part.html)** + * **[Parts](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -126,17 +126,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.Delegate.html), 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-pubsub1/1.0.4+20161122/google_pubsub1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.ResponseResult.html), 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")`. @@ -146,29 +146,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.CallBuilder.html) 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-pubsub1/1.0.4+20161122/google_pubsub1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-pubsub1/1.0.4+20161122/google_pubsub1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.CallBuilder.html), 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-pubsub1/1.0.4+20161122/google_pubsub1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-pubsub1/1.0.4+20170502/google_pubsub1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/pubsub1/src/lib.rs b/gen/pubsub1/src/lib.rs index e8bad9c3bb..891ca52054 100644 --- a/gen/pubsub1/src/lib.rs +++ b/gen/pubsub1/src/lib.rs @@ -2,9 +2,9 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *pubsub* crate version *1.0.4+20161122*, where *20161122* is the exact revision of the *pubsub:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Pubsub* crate version *1.0.4+20170502*, where *20170502* is the exact revision of the *pubsub:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! -//! Everything else about the *pubsub* *v1* API can be found at the +//! Everything else about the *Pubsub* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/pubsub/docs). //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1). //! # Features @@ -467,10 +467,12 @@ impl RequestValue for AcknowledgeRequest {} #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ModifyAckDeadlineRequest { /// The new ack deadline with respect to the time this request was sent to - /// the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new + /// the Pub/Sub system. For example, if the value is 10, the new /// ack deadline will expire 10 seconds after the `ModifyAckDeadline` call /// was made. Specifying zero may immediately make the message available for /// another pull request. + /// The minimum deadline you can specify is 0 seconds. + /// The maximum deadline you can specify is 600 seconds (10 minutes). #[serde(rename="ackDeadlineSeconds")] pub ack_deadline_seconds: Option, /// List of acknowledgment IDs. @@ -695,11 +697,12 @@ impl ResponseResult for TestIamPermissionsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PullRequest { - /// If this is specified as true the system will respond immediately even if - /// it is not able to return a message in the `Pull` response. Otherwise the - /// system is allowed to wait until at least one message is available rather - /// than returning no messages. The client may cancel the request if it does - /// not wish to wait any longer for the response. + /// If this field set to true, the system will respond immediately even if + /// it there are no messages available to return in the `Pull` response. + /// Otherwise, the system may wait (for a bounded amount of time) until at + /// least one message is available, rather than returning no messages. The + /// client may cancel the request if it does not wish to wait any longer for + /// the response. #[serde(rename="returnImmediately")] pub return_immediately: Option, /// The maximum number of messages returned for this request. The Pub/Sub @@ -723,11 +726,10 @@ pub struct PushConfig { /// control different aspects of the message delivery. /// /// The currently supported attribute is `x-goog-version`, which you can - /// use to change the format of the push message. This attribute + /// use to change the format of the pushed message. This attribute /// indicates the version of the data expected by the endpoint. This - /// controls the shape of the envelope (i.e. its fields and metadata). - /// The endpoint version is based on the version of the Pub/Sub - /// API. + /// controls the shape of the pushed message (i.e., its fields and metadata). + /// The endpoint version is based on the version of the Pub/Sub API. /// /// If not present during the `CreateSubscription` call, it will default to /// the version of the API used to make such call. If not present during a @@ -1029,13 +1031,18 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// /// Returns permissions that a caller has on the specified resource. + /// If the resource does not exist, this will return an empty set of + /// permissions, not a NOT_FOUND error. + /// + /// Note: This operation is designed to be used for building permission-aware + /// UIs and command-line tools, not for authorization checking. This operation + /// may "fail open" without warning. /// /// # Arguments /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn topics_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectTopicTestIamPermissionCall<'a, C, A> { ProjectTopicTestIamPermissionCall { hub: self.hub, @@ -1050,13 +1057,18 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// /// Returns permissions that a caller has on the specified resource. + /// If the resource does not exist, this will return an empty set of + /// permissions, not a NOT_FOUND error. + /// + /// Note: This operation is designed to be used for building permission-aware + /// UIs and command-line tools, not for authorization checking. This operation + /// may "fail open" without warning. /// /// # Arguments /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn subscriptions_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> { ProjectSubscriptionTestIamPermissionCall { hub: self.hub, @@ -1071,13 +1083,18 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// /// Returns permissions that a caller has on the specified resource. + /// If the resource does not exist, this will return an empty set of + /// permissions, not a NOT_FOUND error. + /// + /// Note: This operation is designed to be used for building permission-aware + /// UIs and command-line tools, not for authorization checking. This operation + /// may "fail open" without warning. /// /// # Arguments /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn snapshots_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectSnapshotTestIamPermissionCall<'a, C, A> { ProjectSnapshotTestIamPermissionCall { hub: self.hub, @@ -1146,8 +1163,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `resource` - REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn snapshots_get_iam_policy(&self, resource: &str) -> ProjectSnapshotGetIamPolicyCall<'a, C, A> { ProjectSnapshotGetIamPolicyCall { hub: self.hub, @@ -1191,8 +1207,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `resource` - REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn topics_get_iam_policy(&self, resource: &str) -> ProjectTopicGetIamPolicyCall<'a, C, A> { ProjectTopicGetIamPolicyCall { hub: self.hub, @@ -1260,8 +1275,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `resource` - REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn subscriptions_get_iam_policy(&self, resource: &str) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> { ProjectSubscriptionGetIamPolicyCall { hub: self.hub, @@ -1341,8 +1355,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn topics_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectTopicSetIamPolicyCall<'a, C, A> { ProjectTopicSetIamPolicyCall { hub: self.hub, @@ -1418,8 +1431,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn snapshots_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectSnapshotSetIamPolicyCall<'a, C, A> { ProjectSnapshotSetIamPolicyCall { hub: self.hub, @@ -1478,8 +1490,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn subscriptions_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> { ProjectSubscriptionSetIamPolicyCall { hub: self.hub, @@ -2054,6 +2065,12 @@ impl<'a, C, A> ProjectTopicCreateCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro self } /// REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// @@ -2610,6 +2631,12 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro /// Returns permissions that a caller has on the specified resource. +/// If the resource does not exist, this will return an empty set of +/// permissions, not a NOT_FOUND error. +/// +/// Note: This operation is designed to be used for building permission-aware +/// UIs and command-line tools, not for authorization checking. This operation +/// may "fail open" without warning. /// /// A builder for the *snapshots.testIamPermissions* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -2818,8 +2845,7 @@ impl<'a, C, A> ProjectSnapshotTestIamPermissionCall<'a, C, A> where C: BorrowMut self } /// REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// @@ -3629,8 +3655,7 @@ impl<'a, C, A> ProjectSnapshotGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< /// REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// @@ -6017,8 +6040,7 @@ impl<'a, C, A> ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSnapshotSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< self } /// REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// diff --git a/gen/pubsub1_beta2-cli/Cargo.toml b/gen/pubsub1_beta2-cli/Cargo.toml index a593308047..15712d90eb 100644 --- a/gen/pubsub1_beta2-cli/Cargo.toml +++ b/gen/pubsub1_beta2-cli/Cargo.toml @@ -4,9 +4,9 @@ [package] name = "google-pubsub1_beta2-cli" -version = "1.0.4+20161122" +version = "1.0.4+20170502" authors = ["Sebastian Thiel "] -description = "A complete library to interact with pubsub (protocol v1beta2)" +description = "A complete library to interact with Pubsub (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1_beta2-cli" homepage = "https://cloud.google.com/pubsub/docs" documentation = "http://byron.github.io/google-apis-rs/google_pubsub1_beta2_cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-pubsub1_beta2] path = "../pubsub1_beta2" -version = "1.0.4+20161122" +version = "1.0.4+20170502" diff --git a/gen/pubsub1_beta2-cli/README.md b/gen/pubsub1_beta2-cli/README.md index 517f81d8fd..6362a64132 100644 --- a/gen/pubsub1_beta2-cli/README.md +++ b/gen/pubsub1_beta2-cli/README.md @@ -3,14 +3,14 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/cli/README.md.mako' DO NOT EDIT ! --> -The `pubsub1-beta2` command-line interface *(CLI)* allows to use most features of the *Google pubsub* service from the comfort of your terminal. +The `pubsub1-beta2` command-line interface *(CLI)* allows to use most features of the *Google Pubsub* 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 *pubsub* API can be found at the +Everything else about the *Pubsub* API can be found at the [official documentation site](https://cloud.google.com/pubsub/docs). # Installation and Source Code @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *pubsub* API at revision *20161122*. The CLI is at version *1.0.4*. +This documentation was generated from the *Pubsub* API at revision *20170502*. The CLI is at version *1.0.4*. ```bash pubsub1-beta2 [options] diff --git a/gen/pubsub1_beta2-cli/mkdocs.yml b/gen/pubsub1_beta2-cli/mkdocs.yml index 17e773844a..8d7ea150b5 100644 --- a/gen/pubsub1_beta2-cli/mkdocs.yml +++ b/gen/pubsub1_beta2-cli/mkdocs.yml @@ -1,6 +1,6 @@ -site_name: pubsub v1.0.4+20161122 +site_name: Pubsub v1.0.4+20170502 site_url: http://byron.github.io/google-apis-rs/google-pubsub1_beta2-cli -site_description: A complete library to interact with pubsub (protocol v1beta2) +site_description: A complete library to interact with Pubsub (protocol v1beta2) repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1_beta2-cli diff --git a/gen/pubsub1_beta2-cli/src/main.rs b/gen/pubsub1_beta2-cli/src/main.rs index 1fec043267..455bc3646f 100644 --- a/gen/pubsub1_beta2-cli/src/main.rs +++ b/gen/pubsub1_beta2-cli/src/main.rs @@ -154,8 +154,8 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "topic" => Some(("topic", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "ack-deadline-seconds" => Some(("ackDeadlineSeconds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "topic" => Some(("topic", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "push-config.attributes" => Some(("pushConfig.attributes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "push-config.push-endpoint" => Some(("pushConfig.pushEndpoint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1769,8 +1769,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1912,8 +1911,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being specified. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -1936,14 +1934,19 @@ fn main() { Some(false)), ]), ("subscriptions-test-iam-permissions", - Some(r##"Returns permissions that a caller has on the specified resource."##), + Some(r##"Returns permissions that a caller has on the specified resource. + If the resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building permission-aware + UIs and command-line tools, not for authorization checking. This operation + may "fail open" without warning."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_beta2_cli/projects_subscriptions-test-iam-permissions", vec![ (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy detail is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2055,8 +2058,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2132,8 +2134,7 @@ fn main() { (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy is being specified. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2178,14 +2179,19 @@ fn main() { Some(false)), ]), ("topics-test-iam-permissions", - Some(r##"Returns permissions that a caller has on the specified resource."##), + Some(r##"Returns permissions that a caller has on the specified resource. + If the resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building permission-aware + UIs and command-line tools, not for authorization checking. This operation + may "fail open" without warning."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_beta2_cli/projects_topics-test-iam-permissions", vec![ (Some(r##"resource"##), None, Some(r##"REQUIRED: The resource for which the policy detail is being requested. - `resource` is usually specified as a path. For example, a Project - resource is specified as `projects/{project}`."##), + See the operation documentation for the appropriate value for this field."##), Some(true), Some(false)), @@ -2213,7 +2219,7 @@ fn main() { let mut app = App::new("pubsub1-beta2") .author("Sebastian Thiel ") - .version("1.0.4+20161122") + .version("1.0.4+20170502") .about("Provides reliable, many-to-many, asynchronous messaging between applications. ") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_pubsub1_beta2_cli") diff --git a/gen/pubsub1_beta2/Cargo.toml b/gen/pubsub1_beta2/Cargo.toml index 7b4a14dc60..6696f248e9 100644 --- a/gen/pubsub1_beta2/Cargo.toml +++ b/gen/pubsub1_beta2/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-pubsub1_beta2" -version = "1.0.4+20161122" +version = "1.0.4+20170502" authors = ["Sebastian Thiel "] -description = "A complete library to interact with pubsub (protocol v1beta2)" +description = "A complete library to interact with Pubsub (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1_beta2" homepage = "https://cloud.google.com/pubsub/docs" -documentation = "https://docs.rs/google-pubsub1_beta2/1.0.4+20161122" +documentation = "https://docs.rs/google-pubsub1_beta2/1.0.4+20170502" license = "MIT" keywords = ["pubsub", "google", "protocol", "web", "api"] diff --git a/gen/pubsub1_beta2/README.md b/gen/pubsub1_beta2/README.md index f6dad7990c..6d67bcd53a 100644 --- a/gen/pubsub1_beta2/README.md +++ b/gen/pubsub1_beta2/README.md @@ -3,18 +3,18 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/api/README.md.mako' DO NOT EDIT ! --> -The `google-pubsub1_beta2` library allows access to all features of the *Google pubsub* service. +The `google-pubsub1_beta2` library allows access to all features of the *Google Pubsub* service. -This documentation was generated from *pubsub* crate version *1.0.4+20161122*, where *20161122* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Pubsub* crate version *1.0.4+20170502*, where *20170502* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. -Everything else about the *pubsub* *v1_beta2* API can be found at the +Everything else about the *Pubsub* *v1_beta2* API can be found at the [official documentation site](https://cloud.google.com/pubsub/docs). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.Pubsub.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.Pubsub.html) ... * projects - * [*subscriptions acknowledge*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionAcknowledgeCall.html), [*subscriptions create*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionCreateCall.html), [*subscriptions delete*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionDeleteCall.html), [*subscriptions get*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionGetCall.html), [*subscriptions get iam policy*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionGetIamPolicyCall.html), [*subscriptions list*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionListCall.html), [*subscriptions modify ack deadline*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionModifyAckDeadlineCall.html), [*subscriptions modify push config*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionModifyPushConfigCall.html), [*subscriptions pull*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionPullCall.html), [*subscriptions set iam policy*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionSetIamPolicyCall.html), [*subscriptions test iam permissions*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectSubscriptionTestIamPermissionCall.html), [*topics create*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectTopicCreateCall.html), [*topics delete*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectTopicDeleteCall.html), [*topics get*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectTopicGetCall.html), [*topics get iam policy*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectTopicGetIamPolicyCall.html), [*topics list*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectTopicListCall.html), [*topics publish*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectTopicPublishCall.html), [*topics set iam policy*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectTopicSetIamPolicyCall.html), [*topics subscriptions list*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectTopicSubscriptionListCall.html) and [*topics test iam permissions*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.ProjectTopicTestIamPermissionCall.html) + * [*subscriptions acknowledge*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionAcknowledgeCall.html), [*subscriptions create*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionCreateCall.html), [*subscriptions delete*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionDeleteCall.html), [*subscriptions get*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionGetCall.html), [*subscriptions get iam policy*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionGetIamPolicyCall.html), [*subscriptions list*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionListCall.html), [*subscriptions modify ack deadline*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionModifyAckDeadlineCall.html), [*subscriptions modify push config*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionModifyPushConfigCall.html), [*subscriptions pull*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionPullCall.html), [*subscriptions set iam policy*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionSetIamPolicyCall.html), [*subscriptions test iam permissions*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectSubscriptionTestIamPermissionCall.html), [*topics create*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectTopicCreateCall.html), [*topics delete*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectTopicDeleteCall.html), [*topics get*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectTopicGetCall.html), [*topics get iam policy*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectTopicGetIamPolicyCall.html), [*topics list*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectTopicListCall.html), [*topics publish*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectTopicPublishCall.html), [*topics set iam policy*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectTopicSetIamPolicyCall.html), [*topics subscriptions list*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectTopicSubscriptionListCall.html) and [*topics test iam permissions*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.ProjectTopicTestIamPermissionCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/struct.Pubsub.html)** +* **[Hub](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/struct.Pubsub.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.Part.html)** + * **[Parts](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -125,17 +125,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.Delegate.html), 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-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.ResponseResult.html), 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")`. @@ -145,29 +145,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.CallBuilder.html) 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-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.CallBuilder.html), 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-pubsub1_beta2/1.0.4+20161122/google_pubsub1_beta2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-pubsub1_beta2/1.0.4+20170502/google_pubsub1_beta2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/pubsub1_beta2/src/lib.rs b/gen/pubsub1_beta2/src/lib.rs index 726a88e00d..78c7887f6e 100644 --- a/gen/pubsub1_beta2/src/lib.rs +++ b/gen/pubsub1_beta2/src/lib.rs @@ -2,9 +2,9 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *pubsub* crate version *1.0.4+20161122*, where *20161122* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Pubsub* crate version *1.0.4+20170502*, where *20170502* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! -//! Everything else about the *pubsub* *v1_beta2* API can be found at the +//! Everything else about the *Pubsub* *v1_beta2* API can be found at the //! [official documentation site](https://cloud.google.com/pubsub/docs). //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1_beta2). //! # Features @@ -225,18 +225,18 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). #[derive(PartialEq, Eq, Hash)] pub enum Scope { - /// View and manage your data across Google Cloud Platform services - CloudPlatform, - /// View and manage Pub/Sub topics and subscriptions Full, + + /// View and manage your data across Google Cloud Platform services + CloudPlatform, } impl AsRef for Scope { fn as_ref(&self) -> &str { match *self { - Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", Scope::Full => "https://www.googleapis.com/auth/pubsub", + Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", } } } @@ -894,10 +894,6 @@ impl Part for PubsubMessage {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Subscription { - /// The name of the topic from which this subscription is receiving messages. - /// The value of this field will be `_deleted-topic_` if the topic has been - /// deleted. - pub topic: Option, /// This value is the maximum time after a subscriber receives a message /// before the subscriber should acknowledge the message. After message /// delivery but before the ack deadline expires and before the message is @@ -918,6 +914,10 @@ pub struct Subscription { /// If this parameter is 0, a default value of 10 seconds is used. #[serde(rename="ackDeadlineSeconds")] pub ack_deadline_seconds: Option, + /// The name of the topic from which this subscription is receiving messages. + /// The value of this field will be `_deleted-topic_` if the topic has been + /// deleted. + pub topic: Option, /// If push delivery is used with this subscription, this field is /// used to configure it. An empty `pushConfig` signifies that the subscriber /// will pull and ack messages using API methods. @@ -1047,13 +1047,18 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// /// Returns permissions that a caller has on the specified resource. + /// If the resource does not exist, this will return an empty set of + /// permissions, not a NOT_FOUND error. + /// + /// Note: This operation is designed to be used for building permission-aware + /// UIs and command-line tools, not for authorization checking. This operation + /// may "fail open" without warning. /// /// # Arguments /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn topics_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectTopicTestIamPermissionCall<'a, C, A> { ProjectTopicTestIamPermissionCall { hub: self.hub, @@ -1136,8 +1141,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `resource` - REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn topics_get_iam_policy(&self, resource: &str) -> ProjectTopicGetIamPolicyCall<'a, C, A> { ProjectTopicGetIamPolicyCall { hub: self.hub, @@ -1201,8 +1205,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn topics_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectTopicSetIamPolicyCall<'a, C, A> { ProjectTopicSetIamPolicyCall { hub: self.hub, @@ -1278,8 +1281,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `resource` - REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn subscriptions_get_iam_policy(&self, resource: &str) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> { ProjectSubscriptionGetIamPolicyCall { hub: self.hub, @@ -1293,13 +1295,18 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// /// Returns permissions that a caller has on the specified resource. + /// If the resource does not exist, this will return an empty set of + /// permissions, not a NOT_FOUND error. + /// + /// Note: This operation is designed to be used for building permission-aware + /// UIs and command-line tools, not for authorization checking. This operation + /// may "fail open" without warning. /// /// # Arguments /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn subscriptions_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> { ProjectSubscriptionTestIamPermissionCall { hub: self.hub, @@ -1396,8 +1403,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// * `request` - No description provided. /// * `resource` - REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. pub fn subscriptions_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> { ProjectSubscriptionSetIamPolicyCall { hub: self.hub, @@ -1656,12 +1662,12 @@ impl<'a, C, A> ProjectTopicListCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectTopicListCall<'a, C, A> @@ -1935,12 +1941,12 @@ impl<'a, C, A> ProjectSubscriptionPullCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectSubscriptionPullCall<'a, C, A> @@ -2216,12 +2222,12 @@ impl<'a, C, A> ProjectTopicCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectTopicCreateCall<'a, C, A> @@ -2250,6 +2256,12 @@ impl<'a, C, A> ProjectTopicCreateCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectTopicTestIamPermissionCall<'a, C, A> @@ -2775,12 +2786,12 @@ impl<'a, C, A> ProjectSubscriptionModifyPushConfigCall<'a, C, A> where C: Borrow /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectSubscriptionModifyPushConfigCall<'a, C, A> @@ -3053,12 +3064,12 @@ impl<'a, C, A> ProjectTopicPublishCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectTopicPublishCall<'a, C, A> @@ -3298,12 +3309,12 @@ impl<'a, C, A> ProjectTopicGetCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectTopicGetCall<'a, C, A> @@ -3511,8 +3522,7 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectTopicGetIamPolicyCall<'a, C, A> @@ -3827,12 +3837,12 @@ impl<'a, C, A> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> where C: Borro /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> @@ -4076,12 +4086,12 @@ impl<'a, C, A> ProjectSubscriptionDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectSubscriptionDeleteCall<'a, C, A> @@ -4319,8 +4329,7 @@ impl<'a, C, A> ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectTopicSetIamPolicyCall<'a, C, A> @@ -4642,12 +4651,12 @@ impl<'a, C, A> ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectSubscriptionCreateCall<'a, C, A> @@ -4924,12 +4933,12 @@ impl<'a, C, A> ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectSubscriptionAcknowledgeCall<'a, C, A> @@ -5137,8 +5146,7 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< /// REQUIRED: The resource for which the policy is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// @@ -5173,12 +5181,12 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> @@ -5207,6 +5215,12 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< /// Returns permissions that a caller has on the specified resource. +/// If the resource does not exist, this will return an empty set of +/// permissions, not a NOT_FOUND error. +/// +/// Note: This operation is designed to be used for building permission-aware +/// UIs and command-line tools, not for authorization checking. This operation +/// may "fail open" without warning. /// /// A builder for the *subscriptions.testIamPermissions* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -5415,8 +5429,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro self } /// REQUIRED: The resource for which the policy detail is being requested. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// @@ -5451,12 +5464,12 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> @@ -5700,12 +5713,12 @@ impl<'a, C, A> ProjectTopicDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectTopicDeleteCall<'a, C, A> @@ -5945,12 +5958,12 @@ impl<'a, C, A> ProjectSubscriptionGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectSubscriptionGetCall<'a, C, A> @@ -6216,12 +6229,12 @@ impl<'a, C, A> ProjectTopicSubscriptionListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectTopicSubscriptionListCall<'a, C, A> @@ -6487,12 +6500,12 @@ impl<'a, C, A> ProjectSubscriptionListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ProjectSubscriptionListCall<'a, C, A> @@ -6730,8 +6743,7 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< self } /// REQUIRED: The resource for which the policy is being specified. - /// `resource` is usually specified as a path. For example, a Project - /// resource is specified as `projects/{project}`. + /// See the operation documentation for the appropriate value for this field. /// /// Sets the *resource* path property to the given value. /// @@ -6766,12 +6778,12 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> diff --git a/gen/qpxexpress1-cli/Cargo.toml b/gen/qpxexpress1-cli/Cargo.toml index 65286a4ee7..bf61082259 100644 --- a/gen/qpxexpress1-cli/Cargo.toml +++ b/gen/qpxexpress1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/replicapool1_beta2-cli/Cargo.toml b/gen/replicapool1_beta2-cli/Cargo.toml index f7d54ed23a..1b0acd6887 100644 --- a/gen/replicapool1_beta2-cli/Cargo.toml +++ b/gen/replicapool1_beta2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/replicapoolupdater1_beta1-cli/Cargo.toml b/gen/replicapoolupdater1_beta1-cli/Cargo.toml index 440fd2f66c..244a4db06a 100644 --- a/gen/replicapoolupdater1_beta1-cli/Cargo.toml +++ b/gen/replicapoolupdater1_beta1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/reseller1_sandbox-cli/Cargo.toml b/gen/reseller1_sandbox-cli/Cargo.toml index 11f5d7039f..0272b659bf 100644 --- a/gen/reseller1_sandbox-cli/Cargo.toml +++ b/gen/reseller1_sandbox-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/resourceviews1_beta2-cli/Cargo.toml b/gen/resourceviews1_beta2-cli/Cargo.toml index a27ee9bcf3..71eac0aadc 100644 --- a/gen/resourceviews1_beta2-cli/Cargo.toml +++ b/gen/resourceviews1_beta2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/safebrowsing4-cli/Cargo.toml b/gen/safebrowsing4-cli/Cargo.toml index 4400f9fefd..3e873aeb07 100644 --- a/gen/safebrowsing4-cli/Cargo.toml +++ b/gen/safebrowsing4-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-safebrowsing4-cli" -version = "1.0.4+20160520" +version = "1.0.4+20170509" authors = ["Sebastian Thiel "] description = "A complete library to interact with safebrowsing (protocol v4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/safebrowsing4-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-safebrowsing4] path = "../safebrowsing4" -version = "1.0.4+20160520" +version = "1.0.4+20170509" diff --git a/gen/safebrowsing4-cli/README.md b/gen/safebrowsing4-cli/README.md index aa436c40e6..bc83e40503 100644 --- a/gen/safebrowsing4-cli/README.md +++ b/gen/safebrowsing4-cli/README.md @@ -25,10 +25,14 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *safebrowsing* API at revision *20160520*. The CLI is at version *1.0.4*. +This documentation was generated from the *safebrowsing* API at revision *20170509*. The CLI is at version *1.0.4*. ```bash safebrowsing4 [options] + encoded-full-hashes + get [-p ]... [-o ] + encoded-updates + get [-p ]... [-o ] full-hashes find (-r )... [-p ]... [-o ] threat-list-updates diff --git a/gen/safebrowsing4-cli/mkdocs.yml b/gen/safebrowsing4-cli/mkdocs.yml index 6d93c672cf..e2f90d40dd 100644 --- a/gen/safebrowsing4-cli/mkdocs.yml +++ b/gen/safebrowsing4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: safebrowsing v1.0.4+20160520 +site_name: safebrowsing v1.0.4+20170509 site_url: http://byron.github.io/google-apis-rs/google-safebrowsing4-cli site_description: A complete library to interact with safebrowsing (protocol v4) @@ -9,6 +9,8 @@ site_dir: build_html pages: - ['index.md', 'Home'] +- ['encoded-full-hashes_get.md', 'Encoded Full Hashes', 'Get'] +- ['encoded-updates_get.md', 'Encoded Updates', 'Get'] - ['full-hashes_find.md', 'Full Hashes', 'Find'] - ['threat-list-updates_fetch.md', 'Threat List Updates', 'Fetch'] - ['threat-lists_list.md', 'Threat Lists', 'List'] diff --git a/gen/safebrowsing4-cli/src/main.rs b/gen/safebrowsing4-cli/src/main.rs index 8a6b1027f3..1b24ff75ee 100644 --- a/gen/safebrowsing4-cli/src/main.rs +++ b/gen/safebrowsing4-cli/src/main.rs @@ -46,6 +46,118 @@ struct Engine<'n> { impl<'n> Engine<'n> { + fn _encoded_full_hashes_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.encoded_full_hashes().get(opt.value_of("encoded-request").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 { + "client-version" => { + call = call.client_version(value.unwrap_or("")); + }, + "client-id" => { + call = call.client_id(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(["client-id", "client-version"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + + fn _encoded_updates_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.encoded_updates().get(opt.value_of("encoded-request").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 { + "client-version" => { + call = call.client_version(value.unwrap_or("")); + }, + "client-id" => { + call = call.client_id(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(["client-id", "client-version"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + 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(), + _ => 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(()) + } + } + } + } + fn _full_hashes_find(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -71,12 +183,14 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "client.client-version" => Some(("client.clientVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "client.client-id" => Some(("client.clientId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "api-client.client-version" => Some(("apiClient.clientVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "api-client.client-id" => Some(("apiClient.clientId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "threat-info.threat-types" => Some(("threatInfo.threatTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "threat-info.platform-types" => Some(("threatInfo.platformTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "threat-info.threat-entry-types" => Some(("threatInfo.threatEntryTypes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "client-states" => Some(("clientStates", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["client", "client-id", "client-states", "client-version", "platform-types", "threat-entry-types", "threat-info", "threat-types"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["api-client", "client", "client-id", "client-states", "client-version", "platform-types", "threat-entry-types", "threat-info", "threat-types"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -356,6 +470,28 @@ impl<'n> Engine<'n> { let mut call_result: Result<(), DoitError> = Ok(()); let mut err_opt: Option = None; match self.opt.subcommand() { + ("encoded-full-hashes", Some(opt)) => { + match opt.subcommand() { + ("get", Some(opt)) => { + call_result = self._encoded_full_hashes_get(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("encoded-full-hashes".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + ("encoded-updates", Some(opt)) => { + match opt.subcommand() { + ("get", Some(opt)) => { + call_result = self._encoded_updates_get(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("encoded-updates".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, ("full-hashes", Some(opt)) => { match opt.subcommand() { ("find", Some(opt)) => { @@ -486,6 +622,56 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ + ("encoded-full-hashes", "methods: 'get'", vec![ + ("get", + Some(r##""##), + "Details at http://byron.github.io/google-apis-rs/google_safebrowsing4_cli/encoded-full-hashes_get", + vec![ + (Some(r##"encoded-request"##), + None, + Some(r##"A serialized FindFullHashesRequest proto."##), + 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)), + ]), + ]), + + ("encoded-updates", "methods: 'get'", vec![ + ("get", + Some(r##""##), + "Details at http://byron.github.io/google-apis-rs/google_safebrowsing4_cli/encoded-updates_get", + vec![ + (Some(r##"encoded-request"##), + None, + Some(r##"A serialized FetchThreatListUpdatesRequest proto."##), + 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)), + ]), + ]), + ("full-hashes", "methods: 'find'", vec![ ("find", Some(r##"Finds the full hashes that match the requested hash prefixes."##), @@ -513,7 +699,8 @@ fn main() { ("threat-list-updates", "methods: 'fetch'", vec![ ("fetch", - Some(r##"Fetches the most recent threat list updates. A client can request updates for multiple lists at once."##), + Some(r##"Fetches the most recent threat list updates. A client can request updates + for multiple lists at once."##), "Details at http://byron.github.io/google-apis-rs/google_safebrowsing4_cli/threat-list-updates_fetch", vec![ (Some(r##"kv"##), @@ -584,8 +771,8 @@ fn main() { let mut app = App::new("safebrowsing4") .author("Sebastian Thiel ") - .version("1.0.4+20160520") - .about("Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources.") + .version("1.0.4+20170509") + .about("The Safe Browsing API is an experimental API that allows client applications to check URLs against Google's constantly-updated blacklists of suspected phishing and malware pages. Your client application can use the API to download an encrypted table for local, client-side lookups of URLs.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_safebrowsing4_cli") .arg(Arg::with_name("folder") .long("config-dir") diff --git a/gen/safebrowsing4/Cargo.toml b/gen/safebrowsing4/Cargo.toml index 62c1aca0ef..8bac8ef613 100644 --- a/gen/safebrowsing4/Cargo.toml +++ b/gen/safebrowsing4/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-safebrowsing4" -version = "1.0.4+20160520" +version = "1.0.4+20170509" authors = ["Sebastian Thiel "] description = "A complete library to interact with safebrowsing (protocol v4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/safebrowsing4" homepage = "https://developers.google.com/safe-browsing/" -documentation = "https://docs.rs/google-safebrowsing4/1.0.4+20160520" +documentation = "https://docs.rs/google-safebrowsing4/1.0.4+20170509" license = "MIT" keywords = ["safebrowsing", "google", "protocol", "web", "api"] diff --git a/gen/safebrowsing4/README.md b/gen/safebrowsing4/README.md index f1c6f37605..3f965d0782 100644 --- a/gen/safebrowsing4/README.md +++ b/gen/safebrowsing4/README.md @@ -5,22 +5,26 @@ DO NOT EDIT ! --> The `google-safebrowsing4` library allows access to all features of the *Google safebrowsing* service. -This documentation was generated from *safebrowsing* crate version *1.0.4+20160520*, where *20160520* is the exact revision of the *safebrowsing:v4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *safebrowsing* crate version *1.0.4+20170509*, where *20170509* is the exact revision of the *safebrowsing:v4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *safebrowsing* *v4* API can be found at the [official documentation site](https://developers.google.com/safe-browsing/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/struct.Safebrowsing.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/struct.Safebrowsing.html) ... +* encoded full hashes + * [*get*](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/struct.EncodedFullHasheGetCall.html) +* encoded updates + * [*get*](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/struct.EncodedUpdateGetCall.html) * full hashes - * [*find*](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/struct.FullHasheFindCall.html) + * [*find*](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/struct.FullHasheFindCall.html) * threat list updates - * [*fetch*](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/struct.ThreatListUpdateFetchCall.html) + * [*fetch*](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/struct.ThreatListUpdateFetchCall.html) * threat lists - * [*list*](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/struct.ThreatListListCall.html) + * [*list*](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/struct.ThreatListListCall.html) * threat matches - * [*find*](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/struct.ThreatMatcheFindCall.html) + * [*find*](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/struct.ThreatMatcheFindCall.html) @@ -29,17 +33,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/struct.Safebrowsing.html)** +* **[Hub](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/struct.Safebrowsing.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.Part.html)** + * **[Parts](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -54,6 +58,7 @@ Or specifically ... ```ignore let r = hub.full_hashes().find(...).doit() +let r = hub.encoded_full_hashes().get(...).doit() ``` The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -78,7 +83,6 @@ google-safebrowsing4 = "*" extern crate hyper; extern crate yup_oauth2 as oauth2; extern crate google_safebrowsing4 as safebrowsing4; -use safebrowsing4::FindFullHashesRequest; use safebrowsing4::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -96,15 +100,12 @@ let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::new(), ::default(), None); let mut hub = Safebrowsing::new(hyper::Client::new(), 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 = FindFullHashesRequest::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.full_hashes().find(req) +let result = hub.encoded_full_hashes().get("encodedRequest") + .client_version("sit") + .client_id("Stet") .doit(); match result { @@ -127,17 +128,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.Delegate.html), 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-safebrowsing4/1.0.4+20160520/google_safebrowsing4/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.ResponseResult.html), 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")`. @@ -147,29 +148,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.CallBuilder.html) 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-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.RequestValue.html) and -[decodable](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.RequestValue.html) and +[decodable](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.CallBuilder.html), 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-safebrowsing4/1.0.4+20160520/google_safebrowsing4/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-safebrowsing4/1.0.4+20170509/google_safebrowsing4/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/safebrowsing4/src/lib.rs b/gen/safebrowsing4/src/lib.rs index c2e9bd7f5e..d6cd0774ba 100644 --- a/gen/safebrowsing4/src/lib.rs +++ b/gen/safebrowsing4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *safebrowsing* crate version *1.0.4+20160520*, where *20160520* is the exact revision of the *safebrowsing:v4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *safebrowsing* crate version *1.0.4+20170509*, where *20170509* is the exact revision of the *safebrowsing:v4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *safebrowsing* *v4* API can be found at the //! [official documentation site](https://developers.google.com/safe-browsing/). @@ -11,6 +11,10 @@ //! //! Handle the following *Resources* with ease from the central [hub](struct.Safebrowsing.html) ... //! +//! * encoded full hashes +//! * [*get*](struct.EncodedFullHasheGetCall.html) +//! * encoded updates +//! * [*get*](struct.EncodedUpdateGetCall.html) //! * full hashes //! * [*find*](struct.FullHasheFindCall.html) //! * threat list updates @@ -54,6 +58,7 @@ //! //! ```ignore //! let r = hub.full_hashes().find(...).doit() +//! let r = hub.encoded_full_hashes().get(...).doit() //! ``` //! //! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -78,7 +83,6 @@ //! extern crate hyper; //! extern crate yup_oauth2 as oauth2; //! extern crate google_safebrowsing4 as safebrowsing4; -//! use safebrowsing4::FindFullHashesRequest; //! use safebrowsing4::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; @@ -97,15 +101,12 @@ //! hyper::Client::new(), //! ::default(), None); //! let mut hub = Safebrowsing::new(hyper::Client::new(), 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 = FindFullHashesRequest::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.full_hashes().find(req) +//! let result = hub.encoded_full_hashes().get("encodedRequest") +//! .client_version("et") +//! .client_id("dolores") //! .doit(); //! //! match result { @@ -239,7 +240,6 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// extern crate hyper; /// extern crate yup_oauth2 as oauth2; /// extern crate google_safebrowsing4 as safebrowsing4; -/// use safebrowsing4::FindFullHashesRequest; /// use safebrowsing4::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; @@ -258,15 +258,12 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, /// hyper::Client::new(), /// ::default(), None); /// let mut hub = Safebrowsing::new(hyper::Client::new(), 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 = FindFullHashesRequest::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.full_hashes().find(req) +/// let result = hub.encoded_full_hashes().get("encodedRequest") +/// .client_version("accusam") +/// .client_id("takimata") /// .doit(); /// /// match result { @@ -306,6 +303,12 @@ impl<'a, C, A> Safebrowsing } } + pub fn encoded_full_hashes(&'a self) -> EncodedFullHasheMethods<'a, C, A> { + EncodedFullHasheMethods { hub: &self } + } + pub fn encoded_updates(&'a self) -> EncodedUpdateMethods<'a, C, A> { + EncodedUpdateMethods { hub: &self } + } pub fn full_hashes(&'a self) -> FullHasheMethods<'a, C, A> { FullHasheMethods { hub: &self } } @@ -340,19 +343,20 @@ impl<'a, C, A> Safebrowsing /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListUpdateRequest { - /// The type of platform at risk by entries present in the list. - #[serde(rename="platformType")] - pub platform_type: Option, - /// The current state of the client for the requested list (the encrypted client state that was received from the last successful list update). - pub state: Option, - /// The types of entries present in the list. - #[serde(rename="threatEntryType")] - pub threat_entry_type: Option, /// The type of threat posed by entries present in the list. #[serde(rename="threatType")] pub threat_type: Option, + /// The types of entries present in the list. + #[serde(rename="threatEntryType")] + pub threat_entry_type: Option, + /// The type of platform at risk by entries present in the list. + #[serde(rename="platformType")] + pub platform_type: Option, /// The constraints associated with this request. pub constraints: Option, + /// The current state of the client for the requested list (the encrypted + /// client state that was received from the last successful list update). + pub state: Option, } impl Part for ListUpdateRequest {} @@ -364,23 +368,30 @@ impl Part for ListUpdateRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListUpdateResponse { - /// The type of response. This may indicate that an action is required by the client when the response is received. + /// The type of response. This may indicate that an action is required by the + /// client when the response is received. #[serde(rename="responseType")] pub response_type: Option, /// The threat type for which data is returned. #[serde(rename="threatType")] pub threat_type: Option, - /// A set of entries to remove from a local threat type's list. Repeated for the same reason as above. + /// A set of entries to remove from a local threat type's list. In practice, + /// this field is empty or contains exactly one ThreatEntrySet. pub removals: Option>, /// The new client state, in encrypted format. Opaque to clients. #[serde(rename="newClientState")] pub new_client_state: Option, - /// The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided update. If the client state doesn't match the expected state, the client must disregard this update and retry later. + /// The expected SHA256 hash of the client state; that is, of the sorted list + /// of all hashes present in the database after applying the provided update. + /// If the client state doesn't match the expected state, the client must + /// disregard this update and retry later. pub checksum: Option, /// The format of the threats. #[serde(rename="threatEntryType")] pub threat_entry_type: Option, - /// A set of entries to add to a local threat type's list. Repeated to allow for a combination of compressed and raw data to be sent in a single response. + /// A set of entries to add to a local threat type's list. Repeated to allow + /// for a combination of compressed and raw data to be sent in a single + /// response. pub additions: Option>, /// The platform type for which data is returned. #[serde(rename="platformType")] @@ -390,7 +401,8 @@ pub struct ListUpdateResponse { impl Part for ListUpdateResponse {} -/// The metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type. +/// The metadata associated with a specific threat entry. The client is expected +/// to know the metadata key/value pairs associated with each threat type. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -409,35 +421,29 @@ impl Part for ThreatEntryMetadata {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Checksum { - /// The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database. + /// The SHA256 hash of the client state; that is, of the sorted list of all + /// hashes present in the database. pub sha256: Option, } impl Part for Checksum {} -/// Request to check entries against lists. +/// A set of raw indices to remove from a local list. /// -/// # 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*). -/// -/// * [find threat matches](struct.ThreatMatcheFindCall.html) (request) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct FindThreatMatchesRequest { - /// The client metadata. - pub client: Option, - /// The lists and entries to be checked for matches. - #[serde(rename="threatInfo")] - pub threat_info: Option, +pub struct RawIndices { + /// The indices to remove from a lexicographically-sorted local list. + pub indices: Option>, } -impl RequestValue for FindThreatMatchesRequest {} +impl Part for RawIndices {} -/// A set of threats that should be added or removed from a client's local database. +/// A set of threats that should be added or removed from a client's local +/// database. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -452,41 +458,52 @@ pub struct ThreatEntrySet { /// The raw SHA256-formatted entries. #[serde(rename="rawHashes")] pub raw_hashes: Option, - /// The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding. - #[serde(rename="riceHashes")] - pub rice_hashes: Option, - /// The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices. + /// The encoded local, lexicographically-sorted list indices, using a + /// Golomb-Rice encoding. Used for sending compressed removal indices. The + /// removal indices (uint32) are sorted in ascending order, then delta encoded + /// and stored as encoded_data. #[serde(rename="riceIndices")] pub rice_indices: Option, + /// The encoded 4-byte prefixes of SHA256-formatted entries, using a + /// Golomb-Rice encoding. The hashes are converted to uint32, sorted in + /// ascending order, then delta encoded and stored as encoded_data. + #[serde(rename="riceHashes")] + pub rice_hashes: Option, } impl Part for ThreatEntrySet {} -/// The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices. +/// The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or +/// compressed removal indices. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RiceDeltaEncoding { - /// The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in `first_value`. + /// The number of entries that are delta encoded in the encoded data. If only a + /// single integer was encoded, this will be zero and the single value will be + /// stored in `first_value`. #[serde(rename="numEntries")] pub num_entries: Option, - /// The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value. + /// The offset of the first entry in the encoded data, or, if only a single + /// integer was encoded, that single integer's value. #[serde(rename="firstValue")] pub first_value: Option, - /// The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if `num_entries` is zero. - #[serde(rename="riceParameter")] - pub rice_parameter: Option, /// The encoded deltas that are encoded using the Golomb-Rice coder. #[serde(rename="encodedData")] pub encoded_data: Option, + /// The Golomb-Rice parameter, which is a number between 2 and 28. This field + /// is missing (that is, zero) if `num_entries` is zero. + #[serde(rename="riceParameter")] + pub rice_parameter: Option, } impl Part for RiceDeltaEncoding {} -/// The information regarding one or more threats that a client submits when checking for matches in threat lists. +/// The information regarding one or more threats that a client submits when +/// checking for matches in threat lists. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -515,15 +532,21 @@ impl Part for ThreatInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Constraints { - /// Sets the maximum number of entries that the client is willing to have in the local database. This should be a power of 2 between 2**10 and 2**20. If zero, no database size limit is set. + /// Sets the maximum number of entries that the client is willing to have + /// in the local database. This should be a power of 2 between 2**10 and + /// 2**20. If zero, no database size limit is set. #[serde(rename="maxDatabaseEntries")] pub max_database_entries: Option, - /// Requests the list for a specific geographic location. If not set the server may pick that value based on the user's IP address. Expects ISO 3166-1 alpha-2 format. + /// Requests the list for a specific geographic location. If not set the + /// server may pick that value based on the user's IP address. Expects ISO + /// 3166-1 alpha-2 format. pub region: Option, /// The compression types supported by the client. #[serde(rename="supportedCompressions")] pub supported_compressions: Option>, - /// The maximum size in number of entries. The update will not contain more entries than this value. This should be a power of 2 between 2**10 and 2**20. If zero, no update size limit is set. + /// The maximum size in number of entries. The update will not contain more + /// entries than this value. This should be a power of 2 between 2**10 and + /// 2**20. If zero, no update size limit is set. #[serde(rename="maxUpdateEntries")] pub max_update_entries: Option, } @@ -551,7 +574,8 @@ pub struct ThreatMatch { /// The platform type matching this threat. #[serde(rename="platformType")] pub platform_type: Option, - /// The cache lifetime for the returned match. Clients must not cache this response for more than this duration to avoid false positives. + /// The cache lifetime for the returned match. Clients must not cache this + /// response for more than this duration to avoid false positives. #[serde(rename="cacheDuration")] pub cache_duration: Option, } @@ -565,7 +589,8 @@ impl Part for ThreatMatch {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ClientInfo { - /// A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API. + /// A client ID that (hopefully) uniquely identifies the client implementation + /// of the Safe Browsing API. #[serde(rename="clientId")] pub client_id: Option, /// The version of the client implementation. @@ -594,7 +619,9 @@ pub struct FindThreatMatchesResponse { impl ResponseResult for FindThreatMatchesResponse {} -/// Describes an individual threat list. A list is defined by three parameters: the type of threat posed, the type of platform targeted by the threat, and the type of entries in the list. +/// Describes an individual threat list. A list is defined by three parameters: +/// the type of threat posed, the type of platform targeted by the threat, and +/// the type of entries in the list. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -622,15 +649,19 @@ impl Part for ThreatListDescriptor {} /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [find full hashes](struct.FullHasheFindCall.html) (response) +/// * [get encoded full hashes](struct.EncodedFullHasheGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FindFullHashesResponse { /// The full hashes that matched the requested prefixes. pub matches: Option>, - /// For requested entities that did not match the threat list, how long to cache the response. + /// For requested entities that did not match the threat list, how long to + /// cache the response. #[serde(rename="negativeCacheDuration")] pub negative_cache_duration: Option, - /// The minimum duration the client must wait before issuing any find hashes request. If this field is not set, clients can issue a request as soon as they want. + /// The minimum duration the client must wait before issuing any find hashes + /// request. If this field is not set, clients can issue a request as soon as + /// they want. #[serde(rename="minimumWaitDuration")] pub minimum_wait_duration: Option, } @@ -638,7 +669,8 @@ pub struct FindFullHashesResponse { impl ResponseResult for FindFullHashesResponse {} -/// An individual threat; for example, a malicious URL or its hash representation. Only one of these fields should be set. +/// An individual threat; for example, a malicious URL or its hash +/// representation. Only one of these fields should be set. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -646,9 +678,12 @@ impl ResponseResult for FindFullHashesResponse {} pub struct ThreatEntry { /// A URL. pub url: Option, - /// A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash. This field is in binary format. + /// A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + /// hash. This field is in binary format. For JSON requests, hashes are + /// base64-encoded. pub hash: Option, - /// The digest of an executable in SHA256 format. The API supports both binary and hex digests. + /// The digest of an executable in SHA256 format. The API supports both + /// binary and hex digests. For JSON requests, digests are base64-encoded. pub digest: Option, } @@ -661,10 +696,10 @@ impl Part for ThreatEntry {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MetadataEntry { - /// The metadata entry key. - pub key: Option, - /// The metadata entry value. + /// The metadata entry value. For JSON requests, the value is base64-encoded. pub value: Option, + /// The metadata entry key. For JSON requests, the key is base64-encoded. + pub key: Option, } impl Part for MetadataEntry {} @@ -678,13 +713,15 @@ impl Part for MetadataEntry {} /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [fetch threat list updates](struct.ThreatListUpdateFetchCall.html) (response) +/// * [get encoded updates](struct.EncodedUpdateGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FetchThreatListUpdatesResponse { /// The list updates requested by the clients. #[serde(rename="listUpdateResponses")] pub list_update_responses: Option>, - /// The minimum duration the client must wait before issuing any update request. If this field is not set clients may update as soon as they want. + /// The minimum duration the client must wait before issuing any update + /// request. If this field is not set clients may update as soon as they want. #[serde(rename="minimumWaitDuration")] pub minimum_wait_duration: Option, } @@ -711,20 +748,31 @@ pub struct ListThreatListsResponse { impl ResponseResult for ListThreatListsResponse {} -/// A set of raw indices to remove from a local list. +/// Request to check entries against lists. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [find threat matches](struct.ThreatMatcheFindCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct RawIndices { - /// The indices to remove from a lexicographically-sorted local list. - pub indices: Option>, +pub struct FindThreatMatchesRequest { + /// The client metadata. + pub client: Option, + /// The lists and entries to be checked for matches. + #[serde(rename="threatInfo")] + pub threat_info: Option, } -impl Part for RawIndices {} +impl RequestValue for FindThreatMatchesRequest {} -/// Describes a Safe Browsing API update request. Clients can request updates for multiple lists in a single request. NOTE: Field index 2 is unused. NEXT: 4 +/// Describes a Safe Browsing API update request. Clients can request updates for +/// multiple lists in a single request. +/// NOTE: Field index 2 is unused. +/// NEXT: 5 /// /// # Activities /// @@ -745,16 +793,25 @@ pub struct FetchThreatListUpdatesRequest { impl RequestValue for FetchThreatListUpdatesRequest {} -/// The uncompressed threat entries in hash format of a particular prefix length. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URL. Used for sending ThreatEntrySet to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression. +/// The uncompressed threat entries in hash format of a particular prefix length. +/// Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 +/// bytes, but some hashes are lengthened if they collide with the hash of a +/// popular URL. +/// +/// Used for sending ThreatEntrySet to clients that do not support compression, +/// or when sending non-4-byte hashes to clients that do support compression. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RawHashes { - /// The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + /// The number of bytes for each prefix encoded below. This field can be + /// anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). #[serde(rename="prefixSize")] pub prefix_size: Option, - /// The hashes, all concatenated into one long string. Each hash has a prefix size of |prefix_size| above. Hashes are sorted in lexicographic order. + /// The hashes, in binary format, concatenated into one long string. Hashes are + /// sorted in lexicographic order. For JSON API users, hashes are + /// base64-encoded. #[serde(rename="rawHashes")] pub raw_hashes: Option, } @@ -775,6 +832,10 @@ impl Part for RawHashes {} pub struct FindFullHashesRequest { /// The client metadata. pub client: Option, + /// Client metadata associated with callers of higher-level APIs built on top + /// of the client's implementation. + #[serde(rename="apiClient")] + pub api_client: Option, /// The lists and hashes to be checked. #[serde(rename="threatInfo")] pub threat_info: Option, @@ -791,6 +852,239 @@ impl RequestValue for FindFullHashesRequest {} // MethodBuilders ### // ################# +/// A builder providing access to all methods supported on *encodedFullHashe* resources. +/// It is not used directly, but through the `Safebrowsing` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_safebrowsing4 as safebrowsing4; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use safebrowsing4::Safebrowsing; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Safebrowsing::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `get(...)` +/// // to build up your call. +/// let rb = hub.encoded_full_hashes(); +/// # } +/// ``` +pub struct EncodedFullHasheMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Safebrowsing, +} + +impl<'a, C, A> MethodsBuilder for EncodedFullHasheMethods<'a, C, A> {} + +impl<'a, C, A> EncodedFullHasheMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// + /// + /// # Arguments + /// + /// * `encodedRequest` - A serialized FindFullHashesRequest proto. + pub fn get(&self, encoded_request: &str) -> EncodedFullHasheGetCall<'a, C, A> { + EncodedFullHasheGetCall { + hub: self.hub, + _encoded_request: encoded_request.to_string(), + _client_version: Default::default(), + _client_id: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *fullHashe* resources. +/// It is not used directly, but through the `Safebrowsing` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_safebrowsing4 as safebrowsing4; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use safebrowsing4::Safebrowsing; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Safebrowsing::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `find(...)` +/// // to build up your call. +/// let rb = hub.full_hashes(); +/// # } +/// ``` +pub struct FullHasheMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Safebrowsing, +} + +impl<'a, C, A> MethodsBuilder for FullHasheMethods<'a, C, A> {} + +impl<'a, C, A> FullHasheMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Finds the full hashes that match the requested hash prefixes. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn find(&self, request: FindFullHashesRequest) -> FullHasheFindCall<'a, C, A> { + FullHasheFindCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *threatListUpdate* resources. +/// It is not used directly, but through the `Safebrowsing` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_safebrowsing4 as safebrowsing4; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use safebrowsing4::Safebrowsing; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Safebrowsing::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `fetch(...)` +/// // to build up your call. +/// let rb = hub.threat_list_updates(); +/// # } +/// ``` +pub struct ThreatListUpdateMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Safebrowsing, +} + +impl<'a, C, A> MethodsBuilder for ThreatListUpdateMethods<'a, C, A> {} + +impl<'a, C, A> ThreatListUpdateMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Fetches the most recent threat list updates. A client can request updates + /// for multiple lists at once. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn fetch(&self, request: FetchThreatListUpdatesRequest) -> ThreatListUpdateFetchCall<'a, C, A> { + ThreatListUpdateFetchCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *encodedUpdate* resources. +/// It is not used directly, but through the `Safebrowsing` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_safebrowsing4 as safebrowsing4; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use safebrowsing4::Safebrowsing; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Safebrowsing::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `get(...)` +/// // to build up your call. +/// let rb = hub.encoded_updates(); +/// # } +/// ``` +pub struct EncodedUpdateMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Safebrowsing, +} + +impl<'a, C, A> MethodsBuilder for EncodedUpdateMethods<'a, C, A> {} + +impl<'a, C, A> EncodedUpdateMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// + /// + /// # Arguments + /// + /// * `encodedRequest` - A serialized FetchThreatListUpdatesRequest proto. + pub fn get(&self, encoded_request: &str) -> EncodedUpdateGetCall<'a, C, A> { + EncodedUpdateGetCall { + hub: self.hub, + _encoded_request: encoded_request.to_string(), + _client_version: Default::default(), + _client_id: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *threatList* resources. /// It is not used directly, but through the `Safebrowsing` hub. /// @@ -900,126 +1194,935 @@ impl<'a, C, A> ThreatMatcheMethods<'a, C, A> { -/// A builder providing access to all methods supported on *threatListUpdate* resources. -/// It is not used directly, but through the `Safebrowsing` hub. -/// -/// # Example -/// -/// Instantiate a resource builder -/// -/// ```test_harness,no_run -/// extern crate hyper; -/// extern crate yup_oauth2 as oauth2; -/// extern crate google_safebrowsing4 as safebrowsing4; -/// -/// # #[test] fn egal() { -/// use std::default::Default; -/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use safebrowsing4::Safebrowsing; -/// -/// let secret: ApplicationSecret = Default::default(); -/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// hyper::Client::new(), -/// ::default(), None); -/// let mut hub = Safebrowsing::new(hyper::Client::new(), auth); -/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `fetch(...)` -/// // to build up your call. -/// let rb = hub.threat_list_updates(); -/// # } -/// ``` -pub struct ThreatListUpdateMethods<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Safebrowsing, -} - -impl<'a, C, A> MethodsBuilder for ThreatListUpdateMethods<'a, C, A> {} - -impl<'a, C, A> ThreatListUpdateMethods<'a, C, A> { - - /// Create a builder to help you perform the following task: - /// - /// Fetches the most recent threat list updates. A client can request updates for multiple lists at once. - /// - /// # Arguments - /// - /// * `request` - No description provided. - pub fn fetch(&self, request: FetchThreatListUpdatesRequest) -> ThreatListUpdateFetchCall<'a, C, A> { - ThreatListUpdateFetchCall { - hub: self.hub, - _request: request, - _delegate: Default::default(), - _additional_params: Default::default(), - } - } -} - - - -/// A builder providing access to all methods supported on *fullHashe* resources. -/// It is not used directly, but through the `Safebrowsing` hub. -/// -/// # Example -/// -/// Instantiate a resource builder -/// -/// ```test_harness,no_run -/// extern crate hyper; -/// extern crate yup_oauth2 as oauth2; -/// extern crate google_safebrowsing4 as safebrowsing4; -/// -/// # #[test] fn egal() { -/// use std::default::Default; -/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use safebrowsing4::Safebrowsing; -/// -/// let secret: ApplicationSecret = Default::default(); -/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// hyper::Client::new(), -/// ::default(), None); -/// let mut hub = Safebrowsing::new(hyper::Client::new(), auth); -/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `find(...)` -/// // to build up your call. -/// let rb = hub.full_hashes(); -/// # } -/// ``` -pub struct FullHasheMethods<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Safebrowsing, -} - -impl<'a, C, A> MethodsBuilder for FullHasheMethods<'a, C, A> {} - -impl<'a, C, A> FullHasheMethods<'a, C, A> { - - /// Create a builder to help you perform the following task: - /// - /// Finds the full hashes that match the requested hash prefixes. - /// - /// # Arguments - /// - /// * `request` - No description provided. - pub fn find(&self, request: FindFullHashesRequest) -> FullHasheFindCall<'a, C, A> { - FullHasheFindCall { - hub: self.hub, - _request: request, - _delegate: Default::default(), - _additional_params: Default::default(), - } - } -} - - - // ################### // CallBuilders ### // ################# +/// +/// +/// A builder for the *get* method supported by a *encodedFullHashe* resource. +/// It is not used directly, but through a `EncodedFullHasheMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_safebrowsing4 as safebrowsing4; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use safebrowsing4::Safebrowsing; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Safebrowsing::new(hyper::Client::new(), 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.encoded_full_hashes().get("encodedRequest") +/// .client_version("amet.") +/// .client_id("erat") +/// .doit(); +/// # } +/// ``` +pub struct EncodedFullHasheGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Safebrowsing, + _encoded_request: String, + _client_version: Option, + _client_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for EncodedFullHasheGetCall<'a, C, A> {} + +impl<'a, C, A> EncodedFullHasheGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, FindFullHashesResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "safebrowsing.encodedFullHashes.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("encodedRequest", self._encoded_request.to_string())); + if let Some(value) = self._client_version { + params.push(("clientVersion", value.to_string())); + } + if let Some(value) = self._client_id { + params.push(("clientId", value.to_string())); + } + for &field in ["alt", "encodedRequest", "clientVersion", "clientId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://safebrowsing.googleapis.com/v4/encodedFullHashes/{encodedRequest}".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + for &(find_this, param_name) in [("{encodedRequest}", "encodedRequest")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["encodedRequest"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A serialized FindFullHashesRequest proto. + /// + /// Sets the *encoded request* 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 encoded_request(mut self, new_value: &str) -> EncodedFullHasheGetCall<'a, C, A> { + self._encoded_request = new_value.to_string(); + self + } + /// The version of the client implementation. + /// + /// Sets the *client version* query property to the given value. + pub fn client_version(mut self, new_value: &str) -> EncodedFullHasheGetCall<'a, C, A> { + self._client_version = Some(new_value.to_string()); + self + } + /// A client ID that (hopefully) uniquely identifies the client implementation + /// of the Safe Browsing API. + /// + /// Sets the *client id* query property to the given value. + pub fn client_id(mut self, new_value: &str) -> EncodedFullHasheGetCall<'a, C, A> { + self._client_id = 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. + /// + /// 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 Delegate) -> EncodedFullHasheGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> EncodedFullHasheGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Finds the full hashes that match the requested hash prefixes. +/// +/// A builder for the *find* method supported by a *fullHashe* resource. +/// It is not used directly, but through a `FullHasheMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_safebrowsing4 as safebrowsing4; +/// use safebrowsing4::FindFullHashesRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use safebrowsing4::Safebrowsing; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Safebrowsing::new(hyper::Client::new(), 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 = FindFullHashesRequest::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.full_hashes().find(req) +/// .doit(); +/// # } +/// ``` +pub struct FullHasheFindCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Safebrowsing, + _request: FindFullHashesRequest, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for FullHasheFindCall<'a, C, A> {} + +impl<'a, C, A> FullHasheFindCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, FindFullHashesResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "safebrowsing.fullHashes.find", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://safebrowsing.googleapis.com/v4/fullHashes:find".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: FindFullHashesRequest) -> FullHasheFindCall<'a, C, A> { + self._request = 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. + /// + /// 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 Delegate) -> FullHasheFindCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> FullHasheFindCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// Fetches the most recent threat list updates. A client can request updates +/// for multiple lists at once. +/// +/// A builder for the *fetch* method supported by a *threatListUpdate* resource. +/// It is not used directly, but through a `ThreatListUpdateMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_safebrowsing4 as safebrowsing4; +/// use safebrowsing4::FetchThreatListUpdatesRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use safebrowsing4::Safebrowsing; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Safebrowsing::new(hyper::Client::new(), 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 = FetchThreatListUpdatesRequest::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.threat_list_updates().fetch(req) +/// .doit(); +/// # } +/// ``` +pub struct ThreatListUpdateFetchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Safebrowsing, + _request: FetchThreatListUpdatesRequest, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for ThreatListUpdateFetchCall<'a, C, A> {} + +impl<'a, C, A> ThreatListUpdateFetchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, FetchThreatListUpdatesResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "safebrowsing.threatListUpdates.fetch", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: FetchThreatListUpdatesRequest) -> ThreatListUpdateFetchCall<'a, C, A> { + self._request = 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. + /// + /// 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 Delegate) -> ThreatListUpdateFetchCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ThreatListUpdateFetchCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + +/// +/// +/// A builder for the *get* method supported by a *encodedUpdate* resource. +/// It is not used directly, but through a `EncodedUpdateMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_safebrowsing4 as safebrowsing4; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use safebrowsing4::Safebrowsing; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Safebrowsing::new(hyper::Client::new(), 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.encoded_updates().get("encodedRequest") +/// .client_version("sea") +/// .client_id("nonumy") +/// .doit(); +/// # } +/// ``` +pub struct EncodedUpdateGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Safebrowsing, + _encoded_request: String, + _client_version: Option, + _client_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for EncodedUpdateGetCall<'a, C, A> {} + +impl<'a, C, A> EncodedUpdateGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, FetchThreatListUpdatesResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "safebrowsing.encodedUpdates.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("encodedRequest", self._encoded_request.to_string())); + if let Some(value) = self._client_version { + params.push(("clientVersion", value.to_string())); + } + if let Some(value) = self._client_id { + params.push(("clientId", value.to_string())); + } + for &field in ["alt", "encodedRequest", "clientVersion", "clientId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://safebrowsing.googleapis.com/v4/encodedUpdates/{encodedRequest}".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + for &(find_this, param_name) in [("{encodedRequest}", "encodedRequest")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["encodedRequest"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A serialized FetchThreatListUpdatesRequest proto. + /// + /// Sets the *encoded request* 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 encoded_request(mut self, new_value: &str) -> EncodedUpdateGetCall<'a, C, A> { + self._encoded_request = new_value.to_string(); + self + } + /// The version of the client implementation. + /// + /// Sets the *client version* query property to the given value. + pub fn client_version(mut self, new_value: &str) -> EncodedUpdateGetCall<'a, C, A> { + self._client_version = Some(new_value.to_string()); + self + } + /// A client ID that uniquely identifies the client implementation of the Safe + /// Browsing API. + /// + /// Sets the *client id* query property to the given value. + pub fn client_id(mut self, new_value: &str) -> EncodedUpdateGetCall<'a, C, A> { + self._client_id = 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. + /// + /// 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 Delegate) -> EncodedUpdateGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> EncodedUpdateGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + /// Lists the Safe Browsing threat lists available for download. /// /// A builder for the *list* method supported by a *threatList* resource. @@ -1184,10 +2287,10 @@ impl<'a, C, A> ThreatListListCall<'a, C, A> where C: BorrowMut, A /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -1401,10 +2504,10 @@ impl<'a, C, A> ThreatMatcheFindCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -1423,438 +2526,4 @@ impl<'a, C, A> ThreatMatcheFindCall<'a, C, A> where C: BorrowMut, } -/// Fetches the most recent threat list updates. A client can request updates for multiple lists at once. -/// -/// A builder for the *fetch* method supported by a *threatListUpdate* resource. -/// It is not used directly, but through a `ThreatListUpdateMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_safebrowsing4 as safebrowsing4; -/// use safebrowsing4::FetchThreatListUpdatesRequest; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use safebrowsing4::Safebrowsing; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Safebrowsing::new(hyper::Client::new(), 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 = FetchThreatListUpdatesRequest::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.threat_list_updates().fetch(req) -/// .doit(); -/// # } -/// ``` -pub struct ThreatListUpdateFetchCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Safebrowsing, - _request: FetchThreatListUpdatesRequest, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, -} - -impl<'a, C, A> CallBuilder for ThreatListUpdateFetchCall<'a, C, A> {} - -impl<'a, C, A> ThreatListUpdateFetchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, FetchThreatListUpdatesResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "safebrowsing.threatListUpdates.fetch", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - for &field in ["alt"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch".to_string(); - - let mut key = self.hub.auth.borrow_mut().api_key(); - if key.is_none() { - key = dlg.api_key(); - } - match key { - Some(value) => params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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 { - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: FetchThreatListUpdatesRequest) -> ThreatListUpdateFetchCall<'a, C, A> { - self._request = 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. - /// - /// 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 Delegate) -> ThreatListUpdateFetchCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> ThreatListUpdateFetchCall<'a, C, A> - where T: AsRef { - self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); - self - } - -} - - -/// Finds the full hashes that match the requested hash prefixes. -/// -/// A builder for the *find* method supported by a *fullHashe* resource. -/// It is not used directly, but through a `FullHasheMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_safebrowsing4 as safebrowsing4; -/// use safebrowsing4::FindFullHashesRequest; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use safebrowsing4::Safebrowsing; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Safebrowsing::new(hyper::Client::new(), 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 = FindFullHashesRequest::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.full_hashes().find(req) -/// .doit(); -/// # } -/// ``` -pub struct FullHasheFindCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Safebrowsing, - _request: FindFullHashesRequest, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, -} - -impl<'a, C, A> CallBuilder for FullHasheFindCall<'a, C, A> {} - -impl<'a, C, A> FullHasheFindCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, FindFullHashesResponse)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "safebrowsing.fullHashes.find", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - for &field in ["alt"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://safebrowsing.googleapis.com/v4/fullHashes:find".to_string(); - - let mut key = self.hub.auth.borrow_mut().api_key(); - if key.is_none() { - key = dlg.api_key(); - } - match key { - Some(value) => params.push(("key", value)), - None => { - dlg.finished(false); - return Err(Error::MissingAPIKey) - } - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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 { - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: FindFullHashesRequest) -> FullHasheFindCall<'a, C, A> { - self._request = 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. - /// - /// 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 Delegate) -> FullHasheFindCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> FullHasheFindCall<'a, C, A> - where T: AsRef { - self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); - self - } - -} - - diff --git a/gen/searchconsole1-cli/Cargo.toml b/gen/searchconsole1-cli/Cargo.toml new file mode 100644 index 0000000000..2dffcc848e --- /dev/null +++ b/gen/searchconsole1-cli/Cargo.toml @@ -0,0 +1,37 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-searchconsole1-cli" +version = "1.0.4+20170520" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with Search Console (protocol v1)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/searchconsole1-cli" +homepage = "https://developers.google.com/webmaster-tools/search-console-api/" +documentation = "http://byron.github.io/google-apis-rs/google_searchconsole1_cli" +license = "MIT" +keywords = ["searchconsole", "google", "cli"] + +[[bin]] +name = "searchconsole1" + +[dependencies] +hyper = "^ 0.10" +mime = "^ 0.2.0" +serde = "^ 0.9" +serde_json = "^ 0.9" +serde_derive = "^ 0.9" +yup-oauth2 = "^ 1.0" +strsim = "^0.5" +hyper-rustls = "^0.6" +yup-hyper-mock = "^2.0" +clap = "^2.0" + +[features] + + + +[dependencies.google-searchconsole1] +path = "../searchconsole1" +version = "1.0.4+20170520" diff --git a/gen/searchconsole1-cli/LICENSE.md b/gen/searchconsole1-cli/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/searchconsole1-cli/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `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/searchconsole1-cli/README.md b/gen/searchconsole1-cli/README.md new file mode 100644 index 0000000000..3515b412de --- /dev/null +++ b/gen/searchconsole1-cli/README.md @@ -0,0 +1,110 @@ + +The `searchconsole1` command-line interface *(CLI)* allows to use most features of the *Google Search Console* 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 *Search Console* API can be found at the +[official documentation site](https://developers.google.com/webmaster-tools/search-console-api/). + +# Installation and Source Code + +Install the command-line interface with cargo using: + +```bash +cargo install google-searchconsole1-cli +``` + +Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/searchconsole1-cli). + +# Usage + +This documentation was generated from the *Search Console* API at revision *20170520*. The CLI is at version *1.0.4*. + +```bash +searchconsole1 [options] + url-testing-tools + mobile-friendly-test-run (-r )... [-p ]... [-o ] + searchconsole1 --help + +Configuration: + --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] + --debug + Output all server communication to standard error. `tx` and `rx` are placed + into the same stream. + --debug-auth + Output all communication related to authentication to standard error. `tx` + and `rx` are placed into the same stream. + +``` + +# Configuration + +The program will store all persistent data in the `~/.google-service-cli` directory in *JSON* files prefixed with `searchconsole1-`. 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/searchconsole1-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/searchconsole1-secret.json`, assuming that the required *searchconsole* 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 all client-server communication to standard error, whereas the `--debug-auth` flag +will cause all communication related to authentication to standard error. +If the `--debug` flag is set, error-results will be debug-printed, possibly yielding more information about the +issue at hand. + +You may consider redirecting standard error into a file for ease of use, e.g. `searchconsole1 --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/ \ No newline at end of file diff --git a/gen/searchconsole1-cli/mkdocs.yml b/gen/searchconsole1-cli/mkdocs.yml new file mode 100644 index 0000000000..302cd0f07b --- /dev/null +++ b/gen/searchconsole1-cli/mkdocs.yml @@ -0,0 +1,17 @@ +site_name: Search Console v1.0.4+20170520 +site_url: http://byron.github.io/google-apis-rs/google-searchconsole1-cli +site_description: A complete library to interact with Search Console (protocol v1) + +repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/searchconsole1-cli + +docs_dir: docs +site_dir: build_html + +pages: +- ['index.md', 'Home'] +- ['url-testing-tools_mobile-friendly-test-run.md', 'Url Testing Tools', 'Mobile Friendly Test Run'] + +theme: readthedocs + +copyright: Copyright © 2015-2016, `Sebastian Thiel` + diff --git a/gen/searchconsole1-cli/src/cmn.rs b/gen/searchconsole1-cli/src/cmn.rs new file mode 100644 index 0000000000..6cc030e9c4 --- /dev/null +++ b/gen/searchconsole1-cli/src/cmn.rs @@ -0,0 +1,747 @@ +// COPY OF 'src/rust/cli/cmn.rs' +// DO NOT EDIT +use oauth2::{ApplicationSecret, ConsoleApplicationSecret, TokenStorage, Token}; +use serde_json as json; +use serde_json::value::Value; +use mime::Mime; +use clap::{App, SubCommand}; +use strsim; + +use std::fs; +use std::env; +use std::io; +use std::error::Error as StdError; +use std::fmt; +use std::path::{Path, PathBuf}; +use std::str::FromStr; +use std::string::ToString; +use std::io::{Write, Read, stdout}; + +use std::default::Default; + +const FIELD_SEP: char = '.'; + + +pub enum ComplexType { + Pod, + Vec, + Map, +} + + // Null, + // Bool(bool), + // I64(i64), + // U64(u64), + // F64(f64), + // String(String), + +pub enum JsonType { + Boolean, + Int, + Uint, + Float, + String, +} + +pub struct JsonTypeInfo { + pub jtype: JsonType, + pub ctype: ComplexType, +} + +// Based on @erickt user comment. Thanks for the idea ! +// Remove all keys whose values are null from given value (changed in place) +pub fn remove_json_null_values(value: &mut Value) { + match *value { + Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} + +fn did_you_mean<'a>(v: &str, possible_values: &[&'a str]) -> Option<&'a str> { + + let mut candidate: Option<(f64, &str)> = None; + for pv in possible_values { + let confidence = strsim::jaro_winkler(v, pv); + if confidence > 0.8 && (candidate.is_none() || (candidate.as_ref().unwrap().0 < confidence)) { + candidate = Some((confidence, pv)); + } + } + match candidate { + None => None, + Some((_, candidate)) => Some(candidate), + } +} + +pub enum CallType { + Upload(UploadProtocol), + Standard, +} + +arg_enum!{ + pub enum UploadProtocol { + Simple, + Resumable + } +} + +impl AsRef for UploadProtocol { + fn as_ref(&self) -> &str { + match *self { + UploadProtocol::Simple => "simple", + UploadProtocol::Resumable => "resumable" + } + } +} + +impl AsRef for CallType { + fn as_ref(&self) -> &str { + match *self { + CallType::Upload(ref proto) => proto.as_ref(), + CallType::Standard => "standard-request" + } + } +} + +#[derive(Clone, Default)] +pub struct FieldCursor(Vec); + +impl ToString for FieldCursor { + fn to_string(&self) -> String { + self.0.join(".") + } +} + +impl From<&'static str> for FieldCursor { + fn from(value: &'static str) -> FieldCursor { + let mut res = FieldCursor::default(); + res.set(value).unwrap(); + res + } +} + +fn assure_entry<'a, 'b>(m: &'a mut json::Map, k: &'b String) -> &'a mut Value { + if m.contains_key(k) { + return m.get_mut(k).expect("value to exist") + } + m.insert(k.to_owned(), Value::Object(Default::default())); + m.get_mut(k).expect("value to exist") +} + +impl FieldCursor { + pub fn set(&mut self, value: &str) -> Result<(), CLIError> { + if value.len() == 0 { + return Err(CLIError::Field(FieldError::Empty)) + } + + let mut first_is_field_sep = false; + let mut char_count: usize = 0; + let mut last_c = FIELD_SEP; + let mut num_conscutive_field_seps = 0; + + let mut field = String::new(); + let mut fields = self.0.clone(); + + let push_field = |fs: &mut Vec, f: &mut String| { + if f.len() > 0 { + fs.push(f.clone()); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + char_count += 1; + + if c == FIELD_SEP { + if cid == 0 { + first_is_field_sep = true; + } + num_conscutive_field_seps += 1; + if cid > 0 && last_c == FIELD_SEP { + if fields.pop().is_none() { + return Err(CLIError::Field(FieldError::PopOnEmpty(value.to_string()))) + } + } else { + push_field(&mut fields, &mut field); + } + } else { + num_conscutive_field_seps = 0; + if cid == 1 { + if first_is_field_sep { + fields.truncate(0); + } + } + field.push(c); + } + + last_c = c; + } + + push_field(&mut fields, &mut field); + + if char_count == 1 && first_is_field_sep { + fields.truncate(0); + } + if char_count > 1 && num_conscutive_field_seps == 1 { + return Err(CLIError::Field(FieldError::TrailingFieldSep(value.to_string()))) + } + + self.0 = fields; + Ok(()) + } + + pub fn did_you_mean(value: &str, possible_values: &[&str]) -> Option { + if value.len() == 0 { + return None + } + + let mut last_c = FIELD_SEP; + + let mut field = String::new(); + let mut output = String::new(); + + let push_field = |fs: &mut String, f: &mut String| { + if f.len() > 0 { + fs.push_str( + match did_you_mean(&f, possible_values) { + Some(candidate) => candidate, + None => &f, + }); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + if c == FIELD_SEP { + if last_c != FIELD_SEP { + push_field(&mut output, &mut field); + } + output.push(c); + } else { + field.push(c); + } + + last_c = c; + } + + push_field(&mut output, &mut field); + + if &output == value { + None + } else { + Some(output) + } + } + + pub fn set_json_value(&self, mut object: &mut Value, + value: &str, type_info: JsonTypeInfo, + err: &mut InvalidOptionsError, + orig_cursor: &FieldCursor) { + assert!(self.0.len() > 0); + + for field in &self.0[..self.0.len()-1] { + let tmp = object; + object = + match *tmp { + Value::Object(ref mut mapping) => { + assure_entry(mapping, &field) + }, + _ => panic!("We don't expect non-object Values here ...") + }; + } + + match *object { + Value::Object(ref mut mapping) => { + let field = &self.0[self.0.len()-1]; + let to_jval = + |value: &str, jtype: JsonType, err: &mut InvalidOptionsError| + -> Value { + match jtype { + JsonType::Boolean => + Value::Bool(arg_from_str(value, err, &field, "boolean")), + JsonType::Int => + Value::Number(json::Number::from_f64(arg_from_str(value, err, &field, "int")).expect("valid f64")), + JsonType::Uint => + Value::Number(json::Number::from_f64(arg_from_str(value, err, &field, "uint")).expect("valid f64")), + JsonType::Float => + Value::Number(json::Number::from_f64(arg_from_str(value, err, &field, "float")).expect("valid f64")), + JsonType::String => + Value::String(value.to_owned()), + } + }; + + match type_info.ctype { + ComplexType::Pod => { + if mapping.insert(field.to_owned(), to_jval(value, type_info.jtype, err)).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + }, + ComplexType::Vec => { + match *assure_entry(mapping, field) { + Value::Array(ref mut values) => values.push(to_jval(value, type_info.jtype, err)), + _ => unreachable!() + } + }, + ComplexType::Map => { + let (key, value) = parse_kv_arg(value, err, true); + let jval = to_jval(value.unwrap_or(""), type_info.jtype, err); + + match *assure_entry(mapping, &field) { + + Value::Object(ref mut value_map) => { + if value_map.insert(key.to_owned(), jval).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + } + _ => unreachable!() + } + } + } + }, + _ => unreachable!() + } + } + + pub fn num_fields(&self) -> usize { + self.0.len() + } +} + +pub fn parse_kv_arg<'a>(kv: &'a str, err: &mut InvalidOptionsError, for_hashmap: bool) + -> (&'a str, Option<&'a str>) { + let mut add_err = || err.issues.push(CLIError::InvalidKeyValueSyntax(kv.to_string(),for_hashmap)); + match kv.find('=') { + None => { + add_err(); + return (kv, None) + }, + Some(pos) => { + let key = &kv[..pos]; + if kv.len() <= pos + 1 { + add_err(); + return (key, Some("")) + } + (key, Some(&kv[pos+1..])) + } + } +} + +pub fn calltype_from_str(name: &str, valid_protocols: Vec, err: &mut InvalidOptionsError) -> CallType { + CallType::Upload( + match UploadProtocol::from_str(name) { + Ok(up) => up, + Err(msg) => { + err.issues.push(CLIError::InvalidUploadProtocol(name.to_string(), valid_protocols)); + UploadProtocol::Simple + } + }) +} + +pub fn input_file_from_opts(file_path: &str, err: &mut InvalidOptionsError) -> Option { + match fs::File::open(file_path) { + Ok(f) => Some(f), + Err(io_err) => { + err.issues.push(CLIError::Input(InputError::Io((file_path.to_string(), io_err)))); + None + } + } +} + +pub fn input_mime_from_opts(mime: &str, err: &mut InvalidOptionsError) -> Option { + match mime.parse() { + Ok(m) => Some(m), + Err(_) => { + err.issues.push(CLIError::Input(InputError::Mime(mime.to_string()))); + None + } + } +} + +pub fn writer_from_opts(arg: Option<&str>) -> Result, io::Error> { + let f = arg.unwrap_or("-"); + match f { + "-" => Ok(Box::new(stdout())), + _ => match fs::OpenOptions::new().create(true).write(true).open(f) { + Ok(f) => Ok(Box::new(f)), + Err(io_err) => Err(io_err), + } + } +} + + +pub fn arg_from_str<'a, T>(arg: &str, err: &mut InvalidOptionsError, + arg_name: &'a str, + arg_type: &'a str) -> T + where T: FromStr + Default, + ::Err: fmt::Display { + match FromStr::from_str(arg) { + Err(perr) => { + err.issues.push( + CLIError::ParseError(arg_name.to_owned(), arg_type.to_owned(), arg.to_string(), format!("{}", perr)) + ); + Default::default() + }, + Ok(v) => v, + } +} + +pub struct JsonTokenStorage { + pub program_name: &'static str, + pub db_dir: String, +} + +impl JsonTokenStorage { + fn path(&self, scope_hash: u64) -> PathBuf { + Path::new(&self.db_dir).join(&format!("{}-token-{}.json", self.program_name, scope_hash)) + } +} + + +#[derive(Debug)] +pub enum TokenStorageError { + Json(json::Error), + Io(io::Error), +} + +impl fmt::Display for TokenStorageError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + TokenStorageError::Json(ref err) + => writeln!(f, "Could not serialize secrets: {}", err), + TokenStorageError::Io(ref err) + => writeln!(f, "Failed to write secret token: {}", err), + } + } +} + +impl StdError for TokenStorageError { + fn description(&self) -> &str { + "Failure when getting or setting the token storage" + } +} + + +impl TokenStorage for JsonTokenStorage { + type Error = TokenStorageError; + + // NOTE: logging might be interesting, currently we swallow all errors + fn set(&mut self, scope_hash: u64, _: &Vec<&str>, token: Option) -> Result<(), TokenStorageError> { + match token { + None => { + match fs::remove_file(self.path(scope_hash)) { + Err(err) => + match err.kind() { + io::ErrorKind::NotFound => Ok(()), + _ => Err(TokenStorageError::Io(err)) + }, + Ok(_) => Ok(()), + } + } + Some(token) => { + match fs::OpenOptions::new().create(true).write(true).open(&self.path(scope_hash)) { + Ok(mut f) => { + match json::to_writer_pretty(&mut f, &token) { + Ok(_) => Ok(()), + Err(serde_err) => Err(TokenStorageError::Json(serde_err)), + } + }, + Err(io_err) => Err(TokenStorageError::Io(io_err)) + } + } + } + } + + fn get(&self, scope_hash: u64, _: &Vec<&str>) -> Result, TokenStorageError> { + match fs::File::open(&self.path(scope_hash)) { + Ok(f) => { + match json::de::from_reader(f) { + Ok(token) => Ok(Some(token)), + Err(err) => Err(TokenStorageError::Json(err)), + } + }, + Err(io_err) => { + match io_err.kind() { + io::ErrorKind::NotFound => Ok(None), + _ => Err(TokenStorageError::Io(io_err)) + } + } + } + } +} + + +#[derive(Debug)] +pub enum ApplicationSecretError { + DecoderError((String, json::Error)), + FormatError(String), +} + +impl fmt::Display for ApplicationSecretError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ApplicationSecretError::DecoderError((ref path, ref err)) + => writeln!(f, "Could not decode file at '{}' with error: {}.", + path, err), + ApplicationSecretError::FormatError(ref path) + => writeln!(f, "'installed' field is unset in secret file at '{}'.", + path), + } + } +} + +#[derive(Debug)] +pub enum ConfigurationError { + DirectoryCreationFailed((String, io::Error)), + DirectoryUnset, + HomeExpansionFailed(String), + Secret(ApplicationSecretError), + Io((String, io::Error)), +} + +impl fmt::Display for ConfigurationError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ConfigurationError::DirectoryCreationFailed((ref dir, ref err)) + => writeln!(f, "Directory '{}' could not be created with error: {}.", dir, err), + ConfigurationError::DirectoryUnset + => writeln!(f, "--config-dir was unset or empty."), + ConfigurationError::HomeExpansionFailed(ref dir) + => writeln!(f, "Couldn't find HOME directory of current user, failed to expand '{}'.", dir), + ConfigurationError::Secret(ref err) + => writeln!(f, "Secret -> {}", err), + ConfigurationError::Io((ref path, ref err)) + => writeln!(f, "IO operation failed on path '{}' with error: {}.", path, err), + } + } +} + +#[derive(Debug)] +pub enum InputError { + Io((String, io::Error)), + Mime(String), +} + +impl fmt::Display for InputError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + InputError::Io((ref file_path, ref io_err)) + => writeln!(f, "Failed to open '{}' for reading with error: {}.", file_path, io_err), + InputError::Mime(ref mime) + => writeln!(f, "'{}' is not a known mime-type.", mime), + } + } +} + +#[derive(Debug)] +pub enum FieldError { + PopOnEmpty(String), + TrailingFieldSep(String), + Unknown(String, Option, Option), + Duplicate(String), + Empty, +} + + +impl fmt::Display for FieldError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + FieldError::PopOnEmpty(ref field) + => writeln!(f, "'{}': Cannot move up on empty field cursor.", field), + FieldError::TrailingFieldSep(ref field) + => writeln!(f, "'{}': Single field separator may not be last character.", field), + FieldError::Unknown(ref field, ref suggestion, ref value) => { + let suffix = + match *suggestion { + Some(ref s) => { + let kv = + match *value { + Some(ref v) => format!("{}={}", s, v), + None => s.clone(), + }; + format!(" Did you mean '{}' ?", kv) + }, + None => String::new(), + }; + writeln!(f, "Field '{}' does not exist.{}", field, suffix) + }, + FieldError::Duplicate(ref cursor) + => writeln!(f, "Value at '{}' was already set", cursor), + FieldError::Empty + => writeln!(f, "Field names must not be empty."), + } + } +} + + +#[derive(Debug)] +pub enum CLIError { + Configuration(ConfigurationError), + ParseError(String, String, String, String), + UnknownParameter(String, Vec<&'static str>), + InvalidUploadProtocol(String, Vec), + InvalidKeyValueSyntax(String, bool), + Input(InputError), + Field(FieldError), + MissingCommandError, + MissingMethodError(String), +} + +impl fmt::Display for CLIError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + CLIError::Configuration(ref err) => write!(f, "Configuration -> {}", err), + CLIError::Input(ref err) => write!(f, "Input -> {}", err), + CLIError::Field(ref err) => write!(f, "Field -> {}", err), + CLIError::InvalidUploadProtocol(ref proto_name, ref valid_names) + => writeln!(f, "'{}' is not a valid upload protocol. Choose from one of {}.", proto_name, valid_names.join(", ")), + CLIError::ParseError(ref arg_name, ref type_name, ref value, ref err_desc) + => writeln!(f, "Failed to parse argument '{}' with value '{}' as {} with error: {}.", + arg_name, value, type_name, err_desc), + CLIError::UnknownParameter(ref param_name, ref possible_values) => { + let suffix = + match did_you_mean(param_name, &possible_values) { + Some(v) => format!(" Did you mean '{}' ?", v), + None => String::new(), + }; + write!(f, "Parameter '{}' is unknown.{}\n", param_name, suffix) + }, + CLIError::InvalidKeyValueSyntax(ref kv, is_hashmap) => { + let hashmap_info = if is_hashmap { "hashmap " } else { "" }; + writeln!(f, "'{}' does not match {}pattern =.", kv, hashmap_info) + }, + CLIError::MissingCommandError => writeln!(f, "Please specify the main sub-command."), + CLIError::MissingMethodError(ref cmd) => writeln!(f, "Please specify the method to call on the '{}' command.", cmd), + } + } +} + +#[derive(Debug)] +pub struct InvalidOptionsError { + pub issues: Vec, + pub exit_code: i32, +} + +impl fmt::Display for InvalidOptionsError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + for issue in &self.issues { + try!(issue.fmt(f)); + } + Ok(()) + } +} + +impl InvalidOptionsError { + pub fn single(err: CLIError, exit_code: i32) -> InvalidOptionsError { + InvalidOptionsError { + issues: vec![err], + exit_code: exit_code, + } + } + + pub fn new() -> InvalidOptionsError { + InvalidOptionsError { + issues: Vec::new(), + exit_code: 1, + } + } +} + +pub fn assure_config_dir_exists(dir: &str) -> Result { + let trdir = dir.trim(); + if trdir.len() == 0 { + return Err(CLIError::Configuration(ConfigurationError::DirectoryUnset)) + } + + let expanded_config_dir = + if trdir.as_bytes()[0] == b'~' { + match env::var("HOME").ok().or(env::var("UserProfile").ok()) { + None => return Err(CLIError::Configuration(ConfigurationError::HomeExpansionFailed(trdir.to_string()))), + Some(mut user) => { + user.push_str(&trdir[1..]); + user + } + } + } else { + trdir.to_string() + }; + + if let Err(err) = fs::create_dir(&expanded_config_dir) { + if err.kind() != io::ErrorKind::AlreadyExists { + return Err(CLIError::Configuration( + ConfigurationError::DirectoryCreationFailed((expanded_config_dir, err)))) + } + } + + Ok(expanded_config_dir) +} + +pub fn application_secret_from_directory(dir: &str, + secret_basename: &str, + json_console_secret: &str) + -> Result { + let secret_path = Path::new(dir).join(secret_basename); + let secret_str = || secret_path.as_path().to_str().unwrap().to_string(); + let secret_io_error = |io_err: io::Error| { + Err(CLIError::Configuration(ConfigurationError::Io( + (secret_str(), io_err) + ))) + }; + + for _ in 0..2 { + match fs::File::open(&secret_path) { + Err(mut err) => { + if err.kind() == io::ErrorKind::NotFound { + // Write our built-in one - user may adjust the written file at will + + err = match fs::OpenOptions::new().create(true).write(true).open(&secret_path) { + Err(cfe) => cfe, + Ok(mut f) => { + // Assure we convert 'ugly' json string into pretty one + let console_secret: ConsoleApplicationSecret + = json::from_str(json_console_secret).unwrap(); + match json::to_writer_pretty(&mut f, &console_secret) { + Err(serde_err) => panic!("Unexpected serde error: {:#?}", serde_err), + Ok(_) => continue, + } + } + }; + // fall through to IO error handling + } + return secret_io_error(err) + }, + Ok(f) => { + match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { + Err(json_err) => + return Err(CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::DecoderError( + (secret_str(), json_err) + )))), + Ok(console_secret) => + match console_secret.installed { + Some(secret) => return Ok(secret), + None => return Err( + CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::FormatError(secret_str()) + ))) + }, + } + } + } + } + unreachable!(); +} diff --git a/gen/searchconsole1-cli/src/main.rs b/gen/searchconsole1-cli/src/main.rs new file mode 100644 index 0000000000..739229dd1c --- /dev/null +++ b/gen/searchconsole1-cli/src/main.rs @@ -0,0 +1,351 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/cli/main.rs.mako' +// DO NOT EDIT ! +#![allow(unused_variables, unused_imports, dead_code, unused_mut)] + +#[macro_use] +extern crate clap; +extern crate yup_oauth2 as oauth2; +extern crate yup_hyper_mock as mock; +extern crate hyper_rustls; +extern crate serde; +extern crate serde_json; +extern crate hyper; +extern crate mime; +extern crate strsim; +extern crate google_searchconsole1 as api; + +use std::env; +use std::io::{self, Write}; +use clap::{App, SubCommand, Arg}; + +mod cmn; + +use cmn::{InvalidOptionsError, CLIError, JsonTokenStorage, 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::str::FromStr; + +use oauth2::{Authenticator, DefaultAuthenticatorDelegate, FlowType}; +use serde_json as json; +use clap::ArgMatches; + +enum DoitError { + IoError(String, io::Error), + ApiError(api::Error), +} + +struct Engine<'n> { + opt: ArgMatches<'n>, + hub: api::SearchConsole>, + gp: Vec<&'static str>, + gpm: Vec<(&'static str, &'static str)>, +} + + +impl<'n> Engine<'n> { + fn _url_testing_tools_mobile_friendly_test_run(&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()[..] { + "url" => Some(("url", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "request-screenshot" => Some(("requestScreenshot", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["request-screenshot", "url"]); + 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::RunMobileFriendlyTestRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.url_testing_tools().mobile_friendly_test_run(request); + 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); + 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(), + _ => 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(()) + } + } + } + } + + 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() { + ("url-testing-tools", Some(opt)) => { + match opt.subcommand() { + ("mobile-friendly-test-run", Some(opt)) => { + call_result = self._url_testing_tools_mobile_friendly_test_run(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("url-testing-tools".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 + fn new(opt: ArgMatches<'n>) -> Result, InvalidOptionsError> { + let (config_dir, secret) = { + let config_dir = match cmn::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 cmn::application_secret_from_directory(&config_dir, "searchconsole1-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 auth = Authenticator::new( &secret, DefaultAuthenticatorDelegate, + if opt.is_present("debug-auth") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new()) + }) + } else { + hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())) + }, + JsonTokenStorage { + program_name: "searchconsole1", + db_dir: config_dir.clone(), + }, Some(FlowType::InstalledRedirect(54324))); + + let client = + if opt.is_present("debug") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new()) + }) + } else { + hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())) + }; + let engine = Engine { + opt: opt, + hub: api::SearchConsole::new(client, auth), + gp: vec!["$-xgafv", "access-token", "alt", "bearer-token", "callback", "fields", "key", "oauth-token", "pp", "pretty-print", "quota-user", "upload-type", "upload-protocol"], + gpm: vec![ + ("$-xgafv", "$.xgafv"), + ("access-token", "access_token"), + ("bearer-token", "bearer_token"), + ("oauth-token", "oauth_token"), + ("pretty-print", "prettyPrint"), + ("quota-user", "quotaUser"), + ("upload-type", "uploadType"), + ("upload-protocol", "upload_protocol"), + ] + }; + + match engine._doit(true) { + Err(Some(err)) => Err(err), + Err(None) => Ok(engine), + Ok(_) => unreachable!(), + } + } + + fn doit(&self) -> Result<(), DoitError> { + match self._doit(false) { + Ok(res) => res, + Err(_) => unreachable!(), + } + } +} + +fn main() { + let mut exit_status = 0i32; + let arg_data = [ + ("url-testing-tools", "methods: 'mobile-friendly-test-run'", vec![ + ("mobile-friendly-test-run", + Some(r##"Runs Mobile-Friendly Test for a given URL."##), + "Details at http://byron.github.io/google-apis-rs/google_searchconsole1_cli/url-testing-tools_mobile-friendly-test-run", + vec![ + (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("searchconsole1") + .author("Sebastian Thiel ") + .version("1.0.4+20170520") + .about("Provides tools for running validation tests against single URLs") + .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_searchconsole1_cli") + .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("Output all server communication to standard error. `tx` and `rx` are placed into the same stream.") + .multiple(false) + .takes_value(false)) + .arg(Arg::with_name("debug-auth") + .long("debug-auth") + .help("Output all communication related to authentication to standard error. `tx` and `rx` are placed into the same stream.") + .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("debug"); + match Engine::new(matches) { + Err(err) => { + exit_status = err.exit_code; + writeln!(io::stderr(), "{}", err).ok(); + }, + Ok(engine) => { + if let Err(doit_err) = engine.doit() { + 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); +} \ No newline at end of file diff --git a/gen/searchconsole1/Cargo.toml b/gen/searchconsole1/Cargo.toml new file mode 100644 index 0000000000..cc6861a594 --- /dev/null +++ b/gen/searchconsole1/Cargo.toml @@ -0,0 +1,28 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-searchconsole1" +version = "1.0.4+20170520" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with Search Console (protocol v1)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/searchconsole1" +homepage = "https://developers.google.com/webmaster-tools/search-console-api/" +documentation = "https://docs.rs/google-searchconsole1/1.0.4+20170520" +license = "MIT" +keywords = ["searchconsole", "google", "protocol", "web", "api"] + + +[dependencies] +hyper = "^ 0.10" +mime = "^ 0.2.0" +serde = "^ 0.9" +serde_json = "^ 0.9" +serde_derive = "^ 0.9" +yup-oauth2 = "^ 1.0" +url = "= 0.5" + +[features] + + diff --git a/gen/searchconsole1/LICENSE.md b/gen/searchconsole1/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/searchconsole1/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `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/searchconsole1/README.md b/gen/searchconsole1/README.md new file mode 100644 index 0000000000..3b6ff005df --- /dev/null +++ b/gen/searchconsole1/README.md @@ -0,0 +1,179 @@ + +The `google-searchconsole1` library allows access to all features of the *Google Search Console* service. + +This documentation was generated from *Search Console* crate version *1.0.4+20170520*, where *20170520* is the exact revision of the *searchconsole:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. + +Everything else about the *Search Console* *v1* API can be found at the +[official documentation site](https://developers.google.com/webmaster-tools/search-console-api/). +# Features + +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/struct.SearchConsole.html) ... + +* url testing tools + * [*mobile friendly test run*](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/struct.UrlTestingToolMobileFriendlyTestRunCall.html) + + + + +# Structure of this Library + +The API is structured into the following primary items: + +* **[Hub](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/struct.SearchConsole.html)** + * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.Resource.html)** + * primary types that you can apply *Activities* to + * a collection of properties and *Parts* + * **[Parts](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.Part.html)** + * a collection of properties + * never directly used in *Activities* +* **[Activities](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.CallBuilder.html)** + * operations to apply to *Resources* + +All *structures* are marked with applicable traits to further categorize them and ease browsing. + +Generally speaking, you can invoke *Activities* like this: + +```Rust,ignore +let r = hub.resource().activity(...).doit() +``` + +Or specifically ... + +```ignore +let r = hub.url_testing_tools().mobile_friendly_test_run(...).doit() +``` + +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-searchconsole1 = "*" +``` + +## A complete example + +```Rust +extern crate hyper; +extern crate yup_oauth2 as oauth2; +extern crate google_searchconsole1 as searchconsole1; +use searchconsole1::RunMobileFriendlyTestRequest; +use searchconsole1::{Result, Error}; +use std::default::Default; +use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +use searchconsole1::SearchConsole; + +// Get an ApplicationSecret instance by some means. It contains the `client_id` and +// `client_secret`, among other things. +let secret: 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 = Authenticator::new(&secret, DefaultAuthenticatorDelegate, + hyper::Client::new(), + ::default(), None); +let mut hub = SearchConsole::new(hyper::Client::new(), 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 = RunMobileFriendlyTestRequest::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.url_testing_tools().mobile_friendly_test_run(req) + .doit(); + +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::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-searchconsole1/1.0.4+20170520/google_searchconsole1/enum.Result.html) enumeration as return value of +the doit() methods, or handed as possibly intermediate results to either the +[Hub Delegate](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.Delegate.html), 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-searchconsole1/1.0.4+20170520/google_searchconsole1/enum.Result.html), should be +read by you to obtain the media. +If such a method also supports a [Response Result](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.ResponseResult.html), 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-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.CallBuilder.html) 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-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.Part.html) which are identifiable by name, which will be sent to +the server to indicate either the set parts of the request or the desired parts in the response. + +## Builder Arguments + +Using [method builders](https://docs.rs/google-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.CallBuilder.html), 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-searchconsole1/1.0.4+20170520/google_searchconsole1/trait.RequestValue.html) 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 + +# License +The **searchconsole1** 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/master/LICENSE.md diff --git a/gen/searchconsole1/src/cmn.rs b/gen/searchconsole1/src/cmn.rs new file mode 100644 index 0000000000..77d71c8896 --- /dev/null +++ b/gen/searchconsole1/src/cmn.rs @@ -0,0 +1,753 @@ +// COPY OF 'src/rust/api/cmn.rs' +// DO NOT EDIT +use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; +use std; +use std::fmt::{self, Display}; +use std::str::FromStr; +use std::error; +use std::thread::sleep; +use std::time::Duration; + +use mime::{Mime, TopLevel, SubLevel, Attr, Value}; +use oauth2::{TokenType, Retry, self}; +use hyper; +use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, + HeaderFormat, Bearer}; +use hyper::http::h1::LINE_ENDING; +use hyper::method::Method; +use hyper::status::StatusCode; + +use serde_json as json; + +/// Identifies the Hub. There is only one per library, this trait is supposed +/// to make intended use more explicit. +/// The hub allows to access all resource methods more easily. +pub trait Hub {} + +/// Identifies types for building methods of a particular resource type +pub trait MethodsBuilder {} + +/// Identifies types which represent builders for a particular resource method +pub trait CallBuilder {} + +/// Identifies types which can be inserted and deleted. +/// Types with this trait are most commonly used by clients of this API. +pub trait Resource {} + +/// Identifies types which are used in API responses. +pub trait ResponseResult {} + +/// Identifies types which are used in API requests. +pub trait RequestValue {} + +/// Identifies types which are not actually used by the API +/// This might be a bug within the google API schema. +pub trait UnusedType {} + +/// Identifies types which are only used as part of other types, which +/// usually are carrying the `Resource` trait. +pub trait Part {} + +/// Identifies types which are only used by other types internally. +/// They have no special meaning, this trait just marks them for completeness. +pub trait NestedType {} + +/// A utility to specify reader types which provide seeking capabilities too +pub trait ReadSeek: Seek + Read {} +impl ReadSeek for T {} + +/// A trait for all types that can convert themselves into a *parts* string +pub trait ToParts { + fn to_parts(&self) -> String; +} + +/// A utility type which can decode a server response that indicates error +#[derive(Deserialize)] +pub struct JsonServerError { + pub error: String, + pub error_description: Option +} + +/// A utility to represent detailed errors we might see in case there are BadRequests. +/// The latter happen if the sent parameters or request structures are unsound +#[derive(Deserialize, Serialize, Debug)] +pub struct ErrorResponse { + error: ServerError, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerError { + errors: Vec, + code: u16, + message: String, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerMessage { + domain: String, + reason: String, + message: String, + #[serde(rename="locationType")] + location_type: Option, + location: Option +} + +#[derive(Copy, Clone)] +pub struct DummyNetworkStream; + +impl Read for DummyNetworkStream { + fn read(&mut self, _: &mut [u8]) -> io::Result { + Ok(0) + } +} + +impl Write for DummyNetworkStream { + fn write(&mut self, _: &[u8]) -> io::Result { + Ok(0) + } + + fn flush(&mut self) -> io::Result<()> { + Ok(()) + } +} + +impl hyper::net::NetworkStream for DummyNetworkStream { + fn peer_addr(&mut self) -> io::Result { + Ok("127.0.0.1:1337".parse().unwrap()) + } + + fn set_read_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } + + fn set_write_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } +} + + +/// A trait specifying functionality to help controlling any request performed by the API. +/// The trait has a conservative default implementation. +/// +/// It contains methods to deal with all common issues, as well with the ones related to +/// uploading media +pub trait Delegate { + + /// Called at the beginning of any API request. The delegate should store the method + /// information if he is interesting in knowing more context when further calls to it + /// are made. + /// The matching `finished()` call will always be made, no matter whether or not the API + /// request was successful. That way, the delegate may easily maintain a clean state + /// between various API calls. + fn begin(&mut self, MethodInfo) {} + + /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// + /// Return retry information. + fn http_error(&mut self, &hyper::Error) -> Retry { + Retry::Abort + } + + /// Called whenever there is the need for your applications API key after + /// the official authenticator implementation didn't provide one, for some reason. + /// If this method returns None as well, the underlying operation will fail + fn api_key(&mut self) -> Option { + None + } + + /// Called whenever the Authenticator didn't yield a token. The delegate + /// may attempt to provide one, or just take it as a general information about the + /// impending failure. + /// The given Error provides information about why the token couldn't be acquired in the + /// first place + fn token(&mut self, err: &error::Error) -> Option { + let _ = err; + None + } + + /// Called during resumable uploads to provide a URL for the impending upload. + /// It was saved after a previous call to `store_upload_url(...)`, and if not None, + /// will be used instead of asking the server for a new upload URL. + /// This is useful in case a previous resumable upload was aborted/canceled, but should now + /// be resumed. + /// The returned URL will be used exactly once - if it fails again and the delegate allows + /// to retry, we will ask the server for a new upload URL. + fn upload_url(&mut self) -> Option { + None + } + + /// Called after we have retrieved a new upload URL for a resumable upload to store it + /// in case we fail or cancel. That way, we can attempt to resume the upload later, + /// see `upload_url()`. + /// It will also be called with None after a successful upload, which allows the delegate + /// to forget the URL. That way, we will not attempt to resume an upload that has already + /// finished. + fn store_upload_url(&mut self, url: Option<&str>) { + let _ = url; + } + + /// Called whenever a server response could not be decoded from json. + /// It's for informational purposes only, the caller will return with an error + /// accordingly. + /// + /// # Arguments + /// + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error + fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &json::Error) { + let _ = json_encoded_value; + let _ = json_decode_error; + } + + /// Called whenever the http request returns with a non-success status code. + /// This can involve authentication issues, or anything else that very much + /// depends on the used API method. + /// The delegate should check the status, header and decoded json error to decide + /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + fn http_failure(&mut self, _: &hyper::client::Response, Option, _: Option) -> Retry { + Retry::Abort + } + + /// Called prior to sending the main request of the given method. It can be used to time + /// the call or to print progress information. + /// It's also useful as you can be sure that a request will definitely be made. + fn pre_request(&mut self) { } + + /// Return the size of each chunk of a resumable upload. + /// Must be a power of two, with 1<<18 being the smallest allowed chunk size. + /// Will be called once before starting any resumable upload. + fn chunk_size(&mut self) -> u64 { + 1 << 23 + } + + /// Called before the given chunk is uploaded to the server. + /// If true is returned, the upload will be interrupted. + /// However, it may be resumable if you stored the upload URL in a previous call + /// to `store_upload_url()` + fn cancel_chunk_upload(&mut self, chunk: &ContentRange) -> bool { + let _ = chunk; + false + } + + /// Called before the API request method returns, in every case. It can be used to clean up + /// internal state between calls to the API. + /// This call always has a matching call to `begin(...)`. + /// + /// # Arguments + /// + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. + fn finished(&mut self, is_success: bool) { + let _ = is_success; + } +} + +/// A delegate with a conservative default implementation, which is used if no other delegate is +/// set. +#[derive(Default)] +pub struct DefaultDelegate; + +impl Delegate for DefaultDelegate {} + + +#[derive(Debug)] +pub enum Error { + /// The http connection failed + HttpError(hyper::Error), + + /// An attempt was made to upload a resource with size stored in field `.0` + /// even though the maximum upload size is what is stored in field `.1`. + UploadSizeLimitExceeded(u64, u64), + + /// Represents information about a request that was not understood by the server. + /// Details are included. + BadRequest(ErrorResponse), + + /// We needed an API key for authentication, but didn't obtain one. + /// Neither through the authenticator, nor through the Delegate. + MissingAPIKey, + + /// We required a Token, but didn't get one from the Authenticator + MissingToken(Box), + + /// The delgate instructed to cancel the operation + Cancelled, + + /// An additional, free form field clashed with one of the built-in optional ones + FieldClash(&'static str), + + /// Shows that we failed to decode the server response. + /// This can happen if the protocol changes in conjunction with strict json decoding. + JsonDecodeError(String, json::Error), + + /// Indicates an HTTP repsonse with a non-success status code + Failure(hyper::client::Response), +} + + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + (writeln!(f, "The application's API key was not found in the configuration")).ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::BadRequest(ref err) => { + try!(writeln!(f, "Bad Request ({}): {}", err.error.code, err.error.message)); + for err in err.error.errors.iter() { + try!(writeln!(f, " {}: {}, {}{}", + err.domain, + err.message, + err.reason, + match &err.location { + &Some(ref loc) => format!("@{}", loc), + &None => String::new(), + })); + } + Ok(()) + }, + Error::MissingToken(ref err) => + writeln!(f, "Token retrieval failed with error: {}", err), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref json_str, ref err) + => writeln!(f, "{}: {}", err, json_str), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(_, ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(_, ref err) => err.cause(), + _ => None + } + } +} + +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + +/// Contains information about an API request. +pub struct MethodInfo { + pub id: &'static str, + pub http_method: Method, +} + +const BOUNDARY: &'static str = "MDuXWGyeE33QFXGchb2VFWc4Z7945d"; + +/// Provides a `Read` interface that converts multiple parts into the protocol +/// identified by [RFC2387](https://tools.ietf.org/html/rfc2387). +/// **Note**: This implementation is just as rich as it needs to be to perform uploads +/// to google APIs, and might not be a fully-featured implementation. +#[derive(Default)] +pub struct MultiPartReader<'a> { + raw_parts: Vec<(Headers, &'a mut Read)>, + current_part: Option<(Cursor>, &'a mut Read)>, + last_part_boundary: Option>>, +} + +impl<'a> MultiPartReader<'a> { + + /// Reserve memory for exactly the given amount of parts + pub fn reserve_exact(&mut self, cap: usize) { + self.raw_parts.reserve_exact(cap); + } + + /// Add a new part to the queue of parts to be read on the first `read` call. + /// + /// # Arguments + /// + /// `headers` - identifying the body of the part. It's similar to the header + /// in an ordinary single-part call, and should thus contain the + /// same information. + /// `reader` - a reader providing the part's body + /// `size` - the amount of bytes provided by the reader. It will be put onto the header as + /// content-size. + /// `mime` - It will be put onto the content type + pub fn add_part(&mut self, reader: &'a mut Read, size: u64, mime_type: Mime) -> &mut MultiPartReader<'a> { + let mut headers = Headers::new(); + headers.set(ContentType(mime_type)); + headers.set(ContentLength(size)); + self.raw_parts.push((headers, reader)); + self + } + + /// Returns the mime-type representing our multi-part message. + /// Use it with the ContentType header. + pub fn mime_type(&self) -> Mime { + Mime( + TopLevel::Multipart, + SubLevel::Ext("Related".to_string()), + vec![(Attr::Ext("boundary".to_string()), Value::Ext(BOUNDARY.to_string()))], + ) + } + + /// Returns true if we are totally used + fn is_depleted(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_none() && self.last_part_boundary.is_none() + } + + /// Returns true if we are handling our last part + fn is_last_part(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_some() + } +} + +impl<'a> Read for MultiPartReader<'a> { + fn read(&mut self, buf: &mut [u8]) -> io::Result { + match (self.raw_parts.len(), + self.current_part.is_none(), + self.last_part_boundary.is_none()) { + (_, _, false) => { + let br = self.last_part_boundary.as_mut().unwrap().read(buf).unwrap_or(0); + if br < buf.len() { + self.last_part_boundary = None; + } + return Ok(br) + }, + (0, true, true) => return Ok(0), + (n, true, _) if n > 0 => { + let (headers, reader) = self.raw_parts.remove(0); + let mut c = Cursor::new(Vec::::new()); + (write!(&mut c, "{}--{}{}{}{}", LINE_ENDING, BOUNDARY, LINE_ENDING, + headers, LINE_ENDING)).unwrap(); + c.seek(SeekFrom::Start(0)).unwrap(); + self.current_part = Some((c, reader)); + } + _ => {}, + } + + // read headers as long as possible + let (hb, rr) = { + let &mut (ref mut c, ref mut reader) = self.current_part.as_mut().unwrap(); + let b = c.read(buf).unwrap_or(0); + (b, reader.read(&mut buf[b..])) + }; + + match rr { + Ok(bytes_read) => { + if hb < buf.len() && bytes_read == 0 { + if self.is_last_part() { + // before clearing the last part, we will add the boundary that + // will be written last + self.last_part_boundary = Some(Cursor::new( + format!("{}--{}--", LINE_ENDING, BOUNDARY).into_bytes())) + } + // We are depleted - this can trigger the next part to come in + self.current_part = None; + } + let mut total_bytes_read = hb + bytes_read; + while total_bytes_read < buf.len() && !self.is_depleted() { + match self.read(&mut buf[total_bytes_read ..]) { + Ok(br) => total_bytes_read += br, + Err(err) => return Err(err), + } + } + Ok(total_bytes_read) + } + Err(err) => { + // fail permanently + self.current_part = None; + self.last_part_boundary = None; + self.raw_parts.clear(); + Err(err) + } + } + } +} + +/// The `X-Upload-Content-Type` header. +/// +/// Generated via rustc --pretty expanded -Z unstable-options, and manually +/// processed to be more readable. +#[derive(PartialEq, Debug, Clone)] +pub struct XUploadContentType(pub Mime); + +impl ::std::ops::Deref for XUploadContentType { + type Target = Mime; + fn deref<'a>(&'a self) -> &'a Mime { &self.0 } +} +impl ::std::ops::DerefMut for XUploadContentType { + fn deref_mut<'a>(&'a mut self) -> &'a mut Mime { &mut self.0 } +} +impl Header for XUploadContentType { + fn header_name() -> &'static str { "X-Upload-Content-Type" } + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + hyper::header::parsing::from_one_raw_str(raw).map(XUploadContentType) + } +} +impl HeaderFormat for XUploadContentType { + fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result { + Display::fmt(&**self, f) + } +} +impl Display for XUploadContentType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&**self, f) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct Chunk { + pub first: u64, + pub last: u64 +} + +impl fmt::Display for Chunk { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + (write!(fmt, "{}-{}", self.first, self.last)).ok(); + Ok(()) + } +} + +impl FromStr for Chunk { + type Err = &'static str; + + /// NOTE: only implements `%i-%i`, not `*` + fn from_str(s: &str) -> std::result::Result { + let parts: Vec<&str> = s.split('-').collect(); + if parts.len() != 2 { + return Err("Expected two parts: %i-%i") + } + Ok( + Chunk { + first: match FromStr::from_str(parts[0]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'first' as digit") + }, + last: match FromStr::from_str(parts[1]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'last' as digit") + } + } + ) + } +} + +/// Implements the Content-Range header, for serialization only +#[derive(Clone, PartialEq, Debug)] +pub struct ContentRange { + pub range: Option, + pub total_length: u64, +} + +impl Header for ContentRange { + fn header_name() -> &'static str { + "Content-Range" + } + + /// We are not parsable, as parsing is done by the `Range` header + fn parse_header(_: &[Vec]) -> hyper::error::Result { + Err(hyper::error::Error::Method) + } +} + + +impl HeaderFormat for ContentRange { + fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + try!(fmt.write_str("bytes ")); + match self.range { + Some(ref c) => try!(c.fmt(fmt)), + None => try!(fmt.write_str("*")) + } + (write!(fmt, "/{}", self.total_length)).ok(); + Ok(()) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct RangeResponseHeader(pub Chunk); + +impl Header for RangeResponseHeader { + fn header_name() -> &'static str { + "Range" + } + + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + if raw.len() > 0 { + let v = &raw[0]; + if let Ok(s) = std::str::from_utf8(v) { + const PREFIX: &'static str = "bytes "; + if s.starts_with(PREFIX) { + if let Ok(c) = ::from_str(&s[PREFIX.len()..]) { + return Ok(RangeResponseHeader(c)) + } + } + } + } + Err(hyper::error::Error::Method) + } +} + +impl HeaderFormat for RangeResponseHeader { + /// No implmentation necessary, we just need to parse + fn fmt_header(&self, _: &mut fmt::Formatter) -> fmt::Result { + Err(fmt::Error) + } +} + +/// A utility type to perform a resumable upload from start to end. +pub struct ResumableUploadHelper<'a, A: 'a> { + pub client: &'a mut hyper::client::Client, + pub delegate: &'a mut Delegate, + pub start_at: Option, + pub auth: &'a mut A, + pub user_agent: &'a str, + pub auth_header: Authorization, + pub url: &'a str, + pub reader: &'a mut ReadSeek, + pub media_type: Mime, + pub content_length: u64 +} + +impl<'a, A> ResumableUploadHelper<'a, A> + where A: oauth2::GetToken { + + fn query_transfer_status(&mut self) -> std::result::Result> { + loop { + match self.client.post(self.url) + .header(UserAgent(self.user_agent.to_string())) + .header(ContentRange { range: None, total_length: self.content_length }) + .header(self.auth_header.clone()) + .send() { + Ok(r) => { + // 308 = resume-incomplete == PermanentRedirect + let headers = r.headers.clone(); + let h: &RangeResponseHeader = match headers.get() { + Some(hh) if r.status == StatusCode::PermanentRedirect => hh, + None|Some(_) => { + if let Retry::After(d) = self.delegate.http_failure(&r, None, None) { + sleep(d); + continue; + } + return Err(Ok(r)) + } + }; + return Ok(h.0.last) + } + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Err(Err(err)) + } + } + } + } + + /// returns None if operation was cancelled by delegate, or the HttpResult. + /// It can be that we return the result just because we didn't understand the status code - + /// caller should check for status himself before assuming it's OK to use + pub fn upload(&mut self) -> Option> { + let mut start = match self.start_at { + Some(s) => s, + None => match self.query_transfer_status() { + Ok(s) => s, + Err(result) => return Some(result) + } + }; + + const MIN_CHUNK_SIZE: u64 = 1 << 18; + let chunk_size = match self.delegate.chunk_size() { + cs if cs > MIN_CHUNK_SIZE => cs, + _ => MIN_CHUNK_SIZE + }; + + self.reader.seek(SeekFrom::Start(start)).unwrap(); + loop { + let request_size = match self.content_length - start { + rs if rs > chunk_size => chunk_size, + rs => rs + }; + + let mut section_reader = self.reader.take(request_size); + let range_header = ContentRange { + range: Some(Chunk {first: start, last: start + request_size - 1}), + total_length: self.content_length + }; + start += request_size; + if self.delegate.cancel_chunk_upload(&range_header) { + return None + } + let res = self.client.post(self.url) + .header(range_header) + .header(ContentType(self.media_type.clone())) + .header(UserAgent(self.user_agent.to_string())) + .body(&mut section_reader) + .send(); + match res { + Ok(mut res) => { + if res.status == StatusCode::PermanentRedirect { + continue + } + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let Retry::After(d) = self.delegate.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + } + return Some(Ok(res)) + }, + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Some(Err(err)) + } + } + } + } +} + +// Copy of src/rust/cli/cmn.rs +// TODO(ST): Allow sharing common code between program types +pub fn remove_json_null_values(value: &mut json::value::Value) { + match *value { + json::value::Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} diff --git a/gen/searchconsole1/src/lib.rs b/gen/searchconsole1/src/lib.rs new file mode 100644 index 0000000000..22bd76214f --- /dev/null +++ b/gen/searchconsole1/src/lib.rs @@ -0,0 +1,731 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/api/lib.rs.mako' +// DO NOT EDIT ! + +//! This documentation was generated from *Search Console* crate version *1.0.4+20170520*, where *20170520* is the exact revision of the *searchconsole:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! +//! Everything else about the *Search Console* *v1* API can be found at the +//! [official documentation site](https://developers.google.com/webmaster-tools/search-console-api/). +//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/searchconsole1). +//! # Features +//! +//! Handle the following *Resources* with ease from the central [hub](struct.SearchConsole.html) ... +//! +//! * url testing tools +//! * [*mobile friendly test run*](struct.UrlTestingToolMobileFriendlyTestRunCall.html) +//! +//! +//! +//! +//! 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](struct.SearchConsole.html)** +//! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) +//! * **[Resources](trait.Resource.html)** +//! * primary types that you can apply *Activities* to +//! * a collection of properties and *Parts* +//! * **[Parts](trait.Part.html)** +//! * a collection of properties +//! * never directly used in *Activities* +//! * **[Activities](trait.CallBuilder.html)** +//! * operations to apply to *Resources* +//! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! +//! Generally speaking, you can invoke *Activities* like this: +//! +//! ```Rust,ignore +//! let r = hub.resource().activity(...).doit() +//! ``` +//! +//! Or specifically ... +//! +//! ```ignore +//! let r = hub.url_testing_tools().mobile_friendly_test_run(...).doit() +//! ``` +//! +//! 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-searchconsole1 = "*" +//! ``` +//! +//! ## A complete example +//! +//! ```test_harness,no_run +//! extern crate hyper; +//! extern crate yup_oauth2 as oauth2; +//! extern crate google_searchconsole1 as searchconsole1; +//! use searchconsole1::RunMobileFriendlyTestRequest; +//! use searchconsole1::{Result, Error}; +//! # #[test] fn egal() { +//! use std::default::Default; +//! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +//! use searchconsole1::SearchConsole; +//! +//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and +//! // `client_secret`, among other things. +//! let secret: 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 = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +//! hyper::Client::new(), +//! ::default(), None); +//! let mut hub = SearchConsole::new(hyper::Client::new(), 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 = RunMobileFriendlyTestRequest::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.url_testing_tools().mobile_friendly_test_run(req) +//! .doit(); +//! +//! 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::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](enum.Result.html) enumeration as return value of +//! the doit() methods, or handed as possibly intermediate results to either the +//! [Hub Delegate](trait.Delegate.html), 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](enum.Result.html), should be +//! read by you to obtain the media. +//! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. +//! 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](trait.Delegate.html) to the +//! [Method Builder](trait.CallBuilder.html) 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](trait.Delegate.html) 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 [enocodable](trait.RequestValue.html) and +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are 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](trait.CallBuilder.html), 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](trait.RequestValue.html) 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 +//! +//! + +// 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/mako/api/lib.rs.mako' +// DO NOT EDIT ! + +#[macro_use] +extern crate serde_derive; + +extern crate hyper; +extern crate serde; +extern crate serde_json; +extern crate yup_oauth2 as oauth2; +extern crate mime; +extern crate url; + +mod cmn; + +use std::collections::HashMap; +use std::cell::RefCell; +use std::borrow::BorrowMut; +use std::default::Default; +use std::collections::BTreeMap; +use serde_json as json; +use std::io; +use std::fs; +use std::thread::sleep; +use std::time::Duration; + +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, + ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, + Resource, ErrorResponse, remove_json_null_values}; + + +// ############## +// UTILITIES ### +// ############ + + + + +// ######## +// HUB ### +// ###### + +/// Central instance to access all SearchConsole related resource activities +/// +/// # Examples +/// +/// Instantiate a new hub +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_searchconsole1 as searchconsole1; +/// use searchconsole1::RunMobileFriendlyTestRequest; +/// use searchconsole1::{Result, Error}; +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use searchconsole1::SearchConsole; +/// +/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and +/// // `client_secret`, among other things. +/// let secret: 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 = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = SearchConsole::new(hyper::Client::new(), 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 = RunMobileFriendlyTestRequest::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.url_testing_tools().mobile_friendly_test_run(req) +/// .doit(); +/// +/// 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::MissingAPIKey +/// |Error::MissingToken(_) +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::BadRequest(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_, _) => println!("{}", e), +/// }, +/// Ok(res) => println!("Success: {:?}", res), +/// } +/// # } +/// ``` +pub struct SearchConsole { + client: RefCell, + auth: RefCell, + _user_agent: String, +} + +impl<'a, C, A> Hub for SearchConsole {} + +impl<'a, C, A> SearchConsole + where C: BorrowMut, A: oauth2::GetToken { + + pub fn new(client: C, authenticator: A) -> SearchConsole { + SearchConsole { + client: RefCell::new(client), + auth: RefCell::new(authenticator), + _user_agent: "google-api-rust-client/1.0.4".to_string(), + } + } + + pub fn url_testing_tools(&'a self) -> UrlTestingToolMethods<'a, C, A> { + UrlTestingToolMethods { hub: &self } + } + + /// Set the user-agent header field to use in all requests to the server. + /// It defaults to `google-api-rust-client/1.0.4`. + /// + /// Returns the previously set user-agent. + pub fn user_agent(&mut self, agent_name: String) -> String { + let prev = self._user_agent.clone(); + self._user_agent = agent_name; + prev + } +} + + +// ############ +// SCHEMAS ### +// ########## +/// Information about a resource with issue. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ResourceIssue { + /// Describes a blocked resource issue. + #[serde(rename="blockedResource")] + pub blocked_resource: Option, +} + +impl Part for ResourceIssue {} + + +/// Final state of the test, including error details if necessary. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestStatus { + /// Status of the test. + pub status: Option, + /// Error details if applicable. + pub details: Option, +} + +impl Part for TestStatus {} + + +/// Mobile-friendly issue. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct MobileFriendlyIssue { + /// Rule violated. + pub rule: Option, +} + +impl Part for MobileFriendlyIssue {} + + +/// Mobile-friendly test request. +/// +/// # 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*). +/// +/// * [mobile friendly test run url testing tools](struct.UrlTestingToolMobileFriendlyTestRunCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct RunMobileFriendlyTestRequest { + /// URL for inspection. + pub url: Option, + /// Whether or not screenshot is requested. Default is false. + #[serde(rename="requestScreenshot")] + pub request_screenshot: Option, +} + +impl RequestValue for RunMobileFriendlyTestRequest {} + + +/// Mobile-friendly test response, including mobile-friendly issues and resource +/// issues. +/// +/// # 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*). +/// +/// * [mobile friendly test run url testing tools](struct.UrlTestingToolMobileFriendlyTestRunCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct RunMobileFriendlyTestResponse { + /// Final state of the test, can be either complete or an error. + #[serde(rename="testStatus")] + pub test_status: Option, + /// Information about embedded resources issues. + #[serde(rename="resourceIssues")] + pub resource_issues: Option>, + /// Test verdict, whether the page is mobile friendly or not. + #[serde(rename="mobileFriendliness")] + pub mobile_friendliness: Option, + /// Screenshot of the requested URL. + pub screenshot: Option, + /// List of mobile-usability issues. + #[serde(rename="mobileFriendlyIssues")] + pub mobile_friendly_issues: Option>, +} + +impl ResponseResult for RunMobileFriendlyTestResponse {} + + +/// Describe image data. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Image { + /// The mime-type of the image data. + #[serde(rename="mimeType")] + pub mime_type: Option, + /// Image data in format determined by the mime type. Currently, the format + /// will always be "image/png", but this might change in the future. + pub data: Option, +} + +impl Part for Image {} + + +/// Blocked resource. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BlockedResource { + /// URL of the blocked resource. + pub url: Option, +} + +impl Part for BlockedResource {} + + + +// ################### +// MethodBuilders ### +// ################# + +/// A builder providing access to all methods supported on *urlTestingTool* resources. +/// It is not used directly, but through the `SearchConsole` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_searchconsole1 as searchconsole1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use searchconsole1::SearchConsole; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = SearchConsole::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `mobile_friendly_test_run(...)` +/// // to build up your call. +/// let rb = hub.url_testing_tools(); +/// # } +/// ``` +pub struct UrlTestingToolMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a SearchConsole, +} + +impl<'a, C, A> MethodsBuilder for UrlTestingToolMethods<'a, C, A> {} + +impl<'a, C, A> UrlTestingToolMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Runs Mobile-Friendly Test for a given URL. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn mobile_friendly_test_run(&self, request: RunMobileFriendlyTestRequest) -> UrlTestingToolMobileFriendlyTestRunCall<'a, C, A> { + UrlTestingToolMobileFriendlyTestRunCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _additional_params: Default::default(), + } + } +} + + + + + +// ################### +// CallBuilders ### +// ################# + +/// Runs Mobile-Friendly Test for a given URL. +/// +/// A builder for the *mobileFriendlyTest.run* method supported by a *urlTestingTool* resource. +/// It is not used directly, but through a `UrlTestingToolMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_searchconsole1 as searchconsole1; +/// use searchconsole1::RunMobileFriendlyTestRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use searchconsole1::SearchConsole; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = SearchConsole::new(hyper::Client::new(), 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 = RunMobileFriendlyTestRequest::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.url_testing_tools().mobile_friendly_test_run(req) +/// .doit(); +/// # } +/// ``` +pub struct UrlTestingToolMobileFriendlyTestRunCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a SearchConsole, + _request: RunMobileFriendlyTestRequest, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for UrlTestingToolMobileFriendlyTestRunCall<'a, C, A> {} + +impl<'a, C, A> UrlTestingToolMobileFriendlyTestRunCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, RunMobileFriendlyTestResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "searchconsole.urlTestingTools.mobileFriendlyTest.run", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://searchconsole.googleapis.com/v1/urlTestingTools/mobileFriendlyTest:run".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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 { + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: RunMobileFriendlyTestRequest) -> UrlTestingToolMobileFriendlyTestRunCall<'a, C, A> { + self._request = 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. + /// + /// 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 Delegate) -> UrlTestingToolMobileFriendlyTestRunCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> UrlTestingToolMobileFriendlyTestRunCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + + diff --git a/gen/serviceregistryalpha-cli/Cargo.toml b/gen/serviceregistryalpha-cli/Cargo.toml index a415be4e35..552f0a3ac2 100644 --- a/gen/serviceregistryalpha-cli/Cargo.toml +++ b/gen/serviceregistryalpha-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/siteverification1-cli/Cargo.toml b/gen/siteverification1-cli/Cargo.toml index f1ce8e332d..7003225a01 100644 --- a/gen/siteverification1-cli/Cargo.toml +++ b/gen/siteverification1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-siteverification1-cli" -version = "1.0.4+20160228" +version = "1.0.4+20161114" authors = ["Sebastian Thiel "] description = "A complete library to interact with siteVerification (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/siteverification1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-siteverification1] path = "../siteverification1" -version = "1.0.4+20160228" +version = "1.0.4+20161114" diff --git a/gen/siteverification1-cli/README.md b/gen/siteverification1-cli/README.md index 5e656229fa..4a56983c62 100644 --- a/gen/siteverification1-cli/README.md +++ b/gen/siteverification1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *siteVerification* API at revision *20160228*. The CLI is at version *1.0.4*. +This documentation was generated from the *siteVerification* API at revision *20161114*. The CLI is at version *1.0.4*. ```bash siteverification1 [options] diff --git a/gen/siteverification1-cli/mkdocs.yml b/gen/siteverification1-cli/mkdocs.yml index 67192bd499..5870bd288e 100644 --- a/gen/siteverification1-cli/mkdocs.yml +++ b/gen/siteverification1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: siteVerification v1.0.4+20160228 +site_name: siteVerification v1.0.4+20161114 site_url: http://byron.github.io/google-apis-rs/google-siteverification1-cli site_description: A complete library to interact with siteVerification (protocol v1) diff --git a/gen/siteverification1-cli/src/main.rs b/gen/siteverification1-cli/src/main.rs index 532dd7af23..721d4c2fe9 100644 --- a/gen/siteverification1-cli/src/main.rs +++ b/gen/siteverification1-cli/src/main.rs @@ -828,7 +828,7 @@ fn main() { let mut app = App::new("siteverification1") .author("Sebastian Thiel ") - .version("1.0.4+20160228") + .version("1.0.4+20161114") .about("Verifies ownership of websites or domains with Google.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_siteverification1_cli") .arg(Arg::with_name("url") diff --git a/gen/siteverification1/Cargo.toml b/gen/siteverification1/Cargo.toml index efcb9d1d23..22e8ea8386 100644 --- a/gen/siteverification1/Cargo.toml +++ b/gen/siteverification1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-siteverification1" -version = "1.0.4+20160228" +version = "1.0.4+20161114" authors = ["Sebastian Thiel "] description = "A complete library to interact with siteVerification (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/siteverification1" homepage = "https://developers.google.com/site-verification/" -documentation = "https://docs.rs/google-siteverification1/1.0.4+20160228" +documentation = "https://docs.rs/google-siteverification1/1.0.4+20161114" license = "MIT" keywords = ["siteVerification", "google", "protocol", "web", "api"] diff --git a/gen/siteverification1/README.md b/gen/siteverification1/README.md index d0b74da12c..4d0b894cd4 100644 --- a/gen/siteverification1/README.md +++ b/gen/siteverification1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-siteverification1` library allows access to all features of the *Google siteVerification* service. -This documentation was generated from *siteVerification* crate version *1.0.4+20160228*, where *20160228* is the exact revision of the *siteVerification:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *siteVerification* crate version *1.0.4+20161114*, where *20161114* is the exact revision of the *siteVerification:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *siteVerification* *v1* API can be found at the [official documentation site](https://developers.google.com/site-verification/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/struct.SiteVerification.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/struct.SiteVerification.html) ... * web resource - * [*delete*](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/struct.WebResourceDeleteCall.html), [*get*](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/struct.WebResourceGetCall.html), [*get token*](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/struct.WebResourceGetTokenCall.html), [*insert*](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/struct.WebResourceInsertCall.html), [*list*](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/struct.WebResourceListCall.html), [*patch*](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/struct.WebResourcePatchCall.html) and [*update*](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/struct.WebResourceUpdateCall.html) + * [*delete*](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/struct.WebResourceDeleteCall.html), [*get*](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/struct.WebResourceGetCall.html), [*get token*](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/struct.WebResourceGetTokenCall.html), [*insert*](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/struct.WebResourceInsertCall.html), [*list*](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/struct.WebResourceListCall.html), [*patch*](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/struct.WebResourcePatchCall.html) and [*update*](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/struct.WebResourceUpdateCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/struct.SiteVerification.html)** +* **[Hub](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/struct.SiteVerification.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.Part.html)** + * **[Parts](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -124,17 +124,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.Delegate.html), 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-siteverification1/1.0.4+20160228/google_siteverification1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.ResponseResult.html), 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")`. @@ -144,29 +144,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.CallBuilder.html) 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-siteverification1/1.0.4+20160228/google_siteverification1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-siteverification1/1.0.4+20160228/google_siteverification1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.CallBuilder.html), 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-siteverification1/1.0.4+20160228/google_siteverification1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-siteverification1/1.0.4+20161114/google_siteverification1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/siteverification1/src/lib.rs b/gen/siteverification1/src/lib.rs index 016552d246..75331c198c 100644 --- a/gen/siteverification1/src/lib.rs +++ b/gen/siteverification1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *siteVerification* crate version *1.0.4+20160228*, where *20160228* is the exact revision of the *siteVerification:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *siteVerification* crate version *1.0.4+20161114*, where *20161114* is the exact revision of the *siteVerification:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *siteVerification* *v1* API can be found at the //! [official documentation site](https://developers.google.com/site-verification/). diff --git a/gen/slides1-cli/Cargo.toml b/gen/slides1-cli/Cargo.toml index e89ff9348c..a470598ca6 100644 --- a/gen/slides1-cli/Cargo.toml +++ b/gen/slides1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-slides1-cli" -version = "1.0.4+20161213" +version = "1.0.4+20170509" authors = ["Sebastian Thiel "] description = "A complete library to interact with Slides (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/slides1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-slides1] path = "../slides1" -version = "1.0.4+20161213" +version = "1.0.4+20170509" diff --git a/gen/slides1/Cargo.toml b/gen/slides1/Cargo.toml index 342bbf6a22..29d81976dc 100644 --- a/gen/slides1/Cargo.toml +++ b/gen/slides1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-slides1" -version = "1.0.4+20161213" +version = "1.0.4+20170509" authors = ["Sebastian Thiel "] description = "A complete library to interact with Slides (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/slides1" homepage = "https://developers.google.com/slides/" -documentation = "https://docs.rs/google-slides1/1.0.4+20161213" +documentation = "https://docs.rs/google-slides1/1.0.4+20170509" license = "MIT" keywords = ["slides", "google", "protocol", "web", "api"] diff --git a/gen/slides1/README.md b/gen/slides1/README.md index 22d12f8c0c..2aa96dd17d 100644 --- a/gen/slides1/README.md +++ b/gen/slides1/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-slides1` library allows access to all features of the *Google Slides* service. -This documentation was generated from *Slides* crate version *1.0.4+20161213*, where *20161213* is the exact revision of the *slides:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Slides* crate version *1.0.4+20170509*, where *20170509* is the exact revision of the *slides:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *Slides* *v1* API can be found at the [official documentation site](https://developers.google.com/slides/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/struct.Slides.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/struct.Slides.html) ... -* [presentations](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/struct.Presentation.html) - * [*batch update*](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/struct.PresentationBatchUpdateCall.html), [*create*](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/struct.PresentationCreateCall.html), [*get*](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/struct.PresentationGetCall.html) and [*pages get*](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/struct.PresentationPageGetCall.html) +* [presentations](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/struct.Presentation.html) + * [*batch update*](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/struct.PresentationBatchUpdateCall.html), [*create*](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/struct.PresentationCreateCall.html), [*get*](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/struct.PresentationGetCall.html), [*pages get*](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/struct.PresentationPageGetCall.html) and [*pages get thumbnail*](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/struct.PresentationPageGetThumbnailCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/struct.Slides.html)** +* **[Hub](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/struct.Slides.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.Part.html)** + * **[Parts](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -51,6 +51,7 @@ let r = hub.presentations().create(...).doit() let r = hub.presentations().get(...).doit() let r = hub.presentations().batch_update(...).doit() let r = hub.presentations().pages_get(...).doit() +let r = hub.presentations().pages_get_thumbnail(...).doit() ``` The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -75,7 +76,6 @@ google-slides1 = "*" extern crate hyper; extern crate yup_oauth2 as oauth2; extern crate google_slides1 as slides1; -use slides1::BatchUpdatePresentationRequest; use slides1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -93,15 +93,12 @@ let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::new(), ::default(), None); let mut hub = Slides::new(hyper::Client::new(), 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 = BatchUpdatePresentationRequest::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.presentations().batch_update(req, "presentationId") +let result = hub.presentations().pages_get_thumbnail("presentationId", "pageObjectId") + .thumbnail_properties_thumbnail_size("Stet") + .thumbnail_properties_mime_type("sed") .doit(); match result { @@ -124,17 +121,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.Delegate.html), 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-slides1/1.0.4+20161213/google_slides1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.ResponseResult.html), 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")`. @@ -144,29 +141,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.CallBuilder.html) 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-slides1/1.0.4+20161213/google_slides1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-slides1/1.0.4+20161213/google_slides1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.CallBuilder.html), 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-slides1/1.0.4+20161213/google_slides1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-slides1/1.0.4+20170509/google_slides1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/slides1/src/lib.rs b/gen/slides1/src/lib.rs index e8aa7d38be..f9593c9b5d 100644 --- a/gen/slides1/src/lib.rs +++ b/gen/slides1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Slides* crate version *1.0.4+20161213*, where *20161213* is the exact revision of the *slides:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Slides* crate version *1.0.4+20170509*, where *20170509* is the exact revision of the *slides:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *Slides* *v1* API can be found at the //! [official documentation site](https://developers.google.com/slides/). @@ -12,7 +12,7 @@ //! Handle the following *Resources* with ease from the central [hub](struct.Slides.html) ... //! //! * [presentations](struct.Presentation.html) -//! * [*batch update*](struct.PresentationBatchUpdateCall.html), [*create*](struct.PresentationCreateCall.html), [*get*](struct.PresentationGetCall.html) and [*pages get*](struct.PresentationPageGetCall.html) +//! * [*batch update*](struct.PresentationBatchUpdateCall.html), [*create*](struct.PresentationCreateCall.html), [*get*](struct.PresentationGetCall.html), [*pages get*](struct.PresentationPageGetCall.html) and [*pages get thumbnail*](struct.PresentationPageGetThumbnailCall.html) //! //! //! @@ -51,6 +51,7 @@ //! let r = hub.presentations().get(...).doit() //! let r = hub.presentations().batch_update(...).doit() //! let r = hub.presentations().pages_get(...).doit() +//! let r = hub.presentations().pages_get_thumbnail(...).doit() //! ``` //! //! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -75,7 +76,6 @@ //! extern crate hyper; //! extern crate yup_oauth2 as oauth2; //! extern crate google_slides1 as slides1; -//! use slides1::BatchUpdatePresentationRequest; //! use slides1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; @@ -94,15 +94,12 @@ //! hyper::Client::new(), //! ::default(), None); //! let mut hub = Slides::new(hyper::Client::new(), 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 = BatchUpdatePresentationRequest::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.presentations().batch_update(req, "presentationId") +//! let result = hub.presentations().pages_get_thumbnail("presentationId", "pageObjectId") +//! .thumbnail_properties_thumbnail_size("kasd") +//! .thumbnail_properties_mime_type("accusam") //! .doit(); //! //! match result { @@ -278,7 +275,6 @@ impl Default for Scope { /// extern crate hyper; /// extern crate yup_oauth2 as oauth2; /// extern crate google_slides1 as slides1; -/// use slides1::BatchUpdatePresentationRequest; /// use slides1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; @@ -297,15 +293,12 @@ impl Default for Scope { /// hyper::Client::new(), /// ::default(), None); /// let mut hub = Slides::new(hyper::Client::new(), 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 = BatchUpdatePresentationRequest::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.presentations().batch_update(req, "presentationId") +/// let result = hub.presentations().pages_get_thumbnail("presentationId", "pageObjectId") +/// .thumbnail_properties_thumbnail_size("amet.") +/// .thumbnail_properties_mime_type("erat") /// .doit(); /// /// match result { @@ -390,6 +383,36 @@ pub struct ReplaceAllShapesWithImageRequest { impl Part for ReplaceAllShapesWithImageRequest {} +/// Replaces all shapes that match the given criteria with the provided Google +/// Sheets chart. The chart will be scaled and centered to fit within the bounds +/// of the original shape. +/// +/// NOTE: Replacing shapes with a chart requires at least one of the +/// spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ReplaceAllShapesWithSheetsChartRequest { + /// The ID of the Google Sheets spreadsheet that contains the chart. + #[serde(rename="spreadsheetId")] + pub spreadsheet_id: Option, + /// The ID of the specific chart in the Google Sheets spreadsheet. + #[serde(rename="chartId")] + pub chart_id: Option, + /// The mode with which the chart is linked to the source spreadsheet. When + /// not specified, the chart will be an image that is not linked. + #[serde(rename="linkingMode")] + pub linking_mode: Option, + /// The criteria that the shapes must match in order to be replaced. The + /// request will replace all of the shapes that contain the given text. + #[serde(rename="containsText")] + pub contains_text: Option, +} + +impl Part for ReplaceAllShapesWithSheetsChartRequest {} + + /// A PageElement kind representing a /// joined collection of PageElements. /// @@ -451,6 +474,32 @@ pub struct StretchedPictureFill { impl Part for StretchedPictureFill {} +/// Represents a font family and weight used to style a TextRun. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct WeightedFontFamily { + /// The font family of the text. + /// + /// The font family can be any font from the Font menu in Slides or from + /// [Google Fonts] (https://fonts.google.com/). If the font name is + /// unrecognized, the text is rendered in `Arial`. + #[serde(rename="fontFamily")] + pub font_family: Option, + /// The rendered weight of the text. This field can have any value that is a + /// multiple of `100` between `100` and `900`, inclusive. This range + /// corresponds to the numerical values described in the CSS 2.1 + /// Specification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness), + /// with non-numerical values disallowed. Weights greater than or equal to + /// `700` are considered bold, and weights less than `700`are not bold. The + /// default value is `400` ("normal"). + pub weight: Option, +} + +impl Part for WeightedFontFamily {} + + /// Creates an image. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -561,16 +610,16 @@ pub struct CropProperties { /// The rotation angle of the crop window around its center, in radians. /// Rotation angle is applied after the offset. pub angle: Option, - /// The offset specifies the bottom edge of the crop rectangle that is located - /// above the original bounding rectangle bottom edge, relative to the object's - /// original height. - #[serde(rename="bottomOffset")] - pub bottom_offset: Option, /// The offset specifies the right edge of the crop rectangle that is located /// to the left of the original bounding rectangle right edge, relative to the /// object's original width. #[serde(rename="rightOffset")] pub right_offset: Option, + /// The offset specifies the bottom edge of the crop rectangle that is located + /// above the original bounding rectangle bottom edge, relative to the object's + /// original height. + #[serde(rename="bottomOffset")] + pub bottom_offset: Option, /// The offset specifies the top edge of the crop rectangle that is located /// below the original bounding rectangle top edge, relative to the object's /// original height. @@ -769,9 +818,6 @@ impl Part for SolidFill {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InsertTableColumnsRequest { - /// The table to insert columns into. - #[serde(rename="tableObjectId")] - pub table_object_id: Option, /// Whether to insert new columns to the right of the reference cell location. /// /// - `True`: insert to the right. @@ -787,6 +833,9 @@ pub struct InsertTableColumnsRequest { /// column will be inserted to the left (or right) of the merged cell. #[serde(rename="cellLocation")] pub cell_location: Option, + /// The table to insert columns into. + #[serde(rename="tableObjectId")] + pub table_object_id: Option, } impl Part for InsertTableColumnsRequest {} @@ -904,8 +953,8 @@ pub struct Response { /// The result of creating an image. #[serde(rename="createImage")] pub create_image: Option, - /// The result of replacing all shapes containing the specified text with - /// an image. + /// The result of replacing all shapes matching some criteria with an + /// image. #[serde(rename="replaceAllShapesWithImage")] pub replace_all_shapes_with_image: Option, /// The result of duplicating an object. @@ -932,6 +981,10 @@ pub struct Response { /// The result of creating a slide. #[serde(rename="createSlide")] pub create_slide: Option, + /// The result of replacing all shapes matching some criteria with a Google + /// Sheets chart. + #[serde(rename="replaceAllShapesWithSheetsChart")] + pub replace_all_shapes_with_sheets_chart: Option, } impl Part for Response {} @@ -969,46 +1022,66 @@ impl Part for CreateTableResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ParagraphStyle { - /// The spacing mode for the paragraph. This property is read-only. + /// The spacing mode for the paragraph. #[serde(rename="spacingMode")] pub spacing_mode: Option, - /// The text direction of this paragraph. This property is read-only. + /// The text direction of this paragraph. If unset, the value defaults to + /// LEFT_TO_RIGHT since + /// text direction is not inherited. pub direction: Option, /// The amount of extra space above the paragraph. If unset, the value is - /// inherited from the parent. This property is read-only. + /// inherited from the parent. #[serde(rename="spaceBelow")] pub space_below: Option, /// The amount of space between lines, as a percentage of normal, where normal /// is represented as 100.0. If unset, the value is inherited from the parent. - /// This property is read-only. #[serde(rename="lineSpacing")] pub line_spacing: Option, /// The amount indentation for the paragraph on the side that corresponds to /// the start of the text, based on the current text direction. If unset, the - /// value is inherited from the parent. This property is read-only. + /// value is inherited from the parent. #[serde(rename="indentStart")] pub indent_start: Option, /// The amount of extra space above the paragraph. If unset, the value is - /// inherited from the parent. This property is read-only. + /// inherited from the parent. #[serde(rename="spaceAbove")] pub space_above: Option, /// The amount indentation for the paragraph on the side that corresponds to /// the end of the text, based on the current text direction. If unset, the - /// value is inherited from the parent. This property is read-only. + /// value is inherited from the parent. #[serde(rename="indentEnd")] pub indent_end: Option, /// The amount of indentation for the start of the first line of the paragraph. - /// If unset, the value is inherited from the parent. This property is - /// read-only. + /// If unset, the value is inherited from the parent. #[serde(rename="indentFirstLine")] pub indent_first_line: Option, - /// The text alignment for this paragraph. This property is read-only. + /// The text alignment for this paragraph. pub alignment: Option, } impl Part for ParagraphStyle {} +/// The properties of Page that are only +/// relevant for pages with page_type NOTES. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct NotesProperties { + /// The object ID of the shape on this notes page that contains the speaker + /// notes for the corresponding slide. + /// The actual shape may not always exist on the notes page. Inserting text + /// using this object ID will automatically create the shape. In this case, the + /// actual shape may have different object ID. The `GetPresentation` or + /// `GetPage` action will always return the latest object ID. + #[serde(rename="speakerNotesObjectId")] + pub speaker_notes_object_id: Option, +} + +impl Part for NotesProperties {} + + /// Describes the bullet of a paragraph. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1217,19 +1290,19 @@ impl Part for LineFill {} /// Creates an embedded Google Sheets chart. /// -/// NOTE: Chart creation requires at least one of the spreadsheets.readonly, +/// NOTE: Chart creation requires at least one of the spreadsheets.readonly, /// spreadsheets, drive.readonly, or drive OAuth scopes. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreateSheetsChartRequest { - /// The ID of the specific chart in the Google Sheets spreadsheet. - #[serde(rename="chartId")] - pub chart_id: Option, /// The ID of the Google Sheets spreadsheet that contains the chart. #[serde(rename="spreadsheetId")] pub spreadsheet_id: Option, + /// The ID of the specific chart in the Google Sheets spreadsheet. + #[serde(rename="chartId")] + pub chart_id: Option, /// The mode with which the chart is linked to the source spreadsheet. When /// not specified, the chart will be an image that is not linked. #[serde(rename="linkingMode")] @@ -1277,6 +1350,17 @@ impl Part for ReplaceAllShapesWithImageResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SlideProperties { + /// The notes page that this slide is associated with. It defines the visual + /// appearance of a notes page when printing or exporting slides with speaker + /// notes. A notes page inherits properties from the + /// notes master. + /// The placeholder shape with type BODY on the notes page contains the speaker + /// notes for this slide. The ID of this shape is identified by the + /// speakerNotesObjectId field. + /// The notes page is read-only except for the text content and styles of the + /// speaker notes shape. + #[serde(rename="notesPage")] + pub notes_page: Option, /// The object ID of the layout that this slide is based on. #[serde(rename="layoutObjectId")] pub layout_object_id: Option, @@ -1305,11 +1389,28 @@ pub struct Page { /// The page elements rendered on the page. #[serde(rename="pageElements")] pub page_elements: Option>, + /// Notes specific properties. Only set if page_type = NOTES. + #[serde(rename="notesProperties")] + pub notes_properties: Option, /// The object ID for this page. Object IDs used by /// Page and /// PageElement share the same namespace. #[serde(rename="objectId")] pub object_id: Option, + /// The revision ID of the presentation containing this page. Can be used in + /// update requests to assert that the presentation revision hasn't changed + /// since the last read operation. Only populated if the user has edit access + /// to the presentation. + /// + /// The format of the revision ID may change over time, so it should be treated + /// opaquely. A returned revision ID is only guaranteed to be valid for 24 + /// hours after it has been returned and cannot be shared across users. If the + /// revision ID is unchanged between calls, then the presentation has not + /// changed. Conversely, a changed ID (for the same presentation and user) + /// usually means the presentation has been updated; however, a changed ID can + /// also be due to internal factors such as ID format changes. + #[serde(rename="revisionId")] + pub revision_id: Option, /// The properties of the page. #[serde(rename="pageProperties")] pub page_properties: Option, @@ -1431,12 +1532,6 @@ impl Part for PageElementProperties {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UpdateVideoPropertiesRequest { - /// The video properties to update. - #[serde(rename="videoProperties")] - pub video_properties: Option, - /// The object ID of the video the updates are applied to. - #[serde(rename="objectId")] - pub object_id: Option, /// The fields that should be updated. /// /// At least one field must be specified. The root `videoProperties` is @@ -1449,6 +1544,12 @@ pub struct UpdateVideoPropertiesRequest { /// To reset a property to its default value, include its field name in the /// field mask but leave the field itself unset. pub fields: Option, + /// The object ID of the video the updates are applied to. + #[serde(rename="objectId")] + pub object_id: Option, + /// The video properties to update. + #[serde(rename="videoProperties")] + pub video_properties: Option, } impl Part for UpdateVideoPropertiesRequest {} @@ -1504,6 +1605,32 @@ pub struct TableRow { impl Part for TableRow {} +/// Deletes bullets from all of the paragraphs that overlap with the given text +/// index range. +/// +/// The nesting level of each paragraph will be visually preserved by adding +/// indent to the start of the corresponding paragraph. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct DeleteParagraphBulletsRequest { + /// The range of text to delete bullets from, based on TextElement indexes. + #[serde(rename="textRange")] + pub text_range: Option, + /// The object ID of the shape or table containing the text to delete bullets + /// from. + #[serde(rename="objectId")] + pub object_id: Option, + /// The optional table cell location if the text to be modified is in a table + /// cell. If present, the object_id must refer to a table. + #[serde(rename="cellLocation")] + pub cell_location: Option, +} + +impl Part for DeleteParagraphBulletsRequest {} + + /// A PageElement kind representing /// a linked chart embedded from Google Sheets. /// @@ -1511,13 +1638,13 @@ impl Part for TableRow {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SheetsChart { + /// The ID of the Google Sheets spreadsheet that contains the source chart. + #[serde(rename="spreadsheetId")] + pub spreadsheet_id: Option, /// The ID of the specific chart in the Google Sheets spreadsheet that is /// embedded. #[serde(rename="chartId")] pub chart_id: Option, - /// The ID of the Google Sheets spreadsheet that contains the source chart. - #[serde(rename="spreadsheetId")] - pub spreadsheet_id: Option, /// The properties of the Sheets chart. #[serde(rename="sheetsChartProperties")] pub sheets_chart_properties: Option, @@ -1644,19 +1771,18 @@ pub struct AffineTransform { impl Part for AffineTransform {} -/// A width and height. +/// The result of creating an embedded Google Sheets chart. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Size { - /// The width of the object. - pub width: Option, - /// The height of the object. - pub height: Option, +pub struct CreateSheetsChartResponse { + /// The object ID of the created chart. + #[serde(rename="objectId")] + pub object_id: Option, } -impl Part for Size {} +impl Part for CreateSheetsChartResponse {} /// Inserts text into a shape or a table cell. @@ -1728,8 +1854,8 @@ pub struct TextStyle { /// transparent, depending on if the `opaque_color` field in it is set. #[serde(rename="foregroundColor")] pub foreground_color: Option, - /// Whether or not the text is bold. - pub bold: Option, + /// Whether or not the text is italicized. + pub italic: Option, /// The text's vertical offset from its normal position. /// /// Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically @@ -1739,6 +1865,37 @@ pub struct TextStyle { pub baseline_offset: Option, /// Whether or not the text is struck through. pub strikethrough: Option, + /// The font family and rendered weight of the text. + /// + /// This field is an extension of `font_family` meant to support explicit font + /// weights without breaking backwards compatibility. As such, when reading the + /// style of a range of text, the value of `weighted_font_family#font_family` + /// will always be equal to that of `font_family`. However, when writing, if + /// both fields are included in the field mask (either explicitly or through + /// the wildcard `"*"`), their values are reconciled as follows: + /// + /// * If `font_family` is set and `weighted_font_family` is not, the value of + /// `font_family` is applied with weight `400` ("normal"). + /// * If both fields are set, the value of `font_family` must match that of + /// `weighted_font_family#font_family`. If so, the font family and weight of + /// `weighted_font_family` is applied. Otherwise, a 400 bad request error is + /// returned. + /// * If `weighted_font_family` is set and `font_family` is not, the font + /// family and weight of `weighted_font_family` is applied. + /// * If neither field is set, the font family and weight of the text inherit + /// from the parent. Note that these properties cannot inherit separately + /// from each other. + /// + /// If an update request specifies values for both `weighted_font_family` and + /// `bold`, the `weighted_font_family` is applied first, then `bold`. + /// + /// If `weighted_font_family#weight` is not set, it defaults to `400`. + /// + /// If `weighted_font_family` is set, then `weighted_font_family#font_family` + /// must also be set with a non-empty value. Otherwise, a 400 bad request error + /// is returned. + #[serde(rename="weightedFontFamily")] + pub weighted_font_family: Option, /// Whether or not the text is in small capital letters. #[serde(rename="smallCaps")] pub small_caps: Option, @@ -1753,6 +1910,14 @@ pub struct TextStyle { /// `bold` value is used. #[serde(rename="fontFamily")] pub font_family: Option, + /// The size of the text's font. When read, the `font_size` will specified in + /// points. + #[serde(rename="fontSize")] + pub font_size: Option, + /// The background color of the text. If set, the color is either opaque or + /// transparent, depending on if the `opaque_color` field in it is set. + #[serde(rename="backgroundColor")] + pub background_color: Option, /// The hyperlink destination of the text. If unset, there is no link. Links /// are not inherited from parent text. /// @@ -1774,18 +1939,10 @@ pub struct TextStyle { /// text is another link) unless different styles are being set in the same /// request. pub link: Option, - /// Whether or not the text is italicized. - pub italic: Option, - /// The size of the text's font. When read, the `font_size` will specified in - /// points. - #[serde(rename="fontSize")] - pub font_size: Option, /// Whether or not the text is underlined. pub underline: Option, - /// The background color of the text. If set, the color is either opaque or - /// transparent, depending on if the `opaque_color` field in it is set. - #[serde(rename="backgroundColor")] - pub background_color: Option, + /// Whether or not the text is rendered as bold. + pub bold: Option, } impl Part for TextStyle {} @@ -1889,53 +2046,51 @@ pub struct InsertTableRowsRequest { impl Part for InsertTableRowsRequest {} -/// A Google Slides presentation. +/// Provides control over how write requests are executed. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct WriteControl { + /// The revision ID of the presentation required for the write request. If + /// specified and the `required_revision_id` doesn't exactly match the + /// presentation's current `revision_id`, the request will not be processed and + /// will return a 400 bad request error. + #[serde(rename="requiredRevisionId")] + pub required_revision_id: Option, +} + +impl Part for WriteControl {} + + +/// The thumbnail of a page. /// /// # 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*). /// -/// * [create presentations](struct.PresentationCreateCall.html) (request|response) -/// * [get presentations](struct.PresentationGetCall.html) (response) -/// * [batch update presentations](struct.PresentationBatchUpdateCall.html) (none) -/// * [pages get presentations](struct.PresentationPageGetCall.html) (none) +/// * [pages get thumbnail presentations](struct.PresentationPageGetThumbnailCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Presentation { - /// The slides in the presentation. - /// A slide inherits properties from a slide layout. - pub slides: Option>, - /// The ID of the presentation. - #[serde(rename="presentationId")] - pub presentation_id: Option, - /// The slide masters in the presentation. A slide master contains all common - /// page elements and the common properties for a set of layouts. They serve - /// three purposes: +pub struct Thumbnail { + /// The content URL of the thumbnail image. /// - /// - Placeholder shapes on a master contain the default text styles and shape - /// properties of all placeholder shapes on pages that use that master. - /// - The master page properties define the common page properties inherited by - /// its layouts. - /// - Any other shapes on the master slide will appear on all slides using that - /// master, regardless of their layout. - pub masters: Option>, - /// The size of pages in the presentation. - #[serde(rename="pageSize")] - pub page_size: Option, - /// The title of the presentation. - pub title: Option, - /// The locale of the presentation, as an IETF BCP 47 language tag. - pub locale: Option, - /// The layouts in the presentation. A layout is a template that determines - /// how content is arranged and styled on the slides that inherit from that - /// layout. - pub layouts: Option>, + /// The URL to the image has a default lifetime of 30 minutes. + /// This URL is tagged with the account of the requester. Anyone with the URL + /// effectively accesses the image as the original requester. Access to the + /// image may be lost if the presentation's sharing settings change. + /// The mime type of the thumbnail image is the same as specified in the + /// `GetPageThumbnailRequest`. + #[serde(rename="contentUrl")] + pub content_url: Option, + /// The positive width in pixels of the thumbnail image. + pub width: Option, + /// The positive height in pixels of the thumbnail image. + pub height: Option, } -impl RequestValue for Presentation {} -impl Resource for Presentation {} -impl ResponseResult for Presentation {} +impl ResponseResult for Thumbnail {} /// A PageElement kind representing @@ -2069,6 +2224,83 @@ pub struct DeleteTableRowRequest { impl Part for DeleteTableRowRequest {} +/// A Google Slides presentation. +/// +/// # 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*). +/// +/// * [create presentations](struct.PresentationCreateCall.html) (request|response) +/// * [get presentations](struct.PresentationGetCall.html) (response) +/// * [batch update presentations](struct.PresentationBatchUpdateCall.html) (none) +/// * [pages get presentations](struct.PresentationPageGetCall.html) (none) +/// * [pages get thumbnail presentations](struct.PresentationPageGetThumbnailCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Presentation { + /// The ID of the presentation. + #[serde(rename="presentationId")] + pub presentation_id: Option, + /// The slide masters in the presentation. A slide master contains all common + /// page elements and the common properties for a set of layouts. They serve + /// three purposes: + /// + /// - Placeholder shapes on a master contain the default text styles and shape + /// properties of all placeholder shapes on pages that use that master. + /// - The master page properties define the common page properties inherited by + /// its layouts. + /// - Any other shapes on the master slide will appear on all slides using that + /// master, regardless of their layout. + pub masters: Option>, + /// The size of pages in the presentation. + #[serde(rename="pageSize")] + pub page_size: Option, + /// The title of the presentation. + pub title: Option, + /// The locale of the presentation, as an IETF BCP 47 language tag. + pub locale: Option, + /// The revision ID of the presentation. Can be used in update requests + /// to assert that the presentation revision hasn't changed since the last + /// read operation. Only populated if the user has edit access to the + /// presentation. + /// + /// The format of the revision ID may change over time, so it should be treated + /// opaquely. A returned revision ID is only guaranteed to be valid for 24 + /// hours after it has been returned and cannot be shared across users. If the + /// revision ID is unchanged between calls, then the presentation has not + /// changed. Conversely, a changed ID (for the same presentation and user) + /// usually means the presentation has been updated; however, a changed ID can + /// also be due to internal factors such as ID format changes. + #[serde(rename="revisionId")] + pub revision_id: Option, + /// The notes master in the presentation. It serves three purposes: + /// + /// - Placeholder shapes on a notes master contain the default text styles and + /// shape properties of all placeholder shapes on notes pages. Specifically, + /// a `SLIDE_IMAGE` placeholder shape contains the slide thumbnail, and a + /// `BODY` placeholder shape contains the speaker notes. + /// - The notes master page properties define the common page properties + /// inherited by all notes pages. + /// - Any other shapes on the notes master will appear on all notes pages. + /// + /// The notes master is read-only. + #[serde(rename="notesMaster")] + pub notes_master: Option, + /// The slides in the presentation. + /// A slide inherits properties from a slide layout. + pub slides: Option>, + /// The layouts in the presentation. A layout is a template that determines + /// how content is arranged and styled on the slides that inherit from that + /// layout. + pub layouts: Option>, +} + +impl RequestValue for Presentation {} +impl Resource for Presentation {} +impl ResponseResult for Presentation {} + + /// The result of creating a video. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -2112,6 +2344,43 @@ pub struct UpdateShapePropertiesRequest { impl Part for UpdateShapePropertiesRequest {} +/// Updates the styling for all of the paragraphs within a Shape or Table that +/// overlap with the given text index range. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UpdateParagraphStyleRequest { + /// The fields that should be updated. + /// + /// At least one field must be specified. The root `style` is implied and + /// should not be specified. A single `"*"` can be used as short-hand for + /// listing every field. + /// + /// For example, to update the paragraph alignment, set `fields` to + /// `"alignment"`. + /// + /// To reset a property to its default value, include its field name in the + /// field mask but leave the field itself unset. + pub fields: Option, + /// The paragraph's style. + pub style: Option, + /// The location of the cell in the table containing the paragraph(s) to + /// style. If `object_id` refers to a table, `cell_location` must have a value. + /// Otherwise, it must not. + #[serde(rename="cellLocation")] + pub cell_location: Option, + /// The object ID of the shape or table with the text to be styled. + #[serde(rename="objectId")] + pub object_id: Option, + /// The range of text containing the paragraph(s) to style. + #[serde(rename="textRange")] + pub text_range: Option, +} + +impl Part for UpdateParagraphStyleRequest {} + + /// A hypertext link. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -2222,8 +2491,8 @@ pub struct Placeholder { /// not inherit properties from any other shape. #[serde(rename="parentObjectId")] pub parent_object_id: Option, - /// The index of the placeholder. If the same placeholder types are the present - /// in the same page, they would have different index values. + /// The index of the placeholder. If the same placeholder types are present in + /// the same page, they would have different index values. pub index: Option, /// The type of the placeholder. #[serde(rename="type")] @@ -2246,10 +2515,10 @@ pub struct UpdateTextStyleRequest { /// should not be specified. A single `"*"` can be used as short-hand for /// listing every field. /// - /// For example to update the text style to bold, set `fields` to `"bold"`. + /// For example, to update the text style to bold, set `fields` to `"bold"`. /// - /// To reset a property to its default value, - /// include its field name in the field mask but leave the field itself unset. + /// To reset a property to its default value, include its field name in the + /// field mask but leave the field itself unset. pub fields: Option, /// The style(s) to set on the text. /// @@ -2271,8 +2540,9 @@ pub struct UpdateTextStyleRequest { /// The object ID of the shape or table with the text to be styled. #[serde(rename="objectId")] pub object_id: Option, - /// The optional table cell location if the text to be styled is in a table - /// cell. If present, the object_id must refer to a table. + /// The location of the cell in the table containing the text to style. If + /// `object_id` refers to a table, `cell_location` must have a value. + /// Otherwise, it must not. #[serde(rename="cellLocation")] pub cell_location: Option, } @@ -2379,6 +2649,61 @@ pub struct CreateLineResponse { impl Part for CreateLineResponse {} +/// A List describes the look and feel of bullets belonging to paragraphs +/// associated with a list. A paragraph that is part of a list has an implicit +/// reference to that list's ID. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct List { + /// A map of nesting levels to the properties of bullets at the associated + /// level. A list has at most nine levels of nesting, so the possible values + /// for the keys of this map are 0 through 8, inclusive. + #[serde(rename="nestingLevel")] + pub nesting_level: Option>, + /// The ID of the list. + #[serde(rename="listId")] + pub list_id: Option, +} + +impl Part for List {} + + +/// The user-specified ID mapping for a placeholder that will be created on a +/// slide from a specified layout. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct LayoutPlaceholderIdMapping { + /// The placeholder on a layout that will be applied to a slide. Only type and index are needed. For example, a + /// predefined `TITLE_AND_BODY` layout may usually have a TITLE placeholder + /// with index 0 and a BODY placeholder with index 0. + #[serde(rename="layoutPlaceholder")] + pub layout_placeholder: Option, + /// A user-supplied object ID for the placeholder identified above that to be + /// created onto a slide. + /// + /// If you specify an ID, it must be unique among all pages and page elements + /// in the presentation. The ID must start with an alphanumeric character or an + /// underscore (matches regex `[a-zA-Z0-9_]`); remaining characters + /// may include those as well as a hyphen or colon (matches regex + /// `[a-zA-Z0-9_-:]`). + /// The length of the ID must not be less than 5 or greater than 50. + /// + /// If you don't specify an ID, a unique one is generated. + #[serde(rename="objectId")] + pub object_id: Option, + /// The object ID of the placeholder on a layout that will be applied + /// to a slide. + #[serde(rename="layoutPlaceholderObjectId")] + pub layout_placeholder_object_id: Option, +} + +impl Part for LayoutPlaceholderIdMapping {} + + /// A single kind of update to apply to a presentation. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -2400,6 +2725,9 @@ pub struct Request { /// Duplicates a slide or page element. #[serde(rename="duplicateObject")] pub duplicate_object: Option, + /// Updates the styling of paragraphs within a Shape or Table. + #[serde(rename="updateParagraphStyle")] + pub update_paragraph_style: Option, /// Refreshes a Google Sheets chart. #[serde(rename="refreshSheetsChart")] pub refresh_sheets_chart: Option, @@ -2430,6 +2758,9 @@ pub struct Request { /// Deletes a page or page element from the presentation. #[serde(rename="deleteObject")] pub delete_object: Option, + /// Replaces all shapes matching some criteria with a Google Sheets chart. + #[serde(rename="replaceAllShapesWithSheetsChart")] + pub replace_all_shapes_with_sheets_chart: Option, /// Creates an image. #[serde(rename="createImage")] pub create_image: Option, @@ -2442,76 +2773,47 @@ pub struct Request { /// Creates a new shape. #[serde(rename="createShape")] pub create_shape: Option, - /// Updates the transform of a page element. - #[serde(rename="updatePageElementTransform")] - pub update_page_element_transform: Option, + /// Inserts columns into a table. + #[serde(rename="insertTableColumns")] + pub insert_table_columns: Option, + /// Deletes bullets from paragraphs. + #[serde(rename="deleteParagraphBullets")] + pub delete_paragraph_bullets: Option, /// Creates bullets for paragraphs. #[serde(rename="createParagraphBullets")] pub create_paragraph_bullets: Option, - /// Updates the styling of text within a Shape or Table. - #[serde(rename="updateTextStyle")] - pub update_text_style: Option, + /// Updates the properties of a Line. + #[serde(rename="updateLineProperties")] + pub update_line_properties: Option, /// Deletes text from a shape or a table cell. #[serde(rename="deleteText")] pub delete_text: Option, /// Updates the properties of a Page. #[serde(rename="updatePageProperties")] pub update_page_properties: Option, - /// Updates the properties of a Line. - #[serde(rename="updateLineProperties")] - pub update_line_properties: Option, + /// Updates the styling of text within a Shape or Table. + #[serde(rename="updateTextStyle")] + pub update_text_style: Option, /// Updates the properties of a TableCell. #[serde(rename="updateTableCellProperties")] pub update_table_cell_properties: Option, /// Deletes a column from a table. #[serde(rename="deleteTableColumn")] pub delete_table_column: Option, - /// Inserts columns into a table. - #[serde(rename="insertTableColumns")] - pub insert_table_columns: Option, + /// Updates the transform of a page element. + #[serde(rename="updatePageElementTransform")] + pub update_page_element_transform: Option, } impl Part for Request {} -/// A List describes the look and feel of bullets belonging to paragraphs -/// associated with a list. A paragraph that is part of a list has an implicit -/// reference to that list's ID. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct List { - /// A map of nesting levels to the properties of bullets at the associated - /// level. A list has at most nine levels of nesting, so the possible values - /// for the keys of this map are 0 through 8, inclusive. - #[serde(rename="nestingLevel")] - pub nesting_level: Option>, - /// The ID of the list. - #[serde(rename="listId")] - pub list_id: Option, -} - -impl Part for List {} - - /// Update the properties of a TableCell. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UpdateTableCellPropertiesRequest { - /// The table range representing the subset of the table to which the updates - /// are applied. If a table range is not specified, the updates will apply to - /// the entire table. - #[serde(rename="tableRange")] - pub table_range: Option, - /// The table cell properties to update. - #[serde(rename="tableCellProperties")] - pub table_cell_properties: Option, - /// The object ID of the table. - #[serde(rename="objectId")] - pub object_id: Option, /// The fields that should be updated. /// /// At least one field must be specified. The root `tableCellProperties` is @@ -2524,6 +2826,17 @@ pub struct UpdateTableCellPropertiesRequest { /// To reset a property to its default value, include its field name in the /// field mask but leave the field itself unset. pub fields: Option, + /// The table cell properties to update. + #[serde(rename="tableCellProperties")] + pub table_cell_properties: Option, + /// The object ID of the table. + #[serde(rename="objectId")] + pub object_id: Option, + /// The table range representing the subset of the table to which the updates + /// are applied. If a table range is not specified, the updates will apply to + /// the entire table. + #[serde(rename="tableRange")] + pub table_range: Option, } impl Part for UpdateTableCellPropertiesRequest {} @@ -2537,11 +2850,11 @@ impl Part for UpdateTableCellPropertiesRequest {} #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Range { /// The optional zero-based index of the end of the collection. - /// Required for `SPECIFIC_RANGE` delete mode. + /// Required for `FIXED_RANGE` ranges. #[serde(rename="endIndex")] pub end_index: Option, /// The optional zero-based index of the beginning of the collection. - /// Required for `SPECIFIC_RANGE` and `FROM_START_INDEX` ranges. + /// Required for `FIXED_RANGE` and `FROM_START_INDEX` ranges. #[serde(rename="startIndex")] pub start_index: Option, /// The type of range. @@ -2624,12 +2937,12 @@ impl Part for CreateShapeRequest {} pub struct ColorStop { /// The color of the gradient stop. pub color: Option, - /// The relative position of the color stop in the gradient band measured - /// in percentage. The value should be in the interval [0.0, 1.0]. - pub position: Option, /// The alpha value of this color in the gradient band. Defaults to 1.0, /// fully opaque. pub alpha: Option, + /// The relative position of the color stop in the gradient band measured + /// in percentage. The value should be in the interval [0.0, 1.0]. + pub position: Option, } impl Part for ColorStop {} @@ -2669,6 +2982,11 @@ pub struct CreateSlideRequest { /// predefined layout `BLANK`. #[serde(rename="slideLayoutReference")] pub slide_layout_reference: Option, + /// An optional list of object ID mappings from the placeholder(s) on the layout to the placeholder(s) + /// that will be created on the new slide from that specified layout. Can only + /// be used when `slide_layout_reference` is specified. + #[serde(rename="placeholderIdMappings")] + pub placeholder_id_mappings: Option>, /// A user-supplied object ID. /// /// If you specify an ID, it must be unique among all pages and page elements @@ -2697,10 +3015,6 @@ impl Part for CreateSlideRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreateTableRequest { - /// Number of columns in the table. - pub columns: Option, - /// Number of rows in the table. - pub rows: Option, /// A user-supplied object ID. /// /// If you specify an ID, it must be unique among all pages and page elements @@ -2713,6 +3027,10 @@ pub struct CreateTableRequest { /// If you don't specify an ID, a unique one is generated. #[serde(rename="objectId")] pub object_id: Option, + /// Number of rows in the table. + pub rows: Option, + /// Number of columns in the table. + pub columns: Option, /// The element properties for the table. /// /// The table will be created at the provided size, subject to a minimum size. @@ -2741,6 +3059,35 @@ pub struct OutlineFill { impl Part for OutlineFill {} +/// Updates the properties of a Page. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UpdatePagePropertiesRequest { + /// The page properties to update. + #[serde(rename="pageProperties")] + pub page_properties: Option, + /// The fields that should be updated. + /// + /// At least one field must be specified. The root `pageProperties` is + /// implied and should not be specified. A single `"*"` can be used as + /// short-hand for listing every field. + /// + /// For example to update the page background solid fill color, set `fields` + /// to `"pageBackgroundFill.solidFill.color"`. + /// + /// To reset a property to its default value, include its field name in the + /// field mask but leave the field itself unset. + pub fields: Option, + /// The object ID of the page the update is applied to. + #[serde(rename="objectId")] + pub object_id: Option, +} + +impl Part for UpdatePagePropertiesRequest {} + + /// Deletes an object, either pages or /// page elements, from the /// presentation. @@ -2806,9 +3153,19 @@ impl Part for TableCellProperties {} #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Recolor { /// The recolor effect is represented by a gradient, which is a list of color - /// stops. This property is read-only. + /// stops. + /// + /// The colors in the gradient will replace the corresponding colors at + /// the same position in the color palette and apply to the image. This + /// property is read-only. #[serde(rename="recolorStops")] pub recolor_stops: Option>, + /// The name of the recolor effect. + /// + /// The name is determined from the `recolor_stops` by matching the gradient + /// against the colors in the page's current color scheme. This property is + /// read-only. + pub name: Option, } impl Part for Recolor {} @@ -2827,25 +3184,14 @@ impl Part for Recolor {} pub struct BatchUpdatePresentationRequest { /// A list of updates to apply to the presentation. pub requests: Option>, + /// Provides control over how write requests are executed. + #[serde(rename="writeControl")] + pub write_control: Option, } impl RequestValue for BatchUpdatePresentationRequest {} -/// The result of creating an embedded Google Sheets chart. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CreateSheetsChartResponse { - /// The object ID of the created chart. - #[serde(rename="objectId")] - pub object_id: Option, -} - -impl Part for CreateSheetsChartResponse {} - - /// A PageElement kind representing a /// generic shape that does not have a more specific classification. /// @@ -2912,16 +3258,16 @@ pub struct CreateParagraphBulletsRequest { /// `BULLET_DISC_CIRCLE_SQUARE` preset. #[serde(rename="bulletPreset")] pub bullet_preset: Option, - /// The range of text to apply the bullet presets to, based on TextElement indexes. - #[serde(rename="textRange")] - pub text_range: Option, - /// The object ID of the shape or table containing the text to add bullets to. - #[serde(rename="objectId")] - pub object_id: Option, /// The optional table cell location if the text to be modified is in a table /// cell. If present, the object_id must refer to a table. #[serde(rename="cellLocation")] pub cell_location: Option, + /// The object ID of the shape or table containing the text to add bullets to. + #[serde(rename="objectId")] + pub object_id: Option, + /// The range of text to apply the bullet presets to, based on TextElement indexes. + #[serde(rename="textRange")] + pub text_range: Option, } impl Part for CreateParagraphBulletsRequest {} @@ -2961,6 +3307,20 @@ pub struct DeleteTextRequest { impl Part for DeleteTextRequest {} +/// The result of replacing shapes with a Google Sheets chart. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ReplaceAllShapesWithSheetsChartResponse { + /// The number of shapes replaced with charts. + #[serde(rename="occurrencesChanged")] + pub occurrences_changed: Option, +} + +impl Part for ReplaceAllShapesWithSheetsChartResponse {} + + /// Update the properties of an Image. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -3032,33 +3392,19 @@ pub struct ThemeColorPair { impl Part for ThemeColorPair {} -/// Updates the properties of a Page. +/// A width and height. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UpdatePagePropertiesRequest { - /// The page properties to update. - #[serde(rename="pageProperties")] - pub page_properties: Option, - /// The fields that should be updated. - /// - /// At least one field must be specified. The root `pageProperties` is - /// implied and should not be specified. A single `"*"` can be used as - /// short-hand for listing every field. - /// - /// For example to update the page background solid fill color, set `fields` - /// to `"pageBackgroundFill.solidFill.color"`. - /// - /// To reset a property to its default value, include its field name in the - /// field mask but leave the field itself unset. - pub fields: Option, - /// The object ID of the page the update is applied to. - #[serde(rename="objectId")] - pub object_id: Option, +pub struct Size { + /// The width of the object. + pub width: Option, + /// The height of the object. + pub height: Option, } -impl Part for UpdatePagePropertiesRequest {} +impl Part for Size {} @@ -3089,7 +3435,7 @@ impl Part for UpdatePagePropertiesRequest {} /// ::default(), None); /// let mut hub = Slides::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `batch_update(...)`, `create(...)`, `get(...)` and `pages_get(...)` +/// // like `batch_update(...)`, `create(...)`, `get(...)`, `pages_get(...)` and `pages_get_thumbnail(...)` /// // to build up your call. /// let rb = hub.presentations(); /// # } @@ -3197,6 +3543,28 @@ impl<'a, C, A> PresentationMethods<'a, C, A> { _additional_params: Default::default(), } } + + /// Create a builder to help you perform the following task: + /// + /// Generates a thumbnail of the latest version of the specified page in the + /// presentation and returns a URL to the thumbnail image. + /// + /// # Arguments + /// + /// * `presentationId` - The ID of the presentation to retrieve. + /// * `pageObjectId` - The object ID of the page whose thumbnail to retrieve. + pub fn pages_get_thumbnail(&self, presentation_id: &str, page_object_id: &str) -> PresentationPageGetThumbnailCall<'a, C, A> { + PresentationPageGetThumbnailCall { + hub: self.hub, + _presentation_id: presentation_id.to_string(), + _page_object_id: page_object_id.to_string(), + _thumbnail_properties_thumbnail_size: Default::default(), + _thumbnail_properties_mime_type: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } } @@ -3410,10 +3778,10 @@ impl<'a, C, A> PresentationCreateCall<'a, C, A> where C: BorrowMut PresentationGetCall<'a, C, A> where C: BorrowMut, /// /// # Additional Parameters /// - /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *pp* (query-boolean) - Pretty-print response. /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *bearer_token* (query-string) - OAuth bearer token. /// * *access_token* (query-string) - OAuth access token. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *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. @@ -3947,10 +4315,10 @@ impl<'a, C, A> PresentationBatchUpdateCall<'a, C, A> where C: BorrowMut PresentationPageGetCall<'a, C, A> where C: BorrowMut PresentationPageGetCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Slides::new(hyper::Client::new(), 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.presentations().pages_get_thumbnail("presentationId", "pageObjectId") +/// .thumbnail_properties_thumbnail_size("aliquyam") +/// .thumbnail_properties_mime_type("ea") +/// .doit(); +/// # } +/// ``` +pub struct PresentationPageGetThumbnailCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Slides, + _presentation_id: String, + _page_object_id: String, + _thumbnail_properties_thumbnail_size: Option, + _thumbnail_properties_mime_type: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for PresentationPageGetThumbnailCall<'a, C, A> {} + +impl<'a, C, A> PresentationPageGetThumbnailCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Thumbnail)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "slides.presentations.pages.getThumbnail", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("presentationId", self._presentation_id.to_string())); + params.push(("pageObjectId", self._page_object_id.to_string())); + if let Some(value) = self._thumbnail_properties_thumbnail_size { + params.push(("thumbnailProperties.thumbnailSize", value.to_string())); + } + if let Some(value) = self._thumbnail_properties_mime_type { + params.push(("thumbnailProperties.mimeType", value.to_string())); + } + for &field in ["alt", "presentationId", "pageObjectId", "thumbnailProperties.thumbnailSize", "thumbnailProperties.mimeType"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://slides.googleapis.com/v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::DriveReadonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{presentationId}", "presentationId"), ("{pageObjectId}", "pageObjectId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["pageObjectId", "presentationId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the presentation to retrieve. + /// + /// Sets the *presentation id* 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 presentation_id(mut self, new_value: &str) -> PresentationPageGetThumbnailCall<'a, C, A> { + self._presentation_id = new_value.to_string(); + self + } + /// The object ID of the page whose thumbnail to retrieve. + /// + /// Sets the *page object id* 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 page_object_id(mut self, new_value: &str) -> PresentationPageGetThumbnailCall<'a, C, A> { + self._page_object_id = new_value.to_string(); + self + } + /// The optional thumbnail image size. + /// + /// If you don't specify the size, the server chooses a default size of the + /// image. + /// + /// Sets the *thumbnail properties.thumbnail size* query property to the given value. + pub fn thumbnail_properties_thumbnail_size(mut self, new_value: &str) -> PresentationPageGetThumbnailCall<'a, C, A> { + self._thumbnail_properties_thumbnail_size = Some(new_value.to_string()); + self + } + /// The optional mime type of the thumbnail image. + /// + /// If you don't specify the mime type, the default mime type will be PNG. + /// + /// Sets the *thumbnail properties.mime type* query property to the given value. + pub fn thumbnail_properties_mime_type(mut self, new_value: &str) -> PresentationPageGetThumbnailCall<'a, C, A> { + self._thumbnail_properties_mime_type = 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. + /// + /// 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 Delegate) -> PresentationPageGetThumbnailCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> PresentationPageGetThumbnailCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::DriveReadonly`. + /// + /// 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: T) -> PresentationPageGetThumbnailCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + diff --git a/gen/spectrum1_explorer-cli/Cargo.toml b/gen/spectrum1_explorer-cli/Cargo.toml index c0694f343f..d9cb1a1cff 100644 --- a/gen/spectrum1_explorer-cli/Cargo.toml +++ b/gen/spectrum1_explorer-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-spectrum1_explorer-cli" -version = "1.0.4+20161116" +version = "1.0.4+20170306" authors = ["Sebastian Thiel "] description = "A complete library to interact with spectrum (protocol v1explorer)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/spectrum1_explorer-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-spectrum1_explorer] path = "../spectrum1_explorer" -version = "1.0.4+20161116" +version = "1.0.4+20170306" diff --git a/gen/spectrum1_explorer-cli/README.md b/gen/spectrum1_explorer-cli/README.md index 992fe32c52..cc3314fc7f 100644 --- a/gen/spectrum1_explorer-cli/README.md +++ b/gen/spectrum1_explorer-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *spectrum* API at revision *20161116*. The CLI is at version *1.0.4*. +This documentation was generated from the *spectrum* API at revision *20170306*. The CLI is at version *1.0.4*. ```bash spectrum1-explorer [options] diff --git a/gen/spectrum1_explorer-cli/mkdocs.yml b/gen/spectrum1_explorer-cli/mkdocs.yml index cbcf6a05de..d9f26a7371 100644 --- a/gen/spectrum1_explorer-cli/mkdocs.yml +++ b/gen/spectrum1_explorer-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: spectrum v1.0.4+20161116 +site_name: spectrum v1.0.4+20170306 site_url: http://byron.github.io/google-apis-rs/google-spectrum1_explorer-cli site_description: A complete library to interact with spectrum (protocol v1explorer) diff --git a/gen/spectrum1_explorer-cli/src/main.rs b/gen/spectrum1_explorer-cli/src/main.rs index 1de0616a68..e981fc10ed 100644 --- a/gen/spectrum1_explorer-cli/src/main.rs +++ b/gen/spectrum1_explorer-cli/src/main.rs @@ -961,7 +961,7 @@ fn main() { let mut app = App::new("spectrum1-explorer") .author("Sebastian Thiel ") - .version("1.0.4+20161116") + .version("1.0.4+20170306") .about("API for spectrum-management functions.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_spectrum1_explorer_cli") .arg(Arg::with_name("folder") diff --git a/gen/spectrum1_explorer/Cargo.toml b/gen/spectrum1_explorer/Cargo.toml index 54498ec1c9..0a52829235 100644 --- a/gen/spectrum1_explorer/Cargo.toml +++ b/gen/spectrum1_explorer/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-spectrum1_explorer" -version = "1.0.4+20161116" +version = "1.0.4+20170306" authors = ["Sebastian Thiel "] description = "A complete library to interact with spectrum (protocol v1explorer)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/spectrum1_explorer" homepage = "http://developers.google.com/spectrum" -documentation = "https://docs.rs/google-spectrum1_explorer/1.0.4+20161116" +documentation = "https://docs.rs/google-spectrum1_explorer/1.0.4+20170306" license = "MIT" keywords = ["spectrum", "google", "protocol", "web", "api"] diff --git a/gen/spectrum1_explorer/README.md b/gen/spectrum1_explorer/README.md index 8e7b652321..5746573c1d 100644 --- a/gen/spectrum1_explorer/README.md +++ b/gen/spectrum1_explorer/README.md @@ -5,16 +5,16 @@ DO NOT EDIT ! --> The `google-spectrum1_explorer` library allows access to all features of the *Google spectrum* service. -This documentation was generated from *spectrum* crate version *1.0.4+20161116*, where *20161116* is the exact revision of the *spectrum:v1explorer* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *spectrum* crate version *1.0.4+20170306*, where *20170306* is the exact revision of the *spectrum:v1explorer* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *spectrum* *v1_explorer* API can be found at the [official documentation site](http://developers.google.com/spectrum). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/struct.Spectrum.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/struct.Spectrum.html) ... * paws - * [*get spectrum*](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/struct.PawGetSpectrumCall.html), [*get spectrum batch*](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/struct.PawGetSpectrumBatchCall.html), [*init*](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/struct.PawInitCall.html), [*notify spectrum use*](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/struct.PawNotifySpectrumUseCall.html), [*register*](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/struct.PawRegisterCall.html) and [*verify device*](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/struct.PawVerifyDeviceCall.html) + * [*get spectrum*](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/struct.PawGetSpectrumCall.html), [*get spectrum batch*](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/struct.PawGetSpectrumBatchCall.html), [*init*](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/struct.PawInitCall.html), [*notify spectrum use*](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/struct.PawNotifySpectrumUseCall.html), [*register*](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/struct.PawRegisterCall.html) and [*verify device*](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/struct.PawVerifyDeviceCall.html) @@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/struct.Spectrum.html)** +* **[Hub](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/struct.Spectrum.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.Part.html)** + * **[Parts](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -121,17 +121,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.Delegate.html), 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-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.ResponseResult.html), 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")`. @@ -141,29 +141,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.CallBuilder.html) 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-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.RequestValue.html) and -[decodable](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.RequestValue.html) and +[decodable](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.CallBuilder.html), 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-spectrum1_explorer/1.0.4+20161116/google_spectrum1_explorer/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-spectrum1_explorer/1.0.4+20170306/google_spectrum1_explorer/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/spectrum1_explorer/src/lib.rs b/gen/spectrum1_explorer/src/lib.rs index cab0ee3146..09ee4159a7 100644 --- a/gen/spectrum1_explorer/src/lib.rs +++ b/gen/spectrum1_explorer/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *spectrum* crate version *1.0.4+20161116*, where *20161116* is the exact revision of the *spectrum:v1explorer* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *spectrum* crate version *1.0.4+20170306*, where *20170306* is the exact revision of the *spectrum:v1explorer* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *spectrum* *v1_explorer* API can be found at the //! [official documentation site](http://developers.google.com/spectrum). diff --git a/gen/sqladmin1_beta4-cli/Cargo.toml b/gen/sqladmin1_beta4-cli/Cargo.toml index d17370162c..7b8261e89f 100644 --- a/gen/sqladmin1_beta4-cli/Cargo.toml +++ b/gen/sqladmin1_beta4-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-sqladmin1_beta4-cli" -version = "1.0.4+20161213" +version = "1.0.4+20170502" authors = ["Sebastian Thiel "] description = "A complete library to interact with SQL Admin (protocol v1beta4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/sqladmin1_beta4-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-sqladmin1_beta4] path = "../sqladmin1_beta4" -version = "1.0.4+20161213" +version = "1.0.4+20170502" diff --git a/gen/sqladmin1_beta4-cli/README.md b/gen/sqladmin1_beta4-cli/README.md index bf3a30888e..f63061d8b6 100644 --- a/gen/sqladmin1_beta4-cli/README.md +++ b/gen/sqladmin1_beta4-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *SQL Admin* API at revision *20161213*. The CLI is at version *1.0.4*. +This documentation was generated from the *SQL Admin* API at revision *20170502*. The CLI is at version *1.0.4*. ```bash sqladmin1-beta4 [options] @@ -59,7 +59,7 @@ sqladmin1-beta4 [options] restore-backup (-r )... [-p ]... [-o ] start-replica [-p ]... [-o ] stop-replica [-p ]... [-o ] - truncate-log [-p ]... [-o ] + truncate-log (-r )... [-p ]... [-o ] update (-r )... [-p ]... [-o ] operations get [-p ]... [-o ] diff --git a/gen/sqladmin1_beta4-cli/mkdocs.yml b/gen/sqladmin1_beta4-cli/mkdocs.yml index 04ec995df6..4513d21d47 100644 --- a/gen/sqladmin1_beta4-cli/mkdocs.yml +++ b/gen/sqladmin1_beta4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: SQL Admin v1.0.4+20161213 +site_name: SQL Admin v1.0.4+20170502 site_url: http://byron.github.io/google-apis-rs/google-sqladmin1_beta4-cli site_description: A complete library to interact with SQL Admin (protocol v1beta4) diff --git a/gen/sqladmin1_beta4-cli/src/main.rs b/gen/sqladmin1_beta4-cli/src/main.rs index d2087d5cdd..3b1bcc7e9e 100644 --- a/gen/sqladmin1_beta4-cli/src/main.rs +++ b/gen/sqladmin1_beta4-cli/src/main.rs @@ -745,6 +745,9 @@ impl<'n> Engine<'n> { 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 { + "database-version" => { + call = call.database_version(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -758,6 +761,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["database-version"].iter().map(|v|*v)); v } )); } } @@ -1305,6 +1309,7 @@ impl<'n> Engine<'n> { "region" => Some(("region", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.kind" => Some(("settings.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.data-disk-type" => Some(("settings.dataDiskType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "settings.availability-type" => Some(("settings.availabilityType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.maintenance-window.kind" => Some(("settings.maintenanceWindow.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.maintenance-window.update-track" => Some(("settings.maintenanceWindow.updateTrack", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.maintenance-window.day" => Some(("settings.maintenanceWindow.day", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -1320,6 +1325,7 @@ impl<'n> Engine<'n> { "settings.crash-safe-replication-enabled" => Some(("settings.crashSafeReplicationEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "settings.database-replication-enabled" => Some(("settings.databaseReplicationEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "settings.replication-type" => Some(("settings.replicationType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "settings.storage-auto-resize-limit" => Some(("settings.storageAutoResizeLimit", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.tier" => Some(("settings.tier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.pricing-plan" => Some(("settings.pricingPlan", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.settings-version" => Some(("settings.settingsVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1344,7 +1350,7 @@ impl<'n> Engine<'n> { "replica-configuration.mysql-replica-configuration.client-key" => Some(("replicaConfiguration.mysqlReplicaConfiguration.clientKey", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["activation-policy", "authorized-gae-applications", "available", "backend-type", "backup-configuration", "binary-log-enabled", "ca-certificate", "cert", "cert-serial-number", "client-certificate", "client-key", "common-name", "connect-retry-interval", "connection-name", "crash-safe-replication-enabled", "create-time", "current-disk-size", "data-disk-size-gb", "data-disk-type", "database-replication-enabled", "database-version", "day", "dump-file-path", "enabled", "etag", "expiration-time", "failover-replica", "failover-target", "follow-gae-application", "host-port", "hour", "instance", "instance-type", "ip-configuration", "ipv4-enabled", "ipv6-address", "kind", "location-preference", "maintenance-window", "master-heartbeat-period", "master-instance-name", "max-disk-size", "mysql-replica-configuration", "name", "on-premises-configuration", "password", "pricing-plan", "project", "region", "replica-configuration", "replica-names", "replication-type", "require-ssl", "self-link", "server-ca-cert", "service-account-email-address", "settings", "settings-version", "sha1-fingerprint", "ssl-cipher", "start-time", "state", "storage-auto-resize", "suspension-reason", "tier", "update-track", "username", "verify-server-certificate", "zone"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["activation-policy", "authorized-gae-applications", "availability-type", "available", "backend-type", "backup-configuration", "binary-log-enabled", "ca-certificate", "cert", "cert-serial-number", "client-certificate", "client-key", "common-name", "connect-retry-interval", "connection-name", "crash-safe-replication-enabled", "create-time", "current-disk-size", "data-disk-size-gb", "data-disk-type", "database-replication-enabled", "database-version", "day", "dump-file-path", "enabled", "etag", "expiration-time", "failover-replica", "failover-target", "follow-gae-application", "host-port", "hour", "instance", "instance-type", "ip-configuration", "ipv4-enabled", "ipv6-address", "kind", "location-preference", "maintenance-window", "master-heartbeat-period", "master-instance-name", "max-disk-size", "mysql-replica-configuration", "name", "on-premises-configuration", "password", "pricing-plan", "project", "region", "replica-configuration", "replica-names", "replication-type", "require-ssl", "self-link", "server-ca-cert", "service-account-email-address", "settings", "settings-version", "sha1-fingerprint", "ssl-cipher", "start-time", "state", "storage-auto-resize", "storage-auto-resize-limit", "suspension-reason", "tier", "update-track", "username", "verify-server-certificate", "zone"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1416,6 +1422,9 @@ impl<'n> Engine<'n> { "max-results" => { call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); }, + "filter" => { + call = call.filter(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1429,7 +1438,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["page-token", "max-results"].iter().map(|v|*v)); + v.extend(["filter", "page-token", "max-results"].iter().map(|v|*v)); v } )); } } @@ -1517,6 +1526,7 @@ impl<'n> Engine<'n> { "region" => Some(("region", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.kind" => Some(("settings.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.data-disk-type" => Some(("settings.dataDiskType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "settings.availability-type" => Some(("settings.availabilityType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.maintenance-window.kind" => Some(("settings.maintenanceWindow.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.maintenance-window.update-track" => Some(("settings.maintenanceWindow.updateTrack", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.maintenance-window.day" => Some(("settings.maintenanceWindow.day", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -1532,6 +1542,7 @@ impl<'n> Engine<'n> { "settings.crash-safe-replication-enabled" => Some(("settings.crashSafeReplicationEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "settings.database-replication-enabled" => Some(("settings.databaseReplicationEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "settings.replication-type" => Some(("settings.replicationType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "settings.storage-auto-resize-limit" => Some(("settings.storageAutoResizeLimit", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.tier" => Some(("settings.tier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.pricing-plan" => Some(("settings.pricingPlan", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.settings-version" => Some(("settings.settingsVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1556,7 +1567,7 @@ impl<'n> Engine<'n> { "replica-configuration.mysql-replica-configuration.client-key" => Some(("replicaConfiguration.mysqlReplicaConfiguration.clientKey", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["activation-policy", "authorized-gae-applications", "available", "backend-type", "backup-configuration", "binary-log-enabled", "ca-certificate", "cert", "cert-serial-number", "client-certificate", "client-key", "common-name", "connect-retry-interval", "connection-name", "crash-safe-replication-enabled", "create-time", "current-disk-size", "data-disk-size-gb", "data-disk-type", "database-replication-enabled", "database-version", "day", "dump-file-path", "enabled", "etag", "expiration-time", "failover-replica", "failover-target", "follow-gae-application", "host-port", "hour", "instance", "instance-type", "ip-configuration", "ipv4-enabled", "ipv6-address", "kind", "location-preference", "maintenance-window", "master-heartbeat-period", "master-instance-name", "max-disk-size", "mysql-replica-configuration", "name", "on-premises-configuration", "password", "pricing-plan", "project", "region", "replica-configuration", "replica-names", "replication-type", "require-ssl", "self-link", "server-ca-cert", "service-account-email-address", "settings", "settings-version", "sha1-fingerprint", "ssl-cipher", "start-time", "state", "storage-auto-resize", "suspension-reason", "tier", "update-track", "username", "verify-server-certificate", "zone"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["activation-policy", "authorized-gae-applications", "availability-type", "available", "backend-type", "backup-configuration", "binary-log-enabled", "ca-certificate", "cert", "cert-serial-number", "client-certificate", "client-key", "common-name", "connect-retry-interval", "connection-name", "crash-safe-replication-enabled", "create-time", "current-disk-size", "data-disk-size-gb", "data-disk-type", "database-replication-enabled", "database-version", "day", "dump-file-path", "enabled", "etag", "expiration-time", "failover-replica", "failover-target", "follow-gae-application", "host-port", "hour", "instance", "instance-type", "ip-configuration", "ipv4-enabled", "ipv6-address", "kind", "location-preference", "maintenance-window", "master-heartbeat-period", "master-instance-name", "max-disk-size", "mysql-replica-configuration", "name", "on-premises-configuration", "password", "pricing-plan", "project", "region", "replica-configuration", "replica-names", "replication-type", "require-ssl", "self-link", "server-ca-cert", "service-account-email-address", "settings", "settings-version", "sha1-fingerprint", "ssl-cipher", "start-time", "state", "storage-auto-resize", "storage-auto-resize-limit", "suspension-reason", "tier", "update-track", "username", "verify-server-certificate", "zone"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1965,7 +1976,41 @@ impl<'n> Engine<'n> { fn _instances_truncate_log(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { - let mut call = self.hub.instances().truncate_log(opt.value_of("project").unwrap_or(""), opt.value_of("instance").unwrap_or(""), opt.value_of("log-type").unwrap_or("")); + + 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()[..] { + "truncate-log-context.log-type" => Some(("truncateLogContext.logType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "truncate-log-context.kind" => Some(("truncateLogContext.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["kind", "log-type", "truncate-log-context"]); + 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::InstancesTruncateLogRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.instances().truncate_log(request, opt.value_of("project").unwrap_or(""), opt.value_of("instance").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 { @@ -2069,6 +2114,7 @@ impl<'n> Engine<'n> { "region" => Some(("region", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.kind" => Some(("settings.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.data-disk-type" => Some(("settings.dataDiskType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "settings.availability-type" => Some(("settings.availabilityType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.maintenance-window.kind" => Some(("settings.maintenanceWindow.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.maintenance-window.update-track" => Some(("settings.maintenanceWindow.updateTrack", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.maintenance-window.day" => Some(("settings.maintenanceWindow.day", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -2084,6 +2130,7 @@ impl<'n> Engine<'n> { "settings.crash-safe-replication-enabled" => Some(("settings.crashSafeReplicationEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "settings.database-replication-enabled" => Some(("settings.databaseReplicationEnabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "settings.replication-type" => Some(("settings.replicationType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "settings.storage-auto-resize-limit" => Some(("settings.storageAutoResizeLimit", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.tier" => Some(("settings.tier", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.pricing-plan" => Some(("settings.pricingPlan", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "settings.settings-version" => Some(("settings.settingsVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2108,7 +2155,7 @@ impl<'n> Engine<'n> { "replica-configuration.mysql-replica-configuration.client-key" => Some(("replicaConfiguration.mysqlReplicaConfiguration.clientKey", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["activation-policy", "authorized-gae-applications", "available", "backend-type", "backup-configuration", "binary-log-enabled", "ca-certificate", "cert", "cert-serial-number", "client-certificate", "client-key", "common-name", "connect-retry-interval", "connection-name", "crash-safe-replication-enabled", "create-time", "current-disk-size", "data-disk-size-gb", "data-disk-type", "database-replication-enabled", "database-version", "day", "dump-file-path", "enabled", "etag", "expiration-time", "failover-replica", "failover-target", "follow-gae-application", "host-port", "hour", "instance", "instance-type", "ip-configuration", "ipv4-enabled", "ipv6-address", "kind", "location-preference", "maintenance-window", "master-heartbeat-period", "master-instance-name", "max-disk-size", "mysql-replica-configuration", "name", "on-premises-configuration", "password", "pricing-plan", "project", "region", "replica-configuration", "replica-names", "replication-type", "require-ssl", "self-link", "server-ca-cert", "service-account-email-address", "settings", "settings-version", "sha1-fingerprint", "ssl-cipher", "start-time", "state", "storage-auto-resize", "suspension-reason", "tier", "update-track", "username", "verify-server-certificate", "zone"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["activation-policy", "authorized-gae-applications", "availability-type", "available", "backend-type", "backup-configuration", "binary-log-enabled", "ca-certificate", "cert", "cert-serial-number", "client-certificate", "client-key", "common-name", "connect-retry-interval", "connection-name", "crash-safe-replication-enabled", "create-time", "current-disk-size", "data-disk-size-gb", "data-disk-type", "database-replication-enabled", "database-version", "day", "dump-file-path", "enabled", "etag", "expiration-time", "failover-replica", "failover-target", "follow-gae-application", "host-port", "hour", "instance", "instance-type", "ip-configuration", "ipv4-enabled", "ipv6-address", "kind", "location-preference", "maintenance-window", "master-heartbeat-period", "master-instance-name", "max-disk-size", "mysql-replica-configuration", "name", "on-premises-configuration", "password", "pricing-plan", "project", "region", "replica-configuration", "replica-names", "replication-type", "require-ssl", "self-link", "server-ca-cert", "service-account-email-address", "settings", "settings-version", "sha1-fingerprint", "ssl-cipher", "start-time", "state", "storage-auto-resize", "storage-auto-resize-limit", "suspension-reason", "tier", "update-track", "username", "verify-server-certificate", "zone"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -4046,11 +4093,11 @@ fn main() { Some(true), Some(false)), - (Some(r##"log-type"##), - None, - Some(r##"The type of Log Table to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE"##), + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), Some(true), - Some(false)), + Some(true)), (Some(r##"v"##), Some(r##"p"##), @@ -4506,7 +4553,7 @@ fn main() { let mut app = App::new("sqladmin1-beta4") .author("Sebastian Thiel ") - .version("1.0.4+20161213") + .version("1.0.4+20170502") .about("Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_sqladmin1_beta4_cli") .arg(Arg::with_name("url") diff --git a/gen/sqladmin1_beta4/Cargo.toml b/gen/sqladmin1_beta4/Cargo.toml index 5e93e2de23..b6a1bcdb8e 100644 --- a/gen/sqladmin1_beta4/Cargo.toml +++ b/gen/sqladmin1_beta4/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-sqladmin1_beta4" -version = "1.0.4+20161213" +version = "1.0.4+20170502" authors = ["Sebastian Thiel "] description = "A complete library to interact with SQL Admin (protocol v1beta4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/sqladmin1_beta4" homepage = "https://cloud.google.com/sql/docs/reference/latest" -documentation = "https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213" +documentation = "https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502" license = "MIT" keywords = ["sqladmin", "google", "protocol", "web", "api"] diff --git a/gen/sqladmin1_beta4/README.md b/gen/sqladmin1_beta4/README.md index 54f67836a1..6acba49d8b 100644 --- a/gen/sqladmin1_beta4/README.md +++ b/gen/sqladmin1_beta4/README.md @@ -5,30 +5,30 @@ DO NOT EDIT ! --> The `google-sqladmin1_beta4` library allows access to all features of the *Google SQL Admin* service. -This documentation was generated from *SQL Admin* crate version *1.0.4+20161213*, where *20161213* is the exact revision of the *sqladmin:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *SQL Admin* crate version *1.0.4+20170502*, where *20170502* is the exact revision of the *sqladmin:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *SQL Admin* *v1_beta4* API can be found at the [official documentation site](https://cloud.google.com/sql/docs/reference/latest). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.SQLAdmin.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.SQLAdmin.html) ... -* [backup runs](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.BackupRun.html) - * [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.BackupRunDeleteCall.html), [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.BackupRunGetCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.BackupRunInsertCall.html) and [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.BackupRunListCall.html) -* [databases](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.Database.html) - * [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.DatabaseDeleteCall.html), [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.DatabaseGetCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.DatabaseInsertCall.html), [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.DatabaseListCall.html), [*patch*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.DatabasePatchCall.html) and [*update*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.DatabaseUpdateCall.html) -* [flags](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.Flag.html) - * [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.FlagListCall.html) +* [backup runs](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.BackupRun.html) + * [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.BackupRunDeleteCall.html), [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.BackupRunGetCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.BackupRunInsertCall.html) and [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.BackupRunListCall.html) +* [databases](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.Database.html) + * [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.DatabaseDeleteCall.html), [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.DatabaseGetCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.DatabaseInsertCall.html), [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.DatabaseListCall.html), [*patch*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.DatabasePatchCall.html) and [*update*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.DatabaseUpdateCall.html) +* [flags](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.Flag.html) + * [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.FlagListCall.html) * instances - * [*clone*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceCloneCall.html), [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceDeleteCall.html), [*export*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceExportCall.html), [*failover*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceFailoverCall.html), [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceGetCall.html), [*import*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceImportCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceInsertCall.html), [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceListCall.html), [*patch*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstancePatchCall.html), [*promote replica*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstancePromoteReplicaCall.html), [*reset ssl config*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceResetSslConfigCall.html), [*restart*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceRestartCall.html), [*restore backup*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceRestoreBackupCall.html), [*start replica*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceStartReplicaCall.html), [*stop replica*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceStopReplicaCall.html), [*truncate log*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceTruncateLogCall.html) and [*update*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.InstanceUpdateCall.html) -* [operations](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.Operation.html) - * [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.OperationGetCall.html) and [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.OperationListCall.html) -* [ssl certs](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.SslCert.html) - * [*create ephemeral*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.SslCertCreateEphemeralCall.html), [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.SslCertDeleteCall.html), [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.SslCertGetCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.SslCertInsertCall.html) and [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.SslCertListCall.html) -* [tiers](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.Tier.html) - * [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.TierListCall.html) -* [users](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.User.html) - * [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.UserDeleteCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.UserInsertCall.html), [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.UserListCall.html) and [*update*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.UserUpdateCall.html) + * [*clone*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceCloneCall.html), [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceDeleteCall.html), [*export*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceExportCall.html), [*failover*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceFailoverCall.html), [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceGetCall.html), [*import*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceImportCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceInsertCall.html), [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceListCall.html), [*patch*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstancePatchCall.html), [*promote replica*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstancePromoteReplicaCall.html), [*reset ssl config*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceResetSslConfigCall.html), [*restart*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceRestartCall.html), [*restore backup*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceRestoreBackupCall.html), [*start replica*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceStartReplicaCall.html), [*stop replica*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceStopReplicaCall.html), [*truncate log*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceTruncateLogCall.html) and [*update*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.InstanceUpdateCall.html) +* [operations](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.Operation.html) + * [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.OperationGetCall.html) and [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.OperationListCall.html) +* [ssl certs](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.SslCert.html) + * [*create ephemeral*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.SslCertCreateEphemeralCall.html), [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.SslCertDeleteCall.html), [*get*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.SslCertGetCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.SslCertInsertCall.html) and [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.SslCertListCall.html) +* [tiers](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.Tier.html) + * [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.TierListCall.html) +* [users](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.User.html) + * [*delete*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.UserDeleteCall.html), [*insert*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.UserInsertCall.html), [*list*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.UserListCall.html) and [*update*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.UserUpdateCall.html) @@ -37,17 +37,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/struct.SQLAdmin.html)** +* **[Hub](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/struct.SQLAdmin.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.Part.html)** + * **[Parts](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -161,17 +161,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.Delegate.html), 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-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.ResponseResult.html), 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")`. @@ -181,29 +181,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.CallBuilder.html) 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-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.RequestValue.html) and -[decodable](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.RequestValue.html) and +[decodable](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.CallBuilder.html), 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-sqladmin1_beta4/1.0.4+20161213/google_sqladmin1_beta4/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-sqladmin1_beta4/1.0.4+20170502/google_sqladmin1_beta4/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/sqladmin1_beta4/src/lib.rs b/gen/sqladmin1_beta4/src/lib.rs index a7db22431d..4be9ceb541 100644 --- a/gen/sqladmin1_beta4/src/lib.rs +++ b/gen/sqladmin1_beta4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *SQL Admin* crate version *1.0.4+20161213*, where *20161213* is the exact revision of the *sqladmin:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *SQL Admin* crate version *1.0.4+20170502*, where *20170502* is the exact revision of the *sqladmin:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *SQL Admin* *v1_beta4* API can be found at the //! [official documentation site](https://cloud.google.com/sql/docs/reference/latest). @@ -924,6 +924,22 @@ pub struct Flag { impl Resource for Flag {} +/// Database Instance truncate log context. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TruncateLogContext { + /// The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE. + #[serde(rename="logType")] + pub log_type: Option, + /// This is always sql#truncateLogContext. + pub kind: Option, +} + +impl Part for TruncateLogContext {} + + /// A Cloud SQL user resource. /// /// # Activities @@ -1122,6 +1138,11 @@ impl Part for MySqlReplicaConfiguration {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Settings { + /// Reserved for future use. + #[serde(rename="availabilityType")] + pub availability_type: Option, + /// Reserved for future use. + pub labels: Option>, /// The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. The activation policy cannot be updated together with other settings for Second Generation instances. Valid values: /// ALWAYS: The instance is on; it is not deactivated by inactivity. /// NEVER: The instance is off; it is not activated, even if a connection request arrives. @@ -1165,6 +1186,9 @@ pub struct Settings { /// The daily backup configuration for the instance. #[serde(rename="backupConfiguration")] pub backup_configuration: Option, + /// The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Applies only to Second Generation instances. + #[serde(rename="storageAutoResizeLimit")] + pub storage_auto_resize_limit: Option, /// Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances. #[serde(rename="crashSafeReplicationEnabled")] pub crash_safe_replication_enabled: Option, @@ -1275,6 +1299,25 @@ pub struct SslCertsCreateEphemeralRequest { impl RequestValue for SslCertsCreateEphemeralRequest {} +/// Instance truncate log request. +/// +/// # 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*). +/// +/// * [truncate log instances](struct.InstanceTruncateLogCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct InstancesTruncateLogRequest { + /// Contains details about the truncate log operation. + #[serde(rename="truncateLogContext")] + pub truncate_log_context: Option, +} + +impl RequestValue for InstancesTruncateLogRequest {} + + /// Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance puruposes. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1337,6 +1380,21 @@ pub struct InstancesExportRequest { impl RequestValue for InstancesExportRequest {} +/// Reserved for future use. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Labels { + /// Reserved for future use. + pub key: Option, + /// Reserved for future use. + pub value: Option, +} + +impl Part for Labels {} + + /// User list response. /// /// # Activities @@ -1591,7 +1649,7 @@ pub struct Operation { /// The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. #[serde(rename="insertTime")] pub insert_time: Option, - /// The URI of the instance related to the operation. + /// no description provided #[serde(rename="targetLink")] pub target_link: Option, /// The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. @@ -1981,15 +2039,15 @@ impl<'a, C, A> InstanceMethods<'a, C, A> { /// /// # Arguments /// + /// * `request` - No description provided. /// * `project` - Project ID of the Cloud SQL project. /// * `instance` - Cloud SQL instance ID. This does not include the project ID. - /// * `logType` - The type of Log Table to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE - pub fn truncate_log(&self, project: &str, instance: &str, log_type: &str) -> InstanceTruncateLogCall<'a, C, A> { + pub fn truncate_log(&self, request: InstancesTruncateLogRequest, project: &str, instance: &str) -> InstanceTruncateLogCall<'a, C, A> { InstanceTruncateLogCall { hub: self.hub, + _request: request, _project: project.to_string(), _instance: instance.to_string(), - _log_type: log_type.to_string(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2205,6 +2263,7 @@ impl<'a, C, A> InstanceMethods<'a, C, A> { _project: project.to_string(), _page_token: Default::default(), _max_results: Default::default(), + _filter: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2361,6 +2420,7 @@ impl<'a, C, A> FlagMethods<'a, C, A> { pub fn list(&self) -> FlagListCall<'a, C, A> { FlagListCall { hub: self.hub, + _database_version: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -4678,6 +4738,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_sqladmin1_beta4 as sqladmin1_beta4; +/// use sqladmin1_beta4::InstancesTruncateLogRequest; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -4688,10 +4749,15 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// # hyper::Client::new(), /// # ::default(), None); /// # let mut hub = SQLAdmin::new(hyper::Client::new(), 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 = InstancesTruncateLogRequest::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.instances().truncate_log("project", "instance", "logType") +/// let result = hub.instances().truncate_log(req, "project", "instance") /// .doit(); /// # } /// ``` @@ -4699,9 +4765,9 @@ pub struct InstanceTruncateLogCall<'a, C, A> where C: 'a, A: 'a { hub: &'a SQLAdmin, + _request: InstancesTruncateLogRequest, _project: String, _instance: String, - _log_type: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -4726,8 +4792,7 @@ impl<'a, C, A> InstanceTruncateLogCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((5 + self._additional_params.len())); params.push(("project", self._project.to_string())); params.push(("instance", self._instance.to_string())); - params.push(("logType", self._log_type.to_string())); - for &field in ["alt", "project", "instance", "logType"].iter() { + for &field in ["alt", "project", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4771,6 +4836,17 @@ impl<'a, C, A> InstanceTruncateLogCall<'a, C, A> where C: BorrowMut InstanceTruncateLogCall<'a, C, A> where C: BorrowMut InstanceTruncateLogCall<'a, C, A> where C: BorrowMut InstanceTruncateLogCall<'a, C, A> { + self._request = new_value; + self + } /// Project ID of the Cloud SQL project. /// /// Sets the *project* path property to the given value. @@ -4862,16 +4951,6 @@ impl<'a, C, A> InstanceTruncateLogCall<'a, C, A> where C: BorrowMut InstanceTruncateLogCall<'a, C, A> { - self._log_type = 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. /// @@ -7533,8 +7612,9 @@ impl<'a, C, A> InstanceInsertCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.instances().list("project") -/// .page_token("et") -/// .max_results(55) +/// .page_token("sanctus") +/// .max_results(79) +/// .filter("amet") /// .doit(); /// # } /// ``` @@ -7545,6 +7625,7 @@ pub struct InstanceListCall<'a, C, A> _project: String, _page_token: Option, _max_results: Option, + _filter: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -7566,7 +7647,7 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "sql.instances.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("project", self._project.to_string())); if let Some(value) = self._page_token { params.push(("pageToken", value.to_string())); @@ -7574,7 +7655,10 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: if let Some(value) = self._max_results { params.push(("maxResults", value.to_string())); } - for &field in ["alt", "project", "pageToken", "maxResults"].iter() { + if let Some(value) = self._filter { + params.push(("filter", value.to_string())); + } + for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -7713,6 +7797,13 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: self._max_results = Some(new_value); self } + /// Reserved for future use. + /// + /// Sets the *filter* query property to the given value. + pub fn filter(mut self, new_value: &str) -> InstanceListCall<'a, C, A> { + 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. /// @@ -9151,6 +9242,7 @@ impl<'a, C, A> InstanceRestoreBackupCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { hub: &'a SQLAdmin, + _database_version: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -9179,8 +9272,11 @@ impl<'a, C, A> FlagListCall<'a, C, A> where C: BorrowMut, A: oaut }; dlg.begin(MethodInfo { id: "sql.flags.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len())); - for &field in ["alt"].iter() { + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + if let Some(value) = self._database_version { + params.push(("databaseVersion", value.to_string())); + } + for &field in ["alt", "databaseVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -9274,6 +9370,13 @@ impl<'a, C, A> FlagListCall<'a, C, A> where C: BorrowMut, A: oaut } + /// Database version for flag retrieval. Flags are specific to the database version. + /// + /// Sets the *database version* query property to the given value. + pub fn database_version(mut self, new_value: &str) -> FlagListCall<'a, C, A> { + self._database_version = 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. /// @@ -12297,8 +12400,8 @@ impl<'a, C, A> SslCertListCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.backup_runs().list("project", "instance") -/// .page_token("ea") -/// .max_results(-95) +/// .page_token("sadipscing") +/// .max_results(-66) /// .doit(); /// # } /// ``` diff --git a/gen/storage1-cli/Cargo.toml b/gen/storage1-cli/Cargo.toml index 95675c923a..1ecc1bbdf2 100644 --- a/gen/storage1-cli/Cargo.toml +++ b/gen/storage1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-storage1-cli" -version = "1.0.4+20161123" +version = "1.0.4+20170504" authors = ["Sebastian Thiel "] description = "A complete library to interact with storage (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/storage1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-storage1] path = "../storage1" -version = "1.0.4+20161123" +version = "1.0.4+20170504" diff --git a/gen/storage1-cli/README.md b/gen/storage1-cli/README.md index ff6f16f72c..5f1cc019d8 100644 --- a/gen/storage1-cli/README.md +++ b/gen/storage1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *storage* API at revision *20161123*. The CLI is at version *1.0.4*. +This documentation was generated from the *storage* API at revision *20170504*. The CLI is at version *1.0.4*. ```bash storage1 [options] @@ -39,9 +39,12 @@ storage1 [options] buckets delete [-p ]... get [-p ]... [-o ] + get-iam-policy [-p ]... [-o ] insert (-r )... [-p ]... [-o ] list [-p ]... [-o ] patch (-r )... [-p ]... [-o ] + set-iam-policy (-r )... [-p ]... [-o ] + test-iam-permissions ... [-p ]... [-o ] update (-r )... [-p ]... [-o ] channels stop (-r )... [-p ]... @@ -52,6 +55,11 @@ storage1 [options] list [-p ]... [-o ] patch (-r )... [-p ]... [-o ] update (-r )... [-p ]... [-o ] + notifications + delete [-p ]... + get [-p ]... [-o ] + insert (-r )... [-p ]... [-o ] + list [-p ]... [-o ] object-access-controls delete [-p ]... get [-p ]... [-o ] @@ -64,12 +72,17 @@ storage1 [options] copy (-r )... [-p ]... [-o ] delete [-p ]... get [-p ]... [-o ] + get-iam-policy [-p ]... [-o ] insert (-r )... (-u (simple|resumable) -f [-m ]) [-p ]... [-o ] list [-p ]... [-o ] patch (-r )... [-p ]... [-o ] rewrite (-r )... [-p ]... [-o ] + set-iam-policy (-r )... [-p ]... [-o ] + test-iam-permissions ... [-p ]... [-o ] update (-r )... [-p ]... [-o ] watch-all (-r )... [-p ]... [-o ] + projects + service-account-get [-p ]... [-o ] storage1 --help Configuration: diff --git a/gen/storage1-cli/mkdocs.yml b/gen/storage1-cli/mkdocs.yml index 97c9bfc6f0..bedc9836d8 100644 --- a/gen/storage1-cli/mkdocs.yml +++ b/gen/storage1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: storage v1.0.4+20161123 +site_name: storage v1.0.4+20170504 site_url: http://byron.github.io/google-apis-rs/google-storage1-cli site_description: A complete library to interact with storage (protocol v1) @@ -17,9 +17,12 @@ pages: - ['bucket-access-controls_update.md', 'Bucket Access Controls', 'Update'] - ['buckets_delete.md', 'Buckets', 'Delete'] - ['buckets_get.md', 'Buckets', 'Get'] +- ['buckets_get-iam-policy.md', 'Buckets', 'Get Iam Policy'] - ['buckets_insert.md', 'Buckets', 'Insert'] - ['buckets_list.md', 'Buckets', 'List'] - ['buckets_patch.md', 'Buckets', 'Patch'] +- ['buckets_set-iam-policy.md', 'Buckets', 'Set Iam Policy'] +- ['buckets_test-iam-permissions.md', 'Buckets', 'Test Iam Permissions'] - ['buckets_update.md', 'Buckets', 'Update'] - ['channels_stop.md', 'Channels', 'Stop'] - ['default-object-access-controls_delete.md', 'Default Object Access Controls', 'Delete'] @@ -28,6 +31,10 @@ pages: - ['default-object-access-controls_list.md', 'Default Object Access Controls', 'List'] - ['default-object-access-controls_patch.md', 'Default Object Access Controls', 'Patch'] - ['default-object-access-controls_update.md', 'Default Object Access Controls', 'Update'] +- ['notifications_delete.md', 'Notifications', 'Delete'] +- ['notifications_get.md', 'Notifications', 'Get'] +- ['notifications_insert.md', 'Notifications', 'Insert'] +- ['notifications_list.md', 'Notifications', 'List'] - ['object-access-controls_delete.md', 'Object Access Controls', 'Delete'] - ['object-access-controls_get.md', 'Object Access Controls', 'Get'] - ['object-access-controls_insert.md', 'Object Access Controls', 'Insert'] @@ -38,12 +45,16 @@ pages: - ['objects_copy.md', 'Objects', 'Copy'] - ['objects_delete.md', 'Objects', 'Delete'] - ['objects_get.md', 'Objects', 'Get'] +- ['objects_get-iam-policy.md', 'Objects', 'Get Iam Policy'] - ['objects_insert.md', 'Objects', 'Insert'] - ['objects_list.md', 'Objects', 'List'] - ['objects_patch.md', 'Objects', 'Patch'] - ['objects_rewrite.md', 'Objects', 'Rewrite'] +- ['objects_set-iam-policy.md', 'Objects', 'Set Iam Policy'] +- ['objects_test-iam-permissions.md', 'Objects', 'Test Iam Permissions'] - ['objects_update.md', 'Objects', 'Update'] - ['objects_watch-all.md', 'Objects', 'Watch All'] +- ['projects_service-account-get.md', 'Projects', 'Service Account Get'] theme: readthedocs diff --git a/gen/storage1-cli/src/main.rs b/gen/storage1-cli/src/main.rs index 7a1b2515f6..838a3251a9 100644 --- a/gen/storage1-cli/src/main.rs +++ b/gen/storage1-cli/src/main.rs @@ -52,6 +52,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -65,6 +68,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -96,6 +100,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -109,6 +116,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -192,6 +200,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -205,6 +216,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -244,6 +256,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -257,6 +272,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -340,6 +356,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -353,6 +372,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -436,6 +456,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -449,6 +472,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -488,6 +512,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "if-metageneration-not-match" => { call = call.if_metageneration_not_match(value.unwrap_or("")); }, @@ -507,7 +534,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-metageneration-not-match", "if-metageneration-match"].iter().map(|v|*v)); + v.extend(["if-metageneration-not-match", "user-project", "if-metageneration-match"].iter().map(|v|*v)); v } )); } } @@ -539,6 +566,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "projection" => { call = call.projection(value.unwrap_or("")); }, @@ -561,7 +591,63 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-metageneration-match", "if-metageneration-not-match", "projection"].iter().map(|v|*v)); + v.extend(["if-metageneration-match", "if-metageneration-not-match", "user-project", "projection"].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(), + _ => 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(()) + } + } + } + } + + fn _buckets_get_iam_policy(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.buckets().get_iam_policy(opt.value_of("bucket").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 { + "user-project" => { + call = call.user_project(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(["user-project"].iter().map(|v|*v)); v } )); } } @@ -620,24 +706,26 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "website.not-found-page" => Some(("website.notFoundPage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "website.main-page-suffix" => Some(("website.mainPageSuffix", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "updated" => Some(("updated", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "billing.requester-pays" => Some(("billing.requesterPays", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "logging.log-object-prefix" => Some(("logging.logObjectPrefix", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "logging.log-bucket" => Some(("logging.logBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "time-created" => Some(("timeCreated", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "labels" => Some(("labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "versioning.enabled" => Some(("versioning.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "project-number" => Some(("projectNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "metageneration" => Some(("metageneration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner.entity-id" => Some(("owner.entityId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner.entity" => Some(("owner.entity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "versioning.enabled" => Some(("versioning.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "storage-class" => Some(("storageClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["enabled", "entity", "entity-id", "etag", "id", "kind", "location", "log-bucket", "log-object-prefix", "logging", "main-page-suffix", "metageneration", "name", "not-found-page", "owner", "project-number", "self-link", "storage-class", "time-created", "updated", "versioning", "website"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["billing", "enabled", "entity", "entity-id", "etag", "id", "kind", "labels", "location", "log-bucket", "log-object-prefix", "logging", "main-page-suffix", "metageneration", "name", "not-found-page", "owner", "project-number", "requester-pays", "self-link", "storage-class", "time-created", "updated", "versioning", "website"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -797,24 +885,26 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "website.not-found-page" => Some(("website.notFoundPage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "website.main-page-suffix" => Some(("website.mainPageSuffix", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "updated" => Some(("updated", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "billing.requester-pays" => Some(("billing.requesterPays", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "logging.log-object-prefix" => Some(("logging.logObjectPrefix", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "logging.log-bucket" => Some(("logging.logBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "time-created" => Some(("timeCreated", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "labels" => Some(("labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "versioning.enabled" => Some(("versioning.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "project-number" => Some(("projectNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "metageneration" => Some(("metageneration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner.entity-id" => Some(("owner.entityId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner.entity" => Some(("owner.entity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "versioning.enabled" => Some(("versioning.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "storage-class" => Some(("storageClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["enabled", "entity", "entity-id", "etag", "id", "kind", "location", "log-bucket", "log-object-prefix", "logging", "main-page-suffix", "metageneration", "name", "not-found-page", "owner", "project-number", "self-link", "storage-class", "time-created", "updated", "versioning", "website"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["billing", "enabled", "entity", "entity-id", "etag", "id", "kind", "labels", "location", "log-bucket", "log-object-prefix", "logging", "main-page-suffix", "metageneration", "name", "not-found-page", "owner", "project-number", "requester-pays", "self-link", "storage-class", "time-created", "updated", "versioning", "website"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -828,6 +918,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "projection" => { call = call.projection(value.unwrap_or("")); }, @@ -856,7 +949,154 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-metageneration-match", "if-metageneration-not-match", "predefined-acl", "projection", "predefined-default-object-acl"].iter().map(|v|*v)); + v.extend(["projection", "if-metageneration-match", "user-project", "predefined-default-object-acl", "predefined-acl", "if-metageneration-not-match"].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(), + _ => 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(()) + } + } + } + } + + fn _buckets_set_iam_policy(&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()[..] { + "resource-id" => Some(("resourceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "kind", "resource-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::Policy = json::value::from_value(object).unwrap(); + let mut call = self.hub.buckets().set_iam_policy(request, opt.value_of("bucket").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 { + "user-project" => { + call = call.user_project(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(["user-project"].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(), + _ => 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(()) + } + } + } + } + + fn _buckets_test_iam_permissions(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.buckets().test_iam_permissions(opt.value_of("bucket").unwrap_or(""), &opt.values_of("permissions").map(|i|i.collect()).unwrap_or(Vec::new()).iter().map(|&v| v.to_string()).collect::>()); + 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 { + "user-project" => { + call = call.user_project(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(["user-project"].iter().map(|v|*v)); v } )); } } @@ -915,24 +1155,26 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "website.not-found-page" => Some(("website.notFoundPage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "website.main-page-suffix" => Some(("website.mainPageSuffix", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "updated" => Some(("updated", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "billing.requester-pays" => Some(("billing.requesterPays", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "logging.log-object-prefix" => Some(("logging.logObjectPrefix", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "logging.log-bucket" => Some(("logging.logBucket", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "time-created" => Some(("timeCreated", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "labels" => Some(("labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "versioning.enabled" => Some(("versioning.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "project-number" => Some(("projectNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "metageneration" => Some(("metageneration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner.entity-id" => Some(("owner.entityId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "owner.entity" => Some(("owner.entity", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "versioning.enabled" => Some(("versioning.enabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "storage-class" => Some(("storageClass", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["enabled", "entity", "entity-id", "etag", "id", "kind", "location", "log-bucket", "log-object-prefix", "logging", "main-page-suffix", "metageneration", "name", "not-found-page", "owner", "project-number", "self-link", "storage-class", "time-created", "updated", "versioning", "website"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["billing", "enabled", "entity", "entity-id", "etag", "id", "kind", "labels", "location", "log-bucket", "log-object-prefix", "logging", "main-page-suffix", "metageneration", "name", "not-found-page", "owner", "project-number", "requester-pays", "self-link", "storage-class", "time-created", "updated", "versioning", "website"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -946,6 +1188,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "projection" => { call = call.projection(value.unwrap_or("")); }, @@ -974,7 +1219,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-metageneration-match", "if-metageneration-not-match", "predefined-acl", "projection", "predefined-default-object-acl"].iter().map(|v|*v)); + v.extend(["projection", "if-metageneration-match", "user-project", "predefined-default-object-acl", "predefined-acl", "if-metageneration-not-match"].iter().map(|v|*v)); v } )); } } @@ -1100,6 +1345,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1113,6 +1361,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -1144,6 +1393,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1157,6 +1409,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -1242,6 +1495,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1255,6 +1511,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -1294,6 +1551,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "if-metageneration-not-match" => { call = call.if_metageneration_not_match(value.unwrap_or("")); }, @@ -1313,7 +1573,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-metageneration-not-match", "if-metageneration-match"].iter().map(|v|*v)); + v.extend(["if-metageneration-not-match", "user-project", "if-metageneration-match"].iter().map(|v|*v)); v } )); } } @@ -1399,6 +1659,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1412,6 +1675,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].iter().map(|v|*v)); v } )); } } @@ -1497,6 +1761,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -1510,6 +1777,264 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["user-project"].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(), + _ => 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(()) + } + } + } + } + + fn _notifications_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.notifications().delete(opt.value_of("bucket").unwrap_or(""), opt.value_of("notification").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 { + "user-project" => { + call = call.user_project(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(["user-project"].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); + } + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok(mut response) => { + Ok(()) + } + } + } + } + + fn _notifications_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.notifications().get(opt.value_of("bucket").unwrap_or(""), opt.value_of("notification").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 { + "user-project" => { + call = call.user_project(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(["user-project"].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(), + _ => 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(()) + } + } + } + } + + fn _notifications_insert(&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()[..] { + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "custom-attributes" => Some(("custom_attributes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "topic" => Some(("topic", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "event-types" => Some(("event_types", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "payload-format" => Some(("payload_format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "object-name-prefix" => Some(("object_name_prefix", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["custom-attributes", "etag", "event-types", "id", "kind", "object-name-prefix", "payload-format", "self-link", "topic"]); + 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::Notification = json::value::from_value(object).unwrap(); + let mut call = self.hub.notifications().insert(request, opt.value_of("bucket").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 { + "user-project" => { + call = call.user_project(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(["user-project"].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(), + _ => 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(()) + } + } + } + } + + fn _notifications_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.notifications().list(opt.value_of("bucket").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 { + "user-project" => { + call = call.user_project(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(["user-project"].iter().map(|v|*v)); v } )); } } @@ -1549,6 +2074,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "generation" => { call = call.generation(value.unwrap_or("")); }, @@ -1565,7 +2093,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["generation"].iter().map(|v|*v)); + v.extend(["generation", "user-project"].iter().map(|v|*v)); v } )); } } @@ -1597,6 +2125,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "generation" => { call = call.generation(value.unwrap_or("")); }, @@ -1613,7 +2144,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["generation"].iter().map(|v|*v)); + v.extend(["generation", "user-project"].iter().map(|v|*v)); v } )); } } @@ -1699,6 +2230,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "generation" => { call = call.generation(value.unwrap_or("")); }, @@ -1715,7 +2249,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["generation"].iter().map(|v|*v)); + v.extend(["generation", "user-project"].iter().map(|v|*v)); v } )); } } @@ -1755,6 +2289,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "generation" => { call = call.generation(value.unwrap_or("")); }, @@ -1771,7 +2308,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["generation"].iter().map(|v|*v)); + v.extend(["generation", "user-project"].iter().map(|v|*v)); v } )); } } @@ -1857,6 +2394,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "generation" => { call = call.generation(value.unwrap_or("")); }, @@ -1873,7 +2413,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["generation"].iter().map(|v|*v)); + v.extend(["generation", "user-project"].iter().map(|v|*v)); v } )); } } @@ -1959,6 +2499,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "generation" => { call = call.generation(value.unwrap_or("")); }, @@ -1975,7 +2518,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["generation"].iter().map(|v|*v)); + v.extend(["generation", "user-project"].iter().map(|v|*v)); v } )); } } @@ -2077,6 +2620,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "if-metageneration-match" => { call = call.if_metageneration_match(value.unwrap_or("")); }, @@ -2102,7 +2648,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-metageneration-match", "if-generation-match", "destination-predefined-acl"].iter().map(|v|*v)); + v.extend(["if-metageneration-match", "user-project", "destination-predefined-acl", "if-generation-match"].iter().map(|v|*v)); v } )); } } @@ -2208,6 +2754,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "source-generation" => { call = call.source_generation(value.unwrap_or("")); }, @@ -2257,7 +2806,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-source-generation-match", "projection", "if-source-metageneration-not-match", "if-metageneration-not-match", "source-generation", "destination-predefined-acl", "if-source-generation-not-match", "if-source-metageneration-match", "if-generation-match", "if-metageneration-match", "if-generation-not-match"].iter().map(|v|*v)); + v.extend(["if-source-generation-match", "projection", "if-source-metageneration-not-match", "if-metageneration-not-match", "user-project", "source-generation", "destination-predefined-acl", "if-source-generation-not-match", "if-source-metageneration-match", "if-generation-match", "if-metageneration-match", "if-generation-not-match"].iter().map(|v|*v)); v } )); } } @@ -2302,6 +2851,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "if-metageneration-not-match" => { call = call.if_metageneration_not_match(value.unwrap_or("")); }, @@ -2330,7 +2882,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["generation", "if-metageneration-not-match", "if-generation-match", "if-metageneration-match", "if-generation-not-match"].iter().map(|v|*v)); + v.extend(["if-generation-not-match", "generation", "if-metageneration-not-match", "user-project", "if-generation-match", "if-metageneration-match"].iter().map(|v|*v)); v } )); } } @@ -2363,6 +2915,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "projection" => { call = call.projection(value.unwrap_or("")); }, @@ -2397,7 +2952,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["projection", "generation", "if-metageneration-match", "if-generation-match", "if-metageneration-not-match", "if-generation-not-match"].iter().map(|v|*v)); + v.extend(["projection", "generation", "if-metageneration-match", "user-project", "if-generation-match", "if-metageneration-not-match", "if-generation-not-match"].iter().map(|v|*v)); v } )); } } @@ -2436,6 +2991,65 @@ impl<'n> Engine<'n> { } } + fn _objects_get_iam_policy(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.objects().get_iam_policy(opt.value_of("bucket").unwrap_or(""), opt.value_of("object").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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, + "generation" => { + call = call.generation(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(["generation", "user-project"].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(), + _ => 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(()) + } + } + } + } + fn _objects_insert(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -2502,6 +3116,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "projection" => { call = call.projection(value.unwrap_or("")); }, @@ -2539,7 +3156,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-generation-match", "if-generation-not-match", "content-encoding", "if-metageneration-match", "name", "predefined-acl", "if-metageneration-not-match", "projection"].iter().map(|v|*v)); + v.extend(["if-generation-match", "projection", "if-metageneration-match", "user-project", "content-encoding", "if-generation-not-match", "predefined-acl", "if-metageneration-not-match", "name"].iter().map(|v|*v)); v } )); } } @@ -2588,6 +3205,9 @@ impl<'n> Engine<'n> { "versions" => { call = call.versions(arg_from_str(value.unwrap_or("false"), err, "versions", "boolean")); }, + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "projection" => { call = call.projection(value.unwrap_or("")); }, @@ -2616,7 +3236,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["projection", "versions", "prefix", "max-results", "page-token", "delimiter"].iter().map(|v|*v)); + v.extend(["projection", "versions", "user-project", "delimiter", "max-results", "page-token", "prefix"].iter().map(|v|*v)); v } )); } } @@ -2716,6 +3336,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "projection" => { call = call.projection(value.unwrap_or("")); }, @@ -2750,7 +3373,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-generation-match", "projection", "generation", "if-metageneration-match", "predefined-acl", "if-metageneration-not-match", "if-generation-not-match"].iter().map(|v|*v)); + v.extend(["if-generation-match", "projection", "generation", "if-metageneration-match", "user-project", "predefined-acl", "if-metageneration-not-match", "if-generation-not-match"].iter().map(|v|*v)); v } )); } } @@ -2850,6 +3473,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "source-generation" => { call = call.source_generation(value.unwrap_or("")); }, @@ -2902,7 +3528,160 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-source-generation-match", "if-generation-match", "projection", "if-source-metageneration-not-match", "if-metageneration-not-match", "source-generation", "max-bytes-rewritten-per-call", "if-source-generation-not-match", "destination-predefined-acl", "if-source-metageneration-match", "rewrite-token", "if-metageneration-match", "if-generation-not-match"].iter().map(|v|*v)); + v.extend(["if-source-generation-match", "if-generation-match", "projection", "if-source-metageneration-not-match", "if-metageneration-not-match", "user-project", "source-generation", "max-bytes-rewritten-per-call", "if-source-generation-not-match", "destination-predefined-acl", "if-source-metageneration-match", "rewrite-token", "if-metageneration-match", "if-generation-not-match"].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(), + _ => 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(()) + } + } + } + } + + fn _objects_set_iam_policy(&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()[..] { + "resource-id" => Some(("resourceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["etag", "kind", "resource-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::Policy = json::value::from_value(object).unwrap(); + let mut call = self.hub.objects().set_iam_policy(request, opt.value_of("bucket").unwrap_or(""), opt.value_of("object").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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, + "generation" => { + call = call.generation(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(["generation", "user-project"].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(), + _ => 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(()) + } + } + } + } + + fn _objects_test_iam_permissions(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.objects().test_iam_permissions(opt.value_of("bucket").unwrap_or(""), opt.value_of("object").unwrap_or(""), &opt.values_of("permissions").map(|i|i.collect()).unwrap_or(Vec::new()).iter().map(|&v| v.to_string()).collect::>()); + 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, + "generation" => { + call = call.generation(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(["generation", "user-project"].iter().map(|v|*v)); v } )); } } @@ -3003,6 +3782,9 @@ impl<'n> Engine<'n> { 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 { + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "projection" => { call = call.projection(value.unwrap_or("")); }, @@ -3040,7 +3822,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["if-generation-match", "projection", "generation", "if-metageneration-match", "predefined-acl", "if-metageneration-not-match", "if-generation-not-match"].iter().map(|v|*v)); + v.extend(["if-generation-match", "projection", "generation", "if-metageneration-match", "user-project", "predefined-acl", "if-metageneration-not-match", "if-generation-not-match"].iter().map(|v|*v)); v } )); } } @@ -3130,6 +3912,9 @@ impl<'n> Engine<'n> { "versions" => { call = call.versions(arg_from_str(value.unwrap_or("false"), err, "versions", "boolean")); }, + "user-project" => { + call = call.user_project(value.unwrap_or("")); + }, "projection" => { call = call.projection(value.unwrap_or("")); }, @@ -3158,7 +3943,59 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["projection", "versions", "prefix", "max-results", "page-token", "delimiter"].iter().map(|v|*v)); + v.extend(["projection", "versions", "user-project", "delimiter", "max-results", "page-token", "prefix"].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(), + _ => 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(()) + } + } + } + } + + fn _projects_service_account_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().service_account_get(opt.value_of("project-id").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 } )); } } @@ -3231,6 +4068,9 @@ impl<'n> Engine<'n> { ("get", Some(opt)) => { call_result = self._buckets_get(opt, dry_run, &mut err); }, + ("get-iam-policy", Some(opt)) => { + call_result = self._buckets_get_iam_policy(opt, dry_run, &mut err); + }, ("insert", Some(opt)) => { call_result = self._buckets_insert(opt, dry_run, &mut err); }, @@ -3240,6 +4080,12 @@ impl<'n> Engine<'n> { ("patch", Some(opt)) => { call_result = self._buckets_patch(opt, dry_run, &mut err); }, + ("set-iam-policy", Some(opt)) => { + call_result = self._buckets_set_iam_policy(opt, dry_run, &mut err); + }, + ("test-iam-permissions", Some(opt)) => { + call_result = self._buckets_test_iam_permissions(opt, dry_run, &mut err); + }, ("update", Some(opt)) => { call_result = self._buckets_update(opt, dry_run, &mut err); }, @@ -3286,6 +4132,26 @@ impl<'n> Engine<'n> { } } }, + ("notifications", Some(opt)) => { + match opt.subcommand() { + ("delete", Some(opt)) => { + call_result = self._notifications_delete(opt, dry_run, &mut err); + }, + ("get", Some(opt)) => { + call_result = self._notifications_get(opt, dry_run, &mut err); + }, + ("insert", Some(opt)) => { + call_result = self._notifications_insert(opt, dry_run, &mut err); + }, + ("list", Some(opt)) => { + call_result = self._notifications_list(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("notifications".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, ("object-access-controls", Some(opt)) => { match opt.subcommand() { ("delete", Some(opt)) => { @@ -3326,6 +4192,9 @@ impl<'n> Engine<'n> { ("get", Some(opt)) => { call_result = self._objects_get(opt, dry_run, &mut err); }, + ("get-iam-policy", Some(opt)) => { + call_result = self._objects_get_iam_policy(opt, dry_run, &mut err); + }, ("insert", Some(opt)) => { call_result = self._objects_insert(opt, dry_run, &mut err); }, @@ -3338,6 +4207,12 @@ impl<'n> Engine<'n> { ("rewrite", Some(opt)) => { call_result = self._objects_rewrite(opt, dry_run, &mut err); }, + ("set-iam-policy", Some(opt)) => { + call_result = self._objects_set_iam_policy(opt, dry_run, &mut err); + }, + ("test-iam-permissions", Some(opt)) => { + call_result = self._objects_test_iam_permissions(opt, dry_run, &mut err); + }, ("update", Some(opt)) => { call_result = self._objects_update(opt, dry_run, &mut err); }, @@ -3350,6 +4225,17 @@ impl<'n> Engine<'n> { } } }, + ("projects", Some(opt)) => { + match opt.subcommand() { + ("service-account-get", Some(opt)) => { + call_result = self._projects_service_account_get(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("projects".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, _ => { err.issues.push(CLIError::MissingCommandError); writeln!(io::stderr(), "{}\n", self.opt.usage()).ok(); @@ -3604,7 +4490,7 @@ fn main() { ]), ]), - ("buckets", "methods: 'delete', 'get', 'insert', 'list', 'patch' and 'update'", vec![ + ("buckets", "methods: 'delete', 'get', 'get-iam-policy', 'insert', 'list', 'patch', 'set-iam-policy', 'test-iam-permissions' and 'update'", vec![ ("delete", Some(r##"Permanently deletes an empty bucket."##), "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/buckets_delete", @@ -3637,6 +4523,28 @@ fn main() { 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)), + ]), + ("get-iam-policy", + Some(r##"Returns an IAM policy for the specified bucket."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/buckets_get-iam-policy", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"Name of a bucket."##), + 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"##), @@ -3715,6 +4623,62 @@ fn main() { 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)), + ]), + ("set-iam-policy", + Some(r##"Updates an IAM policy for the specified bucket."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/buckets_set-iam-policy", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"Name of a bucket."##), + 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)), + ]), + ("test-iam-permissions", + Some(r##"Tests a set of permissions on the given bucket to see which, if any, are held by the caller."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/buckets_test-iam-permissions", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"Name of a bucket."##), + Some(true), + Some(false)), + + (Some(r##"permissions"##), + None, + Some(r##"Permissions to test."##), + 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"##), @@ -3941,6 +4905,109 @@ fn main() { ]), ]), + ("notifications", "methods: 'delete', 'get', 'insert' and 'list'", vec![ + ("delete", + Some(r##"Permanently deletes a notification subscription."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/notifications_delete", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"The parent bucket of the notification."##), + Some(true), + Some(false)), + + (Some(r##"notification"##), + None, + Some(r##"ID of the notification to delete."##), + 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)), + ]), + ("get", + Some(r##"View a notification configuration."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/notifications_get", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"The parent bucket of the notification."##), + Some(true), + Some(false)), + + (Some(r##"notification"##), + None, + Some(r##"Notification ID"##), + 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)), + ]), + ("insert", + Some(r##"Creates a notification subscription for a given bucket."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/notifications_insert", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"The parent bucket of the notification."##), + 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)), + ]), + ("list", + Some(r##"Retrieves a list of notification subscriptions for a given bucket."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/notifications_list", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"Name of a GCS bucket."##), + 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)), + ]), + ]), + ("object-access-controls", "methods: 'delete', 'get', 'insert', 'list', 'patch' and 'update'", vec![ ("delete", Some(r##"Permanently deletes the ACL entry for the specified entity on the specified object."##), @@ -4148,7 +5215,7 @@ fn main() { ]), ]), - ("objects", "methods: 'compose', 'copy', 'delete', 'get', 'insert', 'list', 'patch', 'rewrite', 'update' and 'watch-all'", vec![ + ("objects", "methods: 'compose', 'copy', 'delete', 'get', 'get-iam-policy', 'insert', 'list', 'patch', 'rewrite', 'set-iam-policy', 'test-iam-permissions', 'update' and 'watch-all'", vec![ ("compose", Some(r##"Concatenates a list of existing objects into a new object in the same bucket."##), "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/objects_compose", @@ -4273,6 +5340,34 @@ fn main() { 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)), + ]), + ("get-iam-policy", + Some(r##"Returns an IAM policy for the specified object."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/objects_get-iam-policy", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"Name of the bucket in which the object resides."##), + Some(true), + Some(false)), + + (Some(r##"object"##), + None, + Some(r##"Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts."##), + 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"##), @@ -4409,6 +5504,74 @@ fn main() { 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)), + ]), + ("set-iam-policy", + Some(r##"Updates an IAM policy for the specified object."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/objects_set-iam-policy", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"Name of the bucket in which the object resides."##), + Some(true), + Some(false)), + + (Some(r##"object"##), + None, + Some(r##"Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts."##), + 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)), + ]), + ("test-iam-permissions", + Some(r##"Tests a set of permissions on the given object to see which, if any, are held by the caller."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/objects_test-iam-permissions", + vec![ + (Some(r##"bucket"##), + None, + Some(r##"Name of the bucket in which the object resides."##), + Some(true), + Some(false)), + + (Some(r##"object"##), + None, + Some(r##"Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts."##), + Some(true), + Some(false)), + + (Some(r##"permissions"##), + None, + Some(r##"Permissions to test."##), + 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"##), @@ -4479,11 +5642,36 @@ fn main() { ]), ]), + ("projects", "methods: 'service-account-get'", vec![ + ("service-account-get", + Some(r##"Get the email address of this project's GCS service account."##), + "Details at http://byron.github.io/google-apis-rs/google_storage1_cli/projects_service-account-get", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"Project ID"##), + 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)), + ]), + ]), + ]; let mut app = App::new("storage1") .author("Sebastian Thiel ") - .version("1.0.4+20161123") + .version("1.0.4+20170504") .about("Stores and retrieves potentially large, immutable data objects.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_storage1_cli") .arg(Arg::with_name("url") diff --git a/gen/storage1/Cargo.toml b/gen/storage1/Cargo.toml index 455c5f8d35..7fbbcef4bd 100644 --- a/gen/storage1/Cargo.toml +++ b/gen/storage1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-storage1" -version = "1.0.4+20161123" +version = "1.0.4+20170504" authors = ["Sebastian Thiel "] description = "A complete library to interact with storage (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/storage1" homepage = "https://developers.google.com/storage/docs/json_api/" -documentation = "https://docs.rs/google-storage1/1.0.4+20161123" +documentation = "https://docs.rs/google-storage1/1.0.4+20170504" license = "MIT" keywords = ["storage", "google", "protocol", "web", "api"] diff --git a/gen/storage1/README.md b/gen/storage1/README.md index a5fe1090cc..76e669254b 100644 --- a/gen/storage1/README.md +++ b/gen/storage1/README.md @@ -5,44 +5,48 @@ DO NOT EDIT ! --> The `google-storage1` library allows access to all features of the *Google storage* service. -This documentation was generated from *storage* crate version *1.0.4+20161123*, where *20161123* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *storage* crate version *1.0.4+20170504*, where *20170504* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *storage* *v1* API can be found at the [official documentation site](https://developers.google.com/storage/docs/json_api/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.Storage.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.Storage.html) ... -* [bucket access controls](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketAccessControl.html) - * [*delete*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketAccessControlDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketAccessControlGetCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketAccessControlInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketAccessControlListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketAccessControlPatchCall.html) and [*update*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketAccessControlUpdateCall.html) -* [buckets](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.Bucket.html) - * [*delete*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketGetCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketPatchCall.html) and [*update*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.BucketUpdateCall.html) -* [channels](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.Channel.html) - * [*stop*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ChannelStopCall.html) +* [bucket access controls](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketAccessControl.html) + * [*delete*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketAccessControlDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketAccessControlGetCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketAccessControlInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketAccessControlListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketAccessControlPatchCall.html) and [*update*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketAccessControlUpdateCall.html) +* [buckets](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.Bucket.html) + * [*delete*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketGetCall.html), [*get iam policy*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketGetIamPolicyCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketPatchCall.html), [*set iam policy*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketSetIamPolicyCall.html), [*test iam permissions*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketTestIamPermissionCall.html) and [*update*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.BucketUpdateCall.html) +* [channels](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.Channel.html) + * [*stop*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ChannelStopCall.html) * default object access controls - * [*delete*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.DefaultObjectAccessControlDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.DefaultObjectAccessControlGetCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.DefaultObjectAccessControlInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.DefaultObjectAccessControlListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.DefaultObjectAccessControlPatchCall.html) and [*update*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.DefaultObjectAccessControlUpdateCall.html) -* [object access controls](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectAccessControl.html) - * [*delete*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectAccessControlDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectAccessControlGetCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectAccessControlInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectAccessControlListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectAccessControlPatchCall.html) and [*update*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectAccessControlUpdateCall.html) -* [objects](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.Object.html) - * [*compose*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectComposeCall.html), [*copy*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectCopyCall.html), [*delete*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectGetCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectPatchCall.html), [*rewrite*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectRewriteCall.html), [*update*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectUpdateCall.html) and [*watch all*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectWatchAllCall.html) + * [*delete*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.DefaultObjectAccessControlDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.DefaultObjectAccessControlGetCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.DefaultObjectAccessControlInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.DefaultObjectAccessControlListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.DefaultObjectAccessControlPatchCall.html) and [*update*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.DefaultObjectAccessControlUpdateCall.html) +* [notifications](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.Notification.html) + * [*delete*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.NotificationDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.NotificationGetCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.NotificationInsertCall.html) and [*list*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.NotificationListCall.html) +* [object access controls](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectAccessControl.html) + * [*delete*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectAccessControlDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectAccessControlGetCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectAccessControlInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectAccessControlListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectAccessControlPatchCall.html) and [*update*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectAccessControlUpdateCall.html) +* [objects](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.Object.html) + * [*compose*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectComposeCall.html), [*copy*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectCopyCall.html), [*delete*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectDeleteCall.html), [*get*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectGetCall.html), [*get iam policy*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectGetIamPolicyCall.html), [*insert*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectInsertCall.html), [*list*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectListCall.html), [*patch*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectPatchCall.html), [*rewrite*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectRewriteCall.html), [*set iam policy*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectSetIamPolicyCall.html), [*test iam permissions*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectTestIamPermissionCall.html), [*update*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectUpdateCall.html) and [*watch all*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectWatchAllCall.html) +* projects + * [*service account get*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ProjectServiceAccountGetCall.html) Upload supported by ... -* [*insert objects*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectInsertCall.html) +* [*insert objects*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectInsertCall.html) Download supported by ... -* [*get objects*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectGetCall.html) -* [*update objects*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectUpdateCall.html) -* [*insert objects*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectInsertCall.html) -* [*compose objects*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectComposeCall.html) -* [*copy objects*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectCopyCall.html) +* [*get objects*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectGetCall.html) +* [*update objects*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectUpdateCall.html) +* [*insert objects*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectInsertCall.html) +* [*compose objects*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectComposeCall.html) +* [*copy objects*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectCopyCall.html) Subscription supported by ... -* [*watch all objects*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectWatchAllCall.html) -* [*list objects*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.ObjectListCall.html) +* [*watch all objects*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectWatchAllCall.html) +* [*list objects*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.ObjectListCall.html) @@ -50,17 +54,17 @@ Subscription supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/struct.Storage.html)** +* **[Hub](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/struct.Storage.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.Part.html)** + * **[Parts](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -74,11 +78,14 @@ let r = hub.resource().activity(...).doit() Or specifically ... ```ignore +let r = hub.objects().get_iam_policy(...).doit() let r = hub.objects().list(...).doit() let r = hub.objects().rewrite(...).doit() +let r = hub.objects().test_iam_permissions(...).doit() let r = hub.objects().copy(...).doit() let r = hub.objects().watch_all(...).doit() let r = hub.objects().get(...).doit() +let r = hub.objects().set_iam_policy(...).doit() let r = hub.objects().insert(...).doit() let r = hub.objects().compose(...).doit() let r = hub.objects().update(...).doit() @@ -135,19 +142,20 @@ let mut req = Object::default(); // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.objects().rewrite(req, "sourceBucket", "sourceObject", "destinationBucket", "destinationObject") - .source_generation("et") - .rewrite_token("dolores") - .projection("kasd") - .max_bytes_rewritten_per_call("accusam") - .if_source_metageneration_not_match("takimata") - .if_source_metageneration_match("justo") - .if_source_generation_not_match("amet.") - .if_source_generation_match("erat") - .if_metageneration_not_match("labore") - .if_metageneration_match("sea") - .if_generation_not_match("nonumy") - .if_generation_match("dolores") - .destination_predefined_acl("gubergren") + .user_project("et") + .source_generation("dolores") + .rewrite_token("kasd") + .projection("accusam") + .max_bytes_rewritten_per_call("takimata") + .if_source_metageneration_not_match("justo") + .if_source_metageneration_match("amet.") + .if_source_generation_not_match("erat") + .if_source_generation_match("labore") + .if_metageneration_not_match("sea") + .if_metageneration_match("nonumy") + .if_generation_not_match("dolores") + .if_generation_match("gubergren") + .destination_predefined_acl("sadipscing") .doit(); match result { @@ -170,17 +178,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.Delegate.html), 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-storage1/1.0.4+20161123/google_storage1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.ResponseResult.html), 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")`. @@ -190,29 +198,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.CallBuilder.html) 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-storage1/1.0.4+20161123/google_storage1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-storage1/1.0.4+20161123/google_storage1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.CallBuilder.html), 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-storage1/1.0.4+20161123/google_storage1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-storage1/1.0.4+20170504/google_storage1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/storage1/src/lib.rs b/gen/storage1/src/lib.rs index f9f9da419f..176e10af77 100644 --- a/gen/storage1/src/lib.rs +++ b/gen/storage1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *storage* crate version *1.0.4+20161123*, where *20161123* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *storage* crate version *1.0.4+20170504*, where *20170504* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *storage* *v1* API can be found at the //! [official documentation site](https://developers.google.com/storage/docs/json_api/). @@ -14,15 +14,19 @@ //! * [bucket access controls](struct.BucketAccessControl.html) //! * [*delete*](struct.BucketAccessControlDeleteCall.html), [*get*](struct.BucketAccessControlGetCall.html), [*insert*](struct.BucketAccessControlInsertCall.html), [*list*](struct.BucketAccessControlListCall.html), [*patch*](struct.BucketAccessControlPatchCall.html) and [*update*](struct.BucketAccessControlUpdateCall.html) //! * [buckets](struct.Bucket.html) -//! * [*delete*](struct.BucketDeleteCall.html), [*get*](struct.BucketGetCall.html), [*insert*](struct.BucketInsertCall.html), [*list*](struct.BucketListCall.html), [*patch*](struct.BucketPatchCall.html) and [*update*](struct.BucketUpdateCall.html) +//! * [*delete*](struct.BucketDeleteCall.html), [*get*](struct.BucketGetCall.html), [*get iam policy*](struct.BucketGetIamPolicyCall.html), [*insert*](struct.BucketInsertCall.html), [*list*](struct.BucketListCall.html), [*patch*](struct.BucketPatchCall.html), [*set iam policy*](struct.BucketSetIamPolicyCall.html), [*test iam permissions*](struct.BucketTestIamPermissionCall.html) and [*update*](struct.BucketUpdateCall.html) //! * [channels](struct.Channel.html) //! * [*stop*](struct.ChannelStopCall.html) //! * default object access controls //! * [*delete*](struct.DefaultObjectAccessControlDeleteCall.html), [*get*](struct.DefaultObjectAccessControlGetCall.html), [*insert*](struct.DefaultObjectAccessControlInsertCall.html), [*list*](struct.DefaultObjectAccessControlListCall.html), [*patch*](struct.DefaultObjectAccessControlPatchCall.html) and [*update*](struct.DefaultObjectAccessControlUpdateCall.html) +//! * [notifications](struct.Notification.html) +//! * [*delete*](struct.NotificationDeleteCall.html), [*get*](struct.NotificationGetCall.html), [*insert*](struct.NotificationInsertCall.html) and [*list*](struct.NotificationListCall.html) //! * [object access controls](struct.ObjectAccessControl.html) //! * [*delete*](struct.ObjectAccessControlDeleteCall.html), [*get*](struct.ObjectAccessControlGetCall.html), [*insert*](struct.ObjectAccessControlInsertCall.html), [*list*](struct.ObjectAccessControlListCall.html), [*patch*](struct.ObjectAccessControlPatchCall.html) and [*update*](struct.ObjectAccessControlUpdateCall.html) //! * [objects](struct.Object.html) -//! * [*compose*](struct.ObjectComposeCall.html), [*copy*](struct.ObjectCopyCall.html), [*delete*](struct.ObjectDeleteCall.html), [*get*](struct.ObjectGetCall.html), [*insert*](struct.ObjectInsertCall.html), [*list*](struct.ObjectListCall.html), [*patch*](struct.ObjectPatchCall.html), [*rewrite*](struct.ObjectRewriteCall.html), [*update*](struct.ObjectUpdateCall.html) and [*watch all*](struct.ObjectWatchAllCall.html) +//! * [*compose*](struct.ObjectComposeCall.html), [*copy*](struct.ObjectCopyCall.html), [*delete*](struct.ObjectDeleteCall.html), [*get*](struct.ObjectGetCall.html), [*get iam policy*](struct.ObjectGetIamPolicyCall.html), [*insert*](struct.ObjectInsertCall.html), [*list*](struct.ObjectListCall.html), [*patch*](struct.ObjectPatchCall.html), [*rewrite*](struct.ObjectRewriteCall.html), [*set iam policy*](struct.ObjectSetIamPolicyCall.html), [*test iam permissions*](struct.ObjectTestIamPermissionCall.html), [*update*](struct.ObjectUpdateCall.html) and [*watch all*](struct.ObjectWatchAllCall.html) +//! * projects +//! * [*service account get*](struct.ProjectServiceAccountGetCall.html) //! //! //! Upload supported by ... @@ -74,11 +78,14 @@ //! Or specifically ... //! //! ```ignore +//! let r = hub.objects().get_iam_policy(...).doit() //! let r = hub.objects().list(...).doit() //! let r = hub.objects().rewrite(...).doit() +//! let r = hub.objects().test_iam_permissions(...).doit() //! let r = hub.objects().copy(...).doit() //! let r = hub.objects().watch_all(...).doit() //! let r = hub.objects().get(...).doit() +//! let r = hub.objects().set_iam_policy(...).doit() //! let r = hub.objects().insert(...).doit() //! let r = hub.objects().compose(...).doit() //! let r = hub.objects().update(...).doit() @@ -136,19 +143,20 @@ //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! //! let result = hub.objects().rewrite(req, "sourceBucket", "sourceObject", "destinationBucket", "destinationObject") -//! .source_generation("justo") -//! .rewrite_token("justo") -//! .projection("et") -//! .max_bytes_rewritten_per_call("et") -//! .if_source_metageneration_not_match("diam") -//! .if_source_metageneration_match("ipsum") -//! .if_source_generation_not_match("Lorem") -//! .if_source_generation_match("et") -//! .if_metageneration_not_match("duo") -//! .if_metageneration_match("aliquyam") -//! .if_generation_not_match("sea") -//! .if_generation_match("Lorem") -//! .destination_predefined_acl("eos") +//! .user_project("justo") +//! .source_generation("et") +//! .rewrite_token("et") +//! .projection("diam") +//! .max_bytes_rewritten_per_call("ipsum") +//! .if_source_metageneration_not_match("Lorem") +//! .if_source_metageneration_match("et") +//! .if_source_generation_not_match("duo") +//! .if_source_generation_match("aliquyam") +//! .if_metageneration_not_match("sea") +//! .if_metageneration_match("Lorem") +//! .if_generation_not_match("eos") +//! .if_generation_match("erat") +//! .destination_predefined_acl("sadipscing") //! .doit(); //! //! match result { @@ -348,19 +356,20 @@ impl Default for Scope { /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().rewrite(req, "sourceBucket", "sourceObject", "destinationBucket", "destinationObject") -/// .source_generation("elitr") -/// .rewrite_token("amet") -/// .projection("no") -/// .max_bytes_rewritten_per_call("labore") -/// .if_source_metageneration_not_match("eirmod") -/// .if_source_metageneration_match("dolore") -/// .if_source_generation_not_match("invidunt") -/// .if_source_generation_match("aliquyam") -/// .if_metageneration_not_match("accusam") -/// .if_metageneration_match("Lorem") -/// .if_generation_not_match("sea") -/// .if_generation_match("et") -/// .destination_predefined_acl("duo") +/// .user_project("no") +/// .source_generation("labore") +/// .rewrite_token("eirmod") +/// .projection("dolore") +/// .max_bytes_rewritten_per_call("invidunt") +/// .if_source_metageneration_not_match("aliquyam") +/// .if_source_metageneration_match("accusam") +/// .if_source_generation_not_match("Lorem") +/// .if_source_generation_match("sea") +/// .if_metageneration_not_match("et") +/// .if_metageneration_match("duo") +/// .if_generation_not_match("et") +/// .if_generation_match("eirmod") +/// .destination_predefined_acl("sanctus") /// .doit(); /// /// match result { @@ -412,12 +421,18 @@ impl<'a, C, A> Storage pub fn default_object_access_controls(&'a self) -> DefaultObjectAccessControlMethods<'a, C, A> { DefaultObjectAccessControlMethods { hub: &self } } + pub fn notifications(&'a self) -> NotificationMethods<'a, C, A> { + NotificationMethods { hub: &self } + } pub fn object_access_controls(&'a self) -> ObjectAccessControlMethods<'a, C, A> { ObjectAccessControlMethods { hub: &self } } pub fn objects(&'a self) -> ObjectMethods<'a, C, A> { ObjectMethods { hub: &self } } + pub fn projects(&'a self) -> ProjectMethods<'a, C, A> { + ProjectMethods { hub: &self } + } /// Set the user-agent header field to use in all requests to the server. /// It defaults to `google-api-rust-client/1.0.4`. @@ -434,6 +449,78 @@ impl<'a, C, A> Storage // ############ // SCHEMAS ### // ########## +/// The action to take. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BucketLifecycleRuleAction { + /// Type of the action. Currently, only Delete and SetStorageClass are supported. + #[serde(rename="type")] + pub type_: Option, + /// Target storage class. Required iff the type of the action is SetStorageClass. + #[serde(rename="storageClass")] + pub storage_class: Option, +} + +impl NestedType for BucketLifecycleRuleAction {} +impl Part for BucketLifecycleRuleAction {} + + +/// Conditions that must be met for this operation to execute. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ComposeRequestSourceObjectsObjectPreconditions { + /// Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail. + #[serde(rename="ifGenerationMatch")] + pub if_generation_match: Option, +} + +impl NestedType for ComposeRequestSourceObjectsObjectPreconditions {} +impl Part for ComposeRequestSourceObjectsObjectPreconditions {} + + +/// The list of source objects that will be concatenated into a single object. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ComposeRequestSourceObjects { + /// The generation of this object to use as the source. + pub generation: Option, + /// The source object's name. The source object's bucket is implicitly the destination bucket. + pub name: Option, + /// Conditions that must be met for this operation to execute. + #[serde(rename="objectPreconditions")] + pub object_preconditions: Option, +} + +impl NestedType for ComposeRequestSourceObjects {} +impl Part for ComposeRequestSourceObjects {} + + +/// A subscription to receive Google PubSub notifications. +/// +/// # 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*). +/// +/// * [service account get projects](struct.ProjectServiceAccountGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ServiceAccount { + /// The kind of item this is. For notifications, this is always storage#notification. + pub kind: Option, + /// The ID of the notification. + pub email_address: Option, +} + +impl ResponseResult for ServiceAccount {} + + /// An access-control list. /// /// # Activities @@ -454,6 +541,101 @@ pub struct BucketAccessControls { impl ResponseResult for BucketAccessControls {} +/// The bucket's Cross-Origin Resource Sharing (CORS) configuration. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BucketCors { + /// The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". + pub origin: Option>, + /// The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. + #[serde(rename="responseHeader")] + pub response_header: Option>, + /// The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". + pub method: Option>, + /// The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. + #[serde(rename="maxAgeSeconds")] + pub max_age_seconds: Option, +} + +impl NestedType for BucketCors {} +impl Part for BucketCors {} + + +/// A bucket. +/// +/// # 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*). +/// +/// * [update buckets](struct.BucketUpdateCall.html) (request|response) +/// * [test iam permissions buckets](struct.BucketTestIamPermissionCall.html) (none) +/// * [insert buckets](struct.BucketInsertCall.html) (request|response) +/// * [delete buckets](struct.BucketDeleteCall.html) (none) +/// * [set iam policy buckets](struct.BucketSetIamPolicyCall.html) (none) +/// * [get iam policy buckets](struct.BucketGetIamPolicyCall.html) (none) +/// * [patch buckets](struct.BucketPatchCall.html) (request|response) +/// * [list buckets](struct.BucketListCall.html) (none) +/// * [get buckets](struct.BucketGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Bucket { + /// The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. + pub website: Option, + /// The URI of this bucket. + #[serde(rename="selfLink")] + pub self_link: Option, + /// The modification time of the bucket in RFC 3339 format. + pub updated: Option, + /// The creation time of the bucket in RFC 3339 format. + #[serde(rename="timeCreated")] + pub time_created: Option, + /// User-provided labels, in key/value pairs. + pub labels: Option>, + /// Default access controls to apply to new objects when no ACL is provided. + #[serde(rename="defaultObjectAcl")] + pub default_object_acl: Option>, + /// The metadata generation of this bucket. + pub metageneration: Option, + /// The bucket's Cross-Origin Resource Sharing (CORS) configuration. + pub cors: Option>, + /// The owner of the bucket. This is always the project team's owner group. + pub owner: Option, + /// Access controls on the bucket. + pub acl: Option>, + /// The ID of the bucket. For buckets, the id and name properities are the same. + pub id: Option, + /// The kind of item this is. For buckets, this is always storage#bucket. + pub kind: Option, + /// The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. + pub logging: Option, + /// The name of the bucket. + pub name: Option, + /// The bucket's billing configuration. + pub billing: Option, + /// The project number of the project the bucket belongs to. + #[serde(rename="projectNumber")] + pub project_number: Option, + /// HTTP 1.1 Entity tag for the bucket. + pub etag: Option, + /// The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. + #[serde(rename="storageClass")] + pub storage_class: Option, + /// The bucket's lifecycle configuration. See lifecycle management for more information. + pub lifecycle: Option, + /// The bucket's versioning configuration. + pub versioning: Option, + /// The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. + pub location: Option, +} + +impl RequestValue for Bucket {} +impl Resource for Bucket {} +impl ResponseResult for Bucket {} + + /// A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -470,6 +652,24 @@ impl NestedType for BucketLifecycleRule {} impl Part for BucketLifecycleRule {} +/// Metadata of customer-supplied encryption key, if the object is encrypted by such a key. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ObjectCustomerEncryption { + /// The encryption algorithm. + #[serde(rename="encryptionAlgorithm")] + pub encryption_algorithm: Option, + /// SHA256 hash value of the encryption key. + #[serde(rename="keySha256")] + pub key_sha256: Option, +} + +impl NestedType for ObjectCustomerEncryption {} +impl Part for ObjectCustomerEncryption {} + + /// The project team associated with the entity, if any. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -513,467 +713,33 @@ impl NestedType for BucketLifecycleRuleCondition {} impl Part for BucketLifecycleRuleCondition {} -/// The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BucketWebsite { - /// If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. - #[serde(rename="notFoundPage")] - pub not_found_page: Option, - /// If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. - #[serde(rename="mainPageSuffix")] - pub main_page_suffix: Option, -} - -impl NestedType for BucketWebsite {} -impl Part for BucketWebsite {} - - -/// An notification channel used to watch for resource changes. +/// A bucket/object IAM policy. /// /// # 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*). /// -/// * [stop channels](struct.ChannelStopCall.html) (request) -/// * [watch all objects](struct.ObjectWatchAllCall.html) (request|response) +/// * [get iam policy objects](struct.ObjectGetIamPolicyCall.html) (response) +/// * [set iam policy buckets](struct.BucketSetIamPolicyCall.html) (request|response) +/// * [set iam policy objects](struct.ObjectSetIamPolicyCall.html) (request|response) +/// * [get iam policy buckets](struct.BucketGetIamPolicyCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Channel { - /// A version-specific identifier for the watched resource. - #[serde(rename="resourceUri")] - pub resource_uri: Option, - /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". - pub kind: Option, - /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. +pub struct Policy { + /// The ID of the resource to which this policy belongs. Will be of the form buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. #[serde(rename="resourceId")] pub resource_id: Option, - /// A UUID or similar unique string that identifies this channel. - pub id: Option, - /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. - pub token: Option, - /// Additional parameters controlling delivery channel behavior. Optional. - pub params: Option>, - /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. - pub expiration: Option, - /// The address where notifications are delivered for this channel. - pub address: Option, - /// The type of delivery mechanism used for this channel. - #[serde(rename="type")] - pub type_: Option, - /// A Boolean value to indicate whether payload is wanted. Optional. - pub payload: Option, -} - -impl RequestValue for Channel {} -impl Resource for Channel {} -impl ResponseResult for Channel {} - - -/// The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BucketLogging { - /// A prefix for log object names. - #[serde(rename="logObjectPrefix")] - pub log_object_prefix: Option, - /// The destination bucket where the current bucket's logs should be placed. - #[serde(rename="logBucket")] - pub log_bucket: Option, -} - -impl NestedType for BucketLogging {} -impl Part for BucketLogging {} - - -/// The bucket's lifecycle configuration. See lifecycle management for more information. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BucketLifecycle { - /// A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. - pub rule: Option>, -} - -impl NestedType for BucketLifecycle {} -impl Part for BucketLifecycle {} - - -/// The bucket's versioning configuration. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BucketVersioning { - /// While set to true, versioning is fully enabled for this bucket. - pub enabled: Option, -} - -impl NestedType for BucketVersioning {} -impl Part for BucketVersioning {} - - -/// An object. -/// -/// # 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*). -/// -/// * [list objects](struct.ObjectListCall.html) (none) -/// * [rewrite objects](struct.ObjectRewriteCall.html) (request) -/// * [copy objects](struct.ObjectCopyCall.html) (request|response) -/// * [watch all objects](struct.ObjectWatchAllCall.html) (none) -/// * [get objects](struct.ObjectGetCall.html) (response) -/// * [insert objects](struct.ObjectInsertCall.html) (request|response) -/// * [compose objects](struct.ObjectComposeCall.html) (response) -/// * [update objects](struct.ObjectUpdateCall.html) (request|response) -/// * [delete objects](struct.ObjectDeleteCall.html) (none) -/// * [patch objects](struct.ObjectPatchCall.html) (request|response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Object { - /// The link to this object. - #[serde(rename="selfLink")] - pub self_link: Option, - /// The modification time of the object metadata in RFC 3339 format. - pub updated: Option, - /// Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream. - #[serde(rename="contentType")] - pub content_type: Option, - /// The creation time of the object in RFC 3339 format. - #[serde(rename="timeCreated")] - pub time_created: Option, - /// The content generation of this object. Used for object versioning. - pub generation: Option, - /// Metadata of customer-supplied encryption key, if the object is encrypted by such a key. - #[serde(rename="customerEncryption")] - pub customer_encryption: Option, - /// Number of underlying components that make up this object. Components are accumulated by compose operations. - #[serde(rename="componentCount")] - pub component_count: Option, - /// The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. - #[serde(rename="timeStorageClassUpdated")] - pub time_storage_class_updated: Option, - /// The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. - pub metageneration: Option, - /// Media download link. - #[serde(rename="mediaLink")] - pub media_link: Option, - /// The owner of the object. This will always be the uploader of the object. - pub owner: Option, - /// Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. - #[serde(rename="cacheControl")] - pub cache_control: Option, - /// Access controls on the object. - pub acl: Option>, - /// The ID of the object. - pub id: Option, - /// Content-Length of the data in bytes. - pub size: Option, - /// The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. - #[serde(rename="timeDeleted")] - pub time_deleted: Option, - /// The kind of item this is. For objects, this is always storage#object. - pub kind: Option, - /// Content-Language of the object data. - #[serde(rename="contentLanguage")] - pub content_language: Option, - /// The name of this object. Required if not specified by URL parameter. - pub name: Option, - /// MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. - #[serde(rename="md5Hash")] - pub md5_hash: Option, - /// The name of the bucket containing this object. - pub bucket: Option, - /// Content-Encoding of the object data. - #[serde(rename="contentEncoding")] - pub content_encoding: Option, - /// CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. - pub crc32c: Option, - /// HTTP 1.1 Entity tag for the object. + /// An association between a role, which comes with a set of permissions, and members who may assume that role. + pub bindings: Option>, + /// HTTP 1.1 Entity tag for the policy. pub etag: Option, - /// Storage class of the object. - #[serde(rename="storageClass")] - pub storage_class: Option, - /// Content-Disposition of the object data. - #[serde(rename="contentDisposition")] - pub content_disposition: Option, - /// User-provided metadata, in key/value pairs. - pub metadata: Option>, -} - -impl RequestValue for Object {} -impl Resource for Object {} -impl ResponseResult for Object {} - - -/// A list of objects. -/// -/// # 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*). -/// -/// * [list objects](struct.ObjectListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Objects { - /// The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The list of items. - pub items: Option>, - /// The kind of item this is. For lists of objects, this is always storage#objects. - pub kind: Option, - /// The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter. - pub prefixes: Option>, -} - -impl ResponseResult for Objects {} - - -/// The bucket's Cross-Origin Resource Sharing (CORS) configuration. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BucketCors { - /// The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". - pub origin: Option>, - /// The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. - #[serde(rename="responseHeader")] - pub response_header: Option>, - /// The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". - pub method: Option>, - /// The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. - #[serde(rename="maxAgeSeconds")] - pub max_age_seconds: Option, -} - -impl NestedType for BucketCors {} -impl Part for BucketCors {} - - -/// An access-control list. -/// -/// # 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*). -/// -/// * [list object access controls](struct.ObjectAccessControlListCall.html) (response) -/// * [list default object access controls](struct.DefaultObjectAccessControlListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ObjectAccessControls { - /// The list of items. - pub items: Option>, - /// The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls. + /// The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. pub kind: Option, } -impl ResponseResult for ObjectAccessControls {} - - -/// The project team associated with the entity, if any. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BucketAccessControlProjectTeam { - /// The project number. - #[serde(rename="projectNumber")] - pub project_number: Option, - /// The team. - pub team: Option, -} - -impl NestedType for BucketAccessControlProjectTeam {} -impl Part for BucketAccessControlProjectTeam {} - - -/// Conditions that must be met for this operation to execute. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ComposeRequestSourceObjectsObjectPreconditions { - /// Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail. - #[serde(rename="ifGenerationMatch")] - pub if_generation_match: Option, -} - -impl NestedType for ComposeRequestSourceObjectsObjectPreconditions {} -impl Part for ComposeRequestSourceObjectsObjectPreconditions {} - - -/// The list of source objects that will be concatenated into a single object. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ComposeRequestSourceObjects { - /// The generation of this object to use as the source. - pub generation: Option, - /// The source object's name. The source object's bucket is implicitly the destination bucket. - pub name: Option, - /// Conditions that must be met for this operation to execute. - #[serde(rename="objectPreconditions")] - pub object_preconditions: Option, -} - -impl NestedType for ComposeRequestSourceObjects {} -impl Part for ComposeRequestSourceObjects {} - - -/// A bucket. -/// -/// # 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*). -/// -/// * [update buckets](struct.BucketUpdateCall.html) (request|response) -/// * [insert buckets](struct.BucketInsertCall.html) (request|response) -/// * [delete buckets](struct.BucketDeleteCall.html) (none) -/// * [patch buckets](struct.BucketPatchCall.html) (request|response) -/// * [list buckets](struct.BucketListCall.html) (none) -/// * [get buckets](struct.BucketGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Bucket { - /// The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. - pub website: Option, - /// The modification time of the bucket in RFC 3339 format. - pub updated: Option, - /// The creation time of the bucket in RFC 3339 format. - #[serde(rename="timeCreated")] - pub time_created: Option, - /// The bucket's versioning configuration. - pub versioning: Option, - /// Default access controls to apply to new objects when no ACL is provided. - #[serde(rename="defaultObjectAcl")] - pub default_object_acl: Option>, - /// The metadata generation of this bucket. - pub metageneration: Option, - /// The bucket's Cross-Origin Resource Sharing (CORS) configuration. - pub cors: Option>, - /// The owner of the bucket. This is always the project team's owner group. - pub owner: Option, - /// Access controls on the bucket. - pub acl: Option>, - /// The ID of the bucket. - pub id: Option, - /// The kind of item this is. For buckets, this is always storage#bucket. - pub kind: Option, - /// The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. - pub logging: Option, - /// The name of the bucket. - pub name: Option, - /// The project number of the project the bucket belongs to. - #[serde(rename="projectNumber")] - pub project_number: Option, - /// HTTP 1.1 Entity tag for the bucket. - pub etag: Option, - /// The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. - #[serde(rename="storageClass")] - pub storage_class: Option, - /// The bucket's lifecycle configuration. See lifecycle management for more information. - pub lifecycle: Option, - /// The URI of this bucket. - #[serde(rename="selfLink")] - pub self_link: Option, - /// The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. - pub location: Option, -} - -impl RequestValue for Bucket {} -impl Resource for Bucket {} -impl ResponseResult for Bucket {} - - -/// Metadata of customer-supplied encryption key, if the object is encrypted by such a key. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ObjectCustomerEncryption { - /// The encryption algorithm. - #[serde(rename="encryptionAlgorithm")] - pub encryption_algorithm: Option, - /// SHA256 hash value of the encryption key. - #[serde(rename="keySha256")] - pub key_sha256: Option, -} - -impl NestedType for ObjectCustomerEncryption {} -impl Part for ObjectCustomerEncryption {} - - -/// An access-control entry. -/// -/// # 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*). -/// -/// * [list bucket access controls](struct.BucketAccessControlListCall.html) (none) -/// * [patch bucket access controls](struct.BucketAccessControlPatchCall.html) (request|response) -/// * [delete bucket access controls](struct.BucketAccessControlDeleteCall.html) (none) -/// * [update bucket access controls](struct.BucketAccessControlUpdateCall.html) (request|response) -/// * [get bucket access controls](struct.BucketAccessControlGetCall.html) (response) -/// * [insert bucket access controls](struct.BucketAccessControlInsertCall.html) (request|response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BucketAccessControl { - /// The domain associated with the entity, if any. - pub domain: Option, - /// The name of the bucket. - pub bucket: Option, - /// The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. - pub kind: Option, - /// The entity holding the permission, in one of the following forms: - /// - user-userId - /// - user-email - /// - group-groupId - /// - group-email - /// - domain-domain - /// - project-team-projectId - /// - allUsers - /// - allAuthenticatedUsers Examples: - /// - The user liz@example.com would be user-liz@example.com. - /// - The group example@googlegroups.com would be group-example@googlegroups.com. - /// - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. - pub entity: Option, - /// The email address associated with the entity, if any. - pub email: Option, - /// HTTP 1.1 Entity tag for the access-control entry. - pub etag: Option, - /// The access permission for the entity. - pub role: Option, - /// The ID for the entity, if any. - #[serde(rename="entityId")] - pub entity_id: Option, - /// The project team associated with the entity, if any. - #[serde(rename="projectTeam")] - pub project_team: Option, - /// The ID of the access-control entry. - pub id: Option, - /// The link to this access-control entry. - #[serde(rename="selfLink")] - pub self_link: Option, -} - -impl RequestValue for BucketAccessControl {} -impl Resource for BucketAccessControl {} -impl ResponseResult for BucketAccessControl {} +impl RequestValue for Policy {} +impl ResponseResult for Policy {} /// An access-control entry. @@ -1074,56 +840,207 @@ pub struct RewriteResponse { impl ResponseResult for RewriteResponse {} -/// The owner of the object. This will always be the uploader of the object. +/// An access-control entry. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [list bucket access controls](struct.BucketAccessControlListCall.html) (none) +/// * [patch bucket access controls](struct.BucketAccessControlPatchCall.html) (request|response) +/// * [delete bucket access controls](struct.BucketAccessControlDeleteCall.html) (none) +/// * [update bucket access controls](struct.BucketAccessControlUpdateCall.html) (request|response) +/// * [get bucket access controls](struct.BucketAccessControlGetCall.html) (response) +/// * [insert bucket access controls](struct.BucketAccessControlInsertCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ObjectOwner { - /// The ID for the entity. +pub struct BucketAccessControl { + /// The domain associated with the entity, if any. + pub domain: Option, + /// The name of the bucket. + pub bucket: Option, + /// The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. + pub kind: Option, + /// The entity holding the permission, in one of the following forms: + /// - user-userId + /// - user-email + /// - group-groupId + /// - group-email + /// - domain-domain + /// - project-team-projectId + /// - allUsers + /// - allAuthenticatedUsers Examples: + /// - The user liz@example.com would be user-liz@example.com. + /// - The group example@googlegroups.com would be group-example@googlegroups.com. + /// - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. + pub entity: Option, + /// The email address associated with the entity, if any. + pub email: Option, + /// HTTP 1.1 Entity tag for the access-control entry. + pub etag: Option, + /// The access permission for the entity. + pub role: Option, + /// The ID for the entity, if any. #[serde(rename="entityId")] pub entity_id: Option, - /// The entity, in the form user-userId. - pub entity: Option, + /// The project team associated with the entity, if any. + #[serde(rename="projectTeam")] + pub project_team: Option, + /// The ID of the access-control entry. + pub id: Option, + /// The link to this access-control entry. + #[serde(rename="selfLink")] + pub self_link: Option, } -impl NestedType for ObjectOwner {} -impl Part for ObjectOwner {} +impl RequestValue for BucketAccessControl {} +impl Resource for BucketAccessControl {} +impl ResponseResult for BucketAccessControl {} -/// The action to take. +/// An association between a role, which comes with a set of permissions, and members who may assume that role. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BucketLifecycleRuleAction { - /// Type of the action. Currently, only Delete and SetStorageClass are supported. +pub struct PolicyBindings { + /// The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole. + /// The new IAM roles are: + /// - roles/storage.admin — Full control of Google Cloud Storage resources. + /// - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. + /// - roles/storage.objectCreator — Access to create objects in Google Cloud Storage. + /// - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: + /// - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. + /// - roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. + /// - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. + /// - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. + /// - roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role. + pub role: Option, + /// A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: + /// - allUsers — A special identifier that represents anyone on the internet; with or without a Google account. + /// - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. + /// - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. + /// - serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . + /// - group:emailid — An email address that represents a Google group. For example, group:admins@example.com. + /// - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. + /// - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project + /// - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project + /// - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project + pub members: Option>, +} + +impl NestedType for PolicyBindings {} +impl Part for PolicyBindings {} + + +/// An notification channel used to watch for resource changes. +/// +/// # 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*). +/// +/// * [stop channels](struct.ChannelStopCall.html) (request) +/// * [watch all objects](struct.ObjectWatchAllCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Channel { + /// A version-specific identifier for the watched resource. + #[serde(rename="resourceUri")] + pub resource_uri: Option, + /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". + pub kind: Option, + /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. + #[serde(rename="resourceId")] + pub resource_id: Option, + /// A UUID or similar unique string that identifies this channel. + pub id: Option, + /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. + pub token: Option, + /// Additional parameters controlling delivery channel behavior. Optional. + pub params: Option>, + /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. + pub expiration: Option, + /// The address where notifications are delivered for this channel. + pub address: Option, + /// The type of delivery mechanism used for this channel. #[serde(rename="type")] pub type_: Option, - /// Target storage class. Required iff the type of the action is SetStorageClass. - #[serde(rename="storageClass")] - pub storage_class: Option, + /// A Boolean value to indicate whether payload is wanted. Optional. + pub payload: Option, } -impl NestedType for BucketLifecycleRuleAction {} -impl Part for BucketLifecycleRuleAction {} +impl RequestValue for Channel {} +impl Resource for Channel {} +impl ResponseResult for Channel {} -/// The owner of the bucket. This is always the project team's owner group. +/// The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct BucketOwner { - /// The ID for the entity. - #[serde(rename="entityId")] - pub entity_id: Option, - /// The entity, in the form project-owner-projectId. - pub entity: Option, +pub struct BucketLogging { + /// A prefix for log object names. + #[serde(rename="logObjectPrefix")] + pub log_object_prefix: Option, + /// The destination bucket where the current bucket's logs should be placed. + #[serde(rename="logBucket")] + pub log_bucket: Option, } -impl NestedType for BucketOwner {} -impl Part for BucketOwner {} +impl NestedType for BucketLogging {} +impl Part for BucketLogging {} + + +/// A storage.(buckets|objects).testIamPermissions response. +/// +/// # 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*). +/// +/// * [test iam permissions buckets](struct.BucketTestIamPermissionCall.html) (response) +/// * [test iam permissions objects](struct.ObjectTestIamPermissionCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestIamPermissionsResponse { + /// The kind of item this is. + pub kind: Option, + /// The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets or objects. The supported permissions are as follows: + /// - storage.buckets.delete — Delete bucket. + /// - storage.buckets.get — Read bucket metadata. + /// - storage.buckets.getIamPolicy — Read bucket IAM policy. + /// - storage.buckets.create — Create bucket. + /// - storage.buckets.list — List buckets. + /// - storage.buckets.setIamPolicy — Update bucket IAM policy. + /// - storage.buckets.update — Update bucket metadata. + /// - storage.objects.delete — Delete object. + /// - storage.objects.get — Read object data and metadata. + /// - storage.objects.getIamPolicy — Read object IAM policy. + /// - storage.objects.create — Create object. + /// - storage.objects.list — List objects. + /// - storage.objects.setIamPolicy — Update object IAM policy. + /// - storage.objects.update — Update object metadata. + pub permissions: Option>, +} + +impl ResponseResult for TestIamPermissionsResponse {} + + +/// The bucket's lifecycle configuration. See lifecycle management for more information. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BucketLifecycle { + /// A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. + pub rule: Option>, +} + +impl NestedType for BucketLifecycle {} +impl Part for BucketLifecycle {} /// A Compose request. @@ -1172,6 +1089,308 @@ pub struct Buckets { impl ResponseResult for Buckets {} +/// An object. +/// +/// # 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*). +/// +/// * [get iam policy objects](struct.ObjectGetIamPolicyCall.html) (none) +/// * [list objects](struct.ObjectListCall.html) (none) +/// * [rewrite objects](struct.ObjectRewriteCall.html) (request) +/// * [test iam permissions objects](struct.ObjectTestIamPermissionCall.html) (none) +/// * [copy objects](struct.ObjectCopyCall.html) (request|response) +/// * [watch all objects](struct.ObjectWatchAllCall.html) (none) +/// * [get objects](struct.ObjectGetCall.html) (response) +/// * [set iam policy objects](struct.ObjectSetIamPolicyCall.html) (none) +/// * [insert objects](struct.ObjectInsertCall.html) (request|response) +/// * [compose objects](struct.ObjectComposeCall.html) (response) +/// * [update objects](struct.ObjectUpdateCall.html) (request|response) +/// * [delete objects](struct.ObjectDeleteCall.html) (none) +/// * [patch objects](struct.ObjectPatchCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Object { + /// The link to this object. + #[serde(rename="selfLink")] + pub self_link: Option, + /// The modification time of the object metadata in RFC 3339 format. + pub updated: Option, + /// Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream. + #[serde(rename="contentType")] + pub content_type: Option, + /// The creation time of the object in RFC 3339 format. + #[serde(rename="timeCreated")] + pub time_created: Option, + /// The content generation of this object. Used for object versioning. + pub generation: Option, + /// Metadata of customer-supplied encryption key, if the object is encrypted by such a key. + #[serde(rename="customerEncryption")] + pub customer_encryption: Option, + /// Number of underlying components that make up this object. Components are accumulated by compose operations. + #[serde(rename="componentCount")] + pub component_count: Option, + /// The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. + #[serde(rename="timeStorageClassUpdated")] + pub time_storage_class_updated: Option, + /// The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. + pub metageneration: Option, + /// Media download link. + #[serde(rename="mediaLink")] + pub media_link: Option, + /// The owner of the object. This will always be the uploader of the object. + pub owner: Option, + /// Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. + #[serde(rename="cacheControl")] + pub cache_control: Option, + /// Access controls on the object. + pub acl: Option>, + /// The ID of the object, including the bucket name, object name, and generation number. + pub id: Option, + /// Content-Length of the data in bytes. + pub size: Option, + /// The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. + #[serde(rename="timeDeleted")] + pub time_deleted: Option, + /// The kind of item this is. For objects, this is always storage#object. + pub kind: Option, + /// Content-Language of the object data. + #[serde(rename="contentLanguage")] + pub content_language: Option, + /// The name of the object. Required if not specified by URL parameter. + pub name: Option, + /// MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. + #[serde(rename="md5Hash")] + pub md5_hash: Option, + /// The name of the bucket containing this object. + pub bucket: Option, + /// Content-Encoding of the object data. + #[serde(rename="contentEncoding")] + pub content_encoding: Option, + /// CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. + pub crc32c: Option, + /// HTTP 1.1 Entity tag for the object. + pub etag: Option, + /// Storage class of the object. + #[serde(rename="storageClass")] + pub storage_class: Option, + /// Content-Disposition of the object data. + #[serde(rename="contentDisposition")] + pub content_disposition: Option, + /// User-provided metadata, in key/value pairs. + pub metadata: Option>, +} + +impl RequestValue for Object {} +impl Resource for Object {} +impl ResponseResult for Object {} + + +/// The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BucketWebsite { + /// If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. + #[serde(rename="notFoundPage")] + pub not_found_page: Option, + /// If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. + #[serde(rename="mainPageSuffix")] + pub main_page_suffix: Option, +} + +impl NestedType for BucketWebsite {} +impl Part for BucketWebsite {} + + +/// The owner of the object. This will always be the uploader of the object. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ObjectOwner { + /// The ID for the entity. + #[serde(rename="entityId")] + pub entity_id: Option, + /// The entity, in the form user-userId. + pub entity: Option, +} + +impl NestedType for ObjectOwner {} +impl Part for ObjectOwner {} + + +/// The owner of the bucket. This is always the project team's owner group. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BucketOwner { + /// The ID for the entity. + #[serde(rename="entityId")] + pub entity_id: Option, + /// The entity, in the form project-owner-projectId. + pub entity: Option, +} + +impl NestedType for BucketOwner {} +impl Part for BucketOwner {} + + +/// A list of notification subscriptions. +/// +/// # 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*). +/// +/// * [list notifications](struct.NotificationListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Notifications { + /// The list of items. + pub items: Option>, + /// The kind of item this is. For lists of notifications, this is always storage#notifications. + pub kind: Option, +} + +impl ResponseResult for Notifications {} + + +/// A list of objects. +/// +/// # 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*). +/// +/// * [list objects](struct.ObjectListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Objects { + /// The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of items. + pub items: Option>, + /// The kind of item this is. For lists of objects, this is always storage#objects. + pub kind: Option, + /// The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter. + pub prefixes: Option>, +} + +impl ResponseResult for Objects {} + + +/// The bucket's billing configuration. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BucketBilling { + /// When set to true, bucket is requester pays. + #[serde(rename="requesterPays")] + pub requester_pays: Option, +} + +impl NestedType for BucketBilling {} +impl Part for BucketBilling {} + + +/// A subscription to receive Google PubSub notifications. +/// +/// # 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*). +/// +/// * [insert notifications](struct.NotificationInsertCall.html) (request|response) +/// * [list notifications](struct.NotificationListCall.html) (none) +/// * [delete notifications](struct.NotificationDeleteCall.html) (none) +/// * [get notifications](struct.NotificationGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Notification { + /// The kind of item this is. For notifications, this is always storage#notification. + pub kind: Option, + /// An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. + pub custom_attributes: Option>, + /// The ID of the notification. + pub id: Option, + /// The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' + pub topic: Option, + /// HTTP 1.1 Entity tag for this subscription notification. + pub etag: Option, + /// If present, only send notifications about listed event types. If empty, sent notifications for all event types. + pub event_types: Option>, + /// If present, only apply this notification configuration to object names that begin with this prefix. + pub object_name_prefix: Option, + /// The desired content of the Payload. + pub payload_format: Option, + /// The canonical URL of this notification. + #[serde(rename="selfLink")] + pub self_link: Option, +} + +impl RequestValue for Notification {} +impl Resource for Notification {} +impl ResponseResult for Notification {} + + +/// An access-control list. +/// +/// # 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*). +/// +/// * [list object access controls](struct.ObjectAccessControlListCall.html) (response) +/// * [list default object access controls](struct.DefaultObjectAccessControlListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ObjectAccessControls { + /// The list of items. + pub items: Option>, + /// The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls. + pub kind: Option, +} + +impl ResponseResult for ObjectAccessControls {} + + +/// The project team associated with the entity, if any. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BucketAccessControlProjectTeam { + /// The project number. + #[serde(rename="projectNumber")] + pub project_number: Option, + /// The team. + pub team: Option, +} + +impl NestedType for BucketAccessControlProjectTeam {} +impl Part for BucketAccessControlProjectTeam {} + + +/// The bucket's versioning configuration. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BucketVersioning { + /// While set to true, versioning is fully enabled for this bucket. + pub enabled: Option, +} + +impl NestedType for BucketVersioning {} +impl Part for BucketVersioning {} + + // ################### // MethodBuilders ### @@ -1228,27 +1447,7 @@ impl<'a, C, A> DefaultObjectAccessControlMethods<'a, C, A> { hub: self.hub, _request: request, _bucket: bucket.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Updates a default object ACL entry on the specified bucket. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `bucket` - Name of a bucket. - /// * `entity` - The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - pub fn update(&self, request: ObjectAccessControl, bucket: &str, entity: &str) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { - DefaultObjectAccessControlUpdateCall { - hub: self.hub, - _request: request, - _bucket: bucket.to_string(), - _entity: entity.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1266,6 +1465,7 @@ impl<'a, C, A> DefaultObjectAccessControlMethods<'a, C, A> { DefaultObjectAccessControlListCall { hub: self.hub, _bucket: bucket.to_string(), + _user_project: Default::default(), _if_metageneration_not_match: Default::default(), _if_metageneration_match: Default::default(), _delegate: Default::default(), @@ -1289,6 +1489,7 @@ impl<'a, C, A> DefaultObjectAccessControlMethods<'a, C, A> { _request: request, _bucket: bucket.to_string(), _entity: entity.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1308,6 +1509,29 @@ impl<'a, C, A> DefaultObjectAccessControlMethods<'a, C, A> { hub: self.hub, _bucket: bucket.to_string(), _entity: entity.to_string(), + _user_project: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates a default object ACL entry on the specified bucket. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `bucket` - Name of a bucket. + /// * `entity` - The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. + pub fn update(&self, request: ObjectAccessControl, bucket: &str, entity: &str) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { + DefaultObjectAccessControlUpdateCall { + hub: self.hub, + _request: request, + _bucket: bucket.to_string(), + _entity: entity.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1327,6 +1551,7 @@ impl<'a, C, A> DefaultObjectAccessControlMethods<'a, C, A> { hub: self.hub, _bucket: bucket.to_string(), _entity: entity.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1389,6 +1614,7 @@ impl<'a, C, A> BucketAccessControlMethods<'a, C, A> { _request: request, _bucket: bucket.to_string(), _entity: entity.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1408,6 +1634,7 @@ impl<'a, C, A> BucketAccessControlMethods<'a, C, A> { hub: self.hub, _bucket: bucket.to_string(), _entity: entity.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1427,6 +1654,7 @@ impl<'a, C, A> BucketAccessControlMethods<'a, C, A> { hub: self.hub, _request: request, _bucket: bucket.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1446,6 +1674,7 @@ impl<'a, C, A> BucketAccessControlMethods<'a, C, A> { hub: self.hub, _bucket: bucket.to_string(), _entity: entity.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1467,6 +1696,7 @@ impl<'a, C, A> BucketAccessControlMethods<'a, C, A> { _request: request, _bucket: bucket.to_string(), _entity: entity.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1484,6 +1714,7 @@ impl<'a, C, A> BucketAccessControlMethods<'a, C, A> { BucketAccessControlListCall { hub: self.hub, _bucket: bucket.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -1551,6 +1782,125 @@ impl<'a, C, A> ChannelMethods<'a, C, A> { +/// A builder providing access to all methods supported on *notification* resources. +/// It is not used directly, but through the `Storage` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_storage1 as storage1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use storage1::Storage; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Storage::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `delete(...)`, `get(...)`, `insert(...)` and `list(...)` +/// // to build up your call. +/// let rb = hub.notifications(); +/// # } +/// ``` +pub struct NotificationMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, +} + +impl<'a, C, A> MethodsBuilder for NotificationMethods<'a, C, A> {} + +impl<'a, C, A> NotificationMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Creates a notification subscription for a given bucket. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `bucket` - The parent bucket of the notification. + pub fn insert(&self, request: Notification, bucket: &str) -> NotificationInsertCall<'a, C, A> { + NotificationInsertCall { + hub: self.hub, + _request: request, + _bucket: bucket.to_string(), + _user_project: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Permanently deletes a notification subscription. + /// + /// # Arguments + /// + /// * `bucket` - The parent bucket of the notification. + /// * `notification` - ID of the notification to delete. + pub fn delete(&self, bucket: &str, notification: &str) -> NotificationDeleteCall<'a, C, A> { + NotificationDeleteCall { + hub: self.hub, + _bucket: bucket.to_string(), + _notification: notification.to_string(), + _user_project: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// View a notification configuration. + /// + /// # Arguments + /// + /// * `bucket` - The parent bucket of the notification. + /// * `notification` - Notification ID + pub fn get(&self, bucket: &str, notification: &str) -> NotificationGetCall<'a, C, A> { + NotificationGetCall { + hub: self.hub, + _bucket: bucket.to_string(), + _notification: notification.to_string(), + _user_project: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Retrieves a list of notification subscriptions for a given bucket. + /// + /// # Arguments + /// + /// * `bucket` - Name of a GCS bucket. + pub fn list(&self, bucket: &str) -> NotificationListCall<'a, C, A> { + NotificationListCall { + hub: self.hub, + _bucket: bucket.to_string(), + _user_project: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *object* resources. /// It is not used directly, but through the `Storage` hub. /// @@ -1574,7 +1924,7 @@ impl<'a, C, A> ChannelMethods<'a, C, A> { /// ::default(), None); /// let mut hub = Storage::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `compose(...)`, `copy(...)`, `delete(...)`, `get(...)`, `insert(...)`, `list(...)`, `patch(...)`, `rewrite(...)`, `update(...)` and `watch_all(...)` +/// // like `compose(...)`, `copy(...)`, `delete(...)`, `get(...)`, `get_iam_policy(...)`, `insert(...)`, `list(...)`, `patch(...)`, `rewrite(...)`, `set_iam_policy(...)`, `test_iam_permissions(...)`, `update(...)` and `watch_all(...)` /// // to build up your call. /// let rb = hub.objects(); /// # } @@ -1608,6 +1958,7 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { _source_object: source_object.to_string(), _destination_bucket: destination_bucket.to_string(), _destination_object: destination_object.to_string(), + _user_project: Default::default(), _source_generation: Default::default(), _rewrite_token: Default::default(), _projection: Default::default(), @@ -1640,6 +1991,7 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { hub: self.hub, _bucket: bucket.to_string(), _object: object.to_string(), + _user_project: Default::default(), _projection: Default::default(), _if_metageneration_not_match: Default::default(), _if_metageneration_match: Default::default(), @@ -1652,34 +2004,6 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Updates an object's metadata. - /// - /// # Arguments - /// - /// * `request` - No description provided. - /// * `bucket` - Name of the bucket in which the object resides. - /// * `object` - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. - pub fn update(&self, request: Object, bucket: &str, object: &str) -> ObjectUpdateCall<'a, C, A> { - ObjectUpdateCall { - hub: self.hub, - _request: request, - _bucket: bucket.to_string(), - _object: object.to_string(), - _projection: Default::default(), - _predefined_acl: Default::default(), - _if_metageneration_not_match: Default::default(), - _if_metageneration_match: Default::default(), - _if_generation_not_match: Default::default(), - _if_generation_match: Default::default(), - _generation: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// Watch for changes on all objects in a bucket. @@ -1694,6 +2018,7 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { _request: request, _bucket: bucket.to_string(), _versions: Default::default(), + _user_project: Default::default(), _projection: Default::default(), _prefix: Default::default(), _page_token: Default::default(), @@ -1705,6 +2030,79 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Updates an IAM policy for the specified object. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `bucket` - Name of the bucket in which the object resides. + /// * `object` - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. + pub fn set_iam_policy(&self, request: Policy, bucket: &str, object: &str) -> ObjectSetIamPolicyCall<'a, C, A> { + ObjectSetIamPolicyCall { + hub: self.hub, + _request: request, + _bucket: bucket.to_string(), + _object: object.to_string(), + _user_project: Default::default(), + _generation: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns an IAM policy for the specified object. + /// + /// # Arguments + /// + /// * `bucket` - Name of the bucket in which the object resides. + /// * `object` - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. + pub fn get_iam_policy(&self, bucket: &str, object: &str) -> ObjectGetIamPolicyCall<'a, C, A> { + ObjectGetIamPolicyCall { + hub: self.hub, + _bucket: bucket.to_string(), + _object: object.to_string(), + _user_project: Default::default(), + _generation: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates an object's metadata. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `bucket` - Name of the bucket in which the object resides. + /// * `object` - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. + pub fn update(&self, request: Object, bucket: &str, object: &str) -> ObjectUpdateCall<'a, C, A> { + ObjectUpdateCall { + hub: self.hub, + _request: request, + _bucket: bucket.to_string(), + _object: object.to_string(), + _user_project: Default::default(), + _projection: Default::default(), + _predefined_acl: Default::default(), + _if_metageneration_not_match: Default::default(), + _if_metageneration_match: Default::default(), + _if_generation_not_match: Default::default(), + _if_generation_match: Default::default(), + _generation: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Stores a new object and metadata. @@ -1718,6 +2116,7 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { hub: self.hub, _request: request, _bucket: bucket.to_string(), + _user_project: Default::default(), _projection: Default::default(), _predefined_acl: Default::default(), _name: Default::default(), @@ -1747,6 +2146,7 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { _request: request, _destination_bucket: destination_bucket.to_string(), _destination_object: destination_object.to_string(), + _user_project: Default::default(), _if_metageneration_match: Default::default(), _if_generation_match: Default::default(), _destination_predefined_acl: Default::default(), @@ -1769,6 +2169,7 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { hub: self.hub, _bucket: bucket.to_string(), _object: object.to_string(), + _user_project: Default::default(), _if_metageneration_not_match: Default::default(), _if_metageneration_match: Default::default(), _if_generation_not_match: Default::default(), @@ -1792,6 +2193,7 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { hub: self.hub, _bucket: bucket.to_string(), _versions: Default::default(), + _user_project: Default::default(), _projection: Default::default(), _prefix: Default::default(), _page_token: Default::default(), @@ -1803,6 +2205,29 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Tests a set of permissions on the given object to see which, if any, are held by the caller. + /// + /// # Arguments + /// + /// * `bucket` - Name of the bucket in which the object resides. + /// * `object` - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. + /// * `permissions` - Permissions to test. + pub fn test_iam_permissions(&self, bucket: &str, object: &str, permissions: &Vec) -> ObjectTestIamPermissionCall<'a, C, A> { + ObjectTestIamPermissionCall { + hub: self.hub, + _bucket: bucket.to_string(), + _object: object.to_string(), + _permissions: permissions.clone(), + _user_project: Default::default(), + _generation: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Copies a source object to a destination object. Optionally overrides metadata. @@ -1822,6 +2247,7 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { _source_object: source_object.to_string(), _destination_bucket: destination_bucket.to_string(), _destination_object: destination_object.to_string(), + _user_project: Default::default(), _source_generation: Default::default(), _projection: Default::default(), _if_source_metageneration_not_match: Default::default(), @@ -1854,6 +2280,7 @@ impl<'a, C, A> ObjectMethods<'a, C, A> { _request: request, _bucket: bucket.to_string(), _object: object.to_string(), + _user_project: Default::default(), _projection: Default::default(), _predefined_acl: Default::default(), _if_metageneration_not_match: Default::default(), @@ -1910,19 +2337,20 @@ impl<'a, C, A> ObjectAccessControlMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new ACL entry on the specified object. + /// Returns the ACL entry for the specified entity on the specified object. /// /// # Arguments /// - /// * `request` - No description provided. /// * `bucket` - Name of a bucket. /// * `object` - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. - pub fn insert(&self, request: ObjectAccessControl, bucket: &str, object: &str) -> ObjectAccessControlInsertCall<'a, C, A> { - ObjectAccessControlInsertCall { + /// * `entity` - The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. + pub fn get(&self, bucket: &str, object: &str, entity: &str) -> ObjectAccessControlGetCall<'a, C, A> { + ObjectAccessControlGetCall { hub: self.hub, - _request: request, _bucket: bucket.to_string(), _object: object.to_string(), + _entity: entity.to_string(), + _user_project: Default::default(), _generation: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -1947,6 +2375,7 @@ impl<'a, C, A> ObjectAccessControlMethods<'a, C, A> { _bucket: bucket.to_string(), _object: object.to_string(), _entity: entity.to_string(), + _user_project: Default::default(), _generation: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -1967,6 +2396,7 @@ impl<'a, C, A> ObjectAccessControlMethods<'a, C, A> { hub: self.hub, _bucket: bucket.to_string(), _object: object.to_string(), + _user_project: Default::default(), _generation: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -1989,28 +2419,7 @@ impl<'a, C, A> ObjectAccessControlMethods<'a, C, A> { _bucket: bucket.to_string(), _object: object.to_string(), _entity: entity.to_string(), - _generation: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - - /// Create a builder to help you perform the following task: - /// - /// Returns the ACL entry for the specified entity on the specified object. - /// - /// # Arguments - /// - /// * `bucket` - Name of a bucket. - /// * `object` - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. - /// * `entity` - The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - pub fn get(&self, bucket: &str, object: &str, entity: &str) -> ObjectAccessControlGetCall<'a, C, A> { - ObjectAccessControlGetCall { - hub: self.hub, - _bucket: bucket.to_string(), - _object: object.to_string(), - _entity: entity.to_string(), + _user_project: Default::default(), _generation: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -2035,6 +2444,30 @@ impl<'a, C, A> ObjectAccessControlMethods<'a, C, A> { _bucket: bucket.to_string(), _object: object.to_string(), _entity: entity.to_string(), + _user_project: Default::default(), + _generation: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a new ACL entry on the specified object. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `bucket` - Name of a bucket. + /// * `object` - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. + pub fn insert(&self, request: ObjectAccessControl, bucket: &str, object: &str) -> ObjectAccessControlInsertCall<'a, C, A> { + ObjectAccessControlInsertCall { + hub: self.hub, + _request: request, + _bucket: bucket.to_string(), + _object: object.to_string(), + _user_project: Default::default(), _generation: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -2068,7 +2501,7 @@ impl<'a, C, A> ObjectAccessControlMethods<'a, C, A> { /// ::default(), None); /// let mut hub = Storage::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `delete(...)`, `get(...)`, `insert(...)`, `list(...)`, `patch(...)` and `update(...)` +/// // like `delete(...)`, `get(...)`, `get_iam_policy(...)`, `insert(...)`, `list(...)`, `patch(...)`, `set_iam_policy(...)`, `test_iam_permissions(...)` and `update(...)` /// // to build up your call. /// let rb = hub.buckets(); /// # } @@ -2083,6 +2516,31 @@ impl<'a, C, A> MethodsBuilder for BucketMethods<'a, C, A> {} impl<'a, C, A> BucketMethods<'a, C, A> { + /// Create a builder to help you perform the following task: + /// + /// Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `bucket` - Name of a bucket. + pub fn patch(&self, request: Bucket, bucket: &str) -> BucketPatchCall<'a, C, A> { + BucketPatchCall { + hub: self.hub, + _request: request, + _bucket: bucket.to_string(), + _user_project: Default::default(), + _projection: Default::default(), + _predefined_default_object_acl: Default::default(), + _predefined_acl: Default::default(), + _if_metageneration_not_match: Default::default(), + _if_metageneration_match: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. @@ -2096,6 +2554,7 @@ impl<'a, C, A> BucketMethods<'a, C, A> { hub: self.hub, _request: request, _bucket: bucket.to_string(), + _user_project: Default::default(), _projection: Default::default(), _predefined_default_object_acl: Default::default(), _predefined_acl: Default::default(), @@ -2118,6 +2577,7 @@ impl<'a, C, A> BucketMethods<'a, C, A> { BucketGetCall { hub: self.hub, _bucket: bucket.to_string(), + _user_project: Default::default(), _projection: Default::default(), _if_metageneration_not_match: Default::default(), _if_metageneration_match: Default::default(), @@ -2138,6 +2598,7 @@ impl<'a, C, A> BucketMethods<'a, C, A> { BucketDeleteCall { hub: self.hub, _bucket: bucket.to_string(), + _user_project: Default::default(), _if_metageneration_not_match: Default::default(), _if_metageneration_match: Default::default(), _delegate: Default::default(), @@ -2170,22 +2631,56 @@ impl<'a, C, A> BucketMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics. + /// Tests a set of permissions on the given bucket to see which, if any, are held by the caller. + /// + /// # Arguments + /// + /// * `bucket` - Name of a bucket. + /// * `permissions` - Permissions to test. + pub fn test_iam_permissions(&self, bucket: &str, permissions: &Vec) -> BucketTestIamPermissionCall<'a, C, A> { + BucketTestIamPermissionCall { + hub: self.hub, + _bucket: bucket.to_string(), + _permissions: permissions.clone(), + _user_project: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates an IAM policy for the specified bucket. /// /// # Arguments /// /// * `request` - No description provided. /// * `bucket` - Name of a bucket. - pub fn patch(&self, request: Bucket, bucket: &str) -> BucketPatchCall<'a, C, A> { - BucketPatchCall { + pub fn set_iam_policy(&self, request: Policy, bucket: &str) -> BucketSetIamPolicyCall<'a, C, A> { + BucketSetIamPolicyCall { hub: self.hub, _request: request, _bucket: bucket.to_string(), - _projection: Default::default(), - _predefined_default_object_acl: Default::default(), - _predefined_acl: Default::default(), - _if_metageneration_not_match: Default::default(), - _if_metageneration_match: Default::default(), + _user_project: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Returns an IAM policy for the specified bucket. + /// + /// # Arguments + /// + /// * `bucket` - Name of a bucket. + pub fn get_iam_policy(&self, bucket: &str) -> BucketGetIamPolicyCall<'a, C, A> { + BucketGetIamPolicyCall { + hub: self.hub, + _bucket: bucket.to_string(), + _user_project: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -2216,6 +2711,64 @@ impl<'a, C, A> BucketMethods<'a, C, A> { +/// A builder providing access to all methods supported on *project* resources. +/// It is not used directly, but through the `Storage` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_storage1 as storage1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use storage1::Storage; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Storage::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `service_account_get(...)` +/// // to build up your call. +/// let rb = hub.projects(); +/// # } +/// ``` +pub struct ProjectMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, +} + +impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} + +impl<'a, C, A> ProjectMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Get the email address of this project's GCS service account. + /// + /// # Arguments + /// + /// * `projectId` - Project ID + pub fn service_account_get(&self, project_id: &str) -> ProjectServiceAccountGetCall<'a, C, A> { + ProjectServiceAccountGetCall { + hub: self.hub, + _project_id: project_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + // ################### @@ -2255,6 +2808,7 @@ impl<'a, C, A> BucketMethods<'a, C, A> { /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.default_object_access_controls().insert(req, "bucket") +/// .user_project("amet") /// .doit(); /// # } /// ``` @@ -2264,6 +2818,7 @@ pub struct DefaultObjectAccessControlInsertCall<'a, C, A> hub: &'a Storage, _request: ObjectAccessControl, _bucket: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -2285,9 +2840,12 @@ impl<'a, C, A> DefaultObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut }; dlg.begin(MethodInfo { id: "storage.defaultObjectAccessControls.insert", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); - for &field in ["alt", "bucket"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2436,6 +2994,13 @@ impl<'a, C, A> DefaultObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut self._bucket = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> DefaultObjectAccessControlInsertCall<'a, C, A> { + self._user_project = 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. /// @@ -2488,284 +3053,6 @@ impl<'a, C, A> DefaultObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut } -/// Updates a default object ACL entry on the specified bucket. -/// -/// A builder for the *update* method supported by a *defaultObjectAccessControl* resource. -/// It is not used directly, but through a `DefaultObjectAccessControlMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_storage1 as storage1; -/// use storage1::ObjectAccessControl; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use storage1::Storage; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Storage::new(hyper::Client::new(), 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 = ObjectAccessControl::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.default_object_access_controls().update(req, "bucket", "entity") -/// .doit(); -/// # } -/// ``` -pub struct DefaultObjectAccessControlUpdateCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Storage, - _request: ObjectAccessControl, - _bucket: String, - _entity: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for DefaultObjectAccessControlUpdateCall<'a, C, A> {} - -impl<'a, C, A> DefaultObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ObjectAccessControl)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "storage.defaultObjectAccessControls.update", - http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); - params.push(("bucket", self._bucket.to_string())); - params.push(("entity", self._entity.to_string())); - for &field in ["alt", "bucket", "entity"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl/{entity}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{bucket}", "bucket"), ("{entity}", "entity")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(2); - for param_name in ["entity", "bucket"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: ObjectAccessControl) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { - self._request = new_value; - self - } - /// Name of a bucket. - /// - /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { - self._bucket = new_value.to_string(); - self - } - /// The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - /// - /// Sets the *entity* 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 entity(mut self, new_value: &str) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { - self._entity = 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. - /// - /// 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 Delegate) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> DefaultObjectAccessControlUpdateCall<'a, C, A> - 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 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: T) -> DefaultObjectAccessControlUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Retrieves default object ACL entries on the specified bucket. /// /// A builder for the *list* method supported by a *defaultObjectAccessControl* resource. @@ -2793,8 +3080,9 @@ impl<'a, C, A> DefaultObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.default_object_access_controls().list("bucket") -/// .if_metageneration_not_match("amet") -/// .if_metageneration_match("et") +/// .user_project("consetetur") +/// .if_metageneration_not_match("ut") +/// .if_metageneration_match("ea") /// .doit(); /// # } /// ``` @@ -2803,6 +3091,7 @@ pub struct DefaultObjectAccessControlListCall<'a, C, A> hub: &'a Storage, _bucket: String, + _user_project: Option, _if_metageneration_not_match: Option, _if_metageneration_match: Option, _delegate: Option<&'a mut Delegate>, @@ -2826,15 +3115,18 @@ impl<'a, C, A> DefaultObjectAccessControlListCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._if_metageneration_not_match { params.push(("ifMetagenerationNotMatch", value.to_string())); } if let Some(value) = self._if_metageneration_match { params.push(("ifMetagenerationMatch", value.to_string())); } - for &field in ["alt", "bucket", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { + for &field in ["alt", "bucket", "userProject", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2959,6 +3251,13 @@ impl<'a, C, A> DefaultObjectAccessControlListCall<'a, C, A> where C: BorrowMut DefaultObjectAccessControlListCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// If present, only return default ACL listing if the bucket's current metageneration does not match the given value. /// /// Sets the *if metageneration not match* query property to the given value. @@ -3058,6 +3357,7 @@ impl<'a, C, A> DefaultObjectAccessControlListCall<'a, C, A> where C: BorrowMut _request: ObjectAccessControl, _bucket: String, _entity: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -3089,10 +3390,13 @@ impl<'a, C, A> DefaultObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut< }; dlg.begin(MethodInfo { id: "storage.defaultObjectAccessControls.patch", http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("entity", self._entity.to_string())); - for &field in ["alt", "bucket", "entity"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "entity", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -3251,6 +3555,13 @@ impl<'a, C, A> DefaultObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut< self._entity = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> DefaultObjectAccessControlPatchCall<'a, C, A> { + self._user_project = 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. /// @@ -3330,6 +3641,7 @@ impl<'a, C, A> DefaultObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut< /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.default_object_access_controls().delete("bucket", "entity") +/// .user_project("consetetur") /// .doit(); /// # } /// ``` @@ -3339,6 +3651,7 @@ pub struct DefaultObjectAccessControlDeleteCall<'a, C, A> hub: &'a Storage, _bucket: String, _entity: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -3360,10 +3673,13 @@ impl<'a, C, A> DefaultObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut }; dlg.begin(MethodInfo { id: "storage.defaultObjectAccessControls.delete", http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("entity", self._entity.to_string())); - for &field in ["bucket", "entity"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["bucket", "entity", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -3487,6 +3803,13 @@ impl<'a, C, A> DefaultObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut self._entity = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> DefaultObjectAccessControlDeleteCall<'a, C, A> { + self._user_project = 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. /// @@ -3539,6 +3862,296 @@ impl<'a, C, A> DefaultObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut } +/// Updates a default object ACL entry on the specified bucket. +/// +/// A builder for the *update* method supported by a *defaultObjectAccessControl* resource. +/// It is not used directly, but through a `DefaultObjectAccessControlMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// use storage1::ObjectAccessControl; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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 = ObjectAccessControl::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.default_object_access_controls().update(req, "bucket", "entity") +/// .user_project("Lorem") +/// .doit(); +/// # } +/// ``` +pub struct DefaultObjectAccessControlUpdateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _request: ObjectAccessControl, + _bucket: String, + _entity: String, + _user_project: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for DefaultObjectAccessControlUpdateCall<'a, C, A> {} + +impl<'a, C, A> DefaultObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ObjectAccessControl)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.defaultObjectAccessControls.update", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + params.push(("entity", self._entity.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "entity", "userProject"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl/{entity}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket"), ("{entity}", "entity")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["entity", "bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ObjectAccessControl) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of a bucket. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. + /// + /// Sets the *entity* 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 entity(mut self, new_value: &str) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { + self._entity = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { + self._user_project = 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. + /// + /// 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 Delegate) -> DefaultObjectAccessControlUpdateCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> DefaultObjectAccessControlUpdateCall<'a, C, A> + 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 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: T) -> DefaultObjectAccessControlUpdateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Returns the default object ACL entry for the specified entity on the specified bucket. /// /// A builder for the *get* method supported by a *defaultObjectAccessControl* resource. @@ -3566,6 +4179,7 @@ impl<'a, C, A> DefaultObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.default_object_access_controls().get("bucket", "entity") +/// .user_project("sit") /// .doit(); /// # } /// ``` @@ -3575,6 +4189,7 @@ pub struct DefaultObjectAccessControlGetCall<'a, C, A> hub: &'a Storage, _bucket: String, _entity: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -3596,10 +4211,13 @@ impl<'a, C, A> DefaultObjectAccessControlGetCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("entity", self._entity.to_string())); - for &field in ["alt", "bucket", "entity"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "entity", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -3734,6 +4352,13 @@ impl<'a, C, A> DefaultObjectAccessControlGetCall<'a, C, A> where C: BorrowMut DefaultObjectAccessControlGetCall<'a, C, A> { + self._user_project = 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. /// @@ -3819,6 +4444,7 @@ impl<'a, C, A> DefaultObjectAccessControlGetCall<'a, C, A> where C: BorrowMut _request: BucketAccessControl, _bucket: String, _entity: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -3850,10 +4477,13 @@ impl<'a, C, A> BucketAccessControlPatchCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("entity", self._entity.to_string())); - for &field in ["alt", "bucket", "entity"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "entity", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4012,6 +4642,13 @@ impl<'a, C, A> BucketAccessControlPatchCall<'a, C, A> where C: BorrowMut BucketAccessControlPatchCall<'a, C, A> { + self._user_project = 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. /// @@ -4091,6 +4728,7 @@ impl<'a, C, A> BucketAccessControlPatchCall<'a, C, A> where C: BorrowMut hub: &'a Storage, _bucket: String, _entity: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -4121,10 +4760,13 @@ impl<'a, C, A> BucketAccessControlDeleteCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("entity", self._entity.to_string())); - for &field in ["bucket", "entity"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["bucket", "entity", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4248,6 +4890,13 @@ impl<'a, C, A> BucketAccessControlDeleteCall<'a, C, A> where C: BorrowMut BucketAccessControlDeleteCall<'a, C, A> { + self._user_project = 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. /// @@ -4333,6 +4982,7 @@ impl<'a, C, A> BucketAccessControlDeleteCall<'a, C, A> where C: BorrowMut hub: &'a Storage, _request: BucketAccessControl, _bucket: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -4363,9 +5014,12 @@ impl<'a, C, A> BucketAccessControlInsertCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); - for &field in ["alt", "bucket"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4514,6 +5168,13 @@ impl<'a, C, A> BucketAccessControlInsertCall<'a, C, A> where C: BorrowMut BucketAccessControlInsertCall<'a, C, A> { + self._user_project = 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. /// @@ -4593,6 +5254,7 @@ impl<'a, C, A> BucketAccessControlInsertCall<'a, C, A> where C: BorrowMut hub: &'a Storage, _bucket: String, _entity: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -4623,10 +5286,13 @@ impl<'a, C, A> BucketAccessControlGetCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("entity", self._entity.to_string())); - for &field in ["alt", "bucket", "entity"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "entity", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4761,6 +5427,13 @@ impl<'a, C, A> BucketAccessControlGetCall<'a, C, A> where C: BorrowMut BucketAccessControlGetCall<'a, C, A> { + self._user_project = 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. /// @@ -4846,6 +5519,7 @@ impl<'a, C, A> BucketAccessControlGetCall<'a, C, A> where C: BorrowMut _request: BucketAccessControl, _bucket: String, _entity: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -4877,10 +5552,13 @@ impl<'a, C, A> BucketAccessControlUpdateCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("entity", self._entity.to_string())); - for &field in ["alt", "bucket", "entity"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "entity", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -5039,6 +5717,13 @@ impl<'a, C, A> BucketAccessControlUpdateCall<'a, C, A> where C: BorrowMut BucketAccessControlUpdateCall<'a, C, A> { + self._user_project = 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. /// @@ -5118,6 +5803,7 @@ impl<'a, C, A> BucketAccessControlUpdateCall<'a, C, A> where C: BorrowMut hub: &'a Storage, _bucket: String, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -5147,9 +5834,12 @@ impl<'a, C, A> BucketAccessControlListCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((3 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); - for &field in ["alt", "bucket"].iter() { + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -5274,6 +5964,13 @@ impl<'a, C, A> BucketAccessControlListCall<'a, C, A> where C: BorrowMut BucketAccessControlListCall<'a, C, A> { + self._user_project = 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. /// @@ -5548,6 +6245,1038 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } +/// Creates a notification subscription for a given bucket. +/// +/// A builder for the *insert* method supported by a *notification* resource. +/// It is not used directly, but through a `NotificationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// use storage1::Notification; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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 = Notification::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.notifications().insert(req, "bucket") +/// .user_project("nonumy") +/// .doit(); +/// # } +/// ``` +pub struct NotificationInsertCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _request: Notification, + _bucket: String, + _user_project: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for NotificationInsertCall<'a, C, A> {} + +impl<'a, C, A> NotificationInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Notification)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.notifications.insert", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "userProject"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/notificationConfigs".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Notification) -> NotificationInsertCall<'a, C, A> { + self._request = new_value; + self + } + /// The parent bucket of the notification. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> NotificationInsertCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> NotificationInsertCall<'a, C, A> { + self._user_project = 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. + /// + /// 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 Delegate) -> NotificationInsertCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> NotificationInsertCall<'a, C, A> + 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 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: T) -> NotificationInsertCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Permanently deletes a notification subscription. +/// +/// A builder for the *delete* method supported by a *notification* resource. +/// It is not used directly, but through a `NotificationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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.notifications().delete("bucket", "notification") +/// .user_project("takimata") +/// .doit(); +/// # } +/// ``` +pub struct NotificationDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _bucket: String, + _notification: String, + _user_project: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for NotificationDeleteCall<'a, C, A> {} + +impl<'a, C, A> NotificationDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.notifications.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + params.push(("notification", self._notification.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["bucket", "notification", "userProject"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/notificationConfigs/{notification}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket"), ("{notification}", "notification")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["notification", "bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The parent bucket of the notification. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> NotificationDeleteCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// ID of the notification to delete. + /// + /// Sets the *notification* 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 notification(mut self, new_value: &str) -> NotificationDeleteCall<'a, C, A> { + self._notification = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> NotificationDeleteCall<'a, C, A> { + self._user_project = 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. + /// + /// 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 Delegate) -> NotificationDeleteCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> NotificationDeleteCall<'a, C, A> + 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 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: T) -> NotificationDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// View a notification configuration. +/// +/// A builder for the *get* method supported by a *notification* resource. +/// It is not used directly, but through a `NotificationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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.notifications().get("bucket", "notification") +/// .user_project("invidunt") +/// .doit(); +/// # } +/// ``` +pub struct NotificationGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _bucket: String, + _notification: String, + _user_project: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for NotificationGetCall<'a, C, A> {} + +impl<'a, C, A> NotificationGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Notification)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.notifications.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + params.push(("notification", self._notification.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "notification", "userProject"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/notificationConfigs/{notification}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket"), ("{notification}", "notification")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["notification", "bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The parent bucket of the notification. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> NotificationGetCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// Notification ID + /// + /// Sets the *notification* 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 notification(mut self, new_value: &str) -> NotificationGetCall<'a, C, A> { + self._notification = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> NotificationGetCall<'a, C, A> { + self._user_project = 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. + /// + /// 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 Delegate) -> NotificationGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> NotificationGetCall<'a, C, A> + 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 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: T) -> NotificationGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Retrieves a list of notification subscriptions for a given bucket. +/// +/// A builder for the *list* method supported by a *notification* resource. +/// It is not used directly, but through a `NotificationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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.notifications().list("bucket") +/// .user_project("sadipscing") +/// .doit(); +/// # } +/// ``` +pub struct NotificationListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _bucket: String, + _user_project: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for NotificationListCall<'a, C, A> {} + +impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Notifications)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.notifications.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "userProject"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/notificationConfigs".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Name of a GCS bucket. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> NotificationListCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> NotificationListCall<'a, C, A> { + self._user_project = 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. + /// + /// 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 Delegate) -> NotificationListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> NotificationListCall<'a, C, A> + 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 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: T) -> NotificationListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Rewrites a source object to a destination object. Optionally overrides metadata. /// /// A builder for the *rewrite* method supported by a *object* resource. @@ -5581,19 +7310,20 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().rewrite(req, "sourceBucket", "sourceObject", "destinationBucket", "destinationObject") -/// .source_generation("vero") -/// .rewrite_token("sadipscing") -/// .projection("invidunt") -/// .max_bytes_rewritten_per_call("consetetur") -/// .if_source_metageneration_not_match("dolore") -/// .if_source_metageneration_match("duo") -/// .if_source_generation_not_match("aliquyam") -/// .if_source_generation_match("Lorem") -/// .if_metageneration_not_match("et") -/// .if_metageneration_match("clita") -/// .if_generation_not_match("consetetur") -/// .if_generation_match("takimata") -/// .destination_predefined_acl("nonumy") +/// .user_project("aliquyam") +/// .source_generation("sit") +/// .rewrite_token("eirmod") +/// .projection("consetetur") +/// .max_bytes_rewritten_per_call("labore") +/// .if_source_metageneration_not_match("sed") +/// .if_source_metageneration_match("ea") +/// .if_source_generation_not_match("gubergren") +/// .if_source_generation_match("aliquyam") +/// .if_metageneration_not_match("eos") +/// .if_metageneration_match("tempor") +/// .if_generation_not_match("sea") +/// .if_generation_match("labore") +/// .destination_predefined_acl("ipsum") /// .doit(); /// # } /// ``` @@ -5606,6 +7336,7 @@ pub struct ObjectRewriteCall<'a, C, A> _source_object: String, _destination_bucket: String, _destination_object: String, + _user_project: Option, _source_generation: Option, _rewrite_token: Option, _projection: Option, @@ -5640,11 +7371,14 @@ impl<'a, C, A> ObjectRewriteCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "storage.objects.rewrite", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((20 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((21 + self._additional_params.len())); params.push(("sourceBucket", self._source_bucket.to_string())); params.push(("sourceObject", self._source_object.to_string())); params.push(("destinationBucket", self._destination_bucket.to_string())); params.push(("destinationObject", self._destination_object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._source_generation { params.push(("sourceGeneration", value.to_string())); } @@ -5684,7 +7418,7 @@ impl<'a, C, A> ObjectRewriteCall<'a, C, A> where C: BorrowMut, A: if let Some(value) = self._destination_predefined_acl { params.push(("destinationPredefinedAcl", value.to_string())); } - for &field in ["alt", "sourceBucket", "sourceObject", "destinationBucket", "destinationObject", "sourceGeneration", "rewriteToken", "projection", "maxBytesRewrittenPerCall", "ifSourceMetagenerationNotMatch", "ifSourceMetagenerationMatch", "ifSourceGenerationNotMatch", "ifSourceGenerationMatch", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "destinationPredefinedAcl"].iter() { + for &field in ["alt", "sourceBucket", "sourceObject", "destinationBucket", "destinationObject", "userProject", "sourceGeneration", "rewriteToken", "projection", "maxBytesRewrittenPerCall", "ifSourceMetagenerationNotMatch", "ifSourceMetagenerationMatch", "ifSourceGenerationNotMatch", "ifSourceGenerationMatch", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "destinationPredefinedAcl"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -5863,6 +7597,13 @@ impl<'a, C, A> ObjectRewriteCall<'a, C, A> where C: BorrowMut, A: self._destination_object = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectRewriteCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// If present, selects a specific revision of the source object (as opposed to the latest version, the default). /// /// Sets the *source generation* query property to the given value. @@ -6038,12 +7779,13 @@ impl<'a, C, A> ObjectRewriteCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().get("bucket", "object") -/// .projection("takimata") -/// .if_metageneration_not_match("At") -/// .if_metageneration_match("labore") -/// .if_generation_not_match("invidunt") -/// .if_generation_match("ea") -/// .generation("sadipscing") +/// .user_project("sit") +/// .projection("diam") +/// .if_metageneration_not_match("ut") +/// .if_metageneration_match("justo") +/// .if_generation_not_match("est") +/// .if_generation_match("amet") +/// .generation("accusam") /// .doit(); /// # } /// ``` @@ -6053,6 +7795,7 @@ pub struct ObjectGetCall<'a, C, A> hub: &'a Storage, _bucket: String, _object: String, + _user_project: Option, _projection: Option, _if_metageneration_not_match: Option, _if_metageneration_match: Option, @@ -6080,9 +7823,12 @@ impl<'a, C, A> ObjectGetCall<'a, C, A> where C: BorrowMut, A: oau }; dlg.begin(MethodInfo { id: "storage.objects.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((10 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("object", self._object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._projection { params.push(("projection", value.to_string())); } @@ -6101,7 +7847,7 @@ impl<'a, C, A> ObjectGetCall<'a, C, A> where C: BorrowMut, A: oau if let Some(value) = self._generation { params.push(("generation", value.to_string())); } - for &field in ["bucket", "object", "projection", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "generation"].iter() { + for &field in ["bucket", "object", "userProject", "projection", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "generation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -6252,6 +7998,13 @@ impl<'a, C, A> ObjectGetCall<'a, C, A> where C: BorrowMut, A: oau self._object = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectGetCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// Set of properties to return. Defaults to noAcl. /// /// Sets the *projection* query property to the given value. @@ -6346,6 +8099,929 @@ impl<'a, C, A> ObjectGetCall<'a, C, A> where C: BorrowMut, A: oau } +/// Watch for changes on all objects in a bucket. +/// +/// A builder for the *watchAll* method supported by a *object* resource. +/// It is not used directly, but through a `ObjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// use storage1::Channel; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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 = Channel::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.objects().watch_all(req, "bucket") +/// .versions(false) +/// .user_project("justo") +/// .projection("est") +/// .prefix("clita") +/// .page_token("invidunt") +/// .max_results(14) +/// .delimiter("dolores") +/// .doit(); +/// # } +/// ``` +pub struct ObjectWatchAllCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _request: Channel, + _bucket: String, + _versions: Option, + _user_project: Option, + _projection: Option, + _prefix: Option, + _page_token: Option, + _max_results: Option, + _delimiter: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ObjectWatchAllCall<'a, C, A> {} + +impl<'a, C, A> ObjectWatchAllCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.objects.watchAll", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._versions { + params.push(("versions", value.to_string())); + } + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + if let Some(value) = self._projection { + params.push(("projection", value.to_string())); + } + if let Some(value) = self._prefix { + params.push(("prefix", value.to_string())); + } + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._max_results { + params.push(("maxResults", value.to_string())); + } + if let Some(value) = self._delimiter { + params.push(("delimiter", value.to_string())); + } + for &field in ["alt", "bucket", "versions", "userProject", "projection", "prefix", "pageToken", "maxResults", "delimiter"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/watch".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Channel) -> ObjectWatchAllCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the bucket in which to look for objects. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning. + /// + /// Sets the *versions* query property to the given value. + pub fn versions(mut self, new_value: bool) -> ObjectWatchAllCall<'a, C, A> { + self._versions = Some(new_value); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } + /// Set of properties to return. Defaults to noAcl. + /// + /// Sets the *projection* query property to the given value. + pub fn projection(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { + self._projection = Some(new_value.to_string()); + self + } + /// Filter results to objects whose names begin with this prefix. + /// + /// Sets the *prefix* query property to the given value. + pub fn prefix(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { + self._prefix = Some(new_value.to_string()); + self + } + /// A previously-returned page token representing part of the larger set of results to view. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller. + /// + /// Sets the *max results* query property to the given value. + pub fn max_results(mut self, new_value: u32) -> ObjectWatchAllCall<'a, C, A> { + self._max_results = Some(new_value); + self + } + /// Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted. + /// + /// Sets the *delimiter* query property to the given value. + pub fn delimiter(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { + self._delimiter = 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. + /// + /// 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 Delegate) -> ObjectWatchAllCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ObjectWatchAllCall<'a, C, A> + 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 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: T) -> ObjectWatchAllCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates an IAM policy for the specified object. +/// +/// A builder for the *setIamPolicy* method supported by a *object* resource. +/// It is not used directly, but through a `ObjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// use storage1::Policy; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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 = Policy::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.objects().set_iam_policy(req, "bucket", "object") +/// .user_project("duo") +/// .generation("sed") +/// .doit(); +/// # } +/// ``` +pub struct ObjectSetIamPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _request: Policy, + _bucket: String, + _object: String, + _user_project: Option, + _generation: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ObjectSetIamPolicyCall<'a, C, A> {} + +impl<'a, C, A> ObjectSetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.objects.setIamPolicy", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + params.push(("object", self._object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + if let Some(value) = self._generation { + params.push(("generation", value.to_string())); + } + for &field in ["alt", "bucket", "object", "userProject", "generation"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/{object}/iam".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket"), ("{object}", "object")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["object", "bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Policy) -> ObjectSetIamPolicyCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of the bucket in which the object resides. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> ObjectSetIamPolicyCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. + /// + /// Sets the *object* 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 object(mut self, new_value: &str) -> ObjectSetIamPolicyCall<'a, C, A> { + self._object = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectSetIamPolicyCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } + /// If present, selects a specific revision of this object (as opposed to the latest version, the default). + /// + /// Sets the *generation* query property to the given value. + pub fn generation(mut self, new_value: &str) -> ObjectSetIamPolicyCall<'a, C, A> { + self._generation = 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. + /// + /// 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 Delegate) -> ObjectSetIamPolicyCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ObjectSetIamPolicyCall<'a, C, A> + 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 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: T) -> ObjectSetIamPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns an IAM policy for the specified object. +/// +/// A builder for the *getIamPolicy* method supported by a *object* resource. +/// It is not used directly, but through a `ObjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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.objects().get_iam_policy("bucket", "object") +/// .user_project("ea") +/// .generation("et") +/// .doit(); +/// # } +/// ``` +pub struct ObjectGetIamPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _bucket: String, + _object: String, + _user_project: Option, + _generation: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ObjectGetIamPolicyCall<'a, C, A> {} + +impl<'a, C, A> ObjectGetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.objects.getIamPolicy", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + params.push(("object", self._object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + if let Some(value) = self._generation { + params.push(("generation", value.to_string())); + } + for &field in ["alt", "bucket", "object", "userProject", "generation"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/{object}/iam".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket"), ("{object}", "object")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["object", "bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Name of the bucket in which the object resides. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> ObjectGetIamPolicyCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. + /// + /// Sets the *object* 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 object(mut self, new_value: &str) -> ObjectGetIamPolicyCall<'a, C, A> { + self._object = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectGetIamPolicyCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } + /// If present, selects a specific revision of this object (as opposed to the latest version, the default). + /// + /// Sets the *generation* query property to the given value. + pub fn generation(mut self, new_value: &str) -> ObjectGetIamPolicyCall<'a, C, A> { + self._generation = 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. + /// + /// 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 Delegate) -> ObjectGetIamPolicyCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ObjectGetIamPolicyCall<'a, C, A> + 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 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: T) -> ObjectGetIamPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Updates an object's metadata. /// /// This method supports **media download**. To enable it, adjust the builder like this: @@ -6384,13 +9060,14 @@ impl<'a, C, A> ObjectGetCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().update(req, "bucket", "object") -/// .projection("nonumy") -/// .predefined_acl("sed") -/// .if_metageneration_not_match("aliquyam") -/// .if_metageneration_match("sit") -/// .if_generation_not_match("eirmod") -/// .if_generation_match("consetetur") -/// .generation("labore") +/// .user_project("kasd") +/// .projection("invidunt") +/// .predefined_acl("rebum.") +/// .if_metageneration_not_match("Lorem") +/// .if_metageneration_match("clita") +/// .if_generation_not_match("invidunt") +/// .if_generation_match("eirmod") +/// .generation("At") /// .doit(); /// # } /// ``` @@ -6401,6 +9078,7 @@ pub struct ObjectUpdateCall<'a, C, A> _request: Object, _bucket: String, _object: String, + _user_project: Option, _projection: Option, _predefined_acl: Option, _if_metageneration_not_match: Option, @@ -6429,9 +9107,12 @@ impl<'a, C, A> ObjectUpdateCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "storage.objects.update", http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("object", self._object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._projection { params.push(("projection", value.to_string())); } @@ -6453,7 +9134,7 @@ impl<'a, C, A> ObjectUpdateCall<'a, C, A> where C: BorrowMut, A: if let Some(value) = self._generation { params.push(("generation", value.to_string())); } - for &field in ["bucket", "object", "projection", "predefinedAcl", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "generation"].iter() { + for &field in ["bucket", "object", "userProject", "projection", "predefinedAcl", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "generation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -6628,6 +9309,13 @@ impl<'a, C, A> ObjectUpdateCall<'a, C, A> where C: BorrowMut, A: self._object = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectUpdateCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// Set of properties to return. Defaults to full. /// /// Sets the *projection* query property to the given value. @@ -6729,344 +9417,6 @@ impl<'a, C, A> ObjectUpdateCall<'a, C, A> where C: BorrowMut, A: } -/// Watch for changes on all objects in a bucket. -/// -/// A builder for the *watchAll* method supported by a *object* resource. -/// It is not used directly, but through a `ObjectMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_storage1 as storage1; -/// use storage1::Channel; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use storage1::Storage; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Storage::new(hyper::Client::new(), 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 = Channel::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.objects().watch_all(req, "bucket") -/// .versions(true) -/// .projection("gubergren") -/// .prefix("aliquyam") -/// .page_token("eos") -/// .max_results(63) -/// .delimiter("sea") -/// .doit(); -/// # } -/// ``` -pub struct ObjectWatchAllCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Storage, - _request: Channel, - _bucket: String, - _versions: Option, - _projection: Option, - _prefix: Option, - _page_token: Option, - _max_results: Option, - _delimiter: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ObjectWatchAllCall<'a, C, A> {} - -impl<'a, C, A> ObjectWatchAllCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "storage.objects.watchAll", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((10 + self._additional_params.len())); - params.push(("bucket", self._bucket.to_string())); - if let Some(value) = self._versions { - params.push(("versions", value.to_string())); - } - if let Some(value) = self._projection { - params.push(("projection", value.to_string())); - } - if let Some(value) = self._prefix { - params.push(("prefix", value.to_string())); - } - if let Some(value) = self._page_token { - params.push(("pageToken", value.to_string())); - } - if let Some(value) = self._max_results { - params.push(("maxResults", value.to_string())); - } - if let Some(value) = self._delimiter { - params.push(("delimiter", value.to_string())); - } - for &field in ["alt", "bucket", "versions", "projection", "prefix", "pageToken", "maxResults", "delimiter"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/watch".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{bucket}", "bucket")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["bucket"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); - let mut request_value_reader = - { - let mut value = json::value::to_value(&self._request).expect("serde to work"); - 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.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()) - .header(ContentType(json_mime_type.clone())) - .header(ContentLength(request_size as u64)) - .body(&mut request_value_reader); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, 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: Channel) -> ObjectWatchAllCall<'a, C, A> { - self._request = new_value; - self - } - /// Name of the bucket in which to look for objects. - /// - /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { - self._bucket = new_value.to_string(); - self - } - /// If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning. - /// - /// Sets the *versions* query property to the given value. - pub fn versions(mut self, new_value: bool) -> ObjectWatchAllCall<'a, C, A> { - self._versions = Some(new_value); - self - } - /// Set of properties to return. Defaults to noAcl. - /// - /// Sets the *projection* query property to the given value. - pub fn projection(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { - self._projection = Some(new_value.to_string()); - self - } - /// Filter results to objects whose names begin with this prefix. - /// - /// Sets the *prefix* query property to the given value. - pub fn prefix(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { - self._prefix = Some(new_value.to_string()); - self - } - /// A previously-returned page token representing part of the larger set of results to view. - /// - /// Sets the *page token* query property to the given value. - pub fn page_token(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { - self._page_token = Some(new_value.to_string()); - self - } - /// Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items. - /// - /// Sets the *max results* query property to the given value. - pub fn max_results(mut self, new_value: u32) -> ObjectWatchAllCall<'a, C, A> { - self._max_results = Some(new_value); - self - } - /// Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted. - /// - /// Sets the *delimiter* query property to the given value. - pub fn delimiter(mut self, new_value: &str) -> ObjectWatchAllCall<'a, C, A> { - self._delimiter = 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. - /// - /// 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 Delegate) -> ObjectWatchAllCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ObjectWatchAllCall<'a, C, A> - 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 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: T) -> ObjectWatchAllCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Stores a new object and metadata. /// /// This method supports **media download**. To enable it, adjust the builder like this: @@ -7106,14 +9456,15 @@ impl<'a, C, A> ObjectWatchAllCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `upload(...)`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().insert(req, "bucket") -/// .projection("ipsum") -/// .predefined_acl("aliquyam") -/// .name("dolores") -/// .if_metageneration_not_match("sit") -/// .if_metageneration_match("diam") -/// .if_generation_not_match("ut") -/// .if_generation_match("justo") -/// .content_encoding("est") +/// .user_project("et") +/// .projection("sed") +/// .predefined_acl("sit") +/// .name("takimata") +/// .if_metageneration_not_match("elitr") +/// .if_metageneration_match("nonumy") +/// .if_generation_not_match("rebum.") +/// .if_generation_match("Lorem") +/// .content_encoding("Lorem") /// .upload(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); /// # } /// ``` @@ -7123,6 +9474,7 @@ pub struct ObjectInsertCall<'a, C, A> hub: &'a Storage, _request: Object, _bucket: String, + _user_project: Option, _projection: Option, _predefined_acl: Option, _name: Option, @@ -7153,8 +9505,11 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "storage.objects.insert", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((11 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._projection { params.push(("projection", value.to_string())); } @@ -7179,7 +9534,7 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: if let Some(value) = self._content_encoding { params.push(("contentEncoding", value.to_string())); } - for &field in ["bucket", "projection", "predefinedAcl", "name", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "contentEncoding"].iter() { + for &field in ["bucket", "userProject", "projection", "predefinedAcl", "name", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "contentEncoding"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -7452,6 +9807,13 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: self._bucket = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectInsertCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. /// /// Sets the *projection* query property to the given value. @@ -7598,9 +9960,10 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().compose(req, "destinationBucket", "destinationObject") -/// .if_metageneration_match("clita") -/// .if_generation_match("diam") -/// .destination_predefined_acl("justo") +/// .user_project("ut") +/// .if_metageneration_match("amet.") +/// .if_generation_match("ipsum") +/// .destination_predefined_acl("ut") /// .doit(); /// # } /// ``` @@ -7611,6 +9974,7 @@ pub struct ObjectComposeCall<'a, C, A> _request: ComposeRequest, _destination_bucket: String, _destination_object: String, + _user_project: Option, _if_metageneration_match: Option, _if_generation_match: Option, _destination_predefined_acl: Option, @@ -7635,9 +9999,12 @@ impl<'a, C, A> ObjectComposeCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "storage.objects.compose", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); params.push(("destinationBucket", self._destination_bucket.to_string())); params.push(("destinationObject", self._destination_object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._if_metageneration_match { params.push(("ifMetagenerationMatch", value.to_string())); } @@ -7647,7 +10014,7 @@ impl<'a, C, A> ObjectComposeCall<'a, C, A> where C: BorrowMut, A: if let Some(value) = self._destination_predefined_acl { params.push(("destinationPredefinedAcl", value.to_string())); } - for &field in ["destinationBucket", "destinationObject", "ifMetagenerationMatch", "ifGenerationMatch", "destinationPredefinedAcl"].iter() { + for &field in ["destinationBucket", "destinationObject", "userProject", "ifMetagenerationMatch", "ifGenerationMatch", "destinationPredefinedAcl"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -7822,6 +10189,13 @@ impl<'a, C, A> ObjectComposeCall<'a, C, A> where C: BorrowMut, A: self._destination_object = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectComposeCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// Makes the operation conditional on whether the object's current metageneration matches the given value. /// /// Sets the *if metageneration match* query property to the given value. @@ -7922,11 +10296,12 @@ impl<'a, C, A> ObjectComposeCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().delete("bucket", "object") -/// .if_metageneration_not_match("invidunt") -/// .if_metageneration_match("ut") -/// .if_generation_not_match("dolores") -/// .if_generation_match("eos") -/// .generation("voluptua.") +/// .user_project("ut") +/// .if_metageneration_not_match("eirmod") +/// .if_metageneration_match("sanctus") +/// .if_generation_not_match("voluptua.") +/// .if_generation_match("dolor") +/// .generation("et") /// .doit(); /// # } /// ``` @@ -7936,6 +10311,7 @@ pub struct ObjectDeleteCall<'a, C, A> hub: &'a Storage, _bucket: String, _object: String, + _user_project: Option, _if_metageneration_not_match: Option, _if_metageneration_match: Option, _if_generation_not_match: Option, @@ -7962,9 +10338,12 @@ impl<'a, C, A> ObjectDeleteCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "storage.objects.delete", http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("object", self._object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._if_metageneration_not_match { params.push(("ifMetagenerationNotMatch", value.to_string())); } @@ -7980,7 +10359,7 @@ impl<'a, C, A> ObjectDeleteCall<'a, C, A> where C: BorrowMut, A: if let Some(value) = self._generation { params.push(("generation", value.to_string())); } - for &field in ["bucket", "object", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "generation"].iter() { + for &field in ["bucket", "object", "userProject", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "generation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -8104,6 +10483,13 @@ impl<'a, C, A> ObjectDeleteCall<'a, C, A> where C: BorrowMut, A: self._object = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectDeleteCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// Makes the operation conditional on whether the object's current metageneration does not match the given value. /// /// Sets the *if metageneration not match* query property to the given value. @@ -8218,12 +10604,13 @@ impl<'a, C, A> ObjectDeleteCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().list("bucket") -/// .versions(false) -/// .projection("aliquyam") -/// .prefix("ea") -/// .page_token("ea") -/// .max_results(27) -/// .delimiter("dolor") +/// .versions(true) +/// .user_project("ut") +/// .projection("sed") +/// .prefix("et") +/// .page_token("ipsum") +/// .max_results(81) +/// .delimiter("dolore") /// .doit(); /// # } /// ``` @@ -8233,6 +10620,7 @@ pub struct ObjectListCall<'a, C, A> hub: &'a Storage, _bucket: String, _versions: Option, + _user_project: Option, _projection: Option, _prefix: Option, _page_token: Option, @@ -8259,11 +10647,14 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa }; dlg.begin(MethodInfo { id: "storage.objects.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((10 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); if let Some(value) = self._versions { params.push(("versions", value.to_string())); } + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._projection { params.push(("projection", value.to_string())); } @@ -8279,7 +10670,7 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa if let Some(value) = self._delimiter { params.push(("delimiter", value.to_string())); } - for &field in ["alt", "bucket", "versions", "projection", "prefix", "pageToken", "maxResults", "delimiter"].iter() { + for &field in ["alt", "bucket", "versions", "userProject", "projection", "prefix", "pageToken", "maxResults", "delimiter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -8411,6 +10802,13 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa self._versions = Some(new_value); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectListCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// Set of properties to return. Defaults to noAcl. /// /// Sets the *projection* query property to the given value. @@ -8432,7 +10830,7 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa self._page_token = Some(new_value.to_string()); self } - /// Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items. + /// Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller. /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> ObjectListCall<'a, C, A> { @@ -8498,6 +10896,294 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa } +/// Tests a set of permissions on the given object to see which, if any, are held by the caller. +/// +/// A builder for the *testIamPermissions* method supported by a *object* resource. +/// It is not used directly, but through a `ObjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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.objects().test_iam_permissions("bucket", "object", "permissions") +/// .user_project("et") +/// .generation("nonumy") +/// .doit(); +/// # } +/// ``` +pub struct ObjectTestIamPermissionCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _bucket: String, + _object: String, + _permissions: Vec, + _user_project: Option, + _generation: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ObjectTestIamPermissionCall<'a, C, A> {} + +impl<'a, C, A> ObjectTestIamPermissionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TestIamPermissionsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.objects.testIamPermissions", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + params.push(("object", self._object.to_string())); + if self._permissions.len() > 0 { + for f in self._permissions.iter() { + params.push(("permissions", f.to_string())); + } + } + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + if let Some(value) = self._generation { + params.push(("generation", value.to_string())); + } + for &field in ["alt", "bucket", "object", "permissions", "userProject", "generation"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/{object}/iam/testPermissions".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket"), ("{object}", "object")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["object", "bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Name of the bucket in which the object resides. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> ObjectTestIamPermissionCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. + /// + /// Sets the *object* 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 object(mut self, new_value: &str) -> ObjectTestIamPermissionCall<'a, C, A> { + self._object = new_value.to_string(); + self + } + /// Permissions to test. + /// + /// Append the given value to the *permissions* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn add_permissions(mut self, new_value: &str) -> ObjectTestIamPermissionCall<'a, C, A> { + self._permissions.push(new_value.to_string()); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectTestIamPermissionCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } + /// If present, selects a specific revision of this object (as opposed to the latest version, the default). + /// + /// Sets the *generation* query property to the given value. + pub fn generation(mut self, new_value: &str) -> ObjectTestIamPermissionCall<'a, C, A> { + self._generation = 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. + /// + /// 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 Delegate) -> ObjectTestIamPermissionCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ObjectTestIamPermissionCall<'a, C, A> + 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 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: T) -> ObjectTestIamPermissionCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Copies a source object to a destination object. Optionally overrides metadata. /// /// This method supports **media download**. To enable it, adjust the builder like this: @@ -8536,17 +11222,18 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().copy(req, "sourceBucket", "sourceObject", "destinationBucket", "destinationObject") -/// .source_generation("Lorem") -/// .projection("clita") -/// .if_source_metageneration_not_match("invidunt") -/// .if_source_metageneration_match("eirmod") -/// .if_source_generation_not_match("At") -/// .if_source_generation_match("consetetur") -/// .if_metageneration_not_match("et") -/// .if_metageneration_match("sed") -/// .if_generation_not_match("sit") -/// .if_generation_match("takimata") -/// .destination_predefined_acl("elitr") +/// .user_project("rebum.") +/// .source_generation("labore") +/// .projection("aliquyam") +/// .if_source_metageneration_not_match("elitr") +/// .if_source_metageneration_match("consetetur") +/// .if_source_generation_not_match("sea") +/// .if_source_generation_match("elitr") +/// .if_metageneration_not_match("At") +/// .if_metageneration_match("sea") +/// .if_generation_not_match("consetetur") +/// .if_generation_match("diam") +/// .destination_predefined_acl("accusam") /// .doit(); /// # } /// ``` @@ -8559,6 +11246,7 @@ pub struct ObjectCopyCall<'a, C, A> _source_object: String, _destination_bucket: String, _destination_object: String, + _user_project: Option, _source_generation: Option, _projection: Option, _if_source_metageneration_not_match: Option, @@ -8591,11 +11279,14 @@ impl<'a, C, A> ObjectCopyCall<'a, C, A> where C: BorrowMut, A: oa }; dlg.begin(MethodInfo { id: "storage.objects.copy", http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((17 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((18 + self._additional_params.len())); params.push(("sourceBucket", self._source_bucket.to_string())); params.push(("sourceObject", self._source_object.to_string())); params.push(("destinationBucket", self._destination_bucket.to_string())); params.push(("destinationObject", self._destination_object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._source_generation { params.push(("sourceGeneration", value.to_string())); } @@ -8629,7 +11320,7 @@ impl<'a, C, A> ObjectCopyCall<'a, C, A> where C: BorrowMut, A: oa if let Some(value) = self._destination_predefined_acl { params.push(("destinationPredefinedAcl", value.to_string())); } - for &field in ["sourceBucket", "sourceObject", "destinationBucket", "destinationObject", "sourceGeneration", "projection", "ifSourceMetagenerationNotMatch", "ifSourceMetagenerationMatch", "ifSourceGenerationNotMatch", "ifSourceGenerationMatch", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "destinationPredefinedAcl"].iter() { + for &field in ["sourceBucket", "sourceObject", "destinationBucket", "destinationObject", "userProject", "sourceGeneration", "projection", "ifSourceMetagenerationNotMatch", "ifSourceMetagenerationMatch", "ifSourceGenerationNotMatch", "ifSourceGenerationMatch", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "destinationPredefinedAcl"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -8824,6 +11515,13 @@ impl<'a, C, A> ObjectCopyCall<'a, C, A> where C: BorrowMut, A: oa self._destination_object = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectCopyCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// If present, selects a specific revision of the source object (as opposed to the latest version, the default). /// /// Sets the *source generation* query property to the given value. @@ -8986,13 +11684,14 @@ impl<'a, C, A> ObjectCopyCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.objects().patch(req, "bucket", "object") -/// .projection("Lorem") -/// .predefined_acl("Lorem") -/// .if_metageneration_not_match("diam") -/// .if_metageneration_match("ut") -/// .if_generation_not_match("ut") -/// .if_generation_match("amet.") -/// .generation("ipsum") +/// .user_project("dolor") +/// .projection("aliquyam") +/// .predefined_acl("elitr") +/// .if_metageneration_not_match("ea") +/// .if_metageneration_match("et") +/// .if_generation_not_match("Stet") +/// .if_generation_match("sed") +/// .generation("dolor") /// .doit(); /// # } /// ``` @@ -9003,6 +11702,7 @@ pub struct ObjectPatchCall<'a, C, A> _request: Object, _bucket: String, _object: String, + _user_project: Option, _projection: Option, _predefined_acl: Option, _if_metageneration_not_match: Option, @@ -9031,9 +11731,12 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o }; dlg.begin(MethodInfo { id: "storage.objects.patch", http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((13 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("object", self._object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._projection { params.push(("projection", value.to_string())); } @@ -9055,7 +11758,7 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o if let Some(value) = self._generation { params.push(("generation", value.to_string())); } - for &field in ["alt", "bucket", "object", "projection", "predefinedAcl", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "generation"].iter() { + for &field in ["alt", "bucket", "object", "userProject", "projection", "predefinedAcl", "ifMetagenerationNotMatch", "ifMetagenerationMatch", "ifGenerationNotMatch", "ifGenerationMatch", "generation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -9214,6 +11917,13 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o self._object = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectPatchCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// Set of properties to return. Defaults to full. /// /// Sets the *projection* query property to the given value. @@ -9315,9 +12025,9 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o } -/// Creates a new ACL entry on the specified object. +/// Returns the ACL entry for the specified entity on the specified object. /// -/// A builder for the *insert* method supported by a *objectAccessControl* resource. +/// A builder for the *get* method supported by a *objectAccessControl* resource. /// It is not used directly, but through a `ObjectAccessControlMethods` instance. /// /// # Example @@ -9328,7 +12038,6 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_storage1 as storage1; -/// use storage1::ObjectAccessControl; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -9339,35 +12048,32 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o /// # hyper::Client::new(), /// # ::default(), None); /// # let mut hub = Storage::new(hyper::Client::new(), 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 = ObjectAccessControl::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.object_access_controls().insert(req, "bucket", "object") -/// .generation("sea") +/// let result = hub.object_access_controls().get("bucket", "object", "entity") +/// .user_project("consetetur") +/// .generation("consetetur") /// .doit(); /// # } /// ``` -pub struct ObjectAccessControlInsertCall<'a, C, A> +pub struct ObjectAccessControlGetCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Storage, - _request: ObjectAccessControl, _bucket: String, _object: String, + _entity: String, + _user_project: Option, _generation: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for ObjectAccessControlInsertCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for ObjectAccessControlGetCall<'a, C, A> {} -impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> ObjectAccessControlGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. @@ -9379,15 +12085,19 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut d, None => &mut dd }; - dlg.begin(MethodInfo { id: "storage.objectAccessControls.insert", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "storage.objectAccessControls.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("object", self._object.to_string())); + params.push(("entity", self._entity.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._generation { params.push(("generation", value.to_string())); } - for &field in ["alt", "bucket", "object", "generation"].iter() { + for &field in ["alt", "bucket", "object", "entity", "userProject", "generation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -9399,12 +12109,12 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut = None; for &(name, ref value) in params.iter() { if name == param_name { @@ -9415,8 +12125,8 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut = Vec::with_capacity(2); - for param_name in ["object", "bucket"].iter() { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["entity", "object", "bucket"].iter() { if let Some(index) = params.iter().position(|t| &t.0 == param_name) { indices_for_removal.push(index); } @@ -9431,17 +12141,6 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut ObjectAccessControlInsertCall<'a, C, A> { - self._request = new_value; - self - } /// Name of a bucket. /// /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> ObjectAccessControlInsertCall<'a, C, A> { + pub fn bucket(mut self, new_value: &str) -> ObjectAccessControlGetCall<'a, C, A> { self._bucket = new_value.to_string(); self } @@ -9542,14 +12228,31 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut ObjectAccessControlInsertCall<'a, C, A> { + pub fn object(mut self, new_value: &str) -> ObjectAccessControlGetCall<'a, C, A> { self._object = new_value.to_string(); self } + /// The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. + /// + /// Sets the *entity* 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 entity(mut self, new_value: &str) -> ObjectAccessControlGetCall<'a, C, A> { + self._entity = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectAccessControlGetCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// If present, selects a specific revision of this object (as opposed to the latest version, the default). /// /// Sets the *generation* query property to the given value. - pub fn generation(mut self, new_value: &str) -> ObjectAccessControlInsertCall<'a, C, A> { + pub fn generation(mut self, new_value: &str) -> ObjectAccessControlGetCall<'a, C, A> { self._generation = Some(new_value.to_string()); self } @@ -9559,7 +12262,7 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut ObjectAccessControlInsertCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ObjectAccessControlGetCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -9580,7 +12283,7 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> ObjectAccessControlInsertCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> ObjectAccessControlGetCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -9597,7 +12300,7 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectAccessControlInsertCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> ObjectAccessControlGetCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -9638,7 +12341,8 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut _bucket: String, _object: String, _entity: String, + _user_project: Option, _generation: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -9672,14 +12377,17 @@ impl<'a, C, A> ObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("object", self._object.to_string())); params.push(("entity", self._entity.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._generation { params.push(("generation", value.to_string())); } - for &field in ["alt", "bucket", "object", "entity", "generation"].iter() { + for &field in ["alt", "bucket", "object", "entity", "userProject", "generation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -9848,6 +12556,13 @@ impl<'a, C, A> ObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut ObjectAccessControlPatchCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// If present, selects a specific revision of this object (as opposed to the latest version, the default). /// /// Sets the *generation* query property to the given value. @@ -9934,7 +12649,8 @@ impl<'a, C, A> ObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut hub: &'a Storage, _bucket: String, _object: String, + _user_project: Option, _generation: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -9966,13 +12683,16 @@ impl<'a, C, A> ObjectAccessControlListCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("object", self._object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._generation { params.push(("generation", value.to_string())); } - for &field in ["alt", "bucket", "object", "generation"].iter() { + for &field in ["alt", "bucket", "object", "userProject", "generation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -10107,6 +12827,13 @@ impl<'a, C, A> ObjectAccessControlListCall<'a, C, A> where C: BorrowMut ObjectAccessControlListCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// If present, selects a specific revision of this object (as opposed to the latest version, the default). /// /// Sets the *generation* query property to the given value. @@ -10193,7 +12920,8 @@ impl<'a, C, A> ObjectAccessControlListCall<'a, C, A> where C: BorrowMut _bucket: String, _object: String, _entity: String, + _user_project: Option, _generation: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -10226,14 +12955,17 @@ impl<'a, C, A> ObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("object", self._object.to_string())); params.push(("entity", self._entity.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._generation { params.push(("generation", value.to_string())); } - for &field in ["bucket", "object", "entity", "generation"].iter() { + for &field in ["bucket", "object", "entity", "userProject", "generation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -10367,6 +13099,13 @@ impl<'a, C, A> ObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut ObjectAccessControlDeleteCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// If present, selects a specific revision of this object (as opposed to the latest version, the default). /// /// Sets the *generation* query property to the given value. @@ -10426,277 +13165,6 @@ impl<'a, C, A> ObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Storage::new(hyper::Client::new(), 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.object_access_controls().get("bucket", "object", "entity") -/// .generation("vero") -/// .doit(); -/// # } -/// ``` -pub struct ObjectAccessControlGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Storage, - _bucket: String, - _object: String, - _entity: String, - _generation: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for ObjectAccessControlGetCall<'a, C, A> {} - -impl<'a, C, A> ObjectAccessControlGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, ObjectAccessControl)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "storage.objectAccessControls.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); - params.push(("bucket", self._bucket.to_string())); - params.push(("object", self._object.to_string())); - params.push(("entity", self._entity.to_string())); - if let Some(value) = self._generation { - params.push(("generation", value.to_string())); - } - for &field in ["alt", "bucket", "object", "entity", "generation"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/{object}/acl/{entity}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{bucket}", "bucket"), ("{object}", "object"), ("{entity}", "entity")].iter() { - let mut replace_with: Option<&str> = None; - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = Some(value); - break; - } - } - url = url.replace(find_this, replace_with.expect("to find substitution value in params")); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(3); - for param_name in ["entity", "object", "bucket"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// Name of a bucket. - /// - /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> ObjectAccessControlGetCall<'a, C, A> { - self._bucket = new_value.to_string(); - self - } - /// Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. - /// - /// Sets the *object* 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 object(mut self, new_value: &str) -> ObjectAccessControlGetCall<'a, C, A> { - self._object = new_value.to_string(); - self - } - /// The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - /// - /// Sets the *entity* 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 entity(mut self, new_value: &str) -> ObjectAccessControlGetCall<'a, C, A> { - self._entity = new_value.to_string(); - self - } - /// If present, selects a specific revision of this object (as opposed to the latest version, the default). - /// - /// Sets the *generation* query property to the given value. - pub fn generation(mut self, new_value: &str) -> ObjectAccessControlGetCall<'a, C, A> { - self._generation = 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. - /// - /// 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 Delegate) -> ObjectAccessControlGetCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> ObjectAccessControlGetCall<'a, C, A> - 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 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: T) -> ObjectAccessControlGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Updates an ACL entry on the specified object. /// /// A builder for the *update* method supported by a *objectAccessControl* resource. @@ -10730,7 +13198,8 @@ impl<'a, C, A> ObjectAccessControlGetCall<'a, C, A> where C: BorrowMut _bucket: String, _object: String, _entity: String, + _user_project: Option, _generation: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -10764,14 +13234,17 @@ impl<'a, C, A> ObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); params.push(("object", self._object.to_string())); params.push(("entity", self._entity.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._generation { params.push(("generation", value.to_string())); } - for &field in ["alt", "bucket", "object", "entity", "generation"].iter() { + for &field in ["alt", "bucket", "object", "entity", "userProject", "generation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -10940,6 +13413,13 @@ impl<'a, C, A> ObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut ObjectAccessControlUpdateCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// If present, selects a specific revision of this object (as opposed to the latest version, the default). /// /// Sets the *generation* query property to the given value. @@ -10999,6 +13479,646 @@ impl<'a, C, A> ObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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 = ObjectAccessControl::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.object_access_controls().insert(req, "bucket", "object") +/// .user_project("dolore") +/// .generation("amet.") +/// .doit(); +/// # } +/// ``` +pub struct ObjectAccessControlInsertCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _request: ObjectAccessControl, + _bucket: String, + _object: String, + _user_project: Option, + _generation: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ObjectAccessControlInsertCall<'a, C, A> {} + +impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ObjectAccessControl)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.objectAccessControls.insert", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + params.push(("object", self._object.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + if let Some(value) = self._generation { + params.push(("generation", value.to_string())); + } + for &field in ["alt", "bucket", "object", "userProject", "generation"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/{object}/acl".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket"), ("{object}", "object")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["object", "bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: ObjectAccessControl) -> ObjectAccessControlInsertCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of a bucket. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> ObjectAccessControlInsertCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. + /// + /// Sets the *object* 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 object(mut self, new_value: &str) -> ObjectAccessControlInsertCall<'a, C, A> { + self._object = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> ObjectAccessControlInsertCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } + /// If present, selects a specific revision of this object (as opposed to the latest version, the default). + /// + /// Sets the *generation* query property to the given value. + pub fn generation(mut self, new_value: &str) -> ObjectAccessControlInsertCall<'a, C, A> { + self._generation = 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. + /// + /// 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 Delegate) -> ObjectAccessControlInsertCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ObjectAccessControlInsertCall<'a, C, A> + 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 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: T) -> ObjectAccessControlInsertCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics. +/// +/// A builder for the *patch* method supported by a *bucket* resource. +/// It is not used directly, but through a `BucketMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// use storage1::Bucket; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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 = Bucket::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.buckets().patch(req, "bucket") +/// .user_project("magna") +/// .projection("elitr") +/// .predefined_default_object_acl("magna") +/// .predefined_acl("ipsum") +/// .if_metageneration_not_match("invidunt") +/// .if_metageneration_match("accusam") +/// .doit(); +/// # } +/// ``` +pub struct BucketPatchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _request: Bucket, + _bucket: String, + _user_project: Option, + _projection: Option, + _predefined_default_object_acl: Option, + _predefined_acl: Option, + _if_metageneration_not_match: Option, + _if_metageneration_match: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for BucketPatchCall<'a, C, A> {} + +impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Bucket)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.buckets.patch", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((10 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + if let Some(value) = self._projection { + params.push(("projection", value.to_string())); + } + if let Some(value) = self._predefined_default_object_acl { + params.push(("predefinedDefaultObjectAcl", value.to_string())); + } + if let Some(value) = self._predefined_acl { + params.push(("predefinedAcl", value.to_string())); + } + if let Some(value) = self._if_metageneration_not_match { + params.push(("ifMetagenerationNotMatch", value.to_string())); + } + if let Some(value) = self._if_metageneration_match { + params.push(("ifMetagenerationMatch", value.to_string())); + } + for &field in ["alt", "bucket", "userProject", "projection", "predefinedDefaultObjectAcl", "predefinedAcl", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + 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.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, 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: Bucket) -> BucketPatchCall<'a, C, A> { + self._request = new_value; + self + } + /// Name of a bucket. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } + /// Set of properties to return. Defaults to full. + /// + /// Sets the *projection* query property to the given value. + pub fn projection(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { + self._projection = Some(new_value.to_string()); + self + } + /// Apply a predefined set of default object access controls to this bucket. + /// + /// Sets the *predefined default object acl* query property to the given value. + pub fn predefined_default_object_acl(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { + self._predefined_default_object_acl = Some(new_value.to_string()); + self + } + /// Apply a predefined set of access controls to this bucket. + /// + /// Sets the *predefined acl* query property to the given value. + pub fn predefined_acl(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { + self._predefined_acl = Some(new_value.to_string()); + self + } + /// Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. + /// + /// Sets the *if metageneration not match* query property to the given value. + pub fn if_metageneration_not_match(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { + self._if_metageneration_not_match = Some(new_value.to_string()); + self + } + /// Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. + /// + /// Sets the *if metageneration match* query property to the given value. + pub fn if_metageneration_match(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { + self._if_metageneration_match = 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. + /// + /// 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 Delegate) -> BucketPatchCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> BucketPatchCall<'a, C, A> + 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 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: T) -> BucketPatchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. /// /// A builder for the *update* method supported by a *bucket* resource. @@ -11032,11 +14152,12 @@ impl<'a, C, A> ObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut hub: &'a Storage, _request: Bucket, _bucket: String, + _user_project: Option, _projection: Option, _predefined_default_object_acl: Option, _predefined_acl: Option, @@ -11072,8 +14194,11 @@ impl<'a, C, A> BucketUpdateCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "storage.buckets.update", http_method: hyper::method::Method::Put }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((10 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._projection { params.push(("projection", value.to_string())); } @@ -11089,7 +14214,7 @@ impl<'a, C, A> BucketUpdateCall<'a, C, A> where C: BorrowMut, A: if let Some(value) = self._if_metageneration_match { params.push(("ifMetagenerationMatch", value.to_string())); } - for &field in ["alt", "bucket", "projection", "predefinedDefaultObjectAcl", "predefinedAcl", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { + for &field in ["alt", "bucket", "userProject", "projection", "predefinedDefaultObjectAcl", "predefinedAcl", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -11238,6 +14363,13 @@ impl<'a, C, A> BucketUpdateCall<'a, C, A> where C: BorrowMut, A: self._bucket = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> BucketUpdateCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// Set of properties to return. Defaults to full. /// /// Sets the *projection* query property to the given value. @@ -11352,9 +14484,10 @@ impl<'a, C, A> BucketUpdateCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.buckets().get("bucket") -/// .projection("elitr") -/// .if_metageneration_not_match("consetetur") -/// .if_metageneration_match("sea") +/// .user_project("dolor") +/// .projection("vero") +/// .if_metageneration_not_match("nonumy") +/// .if_metageneration_match("takimata") /// .doit(); /// # } /// ``` @@ -11363,6 +14496,7 @@ pub struct BucketGetCall<'a, C, A> hub: &'a Storage, _bucket: String, + _user_project: Option, _projection: Option, _if_metageneration_not_match: Option, _if_metageneration_match: Option, @@ -11387,8 +14521,11 @@ impl<'a, C, A> BucketGetCall<'a, C, A> where C: BorrowMut, A: oau }; dlg.begin(MethodInfo { id: "storage.buckets.get", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._projection { params.push(("projection", value.to_string())); } @@ -11398,7 +14535,7 @@ impl<'a, C, A> BucketGetCall<'a, C, A> where C: BorrowMut, A: oau if let Some(value) = self._if_metageneration_match { params.push(("ifMetagenerationMatch", value.to_string())); } - for &field in ["alt", "bucket", "projection", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { + for &field in ["alt", "bucket", "userProject", "projection", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -11523,6 +14660,13 @@ impl<'a, C, A> BucketGetCall<'a, C, A> where C: BorrowMut, A: oau self._bucket = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> BucketGetCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// Set of properties to return. Defaults to noAcl. /// /// Sets the *projection* query property to the given value. @@ -11623,8 +14767,9 @@ impl<'a, C, A> BucketGetCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.buckets().delete("bucket") -/// .if_metageneration_not_match("At") -/// .if_metageneration_match("sea") +/// .user_project("consetetur") +/// .if_metageneration_not_match("erat") +/// .if_metageneration_match("amet.") /// .doit(); /// # } /// ``` @@ -11633,6 +14778,7 @@ pub struct BucketDeleteCall<'a, C, A> hub: &'a Storage, _bucket: String, + _user_project: Option, _if_metageneration_not_match: Option, _if_metageneration_match: Option, _delegate: Option<&'a mut Delegate>, @@ -11656,15 +14802,18 @@ impl<'a, C, A> BucketDeleteCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "storage.buckets.delete", http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } if let Some(value) = self._if_metageneration_not_match { params.push(("ifMetagenerationNotMatch", value.to_string())); } if let Some(value) = self._if_metageneration_match { params.push(("ifMetagenerationMatch", value.to_string())); } - for &field in ["bucket", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { + for &field in ["bucket", "userProject", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -11778,6 +14927,13 @@ impl<'a, C, A> BucketDeleteCall<'a, C, A> where C: BorrowMut, A: self._bucket = new_value.to_string(); self } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> BucketDeleteCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); + self + } /// If set, only deletes the bucket if its metageneration does not match this value. /// /// Sets the *if metageneration not match* query property to the given value. @@ -11877,9 +15033,9 @@ impl<'a, C, A> BucketDeleteCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.buckets().insert(req, "project") -/// .projection("diam") -/// .predefined_default_object_acl("accusam") -/// .predefined_acl("dolores") +/// .projection("dolores") +/// .predefined_default_object_acl("et") +/// .predefined_acl("sed") /// .doit(); /// # } /// ``` @@ -12125,9 +15281,9 @@ impl<'a, C, A> BucketInsertCall<'a, C, A> where C: BorrowMut, A: } -/// Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics. +/// Tests a set of permissions on the given bucket to see which, if any, are held by the caller. /// -/// A builder for the *patch* method supported by a *bucket* resource. +/// A builder for the *testIamPermissions* method supported by a *bucket* resource. /// It is not used directly, but through a `BucketMethods` instance. /// /// # Example @@ -12138,7 +15294,271 @@ impl<'a, C, A> BucketInsertCall<'a, C, A> where C: BorrowMut, A: /// # extern crate hyper; /// # extern crate yup_oauth2 as oauth2; /// # extern crate google_storage1 as storage1; -/// use storage1::Bucket; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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.buckets().test_iam_permissions("bucket", "permissions") +/// .user_project("nonumy") +/// .doit(); +/// # } +/// ``` +pub struct BucketTestIamPermissionCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _bucket: String, + _permissions: Vec, + _user_project: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for BucketTestIamPermissionCall<'a, C, A> {} + +impl<'a, C, A> BucketTestIamPermissionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TestIamPermissionsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.buckets.testIamPermissions", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + if self._permissions.len() > 0 { + for f in self._permissions.iter() { + params.push(("permissions", f.to_string())); + } + } + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "permissions", "userProject"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/iam/testPermissions".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Name of a bucket. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> BucketTestIamPermissionCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// Permissions to test. + /// + /// Append the given value to the *permissions* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn add_permissions(mut self, new_value: &str) -> BucketTestIamPermissionCall<'a, C, A> { + self._permissions.push(new_value.to_string()); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> BucketTestIamPermissionCall<'a, C, A> { + self._user_project = 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. + /// + /// 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 Delegate) -> BucketTestIamPermissionCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> BucketTestIamPermissionCall<'a, C, A> + 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 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: T) -> BucketTestIamPermissionCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates an IAM policy for the specified bucket. +/// +/// A builder for the *setIamPolicy* method supported by a *bucket* resource. +/// It is not used directly, but through a `BucketMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// use storage1::Policy; /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -12152,43 +15572,35 @@ impl<'a, C, A> BucketInsertCall<'a, C, A> where C: BorrowMut, A: /// // 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 = Bucket::default(); +/// let mut req = Policy::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.buckets().patch(req, "bucket") -/// .projection("dolor") -/// .predefined_default_object_acl("aliquyam") -/// .predefined_acl("elitr") -/// .if_metageneration_not_match("ea") -/// .if_metageneration_match("et") +/// let result = hub.buckets().set_iam_policy(req, "bucket") +/// .user_project("aliquyam") /// .doit(); /// # } /// ``` -pub struct BucketPatchCall<'a, C, A> +pub struct BucketSetIamPolicyCall<'a, C, A> where C: 'a, A: 'a { hub: &'a Storage, - _request: Bucket, + _request: Policy, _bucket: String, - _projection: Option, - _predefined_default_object_acl: Option, - _predefined_acl: Option, - _if_metageneration_not_match: Option, - _if_metageneration_match: Option, + _user_project: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap } -impl<'a, C, A> CallBuilder for BucketPatchCall<'a, C, A> {} +impl<'a, C, A> CallBuilder for BucketSetIamPolicyCall<'a, C, A> {} -impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { +impl<'a, C, A> BucketSetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Bucket)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { use std::io::{Read, Seek}; use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; @@ -12196,26 +15608,14 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o Some(d) => d, None => &mut dd }; - dlg.begin(MethodInfo { id: "storage.buckets.patch", - http_method: hyper::method::Method::Patch }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); + dlg.begin(MethodInfo { id: "storage.buckets.setIamPolicy", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("bucket", self._bucket.to_string())); - if let Some(value) = self._projection { - params.push(("projection", value.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); } - if let Some(value) = self._predefined_default_object_acl { - params.push(("predefinedDefaultObjectAcl", value.to_string())); - } - if let Some(value) = self._predefined_acl { - params.push(("predefinedAcl", value.to_string())); - } - if let Some(value) = self._if_metageneration_not_match { - params.push(("ifMetagenerationNotMatch", value.to_string())); - } - if let Some(value) = self._if_metageneration_match { - params.push(("ifMetagenerationMatch", value.to_string())); - } - for &field in ["alt", "bucket", "projection", "predefinedDefaultObjectAcl", "predefinedAcl", "ifMetagenerationNotMatch", "ifMetagenerationMatch"].iter() { + for &field in ["alt", "bucket", "userProject"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -12227,7 +15627,7 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}".to_string(); + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/iam".to_string(); if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12289,7 +15689,7 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) .header(UserAgent(self.hub._user_agent.clone())) .header(auth_header.clone()) .header(ContentType(json_mime_type.clone())) @@ -12350,7 +15750,7 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// 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: Bucket) -> BucketPatchCall<'a, C, A> { + pub fn request(mut self, new_value: Policy) -> BucketSetIamPolicyCall<'a, C, A> { self._request = new_value; self } @@ -12360,43 +15760,15 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. - pub fn bucket(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { + pub fn bucket(mut self, new_value: &str) -> BucketSetIamPolicyCall<'a, C, A> { self._bucket = new_value.to_string(); self } - /// Set of properties to return. Defaults to full. + /// The project number to be billed for this request, for Requester Pays buckets. /// - /// Sets the *projection* query property to the given value. - pub fn projection(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { - self._projection = Some(new_value.to_string()); - self - } - /// Apply a predefined set of default object access controls to this bucket. - /// - /// Sets the *predefined default object acl* query property to the given value. - pub fn predefined_default_object_acl(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { - self._predefined_default_object_acl = Some(new_value.to_string()); - self - } - /// Apply a predefined set of access controls to this bucket. - /// - /// Sets the *predefined acl* query property to the given value. - pub fn predefined_acl(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { - self._predefined_acl = Some(new_value.to_string()); - self - } - /// Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. - /// - /// Sets the *if metageneration not match* query property to the given value. - pub fn if_metageneration_not_match(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { - self._if_metageneration_not_match = Some(new_value.to_string()); - self - } - /// Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. - /// - /// Sets the *if metageneration match* query property to the given value. - pub fn if_metageneration_match(mut self, new_value: &str) -> BucketPatchCall<'a, C, A> { - self._if_metageneration_match = Some(new_value.to_string()); + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> BucketSetIamPolicyCall<'a, C, A> { + self._user_project = Some(new_value.to_string()); self } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong @@ -12405,7 +15777,7 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o /// 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 Delegate) -> BucketPatchCall<'a, C, A> { + pub fn delegate(mut self, new_value: &'a mut Delegate) -> BucketSetIamPolicyCall<'a, C, A> { self._delegate = Some(new_value); self } @@ -12426,7 +15798,7 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> BucketPatchCall<'a, C, A> + pub fn param(mut self, name: T, value: T) -> BucketSetIamPolicyCall<'a, C, A> where T: AsRef { self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); self @@ -12443,7 +15815,254 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o /// 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: T) -> BucketPatchCall<'a, C, A> + pub fn add_scope(mut self, scope: T) -> BucketSetIamPolicyCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Returns an IAM policy for the specified bucket. +/// +/// A builder for the *getIamPolicy* method supported by a *bucket* resource. +/// It is not used directly, but through a `BucketMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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.buckets().get_iam_policy("bucket") +/// .user_project("magna") +/// .doit(); +/// # } +/// ``` +pub struct BucketGetIamPolicyCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _bucket: String, + _user_project: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for BucketGetIamPolicyCall<'a, C, A> {} + +impl<'a, C, A> BucketGetIamPolicyCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.buckets.getIamPolicy", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("bucket", self._bucket.to_string())); + if let Some(value) = self._user_project { + params.push(("userProject", value.to_string())); + } + for &field in ["alt", "bucket", "userProject"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/iam".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{bucket}", "bucket")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["bucket"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Name of a bucket. + /// + /// Sets the *bucket* 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 bucket(mut self, new_value: &str) -> BucketGetIamPolicyCall<'a, C, A> { + self._bucket = new_value.to_string(); + self + } + /// The project number to be billed for this request, for Requester Pays buckets. + /// + /// Sets the *user project* query property to the given value. + pub fn user_project(mut self, new_value: &str) -> BucketGetIamPolicyCall<'a, C, A> { + self._user_project = 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. + /// + /// 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 Delegate) -> BucketGetIamPolicyCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> BucketGetIamPolicyCall<'a, C, A> + 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 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: T) -> BucketGetIamPolicyCall<'a, C, A> where T: AsRef { self._scopes.insert(scope.as_ref().to_string(), ()); self @@ -12478,10 +16097,10 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.buckets().list("project") -/// .projection("sed") -/// .prefix("dolor") -/// .page_token("sanctus") -/// .max_results(68) +/// .projection("sit") +/// .prefix("gubergren") +/// .page_token("sit") +/// .max_results(4) /// .doit(); /// # } /// ``` @@ -12654,7 +16273,7 @@ impl<'a, C, A> BucketListCall<'a, C, A> where C: BorrowMut, A: oa self._page_token = Some(new_value.to_string()); self } - /// Maximum number of buckets to return. + /// Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller. /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> BucketListCall<'a, C, A> { @@ -12713,4 +16332,239 @@ impl<'a, C, A> BucketListCall<'a, C, A> where C: BorrowMut, A: oa } +/// Get the email address of this project's GCS service account. +/// +/// A builder for the *serviceAccount.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storage1 as storage1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storage1::Storage; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storage::new(hyper::Client::new(), 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.projects().service_account_get("projectId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectServiceAccountGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storage, + _project_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectServiceAccountGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectServiceAccountGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ServiceAccount)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storage.projects.serviceAccount.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + for &field in ["alt", "projectId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/storage/v1/projects/{projectId}/serviceAccount".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Project ID + /// + /// Sets the *project id* 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 project_id(mut self, new_value: &str) -> ProjectServiceAccountGetCall<'a, C, A> { + self._project_id = 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. + /// + /// 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 Delegate) -> ProjectServiceAccountGetCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectServiceAccountGetCall<'a, C, A> + 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 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: T) -> ProjectServiceAccountGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + diff --git a/gen/storagetransfer1-cli/Cargo.toml b/gen/storagetransfer1-cli/Cargo.toml index 2f14d2132c..6daf71d5ad 100644 --- a/gen/storagetransfer1-cli/Cargo.toml +++ b/gen/storagetransfer1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-storagetransfer1-cli" -version = "1.0.4+20150811" +version = "1.0.4+20170515" authors = ["Sebastian Thiel "] description = "A complete library to interact with storagetransfer (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/storagetransfer1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-storagetransfer1] path = "../storagetransfer1" -version = "1.0.4+20150811" +version = "1.0.4+20170515" diff --git a/gen/storagetransfer1-cli/README.md b/gen/storagetransfer1-cli/README.md index 1261fc41b0..ed8de7d844 100644 --- a/gen/storagetransfer1-cli/README.md +++ b/gen/storagetransfer1-cli/README.md @@ -25,14 +25,12 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *storagetransfer* API at revision *20150811*. The CLI is at version *1.0.4*. +This documentation was generated from the *storagetransfer* API at revision *20170515*. The CLI is at version *1.0.4*. ```bash storagetransfer1 [options] google-service-accounts get [-p ]... [-o ] - methods - get-google-service-account [-p ]... [-o ] transfer-jobs create (-r )... [-p ]... [-o ] get [-p ]... [-o ] diff --git a/gen/storagetransfer1-cli/mkdocs.yml b/gen/storagetransfer1-cli/mkdocs.yml index 6996d1f158..d9d26a2795 100644 --- a/gen/storagetransfer1-cli/mkdocs.yml +++ b/gen/storagetransfer1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: storagetransfer v1.0.4+20150811 +site_name: storagetransfer v1.0.4+20170515 site_url: http://byron.github.io/google-apis-rs/google-storagetransfer1-cli site_description: A complete library to interact with storagetransfer (protocol v1) @@ -10,7 +10,6 @@ site_dir: build_html pages: - ['index.md', 'Home'] - ['google-service-accounts_get.md', 'Google Service Accounts', 'Get'] -- ['methods_get-google-service-account.md', 'Methods', 'Get Google Service Account'] - ['transfer-jobs_create.md', 'Transfer Jobs', 'Create'] - ['transfer-jobs_get.md', 'Transfer Jobs', 'Get'] - ['transfer-jobs_list.md', 'Transfer Jobs', 'List'] diff --git a/gen/storagetransfer1-cli/src/main.rs b/gen/storagetransfer1-cli/src/main.rs index d787f546a2..ea1440d3ee 100644 --- a/gen/storagetransfer1-cli/src/main.rs +++ b/gen/storagetransfer1-cli/src/main.rs @@ -98,62 +98,6 @@ impl<'n> Engine<'n> { } } - fn _methods_get_google_service_account(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) - -> Result<(), DoitError> { - let mut call = self.hub.methods().get_google_service_account(); - 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 { - "project-id" => { - call = call.project_id(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(["project-id"].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(), - _ => 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(()) - } - } - } - } - fn _transfer_jobs_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -192,21 +136,21 @@ impl<'n> Engine<'n> { "transfer-spec.aws-s3-data-source.bucket-name" => Some(("transferSpec.awsS3DataSource.bucketName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "status" => Some(("status", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "deletion-time" => Some(("deletionTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "schedule.start-time-of-day.hours" => Some(("schedule.startTimeOfDay.hours", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "schedule.start-time-of-day.nanos" => Some(("schedule.startTimeOfDay.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "schedule.start-time-of-day.minutes" => Some(("schedule.startTimeOfDay.minutes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "schedule.start-time-of-day.seconds" => Some(("schedule.startTimeOfDay.seconds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "schedule.schedule-start-date.month" => Some(("schedule.scheduleStartDate.month", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "schedule.schedule-start-date.day" => Some(("schedule.scheduleStartDate.day", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "schedule.schedule-start-date.year" => Some(("schedule.scheduleStartDate.year", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "schedule.start-time-of-day.hours" => Some(("schedule.startTimeOfDay.hours", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "schedule.start-time-of-day.seconds" => Some(("schedule.startTimeOfDay.seconds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "schedule.start-time-of-day.minutes" => Some(("schedule.startTimeOfDay.minutes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "schedule.start-time-of-day.nanos" => Some(("schedule.startTimeOfDay.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "schedule.schedule-end-date.month" => Some(("schedule.scheduleEndDate.month", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "schedule.schedule-end-date.day" => Some(("schedule.scheduleEndDate.day", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "schedule.schedule-end-date.year" => Some(("schedule.scheduleEndDate.year", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "project-id" => Some(("projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "last-modification-time" => Some(("lastModificationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["access-key-id", "aws-access-key", "aws-s3-data-source", "bucket-name", "creation-time", "day", "delete-objects-from-source-after-transfer", "delete-objects-unique-in-sink", "deletion-time", "description", "exclude-prefixes", "gcs-data-sink", "gcs-data-source", "hours", "http-data-source", "include-prefixes", "last-modification-time", "list-url", "max-time-elapsed-since-last-modification", "min-time-elapsed-since-last-modification", "minutes", "month", "name", "nanos", "object-conditions", "overwrite-objects-already-existing-in-sink", "project-id", "schedule", "schedule-end-date", "schedule-start-date", "seconds", "secret-access-key", "start-time-of-day", "status", "transfer-options", "transfer-spec", "year"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -426,21 +370,21 @@ impl<'n> Engine<'n> { "transfer-job.transfer-spec.aws-s3-data-source.bucket-name" => Some(("transferJob.transferSpec.awsS3DataSource.bucketName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "transfer-job.status" => Some(("transferJob.status", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "transfer-job.deletion-time" => Some(("transferJob.deletionTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transfer-job.schedule.start-time-of-day.hours" => Some(("transferJob.schedule.startTimeOfDay.hours", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "transfer-job.schedule.start-time-of-day.nanos" => Some(("transferJob.schedule.startTimeOfDay.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "transfer-job.schedule.start-time-of-day.minutes" => Some(("transferJob.schedule.startTimeOfDay.minutes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "transfer-job.schedule.start-time-of-day.seconds" => Some(("transferJob.schedule.startTimeOfDay.seconds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "transfer-job.schedule.schedule-start-date.month" => Some(("transferJob.schedule.scheduleStartDate.month", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "transfer-job.schedule.schedule-start-date.day" => Some(("transferJob.schedule.scheduleStartDate.day", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "transfer-job.schedule.schedule-start-date.year" => Some(("transferJob.schedule.scheduleStartDate.year", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "transfer-job.schedule.start-time-of-day.hours" => Some(("transferJob.schedule.startTimeOfDay.hours", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "transfer-job.schedule.start-time-of-day.seconds" => Some(("transferJob.schedule.startTimeOfDay.seconds", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "transfer-job.schedule.start-time-of-day.minutes" => Some(("transferJob.schedule.startTimeOfDay.minutes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "transfer-job.schedule.start-time-of-day.nanos" => Some(("transferJob.schedule.startTimeOfDay.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "transfer-job.schedule.schedule-end-date.month" => Some(("transferJob.schedule.scheduleEndDate.month", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "transfer-job.schedule.schedule-end-date.day" => Some(("transferJob.schedule.scheduleEndDate.day", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "transfer-job.schedule.schedule-end-date.year" => Some(("transferJob.schedule.scheduleEndDate.year", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "transfer-job.project-id" => Some(("transferJob.projectId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transfer-job.description" => Some(("transferJob.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "transfer-job.last-modification-time" => Some(("transferJob.lastModificationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "transfer-job.creation-time" => Some(("transferJob.creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "transfer-job.name" => Some(("transferJob.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "transfer-job.description" => Some(("transferJob.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["access-key-id", "aws-access-key", "aws-s3-data-source", "bucket-name", "creation-time", "day", "delete-objects-from-source-after-transfer", "delete-objects-unique-in-sink", "deletion-time", "description", "exclude-prefixes", "gcs-data-sink", "gcs-data-source", "hours", "http-data-source", "include-prefixes", "last-modification-time", "list-url", "max-time-elapsed-since-last-modification", "min-time-elapsed-since-last-modification", "minutes", "month", "name", "nanos", "object-conditions", "overwrite-objects-already-existing-in-sink", "project-id", "schedule", "schedule-end-date", "schedule-start-date", "seconds", "secret-access-key", "start-time-of-day", "status", "transfer-job", "transfer-options", "transfer-spec", "update-transfer-job-field-mask", "year"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); @@ -904,17 +848,6 @@ impl<'n> Engine<'n> { } } }, - ("methods", Some(opt)) => { - match opt.subcommand() { - ("get-google-service-account", Some(opt)) => { - call_result = self._methods_get_google_service_account(opt, dry_run, &mut err); - }, - _ => { - err.issues.push(CLIError::MissingMethodError("methods".to_string())); - writeln!(io::stderr(), "{}\n", opt.usage()).ok(); - } - } - }, ("transfer-jobs", Some(opt)) => { match opt.subcommand() { ("create", Some(opt)) => { @@ -1049,12 +982,21 @@ fn main() { let arg_data = [ ("google-service-accounts", "methods: 'get'", vec![ ("get", - Some(r##"Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Developers Console project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service."##), + Some(r##"Returns the Google service account that is used by Storage Transfer + Service to access buckets in the project where transfers + run or in other projects. Each Google service account is associated + with one Google Cloud Platform Console project. Users + should add this service account to the Google Cloud Storage bucket + ACLs to grant access to Storage Transfer Service. This service + account is created and owned by Storage Transfer Service and can + only be used by Storage Transfer Service."##), "Details at http://byron.github.io/google-apis-rs/google_storagetransfer1_cli/google-service-accounts_get", vec![ (Some(r##"project-id"##), None, - Some(r##"The ID of the Google Developers Console project that the Google service account is associated with. Required."##), + Some(r##"The ID of the Google Cloud Platform Console project that the Google service + account is associated with. + Required."##), Some(true), Some(false)), @@ -1072,25 +1014,6 @@ fn main() { ]), ]), - ("methods", "methods: 'get-google-service-account'", vec![ - ("get-google-service-account", - Some(r##"Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Developers Console project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service."##), - "Details at http://byron.github.io/google-apis-rs/google_storagetransfer1_cli/methods_get-google-service-account", - vec![ - (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)), - ]), - ]), - ("transfer-jobs", "methods: 'create', 'get', 'list' and 'patch'", vec![ ("create", Some(r##"Creates a transfer job that runs periodically."##), @@ -1120,7 +1043,8 @@ fn main() { vec![ (Some(r##"job-name"##), None, - Some(r##"The job to get. Required."##), + Some(r##"The job to get. + Required."##), Some(true), Some(false)), @@ -1153,12 +1077,15 @@ fn main() { Some(false)), ]), ("patch", - Some(r##"Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. Updating the scheduling of a job is not allowed."##), + Some(r##"Updates a transfer job. Updating a job's transfer spec does not affect + transfer operations that are running already. Updating the scheduling + of a job is not allowed."##), "Details at http://byron.github.io/google-apis-rs/google_storagetransfer1_cli/transfer-jobs_patch", vec![ (Some(r##"job-name"##), None, - Some(r##"The name of job to update. Required."##), + Some(r##"The name of job to update. + Required."##), Some(true), Some(false)), @@ -1228,7 +1155,9 @@ fn main() { Some(false)), ]), ("get", - Some(r##"Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service."##), + Some(r##"Gets the latest state of a long-running operation. Clients can use this + method to poll the operation result at intervals as recommended by the API + service."##), "Details at http://byron.github.io/google-apis-rs/google_storagetransfer1_cli/transfer-operations_get", vec![ (Some(r##"name"##), @@ -1250,7 +1179,11 @@ fn main() { Some(false)), ]), ("list", - Some(r##"Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/*/operations`."##), + Some(r##"Lists operations that match the specified filter in the request. If the + server doesn't support this method, it returns `UNIMPLEMENTED`. + + NOTE: the `name` binding below allows API services to override the binding + to use different resource name schemes, such as `users/*/operations`."##), "Details at http://byron.github.io/google-apis-rs/google_storagetransfer1_cli/transfer-operations_list", vec![ (Some(r##"name"##), @@ -1277,7 +1210,8 @@ fn main() { vec![ (Some(r##"name"##), None, - Some(r##"The name of the transfer operation. Required."##), + Some(r##"The name of the transfer operation. + Required."##), Some(true), Some(false)), @@ -1305,7 +1239,8 @@ fn main() { vec![ (Some(r##"name"##), None, - Some(r##"The name of the transfer operation. Required."##), + Some(r##"The name of the transfer operation. + Required."##), Some(true), Some(false)), @@ -1333,7 +1268,7 @@ fn main() { let mut app = App::new("storagetransfer1") .author("Sebastian Thiel ") - .version("1.0.4+20150811") + .version("1.0.4+20170515") .about("Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_storagetransfer1_cli") .arg(Arg::with_name("url") diff --git a/gen/storagetransfer1/Cargo.toml b/gen/storagetransfer1/Cargo.toml index 52f398f878..4e7bcd6b6c 100644 --- a/gen/storagetransfer1/Cargo.toml +++ b/gen/storagetransfer1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-storagetransfer1" -version = "1.0.4+20150811" +version = "1.0.4+20170515" authors = ["Sebastian Thiel "] description = "A complete library to interact with storagetransfer (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/storagetransfer1" homepage = "https://cloud.google.com/storage/transfer" -documentation = "https://docs.rs/google-storagetransfer1/1.0.4+20150811" +documentation = "https://docs.rs/google-storagetransfer1/1.0.4+20170515" license = "MIT" keywords = ["storagetransfer", "google", "protocol", "web", "api"] diff --git a/gen/storagetransfer1/README.md b/gen/storagetransfer1/README.md index bf55e3eb80..0b7db428a0 100644 --- a/gen/storagetransfer1/README.md +++ b/gen/storagetransfer1/README.md @@ -5,24 +5,21 @@ DO NOT EDIT ! --> The `google-storagetransfer1` library allows access to all features of the *Google storagetransfer* service. -This documentation was generated from *storagetransfer* crate version *1.0.4+20150811*, where *20150811* is the exact revision of the *storagetransfer:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *storagetransfer* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *storagetransfer:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *storagetransfer* *v1* API can be found at the [official documentation site](https://cloud.google.com/storage/transfer). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.Storagetransfer.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.Storagetransfer.html) ... -* [google service accounts](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.GoogleServiceAccount.html) - * [*get*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.GoogleServiceAccountGetCall.html) -* [transfer jobs](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferJob.html) - * [*create*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferJobCreateCall.html), [*get*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferJobGetCall.html), [*list*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferJobListCall.html) and [*patch*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferJobPatchCall.html) -* [transfer operations](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferOperation.html) - * [*cancel*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferOperationCancelCall.html), [*delete*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferOperationDeleteCall.html), [*get*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferOperationGetCall.html), [*list*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferOperationListCall.html), [*pause*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferOperationPauseCall.html) and [*resume*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.TransferOperationResumeCall.html) +* [google service accounts](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.GoogleServiceAccount.html) + * [*get*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.GoogleServiceAccountGetCall.html) +* [transfer jobs](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferJob.html) + * [*create*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferJobCreateCall.html), [*get*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferJobGetCall.html), [*list*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferJobListCall.html) and [*patch*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferJobPatchCall.html) +* [transfer operations](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferOperation.html) + * [*cancel*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferOperationCancelCall.html), [*delete*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferOperationDeleteCall.html), [*get*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferOperationGetCall.html), [*list*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferOperationListCall.html), [*pause*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferOperationPauseCall.html) and [*resume*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.TransferOperationResumeCall.html) -Other activities are ... - -* [get google service account](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.MethodGetGoogleServiceAccountCall.html) @@ -30,17 +27,17 @@ Other activities are ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/struct.Storagetransfer.html)** +* **[Hub](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/struct.Storagetransfer.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.Part.html)** + * **[Parts](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -130,17 +127,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.Delegate.html), 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-storagetransfer1/1.0.4+20150811/google_storagetransfer1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.ResponseResult.html), 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")`. @@ -150,29 +147,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.CallBuilder.html) 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-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.CallBuilder.html), 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-storagetransfer1/1.0.4+20150811/google_storagetransfer1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-storagetransfer1/1.0.4+20170515/google_storagetransfer1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/storagetransfer1/src/lib.rs b/gen/storagetransfer1/src/lib.rs index c39d48e1fa..e5c124aab6 100644 --- a/gen/storagetransfer1/src/lib.rs +++ b/gen/storagetransfer1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *storagetransfer* crate version *1.0.4+20150811*, where *20150811* is the exact revision of the *storagetransfer:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *storagetransfer* crate version *1.0.4+20170515*, where *20170515* is the exact revision of the *storagetransfer:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *storagetransfer* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/storage/transfer). @@ -18,9 +18,6 @@ //! * [transfer operations](struct.TransferOperation.html) //! * [*cancel*](struct.TransferOperationCancelCall.html), [*delete*](struct.TransferOperationDeleteCall.html), [*get*](struct.TransferOperationGetCall.html), [*list*](struct.TransferOperationListCall.html), [*pause*](struct.TransferOperationPauseCall.html) and [*resume*](struct.TransferOperationResumeCall.html) //! -//! Other activities are ... -//! -//! * [get google service account](struct.MethodGetGoogleServiceAccountCall.html) //! //! //! @@ -331,9 +328,6 @@ impl<'a, C, A> Storagetransfer pub fn google_service_accounts(&'a self) -> GoogleServiceAccountMethods<'a, C, A> { GoogleServiceAccountMethods { hub: &self } } - pub fn methods(&'a self) -> MethodMethods<'a, C, A> { - MethodMethods { hub: &self } - } pub fn transfer_jobs(&'a self) -> TransferJobMethods<'a, C, A> { TransferJobMethods { hub: &self } } @@ -356,6 +350,21 @@ impl<'a, C, A> Storagetransfer // ############ // SCHEMAS ### // ########## +/// Request passed to PauseTransferOperation. +/// +/// # 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*). +/// +/// * [pause transfer operations](struct.TransferOperationPauseCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct PauseTransferOperationRequest { _never_set: Option } + +impl RequestValue for PauseTransferOperationRequest {} + + /// Configuration for running a transfer. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -365,10 +374,14 @@ pub struct TransferSpec { /// An HTTP URL data source. #[serde(rename="httpDataSource")] pub http_data_source: Option, - /// If the option `deleteObjectsUniqueInSink` is `true`, object conditions based on objects' `lastModificationTime` are ignored and do not exclude objects in a data source or a data sink. + /// If the option `deleteObjectsUniqueInSink` is `true`, object conditions + /// based on objects' `lastModificationTime` are ignored and do not exclude + /// objects in a data source or a data sink. #[serde(rename="transferOptions")] pub transfer_options: Option, - /// Only objects that satisfy these object conditions are included in the set of data source and data sink objects. Object conditions based on objects' `lastModificationTime` do not exclude objects in a data sink. + /// Only objects that satisfy these object conditions are included in the set + /// of data source and data sink objects. Object conditions based on + /// objects' `lastModificationTime` do not exclude objects in a data sink. #[serde(rename="objectConditions")] pub object_conditions: Option, /// A Google Cloud Storage data source. @@ -385,31 +398,19 @@ pub struct TransferSpec { impl Part for TransferSpec {} -/// Request passed to PauseTransferOperation. -/// -/// # 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*). -/// -/// * [pause transfer operations](struct.TransferOperationPauseCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct PauseTransferOperationRequest { _never_set: Option } - -impl RequestValue for PauseTransferOperationRequest {} - - -/// AWS access key (see [AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)). +/// AWS access key (see +/// [AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)). /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AwsAccessKey { - /// AWS secret access key. This field is not returned in RPC responses. Required. + /// AWS secret access key. This field is not returned in RPC responses. + /// Required. #[serde(rename="secretAccessKey")] pub secret_access_key: Option, - /// AWS access key ID. Required. + /// AWS access key ID. + /// Required. #[serde(rename="accessKeyId")] pub access_key_id: Option, } @@ -423,16 +424,58 @@ impl Part for AwsAccessKey {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ObjectConditions { - /// `maxTimeElapsedSinceLastModification` is the complement to `minTimeElapsedSinceLastModification`. + /// `maxTimeElapsedSinceLastModification` is the complement to + /// `minTimeElapsedSinceLastModification`. #[serde(rename="maxTimeElapsedSinceLastModification")] pub max_time_elapsed_since_last_modification: Option, - /// If `includePrefixes` is specified, objects that satisfy the object conditions must have names that start with one of the `includePrefixes` and that do not start with any of the `excludePrefixes`. If `includePrefixes` is not specified, all objects except those that have names starting with one of the `excludePrefixes` must satisfy the object conditions. Requirements: * Each include-prefix and exclude-prefix can contain any sequence of Unicode characters, of max length 1024 bytes when UTF8-encoded, and must not contain Carriage Return or Line Feed characters. Wildcard matching and regular expression matching are not supported. * None of the include-prefix or the exclude-prefix values can be empty, if specified. * Each include-prefix must include a distinct portion of the object namespace, i.e., no include-prefix may be a prefix of another include-prefix. * Each exclude-prefix must exclude a distinct portion of the object namespace, i.e., no exclude-prefix may be a prefix of another exclude-prefix. * If `includePrefixes` is specified, then each exclude-prefix must start with the value of a path explicitly included by `includePrefixes`. The max size of `includePrefixes` is 20. + /// If `includePrefixes` is specified, objects that satisfy the object + /// conditions must have names that start with one of the `includePrefixes` + /// and that do not start with any of the `excludePrefixes`. If `includePrefixes` + /// is not specified, all objects except those that have names starting with + /// one of the `excludePrefixes` must satisfy the object conditions. + /// + /// Requirements: + /// + /// * Each include-prefix and exclude-prefix can contain any sequence of + /// Unicode characters, of max length 1024 bytes when UTF8-encoded, and + /// must not contain Carriage Return or Line Feed characters. Wildcard + /// matching and regular expression matching are not supported. + /// + /// * Each include-prefix and exclude-prefix must omit the leading slash. + /// For example, to include the `requests.gz` object in a transfer from + /// `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the include + /// prefix as `logs/y=2015/requests.gz`. + /// + /// * None of the include-prefix or the exclude-prefix values can be empty, + /// if specified. + /// + /// * Each include-prefix must include a distinct portion of the object + /// namespace, i.e., no include-prefix may be a prefix of another + /// include-prefix. + /// + /// * Each exclude-prefix must exclude a distinct portion of the object + /// namespace, i.e., no exclude-prefix may be a prefix of another + /// exclude-prefix. + /// + /// * If `includePrefixes` is specified, then each exclude-prefix must start + /// with the value of a path explicitly included by `includePrefixes`. + /// + /// The max size of `includePrefixes` is 1000. #[serde(rename="includePrefixes")] pub include_prefixes: Option>, - /// `excludePrefixes` must follow the requirements described for `includePrefixes`. The max size of `excludePrefixes` is 20. + /// `excludePrefixes` must follow the requirements described for + /// `includePrefixes`. + /// + /// The max size of `excludePrefixes` is 1000. #[serde(rename="excludePrefixes")] pub exclude_prefixes: Option>, - /// If unspecified, `minTimeElapsedSinceLastModification` takes a zero value and `maxTimeElapsedSinceLastModification` takes the maximum possible value of Duration. Objects that satisfy the object conditions must either have a `lastModificationTime` greater or equal to `NOW` - `maxTimeElapsedSinceLastModification` and less than `NOW` - `minTimeElapsedSinceLastModification`, or not have a `lastModificationTime`. + /// If unspecified, `minTimeElapsedSinceLastModification` takes a zero value + /// and `maxTimeElapsedSinceLastModification` takes the maximum possible + /// value of Duration. Objects that satisfy the object conditions + /// must either have a `lastModificationTime` greater or equal to + /// `NOW` - `maxTimeElapsedSinceLastModification` and less than + /// `NOW` - `minTimeElapsedSinceLastModification`, or not have a + /// `lastModificationTime`. #[serde(rename="minTimeElapsedSinceLastModification")] pub min_time_elapsed_since_last_modification: Option, } @@ -446,10 +489,13 @@ impl Part for ObjectConditions {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TransferCounters { - /// Bytes in the data source that are not transferred because they already exist in the data sink. + /// Bytes in the data source that are not transferred because they already + /// exist in the data sink. #[serde(rename="bytesFromSourceSkippedBySync")] pub bytes_from_source_skipped_by_sync: Option, - /// Objects found in the data source that are scheduled to be transferred, which will be copied, excluded based on conditions, or skipped due to failures. + /// Objects found in the data source that are scheduled to be transferred, + /// which will be copied, excluded based on conditions, or skipped due to + /// failures. #[serde(rename="objectsFoundFromSource")] pub objects_found_from_source: Option, /// Bytes that failed to be deleted from the data sink. @@ -461,13 +507,16 @@ pub struct TransferCounters { /// Objects found only in the data sink that are scheduled to be deleted. #[serde(rename="objectsFoundOnlyFromSink")] pub objects_found_only_from_sink: Option, - /// Objects in the data source that are not transferred because they already exist in the data sink. + /// Objects in the data source that are not transferred because they already + /// exist in the data sink. #[serde(rename="objectsFromSourceSkippedBySync")] pub objects_from_source_skipped_by_sync: Option, /// Bytes that are copied to the data sink. #[serde(rename="bytesCopiedToSink")] pub bytes_copied_to_sink: Option, - /// Bytes found in the data source that are scheduled to be transferred, which will be copied, excluded based on conditions, or skipped due to failures. + /// Bytes found in the data source that are scheduled to be transferred, + /// which will be copied, excluded based on conditions, or skipped due to + /// failures. #[serde(rename="bytesFoundFromSource")] pub bytes_found_from_source: Option, /// Objects that are deleted from the data source. @@ -515,7 +564,8 @@ impl Part for TransferCounters {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TransferOperation { - /// Transfer specification. Required. + /// Transfer specification. + /// Required. #[serde(rename="transferSpec")] pub transfer_spec: Option, /// Status of the transfer operation. @@ -525,7 +575,8 @@ pub struct TransferOperation { pub transfer_job_name: Option, /// A globally unique ID assigned by the system. pub name: Option, - /// The ID of the Google Developers Console project that owns the operation. Required. + /// The ID of the Google Cloud Platform Console project that owns the operation. + /// Required. #[serde(rename="projectId")] pub project_id: Option, /// Summarizes errors encountered with sample error log entries. @@ -544,16 +595,22 @@ pub struct TransferOperation { impl Resource for TransferOperation {} -/// An AwsS3Data can be a data source, but not a data sink. In an AwsS3Data, an object's name is the S3 object's key name. +/// An AwsS3Data can be a data source, but not a data sink. +/// In an AwsS3Data, an object's name is the S3 object's key name. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AwsS3Data { - /// AWS access key used to sign the API requests to the AWS S3 bucket. Permissions on the bucket must be granted to the access ID of the AWS access key. Required. + /// AWS access key used to sign the API requests to the AWS S3 bucket. + /// Permissions on the bucket must be granted to the access ID of the + /// AWS access key. + /// Required. #[serde(rename="awsAccessKey")] pub aws_access_key: Option, - /// S3 Bucket name (see [Creating a bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). Required. + /// S3 Bucket name (see + /// [Creating a bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). + /// Required. #[serde(rename="bucketName")] pub bucket_name: Option, } @@ -567,7 +624,9 @@ impl Part for AwsS3Data {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ErrorLogEntry { - /// A URL that refers to the target (a data source, a data sink, or an object) with which the error is associated. Required. + /// A URL that refers to the target (a data source, a data sink, + /// or an object) with which the error is associated. + /// Required. pub url: Option, /// A list of messages that carry the error details. #[serde(rename="errorDetails")] @@ -577,13 +636,17 @@ pub struct ErrorLogEntry { impl Part for ErrorLogEntry {} -/// In a GcsData, an object's name is the Google Cloud Storage object's name and its `lastModificationTime` refers to the object's updated time, which changes when the content or the metadata of the object is updated. +/// In a GcsData, an object's name is the Google Cloud Storage object's name and +/// its `lastModificationTime` refers to the object's updated time, which changes +/// when the content or the metadata of the object is updated. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GcsData { - /// Google Cloud Storage bucket name (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Required. + /// Google Cloud Storage bucket name (see + /// [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + /// Required. #[serde(rename="bucketName")] pub bucket_name: Option, } @@ -591,13 +654,56 @@ pub struct GcsData { impl Part for GcsData {} -/// An HttpData specifies a list of objects on the web to be transferred over HTTP. The information of the objects to be transferred is contained in a file referenced by a URL. The first line in the file must be "TsvHttpData-1.0", which specifies the format of the file. Subsequent lines specify the information of the list of objects, one object per list entry. Each entry has the following tab-delimited fields: * HTTP URL * Length * MD5 - This field is a base64-encoded MD5 hash of the object An HTTP URL that points to the object to be transferred. It must be a valid URL with URL scheme HTTP or HTTPS. When an object with URL `http(s)://hostname:port/` is transferred to the data sink, the name of the object at the data sink is `/`. Length and MD5 provide the size and the base64-encoded MD5 hash of the object. If Length does not match the actual length of the object fetched, the object will not be transferred. If MD5 does not match the MD5 computed from the transferred bytes, the object transfer will fail. `lastModificationTime` is not available in HttpData objects. The objects that the URL list points to must allow public access. Storage Transfer Service obeys `robots.txt` rules and requires the HTTP server to support Range requests and to return a Content-Length header in each response. +/// An HttpData specifies a list of objects on the web to be transferred over +/// HTTP. The information of the objects to be transferred is contained in a +/// file referenced by a URL. The first line in the file must be +/// "TsvHttpData-1.0", which specifies the format of the file. Subsequent lines +/// specify the information of the list of objects, one object per list entry. +/// Each entry has the following tab-delimited fields: +/// +/// * HTTP URL - The location of the object. +/// +/// * Length - The size of the object in bytes. +/// +/// * MD5 - The base64-encoded MD5 hash of the object. +/// +/// For an example of a valid TSV file, see +/// [Transferring data from URLs](https://cloud.google.com/storage/transfer/#urls) +/// +/// When transferring data based on a URL list, keep the following in mind: +/// +/// * When an object located at `http(s)://hostname:port/` is transferred +/// to a data sink, the name of the object at the data sink is +/// `/`. +/// +/// * If the specified size of an object does not match the actual size of the +/// object fetched, the object will not be transferred. +/// +/// * If the specified MD5 does not match the MD5 computed from the transferred +/// bytes, the object transfer will fail. For more information, see +/// [Generating MD5 hashes](https://cloud.google.com/storage/transfer/#md5) +/// +/// * Ensure that each URL you specify is publicly accessible. For +/// example, in Google Cloud Storage you can +/// [share an object publicly] +/// (https://cloud.google.com/storage/docs/cloud-console#_sharingdata) and get +/// a link to it. +/// +/// * Storage Transfer Service obeys `robots.txt` rules and requires the source +/// HTTP server to support `Range` requests and to return a `Content-Length` +/// header in each response. +/// +/// * [ObjectConditions](#ObjectConditions) have no effect when filtering objects +/// to transfer. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HttpData { - /// The URL that points to the file that stores the object list entries. This file must allow public access. Currently, only URLs with HTTP and HTTPS schemes are supported. Required. + /// The URL that points to the file that stores the object list entries. + /// This file must allow public access. Currently, only URLs with HTTP and + /// HTTPS schemes are supported. + /// Required. #[serde(rename="listUrl")] pub list_url: Option, } @@ -605,26 +711,38 @@ pub struct HttpData { impl Part for HttpData {} -/// Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may chose to allow leap seconds. Related types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`. +/// Represents a time of day. The date and time zone are either not significant +/// or are specified elsewhere. An API may choose to allow leap seconds. Related +/// types are google.type.Date and `google.protobuf.Timestamp`. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TimeOfDay { - /// Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. + /// Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + /// to allow the value "24:00:00" for scenarios like business closing time. pub hours: Option, - /// Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. - pub seconds: Option, - /// Minutes of hour of day. Must be from 0 to 59. - pub minutes: Option, /// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. pub nanos: Option, + /// Minutes of hour of day. Must be from 0 to 59. + pub minutes: Option, + /// Seconds of minutes of the time. Must normally be from 0 to 59. An API may + /// allow the value 60 if it allows leap-seconds. + pub seconds: Option, } impl Part for TimeOfDay {} -/// 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); } The JSON representation for `Empty` is empty JSON object `{}`. +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. /// /// # Activities /// @@ -642,17 +760,71 @@ pub struct Empty { _never_set: Option } impl ResponseResult for Empty {} -/// The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. +/// The `Status` type defines a logical error model that is suitable for different +/// programming environments, including REST APIs and RPC APIs. It is used by +/// [gRPC](https://github.com/grpc). The error model is designed to be: +/// +/// - Simple to use and understand for most users +/// - Flexible enough to meet unexpected needs +/// +/// # Overview +/// +/// The `Status` message contains three pieces of data: error code, error message, +/// and error details. The error code should be an enum value of +/// google.rpc.Code, but it may accept additional error codes if needed. The +/// error message should be a developer-facing English message that helps +/// developers *understand* and *resolve* the error. If a localized user-facing +/// error message is needed, put the localized message in the error details or +/// localize it in the client. The optional error details may contain arbitrary +/// information about the error. There is a predefined set of error detail types +/// in the package `google.rpc` that can be used for common error conditions. +/// +/// # Language mapping +/// +/// The `Status` message is the logical representation of the error model, but it +/// is not necessarily the actual wire format. When the `Status` message is +/// exposed in different client libraries and different wire protocols, it can be +/// mapped differently. For example, it will likely be mapped to some exceptions +/// in Java, but more likely mapped to some error codes in C. +/// +/// # Other uses +/// +/// The error model and the `Status` message can be used in a variety of +/// environments, either with or without APIs, to provide a +/// consistent developer experience across different environments. +/// +/// Example uses of this error model include: +/// +/// - Partial errors. If a service needs to return partial errors to the client, +/// it may embed the `Status` in the normal response to indicate the partial +/// errors. +/// +/// - Workflow errors. A typical workflow has multiple steps. Each step may +/// have a `Status` message for error reporting. +/// +/// - Batch operations. If a client uses batch request and batch response, the +/// `Status` message should be used directly inside batch response, one for +/// each error sub-response. +/// +/// - Asynchronous operations. If an API call embeds asynchronous operation +/// results in its response, the status of those operations should be +/// represented directly using the `Status` message. +/// +/// - Logging. If some API errors are stored in logs, the message `Status` could +/// be used directly after any stripping needed for security/privacy reasons. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Status { - /// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + /// A developer-facing error message, which should be in English. Any + /// user-facing error message should be localized and sent in the + /// google.rpc.Status.details field, or localized by the client. pub message: Option, - /// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + /// The status code, which should be an enum value of google.rpc.Code. pub code: Option, - /// A list of messages that carry the error details. There will be a common set of message types for APIs to use. + /// A list of messages that carry the error details. There will be a + /// common set of message types for APIs to use. pub details: Option>>, } @@ -666,7 +838,6 @@ impl Part for Status {} /// 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*). /// -/// * [get google service account](struct.MethodGetGoogleServiceAccountCall.html) (response) /// * [get google service accounts](struct.GoogleServiceAccountGetCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] @@ -680,7 +851,7 @@ impl Resource for GoogleServiceAccount {} impl ResponseResult for GoogleServiceAccount {} -/// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +/// The response message for Operations.ListOperations. /// /// # Activities /// @@ -707,13 +878,24 @@ impl ResponseResult for ListOperationsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Schedule { - /// The first day the recurring transfer is scheduled to run. Required. - #[serde(rename="scheduleStartDate")] - pub schedule_start_date: Option, - /// The time in UTC at which the transfer will be scheduled to start in a day. Transfers may start later than this time. If not specified, transfers are scheduled to start at midnight UTC. + /// The time in UTC at which the transfer will be scheduled to start in a day. + /// Transfers may start later than this time. If not specified, recurring and + /// one-time transfers that are scheduled to run today will run immediately; + /// recurring transfers that are scheduled to run on a future date will start + /// at approximately midnight UTC on that date. Note that when configuring a + /// transfer with the Cloud Platform Console, the transfer's start time in a + /// day is specified in your local timezone. #[serde(rename="startTimeOfDay")] pub start_time_of_day: Option, - /// The last day the recurring transfer will be run. If `scheduleEndDate` is the same as `scheduleStartDate`, the transfer will be executed only once. + /// The first day the recurring transfer is scheduled to run. If + /// `scheduleStartDate` is in the past, the transfer will run for the first + /// time on the following day. + /// Required. + #[serde(rename="scheduleStartDate")] + pub schedule_start_date: Option, + /// The last day the recurring transfer will be run. If `scheduleEndDate` + /// is the same as `scheduleStartDate`, the transfer will be executed only + /// once. #[serde(rename="scheduleEndDate")] pub schedule_end_date: Option, } @@ -721,7 +903,8 @@ pub struct Schedule { impl Part for Schedule {} -/// A summary of errors by error code, plus a count and sample error log entries. +/// A summary of errors by error code, plus a count and sample error log +/// entries. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -733,7 +916,8 @@ pub struct ErrorSummary { /// Error samples. #[serde(rename="errorLogEntries")] pub error_log_entries: Option>, - /// Count of this type of error. Required. + /// Count of this type of error. + /// Required. #[serde(rename="errorCount")] pub error_count: Option, } @@ -767,13 +951,20 @@ impl RequestValue for ResumeTransferOperationRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UpdateTransferJobRequest { - /// The ID of the Google Developers Console project that owns the job. Required. + /// The ID of the Google Cloud Platform Console project that owns the job. + /// Required. #[serde(rename="projectId")] pub project_id: Option, - /// The field mask of the fields in `transferJob` that are to be updated in this request. Fields in `transferJob` that can be updated are: `description`, `transferSpec`, and `status`. To update the `transferSpec` of the job, a complete transfer specification has to be provided. An incomplete specification which misses any required fields will be rejected with the error `INVALID_ARGUMENT`. + /// The field mask of the fields in `transferJob` that are to be updated in + /// this request. Fields in `transferJob` that can be updated are: + /// `description`, `transferSpec`, and `status`. To update the `transferSpec` + /// of the job, a complete transfer specification has to be provided. An + /// incomplete specification which misses any required fields will be rejected + /// with the error `INVALID_ARGUMENT`. #[serde(rename="updateTransferJobFieldMask")] pub update_transfer_job_field_mask: Option, - /// The job to update. Required. + /// The job to update. + /// Required. #[serde(rename="transferJob")] pub transfer_job: Option, } @@ -803,7 +994,8 @@ pub struct ListTransferJobsResponse { impl ResponseResult for ListTransferJobsResponse {} -/// TransferOptions uses three boolean parameters to define the actions to be performed on objects in a transfer. +/// TransferOptions uses three boolean parameters to define the actions +/// to be performed on objects in a transfer. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -812,7 +1004,8 @@ pub struct TransferOptions { /// Whether overwriting objects that already exist in the sink is allowed. #[serde(rename="overwriteObjectsAlreadyExistingInSink")] pub overwrite_objects_already_existing_in_sink: Option, - /// Whether objects should be deleted from the source after they are transferred to the sink. + /// Whether objects should be deleted from the source after they are + /// transferred to the sink. #[serde(rename="deleteObjectsFromSourceAfterTransfer")] pub delete_objects_from_source_after_transfer: Option, /// Whether objects that exist only in the sink should be deleted. @@ -823,7 +1016,8 @@ pub struct TransferOptions { impl Part for TransferOptions {} -/// This resource represents the configuration of a transfer job that runs periodically. +/// This resource represents the configuration of a transfer job that runs +/// periodically. /// /// # Activities /// @@ -837,19 +1031,26 @@ impl Part for TransferOptions {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TransferJob { - /// Transfer specification. Required. + /// Transfer specification. + /// Required. #[serde(rename="transferSpec")] pub transfer_spec: Option, - /// Status of the job. This value MUST be specified for `CreateTransferJobRequests`. NOTE: The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from `ENABLED` to `DISABLED`, and an operation spawned by the transfer is running, the status change would not affect the current operation. + /// Status of the job. This value MUST be specified for + /// `CreateTransferJobRequests`. + /// + /// NOTE: The effect of the new job status takes place during a subsequent job + /// run. For example, if you change the job status from `ENABLED` to + /// `DISABLED`, and an operation spawned by the transfer is running, the status + /// change would not affect the current operation. pub status: Option, /// This field cannot be changed by user requests. #[serde(rename="deletionTime")] pub deletion_time: Option, - /// A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded. - pub description: Option, - /// Schedule specification. Required. + /// Schedule specification. + /// Required. pub schedule: Option, - /// The ID of the Google Developers Console project that owns the job. Required. + /// The ID of the Google Cloud Platform Console project that owns the job. + /// Required. #[serde(rename="projectId")] pub project_id: Option, /// This field cannot be changed by user requests. @@ -858,8 +1059,14 @@ pub struct TransferJob { /// This field cannot be changed by user requests. #[serde(rename="creationTime")] pub creation_time: Option, - /// A globally unique name assigned by Storage Transfer Service when the job is created. This field should be left empty in requests to create a new transfer job; otherwise, the requests result in an `INVALID_ARGUMENT` error. + /// A globally unique name assigned by Storage Transfer Service when the + /// job is created. This field should be left empty in requests to create a new + /// transfer job; otherwise, the requests result in an `INVALID_ARGUMENT` + /// error. pub name: Option, + /// A description provided by the user for the job. Its max length is 1024 + /// bytes when Unicode-encoded. + pub description: Option, } impl RequestValue for TransferJob {} @@ -867,24 +1074,33 @@ impl Resource for TransferJob {} impl ResponseResult for TransferJob {} -/// Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`. +/// Represents a whole calendar date, e.g. date of birth. The time of day and +/// time zone are either specified elsewhere or are not significant. The date +/// is relative to the Proleptic Gregorian Calendar. The day may be 0 to +/// represent a year and month where the day is not significant, e.g. credit card +/// expiration date. The year may be 0 to represent a month and day independent +/// of year, e.g. anniversary date. Related types are google.type.TimeOfDay +/// and `google.protobuf.Timestamp`. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Date { - /// Year of date. Must be from 1 to 9,999, or 0 if specifying a date without a year. + /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without + /// a year. pub year: Option, - /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/month where the day is not sigificant. + /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + /// if specifying a year/month where the day is not significant. pub day: Option, - /// Month of year of date. Must be from 1 to 12. + /// Month of year. Must be from 1 to 12. pub month: Option, } impl Part for Date {} -/// This resource represents a long-running operation that is the result of a network API call. +/// This resource represents a long-running operation that is the result of a +/// network API call. /// /// # Activities /// @@ -895,16 +1111,25 @@ impl Part for Date {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { + /// The error result of the operation in case of failure or cancellation. + pub error: Option, + /// If the value is `false`, it means the operation is still in progress. + /// If true, the operation is completed, and either `error` or `response` is + /// available. + pub done: Option, + /// The normal response of the operation in case of success. If the original + /// method returns no data on success, such as `Delete`, the response is + /// `google.protobuf.Empty`. If the original method is standard + /// `Get`/`Create`/`Update`, the response should be the resource. For other + /// methods, the response should have the type `XxxResponse`, where `Xxx` + /// is the original method name. For example, if the original method name + /// is `TakeSnapshot()`, the inferred response type is + /// `TakeSnapshotResponse`. + pub response: Option>, + /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `transferOperations/some/unique/name`. + pub name: Option, /// Represents the transfer operation object. pub metadata: Option>, - /// If the value is `false`, it means the operation is still in progress. If true, the operation is completed and the `result` is available. - pub done: Option, - /// The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. - pub response: Option>, - /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping above, the `name` should have the format of `operations/some/unique/name`. - pub name: Option, - /// The error result of the operation in case of failure. - pub error: Option, } impl ResponseResult for Operation {} @@ -960,7 +1185,8 @@ impl<'a, C, A> TransferOperationMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `name` - The name of the transfer operation. Required. + /// * `name` - The name of the transfer operation. + /// Required. pub fn pause(&self, request: PauseTransferOperationRequest, name: &str) -> TransferOperationPauseCall<'a, C, A> { TransferOperationPauseCall { hub: self.hub, @@ -979,7 +1205,8 @@ impl<'a, C, A> TransferOperationMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `name` - The name of the transfer operation. Required. + /// * `name` - The name of the transfer operation. + /// Required. pub fn resume(&self, request: ResumeTransferOperationRequest, name: &str) -> TransferOperationResumeCall<'a, C, A> { TransferOperationResumeCall { hub: self.hub, @@ -991,23 +1218,6 @@ impl<'a, C, A> TransferOperationMethods<'a, C, A> { } } - /// Create a builder to help you perform the following task: - /// - /// Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. - /// - /// # Arguments - /// - /// * `name` - The name of the operation resource. - pub fn get(&self, name: &str) -> TransferOperationGetCall<'a, C, A> { - TransferOperationGetCall { - hub: self.hub, - _name: name.to_string(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } - /// Create a builder to help you perform the following task: /// /// This method is not supported and the server returns `UNIMPLEMENTED`. @@ -1027,7 +1237,30 @@ impl<'a, C, A> TransferOperationMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. + /// Gets the latest state of a long-running operation. Clients can use this + /// method to poll the operation result at intervals as recommended by the API + /// service. + /// + /// # Arguments + /// + /// * `name` - The name of the operation resource. + pub fn get(&self, name: &str) -> TransferOperationGetCall<'a, C, A> { + TransferOperationGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists operations that match the specified filter in the request. If the + /// server doesn't support this method, it returns `UNIMPLEMENTED`. + /// + /// NOTE: the `name` binding below allows API services to override the binding + /// to use different resource name schemes, such as `users/*/operations`. /// /// # Arguments /// @@ -1105,11 +1338,20 @@ impl<'a, C, A> GoogleServiceAccountMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Developers Console project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service. + /// Returns the Google service account that is used by Storage Transfer + /// Service to access buckets in the project where transfers + /// run or in other projects. Each Google service account is associated + /// with one Google Cloud Platform Console project. Users + /// should add this service account to the Google Cloud Storage bucket + /// ACLs to grant access to Storage Transfer Service. This service + /// account is created and owned by Storage Transfer Service and can + /// only be used by Storage Transfer Service. /// /// # Arguments /// - /// * `projectId` - The ID of the Google Developers Console project that the Google service account is associated with. Required. + /// * `projectId` - The ID of the Google Cloud Platform Console project that the Google service + /// account is associated with. + /// Required. pub fn get(&self, project_id: &str) -> GoogleServiceAccountGetCall<'a, C, A> { GoogleServiceAccountGetCall { hub: self.hub, @@ -1178,12 +1420,15 @@ impl<'a, C, A> TransferJobMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. Updating the scheduling of a job is not allowed. + /// Updates a transfer job. Updating a job's transfer spec does not affect + /// transfer operations that are running already. Updating the scheduling + /// of a job is not allowed. /// /// # Arguments /// /// * `request` - No description provided. - /// * `jobName` - The name of job to update. Required. + /// * `jobName` - The name of job to update. + /// Required. pub fn patch(&self, request: UpdateTransferJobRequest, job_name: &str) -> TransferJobPatchCall<'a, C, A> { TransferJobPatchCall { hub: self.hub, @@ -1195,6 +1440,25 @@ impl<'a, C, A> TransferJobMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Gets a transfer job. + /// + /// # Arguments + /// + /// * `jobName` - The job to get. + /// Required. + pub fn get(&self, job_name: &str) -> TransferJobGetCall<'a, C, A> { + TransferJobGetCall { + hub: self.hub, + _job_name: job_name.to_string(), + _project_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Creates a transfer job that runs periodically. @@ -1211,78 +1475,6 @@ impl<'a, C, A> TransferJobMethods<'a, C, A> { _additional_params: Default::default(), } } - - /// Create a builder to help you perform the following task: - /// - /// Gets a transfer job. - /// - /// # Arguments - /// - /// * `jobName` - The job to get. Required. - pub fn get(&self, job_name: &str) -> TransferJobGetCall<'a, C, A> { - TransferJobGetCall { - hub: self.hub, - _job_name: job_name.to_string(), - _project_id: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } -} - - - -/// A builder providing access to all free methods, which are not associated with a particular resource. -/// It is not used directly, but through the `Storagetransfer` hub. -/// -/// # Example -/// -/// Instantiate a resource builder -/// -/// ```test_harness,no_run -/// extern crate hyper; -/// extern crate yup_oauth2 as oauth2; -/// extern crate google_storagetransfer1 as storagetransfer1; -/// -/// # #[test] fn egal() { -/// use std::default::Default; -/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use storagetransfer1::Storagetransfer; -/// -/// let secret: ApplicationSecret = Default::default(); -/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// hyper::Client::new(), -/// ::default(), None); -/// let mut hub = Storagetransfer::new(hyper::Client::new(), auth); -/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `get_google_service_account(...)` -/// // to build up your call. -/// let rb = hub.methods(); -/// # } -/// ``` -pub struct MethodMethods<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Storagetransfer, -} - -impl<'a, C, A> MethodsBuilder for MethodMethods<'a, C, A> {} - -impl<'a, C, A> MethodMethods<'a, C, A> { - - /// Create a builder to help you perform the following task: - /// - /// Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Developers Console project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service. - pub fn get_google_service_account(&self) -> MethodGetGoogleServiceAccountCall<'a, C, A> { - MethodGetGoogleServiceAccountCall { - hub: self.hub, - _project_id: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } } @@ -1501,7 +1693,8 @@ impl<'a, C, A> TransferOperationPauseCall<'a, C, A> where C: BorrowMut TransferOperationPauseCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> TransferOperationPauseCall<'a, C, A> @@ -1777,7 +1970,8 @@ impl<'a, C, A> TransferOperationResumeCall<'a, C, A> where C: BorrowMut TransferOperationResumeCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> TransferOperationResumeCall<'a, C, A> @@ -1845,251 +2039,6 @@ impl<'a, C, A> TransferOperationResumeCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Storagetransfer::new(hyper::Client::new(), 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.transfer_operations().get("name") -/// .doit(); -/// # } -/// ``` -pub struct TransferOperationGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Storagetransfer, - _name: String, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for TransferOperationGetCall<'a, C, A> {} - -impl<'a, C, A> TransferOperationGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { - use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "storagetransfer.transferOperations.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - params.push(("name", self._name.to_string())); - for &field in ["alt", "name"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://storagetransfer.googleapis.com/v1/{+name}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{+name}", "name")].iter() { - let mut replace_with = String::new(); - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = value.to_string(); - break; - } - } - if find_this.as_bytes()[1] == '+' as u8 { - replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); - } - url = url.replace(find_this, &replace_with); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["name"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The name of the operation resource. - /// - /// 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) -> TransferOperationGetCall<'a, C, A> { - 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. - /// - /// 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 Delegate) -> TransferOperationGetCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> TransferOperationGetCall<'a, C, A> - 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 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: T) -> TransferOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// This method is not supported and the server returns `UNIMPLEMENTED`. /// /// A builder for the *delete* method supported by a *transferOperation* resource. @@ -2302,12 +2251,12 @@ impl<'a, C, A> TransferOperationDeleteCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> TransferOperationDeleteCall<'a, C, A> @@ -2335,7 +2284,258 @@ impl<'a, C, A> TransferOperationDeleteCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = Storagetransfer::new(hyper::Client::new(), 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.transfer_operations().get("name") +/// .doit(); +/// # } +/// ``` +pub struct TransferOperationGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storagetransfer, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TransferOperationGetCall<'a, C, A> {} + +impl<'a, C, A> TransferOperationGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storagetransfer.transferOperations.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://storagetransfer.googleapis.com/v1/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The name of the operation resource. + /// + /// 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) -> TransferOperationGetCall<'a, C, A> { + 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. + /// + /// 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 Delegate) -> TransferOperationGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> TransferOperationGetCall<'a, C, A> + 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 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: T) -> TransferOperationGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists operations that match the specified filter in the request. If the +/// server doesn't support this method, it returns `UNIMPLEMENTED`. +/// +/// NOTE: the `name` binding below allows API services to override the binding +/// to use different resource name schemes, such as `users/*/operations`. /// /// A builder for the *list* method supported by a *transferOperation* resource. /// It is not used directly, but through a `TransferOperationMethods` instance. @@ -2537,21 +2737,21 @@ impl<'a, C, A> TransferOperationListCall<'a, C, A> where C: BorrowMut TransferOperationListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// The standard list page size. + /// The list page size. The max allowed value is 256. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> TransferOperationListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// The standard list filter. + /// A list of query parameters specified as JSON text in the form of {\"project_id\" : \"my_project_id\", \"job_names\" : [\"jobid1\", \"jobid2\",...], \"operation_names\" : [\"opid1\", \"opid2\",...], \"transfer_statuses\":[\"status1\", \"status2\",...]}. Since `job_names`, `operation_names`, and `transfer_statuses` support multiple values, they must be specified with array notation. `job_names`, `operation_names`, and `transfer_statuses` are optional. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TransferOperationListCall<'a, C, A> { @@ -2583,12 +2783,12 @@ impl<'a, C, A> TransferOperationListCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> TransferOperationListCall<'a, C, A> @@ -2828,12 +3028,12 @@ impl<'a, C, A> TransferOperationCancelCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> TransferOperationCancelCall<'a, C, A> @@ -2861,7 +3061,14 @@ impl<'a, C, A> TransferOperationCancelCall<'a, C, A> where C: BorrowMut GoogleServiceAccountGetCall<'a, C, A> where C: BorrowMut GoogleServiceAccountGetCall<'a, C, A> where C: BorrowMut(mut self, name: T, value: T) -> GoogleServiceAccountGetCall<'a, C, A> @@ -3281,7 +3490,14 @@ impl<'a, C, A> TransferJobListCall<'a, C, A> where C: BorrowMut, self._page_size = Some(new_value); self } - /// A list of query parameters specified as JSON text in the form of {"`project_id`":"my_project_id", "`job_names`":["jobid1","jobid2",...], "`job_statuses`":["status1","status2",...]}. Since `job_names` and `job_statuses` support multiple values, their values must be specified with array notation. `project_id` is required. `job_names` and `job_statuses` are optional. The valid values for `job_statuses` are case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`. + /// A list of query parameters specified as JSON text in the form of + /// {"project_id":"my_project_id", + /// "job_names":["jobid1","jobid2",...], + /// "job_statuses":["status1","status2",...]}. + /// Since `job_names` and `job_statuses` support multiple values, their values + /// must be specified with array notation. `project_id` is required. `job_names` + /// and `job_statuses` are optional. The valid values for `job_statuses` are + /// case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TransferJobListCall<'a, C, A> { @@ -3313,12 +3529,12 @@ impl<'a, C, A> TransferJobListCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> TransferJobListCall<'a, C, A> @@ -3346,7 +3562,9 @@ impl<'a, C, A> TransferJobListCall<'a, C, A> where C: BorrowMut, } -/// Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. Updating the scheduling of a job is not allowed. +/// Updates a transfer job. Updating a job's transfer spec does not affect +/// transfer operations that are running already. Updating the scheduling +/// of a job is not allowed. /// /// A builder for the *patch* method supported by a *transferJob* resource. /// It is not used directly, but through a `TransferJobMethods` instance. @@ -3554,7 +3772,8 @@ impl<'a, C, A> TransferJobPatchCall<'a, C, A> where C: BorrowMut, self._request = new_value; self } - /// The name of job to update. Required. + /// The name of job to update. + /// Required. /// /// Sets the *job name* path property to the given value. /// @@ -3589,12 +3808,12 @@ impl<'a, C, A> TransferJobPatchCall<'a, C, A> where C: BorrowMut, /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> TransferJobPatchCall<'a, C, A> @@ -3622,6 +3841,265 @@ impl<'a, C, A> TransferJobPatchCall<'a, C, A> where C: BorrowMut, } +/// Gets a transfer job. +/// +/// A builder for the *get* method supported by a *transferJob* resource. +/// It is not used directly, but through a `TransferJobMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_storagetransfer1 as storagetransfer1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use storagetransfer1::Storagetransfer; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Storagetransfer::new(hyper::Client::new(), 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.transfer_jobs().get("jobName") +/// .project_id("Lorem") +/// .doit(); +/// # } +/// ``` +pub struct TransferJobGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Storagetransfer, + _job_name: String, + _project_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for TransferJobGetCall<'a, C, A> {} + +impl<'a, C, A> TransferJobGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, TransferJob)> { + use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "storagetransfer.transferJobs.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("jobName", self._job_name.to_string())); + if let Some(value) = self._project_id { + params.push(("projectId", value.to_string())); + } + for &field in ["alt", "jobName", "projectId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://storagetransfer.googleapis.com/v1/{+jobName}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+jobName}", "jobName")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["jobName"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The job to get. + /// Required. + /// + /// Sets the *job 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 job_name(mut self, new_value: &str) -> TransferJobGetCall<'a, C, A> { + self._job_name = new_value.to_string(); + self + } + /// The ID of the Google Cloud Platform Console project that owns the job. + /// Required. + /// + /// Sets the *project id* query property to the given value. + pub fn project_id(mut self, new_value: &str) -> TransferJobGetCall<'a, C, A> { + self._project_id = 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. + /// + /// 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 Delegate) -> TransferJobGetCall<'a, C, A> { + 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 paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *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. + /// * *callback* (query-string) - JSONP + /// * *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. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> TransferJobGetCall<'a, C, A> + 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 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: T) -> TransferJobGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Creates a transfer job that runs periodically. /// /// A builder for the *create* method supported by a *transferJob* resource. @@ -3828,12 +4306,12 @@ impl<'a, C, A> TransferJobCreateCall<'a, C, A> where C: BorrowMut /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> TransferJobCreateCall<'a, C, A> @@ -3861,481 +4339,4 @@ impl<'a, C, A> TransferJobCreateCall<'a, C, A> where C: BorrowMut } -/// Gets a transfer job. -/// -/// A builder for the *get* method supported by a *transferJob* resource. -/// It is not used directly, but through a `TransferJobMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_storagetransfer1 as storagetransfer1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use storagetransfer1::Storagetransfer; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Storagetransfer::new(hyper::Client::new(), 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.transfer_jobs().get("jobName") -/// .project_id("Lorem") -/// .doit(); -/// # } -/// ``` -pub struct TransferJobGetCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Storagetransfer, - _job_name: String, - _project_id: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for TransferJobGetCall<'a, C, A> {} - -impl<'a, C, A> TransferJobGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, TransferJob)> { - use url::percent_encoding::{percent_encode, DEFAULT_ENCODE_SET}; - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "storagetransfer.transferJobs.get", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); - params.push(("jobName", self._job_name.to_string())); - if let Some(value) = self._project_id { - params.push(("projectId", value.to_string())); - } - for &field in ["alt", "jobName", "projectId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://storagetransfer.googleapis.com/v1/{+jobName}".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - for &(find_this, param_name) in [("{+jobName}", "jobName")].iter() { - let mut replace_with = String::new(); - for &(name, ref value) in params.iter() { - if name == param_name { - replace_with = value.to_string(); - break; - } - } - if find_this.as_bytes()[1] == '+' as u8 { - replace_with = percent_encode(replace_with.as_bytes(), DEFAULT_ENCODE_SET); - } - url = url.replace(find_this, &replace_with); - } - { - let mut indices_for_removal: Vec = Vec::with_capacity(1); - for param_name in ["jobName"].iter() { - if let Some(index) = params.iter().position(|t| &t.0 == param_name) { - indices_for_removal.push(index); - } - } - for &index in indices_for_removal.iter() { - params.remove(index); - } - } - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The job to get. Required. - /// - /// Sets the *job 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 job_name(mut self, new_value: &str) -> TransferJobGetCall<'a, C, A> { - self._job_name = new_value.to_string(); - self - } - /// The ID of the Google Developers Console project that owns the job. Required. - /// - /// Sets the *project id* query property to the given value. - pub fn project_id(mut self, new_value: &str) -> TransferJobGetCall<'a, C, A> { - self._project_id = 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. - /// - /// 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 Delegate) -> TransferJobGetCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> TransferJobGetCall<'a, C, A> - 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 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: T) -> TransferJobGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - -/// Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Developers Console project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service. -/// -/// A builder for the *getGoogleServiceAccount* method. -/// It is not used directly, but through a `MethodMethods` instance. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_storagetransfer1 as storagetransfer1; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use storagetransfer1::Storagetransfer; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = Storagetransfer::new(hyper::Client::new(), 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.methods().get_google_service_account() -/// .project_id("et") -/// .doit(); -/// # } -/// ``` -pub struct MethodGetGoogleServiceAccountCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a Storagetransfer, - _project_id: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for MethodGetGoogleServiceAccountCall<'a, C, A> {} - -impl<'a, C, A> MethodGetGoogleServiceAccountCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, GoogleServiceAccount)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "storagetransfer.getGoogleServiceAccount", - http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); - if let Some(value) = self._project_id { - params.push(("projectId", value.to_string())); - } - for &field in ["alt", "projectId"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://storagetransfer.googleapis.com/v1:getGoogleServiceAccount".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The ID of the Google Developers Console project that the Google service account is associated with. Required. - /// - /// Sets the *project id* query property to the given value. - pub fn project_id(mut self, new_value: &str) -> MethodGetGoogleServiceAccountCall<'a, C, A> { - self._project_id = 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. - /// - /// 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 Delegate) -> MethodGetGoogleServiceAccountCall<'a, C, A> { - 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 paramters - /// which have their own setter method. If done anyway, the request will fail. - /// - /// # Additional Parameters - /// - /// * *bearer_token* (query-string) - OAuth bearer token. - /// * *pp* (query-boolean) - Pretty-print response. - /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. - /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). - /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *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. - /// * *callback* (query-string) - JSONP - /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). - /// * *alt* (query-string) - Data format for response. - /// * *$.xgafv* (query-string) - V1 error format. - pub fn param(mut self, name: T, value: T) -> MethodGetGoogleServiceAccountCall<'a, C, A> - 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 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: T) -> MethodGetGoogleServiceAccountCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - diff --git a/gen/surveys2-cli/Cargo.toml b/gen/surveys2-cli/Cargo.toml index 331d70fd5b..4a314f4fa3 100644 --- a/gen/surveys2-cli/Cargo.toml +++ b/gen/surveys2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-surveys2-cli" -version = "1.0.4+20161103" +version = "1.0.4+20170407" authors = ["Sebastian Thiel "] description = "A complete library to interact with Surveys (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/surveys2-cli" @@ -23,7 +23,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -33,4 +33,4 @@ clap = "^2.0" [dependencies.google-surveys2] path = "../surveys2" -version = "1.0.4+20161103" +version = "1.0.4+20170407" diff --git a/gen/surveys2-cli/README.md b/gen/surveys2-cli/README.md index 50c6b52816..56bb93ef40 100644 --- a/gen/surveys2-cli/README.md +++ b/gen/surveys2-cli/README.md @@ -22,7 +22,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *Surveys* API at revision *20161103*. The CLI is at version *1.0.4*. +This documentation was generated from the *Surveys* API at revision *20170407*. The CLI is at version *1.0.4*. ```bash surveys2 [options] diff --git a/gen/surveys2-cli/mkdocs.yml b/gen/surveys2-cli/mkdocs.yml index 596cc95cd7..66b9c37221 100644 --- a/gen/surveys2-cli/mkdocs.yml +++ b/gen/surveys2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Surveys v1.0.4+20161103 +site_name: Surveys v1.0.4+20170407 site_url: http://byron.github.io/google-apis-rs/google-surveys2-cli site_description: A complete library to interact with Surveys (protocol v2) diff --git a/gen/surveys2-cli/src/main.rs b/gen/surveys2-cli/src/main.rs index 1913890bae..7152aaa151 100644 --- a/gen/surveys2-cli/src/main.rs +++ b/gen/surveys2-cli/src/main.rs @@ -1266,7 +1266,7 @@ fn main() { let mut app = App::new("surveys2") .author("Sebastian Thiel ") - .version("1.0.4+20161103") + .version("1.0.4+20170407") .about("Creates and conducts surveys, lists the surveys that an authenticated user owns, and retrieves survey results and information about specified surveys.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_surveys2_cli") .arg(Arg::with_name("url") diff --git a/gen/surveys2/Cargo.toml b/gen/surveys2/Cargo.toml index b555b375c1..6719c5a1db 100644 --- a/gen/surveys2/Cargo.toml +++ b/gen/surveys2/Cargo.toml @@ -4,11 +4,11 @@ [package] name = "google-surveys2" -version = "1.0.4+20161103" +version = "1.0.4+20170407" authors = ["Sebastian Thiel "] description = "A complete library to interact with Surveys (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/surveys2" -documentation = "https://docs.rs/google-surveys2/1.0.4+20161103" +documentation = "https://docs.rs/google-surveys2/1.0.4+20170407" license = "MIT" keywords = ["surveys", "google", "protocol", "web", "api"] diff --git a/gen/surveys2/README.md b/gen/surveys2/README.md index 09eb5d6e39..e3c8b55336 100644 --- a/gen/surveys2/README.md +++ b/gen/surveys2/README.md @@ -5,22 +5,22 @@ DO NOT EDIT ! --> The `google-surveys2` library allows access to all features of the *Google Surveys* service. -This documentation was generated from *Surveys* crate version *1.0.4+20161103*, where *20161103* is the exact revision of the *surveys:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *Surveys* crate version *1.0.4+20170407*, where *20170407* is the exact revision of the *surveys:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.Surveys.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.Surveys.html) ... * mobileapppanels - * [*get*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.MobileapppanelGetCall.html), [*list*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.MobileapppanelListCall.html) and [*update*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.MobileapppanelUpdateCall.html) + * [*get*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.MobileapppanelGetCall.html), [*list*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.MobileapppanelListCall.html) and [*update*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.MobileapppanelUpdateCall.html) * results - * [*get*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.ResultGetCall.html) -* [surveys](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.Survey.html) - * [*delete*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.SurveyDeleteCall.html), [*get*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.SurveyGetCall.html), [*insert*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.SurveyInsertCall.html), [*list*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.SurveyListCall.html), [*start*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.SurveyStartCall.html), [*stop*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.SurveyStopCall.html) and [*update*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.SurveyUpdateCall.html) + * [*get*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.ResultGetCall.html) +* [surveys](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.Survey.html) + * [*delete*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.SurveyDeleteCall.html), [*get*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.SurveyGetCall.html), [*insert*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.SurveyInsertCall.html), [*list*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.SurveyListCall.html), [*start*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.SurveyStartCall.html), [*stop*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.SurveyStopCall.html) and [*update*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.SurveyUpdateCall.html) Download supported by ... -* [*get results*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.ResultGetCall.html) +* [*get results*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.ResultGetCall.html) @@ -28,17 +28,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/struct.Surveys.html)** +* **[Hub](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/struct.Surveys.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.Part.html)** + * **[Parts](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -129,17 +129,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.Delegate.html), 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-surveys2/1.0.4+20161103/google_surveys2/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.ResponseResult.html), 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")`. @@ -149,29 +149,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.CallBuilder.html) 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-surveys2/1.0.4+20161103/google_surveys2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.RequestValue.html) and -[decodable](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.RequestValue.html) and +[decodable](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-surveys2/1.0.4+20161103/google_surveys2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.CallBuilder.html), 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-surveys2/1.0.4+20161103/google_surveys2/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-surveys2/1.0.4+20170407/google_surveys2/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/surveys2/src/lib.rs b/gen/surveys2/src/lib.rs index 4835901f12..10ac7242c2 100644 --- a/gen/surveys2/src/lib.rs +++ b/gen/surveys2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Surveys* crate version *1.0.4+20161103*, where *20161103* is the exact revision of the *surveys:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *Surveys* crate version *1.0.4+20170407*, where *20170407* is the exact revision of the *surveys:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/surveys2). //! # Features //! @@ -440,8 +440,6 @@ impl Part for FieldMask {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SurveysStartResponse { - /// Survey object containing the specification of the started Survey. - pub resource: Option, /// Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. #[serde(rename="requestId")] pub request_id: Option, @@ -820,8 +818,6 @@ impl ResponseResult for MobileAppPanel {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SurveysStopResponse { - /// Survey object containing the specification of the stopped Survey. - pub resource: Option, /// Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. #[serde(rename="requestId")] pub request_id: Option, diff --git a/gen/tagmanager1-cli/Cargo.toml b/gen/tagmanager1-cli/Cargo.toml index eea7411495..f68435fd4a 100644 --- a/gen/tagmanager1-cli/Cargo.toml +++ b/gen/tagmanager1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/taskqueue1_beta2-cli/Cargo.toml b/gen/taskqueue1_beta2-cli/Cargo.toml index f448505fe6..98223037cb 100644 --- a/gen/taskqueue1_beta2-cli/Cargo.toml +++ b/gen/taskqueue1_beta2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/tasks1-cli/Cargo.toml b/gen/tasks1-cli/Cargo.toml index 31df1ce2fd..c0dab621bd 100644 --- a/gen/tasks1-cli/Cargo.toml +++ b/gen/tasks1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/translate2-cli/Cargo.toml b/gen/translate2-cli/Cargo.toml index 1af4dd5df8..e81597f5ea 100644 --- a/gen/translate2-cli/Cargo.toml +++ b/gen/translate2-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/urlshortener1-cli/Cargo.toml b/gen/urlshortener1-cli/Cargo.toml index d1d85765fd..b28c692582 100644 --- a/gen/urlshortener1-cli/Cargo.toml +++ b/gen/urlshortener1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/webfonts1-cli/Cargo.toml b/gen/webfonts1-cli/Cargo.toml index 24ed479c19..f58689b1c2 100644 --- a/gen/webfonts1-cli/Cargo.toml +++ b/gen/webfonts1-cli/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" diff --git a/gen/webmasters3-cli/Cargo.toml b/gen/webmasters3-cli/Cargo.toml index 1b1bc073a0..2424c35d5b 100644 --- a/gen/webmasters3-cli/Cargo.toml +++ b/gen/webmasters3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-webmasters3-cli" -version = "1.0.4+20160317" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with webmasters (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/webmasters3-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-webmasters3] path = "../webmasters3" -version = "1.0.4+20160317" +version = "1.0.4+20170517" diff --git a/gen/webmasters3-cli/README.md b/gen/webmasters3-cli/README.md index 4c37e43d50..e1395847a0 100644 --- a/gen/webmasters3-cli/README.md +++ b/gen/webmasters3-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *webmasters* API at revision *20160317*. The CLI is at version *1.0.4*. +This documentation was generated from the *webmasters* API at revision *20170517*. The CLI is at version *1.0.4*. ```bash webmasters3 [options] diff --git a/gen/webmasters3-cli/mkdocs.yml b/gen/webmasters3-cli/mkdocs.yml index 1e543566ac..96472a1a0e 100644 --- a/gen/webmasters3-cli/mkdocs.yml +++ b/gen/webmasters3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: webmasters v1.0.4+20160317 +site_name: webmasters v1.0.4+20170517 site_url: http://byron.github.io/google-apis-rs/google-webmasters3-cli site_description: A complete library to interact with webmasters (protocol v3) diff --git a/gen/webmasters3-cli/src/main.rs b/gen/webmasters3-cli/src/main.rs index e16e5d2318..d979b5213f 100644 --- a/gen/webmasters3-cli/src/main.rs +++ b/gen/webmasters3-cli/src/main.rs @@ -1244,7 +1244,7 @@ fn main() { let mut app = App::new("webmasters3") .author("Sebastian Thiel ") - .version("1.0.4+20160317") + .version("1.0.4+20170517") .about("View Google Search Console data for your verified sites.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_webmasters3_cli") .arg(Arg::with_name("url") diff --git a/gen/webmasters3/Cargo.toml b/gen/webmasters3/Cargo.toml index cffb9c60b3..bcaef254e9 100644 --- a/gen/webmasters3/Cargo.toml +++ b/gen/webmasters3/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-webmasters3" -version = "1.0.4+20160317" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with webmasters (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/webmasters3" homepage = "https://developers.google.com/webmaster-tools/" -documentation = "https://docs.rs/google-webmasters3/1.0.4+20160317" +documentation = "https://docs.rs/google-webmasters3/1.0.4+20170517" license = "MIT" keywords = ["webmasters", "google", "protocol", "web", "api"] diff --git a/gen/webmasters3/README.md b/gen/webmasters3/README.md index b7d2456096..1be45532be 100644 --- a/gen/webmasters3/README.md +++ b/gen/webmasters3/README.md @@ -5,24 +5,24 @@ DO NOT EDIT ! --> The `google-webmasters3` library allows access to all features of the *Google webmasters* service. -This documentation was generated from *webmasters* crate version *1.0.4+20160317*, where *20160317* is the exact revision of the *webmasters:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *webmasters* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *webmasters:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *webmasters* *v3* API can be found at the [official documentation site](https://developers.google.com/webmaster-tools/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.Webmasters.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.Webmasters.html) ... * searchanalytics - * [*query*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.SearchanalyticQueryCall.html) + * [*query*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.SearchanalyticQueryCall.html) * sitemaps - * [*delete*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.SitemapDeleteCall.html), [*get*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.SitemapGetCall.html), [*list*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.SitemapListCall.html) and [*submit*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.SitemapSubmitCall.html) + * [*delete*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.SitemapDeleteCall.html), [*get*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.SitemapGetCall.html), [*list*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.SitemapListCall.html) and [*submit*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.SitemapSubmitCall.html) * sites - * [*add*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.SiteAddCall.html), [*delete*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.SiteDeleteCall.html), [*get*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.SiteGetCall.html) and [*list*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.SiteListCall.html) + * [*add*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.SiteAddCall.html), [*delete*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.SiteDeleteCall.html), [*get*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.SiteGetCall.html) and [*list*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.SiteListCall.html) * urlcrawlerrorscounts - * [*query*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.UrlcrawlerrorscountQueryCall.html) + * [*query*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.UrlcrawlerrorscountQueryCall.html) * urlcrawlerrorssamples - * [*get*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.UrlcrawlerrorssampleGetCall.html), [*list*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.UrlcrawlerrorssampleListCall.html) and [*mark as fixed*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.UrlcrawlerrorssampleMarkAsFixedCall.html) + * [*get*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.UrlcrawlerrorssampleGetCall.html), [*list*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.UrlcrawlerrorssampleListCall.html) and [*mark as fixed*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.UrlcrawlerrorssampleMarkAsFixedCall.html) @@ -31,17 +31,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/struct.Webmasters.html)** +* **[Hub](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/struct.Webmasters.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.Part.html)** + * **[Parts](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -123,17 +123,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.Delegate.html), 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-webmasters3/1.0.4+20160317/google_webmasters3/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.ResponseResult.html), 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")`. @@ -143,29 +143,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.CallBuilder.html) 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-webmasters3/1.0.4+20160317/google_webmasters3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.RequestValue.html) and -[decodable](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.RequestValue.html) and +[decodable](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-webmasters3/1.0.4+20160317/google_webmasters3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.CallBuilder.html), 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-webmasters3/1.0.4+20160317/google_webmasters3/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-webmasters3/1.0.4+20170517/google_webmasters3/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/webmasters3/src/lib.rs b/gen/webmasters3/src/lib.rs index 903033a7dd..941cd647ab 100644 --- a/gen/webmasters3/src/lib.rs +++ b/gen/webmasters3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *webmasters* crate version *1.0.4+20160317*, where *20160317* is the exact revision of the *webmasters:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *webmasters* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *webmasters:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *webmasters* *v3* API can be found at the //! [official documentation site](https://developers.google.com/webmaster-tools/). diff --git a/gen/youtube3-cli/Cargo.toml b/gen/youtube3-cli/Cargo.toml index eb09148048..9419d06769 100644 --- a/gen/youtube3-cli/Cargo.toml +++ b/gen/youtube3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-youtube3-cli" -version = "1.0.4+20161202" +version = "1.0.4+20170130" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtube3-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-youtube3] path = "../youtube3" -version = "1.0.4+20161202" +version = "1.0.4+20170130" diff --git a/gen/youtube3-cli/README.md b/gen/youtube3-cli/README.md index a8c874d91d..dba4821c98 100644 --- a/gen/youtube3-cli/README.md +++ b/gen/youtube3-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *YouTube* API at revision *20161202*. The CLI is at version *1.0.4*. +This documentation was generated from the *YouTube* API at revision *20170130*. The CLI is at version *1.0.4*. ```bash youtube3 [options] @@ -109,6 +109,8 @@ youtube3 [options] delete [-p ]... insert (-r )... [-p ]... [-o ] list [-p ]... [-o ] + super-chat-events + list [-p ]... [-o ] thumbnails set (-u (simple|resumable) -f [-m ]) [-p ]... [-o ] video-abuse-report-reasons diff --git a/gen/youtube3-cli/mkdocs.yml b/gen/youtube3-cli/mkdocs.yml index 4a7f56199a..fe8a2d78b4 100644 --- a/gen/youtube3-cli/mkdocs.yml +++ b/gen/youtube3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: YouTube v1.0.4+20161202 +site_name: YouTube v1.0.4+20170130 site_url: http://byron.github.io/google-apis-rs/google-youtube3-cli site_description: A complete library to interact with YouTube (protocol v3) @@ -68,6 +68,7 @@ pages: - ['subscriptions_delete.md', 'Subscriptions', 'Delete'] - ['subscriptions_insert.md', 'Subscriptions', 'Insert'] - ['subscriptions_list.md', 'Subscriptions', 'List'] +- ['super-chat-events_list.md', 'Super Chat Events', 'List'] - ['thumbnails_set.md', 'Thumbnails', 'Set'] - ['video-abuse-report-reasons_list.md', 'Video Abuse Report Reasons', 'List'] - ['video-categories_list.md', 'Video Categories', 'List'] diff --git a/gen/youtube3-cli/src/main.rs b/gen/youtube3-cli/src/main.rs index 8d8976657e..dbf5bbba39 100644 --- a/gen/youtube3-cli/src/main.rs +++ b/gen/youtube3-cli/src/main.rs @@ -1245,6 +1245,7 @@ impl<'n> Engine<'n> { "content-owner-details.content-owner" => Some(("contentOwnerDetails.contentOwner", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "content-owner-details.time-linked" => Some(("contentOwnerDetails.timeLinked", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "topic-details.topic-ids" => Some(("topicDetails.topicIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "topic-details.topic-categories" => Some(("topicDetails.topicCategories", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "content-details.related-playlists.watch-later" => Some(("contentDetails.relatedPlaylists.watchLater", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "content-details.related-playlists.watch-history" => Some(("contentDetails.relatedPlaylists.watchHistory", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "content-details.related-playlists.uploads" => Some(("contentDetails.relatedPlaylists.uploads", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1324,7 +1325,7 @@ impl<'n> Engine<'n> { "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["audit-details", "background-color", "background-image-url", "banner-external-url", "banner-image-url", "banner-mobile-extra-hd-image-url", "banner-mobile-hd-image-url", "banner-mobile-image-url", "banner-mobile-low-image-url", "banner-mobile-medium-hd-image-url", "banner-tablet-extra-hd-image-url", "banner-tablet-hd-image-url", "banner-tablet-image-url", "banner-tablet-low-image-url", "banner-tv-high-image-url", "banner-tv-image-url", "banner-tv-low-image-url", "banner-tv-medium-image-url", "branding-settings", "channel", "comment-count", "community-guidelines-good-standing", "content-details", "content-id-claims-good-standing", "content-owner", "content-owner-details", "copyright-strikes-good-standing", "corner-position", "country", "custom-url", "default", "default-language", "default-tab", "default-timing", "description", "duration-ms", "etag", "favorites", "featured-channels-title", "featured-channels-urls", "featured-playlist-id", "height", "hidden-subscriber-count", "high", "id", "image", "invideo-promotion", "is-linked", "keywords", "kind", "large-branded-banner-image-imap-script", "large-branded-banner-image-url", "likes", "localized", "long-uploads-status", "maxres", "medium", "moderate-comments", "offset-ms", "overall-good-standing", "position", "privacy-status", "profile-color", "published-at", "related-playlists", "show-browse-view", "show-related-channels", "small-branded-banner-image-imap-script", "small-branded-banner-image-url", "snippet", "standard", "statistics", "status", "subscriber-count", "text-color", "thumbnails", "time-linked", "title", "topic-details", "topic-ids", "tracking-analytics-account-id", "tracking-image-url", "type", "unsubscribed-trailer", "uploads", "url", "use-smart-timing", "value", "video-count", "view-count", "watch", "watch-history", "watch-icon-image-url", "watch-later", "width"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["audit-details", "background-color", "background-image-url", "banner-external-url", "banner-image-url", "banner-mobile-extra-hd-image-url", "banner-mobile-hd-image-url", "banner-mobile-image-url", "banner-mobile-low-image-url", "banner-mobile-medium-hd-image-url", "banner-tablet-extra-hd-image-url", "banner-tablet-hd-image-url", "banner-tablet-image-url", "banner-tablet-low-image-url", "banner-tv-high-image-url", "banner-tv-image-url", "banner-tv-low-image-url", "banner-tv-medium-image-url", "branding-settings", "channel", "comment-count", "community-guidelines-good-standing", "content-details", "content-id-claims-good-standing", "content-owner", "content-owner-details", "copyright-strikes-good-standing", "corner-position", "country", "custom-url", "default", "default-language", "default-tab", "default-timing", "description", "duration-ms", "etag", "favorites", "featured-channels-title", "featured-channels-urls", "featured-playlist-id", "height", "hidden-subscriber-count", "high", "id", "image", "invideo-promotion", "is-linked", "keywords", "kind", "large-branded-banner-image-imap-script", "large-branded-banner-image-url", "likes", "localized", "long-uploads-status", "maxres", "medium", "moderate-comments", "offset-ms", "overall-good-standing", "position", "privacy-status", "profile-color", "published-at", "related-playlists", "show-browse-view", "show-related-channels", "small-branded-banner-image-imap-script", "small-branded-banner-image-url", "snippet", "standard", "statistics", "status", "subscriber-count", "text-color", "thumbnails", "time-linked", "title", "topic-categories", "topic-details", "topic-ids", "tracking-analytics-account-id", "tracking-image-url", "type", "unsubscribed-trailer", "uploads", "url", "use-smart-timing", "value", "video-count", "view-count", "watch", "watch-history", "watch-icon-image-url", "watch-later", "width"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -3133,6 +3134,11 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "snippet.display-message" => Some(("snippet.displayMessage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "snippet.message-retracted-details.retracted-message-id" => Some(("snippet.messageRetractedDetails.retractedMessageId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "snippet.super-chat-details.tier" => Some(("snippet.superChatDetails.tier", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "snippet.super-chat-details.currency" => Some(("snippet.superChatDetails.currency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "snippet.super-chat-details.amount-display-string" => Some(("snippet.superChatDetails.amountDisplayString", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "snippet.super-chat-details.user-comment" => Some(("snippet.superChatDetails.userComment", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "snippet.super-chat-details.amount-micros" => Some(("snippet.superChatDetails.amountMicros", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "snippet.fan-funding-event-details.currency" => Some(("snippet.fanFundingEventDetails.currency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "snippet.fan-funding-event-details.amount-display-string" => Some(("snippet.fanFundingEventDetails.amountDisplayString", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "snippet.fan-funding-event-details.user-comment" => Some(("snippet.fanFundingEventDetails.userComment", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -3169,7 +3175,7 @@ impl<'n> Engine<'n> { "author-details.channel-url" => Some(("authorDetails.channelUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["amount-display-string", "amount-micros", "author-channel-id", "author-details", "ban-duration-seconds", "ban-type", "banned-user-details", "channel-id", "channel-url", "currency", "deleted-message-id", "display-message", "display-name", "etag", "fan-funding-event-details", "has-display-content", "id", "is-chat-moderator", "is-chat-owner", "is-chat-sponsor", "is-verified", "item-id", "kind", "live-chat-id", "message-deleted-details", "message-retracted-details", "message-text", "poll-closed-details", "poll-edited-details", "poll-id", "poll-opened-details", "poll-voted-details", "profile-image-url", "prompt", "published-at", "retracted-message-id", "snippet", "text-message-details", "type", "user-banned-details", "user-comment"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["amount-display-string", "amount-micros", "author-channel-id", "author-details", "ban-duration-seconds", "ban-type", "banned-user-details", "channel-id", "channel-url", "currency", "deleted-message-id", "display-message", "display-name", "etag", "fan-funding-event-details", "has-display-content", "id", "is-chat-moderator", "is-chat-owner", "is-chat-sponsor", "is-verified", "item-id", "kind", "live-chat-id", "message-deleted-details", "message-retracted-details", "message-text", "poll-closed-details", "poll-edited-details", "poll-id", "poll-opened-details", "poll-voted-details", "profile-image-url", "prompt", "published-at", "retracted-message-id", "snippet", "super-chat-details", "text-message-details", "tier", "type", "user-banned-details", "user-comment"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -5029,6 +5035,68 @@ impl<'n> Engine<'n> { } } + fn _super_chat_events_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.super_chat_events().list(opt.value_of("part").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("")); + }, + "max-results" => { + call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); + }, + "hl" => { + call = call.hl(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(["page-token", "hl", "max-results"].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(), + _ => 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(()) + } + } + } + } + fn _thumbnails_set(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.thumbnails().set(opt.value_of("video-id").unwrap_or("")); @@ -5343,6 +5411,7 @@ impl<'n> Engine<'n> { "status.rejection-reason" => Some(("status.rejectionReason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "status.failure-reason" => Some(("status.failureReason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "topic-details.topic-ids" => Some(("topicDetails.topicIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "topic-details.topic-categories" => Some(("topicDetails.topicCategories", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "topic-details.relevant-topic-ids" => Some(("topicDetails.relevantTopicIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "statistics.comment-count" => Some(("statistics.commentCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -5500,7 +5569,7 @@ impl<'n> Engine<'n> { "recording-details.location.longitude" => Some(("recordingDetails.location.longitude", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["acb-rating", "access", "active-live-chat-id", "actual-end-time", "actual-start-time", "agcom-rating", "age-gating", "alcohol-content", "allowed", "altitude", "anatel-rating", "bbfc-rating", "bfvc-rating", "bitrate-bps", "blocked", "bmukk-rating", "caption", "category-id", "catv-rating", "catvfr-rating", "cbfc-rating", "ccc-rating", "cce-rating", "channel-id", "channel-title", "chfilm-rating", "chvrs-rating", "cicf-rating", "cna-rating", "cnc-rating", "comment-count", "concurrent-viewers", "container", "content-details", "content-rating", "country-restriction", "creation-time", "csa-rating", "cscf-rating", "czfilm-rating", "default", "default-audio-language", "default-language", "definition", "description", "dimension", "dislike-count", "djctq-rating", "djctq-rating-reasons", "duration", "duration-ms", "ecbmct-rating", "editor-suggestions", "editor-suggestions-availability", "eefilm-rating", "egfilm-rating", "eirin-rating", "embed-height", "embed-html", "embed-width", "embeddable", "etag", "exception", "failure-reason", "favorite-count", "fcbm-rating", "fco-rating", "file-details", "file-details-availability", "file-name", "file-size", "file-type", "fmoc-rating", "fpb-rating", "fpb-rating-reasons", "fsk-rating", "grfilm-rating", "has-custom-thumbnail", "height", "high", "icaa-rating", "id", "ifco-rating", "ilfilm-rating", "incaa-rating", "kfcb-rating", "kijkwijzer-rating", "kind", "kmrb-rating", "latitude", "license", "licensed-content", "like-count", "live-broadcast-content", "live-streaming-details", "localized", "location", "location-description", "longitude", "lsf-rating", "maxres", "mccaa-rating", "mccyp-rating", "mcst-rating", "mda-rating", "medietilsynet-rating", "medium", "meku-rating", "mibac-rating", "moc-rating", "moctw-rating", "monetization-details", "mpaa-rating", "mtrcb-rating", "nbc-rating", "nbcpl-rating", "nfrc-rating", "nfvcb-rating", "nkclv-rating", "oflc-rating", "parts-processed", "parts-total", "pefilm-rating", "player", "privacy-status", "processing-details", "processing-errors", "processing-failure-reason", "processing-hints", "processing-issues-availability", "processing-progress", "processing-status", "processing-warnings", "project-details", "projection", "public-stats-viewable", "publish-at", "published-at", "rcnof-rating", "recording-date", "recording-details", "region-restriction", "rejection-reason", "relevant-topic-ids", "resorteviolencia-rating", "restricted", "rtc-rating", "rte-rating", "russia-rating", "scheduled-end-time", "scheduled-start-time", "skfilm-rating", "smais-rating", "smsa-rating", "snippet", "standard", "statistics", "status", "suggestions", "tag-suggestions-availability", "tags", "thumbnails", "thumbnails-availability", "time-left-ms", "title", "topic-details", "topic-ids", "tvpg-rating", "upload-status", "url", "video-game-rating", "view-count", "width", "yt-rating"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["acb-rating", "access", "active-live-chat-id", "actual-end-time", "actual-start-time", "agcom-rating", "age-gating", "alcohol-content", "allowed", "altitude", "anatel-rating", "bbfc-rating", "bfvc-rating", "bitrate-bps", "blocked", "bmukk-rating", "caption", "category-id", "catv-rating", "catvfr-rating", "cbfc-rating", "ccc-rating", "cce-rating", "channel-id", "channel-title", "chfilm-rating", "chvrs-rating", "cicf-rating", "cna-rating", "cnc-rating", "comment-count", "concurrent-viewers", "container", "content-details", "content-rating", "country-restriction", "creation-time", "csa-rating", "cscf-rating", "czfilm-rating", "default", "default-audio-language", "default-language", "definition", "description", "dimension", "dislike-count", "djctq-rating", "djctq-rating-reasons", "duration", "duration-ms", "ecbmct-rating", "editor-suggestions", "editor-suggestions-availability", "eefilm-rating", "egfilm-rating", "eirin-rating", "embed-height", "embed-html", "embed-width", "embeddable", "etag", "exception", "failure-reason", "favorite-count", "fcbm-rating", "fco-rating", "file-details", "file-details-availability", "file-name", "file-size", "file-type", "fmoc-rating", "fpb-rating", "fpb-rating-reasons", "fsk-rating", "grfilm-rating", "has-custom-thumbnail", "height", "high", "icaa-rating", "id", "ifco-rating", "ilfilm-rating", "incaa-rating", "kfcb-rating", "kijkwijzer-rating", "kind", "kmrb-rating", "latitude", "license", "licensed-content", "like-count", "live-broadcast-content", "live-streaming-details", "localized", "location", "location-description", "longitude", "lsf-rating", "maxres", "mccaa-rating", "mccyp-rating", "mcst-rating", "mda-rating", "medietilsynet-rating", "medium", "meku-rating", "mibac-rating", "moc-rating", "moctw-rating", "monetization-details", "mpaa-rating", "mtrcb-rating", "nbc-rating", "nbcpl-rating", "nfrc-rating", "nfvcb-rating", "nkclv-rating", "oflc-rating", "parts-processed", "parts-total", "pefilm-rating", "player", "privacy-status", "processing-details", "processing-errors", "processing-failure-reason", "processing-hints", "processing-issues-availability", "processing-progress", "processing-status", "processing-warnings", "project-details", "projection", "public-stats-viewable", "publish-at", "published-at", "rcnof-rating", "recording-date", "recording-details", "region-restriction", "rejection-reason", "relevant-topic-ids", "resorteviolencia-rating", "restricted", "rtc-rating", "rte-rating", "russia-rating", "scheduled-end-time", "scheduled-start-time", "skfilm-rating", "smais-rating", "smsa-rating", "snippet", "standard", "statistics", "status", "suggestions", "tag-suggestions-availability", "tags", "thumbnails", "thumbnails-availability", "time-left-ms", "title", "topic-categories", "topic-details", "topic-ids", "tvpg-rating", "upload-status", "url", "video-game-rating", "view-count", "width", "yt-rating"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -5830,6 +5899,7 @@ impl<'n> Engine<'n> { "status.rejection-reason" => Some(("status.rejectionReason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "status.failure-reason" => Some(("status.failureReason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "topic-details.topic-ids" => Some(("topicDetails.topicIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "topic-details.topic-categories" => Some(("topicDetails.topicCategories", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "topic-details.relevant-topic-ids" => Some(("topicDetails.relevantTopicIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "statistics.comment-count" => Some(("statistics.commentCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -5987,7 +6057,7 @@ impl<'n> Engine<'n> { "recording-details.location.longitude" => Some(("recordingDetails.location.longitude", JsonTypeInfo { jtype: JsonType::Float, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["acb-rating", "access", "active-live-chat-id", "actual-end-time", "actual-start-time", "agcom-rating", "age-gating", "alcohol-content", "allowed", "altitude", "anatel-rating", "bbfc-rating", "bfvc-rating", "bitrate-bps", "blocked", "bmukk-rating", "caption", "category-id", "catv-rating", "catvfr-rating", "cbfc-rating", "ccc-rating", "cce-rating", "channel-id", "channel-title", "chfilm-rating", "chvrs-rating", "cicf-rating", "cna-rating", "cnc-rating", "comment-count", "concurrent-viewers", "container", "content-details", "content-rating", "country-restriction", "creation-time", "csa-rating", "cscf-rating", "czfilm-rating", "default", "default-audio-language", "default-language", "definition", "description", "dimension", "dislike-count", "djctq-rating", "djctq-rating-reasons", "duration", "duration-ms", "ecbmct-rating", "editor-suggestions", "editor-suggestions-availability", "eefilm-rating", "egfilm-rating", "eirin-rating", "embed-height", "embed-html", "embed-width", "embeddable", "etag", "exception", "failure-reason", "favorite-count", "fcbm-rating", "fco-rating", "file-details", "file-details-availability", "file-name", "file-size", "file-type", "fmoc-rating", "fpb-rating", "fpb-rating-reasons", "fsk-rating", "grfilm-rating", "has-custom-thumbnail", "height", "high", "icaa-rating", "id", "ifco-rating", "ilfilm-rating", "incaa-rating", "kfcb-rating", "kijkwijzer-rating", "kind", "kmrb-rating", "latitude", "license", "licensed-content", "like-count", "live-broadcast-content", "live-streaming-details", "localized", "location", "location-description", "longitude", "lsf-rating", "maxres", "mccaa-rating", "mccyp-rating", "mcst-rating", "mda-rating", "medietilsynet-rating", "medium", "meku-rating", "mibac-rating", "moc-rating", "moctw-rating", "monetization-details", "mpaa-rating", "mtrcb-rating", "nbc-rating", "nbcpl-rating", "nfrc-rating", "nfvcb-rating", "nkclv-rating", "oflc-rating", "parts-processed", "parts-total", "pefilm-rating", "player", "privacy-status", "processing-details", "processing-errors", "processing-failure-reason", "processing-hints", "processing-issues-availability", "processing-progress", "processing-status", "processing-warnings", "project-details", "projection", "public-stats-viewable", "publish-at", "published-at", "rcnof-rating", "recording-date", "recording-details", "region-restriction", "rejection-reason", "relevant-topic-ids", "resorteviolencia-rating", "restricted", "rtc-rating", "rte-rating", "russia-rating", "scheduled-end-time", "scheduled-start-time", "skfilm-rating", "smais-rating", "smsa-rating", "snippet", "standard", "statistics", "status", "suggestions", "tag-suggestions-availability", "tags", "thumbnails", "thumbnails-availability", "time-left-ms", "title", "topic-details", "topic-ids", "tvpg-rating", "upload-status", "url", "video-game-rating", "view-count", "width", "yt-rating"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["acb-rating", "access", "active-live-chat-id", "actual-end-time", "actual-start-time", "agcom-rating", "age-gating", "alcohol-content", "allowed", "altitude", "anatel-rating", "bbfc-rating", "bfvc-rating", "bitrate-bps", "blocked", "bmukk-rating", "caption", "category-id", "catv-rating", "catvfr-rating", "cbfc-rating", "ccc-rating", "cce-rating", "channel-id", "channel-title", "chfilm-rating", "chvrs-rating", "cicf-rating", "cna-rating", "cnc-rating", "comment-count", "concurrent-viewers", "container", "content-details", "content-rating", "country-restriction", "creation-time", "csa-rating", "cscf-rating", "czfilm-rating", "default", "default-audio-language", "default-language", "definition", "description", "dimension", "dislike-count", "djctq-rating", "djctq-rating-reasons", "duration", "duration-ms", "ecbmct-rating", "editor-suggestions", "editor-suggestions-availability", "eefilm-rating", "egfilm-rating", "eirin-rating", "embed-height", "embed-html", "embed-width", "embeddable", "etag", "exception", "failure-reason", "favorite-count", "fcbm-rating", "fco-rating", "file-details", "file-details-availability", "file-name", "file-size", "file-type", "fmoc-rating", "fpb-rating", "fpb-rating-reasons", "fsk-rating", "grfilm-rating", "has-custom-thumbnail", "height", "high", "icaa-rating", "id", "ifco-rating", "ilfilm-rating", "incaa-rating", "kfcb-rating", "kijkwijzer-rating", "kind", "kmrb-rating", "latitude", "license", "licensed-content", "like-count", "live-broadcast-content", "live-streaming-details", "localized", "location", "location-description", "longitude", "lsf-rating", "maxres", "mccaa-rating", "mccyp-rating", "mcst-rating", "mda-rating", "medietilsynet-rating", "medium", "meku-rating", "mibac-rating", "moc-rating", "moctw-rating", "monetization-details", "mpaa-rating", "mtrcb-rating", "nbc-rating", "nbcpl-rating", "nfrc-rating", "nfvcb-rating", "nkclv-rating", "oflc-rating", "parts-processed", "parts-total", "pefilm-rating", "player", "privacy-status", "processing-details", "processing-errors", "processing-failure-reason", "processing-hints", "processing-issues-availability", "processing-progress", "processing-status", "processing-warnings", "project-details", "projection", "public-stats-viewable", "publish-at", "published-at", "rcnof-rating", "recording-date", "recording-details", "region-restriction", "rejection-reason", "relevant-topic-ids", "resorteviolencia-rating", "restricted", "rtc-rating", "rte-rating", "russia-rating", "scheduled-end-time", "scheduled-start-time", "skfilm-rating", "smais-rating", "smsa-rating", "snippet", "standard", "statistics", "status", "suggestions", "tag-suggestions-availability", "tags", "thumbnails", "thumbnails-availability", "time-left-ms", "title", "topic-categories", "topic-details", "topic-ids", "tvpg-rating", "upload-status", "url", "video-game-rating", "view-count", "width", "yt-rating"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -6541,6 +6611,17 @@ impl<'n> Engine<'n> { } } }, + ("super-chat-events", Some(opt)) => { + match opt.subcommand() { + ("list", Some(opt)) => { + call_result = self._super_chat_events_list(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("super-chat-events".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, ("thumbnails", Some(opt)) => { match opt.subcommand() { ("set", Some(opt)) => { @@ -8081,6 +8162,31 @@ fn main() { ]), ]), + ("super-chat-events", "methods: 'list'", vec![ + ("list", + Some(r##"Lists Super Chat events for a channel."##), + "Details at http://byron.github.io/google-apis-rs/google_youtube3_cli/super-chat-events_list", + vec![ + (Some(r##"part"##), + None, + Some(r##"The part parameter specifies the superChatEvent resource parts that the API response will include. Supported values are id and snippet."##), + 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)), + ]), + ]), + ("thumbnails", "methods: 'set'", vec![ ("set", Some(r##"Uploads a custom video thumbnail to YouTube and sets it for a video."##), @@ -8366,7 +8472,7 @@ fn main() { let mut app = App::new("youtube3") .author("Sebastian Thiel ") - .version("1.0.4+20161202") + .version("1.0.4+20170130") .about("Supports core YouTube features, such as uploading videos, creating and managing playlists, searching for content, and much more.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_youtube3_cli") .arg(Arg::with_name("url") diff --git a/gen/youtube3/Cargo.toml b/gen/youtube3/Cargo.toml index 57b2f839c5..989ccfca87 100644 --- a/gen/youtube3/Cargo.toml +++ b/gen/youtube3/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-youtube3" -version = "1.0.4+20161202" +version = "1.0.4+20170130" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtube3" homepage = "https://developers.google.com/youtube/v3" -documentation = "https://docs.rs/google-youtube3/1.0.4+20161202" +documentation = "https://docs.rs/google-youtube3/1.0.4+20170130" license = "MIT" keywords = ["youtube", "google", "protocol", "web", "api"] diff --git a/gen/youtube3/README.md b/gen/youtube3/README.md index 64d36e0b2d..054b1caf11 100644 --- a/gen/youtube3/README.md +++ b/gen/youtube3/README.md @@ -5,84 +5,86 @@ DO NOT EDIT ! --> The `google-youtube3` library allows access to all features of the *Google YouTube* service. -This documentation was generated from *YouTube* crate version *1.0.4+20161202*, where *20161202* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *YouTube* crate version *1.0.4+20170130*, where *20170130* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *YouTube* *v3* API can be found at the [official documentation site](https://developers.google.com/youtube/v3). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.YouTube.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.YouTube.html) ... -* [activities](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.Activity.html) - * [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ActivityInsertCall.html) and [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ActivityListCall.html) -* [captions](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.Caption.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CaptionDeleteCall.html), [*download*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CaptionDownloadCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CaptionInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CaptionListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CaptionUpdateCall.html) +* [activities](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.Activity.html) + * [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ActivityInsertCall.html) and [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ActivityListCall.html) +* [captions](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.Caption.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CaptionDeleteCall.html), [*download*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CaptionDownloadCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CaptionInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CaptionListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CaptionUpdateCall.html) * channel banners - * [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ChannelBannerInsertCall.html) -* [channel sections](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ChannelSection.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ChannelSectionDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ChannelSectionInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ChannelSectionListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ChannelSectionUpdateCall.html) -* [channels](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.Channel.html) - * [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ChannelListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ChannelUpdateCall.html) -* [comment threads](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentThread.html) - * [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentThreadInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentThreadListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentThreadUpdateCall.html) -* [comments](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.Comment.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentListCall.html), [*mark as spam*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentMarkAsSpamCall.html), [*set moderation status*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentSetModerationStatuCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CommentUpdateCall.html) -* [fan funding events](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.FanFundingEvent.html) - * [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.FanFundingEventListCall.html) -* [guide categories](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.GuideCategory.html) - * [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.GuideCategoryListCall.html) -* [i18n languages](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.I18nLanguage.html) - * [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.I18nLanguageListCall.html) -* [i18n regions](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.I18nRegion.html) - * [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.I18nRegionListCall.html) -* [live broadcasts](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveBroadcast.html) - * [*bind*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveBroadcastBindCall.html), [*control*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveBroadcastControlCall.html), [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveBroadcastDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveBroadcastInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveBroadcastListCall.html), [*transition*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveBroadcastTransitionCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveBroadcastUpdateCall.html) -* [live chat bans](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatBan.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatBanDeleteCall.html) and [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatBanInsertCall.html) -* [live chat messages](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatMessage.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatMessageDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatMessageInsertCall.html) and [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatMessageListCall.html) -* [live chat moderators](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatModerator.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatModeratorDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatModeratorInsertCall.html) and [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveChatModeratorListCall.html) -* [live streams](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveStream.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveStreamDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveStreamInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveStreamListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.LiveStreamUpdateCall.html) -* [playlist items](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistItem.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistItemDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistItemInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistItemListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistItemUpdateCall.html) -* [playlists](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.Playlist.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistUpdateCall.html) + * [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ChannelBannerInsertCall.html) +* [channel sections](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ChannelSection.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ChannelSectionDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ChannelSectionInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ChannelSectionListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ChannelSectionUpdateCall.html) +* [channels](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.Channel.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ChannelListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ChannelUpdateCall.html) +* [comment threads](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentThread.html) + * [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentThreadInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentThreadListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentThreadUpdateCall.html) +* [comments](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.Comment.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentListCall.html), [*mark as spam*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentMarkAsSpamCall.html), [*set moderation status*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentSetModerationStatuCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CommentUpdateCall.html) +* [fan funding events](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.FanFundingEvent.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.FanFundingEventListCall.html) +* [guide categories](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.GuideCategory.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.GuideCategoryListCall.html) +* [i18n languages](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.I18nLanguage.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.I18nLanguageListCall.html) +* [i18n regions](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.I18nRegion.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.I18nRegionListCall.html) +* [live broadcasts](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveBroadcast.html) + * [*bind*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveBroadcastBindCall.html), [*control*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveBroadcastControlCall.html), [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveBroadcastDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveBroadcastInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveBroadcastListCall.html), [*transition*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveBroadcastTransitionCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveBroadcastUpdateCall.html) +* [live chat bans](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatBan.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatBanDeleteCall.html) and [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatBanInsertCall.html) +* [live chat messages](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatMessage.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatMessageDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatMessageInsertCall.html) and [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatMessageListCall.html) +* [live chat moderators](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatModerator.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatModeratorDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatModeratorInsertCall.html) and [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveChatModeratorListCall.html) +* [live streams](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveStream.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveStreamDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveStreamInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveStreamListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.LiveStreamUpdateCall.html) +* [playlist items](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistItem.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistItemDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistItemInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistItemListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistItemUpdateCall.html) +* [playlists](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.Playlist.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistListCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistUpdateCall.html) * search - * [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.SearchListCall.html) -* [sponsors](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.Sponsor.html) - * [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.SponsorListCall.html) -* [subscriptions](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.Subscription.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.SubscriptionDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.SubscriptionInsertCall.html) and [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.SubscriptionListCall.html) -* [thumbnails](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.Thumbnail.html) - * [*set*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ThumbnailSetCall.html) -* [video abuse report reasons](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoAbuseReportReason.html) - * [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoAbuseReportReasonListCall.html) -* [video categories](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoCategory.html) - * [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoCategoryListCall.html) -* [videos](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.Video.html) - * [*delete*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoDeleteCall.html), [*get rating*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoGetRatingCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoListCall.html), [*rate*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoRateCall.html), [*report abuse*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoReportAbuseCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoUpdateCall.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.SearchListCall.html) +* [sponsors](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.Sponsor.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.SponsorListCall.html) +* [subscriptions](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.Subscription.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.SubscriptionDeleteCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.SubscriptionInsertCall.html) and [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.SubscriptionListCall.html) +* [super chat events](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.SuperChatEvent.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.SuperChatEventListCall.html) +* [thumbnails](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.Thumbnail.html) + * [*set*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ThumbnailSetCall.html) +* [video abuse report reasons](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoAbuseReportReason.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoAbuseReportReasonListCall.html) +* [video categories](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoCategory.html) + * [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoCategoryListCall.html) +* [videos](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.Video.html) + * [*delete*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoDeleteCall.html), [*get rating*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoGetRatingCall.html), [*insert*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoInsertCall.html), [*list*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoListCall.html), [*rate*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoRateCall.html), [*report abuse*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoReportAbuseCall.html) and [*update*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoUpdateCall.html) * watermarks - * [*set*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.WatermarkSetCall.html) and [*unset*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.WatermarkUnsetCall.html) + * [*set*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.WatermarkSetCall.html) and [*unset*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.WatermarkUnsetCall.html) Upload supported by ... -* [*set thumbnails*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ThumbnailSetCall.html) -* [*insert captions*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CaptionInsertCall.html) -* [*insert videos*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.VideoInsertCall.html) -* [*set watermarks*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.WatermarkSetCall.html) -* [*insert channel banners*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.ChannelBannerInsertCall.html) -* [*update captions*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CaptionUpdateCall.html) +* [*set thumbnails*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ThumbnailSetCall.html) +* [*insert captions*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CaptionInsertCall.html) +* [*insert videos*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.VideoInsertCall.html) +* [*set watermarks*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.WatermarkSetCall.html) +* [*insert channel banners*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.ChannelBannerInsertCall.html) +* [*update captions*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CaptionUpdateCall.html) Download supported by ... -* [*download captions*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.CaptionDownloadCall.html) +* [*download captions*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.CaptionDownloadCall.html) Subscription supported by ... -* [*list playlist items*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.PlaylistItemListCall.html) +* [*list playlist items*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.PlaylistItemListCall.html) @@ -90,17 +92,17 @@ Subscription supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/struct.YouTube.html)** +* **[Hub](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/struct.YouTube.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.Part.html)** + * **[Parts](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -200,17 +202,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.Delegate.html), 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-youtube3/1.0.4+20161202/google_youtube3/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.ResponseResult.html), 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")`. @@ -220,29 +222,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.CallBuilder.html) 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-youtube3/1.0.4+20161202/google_youtube3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.RequestValue.html) and -[decodable](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.RequestValue.html) and +[decodable](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-youtube3/1.0.4+20161202/google_youtube3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.CallBuilder.html), 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-youtube3/1.0.4+20161202/google_youtube3/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-youtube3/1.0.4+20170130/google_youtube3/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/youtube3/src/lib.rs b/gen/youtube3/src/lib.rs index 00bb16ef45..17042aebcb 100644 --- a/gen/youtube3/src/lib.rs +++ b/gen/youtube3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *YouTube* crate version *1.0.4+20161202*, where *20161202* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *YouTube* crate version *1.0.4+20170130*, where *20170130* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *YouTube* *v3* API can be found at the //! [official documentation site](https://developers.google.com/youtube/v3). @@ -53,6 +53,8 @@ //! * [*list*](struct.SponsorListCall.html) //! * [subscriptions](struct.Subscription.html) //! * [*delete*](struct.SubscriptionDeleteCall.html), [*insert*](struct.SubscriptionInsertCall.html) and [*list*](struct.SubscriptionListCall.html) +//! * [super chat events](struct.SuperChatEvent.html) +//! * [*list*](struct.SuperChatEventListCall.html) //! * [thumbnails](struct.Thumbnail.html) //! * [*set*](struct.ThumbnailSetCall.html) //! * [video abuse report reasons](struct.VideoAbuseReportReason.html) @@ -490,6 +492,9 @@ impl<'a, C, A> YouTube pub fn subscriptions(&'a self) -> SubscriptionMethods<'a, C, A> { SubscriptionMethods { hub: &self } } + pub fn super_chat_events(&'a self) -> SuperChatEventMethods<'a, C, A> { + SuperChatEventMethods { hub: &self } + } pub fn thumbnails(&'a self) -> ThumbnailMethods<'a, C, A> { ThumbnailMethods { hub: &self } } @@ -997,6 +1002,61 @@ impl ToParts for FanFundingEvent { } } +/// There is no detailed description. +/// +/// # 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*). +/// +/// * [list super chat events](struct.SuperChatEventListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SuperChatEventListResponse { + /// Serialized EventId of the request which produced this response. + #[serde(rename="eventId")] + pub event_id: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#superChatEventListResponse". + pub kind: Option, + /// The visitorId identifies the visitor. + #[serde(rename="visitorId")] + pub visitor_id: Option, + /// A list of Super Chat purchases that match the request criteria. + pub items: Option>, + /// no description provided + #[serde(rename="tokenPagination")] + pub token_pagination: Option, + /// Etag of this resource. + pub etag: Option, + /// no description provided + #[serde(rename="pageInfo")] + pub page_info: Option, +} + +impl ResponseResult for SuperChatEventListResponse {} + +impl ToParts for SuperChatEventListResponse { + /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. + /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or + /// the parts you want to see in the server response. + fn to_parts(&self) -> String { + let mut r = String::new(); + if self.event_id.is_some() { r = r + "eventId,"; } + if self.next_page_token.is_some() { r = r + "nextPageToken,"; } + if self.kind.is_some() { r = r + "kind,"; } + if self.visitor_id.is_some() { r = r + "visitorId,"; } + if self.items.is_some() { r = r + "items,"; } + if self.token_pagination.is_some() { r = r + "tokenPagination,"; } + if self.etag.is_some() { r = r + "etag,"; } + if self.page_info.is_some() { r = r + "pageInfo,"; } + r.pop(); + r + } +} + /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1013,62 +1073,27 @@ impl Part for LiveChatTextMessageDetails {} /// There is no detailed description. /// -/// # 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*). -/// -/// * [list playlists](struct.PlaylistListCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct PlaylistListResponse { - /// Serialized EventId of the request which produced this response. - #[serde(rename="eventId")] - pub event_id: Option, - /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistListResponse". - pub kind: Option, - /// The visitorId identifies the visitor. - #[serde(rename="visitorId")] - pub visitor_id: Option, - /// A list of playlists that match the request criteria. - pub items: Option>, - /// no description provided - #[serde(rename="tokenPagination")] - pub token_pagination: Option, - /// Etag of this resource. - pub etag: Option, - /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. - #[serde(rename="prevPageToken")] - pub prev_page_token: Option, - /// no description provided - #[serde(rename="pageInfo")] - pub page_info: Option, +pub struct LiveChatSuperChatDetails { + /// The tier in which the amount belongs to. Lower amounts belong to lower tiers. Starts at 1. + pub tier: Option, + /// The currency in which the purchase was made. + pub currency: Option, + /// A rendered string that displays the fund amount and currency to the user. + #[serde(rename="amountDisplayString")] + pub amount_display_string: Option, + /// The amount purchased by the user, in micros (1,750,000 micros = 1.75). + #[serde(rename="amountMicros")] + pub amount_micros: Option, + /// The comment added by the user to this Super Chat event. + #[serde(rename="userComment")] + pub user_comment: Option, } -impl ResponseResult for PlaylistListResponse {} +impl Part for LiveChatSuperChatDetails {} -impl ToParts for PlaylistListResponse { - /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. - /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or - /// the parts you want to see in the server response. - fn to_parts(&self) -> String { - let mut r = String::new(); - if self.event_id.is_some() { r = r + "eventId,"; } - if self.next_page_token.is_some() { r = r + "nextPageToken,"; } - if self.kind.is_some() { r = r + "kind,"; } - if self.visitor_id.is_some() { r = r + "visitorId,"; } - if self.items.is_some() { r = r + "items,"; } - if self.token_pagination.is_some() { r = r + "tokenPagination,"; } - if self.etag.is_some() { r = r + "etag,"; } - if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } - if self.page_info.is_some() { r = r + "pageInfo,"; } - r.pop(); - r - } -} /// Pings that the app shall fire (authenticated by biscotti cookie). Each ping has a context, in which the app must fire the ping, and a url identifying the ping. /// @@ -1175,6 +1200,9 @@ pub struct ChannelTopicDetails { /// A list of Freebase topic IDs associated with the channel. You can retrieve information about each topic using the Freebase Topic API. #[serde(rename="topicIds")] pub topic_ids: Option>, + /// A list of Wikipedia URLs that describe the channel's content. + #[serde(rename="topicCategories")] + pub topic_categories: Option>, } impl Part for ChannelTopicDetails {} @@ -1252,6 +1280,23 @@ pub struct VideoMonetizationDetails { impl Part for VideoMonetizationDetails {} +/// The contentOwnerDetails object encapsulates channel data that is relevant for YouTube Partners linked with the channel. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ChannelContentOwnerDetails { + /// The ID of the content owner linked to the channel. + #[serde(rename="contentOwner")] + pub content_owner: Option, + /// The date and time of when the channel was linked to the content owner. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + #[serde(rename="timeLinked")] + pub time_linked: Option, +} + +impl Part for ChannelContentOwnerDetails {} + + /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1292,39 +1337,38 @@ pub struct VideoAbuseReportReasonSnippet { impl Part for VideoAbuseReportReasonSnippet {} -/// Describes processing status and progress and availability of some other Video resource parts. +/// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct VideoProcessingDetails { - /// This value indicates whether file details are available for the uploaded video. You can retrieve a video's file details by requesting the fileDetails part in your videos.list() request. - #[serde(rename="fileDetailsAvailability")] - pub file_details_availability: Option, - /// This value indicates whether video editing suggestions, which might improve video quality or the playback experience, are available for the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. - #[serde(rename="editorSuggestionsAvailability")] - pub editor_suggestions_availability: Option, - /// The video's processing status. This value indicates whether YouTube was able to process the video or if the video is still being processed. - #[serde(rename="processingStatus")] - pub processing_status: Option, - /// This value indicates whether the video processing engine has generated suggestions that might improve YouTube's ability to process the the video, warnings that explain video processing problems, or errors that cause video processing problems. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. - #[serde(rename="processingIssuesAvailability")] - pub processing_issues_availability: Option, - /// The reason that YouTube failed to process the video. This property will only have a value if the processingStatus property's value is failed. - #[serde(rename="processingFailureReason")] - pub processing_failure_reason: Option, - /// This value indicates whether thumbnail images have been generated for the video. - #[serde(rename="thumbnailsAvailability")] - pub thumbnails_availability: Option, - /// The processingProgress object contains information about the progress YouTube has made in processing the video. The values are really only relevant if the video's processing status is processing. - #[serde(rename="processingProgress")] - pub processing_progress: Option, - /// This value indicates whether keyword (tag) suggestions are available for the video. Tags can be added to a video's metadata to make it easier for other users to find the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. - #[serde(rename="tagSuggestionsAvailability")] - pub tag_suggestions_availability: Option, +pub struct SuperChatEventSnippet { + /// The text contents of the comment left by the user. + #[serde(rename="commentText")] + pub comment_text: Option, + /// Channel id where the event occurred. + #[serde(rename="channelId")] + pub channel_id: Option, + /// Details about the supporter. + #[serde(rename="supporterDetails")] + pub supporter_details: Option, + /// The purchase amount, in micros of the purchase currency. e.g., 1 is represented as 1000000. + #[serde(rename="amountMicros")] + pub amount_micros: Option, + /// The currency in which the purchase was made. ISO 4217. + pub currency: Option, + /// The tier for the paid message, which is based on the amount of money spent to purchase the message. + #[serde(rename="messageType")] + pub message_type: Option, + /// A rendered string that displays the purchase amount and currency (e.g., "$1.00"). The string is rendered for the given language. + #[serde(rename="displayString")] + pub display_string: Option, + /// The date and time when the event occurred. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. + #[serde(rename="createdAt")] + pub created_at: Option, } -impl Part for VideoProcessingDetails {} +impl Part for SuperChatEventSnippet {} /// The conversionPings object encapsulates information about conversion pings that need to be respected by the channel. @@ -1763,15 +1807,9 @@ impl Part for VideoSnippet {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LiveChatMessageSnippet { - /// Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent. - #[serde(rename="displayMessage")] - pub display_message: Option, /// no description provided #[serde(rename="messageRetractedDetails")] pub message_retracted_details: Option, - /// Details about the funding event, this is only set if the type is 'fanFundingEvent'. - #[serde(rename="fanFundingEventDetails")] - pub fan_funding_event_details: Option, /// Whether the message has display content that should be displayed to users. #[serde(rename="hasDisplayContent")] pub has_display_content: Option, @@ -1779,14 +1817,8 @@ pub struct LiveChatMessageSnippet { #[serde(rename="publishedAt")] pub published_at: Option, /// no description provided - #[serde(rename="userBannedDetails")] - pub user_banned_details: Option, - /// no description provided #[serde(rename="liveChatId")] pub live_chat_id: Option, - /// The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action - #[serde(rename="authorChannelId")] - pub author_channel_id: Option, /// no description provided #[serde(rename="pollEditedDetails")] pub poll_edited_details: Option, @@ -1794,11 +1826,26 @@ pub struct LiveChatMessageSnippet { #[serde(rename="textMessageDetails")] pub text_message_details: Option, /// no description provided - #[serde(rename="messageDeletedDetails")] - pub message_deleted_details: Option, - /// no description provided #[serde(rename="pollVotedDetails")] pub poll_voted_details: Option, + /// Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent. + #[serde(rename="displayMessage")] + pub display_message: Option, + /// Details about the Super Chat event, this is only set if the type is 'superChatEvent'. + #[serde(rename="superChatDetails")] + pub super_chat_details: Option, + /// Details about the funding event, this is only set if the type is 'fanFundingEvent'. + #[serde(rename="fanFundingEventDetails")] + pub fan_funding_event_details: Option, + /// no description provided + #[serde(rename="userBannedDetails")] + pub user_banned_details: Option, + /// The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase + #[serde(rename="authorChannelId")] + pub author_channel_id: Option, + /// no description provided + #[serde(rename="messageDeletedDetails")] + pub message_deleted_details: Option, /// no description provided #[serde(rename="pollOpenedDetails")] pub poll_opened_details: Option, @@ -3637,6 +3684,41 @@ pub struct ActivitySnippet { impl Part for ActivitySnippet {} +/// Describes processing status and progress and availability of some other Video resource parts. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct VideoProcessingDetails { + /// This value indicates whether file details are available for the uploaded video. You can retrieve a video's file details by requesting the fileDetails part in your videos.list() request. + #[serde(rename="fileDetailsAvailability")] + pub file_details_availability: Option, + /// This value indicates whether video editing suggestions, which might improve video quality or the playback experience, are available for the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. + #[serde(rename="editorSuggestionsAvailability")] + pub editor_suggestions_availability: Option, + /// The video's processing status. This value indicates whether YouTube was able to process the video or if the video is still being processed. + #[serde(rename="processingStatus")] + pub processing_status: Option, + /// This value indicates whether the video processing engine has generated suggestions that might improve YouTube's ability to process the the video, warnings that explain video processing problems, or errors that cause video processing problems. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. + #[serde(rename="processingIssuesAvailability")] + pub processing_issues_availability: Option, + /// The reason that YouTube failed to process the video. This property will only have a value if the processingStatus property's value is failed. + #[serde(rename="processingFailureReason")] + pub processing_failure_reason: Option, + /// This value indicates whether thumbnail images have been generated for the video. + #[serde(rename="thumbnailsAvailability")] + pub thumbnails_availability: Option, + /// The processingProgress object contains information about the progress YouTube has made in processing the video. The values are really only relevant if the video's processing status is processing. + #[serde(rename="processingProgress")] + pub processing_progress: Option, + /// This value indicates whether keyword (tag) suggestions are available for the video. Tags can be added to a video's metadata to make it easier for other users to find the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. + #[serde(rename="tagSuggestionsAvailability")] + pub tag_suggestions_availability: Option, +} + +impl Part for VideoProcessingDetails {} + + /// Basic details about a comment, such as its author and text. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -4180,6 +4262,44 @@ pub struct LiveChatModeratorSnippet { impl Part for LiveChatModeratorSnippet {} +/// A superChatEvent resource represents a Super Chat purchase on a YouTube channel. +/// +/// # 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*). +/// +/// * [list super chat events](struct.SuperChatEventListCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SuperChatEvent { + /// The snippet object contains basic details about the Super Chat event. + pub snippet: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#superChatEvent". + pub kind: Option, + /// Etag of this resource. + pub etag: Option, + /// The ID that YouTube assigns to uniquely identify the Super Chat event. + pub id: Option, +} + +impl Resource for SuperChatEvent {} + +impl ToParts for SuperChatEvent { + /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. + /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or + /// the parts you want to see in the server response. + fn to_parts(&self) -> String { + let mut r = String::new(); + if self.snippet.is_some() { r = r + "snippet,"; } + if self.kind.is_some() { r = r + "kind,"; } + if self.etag.is_some() { r = r + "etag,"; } + if self.id.is_some() { r = r + "id,"; } + r.pop(); + r + } +} + /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -4221,22 +4341,64 @@ pub struct PlaylistItemContentDetails { impl Part for PlaylistItemContentDetails {} -/// The contentOwnerDetails object encapsulates channel data that is relevant for YouTube Partners linked with the channel. +/// There is no detailed description. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # 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*). +/// +/// * [list playlists](struct.PlaylistListCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ChannelContentOwnerDetails { - /// The ID of the content owner linked to the channel. - #[serde(rename="contentOwner")] - pub content_owner: Option, - /// The date and time of when the channel was linked to the content owner. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - #[serde(rename="timeLinked")] - pub time_linked: Option, +pub struct PlaylistListResponse { + /// Serialized EventId of the request which produced this response. + #[serde(rename="eventId")] + pub event_id: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// Identifies what kind of resource this is. Value: the fixed string "youtube#playlistListResponse". + pub kind: Option, + /// The visitorId identifies the visitor. + #[serde(rename="visitorId")] + pub visitor_id: Option, + /// A list of playlists that match the request criteria. + pub items: Option>, + /// no description provided + #[serde(rename="tokenPagination")] + pub token_pagination: Option, + /// Etag of this resource. + pub etag: Option, + /// The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. + #[serde(rename="prevPageToken")] + pub prev_page_token: Option, + /// no description provided + #[serde(rename="pageInfo")] + pub page_info: Option, } -impl Part for ChannelContentOwnerDetails {} +impl ResponseResult for PlaylistListResponse {} +impl ToParts for PlaylistListResponse { + /// Return a comma separated list of members that are currently set, i.e. for which `self.member.is_some()`. + /// The produced string is suitable for use as a parts list that indicates the parts you are sending, and/or + /// the parts you want to see in the server response. + fn to_parts(&self) -> String { + let mut r = String::new(); + if self.event_id.is_some() { r = r + "eventId,"; } + if self.next_page_token.is_some() { r = r + "nextPageToken,"; } + if self.kind.is_some() { r = r + "kind,"; } + if self.visitor_id.is_some() { r = r + "visitorId,"; } + if self.items.is_some() { r = r + "items,"; } + if self.token_pagination.is_some() { r = r + "tokenPagination,"; } + if self.etag.is_some() { r = r + "etag,"; } + if self.prev_page_token.is_some() { r = r + "prevPageToken,"; } + if self.page_info.is_some() { r = r + "pageInfo,"; } + r.pop(); + r + } +} /// There is no detailed description. /// @@ -5241,6 +5403,9 @@ pub struct VideoTopicDetails { /// Similar to topic_id, except that these topics are merely relevant to the video. These are topics that may be mentioned in, or appear in the video. You can retrieve information about each topic using Freebase Topic API. #[serde(rename="relevantTopicIds")] pub relevant_topic_ids: Option>, + /// A list of Wikipedia URLs that provide a high-level description of the video's content. + #[serde(rename="topicCategories")] + pub topic_categories: Option>, } impl Part for VideoTopicDetails {} @@ -8094,6 +8259,29 @@ impl<'a, C, A> LiveBroadcastMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active. + /// + /// # Arguments + /// + /// * `broadcastStatus` - The broadcastStatus parameter identifies the state to which the broadcast is changing. Note that to transition a broadcast to either the testing or live state, the status.streamStatus must be active for the stream that the broadcast is bound to. + /// * `id` - The id parameter specifies the unique ID of the broadcast that is transitioning to another status. + /// * `part` - The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. + pub fn transition(&self, broadcast_status: &str, id: &str, part: &str) -> LiveBroadcastTransitionCall<'a, C, A> { + LiveBroadcastTransitionCall { + hub: self.hub, + _broadcast_status: broadcast_status.to_string(), + _id: id.to_string(), + _part: part.to_string(), + _on_behalf_of_content_owner_channel: Default::default(), + _on_behalf_of_content_owner: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Creates a broadcast. @@ -8158,29 +8346,6 @@ impl<'a, C, A> LiveBroadcastMethods<'a, C, A> { _additional_params: Default::default(), } } - - /// Create a builder to help you perform the following task: - /// - /// Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active. - /// - /// # Arguments - /// - /// * `broadcastStatus` - The broadcastStatus parameter identifies the state to which the broadcast is changing. Note that to transition a broadcast to either the testing or live state, the status.streamStatus must be active for the stream that the broadcast is bound to. - /// * `id` - The id parameter specifies the unique ID of the broadcast that is transitioning to another status. - /// * `part` - The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. - pub fn transition(&self, broadcast_status: &str, id: &str, part: &str) -> LiveBroadcastTransitionCall<'a, C, A> { - LiveBroadcastTransitionCall { - hub: self.hub, - _broadcast_status: broadcast_status.to_string(), - _id: id.to_string(), - _part: part.to_string(), - _on_behalf_of_content_owner_channel: Default::default(), - _on_behalf_of_content_owner: Default::default(), - _delegate: Default::default(), - _scopes: Default::default(), - _additional_params: Default::default(), - } - } } @@ -8336,6 +8501,67 @@ impl<'a, C, A> SearchMethods<'a, C, A> { +/// A builder providing access to all methods supported on *superChatEvent* resources. +/// It is not used directly, but through the `YouTube` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_youtube3 as youtube3; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use youtube3::YouTube; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = YouTube::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `list(...)` +/// // to build up your call. +/// let rb = hub.super_chat_events(); +/// # } +/// ``` +pub struct SuperChatEventMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a YouTube, +} + +impl<'a, C, A> MethodsBuilder for SuperChatEventMethods<'a, C, A> {} + +impl<'a, C, A> SuperChatEventMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Lists Super Chat events for a channel. + /// + /// # Arguments + /// + /// * `part` - The part parameter specifies the superChatEvent resource parts that the API response will include. Supported values are id and snippet. + pub fn list(&self, part: &str) -> SuperChatEventListCall<'a, C, A> { + SuperChatEventListCall { + hub: self.hub, + _part: part.to_string(), + _page_token: Default::default(), + _max_results: Default::default(), + _hl: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *thumbnail* resources. /// It is not used directly, but through the `YouTube` hub. /// @@ -25603,6 +25829,297 @@ impl<'a, C, A> LiveBroadcastBindCall<'a, C, A> where C: BorrowMut } +/// Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active. +/// +/// A builder for the *transition* method supported by a *liveBroadcast* resource. +/// It is not used directly, but through a `LiveBroadcastMethods` instance. +/// +/// **Settable Parts** +/// +/// * *id* +/// * *snippet* +/// * *contentDetails* +/// * *status* +/// +/// # Scopes +/// +/// You will need authorization for at least one of the following scopes to make a valid call, possibly depending on *parts*: +/// +/// * *https://www.googleapis.com/auth/youtube* +/// * *https://www.googleapis.com/auth/youtube.force-ssl* +/// +/// The default scope will be `Scope::Full`. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_youtube3 as youtube3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use youtube3::YouTube; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = YouTube::new(hyper::Client::new(), 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.live_broadcasts().transition("broadcastStatus", "id", "part") +/// .on_behalf_of_content_owner_channel("magna") +/// .on_behalf_of_content_owner("ipsum") +/// .doit(); +/// # } +/// ``` +pub struct LiveBroadcastTransitionCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a YouTube, + _broadcast_status: String, + _id: String, + _part: String, + _on_behalf_of_content_owner_channel: Option, + _on_behalf_of_content_owner: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for LiveBroadcastTransitionCall<'a, C, A> {} + +impl<'a, C, A> LiveBroadcastTransitionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, LiveBroadcast)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "youtube.liveBroadcasts.transition", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("broadcastStatus", self._broadcast_status.to_string())); + params.push(("id", self._id.to_string())); + params.push(("part", self._part.to_string())); + if let Some(value) = self._on_behalf_of_content_owner_channel { + params.push(("onBehalfOfContentOwnerChannel", value.to_string())); + } + if let Some(value) = self._on_behalf_of_content_owner { + params.push(("onBehalfOfContentOwner", value.to_string())); + } + for &field in ["alt", "broadcastStatus", "id", "part", "onBehalfOfContentOwnerChannel", "onBehalfOfContentOwner"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/youtube/v3/liveBroadcasts/transition".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The broadcastStatus parameter identifies the state to which the broadcast is changing. Note that to transition a broadcast to either the testing or live state, the status.streamStatus must be active for the stream that the broadcast is bound to. + /// + /// Sets the *broadcast status* query 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 broadcast_status(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { + self._broadcast_status = new_value.to_string(); + self + } + /// The id parameter specifies the unique ID of the broadcast that is transitioning to another status. + /// + /// Sets the *id* query 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 id(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { + self._id = new_value.to_string(); + self + } + /// The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. + /// + /// Sets the *part* query property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + /// + /// **Settable Parts** + /// + /// * *id* + /// * *snippet* + /// * *contentDetails* + /// * *status* + pub fn part(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { + self._part = new_value.to_string(); + self + } + /// This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners. + /// + /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. + /// + /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. + /// + /// Sets the *on behalf of content owner channel* query property to the given value. + pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { + self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); + self + } + /// Note: This parameter is intended exclusively for YouTube content partners. + /// + /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. + /// + /// Sets the *on behalf of content owner* query property to the given value. + pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { + self._on_behalf_of_content_owner = 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. + /// + /// 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 Delegate) -> LiveBroadcastTransitionCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> LiveBroadcastTransitionCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Full`. + /// + /// 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: T) -> LiveBroadcastTransitionCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Creates a broadcast. /// /// A builder for the *insert* method supported by a *liveBroadcast* resource. @@ -25650,14 +26167,14 @@ impl<'a, C, A> LiveBroadcastBindCall<'a, C, A> where C: BorrowMut /// req.status = Default::default(); // is LiveBroadcastStatus /// req.content_details = Default::default(); // is LiveBroadcastContentDetails /// req.snippet = Default::default(); // is LiveBroadcastSnippet -/// req.id = Some("dolore".to_string()); +/// req.id = Some("invidunt".to_string()); /// /// // 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.live_broadcasts().insert(req) -/// .on_behalf_of_content_owner_channel("magna") -/// .on_behalf_of_content_owner("elitr") +/// .on_behalf_of_content_owner_channel("accusam") +/// .on_behalf_of_content_owner("labore") /// .doit(); /// # } /// ``` @@ -25947,8 +26464,8 @@ impl<'a, C, A> LiveBroadcastInsertCall<'a, C, A> where C: BorrowMut LiveBroadcastDeleteCall<'a, C, A> where C: BorrowMut LiveBroadcastListCall<'a, C, A> where C: BorrowMut } -/// Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active. -/// -/// A builder for the *transition* method supported by a *liveBroadcast* resource. -/// It is not used directly, but through a `LiveBroadcastMethods` instance. -/// -/// **Settable Parts** -/// -/// * *id* -/// * *snippet* -/// * *contentDetails* -/// * *status* -/// -/// # Scopes -/// -/// You will need authorization for at least one of the following scopes to make a valid call, possibly depending on *parts*: -/// -/// * *https://www.googleapis.com/auth/youtube* -/// * *https://www.googleapis.com/auth/youtube.force-ssl* -/// -/// The default scope will be `Scope::Full`. -/// -/// # Example -/// -/// Instantiate a resource method builder -/// -/// ```test_harness,no_run -/// # extern crate hyper; -/// # extern crate yup_oauth2 as oauth2; -/// # extern crate google_youtube3 as youtube3; -/// # #[test] fn egal() { -/// # use std::default::Default; -/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use youtube3::YouTube; -/// -/// # let secret: ApplicationSecret = Default::default(); -/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, -/// # hyper::Client::new(), -/// # ::default(), None); -/// # let mut hub = YouTube::new(hyper::Client::new(), 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.live_broadcasts().transition("broadcastStatus", "id", "part") -/// .on_behalf_of_content_owner_channel("takimata") -/// .on_behalf_of_content_owner("dolores") -/// .doit(); -/// # } -/// ``` -pub struct LiveBroadcastTransitionCall<'a, C, A> - where C: 'a, A: 'a { - - hub: &'a YouTube, - _broadcast_status: String, - _id: String, - _part: String, - _on_behalf_of_content_owner_channel: Option, - _on_behalf_of_content_owner: Option, - _delegate: Option<&'a mut Delegate>, - _additional_params: HashMap, - _scopes: BTreeMap -} - -impl<'a, C, A> CallBuilder for LiveBroadcastTransitionCall<'a, C, A> {} - -impl<'a, C, A> LiveBroadcastTransitionCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { - - - /// Perform the operation you have build so far. - pub fn doit(mut self) -> Result<(hyper::client::Response, LiveBroadcast)> { - use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; - let mut dd = DefaultDelegate; - let mut dlg: &mut Delegate = match self._delegate { - Some(d) => d, - None => &mut dd - }; - dlg.begin(MethodInfo { id: "youtube.liveBroadcasts.transition", - http_method: hyper::method::Method::Post }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); - params.push(("broadcastStatus", self._broadcast_status.to_string())); - params.push(("id", self._id.to_string())); - params.push(("part", self._part.to_string())); - if let Some(value) = self._on_behalf_of_content_owner_channel { - params.push(("onBehalfOfContentOwnerChannel", value.to_string())); - } - if let Some(value) = self._on_behalf_of_content_owner { - params.push(("onBehalfOfContentOwner", value.to_string())); - } - for &field in ["alt", "broadcastStatus", "id", "part", "onBehalfOfContentOwnerChannel", "onBehalfOfContentOwner"].iter() { - if self._additional_params.contains_key(field) { - dlg.finished(false); - return Err(Error::FieldClash(field)); - } - } - for (name, value) in self._additional_params.iter() { - params.push((&name, value.clone())); - } - - params.push(("alt", "json".to_string())); - - let mut url = "https://www.googleapis.com/youtube/v3/liveBroadcasts/transition".to_string(); - if self._scopes.len() == 0 { - self._scopes.insert(Scope::Full.as_ref().to_string(), ()); - } - - - if params.len() > 0 { - url.push('?'); - url.push_str(&url::form_urlencoded::serialize(params)); - } - - - - loop { - let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { - Ok(token) => token, - Err(err) => { - match dlg.token(&*err) { - Some(token) => token, - None => { - dlg.finished(false); - return Err(Error::MissingToken(err)) - } - } - } - }; - let auth_header = Authorization(Bearer { token: token.access_token }); - let mut req_result = { - let mut client = &mut *self.hub.client.borrow_mut(); - let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) - .header(UserAgent(self.hub._user_agent.clone())) - .header(auth_header.clone()); - - dlg.pre_request(); - req.send() - }; - - match req_result { - Err(err) => { - if let oauth2::Retry::After(d) = dlg.http_error(&err) { - sleep(d); - continue; - } - dlg.finished(false); - return Err(Error::HttpError(err)) - } - Ok(mut res) => { - if !res.status.is_success() { - let mut json_err = String::new(); - res.read_to_string(&mut json_err).unwrap(); - if let oauth2::Retry::After(d) = dlg.http_failure(&res, - json::from_str(&json_err).ok(), - json::from_str(&json_err).ok()) { - sleep(d); - continue; - } - dlg.finished(false); - return match json::from_str::(&json_err){ - Err(_) => Err(Error::Failure(res)), - Ok(serr) => Err(Error::BadRequest(serr)) - } - } - let result_value = { - let mut json_response = String::new(); - res.read_to_string(&mut json_response).unwrap(); - match json::from_str(&json_response) { - Ok(decoded) => (res, decoded), - Err(err) => { - dlg.response_json_decode_error(&json_response, &err); - return Err(Error::JsonDecodeError(json_response, err)); - } - } - }; - - dlg.finished(true); - return Ok(result_value) - } - } - } - } - - - /// The broadcastStatus parameter identifies the state to which the broadcast is changing. Note that to transition a broadcast to either the testing or live state, the status.streamStatus must be active for the stream that the broadcast is bound to. - /// - /// Sets the *broadcast status* query 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 broadcast_status(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { - self._broadcast_status = new_value.to_string(); - self - } - /// The id parameter specifies the unique ID of the broadcast that is transitioning to another status. - /// - /// Sets the *id* query 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 id(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { - self._id = new_value.to_string(); - self - } - /// The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. - /// - /// Sets the *part* query property to the given value. - /// - /// Even though the property as already been set when instantiating this call, - /// we provide this method for API completeness. - /// - /// **Settable Parts** - /// - /// * *id* - /// * *snippet* - /// * *contentDetails* - /// * *status* - pub fn part(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { - self._part = new_value.to_string(); - self - } - /// This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners. - /// - /// The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. - /// - /// This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. - /// - /// Sets the *on behalf of content owner channel* query property to the given value. - pub fn on_behalf_of_content_owner_channel(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { - self._on_behalf_of_content_owner_channel = Some(new_value.to_string()); - self - } - /// Note: This parameter is intended exclusively for YouTube content partners. - /// - /// The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. - /// - /// Sets the *on behalf of content owner* query property to the given value. - pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> LiveBroadcastTransitionCall<'a, C, A> { - self._on_behalf_of_content_owner = 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. - /// - /// 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 Delegate) -> LiveBroadcastTransitionCall<'a, C, A> { - 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 paramters - /// 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. Overrides userIp if both are provided. - /// * *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. - /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. - /// * *alt* (query-string) - Data format for the response. - pub fn param(mut self, name: T, value: T) -> LiveBroadcastTransitionCall<'a, C, A> - 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 the default `Scope` variant - /// `Scope::Full`. - /// - /// 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: T) -> LiveBroadcastTransitionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); - self - } -} - - /// Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel: /// /// - Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels. @@ -27737,6 +27963,278 @@ impl<'a, C, A> SearchListCall<'a, C, A> where C: BorrowMut, A: oa } +/// Lists Super Chat events for a channel. +/// +/// A builder for the *list* method supported by a *superChatEvent* resource. +/// It is not used directly, but through a `SuperChatEventMethods` instance. +/// +/// **Settable Parts** +/// +/// * *id* +/// * *snippet* +/// +/// # Scopes +/// +/// You will need authorization for at least one of the following scopes to make a valid call, possibly depending on *parts*: +/// +/// * *https://www.googleapis.com/auth/youtube* +/// * *https://www.googleapis.com/auth/youtube.force-ssl* +/// * *https://www.googleapis.com/auth/youtube.readonly* +/// +/// The default scope will be `Scope::Readonly`. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_youtube3 as youtube3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use youtube3::YouTube; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = YouTube::new(hyper::Client::new(), 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.super_chat_events().list("part") +/// .page_token("ut") +/// .max_results(23) +/// .hl("tempor") +/// .doit(); +/// # } +/// ``` +pub struct SuperChatEventListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a YouTube, + _part: String, + _page_token: Option, + _max_results: Option, + _hl: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for SuperChatEventListCall<'a, C, A> {} + +impl<'a, C, A> SuperChatEventListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SuperChatEventListResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "youtube.superChatEvents.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("part", self._part.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._max_results { + params.push(("maxResults", value.to_string())); + } + if let Some(value) = self._hl { + params.push(("hl", value.to_string())); + } + for &field in ["alt", "part", "pageToken", "maxResults", "hl"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/youtube/v3/superChatEvents".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The part parameter specifies the superChatEvent resource parts that the API response will include. Supported values are id and snippet. + /// + /// Sets the *part* query property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + /// + /// **Settable Parts** + /// + /// * *id* + /// * *snippet* + pub fn part(mut self, new_value: &str) -> SuperChatEventListCall<'a, C, A> { + self._part = new_value.to_string(); + self + } + /// The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> SuperChatEventListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maxResults parameter specifies the maximum number of items that should be returned in the result set. + /// + /// Sets the *max results* query property to the given value. + pub fn max_results(mut self, new_value: u32) -> SuperChatEventListCall<'a, C, A> { + self._max_results = Some(new_value); + self + } + /// The hl parameter instructs the API to retrieve localized resource metadata for a specific application language that the YouTube website supports. The parameter value must be a language code included in the list returned by the i18nLanguages.list method. + /// + /// If localized resource details are available in that language, the resource's snippet.localized object will contain the localized values. However, if localized details are not available, the snippet.localized object will contain resource details in the resource's default language. + /// + /// Sets the *hl* query property to the given value. + pub fn hl(mut self, new_value: &str) -> SuperChatEventListCall<'a, C, A> { + self._hl = 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. + /// + /// 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 Delegate) -> SuperChatEventListCall<'a, C, A> { + 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 paramters + /// 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. Overrides userIp if both are provided. + /// * *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. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> SuperChatEventListCall<'a, C, A> + 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 the default `Scope` variant + /// `Scope::Readonly`. + /// + /// 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: T) -> SuperChatEventListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Uploads a custom video thumbnail to YouTube and sets it for a video. /// /// A builder for the *set* method supported by a *thumbnail* resource. @@ -27765,7 +28263,7 @@ impl<'a, C, A> SearchListCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `upload(...)`. /// // Values shown here are possibly random and not representative ! /// let result = hub.thumbnails().set("videoId") -/// .on_behalf_of_content_owner("ut") +/// .on_behalf_of_content_owner("erat") /// .upload(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); /// # } /// ``` @@ -28116,9 +28614,9 @@ impl<'a, C, A> ThumbnailSetCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.fan_funding_events().list("part") -/// .page_token("tempor") -/// .max_results(16) -/// .hl("erat") +/// .page_token("kasd") +/// .max_results(34) +/// .hl("clita") /// .doit(); /// # } /// ``` diff --git a/gen/youtubeanalytics1-cli/Cargo.toml b/gen/youtubeanalytics1-cli/Cargo.toml index 7f10cab175..eaa83b1555 100644 --- a/gen/youtubeanalytics1-cli/Cargo.toml +++ b/gen/youtubeanalytics1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-youtubeanalytics1-cli" -version = "1.0.4+20161213" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube Analytics (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtubeanalytics1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-youtubeanalytics1] path = "../youtubeanalytics1" -version = "1.0.4+20161213" +version = "1.0.4+20170517" diff --git a/gen/youtubeanalytics1-cli/README.md b/gen/youtubeanalytics1-cli/README.md index 8acb82852e..8d185a8105 100644 --- a/gen/youtubeanalytics1-cli/README.md +++ b/gen/youtubeanalytics1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *YouTube Analytics* API at revision *20161213*. The CLI is at version *1.0.4*. +This documentation was generated from the *YouTube Analytics* API at revision *20170517*. The CLI is at version *1.0.4*. ```bash youtubeanalytics1 [options] diff --git a/gen/youtubeanalytics1-cli/mkdocs.yml b/gen/youtubeanalytics1-cli/mkdocs.yml index fad7682b97..c2b6cf9741 100644 --- a/gen/youtubeanalytics1-cli/mkdocs.yml +++ b/gen/youtubeanalytics1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: YouTube Analytics v1.0.4+20161213 +site_name: YouTube Analytics v1.0.4+20170517 site_url: http://byron.github.io/google-apis-rs/google-youtubeanalytics1-cli site_description: A complete library to interact with YouTube Analytics (protocol v1) diff --git a/gen/youtubeanalytics1-cli/src/main.rs b/gen/youtubeanalytics1-cli/src/main.rs index c4af1f3615..c9f436c733 100644 --- a/gen/youtubeanalytics1-cli/src/main.rs +++ b/gen/youtubeanalytics1-cli/src/main.rs @@ -562,6 +562,9 @@ impl<'n> Engine<'n> { "max-results" => { call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); }, + "include-historical-channel-data" => { + call = call.include_historical_channel_data(arg_from_str(value.unwrap_or("false"), err, "include-historical-channel-data", "boolean")); + }, "filters" => { call = call.filters(value.unwrap_or("")); }, @@ -584,7 +587,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["sort", "max-results", "dimensions", "start-index", "currency", "filters"].iter().map(|v|*v)); + v.extend(["sort", "max-results", "dimensions", "start-index", "include-historical-channel-data", "currency", "filters"].iter().map(|v|*v)); v } )); } } @@ -944,7 +947,7 @@ fn main() { let mut app = App::new("youtubeanalytics1") .author("Sebastian Thiel ") - .version("1.0.4+20161213") + .version("1.0.4+20170517") .about("Retrieves your YouTube Analytics data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_youtubeanalytics1_cli") .arg(Arg::with_name("url") diff --git a/gen/youtubeanalytics1/Cargo.toml b/gen/youtubeanalytics1/Cargo.toml index ceb5dcb532..22d8b952eb 100644 --- a/gen/youtubeanalytics1/Cargo.toml +++ b/gen/youtubeanalytics1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-youtubeanalytics1" -version = "1.0.4+20161213" +version = "1.0.4+20170517" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube Analytics (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtubeanalytics1" homepage = "http://developers.google.com/youtube/analytics/" -documentation = "https://docs.rs/google-youtubeanalytics1/1.0.4+20161213" +documentation = "https://docs.rs/google-youtubeanalytics1/1.0.4+20170517" license = "MIT" keywords = ["youtubeAnalytics", "google", "protocol", "web", "api"] diff --git a/gen/youtubeanalytics1/README.md b/gen/youtubeanalytics1/README.md index f528e43064..dc5c4440c7 100644 --- a/gen/youtubeanalytics1/README.md +++ b/gen/youtubeanalytics1/README.md @@ -5,20 +5,20 @@ DO NOT EDIT ! --> The `google-youtubeanalytics1` library allows access to all features of the *Google YouTube Analytics* service. -This documentation was generated from *YouTube Analytics* crate version *1.0.4+20161213*, where *20161213* is the exact revision of the *youtubeAnalytics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *YouTube Analytics* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *youtubeAnalytics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *YouTube Analytics* *v1* API can be found at the [official documentation site](http://developers.google.com/youtube/analytics/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.YouTubeAnalytics.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.YouTubeAnalytics.html) ... -* [group items](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.GroupItem.html) - * [*delete*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.GroupItemDeleteCall.html), [*insert*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.GroupItemInsertCall.html) and [*list*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.GroupItemListCall.html) -* [groups](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.Group.html) - * [*delete*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.GroupDeleteCall.html), [*insert*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.GroupInsertCall.html), [*list*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.GroupListCall.html) and [*update*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.GroupUpdateCall.html) +* [group items](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.GroupItem.html) + * [*delete*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.GroupItemDeleteCall.html), [*insert*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.GroupItemInsertCall.html) and [*list*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.GroupItemListCall.html) +* [groups](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.Group.html) + * [*delete*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.GroupDeleteCall.html), [*insert*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.GroupInsertCall.html), [*list*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.GroupListCall.html) and [*update*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.GroupUpdateCall.html) * reports - * [*query*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.ReportQueryCall.html) + * [*query*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.ReportQueryCall.html) @@ -27,17 +27,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/struct.YouTubeAnalytics.html)** +* **[Hub](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/struct.YouTubeAnalytics.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.Part.html)** + * **[Parts](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -126,17 +126,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.Delegate.html), 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-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.ResponseResult.html), 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")`. @@ -146,29 +146,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.CallBuilder.html) 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-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.CallBuilder.html), 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-youtubeanalytics1/1.0.4+20161213/google_youtubeanalytics1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-youtubeanalytics1/1.0.4+20170517/google_youtubeanalytics1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/youtubeanalytics1/src/lib.rs b/gen/youtubeanalytics1/src/lib.rs index 9231550a10..49b27bf1b3 100644 --- a/gen/youtubeanalytics1/src/lib.rs +++ b/gen/youtubeanalytics1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *YouTube Analytics* crate version *1.0.4+20161213*, where *20161213* is the exact revision of the *youtubeAnalytics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *YouTube Analytics* crate version *1.0.4+20170517*, where *20170517* is the exact revision of the *youtubeAnalytics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *YouTube Analytics* *v1* API can be found at the //! [official documentation site](http://developers.google.com/youtube/analytics/). @@ -635,6 +635,7 @@ impl<'a, C, A> ReportMethods<'a, C, A> { _start_index: Default::default(), _sort: Default::default(), _max_results: Default::default(), + _include_historical_channel_data: Default::default(), _filters: Default::default(), _dimensions: Default::default(), _currency: Default::default(), @@ -889,8 +890,9 @@ impl<'a, C, A> GroupMethods<'a, C, A> { /// .start_index(-61) /// .sort("sadipscing") /// .max_results(-31) -/// .filters("ea") -/// .dimensions("no") +/// .include_historical_channel_data(false) +/// .filters("no") +/// .dimensions("justo") /// .currency("justo") /// .doit(); /// # } @@ -906,6 +908,7 @@ pub struct ReportQueryCall<'a, C, A> _start_index: Option, _sort: Option, _max_results: Option, + _include_historical_channel_data: Option, _filters: Option, _dimensions: Option, _currency: Option, @@ -930,7 +933,7 @@ impl<'a, C, A> ReportQueryCall<'a, C, A> where C: BorrowMut, A: o }; dlg.begin(MethodInfo { id: "youtubeAnalytics.reports.query", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((12 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((13 + self._additional_params.len())); params.push(("ids", self._ids.to_string())); params.push(("start-date", self._start_date.to_string())); params.push(("end-date", self._end_date.to_string())); @@ -944,6 +947,9 @@ impl<'a, C, A> ReportQueryCall<'a, C, A> where C: BorrowMut, A: o if let Some(value) = self._max_results { params.push(("max-results", value.to_string())); } + if let Some(value) = self._include_historical_channel_data { + params.push(("include-historical-channel-data", value.to_string())); + } if let Some(value) = self._filters { params.push(("filters", value.to_string())); } @@ -953,7 +959,7 @@ impl<'a, C, A> ReportQueryCall<'a, C, A> where C: BorrowMut, A: o if let Some(value) = self._currency { params.push(("currency", value.to_string())); } - for &field in ["alt", "ids", "start-date", "end-date", "metrics", "start-index", "sort", "max-results", "filters", "dimensions", "currency"].iter() { + for &field in ["alt", "ids", "start-date", "end-date", "metrics", "start-index", "sort", "max-results", "include-historical-channel-data", "filters", "dimensions", "currency"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -1110,6 +1116,13 @@ impl<'a, C, A> ReportQueryCall<'a, C, A> where C: BorrowMut, A: o self._max_results = Some(new_value); self } + /// If set to true historical data (i.e. channel data from before the linking of the channel to the content owner) will be retrieved. + /// + /// Sets the *include-historical-channel-data* query property to the given value. + pub fn include_historical_channel_data(mut self, new_value: bool) -> ReportQueryCall<'a, C, A> { + self._include_historical_channel_data = Some(new_value); + self + } /// A list of filters that should be applied when retrieving YouTube Analytics data. The Available Reports document identifies the dimensions that can be used to filter each report, and the Dimensions document defines those dimensions. If a request uses multiple filters, join them together with a semicolon (;), and the returned result table will satisfy both filters. For example, a filters parameter value of video==dMH0bHeiRNg;country==IT restricts the result set to include data for the given video in Italy. /// /// Sets the *filters* query property to the given value. @@ -1216,7 +1229,7 @@ impl<'a, C, A> ReportQueryCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.group_items().insert(req) -/// .on_behalf_of_content_owner("justo") +/// .on_behalf_of_content_owner("et") /// .doit(); /// # } /// ``` @@ -1457,7 +1470,7 @@ impl<'a, C, A> GroupItemInsertCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.group_items().list("groupId") -/// .on_behalf_of_content_owner("et") +/// .on_behalf_of_content_owner("diam") /// .doit(); /// # } /// ``` @@ -1685,7 +1698,7 @@ impl<'a, C, A> GroupItemListCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.group_items().delete("id") -/// .on_behalf_of_content_owner("ipsum") +/// .on_behalf_of_content_owner("Lorem") /// .doit(); /// # } /// ``` @@ -1902,7 +1915,7 @@ impl<'a, C, A> GroupItemDeleteCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.groups().delete("id") -/// .on_behalf_of_content_owner("et") +/// .on_behalf_of_content_owner("duo") /// .doit(); /// # } /// ``` @@ -2125,7 +2138,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.groups().insert(req) -/// .on_behalf_of_content_owner("duo") +/// .on_behalf_of_content_owner("aliquyam") /// .doit(); /// # } /// ``` @@ -2366,10 +2379,10 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.groups().list() -/// .page_token("aliquyam") -/// .on_behalf_of_content_owner("sea") +/// .page_token("sea") +/// .on_behalf_of_content_owner("Lorem") /// .mine(false) -/// .id("eos") +/// .id("erat") /// .doit(); /// # } /// ``` @@ -2624,7 +2637,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.groups().update(req) -/// .on_behalf_of_content_owner("erat") +/// .on_behalf_of_content_owner("sadipscing") /// .doit(); /// # } /// ``` diff --git a/gen/youtubereporting1-cli/Cargo.toml b/gen/youtubereporting1-cli/Cargo.toml index d4b626f3e2..e74949f081 100644 --- a/gen/youtubereporting1-cli/Cargo.toml +++ b/gen/youtubereporting1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-youtubereporting1-cli" -version = "1.0.4+20160719" +version = "1.0.4+20170520" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube Reporting (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtubereporting1-cli" @@ -24,7 +24,7 @@ serde_json = "^ 0.9" serde_derive = "^ 0.9" yup-oauth2 = "^ 1.0" strsim = "^0.5" -hyper-rustls = "^0.3" +hyper-rustls = "^0.6" yup-hyper-mock = "^2.0" clap = "^2.0" @@ -34,4 +34,4 @@ clap = "^2.0" [dependencies.google-youtubereporting1] path = "../youtubereporting1" -version = "1.0.4+20160719" +version = "1.0.4+20170520" diff --git a/gen/youtubereporting1-cli/README.md b/gen/youtubereporting1-cli/README.md index b323860c9e..4758f14164 100644 --- a/gen/youtubereporting1-cli/README.md +++ b/gen/youtubereporting1-cli/README.md @@ -25,7 +25,7 @@ Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/ma # Usage -This documentation was generated from the *YouTube Reporting* API at revision *20160719*. The CLI is at version *1.0.4*. +This documentation was generated from the *YouTube Reporting* API at revision *20170520*. The CLI is at version *1.0.4*. ```bash youtubereporting1 [options] diff --git a/gen/youtubereporting1-cli/mkdocs.yml b/gen/youtubereporting1-cli/mkdocs.yml index c3f2c9ec78..3cc367e767 100644 --- a/gen/youtubereporting1-cli/mkdocs.yml +++ b/gen/youtubereporting1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: YouTube Reporting v1.0.4+20160719 +site_name: YouTube Reporting v1.0.4+20170520 site_url: http://byron.github.io/google-apis-rs/google-youtubereporting1-cli site_description: A complete library to interact with YouTube Reporting (protocol v1) diff --git a/gen/youtubereporting1-cli/src/main.rs b/gen/youtubereporting1-cli/src/main.rs index 515a7d66ae..0bd34baf93 100644 --- a/gen/youtubereporting1-cli/src/main.rs +++ b/gen/youtubereporting1-cli/src/main.rs @@ -821,7 +821,8 @@ fn main() { Some(false)), ]), ("reports-list", - Some(r##"Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist."##), + Some(r##"Lists reports created by a specific job. + Returns NOT_FOUND if the job does not exist."##), "Details at http://byron.github.io/google-apis-rs/google_youtubereporting1_cli/jobs_reports-list", vec![ (Some(r##"job-id"##), @@ -846,12 +847,14 @@ fn main() { ("media", "methods: 'download'", vec![ ("download", - Some(r##"Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`."##), + Some(r##"Method for media download. Download is supported + on the URI `/v1/media/{+name}?alt=media`."##), "Details at http://byron.github.io/google-apis-rs/google_youtubereporting1_cli/media_download", vec![ (Some(r##"resource-name"##), None, - Some(r##"Name of the media that is being downloaded. See ReadRequest.resource_name."##), + Some(r##"Name of the media that is being downloaded. See + ReadRequest.resource_name."##), Some(true), Some(false)), @@ -892,7 +895,7 @@ fn main() { let mut app = App::new("youtubereporting1") .author("Sebastian Thiel ") - .version("1.0.4+20160719") + .version("1.0.4+20170520") .about("Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_youtubereporting1_cli") .arg(Arg::with_name("url") diff --git a/gen/youtubereporting1/Cargo.toml b/gen/youtubereporting1/Cargo.toml index 50d70ae7ba..51599884fc 100644 --- a/gen/youtubereporting1/Cargo.toml +++ b/gen/youtubereporting1/Cargo.toml @@ -4,12 +4,12 @@ [package] name = "google-youtubereporting1" -version = "1.0.4+20160719" +version = "1.0.4+20170520" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube Reporting (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtubereporting1" homepage = "https://developers.google.com/youtube/reporting/v1/reports/" -documentation = "https://docs.rs/google-youtubereporting1/1.0.4+20160719" +documentation = "https://docs.rs/google-youtubereporting1/1.0.4+20170520" license = "MIT" keywords = ["youtubereporting", "google", "protocol", "web", "api"] diff --git a/gen/youtubereporting1/README.md b/gen/youtubereporting1/README.md index 79dda0438a..bf388d2c53 100644 --- a/gen/youtubereporting1/README.md +++ b/gen/youtubereporting1/README.md @@ -5,25 +5,25 @@ DO NOT EDIT ! --> The `google-youtubereporting1` library allows access to all features of the *Google YouTube Reporting* service. -This documentation was generated from *YouTube Reporting* crate version *1.0.4+20160719*, where *20160719* is the exact revision of the *youtubereporting:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +This documentation was generated from *YouTube Reporting* crate version *1.0.4+20170520*, where *20170520* is the exact revision of the *youtubereporting:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. Everything else about the *YouTube Reporting* *v1* API can be found at the [official documentation site](https://developers.google.com/youtube/reporting/v1/reports/). # Features -Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.YouTubeReporting.html) ... +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.YouTubeReporting.html) ... -* [jobs](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.Job.html) - * [*create*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.JobCreateCall.html), [*delete*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.JobDeleteCall.html), [*get*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.JobGetCall.html), [*list*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.JobListCall.html), [*reports get*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.JobReportGetCall.html) and [*reports list*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.JobReportListCall.html) -* [media](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.Media.html) - * [*download*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.MediaDownloadCall.html) -* [report types](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.ReportType.html) - * [*list*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.ReportTypeListCall.html) +* [jobs](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.Job.html) + * [*create*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.JobCreateCall.html), [*delete*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.JobDeleteCall.html), [*get*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.JobGetCall.html), [*list*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.JobListCall.html), [*reports get*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.JobReportGetCall.html) and [*reports list*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.JobReportListCall.html) +* [media](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.Media.html) + * [*download*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.MediaDownloadCall.html) +* [report types](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.ReportType.html) + * [*list*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.ReportTypeListCall.html) Download supported by ... -* [*download media*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.MediaDownloadCall.html) +* [*download media*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.MediaDownloadCall.html) @@ -31,17 +31,17 @@ Download supported by ... The API is structured into the following primary items: -* **[Hub](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/struct.YouTubeReporting.html)** +* **[Hub](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/struct.YouTubeReporting.html)** * a central object to maintain state and allow accessing all *Activities* - * creates [*Method Builders*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.MethodsBuilder.html) which in turn - allow access to individual [*Call Builders*](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.CallBuilder.html) -* **[Resources](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.Resource.html)** + * creates [*Method Builders*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.CallBuilder.html) +* **[Resources](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* - * **[Parts](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.Part.html)** + * **[Parts](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.Part.html)** * a collection of properties * never directly used in *Activities* -* **[Activities](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.CallBuilder.html)** +* **[Activities](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.CallBuilder.html)** * operations to apply to *Resources* All *structures* are marked with applicable traits to further categorize them and ease browsing. @@ -134,17 +134,17 @@ match result { ``` ## Handling Errors -All errors produced by the system are provided either as [Result](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/enum.Result.html) enumeration as return value of +All errors produced by the system are provided either as [Result](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/enum.Result.html) enumeration as return value of the doit() methods, or handed as possibly intermediate results to either the -[Hub Delegate](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +[Hub Delegate](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.Delegate.html), 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-youtubereporting1/1.0.4+20160719/google_youtubereporting1/enum.Result.html), should be +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/enum.Result.html), should be read by you to obtain the media. -If such a method also supports a [Response Result](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.ResponseResult.html), it will return that by default. +If such a method also supports a [Response Result](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.ResponseResult.html), 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")`. @@ -154,29 +154,29 @@ Methods supporting uploads can do so using up to 2 different protocols: ## Customization and Callbacks -You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.Delegate.html) to the -[Method Builder](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.CallBuilder.html) before making the final `doit()` call. +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.Delegate.html) to the +[Method Builder](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.CallBuilder.html) 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-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +The [delegate trait](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.Delegate.html) 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 [enocodable](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.RequestValue.html) and -[decodable](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +All structures provided by this library are made to be [enocodable](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.RequestValue.html) and +[decodable](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.Part.html) which are identifiable by name, which will be sent to +Most optionals are are considered [Parts](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments -Using [method builders](https://docs.rs/google-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +Using [method builders](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.CallBuilder.html), 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-youtubereporting1/1.0.4+20160719/google_youtubereporting1/trait.RequestValue.html) are moved +* [request values](https://docs.rs/google-youtubereporting1/1.0.4+20170520/google_youtubereporting1/trait.RequestValue.html) are moved Arguments will always be copied or cloned into the builder, to make them independent of their original life times. diff --git a/gen/youtubereporting1/src/lib.rs b/gen/youtubereporting1/src/lib.rs index ca0ccafebf..3ebc39429c 100644 --- a/gen/youtubereporting1/src/lib.rs +++ b/gen/youtubereporting1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *YouTube Reporting* crate version *1.0.4+20160719*, where *20160719* is the exact revision of the *youtubereporting:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. +//! This documentation was generated from *YouTube Reporting* crate version *1.0.4+20170520*, where *20170520* is the exact revision of the *youtubereporting:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.4*. //! //! Everything else about the *YouTube Reporting* *v1* API can be found at the //! [official documentation site](https://developers.google.com/youtube/reporting/v1/reports/). @@ -375,7 +375,11 @@ impl<'a, C, A> YouTubeReporting /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListReportTypesResponse { - /// A token to retrieve next page of results. Pass this value in the ListReportTypesRequest.page_token field in the subsequent call to `ListReportTypes` method to retrieve the next page of results. + /// A token to retrieve next page of results. + /// Pass this value in the + /// ListReportTypesRequest.page_token + /// field in the subsequent call to `ListReportTypes` method to retrieve the next + /// page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The list of report types. @@ -416,7 +420,11 @@ impl ResponseResult for Media {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListJobsResponse { - /// A token to retrieve next page of results. Pass this value in the ListJobsRequest.page_token field in the subsequent call to `ListJobs` method to retrieve the next page of results. + /// A token to retrieve next page of results. + /// Pass this value in the + /// ListJobsRequest.page_token + /// field in the subsequent call to `ListJobs` method to retrieve the next + /// page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The list of jobs. @@ -442,15 +450,18 @@ impl ResponseResult for ListJobsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Job { - /// The date/time when this job will expire/expired. After a job expired, no new reports are generated. + /// The date/time when this job will expire/expired. After a job expired, no + /// new reports are generated. #[serde(rename="expireTime")] pub expire_time: Option, - /// The type of reports this job creates. Corresponds to the ID of a ReportType. + /// The type of reports this job creates. Corresponds to the ID of a + /// ReportType. #[serde(rename="reportTypeId")] pub report_type_id: Option, /// The name of the job (max. 100 characters). pub name: Option, - /// True if this a system-managed job that cannot be modified by the user; otherwise false. + /// True if this a system-managed job that cannot be modified by the user; + /// otherwise false. #[serde(rename="systemManaged")] pub system_managed: Option, /// The creation date/time of the job. @@ -476,7 +487,11 @@ impl ResponseResult for Job {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListReportsResponse { - /// A token to retrieve next page of results. Pass this value in the ListReportsRequest.page_token field in the subsequent call to `ListReports` method to retrieve the next page of results. + /// A token to retrieve next page of results. + /// Pass this value in the + /// ListReportsRequest.page_token + /// field in the subsequent call to `ListReports` method to retrieve the next + /// page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// The list of report types. @@ -497,7 +512,9 @@ impl ResponseResult for ListReportsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportType { - /// True if this a system-managed report type; otherwise false. Reporting jobs for system-managed report types are created automatically and can thus not be used in the `CreateJob` method. + /// True if this a system-managed report type; otherwise false. Reporting jobs + /// for system-managed report types are created automatically and can thus not + /// be used in the `CreateJob` method. #[serde(rename="systemManaged")] pub system_managed: Option, /// The ID of the report type (max. 100 characters). @@ -512,7 +529,8 @@ pub struct ReportType { impl Resource for ReportType {} -/// A report's metadata including the URL from which the report itself can be downloaded. +/// A report's metadata including the URL from which the report itself can be +/// downloaded. /// /// # Activities /// @@ -529,12 +547,14 @@ pub struct Report { /// The date/time when the job this report belongs to will expire/expired. #[serde(rename="jobExpireTime")] pub job_expire_time: Option, - /// The start of the time period that the report instance covers. The value is inclusive. + /// The start of the time period that the report instance covers. The value is + /// inclusive. #[serde(rename="startTime")] pub start_time: Option, /// The server-generated ID of the report. pub id: Option, - /// The end of the time period that the report instance covers. The value is exclusive. + /// The end of the time period that the report instance covers. The value is + /// exclusive. #[serde(rename="endTime")] pub end_time: Option, /// The date/time when this report was created. @@ -548,7 +568,15 @@ pub struct Report { impl ResponseResult for Report {} -/// 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); } The JSON representation for `Empty` is empty JSON object `{}`. +/// 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); +/// } +/// +/// The JSON representation for `Empty` is empty JSON object `{}`. /// /// # Activities /// @@ -608,11 +636,13 @@ impl<'a, C, A> MediaMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`. + /// Method for media download. Download is supported + /// on the URI `/v1/media/{+name}?alt=media`. /// /// # Arguments /// - /// * `resourceName` - Name of the media that is being downloaded. See ReadRequest.resource_name. + /// * `resourceName` - Name of the media that is being downloaded. See + /// ReadRequest.resource_name. pub fn download(&self, resource_name: &str) -> MediaDownloadCall<'a, C, A> { MediaDownloadCall { hub: self.hub, @@ -779,7 +809,8 @@ impl<'a, C, A> JobMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist. + /// Lists reports created by a specific job. + /// Returns NOT_FOUND if the job does not exist. /// /// # Arguments /// @@ -843,7 +874,8 @@ impl<'a, C, A> JobMethods<'a, C, A> { // CallBuilders ### // ################# -/// Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`. +/// Method for media download. Download is supported +/// on the URI `/v1/media/{+name}?alt=media`. /// /// This method supports **media download**. To enable it, adjust the builder like this: /// `.param("alt", "media")`. @@ -1041,7 +1073,8 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: } - /// Name of the media that is being downloaded. See ReadRequest.resource_name. + /// Name of the media that is being downloaded. See + /// ReadRequest.resource_name. /// /// Sets the *resource name* path property to the given value. /// @@ -1076,12 +1109,12 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> MediaDownloadCall<'a, C, A> @@ -1279,28 +1312,35 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A } - /// A token identifying a page of results the server should return. Typically, this is the value of ListReportTypesResponse.next_page_token returned in response to the previous call to the `ListReportTypes` method. + /// A token identifying a page of results the server should return. Typically, + /// this is the value of + /// ListReportTypesResponse.next_page_token + /// returned in response to the previous call to the `ListReportTypes` method. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ReportTypeListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Requested page size. Server may return fewer report types than requested. If unspecified, server will pick an appropriate default. + /// Requested page size. Server may return fewer report types than requested. + /// If unspecified, server will pick an appropriate default. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ReportTypeListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel). + /// The content owner's external ID on which behalf the user is acting on. If + /// not set, the user is acting for himself (his own channel). /// /// Sets the *on behalf of content owner* query property to the given value. pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> ReportTypeListCall<'a, C, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); self } - /// If set to true, also system-managed report types will be returned; otherwise only the report types that can be used to create new reporting jobs will be returned. + /// If set to true, also system-managed report types will be returned; + /// otherwise only the report types that can be used to create new reporting + /// jobs will be returned. /// /// Sets the *include system managed* query property to the given value. pub fn include_system_managed(mut self, new_value: bool) -> ReportTypeListCall<'a, C, A> { @@ -1332,12 +1372,12 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> ReportTypeListCall<'a, C, A> @@ -1553,7 +1593,8 @@ impl<'a, C, A> JobDeleteCall<'a, C, A> where C: BorrowMut, A: oau self._job_id = new_value.to_string(); self } - /// The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel). + /// The content owner's external ID on which behalf the user is acting on. If + /// not set, the user is acting for himself (his own channel). /// /// Sets the *on behalf of content owner* query property to the given value. pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> JobDeleteCall<'a, C, A> { @@ -1585,12 +1626,12 @@ impl<'a, C, A> JobDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> JobDeleteCall<'a, C, A> @@ -1818,7 +1859,8 @@ impl<'a, C, A> JobReportGetCall<'a, C, A> where C: BorrowMut, A: self._report_id = new_value.to_string(); self } - /// The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel). + /// The content owner's external ID on which behalf the user is acting on. If + /// not set, the user is acting for himself (his own channel). /// /// Sets the *on behalf of content owner* query property to the given value. pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> JobReportGetCall<'a, C, A> { @@ -1850,12 +1892,12 @@ impl<'a, C, A> JobReportGetCall<'a, C, A> where C: BorrowMut, A: /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> JobReportGetCall<'a, C, A> @@ -2071,7 +2113,8 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 self._job_id = new_value.to_string(); self } - /// The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel). + /// The content owner's external ID on which behalf the user is acting on. If + /// not set, the user is acting for himself (his own channel). /// /// Sets the *on behalf of content owner* query property to the given value. pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> JobGetCall<'a, C, A> { @@ -2103,12 +2146,12 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> JobGetCall<'a, C, A> @@ -2136,7 +2179,8 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } -/// Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist. +/// Lists reports created by a specific job. +/// Returns NOT_FOUND if the job does not exist. /// /// A builder for the *reports.list* method supported by a *job* resource. /// It is not used directly, but through a `JobMethods` instance. @@ -2349,35 +2393,42 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: self._job_id = new_value.to_string(); self } - /// If set, only reports whose start time is smaller than the specified date/time are returned. + /// If set, only reports whose start time is smaller than the specified + /// date/time are returned. /// /// Sets the *start time before* query property to the given value. pub fn start_time_before(mut self, new_value: &str) -> JobReportListCall<'a, C, A> { self._start_time_before = Some(new_value.to_string()); self } - /// If set, only reports whose start time is greater than or equal the specified date/time are returned. + /// If set, only reports whose start time is greater than or equal the + /// specified date/time are returned. /// /// Sets the *start time at or after* query property to the given value. pub fn start_time_at_or_after(mut self, new_value: &str) -> JobReportListCall<'a, C, A> { self._start_time_at_or_after = Some(new_value.to_string()); self } - /// A token identifying a page of results the server should return. Typically, this is the value of ListReportsResponse.next_page_token returned in response to the previous call to the `ListReports` method. + /// A token identifying a page of results the server should return. Typically, + /// this is the value of + /// ListReportsResponse.next_page_token + /// returned in response to the previous call to the `ListReports` method. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> JobReportListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Requested page size. Server may return fewer report types than requested. If unspecified, server will pick an appropriate default. + /// Requested page size. Server may return fewer report types than requested. + /// If unspecified, server will pick an appropriate default. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> JobReportListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel). + /// The content owner's external ID on which behalf the user is acting on. If + /// not set, the user is acting for himself (his own channel). /// /// Sets the *on behalf of content owner* query property to the given value. pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> JobReportListCall<'a, C, A> { @@ -2416,12 +2467,12 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> JobReportListCall<'a, C, A> @@ -2619,28 +2670,35 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth } - /// A token identifying a page of results the server should return. Typically, this is the value of ListReportTypesResponse.next_page_token returned in response to the previous call to the `ListJobs` method. + /// A token identifying a page of results the server should return. Typically, + /// this is the value of + /// ListReportTypesResponse.next_page_token + /// returned in response to the previous call to the `ListJobs` method. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> JobListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Requested page size. Server may return fewer jobs than requested. If unspecified, server will pick an appropriate default. + /// Requested page size. Server may return fewer jobs than requested. + /// If unspecified, server will pick an appropriate default. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> JobListCall<'a, C, A> { self._page_size = Some(new_value); self } - /// The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel). + /// The content owner's external ID on which behalf the user is acting on. If + /// not set, the user is acting for himself (his own channel). /// /// Sets the *on behalf of content owner* query property to the given value. pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> JobListCall<'a, C, A> { self._on_behalf_of_content_owner = Some(new_value.to_string()); self } - /// If set to true, also system-managed jobs will be returned; otherwise only user-created jobs will be returned. System-managed jobs can neither be modified nor deleted. + /// If set to true, also system-managed jobs will be returned; otherwise only + /// user-created jobs will be returned. System-managed jobs can neither be + /// modified nor deleted. /// /// Sets the *include system managed* query property to the given value. pub fn include_system_managed(mut self, new_value: bool) -> JobListCall<'a, C, A> { @@ -2672,12 +2730,12 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> JobListCall<'a, C, A> @@ -2891,7 +2949,8 @@ impl<'a, C, A> JobCreateCall<'a, C, A> where C: BorrowMut, A: oau self._request = new_value; self } - /// The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel). + /// The content owner's external ID on which behalf the user is acting on. If + /// not set, the user is acting for himself (his own channel). /// /// Sets the *on behalf of content owner* query property to the given value. pub fn on_behalf_of_content_owner(mut self, new_value: &str) -> JobCreateCall<'a, C, A> { @@ -2923,12 +2982,12 @@ impl<'a, C, A> JobCreateCall<'a, C, A> where C: BorrowMut, A: oau /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). /// * *access_token* (query-string) - OAuth access token. - /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). /// * *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. /// * *callback* (query-string) - JSONP /// * *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. - /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. /// * *alt* (query-string) - Data format for response. /// * *$.xgafv* (query-string) - V1 error format. pub fn param(mut self, name: T, value: T) -> JobCreateCall<'a, C, A>